Documentation ¶
Index ¶
- Constants
- type Protocol
- func (p *Protocol) Handle(ctx context.Context, act action.Action, sm protocol.StateManager) (*action.Receipt, error)
- func (p *Protocol) Initialize(ctx context.Context, sm protocol.StateManager, addrs []address.Address, ...) error
- func (p *Protocol) ReadState(context.Context, protocol.StateManager, []byte, ...[]byte) ([]byte, error)
- func (p *Protocol) Validate(ctx context.Context, act action.Action) error
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 (*Protocol) Handle ¶
func (p *Protocol) Handle(ctx context.Context, act action.Action, sm protocol.StateManager) (*action.Receipt, error)
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
Click to show internal directories.
Click to hide internal directories.