Generic cli tooling for the CIC token network
Go to file
semantic-release 1a42f227c7 0.5.5
Automatically generated by python-semantic-release
2023-03-24 14:52:53 +03:00
cic 0.5.5 2023-03-24 14:52:53 +03:00
doc/sphinx Embedded image in readme md 2021-11-30 10:54:13 +01:00
tests test: remove sink_account from giftable test 2022-04-29 10:53:12 +03:00
.coveragerc refactor: switch to poetry, add interactive deployment 2022-03-01 10:01:56 +03:00
.drone.yml fix: change name to cic-cli 2022-03-01 12:40:30 +03:00
.gitignore fix: add getpass 2022-03-14 15:48:36 +03:00
.pylintrc feat: add meta-auth (#4) 2022-07-04 10:37:40 +00:00
CHANGELOG.md 0.5.5 2023-03-24 14:52:53 +03:00
LICENSE Initial commit 2021-10-09 18:50:43 +02:00
MANIFEST.in Add token deployment 2021-10-10 15:37:26 +02:00
README.md docs: update bange urls 2022-03-16 11:55:13 +03:00
components.svg Add component diagram symlink 2021-11-30 10:34:46 +01:00
poetry.lock fix: lock erc20-demurrage-token 2023-03-24 14:52:27 +03:00
pyproject.toml 0.5.5 2023-03-24 14:52:53 +03:00

README.md

CIC Token Deployment Tool

Status Version

CIC-CLI provides tooling to generate and publish metadata in relation to token deployments.

pip install cic-cli[eth]

Usage

Using the wizard

First make sure that you edit the configs below to add your paths for [auth]keyfile_path and [wallet]keyfile The configs are located in ~/.config/cic/cli/config/

# Local
cic wizard ./somewhere -c ~/.config/cic/cli/config/docker

# Test Net
cic wizard ./somewhere -c ~/.config/cic/cli/config/testnet

Modular

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

Structure of the components

image

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.

Development

Requirements

Setup

 poetry install -E eth

Running the CLI

 poetry run cic -h
 poetry run cic wizard ./somewhere -c ./config/docker

Importing a wallet from metamask

  • Export the accounts private key Instructions
  • Save the private key to a file
  • Run eth-keyfile -k <file> > ~/.config/cic/keystore/keyfile.json

Port Forwarding

Install Kubectl
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl
sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg
echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubectl
  • Download testnet cluster config from https://cloud.digitalocean.com/kubernetes/clusters
  • Move the config to $HOME/.kube/
  • Run kubectl -n grassroots --kubeconfig=$HOME/.kube/<config_file_name>.yaml get pods
  • Copy the name of the meta pod (e.g cic-meta-server-67dc7c6468-8rhdq)
  • Port foward the meta pod to the local machine using kubectl port-forward pods/<name_of_meta_pod> 6700:8000 -n grassroots --kubeconfig=$HOME/.kube/<config_file_name>.yaml
  • Clone this repository to your local machine
  • Run poetry install -E eth in the repo root
  • Open ./cic/config/testnet/config.ini and change
    • [auth]keyfile_path
    • [wallet]key_file
  • Open a new terminal and run poetry run cic wizard -c ./cic/config/testnet ./somewhere

Tests

poetry run pytest