evm

package
v0.0.0-...-2da98db Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ZetaBlockTime is the block time of the Zeta network
	ZetaBlockTime = 6500 * time.Millisecond

	// OutboundInclusionTimeout is the timeout for waiting for an outbound to be included in a block
	OutboundInclusionTimeout = 20 * time.Minute

	// OutboundTrackerReportTimeout is the timeout for waiting for an outbound tracker report
	OutboundTrackerReportTimeout = 10 * time.Minute

	// EthTransferGasLimit is the gas limit for a standard ETH transfer
	EthTransferGasLimit = 21000

	// TopicsZetaSent is the number of topics for a Zeta sent event
	// [signature, zetaTxSenderAddress, destinationChainId]
	// https://github.com/zeta-chain/protocol-contracts/blob/d65814debf17648a6c67d757ba03646415842790/contracts/evm/ZetaConnector.base.sol#L34
	TopicsZetaSent = 3

	// TopicsZetaReceived is the number of topics for a Zeta received event
	// [signature, sourceChainId, destinationAddress, internalSendHash]
	// https://github.com/zeta-chain/protocol-contracts/blob/d65814debf17648a6c67d757ba03646415842790/contracts/evm/ZetaConnector.base.sol#L45
	TopicsZetaReceived = 4

	// TopicsZetaReverted is the number of topics for a Zeta reverted event
	// [signature, destinationChainId, internalSendHash]
	// https://github.com/zeta-chain/protocol-contracts/blob/d65814debf17648a6c67d757ba03646415842790/contracts/evm/ZetaConnector.base.sol#L54
	TopicsZetaReverted = 3

	// TopicsWithdrawn is the number of topics for a withdrawn event
	// [signature, recipient, asset]
	// https://github.com/zeta-chain/protocol-contracts/blob/d65814debf17648a6c67d757ba03646415842790/contracts/evm/ERC20Custody.sol#L43
	TopicsWithdrawn = 3

	// TopicsDeposited is the number of topics for a deposited event
	// [signature, asset]
	// https://github.com/zeta-chain/protocol-contracts/blob/d65814debf17648a6c67d757ba03646415842790/contracts/evm/ERC20Custody.sol#L42
	TopicsDeposited = 2
)

Variables

This section is empty.

Functions

func ValidateEvmTransaction

func ValidateEvmTransaction(tx *ethrpc.Transaction) error

ValidateEvmTransaction checks the basics of an EVM transaction Note: these checks are to ensure the transaction is well-formed and can be safely used for further processing by zetaclient

func ValidateEvmTxLog

func ValidateEvmTxLog(vLog *ethtypes.Log, wantAddress ethcommon.Address, wantHash string, wantTopics int) error

ValidateEvmTxLog checks the basics of an EVM tx log

Types

This section is empty.

Directories

Path Synopsis
Package observer implements the EVM chain observer
Package observer implements the EVM chain observer
Package signer implements the ChainSigner interface for EVM chains
Package signer implements the ChainSigner interface for EVM chains

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL