multisig

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2020 License: GPL-3.0 Imports: 18 Imported by: 2

Documentation

Overview

Aliases to use outside mostly package (app.go).

Keeper implements operations with call.

Registering amino types for multisignature usage.

End blocker implementation.

Multisignature message handler implementation.

Keeper implementation.

Multisig AppModule and AppModuleBasic implementation.

Parameters key table implementation for multisig parameters store.

Querier for multisig module.

Keeper queue to manage calls.

Keeper votes part (votes managment).

Index

Constants

View Source
const (
	StoreKey          = types.ModuleName
	RouterKey         = types.RouterKey
	ModuleName        = types.ModuleName
	DefaultParamspace = types.DefaultParamspace
)
View Source
const (
	QueryGetCalls  = "calls"
	QueryGetLastId = "lastId"
	QueryGetCall   = "call"
	QueryGetUnique = "unique"
)

Supported queries.

Variables

View Source
var ModuleCdc *codec.Codec

Functions

func EndBlocker

func EndBlocker(ctx sdk.Context, keeper Keeper, poaKeeper poa.Keeper) []abci.Event

Implements end blocker to process active calls and their confirmations.

func NewHandler

func NewHandler(keeper Keeper, poaKeeper poa.Keeper) sdk.Handler

Handle messages for multisig module.

func NewKeyTable

func NewKeyTable() params.KeyTable

New Paramstore for multisig module.

func NewQuerier

func NewQuerier(msKeeper Keeper) sdk.Querier

Creating new Querier.

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

Register amino types for multisig module.

Types

type AppModule

type AppModule struct {
	AppModuleBasic
	// contains filtered or unexported fields
}

func NewAppModule

func NewAppModule(msKeeper Keeper, poaKeeper poa.Keeper) AppModule

Create new PoA module.

func (AppModule) BeginBlock

func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)

Process begin block (abci).

func (AppModule) EndBlock

func (app AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate

Process end block (abci).

func (AppModule) ExportGenesis

func (app AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage

Export genesis.

func (AppModule) InitGenesis

func (app AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate

Initialize genesis.

func (AppModule) Name

func (AppModule) Name() string

Get name of module.

func (AppModule) NewHandler

func (app AppModule) NewHandler() sdk.Handler

Create new handler.

func (AppModule) NewQuerierHandler

func (app AppModule) NewQuerierHandler() sdk.Querier

Get new querier for PoA module.

func (AppModule) QuerierRoute

func (AppModule) QuerierRoute() string

Get route for querier.

func (AppModule) RegisterInvariants

func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry)

Register module invariants.

func (AppModule) Route

func (AppModule) Route() string

Base route of module (for handler).

type AppModuleBasic

type AppModuleBasic struct{}

func (AppModuleBasic) DefaultGenesis

func (module AppModuleBasic) DefaultGenesis() json.RawMessage

Generate default genesis.

func (AppModuleBasic) GetQueryCmd

func (AppModuleBasic) GetQueryCmd(cdc *amino.Codec) *cobra.Command

Get query commands for CLI.

func (AppModuleBasic) GetTxCmd

func (AppModuleBasic) GetTxCmd(cdc *amino.Codec) *cobra.Command

Get transaction commands for CLI.

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

Module name.

func (AppModuleBasic) RegisterCodec

func (module AppModuleBasic) RegisterCodec(cdc *amino.Codec)

Registering codecs.

func (AppModuleBasic) RegisterRESTRoutes

func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, r *mux.Router)

Register REST routes.

func (AppModuleBasic) ValidateGenesis

func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error

Validate exists genesis.

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

Multisignature keeper.

func NewKeeper

func NewKeeper(storeKey sdk.StoreKey, cdc *codec.Codec, router core.Router, paramStore params.Subspace) Keeper

Creating new multisignature keeper implementation.

func (Keeper) Confirm

func (keeper Keeper) Confirm(ctx sdk.Context, id uint64, address sdk.AccAddress) sdk.Error

Confirm call.

func (Keeper) ExportGenesis

func (keeper Keeper) ExportGenesis(ctx sdk.Context) types.GenesisState

Export genesis data for this module.

func (Keeper) GetCall

func (keeper Keeper) GetCall(ctx sdk.Context, id uint64) (types.Call, sdk.Error)

Get call by id.

func (Keeper) GetCallIDByUnique

func (keeper Keeper) GetCallIDByUnique(ctx sdk.Context, uniqueID string) (uint64, sdk.Error)

Get call by unique id.

func (Keeper) GetConfirmations

func (keeper Keeper) GetConfirmations(ctx sdk.Context, id uint64) (uint64, sdk.Error)

Get message confirmations.

func (Keeper) GetIntervalToExecute

func (keeper Keeper) GetIntervalToExecute(ctx sdk.Context) (res int64)

Get IntervalToExecute calls parameter.

func (Keeper) GetLastId

func (keeper Keeper) GetLastId(ctx sdk.Context) uint64

Get last call id.

func (Keeper) GetParams

func (keeper Keeper) GetParams(ctx sdk.Context) types.Params

Get params.

func (Keeper) GetQueueIteratorStartEnd

func (keeper Keeper) GetQueueIteratorStartEnd(ctx sdk.Context, startHeight, endHeight int64) sdk.Iterator

Getting queue iterator from block height to end block height.

func (Keeper) GetQueueIteratorTill

func (keeper Keeper) GetQueueIteratorTill(ctx sdk.Context, endHeight int64) sdk.Iterator

Get queue iterator till.

func (Keeper) GetVotes

func (keeper Keeper) GetVotes(ctx sdk.Context, id uint64) (types.Votes, sdk.Error)

Get votes for specific call.

func (Keeper) HasCall

func (keeper Keeper) HasCall(ctx sdk.Context, id uint64) bool

Check if call exists.

func (Keeper) HasCallByUniqueId

func (keeper Keeper) HasCallByUniqueId(ctx sdk.Context, uniqueID string) bool

Check if has call by unique id.

func (Keeper) HasVote

func (keeper Keeper) HasVote(ctx sdk.Context, id uint64, address sdk.AccAddress) (bool, sdk.Error)

Check if message confirmed by address.

func (Keeper) InitGenesis

func (keeper Keeper) InitGenesis(ctx sdk.Context, genesisState types.GenesisState)

Initialize genesis for this module.

func (Keeper) RevokeConfirmation

func (keeper Keeper) RevokeConfirmation(ctx sdk.Context, id uint64, address sdk.AccAddress) sdk.Error

Revoke confirmation from call.

func (Keeper) SetParams

func (keeper Keeper) SetParams(ctx sdk.Context, params types.Params)

Set the params.

func (Keeper) SubmitCall

func (keeper Keeper) SubmitCall(ctx sdk.Context, msg core.MsMsg, uniqueID string, sender sdk.AccAddress) sdk.Error

Submit call to execute by confirmations from validators.

Directories

Path Synopsis
Returns queries and txs for multisig CLI.
Returns queries and txs for multisig CLI.
cli
Implements CLI queries multisig modules.
Implements CLI queries multisig modules.
rest
Implements REST API for multisig modules.
Implements REST API for multisig modules.
Implements message type to confirm call.
Implements message type to confirm call.
Create call message type.
Create call message type.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL