session

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseOption added in v0.8.1

type BaseOption struct {
	KAS                *kas.Config
	BlockchainEndpoint string `split_words:"true" default:"https://api.baobab.klaytn.net:8651"`
	DeploymentPath     string `split_words:"true"`
	FeePayerEndpoint   string `split_words:"true" default:"http://localhost:3470/api"`
	FeePayerToken      string `split_words:"true"`
}

type Config

type Config struct {
	Account     account.Account
	Client      ablbind.ContractBackend
	Deployments ablbind.Deployments
}

type Factory added in v0.8.1

type Factory interface {
	NewSession(ctx context.Context, opts ...FactoryOption) (Session, account.Account, error)
}

func MustNewFactory added in v0.8.1

func MustNewFactory(ctx context.Context, opt BaseOption) Factory

func NewFactory added in v0.8.1

func NewFactory(ctx context.Context, opt BaseOption) (Factory, error)

type FactoryOption added in v0.8.1

type FactoryOption func(*sessionFactoryOption)

func WithClient added in v0.8.1

func WithClient(client *blockchain.Client) FactoryOption

func WithDeployments added in v0.8.1

func WithDeployments(deployments bind.Deployments) FactoryOption

func WithKey added in v0.8.1

func WithKey(key *ecdsa.PrivateKey) FactoryOption

func WithUsingFeePayer added in v0.9.4

func WithUsingFeePayer() FactoryOption

type Session

type Session struct {
	ablbind.ContractBackend
	// contains filtered or unexported fields
}

func NewSession

func NewSession(cfg Config) (Session, error)

func (Session) Client

func (sess Session) Client() *klayClient.Client

func (Session) Deployment

func (sess Session) Deployment(contract string) (ablbind.Deployment, bool)

func (Session) MakeTransaction

func (sess Session) MakeTransaction(opts *ablbind.TransactOpts, contract *common.Address, input []byte) (*types.Transaction, error)

func (Session) SendTransaction

func (sess Session) SendTransaction(ctx context.Context, tx *types.Transaction) (*types.Receipt, error)

func (Session) Transactor

func (sess Session) Transactor(ctx context.Context, opts ...*ablbind.TransactOpts) *ablbind.TransactOpts

Jump to

Keyboard shortcuts

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