Documentation ¶
Index ¶
- Constants
- func GzipIt(input []byte) ([]byte, error)
- func IsGzip(input []byte) bool
- func IsWasm(input []byte) bool
- func LimitReader(r io.Reader, n int64) io.Reader
- func Uncompress(gzipSrc []byte, limit uint64) ([]byte, error)
- type Keeper
- func (q Keeper) AllWasmCodeID(c context.Context, req *types.AllWasmCodeIDQuery) (*types.AllWasmCodeIDResponse, error)
- func (k Keeper) ExportGenesis(ctx sdk.Context) types.GenesisState
- func (k Keeper) GetWasmByte(ctx sdk.Context, codeID string) ([]byte, error)
- func (k Keeper) InitGenesis(ctx sdk.Context, gs types.GenesisState) error
- func (k Keeper) IterateCodeInfos(ctx sdk.Context, fn func(codeID string) (stop bool))
- func (k Keeper) PushNewWasmCode(goCtx context.Context, msg *types.MsgPushNewWasmCode) (*types.MsgPushNewWasmCodeResponse, error)
- func (q Keeper) WasmCode(c context.Context, req *types.WasmCodeQuery) (*types.WasmCodeResponse, error)
- type LimitedReader
- type WasmSnapshotter
- func (ws *WasmSnapshotter) RestoreExtension(height uint64, format uint32, payloadReader snapshot.ExtensionPayloadReader) error
- func (ws *WasmSnapshotter) SnapshotExtension(height uint64, payloadWriter snapshot.ExtensionPayloadWriter) error
- func (ws *WasmSnapshotter) SnapshotFormat() uint32
- func (ws *WasmSnapshotter) SnapshotName() string
- func (ws *WasmSnapshotter) SupportedFormats() []uint32
Constants ¶
View Source
const SnapshotFormat = 1
SnapshotFormat format 1 is just gzipped wasm byte code for each item payload. No protobuf envelope, no metadata.
Variables ¶
This section is empty.
Functions ¶
func LimitReader ¶
LimitReader returns a Reader that reads from r but stops with types.ErrLimit after n bytes. The underlying implementation is a *io.LimitedReader.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey, authority string, homeDir string) Keeper
func (Keeper) AllWasmCodeID ¶
func (q Keeper) AllWasmCodeID(c context.Context, req *types.AllWasmCodeIDQuery) (*types.AllWasmCodeIDResponse, error)
AllWasmCodeID implements the IBC QueryServer interface
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) types.GenesisState
func (Keeper) GetWasmByte ¶
TODO: testing
func (Keeper) InitGenesis ¶
func (Keeper) IterateCodeInfos ¶
TODO: testing
func (Keeper) PushNewWasmCode ¶
func (k Keeper) PushNewWasmCode(goCtx context.Context, msg *types.MsgPushNewWasmCode) (*types.MsgPushNewWasmCodeResponse, error)
PushNewWasmCode defines a rpc handler method for MsgPushNewWasmCode
func (Keeper) WasmCode ¶
func (q Keeper) WasmCode(c context.Context, req *types.WasmCodeQuery) (*types.WasmCodeResponse, error)
WasmCode implements the IBC QueryServer interface
type LimitedReader ¶
type LimitedReader struct {
// contains filtered or unexported fields
}
type WasmSnapshotter ¶
type WasmSnapshotter struct {
// contains filtered or unexported fields
}
func NewWasmSnapshotter ¶
func NewWasmSnapshotter(cms sdk.MultiStore, wasm *Keeper) *WasmSnapshotter
func (*WasmSnapshotter) RestoreExtension ¶
func (ws *WasmSnapshotter) RestoreExtension(height uint64, format uint32, payloadReader snapshot.ExtensionPayloadReader) error
func (*WasmSnapshotter) SnapshotExtension ¶
func (ws *WasmSnapshotter) SnapshotExtension(height uint64, payloadWriter snapshot.ExtensionPayloadWriter) error
func (*WasmSnapshotter) SnapshotFormat ¶
func (ws *WasmSnapshotter) SnapshotFormat() uint32
func (*WasmSnapshotter) SnapshotName ¶
func (ws *WasmSnapshotter) SnapshotName() string
func (*WasmSnapshotter) SupportedFormats ¶
func (ws *WasmSnapshotter) SupportedFormats() []uint32
Click to show internal directories.
Click to hide internal directories.