Documentation ¶
Index ¶
- Constants
- Variables
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) ActivateChainReferenceID(ctx sdk.Context, chainReferenceID string, smartContract *types.SmartContract, ...) (retErr error)
- func (k Keeper) AddSmartContractExecutionToConsensus(ctx sdk.Context, chainReferenceID, turnstoneID string, ...) (uint64, error)
- func (k Keeper) AddSupportForNewChain(ctx sdk.Context, chainReferenceID string, chainID uint64, blockHeight 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 sdk.Context, chainReferenceID string) error
- func (k Keeper) CollectJobFundEvents(ctx sdk.Context) error
- func (k Keeper) DeleteSmartContractDeploymentByContractID(ctx sdk.Context, smartContractID uint64, chainReferenceID string)
- func (k Keeper) DeployNewSmartContract(goCtx context.Context, msg *types.MsgDeployNewSmartContractRequest) (*types.DeployNewSmartContractResponse, error)
- func (k Keeper) ExecuteJob(ctx sdk.Context, jcfg *xchain.JobConfiguration) (uint64, error)
- func (k Keeper) GetAllChainInfos(ctx sdk.Context) ([]*types.ChainInfo, error)
- func (k Keeper) GetChainInfo(ctx sdk.Context, targetChainReferenceID string) (*types.ChainInfo, error)
- func (k Keeper) GetEthAddressByValidator(ctx sdk.Context, validator sdk.ValAddress, chainReferenceId string) (ethAddress *gravitymoduletypes.EthAddress, found bool, err error)
- func (k Keeper) GetLastCompassContract(ctx sdk.Context) (*types.SmartContract, error)
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) GetRelayWeights(ctx sdk.Context, chainReferenceID string) (*types.RelayWeights, error)
- func (k Keeper) GetValidatorAddressByEthAddress(ctx sdk.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 sdk.Context, chainReferenceID string) (found bool)
- func (k Keeper) Logger(ctx sdk.Context) liblog.Logr
- func (k Keeper) MissingChains(ctx sdk.Context, inputChainReferenceIDs []string) ([]string, error)
- func (k Keeper) ModuleName() string
- func (k Keeper) OnSnapshotBuilt(ctx sdk.Context, snapshot *valsettypes.Snapshot)
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) PickValidatorForMessage(ctx sdk.Context, chainReferenceID string, requirements *xchain.JobRequirements) (string, error)
- func (k Keeper) PreJobExecution(ctx sdk.Context, job *schedulertypes.Job) error
- func (k Keeper) PublishSnapshotToAllChains(ctx sdk.Context, snapshot *valsettypes.Snapshot, forcePublish bool) error
- func (k Keeper) PublishValsetToChain(ctx sdk.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 sdk.Context, proposal *types.RemoveChainProposal) error
- func (k Keeper) SaveNewSmartContract(ctx sdk.Context, abiJSON string, bytecode []byte) (*types.SmartContract, error)
- func (k Keeper) SetAsCompassContract(ctx sdk.Context, smartContract *types.SmartContract) error
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetRelayWeights(ctx sdk.Context, chainReferenceID string, weights *types.RelayWeights) error
- func (k Keeper) SetSmartContractDeploymentStatusByContractID(ctx sdk.Context, smartContractID uint64, chainReferenceID string, ...) error
- func (k Keeper) SupportedQueues(ctx sdk.Context) ([]consensus.SupportsConsensusQueueAction, error)
- func (k Keeper) TryDeployingLastCompassContractToAllChains(ctx sdk.Context)
- func (k Keeper) VerifyJob(ctx sdk.Context, definition, payload []byte, ...) error
- func (k Keeper) XChainReferenceIDs(ctx sdk.Context) []xchain.ReferenceID
- func (k Keeper) XChainType() xchain.Type
- type MsgAssigner
- type ValidatorInfo
Constants ¶
View Source
const ( ErrChainNotFound = whoops.Errorf("chain with chainReferenceID '%s' was not found") ErrChainNotActive = whoops.Errorf("chain with chainReferenceID '%s' is not active") ErrNotEnoughValidatorsForGivenChainReferenceID = whoops.String("not enough validators in the current snapshot to form a proper valset") ErrUnexpectedError = whoops.String("unexpected error") ErrConsensusNotAchieved = whoops.String("evm: consensus not achieved") ErrCannotAddSupportForChainThatExists = whoops.Errorf("chain info already exists: %s") ErrCannotActiveSmartContractThatIsNotDeploying = whoops.String("trying to activate a smart contract that is not currently deploying") )
View Source
const ( ConsensusTurnstoneMessage = "evm-turnstone-message" ConsensusGetValidatorBalances = "validators-balances" 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 }, }
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 // contains filtered or unexported fields }
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey storetypes.StoreKey, ps paramtypes.Subspace, consensusKeeper types.ConsensusKeeper, valsetKeeper types.ValsetKeeper, ) *Keeper
func (Keeper) ActivateChainReferenceID ¶
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 sdk.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 sdk.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
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 sdk.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) SetAsCompassContract ¶ added in v1.7.0
func (Keeper) SetRelayWeights ¶ added in v1.4.0
func (Keeper) SetSmartContractDeploymentStatusByContractID ¶ added in v1.9.1
func (Keeper) SupportedQueues ¶
func (Keeper) TryDeployingLastCompassContractToAllChains ¶ added in v1.7.0
func (Keeper) XChainReferenceIDs ¶ added in v0.10.0
func (k Keeper) XChainReferenceIDs(ctx sdk.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 sdk.Context, weights *types.RelayWeights, chainID string, req *xchain.JobRequirements) (string, error)
Source Files ¶
- attest.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.