-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First pass at dev environment for proxy colonies
- Loading branch information
Showing
8 changed files
with
170 additions
and
4 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 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,17 @@ | ||
FROM colony-cdapp-dev-env/network:latest | ||
# Add dependencies from the host | ||
# Note: these are listed individually so that if they change, they won't affect | ||
# the build of the other images | ||
ADD docker/files/network-remote/run.sh.base /colonyCDappBackend/run.sh | ||
|
||
WORKDIR /colonyCDappBackend | ||
|
||
# Open up ports to the docker image | ||
# Ganache | ||
EXPOSE 8545 | ||
|
||
# Make the run script executable | ||
RUN chmod +x ./run.sh | ||
|
||
# Battlecruiser Operational! | ||
CMD [ "./run.sh" ] |
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,33 @@ | ||
FROM colony-cdapp-dev-env/network:latest | ||
# Add dependencies from the host | ||
# Note: these are listed individually so that if they change, they won't affect | ||
# the build of the other images | ||
ADD docker/files/network-wormhole-relayer/run.sh.base /colonyCDappBackend/run.sh | ||
|
||
WORKDIR /colonyCDappBackend | ||
|
||
# Open up ports to the docker image | ||
# Ganache | ||
# EXPOSE 8545 | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y ca-certificates curl | ||
RUN install -m 0755 -d /etc/apt/keyrings | ||
RUN curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc | ||
RUN chmod a+r /etc/apt/keyrings/docker.asc | ||
|
||
# Add the repository to Apt sources: | ||
RUN echo \ | ||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \ | ||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ | ||
tee /etc/apt/sources.list.d/docker.list > /dev/null | ||
RUN apt-get update | ||
RUN apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin | ||
|
||
RUN cd ./colonyNetwork/lib/wormhole/sdk/js-proto-node && npm i | ||
|
||
# Make the run script executable | ||
RUN chmod +x ./run.sh | ||
|
||
# Battlecruiser Operational! | ||
CMD [ "./run.sh" ] |
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,17 @@ | ||
#!/bin/bash | ||
|
||
cd colonyNetwork | ||
|
||
# Ganache | ||
|
||
# Uncomment the line below if you need ganache to run in verbose mode | ||
# sed -i 's/100000000000000000000" >\/dev\/null 2>&1/100000000000000000000" --verbose/g' scripts/start-blockchain-client.sh | ||
# sed -i 's/--db $DBPATH/--db $DBPATH --server.host "0.0.0.0"/g' scripts/start-blockchain-client.sh | ||
pnpm run start:blockchain:client | ||
|
||
# Colony Network Contracts | ||
|
||
npx hardhat compile | ||
npx hardhat deploy-proxy-network --network development | ||
|
||
sleep infinity |
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,48 @@ | ||
#!/bin/bash | ||
cd ./colonyNetwork/lib/wormhole/ && DOCKER_BUILDKIT=1 docker build --target node-export -f Dockerfile.proto -o type=local,dest=. . | ||
cd ../.. && npx tsc --esModuleInterop --downlevelIteration ./scripts/mockGuardianSpy.ts | ||
|
||
cd ./lib/safe-contracts | ||
|
||
# This is the private key for the first account we create on ganache, so has ether to pay for gas fees | ||
rm -rf ./deployments/custom | ||
PK="0x0355596cdb5e5242ad082c4fe3f8bbe48c9dba843fe1f99dd8272f487e70efae" NODE_URL=http://network:8545 npx hardhat deploy --network custom | ||
|
||
rm -rf ./deployments/custom | ||
PK="0x0355596cdb5e5242ad082c4fe3f8bbe48c9dba843fe1f99dd8272f487e70efae" NODE_URL=http://network-remote:8545 npx hardhat deploy --network custom | ||
|
||
rm -rf ./deployments/custom | ||
PK="0x0355596cdb5e5242ad082c4fe3f8bbe48c9dba843fe1f99dd8272f487e70efae" NODE_URL=http://network-remote-2:8545 npx hardhat deploy --network custom | ||
|
||
cd ../../ | ||
|
||
echo "const wormhole = require("@certusone/wormhole-sdk"); | ||
module.exports = { | ||
chains: { | ||
[wormhole.CHAIN_ID_ARBITRUM_SEPOLIA]: { | ||
endpoints: ["http://localhost:8545"], | ||
colonyBridgeAddress: "0x633899227A3BC1f79de097149E1E3C8097c07b1a", | ||
payForGas: true, | ||
evmChainId: 265669100, | ||
}, | ||
[wormhole.CHAIN_ID_SEPOLIA]: { | ||
endpoints: ["http://localhost:8546"], | ||
colonyBridgeAddress: "0x161944B5601a7d3004E20d4Ca823F710838Ea1be", | ||
payForGas: true, | ||
evmChainId: 265669101, | ||
}, | ||
[wormhole.CHAIN_ID_OPTIMISM_SEPOLIA]: { | ||
endpoints: ["http://localhost:8547"], | ||
colonyBridgeAddress: "0x161944B5601a7d3004E20d4Ca823F710838Ea1be", | ||
payForGas: false, | ||
evmChainId: 265669102, | ||
}, | ||
} | ||
}, | ||
}; | ||
" > ./packages/wormhole-relayer/config.js | ||
|
||
node -e 'require("./scripts/setup-bridging-contracts.js").setupBridging("http://network:8545", ["http://network-remote:8545", "http://network-remote-2:8545"])' | ||
|
||
sleep infinity |
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