cic-cli


Namecic-cli JSON
Version 0.5.5 PyPI version JSON
download
home_pagehttps://git.grassecon.net/cicnet/cic-cli
SummaryGeneric cli tooling for the CIC token network
upload_time2023-03-24 12:15:51
maintainer
docs_urlNone
authorLouis Holbrook
requires_python>=3.8,<4.0
licenseGPL-3.0-or-later
keywords dlt blockchain cryptocurrency
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # CIC Token Deployment Tool
[![Status](https://ci.grassecon.net/api/badges/cicnet/cic-cli/status.svg)](https://ci.grassecon.net/grassrootseconomics/cic)
[![Version](https://img.shields.io/pypi/v/cic-cli?color=green)](https://pypi.org/project/cic/)

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

```shell
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:

```shell
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:

```shell
cic ext --registry <contract_registry_address> -d <settings_folder> -i <chain_spec> -p <rpc_endpoint> eth
```


## Structure of the components

![image](./doc/sphinx/components.svg)

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
 - Install [poetry](https://python-poetry.org/docs/#installation) 

### Setup

```
 poetry install -E eth
```

### Running the CLI

```bash
 poetry run cic -h
```

```bash
 poetry run cic wizard ./somewhere -c ./config/docker
```
### Importing a wallet from metamask
- Export the accounts private key [Instructions](https://metamask.zendesk.com/hc/en-us/articles/360015289632-How-to-Export-an-Account-Private-Key)
- Save the private key to a file
- Run `eth-keyfile -k <file> > ~/.config/cic/keystore/keyfile.json`

###  Port Forwarding
<details>
<summary>Install Kubectl</summary>

```bash
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
```
</details>

- 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
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://git.grassecon.net/cicnet/cic-cli",
    "name": "cic-cli",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "dlt,blockchain,cryptocurrency",
    "author": "Louis Holbrook",
    "author_email": "dev@holbrook.no",
    "download_url": "https://files.pythonhosted.org/packages/6c/a4/630d5b5734721f72749ac4c2e623852287ddb7c85b45b2502cde1f2d4da9/cic_cli-0.5.5.tar.gz",
    "platform": null,
    "description": "# CIC Token Deployment Tool\n[![Status](https://ci.grassecon.net/api/badges/cicnet/cic-cli/status.svg)](https://ci.grassecon.net/grassrootseconomics/cic)\n[![Version](https://img.shields.io/pypi/v/cic-cli?color=green)](https://pypi.org/project/cic/)\n\nCIC-CLI provides tooling to generate and publish metadata in relation to\ntoken deployments.\n\n```shell\npip install cic-cli[eth]\n```\n## Usage\n### Using the wizard  \nFirst make sure that you edit the configs below to add your paths for `[auth]keyfile_path` and `[wallet]keyfile`\nThe configs are located in `~/.config/cic/cli/config/`\n```\n# Local\ncic wizard ./somewhere -c ~/.config/cic/cli/config/docker\n\n# Test Net\ncic wizard ./somewhere -c ~/.config/cic/cli/config/testnet\n```\n### Modular\nSome of the concepts described below assume familiarity with base\nconcepts of the CIC architecture. Please refer to the appropriate\ndocumentation for more information.\n\nTo initialize a new token deployment for the EVM:\n\n```shell\ncic init --target eth --name <token_name> --symbol <token_symbol> --precision <token_value_precision> <settings_folder>\n```\n\nTo automatically fill in settings detected in the network for the EVM:\n\n```shell\ncic ext --registry <contract_registry_address> -d <settings_folder> -i <chain_spec> -p <rpc_endpoint> eth\n```\n\n\n## Structure of the components\n\n![image](./doc/sphinx/components.svg)\n\nCIC-CLI is designed to interface any network type backend. The current\nstate of the package contains interface to EVM only. Thus, the examples\nbelow are limited to the context of the EVM.\n\n## Development\n### Requirements\n - Install [poetry](https://python-poetry.org/docs/#installation) \n\n### Setup\n\n```\n poetry install -E eth\n```\n\n### Running the CLI\n\n```bash\n poetry run cic -h\n```\n\n```bash\n poetry run cic wizard ./somewhere -c ./config/docker\n```\n### Importing a wallet from metamask\n- Export the accounts private key [Instructions](https://metamask.zendesk.com/hc/en-us/articles/360015289632-How-to-Export-an-Account-Private-Key)\n- Save the private key to a file\n- Run `eth-keyfile -k <file> > ~/.config/cic/keystore/keyfile.json`\n\n###  Port Forwarding\n<details>\n<summary>Install Kubectl</summary>\n\n```bash\nsudo apt-get update\nsudo apt-get install -y apt-transport-https ca-certificates curl\nsudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg\necho \"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\nsudo apt-get update\nsudo apt-get install -y kubectl\n```\n</details>\n\n- Download testnet cluster config from https://cloud.digitalocean.com/kubernetes/clusters\n- Move the config to `$HOME/.kube/`\n- Run `kubectl -n grassroots --kubeconfig=$HOME/.kube/<config_file_name>.yaml get pods`  \n- Copy the name of the meta pod (e.g `cic-meta-server-67dc7c6468-8rhdq`)\n- 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`\n- Clone this repository to your local machine\n- Run `poetry install -E eth` in the repo root\n- Open `./cic/config/testnet/config.ini` and change\n  - [auth]keyfile_path \n  - [wallet]key_file\n- Open a new terminal and run `poetry run cic wizard -c ./cic/config/testnet ./somewhere` \n### Tests\n\n```\npoetry run pytest\n```\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "Generic cli tooling for the CIC token network",
    "version": "0.5.5",
    "split_keywords": [
        "dlt",
        "blockchain",
        "cryptocurrency"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ba2e9c1f41fc0b6aeda6ae21daf15a0567c660e5a971a505904eadca111080d3",
                "md5": "38088be80cf4574d6c30c97866bedbeb",
                "sha256": "ced3f1c2d7d64ebcb191d763d314aa28f969ce0c2b12df2730c74c9a212485e5"
            },
            "downloads": -1,
            "filename": "cic_cli-0.5.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "38088be80cf4574d6c30c97866bedbeb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 50673,
            "upload_time": "2023-03-24T12:15:48",
            "upload_time_iso_8601": "2023-03-24T12:15:48.685535Z",
            "url": "https://files.pythonhosted.org/packages/ba/2e/9c1f41fc0b6aeda6ae21daf15a0567c660e5a971a505904eadca111080d3/cic_cli-0.5.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6ca4630d5b5734721f72749ac4c2e623852287ddb7c85b45b2502cde1f2d4da9",
                "md5": "e87cd60e36db039063e28c726b91436e",
                "sha256": "2d536bb56bef45c07fe2003d1f12c897cfb27b0e64a2b41698c9ad292ea6634f"
            },
            "downloads": -1,
            "filename": "cic_cli-0.5.5.tar.gz",
            "has_sig": false,
            "md5_digest": "e87cd60e36db039063e28c726b91436e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 40080,
            "upload_time": "2023-03-24T12:15:51",
            "upload_time_iso_8601": "2023-03-24T12:15:51.394622Z",
            "url": "https://files.pythonhosted.org/packages/6c/a4/630d5b5734721f72749ac4c2e623852287ddb7c85b45b2502cde1f2d4da9/cic_cli-0.5.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-24 12:15:51",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "cic-cli"
}
        
Elapsed time: 0.05442s