get_gas_limits

Documentation for eth_defi.gmx.gas_utils.get_gas_limits function.

get_gas_limits(datastore_object, use_cache=True)

Given a Web3 contract object of the datastore, return a dictionary with the gas limits (as integers) that correspond to various operations used for execution fee calculation.

Uses module-level caching to avoid repeated RPC calls for the same datastore. Gas limits are cached per (chain_id, datastore_address) combination.

Parameters
  • datastore_object (web3.contract.Contract) – The connected contract instance

  • use_cache (bool) – Whether to use cached values. Default is True

Returns

Gas limit values for various operations

Return type

dict[str, int]