Documentation ¶
Index ¶
- Constants
- func RestrictByAccountLock(addr meter.Address, state *state.State) (bool, *big.Int, *big.Int)
- func SetAccountLockGlobInst(inst *AccountLock)
- type AccountLock
- func (a *AccountLock) GetCurrentEpoch() uint32
- func (a *AccountLock) GoverningHandler(env *setypes.ScriptEnv, ab *AccountLockBody, gas uint64) (leftOverGas uint64, err error)
- func (a *AccountLock) Handle(senv *setypes.ScriptEnv, payload []byte, to *meter.Address, gas uint64) (seOutput *setypes.ScriptEngineOutput, leftOverGas uint64, err error)
- func (a *AccountLock) HandleAccountLockAdd(env *setypes.ScriptEnv, ab *AccountLockBody, gas uint64) (leftOverGas uint64, err error)
- func (a *AccountLock) HandleAccountLockRemove(env *setypes.ScriptEnv, ab *AccountLockBody, gas uint64) (leftOverGas uint64, err error)
- func (a *AccountLock) HandleAccountLockTransfer(env *setypes.ScriptEnv, ab *AccountLockBody, gas uint64) (leftOverGas uint64, err error)
- type AccountLockBody
Constants ¶
View Source
const ( OP_ADDLOCK = uint32(1) OP_REMOVELOCK = uint32(2) OP_TRANSFER = uint32(3) OP_GOVERNING = uint32(100) )
Variables ¶
This section is empty.
Functions ¶
func RestrictByAccountLock ¶
func SetAccountLockGlobInst ¶
func SetAccountLockGlobInst(inst *AccountLock)
Types ¶
type AccountLock ¶
type AccountLock struct {
// contains filtered or unexported fields
}
Candidate indicates the structure of a candidate
var (
AccountLockGlobInst *AccountLock
)
func GetAccountLockGlobInst ¶
func GetAccountLockGlobInst() *AccountLock
func NewAccountLock ¶
func NewAccountLock(ch *chain.Chain, sc *state.Creator) *AccountLock
func (*AccountLock) GetCurrentEpoch ¶
func (a *AccountLock) GetCurrentEpoch() uint32
func (*AccountLock) GoverningHandler ¶
func (a *AccountLock) GoverningHandler(env *setypes.ScriptEnv, ab *AccountLockBody, gas uint64) (leftOverGas uint64, err error)
func (*AccountLock) HandleAccountLockAdd ¶
func (a *AccountLock) HandleAccountLockAdd(env *setypes.ScriptEnv, ab *AccountLockBody, gas uint64) (leftOverGas uint64, err error)
func (*AccountLock) HandleAccountLockRemove ¶
func (a *AccountLock) HandleAccountLockRemove(env *setypes.ScriptEnv, ab *AccountLockBody, gas uint64) (leftOverGas uint64, err error)
func (*AccountLock) HandleAccountLockTransfer ¶
func (a *AccountLock) HandleAccountLockTransfer(env *setypes.ScriptEnv, ab *AccountLockBody, gas uint64) (leftOverGas uint64, err error)
type AccountLockBody ¶
type AccountLockBody struct { Opcode uint32 Version uint32 Option uint32 LockEpoch uint32 ReleaseEpoch uint32 FromAddr meter.Address ToAddr meter.Address MeterAmount *big.Int MeterGovAmount *big.Int Memo []byte }
Candidate indicates the structure of a candidate
func DecodeFromBytes ¶
func DecodeFromBytes(bytes []byte) (*AccountLockBody, error)
func (*AccountLockBody) GetOpName ¶
func (a *AccountLockBody) GetOpName(op uint32) string
func (*AccountLockBody) String ¶ added in v1.2.0
func (sb *AccountLockBody) String() string
func (*AccountLockBody) ToString ¶
func (a *AccountLockBody) ToString() string
func (*AccountLockBody) UniteHash ¶ added in v1.2.0
func (sb *AccountLockBody) UniteHash() (hash meter.Bytes32)
Click to show internal directories.
Click to hide internal directories.