diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index 3d1b7e1d2..ac9d83637 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -116,3 +116,6 @@ jobs: - name: core run: yarn workspace @hyperlane-xyz/core run test + + - name: gas + run: yarn workspace @hyperlane-xyz/core run gas diff --git a/solidity/.gas-snapshot b/solidity/.gas-snapshot new file mode 100644 index 000000000..c39be9064 --- /dev/null +++ b/solidity/.gas-snapshot @@ -0,0 +1,16 @@ +InterchainAccountRouterTest:testCall() (gas: 775953) +LiquidityLayerRouterTest:testDispatchWithTokenTransfersMovesTokens() (gas: 548744) +LiquidityLayerRouterTest:testDispatchWithTokensCallsAdapter() (gas: 554954) +LiquidityLayerRouterTest:testDispatchWithTokensRevertsWithFailedTransferIn() (gas: 28962) +LiquidityLayerRouterTest:testDispatchWithTokensRevertsWithUnkownBridgeAdapter() (gas: 20778) +LiquidityLayerRouterTest:testDispatchWithTokensTransfersOnDestination() (gas: 783178) +LiquidityLayerRouterTest:testProcessingRevertsIfBridgeAdapterReverts() (gas: 597550) +LiquidityLayerRouterTest:testSetLiquidityLayerAdapter() (gas: 23722) +MessagingTest:testSendMessage(string) (runs: 256, μ: 278324, ~: 296485) +MockInterchainAccountTest:testSettingNewOwner(address) (runs: 256, μ: 570700, ~: 570700) +PausableReentrancyGuardTest:testNonreentrant() (gas: 14498) +PausableReentrancyGuardTest:testNonreentrantNotPaused() (gas: 14233) +PausableReentrancyGuardTest:testPause() (gas: 13856) +TestQuerySenderTest:testSendAddressQuery(address) (runs: 256, μ: 2400567, ~: 2400567) +TestQuerySenderTest:testSendBytesQuery(uint256) (runs: 256, μ: 1502401, ~: 1502401) +TestQuerySenderTest:testSendUint256Query(uint256) (runs: 256, μ: 1502479, ~: 1502479) diff --git a/solidity/package.json b/solidity/package.json index de6f59b68..6cc70617a 100644 --- a/solidity/package.json +++ b/solidity/package.json @@ -47,7 +47,8 @@ "clean": "hardhat clean && rm -rf ./dist ./cache", "coverage": "hardhat coverage", "prettier": "prettier --write ./contracts ./interfaces ./test", - "test": "hardhat test && forge test -vvv" + "test": "hardhat test && forge test -vvv", + "gas": "forge snapshot --diff .gas-snapshot" }, "types": "dist/index.d.ts" }