From 327fe3efbf86d436819053781d9b8794df8b7a19 Mon Sep 17 00:00:00 2001 From: Giuseppe Palazzolo <38705839+palace22@users.noreply.github.com> Date: Wed, 22 May 2024 18:45:22 +0200 Subject: [PATCH] fix: add value in estimate gas (#16) Co-authored-by: Stefano Faieta <9802152+stefanofa@users.noreply.github.com> --- .../evm/spoke/modules/folks-evm-account.ts | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/chains/evm/spoke/modules/folks-evm-account.ts b/src/chains/evm/spoke/modules/folks-evm-account.ts index 7ab6100..b4e28af 100644 --- a/src/chains/evm/spoke/modules/folks-evm-account.ts +++ b/src/chains/evm/spoke/modules/folks-evm-account.ts @@ -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 @@ -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 @@ -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 @@ -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