Documentation ¶
Index ¶
- Constants
- func BytesCombine(pBytes ...[]byte) []byte
- func EncodeTxBatchConfirm(gravityId string, batch TransactionBatch) []byte
- func EncodeTxBatchConfirmHashed(gravityId string, batch TransactionBatch) []byte
- func EncodeValsetConfirm(gravityId string, valset ValSet) []byte
- func EncodeValsetConfirmHashed(gravityId string, valset ValSet) []byte
- func GetEthereumMsgHash(msg []byte) []byte
- type BatchConfirmResponse
- type BatchTransaction
- type Confirm
- type Erc20DeployedEvent
- type Erc20Token
- type EthSignature
- type GravitySignature
- type GravitySignatureArrays
- type LogicCall
- type LogicCallConfirmResponse
- type LogicCallExecutedEvent
- type SendToCosmosEvent
- type SignatureStatus
- type TransactionBatch
- type TransactionBatchExecutedEvent
- func TransactionBatchExecutedEventFilterByEventNonce(lastEventNonce uint64, withdraws []TransactionBatchExecutedEvent) []TransactionBatchExecutedEvent
- func TransactionBatchExecutedEventFromLog(log *web3.Log) (TransactionBatchExecutedEvent, error)
- func TransactionBatchExecutedEventFromLogs(log []*web3.Log) ([]TransactionBatchExecutedEvent, error)
- type ValSet
- type ValSetMember
- type ValSetUpdatedEvent
- type ValsetConfirmResponse
Constants ¶
View Source
const ( ETHEREUM_SALT = "\x19Ethereum Signed Message:\n32" B32 = "bytes32" U256 = "uint256" U256Ary = "uint256[]" Addr = "address" AddrAry = "address[]" )
Variables ¶
This section is empty.
Functions ¶
func BytesCombine ¶
func EncodeTxBatchConfirm ¶
func EncodeTxBatchConfirm(gravityId string, batch TransactionBatch) []byte
func EncodeTxBatchConfirmHashed ¶
func EncodeTxBatchConfirmHashed(gravityId string, batch TransactionBatch) []byte
func EncodeValsetConfirm ¶
func GetEthereumMsgHash ¶
Types ¶
type BatchConfirmResponse ¶
type BatchConfirmResponse struct { Nonce uint64 Orchestrator common.Address TokenContract common.Address EthereumSigner common.Address EthSignature EthSignature }
func (BatchConfirmResponse) GetEthAddress ¶
func (bcr BatchConfirmResponse) GetEthAddress() common.Address
func (BatchConfirmResponse) GetSignature ¶
func (bcr BatchConfirmResponse) GetSignature() EthSignature
type BatchTransaction ¶
type BatchTransaction struct { Id uint64 Sender common.Address Destination common.Address Erc20Token Erc20Token Erc20Fee Erc20Token }
type Confirm ¶
type Confirm interface { GetEthAddress() common.Address GetSignature() EthSignature }
type Erc20DeployedEvent ¶
type Erc20DeployedEvent struct { CosmosDenom string Erc20 common.Address Name string Symbol string Decimals uint8 EventNonce uint64 BlockHeight uint64 }
func Erc20DeployedEventFilterByEventNonce ¶
func Erc20DeployedEventFilterByEventNonce(lastEventNonce uint64, erc20Deploys []Erc20DeployedEvent) []Erc20DeployedEvent
func Erc20DeployedEventFromLog ¶
func Erc20DeployedEventFromLog(log *web3.Log) (Erc20DeployedEvent, error)
func Erc20DeployedEventFromLogs ¶
func Erc20DeployedEventFromLogs(log []*web3.Log) ([]Erc20DeployedEvent, error)
type EthSignature ¶
func FromBytesToEthSignature ¶
func FromBytesToEthSignature(bz []byte) (EthSignature, error)
type GravitySignature ¶
type GravitySignatureArrays ¶
type GravitySignatureArrays struct { Addresses []common.Address Powers []uint64 V []uint8 R [][]byte S [][]byte }
func ToArrays ¶
func ToArrays(signatures []GravitySignature) GravitySignatureArrays
type LogicCall ¶
type LogicCall struct { Transfers []Erc20Token Fees []Erc20Token LogicContractAddress common.Address PayLoad []byte Timeout uint64 InvalidationId []byte InvalidationNonce uint64 }
type LogicCallConfirmResponse ¶
type LogicCallConfirmResponse struct { InvalidationId []byte InvalidationNonce uint64 EthereumSigner common.Address Orchestrator common.Address EthSignature EthSignature }
func (LogicCallConfirmResponse) GetEthAddress ¶
func (lcc LogicCallConfirmResponse) GetEthAddress() common.Address
func (LogicCallConfirmResponse) GetSignature ¶
func (lcc LogicCallConfirmResponse) GetSignature() EthSignature
type LogicCallExecutedEvent ¶
type LogicCallExecutedEvent struct { InvalidationId []byte InvalidationNonce uint64 ReturnData []byte EventNonce uint64 BlockHeight uint64 }
func LogicCallExecutedEventFilterByEventNonce ¶
func LogicCallExecutedEventFilterByEventNonce(lastEventNonce uint64, logicCalls []LogicCallExecutedEvent) []LogicCallExecutedEvent
func LogicCallExecutedEventFromLog ¶
func LogicCallExecutedEventFromLog(log *web3.Log) (LogicCallExecutedEvent, error)
unimplemented!
func LogicCallExecutedEventFromLogs ¶
func LogicCallExecutedEventFromLogs(log []*web3.Log) ([]LogicCallExecutedEvent, error)
type SendToCosmosEvent ¶
type SendToCosmosEvent struct { Erc20 common.Address Sender common.Address // cosmos-address Destination common.Address Amount *big.Int EventNonce uint64 BlockHeight uint64 }
func SendToCosmosEventFilterByEventNonce ¶
func SendToCosmosEventFilterByEventNonce(lastEventNonce uint64, deposits []SendToCosmosEvent) []SendToCosmosEvent
func SendToCosmosEventFromLog ¶
func SendToCosmosEventFromLog(log *web3.Log) (SendToCosmosEvent, error)
func SendToCosmosEventFromLogs ¶
func SendToCosmosEventFromLogs(log []*web3.Log) ([]SendToCosmosEvent, error)
type SignatureStatus ¶
type TransactionBatch ¶
type TransactionBatch struct { Nonce uint64 BatchTimeout uint64 Transactions []BatchTransaction TotalFee Erc20Token TokenContract common.Address }
func (TransactionBatch) GetCheckPointValues ¶
type TransactionBatchExecutedEvent ¶
type TransactionBatchExecutedEvent struct { BatchNonce uint64 BlockHeight uint64 Erc20 common.Address EventNonce uint64 }
func TransactionBatchExecutedEventFilterByEventNonce ¶
func TransactionBatchExecutedEventFilterByEventNonce(lastEventNonce uint64, withdraws []TransactionBatchExecutedEvent) []TransactionBatchExecutedEvent
func TransactionBatchExecutedEventFromLog ¶
func TransactionBatchExecutedEventFromLog(log *web3.Log) (TransactionBatchExecutedEvent, error)
todo
func TransactionBatchExecutedEventFromLogs ¶
func TransactionBatchExecutedEventFromLogs(log []*web3.Log) ([]TransactionBatchExecutedEvent, error)
type ValSet ¶
type ValSet struct { Nonce uint64 Members []ValSetMember }
func (ValSet) FilterEmptyAddress ¶
type ValSetMember ¶
type ValSetUpdatedEvent ¶
type ValSetUpdatedEvent struct { Nonce uint64 Members []ValSetMember }
func ValSetUpdatedEventFromLog ¶
func ValSetUpdatedEventFromLog(log *web3.Log) (ValSetUpdatedEvent, error)
func ValSetUpdatedEventFromLogs ¶
func ValSetUpdatedEventFromLogs(log []*web3.Log) ([]ValSetUpdatedEvent, error)
type ValsetConfirmResponse ¶
type ValsetConfirmResponse struct { Nonce uint64 Orchestrator common.Address EthAddress common.Address Signature EthSignature }
func (ValsetConfirmResponse) GetEthAddress ¶
func (vcr ValsetConfirmResponse) GetEthAddress() common.Address
func (ValsetConfirmResponse) GetSignature ¶
func (vcr ValsetConfirmResponse) GetSignature() EthSignature
Click to show internal directories.
Click to hide internal directories.