Documentation ¶
Index ¶
- Variables
- type BSC2ETHSwapStartedEvent
- type BscExecutor
- type ETH2BSCSwapStartedEvent
- type EthExecutor
- func (e *EthExecutor) GetBlockAndTxEvents(height int64) (*common.BlockAndEventLogs, error)
- func (e *EthExecutor) GetChainName() string
- func (e *EthExecutor) GetLogs(header *types.Header) ([]interface{}, error)
- func (e *EthExecutor) GetSwapPairRegisterLogs(header *types.Header) ([]interface{}, error)
- func (e *EthExecutor) GetSwapStartLogs(header *types.Header) ([]interface{}, error)
- type Executor
- type SwapPairRegisterEvent
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SwapStartedEventName = "SphynxSwapStarted" ETH2BSCSwapStartedEventHash = ethcmm.HexToHash("0x833cb5872c808322e8666b65ac48146042bc300435300238bb929b559b9e1f6a") BSC2ETHSwapStartedEventHash = ethcmm.HexToHash("0xfc1a6eab912bd888ec0f7a92e1ee241615ab5e87aadc94db8c334a17efaae97d") )
=================== SwapStarted =============
View Source
var ( SwapPairRegisterEventName = "SphynxSwapPairRegister" SwapPairRegisterEventHash = ethcmm.HexToHash("0x06101386f3a9dd45570dce2027311173d0e136955e5b912edece89cca5bb526d") )
================= SphynxSwapPairRegister ===================
Functions ¶
This section is empty.
Types ¶
type BSC2ETHSwapStartedEvent ¶
type BSC2ETHSwapStartedEvent struct { BEP20Addr ethcmm.Address ERC20Addr ethcmm.Address FromAddr ethcmm.Address Amount *big.Int FeeAmount *big.Int }
func (*BSC2ETHSwapStartedEvent) ToSwapStartTxLog ¶
func (ev *BSC2ETHSwapStartedEvent) ToSwapStartTxLog(log *types.Log) *model.SwapStartTxLog
type BscExecutor ¶
type BscExecutor struct { Chain string Config *util.Config SwapAgentAddr ethcmm.Address BSCSwapAgentInst *contractabi.ETHSwapAgent SwapAgentAbi abi.ABI Client *ethclient.Client }
func NewBSCExecutor ¶
func (*BscExecutor) GetBlockAndTxEvents ¶
func (e *BscExecutor) GetBlockAndTxEvents(height int64) (*common.BlockAndEventLogs, error)
func (*BscExecutor) GetChainName ¶
func (e *BscExecutor) GetChainName() string
func (*BscExecutor) GetLogs ¶
func (e *BscExecutor) GetLogs(header *types.Header) ([]interface{}, error)
func (*BscExecutor) GetSwapStartLogs ¶
func (e *BscExecutor) GetSwapStartLogs(header *types.Header) ([]interface{}, error)
type ETH2BSCSwapStartedEvent ¶
type ETH2BSCSwapStartedEvent struct { ERC20Addr ethcmm.Address FromAddr ethcmm.Address Amount *big.Int FeeAmount *big.Int }
func (*ETH2BSCSwapStartedEvent) ToSwapStartTxLog ¶
func (ev *ETH2BSCSwapStartedEvent) ToSwapStartTxLog(log *types.Log) *model.SwapStartTxLog
type EthExecutor ¶
type EthExecutor struct { Chain string Config *util.Config SwapAgentAddr ethcmm.Address SwapAgentAbi abi.ABI Client *ethclient.Client // contains filtered or unexported fields }
func NewEthExecutor ¶
func (*EthExecutor) GetBlockAndTxEvents ¶
func (e *EthExecutor) GetBlockAndTxEvents(height int64) (*common.BlockAndEventLogs, error)
func (*EthExecutor) GetChainName ¶
func (e *EthExecutor) GetChainName() string
func (*EthExecutor) GetLogs ¶
func (e *EthExecutor) GetLogs(header *types.Header) ([]interface{}, error)
func (*EthExecutor) GetSwapPairRegisterLogs ¶
func (e *EthExecutor) GetSwapPairRegisterLogs(header *types.Header) ([]interface{}, error)
func (*EthExecutor) GetSwapStartLogs ¶
func (e *EthExecutor) GetSwapStartLogs(header *types.Header) ([]interface{}, error)
type Executor ¶
type Executor interface { GetBlockAndTxEvents(height int64) (*common.BlockAndEventLogs, error) GetChainName() string }
type SwapPairRegisterEvent ¶
type SwapPairRegisterEvent struct { Sponsor ethcmm.Address ContractAddr ethcmm.Address BEP20ContractAddr ethcmm.Address Name string Symbol string Decimals uint8 }
func (*SwapPairRegisterEvent) ToSwapPairRegisterLog ¶
func (ev *SwapPairRegisterEvent) ToSwapPairRegisterLog(log *types.Log) *model.SwapPairRegisterTxLog
Click to show internal directories.
Click to hide internal directories.