Skip to content

Commit

Permalink
fix: reduce gas limit for bnb sendoutboutroot (#5090)
Browse files Browse the repository at this point in the history
* fix: reduce gas limit for bnb sendoutboutroot

* test: fix unit test for bnb
  • Loading branch information
liu-zhipeng authored Oct 30, 2023
1 parent 8f88161 commit 47b2066
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ export const getSendOutboundRootParams = async (l2domain: string): Promise<Extra
);
const ambAddress = await l2SpokeConnectorContract.AMB();

// gasLimit on hub side = 200_000
// gasLimit on hub side = 150_000
// actually it required about 100_000 gas on mainnet to call `receiveWormholeMessages`
// remain gas will be refunded on mainnetto refund address (default: deployer address)
const gasLimit = "200000";
const gasLimit = "150000";
const fee = await l2SpokeConnectorContract.quoteEVMDeliveryPrice(gasLimit, ambAddress);
const encodedData = utils.defaultAbiCoder.encode(["uint256"], [gasLimit]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe("Helpers: BNB", () => {
const res = await getSendOutboundRootParams(mock.domain.A);
expect(res).to.deep.eq({
_fee: constants.One.toString(),
_encodedData: utils.defaultAbiCoder.encode(["uint256"], [200000]),
_encodedData: utils.defaultAbiCoder.encode(["uint256"], [150000]),
});
});
});
Expand Down

0 comments on commit 47b2066

Please sign in to comment.