Add forge gas snapshots to CI (#1441)

* Add forge gas snapshots to CI

* Try snapshot --diff
pull/1444/head
Yorke Rhodes 2 years ago committed by GitHub
parent 241ac4837a
commit 80bd0f7c71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      .github/workflows/node.yml
  2. 16
      solidity/.gas-snapshot
  3. 3
      solidity/package.json

@ -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

@ -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)

@ -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"
}

Loading…
Cancel
Save