ethapi

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: BSD-3-Clause Imports: 12 Imported by: 3

Documentation

Index

Constants

View Source
const (
	InfuraUrl     = "https://goerli.infura.io/v3/56bf070cd1714103b3bd40e1da1edf86"
	ConfigAddr    = "0x72F391A5fC31b026739C8C26e0c5C01b2783F786" /*goerli network*/
	AdvertiseAddr = "0xfA1159141f9fE553B18d5E67ee58e7ABE53cCa71"
)
View Source
const AdvertiseABI = "" /* 2831-byte string literal not displayed */

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

View Source
const ChainConfigABI = "" /* 3706-byte string literal not displayed */

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

Variables

This section is empty.

Functions

func DelAD

func DelAD(name, contractAddr string, key *ecdsa.PrivateKey) (string, error)

func DelNewMiner

func DelNewMiner(addr, host string, key *ecdsa.PrivateKey) (string, error)

func GetAdvertiseAddress

func GetAdvertiseAddress() (string, error)

func QueryOneAdItem

func QueryOneAdItem(addr, contractAddr string) string

func RefreshHostByAddr

func RefreshHostByAddr(addr string) string

func RegNewAD

func RegNewAD(name, jsonConfig, contractAddr string, key *ecdsa.PrivateKey) (string, error)

func RegNewMiner

func RegNewMiner(addr, host, name string, key *ecdsa.PrivateKey) (string, error)

func SetAdvertiseAddress

func SetAdvertiseAddress(addr string, key *ecdsa.PrivateKey) (string, error)

func UpdateAd added in v1.0.2

func UpdateAd(name, jsonConfig, contractAddr string, key *ecdsa.PrivateKey) (string, error)

func UpdateNewMiner

func UpdateNewMiner(addr, host string, key *ecdsa.PrivateKey) (string, error)

Types

type Advertise struct {
	AdvertiseCaller     // Read-only binding to the contract
	AdvertiseTransactor // Write-only binding to the contract
	AdvertiseFilterer   // Log filterer for contract events
}

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

func NewAdvertise

func NewAdvertise(address common.Address, backend bind.ContractBackend) (*Advertise, error)

NewAdvertise creates a new instance of Advertise, bound to a specific deployed contract.

type AdvertiseAdItem

type AdvertiseAdItem struct {
	Name         string
	ConfigInJson string
}

AdvertiseAdItem is an auto generated low-level Go binding around an user-defined struct.

func AdvertiseList

func AdvertiseList(contractAddr string) []AdvertiseAdItem

type AdvertiseCaller

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

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

func NewAdvertiseCaller

func NewAdvertiseCaller(address common.Address, caller bind.ContractCaller) (*AdvertiseCaller, error)

NewAdvertiseCaller creates a new read-only instance of Advertise, bound to a specific deployed contract.

func (*AdvertiseCaller) AdList

func (_Advertise *AdvertiseCaller) AdList(opts *bind.CallOpts) ([]AdvertiseAdItem, error)

AdList is a free data retrieval call binding the contract method 0x9c2e1981.

Solidity: function AdList() view returns((string,string)[])

func (*AdvertiseCaller) Administrators

func (_Advertise *AdvertiseCaller) Administrators(opts *bind.CallOpts, arg0 common.Address) (bool, error)

Administrators is a free data retrieval call binding the contract method 0xf7735770.

Solidity: function Administrators(address ) view returns(bool)

func (*AdvertiseCaller) Advertisements

func (_Advertise *AdvertiseCaller) Advertisements(opts *bind.CallOpts, arg0 *big.Int) (struct {
	Name         string
	ConfigInJson string
}, error)

Advertisements is a free data retrieval call binding the contract method 0xbcea610e.

Solidity: function advertisements(uint256 ) view returns(string name, string configInJson)

func (*AdvertiseCaller) Owner

func (_Advertise *AdvertiseCaller) Owner(opts *bind.CallOpts) (common.Address, error)

Owner is a free data retrieval call binding the contract method 0x8da5cb5b.

Solidity: function owner() view returns(address)

func (*AdvertiseCaller) QueryByOne

func (_Advertise *AdvertiseCaller) QueryByOne(opts *bind.CallOpts, name string) (string, error)

QueryByOne is a free data retrieval call binding the contract method 0x52e1281f.

Solidity: function QueryByOne(string name) view returns(string)

func (*AdvertiseCaller) SIdx

func (_Advertise *AdvertiseCaller) SIdx(opts *bind.CallOpts, arg0 string) (*big.Int, error)

SIdx is a free data retrieval call binding the contract method 0xb14faf5a.

Solidity: function sIdx(string ) view returns(uint256)

type AdvertiseCallerRaw

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

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

func (*AdvertiseCallerRaw) Call

func (_Advertise *AdvertiseCallerRaw) 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 AdvertiseCallerSession

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

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

func (*AdvertiseCallerSession) AdList

func (_Advertise *AdvertiseCallerSession) AdList() ([]AdvertiseAdItem, error)

AdList is a free data retrieval call binding the contract method 0x9c2e1981.

Solidity: function AdList() view returns((string,string)[])

func (*AdvertiseCallerSession) Administrators

func (_Advertise *AdvertiseCallerSession) Administrators(arg0 common.Address) (bool, error)

Administrators is a free data retrieval call binding the contract method 0xf7735770.

Solidity: function Administrators(address ) view returns(bool)

func (*AdvertiseCallerSession) Advertisements

func (_Advertise *AdvertiseCallerSession) Advertisements(arg0 *big.Int) (struct {
	Name         string
	ConfigInJson string
}, error)

Advertisements is a free data retrieval call binding the contract method 0xbcea610e.

Solidity: function advertisements(uint256 ) view returns(string name, string configInJson)

func (*AdvertiseCallerSession) Owner

func (_Advertise *AdvertiseCallerSession) Owner() (common.Address, error)

Owner is a free data retrieval call binding the contract method 0x8da5cb5b.

Solidity: function owner() view returns(address)

func (*AdvertiseCallerSession) QueryByOne

func (_Advertise *AdvertiseCallerSession) QueryByOne(name string) (string, error)

QueryByOne is a free data retrieval call binding the contract method 0x52e1281f.

Solidity: function QueryByOne(string name) view returns(string)

func (*AdvertiseCallerSession) SIdx

func (_Advertise *AdvertiseCallerSession) SIdx(arg0 string) (*big.Int, error)

SIdx is a free data retrieval call binding the contract method 0xb14faf5a.

Solidity: function sIdx(string ) view returns(uint256)

type AdvertiseConfig

type AdvertiseConfig struct {
	ImgUrl  string `json:"img_url"`
	LinkUrl string `json:"link_url"`
	Typ     int    `json:"typ"`
}

type AdvertiseFilterer

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

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

func NewAdvertiseFilterer

func NewAdvertiseFilterer(address common.Address, filterer bind.ContractFilterer) (*AdvertiseFilterer, error)

NewAdvertiseFilterer creates a new log filterer instance of Advertise, bound to a specific deployed contract.

type AdvertiseRaw

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

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

func (*AdvertiseRaw) Call

func (_Advertise *AdvertiseRaw) 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 (*AdvertiseRaw) Transact

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

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

func (*AdvertiseRaw) Transfer

func (_Advertise *AdvertiseRaw) 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 AdvertiseSession

type AdvertiseSession struct {
	Contract     *Advertise        // 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
}

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

func (*AdvertiseSession) AdList

func (_Advertise *AdvertiseSession) AdList() ([]AdvertiseAdItem, error)

AdList is a free data retrieval call binding the contract method 0x9c2e1981.

Solidity: function AdList() view returns((string,string)[])

func (*AdvertiseSession) AddAdmin

func (_Advertise *AdvertiseSession) AddAdmin(admin common.Address) (*types.Transaction, error)

AddAdmin is a paid mutator transaction binding the contract method 0x70480275.

Solidity: function addAdmin(address admin) returns()

func (*AdvertiseSession) AddItem

func (_Advertise *AdvertiseSession) AddItem(name string, config string) (*types.Transaction, error)

AddItem is a paid mutator transaction binding the contract method 0x7ed8a719.

Solidity: function addItem(string name, string config) returns()

func (*AdvertiseSession) Administrators

func (_Advertise *AdvertiseSession) Administrators(arg0 common.Address) (bool, error)

Administrators is a free data retrieval call binding the contract method 0xf7735770.

Solidity: function Administrators(address ) view returns(bool)

func (*AdvertiseSession) Advertisements

func (_Advertise *AdvertiseSession) Advertisements(arg0 *big.Int) (struct {
	Name         string
	ConfigInJson string
}, error)

Advertisements is a free data retrieval call binding the contract method 0xbcea610e.

Solidity: function advertisements(uint256 ) view returns(string name, string configInJson)

func (*AdvertiseSession) ChangeAd added in v1.0.2

func (_Advertise *AdvertiseSession) ChangeAd(name string, config string) (*types.Transaction, error)

ChangeAd is a paid mutator transaction binding the contract method 0x01727022.

Solidity: function changeAd(string name, string config) returns()

func (*AdvertiseSession) Owner

func (_Advertise *AdvertiseSession) Owner() (common.Address, error)

Owner is a free data retrieval call binding the contract method 0x8da5cb5b.

Solidity: function owner() view returns(address)

func (*AdvertiseSession) QueryByOne

func (_Advertise *AdvertiseSession) QueryByOne(name string) (string, error)

QueryByOne is a free data retrieval call binding the contract method 0x52e1281f.

Solidity: function QueryByOne(string name) view returns(string)

func (*AdvertiseSession) RemoveAdmin

func (_Advertise *AdvertiseSession) RemoveAdmin(admin common.Address) (*types.Transaction, error)

RemoveAdmin is a paid mutator transaction binding the contract method 0x1785f53c.

Solidity: function removeAdmin(address admin) returns()

func (*AdvertiseSession) RemoveItem

func (_Advertise *AdvertiseSession) RemoveItem(name string) (*types.Transaction, error)

RemoveItem is a paid mutator transaction binding the contract method 0x68dfa8ba.

Solidity: function removeItem(string name) returns()

func (*AdvertiseSession) SIdx

func (_Advertise *AdvertiseSession) SIdx(arg0 string) (*big.Int, error)

SIdx is a free data retrieval call binding the contract method 0xb14faf5a.

Solidity: function sIdx(string ) view returns(uint256)

func (*AdvertiseSession) TransferOwnership

func (_Advertise *AdvertiseSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error)

TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.

Solidity: function transferOwnership(address newOwner) returns()

type AdvertiseTransactor

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

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

func NewAdvertiseTransactor

func NewAdvertiseTransactor(address common.Address, transactor bind.ContractTransactor) (*AdvertiseTransactor, error)

NewAdvertiseTransactor creates a new write-only instance of Advertise, bound to a specific deployed contract.

func (*AdvertiseTransactor) AddAdmin

func (_Advertise *AdvertiseTransactor) AddAdmin(opts *bind.TransactOpts, admin common.Address) (*types.Transaction, error)

AddAdmin is a paid mutator transaction binding the contract method 0x70480275.

Solidity: function addAdmin(address admin) returns()

func (*AdvertiseTransactor) AddItem

func (_Advertise *AdvertiseTransactor) AddItem(opts *bind.TransactOpts, name string, config string) (*types.Transaction, error)

AddItem is a paid mutator transaction binding the contract method 0x7ed8a719.

Solidity: function addItem(string name, string config) returns()

func (*AdvertiseTransactor) ChangeAd added in v1.0.2

func (_Advertise *AdvertiseTransactor) ChangeAd(opts *bind.TransactOpts, name string, config string) (*types.Transaction, error)

ChangeAd is a paid mutator transaction binding the contract method 0x01727022.

Solidity: function changeAd(string name, string config) returns()

func (*AdvertiseTransactor) RemoveAdmin

func (_Advertise *AdvertiseTransactor) RemoveAdmin(opts *bind.TransactOpts, admin common.Address) (*types.Transaction, error)

RemoveAdmin is a paid mutator transaction binding the contract method 0x1785f53c.

Solidity: function removeAdmin(address admin) returns()

func (*AdvertiseTransactor) RemoveItem

func (_Advertise *AdvertiseTransactor) RemoveItem(opts *bind.TransactOpts, name string) (*types.Transaction, error)

RemoveItem is a paid mutator transaction binding the contract method 0x68dfa8ba.

Solidity: function removeItem(string name) returns()

func (*AdvertiseTransactor) TransferOwnership

func (_Advertise *AdvertiseTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error)

TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.

Solidity: function transferOwnership(address newOwner) returns()

type AdvertiseTransactorRaw

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

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

func (*AdvertiseTransactorRaw) Transact

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

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

func (*AdvertiseTransactorRaw) Transfer

func (_Advertise *AdvertiseTransactorRaw) 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 AdvertiseTransactorSession

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

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

func (*AdvertiseTransactorSession) AddAdmin

func (_Advertise *AdvertiseTransactorSession) AddAdmin(admin common.Address) (*types.Transaction, error)

AddAdmin is a paid mutator transaction binding the contract method 0x70480275.

Solidity: function addAdmin(address admin) returns()

func (*AdvertiseTransactorSession) AddItem

func (_Advertise *AdvertiseTransactorSession) AddItem(name string, config string) (*types.Transaction, error)

AddItem is a paid mutator transaction binding the contract method 0x7ed8a719.

Solidity: function addItem(string name, string config) returns()

func (*AdvertiseTransactorSession) ChangeAd added in v1.0.2

func (_Advertise *AdvertiseTransactorSession) ChangeAd(name string, config string) (*types.Transaction, error)

ChangeAd is a paid mutator transaction binding the contract method 0x01727022.

Solidity: function changeAd(string name, string config) returns()

func (*AdvertiseTransactorSession) RemoveAdmin

func (_Advertise *AdvertiseTransactorSession) RemoveAdmin(admin common.Address) (*types.Transaction, error)

RemoveAdmin is a paid mutator transaction binding the contract method 0x1785f53c.

Solidity: function removeAdmin(address admin) returns()

func (*AdvertiseTransactorSession) RemoveItem

func (_Advertise *AdvertiseTransactorSession) RemoveItem(name string) (*types.Transaction, error)

RemoveItem is a paid mutator transaction binding the contract method 0x68dfa8ba.

Solidity: function removeItem(string name) returns()

func (*AdvertiseTransactorSession) TransferOwnership

func (_Advertise *AdvertiseTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error)

TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.

Solidity: function transferOwnership(address newOwner) returns()

type ChainConfig

type ChainConfig struct {
	ChainConfigCaller     // Read-only binding to the contract
	ChainConfigTransactor // Write-only binding to the contract
	ChainConfigFilterer   // Log filterer for contract events
}

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

func NewChainConfig

func NewChainConfig(address common.Address, backend bind.ContractBackend) (*ChainConfig, error)

NewChainConfig creates a new instance of ChainConfig, bound to a specific deployed contract.

type ChainConfigCaller

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

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

func NewChainConfigCaller

func NewChainConfigCaller(address common.Address, caller bind.ContractCaller) (*ChainConfigCaller, error)

NewChainConfigCaller creates a new read-only instance of ChainConfig, bound to a specific deployed contract.

func (*ChainConfigCaller) Administrators

func (_ChainConfig *ChainConfigCaller) Administrators(opts *bind.CallOpts, arg0 common.Address) (bool, error)

Administrators is a free data retrieval call binding the contract method 0xf7735770.

Solidity: function Administrators(address ) view returns(bool)

func (*ChainConfigCaller) AdvertiseAddr

func (_ChainConfig *ChainConfigCaller) AdvertiseAddr(opts *bind.CallOpts) (common.Address, error)

AdvertiseAddr is a free data retrieval call binding the contract method 0x06816e43.

Solidity: function AdvertiseAddr() view returns(address)

func (*ChainConfigCaller) Owner

func (_ChainConfig *ChainConfigCaller) Owner(opts *bind.CallOpts) (common.Address, error)

Owner is a free data retrieval call binding the contract method 0x8da5cb5b.

Solidity: function owner() view returns(address)

func (*ChainConfigCaller) QueryByOne

func (_ChainConfig *ChainConfigCaller) QueryByOne(opts *bind.CallOpts, addr string) (string, error)

QueryByOne is a free data retrieval call binding the contract method 0x52e1281f.

Solidity: function QueryByOne(string addr) view returns(string)

func (*ChainConfigCaller) SIdx

func (_ChainConfig *ChainConfigCaller) SIdx(opts *bind.CallOpts, arg0 string) (*big.Int, error)

SIdx is a free data retrieval call binding the contract method 0xb14faf5a.

Solidity: function sIdx(string ) view returns(uint256)

func (*ChainConfigCaller) ServerList

func (_ChainConfig *ChainConfigCaller) ServerList(opts *bind.CallOpts) ([]ConfigServerItem, error)

ServerList is a free data retrieval call binding the contract method 0xad013d1d.

Solidity: function ServerList() view returns((string,string,string)[])

func (*ChainConfigCaller) Servers

func (_ChainConfig *ChainConfigCaller) Servers(opts *bind.CallOpts, arg0 *big.Int) (struct {
	Addr string
	Host string
	Name string
}, error)

Servers is a free data retrieval call binding the contract method 0x5cf0f357.

Solidity: function servers(uint256 ) view returns(string addr, string host, string name)

type ChainConfigCallerRaw

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

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

func (*ChainConfigCallerRaw) Call

func (_ChainConfig *ChainConfigCallerRaw) 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 ChainConfigCallerSession

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

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

func (*ChainConfigCallerSession) Administrators

func (_ChainConfig *ChainConfigCallerSession) Administrators(arg0 common.Address) (bool, error)

Administrators is a free data retrieval call binding the contract method 0xf7735770.

Solidity: function Administrators(address ) view returns(bool)

func (*ChainConfigCallerSession) AdvertiseAddr

func (_ChainConfig *ChainConfigCallerSession) AdvertiseAddr() (common.Address, error)

AdvertiseAddr is a free data retrieval call binding the contract method 0x06816e43.

Solidity: function AdvertiseAddr() view returns(address)

func (*ChainConfigCallerSession) Owner

func (_ChainConfig *ChainConfigCallerSession) Owner() (common.Address, error)

Owner is a free data retrieval call binding the contract method 0x8da5cb5b.

Solidity: function owner() view returns(address)

func (*ChainConfigCallerSession) QueryByOne

func (_ChainConfig *ChainConfigCallerSession) QueryByOne(addr string) (string, error)

QueryByOne is a free data retrieval call binding the contract method 0x52e1281f.

Solidity: function QueryByOne(string addr) view returns(string)

func (*ChainConfigCallerSession) SIdx

func (_ChainConfig *ChainConfigCallerSession) SIdx(arg0 string) (*big.Int, error)

SIdx is a free data retrieval call binding the contract method 0xb14faf5a.

Solidity: function sIdx(string ) view returns(uint256)

func (*ChainConfigCallerSession) ServerList

func (_ChainConfig *ChainConfigCallerSession) ServerList() ([]ConfigServerItem, error)

ServerList is a free data retrieval call binding the contract method 0xad013d1d.

Solidity: function ServerList() view returns((string,string,string)[])

func (*ChainConfigCallerSession) Servers

func (_ChainConfig *ChainConfigCallerSession) Servers(arg0 *big.Int) (struct {
	Addr string
	Host string
	Name string
}, error)

Servers is a free data retrieval call binding the contract method 0x5cf0f357.

Solidity: function servers(uint256 ) view returns(string addr, string host, string name)

type ChainConfigFilterer

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

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

func NewChainConfigFilterer

func NewChainConfigFilterer(address common.Address, filterer bind.ContractFilterer) (*ChainConfigFilterer, error)

NewChainConfigFilterer creates a new log filterer instance of ChainConfig, bound to a specific deployed contract.

func (*ChainConfigFilterer) FilterServerChanged

func (_ChainConfig *ChainConfigFilterer) FilterServerChanged(opts *bind.FilterOpts) (*ChainConfigServerChangedIterator, error)

FilterServerChanged is a free log retrieval operation binding the contract event 0xd377c3fbfc4223ee2ce4676c79f04087240dc96d7c0b31ea87f5bd5d3961b013.

Solidity: event ServerChanged(string arg0, string arg1, uint8 arg2)

func (*ChainConfigFilterer) ParseServerChanged

func (_ChainConfig *ChainConfigFilterer) ParseServerChanged(log types.Log) (*ChainConfigServerChanged, error)

ParseServerChanged is a log parse operation binding the contract event 0xd377c3fbfc4223ee2ce4676c79f04087240dc96d7c0b31ea87f5bd5d3961b013.

Solidity: event ServerChanged(string arg0, string arg1, uint8 arg2)

func (*ChainConfigFilterer) WatchServerChanged

func (_ChainConfig *ChainConfigFilterer) WatchServerChanged(opts *bind.WatchOpts, sink chan<- *ChainConfigServerChanged) (event.Subscription, error)

WatchServerChanged is a free log subscription operation binding the contract event 0xd377c3fbfc4223ee2ce4676c79f04087240dc96d7c0b31ea87f5bd5d3961b013.

Solidity: event ServerChanged(string arg0, string arg1, uint8 arg2)

type ChainConfigRaw

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

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

func (*ChainConfigRaw) Call

func (_ChainConfig *ChainConfigRaw) 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 (*ChainConfigRaw) Transact

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

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

func (*ChainConfigRaw) Transfer

func (_ChainConfig *ChainConfigRaw) 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 ChainConfigServerChanged

type ChainConfigServerChanged struct {
	Arg0 string
	Arg1 string
	Arg2 uint8
	Raw  types.Log // Blockchain specific contextual infos
}

ChainConfigServerChanged represents a ServerChanged event raised by the ChainConfig contract.

type ChainConfigServerChangedIterator

type ChainConfigServerChangedIterator struct {
	Event *ChainConfigServerChanged // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

ChainConfigServerChangedIterator is returned from FilterServerChanged and is used to iterate over the raw logs and unpacked data for ServerChanged events raised by the ChainConfig contract.

func (*ChainConfigServerChangedIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*ChainConfigServerChangedIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*ChainConfigServerChangedIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type ChainConfigSession

type ChainConfigSession struct {
	Contract     *ChainConfig      // 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
}

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

func (*ChainConfigSession) AddAdmin

func (_ChainConfig *ChainConfigSession) AddAdmin(admin common.Address) (*types.Transaction, error)

AddAdmin is a paid mutator transaction binding the contract method 0x70480275.

Solidity: function addAdmin(address admin) returns()

func (*ChainConfigSession) AddServer

func (_ChainConfig *ChainConfigSession) AddServer(addr string, host string, name string) (*types.Transaction, error)

AddServer is a paid mutator transaction binding the contract method 0x8e2d1f41.

Solidity: function addServer(string addr, string host, string name) returns()

func (*ChainConfigSession) Administrators

func (_ChainConfig *ChainConfigSession) Administrators(arg0 common.Address) (bool, error)

Administrators is a free data retrieval call binding the contract method 0xf7735770.

Solidity: function Administrators(address ) view returns(bool)

func (*ChainConfigSession) AdvertiseAddr

func (_ChainConfig *ChainConfigSession) AdvertiseAddr() (common.Address, error)

AdvertiseAddr is a free data retrieval call binding the contract method 0x06816e43.

Solidity: function AdvertiseAddr() view returns(address)

func (*ChainConfigSession) ChangeServer

func (_ChainConfig *ChainConfigSession) ChangeServer(addr string, host string) (*types.Transaction, error)

ChangeServer is a paid mutator transaction binding the contract method 0xf5a7d9b9.

Solidity: function changeServer(string addr, string host) returns()

func (*ChainConfigSession) Owner

func (_ChainConfig *ChainConfigSession) Owner() (common.Address, error)

Owner is a free data retrieval call binding the contract method 0x8da5cb5b.

Solidity: function owner() view returns(address)

func (*ChainConfigSession) QueryByOne

func (_ChainConfig *ChainConfigSession) QueryByOne(addr string) (string, error)

QueryByOne is a free data retrieval call binding the contract method 0x52e1281f.

Solidity: function QueryByOne(string addr) view returns(string)

func (*ChainConfigSession) RemoveAdmin

func (_ChainConfig *ChainConfigSession) RemoveAdmin(admin common.Address) (*types.Transaction, error)

RemoveAdmin is a paid mutator transaction binding the contract method 0x1785f53c.

Solidity: function removeAdmin(address admin) returns()

func (*ChainConfigSession) RemoveServer

func (_ChainConfig *ChainConfigSession) RemoveServer(addr string) (*types.Transaction, error)

RemoveServer is a paid mutator transaction binding the contract method 0x46ace8fd.

Solidity: function removeServer(string addr) returns()

func (*ChainConfigSession) SIdx

func (_ChainConfig *ChainConfigSession) SIdx(arg0 string) (*big.Int, error)

SIdx is a free data retrieval call binding the contract method 0xb14faf5a.

Solidity: function sIdx(string ) view returns(uint256)

func (*ChainConfigSession) ServerList

func (_ChainConfig *ChainConfigSession) ServerList() ([]ConfigServerItem, error)

ServerList is a free data retrieval call binding the contract method 0xad013d1d.

Solidity: function ServerList() view returns((string,string,string)[])

func (*ChainConfigSession) Servers

func (_ChainConfig *ChainConfigSession) Servers(arg0 *big.Int) (struct {
	Addr string
	Host string
	Name string
}, error)

Servers is a free data retrieval call binding the contract method 0x5cf0f357.

Solidity: function servers(uint256 ) view returns(string addr, string host, string name)

func (*ChainConfigSession) SetAdvertisAddr

func (_ChainConfig *ChainConfigSession) SetAdvertisAddr(addr common.Address) (*types.Transaction, error)

SetAdvertisAddr is a paid mutator transaction binding the contract method 0xa8ae3090.

Solidity: function setAdvertisAddr(address addr) returns()

func (*ChainConfigSession) TransferOwnership

func (_ChainConfig *ChainConfigSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error)

TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.

Solidity: function transferOwnership(address newOwner) returns()

type ChainConfigTransactor

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

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

func NewChainConfigTransactor

func NewChainConfigTransactor(address common.Address, transactor bind.ContractTransactor) (*ChainConfigTransactor, error)

NewChainConfigTransactor creates a new write-only instance of ChainConfig, bound to a specific deployed contract.

func (*ChainConfigTransactor) AddAdmin

func (_ChainConfig *ChainConfigTransactor) AddAdmin(opts *bind.TransactOpts, admin common.Address) (*types.Transaction, error)

AddAdmin is a paid mutator transaction binding the contract method 0x70480275.

Solidity: function addAdmin(address admin) returns()

func (*ChainConfigTransactor) AddServer

func (_ChainConfig *ChainConfigTransactor) AddServer(opts *bind.TransactOpts, addr string, host string, name string) (*types.Transaction, error)

AddServer is a paid mutator transaction binding the contract method 0x8e2d1f41.

Solidity: function addServer(string addr, string host, string name) returns()

func (*ChainConfigTransactor) ChangeServer

func (_ChainConfig *ChainConfigTransactor) ChangeServer(opts *bind.TransactOpts, addr string, host string) (*types.Transaction, error)

ChangeServer is a paid mutator transaction binding the contract method 0xf5a7d9b9.

Solidity: function changeServer(string addr, string host) returns()

func (*ChainConfigTransactor) RemoveAdmin

func (_ChainConfig *ChainConfigTransactor) RemoveAdmin(opts *bind.TransactOpts, admin common.Address) (*types.Transaction, error)

RemoveAdmin is a paid mutator transaction binding the contract method 0x1785f53c.

Solidity: function removeAdmin(address admin) returns()

func (*ChainConfigTransactor) RemoveServer

func (_ChainConfig *ChainConfigTransactor) RemoveServer(opts *bind.TransactOpts, addr string) (*types.Transaction, error)

RemoveServer is a paid mutator transaction binding the contract method 0x46ace8fd.

Solidity: function removeServer(string addr) returns()

func (*ChainConfigTransactor) SetAdvertisAddr

func (_ChainConfig *ChainConfigTransactor) SetAdvertisAddr(opts *bind.TransactOpts, addr common.Address) (*types.Transaction, error)

SetAdvertisAddr is a paid mutator transaction binding the contract method 0xa8ae3090.

Solidity: function setAdvertisAddr(address addr) returns()

func (*ChainConfigTransactor) TransferOwnership

func (_ChainConfig *ChainConfigTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error)

TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.

Solidity: function transferOwnership(address newOwner) returns()

type ChainConfigTransactorRaw

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

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

func (*ChainConfigTransactorRaw) Transact

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

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

func (*ChainConfigTransactorRaw) Transfer

func (_ChainConfig *ChainConfigTransactorRaw) 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 ChainConfigTransactorSession

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

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

func (*ChainConfigTransactorSession) AddAdmin

func (_ChainConfig *ChainConfigTransactorSession) AddAdmin(admin common.Address) (*types.Transaction, error)

AddAdmin is a paid mutator transaction binding the contract method 0x70480275.

Solidity: function addAdmin(address admin) returns()

func (*ChainConfigTransactorSession) AddServer

func (_ChainConfig *ChainConfigTransactorSession) AddServer(addr string, host string, name string) (*types.Transaction, error)

AddServer is a paid mutator transaction binding the contract method 0x8e2d1f41.

Solidity: function addServer(string addr, string host, string name) returns()

func (*ChainConfigTransactorSession) ChangeServer

func (_ChainConfig *ChainConfigTransactorSession) ChangeServer(addr string, host string) (*types.Transaction, error)

ChangeServer is a paid mutator transaction binding the contract method 0xf5a7d9b9.

Solidity: function changeServer(string addr, string host) returns()

func (*ChainConfigTransactorSession) RemoveAdmin

func (_ChainConfig *ChainConfigTransactorSession) RemoveAdmin(admin common.Address) (*types.Transaction, error)

RemoveAdmin is a paid mutator transaction binding the contract method 0x1785f53c.

Solidity: function removeAdmin(address admin) returns()

func (*ChainConfigTransactorSession) RemoveServer

func (_ChainConfig *ChainConfigTransactorSession) RemoveServer(addr string) (*types.Transaction, error)

RemoveServer is a paid mutator transaction binding the contract method 0x46ace8fd.

Solidity: function removeServer(string addr) returns()

func (*ChainConfigTransactorSession) SetAdvertisAddr

func (_ChainConfig *ChainConfigTransactorSession) SetAdvertisAddr(addr common.Address) (*types.Transaction, error)

SetAdvertisAddr is a paid mutator transaction binding the contract method 0xa8ae3090.

Solidity: function setAdvertisAddr(address addr) returns()

func (*ChainConfigTransactorSession) TransferOwnership

func (_ChainConfig *ChainConfigTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error)

TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.

Solidity: function transferOwnership(address newOwner) returns()

type ConfigServerItem

type ConfigServerItem struct {
	Addr string
	Host string
	Name string
}

ConfigServerItem is an auto generated low-level Go binding around an user-defined struct.

func SyncServerList

func SyncServerList() []ConfigServerItem

Jump to

Keyboard shortcuts

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