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

[Feature]: the commands to compile, verify and deploy a contract should be in one place #290

Open
GigaHierz opened this issue Jul 1, 2024 · 0 comments
Assignees

Comments

@GigaHierz
Copy link
Contributor

GigaHierz commented Jul 1, 2024

Tell us about your idea

Right now we have a few places in the project that hold information on how to compile, verify and deploy a contract. I suggest collecting that information and making sure it is accessible in all of them to serve different developer preferences

  1. README.md

Proposed update


Celo Composer | Hardhat

How to use

  1. Create a copy of .env.example and rename it to .env.

  2. Compile the contract

Run

yarn run compile
  1. Deploy the contract

You will need the PRIVATE_KEY set in .env. Make sure you hold CELO tokens to pay for the deployment. If you are deploying on Alfajroes, get the tokens from the Celo faucet.

To deploy your contract on Alfajores

npx hardhat run scripts/deploy.js --network alfajores

To deploy your contract on Mainnet

npx hardhat run scripts/deploy.js --network celo
  1. For the verification you will need the Celoscan API Key CELOSCAN_API_KEY set in .env.

For Alfajores (Testnet) Verification

npx hardhat verify [CONTRACT_ADDRESS] [...CONSTRUCTOR_ARGS] --network alfajores

For Mainnet Verification

npx hardhat verify [CONTRACT_ADDRESS] [...CONSTRUCTOR_ARGS] --network celo

Check the file hardhat.config.js for Celo specific hardhat configuration.

Anything else?

No response

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

2 participants