Documentation ¶
Index ¶
- Variables
- func NewServer(logger logging.Logger, backend *ethclient.Client, address string) (chain.Resolver, error)
- type ChainOracle
- func (ora *ChainOracle) DataStoreFinished(cid boson.Address, dataLen uint64, salt uint64, proof []byte, ...)
- func (ora *ChainOracle) GetCid(aufsUri string) []byte
- func (ora *ChainOracle) GetNodesFromCid(cid []byte) []boson.Address
- func (ora *ChainOracle) GetSourceNodes(aufsUri string) []boson.Address
- func (ora *ChainOracle) OnStoreMatched(cid boson.Address, dataLen uint64, salt uint64, address boson.Address)
- type Oracle
- type OracleCaller
- type OracleCallerRaw
- type OracleCallerSession
- type OracleFilterer
- type OracleRaw
- func (_Oracle *OracleRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, ...) error
- func (_Oracle *OracleRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
- func (_Oracle *OracleRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
- type OracleSession
- func (_Oracle *OracleSession) Clear(fileHash [32]byte) (*types.Transaction, error)
- func (_Oracle *OracleSession) Get(fileHash [32]byte) ([][32]byte, error)
- func (_Oracle *OracleSession) Owner() (common.Address, error)
- func (_Oracle *OracleSession) Remove(fileHash [32]byte, adr [32]byte) (*types.Transaction, error)
- func (_Oracle *OracleSession) Set(fileHash [32]byte, adr [32]byte) (*types.Transaction, error)
- type OracleTransactor
- func (_Oracle *OracleTransactor) Clear(opts *bind.TransactOpts, fileHash [32]byte) (*types.Transaction, error)
- func (_Oracle *OracleTransactor) Remove(opts *bind.TransactOpts, fileHash [32]byte, adr [32]byte) (*types.Transaction, error)
- func (_Oracle *OracleTransactor) Set(opts *bind.TransactOpts, fileHash [32]byte, adr [32]byte) (*types.Transaction, error)
- type OracleTransactorRaw
- type OracleTransactorSession
- func (_Oracle *OracleTransactorSession) Clear(fileHash [32]byte) (*types.Transaction, error)
- func (_Oracle *OracleTransactorSession) Remove(fileHash [32]byte, adr [32]byte) (*types.Transaction, error)
- func (_Oracle *OracleTransactorSession) Set(fileHash [32]byte, adr [32]byte) (*types.Transaction, error)
Constants ¶
This section is empty.
Variables ¶
var OracleABI = OracleMetaData.ABI
OracleABI is the input ABI used to generate the binding from. Deprecated: Use OracleMetaData.ABI instead.
var OracleMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"fileHash\",\"type\":\"bytes32\"}],\"name\":\"clear\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"fileHash\",\"type\":\"bytes32\"}],\"name\":\"get\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"fileHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"adr\",\"type\":\"bytes32\"}],\"name\":\"remove\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"fileHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"adr\",\"type\":\"bytes32\"}],\"name\":\"set\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
}
OracleMetaData contains all meta data concerning the Oracle contract.
Functions ¶
Types ¶
type ChainOracle ¶
type ChainOracle struct {
// contains filtered or unexported fields
}
func (*ChainOracle) DataStoreFinished ¶
func (ora *ChainOracle) DataStoreFinished(cid boson.Address, dataLen uint64, salt uint64, proof []byte, resCh chan chain.ChainResult)
func (*ChainOracle) GetCid ¶
func (ora *ChainOracle) GetCid(aufsUri string) []byte
func (*ChainOracle) GetNodesFromCid ¶
func (ora *ChainOracle) GetNodesFromCid(cid []byte) []boson.Address
func (*ChainOracle) GetSourceNodes ¶
func (ora *ChainOracle) GetSourceNodes(aufsUri string) []boson.Address
func (*ChainOracle) OnStoreMatched ¶
type Oracle ¶
type Oracle struct { OracleCaller // Read-only binding to the contract OracleTransactor // Write-only binding to the contract OracleFilterer // Log filterer for contract events }
Oracle is an auto generated Go binding around an Ethereum contract.
type OracleCaller ¶
type OracleCaller struct {
// contains filtered or unexported fields
}
OracleCaller is an auto generated read-only Go binding around an Ethereum contract.
func NewOracleCaller ¶
func NewOracleCaller(address common.Address, caller bind.ContractCaller) (*OracleCaller, error)
NewOracleCaller creates a new read-only instance of Oracle, bound to a specific deployed contract.
type OracleCallerRaw ¶
type OracleCallerRaw struct {
Contract *OracleCaller // Generic read-only contract binding to access the raw methods on
}
OracleCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
func (*OracleCallerRaw) Call ¶
func (_Oracle *OracleCallerRaw) 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 OracleCallerSession ¶
type OracleCallerSession struct { Contract *OracleCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session }
OracleCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.
type OracleFilterer ¶
type OracleFilterer struct {
// contains filtered or unexported fields
}
OracleFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
func NewOracleFilterer ¶
func NewOracleFilterer(address common.Address, filterer bind.ContractFilterer) (*OracleFilterer, error)
NewOracleFilterer creates a new log filterer instance of Oracle, bound to a specific deployed contract.
type OracleRaw ¶
type OracleRaw struct {
Contract *Oracle // Generic contract binding to access the raw methods on
}
OracleRaw is an auto generated low-level Go binding around an Ethereum contract.
func (*OracleRaw) Call ¶
func (_Oracle *OracleRaw) 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 (*OracleRaw) Transact ¶
func (_Oracle *OracleRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*OracleRaw) Transfer ¶
func (_Oracle *OracleRaw) 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 OracleSession ¶
type OracleSession struct { Contract *Oracle // 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 }
OracleSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.
func (*OracleSession) Clear ¶
func (_Oracle *OracleSession) Clear(fileHash [32]byte) (*types.Transaction, error)
Clear is a paid mutator transaction binding the contract method 0x97040a45.
Solidity: function clear(bytes32 fileHash) returns()
func (*OracleSession) Get ¶
func (_Oracle *OracleSession) Get(fileHash [32]byte) ([][32]byte, error)
Get is a free data retrieval call binding the contract method 0x8eaa6ac0.
Solidity: function get(bytes32 fileHash) view returns(bytes32[])
func (*OracleSession) Owner ¶
func (_Oracle *OracleSession) Owner() (common.Address, error)
Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
Solidity: function owner() view returns(address)
func (*OracleSession) Remove ¶
func (_Oracle *OracleSession) Remove(fileHash [32]byte, adr [32]byte) (*types.Transaction, error)
Remove is a paid mutator transaction binding the contract method 0xb10e4172.
Solidity: function remove(bytes32 fileHash, bytes32 adr) returns()
func (*OracleSession) Set ¶
func (_Oracle *OracleSession) Set(fileHash [32]byte, adr [32]byte) (*types.Transaction, error)
Set is a paid mutator transaction binding the contract method 0xf71f7a25.
Solidity: function set(bytes32 fileHash, bytes32 adr) returns()
type OracleTransactor ¶
type OracleTransactor struct {
// contains filtered or unexported fields
}
OracleTransactor is an auto generated write-only Go binding around an Ethereum contract.
func NewOracleTransactor ¶
func NewOracleTransactor(address common.Address, transactor bind.ContractTransactor) (*OracleTransactor, error)
NewOracleTransactor creates a new write-only instance of Oracle, bound to a specific deployed contract.
func (*OracleTransactor) Clear ¶
func (_Oracle *OracleTransactor) Clear(opts *bind.TransactOpts, fileHash [32]byte) (*types.Transaction, error)
Clear is a paid mutator transaction binding the contract method 0x97040a45.
Solidity: function clear(bytes32 fileHash) returns()
func (*OracleTransactor) Remove ¶
func (_Oracle *OracleTransactor) Remove(opts *bind.TransactOpts, fileHash [32]byte, adr [32]byte) (*types.Transaction, error)
Remove is a paid mutator transaction binding the contract method 0xb10e4172.
Solidity: function remove(bytes32 fileHash, bytes32 adr) returns()
func (*OracleTransactor) Set ¶
func (_Oracle *OracleTransactor) Set(opts *bind.TransactOpts, fileHash [32]byte, adr [32]byte) (*types.Transaction, error)
Set is a paid mutator transaction binding the contract method 0xf71f7a25.
Solidity: function set(bytes32 fileHash, bytes32 adr) returns()
type OracleTransactorRaw ¶
type OracleTransactorRaw struct {
Contract *OracleTransactor // Generic write-only contract binding to access the raw methods on
}
OracleTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
func (*OracleTransactorRaw) Transact ¶
func (_Oracle *OracleTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*OracleTransactorRaw) Transfer ¶
func (_Oracle *OracleTransactorRaw) 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 OracleTransactorSession ¶
type OracleTransactorSession struct { Contract *OracleTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
OracleTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.
func (*OracleTransactorSession) Clear ¶
func (_Oracle *OracleTransactorSession) Clear(fileHash [32]byte) (*types.Transaction, error)
Clear is a paid mutator transaction binding the contract method 0x97040a45.
Solidity: function clear(bytes32 fileHash) returns()
func (*OracleTransactorSession) Remove ¶
func (_Oracle *OracleTransactorSession) Remove(fileHash [32]byte, adr [32]byte) (*types.Transaction, error)
Remove is a paid mutator transaction binding the contract method 0xb10e4172.
Solidity: function remove(bytes32 fileHash, bytes32 adr) returns()
func (*OracleTransactorSession) Set ¶
func (_Oracle *OracleTransactorSession) Set(fileHash [32]byte, adr [32]byte) (*types.Transaction, error)
Set is a paid mutator transaction binding the contract method 0xf71f7a25.
Solidity: function set(bytes32 fileHash, bytes32 adr) returns()