evm

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertBalanceToAlpha

func ConvertBalanceToAlpha(eth *big.Int) uint64

func FeeCreditRecordIDFromPublicKey

func FeeCreditRecordIDFromPublicKey(_, pubKey []byte) types.UnitID

FeeCreditRecordIDFromPublicKey - create fee credit id from public key. For EVM shard part is ignored for now as it is not meant to shard.

Types

type Client

type Client interface {
	GetRoundNumber(ctx context.Context) (*wallet.RoundNumber, error)
	PostTransaction(ctx context.Context, tx *types.TransactionOrder) error
	GetTxProof(ctx context.Context, unitID types.UnitID, txHash wallet.TxHash) (*wallet.Proof, error)
}

type TxPublisher

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

func NewTxPublisher

func NewTxPublisher(backendClient Client) *TxPublisher

func (*TxPublisher) Close

func (w *TxPublisher) Close()

func (*TxPublisher) SendTx

func (w *TxPublisher) SendTx(ctx context.Context, tx *types.TransactionOrder, _ []byte) (*wallet.Proof, error)

SendTx sends a tx and waits for confirmation, returns tx proof

type Wallet

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

func New

func New(systemID types.SystemID, restUrl string, am account.Manager) (*Wallet, error)

func (*Wallet) EvmCall

func (w *Wallet) EvmCall(ctx context.Context, accNr uint64, attrs *evmclient.CallAttributes) (*evmclient.Result, error)

func (*Wallet) GetBalance

func (w *Wallet) GetBalance(ctx context.Context, accNr uint64) (*big.Int, error)

func (*Wallet) SendEvmTx

func (w *Wallet) SendEvmTx(ctx context.Context, accNr uint64, attrs *evmclient.TxAttributes) (*evmclient.Result, error)

func (*Wallet) Shutdown

func (w *Wallet) Shutdown()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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