Skip to content

Commit

Permalink
fix: add value in estimate gas (#16)
Browse files Browse the repository at this point in the history
Co-authored-by: Stefano Faieta <[email protected]>
  • Loading branch information
palace22 and stefanofa authored May 22, 2024
1 parent 6e47b16 commit 327fe3e
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/chains/evm/spoke/modules/folks-evm-account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,10 @@ export const prepareRaw = {
// get gas limits
const gasLimit = await spokeCommon.estimateGas.createAccount(
[params, accountId],
transactionOptions,
{
value: adapterFee,
...transactionOptions,
},
);
const returnReceiveGasLimit = BigInt(0);
const receiveGasLimit = BigInt(300000); // TODO
Expand Down Expand Up @@ -252,7 +255,10 @@ export const prepareRaw = {
// get gas limits
const gasLimit = await spokeCommon.estimateGas.inviteAddress(
[params, accountId, folksChainIdToInvite, addressToInvite],
transactionOptions,
{
value: adapterFee,
...transactionOptions,
},
);
const returnReceiveGasLimit = BigInt(0);
const receiveGasLimit = BigInt(300000); // TODO
Expand Down Expand Up @@ -311,7 +317,10 @@ export const prepareRaw = {
// get gas limits
const gasLimit = await spokeCommon.estimateGas.acceptInviteAddress(
[params, accountId],
transactionOptions,
{
value: adapterFee,
...transactionOptions,
},
);
const returnReceiveGasLimit = BigInt(0);
const receiveGasLimit = BigInt(300000); // TODO
Expand Down Expand Up @@ -370,7 +379,10 @@ export const prepareRaw = {
// get gas limits
const gasLimit = await spokeCommon.estimateGas.unregisterAddress(
[params, accountId, folksChainIdToUnregister],
transactionOptions,
{
value: adapterFee,
...transactionOptions,
},
);
const returnReceiveGasLimit = BigInt(0);
const receiveGasLimit = BigInt(300000); // TODO
Expand Down

0 comments on commit 327fe3e

Please sign in to comment.