Documentation ¶
Index ¶
- func FormatMapKey(prefix, key []byte) []byte
- type CallContext
- type CallContextImpl
- type DeployContextImpl
- type Env
- type EnvImp
- func (e *EnvImp) Balance(address common.Address) *big.Int
- func (e *EnvImp) BlockNumber() uint64
- func (e *EnvImp) BlockSeed() []byte
- func (e *EnvImp) BlockTimeStamp() int64
- func (e *EnvImp) BurnAll(ctx CallContext)
- func (e *EnvImp) Commit() []*types.TxEvent
- func (e *EnvImp) ContractStake(contract common.Address) *big.Int
- func (e *EnvImp) Delegatee(addr common.Address) *common.Address
- func (e *EnvImp) Deploy(ctx CallContext)
- func (e *EnvImp) Epoch() uint16
- func (e *EnvImp) Event(name string, args ...[]byte)
- func (e *EnvImp) GetValue(ctx CallContext, key []byte) []byte
- func (e *EnvImp) Iterate(ctx CallContext, minKey []byte, maxKey []byte, ...)
- func (e *EnvImp) MinFeePerGas() *big.Int
- func (e *EnvImp) MoveToStake(ctx CallContext, amount *big.Int) error
- func (e *EnvImp) NetworkSize() int
- func (e *EnvImp) PubKey(addr common.Address) []byte
- func (e *EnvImp) ReadContractData(contractAddr common.Address, key []byte) []byte
- func (e *EnvImp) RemoveValue(ctx CallContext, key []byte)
- func (e *EnvImp) Reset()
- func (e *EnvImp) Send(ctx CallContext, dest common.Address, amount *big.Int) error
- func (e *EnvImp) SetValue(ctx CallContext, key []byte, value []byte)
- func (e *EnvImp) State(sender common.Address) state.IdentityState
- func (e *EnvImp) Terminate(ctx CallContext, dest common.Address)
- type GasCounter
- type Map
- type ReadContextImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatMapKey ¶ added in v0.24.3
Types ¶
type CallContext ¶
type CallContextImpl ¶
type CallContextImpl struct {
// contains filtered or unexported fields
}
func NewCallContextImpl ¶
func NewCallContextImpl(tx *types.Transaction, codeHash common.Hash) *CallContextImpl
func (*CallContextImpl) CodeHash ¶
func (c *CallContextImpl) CodeHash() common.Hash
func (*CallContextImpl) ContractAddr ¶
func (c *CallContextImpl) ContractAddr() common.Address
func (*CallContextImpl) Epoch ¶
func (c *CallContextImpl) Epoch() uint16
func (*CallContextImpl) Nonce ¶
func (c *CallContextImpl) Nonce() uint32
func (*CallContextImpl) PayAmount ¶
func (c *CallContextImpl) PayAmount() *big.Int
func (*CallContextImpl) Sender ¶
func (c *CallContextImpl) Sender() common.Address
type DeployContextImpl ¶
type DeployContextImpl struct {
// contains filtered or unexported fields
}
func NewDeployContextImpl ¶
func NewDeployContextImpl(tx *types.Transaction, codeHash common.Hash) *DeployContextImpl
func (*DeployContextImpl) CodeHash ¶
func (d *DeployContextImpl) CodeHash() common.Hash
func (*DeployContextImpl) ContractAddr ¶
func (d *DeployContextImpl) ContractAddr() common.Address
func (*DeployContextImpl) Epoch ¶
func (d *DeployContextImpl) Epoch() uint16
func (*DeployContextImpl) Nonce ¶
func (d *DeployContextImpl) Nonce() uint32
func (*DeployContextImpl) PayAmount ¶
func (d *DeployContextImpl) PayAmount() *big.Int
func (*DeployContextImpl) Sender ¶
func (d *DeployContextImpl) Sender() common.Address
type Env ¶
type Env interface { BlockNumber() uint64 BlockTimeStamp() int64 SetValue(ctx CallContext, key []byte, value []byte) GetValue(ctx CallContext, key []byte) []byte RemoveValue(ctx CallContext, key []byte) Send(ctx CallContext, dest common.Address, amount *big.Int) error MinFeePerGas() *big.Int Balance(address common.Address) *big.Int BlockSeed() []byte NetworkSize() int State(sender common.Address) state.IdentityState PubKey(addr common.Address) []byte Iterate(ctx CallContext, minKey []byte, maxKey []byte, f func(key []byte, value []byte) bool) BurnAll(ctx CallContext) ReadContractData(contractAddr common.Address, key []byte) []byte Event(name string, args ...[]byte) Epoch() uint16 ContractStake(common.Address) *big.Int MoveToStake(ctx CallContext, amount *big.Int) error Delegatee(addr common.Address) *common.Address }
type EnvImp ¶
type EnvImp struct {
// contains filtered or unexported fields
}
func NewEnvImp ¶
func NewEnvImp(s *appstate.AppState, block *types.Header, gasCounter *GasCounter, statsCollector collector.StatsCollector) *EnvImp
func (*EnvImp) BlockNumber ¶
func (*EnvImp) BlockTimeStamp ¶
func (*EnvImp) BurnAll ¶
func (e *EnvImp) BurnAll(ctx CallContext)
func (*EnvImp) Deploy ¶
func (e *EnvImp) Deploy(ctx CallContext)
func (*EnvImp) MinFeePerGas ¶
func (*EnvImp) MoveToStake ¶
func (e *EnvImp) MoveToStake(ctx CallContext, amount *big.Int) error
func (*EnvImp) NetworkSize ¶
func (*EnvImp) ReadContractData ¶
func (*EnvImp) RemoveValue ¶
func (e *EnvImp) RemoveValue(ctx CallContext, key []byte)
type GasCounter ¶
type GasCounter struct { UsedGas int // contains filtered or unexported fields }
func (*GasCounter) AddGas ¶
func (g *GasCounter) AddGas(gas int)
func (*GasCounter) AddReadBytesAsGas ¶
func (g *GasCounter) AddReadBytesAsGas(size int)
func (*GasCounter) AddWrittenBytesAsGas ¶
func (g *GasCounter) AddWrittenBytesAsGas(size int)
func (*GasCounter) Reset ¶
func (g *GasCounter) Reset(gasLimit int)
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
type ReadContextImpl ¶
func (*ReadContextImpl) CodeHash ¶
func (r *ReadContextImpl) CodeHash() common.Hash
func (*ReadContextImpl) ContractAddr ¶
func (r *ReadContextImpl) ContractAddr() common.Address
func (*ReadContextImpl) Epoch ¶
func (r *ReadContextImpl) Epoch() uint16
func (*ReadContextImpl) Nonce ¶
func (r *ReadContextImpl) Nonce() uint32
func (*ReadContextImpl) PayAmount ¶
func (r *ReadContextImpl) PayAmount() *big.Int
func (*ReadContextImpl) Sender ¶
func (r *ReadContextImpl) Sender() common.Address
Click to show internal directories.
Click to hide internal directories.