okota/python/README.md

32 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

2022-02-21 17:13:42 +01:00
# Okota
2022-02-21 17:21:31 +01:00
Okota implements smart contract registries for the CIC network with the [Address Declarator](https://gitlab.com/cicnet/eth-address-index) backend.
2022-02-21 17:13:42 +01:00
For every entry added to the registry, a declaration is added aswell.
2022-02-21 17:24:18 +01:00
In all the below:
* `contract_address` is the address of the deployed Address Declarator contract.
* `subject_address` is the address a declaration is being made about.
* `declarer` is the entity making a declaration about the `subject_address`.
* `proof` a 256-bit proof
2022-02-21 17:13:42 +01:00
## Contract declaration translations
2022-02-21 17:24:18 +01:00
| registry call | declarer | subject | proof |
2022-02-21 17:13:42 +01:00
|---|---|---|---|
| ContractRegistry.set(registry\_identifier, contract\_address) | sender | contract\_address | registry\_identifier |
| AccountsIndex.register(wallet\_address) | sender | wallet\_address | token address of accounts index |
| TokenRegistry.registry(token\_address) | sender | token\_address | sha256(token symbol) |
## Query the declarator with CLI
2022-02-21 17:21:31 +01:00
`eth-accounts-index-view -e <contract_address> -a <declarer_address> <subject_address>`
2022-02-21 17:13:42 +01:00
## Add arbitrary other proofs with CLI
2022-02-21 17:21:31 +01:00
`eth-accounts-index-add -e <contract_address> -y <declarer_keyfile> -a <subject_address> <proof>`