mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-10 09:43:10 +00:00
chore: estimate gas
This commit is contained in:
parent
e5ef13472c
commit
e5a52d0a9c
@ -432,9 +432,15 @@ export class RLNBaseContract {
|
||||
idCommitmentBigInt: bigint,
|
||||
eraseFromMembershipSet: boolean = true
|
||||
): Promise<ethers.ContractTransaction> {
|
||||
const estimatedGas = await this.contract.estimateGas[
|
||||
"eraseMemberships(uint256[],bool)"
|
||||
]([idCommitmentBigInt], eraseFromMembershipSet);
|
||||
const gasLimit = estimatedGas.add(10000);
|
||||
|
||||
const tx = await this.contract["eraseMemberships(uint256[],bool)"](
|
||||
[idCommitmentBigInt],
|
||||
eraseFromMembershipSet
|
||||
eraseFromMembershipSet,
|
||||
{ gasLimit }
|
||||
);
|
||||
await tx.wait();
|
||||
return tx;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user