Skip to content

Commit

Permalink
Merge pull request #7 from axieinfinity/implement-feature/migrate-har…
Browse files Browse the repository at this point in the history
…dhat-test/add-init-test

feat(migrate-hardhat-test): implement `add-init-test`
  • Loading branch information
huyhuynh3103 authored Jan 18, 2024
2 parents c132f84 + b5fdb4c commit 2908990
Show file tree
Hide file tree
Showing 41 changed files with 1,205 additions and 114 deletions.
3 changes: 2 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ libs = [

# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options

solc = '0.8.21'
solc = '0.8.23'
extra_output = ["devdoc", "userdoc", "storagelayout"]
fs_permissions = [{ access = "read-write", path = "./" }]
evm_version = 'istanbul'
Expand All @@ -26,6 +26,7 @@ evm_version = 'shanghai'
[fmt]
line_length = 120
tab_width = 2
bracket_spacing = true

[profile.default.fuzz]
runs = 256
Expand Down
50 changes: 26 additions & 24 deletions logs/contract-code-sizes.log
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@
| AddressArrayUtils | 0.086 | 24.49 |
| ArtifactFactory | 9.155 | 15.421 |
| Ballot | 0.086 | 24.49 |
| BaseGeneralConfig | 12.892 | 11.684 |
| BaseGeneralConfig | 20.129 | 4.447 |
| BridgeOperatorsBallot | 0.166 | 24.41 |
| BridgeReward | 6.031 | 18.545 |
| BridgeSlash | 5.635 | 18.941 |
| BridgeTracking | 6.873 | 17.703 |
| BridgeReward | 6.032 | 18.544 |
| BridgeSlash | 5.639 | 18.937 |
| BridgeTracking | 6.875 | 17.701 |
| ECDSA | 0.086 | 24.49 |
| ERC1967Proxy | 0.177 | 24.399 |
| ERC20 | 2.172 | 22.404 |
| ERC20 | 2.173 | 22.403 |
| ERC20PresetMinterPauser | 6.368 | 18.208 |
| EnumerableSet | 0.086 | 24.49 |
| ErrorHandler | 0.086 | 24.49 |
| GeneralConfigExtended | 13.451 | 11.125 |
| GeneralConfig | 20.129 | 4.447 |
| GeneralConfigExtended | 20.351 | 4.225 |
| GlobalProposal | 0.166 | 24.41 |
| HasBridgeDeprecated | 0.063 | 24.513 |
| HasValidatorDeprecated | 0.063 | 24.513 |
Expand All @@ -27,28 +28,29 @@
| LibSharedAddress | 0.086 | 24.49 |
| LibString | 0.086 | 24.49 |
| LibTUint256Slot | 0.086 | 24.49 |
| MainchainBridgeManager | 19.332 | 5.244 |
| MainchainGatewayV3 | 18.187 | 6.389 |
| MainchainBridgeManager | 19.361 | 5.215 |
| MainchainGatewayV3 | 18.189 | 6.387 |
| Math | 0.086 | 24.49 |
| MockBridge | 1.303 | 23.273 |
| MockBridgeManager | 1.247 | 23.329 |
| MockBridgeReward | 6.77 | 17.806 |
| MockBridgeSlash | 1.447 | 23.129 |
| MockBridgeTracking | 1.969 | 22.607 |
| MockERC20 | 3.687 | 20.889 |
| MockERC721 | 3.825 | 20.751 |
| MockGatewayForTracking | 1.662 | 22.914 |
| MockRoninBridgeManager | 24.579 | -0.003 |
| MockRoninGatewayV3Extended | 20.038 | 4.538 |
| MockTUint256Slot | 2.729 | 21.847 |
| MockValidatorContract_OnlyTiming_ForHardhatTest | 1.15 | 23.426 |
| MockBridge | 1.293 | 23.283 |
| MockBridgeManager | 1.249 | 23.327 |
| MockBridgeReward | 6.771 | 17.805 |
| MockBridgeSlash | 1.388 | 23.188 |
| MockBridgeTracking | 1.897 | 22.679 |
| MockERC20 | 2.442 | 22.134 |
| MockERC721 | 3.827 | 20.749 |
| MockGatewayForTracking | 1.616 | 22.96 |
| MockRoninBridgeManager | 24.601 | -0.025 |
| MockRoninGatewayV3Extended | 20.048 | 4.528 |
| MockTUint256Slot | 2.73 | 21.846 |
| MockValidatorContract_OnlyTiming_ForHardhatTest | 1.115 | 23.461 |
| MockValidatorSet_ForFoundryTest | 0.172 | 24.404 |
| MockWrappedToken | 1.978 | 22.598 |
| PRBMathUtils | 0.063 | 24.513 |
| PauseEnforcer | 4.548 | 20.028 |
| Proposal | 0.166 | 24.41 |
| ProxyAdmin | 1.683 | 22.893 |
| RoninBridgeManager | 24.579 | -0.003 |
| RoninGatewayV3 | 19.755 | 4.821 |
| ProxyAdmin | 1.684 | 22.892 |
| RoninBridgeManager | 24.601 | -0.025 |
| RoninGatewayV3 | 19.765 | 4.811 |
| StdStyle | 0.086 | 24.49 |
| StorageSlot | 0.086 | 24.49 |
| Strings | 0.086 | 24.49 |
Expand All @@ -59,7 +61,7 @@
| console | 0.086 | 24.49 |
| console2 | 0.086 | 24.49 |
| safeconsole | 0.086 | 24.49 |
| stdError | 0.591 | 23.985 |
| stdError | 0.592 | 23.984 |
| stdJson | 0.086 | 24.49 |
| stdMath | 0.086 | 24.49 |
| stdStorage | 0.086 | 24.49 |
Expand Down
32 changes: 17 additions & 15 deletions logs/storage/BaseGeneralConfig.sol:BaseGeneralConfig.log
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_resolved (storage_slot: 0) (offset: 0) (type: bool) (numberOfBytes: 1)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_option (storage_slot: 1) (offset: 0) (type: struct IRuntimeConfig.Option) (numberOfBytes: 32)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_rawCommand (storage_slot: 2) (offset: 0) (type: string) (numberOfBytes: 32)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_envPk (storage_slot: 3) (offset: 0) (type: uint256) (numberOfBytes: 32)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_envSender (storage_slot: 4) (offset: 0) (type: address) (numberOfBytes: 20)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_trezorSender (storage_slot: 5) (offset: 0) (type: address) (numberOfBytes: 20)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_absolutePath (storage_slot: 6) (offset: 0) (type: string) (numberOfBytes: 32)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_deploymentRoot (storage_slot: 7) (offset: 0) (type: string) (numberOfBytes: 32)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_contractNameMap (storage_slot: 8) (offset: 0) (type: mapping(TContract => string)) (numberOfBytes: 32)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_contractAbsolutePathMap (storage_slot: 9) (offset: 0) (type: mapping(TContract => string)) (numberOfBytes: 32)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_contractAddrSet (storage_slot: 10) (offset: 0) (type: mapping(uint256 => struct EnumerableSet.AddressSet)) (numberOfBytes: 32)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_contractAddrMap (storage_slot: 11) (offset: 0) (type: mapping(uint256 => mapping(string => address))) (numberOfBytes: 32)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_contractTypeMap (storage_slot: 12) (offset: 0) (type: mapping(uint256 => mapping(address => TContract))) (numberOfBytes: 32)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_deploymentRoot (storage_slot: 13) (offset: 0) (type: string) (numberOfBytes: 32)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_isForkModeEnabled (storage_slot: 14) (offset: 0) (type: bool) (numberOfBytes: 1)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_networkDataMap (storage_slot: 15) (offset: 0) (type: mapping(TNetwork => struct INetworkConfig.NetworkData)) (numberOfBytes: 32)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_networkMap (storage_slot: 16) (offset: 0) (type: mapping(uint256 => TNetwork)) (numberOfBytes: 32)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_migrationConfig (storage_slot: 17) (offset: 0) (type: bytes) (numberOfBytes: 32)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:stdstore (storage_slot: 3) (offset: 0) (type: struct StdStorage) (numberOfBytes: 224)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_envLabel (storage_slot: 10) (offset: 0) (type: string) (numberOfBytes: 32)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_envSender (storage_slot: 11) (offset: 0) (type: address) (numberOfBytes: 20)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_trezorSender (storage_slot: 12) (offset: 0) (type: address) (numberOfBytes: 20)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_walletOption (storage_slot: 12) (offset: 20) (type: enum IWalletConfig.WalletOption) (numberOfBytes: 1)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_absolutePath (storage_slot: 13) (offset: 0) (type: string) (numberOfBytes: 32)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_deploymentRoot (storage_slot: 14) (offset: 0) (type: string) (numberOfBytes: 32)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_contractNameMap (storage_slot: 15) (offset: 0) (type: mapping(TContract => string)) (numberOfBytes: 32)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_contractAbsolutePathMap (storage_slot: 16) (offset: 0) (type: mapping(TContract => string)) (numberOfBytes: 32)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_contractAddrSet (storage_slot: 17) (offset: 0) (type: mapping(uint256 => struct EnumerableSet.AddressSet)) (numberOfBytes: 32)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_contractAddrMap (storage_slot: 18) (offset: 0) (type: mapping(uint256 => mapping(string => address))) (numberOfBytes: 32)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_contractTypeMap (storage_slot: 19) (offset: 0) (type: mapping(uint256 => mapping(address => TContract))) (numberOfBytes: 32)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_deploymentRoot (storage_slot: 20) (offset: 0) (type: string) (numberOfBytes: 32)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_isForkModeEnabled (storage_slot: 21) (offset: 0) (type: bool) (numberOfBytes: 1)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_networkDataMap (storage_slot: 22) (offset: 0) (type: mapping(TNetwork => struct INetworkConfig.NetworkData)) (numberOfBytes: 32)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_networkMap (storage_slot: 23) (offset: 0) (type: mapping(uint256 => TNetwork)) (numberOfBytes: 32)
lib/foundry-deployment-kit/script/BaseGeneralConfig.sol:BaseGeneralConfig:_migrationConfig (storage_slot: 24) (offset: 0) (type: bytes) (numberOfBytes: 32)
20 changes: 20 additions & 0 deletions logs/storage/GeneralConfig.sol:GeneralConfig.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
script/GeneralConfig.sol:GeneralConfig:_resolved (storage_slot: 0) (offset: 0) (type: bool) (numberOfBytes: 1)
script/GeneralConfig.sol:GeneralConfig:_option (storage_slot: 1) (offset: 0) (type: struct IRuntimeConfig.Option) (numberOfBytes: 32)
script/GeneralConfig.sol:GeneralConfig:_rawCommand (storage_slot: 2) (offset: 0) (type: string) (numberOfBytes: 32)
script/GeneralConfig.sol:GeneralConfig:stdstore (storage_slot: 3) (offset: 0) (type: struct StdStorage) (numberOfBytes: 224)
script/GeneralConfig.sol:GeneralConfig:_envLabel (storage_slot: 10) (offset: 0) (type: string) (numberOfBytes: 32)
script/GeneralConfig.sol:GeneralConfig:_envSender (storage_slot: 11) (offset: 0) (type: address) (numberOfBytes: 20)
script/GeneralConfig.sol:GeneralConfig:_trezorSender (storage_slot: 12) (offset: 0) (type: address) (numberOfBytes: 20)
script/GeneralConfig.sol:GeneralConfig:_walletOption (storage_slot: 12) (offset: 20) (type: enum IWalletConfig.WalletOption) (numberOfBytes: 1)
script/GeneralConfig.sol:GeneralConfig:_absolutePath (storage_slot: 13) (offset: 0) (type: string) (numberOfBytes: 32)
script/GeneralConfig.sol:GeneralConfig:_deploymentRoot (storage_slot: 14) (offset: 0) (type: string) (numberOfBytes: 32)
script/GeneralConfig.sol:GeneralConfig:_contractNameMap (storage_slot: 15) (offset: 0) (type: mapping(TContract => string)) (numberOfBytes: 32)
script/GeneralConfig.sol:GeneralConfig:_contractAbsolutePathMap (storage_slot: 16) (offset: 0) (type: mapping(TContract => string)) (numberOfBytes: 32)
script/GeneralConfig.sol:GeneralConfig:_contractAddrSet (storage_slot: 17) (offset: 0) (type: mapping(uint256 => struct EnumerableSet.AddressSet)) (numberOfBytes: 32)
script/GeneralConfig.sol:GeneralConfig:_contractAddrMap (storage_slot: 18) (offset: 0) (type: mapping(uint256 => mapping(string => address))) (numberOfBytes: 32)
script/GeneralConfig.sol:GeneralConfig:_contractTypeMap (storage_slot: 19) (offset: 0) (type: mapping(uint256 => mapping(address => TContract))) (numberOfBytes: 32)
script/GeneralConfig.sol:GeneralConfig:_deploymentRoot (storage_slot: 20) (offset: 0) (type: string) (numberOfBytes: 32)
script/GeneralConfig.sol:GeneralConfig:_isForkModeEnabled (storage_slot: 21) (offset: 0) (type: bool) (numberOfBytes: 1)
script/GeneralConfig.sol:GeneralConfig:_networkDataMap (storage_slot: 22) (offset: 0) (type: mapping(TNetwork => struct INetworkConfig.NetworkData)) (numberOfBytes: 32)
script/GeneralConfig.sol:GeneralConfig:_networkMap (storage_slot: 23) (offset: 0) (type: mapping(uint256 => TNetwork)) (numberOfBytes: 32)
script/GeneralConfig.sol:GeneralConfig:_migrationConfig (storage_slot: 24) (offset: 0) (type: bytes) (numberOfBytes: 32)
Loading

0 comments on commit 2908990

Please sign in to comment.