Skip to content

ContractGenie is a powerful command-line tool designed for developers to effortlessly create, deploy, and manage smart contracts on blockchain networks

License

Notifications You must be signed in to change notification settings

epicchainlabs/ContractGenie

Repository files navigation

ContractGenie

A commandline tool for developing and interacting with smart contracts that

  • can download 3rd party smart contracts and state from your target network (e.g. MainNet) to your epicchain-express network to create a realistic test environment.
  • can generate on-chain and off-chain SDKs based of the smart contract manifest for C#, Golang, Java, Python & TS (see the CLI help for details).

Installation

Download the binary from the releases page and place it somewhere on your path, or

OSX (brew)

brew install epicchain/tap/cpm

Windows (Chocolatey)

choco install cpm

Usage

cpm -h

cpm.yaml is your project configuration file. Have a look or read more about it here.

Example commands

Download all contracts listed in cpm.yaml

Note that only epicchain-express is supported as destination chain. An issue for epicchain-go to add support exists (go vote!).

cpm --log-level DEBUG run 

Download a single contract or contract manifest

cpm download contract -c 0x4380f2c1de98bb267d3ea821897ec571a04fe3e0 -n mainnet
cpm download manifest -c 0x4380f2c1de98bb267d3ea821897ec571a04fe3e0 -N https://mainnet1-seed.epic-chain.org:10111

Build SDK from local manifest

cpm generate python -m samplecontract.manifest.json -t offchain
cpm generate go -m samplecontract.manifest.json -t onchain

Note: all the SDKs are placed in /cpm_out/ under a SDK type and language specific folder i.e. /cpm_out/offchain/python/<contract> or /cpm_out/onchain/golang/<contract>