[ZK Stack] - How to obtain MAX_TRANSACTION_GAS_LIMIT
inside a contract?
#897
-
Team or ProjectDrips Module Affected
Rust Version(The GH discussion template enforces unneeded fields, please consider removing them) Operating System
Issue DescriptionMy smart contract needs to obtain the maximum gas that can be used by a transaction. This is used for throttling usage of an off-chain resource, the gas cost of requesting it goes up with each call increasing the price until the transaction gas limit is reached and the resource can't be used at all until the cooldown ends. On regular EVM chains I'm using (edit) I've found Expected Behavior(The GH discussion template enforces unneeded fields, please consider removing them) Current Behavior(The GH discussion template enforces unneeded fields, please consider removing them) Repository Link (if applicable)No response Additional DetailsNo response Prior Research
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@CodeSandwich great question! I'm not sure if there is a way to dynamically get this value, but I will confirm. I believe you can rely on this value staying consistent unless there is a governance vote to explicitly approve this change on Era. However for other chains in the Elastic Network, this value may be different depending on their configuration. Edit: confirmed - there is no way to fetch this from inside a contract. |
Beta Was this translation helpful? Give feedback.
@CodeSandwich great question! I'm not sure if there is a way to dynamically get this value, but I will confirm. I believe you can rely on this value staying consistent unless there is a governance vote to explicitly approve this change on Era. However for other chains in the Elastic Network, this value may be different depending on their configuration.
Edit: confirmed - there is no way to fetch this from inside a contract.