Documentation ¶
Index ¶
- Variables
- type ChannelAllocation
- type ChannelAsset
- type ChannelParams
- type ChannelState
- type ChannelSubAlloc
- type Trivialapp
- type TrivialappCaller
- type TrivialappCallerRaw
- type TrivialappCallerSession
- type TrivialappFilterer
- type TrivialappRaw
- func (_Trivialapp *TrivialappRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, ...) error
- func (_Trivialapp *TrivialappRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
- func (_Trivialapp *TrivialappRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
- type TrivialappSession
- type TrivialappTransactor
- type TrivialappTransactorRaw
- type TrivialappTransactorSession
Constants ¶
This section is empty.
Variables ¶
var TrivialAppBinRuntime = "" /* 568-byte string literal not displayed */
TrivialAppBinRuntime is the runtime part of the compiled bytecode used for deploying new contracts.
var TrivialappABI = TrivialappMetaData.ABI
TrivialappABI is the input ABI used to generate the binding from. Deprecated: Use TrivialappMetaData.ABI instead.
var TrivialappBin = TrivialappMetaData.Bin
TrivialappBin is the compiled bytecode used for deploying new contracts. Deprecated: Use TrivialappMetaData.Bin instead.
var TrivialappMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"ledgerChannel\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"virtualChannel\",\"type\":\"bool\"}],\"internalType\":\"structChannel.Params\",\"name\":\"params\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"chainID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"holder\",\"type\":\"address\"}],\"internalType\":\"structChannel.Asset[]\",\"name\":\"assets\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State\",\"name\":\"from\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"chainID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"holder\",\"type\":\"address\"}],\"internalType\":\"structChannel.Asset[]\",\"name\":\"assets\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State\",\"name\":\"to\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"actorIdx\",\"type\":\"uint256\"}],\"name\":\"validTransition\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"}]",
Bin: "0x608060405234801561001057600080fd5b5061011c806100206000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80636d7eba0d14602d575b600080fd5b603e60383660046057565b50505050565b005b600060a08284031215605157600080fd5b50919050565b60008060008060808587031215606c57600080fd5b843567ffffffffffffffff80821115608357600080fd5b9086019060c08289031215609657600080fd5b9094506020860135908082111560ab57600080fd5b60b5888389016040565b9450604087013591508082111560ca57600080fd5b5060d5878288016040565b94979396509394606001359350505056fea2646970667358221220b17a6a2d2be5ce04b000b481d81bcfd781fadfaa0cd797d14f2caed99a9c17e664736f6c634300080f0033",
}
TrivialappMetaData contains all meta data concerning the Trivialapp contract.
Functions ¶
This section is empty.
Types ¶
type ChannelAllocation ¶
type ChannelAllocation struct { Assets []ChannelAsset Balances [][]*big.Int Locked []ChannelSubAlloc }
ChannelAllocation is an auto generated low-level Go binding around an user-defined struct.
type ChannelAsset ¶
ChannelAsset is an auto generated low-level Go binding around an user-defined struct.
type ChannelParams ¶
type ChannelParams struct { ChallengeDuration *big.Int Nonce *big.Int Participants []common.Address App common.Address LedgerChannel bool VirtualChannel bool }
ChannelParams is an auto generated low-level Go binding around an user-defined struct.
type ChannelState ¶
type ChannelState struct { ChannelID [32]byte Version uint64 Outcome ChannelAllocation AppData []byte IsFinal bool }
ChannelState is an auto generated low-level Go binding around an user-defined struct.
type ChannelSubAlloc ¶
ChannelSubAlloc is an auto generated low-level Go binding around an user-defined struct.
type Trivialapp ¶
type Trivialapp struct { TrivialappCaller // Read-only binding to the contract TrivialappTransactor // Write-only binding to the contract TrivialappFilterer // Log filterer for contract events }
Trivialapp is an auto generated Go binding around an Ethereum contract.
func DeployTrivialapp ¶
func DeployTrivialapp(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Trivialapp, error)
DeployTrivialapp deploys a new Ethereum contract, binding an instance of Trivialapp to it.
func NewTrivialapp ¶
func NewTrivialapp(address common.Address, backend bind.ContractBackend) (*Trivialapp, error)
NewTrivialapp creates a new instance of Trivialapp, bound to a specific deployed contract.
type TrivialappCaller ¶
type TrivialappCaller struct {
// contains filtered or unexported fields
}
TrivialappCaller is an auto generated read-only Go binding around an Ethereum contract.
func NewTrivialappCaller ¶
func NewTrivialappCaller(address common.Address, caller bind.ContractCaller) (*TrivialappCaller, error)
NewTrivialappCaller creates a new read-only instance of Trivialapp, bound to a specific deployed contract.
func (*TrivialappCaller) ValidTransition ¶
func (_Trivialapp *TrivialappCaller) ValidTransition(opts *bind.CallOpts, params ChannelParams, from ChannelState, to ChannelState, actorIdx *big.Int) error
ValidTransition is a free data retrieval call binding the contract method 0x6d7eba0d.
Solidity: function validTransition((uint256,uint256,address[],address,bool,bool) params, (bytes32,uint64,((uint256,address)[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool) from, (bytes32,uint64,((uint256,address)[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool) to, uint256 actorIdx) pure returns()
type TrivialappCallerRaw ¶
type TrivialappCallerRaw struct {
Contract *TrivialappCaller // Generic read-only contract binding to access the raw methods on
}
TrivialappCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
func (*TrivialappCallerRaw) Call ¶
func (_Trivialapp *TrivialappCallerRaw) 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 TrivialappCallerSession ¶
type TrivialappCallerSession struct { Contract *TrivialappCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session }
TrivialappCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.
func (*TrivialappCallerSession) ValidTransition ¶
func (_Trivialapp *TrivialappCallerSession) ValidTransition(params ChannelParams, from ChannelState, to ChannelState, actorIdx *big.Int) error
ValidTransition is a free data retrieval call binding the contract method 0x6d7eba0d.
Solidity: function validTransition((uint256,uint256,address[],address,bool,bool) params, (bytes32,uint64,((uint256,address)[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool) from, (bytes32,uint64,((uint256,address)[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool) to, uint256 actorIdx) pure returns()
type TrivialappFilterer ¶
type TrivialappFilterer struct {
// contains filtered or unexported fields
}
TrivialappFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
func NewTrivialappFilterer ¶
func NewTrivialappFilterer(address common.Address, filterer bind.ContractFilterer) (*TrivialappFilterer, error)
NewTrivialappFilterer creates a new log filterer instance of Trivialapp, bound to a specific deployed contract.
type TrivialappRaw ¶
type TrivialappRaw struct {
Contract *Trivialapp // Generic contract binding to access the raw methods on
}
TrivialappRaw is an auto generated low-level Go binding around an Ethereum contract.
func (*TrivialappRaw) Call ¶
func (_Trivialapp *TrivialappRaw) 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 (*TrivialappRaw) Transact ¶
func (_Trivialapp *TrivialappRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*TrivialappRaw) Transfer ¶
func (_Trivialapp *TrivialappRaw) 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 TrivialappSession ¶
type TrivialappSession struct { Contract *Trivialapp // 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 }
TrivialappSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.
func (*TrivialappSession) ValidTransition ¶
func (_Trivialapp *TrivialappSession) ValidTransition(params ChannelParams, from ChannelState, to ChannelState, actorIdx *big.Int) error
ValidTransition is a free data retrieval call binding the contract method 0x6d7eba0d.
Solidity: function validTransition((uint256,uint256,address[],address,bool,bool) params, (bytes32,uint64,((uint256,address)[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool) from, (bytes32,uint64,((uint256,address)[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool) to, uint256 actorIdx) pure returns()
type TrivialappTransactor ¶
type TrivialappTransactor struct {
// contains filtered or unexported fields
}
TrivialappTransactor is an auto generated write-only Go binding around an Ethereum contract.
func NewTrivialappTransactor ¶
func NewTrivialappTransactor(address common.Address, transactor bind.ContractTransactor) (*TrivialappTransactor, error)
NewTrivialappTransactor creates a new write-only instance of Trivialapp, bound to a specific deployed contract.
type TrivialappTransactorRaw ¶
type TrivialappTransactorRaw struct {
Contract *TrivialappTransactor // Generic write-only contract binding to access the raw methods on
}
TrivialappTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
func (*TrivialappTransactorRaw) Transact ¶
func (_Trivialapp *TrivialappTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*TrivialappTransactorRaw) Transfer ¶
func (_Trivialapp *TrivialappTransactorRaw) 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 TrivialappTransactorSession ¶
type TrivialappTransactorSession struct { Contract *TrivialappTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
TrivialappTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.