daemon

package
v0.0.0-...-5ade1b4 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2020 License: Apache-2.0 Imports: 17 Imported by: 6

Documentation

Index

Constants

View Source
const (
	// MinimumERC20CoinCreationConfirmationsRequired defines the amount of minimum confirmations required,
	// in order for the ERC20 Node validator to accept a CoinCreation Tx, backed by an ERC20 Tx.
	MinimumERC20CoinCreationConfirmationsRequired = 25
)

Variables

This section is empty.

Functions

func NewERC20NodeValidator

func NewERC20NodeValidator(cfg ERC20NodeValidatorConfig, cancel <-chan struct{}) (erc20types.ERC20TransactionValidator, error)

NewERC20NodeValidator creates a new INFURA-based ERC20NodeValidator. See the `ERC20NodeValidator` struct description for more information.

If the cfg.Enabled property is False the tfchain `NopERC20TransactionValidator` implementation will be used and returned instead.

func NewERC20NodeValidatorFromBridgeContract

func NewERC20NodeValidatorFromBridgeContract(contract *erc20bridge.BridgeContract) (erc20types.ERC20TransactionValidator, error)

Types

type ERC20NodeValidator

type ERC20NodeValidator struct {
	// contains filtered or unexported fields
}

ERC20NodeValidator implements the ERC20TransactionValidator, getting the transactions using the LES/v2 protocol, see the `github.com/threefoldtech/rivine-extension-erc20/api/bridge` for more info.

func (*ERC20NodeValidator) GetBalanceInfo

func (ev *ERC20NodeValidator) GetBalanceInfo() (*erc20types.ERC20BalanceInfo, error)

GetBalanceInfo implements ERC20TransactionValidator.GetBalanceInfo

func (*ERC20NodeValidator) GetStatus

func (ev *ERC20NodeValidator) GetStatus() (*erc20types.ERC20SyncStatus, error)

GetStatus implements ERC20TransactionValidator.GetStatus

func (*ERC20NodeValidator) ValidateWithdrawTx

func (ev *ERC20NodeValidator) ValidateWithdrawTx(_blockID, txID erc20types.ERC20Hash, expectedAddress erc20types.ERC20Address, expectedAmount types.Currency) error

ValidateWithdrawTx implements ERC20TransactionValidator.ValidateWithdrawTx

func (*ERC20NodeValidator) Wait

func (ev *ERC20NodeValidator) Wait(ctx context.Context) error

Wait implements ERC20TransactionValidator.Wait

type ERC20NodeValidatorConfig

type ERC20NodeValidatorConfig struct {
	Enabled     bool
	NetworkName string
	DataDir     string
	Port        int
	BootNodes   []string
	EthLogLevel int
}

ERC20NodeValidatorConfig is all info required to create a ERC20NodeValidator. See the `ERC20NodeValidator` struct for more information.

func (*ERC20NodeValidatorConfig) SetFlags

func (cfg *ERC20NodeValidatorConfig) SetFlags(flags *flag.FlagSet)

SetFlags defines the ERC20NodeValidatorConfig as flags.

Jump to

Keyboard shortcuts

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