Skip to content

Instantly share code, notes, and snippets.

@gbarros
Created July 22, 2023 18:51
Show Gist options
  • Save gbarros/b82778c1d1b3ace934a6980cf1dd8ec5 to your computer and use it in GitHub Desktop.
Save gbarros/b82778c1d1b3ace934a6980cf1dd8ec5 to your computer and use it in GitHub Desktop.
Deploying Cartesi Rollups v0.8.2
version: "3.9"
services:
deploy:
image: gbbabarros/rollups-hardhat:0.8.2
env_file:
- env.custom.yml
command:
[
"deploy",
"--network",
"custom",
"--export",
"/opt/cartesi/share/blockchain/custom.json",
]
init: true
volumes:
- blockchain-data:/opt/cartesi/share/blockchain
- ./deployments:/app/rollups/deployments
network_mode: "host"
volumes:
blockchain-data: {}
NETWORK=custom
CHAIN_ID=500
BLOCK_CONFIRMATIONS=10
BLOCK_CONFIRMATIONS_TX=11
RPC_URL=http://host.docker.internal:8545/
MNEMONIC="test test test test test test test test test test test junk"
  1. Copy and paste the docker-compose.hardhat.yaml in the root of your Cartesi Dapp project
  2. Define the custom network env file, also at the root. These are the keys you might need to change:
    • MNEMONIC the one used there is the default for Hardhat local testnet
    • RPC_URL host.docker.internal is for your local computer, e.g.: if your were running anvil/hardhat node there
    • CHAIN_ID is the chain id of the target network
  3. Run the following cmd:

docker compose -f docker-compose.hardhat.yaml up

  1. Done! You have new deployment files under the folder "./deployments/custom"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment