diff --git a/chopsticks/Dockerfile b/chopsticks/Dockerfile new file mode 100644 index 0000000..195588b --- /dev/null +++ b/chopsticks/Dockerfile @@ -0,0 +1,14 @@ +# Dockerfile +FROM node:16-alpine + +# Set the working directory +WORKDIR /app + +# Install Chopsticks +RUN npm install -g @acala-network/chopsticks + +# Expose ports for both instances +EXPOSE 8000 8500 9000 9500 + +# Default command (this will be overridden by docker-compose) +CMD ["chopsticks", "-c", "/app/config.yml", "-p", "9000"] diff --git a/chopsticks/docker-compose.yml b/chopsticks/docker-compose.yml new file mode 100644 index 0000000..4d6db64 --- /dev/null +++ b/chopsticks/docker-compose.yml @@ -0,0 +1,46 @@ +version: '3.8' + +services: + chopsticks-polkadot: + build: + context: . + dockerfile: Dockerfile + container_name: chopsticks-polkadot + ports: + - "8000:8000" + volumes: + - ./pd.yml:/app/config.yml + command: ["chopsticks", "-c", "/app/config.yml", "-p", "8000", "--addr", "0.0.0.0"] + + chopsticks-polkadot-2: + build: + context: . + dockerfile: Dockerfile + container_name: chopsticks-polkadot-2 + ports: + - "8500:8500" + volumes: + - ./pd-2.yml:/app/config.yml + command: [ "chopsticks", "-c", "/app/config.yml", "-p", "8500", "--addr", "0.0.0.0" ] + + chopsticks-statemint: + build: + context: . + dockerfile: Dockerfile + container_name: chopsticks-statemint + ports: + - "9000:9000" + volumes: + - ./pd-ah.yml:/app/config.yml + command: ["chopsticks", "-c", "/app/config.yml", "-p", "9000", "--addr", "0.0.0.0"] + + chopsticks-statemint-2: + build: + context: . + dockerfile: Dockerfile + container_name: chopsticks-statemint-2 + ports: + - "9500:9500" + volumes: + - ./pd-ah-2.yml:/app/config.yml + command: [ "chopsticks", "-c", "/app/config.yml", "-p", "9500", "--addr", "0.0.0.0" ] diff --git a/chopsticks/pd-2.yml b/chopsticks/pd-2.yml new file mode 100644 index 0000000..4422480 --- /dev/null +++ b/chopsticks/pd-2.yml @@ -0,0 +1,11 @@ +endpoint: wss://1rpc.io/dot + +import-storage: + System: + Account: + - + - + - 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY + - providers: 1 + data: + free: 1000000000000000 diff --git a/chopsticks/pd-ah-2.yml b/chopsticks/pd-ah-2.yml new file mode 100644 index 0000000..4471dcd --- /dev/null +++ b/chopsticks/pd-ah-2.yml @@ -0,0 +1,15 @@ +endpoint: wss://statemint-rpc.dwellir.com + +import-storage: + System: + Account: + - + - + - 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY + - providers: 1 + data: + free: 1000000000000000 + Assets: + Account: + - [[1984, 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY], { balance: 1000000000 }] + - [[1337, 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY], { balance: 1000000000 }] diff --git a/chopsticks/pd-ah.yml b/chopsticks/pd-ah.yml index bbdb482..8e28c18 100644 --- a/chopsticks/pd-ah.yml +++ b/chopsticks/pd-ah.yml @@ -1,4 +1,4 @@ -endpoint: wss://statemint.api.onfinality.io/public-ws +endpoint: wss://polkadot-asset-hub-rpc.polkadot.io import-storage: System: diff --git a/configs/chopsticks.toml b/configs/chopsticks.toml index e832b2b..d4f540c 100644 --- a/configs/chopsticks.toml +++ b/configs/chopsticks.toml @@ -1,12 +1,22 @@ account-lifetime = 86400000 # 1 day. depth = 3600000 # 1 hour. debug = true -in-memory-db = true + +[[chain]] +name = "polkadot" +native-token = "DOT" +decimals = 10 +endpoints = [ + "ws://localhost:8000", + "ws://localhost:8500", +] [[chain]] name = "statemint" +decimals = 6 endpoints = [ - "ws://localhost:8000" + "ws://localhost:9000", + "ws://localhost:9500", ] [[chain.asset]] @@ -14,5 +24,5 @@ name = "USDC" id = 1337 [[chain.asset]] -name = "USDT" +name = "USDt" id = 1984