ethereum

package
v0.76.8 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoSignerFound         = errors.New("no signer found")
	ErrStakingBridgeDisabled = errors.New("staking bridge is disabled for this client")
)

Functions

func WaitForTransaction

func WaitForTransaction(ctx context.Context, ethClient *ethclient.Client, tx *types.Transaction, timeout time.Duration) error

Types

type ChainClient

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

func NewChainClientForID

func NewChainClientForID(ctx context.Context, cfg config.Config, networkParams *types.NetworkParams, chainID string, logger *zap.Logger) (*ChainClient, error)

func NewEVMChainClient

func NewEVMChainClient(ctx context.Context, cfg config.EVMBridge, ethConfig *vega.EVMBridgeConfigs, logger *zap.Logger) (*ChainClient, error)

func NewPrimaryChainClient

func NewPrimaryChainClient(ctx context.Context, cfg config.PrimaryBridge, ethConfig *vega.EthereumConfig, logger *zap.Logger) (*ChainClient, error)

func (*ChainClient) DepositERC20AssetFromAddress

func (c *ChainClient) DepositERC20AssetFromAddress(ctx context.Context, minterPrivateHexKey string, assetContractHexAddress string, deposits map[string]*types.Amount) error

func (*ChainClient) DepositERC20AssetFromMinter

func (c *ChainClient) DepositERC20AssetFromMinter(ctx context.Context, assetContractHexAddress string, deposits map[string]*types.Amount) error

func (*ChainClient) EthClient

func (c *ChainClient) EthClient() *ethclient.Client

func (*ChainClient) ID

func (c *ChainClient) ID() string

func (*ChainClient) ListAsset

func (c *ChainClient) ListAsset(ctx context.Context, signers []*Wallet, assetID, assetHexAddress string, lifetimeLimit, withdrawThreshold *big.Int) error

func (*ChainClient) RemoveMinterStake

func (c *ChainClient) RemoveMinterStake(ctx context.Context, partyPubKey string) error

func (*ChainClient) Signers

func (c *ChainClient) Signers(ctx context.Context) ([]common.Address, error)

func (*ChainClient) StakeFromMinter

func (c *ChainClient) StakeFromMinter(ctx context.Context, stakes map[string]*types.Amount) error

type ChainsClient

type ChainsClient struct {
	PrimaryChain *ChainClient
	EVMChain     *ChainClient
}

func NewChainClients

func NewChainClients(ctx context.Context, cfg config.Config, networkParams *types.NetworkParams, logger *zap.Logger) (*ChainsClient, error)

type Wallet

type Wallet struct {
	Address common.Address
	// contains filtered or unexported fields
}

func NewWallet

func NewWallet(ctx context.Context, ethClient *ethclient.Client, privateHexKey string) (*Wallet, error)

func (*Wallet) GetTransactOpts

func (w *Wallet) GetTransactOpts(ctx context.Context) *bind.TransactOpts

func (*Wallet) Sign

func (w *Wallet) Sign(data []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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