Documentation
¶
Index ¶
- Constants
- Variables
- func ContractMigrationAddressNameShards(maShardCount int) []string
- func ContractMigrationAddressShards(maShardCount int) []insolar.Reference
- func ContractPublicKeyNameShards(pkShardCount int) []string
- func ContractPublicKeyShards(pkShardCount int) []insolar.Reference
- func GenerateCodeReferenceFromContractID(typeContractID string, name string, version int) *insolar.Reference
- func GenerateProtoReferenceFromCode(pulse insolar.PulseNumber, code []byte) *insolar.Reference
- func GenerateProtoReferenceFromContractID(typeContractID string, name string, version int) *insolar.Reference
- func GenesisRef(name string) insolar.Reference
- type Record
Constants ¶
View Source
const ( PrototypeType = "prototype" PrototypeSuffix = "_proto" )
Variables ¶
View Source
var ( // ContractRootDomain is the root domain contract reference. ContractRootDomain = GenesisRef(insolar.GenesisNameRootDomain) // ContractNodeDomain is the node domain contract reference. ContractNodeDomain = GenesisRef(insolar.GenesisNameNodeDomain) // ContractNodeRecord is the node contract reference. ContractNodeRecord = GenesisRef(insolar.GenesisNameNodeRecord) // ContractRootMember is the root member contract reference. ContractRootMember = GenesisRef(insolar.GenesisNameRootMember) // ContractRootWallet is the root wallet contract reference. ContractRootWallet = GenesisRef(insolar.GenesisNameRootWallet) // ContractRootAccount is the root account contract reference. ContractRootAccount = GenesisRef(insolar.GenesisNameRootAccount) // ContractMigrationAdminMember is the migration admin member contract reference. ContractMigrationAdminMember = GenesisRef(insolar.GenesisNameMigrationAdminMember) // ContractMigrationWallet is the migration wallet contract reference. ContractMigrationAdmin = GenesisRef(insolar.GenesisNameMigrationAdmin) // ContractMigrationWallet is the migration wallet contract reference. ContractMigrationWallet = GenesisRef(insolar.GenesisNameMigrationAdminWallet) // ContractMigrationAccount is the migration account contract reference. ContractMigrationAccount = GenesisRef(insolar.GenesisNameMigrationAdminAccount) // ContractDeposit is the deposit contract reference. ContractDeposit = GenesisRef(insolar.GenesisNameDeposit) // ContractCostCenter is the cost center contract reference. ContractCostCenter = GenesisRef(insolar.GenesisNameCostCenter) // ContractFeeMember is the fee member contract reference. ContractFeeMember = GenesisRef(insolar.GenesisNameFeeMember) // ContractFeeWallet is the fee wallet contract reference. ContractFeeWallet = GenesisRef(insolar.GenesisNameFeeWallet) // ContractFeeAccount is the fee account contract reference. ContractFeeAccount = GenesisRef(insolar.GenesisNameFeeAccount) // ContractEnterpriseMember is the enterprise member contract reference. ContractEnterpriseMember = GenesisRef(insolar.GenesisNameEnterpriseMember) // ContractEnterpriseWallet is the enterprise wallet contract reference. ContractEnterpriseWallet = GenesisRef(insolar.GenesisNameEnterpriseWallet) // ContractEnterpriseAccount is the enterprise account contract reference. ContractEnterpriseAccount = GenesisRef(insolar.GenesisNameEnterpriseAccount) // ContractMigrationDaemonMembers is the migration daemon members contracts references. ContractMigrationDaemonMembers = func() (result [insolar.GenesisAmountMigrationDaemonMembers]insolar.Reference) { for i, name := range insolar.GenesisNameMigrationDaemonMembers { result[i] = GenesisRef(name) } return }() // ContractMigrationMap where key is migration daemon member references and value related migration daemon contract ContractMigrationMap = func() (result map[insolar.Reference]insolar.Reference) { result = make(map[insolar.Reference]insolar.Reference) for i := 0; i < insolar.GenesisAmountMigrationDaemonMembers; i++ { result[GenesisRef(insolar.GenesisNameMigrationDaemonMembers[i])] = GenesisRef(insolar.GenesisNameMigrationDaemons[i]) } return }() // ContractNetworkIncentivesMembers is the network incentives members contracts references. ContractNetworkIncentivesMembers = func() (result [insolar.GenesisAmountNetworkIncentivesMembers]insolar.Reference) { for i, name := range insolar.GenesisNameNetworkIncentivesMembers { result[i] = GenesisRef(name) } return }() // ContractApplicationIncentivesMembers is the application incentives members contracts references. ContractApplicationIncentivesMembers = func() (result [insolar.GenesisAmountApplicationIncentivesMembers]insolar.Reference) { for i, name := range insolar.GenesisNameApplicationIncentivesMembers { result[i] = GenesisRef(name) } return }() // ContractFoundationMembers is the foundation members contracts references. ContractFoundationMembers = func() (result [insolar.GenesisAmountFoundationMembers]insolar.Reference) { for i, name := range insolar.GenesisNameFoundationMembers { result[i] = GenesisRef(name) } return }() // ContractNetworkIncentivesWallets is the network incentives members contracts references. ContractNetworkIncentivesWallets = func() (result [insolar.GenesisAmountNetworkIncentivesMembers]insolar.Reference) { for i, name := range insolar.GenesisNameNetworkIncentivesWallets { result[i] = GenesisRef(name) } return }() // ContractApplicationIncentivesWallets is the application incentives members contracts references. ContractApplicationIncentivesWallets = func() (result [insolar.GenesisAmountApplicationIncentivesMembers]insolar.Reference) { for i, name := range insolar.GenesisNameApplicationIncentivesWallets { result[i] = GenesisRef(name) } return }() // ContractFoundationWallets is the foundation members contracts references. ContractFoundationWallets = func() (result [insolar.GenesisAmountFoundationMembers]insolar.Reference) { for i, name := range insolar.GenesisNameFoundationWallets { result[i] = GenesisRef(name) } return }() // ContractNetworkIncentivesDeposits is the network incentives deposits contracts references. ContractNetworkIncentivesDeposits = func() (result [insolar.GenesisAmountNetworkIncentivesMembers]insolar.Reference) { for i, name := range insolar.GenesisNameNetworkIncentivesAccounts { result[i] = GenesisRef(name) } return }() // ContractApplicationIncentivesDeposits is the application incentives deposits contracts references. ContractApplicationIncentivesDeposits = func() (result [insolar.GenesisAmountApplicationIncentivesMembers]insolar.Reference) { for i, name := range insolar.GenesisNameApplicationIncentivesAccounts { result[i] = GenesisRef(name) } return }() // ContractFoundationDeposits is the foundation deposits contracts references. ContractFoundationDeposits = func() (result [insolar.GenesisAmountFoundationMembers]insolar.Reference) { for i, name := range insolar.GenesisNameFoundationAccounts { result[i] = GenesisRef(name) } return }() // ContractNetworkIncentivesAccounts is the network incentives accounts contracts references. ContractNetworkIncentivesAccounts = func() (result [insolar.GenesisAmountNetworkIncentivesMembers]insolar.Reference) { for i, name := range insolar.GenesisNameNetworkIncentivesAccounts { result[i] = GenesisRef(name) } return }() // ContractApplicationIncentivesAccounts is the application incentives accounts contracts references. ContractApplicationIncentivesAccounts = func() (result [insolar.GenesisAmountApplicationIncentivesMembers]insolar.Reference) { for i, name := range insolar.GenesisNameApplicationIncentivesAccounts { result[i] = GenesisRef(name) } return }() // ContractFoundationAccounts is the foundation accounts contracts references. ContractFoundationAccounts = func() (result [insolar.GenesisAmountFoundationMembers]insolar.Reference) { for i, name := range insolar.GenesisNameFoundationAccounts { result[i] = GenesisRef(name) } return }() )
View Source
var PredefinedPrototypes = map[string]insolar.Reference{ insolar.GenesisNameRootDomain + PrototypeSuffix: *GenerateProtoReferenceFromContractID(PrototypeType, insolar.GenesisNameRootDomain, 0), insolar.GenesisNameNodeDomain + PrototypeSuffix: *GenerateProtoReferenceFromContractID(PrototypeType, insolar.GenesisNameNodeDomain, 0), insolar.GenesisNameNodeRecord + PrototypeSuffix: *GenerateProtoReferenceFromContractID(PrototypeType, insolar.GenesisNameNodeRecord, 0), insolar.GenesisNameRootMember + PrototypeSuffix: *GenerateProtoReferenceFromContractID(PrototypeType, insolar.GenesisNameMember, 0), insolar.GenesisNameRootWallet + PrototypeSuffix: *GenerateProtoReferenceFromContractID(PrototypeType, insolar.GenesisNameWallet, 0), insolar.GenesisNameRootAccount + PrototypeSuffix: *GenerateProtoReferenceFromContractID(PrototypeType, insolar.GenesisNameAccount, 0), insolar.GenesisNameCostCenter + PrototypeSuffix: *GenerateProtoReferenceFromContractID(PrototypeType, insolar.GenesisNameCostCenter, 0), insolar.GenesisNameFeeMember + PrototypeSuffix: *GenerateProtoReferenceFromContractID(PrototypeType, insolar.GenesisNameMember, 0), insolar.GenesisNameFeeWallet + PrototypeSuffix: *GenerateProtoReferenceFromContractID(PrototypeType, insolar.GenesisNameWallet, 0), insolar.GenesisNameFeeAccount + PrototypeSuffix: *GenerateProtoReferenceFromContractID(PrototypeType, insolar.GenesisNameAccount, 0), insolar.GenesisNameEnterpriseMember + PrototypeSuffix: *GenerateProtoReferenceFromContractID(PrototypeType, insolar.GenesisNameMember, 0), insolar.GenesisNameEnterpriseWallet + PrototypeSuffix: *GenerateProtoReferenceFromContractID(PrototypeType, insolar.GenesisNameWallet, 0), insolar.GenesisNameEnterpriseAccount + PrototypeSuffix: *GenerateProtoReferenceFromContractID(PrototypeType, insolar.GenesisNameAccount, 0), insolar.GenesisNameDeposit + PrototypeSuffix: *GenerateProtoReferenceFromContractID(PrototypeType, insolar.GenesisNameDeposit, 0), insolar.GenesisNameMember + PrototypeSuffix: *GenerateProtoReferenceFromContractID(PrototypeType, insolar.GenesisNameMember, 0), insolar.GenesisNameMigrationAdminMember + PrototypeSuffix: *GenerateProtoReferenceFromContractID(PrototypeType, insolar.GenesisNameMember, 0), insolar.GenesisNameMigrationAdmin + PrototypeSuffix: *GenerateProtoReferenceFromContractID(PrototypeType, insolar.GenesisNameMigrationAdmin, 0), insolar.GenesisNameMigrationAdminWallet + PrototypeSuffix: *GenerateProtoReferenceFromContractID(PrototypeType, insolar.GenesisNameWallet, 0), insolar.GenesisNameMigrationAdminAccount + PrototypeSuffix: *GenerateProtoReferenceFromContractID(PrototypeType, insolar.GenesisNameAccount, 0), insolar.GenesisNameWallet + PrototypeSuffix: *GenerateProtoReferenceFromContractID(PrototypeType, insolar.GenesisNameWallet, 0), }
View Source
var RootDomain = &Record{ PCS: platformpolicy.NewPlatformCryptographyScheme(), }
RootDomain is the root domain instance.
Functions ¶
func ContractMigrationAddressNameShards ¶ added in v0.9.2
ContractMigrationAddressNameShards is the migration address shards contracts names.
func ContractMigrationAddressShards ¶
ContractMigrationAddressShards is the migration address shards contracts references.
func ContractPublicKeyNameShards ¶ added in v0.9.2
ContractPublicKeyNameShards is the public key shards contracts names.
func ContractPublicKeyShards ¶
ContractPublicKeyShards is the public key shards contracts references.
func GenerateCodeReferenceFromContractID ¶ added in v0.9.1
func GenerateCodeReferenceFromContractID(typeContractID string, name string, version int) *insolar.Reference
Generate contract reference from contract id.
func GenerateProtoReferenceFromCode ¶ added in v0.9.1
func GenerateProtoReferenceFromCode(pulse insolar.PulseNumber, code []byte) *insolar.Reference
Generate reference from hash code.
func GenerateProtoReferenceFromContractID ¶ added in v0.9.1
func GenerateProtoReferenceFromContractID(typeContractID string, name string, version int) *insolar.Reference
Generate prototype reference from contract id.
func GenesisRef ¶
GenesisRef returns reference to any genesis records.
Types ¶
Click to show internal directories.
Click to hide internal directories.