Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Add support for gasLimitOf function #535

Merged
merged 2 commits into from
Aug 5, 2022
Merged

Add support for gasLimitOf function #535

merged 2 commits into from
Aug 5, 2022

Conversation

adam-maj
Copy link
Contributor

@adam-maj adam-maj commented Aug 4, 2022

No description provided.

* 1, // proof max quantity per transaction
* ]);
* ```
* @returns the estimated gas limit in GWEI
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment is wrong

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about it were you referring to - something besides wei instead of gwei?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yes - just gas units

fn: keyof TContract["functions"] | (string & {}),
args: Parameters<TContract["functions"][typeof fn]> | any[],
): Promise<BigNumber> {
return this.contractWrapper.estimateGas(fn, args);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you write a quick test for this for sanity? can just check that gasLimit > 0

@adam-maj adam-maj merged commit 3bcb1ae into main Aug 5, 2022
@adam-maj adam-maj deleted the am/gas-limit branch August 5, 2022 00:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants