Documentation ¶
Index ¶
- Constants
- func GetAllValsetConfirms(contact Contact, latestNonce uint64) ([]types.ValsetConfirmResponse, error)
- func GetLastEventNonce(contact Contact, ourCosmosAddress common.Address) (uint64, error)
- func GetLatestLogicCalls(contact Contact) ([]types.LogicCall, error)
- func GetLatestTransactionBatches(contact Contact) ([]types.TransactionBatch, error)
- func GetLatestValSets(contact Contact) ([]*types.ValSet, error)
- func GetLogicCallSignatures(contact Contact, invalidId []byte, invalidNonce uint64) ([]types.LogicCallConfirmResponse, error)
- func GetOldestUnsignedBatch(contact Contact, address common.Address) (*types.TransactionBatch, error)
- func GetOldestUnsignedValsets(contact Contact, address common.Address) ([]types.ValSet, error)
- func GetRequest(url string) ([]byte, error)
- func GetTransactionBatchSignatures(contact Contact, nonce uint64, tokenContract common.Address) ([]types.BatchConfirmResponse, error)
- func GetValSet(contact Contact, valSetNonce uint64) (*types.ValSet, error)
- func PostRequest(url string, data url.Values) ([]byte, error)
- func SendBatchConfirm(contact Contact, ethPrivKey *ecdsa.PrivateKey, fee sdk.Coin, ...) (sdk.TxResponse, error)
- func SendEthereumClaims(contact Contact, cosmosPrivKey *ecdsa.PrivateKey, ...) (sdk.TxResponse, error)
- func SendRequestBatch(privKey *ecdsa.PrivateKey, denom string, contact Contact) (sdk.TxResponse, error)
- func SendToEth(privKey *ecdsa.PrivateKey, destination *common.Address, amount sdk.Coin, ...) (sdk.TxResponse, error)
- func SendValsetConfirms(contact Contact, ethPrivKey *ecdsa.PrivateKey, fee sdk.Coin, ...) (sdk.TxResponse, error)
- type ChainStatus
- type ChainStatusEnum
- type Contact
- func (c Contact) BroadcastTx(txBz []byte) []byte
- func (c Contact) Get(url string) ([]byte, error)
- func (c Contact) GetBalance(address string) sdk.Coins
- func (c Contact) GetChainStatus() (ChainStatus, error)
- func (c Contact) GetNonce(address string) uint64
- func (c Contact) Post(url string, data url.Values) ([]byte, error)
Constants ¶
View Source
const (
COMMON_GAS = 100000
)
Variables ¶
This section is empty.
Functions ¶
func GetAllValsetConfirms ¶
func GetAllValsetConfirms(contact Contact, latestNonce uint64) ([]types.ValsetConfirmResponse, error)
func GetLastEventNonce ¶
func GetLatestTransactionBatches ¶
func GetLatestTransactionBatches(contact Contact) ([]types.TransactionBatch, error)
func GetLogicCallSignatures ¶
func GetOldestUnsignedBatch ¶
func GetRequest ¶
GetRequest defines a wrapper around an HTTP GET request with a provided URL. An error is returned if the request or reading the body fails.
func PostRequest ¶
PostRequest defines a wrapper around an HTTP POST request with a provided URL and data. An error is returned if the request or reading the body fails.
func SendBatchConfirm ¶
func SendBatchConfirm(contact Contact, ethPrivKey *ecdsa.PrivateKey, fee sdk.Coin, transactionBatches []*types.TransactionBatch, cosmosPrivKey *ecdsa.PrivateKey, gravityId string) (sdk.TxResponse, error)
func SendEthereumClaims ¶
func SendEthereumClaims(contact Contact, cosmosPrivKey *ecdsa.PrivateKey, deposits []types.SendToCosmosEvent, withdraws []types.TransactionBatchExecutedEvent, erc20Deploys []types.Erc20DeployedEvent, logicCalls []types.LogicCallExecutedEvent, fee sdk.Coin) (sdk.TxResponse, error)
func SendRequestBatch ¶
func SendRequestBatch( privKey *ecdsa.PrivateKey, denom string, contact Contact, ) (sdk.TxResponse, error)
func SendValsetConfirms ¶
func SendValsetConfirms(contact Contact, ethPrivKey *ecdsa.PrivateKey, fee sdk.Coin, valsets []types.ValSet, cosmosPrivKey *ecdsa.PrivateKey, gravityId string) (sdk.TxResponse, error)
Types ¶
type ChainStatus ¶
type ChainStatus struct { BlockHeight uint64 `json:"block_height,omitempty"` Status ChainStatusEnum `json:"status"` }
type ChainStatusEnum ¶
type ChainStatusEnum string
const ( MOVING ChainStatusEnum = "moving" SYNCING ChainStatusEnum = "syncing" WAITING_TO_START ChainStatusEnum = "waiting_to_start" )
type Contact ¶
type Contact struct {
// contains filtered or unexported fields
}
func NewContact ¶
func (Contact) BroadcastTx ¶
func (Contact) GetChainStatus ¶
func (c Contact) GetChainStatus() (ChainStatus, error)
Click to show internal directories.
Click to hide internal directories.