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) 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) 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) DeleteSmartContractDeploymentByContractID(ctx context.Context, smartContractID uint64, chainReferenceID string)
- func (k Keeper) DeployNewSmartContract(goCtx context.Context, msg *types.MsgDeployNewSmartContractRequest) (*types.DeployNewSmartContractResponse, error)
- func (k Keeper) ExecuteJob(ctx context.Context, jcfg *xchain.JobConfiguration) (uint64, error)
- 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 *gravitymoduletypes.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 gravitymoduletypes.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, 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) 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) RemoveSmartContractDeployment(ctx context.Context, req *types.MsgRemoveSmartContractDeploymentRequest) (*types.RemoveSmartContractDeploymentResponse, 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) ScheduleReferenceBlockForChain(ctx context.Context, chainReferenceID string) error
- func (k Keeper) SetAsCompassContract(ctx context.Context, smartContract *types.SmartContract) 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) 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) VerifyJob(ctx context.Context, definition, payload []byte, ...) error
- func (k Keeper) XChainReferenceIDs(ctx context.Context) []xchain.ReferenceID
- func (k Keeper) XChainType() xchain.Type
- type MsgAssigner
- 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") 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 ( ConsensusTurnstoneMessage = "evm-turnstone-message" 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 Gravity types.GravityKeeper 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, ) *Keeper
func (Keeper) ActivateChainReferenceID ¶
func (*Keeper) AddMessageConsensusAttestedListener ¶ added in v1.12.0
func (k *Keeper) AddMessageConsensusAttestedListener(l metrixtypes.OnConsensusMessageAttestedListener)
func (Keeper) AddSmartContractExecutionToConsensus ¶
func (Keeper) AddSupportForNewChain ¶
func (Keeper) AllSmartContractsDeployments ¶ added in v0.6.0
func (Keeper) ChainsInfos ¶
func (k Keeper) ChainsInfos(goCtx context.Context, req *types.QueryChainsInfosRequest) (*types.QueryChainsInfosResponse, error)
func (Keeper) ChangeMinOnChainBalance ¶ added in v0.8.0
func (Keeper) CheckExternalBalancesForChain ¶ added in v0.6.0
func (Keeper) CollectJobFundEvents ¶ added in v0.10.2
func (Keeper) DeleteSmartContractDeploymentByContractID ¶ added in v1.9.1
func (Keeper) DeployNewSmartContract ¶ added in v1.7.0
func (k Keeper) DeployNewSmartContract(goCtx context.Context, msg *types.MsgDeployNewSmartContractRequest) (*types.DeployNewSmartContractResponse, error)
func (Keeper) ExecuteJob ¶ added in v0.10.0
ExecuteJob schedules the definition and payload for execution via consensus queue
func (Keeper) GetAllChainInfos ¶
func (Keeper) GetChainInfo ¶
func (Keeper) GetEthAddressByValidator ¶ added in v1.8.0
func (k Keeper) GetEthAddressByValidator(ctx context.Context, validator sdk.ValAddress, chainReferenceId string) (ethAddress *gravitymoduletypes.EthAddress, found bool, err error)
func (Keeper) GetLastCompassContract ¶ added in v1.7.0
func (Keeper) GetRelayWeights ¶ added in v1.4.0
func (Keeper) GetValidatorAddressByEthAddress ¶ added in v1.8.0
func (k Keeper) GetValidatorAddressByEthAddress(ctx context.Context, ethAddr gravitymoduletypes.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 ¶ added in v1.7.0
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 ¶ added in v0.6.0
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 ¶ added in v1.4.0
func (Keeper) PreJobExecution ¶ added in v1.2.0
func (Keeper) PublishSnapshotToAllChains ¶ added in v1.7.0
func (Keeper) PublishValsetToChain ¶ added in v1.7.0
func (Keeper) QueryGetSmartContract ¶ added in v0.6.0
func (k Keeper) QueryGetSmartContract(goCtx context.Context, req *types.QueryGetSmartContractRequest) (*types.QueryGetSmartContractResponse, error)
func (Keeper) QueryGetSmartContractDeployments ¶ added in v0.6.0
func (k Keeper) QueryGetSmartContractDeployments(goCtx context.Context, req *types.QueryGetSmartContractDeploymentsRequest) (*types.QueryGetSmartContractDeploymentsResponse, error)
func (Keeper) RemoveSmartContractDeployment ¶ added in v0.6.0
func (k Keeper) RemoveSmartContractDeployment(ctx context.Context, req *types.MsgRemoveSmartContractDeploymentRequest) (*types.RemoveSmartContractDeploymentResponse, error)
func (Keeper) RemoveSupportForChain ¶
func (Keeper) SaveNewSmartContract ¶
func (Keeper) ScheduleReferenceBlockForChain ¶ added in v1.14.0
func (Keeper) SetAsCompassContract ¶ added in v1.7.0
func (Keeper) SetRelayWeights ¶ added in v1.4.0
func (Keeper) SetSmartContractAsActive ¶ added in v1.11.0
func (Keeper) SupportedQueues ¶
func (Keeper) TryDeployingLastCompassContractToAllChains ¶ added in v1.7.0
func (Keeper) UpdateChainReferenceBlock ¶ added in v1.14.0
func (Keeper) XChainReferenceIDs ¶ added in v0.10.0
func (k Keeper) XChainReferenceIDs(ctx context.Context) []xchain.ReferenceID
func (Keeper) XChainType ¶ added in v0.10.0
type MsgAssigner ¶ added in v1.4.0
type MsgAssigner struct {
ValsetKeeper types.ValsetKeeper
}
func (MsgAssigner) PickValidatorForMessage ¶ added in v1.4.0
func (ma MsgAssigner) PickValidatorForMessage(ctx context.Context, weights *types.RelayWeights, chainID string, req *xchain.JobRequirements) (string, error)
Source Files ¶
- attest.go
- attest_reference_block.go
- attest_submit_logic_call.go
- attest_update_valset.go
- attest_upload_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
- keeper.go
- msg_assigner.go
- msg_server.go
- msg_server_deloy_new_smart_contract.go
- msg_server_remove_smart_contract_deployment.go
- params.go
- scheduler_job.go
- smart_contract_deployment.go
- treasury.go
Click to show internal directories.
Click to hide internal directories.