Documentation ¶
Index ¶
- Constants
- Variables
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) ActivateChainReferenceID(ctx context.Context, chainReferenceID string, ...) (retErr error)
- func (k Keeper) AddJustInTimeValsetUpdates(ctx context.Context)
- func (k *Keeper) AddMessageConsensusAttestedListener(l metrixtypes.OnConsensusMessageAttestedListener)
- func (k Keeper) AddSmartContractExecutionToConsensus(ctx context.Context, chainReferenceID, turnstoneID string, ...) (uint64, error)
- func (k Keeper) AddSupportForNewChain(ctx context.Context, chainReferenceID string, chainID uint64, ...) error
- func (k Keeper) AddUploadSmartContractToConsensus(ctx context.Context, chainReferenceID string, ...) (uint64, error)
- func (k Keeper) AddUploadUserSmartContractToConsensus(ctx context.Context, chainReferenceID string, turnstoneID string, ...) (uint64, error)
- func (k Keeper) AllSmartContractsDeployments(ctx sdk.Context) ([]*types.SmartContractDeployment, error)
- func (k Keeper) ChainsInfos(goCtx context.Context, req *types.QueryChainsInfosRequest) (*types.QueryChainsInfosResponse, error)
- func (k Keeper) ChangeMinOnChainBalance(ctx sdk.Context, chainReferenceID string, balance *big.Int) error
- func (k Keeper) CheckExternalBalancesForChain(ctx context.Context, chainReferenceID string) error
- func (k Keeper) CollectJobFundEvents(ctx context.Context) error
- func (k Keeper) CreateUserSmartContractDeployment(ctx context.Context, addr string, id uint64, targetChain string) (uint64, error)
- func (k Keeper) DeleteSmartContractDeploymentByContractID(ctx context.Context, smartContractID uint64, chainReferenceID string)
- func (k Keeper) DeleteUserSmartContract(ctx context.Context, addr string, id uint64) error
- func (k Keeper) ExecuteJob(ctx context.Context, jcfg *xchain.JobConfiguration) (uint64, error)
- func (k Keeper) GetActiveChainNames(ctx context.Context) []string
- func (k Keeper) GetAllChainInfos(ctx context.Context) ([]*types.ChainInfo, error)
- func (k Keeper) GetChainInfo(ctx context.Context, targetChainReferenceID string) (*types.ChainInfo, error)
- func (k Keeper) GetEthAddressByValidator(ctx context.Context, validator sdk.ValAddress, chainReferenceId string) (ethAddress *skywaymoduletypes.EthAddress, found bool, err error)
- func (k Keeper) GetLastCompassContract(ctx context.Context) (*types.SmartContract, error)
- func (k Keeper) GetParams(ctx context.Context) types.Params
- func (k Keeper) GetRelayWeights(ctx context.Context, chainReferenceID string) (*types.RelayWeights, error)
- func (k Keeper) GetValidatorAddressByEthAddress(ctx context.Context, ethAddr skywaymoduletypes.EthAddress, ...) (valAddr sdk.ValAddress, found bool, err error)
- func (k Keeper) GetValsetByID(goCtx context.Context, req *types.QueryGetValsetByIDRequest) (*types.QueryGetValsetByIDResponse, error)
- func (k Keeper) HasAnySmartContractDeployment(ctx context.Context, chainReferenceID string) (found bool)
- func (k Keeper) Logger(ctx context.Context) liblog.Logr
- func (k Keeper) MissingChains(ctx context.Context, inputChainReferenceIDs []string) ([]string, error)
- func (k Keeper) ModuleName() string
- func (k Keeper) OnSnapshotBuilt(ctx context.Context, snapshot *valsettypes.Snapshot)
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) PickValidatorForMessage(ctx context.Context, chainReferenceID string, ...) (string, string, error)
- func (k Keeper) PreJobExecution(ctx context.Context, job *schedulertypes.Job) error
- func (k Keeper) PublishSnapshotToAllChains(ctx context.Context, snapshot *valsettypes.Snapshot, forcePublish bool) error
- func (k Keeper) PublishValsetToChain(ctx context.Context, valset types.Valset, chain *types.ChainInfo) error
- func (k Keeper) PurgeStaleUserSmartContracts(ctx context.Context) error
- func (k Keeper) QueryGetSmartContract(goCtx context.Context, req *types.QueryGetSmartContractRequest) (*types.QueryGetSmartContractResponse, error)
- func (k Keeper) QueryGetSmartContractDeployments(goCtx context.Context, req *types.QueryGetSmartContractDeploymentsRequest) (*types.QueryGetSmartContractDeploymentsResponse, error)
- func (k Keeper) QueryUserSmartContracts(ctx context.Context, req *types.QueryUserSmartContractsRequest) (*types.QueryUserSmartContractsResponse, error)
- func (k Keeper) RemoveSupportForChain(ctx context.Context, proposal *types.RemoveChainProposal) error
- func (k Keeper) SaveNewSmartContract(ctx context.Context, abiJSON string, bytecode []byte) (*types.SmartContract, error)
- func (k Keeper) SaveUserSmartContract(ctx context.Context, addr string, c *types.UserSmartContract) (uint64, error)
- func (k Keeper) ScheduleReferenceBlockForChain(ctx context.Context, chainReferenceID string) error
- func (k Keeper) SetAsCompassContract(ctx context.Context, smartContract *types.SmartContract) error
- func (k Keeper) SetFeeManagerAddress(ctx context.Context, chainReferenceID string, address string) error
- func (k Keeper) SetParams(ctx context.Context, params types.Params)
- func (k Keeper) SetRelayWeights(ctx context.Context, chainReferenceID string, weights *types.RelayWeights) error
- func (k Keeper) SetSmartContractAsActive(ctx context.Context, smartContractID uint64, chainReferenceID string) (err error)
- func (k Keeper) SetSmartContractDeployer(ctx context.Context, chainReferenceID string, address string) error
- func (k Keeper) SetUserSmartContractDeploymentActive(ctx context.Context, addr string, id uint64, blockHeight int64, ...) error
- func (k Keeper) SetUserSmartContractDeploymentError(ctx context.Context, addr string, id uint64, blockHeight int64, ...) error
- func (k Keeper) SupportedQueues(ctx context.Context) ([]consensus.SupportsConsensusQueueAction, error)
- func (k Keeper) TryDeployingLastCompassContractToAllChains(ctx context.Context)
- func (k Keeper) UpdateChainReferenceBlock(ctx sdk.Context, chainReferenceID string, referenceBlockHeight uint64, ...) error
- func (k Keeper) UserSmartContracts(ctx context.Context, addr string) ([]*types.UserSmartContract, error)
- func (k Keeper) VerifyJob(ctx context.Context, definition, payload []byte, ...) error
- func (k Keeper) XChainReferenceIDs(ctx context.Context) []xchain.ReferenceID
- func (k Keeper) XChainType() xchain.Type
- type ValidatorInfo
Constants ¶
View Source
const ( ErrChainNotFound = liberr.Error("chain with chainReferenceID '%s' was not found") ErrChainNotActive = liberr.Error("chain with chainReferenceID '%s' is not active") ErrNotEnoughValidatorsForGivenChainReferenceID = liberr.Error("not enough validators in the current snapshot to form a proper valset") ErrUnexpectedError = liberr.Error("unexpected error") ErrConsensusNotAchieved = liberr.Error("evm: consensus not achieved") ErrFeeManagerNotPresent = liberr.Error("evm: fee manager not present") ErrCannotAddSupportForChainThatExists = liberr.Error("chain info already exists: %s") ErrCannotActiveSmartContractThatIsNotDeploying = liberr.Error("trying to activate a smart contract that is not currently deploying") ErrInvalidReferenceBlockHeight = liberr.Error("new reference block height is invalid") )
View Source
const ( ConsensusGetValidatorBalances = "validators-balances" ConsensusGetReferenceBlock = "reference-block" ConsensusCollectFundEvents = "collect-fund-events" SignaturePrefix = "\x19Ethereum Signed Message:\n32" )
Variables ¶
View Source
var SupportedConsensusQueues = []supportedChainInfo{ { // contains filtered or unexported fields }, { // contains filtered or unexported fields }, { // contains filtered or unexported fields }, { // contains filtered or unexported fields }, }
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct { ConsensusKeeper types.ConsensusKeeper SchedulerKeeper types.SchedulerKeeper Valset types.ValsetKeeper Skyway types.SkywayKeeper AddressCodec address.Codec // contains filtered or unexported fields }
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeService corestore.KVStoreService, consensusKeeper types.ConsensusKeeper, valsetKeeper types.ValsetKeeper, a address.Codec, metrixKeeper types.MetrixKeeper, treasuryKeeper types.TreasuryKeeper, ) *Keeper
func (Keeper) ActivateChainReferenceID ¶
func (Keeper) AddJustInTimeValsetUpdates ¶
func (*Keeper) AddMessageConsensusAttestedListener ¶
func (k *Keeper) AddMessageConsensusAttestedListener(l metrixtypes.OnConsensusMessageAttestedListener)
func (Keeper) AddSmartContractExecutionToConsensus ¶
func (Keeper) AddSupportForNewChain ¶
func (Keeper) AddUploadSmartContractToConsensus ¶
func (Keeper) AddUploadUserSmartContractToConsensus ¶
func (Keeper) AllSmartContractsDeployments ¶
func (Keeper) ChainsInfos ¶
func (k Keeper) ChainsInfos(goCtx context.Context, req *types.QueryChainsInfosRequest) (*types.QueryChainsInfosResponse, error)
func (Keeper) ChangeMinOnChainBalance ¶
func (Keeper) CheckExternalBalancesForChain ¶
func (Keeper) CollectJobFundEvents ¶
func (Keeper) CreateUserSmartContractDeployment ¶
func (Keeper) DeleteSmartContractDeploymentByContractID ¶
func (Keeper) DeleteUserSmartContract ¶
func (Keeper) ExecuteJob ¶
ExecuteJob schedules the definition and payload for execution via consensus queue
func (Keeper) GetActiveChainNames ¶
func (Keeper) GetAllChainInfos ¶
func (Keeper) GetChainInfo ¶
func (Keeper) GetEthAddressByValidator ¶
func (k Keeper) GetEthAddressByValidator(ctx context.Context, validator sdk.ValAddress, chainReferenceId string) (ethAddress *skywaymoduletypes.EthAddress, found bool, err error)
func (Keeper) GetLastCompassContract ¶
func (Keeper) GetRelayWeights ¶
func (Keeper) GetValidatorAddressByEthAddress ¶
func (k Keeper) GetValidatorAddressByEthAddress(ctx context.Context, ethAddr skywaymoduletypes.EthAddress, chainReferenceId string) (valAddr sdk.ValAddress, found bool, err error)
func (Keeper) GetValsetByID ¶
func (k Keeper) GetValsetByID(goCtx context.Context, req *types.QueryGetValsetByIDRequest) (*types.QueryGetValsetByIDResponse, error)
GetValsetByID returns the valset given chain id and valset id. if the valset id is non-pozitive then it returns the latest valset existing.
func (Keeper) HasAnySmartContractDeployment ¶
func (Keeper) MissingChains ¶
func (k Keeper) MissingChains(ctx context.Context, inputChainReferenceIDs []string) ([]string, error)
MissingChains returns the chains in this keeper that aren't in the input slice
func (Keeper) ModuleName ¶
func (Keeper) OnSnapshotBuilt ¶
func (k Keeper) OnSnapshotBuilt(ctx context.Context, snapshot *valsettypes.Snapshot)
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) PickValidatorForMessage ¶
func (Keeper) PreJobExecution ¶
func (Keeper) PublishSnapshotToAllChains ¶
func (Keeper) PublishValsetToChain ¶
func (Keeper) PurgeStaleUserSmartContracts ¶
Remove contracts that are not updated nor deployed for over 30 days
func (Keeper) QueryGetSmartContract ¶
func (k Keeper) QueryGetSmartContract(goCtx context.Context, req *types.QueryGetSmartContractRequest) (*types.QueryGetSmartContractResponse, error)
func (Keeper) QueryGetSmartContractDeployments ¶
func (k Keeper) QueryGetSmartContractDeployments(goCtx context.Context, req *types.QueryGetSmartContractDeploymentsRequest) (*types.QueryGetSmartContractDeploymentsResponse, error)
func (Keeper) QueryUserSmartContracts ¶
func (k Keeper) QueryUserSmartContracts( ctx context.Context, req *types.QueryUserSmartContractsRequest, ) (*types.QueryUserSmartContractsResponse, error)
func (Keeper) RemoveSupportForChain ¶
func (Keeper) SaveNewSmartContract ¶
func (Keeper) SaveUserSmartContract ¶
func (Keeper) ScheduleReferenceBlockForChain ¶
func (Keeper) SetAsCompassContract ¶
func (Keeper) SetFeeManagerAddress ¶
func (Keeper) SetRelayWeights ¶
func (Keeper) SetSmartContractAsActive ¶
func (Keeper) SetSmartContractDeployer ¶
func (Keeper) SetUserSmartContractDeploymentActive ¶
func (Keeper) SetUserSmartContractDeploymentError ¶
func (Keeper) SupportedQueues ¶
func (Keeper) TryDeployingLastCompassContractToAllChains ¶
func (Keeper) UpdateChainReferenceBlock ¶
func (Keeper) UserSmartContracts ¶
func (Keeper) XChainReferenceIDs ¶
func (k Keeper) XChainReferenceIDs(ctx context.Context) []xchain.ReferenceID
func (Keeper) XChainType ¶
Source Files ¶
- attest.go
- attest_compass_handover.go
- attest_reference_block.go
- attest_submit_logic_call.go
- attest_update_valset.go
- attest_upload_smart_contract.go
- attest_upload_user_smart_contract.go
- attest_validator_balances.go
- errors.go
- grpc_query.go
- grpc_query_chains_infos.go
- grpc_query_get_smart_contract.go
- grpc_query_get_smart_contract_deployments.go
- grpc_query_get_valset_by_id.go
- grpc_query_params.go
- grpc_user_smart_contracts.go
- keeper.go
- msg_assigner.go
- msg_server.go
- msg_server_remove_smart_contract_deployment.go
- msg_server_user_smart_contract.go
- params.go
- scheduler_job.go
- smart_contract_deployment.go
- treasury.go
- user_smart_contract.go
Click to show internal directories.
Click to hide internal directories.