eth

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2020 License: MIT Imports: 18 Imported by: 0

README

Eth binding

# Compile solidity code
solcjs --abi mesh.sol

# Generate GO binding
abigen --abi mesh_sol_Mesh.abi --pkg eth --out mesh.go

Documentation

Index

Constants

View Source
const EthABI = "" /* 1423-byte string literal not displayed */

EthABI is the input ABI used to generate the binding from.

View Source
const TRIES = 10

Variables

This section is empty.

Functions

func CreateNewAccount

func CreateNewAccount() (*ecdsa.PrivateKey, error)

func NewEthDriver

func NewEthDriver(URI string, prvKey *ecdsa.PrivateKey) (ra.RemoteAccess, error)

Types

type Eth

type Eth struct {
	EthCaller     // Read-only binding to the contract
	EthTransactor // Write-only binding to the contract
	EthFilterer   // Log filterer for contract events
}

Eth is an auto generated Go binding around an Ethereum contract.

func NewEth

func NewEth(address common.Address, backend bind.ContractBackend) (*Eth, error)

NewEth creates a new instance of Eth, bound to a specific deployed contract.

type EthCaller

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

EthCaller is an auto generated read-only Go binding around an Ethereum contract.

func NewEthCaller

func NewEthCaller(address common.Address, caller bind.ContractCaller) (*EthCaller, error)

NewEthCaller creates a new read-only instance of Eth, bound to a specific deployed contract.

func (*EthCaller) IsPeerAPublisher

func (_Eth *EthCaller) IsPeerAPublisher(opts *bind.CallOpts, a common.Address, topic string) (bool, error)

IsPeerAPublisher is a free data retrieval call binding the contract method 0x3d00ba09.

Solidity: function isPeerAPublisher(address a, string topic) constant returns(bool)

func (*EthCaller) IsPeerSubscribed

func (_Eth *EthCaller) IsPeerSubscribed(opts *bind.CallOpts, a common.Address, topic string) (bool, error)

IsPeerSubscribed is a free data retrieval call binding the contract method 0xcd75072b.

Solidity: function isPeerSubscribed(address a, string topic) constant returns(bool)

type EthCallerRaw

type EthCallerRaw struct {
	Contract *EthCaller // Generic read-only contract binding to access the raw methods on
}

EthCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*EthCallerRaw) Call

func (_Eth *EthCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

type EthCallerSession

type EthCallerSession struct {
	Contract *EthCaller    // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts // Call options to use throughout this session
}

EthCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

func (*EthCallerSession) IsPeerAPublisher

func (_Eth *EthCallerSession) IsPeerAPublisher(a common.Address, topic string) (bool, error)

IsPeerAPublisher is a free data retrieval call binding the contract method 0x3d00ba09.

Solidity: function isPeerAPublisher(address a, string topic) constant returns(bool)

func (*EthCallerSession) IsPeerSubscribed

func (_Eth *EthCallerSession) IsPeerSubscribed(a common.Address, topic string) (bool, error)

IsPeerSubscribed is a free data retrieval call binding the contract method 0xcd75072b.

Solidity: function isPeerSubscribed(address a, string topic) constant returns(bool)

type EthDriver

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

EthDriver implements "RemoteAccess".

func (*EthDriver) IsPeerAPublisher

func (eth *EthDriver) IsPeerAPublisher(p peer.ID, t string) (bool, error)

func (*EthDriver) IsPeerSubscribed

func (eth *EthDriver) IsPeerSubscribed(p peer.ID, t string) (bool, error)

func (*EthDriver) Publish

func (eth *EthDriver) Publish(p peer.ID, topic string) error

func (*EthDriver) Subscribe

func (eth *EthDriver) Subscribe(p peer.ID, topic string) error

func (*EthDriver) Unpublish added in v0.1.0

func (eth *EthDriver) Unpublish(p peer.ID, topic string) error

func (*EthDriver) Unsubscribe added in v0.1.0

func (eth *EthDriver) Unsubscribe(p peer.ID, topic string) error

type EthFilterer

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

EthFilterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewEthFilterer

func NewEthFilterer(address common.Address, filterer bind.ContractFilterer) (*EthFilterer, error)

NewEthFilterer creates a new log filterer instance of Eth, bound to a specific deployed contract.

type EthRaw

type EthRaw struct {
	Contract *Eth // Generic contract binding to access the raw methods on
}

EthRaw is an auto generated low-level Go binding around an Ethereum contract.

func (*EthRaw) Call

func (_Eth *EthRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

func (*EthRaw) Transact

func (_Eth *EthRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*EthRaw) Transfer

func (_Eth *EthRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type EthSession

type EthSession struct {
	Contract     *Eth              // Generic contract binding to set the session for
	CallOpts     bind.CallOpts     // Call options to use throughout this session
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

EthSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*EthSession) IsPeerAPublisher

func (_Eth *EthSession) IsPeerAPublisher(a common.Address, topic string) (bool, error)

IsPeerAPublisher is a free data retrieval call binding the contract method 0x3d00ba09.

Solidity: function isPeerAPublisher(address a, string topic) constant returns(bool)

func (*EthSession) IsPeerSubscribed

func (_Eth *EthSession) IsPeerSubscribed(a common.Address, topic string) (bool, error)

IsPeerSubscribed is a free data retrieval call binding the contract method 0xcd75072b.

Solidity: function isPeerSubscribed(address a, string topic) constant returns(bool)

func (*EthSession) Publish

func (_Eth *EthSession) Publish(a common.Address, topic string) (*types.Transaction, error)

Publish is a paid mutator transaction binding the contract method 0xba68a2bf.

Solidity: function publish(address a, string topic) returns()

func (*EthSession) Subscribe

func (_Eth *EthSession) Subscribe(a common.Address, topic string) (*types.Transaction, error)

Subscribe is a paid mutator transaction binding the contract method 0x3c659743.

Solidity: function subscribe(address a, string topic) returns()

func (*EthSession) Unpublish added in v0.1.0

func (_Eth *EthSession) Unpublish(a common.Address, topic string) (*types.Transaction, error)

Unpublish is a paid mutator transaction binding the contract method 0x8d3eca25.

Solidity: function unpublish(address a, string topic) returns()

func (*EthSession) Unsubscribe added in v0.1.0

func (_Eth *EthSession) Unsubscribe(a common.Address, topic string) (*types.Transaction, error)

Unsubscribe is a paid mutator transaction binding the contract method 0xcf74f1d5.

Solidity: function unsubscribe(address a, string topic) returns()

type EthTransactor

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

EthTransactor is an auto generated write-only Go binding around an Ethereum contract.

func NewEthTransactor

func NewEthTransactor(address common.Address, transactor bind.ContractTransactor) (*EthTransactor, error)

NewEthTransactor creates a new write-only instance of Eth, bound to a specific deployed contract.

func (*EthTransactor) Publish

func (_Eth *EthTransactor) Publish(opts *bind.TransactOpts, a common.Address, topic string) (*types.Transaction, error)

Publish is a paid mutator transaction binding the contract method 0xba68a2bf.

Solidity: function publish(address a, string topic) returns()

func (*EthTransactor) Subscribe

func (_Eth *EthTransactor) Subscribe(opts *bind.TransactOpts, a common.Address, topic string) (*types.Transaction, error)

Subscribe is a paid mutator transaction binding the contract method 0x3c659743.

Solidity: function subscribe(address a, string topic) returns()

func (*EthTransactor) Unpublish added in v0.1.0

func (_Eth *EthTransactor) Unpublish(opts *bind.TransactOpts, a common.Address, topic string) (*types.Transaction, error)

Unpublish is a paid mutator transaction binding the contract method 0x8d3eca25.

Solidity: function unpublish(address a, string topic) returns()

func (*EthTransactor) Unsubscribe added in v0.1.0

func (_Eth *EthTransactor) Unsubscribe(opts *bind.TransactOpts, a common.Address, topic string) (*types.Transaction, error)

Unsubscribe is a paid mutator transaction binding the contract method 0xcf74f1d5.

Solidity: function unsubscribe(address a, string topic) returns()

type EthTransactorRaw

type EthTransactorRaw struct {
	Contract *EthTransactor // Generic write-only contract binding to access the raw methods on
}

EthTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*EthTransactorRaw) Transact

func (_Eth *EthTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*EthTransactorRaw) Transfer

func (_Eth *EthTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type EthTransactorSession

type EthTransactorSession struct {
	Contract     *EthTransactor    // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

EthTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

func (*EthTransactorSession) Publish

func (_Eth *EthTransactorSession) Publish(a common.Address, topic string) (*types.Transaction, error)

Publish is a paid mutator transaction binding the contract method 0xba68a2bf.

Solidity: function publish(address a, string topic) returns()

func (*EthTransactorSession) Subscribe

func (_Eth *EthTransactorSession) Subscribe(a common.Address, topic string) (*types.Transaction, error)

Subscribe is a paid mutator transaction binding the contract method 0x3c659743.

Solidity: function subscribe(address a, string topic) returns()

func (*EthTransactorSession) Unpublish added in v0.1.0

func (_Eth *EthTransactorSession) Unpublish(a common.Address, topic string) (*types.Transaction, error)

Unpublish is a paid mutator transaction binding the contract method 0x8d3eca25.

Solidity: function unpublish(address a, string topic) returns()

func (*EthTransactorSession) Unsubscribe added in v0.1.0

func (_Eth *EthTransactorSession) Unsubscribe(a common.Address, topic string) (*types.Transaction, error)

Unsubscribe is a paid mutator transaction binding the contract method 0xcf74f1d5.

Solidity: function unsubscribe(address a, string topic) returns()

Jump to

Keyboard shortcuts

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