Documentation ¶
Index ¶
- Constants
- Variables
- func ContractMigrationAddressNameShards(maShardCount int) []string
- func ContractMigrationAddressShardRefs(maShardCount int)
- func ContractMigrationAddressShards(maShardCount int) []insolar.Reference
- func ContractPublicKeyNameShards(pkShardCount int) []string
- func ContractPublicKeyShardRefs(pkShardCount int)
- func ContractPublicKeyShards(pkShardCount int) []insolar.Reference
- func GetRootDomain() insolar.Reference
- func GetRootMember() insolar.Reference
- func InitAPIOptions() (api.Options, error)
- type GenesisContractsConfig
Constants ¶
View Source
const ( // GenesisNameRootDomain is the name of root domain contract for genesis record. GenesisNameRootDomain = "rootdomain" // GenesisNameMember is the name of member contract for genesis record. GenesisNameMember = "member" // GenesisNameWallet is the name of wallet contract for genesis record. GenesisNameWallet = "wallet" // GenesisNameAccount is the name of wallet contract for genesis record. GenesisNameAccount = "account" // GenesisNameDeposit is the name of deposit contract for genesis record. GenesisNameDeposit = "deposit" // GenesisNameCostCenter is the name of cost center contract for genesis record. GenesisNameCostCenter = "costcenter" // GenesisNameMigrationAdmin is the name of migration admin contract for genesis record. GenesisNameMigrationAdmin = "migrationadmin" // GenesisNameMigrationAdmin is the name of migration daemon contract,which is associated with MigrationDaemonMember for genesis record. GenesisNameMigrationDaemon = "migrationdaemon" // GenesisNamePKShard is the name of public key shard contract for genesis record. GenesisNamePKShard = "pkshard" // GenesisNameMigrationShard is the name of migration address shard contract for genesis record. GenesisNameMigrationShard = "migrationshard" GenesisNameRootMember = "root" + GenesisNameMember GenesisNameRootWallet = "root" + GenesisNameWallet GenesisNameRootAccount = "root" + GenesisNameAccount GenesisNameMigrationAdminMember = "migration" + GenesisNameMember GenesisNameMigrationAdminWallet = "migration" + GenesisNameWallet GenesisNameMigrationAdminAccount = "migration" + GenesisNameAccount GenesisNameMigrationAdminDeposit = "migration" + GenesisNameDeposit GenesisNameFeeMember = "fee" + GenesisNameMember GenesisNameFeeWallet = "fee" + GenesisNameWallet GenesisNameFeeAccount = "fee" + GenesisNameAccount GenesisAmountMigrationDaemonMembers = 10 GenesisAmountActiveMigrationDaemonMembers = 2 GenesisAmountEnterpriseMembers = 1 GenesisAmountNetworkIncentivesMembers = 20 GenesisAmountApplicationIncentivesMembers = 20 GenesisAmountFoundationMembers = 20 EnterpriseDistributionAmount = "2000000000000000000" FoundationDistributionAmount = "50000000000000000" AppIncentivesDistributionAmount = "50000000000000000" NetworkIncentivesDistributionAmount = "50000000000000000" )
View Source
const (
FundsDepositName = "genesis_deposit"
)
Variables ¶
View Source
var ( // ContractRootDomain is the root domain contract reference. ContractRootDomain = genesisrefs.GenesisRef(GenesisNameRootDomain) // ContractRootMember is the root member contract reference. ContractRootMember = genesisrefs.GenesisRef(GenesisNameRootMember) // ContractRootWallet is the root wallet contract reference. ContractRootWallet = genesisrefs.GenesisRef(GenesisNameRootWallet) // ContractRootAccount is the root account contract reference. ContractRootAccount = genesisrefs.GenesisRef(GenesisNameRootAccount) // ContractMigrationAdminMember is the migration admin member contract reference. ContractMigrationAdminMember = genesisrefs.GenesisRef(GenesisNameMigrationAdminMember) // ContractMigrationAdmin is the migration wallet contract reference. ContractMigrationAdmin = genesisrefs.GenesisRef(GenesisNameMigrationAdmin) // ContractMigrationWallet is the migration wallet contract reference. ContractMigrationWallet = genesisrefs.GenesisRef(GenesisNameMigrationAdminWallet) // ContractMigrationAccount is the migration account contract reference. ContractMigrationAccount = genesisrefs.GenesisRef(GenesisNameMigrationAdminAccount) // ContractMigrationDeposit is the migration deposit contract reference. ContractMigrationDeposit = genesisrefs.GenesisRef(GenesisNameMigrationAdminDeposit) // ContractDeposit is the deposit contract reference. ContractDeposit = genesisrefs.GenesisRef(GenesisNameDeposit) // ContractCostCenter is the cost center contract reference. ContractCostCenter = genesisrefs.GenesisRef(GenesisNameCostCenter) // ContractFeeMember is the fee member contract reference. ContractFeeMember = genesisrefs.GenesisRef(GenesisNameFeeMember) // ContractFeeWallet is the fee wallet contract reference. ContractFeeWallet = genesisrefs.GenesisRef(GenesisNameFeeWallet) // ContractFeeAccount is the fee account contract reference. ContractFeeAccount = genesisrefs.GenesisRef(GenesisNameFeeAccount) // ContractMigrationDaemonMembers is the migration daemon members contracts references. ContractMigrationDaemonMembers = func() (result [GenesisAmountMigrationDaemonMembers]insolar.Reference) { for i, name := range GenesisNameMigrationDaemonMembers { result[i] = genesisrefs.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 < GenesisAmountMigrationDaemonMembers; i++ { result[genesisrefs.GenesisRef(GenesisNameMigrationDaemonMembers[i])] = genesisrefs.GenesisRef(GenesisNameMigrationDaemons[i]) } return }() // ContractNetworkIncentivesMembers is the network incentives members contracts references. ContractNetworkIncentivesMembers = func() (result [GenesisAmountNetworkIncentivesMembers]insolar.Reference) { for i, name := range GenesisNameNetworkIncentivesMembers { result[i] = genesisrefs.GenesisRef(name) } return }() // ContractApplicationIncentivesMembers is the application incentives members contracts references. ContractApplicationIncentivesMembers = func() (result [GenesisAmountApplicationIncentivesMembers]insolar.Reference) { for i, name := range GenesisNameApplicationIncentivesMembers { result[i] = genesisrefs.GenesisRef(name) } return }() // ContractFoundationMembers is the foundation members contracts references. ContractFoundationMembers = func() (result [GenesisAmountFoundationMembers]insolar.Reference) { for i, name := range GenesisNameFoundationMembers { result[i] = genesisrefs.GenesisRef(name) } return }() // ContractEnterpriseMembers is the enterprise members contracts references. ContractEnterpriseMembers = func() (result [GenesisAmountEnterpriseMembers]insolar.Reference) { for i, name := range GenesisNameEnterpriseMembers { result[i] = genesisrefs.GenesisRef(name) } return }() // ContractNetworkIncentivesWallets is the network incentives members contracts references. ContractNetworkIncentivesWallets = func() (result [GenesisAmountNetworkIncentivesMembers]insolar.Reference) { for i, name := range GenesisNameNetworkIncentivesWallets { result[i] = genesisrefs.GenesisRef(name) } return }() // ContractApplicationIncentivesWallets is the application incentives members contracts references. ContractApplicationIncentivesWallets = func() (result [GenesisAmountApplicationIncentivesMembers]insolar.Reference) { for i, name := range GenesisNameApplicationIncentivesWallets { result[i] = genesisrefs.GenesisRef(name) } return }() // ContractFoundationWallets is the foundation members contracts references. ContractFoundationWallets = func() (result [GenesisAmountFoundationMembers]insolar.Reference) { for i, name := range GenesisNameFoundationWallets { result[i] = genesisrefs.GenesisRef(name) } return }() // ContractEnterpriseWallets is the enterprise members contracts references. ContractEnterpriseWallets = func() (result [GenesisAmountEnterpriseMembers]insolar.Reference) { for i, name := range GenesisNameEnterpriseWallets { result[i] = genesisrefs.GenesisRef(name) } return }() // ContractNetworkIncentivesDeposits is the network incentives deposits contracts references. ContractNetworkIncentivesDeposits = func() (result [GenesisAmountNetworkIncentivesMembers]insolar.Reference) { for i, name := range GenesisNameNetworkIncentivesDeposits { result[i] = genesisrefs.GenesisRef(name) } return }() // ContractApplicationIncentivesDeposits is the application incentives deposits contracts references. ContractApplicationIncentivesDeposits = func() (result [GenesisAmountApplicationIncentivesMembers]insolar.Reference) { for i, name := range GenesisNameApplicationIncentivesDeposits { result[i] = genesisrefs.GenesisRef(name) } return }() // ContractFoundationDeposits is the foundation deposits contracts references. ContractFoundationDeposits = func() (result [GenesisAmountFoundationMembers]insolar.Reference) { for i, name := range GenesisNameFoundationDeposits { result[i] = genesisrefs.GenesisRef(name) } return }() // ContractNetworkIncentivesAccounts is the network incentives accounts contracts references. ContractNetworkIncentivesAccounts = func() (result [GenesisAmountNetworkIncentivesMembers]insolar.Reference) { for i, name := range GenesisNameNetworkIncentivesAccounts { result[i] = genesisrefs.GenesisRef(name) } return }() // ContractApplicationIncentivesAccounts is the application incentives accounts contracts references. ContractApplicationIncentivesAccounts = func() (result [GenesisAmountApplicationIncentivesMembers]insolar.Reference) { for i, name := range GenesisNameApplicationIncentivesAccounts { result[i] = genesisrefs.GenesisRef(name) } return }() // ContractFoundationAccounts is the foundation accounts contracts references. ContractFoundationAccounts = func() (result [GenesisAmountFoundationMembers]insolar.Reference) { for i, name := range GenesisNameFoundationAccounts { result[i] = genesisrefs.GenesisRef(name) } return }() // ContractEnterpriseAccounts is the enterprise accounts contracts references. ContractEnterpriseAccounts = func() (result [GenesisAmountFoundationMembers]insolar.Reference) { for i, name := range GenesisNameEnterpriseAccounts { result[i] = genesisrefs.GenesisRef(name) } return }() )
View Source
var GenesisNameApplicationIncentivesAccounts = func() (result [GenesisAmountApplicationIncentivesMembers]string) { for i := 0; i < GenesisAmountApplicationIncentivesMembers; i++ { result[i] = "application_incentives_" + strconv.Itoa(i) + "_" + GenesisNameAccount } return }()
View Source
var GenesisNameApplicationIncentivesDeposits = func() (result [GenesisAmountApplicationIncentivesMembers]string) { for i := 0; i < GenesisAmountApplicationIncentivesMembers; i++ { result[i] = "application_incentives_" + strconv.Itoa(i) + "_" + GenesisNameDeposit } return }()
View Source
var GenesisNameApplicationIncentivesMembers = func() (result [GenesisAmountApplicationIncentivesMembers]string) { for i := 0; i < GenesisAmountApplicationIncentivesMembers; i++ { result[i] = "application_incentives_" + strconv.Itoa(i) + "_" + GenesisNameMember } return }()
View Source
var GenesisNameApplicationIncentivesWallets = func() (result [GenesisAmountApplicationIncentivesMembers]string) { for i := 0; i < GenesisAmountApplicationIncentivesMembers; i++ { result[i] = "application_incentives_" + strconv.Itoa(i) + "_" + GenesisNameWallet } return }()
View Source
var GenesisNameEnterpriseAccounts = func() (result [GenesisAmountEnterpriseMembers]string) { for i := 0; i < GenesisAmountEnterpriseMembers; i++ { result[i] = "enterprise_" + strconv.Itoa(i) + "_" + GenesisNameAccount } return }()
View Source
var GenesisNameEnterpriseMembers = func() (result [GenesisAmountEnterpriseMembers]string) { for i := 0; i < GenesisAmountEnterpriseMembers; i++ { result[i] = "enterprise_" + strconv.Itoa(i) + "_" + GenesisNameMember } return }()
View Source
var GenesisNameEnterpriseWallets = func() (result [GenesisAmountEnterpriseMembers]string) { for i := 0; i < GenesisAmountEnterpriseMembers; i++ { result[i] = "enterprise_" + strconv.Itoa(i) + "_" + GenesisNameWallet } return }()
View Source
var GenesisNameFoundationAccounts = func() (result [GenesisAmountFoundationMembers]string) { for i := 0; i < GenesisAmountFoundationMembers; i++ { result[i] = "foundation_" + strconv.Itoa(i) + "_" + GenesisNameAccount } return }()
View Source
var GenesisNameFoundationDeposits = func() (result [GenesisAmountFoundationMembers]string) { for i := 0; i < GenesisAmountFoundationMembers; i++ { result[i] = "foundation_" + strconv.Itoa(i) + "_" + GenesisNameDeposit } return }()
View Source
var GenesisNameFoundationMembers = func() (result [GenesisAmountFoundationMembers]string) { for i := 0; i < GenesisAmountFoundationMembers; i++ { result[i] = "foundation_" + strconv.Itoa(i) + "_" + GenesisNameMember } return }()
View Source
var GenesisNameFoundationWallets = func() (result [GenesisAmountFoundationMembers]string) { for i := 0; i < GenesisAmountFoundationMembers; i++ { result[i] = "foundation_" + strconv.Itoa(i) + "_" + GenesisNameWallet } return }()
View Source
var GenesisNameMigrationDaemonMembers = func() (result [GenesisAmountMigrationDaemonMembers]string) { for i := 0; i < GenesisAmountMigrationDaemonMembers; i++ { result[i] = "migration_daemon_" + strconv.Itoa(i) + "_" + GenesisNameMember } return }()
View Source
var GenesisNameMigrationDaemons = func() (result [GenesisAmountMigrationDaemonMembers]string) { for i := 0; i < GenesisAmountMigrationDaemonMembers; i++ { result[i] = GenesisNameMigrationDaemon + "_" + strconv.Itoa(i) } return }()
View Source
var GenesisNameNetworkIncentivesAccounts = func() (result [GenesisAmountNetworkIncentivesMembers]string) { for i := 0; i < GenesisAmountNetworkIncentivesMembers; i++ { result[i] = "network_incentives_" + strconv.Itoa(i) + "_" + GenesisNameAccount } return }()
View Source
var GenesisNameNetworkIncentivesDeposits = func() (result [GenesisAmountNetworkIncentivesMembers]string) { for i := 0; i < GenesisAmountNetworkIncentivesMembers; i++ { result[i] = "network_incentives_" + strconv.Itoa(i) + "_" + GenesisNameDeposit } return }()
View Source
var GenesisNameNetworkIncentivesMembers = func() (result [GenesisAmountNetworkIncentivesMembers]string) { for i := 0; i < GenesisAmountNetworkIncentivesMembers; i++ { result[i] = "network_incentives_" + strconv.Itoa(i) + "_" + GenesisNameMember } return }()
View Source
var GenesisNameNetworkIncentivesWallets = func() (result [GenesisAmountNetworkIncentivesMembers]string) { for i := 0; i < GenesisAmountNetworkIncentivesMembers; i++ { result[i] = "network_incentives_" + strconv.Itoa(i) + "_" + GenesisNameWallet } return }()
Functions ¶
func ContractMigrationAddressNameShards ¶
ContractMigrationAddressNameShards is the migration address shards contracts names.
func ContractMigrationAddressShardRefs ¶
func ContractMigrationAddressShardRefs(maShardCount int)
func ContractMigrationAddressShards ¶
ContractMigrationAddressShards is the migration address shards contracts references.
func ContractPublicKeyNameShards ¶
ContractPublicKeyNameShards is the public key shards contracts names.
func ContractPublicKeyShardRefs ¶
func ContractPublicKeyShardRefs(pkShardCount int)
func ContractPublicKeyShards ¶
ContractPublicKeyShards is the public key shards contracts references.
func InitAPIOptions ¶
initAPIOptions creates options object, that contains application-specific settings for api component.
Types ¶
type GenesisContractsConfig ¶
type GenesisContractsConfig struct { // RootBalance is a balance of Root Member. RootBalance string // MDBalance is a balance of Migration Daemon. MDBalance string // RootPublicKey is public key of Root Member. RootPublicKey string // FeePublicKey is public key of Fee Member. FeePublicKey string // MigrationAdminPublicKey is public key of Migration Admin. MigrationAdminPublicKey string // MigrationDaemonPublicKeys is a public keys array of Migration Daemon members. MigrationDaemonPublicKeys []string // VestingPeriodInPulses is a vesting period measured with pulses. VestingPeriodInPulses int64 // LockupPeriodInPulses is a lockup period before vesting measured with pulses. LockupPeriodInPulses int64 // VestingStepInPulses is a one vesting step measured with pulses. VestingStepInPulses int64 // MigrationAddresses are migration addresses array per shard where index array is a shard index. MigrationAddresses [][]string // FundsPublicKeys is a public keys array of Funds members. FundsPublicKeys []string // EnterprisePublicKeys is a public keys array of Enterprise members. EnterprisePublicKeys []string // NetworkIncentivesPublicKeys is a public keys array of Network Incentives members. NetworkIncentivesPublicKeys []string // ApplicationIncentivesPublicKeys is a public keys array of Application Incentives members. ApplicationIncentivesPublicKeys []string // FoundationPublicKeys is a public keys array of Foundation members. FoundationPublicKeys []string // PKShardCount is a primary keys shards count. PKShardCount int // MAShardCount is a migration addresses shards count. MAShardCount int }
GenesisContractsConfig carries data required for contract object initialization via genesis.
Click to show internal directories.
Click to hide internal directories.