Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.
/ celo-devchain Public archive

Ganache-cli setup with core Celo contracts for local testing and development.

License

Notifications You must be signed in to change notification settings

terminal-fi/celo-devchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DEPRECATED

Use: https://github.com/celo-org/celo-devchain which is maintained by cLabs team and is now receiving updates on a more regular basis

celo-devchain

Ganache-cli setup with core Celo contracts for local testing and development.

Usage

> npm install --save-dev @terminal-fi/celo-devchain
> npx celo-devchain --port 7545
# Run sanity tests and print all core contract addresses:
> npx @terminal-fi/celo-devchain --test

NOTE: @celo/ganache-cli should work with Node 14 version. It might work with Node 10 and 12 too.

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: https://github.com/zviadm/celo-hellocontracts

Chain Data

Chain data in ./chains folder is generated using steps described here: https://docs.celo.org/developer-guide/development-chain.

# Start 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-{version}

# Yarn commands can take a while to run.
> yarn
> yarn build

> cd packages/protocol
# NOTE: Following command is found in: sdk/contractkit/package.json, at some point the desired --upto flag can change
# based on changes in core-contracts, thus you might have to adjust it too, depending on which version of core-contracts
# you are attempting to build.
> yarn devchain generate-tar .tmp/devchain.tar.gz --migration_override ../dev-utils/src/migration-override.json --upto 27

You can also use celo-devchain with custom generated chain data:

> npx celo-devchain --file <path to custom chain data>

About

Ganache-cli setup with core Celo contracts for local testing and development.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •