Documentation ¶
Index ¶
- Variables
- func CheckBalance(ctx context.Context, session *eth.Session, gasLimit int64) error
- func CreateCtrlCContext() context.Context
- func InitLogging(level log.Lvl, vmodule string)
- func NewEth(ctx context.Context, backendURL string, enclaveURL string, privateFor []string) (e *eth.Eth, err error)
- func NewMathRandFixedSeed() *rand.Rand
- type BackendFactory
- type QuorumPrivateTxICommand
- type QuorumPrivateTxIOCommand
Constants ¶
This section is empty.
Variables ¶
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 ¶
CheckBalance checks if it's enough funds to spend specified gas limit
func CreateCtrlCContext ¶
CreateCtrlCContext returns context which's Done channel is closed when application should be terminated (on SIGINT, SIGTERM, SIGHUP, SIGQUIT signal)
func InitLogging ¶
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 ¶
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.
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