Documentation ¶
Index ¶
- Constants
- func CreateGenesisContractsConfig(ctx context.Context, configFile string) (map[string]interface{}, error)
- func GetAccountGenesisContractState(balance string, name string, parent string) genesis.ContractState
- func GetCostCenterGenesisContractState() genesis.ContractState
- func GetDepositGenesisContractState(amount string, vesting int64, vestingStep int64, ...) genesis.ContractState
- func GetFundPath(i int, prefix string) string
- func GetMemberGenesisContractState(publicKey string, name string, parent string, walletRef insolar.Reference) genesis.ContractState
- func GetMigrationAdminGenesisContractState(lockup int64, vesting int64, vestingStep int64, maShardCount int) genesis.ContractState
- func GetMigrationDaemonGenesisContractState(numberMigrationDaemon int) genesis.ContractState
- func GetMigrationDaemonPath(i int) string
- func GetMigrationShardGenesisContractState(name string, migrationAddresses []string) genesis.ContractState
- func GetPKShardGenesisContractState(name string, members foundation.StableMap) genesis.ContractState
- func GetPreWalletGenesisContractState(name string, parent string, accounts foundation.StableMap, ...) genesis.ContractState
- func GetWalletGenesisContractState(name string, parent string, accountRef insolar.Reference) genesis.ContractState
- func InitStates(genesisConfigPath string) ([]genesis.ContractState, error)
- type ContractsConfig
Constants ¶
View Source
const ( XNS = "XNS" MigrationDaemonUnholdDate = 1596456000 // 03.08.2020 12-00-00 MigrationDaemonVesting = 0 MigrationDaemonVestingStep = 0 NetworkIncentivesUnholdStartDate = 1583020800 // 01.03.2020 00-00-00 NetworkIncentivesVesting = 0 NetworkIncentivesVestingStep = 0 ApplicationIncentivesUnholdStartDate = 1609459200 // 01.01.2021 00-00-00 ApplicationIncentivesVesting = 0 ApplicationIncentivesVestingStep = 0 FoundationUnholdStartDate = 1609459200 // 01.01.2021 00-00-00 FoundationVestingPeriod = 0 FoundationVestingStep = 0 )
Variables ¶
This section is empty.
Functions ¶
func CreateGenesisContractsConfig ¶
func CreateGenesisContractsConfig(ctx context.Context, configFile string) (map[string]interface{}, error)
CreateGenesisContractsConfig generates bootstrap data.
1. read application-related keys files. 2. generates genesis contracts config for heavy node.
func GetAccountGenesisContractState ¶
func GetAccountGenesisContractState(balance string, name string, parent string) genesis.ContractState
func GetCostCenterGenesisContractState ¶
func GetCostCenterGenesisContractState() genesis.ContractState
func GetDepositGenesisContractState ¶
func GetDepositGenesisContractState( amount string, vesting int64, vestingStep int64, vestingType appfoundation.VestingType, pulseDepositUnHold insolar.PulseNumber, name string, parent string, ) genesis.ContractState
func GetFundPath ¶
GetFundPath generate key file name for composite name
func GetMigrationDaemonGenesisContractState ¶
func GetMigrationDaemonGenesisContractState(numberMigrationDaemon int) genesis.ContractState
func GetMigrationDaemonPath ¶
GetMigrationDaemonPath generate key file name for migration daemon
func GetMigrationShardGenesisContractState ¶
func GetMigrationShardGenesisContractState(name string, migrationAddresses []string) genesis.ContractState
func GetPKShardGenesisContractState ¶
func GetPKShardGenesisContractState(name string, members foundation.StableMap) genesis.ContractState
func GetPreWalletGenesisContractState ¶
func GetPreWalletGenesisContractState(name string, parent string, accounts foundation.StableMap, deposits foundation.StableMap) genesis.ContractState
func InitStates ¶
func InitStates(genesisConfigPath string) ([]genesis.ContractState, error)
Types ¶
type ContractsConfig ¶
type ContractsConfig struct { // MembersKeysDir is the root key place. MembersKeysDir string `mapstructure:"members_keys_dir" yaml:"members_keys_dir"` // RootBalance is a start balance for the root member's wallet. RootBalance string `mapstructure:"root_balance" yaml:"root_balance"` // MDBalance is a start balance for the migration admin member's wallet. MDBalance string `mapstructure:"md_balance" yaml:"md_balance"` // VestingPeriodInPulses - interval of count pulses for the full period of partial release. VestingPeriodInPulses int64 `mapstructure:"vesting_pulse_period" yaml:"vesting_pulse_period"` // VestingPeriodInPulses - interval of count pulses for one step of partial release. VestingStepInPulses int64 `mapstructure:"vesting_pulse_step" yaml:"vesting_pulse_step"` // LockupPeriodInPulses - interval of count pulses for the full period of hold. LockupPeriodInPulses int64 `mapstructure:"lockup_pulse_period" yaml:"lockup_pulse_period"` PKShardCount int `mapstructure:"pk_shard_count" yaml:"pk_shard_count"` MAShardCount int `mapstructure:"ma_shard_count" yaml:"ma_shard_count"` }
ContractsConfig contains configuration required for bootstrap application logic.
func ParseContractsConfig ¶
func ParseContractsConfig(path string) (*ContractsConfig, error)
ParseContractsConfig parse bootstrap contracts config.
Click to show internal directories.
Click to hide internal directories.