Documentation ¶
Index ¶
- Constants
- type Cns
- type CnsCaller
- func (_Cns *CnsCaller) GetContractAddress(opts *bind.CallOpts, name string, version string) (common.Address, error)
- func (_Cns *CnsCaller) SelectByName(opts *bind.CallOpts, name string) (string, error)
- func (_Cns *CnsCaller) SelectByNameAndVersion(opts *bind.CallOpts, name string, version string) (string, error)
- type CnsCallerRaw
- type CnsCallerSession
- type CnsFilterer
- type CnsRaw
- func (_Cns *CnsRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error
- func (_Cns *CnsRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, *types.Receipt, error)
- func (_Cns *CnsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, *types.Receipt, error)
- type CnsSession
- func (_Cns *CnsSession) GetContractAddress(name string, version string) (common.Address, error)
- func (_Cns *CnsSession) Insert(name string, version string, addr string, abi string) (*types.Transaction, *types.Receipt, error)
- func (_Cns *CnsSession) SelectByName(name string) (string, error)
- func (_Cns *CnsSession) SelectByNameAndVersion(name string, version string) (string, error)
- type CnsTransactor
- type CnsTransactorRaw
- type CnsTransactorSession
- type Info
- type Service
- func (service *Service) GetAddressByContractNameAndVersion(contractName, version string) (common.Address, error)
- func (service *Service) QueryCnsByName(name string) ([]Info, error)
- func (service *Service) QueryCnsByNameAndVersion(name string, version string) ([]Info, error)
- func (service *Service) RegisterCns(name string, version string, address common.Address, abi string) (int64, error)
- func (service *Service) SelectByName(name string) (string, error)
- func (service *Service) SelectByNameAndVersion(name string, version string) (string, error)
Constants ¶
const CnsABI = "" /* 1100-byte string literal not displayed */
CnsABI is the input ABI used to generate the binding from.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cns ¶
type Cns struct { CnsCaller // Read-only binding to the contract CnsTransactor // Write-only binding to the contract CnsFilterer // Log filterer for contract events }
Cns is an auto generated Go binding around a Solidity contract.
type CnsCaller ¶
type CnsCaller struct {
// contains filtered or unexported fields
}
CnsCaller is an auto generated read-only Go binding around a Solidity contract.
func NewCnsCaller ¶
NewCnsCaller creates a new read-only instance of Cns, bound to a specific deployed contract.
func (*CnsCaller) GetContractAddress ¶ added in v0.10.0
func (_Cns *CnsCaller) GetContractAddress(opts *bind.CallOpts, name string, version string) (common.Address, error)
GetContractAddress is a free data retrieval call binding the contract method 0xf85f8126.
Solidity: function getContractAddress(string name, string version) constant returns(address)
func (*CnsCaller) SelectByName ¶
SelectByName is a free data retrieval call binding the contract method 0x819a3d62.
Solidity: function selectByName(string name) constant returns(string)
func (*CnsCaller) SelectByNameAndVersion ¶
func (_Cns *CnsCaller) SelectByNameAndVersion(opts *bind.CallOpts, name string, version string) (string, error)
SelectByNameAndVersion is a free data retrieval call binding the contract method 0x897f0251.
Solidity: function selectByNameAndVersion(string name, string version) constant returns(string)
type CnsCallerRaw ¶
type CnsCallerRaw struct {
Contract *CnsCaller // Generic read-only contract binding to access the raw methods on
}
CnsCallerRaw is an auto generated low-level read-only Go binding around a Solidity contract.
func (*CnsCallerRaw) Call ¶
func (_Cns *CnsCallerRaw) 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 CnsCallerSession ¶
type CnsCallerSession struct { Contract *CnsCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session }
CnsCallerSession is an auto generated read-only Go binding around a Solidity contract, with pre-set call options.
func (*CnsCallerSession) GetContractAddress ¶ added in v0.10.0
func (_Cns *CnsCallerSession) GetContractAddress(name string, version string) (common.Address, error)
GetContractAddress is a free data retrieval call binding the contract method 0xf85f8126.
Solidity: function getContractAddress(string name, string version) constant returns(address)
func (*CnsCallerSession) SelectByName ¶
func (_Cns *CnsCallerSession) SelectByName(name string) (string, error)
SelectByName is a free data retrieval call binding the contract method 0x819a3d62.
Solidity: function selectByName(string name) constant returns(string)
func (*CnsCallerSession) SelectByNameAndVersion ¶
func (_Cns *CnsCallerSession) SelectByNameAndVersion(name string, version string) (string, error)
SelectByNameAndVersion is a free data retrieval call binding the contract method 0x897f0251.
Solidity: function selectByNameAndVersion(string name, string version) constant returns(string)
type CnsFilterer ¶
type CnsFilterer struct {
// contains filtered or unexported fields
}
CnsFilterer is an auto generated log filtering Go binding around a Solidity contract events.
func NewCnsFilterer ¶
func NewCnsFilterer(address common.Address, filterer bind.ContractFilterer) (*CnsFilterer, error)
NewCnsFilterer creates a new log filterer instance of Cns, bound to a specific deployed contract.
type CnsRaw ¶
type CnsRaw struct {
Contract *Cns // Generic contract binding to access the raw methods on
}
CnsRaw is an auto generated low-level Go binding around a Solidity contract.
func (*CnsRaw) Call ¶
func (_Cns *CnsRaw) 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 (*CnsRaw) Transact ¶
func (_Cns *CnsRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, *types.Receipt, error)
Transact invokes the (paid) contract method with params as input values.
func (*CnsRaw) Transfer ¶
func (_Cns *CnsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, *types.Receipt, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type CnsSession ¶
type CnsSession struct { Contract *Cns // 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 }
CnsSession is an auto generated Go binding around a Solidity contract, with pre-set call and transact options.
func (*CnsSession) GetContractAddress ¶ added in v0.10.0
GetContractAddress is a free data retrieval call binding the contract method 0xf85f8126.
Solidity: function getContractAddress(string name, string version) constant returns(address)
func (*CnsSession) Insert ¶
func (_Cns *CnsSession) Insert(name string, version string, addr string, abi string) (*types.Transaction, *types.Receipt, error)
Insert is a paid mutator transaction binding the contract method 0xa216464b.
Solidity: function insert(string name, string version, string addr, string abi) returns(uint256)
func (*CnsSession) SelectByName ¶
func (_Cns *CnsSession) SelectByName(name string) (string, error)
SelectByName is a free data retrieval call binding the contract method 0x819a3d62.
Solidity: function selectByName(string name) constant returns(string)
func (*CnsSession) SelectByNameAndVersion ¶
func (_Cns *CnsSession) SelectByNameAndVersion(name string, version string) (string, error)
SelectByNameAndVersion is a free data retrieval call binding the contract method 0x897f0251.
Solidity: function selectByNameAndVersion(string name, string version) constant returns(string)
type CnsTransactor ¶
type CnsTransactor struct {
// contains filtered or unexported fields
}
CnsTransactor is an auto generated write-only Go binding around a Solidity contract.
func NewCnsTransactor ¶
func NewCnsTransactor(address common.Address, transactor bind.ContractTransactor) (*CnsTransactor, error)
NewCnsTransactor creates a new write-only instance of Cns, bound to a specific deployed contract.
func (*CnsTransactor) Insert ¶
func (_Cns *CnsTransactor) Insert(opts *bind.TransactOpts, name string, version string, addr string, abi string) (*types.Transaction, *types.Receipt, error)
Insert is a paid mutator transaction binding the contract method 0xa216464b.
Solidity: function insert(string name, string version, string addr, string abi) returns(uint256)
type CnsTransactorRaw ¶
type CnsTransactorRaw struct {
Contract *CnsTransactor // Generic write-only contract binding to access the raw methods on
}
CnsTransactorRaw is an auto generated low-level write-only Go binding around a Solidity contract.
func (*CnsTransactorRaw) Transact ¶
func (_Cns *CnsTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, *types.Receipt, error)
Transact invokes the (paid) contract method with params as input values.
func (*CnsTransactorRaw) Transfer ¶
func (_Cns *CnsTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, *types.Receipt, error)
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
type CnsTransactorSession ¶
type CnsTransactorSession struct { Contract *CnsTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
CnsTransactorSession is an auto generated write-only Go binding around a Solidity contract, with pre-set transact options.
func (*CnsTransactorSession) Insert ¶
func (_Cns *CnsTransactorSession) Insert(name string, version string, addr string, abi string) (*types.Transaction, *types.Receipt, error)
Insert is a paid mutator transaction binding the contract method 0xa216464b.
Solidity: function insert(string name, string version, string addr, string abi) returns(uint256)
type Info ¶
type Info struct { Name string `json:"name"` Version string `json:"version"` Address string `json:"address"` Abi string `json:"abi"` }
Info is used for the CNSService
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a precompile contract service.
func NewCnsService ¶
NewCnsService returns ptr of Service
func (*Service) GetAddressByContractNameAndVersion ¶
func (service *Service) GetAddressByContractNameAndVersion(contractName, version string) (common.Address, error)
GetAddressByContractNameAndVersion returns the contract address.
func (*Service) QueryCnsByName ¶
QueryCnsByName returns the CNS info according to the CNS name
func (*Service) QueryCnsByNameAndVersion ¶
QueryCnsByNameAndVersion returns the CNS info according to the name and version
func (*Service) RegisterCns ¶
func (service *Service) RegisterCns(name string, version string, address common.Address, abi string) (int64, error)
RegisterCns registers a contract for its CNS.
func (*Service) SelectByName ¶
SelectByName returns the cns information according to the name string.