legacymigration

package
v1.0.0-legacy-migration Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

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

func SetInitialState

func SetInitialState(state kv.KVStore, admin isc.AgentID)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL