Project

General

Profile

SmartContracts

Look at the simplest form of the contract, the contract that grants access to all read-only serivces of the Universa network for a given period of time:

DSL contract (obsolete, will have adjusted soon)

(right now it is not used in favor of limited number of transactional units contract)

source:universa_core/src/test_contracts/simple_root_contract.yml

Native contract serialized to JSON:

source:universa_core/src/test_contracts/simple_root_contract.raw.yaml

Native sealed contract, binary:

source:universa_core/src/test_contracts/simple_root_contract.unc

(use download link above)

This simple contract:

  • is issued by Universa service, what is proved by it's signature

<!-- -->

  • is issued for some user with a specified public key, so her or she is an owner

  • owner can pass it to others, e.g. sell it or exchange for something

  • the contract could be revoked only by the owner

<!-- -->

  • the contract has expiration time, after what it

  • will not be approved by the Universa network and therefore can'r be used to access service and

  • will be automatically removed from the ledger

  • it also has a starting period, since when it could be used to grant access to the service. E.g. the contract could be issued for period that starts at some time in the future