Skip to content

Commit

Permalink
feat: dockerfile for deploying contracts (#755)
Browse files Browse the repository at this point in the history
  • Loading branch information
samlaf authored Sep 11, 2024
1 parent 7d03d8b commit e839473
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 4 deletions.
4 changes: 4 additions & 0 deletions contracts/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cache/
out/
broadcast/
bindings/
2 changes: 1 addition & 1 deletion contracts/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ docs/
data/

script/output/*
script/eigenda_deploy_config.json
script/input/eigenda_deploy_config.json
13 changes: 13 additions & 0 deletions contracts/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Use the latest foundry image
FROM --platform=linux/amd64 ghcr.io/foundry-rs/foundry:latest

# Copy our source code into the container
WORKDIR /app

# Build and test the source code
COPY . .
RUN forge build
RUN forge test

# Set the entrypoint to the forge command
ENTRYPOINT ["/bin/sh", "-c"]
2 changes: 1 addition & 1 deletion contracts/script/GenerateUnitTestHashes.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import "forge-std/console.sol";

contract GenerateHashes is Script {

string deployConfigPath = "script/eigenda_deploy_config.json";
string deployConfigPath = "script/input/eigenda_deploy_config.json";

// deploy all the EigenDA contracts. Relies on many EL contracts having already been deployed.
function run() external {
Expand Down
2 changes: 1 addition & 1 deletion contracts/script/SetUpEigenDA.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import "forge-std/StdJson.sol";
// forge script script/Deployer.s.sol:SetupEigenDA --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast -vvvv
contract SetupEigenDA is EigenDADeployer, EigenLayerUtils {

string deployConfigPath = "script/eigenda_deploy_config.json";
string deployConfigPath = "script/input/eigenda_deploy_config.json";

// deploy all the EigenDA contracts. Relies on many EL contracts having already been deployed.
function run() external {
Expand Down
Empty file added contracts/script/input/.gitkeep
Empty file.
2 changes: 1 addition & 1 deletion inabox/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (env *Config) deployEigenDAContracts() {
if err != nil {
log.Panicf("Error: %s", err.Error())
}
writeFile("script/eigenda_deploy_config.json", data)
writeFile("script/input/eigenda_deploy_config.json", data)

execForgeScript("script/SetUpEigenDA.s.sol:SetupEigenDA", env.Pks.EcdsaMap[deployer.Name].PrivateKey, deployer, nil)

Expand Down

0 comments on commit e839473

Please sign in to comment.