Documentation ¶
Overview ¶
Copyright 2020 IOTA Stiftung SPDX-License-Identifier: Apache-2.0
Copyright 2020 IOTA Stiftung SPDX-License-Identifier: Apache-2.0
Copyright 2020 IOTA Stiftung SPDX-License-Identifier: Apache-2.0
Index ¶
Constants ¶
View Source
const ( ParamNextAdminAgentID = "x" ParamLegacyAddress = "a" ParamWithdrawAddress = "targetAddress" ParamBundle = "b" ParamTotalMigrationAmount = "total" ParamBalance = "balance" )
Variables ¶
View Source
var ( ViewMigratableBalance = coreutil.ViewFunc("getMigratableBalance") ViewTotalBalance = coreutil.ViewFunc("getTotalBalance") )
Views
View Source
var ( FuncMigrate = coreutil.Func("migrate") FuncBurn = coreutil.Func("burn") FuncSetNextAdmin = coreutil.Func("setNextAdmin") FuncClaimAdmin = coreutil.Func("claimAdmin") )
Funcs
View Source
var Contract = coreutil.NewContract(contractName)
View Source
var Processor = Contract.Processor(nil, ViewMigratableBalance.WithHandler(viewMigratableBalance), ViewTotalBalance.WithHandler(viewTotalBalance), FuncMigrate.WithHandler(migrate), FuncBurn.WithHandler(burn), FuncSetNextAdmin.WithHandler(setNextAdmin), FuncClaimAdmin.WithHandler(claimAdmin), )
Functions ¶
Types ¶
type StateAccess ¶
type StateAccess struct {
// contains filtered or unexported fields
}
func NewStateAccess ¶
func NewStateAccess(store kv.KVStoreReader) *StateAccess
func (*StateAccess) Admin ¶
func (sa *StateAccess) Admin() isc.AgentID
func (*StateAccess) IsMigrationChain ¶
func (sa *StateAccess) IsMigrationChain() bool
func (*StateAccess) MigratableBalance ¶
func (sa *StateAccess) MigratableBalance(legacyAddr []byte) uint64
func (*StateAccess) NextAdmin ¶
func (sa *StateAccess) NextAdmin() isc.AgentID
func (*StateAccess) ValidMigrationRequest ¶
func (sa *StateAccess) ValidMigrationRequest(req isc.Request) bool
Click to show internal directories.
Click to hide internal directories.