-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e39dedf
commit 3401145
Showing
5 changed files
with
57 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.13; | ||
|
||
import {Script, console} from "forge-std/Script.sol"; | ||
|
||
import {BoltRegistry} from "../src/contracts/BoltRegistry.sol"; | ||
import {BoltChallenger} from "../src/contracts/BoltChallenger.sol"; | ||
|
||
contract DeployOnDevnet is Script { | ||
function setUp() public {} | ||
|
||
function run() public { | ||
// Relic protocol contracts | ||
address relicReliquary = 0x5E4DE6Bb8c6824f29c44Bd3473d44da120387d08; | ||
address relicBlockHeaderProver = 0x9f9A1eb0CF9340538297c853915DCc06Eb6D72c4; | ||
address relicAccountInfoProver = 0xf74105AE736Ca0C4B171a2EC4F1D4B0b6EBB99ae; | ||
|
||
vm.startBroadcast(); | ||
|
||
BoltRegistry registry = new BoltRegistry(); | ||
console.log("BoltRegistry deployed at", address(registry)); | ||
|
||
BoltChallenger challenger = | ||
new BoltChallenger(address(registry), relicReliquary, relicBlockHeaderProver, relicAccountInfoProver); | ||
console.log("BoltChallenger deployed at", address(challenger)); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
echo "Starting the devnet..." | ||
|
||
# spin up the kurtosis devnet | ||
kurtosis run --enclave bolt-devnet github.com/chainbound/ethereum-package --args-file ./scripts/kurtosis_config.yaml | ||
echo "Devnet online! Waiting for the RPC to be available..." | ||
sleep 5 | ||
|
||
RPC=$(kurtosis port print bolt-devnet el-1-geth-lighthouse rpc) | ||
PK="bcdf20249abf0ed6d944c0288fad489e33f66b3960d9e6229c1cd214ed3bbe31" | ||
echo "RPC endpoint: $RPC" | ||
|
||
# wait for the rpc to be available | ||
while ! curl -s -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' "$RPC" > /dev/null; do | ||
sleep 1 | ||
done | ||
|
||
# deploy the contracts | ||
( | ||
cd ./bolt-contracts || exit | ||
forge build # make sure the contracts are compiled before deploying | ||
forge script script/DeployOnDevnet.s.sol --broadcast --rpc-url "$RPC" --private-key "$PK" | ||
) | ||
echo "Contracts deployed!" |