diff --git a/.env.mainnet.example b/.env.mainnet.example new file mode 100644 index 0000000..3dcc8b9 --- /dev/null +++ b/.env.mainnet.example @@ -0,0 +1,10 @@ +MNEMONIC="" # change me + +NETWORK=mainnet + +# RPC Endpoint (default unless defined) +# https://docs.kujira.app/validators/community-tooling +# https://docs.mintthemoon.xyz/kujira/resources/ +# +# RPC_ENDPOINT=https://kujira.rpc.ghostinnet.com +# RPC_ENDPOINT=https://kujira-rpc.ibs.team diff --git a/.env.testnet.example b/.env.testnet.example new file mode 100644 index 0000000..19b21c5 --- /dev/null +++ b/.env.testnet.example @@ -0,0 +1,9 @@ +MNEMONIC="" # change me + +NETWORK=testnet + +# RPC Endpoint (default unless defined) +# https://docs.kujira.app/validators/community-tooling +# https://docs.mintthemoon.xyz/kujira/resources/ +# +# RPC_ENDPOINT=https://test-rpc-kujira.mintthemoon.xyz diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f2d40db --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM node:19 + +ENV TERM=xterm +RUN mkdir /usr/src/app +WORKDIR /usr/src/app + +COPY package*.json ./ +RUN yarn install + +#COPY .eslintrc ./ +COPY tsconfig.json ./ +COPY src ./src + +#RUN yarn build + +CMD ["yarn", "start"] diff --git a/README.md b/README.md index 19ac6f7..55c89cc 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,22 @@ This crank app uses a single "orchestrator" account, and sets up feegrants to al Long-term this will be replaced by the on-chain scheduler. Until then, this app allows us to understand the dynamics of these crankers before committing to the scheduler. -## Setup +## Setup 1. Ensure that you have `MNEMONIC` available on your env for the orchestrator account 1. `yarn` 1. `NETWORK=mainnet yarn start` NB: On first start, all the feegrants will be created which can take some time + +### using Docker Compose + +```sh +# create .env and config your mnemonic + +# build and start +docker-compose up + +# force rebuild with +docker-compose up --build +``` diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..9387d8a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +version: '3.9' + +services: + crank: + build: . + image: kujira-crank + container_name: kujira-crank + env_file: + - .env + restart: always + stdin_open: true + tty: true