bsc

package
v1.0.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: LGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BindSuccessEventName                          = "LogBindSuccess"
	BindRejectedEventName                         = "LogBindRejected"
	BindTimeoutEventName                          = "LogBindTimeout"
	BindInvalidParameterEventName                 = "LogBindInvalidParameter"
	TransferOutEventName                          = "LogTransferOut"
	BatchTransferOutEventName                     = "LogBatchTransferOut"
	BatchTransferOutAddrsEventName                = "LogBatchTransferOutAddrs"
	TransferInFailureTimeoutEventName             = "LogTransferInFailureTimeout"
	TransferInFailureInsufficientBalanceEventName = "LogTransferInFailureInsufficientBalance"
	TransferInFailureUnboundTokenEventName        = "LogTransferInFailureUnboundToken"
	TransferInFailureUnknownReasonEventName       = "LogTransferInFailureUnknownReason"
	ValidatorFelonyEventName                      = "validatorFelony"
)

Variables

View Source
var (
	BindSuccessEventHash                          = common.HexToHash("0x8005b9354dd0ca4c5593805bcd00ea12b5fce8a2cc9bc15252f50fb2d17c09d2")
	BindRejectedEventHash                         = common.HexToHash("0x341e20b0b6b62cb3990e2d1f8bcb0a15e7d7fd446355a7be807face162285254")
	BindTimeoutEventHash                          = common.HexToHash("0x4781c2d0a33124fb32083581f5b48c93a59b71fd567ce2d4a56c89196baa2ccd")
	BindInvalidParameterEventHash                 = common.HexToHash("0x2117f993c9cc877c531b4e6bd55d822cb48b529fd003c80e5bd6c27b7c1c1702")
	TransferInFailureTimeoutEventHash             = common.HexToHash("0x8090e98e190cb0b05412d5c1a8cd5ee9af5d40da935335cef5d4179c7da63d79")
	TransferInFailureInsufficientBalanceEventHash = common.HexToHash("0x1de400dfa3e72ba83f12c6f1d8b9b85dc3d2aedc6eacc27b481267826aec7422")
	TransferInFailureUnboundTokenEventHash        = common.HexToHash("0x055f2adbd109a4e99b3821af55571cccb4981551d10e3846b21574d348572a59")
	TransferInFailureUnknownReasonEventHash       = common.HexToHash("0xcb6ddd4a252f58c1ff32f31fbb529dc35e8f6a81908f6211bbe7dfa94ef52f1f")
	TransferOutEventHash                          = common.HexToHash("0x5bd451c53ab05abd9855ceb52a469590655af1d732a4cfd67f1f9b53d74dc613")
	BatchTransferOutEventHash                     = common.HexToHash("0x00a18f0343865824d1375c23f5dd79fdf32a12f50400ef2591e52276f8378e31")
	BatchTransferOutAddrsEventHash                = common.HexToHash("0x8740bbd4e1a2505bf2908481adbf1056fb52f762152b702f6c65468f63c55cf8")
	ValidatorFelonyEventHash                      = common.HexToHash("0x7e770310e43f85c3dca97460dbe1484068514437298ff349e6052595a6ffbdb7")
)

Functions

func ParseBatchTransferOutEventToTxLog

func ParseBatchTransferOutEventToTxLog(abi *abi.ABI, log *types.Log, batchTransferOutEvents map[int64]*BatchTransferOutAddrsEvent) (interface{}, error)

func ParseValidatorFelonyEventToTxLog

func ParseValidatorFelonyEventToTxLog(abi *abi.ABI, header *types.Header, log *types.Log, chainId string) (interface{}, error)

Types

type BatchTransferOutAddrsEvent

type BatchTransferOutAddrsEvent struct {
	Sequence       *big.Int
	RecipientAddrs []common.Address
	RefundAddrs    []common.Address
}

func ParseBatchTransferOutAddrsEvent

func ParseBatchTransferOutAddrsEvent(abi *abi.ABI, log *types.Log) (*BatchTransferOutAddrsEvent, error)

type BatchTransferOutEvent

type BatchTransferOutEvent struct {
	Sequence        *big.Int
	Amounts         []*big.Int
	ContractAddr    common.Address
	Bep2TokenSymbol common.Hash
	ExpireTime      *big.Int
	RelayFee        *big.Int
}

func (BatchTransferOutEvent) ToTxLog

func (ev BatchTransferOutEvent) ToTxLog(log *types.Log) interface{}

type BindInvalidParameterEvent

type BindInvalidParameterEvent struct {
	Sequence        *big.Int
	ContractAddr    common.Address
	Bep2TokenSymbol common.Hash
}

func (BindInvalidParameterEvent) ToTxLog

func (ev BindInvalidParameterEvent) ToTxLog(log *types.Log) interface{}

type BindRejectedEvent

type BindRejectedEvent struct {
	Sequence        *big.Int
	ContractAddr    common.Address
	Bep2TokenSymbol common.Hash
}

func (BindRejectedEvent) ToTxLog

func (ev BindRejectedEvent) ToTxLog(log *types.Log) interface{}

type BindSuccessEvent

type BindSuccessEvent struct {
	Sequence        *big.Int
	ContractAddr    common.Address
	Bep2TokenSymbol common.Hash
	TotalSupply     *big.Int
	PeggyAmount     *big.Int
	Decimals        *big.Int
}

func (BindSuccessEvent) ToTxLog

func (ev BindSuccessEvent) ToTxLog(log *types.Log) interface{}

type BindTimeoutEvent

type BindTimeoutEvent struct {
	Sequence        *big.Int
	ContractAddr    common.Address
	Bep2TokenSymbol common.Hash
}

func (BindTimeoutEvent) ToTxLog

func (ev BindTimeoutEvent) ToTxLog(log *types.Log) interface{}

type ContractEvent

type ContractEvent interface {
	ToTxLog(log *types.Log) interface{}
}

func ParseBatchTransferOutEvent

func ParseBatchTransferOutEvent(abi *abi.ABI, log *types.Log) (ContractEvent, error)

func ParseBindInvalidParameterEvent

func ParseBindInvalidParameterEvent(abi *abi.ABI, log *types.Log) (ContractEvent, error)

func ParseBindRejectedEvent

func ParseBindRejectedEvent(abi *abi.ABI, log *types.Log) (ContractEvent, error)

func ParseBindSuccessEvent

func ParseBindSuccessEvent(abi *abi.ABI, log *types.Log) (ContractEvent, error)

func ParseBindTimeoutEvent

func ParseBindTimeoutEvent(abi *abi.ABI, log *types.Log) (ContractEvent, error)

func ParseTokenHubEvent

func ParseTokenHubEvent(abi *abi.ABI, log *types.Log) (ContractEvent, error)

func ParseTransferInInsufficientBalanceEvent

func ParseTransferInInsufficientBalanceEvent(abi *abi.ABI, log *types.Log) (ContractEvent, error)

func ParseTransferInTimeoutEvent

func ParseTransferInTimeoutEvent(abi *abi.ABI, log *types.Log) (ContractEvent, error)

func ParseTransferInUnboundedTokenEvent

func ParseTransferInUnboundedTokenEvent(abi *abi.ABI, log *types.Log) (ContractEvent, error)

func ParseTransferInUnknownReasonEvent

func ParseTransferInUnknownReasonEvent(abi *abi.ABI, log *types.Log) (ContractEvent, error)

func ParseTransferOutEvent

func ParseTransferOutEvent(abi *abi.ABI, log *types.Log) (ContractEvent, error)

func ParseValidatorFelonyEvent

func ParseValidatorFelonyEvent(abi *abi.ABI, log *types.Log) (ContractEvent, error)

func ParseValidatorSetEvent

func ParseValidatorSetEvent(abi *abi.ABI, log *types.Log) (ContractEvent, error)

type Executor

type Executor struct {
	Config *util.Config

	TokenHubAbi     abi.ABI
	ValidatorSetAbi abi.ABI

	Client *ethclient.Client
	// contains filtered or unexported fields
}

func NewExecutor

func NewExecutor(provider string, config *util.Config) *Executor

func (*Executor) GetBlockAndTxs

func (e *Executor) GetBlockAndTxs(height int64) (*common.BlockAndTxLogs, error)

func (*Executor) GetLogs

func (e *Executor) GetLogs(header *types.Header) ([]interface{}, error)

type TransferInInsufficientBalanceEvent

type TransferInInsufficientBalanceEvent struct {
	Sequence        *big.Int
	RefundAddr      common.Address
	Recipient       common.Address
	Amount          *big.Int
	ContractAddr    common.Address
	Bep2TokenSymbol common.Hash
	ActualBalance   *big.Int
}

func (TransferInInsufficientBalanceEvent) ToTxLog

func (ev TransferInInsufficientBalanceEvent) ToTxLog(log *types.Log) interface{}

type TransferInTimeoutEvent

type TransferInTimeoutEvent struct {
	Sequence        *big.Int
	RefundAddr      common.Address
	Recipient       common.Address
	Amount          *big.Int
	ContractAddr    common.Address
	Bep2TokenSymbol common.Hash
	ExpireTime      *big.Int
}

func (TransferInTimeoutEvent) ToTxLog

func (ev TransferInTimeoutEvent) ToTxLog(log *types.Log) interface{}

type TransferInUnboundTokenEvent

type TransferInUnboundTokenEvent struct {
	Sequence        *big.Int
	RefundAddr      common.Address
	Recipient       common.Address
	Amount          *big.Int
	ContractAddr    common.Address
	Bep2TokenSymbol common.Hash
}

func (TransferInUnboundTokenEvent) ToTxLog

func (ev TransferInUnboundTokenEvent) ToTxLog(log *types.Log) interface{}

type TransferInUnknownReasonEvent

type TransferInUnknownReasonEvent struct {
	Sequence        *big.Int
	RefundAddr      common.Address
	Recipient       common.Address
	Bep2TokenAmount *big.Int
	ContractAddr    common.Address
	Bep2TokenSymbol common.Hash
}

func (TransferInUnknownReasonEvent) ToTxLog

func (ev TransferInUnknownReasonEvent) ToTxLog(log *types.Log) interface{}

type TransferOutEvent

type TransferOutEvent struct {
	Sequence        *big.Int
	RefundAddr      common.Address
	Recipient       common.Address
	Amount          *big.Int
	ContractAddr    common.Address
	Bep2TokenSymbol common.Hash
	ExpireTime      *big.Int
	RelayFee        *big.Int
}

func (TransferOutEvent) ToTxLog

func (ev TransferOutEvent) ToTxLog(log *types.Log) interface{}

type ValidatorFelonyEvent

type ValidatorFelonyEvent struct {
	Sequence  *big.Int
	Validator common.Address
	Amount    *big.Int
}

func (ValidatorFelonyEvent) ToTxLog

func (ev ValidatorFelonyEvent) ToTxLog(log *types.Log) interface{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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