eth

package
v0.0.0-...-da22cf9 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client defines wrappers to a remote endpoint

func InitEthConn

func InitEthConn(nodeUrl string, logger log.Logger) (*Client, error)

Instantiate a connection and bind the go plasma contract wrapper with this client

func (*Client) CurrentBlockNum

func (client *Client) CurrentBlockNum() (*big.Int, error)

func (*Client) SubscribeToHeads

func (client *Client) SubscribeToHeads() (<-chan *types.Header, error)

SubscribeToHeads returns a channel that funnels new ethereum headers to the returned channel

type Plasma

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

Plasma holds related unexported members

func InitPlasma

func InitPlasma(contractAddr common.Address, privateKey *ecdsa.PrivateKey, client *Client, logger log.Logger, finalityBound uint64) (*Plasma, error)

InitPlasma binds the go wrapper to the deployed contract. This private key provides authentication for the operator

func (*Plasma) GetDeposit

func (plasma *Plasma) GetDeposit(nonce *big.Int) (*plasmaTypes.Deposit, error)

GetDeposit checks the existence of a deposit nonce

func (*Plasma) HasTXBeenExited

func (plasma *Plasma) HasTXBeenExited(position [4]*big.Int) bool

HasTXBeenExited indicates if the position has ever been exited

func (*Plasma) SubmitBlock

func (plasma *Plasma) SubmitBlock(header [32]byte, numTxns *big.Int) (*types.Transaction, error)

SubmitBlock proxy. TODO: handle batching with a timmer interrupt

Jump to

Keyboard shortcuts

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