Versions in this module Expand all Collapse all v1 v1.0.0 Apr 12, 2019 Changes in this version + var ChangeIssuingYear = uint64(10) + var CommitVerifierRewardWeight = 4 + var DIPProportion AddressDIPProportion + var DevelopProportion = int64(20) + var DeveloperAddresses = make([]common.Address, 0) + var DeveloperDIP = big.NewInt(0).Div(big.NewInt(0).Mul(PreMineMineDIP, big.NewInt(DevelopProportion)), ...) + var DeveloperUnlockInfo = map[int]int64 + var EarlyTokenAddresses = make([]common.Address, 0) + var EarlyTokenAmount = big.NewInt(1340280000) + var EarlyTokenDIP = big.NewInt(0).Div(big.NewInt(0).Mul(PreMineRewardDIP, big.NewInt(EarlyTokenReward)), ...) + var EarlyTokenExchangeBase = int64(10000) + var EarlyTokenPeriod = uint64(5) + var EarlyTokenReward = int64(50) + var ErrAddress = errors.New("the address isn't investor or developer") + var ErrAddressExist = errors.New("address exist") + var ErrBlockNumberIs0 = errors.New("the blockNumber is 0") + var ErrBlockNumberIs0Ore1 = errors.New("the block number is 0 or 1") + var ErrLockTypeError = errors.New("the lockType error") + var GenerateBlockDuration = 8 + var HeightAfterOneYear = uint64(365 * 24 * 3600 / GenerateBlockDuration) + var HeightAfterTenYear = 10 * HeightAfterOneYear + var InitExchangeRate int64 + var InvestorAddresses = make([]common.Address, 0) + var InvestorDIP = big.NewInt(0).Div(big.NewInt(0).Mul(PreMineMineDIP, big.NewInt(InvestorProportion)), ...) + var InvestorProportion = int64(60) + var InvestorUnlockInfo = map[int]int64 + var IssuingRate = 3 + var MainVerifierRewardWeight = 2 + var MaintenanceAddresses = make([]common.Address, 0) + var MaintenanceDIP = big.NewInt(0).Div(big.NewInt(0).Mul(PreMineMineDIP, big.NewInt(MaintenanceProportion)), ...) + var MaintenanceProportion = int64(20) + var MercuryDIPProportion = AddressDIPProportion + var MineMasterRewardProportion = int64(87) + var MiniPledgeValue = big.NewInt(1000 * consts.DIP) + var NoCommitVerifierRewardWeight = 1 + var NotMercuryDIPProportion = AddressDIPProportion + var PreMineDIP = big.NewInt(525600000 * consts.DIP) + var PreMineMineDIP = big.NewInt(438000000 * consts.DIP) + var PreMineRewardDIP = big.NewInt(87600000 * consts.DIP) + var RemainOtherReward = int64(50) + var RemainRewardAddresses = make([]common.Address, 0) + var RemainRewardDIP = big.NewInt(0).Div(big.NewInt(0).Mul(PreMineRewardDIP, big.NewInt(RemainOtherReward)), ...) + var TotalReWardDIPOneBlock = big.NewInt(20 * consts.DIP) + var UnlockTimeOneYear = uint64(4) + var VerifierRewardProportion = int64(13) + func CalcDIPTotalCirculation(year uint64) (value *big.Int) + func GetMinimumTxFee(txSize common.StorageSize) *big.Int + func MapMerge(des, src map[common.Address]*big.Int) error + type AddressDIPProportion struct + BaseNumber int64 + DeveloperProportion map[string]int + EarlyTokenProportion map[string]int + InvestorProportion map[string]int + MaintenanceProportion map[string]int + ReMainRewardProportion map[string]int + type DipperinEconomyModel struct + Service EconomyNeedService + func MakeDipperinEconomyModel(service EconomyNeedService, proportion AddressDIPProportion) *DipperinEconomyModel + func (economyModel *DipperinEconomyModel) CheckAddressType(address common.Address) EconomyModelAddress + func (economyModel *DipperinEconomyModel) GetAddressLockMoney(address common.Address, blockNumber uint64) (*big.Int, error) + func (economyModel *DipperinEconomyModel) GetBlockYear(blockNumber uint64) (uint64, error) + func (economyModel *DipperinEconomyModel) GetDeveloperInitBalance() map[common.Address]*big.Int + func (economyModel *DipperinEconomyModel) GetDeveloperLockDIP(address common.Address, blockNumber uint64) (*big.Int, error) + func (economyModel *DipperinEconomyModel) GetDiffVerifierAddress(preBlock, block model.AbstractBlock) (map[VerifierType][]common.Address, error) + func (economyModel *DipperinEconomyModel) GetFoundation() Foundation + func (economyModel *DipperinEconomyModel) GetInvestorInitBalance() map[common.Address]*big.Int + func (economyModel *DipperinEconomyModel) GetInvestorLockDIP(address common.Address, blockNumber uint64) (*big.Int, error) + func (economyModel *DipperinEconomyModel) GetMineMasterDIPReward(block model.AbstractBlock) (*big.Int, error) + func (economyModel *DipperinEconomyModel) GetOneBlockTotalDIPReward(blockNumber uint64) (*big.Int, error) + func (economyModel *DipperinEconomyModel) GetVerifierDIPReward(block model.AbstractBlock) (map[VerifierType]*big.Int, error) + type DipperinFoundation struct + func MakeDipperinFoundation(proportion AddressDIPProportion) *DipperinFoundation + func (foundation *DipperinFoundation) GetAddressType(address common.Address) FoundationAddressType + func (foundation *DipperinFoundation) GetEarlyTokenLockDIP(address common.Address, blockNumber uint64) (*big.Int, error) + func (foundation *DipperinFoundation) GetFoundationInfo(usage FoundationDIPUsage) map[common.Address]*big.Int + func (foundation *DipperinFoundation) GetMaintenanceLockDIP(address common.Address, blockNumber uint64) (*big.Int, error) + func (foundation *DipperinFoundation) GetMineMasterEDIPReward(DIPReward *big.Int, blockNumber uint64, tokenDecimals int) (*big.Int, error) + func (foundation *DipperinFoundation) GetReMainRewardLockDIP(address common.Address, blockNumber uint64) (*big.Int, error) + func (foundation *DipperinFoundation) GetVerifierEDIPReward(DIPReward map[VerifierType]*big.Int, blockNumber uint64, tokenDecimals int) (map[VerifierType]*big.Int, error) + type EconomyModel interface + CheckAddressType func(address common.Address) EconomyModelAddress + GetAddressLockMoney func(address common.Address, blockNumber uint64) (*big.Int, error) + GetBlockYear func(blockNumber uint64) (uint64, error) + GetDeveloperInitBalance func() map[common.Address]*big.Int + GetDeveloperLockDIP func(address common.Address, blockNumber uint64) (*big.Int, error) + GetDiffVerifierAddress func(preBlock, block model.AbstractBlock) (map[VerifierType][]common.Address, error) + GetFoundation func() Foundation + GetInvestorInitBalance func() map[common.Address]*big.Int + GetInvestorLockDIP func(address common.Address, blockNumber uint64) (*big.Int, error) + GetMineMasterDIPReward func(block model.AbstractBlock) (*big.Int, error) + GetOneBlockTotalDIPReward func(blockNumber uint64) (*big.Int, error) + GetVerifierDIPReward func(block model.AbstractBlock) (map[VerifierType]*big.Int, error) + type EconomyModelAddress int + const DeveloperAddress + const InvestorAddress + const NotEconomyModelAddress + type EconomyNeedService interface + GetSlot func(block model.AbstractBlock) *uint64 + GetVerifiers func(slotNum uint64) (addresses []common.Address) + type Foundation interface + GetAddressType func(address common.Address) FoundationAddressType + GetEarlyTokenLockDIP func(address common.Address, blockNumber uint64) (*big.Int, error) + GetFoundationInfo func(usage FoundationDIPUsage) map[common.Address]*big.Int + GetMaintenanceLockDIP func(address common.Address, blockNumber uint64) (*big.Int, error) + GetMineMasterEDIPReward func(DIPReward *big.Int, blockNumber uint64, tokenDecimals int) (*big.Int, error) + GetReMainRewardLockDIP func(address common.Address, blockNumber uint64) (*big.Int, error) + GetVerifierEDIPReward func(DIPReward map[VerifierType]*big.Int, blockNumber uint64, tokenDecimals int) (map[VerifierType]*big.Int, error) + type FoundationAddressType int + const EarlyTokenAddress + const MaintenanceAddress + const NotFoundationAddress + const RemainRewardAddress + type FoundationDIPUsage int + const EarlyToken + const Maintenance + const RemainReward + type PreMineMainType int + const Developer + const Investor + type VerifierType uint + const CommitVerifier + const MasterVerifier + const NotCommitVerifier