genesis/

directory
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2018 License: Apache-2.0

README

Insolar – Platform Genesis

Proof-Of-Concept, platform for realizations of dApps.

Overview

Genesis module describes interaction of system components with each other.

Every component of the system is a SmartContract. Members of the system are given the opportunity to build their own dApps by publishing smart contracts in Domain instances.

Domains define the visibility scope for the child contracts and their interaction policies. Actually, Domain is subclass of SmartContract.

Base domains

ReferenceDomain

System domain that allow users to publish their SmartContract's for public use. After publication, the reference becomes available for resolving by global resolver.

Usage:

factory := NewReferenceDomainFactory()
refDomain := factory.Create(nil)

record, err := refDomain.RegisterReference(someReference)
resolved, err := refDomain.ResolveReference(record)

Resolver mechanism

Resolver makes possible for smart contracts to interact with each other. A method for resolving is provided for every type of reference.

Global

Resolve references of GlobalScope type. GlobalScope references are global reference, must be resolved via ReferenceDomain. Object with this type of reference consider as public.

Context

Resolve references of ContextScope type. ContextScope references point to an object within a context provided by parent. It may be a child or any other object available to the parent.

Child

Resolve references of ChildScope type. ChildScope references to a child of an object which resolving the reference.

Directories

Path Synopsis
Package example provides smart contracts for building example of system work.
Package example provides smart contracts for building example of system work.
mock
storage
Package storage provides interface and default implementation of storage as map for objects.
Package storage provides interface and default implementation of storage as map for objects.
model
class
Package class provides constants for string representation of class for basic interfaces implementations.
Package class provides constants for string representation of class for basic interfaces implementations.
contract
Package contract provides interface and default implementation of smart contract.
Package contract provides interface and default implementation of smart contract.
domain
Package domain provides interface and default implementation of domain.
Package domain provides interface and default implementation of domain.
factory
Package factory provides interfaces for factories of all objects and proxy objects.
Package factory provides interfaces for factories of all objects and proxy objects.
object
Package object provides basic interfaces and default implementations of them.
Package object provides basic interfaces and default implementations of them.
resolver
Package resolver provides interface and default implementation of resolvers for getting objects from references.
Package resolver provides interface and default implementation of resolvers for getting objects from references.
public
core
Package core allows to create Genesis Domain
Package core allows to create Genesis Domain

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL