iotex-core: github.com/iotexproject/iotex-core/action/protocol/account Index | Files | Directories

package account

import "github.com/iotexproject/iotex-core/action/protocol/account"

Index

Package Files

protocol.go transfer.go

Constants

const ProtocolID = "account"

ProtocolID is the protocol ID TODO: it works only for one instance per protocol definition now

const TransferSizeLimit = 32 * 1024

TransferSizeLimit is the maximum size of transfer allowed

type Protocol Uses

type Protocol struct {
    // contains filtered or unexported fields
}

Protocol defines the protocol of handling account

func NewProtocol Uses

func NewProtocol(hu config.HeightUpgrade) *Protocol

NewProtocol instantiates the protocol of account

func (*Protocol) Handle Uses

func (p *Protocol) Handle(ctx context.Context, act action.Action, sm protocol.StateManager) (*action.Receipt, error)

Handle handles an account

func (*Protocol) Initialize Uses

func (p *Protocol) Initialize(
    ctx context.Context,
    sm protocol.StateManager,
    addrs []address.Address,
    amounts []*big.Int,
) error

Initialize initializes the protocol by setting the initial balances to some addresses

func (*Protocol) ReadState Uses

func (p *Protocol) ReadState(context.Context, protocol.StateManager, []byte, ...[]byte) ([]byte, error)

ReadState read the state on blockchain via protocol

func (*Protocol) Validate Uses

func (p *Protocol) Validate(ctx context.Context, act action.Action) error

Validate validates an account

Directories

PathSynopsis
accountpb
util

Package account imports 14 packages (graph) and is imported by 2 packages. Updated 2019-08-24. Refresh now. Tools for package owners.