Update the fee configuration for a given market.
The trade fee percentage (uint16).
The maximum entitlement (uint16).
insuranceFundEntitlementPct
The insurance fund entitlement percentage (uint16).
The maximum imbalance (uint56).
async def updateFees(marketId: int, tradeFeePct: int, maxEntitlement: int, insuranceFundEntitlementPct: int, maxImbalance: int):
contract = retrieveContract()
w3 = retrieveWeb3Instance()
fee_config = (tradeFeePct, maxEntitlement, insuranceFundEntitlementPct, maxImbalance)
transaction = contract.functions.updateFees(marketId, fee_config).build_transaction({'from': Web3.to_checksum_address(os.getenv('ACCOUNT')), 'nonce': w3.eth.get_transaction_count(Web3.to_checksum_address(os.getenv('ACCOUNT'))), 'gas': GAS_VALUE, 'gasPrice': math.ceil(w3.eth.gas_price + w3.eth.gas_price * 0.25)})
await submitTransactionWithOracle(w3, transaction, marketId)
print(f'Fees updated for market ID {marketId}')