Documentation ¶
Index ¶
- func NewMoveProposalHandler(k Keeper) govtypes.Handler
- type GoApi
- type Keeper
- func (k Keeper) AmountToShare(ctx sdk.Context, valAddr sdk.ValAddress, amount uint64) (uint64, error)
- func (k Keeper) ApplyStakingDelta(ctx sdk.Context, valAddr sdk.ValAddress, delta uint64, sign bool) error
- func (k Keeper) ApplyStorageDelta(ctx sdk.Context, addr sdk.AccAddress, delta uint64, isNeg bool) error
- func (k Keeper) DecodeModuleBytes(moduleBytes []byte) ([]byte, error)
- func (k Keeper) DecodeMoveResource(ctx sdk.Context, structTag vmtypes.StructTag, resourceBytes []byte) ([]byte, error)
- func (k Keeper) DecodeScriptBytes(scriptBytes []byte) ([]byte, error)
- func (k Keeper) DelegateToValidator(ctx sdk.Context, valAddr sdk.ValAddress, amount sdk.Int) (sdk.Dec, error)
- func (k Keeper) DenomToStructTag(ctx sdk.Context, denom string) (vmtypes.StructTag, error)
- func (k Keeper) ExecuteEntryFunction(ctx sdk.Context, sender sdk.AccAddress, moduleOwner sdk.AccAddress, ...) error
- func (k Keeper) ExecuteScript(ctx sdk.Context, sender sdk.AccAddress, byteCodes []byte, typeArgs []string, ...) error
- func (k Keeper) GetDelegatorModuleAddress(val sdk.ValAddress) sdk.AccAddress
- func (k Keeper) GetDelegatorModuleName(val sdk.ValAddress) string
- func (k Keeper) GetModule(ctx sdk.Context, addr sdk.AccAddress, moduleName string) (types.Module, error)
- func (k Keeper) GetMoveAccount(ctx sdk.Context) authtypes.ModuleAccountI
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) GetResource(ctx sdk.Context, addr sdk.AccAddress, structTag vmtypes.StructTag) (types.Resource, error)
- func (k Keeper) GetStorageAccount(ctx sdk.Context) authtypes.ModuleAccountI
- func (k Keeper) GetStorageFee(ctx sdk.Context, addr sdk.AccAddress) (types.StorageFee, error)
- func (k Keeper) GetStructTagFromDenomHash(ctx sdk.Context, denomHash []byte) (vmtypes.StructTag, error)
- func (k Keeper) GetTableEntry(ctx sdk.Context, tableAddr sdk.AccAddress, key []byte) (types.TableEntry, error)
- func (k Keeper) GetTableMeta(ctx sdk.Context, tableAddr sdk.AccAddress) (types.TableMeta, error)
- func (k Keeper) HasDenomTrace(ctx sdk.Context, structTag vmtypes.StructTag) bool
- func (k Keeper) Initialize(ctx sdk.Context, moduleBundle vmtypes.ModuleBundle) error
- func (k Keeper) InitializeCoin(ctx sdk.Context, denom string) error
- func (k Keeper) InitializeStaking(ctx sdk.Context) error
- func (k Keeper) InstantUnbondFromValidator(ctx sdk.Context, valAddr sdk.ValAddress, amount sdk.Int) (sdk.Int, error)
- func (k Keeper) IterateDenomTrace(ctx sdk.Context, cb func(types.DenomTrace))
- func (k Keeper) IterateStorageFee(ctx sdk.Context, cb func(types.StorageFee)) error
- func (k Keeper) IterateVMStore(ctx sdk.Context, ...)
- func (k Keeper) PublishModuleBundle(ctx sdk.Context, sender sdk.AccAddress, moduleBundles vmtypes.ModuleBundle) error
- func (k Keeper) QueryEntryFunction(ctx sdk.Context, moduleOwner sdk.AccAddress, moduleName string, ...) ([]byte, error)
- func (k Keeper) SetModule(ctx sdk.Context, addr sdk.AccAddress, moduleName string, moduleBytes []byte) error
- func (k Keeper) SetParams(ctx sdk.Context, ps types.Params)
- func (k Keeper) SetResource(ctx sdk.Context, addr sdk.AccAddress, structTag vmtypes.StructTag, ...) error
- func (k Keeper) SetStorageFee(ctx sdk.Context, addr sdk.AccAddress, storageFee types.StorageFee) error
- func (k Keeper) SetTableEntry(ctx sdk.Context, tableAddr sdk.AccAddress, key []byte, value []byte)
- func (k Keeper) SetTableMeta(ctx sdk.Context, tableAddr sdk.AccAddress, metaBytes []byte)
- func (k Keeper) ShareToAmount(ctx sdk.Context, valAddr sdk.ValAddress, share uint64) (uint64, error)
- func (k Keeper) StoreDenomTrace(ctx sdk.Context, structTag vmtypes.StructTag) error
- func (k Keeper) StructTagToDenom(ctx sdk.Context, structTag vmtypes.StructTag) (string, error)
- func (k Keeper) WithdrawRewards(ctx sdk.Context, valAddr sdk.ValAddress) (sdk.Coins, error)
- type MsgServer
- func (ms MsgServer) ConvertMoveCoin(context context.Context, req *types.MsgConvertMoveCoin) (*types.MsgConvertMoveCoinResponse, error)
- func (ms MsgServer) ConvertNativeCoin(context context.Context, req *types.MsgConvertNativeCoin) (*types.MsgConvertNativeCoinResponse, error)
- func (ms MsgServer) ExecuteEntryFunction(context context.Context, req *types.MsgExecuteEntryFunction) (*types.MsgExecuteEntryFunctionResponse, error)
- func (ms MsgServer) ExecuteScript(context context.Context, req *types.MsgExecuteScript) (*types.MsgExecuteScriptResponse, error)
- func (ms MsgServer) PublishModuleBundle(context context.Context, req *types.MsgPublishModuleBundle) (*types.MsgPublishModuleBundleResponse, error)
- type ProposalHandler
- type Querier
- func (q Querier) EntryFunction(context context.Context, req *types.QueryEntryFunctionRequest) (*types.QueryEntryFunctionResponse, error)
- func (q Querier) Module(context context.Context, req *types.QueryModuleRequest) (*types.QueryModuleResponse, error)
- func (q Querier) Modules(context context.Context, req *types.QueryModulesRequest) (*types.QueryModulesResponse, error)
- func (q Querier) Resource(context context.Context, req *types.QueryResourceRequest) (*types.QueryResourceResponse, error)
- func (q Querier) Resources(context context.Context, req *types.QueryResourcesRequest) (*types.QueryResourcesResponse, error)
- func (q Querier) ScriptABI(context context.Context, req *types.QueryScriptABIRequest) (*types.QueryScriptABIResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMoveProposalHandler ¶
NewMoveProposalHandler creates a new governance Handler for move proposals
Types ¶
type GoApi ¶
type GoApi struct { Keeper // contains filtered or unexported fields }
func (GoApi) AmountToShare ¶
AmountToShare convert amount to share
func (GoApi) GetBlockInfo ¶
GetBlockInfo return block info (height and timestamp)
func (GoApi) ShareToAmount ¶
ShareToAmount convert share to amount
func (GoApi) UnbondTimestamp ¶
UnbondTimestamp return staking unbond time
type Keeper ¶
type Keeper struct { StakingKeeper types.StakingKeeper // contains filtered or unexported fields }
func NewKeeper ¶
func NewKeeper( cdc codec.Codec, storeKey sdk.StoreKey, paramSpace paramtypes.Subspace, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, distrKeeper types.DistributionKeeper, stakingKeeper types.StakingKeeper, moveConfig moveconfig.MoveConfig, ) Keeper
func (Keeper) AmountToShare ¶
func (k Keeper) AmountToShare(ctx sdk.Context, valAddr sdk.ValAddress, amount uint64) (uint64, error)
AmountToShare convert amount to share in the ratio of a validator's share/token
func (Keeper) ApplyStakingDelta ¶
func (k Keeper) ApplyStakingDelta( ctx sdk.Context, valAddr sdk.ValAddress, delta uint64, sign bool, ) error
ApplyStakingDelta increase staking amount if the delta is positive if else, decrease staking amount
func (Keeper) ApplyStorageDelta ¶
func (k Keeper) ApplyStorageDelta( ctx sdk.Context, addr sdk.AccAddress, delta uint64, isNeg bool, ) error
Apply changeset size-delta to storage and charge fee
func (Keeper) DecodeModuleBytes ¶
DecodeModuleBytes decode raw module bytes into `MoveModule` json string
func (Keeper) DecodeMoveResource ¶
func (k Keeper) DecodeMoveResource( ctx sdk.Context, structTag vmtypes.StructTag, resourceBytes []byte, ) ([]byte, error)
DecodeMoveResource decode raw move resource bytes into `MoveResource` json string
func (Keeper) DecodeScriptBytes ¶
DecodeScriptBytes decode raw script bytes into `MoveFunction` json string
func (Keeper) DelegateToValidator ¶
func (k Keeper) DelegateToValidator(ctx sdk.Context, valAddr sdk.ValAddress, amount sdk.Int) (sdk.Dec, error)
DelegateToValidator withdraw staking coins from the move module account and send the coins to a delegator module account for a validator and consequentially delegate the deposited coins to a validator.
func (Keeper) DenomToStructTag ¶
DenomToStructTag convert denom to struct tag
func (Keeper) ExecuteEntryFunction ¶
func (Keeper) ExecuteScript ¶
func (Keeper) GetDelegatorModuleAddress ¶
func (k Keeper) GetDelegatorModuleAddress(val sdk.ValAddress) sdk.AccAddress
GetDelegatorModuleAddress return a unique delegator module address for a validator
func (Keeper) GetDelegatorModuleName ¶
func (k Keeper) GetDelegatorModuleName(val sdk.ValAddress) string
GetDelegatorModuleName return a unique delegator module name for a validator
func (Keeper) GetModule ¶
func (k Keeper) GetModule( ctx sdk.Context, addr sdk.AccAddress, moduleName string, ) (types.Module, error)
GetModule return Module of the given account address and name
func (Keeper) GetMoveAccount ¶
func (k Keeper) GetMoveAccount(ctx sdk.Context) authtypes.ModuleAccountI
func (Keeper) GetResource ¶
func (k Keeper) GetResource( ctx sdk.Context, addr sdk.AccAddress, structTag vmtypes.StructTag, ) (types.Resource, error)
GetResource return Resource of the given account address and struct tag
func (Keeper) GetStorageAccount ¶
func (k Keeper) GetStorageAccount(ctx sdk.Context) authtypes.ModuleAccountI
func (Keeper) GetStorageFee ¶
func (k Keeper) GetStorageFee( ctx sdk.Context, addr sdk.AccAddress, ) (types.StorageFee, error)
GetStorageFee return storage fee object of an address
func (Keeper) GetStructTagFromDenomHash ¶
func (k Keeper) GetStructTagFromDenomHash(ctx sdk.Context, denomHash []byte) (vmtypes.StructTag, error)
GetStructTagFromDenomHash return stored struct tag with denom hash as key
func (Keeper) GetTableEntry ¶
func (k Keeper) GetTableEntry( ctx sdk.Context, tableAddr sdk.AccAddress, key []byte, ) (types.TableEntry, error)
GetTableEntry return table entry
func (Keeper) GetTableMeta ¶
GetTableMeta return table entry
func (Keeper) HasDenomTrace ¶
HasDenomTrace check wether the struct tag stored or not
func (Keeper) Initialize ¶
func (Keeper) InitializeCoin ¶
func (Keeper) InstantUnbondFromValidator ¶
func (k Keeper) InstantUnbondFromValidator(ctx sdk.Context, valAddr sdk.ValAddress, amount sdk.Int) (sdk.Int, error)
InstantUnbondFromValidator unbond coins without unbonding period and send the withdrawn coins to the move module account
func (Keeper) IterateDenomTrace ¶
func (k Keeper) IterateDenomTrace(ctx sdk.Context, cb func(types.DenomTrace))
IterateDenomTrace iterate VMStore kv store for genesis export
func (Keeper) IterateStorageFee ¶
IterateStorageFee iterate storage fee store
func (Keeper) IterateVMStore ¶
func (k Keeper) IterateVMStore(ctx sdk.Context, cb func(*types.Module, *types.Resource, *types.TableEntry, *types.TableMeta))
IterateVMStore iterate VMStore store for genesis export
func (Keeper) PublishModuleBundle ¶
func (k Keeper) PublishModuleBundle( ctx sdk.Context, sender sdk.AccAddress, moduleBundles vmtypes.ModuleBundle, ) error
func (Keeper) QueryEntryFunction ¶
func (Keeper) SetModule ¶
func (k Keeper) SetModule( ctx sdk.Context, addr sdk.AccAddress, moduleName string, moduleBytes []byte, ) error
SetModule store Module bytes This function should be used only when InitGenesis
func (Keeper) SetResource ¶
func (k Keeper) SetResource( ctx sdk.Context, addr sdk.AccAddress, structTag vmtypes.StructTag, resourceBytes []byte, ) error
SetResource store Resource bytes This function should be used only when InitGenesis
func (Keeper) SetStorageFee ¶
func (k Keeper) SetStorageFee( ctx sdk.Context, addr sdk.AccAddress, storageFee types.StorageFee, ) error
SetStorageFee store storage fee of an address
func (Keeper) SetTableEntry ¶
func (k Keeper) SetTableEntry( ctx sdk.Context, tableAddr sdk.AccAddress, key []byte, value []byte, )
SetTableEntry store table entry data
func (Keeper) SetTableMeta ¶
SetTableMeta store table meta data
func (Keeper) ShareToAmount ¶
func (k Keeper) ShareToAmount(ctx sdk.Context, valAddr sdk.ValAddress, share uint64) (uint64, error)
ShareToAmount convert share to amount in the ratio of a validator's token/share
func (Keeper) StoreDenomTrace ¶
StoreDenomTrace store struct tag with denom hash as key
func (Keeper) StructTagToDenom ¶
StructTagToDenom convert struct tag to denom
func (Keeper) WithdrawRewards ¶
WithdrawRewards withdraw rewards from a validator and send the withdrawn staking rewards to the move module account
type MsgServer ¶
type MsgServer struct {
Keeper
}
func NewMsgServerImpl ¶
NewMsgServerImpl return MsgServer instance
func (MsgServer) ConvertMoveCoin ¶
func (ms MsgServer) ConvertMoveCoin(context context.Context, req *types.MsgConvertMoveCoin) (*types.MsgConvertMoveCoinResponse, error)
func (MsgServer) ConvertNativeCoin ¶
func (ms MsgServer) ConvertNativeCoin(context context.Context, req *types.MsgConvertNativeCoin) (*types.MsgConvertNativeCoinResponse, error)
func (MsgServer) ExecuteEntryFunction ¶
func (ms MsgServer) ExecuteEntryFunction(context context.Context, req *types.MsgExecuteEntryFunction) (*types.MsgExecuteEntryFunctionResponse, error)
ExecuteEntryFunction implements entry function execution feature
func (MsgServer) ExecuteScript ¶
func (ms MsgServer) ExecuteScript(context context.Context, req *types.MsgExecuteScript) (*types.MsgExecuteScriptResponse, error)
ExecuteScript implements script execution
func (MsgServer) PublishModuleBundle ¶
func (ms MsgServer) PublishModuleBundle(context context.Context, req *types.MsgPublishModuleBundle) (*types.MsgPublishModuleBundleResponse, error)
PublishModuleBundle implements publishing module to move vm
type ProposalHandler ¶
type ProposalHandler struct {
Keeper
}
func NewProposalHandler ¶
func NewProposalHandler(k Keeper) ProposalHandler
NewProposalHandler return ProposalHandler instance
func (ProposalHandler) HandlePublishStdModuleProposal ¶
func (ph ProposalHandler) HandlePublishStdModuleProposal(ctx sdk.Context, p types.PublishStdModuleProposal) error
type Querier ¶
type Querier struct {
Keeper
}
func (Querier) EntryFunction ¶
func (q Querier) EntryFunction(context context.Context, req *types.QueryEntryFunctionRequest) (*types.QueryEntryFunctionResponse, error)
func (Querier) Module ¶
func (q Querier) Module(context context.Context, req *types.QueryModuleRequest) (*types.QueryModuleResponse, error)
func (Querier) Modules ¶
func (q Querier) Modules(context context.Context, req *types.QueryModulesRequest) (*types.QueryModulesResponse, error)
func (Querier) Resource ¶
func (q Querier) Resource(context context.Context, req *types.QueryResourceRequest) (*types.QueryResourceResponse, error)
func (Querier) Resources ¶
func (q Querier) Resources(context context.Context, req *types.QueryResourcesRequest) (*types.QueryResourcesResponse, error)
func (Querier) ScriptABI ¶
func (q Querier) ScriptABI(context context.Context, req *types.QueryScriptABIRequest) (*types.QueryScriptABIResponse, error)