node
>v18.15.0
yarn
> yarn install
> yarn compile
The following folders should be generated as the result:
artifacts
- completed contract specificationtypechain-types
- typescript bindings for contracts
> yarn test
- AccountControl - contract to manage permissions for transactions and new contracts deployment
- RoleControl - contract to manage (assign/revoke) account roles.
- IndyDidRegistry -
indybesu
DID Registry - EthereumExtDidRegistry - Ethereum DID Registry extended with permission checks
- SchemaRegistry - contract to manage Schemas
- CredentialDefinitionRegistry - contract to manage Credential Definitions
- ValidatorControl - contract to manage network validator nodes.
- UpgradeControl - contract to control deployed smart contracts and their versions (proposing and approving new versions).
- LegacyMappingRegistry - contract to store mapping for legacy identifiers.
You can find sample scripts demonstrating the usage of deployed contracts in the demo folder.
- Account management - deploy/read/writer transactions.
> yarn demo/account
- Demo flow - create/resolve DID/Schema/Credential Definition using
did:indy2
method.> yarn demo/flow
- Demo flow - create/resolve DID/Schema/Credential Definition using
did:ethr
method.> yarn demo/flow-with-did-ethr
- Roles management - get/assign/revoke role to/from account.
> yarn demo/roles
- Upgrade management - propose/approve upgradable contract implementation.
> yarn demo/upgrade
- Validators management - get list of current validators.
> yarn demo/validators
- Genesis - helper scripts to generate genesis state for injecting smart contracts.
socl
tool must be installed on the machine.
-
Prepare the input file with the initial state of each contract.
-
Compile contracts:
yarn solc-compile
artifacts
andcompiled-contracts
folders with compiled contracts will be generated as the result of the execution.
-
Execute script generating the contracts content for the network genesis file:
yarn genesis/generate
ContractsGenesis.json
file will be generated as the result
-
Put the whole block into the
alloc
section of the network genesis file. -
If you changed the default address of
ValidatorControl
contract: Set address ofValidatorControl
contract intovalidatorcontractaddress
field of theqbft
section of the genesis file. -
If you changed the default address of
AccountControl
contract: Set address ofAccountControl
contract intopermissions-accounts-contract-address
field of theconfig.toml
file.