ethbinding

package
v0.0.0-...-ab9908f Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Copyright © 2018,2021 Kaleido, Inc.

SPDX-License-Identifier: Apache-2.0

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	// IntTy - type
	IntTy = abi.IntTy
	// UintTy - type
	UintTy = abi.UintTy
	// BoolTy - type
	BoolTy = abi.BoolTy
	// StringTy - type
	StringTy = abi.StringTy
	// BytesTy - type
	BytesTy = abi.BytesTy
	// FixedBytesTy - type
	FixedBytesTy = abi.FixedBytesTy
	// AddressTy - type
	AddressTy = abi.AddressTy
	// SliceTy - type
	SliceTy = abi.SliceTy
	// ArrayTy - type
	ArrayTy = abi.ArrayTy
	// TupleTy - type
	TupleTy = abi.TupleTy
	// FunctionTy - type
	FunctionTy
)
View Source
const (
	// Function - type
	Function = abi.Function
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ABI

type ABI = abi.ABI

The ABI holds information about a contract's context and available invokable methods

type ABIArgument

type ABIArgument = abi.Argument

ABIArgument is an argument in the Inputs or Outputs of an ABI

type ABIArgumentMarshaling

type ABIArgumentMarshaling struct {
	Name         string                  `json:"name"`
	Type         string                  `json:"type"`
	InternalType string                  `json:"internalType,omitempty"`
	Components   []ABIArgumentMarshaling `json:"components,omitempty"`
	Indexed      bool                    `json:"indexed,omitempty"`
}

ABIArgumentMarshaling is abi.ArgumentMarshaling

type ABIArguments

type ABIArguments = abi.Arguments

ABIArguments is an array of arguments with helper functions

type ABIElementMarshaling

type ABIElementMarshaling struct {
	Type            string                  `json:"type,omitempty"`
	Name            string                  `json:"name,omitempty"`
	Payable         bool                    `json:"payable,omitempty"`
	Constant        bool                    `json:"constant,omitempty"`
	Anonymous       bool                    `json:"anonymous,omitempty"`
	StateMutability string                  `json:"stateMutability,omitempty"`
	Inputs          []ABIArgumentMarshaling `json:"inputs"`
	Outputs         []ABIArgumentMarshaling `json:"outputs"`
}

ABIElementMarshaling is the serialized representation of a method or event in an ABI

type ABIEvent

type ABIEvent = abi.Event

ABIEvent is an event on the ABI

type ABIFunctionType

type ABIFunctionType = abi.FunctionType

ABIFunctionType represents different types of functions a contract might have

type ABIMarshaling

type ABIMarshaling []ABIElementMarshaling

ABIMarshaling is the JSON array representation of an ABI

type ABIMethod

type ABIMethod = abi.Method

ABIMethod is an method on the ABI

type ABIType

type ABIType = abi.Type

ABIType is a type

type Address

type Address = common.Address

Address models and serializes a 20 byte ethereum address

type ClientSubscription

type ClientSubscription = rpc.ClientSubscription

type Contract

type Contract = compiler.Contract

Contract is a EVM compiled contract object

type ContractInfo

type ContractInfo = compiler.ContractInfo

ContractInfo contains metadata about a EVM compiled contract

type EIP155Signer

type EIP155Signer = types.EIP155Signer

EIP155Signer implements Signer using the EIP155 rules

type EthAPI

type EthAPI interface {
	HexDecode(hex string) ([]byte, error)
	HexToAddress(hex string) Address
	BytesToAddress(b []byte) Address
	IsHexAddress(s string) bool
	HexToHash(hex string) Hash
	EncodeBig(bigint *big.Int) string
	FromHex(hex string) []byte
	HexEncode(b []byte) string
	ABITypeFor(typeName string) (ABIType, error)
	ABITypeKnown(typeName string) ABIType
	NewType(typeName string, internalType string) (typ abi.Type, err error)
	ABIEventSignature(event *ABIEvent) string
	ABIMarshalingToABIRuntime(marshalable ABIMarshaling) (*RuntimeABI, error)
	ABIArgumentsMarshalingToABIArguments(marshalable []ABIArgumentMarshaling) (ABIArguments, error)
	ABIElementMarshalingToABIEvent(marshalable *ABIElementMarshaling) (event *ABIEvent, err error)
	ABIElementMarshalingToABIMethod(m *ABIElementMarshaling) (method *ABIMethod, err error)
	JSON(reader io.Reader) (abi.ABI, error)
	ParseCombinedJSON(combinedJSON []byte, source string, languageVersion string, compilerVersion string, compilerOptions string) (map[string]*Contract, error)
	Dial(rawurl string) (*RPCClient, error)
	NewMethod(name string, rawName string, funType ABIFunctionType, mutability string, isConst, isPayable bool, inputs ABIArguments, outputs ABIArguments) ABIMethod
	NewTransaction(nonce uint64, to common.Address, amount *big.Int, gasLimit uint64, gasPrice *big.Int, data []byte) *Transaction
	NewContractCreation(nonce uint64, amount *big.Int, gasLimit uint64, gasPrice *big.Int, data []byte) *Transaction
	NewEIP155Signer(chainID *big.Int) EIP155Signer
	ParseBig256(s string) (*big.Int, bool)
	S256(x *big.Int) *big.Int
	GenerateKey() (*ecdsa.PrivateKey, error)
	PubkeyToAddress(p ecdsa.PublicKey) Address
	FromECDSA(priv *ecdsa.PrivateKey) []byte
	HexToECDSA(hexkey string) (*ecdsa.PrivateKey, error)
	NewStream(r io.Reader, inputLimit uint64) *rlp.Stream
	SignTx(tx *types.Transaction, s types.Signer, prv *ecdsa.PrivateKey) (*types.Transaction, error)
}

EthAPI is a subset of the go-ethereum LGPL API exposed via a go plugin

var EthAPIShim EthAPI = &ethAPIShim{}

EthAPIShim is an implementation of the shim

type Hash

type Hash = common.Hash

Hash models and serializes a 32 byte ethereum hash

type Header = types.Header

Header is a type for ethereum block Header representation

type HexBigInt

type HexBigInt = hexutil.Big

HexBigInt models and serializes big.Int

type HexBytes

type HexBytes = hexutil.Bytes

HexBytes marshals/unmarshals as a JSON string with 0x prefix.

type HexUint

type HexUint = hexutil.Uint

HexUint models and serializes uint

type HexUint64

type HexUint64 = hexutil.Uint64

HexUint64 models and serializes uint64

type RPCClient

type RPCClient = rpc.Client

RPCClient is a connection to an RPC server

type RuntimeABI

type RuntimeABI struct {
	abi.ABI
}

RuntimeABI is the ethereum implementation of an ABI. It can be unmarshalled from an ABI JSON, but does not support marshalling.

type Transaction

type Transaction = types.Transaction

Jump to

Keyboard shortcuts

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