Documentation ¶
Index ¶
- Constants
- Variables
- func BeginBlocker(ctx sdk.Context, k Keeper)
- func EndBlocker(ctx sdk.Context, k Keeper)
- type AppModule
- func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock)
- func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
- func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
- func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
- func (AppModule) Name() string
- func (am AppModule) NewHandler() sdk.Handler
- func (am AppModule) NewQuerierHandler() sdk.Querier
- func (am AppModule) QuerierRoute() string
- func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
- func (am AppModule) Route() string
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis() json.RawMessage
- func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
- func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
- func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
- type Cache
- func (c *Cache) AddBlock(b evm.Block)
- func (c *Cache) AddContractCode(address string, code []byte)
- func (c *Cache) AddTransaction(t evm.Transaction)
- func (c *Cache) AddTransactionReceipt(tr evm.TransactionReceipt)
- func (c *Cache) GetBlock() evm.Block
- func (c *Cache) GetContractCodes() map[string][]byte
- func (c *Cache) GetTransactionReceipts() []evm.TransactionReceipt
- func (c *Cache) GetTransactions() []evm.Transaction
- func (c *Cache) Reset()
- type CacheQueue
- type EvmKeeper
- type Keeper
- type MySQLEngine
- type Stream
- type StreamContext
- type Task
- type TaskConst
Constants ¶
View Source
const ( ModuleName = types.ModuleName QuerierRoute = types.QuerierRoute RouterKey = types.RouterKey )
View Source
const ( FlagEnable = "infura.enable" FlagRedisUrl = "infura.redis-url" FlagRedisAuth = "infura.redis-auth" FlagRedisDB = "infura.redis-db" FlagMysqlUrl = "infura.mysql-url" FlagMysqlUser = "infura.mysql-user" FlagMysqlPass = "infura.mysql-pass" FlagMysqlDB = "infura.mysql-db" FlagCacheQueueSize = "infura.cache-queue-size" )
Variables ¶
View Source
var TaskConstDesc = map[TaskConst]string{ TaskStatusInvalid: "STREAM_TASK_STATUS_INVALID", TaskStatusSuccess: "STREAM_TASK_STATUS_SUCCESS", TaskStatusStatusFail: "STREAM_TASK_STATUS_FAIL", TaskPhase1NextActionRestart: "STREAM_TASK_PHRASE1_NEXT_ACTION_RESTART", TaskPhase1NextActionJumpNextBlock: "STREAM_TASK_PHRASE1_NEXT_ACTION_JUMP_NEXT_BLK", TaskPhase1NextActionNewTask: "STREAM_TASK_PHRASE1_NEXT_ACTION_NEW_TASK", TaskPhase1NextActionReturnTask: "STREAM_TASK_PHRASE1_NEXT_ACTION_RERUN_TASK", TaskPhase1NextActionUnknown: "STREAM_TASK_PHRASE1_NEXT_ACTION_UNKNOWN", TaskPhase2NextActionRestart: "STREAM_TASK_PHRASE2_NEXT_ACTION_RESTART", TaskPhase2NextActionJumpNextBlock: "STREAM_TASK_PHRASE2_NEXT_ACTION_JUMP_NEXT_BLK", }
Functions ¶
func BeginBlocker ¶
BeginBlocker runs the logic of BeginBlocker with version 0. BeginBlocker resets keeper cache.
func EndBlocker ¶
Types ¶
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
func NewAppModule ¶
NewAppModule creates a new AppModule Object
func (AppModule) BeginBlock ¶
func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock)
func (AppModule) EndBlock ¶
func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
func (AppModule) ExportGenesis ¶
func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
func (AppModule) InitGenesis ¶
func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
func (AppModule) NewHandler ¶
func (AppModule) NewQuerierHandler ¶
func (AppModule) QuerierRoute ¶
func (AppModule) RegisterInvariants ¶
func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
type AppModuleBasic ¶
type AppModuleBasic struct{}
app module Basics object
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis() json.RawMessage
func (AppModuleBasic) GetQueryCmd ¶
func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
Get the root query command of this module
func (AppModuleBasic) GetTxCmd ¶
func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
Get the root tx command of this module
func (AppModuleBasic) Name ¶
func (AppModuleBasic) Name() string
func (AppModuleBasic) RegisterCodec ¶
func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
func (AppModuleBasic) RegisterRESTRoutes ¶
func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
Register rest routes
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
Validation check of the Genesis
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) AddContractCode ¶
func (*Cache) AddTransaction ¶
func (c *Cache) AddTransaction(t evm.Transaction)
func (*Cache) AddTransactionReceipt ¶
func (c *Cache) AddTransactionReceipt(tr evm.TransactionReceipt)
func (*Cache) GetContractCodes ¶
func (*Cache) GetTransactionReceipts ¶
func (c *Cache) GetTransactionReceipts() []evm.TransactionReceipt
func (*Cache) GetTransactions ¶
func (c *Cache) GetTransactions() []evm.Transaction
type CacheQueue ¶
type CacheQueue struct {
// contains filtered or unexported fields
}
func (*CacheQueue) Enqueue ¶
func (cq *CacheQueue) Enqueue(sc StreamContext)
func (*CacheQueue) Start ¶
func (cq *CacheQueue) Start()
type EvmKeeper ¶
type EvmKeeper interface {
SetObserverKeeper(keeper evm.InfuraKeeper)
}
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
nolint
func (Keeper) OnSaveBlock ¶
func (Keeper) OnSaveContractCode ¶
func (Keeper) OnSaveTransaction ¶
func (k Keeper) OnSaveTransaction(t evm.Transaction)
func (Keeper) OnSaveTransactionReceipt ¶
func (k Keeper) OnSaveTransactionReceipt(tr evm.TransactionReceipt)
type MySQLEngine ¶
type MySQLEngine struct {
// contains filtered or unexported fields
}
func (*MySQLEngine) Write ¶
func (e *MySQLEngine) Write(streamData types.IStreamData) bool
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
Stream maintains the infura engine
type StreamContext ¶
type StreamContext struct {
// contains filtered or unexported fields
}
type Task ¶
type Task struct { Height int64 `json:"height"` Done bool `json:"done"` UpdatedAt int64 `json:"updatedAt"` Data types.IStreamData `json:"-"` }
type TaskConst ¶
type TaskConst int
const ( // Phase 1 task status TaskPhase1NextActionRestart TaskConst = 100 + iota TaskPhase1NextActionJumpNextBlock TaskPhase1NextActionNewTask TaskPhase1NextActionReturnTask TaskPhase1NextActionUnknown // Phase 2 task status TaskPhase2NextActionRestart TaskConst = 200 + iota TaskPhase2NextActionJumpNextBlock )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.