Documentation
¶
Index ¶
- Variables
- func DecodeERC20TokenDeploymentEvent(log *geth.Log) (types.EventTokenDeployed, error)
- func DecodeERC20TransferEvent(log *geth.Log) (types.EventTransfer, error)
- func DecodeEventContractCall(log *geth.Log) (types.EventContractCall, error)
- func DecodeEventContractCallWithToken(log *geth.Log) (types.EventContractCallWithToken, error)
- func DecodeEventTokenSent(log *geth.Log) (types.EventTokenSent, error)
- func DecodeMultisigOperatorshipTransferredEvent(log *geth.Log) (types.EventMultisigOperatorshipTransferred, error)
- type FailedTransactionError
- type LatestFinalizedBlockCache
- type Mgr
- func (mgr Mgr) GetTxReceiptsIfFinalized(chain nexus.ChainName, txIDs []common.Hash, confHeight uint64) ([]rs.Result[*geth.Receipt], error)
- func (mgr Mgr) ProcessDepositConfirmation(event *types.ConfirmDepositStarted) error
- func (mgr Mgr) ProcessGatewayTxConfirmation(event *types.ConfirmGatewayTxStarted) error
- func (mgr Mgr) ProcessGatewayTxsConfirmation(event *types.ConfirmGatewayTxsStarted) error
- func (mgr Mgr) ProcessNewChain(event *types.ChainAdded) (err error)
- func (mgr Mgr) ProcessTokenConfirmation(event *types.ConfirmTokenStarted) error
- func (mgr Mgr) ProcessTransferKeyConfirmation(event *types.ConfirmKeyTransferStarted) error
- type NotFinalizedError
- type NotFoundError
Constants ¶
This section is empty.
Variables ¶
var ( ERC20TransferSig = crypto.Keccak256Hash([]byte("Transfer(address,address,uint256)")) ERC20TokenDeploymentSig = crypto.Keccak256Hash([]byte("TokenDeployed(string,address)")) MultisigTransferOperatorshipSig = crypto.Keccak256Hash([]byte("OperatorshipTransferred(bytes)")) ContractCallSig = crypto.Keccak256Hash([]byte("ContractCall(address,string,string,bytes32,bytes)")) ContractCallWithTokenSig = crypto.Keccak256Hash([]byte("ContractCallWithToken(address,string,string,bytes32,bytes,string,uint256)")) TokenSentSig = crypto.Keccak256Hash([]byte("TokenSent(address,string,string,string,uint256)")) )
Smart contract event signatures
Functions ¶
func DecodeERC20TokenDeploymentEvent ¶ added in v0.33.1
func DecodeERC20TokenDeploymentEvent(log *geth.Log) (types.EventTokenDeployed, error)
func DecodeERC20TransferEvent ¶ added in v0.33.1
func DecodeERC20TransferEvent(log *geth.Log) (types.EventTransfer, error)
func DecodeEventContractCall ¶ added in v0.33.1
func DecodeEventContractCall(log *geth.Log) (types.EventContractCall, error)
func DecodeEventContractCallWithToken ¶ added in v0.33.1
func DecodeEventContractCallWithToken(log *geth.Log) (types.EventContractCallWithToken, error)
func DecodeEventTokenSent ¶ added in v0.33.1
func DecodeEventTokenSent(log *geth.Log) (types.EventTokenSent, error)
func DecodeMultisigOperatorshipTransferredEvent ¶ added in v0.33.1
func DecodeMultisigOperatorshipTransferredEvent(log *geth.Log) (types.EventMultisigOperatorshipTransferred, error)
Types ¶
type FailedTransactionError ¶ added in v0.34.4
type FailedTransactionError struct {
BlockHeight uint64
}
FailedTransactionError contains the block height of the transaction that failed on the source chain
func (FailedTransactionError) Error ¶ added in v0.34.4
func (e FailedTransactionError) Error() string
type LatestFinalizedBlockCache ¶ added in v0.33.1
type LatestFinalizedBlockCache interface { // Get returns the latest finalized block number for chain Get(chain nexus.ChainName) *big.Int // Set sets the latest finalized block number for chain, if the given block number is greater than the current latest finalized block number Set(chain nexus.ChainName, blockNumber *big.Int) }
LatestFinalizedBlockCache is a cache for the latest finalized block number for each chain
func NewLatestFinalizedBlockCache ¶ added in v0.33.1
func NewLatestFinalizedBlockCache() LatestFinalizedBlockCache
type Mgr ¶
type Mgr struct {
// contains filtered or unexported fields
}
Mgr manages all communication with Ethereum
func NewMgr ¶
func NewMgr(rpcs map[string]rpc.Client, broadcaster broadcast.Broadcaster, valAddr sdk.ValAddress, proxy sdk.AccAddress, latestFinalizedBlockCache LatestFinalizedBlockCache) *Mgr
NewMgr returns a new Mgr instance
func (Mgr) GetTxReceiptsIfFinalized ¶ added in v0.34.0
func (mgr Mgr) GetTxReceiptsIfFinalized(chain nexus.ChainName, txIDs []common.Hash, confHeight uint64) ([]rs.Result[*geth.Receipt], error)
GetTxReceiptsIfFinalized retrieves receipts for provided transaction IDs, only if they're successful and finalized.
func (Mgr) ProcessDepositConfirmation ¶
func (mgr Mgr) ProcessDepositConfirmation(event *types.ConfirmDepositStarted) error
ProcessDepositConfirmation votes on the correctness of an EVM chain token deposit
func (Mgr) ProcessGatewayTxConfirmation ¶
func (mgr Mgr) ProcessGatewayTxConfirmation(event *types.ConfirmGatewayTxStarted) error
ProcessGatewayTxConfirmation votes on the correctness of an EVM chain gateway's transactions
func (Mgr) ProcessGatewayTxsConfirmation ¶ added in v0.34.0
func (mgr Mgr) ProcessGatewayTxsConfirmation(event *types.ConfirmGatewayTxsStarted) error
ProcessGatewayTxsConfirmation votes on the correctness of an EVM chain multiple gateway transactions
func (Mgr) ProcessNewChain ¶
func (mgr Mgr) ProcessNewChain(event *types.ChainAdded) (err error)
ProcessNewChain notifies the operator that vald needs to be restarted/udpated for a new chain
func (Mgr) ProcessTokenConfirmation ¶
func (mgr Mgr) ProcessTokenConfirmation(event *types.ConfirmTokenStarted) error
ProcessTokenConfirmation votes on the correctness of an EVM chain token deployment
func (Mgr) ProcessTransferKeyConfirmation ¶
func (mgr Mgr) ProcessTransferKeyConfirmation(event *types.ConfirmKeyTransferStarted) error
ProcessTransferKeyConfirmation votes on the correctness of an EVM chain key transfer
type NotFinalizedError ¶ added in v0.34.4
type NotFinalizedError struct {
BlockHeight uint64
}
NotFinalizedError contains the block height of the transaction that is not finalized yet
func (NotFinalizedError) Error ¶ added in v0.34.4
func (e NotFinalizedError) Error() string
type NotFoundError ¶ added in v0.34.4
type NotFoundError struct{}
NotFoundError is a type-safe wrapper around ethereum.NotFound
func (NotFoundError) Error ¶ added in v0.34.4
func (e NotFoundError) Error() string