You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: script/deployment/actions/DeploySweepCCTPV2Action.s.sol
+71-5Lines changed: 71 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -9,30 +9,96 @@ import {SweepCCTPV2Action} from "../../../src/actions/SweepCCTPV2Action.sol";
9
9
contractDeploySweepCCTPV2ActionisScript {
10
10
/// @dev make sure to run `cp .env_example .env` and fill in each variable
11
11
/// then run `source .env` in your terminal before copying and pasting one of the commands below
12
-
// commands to deploy:
12
+
/// @dev this script will deploy to the same address on every chain.
13
+
/// this deterministic address depend on a few things:
14
+
/// - the owner address
15
+
/// - the salt
16
+
/// - the creation code of the contract
17
+
/// - **** the number of optimizer_runs will change the creation code (see foundry.toml) ****
18
+
/// - **** the version of the Solidity compiler will change the creation code ****
19
+
/// - **** the EVM version (cancun, prague, etc) will change the creation code ****
20
+
/// - **** dependency versions can change the creation code ****
21
+
/// - **** the forge version can change the creation code ****
22
+
/// - **** compiler flags (--via-ir, --overwrite, etc) can change the creation code ****
23
+
/// - the address of the deployer (this won't change because we are using the cannoical Create2 factory 0x4e59b44847b379578588920ca78fbf26c0b4956c, but good to know)
24
+
///
25
+
///
26
+
/// if any of these values change, the addresses will change, so we must be careful to keep these values constant.
27
+
/// in order to help with this, a check is added here to ensure that the calculated address matches the expected address
28
+
/// before deploying. if the addresses do not match, the script will revert.
29
+
// command to generate the expected deployment address (without actually deploying):
30
+
//
31
+
// forge script DeploySweepCCTPV2Action
32
+
33
+
// commands to deterministically deploy (and check the expected address before deploying):
13
34
//
14
35
// - with private key (on Anvil): forge script DeploySweepCCTPV2Action --broadcast --fork-url http://localhost:8545 --private-key $ANVIL_DEPLOYER_PK
Copy file name to clipboardExpand all lines: script/deployment/actions/DeployTransferCCTPV2Action.s.sol
+71-5Lines changed: 71 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -9,30 +9,96 @@ import {TransferCCTPV2Action} from "../../../src/actions/TransferCCTPV2Action.so
9
9
contractDeployTransferCCTPV2ActionisScript {
10
10
/// @dev make sure to run `cp .env_example .env` and fill in each variable
11
11
/// then run `source .env` in your terminal before copying and pasting one of the commands below
12
-
// commands to deploy:
12
+
/// @dev this script will deploy to the same address on every chain.
13
+
/// this deterministic address depend on a few things:
14
+
/// - the owner address
15
+
/// - the salt
16
+
/// - the creation code of the contract
17
+
/// - **** the number of optimizer_runs will change the creation code (see foundry.toml) ****
18
+
/// - **** the version of the Solidity compiler will change the creation code ****
19
+
/// - **** the EVM version (cancun, prague, etc) will change the creation code ****
20
+
/// - **** dependency versions can change the creation code ****
21
+
/// - **** the forge version can change the creation code ****
22
+
/// - **** compiler flags (--via-ir, --overwrite, etc) can change the creation code ****
23
+
/// - the address of the deployer (this won't change because we are using the cannoical Create2 factory 0x4e59b44847b379578588920ca78fbf26c0b4956c, but good to know)
24
+
///
25
+
///
26
+
/// if any of these values change, the addresses will change, so we must be careful to keep these values constant.
27
+
/// in order to help with this, a check is added here to ensure that the calculated address matches the expected address
28
+
/// before deploying. if the addresses do not match, the script will revert.
29
+
// command to generate the expected deployment address (without actually deploying):
30
+
//
31
+
// forge script DeployTransferCCTPV2Action
32
+
33
+
// commands to deterministically deploy (and check the expected address before deploying):
13
34
//
14
35
// - with private key (on Anvil): forge script DeployTransferCCTPV2Action --broadcast --fork-url http://localhost:8545 --private-key $ANVIL_DEPLOYER_PK
0 commit comments