account

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2019 License: Apache-2.0 Imports: 14 Imported by: 4

Documentation

Index

Constants

View Source
const ProtocolID = "account"

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

View Source
const TransferSizeLimit = 32 * 1024

TransferSizeLimit is the maximum size of transfer allowed

Variables

This section is empty.

Functions

This section is empty.

Types

type Protocol

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

Protocol defines the protocol of handling account

func NewProtocol

func NewProtocol(hu config.HeightUpgrade) *Protocol

NewProtocol instantiates the protocol of account

func (*Protocol) Handle

Handle handles an account

func (*Protocol) Initialize added in v0.5.0

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 added in v0.5.0

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

ReadState read the state on blockchain via protocol

func (*Protocol) Validate

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

Validate validates an account

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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