Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(migrate-hardhat-test): implement add-init-test #7

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d6b4fe1
test: setup integration test
huyhuynh3103 Dec 5, 2023
af27310
chore: storage layout
huyhuynh3103 Dec 5, 2023
6a28e43
test: setup integration test
huyhuynh3103 Dec 5, 2023
175d78a
chore: storage layout
huyhuynh3103 Dec 5, 2023
bb82db2
test: setup init test
huyhuynh3103 Dec 11, 2023
208ba22
chore: lint test
huyhuynh3103 Dec 13, 2023
cd915f9
test: done setup
huyhuynh3103 Dec 14, 2023
c84f274
chore: storage layout
huyhuynh3103 Dec 14, 2023
7524c08
test(BridgeManager): add set config test
huyhuynh3103 Jan 16, 2024
98e051d
chore: storage layout
huyhuynh3103 Jan 17, 2024
870f4f1
test(BridgeManager): add set config test
huyhuynh3103 Jan 17, 2024
85409af
chore: storage layout
huyhuynh3103 Jan 17, 2024
cc7177d
test(BridgeManager): add configs test
huyhuynh3103 Jan 17, 2024
27785d1
test(BridgeManager): deploy mainchain gateway V3
huyhuynh3103 Jan 17, 2024
7c3f21f
chore: storage layout
huyhuynh3103 Jan 17, 2024
7aa03da
chore: lint code only
huyhuynh3103 Jan 17, 2024
8c094a3
test(BridgeManager): add deploy ronin gateway
huyhuynh3103 Jan 17, 2024
a4c947b
chore: storage layout
huyhuynh3103 Jan 17, 2024
164859f
chore: fix comment
huyhuynh3103 Jan 17, 2024
bea17e5
test: add mock tokens
huyhuynh3103 Jan 17, 2024
8186246
chore: storage layout
huyhuynh3103 Jan 17, 2024
0b060aa
test(BridgeManager): add configs
huyhuynh3103 Jan 17, 2024
dbe09b1
test: add scripts
huyhuynh3103 Jan 17, 2024
f53462d
forge install: foundry-deployment-kit
huyhuynh3103 Jan 17, 2024
9b58711
script: add deployment scripts
huyhuynh3103 Jan 17, 2024
af175eb
chore: storage layout
huyhuynh3103 Jan 17, 2024
82c6cd0
Merge branch 'feature/migrate-hardhat-test' into implement-feature/mi…
huyhuynh3103 Jan 18, 2024
e421099
chore: storage layout
huyhuynh3103 Jan 18, 2024
9498c45
test: reuse deployment scripts in test
huyhuynh3103 Jan 18, 2024
2445b52
chore: storage-layout
huyhuynh3103 Jan 18, 2024
bfa13c7
Merge branch 'feature/migrate-hardhat-test' into implement-feature/mi…
huyhuynh3103 Jan 18, 2024
b5fdb4c
chore: storage layout
huyhuynh3103 Jan 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading