-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add WormholeCctpTokenMessenger * inherit above in CircleIntegration * remove updateWormholeFinality (gov) * reorganize * add more forge tests * remove integration tests * add gas snapshot
- Loading branch information
Showing
90 changed files
with
15,149 additions
and
9,156 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: "CI" | ||
|
||
env: | ||
FOUNDRY_PROFILE: "ci" | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
evm-test: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Check out the repo" | ||
uses: "actions/checkout@v3" | ||
with: | ||
submodules: "recursive" | ||
|
||
- name: "Install Foundry" | ||
uses: "foundry-rs/foundry-toolchain@v1" | ||
|
||
- name: "Run the tests" | ||
run: "cd evm && make test" | ||
|
||
- name: "Add test summary" | ||
run: | | ||
echo "## Tests result" >> $GITHUB_STEP_SUMMARY | ||
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
CircleIntegrationComparison:test_Composed__RedeemUsdc(uint256,bytes32,bytes32) (runs: 256, μ: 267202, ~: 267111) | ||
CircleIntegrationComparison:test_Composed__TransferUsdc(uint256,bytes32,bytes32) (runs: 256, μ: 295433, ~: 295430) | ||
CircleIntegrationComparison:test_Control__RedeemTokensWithPayload(uint256,bytes32,bytes32) (runs: 256, μ: 73756, ~: 73625) | ||
CircleIntegrationComparison:test_Control__TransferTokensWithPayload(uint256,bytes32,bytes32) (runs: 256, μ: 135806, ~: 135676) | ||
CircleIntegrationComparison:test_Fork__RedeemTokensWithPayload(uint256,bytes32,bytes32) (runs: 256, μ: 275608, ~: 275475) | ||
CircleIntegrationComparison:test_Fork__TransferTokensWithPayload(uint256,bytes32,bytes32) (runs: 256, μ: 273234, ~: 273231) | ||
CircleIntegrationComparison:test_Inherited__RedeemUsdc(uint256,bytes32,bytes32) (runs: 256, μ: 226968, ~: 226904) | ||
CircleIntegrationComparison:test_Inherited__TransferUsdc(uint256,bytes32,bytes32) (runs: 256, μ: 248858, ~: 248856) | ||
CircleIntegrationComparison:test_Latest__RedeemTokensWithPayload(uint256,bytes32,bytes32) (runs: 256, μ: 252196, ~: 252072) | ||
CircleIntegrationComparison:test_Latest__TransferTokensWithPayload(uint256,bytes32,bytes32) (runs: 256, μ: 263957, ~: 263956) | ||
CircleIntegrationTest:test_CannotRedeemTokensWithPayloadCallerMustBeMintRecipient(address) (runs: 256, μ: 76012, ~: 76012) | ||
CircleIntegrationTest:test_CannotRedeemTokensWithPayloadInvalidMessagePair() (gas: 95486) | ||
CircleIntegrationTest:test_CannotRedeemTokensWithPayloadMintTokenNotSupported(bytes32) (runs: 256, μ: 141797, ~: 141789) | ||
CircleIntegrationTest:test_CannotRedeemTokensWithPayloadUnknownEmitter(bytes32) (runs: 256, μ: 203129, ~: 203121) | ||
CircleIntegrationTest:test_CannotTransferTokensWithPayloadInvalidMintRecipient() (gas: 177584) | ||
CircleIntegrationTest:test_CannotTransferTokensWithPayloadInvalidToken() (gas: 248030) | ||
CircleIntegrationTest:test_CannotTransferTokensWithPayloadTargetContractNotRegistered() (gas: 120482) | ||
CircleIntegrationTest:test_CannotTransferTokensWithPayloadZeroAmount() (gas: 49696) | ||
CircleIntegrationTest:test_RedeemTokensWithPayload(uint256) (runs: 256, μ: 255379, ~: 255334) | ||
CircleIntegrationTest:test_TransferTokensWithPayload(uint256,bytes32) (runs: 256, μ: 394493, ~: 394457) | ||
ForkSlots:test_UpgradeForkAndCheckSlots() (gas: 2316557) | ||
GovernanceTest:test_CannotConsumeGovernanceMessageInvalidAction(uint8,uint8) (runs: 256, μ: 61609, ~: 61609) | ||
GovernanceTest:test_CannotConsumeGovernanceMessageInvalidGovernanceChainId(uint16,uint8) (runs: 256, μ: 62307, ~: 62307) | ||
GovernanceTest:test_CannotConsumeGovernanceMessageInvalidGovernanceContract(bytes32,uint8) (runs: 256, μ: 62055, ~: 62055) | ||
GovernanceTest:test_CannotConsumeGovernanceMessageInvalidModule(bytes32,uint8) (runs: 256, μ: 61414, ~: 61414) | ||
GovernanceTest:test_CannotRegisterEmitterAndDomainInvalidDomain(uint16,bytes32) (runs: 256, μ: 94755, ~: 94755) | ||
GovernanceTest:test_CannotRegisterEmitterAndDomainInvalidEmitterAddress(uint16,uint32) (runs: 256, μ: 95882, ~: 95882) | ||
GovernanceTest:test_CannotRegisterEmitterAndDomainInvalidForeignChain(bytes32,uint32) (runs: 256, μ: 163511, ~: 163511) | ||
GovernanceTest:test_CannotRegisterEmitterAndDomainInvalidLength(uint16,bytes32,uint32) (runs: 256, μ: 96605, ~: 96605) | ||
GovernanceTest:test_CannotRegisterEmitterAndDomainInvalidTargetChain(uint16,uint16,bytes32,uint32) (runs: 256, μ: 96243, ~: 96243) | ||
GovernanceTest:test_CannotUpgradeContractInvalidImplementation(bytes12,address) (runs: 256, μ: 208638, ~: 208638) | ||
GovernanceTest:test_RegisterEmitterAndDomain(uint16,bytes32,uint32) (runs: 256, μ: 214666, ~: 214666) | ||
GovernanceTest:test_RegisterEmitterAndDomainNoTarget() (gas: 155128) | ||
GovernanceTest:test_UpgradeContract() (gas: 2272176) | ||
InheritingWormholeCctpTest:test_TransferUsdc(uint256,bytes32) (runs: 256, μ: 268693, ~: 268654) | ||
MessagesTest:test_DepositWithPayloadSerde(bytes32,uint256,uint32,uint32,uint64,bytes32,bytes32,bytes) (runs: 256, μ: 7871, ~: 7706) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
.env | ||
.private | ||
.vscode | ||
anvil*.log | ||
broadcast* | ||
cache | ||
deploy.out | ||
lib | ||
node_modules | ||
out | ||
ts/src/ethers-contracts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"overrides": [ | ||
{ | ||
"files": "*.sol", | ||
"options": { | ||
"printWidth": 100, | ||
"tabWidth": 4, | ||
"useTabs": false, | ||
"singleQuote": false, | ||
"bracketSpacing": false | ||
} | ||
}, | ||
{ | ||
"files": "*.ts", | ||
"options": { | ||
"printWidth": 100, | ||
"tabWidth": 4, | ||
"useTabs": false, | ||
"singleQuote": false, | ||
"bracketSpacing": true | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,37 @@ | ||
include env/testing.env | ||
|
||
.PHONY: dependencies unit-test forge-test integration-test clean all | ||
.PHONY: dependencies test clean all | ||
|
||
all: build | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf anvil.log node_modules lib out ts/src/ethers-contracts | ||
forge clean | ||
rm -rf node_modules lib out ts/src/ethers-contracts | ||
|
||
.PHONY: dependencies | ||
dependencies: node_modules lib/forge-std lib/wormhole | ||
dependencies: node_modules lib/forge-std | ||
|
||
node_modules: | ||
yarn | ||
npm ci | ||
|
||
lib/forge-std: | ||
forge install --no-git --no-commit foundry-rs/forge-std | ||
|
||
lib/wormhole: | ||
forge install --no-git --no-commit wormhole=wormhole-foundation/wormhole | ||
ts/src/ethers-contracts: | ||
npm run build-types | ||
|
||
build: dependencies | ||
forge build | ||
yarn build-types | ||
|
||
.PHONY: unit-test | ||
unit-test: forge-test | ||
|
||
.PHONY: forge-test | ||
forge-test: dependencies | ||
forge test \ | ||
-vv \ | ||
--fork-url ${TESTING_FORK_RPC} \ | ||
.PHONY: test | ||
test: dependencies | ||
forge test --fork-url ${TESTING_FORK_RPC} -vv | ||
|
||
.PHONY: forge-test | ||
.PHONY: gas-report | ||
gas-report: dependencies | ||
forge test \ | ||
--fork-url ${TESTING_FORK_RPC} \ | ||
--gas-report | ||
|
||
.PHONY: integration-test | ||
integration-test: dependencies build | ||
bash shell-scripts/run_integration_tests.sh | ||
|
||
.PHONY: test | ||
test: forge-test integration-test | ||
forge test --fork-url ${TESTING_FORK_RPC} --match-path forge/tests/gas/* --fuzz-runs 512 --gas-report | ||
|
||
.PHONY: gas-snapshot | ||
gas-snapshot: dependencies | ||
forge snapshot --fork-url ${TESTING_FORK_RPC} --diff .gas-snapshot-current |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.