Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[documentation] - REGISTER_TASK.md located here can be improved #2

Open
00-linglin opened this issue Dec 28, 2024 · 0 comments
Open

Comments

@00-linglin
Copy link

00-linglin commented Dec 28, 2024

For the instructions related to: https://github.com/flare-foundation/flare-systems-deployment/blob/main/docs/REGISTER_TASK.md

additional information would be helpful, for example, please consider the following changes:

Prerequisites

  1. install yarn from: https://classic.yarnpkg.com/en/docs/install

Registration tasks

If you do have a safe environment to work with you can register your entity addresses with the register-entities script and your sortition public key with the register-public-keys script.

  1. clone the https://github.com/flare-foundation/flare-smart-contracts-v2 repo
  2. change directory to the newly cloned repo: cd flare-smart-contracts-v2
  3. fill out and store below snippet to a file named accounts.json, at the root of the flare-smart-contracts-v2 repo:
[
  {
    "identity": {
      "address": "<address>",
      "privateKey": "<private key hex>"
    },
    "submit": {
      "address": "<address>",
      "privateKey": "<private key hex>"
    },
    "submitSignatures": {
      "address": "<address>",
      "privateKey": "<private key hex>"
    },
    "signingPolicy": {
      "address": "<address>",
      "privateKey": "<private key hex>"
    },
    "delegation": {
      "address": "<address>",
      "privateKey": "<private key hex>"
    },
    "sortitionPrivateKey": "<private key hex>"
  }
]
  1. create .env file using this template (eg.: for Flare network, or one of the other test networks, coston2 for example)
FLARE_RPC=rpcurl
CHAIN_CONFIG=flare|coston|coston2
ENTITIES_FILE_PATH=accounts.json
  1. finally run the scripts (eg.: for Flare network, replace --network with the appropriate network as neccessary)
# initialize repository
yarn
# compile contracts
yarn c
# run entity registration
yarn hardhat --network flare deployment/tasks/register-entities
# run public key registration
yarn hardhat --network flare deployment/tasks/register-public-keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant