Ganache setup with core Celo contracts for local testing and development.
npm install @celo/celo-devchainGanache setup with core Celo contracts for local testing and development.
Now supports node18.
`` bash`
> npm install --save-dev @celo/celo-devchain
> npx celo-devchain --port 7545
` bash`Run sanity tests and print all core contract addresses:
> npx @celo/celo-devchain --test
NOTE: @celo/ganache-cli currently doesn't support locally signed transactions. If you send
a locally signed transaction it will throw: Error: Number can only safely store up to 53 bits
error and crash. Thus you have to make sure your ContractKit doesn't actually have the private
keys for test addresses and send transactions to be signed by ganache-cli itself.
Example code that uses this package:
Chain data in ./chains folder is generated using steps described here:
` bashStart with a fresh checkout to avoid build complications.
> git clone https://github.com/celo-org/celo-monorepo.git
> git fetch --all --tags
> git tag -l core-contracts*
> git checkout tags/core-contracts.v{version}
> cd packages/protocol
flag can change based on changes in core-contracts, Once done, copy over the tar file.
Contracts Artifatcs
Contracts artifacts in
./contracts should be updated with every contract release. They are generated by building the protocol package and copying over the contracts build artifacts.You can also use
celo-devchain with custom generated chain data:` bash
> npx celo-devchain --file
``