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
- type ABI
- type ABIArgument
- type ABIArgumentMarshaling
- type ABIArguments
- type ABIElementMarshaling
- type ABIEvent
- type ABIFunctionType
- type ABIMarshaling
- type ABIMethod
- type ABIType
- type Address
- type ClientSubscription
- type Contract
- type ContractInfo
- type EIP155Signer
- type EthAPI
- type Hash
- type Header
- type HexBigInt
- type HexBytes
- type HexUint
- type HexUint64
- type RPCClient
- type RuntimeABI
- type Transaction
Constants ¶
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 )
const ( // Function - type Function = abi.Function )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ABIArgument ¶
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 ¶
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 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 ClientSubscription ¶
type ClientSubscription = rpc.ClientSubscription
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 = ðAPIShim{}
EthAPIShim is an implementation of the shim
type RuntimeABI ¶
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