iotex-core: Index | Files | Directories

package account

import ""


Package Files

protocol.go transfer.go


const TransferSizeLimit = 32 * 1024

TransferSizeLimit is the maximum size of transfer allowed

type DepositGas Uses

type DepositGas func(ctx context.Context, sm protocol.StateManager, amount *big.Int) (*action.TransactionLog, error)

DepositGas deposits gas to some pool

type Protocol Uses

type Protocol struct {
    // contains filtered or unexported fields

Protocol defines the protocol of handling account

func FindProtocol Uses

func FindProtocol(registry *protocol.Registry) *Protocol

FindProtocol finds the registered protocol from registry

func NewProtocol Uses

func NewProtocol(depositGas DepositGas) *Protocol

NewProtocol instantiates the protocol of account

func (*Protocol) CreateGenesisStates Uses

func (p *Protocol) CreateGenesisStates(ctx context.Context, sm protocol.StateManager) error

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

func (*Protocol) ForceRegister Uses

func (p *Protocol) ForceRegister(r *protocol.Registry) error

ForceRegister registers the protocol with a unique ID and force replacing the previous protocol if it exists

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) Name Uses

func (p *Protocol) Name() string

Name returns the name of protocol

func (*Protocol) ReadState Uses

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

ReadState read the state on blockchain via protocol

func (*Protocol) Register Uses

func (p *Protocol) Register(r *protocol.Registry) error

Register registers the protocol with a unique ID

func (*Protocol) Validate Uses

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

Validate validates an account action



Package account imports 13 packages (graph) and is imported by 1 packages. Updated 2020-09-18. Refresh now. Tools for package owners.