cmdutils

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// TestMonethaAdminKey is private key of Monetha admin (only used in simulated block-chain for test purposes)
	TestMonethaAdminKey = mustPrivateKey("163f5f0f9a621d72fedd85ffca3d08d131ab4e812181e0d30ffd1c885d20aac7")
	// TestPassportOwnerKey is private key of passport owner (only used in simulated block-chain for test purposes)
	TestPassportOwnerKey = mustPrivateKey("6694d2c422acd209aac6a3d9841b92f396e82373934b9baacbbcdf376b5a492a")
	// TestFactProviderKey is private key of fact provider (only used in simulated block-chain for test purposes)
	TestFactProviderKey = mustPrivateKey("a2ff6cd471c483f21df01a203e0f81de8093f10bb1d822eb0f4644a3c225919c")
)

Functions

func CheckBalance

func CheckBalance(ctx context.Context, session *eth.Session, gasLimit int64) error

CheckBalance checks if it's enough funds to spend specified gas limit

func CreateCtrlCContext

func CreateCtrlCContext() context.Context

CreateCtrlCContext returns context which's Done channel is closed when application should be terminated (on SIGINT, SIGTERM, SIGHUP, SIGQUIT signal)

func InitLogging

func InitLogging(level log.Lvl, vmodule string)

InitLogging inits logging for root logger

func NewEth

func NewEth(ctx context.Context, backendURL string, enclaveURL string, privateFor []string) (e *eth.Eth, err error)

NewEth creates Ethereum helper, preconfigured to work with specific blockchain from given parameters

func NewMathRandFixedSeed

func NewMathRandFixedSeed() *rand.Rand

NewMathRandFixedSeed creates a new source of pseudo-random numbers that uses fixed seed, so it produces the same set of pseudo-random numbers.

Types

type BackendFactory

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

BackendFactory provides functions for creating clients, which are able to communicate with Ethereum backend based on configuration

func NewBackendFactory

func NewBackendFactory(quorumEnclave *string, quorumPrivateFor []string) *BackendFactory

NewBackendFactory creates factory for creating Ethereum client

func (*BackendFactory) DialBackend

func (f *BackendFactory) DialBackend(backendURL string) (backend.Backend, error)

DialBackend connects an Ethereum client to the given URL.

func (*BackendFactory) DialBackendContext

func (f *BackendFactory) DialBackendContext(ctx context.Context, backendURL string) (backend.Backend, error)

DialBackendContext connects an Ethereum client to the given URL.

func (*BackendFactory) NewEth

func (f *BackendFactory) NewEth(ctx context.Context, b backend.Backend) *eth.Eth

NewEth creates new instance of Eth

type QuorumPrivateTxICommand

type QuorumPrivateTxICommand struct {
	QuorumEnclave string `long:"quorum_enclave" description:"Quorum enclave url for private transactions"`
}

QuorumPrivateTxICommand - provides commands, needed for Quorum's private tx decrypting

type QuorumPrivateTxIOCommand

type QuorumPrivateTxIOCommand struct {
	QuorumPrivateTxICommand
	QuorumPrivateFor flag.StringArray `long:"quorum_privatefor" description:"Quorum nodes public keys to make transaction private for, separated by commas"`
}

QuorumPrivateTxIOCommand - provides commands, needed for Quorum's private tx writing and decrypting

Jump to

Keyboard shortcuts

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