2

I'm setting up a local-testnet with multiple nodes and would like to know if there is a way to premine DOT without using the UI Here is a copy of my docker-compose from following the steps on https://github.com/paritytech/polkadot

version: '2'

services:
  polkadot:
    container_name: polkadot
    image: parity/polkadot
    # volumes:
    #   - /my/local/folder:/polkadot
    command: [
      # "--name", "PolkaDocker",
      # "--ws-external",
      # "--rpc-external", #must need
      # "--rpc-cors", "all"
      "--chain=polkadot-local",
      "--alice", "-d", "/tmp/alice",
      "--node-key", "0000000000000000000000000000000000000000000000000000000000000002"
    ]
    networks:
      polkadotnw:
        ipv4_address: 10.0.0.10
  polkadot2:
    container_name: polkadot2
    image: parity/polkadot
    # volumes:
    #   - /my/local/folder:/polkadot
    command: [
      # "--name", "PolkaDocker",
      # "--ws-external",
      # "--rpc-external",
      # "--rpc-cors", "all"
      "--chain=polkadot-local", 
      "--bob", "-d", "/tmp/bob", 
      "--bootnodes", "/ip4/127.0.0.1/tcp/30333/p2p/12D3KooWHdiAxVd8uMQR1hGWXccidmfCwLqcMpGwR6QcTP6QRMuD"
    ]
    networks:
      polkadotnw:
        ipv4_address: 10.0.0.20
    depends_on:
      - polkadot


networks:
  polkadotnw:
    driver: bridge
    ipam:
      config:
        - subnet: 10.0.0.0/24
2
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Jan 25, 2023 at 21:32
  • if you want to author and finalise blocks on the local testnet of a Substrate-based chain like Polkadot then you need at least three validators, not just two. so add a third Docker container called polkadot3 and use "well known" pre-funded account --charlie Jan 25, 2023 at 21:40

1 Answer 1

1

You can change the chain-spec of you local test net here. The endowed accounts are accounts with a pre-mined balance.
There is an example of how to put in an AccountID in the Westend chain-spec.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.