Contract Registry Microservice


Contract-Registry is responsible for

  • Storing smart-contracts’ related information;
  • Versioning these smart-contracts.

Thus facilitating smart-contracts deployment, decoding of events of transactions associated to these smart-contracts; and to read smart-contract’s states on chain.


Configure Run

The application can be configured through flags or environment variables, we can run the help run command line.

go run . help run
  orchestrate contract-registry run [flags]

      --abi strings                     Smart Contract ABIs to register for crafting (expected format <contract>:<abi>:<bytecode>:<deployedBytecode>)
                                        Environment variable: "ABI"
      --contract-registry-type string   Type of Contract Registry (one of ["mock" "postgres"])
                                        Environment variable: "CONTRACT_REGISTRY_TYPE" (default "postgres")
      --db-database string              Target Database name
                                        Environment variable: "DB_DATABASE" (default "postgres")
      --db-host string                  Database host
                                        Environment variable: "DB_HOST" (default "")
      --db-password string              Database User password
                                        Environment variable: "DB_PASSWORD" (default "postgres")
      --db-poolsize int                 Maximum number of connections on database
                                        Environment variable: "DB_POOLSIZE"
      --db-port int                     Database port
                                        Environment variable: "DB_PORT" (default 5432)
      --db-user string                  Database User.
                                        Environment variable: "DB_USER" (default "postgres")
  -h, --help                            help for run


♦ Default values can be changed by using environment variables.

♦ Environment variables will be overwritten by Flags values.