Documentation ¶
Index ¶
- Variables
- type ScriptEngineOutput
- func (o *ScriptEngineOutput) AddEvent(address meter.Address, topics []meter.Bytes32, data []byte)
- func (o *ScriptEngineOutput) AddTransfer(sender, recipient meter.Address, amount *big.Int, token byte)
- func (o *ScriptEngineOutput) BatchAddEvents(events []*tx.Event)
- func (o *ScriptEngineOutput) BatchAddTransfers(transfers []*tx.Transfer)
- func (o *ScriptEngineOutput) GetData() []byte
- func (o *ScriptEngineOutput) GetEvents() tx.Events
- func (o *ScriptEngineOutput) GetTransfers() tx.Transfers
- func (o *ScriptEngineOutput) SetData(d []byte)
- type ScriptEnv
- func (env *ScriptEnv) AddEvent(address meter.Address, topics []meter.Bytes32, data []byte)
- func (env *ScriptEnv) AddTransfer(sender, recipient meter.Address, amount *big.Int, token byte)
- func (env *ScriptEnv) BoundAccountMeter(addr meter.Address, amount *big.Int) error
- func (env *ScriptEnv) BoundAccountMeterGov(addr meter.Address, amount *big.Int) error
- func (env *ScriptEnv) CollectBailMeterGov(addr meter.Address, amount *big.Int) error
- func (env *ScriptEnv) DistValidatorRewards(rinfo []*meter.RewardInfo) (*big.Int, error)
- func (env *ScriptEnv) GetBlockCtx() *xenv.BlockContext
- func (env *ScriptEnv) GetBlockNum() uint32
- func (env *ScriptEnv) GetClauseIndex() uint32
- func (env *ScriptEnv) GetEvents() tx.Events
- func (env *ScriptEnv) GetOutput() *ScriptEngineOutput
- func (env *ScriptEnv) GetReturnData() []byte
- func (env *ScriptEnv) GetState() *state.State
- func (env *ScriptEnv) GetTransfers() tx.Transfers
- func (env *ScriptEnv) GetTxCtx() *xenv.TransactionContext
- func (env *ScriptEnv) GetTxHash() meter.Bytes32
- func (env *ScriptEnv) GetTxOrigin() meter.Address
- func (env *ScriptEnv) SetReturnData(data []byte)
- func (env *ScriptEnv) TransferAutobidMTRToAuction(addr meter.Address, amount *big.Int) error
- func (env *ScriptEnv) TransferMTRToAuction(addr meter.Address, amount *big.Int) error
- func (env *ScriptEnv) TransferMTRToValidatorBenefit(amount *big.Int) error
- func (env *ScriptEnv) TransferValidatorReward(amount *big.Int, addr meter.Address) error
- func (env *ScriptEnv) UnboundAccountMeter(addr meter.Address, amount *big.Int) error
- func (env *ScriptEnv) UnboundAccountMeterGov(addr meter.Address, amount *big.Int) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ScriptEngine = &scriptEngineContract{mustLoadContract("ScriptEngineEvent")}
)
Builtin contracts binding.
Functions ¶
This section is empty.
Types ¶
type ScriptEngineOutput ¶
type ScriptEngineOutput struct {
// contains filtered or unexported fields
}
func NewScriptEngineOutput ¶
func NewScriptEngineOutput(data []byte) *ScriptEngineOutput
func (*ScriptEngineOutput) AddTransfer ¶
func (*ScriptEngineOutput) BatchAddEvents ¶
func (o *ScriptEngineOutput) BatchAddEvents(events []*tx.Event)
func (*ScriptEngineOutput) BatchAddTransfers ¶
func (o *ScriptEngineOutput) BatchAddTransfers(transfers []*tx.Transfer)
func (*ScriptEngineOutput) GetData ¶
func (o *ScriptEngineOutput) GetData() []byte
func (*ScriptEngineOutput) GetEvents ¶
func (o *ScriptEngineOutput) GetEvents() tx.Events
func (*ScriptEngineOutput) GetTransfers ¶
func (o *ScriptEngineOutput) GetTransfers() tx.Transfers
func (*ScriptEngineOutput) SetData ¶
func (o *ScriptEngineOutput) SetData(d []byte)
type ScriptEnv ¶
type ScriptEnv struct {
// contains filtered or unexported fields
}
func NewScriptEnv ¶
func NewScriptEnv(state *state.State, blockCtx *xenv.BlockContext, txCtx *xenv.TransactionContext, clauseIndex uint32) *ScriptEnv
func (*ScriptEnv) AddTransfer ¶
func (*ScriptEnv) BoundAccountMeter ¶
==================== bound/unbound account ===========================
func (*ScriptEnv) BoundAccountMeterGov ¶
bound a meter gov in an account -- move amount from balance to bounded balance
func (*ScriptEnv) CollectBailMeterGov ¶
collect bail to StakingModuleAddr. addr ==> StakingModuleAddr
func (*ScriptEnv) DistValidatorRewards ¶
func (*ScriptEnv) GetBlockCtx ¶
func (env *ScriptEnv) GetBlockCtx() *xenv.BlockContext
func (*ScriptEnv) GetBlockNum ¶
func (*ScriptEnv) GetClauseIndex ¶
func (*ScriptEnv) GetOutput ¶
func (env *ScriptEnv) GetOutput() *ScriptEngineOutput
func (*ScriptEnv) GetReturnData ¶
func (*ScriptEnv) GetTransfers ¶
func (*ScriptEnv) GetTxCtx ¶
func (env *ScriptEnv) GetTxCtx() *xenv.TransactionContext
func (*ScriptEnv) GetTxOrigin ¶
func (*ScriptEnv) SetReturnData ¶
func (*ScriptEnv) TransferAutobidMTRToAuction ¶
==================== account openation=========================== from meter.ValidatorBenefitAddr ==> AuctionModuleAddr
func (*ScriptEnv) TransferMTRToAuction ¶
from addr == > AuctionModuleAddr
func (*ScriptEnv) TransferMTRToValidatorBenefit ¶
form AuctionModuleAddr ==> meter.ValidatorBenefitAddr
func (*ScriptEnv) TransferValidatorReward ¶
m meter.ValidatorBenefitAddr ==> addr
func (*ScriptEnv) UnboundAccountMeter ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.