Documentation ¶
Index ¶
- Variables
- type Actor
- type CallContext
- type Contract
- type ContractState
- type State
- func (s *State) ActorCall(ctx context.Context, addr types.Address, ...) error
- func (s *State) ActorExec(ctx context.Context, tx *types.Transaction) (*types.Receipt, error)
- func (s *State) ApplyTransactions(ctx context.Context, txs []*types.Transaction) error
- func (s *State) Copy() *State
- func (s *State) Flush(ctx context.Context) (*cid.Cid, error)
- func (s *State) GetActor(ctx context.Context, a types.Address) (*Actor, error)
- func (s *State) GetContract(ctx context.Context, codeHash *cid.Cid) (Contract, error)
- func (s *State) LoadContractState(ctx context.Context, mem *cid.Cid) (*ContractState, error)
- func (s *State) NewContractState() *ContractState
- func (s *State) NonceForActor(ctx context.Context, addr types.Address) (uint64, error)
- func (s *State) SetActor(ctx context.Context, a types.Address, act *Actor) error
- type ToychainTokenContract
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMethodNotFound = fmt.Errorf("unrecognized method")
View Source
var ToychainContractAddr = types.Address("toychain")
View Source
var ToychainContractCid = identCid("toychain")
Functions ¶
This section is empty.
Types ¶
type CallContext ¶
type CallContext struct { Ctx context.Context From types.Address FromNonce uint64 State *State ContractState *ContractState Address types.Address }
CallContext is information accessible to the contract during a given invocation
type Contract ¶
type Contract interface {
Call(ctx *CallContext, method string, args []interface{}) (interface{}, error)
}
type ContractState ¶
type ContractState struct {
// contains filtered or unexported fields
}
func (*ContractState) Node ¶
func (cs *ContractState) Node() *hamt.Node
type State ¶
type State struct {
// contains filtered or unexported fields
}
func (*State) ApplyTransactions ¶
func (*State) GetContract ¶
Actually, this probably should take a cid, not an address
func (*State) LoadContractState ¶
func (*State) NewContractState ¶
func (s *State) NewContractState() *ContractState
func (*State) NonceForActor ¶
type ToychainTokenContract ¶
type ToychainTokenContract struct{}
func (*ToychainTokenContract) Call ¶
func (ftc *ToychainTokenContract) Call(ctx *CallContext, method string, args []interface{}) (interface{}, error)
Click to show internal directories.
Click to hide internal directories.