Documentation ¶
Index ¶
- Constants
- func OnLoad()
- type ArrayOfImmutableAddress
- type ArrayOfMutableAddress
- type DivideCall
- type DivideContext
- type Funcs
- func (sc Funcs) Divide(ctx wasmlib.ScFuncCallContext) *DivideCall
- func (sc Funcs) GetFactor(ctx wasmlib.ScViewCallContext) *GetFactorCall
- func (sc Funcs) GetOwner(ctx wasmlib.ScViewCallContext) *GetOwnerCall
- func (sc Funcs) Init(ctx wasmlib.ScFuncCallContext) *InitCall
- func (sc Funcs) Member(ctx wasmlib.ScFuncCallContext) *MemberCall
- func (sc Funcs) SetOwner(ctx wasmlib.ScFuncCallContext) *SetOwnerCall
- type GetFactorCall
- type GetFactorContext
- type GetOwnerCall
- type GetOwnerContext
- type ImmutableDividendState
- type ImmutableGetFactorParams
- type ImmutableGetFactorResults
- type ImmutableGetOwnerResults
- type ImmutableInitParams
- type ImmutableMemberParams
- type ImmutableSetOwnerParams
- type InitCall
- type InitContext
- type MapAddressToImmutableInt64
- type MapAddressToMutableInt64
- type MemberCall
- type MemberContext
- type MutableDividendState
- type MutableGetFactorParams
- type MutableGetFactorResults
- type MutableGetOwnerResults
- type MutableInitParams
- type MutableMemberParams
- type MutableSetOwnerParams
- type SetOwnerCall
- type SetOwnerContext
Constants ¶
View Source
const ( ScName = "dividend" ScDescription = "Simple dividend smart contract" HScName = wasmlib.ScHname(0xcce2e239) )
View Source
const ( ParamAddress = wasmlib.Key("address") ParamFactor = wasmlib.Key("factor") ParamOwner = wasmlib.Key("owner") )
View Source
const ( ResultFactor = wasmlib.Key("factor") ResultOwner = wasmlib.Key("owner") )
View Source
const ( StateMemberList = wasmlib.Key("memberList") StateMembers = wasmlib.Key("members") StateOwner = wasmlib.Key("owner") StateTotalFactor = wasmlib.Key("totalFactor") )
View Source
const ( FuncDivide = "divide" FuncInit = "init" FuncMember = "member" FuncSetOwner = "setOwner" ViewGetFactor = "getFactor" ViewGetOwner = "getOwner" )
View Source
const ( HFuncDivide = wasmlib.ScHname(0xc7878107) HFuncInit = wasmlib.ScHname(0x1f44d644) HFuncMember = wasmlib.ScHname(0xc07da2cb) HFuncSetOwner = wasmlib.ScHname(0x2a15fe7b) HViewGetFactor = wasmlib.ScHname(0x0ee668fe) HViewGetOwner = wasmlib.ScHname(0x137107a6) )
View Source
const ( IdxParamAddress = 0 IdxParamFactor = 1 IdxParamOwner = 2 IdxResultFactor = 3 IdxResultOwner = 4 IdxStateMemberList = 5 IdxStateMembers = 6 IdxStateOwner = 7 IdxStateTotalFactor = 8 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArrayOfImmutableAddress ¶
type ArrayOfImmutableAddress struct {
// contains filtered or unexported fields
}
func (ArrayOfImmutableAddress) GetAddress ¶
func (a ArrayOfImmutableAddress) GetAddress(index int32) wasmlib.ScImmutableAddress
func (ArrayOfImmutableAddress) Length ¶
func (a ArrayOfImmutableAddress) Length() int32
type ArrayOfMutableAddress ¶
type ArrayOfMutableAddress struct {
// contains filtered or unexported fields
}
func (ArrayOfMutableAddress) Clear ¶
func (a ArrayOfMutableAddress) Clear()
func (ArrayOfMutableAddress) GetAddress ¶
func (a ArrayOfMutableAddress) GetAddress(index int32) wasmlib.ScMutableAddress
func (ArrayOfMutableAddress) Length ¶
func (a ArrayOfMutableAddress) Length() int32
type DivideCall ¶
type DivideContext ¶
type DivideContext struct {
State MutableDividendState
}
type Funcs ¶
type Funcs struct{}
var ScFuncs Funcs
func (Funcs) Divide ¶
func (sc Funcs) Divide(ctx wasmlib.ScFuncCallContext) *DivideCall
func (Funcs) GetFactor ¶
func (sc Funcs) GetFactor(ctx wasmlib.ScViewCallContext) *GetFactorCall
func (Funcs) GetOwner ¶
func (sc Funcs) GetOwner(ctx wasmlib.ScViewCallContext) *GetOwnerCall
func (Funcs) Member ¶
func (sc Funcs) Member(ctx wasmlib.ScFuncCallContext) *MemberCall
func (Funcs) SetOwner ¶
func (sc Funcs) SetOwner(ctx wasmlib.ScFuncCallContext) *SetOwnerCall
type GetFactorCall ¶
type GetFactorCall struct { Func *wasmlib.ScView Params MutableGetFactorParams Results ImmutableGetFactorResults }
type GetFactorContext ¶
type GetFactorContext struct { Params ImmutableGetFactorParams Results MutableGetFactorResults State ImmutableDividendState }
type GetOwnerCall ¶
type GetOwnerCall struct { Func *wasmlib.ScView Results ImmutableGetOwnerResults }
type GetOwnerContext ¶
type GetOwnerContext struct { Results MutableGetOwnerResults State ImmutableDividendState }
type ImmutableDividendState ¶
type ImmutableDividendState struct {
// contains filtered or unexported fields
}
func (ImmutableDividendState) MemberList ¶
func (s ImmutableDividendState) MemberList() ArrayOfImmutableAddress
func (ImmutableDividendState) Members ¶
func (s ImmutableDividendState) Members() MapAddressToImmutableInt64
func (ImmutableDividendState) Owner ¶
func (s ImmutableDividendState) Owner() wasmlib.ScImmutableAgentID
func (ImmutableDividendState) TotalFactor ¶
func (s ImmutableDividendState) TotalFactor() wasmlib.ScImmutableInt64
type ImmutableGetFactorParams ¶
type ImmutableGetFactorParams struct {
// contains filtered or unexported fields
}
func (ImmutableGetFactorParams) Address ¶
func (s ImmutableGetFactorParams) Address() wasmlib.ScImmutableAddress
type ImmutableGetFactorResults ¶
type ImmutableGetFactorResults struct {
// contains filtered or unexported fields
}
func (ImmutableGetFactorResults) Factor ¶
func (s ImmutableGetFactorResults) Factor() wasmlib.ScImmutableInt64
type ImmutableGetOwnerResults ¶
type ImmutableGetOwnerResults struct {
// contains filtered or unexported fields
}
func (ImmutableGetOwnerResults) Owner ¶
func (s ImmutableGetOwnerResults) Owner() wasmlib.ScImmutableAgentID
type ImmutableInitParams ¶
type ImmutableInitParams struct {
// contains filtered or unexported fields
}
func (ImmutableInitParams) Owner ¶
func (s ImmutableInitParams) Owner() wasmlib.ScImmutableAgentID
type ImmutableMemberParams ¶
type ImmutableMemberParams struct {
// contains filtered or unexported fields
}
func (ImmutableMemberParams) Address ¶
func (s ImmutableMemberParams) Address() wasmlib.ScImmutableAddress
func (ImmutableMemberParams) Factor ¶
func (s ImmutableMemberParams) Factor() wasmlib.ScImmutableInt64
type ImmutableSetOwnerParams ¶
type ImmutableSetOwnerParams struct {
// contains filtered or unexported fields
}
func (ImmutableSetOwnerParams) Owner ¶
func (s ImmutableSetOwnerParams) Owner() wasmlib.ScImmutableAgentID
type InitCall ¶
type InitCall struct { Func *wasmlib.ScInitFunc Params MutableInitParams }
type InitContext ¶
type InitContext struct { Params ImmutableInitParams State MutableDividendState }
type MapAddressToImmutableInt64 ¶
type MapAddressToImmutableInt64 struct {
// contains filtered or unexported fields
}
func (MapAddressToImmutableInt64) GetInt64 ¶
func (m MapAddressToImmutableInt64) GetInt64(key wasmlib.ScAddress) wasmlib.ScImmutableInt64
type MapAddressToMutableInt64 ¶
type MapAddressToMutableInt64 struct {
// contains filtered or unexported fields
}
func (MapAddressToMutableInt64) Clear ¶
func (m MapAddressToMutableInt64) Clear()
func (MapAddressToMutableInt64) GetInt64 ¶
func (m MapAddressToMutableInt64) GetInt64(key wasmlib.ScAddress) wasmlib.ScMutableInt64
type MemberCall ¶
type MemberCall struct { Func *wasmlib.ScFunc Params MutableMemberParams }
type MemberContext ¶
type MemberContext struct { Params ImmutableMemberParams State MutableDividendState }
type MutableDividendState ¶
type MutableDividendState struct {
// contains filtered or unexported fields
}
func (MutableDividendState) MemberList ¶
func (s MutableDividendState) MemberList() ArrayOfMutableAddress
func (MutableDividendState) Members ¶
func (s MutableDividendState) Members() MapAddressToMutableInt64
func (MutableDividendState) Owner ¶
func (s MutableDividendState) Owner() wasmlib.ScMutableAgentID
func (MutableDividendState) TotalFactor ¶
func (s MutableDividendState) TotalFactor() wasmlib.ScMutableInt64
type MutableGetFactorParams ¶
type MutableGetFactorParams struct {
// contains filtered or unexported fields
}
func (MutableGetFactorParams) Address ¶
func (s MutableGetFactorParams) Address() wasmlib.ScMutableAddress
type MutableGetFactorResults ¶
type MutableGetFactorResults struct {
// contains filtered or unexported fields
}
func (MutableGetFactorResults) Factor ¶
func (s MutableGetFactorResults) Factor() wasmlib.ScMutableInt64
type MutableGetOwnerResults ¶
type MutableGetOwnerResults struct {
// contains filtered or unexported fields
}
func (MutableGetOwnerResults) Owner ¶
func (s MutableGetOwnerResults) Owner() wasmlib.ScMutableAgentID
type MutableInitParams ¶
type MutableInitParams struct {
// contains filtered or unexported fields
}
func (MutableInitParams) Owner ¶
func (s MutableInitParams) Owner() wasmlib.ScMutableAgentID
type MutableMemberParams ¶
type MutableMemberParams struct {
// contains filtered or unexported fields
}
func (MutableMemberParams) Address ¶
func (s MutableMemberParams) Address() wasmlib.ScMutableAddress
func (MutableMemberParams) Factor ¶
func (s MutableMemberParams) Factor() wasmlib.ScMutableInt64
type MutableSetOwnerParams ¶
type MutableSetOwnerParams struct {
// contains filtered or unexported fields
}
func (MutableSetOwnerParams) Owner ¶
func (s MutableSetOwnerParams) Owner() wasmlib.ScMutableAgentID
type SetOwnerCall ¶
type SetOwnerCall struct { Func *wasmlib.ScFunc Params MutableSetOwnerParams }
type SetOwnerContext ¶
type SetOwnerContext struct { Params ImmutableSetOwnerParams State MutableDividendState }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.