Documentation ¶
Index ¶
- Constants
- Variables
- func GetCorkForValidatorAddressKeyV1(val sdk.ValAddress, contract common.Address) []byte
- func GetCorkResultKey(id []byte) []byte
- func GetCorkResultPrefix() []byte
- func GetCorkValidatorKeyPrefixV1(val sdk.ValAddress) []byte
- func GetScheduledCorkKey(blockHeight uint64, id []byte, val sdk.ValAddress, contract common.Address) []byte
- func GetScheduledCorkKeyByBlockHeightPrefix(blockHeight uint64) []byte
- func GetScheduledCorkKeyPrefix() []byte
- func GetScheduledCorkKeyV1(blockHeight uint64, val sdk.ValAddress, contract common.Address) []byte
- func GetValidatorCorkCountKey(val sdk.ValAddress) []byte
- func MakeCellarIDsKey() []byte
- type GravityKeeper
- type PubsubKeeper
- type StakingKeeper
Constants ¶
View Source
const ( EventTypeCork = "cork" EventTypeCommitPeriod = "commit_period" AttributeKeySigner = "signer" AttributeKeyValidator = "validator" AttributeKeyPrevoteHash = "hash" AttributeKeyCork = "cork" AttributeKeyCommitPeriodStart = "commit_period_start" AttributeKeyCommitPeriodEnd = "commit_period_end" AttributeKeyBlockHeight = "block_height" AttributeValueCategory = ModuleName )
cork module event types
View Source
const ( // ModuleName is the module name constant used in many places ModuleName = "cork" // StoreKey is the store key string for oracle StoreKey = ModuleName // RouterKey is the message route for oracle RouterKey = ModuleName // QuerierRoute is the querier route for oracle QuerierRoute = ModuleName )
View Source
const ( // CorkForAddressKeyPrefix - <prefix><val_address><address> -> <cork> CorkForAddressKeyPrefix // key for corks -- removed as of cork v2, left to preserve ID values // CommitPeriodStartKey - <prefix> -> int64(height) CommitPeriodStartKey // key for commit period height start -- removed as of cork v2, left to preserve ID values // LatestInvalidationNonceKey - <prefix> -> uint64(latestNonce) LatestInvalidationNonceKey // CellarIDsKey - <prefix> -> []string CellarIDsKey // ScheduledCorkKeyPrefix - <prefix><block_height><val_address><address> -> <cork> ScheduledCorkKeyPrefix // LatestCorkIDKey - <key> -> uint64(latestCorkID) LatestCorkIDKey // CorkResultPrefix - <prefix><id> -> CorkResult CorkResultPrefix // ValidatorCorkCountKey - <prefix><val_address> -> uint64(count) ValidatorCorkCountKey )
Keys for cork store, with <prefix><key> -> <value>
Variables ¶
View Source
var ( ErrInvalidEthereumAddress = errorsmod.Register(ModuleName, 2, "invalid ethereum address") ErrUnmanagedCellarAddress = errorsmod.Register(ModuleName, 3, "cork sent to address that has not passed governance") ErrEmptyContractCall = errorsmod.Register(ModuleName, 4, "cork has an empty contract call body") ErrSchedulingInThePast = errorsmod.Register(ModuleName, 5, "cork is trying to be scheduled for a block that has already passed") ErrInvalidJSON = errorsmod.Register(ModuleName, 6, "invalid json") ErrValidatorCorkCapacityReached = errorsmod.Register(ModuleName, 7, "validator cork capacity reached") )
x/cork module sentinel errors
Functions ¶
func GetCorkForValidatorAddressKeyV1 ¶
func GetCorkForValidatorAddressKeyV1(val sdk.ValAddress, contract common.Address) []byte
func GetCorkResultKey ¶
func GetCorkResultPrefix ¶
func GetCorkResultPrefix() []byte
func GetCorkValidatorKeyPrefixV1 ¶
func GetCorkValidatorKeyPrefixV1(val sdk.ValAddress) []byte
func GetScheduledCorkKey ¶
func GetScheduledCorkKeyPrefix ¶
func GetScheduledCorkKeyPrefix() []byte
func GetScheduledCorkKeyV1 ¶
func GetValidatorCorkCountKey ¶
func GetValidatorCorkCountKey(val sdk.ValAddress) []byte
func MakeCellarIDsKey ¶
func MakeCellarIDsKey() []byte
Types ¶
type GravityKeeper ¶
type GravityKeeper interface { SetOutgoingTx(ctx sdk.Context, outgoing gravitytypes.OutgoingTx) CreateContractCallTx( ctx sdk.Context, invalidationNonce uint64, invalidationScope tmbytes.HexBytes, address common.Address, payload []byte, tokens []gravitytypes.ERC20Token, fees []gravitytypes.ERC20Token) *gravitytypes.ContractCallTx GetOrchestratorValidatorAddress(ctx sdk.Context, orchAddr sdk.AccAddress) sdk.ValAddress GetValidatorEthereumAddress(ctx sdk.Context, valAddr sdk.ValAddress) common.Address GetEthereumOrchestratorAddress(ctx sdk.Context, ethAddr common.Address) sdk.AccAddress SetOrchestratorValidatorAddress(ctx sdk.Context, val sdk.ValAddress, orchAddr sdk.AccAddress) }
GravityKeeper defines the expected gravity keeper methods
type PubsubKeeper ¶
type PubsubKeeper interface { GetPublisher(ctx sdk.Context, publisherDomain string) (publisher pubsubtypes.Publisher, found bool) SetDefaultSubscription(ctx sdk.Context, defaultSubscription pubsubtypes.DefaultSubscription) DeleteDefaultSubscription(ctx sdk.Context, subscriptionID string) }
type StakingKeeper ¶
type StakingKeeper interface { GetBondedValidatorsByPower(ctx sdk.Context) []stakingtypes.Validator GetLastValidatorPower(ctx sdk.Context, operator sdk.ValAddress) int64 GetLastTotalPower(ctx sdk.Context) (power math.Int) IterateValidators(sdk.Context, func(index int64, validator stakingtypes.ValidatorI) (stop bool)) IterateBondedValidatorsByPower(sdk.Context, func(index int64, validator stakingtypes.ValidatorI) (stop bool)) IterateLastValidators(sdk.Context, func(index int64, validator stakingtypes.ValidatorI) (stop bool)) Validator(sdk.Context, sdk.ValAddress) stakingtypes.ValidatorI ValidatorByConsAddr(sdk.Context, sdk.ConsAddress) stakingtypes.ValidatorI Slash(sdk.Context, sdk.ConsAddress, int64, int64, sdk.Dec) math.Int Jail(sdk.Context, sdk.ConsAddress) PowerReduction(ctx sdk.Context) math.Int }
StakingKeeper defines the expected staking keeper methods
Click to show internal directories.
Click to hide internal directories.