forked from allo-protocol/allo-contracts
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add Dockerfile and scripts to deploy contract and populate local chain * extract getBlocksToWait function * add .dockerignore * add dev network * run anvil with host 0.0.0.0 * add docker docs in README * build * override node-hid version * use DEV_CHAIN_HOST for dev chain * add deterministic address for the project registry proxy contract * update dev chain id to 313371 to avoid conflicts with other local chains configurations * update test project metadata CID * populate projects just after deploying the registry contract * move populate file to populate/projects * add DEV_CHAIN_ID var * log time for populate actions * remove doc generation to speed up local dev deployment * add mnemonic for dev chain to use multiple deterministic test wallets * create more projects and add a new project for the second account * add emoji to better show time elapsed for tasks * move Dockerfile to root folder * update dev deterministic contract addresses * use local pinata to populate local env * fix pinata request body * reorganize devenv fixtures * add network chain id to project names * fix contracts addresses * update Dockerfile * set return type to pinata functions
- Loading branch information
1 parent
881d43d
commit c522ab1
Showing
41 changed files
with
388 additions
and
287 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
node_modules | ||
.git | ||
.github | ||
.husky | ||
.openzeppelin* | ||
.upgradable | ||
.vscode |
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 @@ | ||
FROM node:20-slim | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y python3 curl git build-essential psmisc && \ | ||
apt-get clean | ||
|
||
COPY . /app | ||
WORKDIR /app | ||
|
||
ENV DEV_CHAIN_ID=313371 | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
RUN corepack enable | ||
|
||
# Check when foundry supports dumping events | ||
# https://github.com/foundry-rs/foundry/issues/5906 | ||
RUN curl -L https://foundry.paradigm.xyz | bash | ||
RUN ~/.foundry/bin/foundryup | ||
|
||
RUN pnpm install | ||
RUN pnpm hardhat compile | ||
|
||
EXPOSE 8545/tcp | ||
|
||
ENTRYPOINT ./docker/start-chain.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,24 @@ | ||
.PHONY: docker-build docker-run docker-kill docker-stop docker-logs docker-deploy-contracts docker-all | ||
|
||
IMAGE_NAME=allo | ||
CONTAINER_NAME=allo | ||
|
||
docker-all: docker-kill docker-build docker-run docker-deploy-contracts | ||
|
||
docker-build: | ||
docker build . -t $(IMAGE_NAME) --no-cache --progress=plain | ||
|
||
docker-run: | ||
docker run --name $(CONTAINER_NAME) --rm -d -p 127.0.0.1:8545:8545/tcp $(IMAGE_NAME) | ||
|
||
docker-kill: | ||
-docker kill $(CONTAINER_NAME) | ||
|
||
docker-stop: | ||
docker stop $(CONTAINER_NAME) | ||
|
||
docker-logs: | ||
docker logs -f $(CONTAINER_NAME) | ||
|
||
docker-deploy-contracts: | ||
docker exec allo bash ./docker/deploy-contracts.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,35 @@ | ||
export SKIP_CONFIRMATIONS=true | ||
|
||
TIMEFORMAT='(🟢 %3R seconds)'; | ||
|
||
time pnpm run deploy-project-registry dev && \ | ||
time pnpm hardhat run scripts/dev/populate/projects.ts --network dev && \ | ||
\ | ||
time pnpm run deploy-program-factory dev && \ | ||
time pnpm run deploy-program-implementation dev && \ | ||
time pnpm run link-program-implementation dev && \ | ||
\ | ||
time pnpm run deploy-qf-factory dev && \ | ||
time pnpm run deploy-qf-implementation dev && \ | ||
time pnpm run link-qf-implementation dev && \ | ||
\ | ||
time pnpm run deploy-merkle-factory dev && \ | ||
time pnpm run deploy-merkle-implementation dev && \ | ||
time pnpm run link-merkle-implementation dev && \ | ||
\ | ||
time pnpm run deploy-direct-factory dev && \ | ||
time pnpm run deploy-direct-implementation dev && \ | ||
time pnpm run link-direct-implementation dev && \ | ||
\ | ||
time pnpm run deploy-allo-settings dev && \ | ||
time pnpm run set-protocol-fee dev && \ | ||
\ | ||
time pnpm run deploy-round-factory dev && \ | ||
time pnpm run deploy-round-implementation dev && \ | ||
time pnpm run link-round-implementation dev && \ | ||
time pnpm run link-allo-settings dev | ||
|
||
# pnpm run create-program dev | ||
# pnpm run create-qf-contract dev | ||
# pnpm run create-merkle-contract dev | ||
# pnpm run create-round dev |
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 @@ | ||
~/.foundry/bin/anvil --host 0.0.0.0 --chain-id $DEV_CHAIN_ID |
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
Oops, something went wrong.