Skip to content

Commit

Permalink
Merge pull request #111 from NethermindEth/anshu/kurtosis-deployment-…
Browse files Browse the repository at this point in the history
…scripts

Deployment scripts for Kurtosis devnet
  • Loading branch information
AnshuJalan authored Sep 10, 2024
2 parents 5af5907 + dbea636 commit b460a19
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 5 deletions.
6 changes: 2 additions & 4 deletions SmartContracts/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
cache/
out/

# Ignores development broadcast logs
!/broadcast
/broadcast/*/31337/
/broadcast/**/dry-run/
# Ignores all broadcasts
broadcast/

# Docs
docs/
Expand Down
2 changes: 2 additions & 0 deletions SmartContracts/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
src = "src"
out = "out"
libs = ["lib"]
solc_version = "0.8.25"
evm_version = "shanghai"

# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
8 changes: 7 additions & 1 deletion SmartContracts/scripts/deployment/DeployAVS.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {ISlasher} from "src/interfaces/eigenlayer-mvp/ISlasher.sol";
import {ITaikoL1} from "src/interfaces/taiko/ITaikoL1.sol";

import {console2} from "forge-std/Script.sol";
import {IERC20} from "openzeppelin-contracts/token/ERC20/IERC20.sol";
import {ProxyAdmin} from "openzeppelin-contracts/proxy/transparent/ProxyAdmin.sol";
import {ITransparentUpgradeableProxy} from "openzeppelin-contracts/proxy/transparent/TransparentUpgradeableProxy.sol";

Expand All @@ -25,6 +26,7 @@ contract DeployAVS is BaseScript {

// Required by task manager
address public taikoL1 = vm.envAddress("TAIKO_L1");
address public taikoToken = vm.envAddress("TAIKO_TOKEN");
uint256 public beaconGenesisTimestamp = vm.envUint("BEACON_GENESIS_TIMESTAMP");
address public beaconBlockRootContract = vm.envAddress("BEACON_BLOCK_ROOT_CONTRACT");

Expand Down Expand Up @@ -53,7 +55,11 @@ contract DeployAVS is BaseScript {
// Upgrade proxies with implementations
proxyAdmin.upgrade(ITransparentUpgradeableProxy(preconfRegistry), address(preconfRegistryImpl));
proxyAdmin.upgrade(ITransparentUpgradeableProxy(preconfServiceManager), address(preconfServiceManagerImpl));
proxyAdmin.upgrade(ITransparentUpgradeableProxy(preconfTaskManager), address(preconfTaskManagerImpl));
proxyAdmin.upgradeAndCall(
ITransparentUpgradeableProxy(preconfTaskManager),
address(preconfTaskManagerImpl),
abi.encodeCall(PreconfTaskManager.initialize, IERC20(taikoToken))
);

console2.log("Proxy admin: ", address(proxyAdmin));
console2.log("Preconf Registry: ", preconfRegistry);
Expand Down
16 changes: 16 additions & 0 deletions SmartContracts/scripts/deployment/deploy_avs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
set -e

export PRIVATE_KEY=0xbcdf20249abf0ed6d944c0288fad489e33f66b3960d9e6229c1cd214ed3bbe31
export FORK_URL=

AVS_DIRECTORY=0x7E2E7DD2Aead92e2e6d05707F21D4C36004f8A2B \
SLASHER=0x86A0679C7987B5BA9600affA994B78D0660088ff \
TAIKO_L1=0x086f77C5686dfe3F2f8FE487C5f8d357952C8556 \
TAIKO_TOKEN=0x422A3492e218383753D8006C7Bfa97815B44373F \
BEACON_GENESIS_TIMESTAMP=1725950369 \
BEACON_BLOCK_ROOT_CONTRACT=0x000F3df6D732807Ef1319fB7B8bB8522d0Beac02 \
forge script scripts/deployment/DeployAVS.s.sol:DeployAVS \
--fork-url $FORK_URL \
--broadcast \
--skip-simulation \
--private-key $PRIVATE_KEY
10 changes: 10 additions & 0 deletions SmartContracts/scripts/deployment/deploy_eigenlayer_mvp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
set -e

export PRIVATE_KEY=0xbcdf20249abf0ed6d944c0288fad489e33f66b3960d9e6229c1cd214ed3bbe31
export FORK_URL=

forge script scripts/deployment/DeployEigenlayerMVP.s.sol:DeployEigenlayerMVP \
--rpc-url $FORK_URL \
--broadcast \
--skip-simulation \
--private-key $PRIVATE_KEY

0 comments on commit b460a19

Please sign in to comment.