Multicall
- class synthetix.utils.multicall.ERC7412Requests
Bases:
object
- pyth_address = ''
- pyth_latest: list[HexStr] = []
- pyth_latest_fee = 0
- pyth_vaa: list[PythVaaRequest] = []
- class synthetix.utils.multicall.PythVaaRequest
Bases:
object
- fee = 0
- feed_ids: list[HexStr] = []
- publish_time = 0
- synthetix.utils.multicall.aggregate_erc7412_price_requests(snx, error, requests=None)
Figures out all the prices that have been requested by an ERC7412 error and puts them all in aggregated requests
- synthetix.utils.multicall.call_erc7412(snx, contract, function_name, args, calls=[], block='latest')
- synthetix.utils.multicall.decode_erc7412_errors_error(error)
Decodes an Errors error
- synthetix.utils.multicall.decode_erc7412_oracle_data_required_error(snx, error)
Decodes an OracleDataRequired error
- synthetix.utils.multicall.decode_result(contract, function_name, result)
- synthetix.utils.multicall.handle_erc7412_error(snx, error)
When receiving a ERC7412 error, will return an updated list of calls with the required price updates
- synthetix.utils.multicall.make_pyth_fulfillment_request(snx, address, update_type, feed_ids, price_update_data, publish_time_or_staleness, fee)
- synthetix.utils.multicall.multicall_erc7412(snx, contract, function_name, args_list, calls=[], block='latest')
- synthetix.utils.multicall.write_erc7412(snx, contract, function_name, args, tx_params={}, calls=[])