Skip to content

Commit 41f5f27

Browse files
authored
fix(bridge): Fix failing dynamic gas estimates (#2609)
1 parent a077a63 commit 41f5f27

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packages/internal/bridge/sdk/src/constants/bridges.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const SLOT_PREFIX_CONTRACT_CALL_APPROVED = '0x07b0d4304f82012bd3b70b1d531
5252
/**
5353
* @constant {string} SLOT_POS_CONTRACT_CALL_APPROVED - The position of the storage slot to store contract call approved mapping.
5454
*/
55-
export const SLOT_POS_CONTRACT_CALL_APPROVED = 4;
55+
export const SLOT_POS_CONTRACT_CALL_APPROVED = '0x0000000000000000000000000000000000000000000000000000000000000004';
5656

5757
/**
5858
* @typedef {Object} childWIMXs - Child Wrapped IMX address for the testnet & mainnet.

packages/internal/bridge/sdk/src/tokenBridge.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import axios, { AxiosResponse } from 'axios';
44
import {
55
concat,
66
Contract, getAddress, keccak256, Provider, toBeHex, toQuantity, TransactionRequest,
7-
zeroPadValue,
87
AbiCoder,
98
ZeroAddress,
109
} from 'ethers';
@@ -885,7 +884,7 @@ export class TokenBridge {
885884
const commandHash = keccak256(command);
886885
const gatewayCallApprovedSlot = keccak256(concat([
887886
commandHash,
888-
toBeHex(zeroPadValue(toBeHex(SLOT_POS_CONTRACT_CALL_APPROVED), 32)),
887+
SLOT_POS_CONTRACT_CALL_APPROVED,
889888
]));
890889

891890
// Encode execute data

0 commit comments

Comments
 (0)