rollup

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 24 Imported by: 1

README

x/rollup

This module implements rollup-chain specific logic.

Deposits

Unlike other cosmos-sdk modules, its state mutation doesn't go through regular tx flow. Instead, states are mutated in response to L1 deposit txs, and do not need L2 tx signatures.

Sequencer and verifiers must include L1 deposit txs in L2 blocks without any modification.

Withdrawals

Withdrawals are initiated by L2 users through the rollup module. If a valid withdrawal request is submitted, the user's L2 ETH is burnt through the bank module. Monomer will then send an L2 state commitment to L1 through the OP Stack and the user will be able to prove and finalize their withdrawal.

State

L1 attributes are stored in this module. Other L2 clients can reference this module to get L1 info for their verifications.

L1 user deposit txs are applied to other modules like x/bank and do not mutate this module's state. The rollup module only serves as a gatekeeper for event logging.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProvideApplyUserDepositGetSigner added in v0.1.6

func ProvideApplyUserDepositGetSigner() signing.CustomGetSigner

func ProvideSetL1AttributesGetSigner added in v0.1.6

func ProvideSetL1AttributesGetSigner() signing.CustomGetSigner

Types

type AppModule

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

AppModule implements the AppModule interface for the rollup module.

func NewAppModule

func NewAppModule(
	cdc codec.Codec,
	k *keeper.Keeper,
) AppModule

func (AppModule) ConsensusVersion

func (AppModule) ConsensusVersion() uint64

ConsensusVersion implements ConsensusVersion.

func (AppModule) ExportGenesis

func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage

ExportGenesis returns the rollup module's exported genesis state as raw JSON bytes.

func (AppModule) InitGenesis added in v0.1.3

func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage)

InitGenesis performs genesis initialization for the rollup module.

func (AppModule) IsAppModule

func (am AppModule) IsAppModule()

func (AppModule) IsOnePerModuleType

func (am AppModule) IsOnePerModuleType()

func (AppModule) Name

func (am AppModule) Name() string

Name returns the rollup module's name.

func (AppModule) QuerierRoute

func (AppModule) QuerierRoute() string

QuerierRoute returns the rollup module's query routing key.

func (AppModule) RegisterInvariants

func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry)

RegisterInvariants registers the rollup module's invariants.

func (AppModule) RegisterServices

func (am AppModule) RegisterServices(cfg module.Configurator)

RegisterServices registers a Msg service to respond to module-specific messages and a GRPC query service to respond to module-specific GRPC queries.

type AppModuleBasic

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

AppModuleBasic implements the AppModuleBasic interface for the rollup module.

func NewAppModuleBasic

func NewAppModuleBasic(cdc codec.BinaryCodec) AppModuleBasic

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage

DefaultGenesis returns the rollup module's default genesis state.

func (AppModuleBasic) GetQueryCmd

func (AppModuleBasic) GetQueryCmd() *cobra.Command

GetQueryCmd returns the rollup module's root query command.

func (AppModuleBasic) GetTxCmd

func (a AppModuleBasic) GetTxCmd() *cobra.Command

GetTxCmd returns the rollup module's root tx command.

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

Name returns the rollup module's name.

func (AppModuleBasic) RegisterCodec

func (AppModuleBasic) RegisterCodec(_ *codec.LegacyAmino)

func (AppModuleBasic) RegisterGRPCGatewayRoutes

func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux)

RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module.

func (AppModuleBasic) RegisterInterfaces

func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry)

RegisterInterfaces registers the module's interface types

func (AppModuleBasic) RegisterLegacyAminoCodec

func (AppModuleBasic) RegisterLegacyAminoCodec(_ *codec.LegacyAmino)

func (AppModuleBasic) RegisterRESTRoutes

func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router)

RegisterRESTRoutes registers the rollup module's REST service handlers.

func (AppModuleBasic) ValidateGenesis

func (AppModuleBasic) ValidateGenesis(
	cdc codec.JSONCodec,
	_ client.TxEncodingConfig,
	bz json.RawMessage,
) error

ValidateGenesis performs genesis state validation for the rollup module.

type ModuleInputs

type ModuleInputs struct {
	depinject.In

	Config        *modulev1.Module
	Codec         codec.Codec
	StoreService  store.KVStoreService
	BankKeeper    bankkeeper.Keeper
	AccountKeeper authkeeper.AccountKeeper
}

type ModuleOutputs

type ModuleOutputs struct {
	depinject.Out

	Keeper *keeper.Keeper
	Module appmodule.AppModule
}

func ProvideModule

func ProvideModule(in ModuleInputs) ModuleOutputs

Directories

Path Synopsis
Package testutil is a generated GoMock package.
Package testutil is a generated GoMock package.
tx

Jump to

Keyboard shortcuts

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