# Functions
DefaultGenesisState returns empty genesis state.
DefaultParams returns a copy of the default params.
ValidateEthereumSignature takes a message, an associated signature and public key and returns an error if the signature isn't valid.
EthAddrLessThan migrates the Ethereum address less than function.
GetAttestationKey returns the following key format prefix nonce claim-details-hash [0x5][0 0 0 0 0 0 0 1][fd1af8cec6c67fcf156f1b61fdf91ebc04d05484d007436e75342fc05bbff35a] An attestation is an event multiple people are voting on, this function needs the claim details because each Attestation is aggregating all claims of a specific event, lets say validator X and validator y where making different claims about the same event nonce Note that the claim hash does NOT include the claimer address and only identifies an event.
GetAttestationKeyWithHash returns the following key format prefix nonce claim-details-hash [0x5][0 0 0 0 0 0 0 1][fd1af8cec6c67fcf156f1b61fdf91ebc04d05484d007436e75342fc05bbff35a] An attestation is an event multiple people are voting on, this function needs the claim details because each Attestation is aggregating all claims of a specific event, lets say validator X and validator y where making different claims about the same event nonce Note that the claim hash does NOT include the claimer address and only identifies an event.
GetBatchConfirmKey returns the following key format prefix eth-contract-address BatchNonce Validator-address [0xe1][0xc783df8a850f42e7F7e57013759C285caa701eB6][0 0 0 0 0 0 0 1][cosmosvaloper1ahx7f8wyertuus9r20284ej0asrs085case3kn] TODO this should be a sdk.ValAddress.
No description provided by the author
No description provided by the author
GetEthAddressByValidatorKey returns the following key format prefix cosmos-validator [0x0][cosmosvaloper1ahx7f8wyertuus9r20284ej0asrs085case3kn].
No description provided by the author
GetFeeSecondIndexKey returns the following key format prefix eth-contract-address fee_amount [0x9][0xc783df8a850f42e7F7e57013759C285caa701eB6][0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0].
GetLastEventByValidatorKey indexes lateset event by validator GetLastEventByValidatorKey returns the following key format prefix cosmos-validator [0x0][cosmos1ahx7f8wyertuus9r20284ej0asrs085case3kn].
GetLastEventNonceByValidatorKey indexes lateset event nonce by validator GetLastEventNonceByValidatorKey returns the following key format prefix cosmos-validator [0x0][cosmos1ahx7f8wyertuus9r20284ej0asrs085case3kn].
GetOrchestratorAddressKey returns the following key format prefix [0xe8][cosmos1ahx7f8wyertuus9r20284ej0asrs085case3kn].
GetOutgoingTxBatchBlockKey returns the following key format prefix blockheight [0xb][0 0 0 0 2 1 4 3].
GetOutgoingTxBatchKey returns the following key format prefix nonce eth-contract-address [0xa][0 0 0 0 0 0 0 1][0xc783df8a850f42e7F7e57013759C285caa701eB6].
GetOutgoingTxPoolKey returns the following key format prefix id [0x6][0 0 0 0 0 0 0 1].
GetPastEthSignatureCheckpointKey returns the following key format prefix checkpoint [0x0][ checkpoint bytes ].
GetValidatorByEthAddressKey returns the following key format prefix cosmos-validator [0xf9][0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B].
GetValsetConfirmKey returns the following key format prefix nonce validator-address [0x0][0 0 0 0 0 0 0 1][cosmos1ahx7f8wyertuus9r20284ej0asrs085case3kn] MARK finish-batches: this is where the key is created in the old (presumed working) code.
GetValsetKey returns the following key format prefix nonce [0x0][0 0 0 0 0 0 0 1].
NewERC20Token returns a new instance of an ERC20.
Creates a new EthAddress from a string, performing validation and returning any validation errors.
NewEthereumSignature creates a new signuature over a given byte array.
NewMsgCancelSendToEth returns a new msgMsgCancelSendToEth.
No description provided by the author
NewMsgRequestBatch returns a new msgRequestBatch.
NewMsgSendToEth returns a new msgSendToEth.
NewMsgSetOrchestratorAddress returns a new MsgSetOrchestratorAddresses.
NewMsgValsetConfirm returns a new msgValsetConfirm.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewValset returns a new valset.
ParamKeyTable for auth module.
No description provided by the author
RegisterInterfaces registers the interfaces for the proto stuff.
RegisterLegacyAminoCodec registers concrete types on the Amino codec.
No description provided by the author
No description provided by the author
UInt64Bytes uses the SDK byte marshaling to encode a uint64.
UInt64FromBytes create uint from binary big endian representation.
UInt64FromString to parse out a uint64 for a nonce.
ValidateEthAddress validates the ethereum address strings.
ValidateEthereumSignature takes a message, an associated signature and public key and returns an error if the signature isn't valid.
Returns a new EthAddress with 0x0000000000000000000000000000000000000000 as the wrapped address.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DefaultParamspace defines the default peggy module parameter subspace.
ETHContractAddressLen is the length of contract address bytes.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ModuleName is the name of the module.
OutgoingBatchTxCheckpointABIJSON checks the ETH ABI for compatibility of the OutgoingBatchTx message.
PeggyDenomLen is the length of the denoms generated by the peggy module.
PeggyDenomPrefix indicates the prefix for all assests minted by this module.
PeggyDenomSeparator is the separator for peggy denoms.
constants.
constants.
QuerierRoute to be used for querierer msgs.
RouterKey is the module name router key.
No description provided by the author
No description provided by the author
No description provided by the author
StoreKey to be used when creating the KVStore.
No description provided by the author
No description provided by the author
ValsetCheckpointABIJSON checks the ETH ABI for compatibility of the Valset update message.
ZeroAddress is an EthAddress containing the zero ethereum address.
# Variables
BatchConfirmKey indexes validator confirmations by token contract address.
No description provided by the author
No description provided by the author
DenomToERC20Key prefixes the index of Cosmos originated asset denoms to ERC20s.
ERC20ToDenomKey prefixes the index of Cosmos originated assets ERC20s to denoms.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
EthAddressByValidatorKey indexes cosmos validator account addresses i.e.
No description provided by the author
KeyLastOutgoingBatchID indexes the lastBatchID.
KeyLastTXPoolID indexes the lastTxPoolID.
KeyOrchestratorAddress indexes the validator keys for an orchestrator.
LastEventByValidatorKey indexes lateset claim event by validator.
LastEventNonceByValidatorKey indexes lateset event nonce by validator.
LastObservedEthereumBlockHeightKey indexes the latest Ethereum block height.
LastObservedEventNonceKey indexes the latest event nonce.
LastObservedValsetNonceKey indexes the latest observed valset nonce HERE THERE BE DRAGONS, do not use this value as an up to date validator set on Ethereum it will always lag significantly and may be totally wrong at some times.
LastSlashedBatchBlock indexes the latest slashed batch block height.
LastSlashedValsetNonce indexes the latest slashed valset nonce.
LastUnbondingBlockHeight indexes the last validator unbonding block height.
LatestValsetNonce indexes the latest valset nonce.
ModuleCdc is the codec for the module.
OracleAttestationKey attestation details by nonce and validator address i.e.
OutgoingTXBatchBlockKey indexes outgoing tx batches under a block height and token address.
OutgoingTXBatchKey indexes outgoing tx batches under a nonce and token address.
OutgoingTXPoolKey indexes the last nonce for the outgoing tx pool.
ParamKey indexes peggy's module params.
ParamsStoreKeyAverageBlockTime stores the average block time of the Injective Chain in milliseconds.
ParamsStoreKeyAverageEthereumBlockTime stores the average block time of Ethereum in milliseconds.
ParamsStoreKeyBridgeContractAddress stores the contract address.
ParamsStoreKeyBridgeContractChainID stores the bridge chain id.
ParamsStoreKeyBridgeContractStartHeight stores the bridge contract deployed height.
ParamsStoreKeyContractHash stores the contract hash.
ParamsStoreKeyCosmosCoinDenom stores native cosmos coin denom.
ParamsStoreKeyCosmosCoinErc20Contract store L1 erc20 contract address of cosmos native coin.
ParamsStoreKeyPeggyID stores the peggy id.
ParamsStoreKeySignedBatchesWindow stores the signed blocks window.
ParamsStoreKeySignedClaimsWindow stores the signed blocks window.
ParamsStoreKeySignedValsetsWindow stores the signed blocks window.
ParamsStoreKeyTargetBatchTimeout stores.
ParamsStoreSlashFractionBatch stores the slash fraction Batch.
ParamsStoreSlashFractionClaim stores the slash fraction Claim.
ParamsStoreSlashFractionConflictingClaim stores the slash fraction ConflictingClaim.
ParamsStoreSlashFractionValset stores the slash fraction valset.
No description provided by the author
ParamStoreClaimSlashingEnabled stores ClaimSlashing is enabled or not.
ParamStoreSlashFractionBadEthSignature stores the amount by which a validator making a fraudulent eth signature will be slashed.
ParamStoreUnbondSlashingValsetsWindow stores unbond slashing valset window.
ParamStoreValsetRewardAmount is the amount of the coin, both denom and amount to issue to a relayer when they relay a valset.
PastEthSignatureCheckpointKey indexes eth signature checkpoints that have existed.
SecondIndexOutgoingTXFeeKey indexes fee amounts by token contract address.
SequenceKeyPrefix indexes different txids.
No description provided by the author
No description provided by the author
ValidatorByEthAddressKey indexes ethereum addresses i.e.
ValsetConfirmKey indexes valset confirmations by nonce and the validator account address i.e cosmos1ahx7f8wyertuus9r20284ej0asrs085case3kn.
ValsetRequestKey indexes valset requests by nonce.
# Structs
Attestation is an aggregate of `claims` that eventually becomes `observed` by all orchestrators EVENT_NONCE: EventNonce a nonce provided by the peggy contract that is unique per event fired These event nonces must be relayed in order.
No description provided by the author
No description provided by the author
BridgeValidator represents a validator's ETH address and its power.
This records the relationship between an ERC20 token and the denom of the corresponding Cosmos originated asset.
ERC20Token unique identifier for an Ethereum ERC20 token.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GenesisState struct.
IDSet represents a set of IDs.
LastClaimEvent stores last claim event details of validator.
LastObservedEthereumBlockHeight stores the last observed Ethereum block height along with the Cosmos block height that it was observed at.
No description provided by the author
No description provided by the author
MsgBlacklistEthereumAddresses defines the message used to add Ethereum addresses to peggy blacklist.
MsgBlacklistEthereumAddressesResponse defines the MsgBlacklistEthereumAddresses response type.
This call allows the sender (and only the sender) to cancel a given MsgSendToEth and recieve a refund of the tokens.
No description provided by the author
MsgConfirmBatch When validators observe a MsgRequestBatch they form a batch by ordering transactions currently in the txqueue in order of highest to lowest fee, cutting off when the batch either reaches a hardcoded maximum size (to be decided, probably around 100) or when transactions stop being profitable (TODO determine this without nondeterminism) This message includes the batch as well as an Ethereum signature over this batch by the validator -------------.
No description provided by the author
EthereumBridgeDepositClaim When more than 66% of the active validator set has claimed to have seen the deposit enter the ethereum blockchain coins are issued to the Cosmos address in question -------------.
No description provided by the author
ERC20DeployedClaim allows the Cosmos module to learn about an ERC20 that someone deployed to represent a Cosmos asset.
No description provided by the author
MsgRequestBatch this is a message anyone can send that requests a batch of transactions to send across the bridge be created for whatever block height this message is included in.
No description provided by the author
MsgRevokeEthereumBlacklist defines the message used to remove Ethereum addresses from peggy blacklist.
MsgRevokeEthereumBlacklistResponse defines the MsgRevokeEthereumBlacklist response type.
MsgSendToEth This is the message that a user calls when they want to bridge an asset it will later be removed when it is included in a batch and successfully submitted tokens are removed from the users balance immediately ------------- AMOUNT: the coin to send across the bridge, note the restriction that this is a single coin not a set of coins that is normal in other Cosmos messages FEE: the fee paid for the bridge, distinct from the fee paid to the chain to actually send this message in the first place.
No description provided by the author
MsgSetOrchestratorAddresses this message allows validators to delegate their voting responsibilities to a given key.
No description provided by the author
This call allows anyone to submit evidence that a validator has signed a valset, batch, or logic call that never existed.
No description provided by the author
No description provided by the author
No description provided by the author
MsgValsetConfirm this is the message sent by the validators when they wish to submit their signatures over the validator set at a given block height.
No description provided by the author
This informs the Cosmos module that a validator set has been updated.
No description provided by the author
WithdrawClaim claims that a batch of withdrawal operations on the bridge contract was executed.
No description provided by the author
OutgoingTransferTx represents an individual send from Peggy to ETH.
OutgoingTxBatch represents a batch of transactions going from Peggy to ETH.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
QueryModuleStateRequest is the request type for the Query/PeggyModuleState RPC method.
QueryModuleStateResponse is the response type for the Query/PeggyModuleState RPC method.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
UnimplementedMsgServer can be embedded to have forward compatible implementations.
UnimplementedQueryServer can be embedded to have forward compatible implementations.
Valset is the Ethereum Bridge Multsig Set, each peggy validator also maintains an ETH key to sign messages, these are used to check signatures on ETH because of the significant gas savings.
# Interfaces
BankKeeper defines the expected bank keeper methods.
No description provided by the author
EthereumClaim represents a claim on ethereum state.
This interface is implemented by all the types that are used to create transactions on Ethereum that are signed by validators.
MsgClient is the client API for Msg service.
MsgServer is the server API for Msg service.
QueryClient is the client API for Query service.
QueryServer is the server API for Query service.
No description provided by the author
StakingKeeper defines the expected staking keeper methods.
# Type aliases
BridgeValidators is the sorted set of validator data for Ethereum bridge MultiSig set.
ClaimType is the cosmos type of an event from the counterpart chain that can be handled.
No description provided by the author
SignType defines messages that have been signed by an orchestrator.
Valsets is a collection of valset.