Versions in this module Expand all Collapse all v1 v1.0.2 May 13, 2021 v1.0.0 Feb 1, 2021 Changes in this version + var GWEI = int64(1000000000) + func AllEvents() (map[[32]byte]abi.Event, error) + func PrepareContractTxn(ctx context.Context, proxy db.DataServerProxy, ctxName string, ...) error + type ABICodec struct + Events map[string]*abi.Event + func BuildCodec() (*ABICodec, error) + type CurrentChallenge struct + ChallengeHash [32]byte + Difficulty *big.Int + Granularity *big.Int + QueryString string + RequestID *big.Int + Tip *big.Int + type ETHClient interface + BalanceAt func(ctx context.Context, address common.Address, block *big.Int) (*big.Int, error) + CallContract func(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) + Close func() + CodeAt func(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error) + EstimateGas func(ctx context.Context, call ethereum.CallMsg) (gas uint64, err error) + FilterLogs func(ctx context.Context, query ethereum.FilterQuery) ([]types.Log, error) + HeaderByNumber func(ctx context.Context, num *big.Int) (*types.Header, error) + IsSyncing func(ctx context.Context) (bool, error) + NetworkID func(ctx context.Context) (*big.Int, error) + NonceAt func(ctx context.Context, address common.Address) (uint64, error) + PendingCallContract func(ctx context.Context, call ethereum.CallMsg) ([]byte, error) + PendingCodeAt func(ctx context.Context, account common.Address) ([]byte, error) + PendingNonceAt func(ctx context.Context, address common.Address) (uint64, error) + SendTransaction func(ctx context.Context, tx *types.Transaction) error + SubscribeFilterLogs func(ctx context.Context, query ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error) + SuggestGasPrice func(ctx context.Context) (*big.Int, error) + func NewClient(url string) (ETHClient, error) + func NewMockClient() ETHClient + func NewMockClientWithValues(opts *MockOptions) ETHClient + type MockOptions struct + CurrentChallenge *CurrentChallenge + DisputeStatus *big.Int + ETHBalance *big.Int + GasPrice *big.Int + MiningStatus bool + Nonce uint64 + QueryMetadata map[uint]*MockQueryMeta + TokenBalance *big.Int + Top50Requests []*big.Int + type MockQueryMeta struct + Granularity int + QueryString string