Get desktop application:
View/edit binary Protocol Buffers messages
Msg defines the state transitions possible within gravity
option (google.api.http).post = "/gravity/v1/send_to_ethereum";
MsgSendToEthereum submits a SendToEthereum attempt to bridge an asset over to Ethereum. The SendToEthereum will be stored and then included in a batch and then submitted to Ethereum.
MsgSendToEthereumResponse returns the SendToEthereum transaction ID which will be included in the batch tx.
option (google.api.http).post = "/gravity/v1/send_to_ethereum/cancel";
MsgCancelSendToEthereum allows the sender to cancel its own outgoing SendToEthereum tx and recieve a refund of the tokens and bridge fees. This tx will only succeed if the SendToEthereum tx hasn't been batched to be processed and relayed to Ethereum.
(message has no fields)
option (google.api.http).post = "/gravity/v1/batchtx/request";
MsgRequestBatchTx requests a batch of transactions with a given coin denomination to send across the bridge to Ethereum.
(message has no fields)
option (google.api.http).post = "/gravity/v1/ethereum_signature";
MsgSubmitEthereumTxConfirmation submits an ethereum signature for a given validator
TODO: can we make this take an array?
(message has no fields)
option (google.api.http).post = "/gravity/v1/ethereum_event";
MsgSubmitEthereumEvent
(message has no fields)
option (google.api.http).post = "/gravity/v1/delegate_keys";
(message has no fields)
Query defines the gRPC querier service
Module parameters query
option (google.api.http).get = "/gravity/v1/params";
rpc Params
(message has no fields)
get info on individual outgoing data
option (google.api.http).get = "/gravity/v1/signer_set";
rpc SignerSetTx
option (google.api.http).get = "/gravity/v1/signer_set/latest";
(message has no fields)
option (google.api.http).get = "/gravity/v1/batch_txs/{token_contract}/{nonce}";
rpc BatchTx
option (google.api.http).get = "/gravity/v1/contract_call_txs/{invalidation_id}/{invalidation_nonce}";
rpc ContractCallTx
get collections of outgoing traffic from the bridge
option (google.api.http).get = "/gravity/v1/signer_sets";
rpc SignerSetTxs
option (google.api.http).get = "/gravity/v1/batch/batch_txs";
rpc BatchTxs
option (google.api.http).get = "/gravity/v1/batch/contract_call_txs";
rpc ContractCallTxs
TODO: can/should we group these into one endpoint?
option (google.api.http).get = "/gravity/v1/signer_sets/ethereum_signatures";
rpc SignerSetTxConfirmations
option (google.api.http).get = "/gravity/v1/batch_txs/ethereum_signatures";
option (google.api.http).get = "/gravity/v1/logic_calls/ethereum_signatures";
pending ethereum signature queries for orchestrators to figure out which signatures they are missing TODO: can/should we group this into one endpoint?
option (google.api.http).get = "/gravity/v1/SignerSetTxs/{address}/pending";
rpc UnsignedSignerSetTxs
NOTE: this is an sdk.AccAddress and can represent either the orchestartor address or the cooresponding validator address
option (google.api.http).get = "/gravity/v1/batches/{address}/pending";
NOTE: this is an sdk.AccAddress and can represent either the orchestrator address or the cooresponding validator address
Note these are returned with the signature empty
option (google.api.http).get = "/gravity/v1/ContractCallTxs/{address}/pending";
rpc UnsignedContractCallTxs
option (google.api.http).get = "/gravity/v1/oracle/event_nonce/{address}";
Queries the fees for all pending batches, results are returned in sdk.Coin (fee_amount_int)(contract_address) style
option (google.api.http).get = "/gravity/v1/batches/fees";
(message has no fields)
Query for info about denoms tracked by gravity
option (google.api.http).get = "/gravity/v1/cosmos_originated/erc20_to_denom";
DenomToERC20Params implements a query that allows ERC-20 parameter information to be retrieved by a Cosmos base denomination.
Query for info about denoms tracked by gravity
option (google.api.http).get = "/gravity/v1/cosmos_originated/denom_to_erc20";
Query for batch send to ethereums
option (google.api.http).get = "/gravity/v1/query_batched_send_to_eth";
NOTE: if there is no sender address, return all
todo: figure out how to paginate given n Batches with m Send To Ethereums cosmos.base.query.v1beta1.PageRequest pagination = 2;
cosmos.base.query.v1beta1.PageResponse pagination = 2;
Query for unbatched send to ethereums
option (google.api.http).get = "/gravity/v1/query_unbatched_send_to_eth";
delegate keys
option (google.api.http).get = "/gravity/v1/delegate_keys/validator/{validator}";
option (google.api.http).get = "/gravity/v1/delegate_keys/ethereum/{ethereum_signer}";
option (google.api.http).get = "/gravity/v1/delegate_keys/orchestrator/{orchestrator}";
option (google.api.http).get = "/gravity/v1/delegate_keys";
(message has no fields)
BatchExecutedEvent claims that a batch of BatchTxExecutedal operations on the bridge contract was executed successfully on ETH
BatchTx represents a batch of transactions going from Cosmos to Ethereum. Batch txs are are identified by a unique hash and the token contract that is shared by all the SendToEthereum
Used in:
, ,BatchTxConfirmation is a signature on behalf of a validator for a BatchTx.
Used in:
NOTE: bytes.HexBytes is supposed to "help" with json encoding/decoding investigate?
ContractCallTx represents an individual arbitrary logic call transaction from Cosmos to Ethereum.
Used in:
, ,ContractCallTxConfirmation is a signature on behalf of a validator for a ContractCallTx.
Used in:
DelegateKeysSignMsg defines the message structure an operator is expected to sign when submitting a MsgDelegateKeys message. The resulting signature should populate the eth_signature field.
ERC20DeployedEvent is submitted when an ERC20 contract for a Cosmos SDK coin has been deployed on Ethereum.
This records the relationship between an ERC20 token and the denom of the corresponding Cosmos originated asset
Used in:
Used in:
,EthereumEventVoteRecord is an event that is pending of confirmation by 2/3 of the signer set. The event is then attested and executed in the state machine once the required threshold is met.
Used in:
EthereumSigner represents a cosmos validator with its corresponding bridge operator ethereum address and its staking consensus power.
Used in:
,GenesisState struct TODO: this need to be audited and potentially simplified using the new interfaces
LatestEthereumBlockHeight defines the latest observed ethereum block height and the corresponding timestamp value in nanoseconds.
MsgDelegateKey allows validators to delegate their voting responsibilities to a given orchestrator address. This key is then used as an optional authentication method for attesting events from Ethereum.
Used as request type in: Msg.SetDelegateKeys
Used as field type in:
,Params represent the Gravity genesis and store parameters gravity_id: a random 32 byte value to prevent signature reuse, for example if the cosmos validators decided to use the same Ethereum keys for another chain also running Gravity we would not want it to be possible to play a deposit from chain A back on chain B's Gravity. This value IS USED ON ETHEREUM so it must be set in your genesis.json before launch and not changed after deploying Gravity contract_hash: the code hash of a known good version of the Gravity contract solidity code. This can be used to verify the correct version of the contract has been deployed. This is a reference value for goernance action only it is never read by any Gravity code bridge_ethereum_address: is address of the bridge contract on the Ethereum side, this is a reference value for governance only and is not actually used by any Gravity code bridge_chain_id: the unique identifier of the Ethereum chain, this is a reference value only and is not actually used by any Gravity code These reference values may be used by future Gravity client implemetnations to allow for saftey features or convenience features like the Gravity address in your relayer. A relayer would require a configured Gravity address if governance had not set the address on the chain it was relaying for. signed_signer_set_txs_window signed_batches_window signed_ethereum_signatures_window These values represent the time in blocks that a validator has to submit a signature for a batch or valset, or to submit a ethereum_signature for a particular attestation nonce. In the case of attestations this clock starts when the attestation is created, but only allows for slashing once the event has passed target_eth_tx_timeout: This is the 'target' value for when ethereum transactions time out, this is a target because Ethereum is a probabilistic chain and you can't say for sure what the block frequency is ahead of time. average_block_time average_ethereum_block_time These values are the average Cosmos block time and Ethereum block time respectively and they are used to compute what the target batch timeout is. It is important that governance updates these in case of any major, prolonged change in the time it takes to produce a block slash_fraction_signer_set_tx slash_fraction_batch slash_fraction_ethereum_signature slash_fraction_conflicting_ethereum_signature The slashing fractions for the various gravity related slashing conditions. The first three refer to not submitting a particular message, the third for submitting a different ethereum_signature for the same Ethereum event
Used in:
,TODO: slash fraction for contract call txs too
SendToCosmosEvent is submitted when the SendToCosmosEvent is emitted by they gravity contract. ERC20 representation coins are minted to the cosmosreceiver address.
SendToEthereum represents an individual SendToEthereum from Cosmos to Ethereum
Used in:
, , ,SignerSetTx is the Ethereum Bridge multisig set that relays transactions the two chains. The staking validators keep ethereum keys which are used to check signatures on Ethereum in order to get significant gas savings.
Used in:
, ,SignerSetTxConfirmation is a signature on behalf of a validator for a SignerSetTx
Used in:
This informs the Cosmos module that a validator set has been updated.
Used as response type in: Query.LatestSignerSetTx, Query.SignerSetTx