cic | ||
doc/sphinx | ||
tests | ||
.gitignore | ||
.pylintrc | ||
CHANGELOG | ||
components.svg | ||
eth_requirements.txt | ||
LICENSE | ||
MANIFEST.in | ||
README.md | ||
requirements.txt | ||
run_tests.sh | ||
setup.cfg | ||
setup.py | ||
test_requirements.txt |
CIC token deployment tool
CIC-CLI provides tooling to generate and publish metadata in relation to token deployments.
To install the project (replacing <VERSION> with the current version: 0.0.1):
python setup.py sdist
pip install --extra-index-url https://pip.grassrootseconomics.net:8433 dist/cic-<VERSION>.tar.gz
Structure of the components
CIC-CLI is designed to interface any network type backend. The current state of the package contains interface to EVM only. Thus, the examples below are limited to the context of the EVM.
Preparing for EVM token deployment
Some of the concepts described below assume familiarity with base concepts of the CIC architecture. Please refer to the appropriate documentation for more information.
To initialize a new token deployment for the EVM:
cic init --target eth --name <token_name> --symbol <token_symbol> --precision <token_value_precision> <settings_folder>
To automatically fill in settings detected in the network for the EVM:
cic ext --registry <contract_registry_address> -d <settings_folder> -i <chain_spec> -p <rpc_endpoint> eth
Development
Setup
python3 -m venv ./.venv
source ./.venv/bin/activate
pip install --extra-index-url https://pip.grassrootseconomics.net -r requirements.txt -r test_requirements.txt eth_requirements.txt
Running the CLI
python -m cic.runnable.cic_cmd -h # Help
Deploying Token
- Generate Token Template
python -m cic.runnable.cic_cmd init --target eth --name "Foo Token" --symbol FOO --precision 6 foo
- Populating network.json Ea6225212005E86a4490018Ded4bf37F3E772161
python -m cic.runnable.cic_cmd ext -p http://localhost:63545 -i evm:byzantium:8996:bloxberg --registry 0xcf60ebc445b636a5ab787f9e8bc465a2a3ef8299 -d foo eth
add eb3907ecad74a0013c259d5874ae7f22dcbcc95c from stack/apps/contact_migrations/keystore:address to foo.network.resources.eth.contents.*.key_account
Fill out proof.json
{
"description": "Smoking is bad for your health",
"issuer": "William Luke",
"namespace": "ge",
"proofs": [],
"version": 0
}
Fill out token.json eth-erc20 erc20-demurrage-token
{
"code": "/home/will/grassroots/eth-erc20/python/giftable_erc20_token/data/GiftableToken.bin",
"extra": [
{
"arg": "",
"arg_type": ""
}
],
"name": "Foo Token",
"precision": "6",
"supply": 1000000000000000000000000,
"symbol": "FOO"
}
Deploy 0xcf60ebc445b636a5ab787f9e8bc465a2a3ef8299
python -m cic.runnable.cic_cmd export --metadata-endpoint http://localhost:63380 -vv -y /home/will/grassroots/cic-internal-integration/apps/contract-migration/keystore -o out -d foo eth
eth-contract-registry-list -e 0xcf60ebc445b636a5ab787f9e8bc465a2a3ef8299 -u
Use TokenRegistery for e
eth-token-index-list -p http://localhost:63545 -i evm:byzantium:8996:bloxberg -e eb3907ecad74a0013c259d5874ae7f22dcbcc95c -u
Tests
bash ./run_tests.sh