Skip to content

Commit

Permalink
Merge pull request #48 from BalancerMaxis/deployment
Browse files Browse the repository at this point in the history
Deployment to needed chains
  • Loading branch information
petrovska-petro authored Oct 21, 2024
2 parents 2b8145a + 2444128 commit 6f823aa
Show file tree
Hide file tree
Showing 16 changed files with 912 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ ignition/deployments/chain-31337
# Foundry
cache/
out/
lib/

# Ignores development broadcast logs
!/broadcast
Expand All @@ -160,4 +161,5 @@ lcov.info
.gas-snapshot

# vscode - audit docs
.vscode/
.vscode/

2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std.git
url = https://github.com/foundry-rs/forge-std
110 changes: 110 additions & 0 deletions broadcast/InjectorInfraDeployment.s.sol/10/run-latest.json

Large diffs are not rendered by default.

98 changes: 98 additions & 0 deletions broadcast/InjectorInfraDeployment.s.sol/100/run-latest.json

Large diffs are not rendered by default.

100 changes: 100 additions & 0 deletions broadcast/InjectorInfraDeployment.s.sol/1101/run-latest.json

Large diffs are not rendered by default.

131 changes: 131 additions & 0 deletions broadcast/InjectorInfraDeployment.s.sol/137/run-latest.json

Large diffs are not rendered by default.

110 changes: 110 additions & 0 deletions broadcast/InjectorInfraDeployment.s.sol/34443/run-latest.json

Large diffs are not rendered by default.

102 changes: 102 additions & 0 deletions broadcast/InjectorInfraDeployment.s.sol/42161/run-latest.json

Large diffs are not rendered by default.

98 changes: 98 additions & 0 deletions broadcast/InjectorInfraDeployment.s.sol/43114/run-latest.json

Large diffs are not rendered by default.

110 changes: 110 additions & 0 deletions broadcast/InjectorInfraDeployment.s.sol/8453/run-latest.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions factoryConstructorArgs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0x747c4f7D3Fc02b7975779efFDf5D1C77105109cB
1 change: 1 addition & 0 deletions factoryConstructorArgsZkevm.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0x6142582F8946bf192a4F80eD643A5856D18a7060
18 changes: 16 additions & 2 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,22 @@ solc = '0.8.25'
[rpc_endpoints]
arbitrum = "${ARBITRUM_RPC_URL}"
base = "${BASE_RPC_URL}"
ethereum = "${ETHEREUM_RPC_URL}"
fraxtal = "${FRAXTAL_RPC_URL}"
gnosis = "${GNOSIS_RPC_URL}"
optimism = "${OPTIMISM_RPC_URL}"
polygon = "${POLYGON_RPC_URL}"
polygon = "${POLYGON_RPC_URL}"
zkevm = "${ZKEVM_RPC_URL}"
avalanche = "${AVALANCHE_RPC_URL}"
mode = "${MODE_RPC_URL}"


[etherscan]
arbitrum = { key = "${ETHERSCAN_ARBITRUM_API_KEY}" }
base = { key = "${ETHERSCAN_BASE_API_KEY}" }
fraxtal = { key = "${ETHERSCAN_FRAXTAL_API_KEY}" }
gnosis = { key = "${ETHERSCAN_GNOSIS_API_KEY}" }
optimism = { key = "${ETHERSCAN_OPTIMISM_API_KEY}" }
polygon = { key = "${ETHERSCAN_POLYGON_API_KEY}" }
zkevm = { key = "${ETHERSCAN_ZKEVM_API_KEY}" }
avalanche = { key = "${ETHERSCAN_AVALANCHE_API_KEY}" }
mode = { key = "${ETHERSCAN_MODE_API_KEY}" }
16 changes: 11 additions & 5 deletions foundry_scripts/InjectorInfraMultiChainDeployment.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ contract InjectorInfraMultiChainDeployment is Script {
enum Chains {
ARBITRUM,
BASE,
ETHEREUM,
FRAXTAL,
GNOSIS,
OPTIMISM,
POLYGON
POLYGON,
AVALANCHE,
ZKEVM,
MODE
}

// injector infrastructure
Expand All @@ -29,11 +31,13 @@ contract InjectorInfraMultiChainDeployment is Script {
constructor() {
availableChains[Chains.ARBITRUM] = "arbitrum";
availableChains[Chains.BASE] = "base";
availableChains[Chains.ETHEREUM] = "ethereum";
availableChains[Chains.FRAXTAL] = "fraxtal";
availableChains[Chains.GNOSIS] = "gnosis";
availableChains[Chains.OPTIMISM] = "optimism";
availableChains[Chains.POLYGON] = "polygon";
availableChains[Chains.AVALANCHE] = "avalanche";
availableChains[Chains.ZKEVM] = "zkevm";
availableChains[Chains.MODE] = "mode";
}

/// @dev broadcast transaction modifier
Expand All @@ -52,14 +56,16 @@ contract InjectorInfraMultiChainDeployment is Script {

// @note the array can be updated depending on your target chains to deploy
// @note by default the script will deploy in all chains available in the toml file
Chains[] memory targetDeploymentChains = new Chains[](6);
Chains[] memory targetDeploymentChains = new Chains[](8);

targetDeploymentChains[0] = Chains.ARBITRUM;
targetDeploymentChains[1] = Chains.BASE;
targetDeploymentChains[2] = Chains.ETHEREUM;
targetDeploymentChains[3] = Chains.GNOSIS;
targetDeploymentChains[4] = Chains.OPTIMISM;
targetDeploymentChains[5] = Chains.POLYGON;
targetDeploymentChains[6] = Chains.AVALANCHE;
targetDeploymentChains[7] = Chains.ZKEVM;
targetDeploymentChains[8] = Chains.MODE;
// @note fraxtal rpc gives sometimes problems

for (uint256 i = 0; i < targetDeploymentChains.length; i++) {
Expand Down
1 change: 0 additions & 1 deletion lib/forge-std
Submodule forge-std deleted from 035de3
20 changes: 20 additions & 0 deletions verify.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## Logic
forge verify-contract 0x747c4f7d3fc02b7975779effdf5d1c77105109cb ChildChainGaugeInjectorV2 --chain arbitrum
forge verify-contract 0x747c4f7d3fc02b7975779effdf5d1c77105109cb ChildChainGaugeInjectorV2 --chain base
forge verify-contract 0x747c4f7d3fc02b7975779effdf5d1c77105109cb ChildChainGaugeInjectorV2 --chain avalanche
forge verify-contract 0x747c4f7d3fc02b7975779effdf5d1c77105109cb ChildChainGaugeInjectorV2 --chain gnosis
forge verify-contract 0x747c4f7d3fc02b7975779effdf5d1c77105109cb ChildChainGaugeInjectorV2 --chain fraxtal
forge verify-contract 0x747c4f7d3fc02b7975779effdf5d1c77105109cb ChildChainGaugeInjectorV2 --chain optimism
forge verify-contract 0x747c4f7d3fc02b7975779effdf5d1c77105109cb ChildChainGaugeInjectorV2 --chain polygon
forge verify-contract 0x747c4f7d3fc02b7975779effdf5d1c77105109cb ChildChainGaugeInjectorV2 --chain mode
forge verify-contract 0x747c4f7d3fc02b7975779effdf5d1c77105109cb ChildChainGaugeInjectorV2 --chain zkevm
## Factory
forge verify-contract 0x6142582f8946bf192a4f80ed643a5856d18a7060 ChildChainGaugeInjectorV2Factory --chain arbitrum --constructor-args-path factoryConstructorArgs.txt
forge verify-contract 0x6142582f8946bf192a4f80ed643a5856d18a7060 ChildChainGaugeInjectorV2Factory --chain base --constructor-args-path factoryConstructorArgs.txt
forge verify-contract 0x6142582f8946bf192a4f80ed643a5856d18a7060 ChildChainGaugeInjectorV2Factory --chain avalanche --constructor-args-path factoryConstructorArgs.txt
forge verify-contract 0x6142582f8946bf192a4f80ed643a5856d18a7060 ChildChainGaugeInjectorV2Factory --chain gnosis --constructor-args-path factoryConstructorArgs.txt
forge verify-contract 0x6142582f8946bf192a4f80ed643a5856d18a7060 ChildChainGaugeInjectorV2Factory --chain fraxtal --constructor-args-path factoryConstructorArgs.txt
forge verify-contract 0x6142582f8946bf192a4f80ed643a5856d18a7060 ChildChainGaugeInjectorV2Factory --chain optimism --constructor-args-path factoryConstructorArgs.txt
forge verify-contract 0x6142582f8946bf192a4f80ed643a5856d18a7060 ChildChainGaugeInjectorV2Factory --chain polygon --constructor-args-path factoryConstructorArgs.txt
forge verify-contract 0x6142582f8946bf192a4f80ed643a5856d18a7060 ChildChainGaugeInjectorV2Factory --chain mode --constructor-args-path factoryConstructorArgs.txt
forge verify-contract 0xa30b47913556a5e1d146b8342f95db3d3a6ae469 ChildChainGaugeInjectorV2Factory --chain zkevm --constructor-args-path factoryConstructorArgsZkevm.txt

0 comments on commit 6f823aa

Please sign in to comment.