margin_app

package
v0.0.83 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MarginAppV1ABI = MarginAppV1MetaData.ABI

MarginAppV1ABI is the input ABI used to generate the binding from. Deprecated: Use MarginAppV1MetaData.ABI instead.

View Source
var MarginAppV1Bin = MarginAppV1MetaData.Bin

MarginAppV1Bin is the compiled bytecode used for deploying new contracts. Deprecated: Use MarginAppV1MetaData.Bin instead.

View Source
var MarginAppV1MetaData = &bind.MetaData{
	ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"},{\"internalType\":\"uint64\",\"name\":\"channelNonce\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"appDefinition\",\"type\":\"address\"},{\"internalType\":\"uint48\",\"name\":\"challengeDuration\",\"type\":\"uint48\"}],\"internalType\":\"structINitroTypes.FixedPart\",\"name\":\"fixedPart\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enumExitFormat.AssetType\",\"name\":\"assetType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.AssetMetadata\",\"name\":\"assetMetadata\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destination\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"allocationType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.Allocation[]\",\"name\":\"allocations\",\"type\":\"tuple[]\"}],\"internalType\":\"structExitFormat.SingleAssetExit[]\",\"name\":\"outcome\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"uint48\",\"name\":\"turnNum\",\"type\":\"uint48\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structINitroTypes.VariablePart\",\"name\":\"variablePart\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"signedBy\",\"type\":\"uint256\"}],\"internalType\":\"structINitroTypes.RecoveredVariablePart[]\",\"name\":\"proof\",\"type\":\"tuple[]\"},{\"components\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"enumExitFormat.AssetType\",\"name\":\"assetType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.AssetMetadata\",\"name\":\"assetMetadata\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"destination\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"allocationType\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"internalType\":\"structExitFormat.Allocation[]\",\"name\":\"allocations\",\"type\":\"tuple[]\"}],\"internalType\":\"structExitFormat.SingleAssetExit[]\",\"name\":\"outcome\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"uint48\",\"name\":\"turnNum\",\"type\":\"uint48\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structINitroTypes.VariablePart\",\"name\":\"variablePart\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"signedBy\",\"type\":\"uint256\"}],\"internalType\":\"structINitroTypes.RecoveredVariablePart\",\"name\":\"candidate\",\"type\":\"tuple\"}],\"name\":\"stateIsSupported\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}]",
	Bin: "0x608060405234801561001057600080fd5b50610e5b806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80639936d81214610030575b600080fd5b61004361003e36600461084a565b61005a565b604051610051929190610911565b60405180910390f35b6000606081610069878061096a565b915050600260ff8216146100c45760405162461bcd60e51b815260206004820152601d60248201527f6f6e6c792032207061727469636970616e747320737570706f7274656400000060448201526064015b60405180910390fd5b8060ff166100d585602001356104c0565b60ff16146101125760405162461bcd60e51b815260206004820152600a60248201526921756e616e696d6f757360b01b60448201526064016100bb565b60008590036102965761012584806109bb565b6101369060608101906040016109db565b65ffffffffffff1660000361015f575050604080516020810190915260008152600191506104b7565b61016984806109bb565b61017a9060608101906040016109db565b65ffffffffffff166001036101a3575050604080516020810190915260008152600191506104b7565b60036101af85806109bb565b6101c09060608101906040016109db565b65ffffffffffff161061024e576101d784806109bb565b6101e8906080810190606001610a0a565b6102345760405162461bcd60e51b815260206004820152601f60248201527f2166696e616c3b207475726e4e756d3e3d33202626207c70726f6f667c3d300060448201526064016100bb565b5050604080516020810190915260008152600191506104b7565b60405162461bcd60e51b815260206004820181905260248201527f6261642063616e646964617465207475726e4e756d3b207c70726f6f667c3d3060448201526064016100bb565b600185900361047c5760026102ab85806109bb565b6102bc9060608101906040016109db565b65ffffffffffff16101561030b5760405162461bcd60e51b81526020600482015260166024820152757475726e4e756d3c32202626207c70726f6f667c3d3160501b60448201526064016100bb565b8585600081811061031e5761031e610a2c565b90506020028101906103309190610a42565b61033a90806109bb565b61034b9060608101906040016109db565b65ffffffffffff1660011461039a5760405162461bcd60e51b8152602060048201526015602482015274706f737466756e642e7475726e4e756d20213d203160581b60448201526064016100bb565b8060ff166103cf878760008181106103b4576103b4610a2c565b90506020028101906103c69190610a42565b602001356104c0565b60ff16146104155760405162461bcd60e51b8152602060048201526013602482015272706f737466756e642021756e616e696d6f757360681b60448201526064016100bb565b6102348686600081811061042b5761042b610a2c565b905060200281019061043d9190610a42565b61044790806109bb565b610451908061096a565b61045a91610c9b565b61046486806109bb565b61046e908061096a565b61047791610c9b565b6104f1565b60405162461bcd60e51b815260206004820152601060248201526f0c4c2c840e0e4dedecc40d8cadccee8d60831b60448201526064016100bb565b94509492505050565b6000805b82156104eb576104d5600184610de0565b90921691806104e381610df3565b9150506104c4565b92915050565b81516001148015610503575080516001145b61054f5760405162461bcd60e51b815260206004820152601a60248201527f696e636f7272656374206e756d626572206f662061737365747300000000000060448201526064016100bb565b8160008151811061056257610562610a2c565b60200260200101516040015151600214801561059d57508060008151811061058c5761058c610a2c565b602002602001015160400151516002145b6105e95760405162461bcd60e51b815260206004820152601f60248201527f696e636f7272656374206e756d626572206f6620616c6c6f636174696f6e730060448201526064016100bb565b806000815181106105fc576105fc610a2c565b60200260200101516040015160008151811061061a5761061a610a2c565b6020026020010151600001518260008151811061063957610639610a2c565b60200260200101516040015160008151811061065757610657610a2c565b6020026020010151600001511480156106e757508060008151811061067e5761067e610a2c565b60200260200101516040015160018151811061069c5761069c610a2c565b602002602001015160000151826000815181106106bb576106bb610a2c565b6020026020010151604001516001815181106106d9576106d9610a2c565b602002602001015160000151145b6107335760405162461bcd60e51b815260206004820152601a60248201527f64657374696e6174696f6e732063616e6e6f74206368616e676500000000000060448201526064016100bb565b60008060005b60028110156107dc578460008151811061075557610755610a2c565b602002602001015160400151818151811061077257610772610a2c565b602002602001015160200151836107899190610e12565b92508360008151811061079e5761079e610a2c565b60200260200101516040015181815181106107bb576107bb610a2c565b602002602001015160200151826107d29190610e12565b9150600101610739565b5080821461082c5760405162461bcd60e51b815260206004820152601d60248201527f746f74616c20616c6c6f63617465642063616e6e6f74206368616e676500000060448201526064016100bb565b50505050565b60006040828403121561084457600080fd5b50919050565b6000806000806060858703121561086057600080fd5b843567ffffffffffffffff8082111561087857600080fd5b908601906080828903121561088c57600080fd5b909450602086013590808211156108a257600080fd5b818701915087601f8301126108b657600080fd5b8135818111156108c557600080fd5b8860208260051b85010111156108da57600080fd5b6020830195508094505060408701359150808211156108f857600080fd5b5061090587828801610832565b91505092959194509250565b82151581526000602060406020840152835180604085015260005b818110156109485785810183015185820160600152820161092c565b506000606082860101526060601f19601f830116850101925050509392505050565b6000808335601e1984360301811261098157600080fd5b83018035915067ffffffffffffffff82111561099c57600080fd5b6020019150600581901b36038213156109b457600080fd5b9250929050565b60008235607e198336030181126109d157600080fd5b9190910192915050565b6000602082840312156109ed57600080fd5b813565ffffffffffff81168114610a0357600080fd5b9392505050565b600060208284031215610a1c57600080fd5b81358015158114610a0357600080fd5b634e487b7160e01b600052603260045260246000fd5b60008235603e198336030181126109d157600080fd5b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff81118282101715610a9157610a91610a58565b60405290565b6040516060810167ffffffffffffffff81118282101715610a9157610a91610a58565b6040805190810167ffffffffffffffff81118282101715610a9157610a91610a58565b604051601f8201601f1916810167ffffffffffffffff81118282101715610b0657610b06610a58565b604052919050565b600067ffffffffffffffff821115610b2857610b28610a58565b5060051b60200190565b600082601f830112610b4357600080fd5b813567ffffffffffffffff811115610b5d57610b5d610a58565b610b70601f8201601f1916602001610add565b818152846020838601011115610b8557600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f830112610bb357600080fd5b81356020610bc8610bc383610b0e565b610add565b82815260059290921b84018101918181019086841115610be757600080fd5b8286015b84811015610c9057803567ffffffffffffffff80821115610c0c5760008081fd5b908801906080828b03601f1901811315610c265760008081fd5b610c2e610a6e565b8784013581526040808501358983015260608086013560ff81168114610c545760008081fd5b83830152928501359284841115610c6d57600091508182fd5b610c7b8e8b86890101610b32565b90830152508652505050918301918301610beb565b509695505050505050565b6000610ca9610bc384610b0e565b80848252602080830192508560051b850136811115610cc757600080fd5b855b81811015610dbe57803567ffffffffffffffff80821115610cea5760008081fd5b818901915060608236031215610d005760008081fd5b610d08610a97565b82356001600160a01b0381168114610d205760008081fd5b81528286013582811115610d345760008081fd5b8301604036829003811315610d495760008081fd5b610d51610aba565b823560048110610d615760008081fd5b81528289013585811115610d755760008081fd5b610d8136828601610b32565b828b0152508389015284810135915083821115610d9e5760008081fd5b610daa36838701610ba2565b908301525087525050938201938201610cc9565b50919695505050505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156104eb576104eb610dca565b600060ff821660ff8103610e0957610e09610dca565b60010192915050565b808201808211156104eb576104eb610dca56fea26469706673582212205eb3d08674f615133f922eeca73963840ca800a5dd1a2a1363f7a1144bf3919b64736f6c63430008160033",
}

MarginAppV1MetaData contains all meta data concerning the MarginAppV1 contract.

Functions

This section is empty.

Types

type ExitFormatAllocation

type ExitFormatAllocation struct {
	Destination    [32]byte
	Amount         *big.Int
	AllocationType uint8
	Metadata       []byte
}

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

type ExitFormatAssetMetadata

type ExitFormatAssetMetadata struct {
	AssetType uint8
	Metadata  []byte
}

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

type ExitFormatSingleAssetExit

type ExitFormatSingleAssetExit struct {
	Asset         common.Address
	AssetMetadata ExitFormatAssetMetadata
	Allocations   []ExitFormatAllocation
}

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

type INitroTypesFixedPart

type INitroTypesFixedPart struct {
	Participants      []common.Address
	ChannelNonce      uint64
	AppDefinition     common.Address
	ChallengeDuration *big.Int
}

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

type INitroTypesRecoveredVariablePart

type INitroTypesRecoveredVariablePart struct {
	VariablePart INitroTypesVariablePart
	SignedBy     *big.Int
}

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

type INitroTypesVariablePart

type INitroTypesVariablePart struct {
	Outcome []ExitFormatSingleAssetExit
	AppData []byte
	TurnNum *big.Int
	IsFinal bool
}

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

type MarginAppV1

type MarginAppV1 struct {
	MarginAppV1Caller     // Read-only binding to the contract
	MarginAppV1Transactor // Write-only binding to the contract
	MarginAppV1Filterer   // Log filterer for contract events
}

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

func DeployMarginAppV1

func DeployMarginAppV1(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *MarginAppV1, error)

DeployMarginAppV1 deploys a new Ethereum contract, binding an instance of MarginAppV1 to it.

func NewMarginAppV1

func NewMarginAppV1(address common.Address, backend bind.ContractBackend) (*MarginAppV1, error)

NewMarginAppV1 creates a new instance of MarginAppV1, bound to a specific deployed contract.

type MarginAppV1Caller

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

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

func NewMarginAppV1Caller

func NewMarginAppV1Caller(address common.Address, caller bind.ContractCaller) (*MarginAppV1Caller, error)

NewMarginAppV1Caller creates a new read-only instance of MarginAppV1, bound to a specific deployed contract.

func (*MarginAppV1Caller) StateIsSupported

func (_MarginAppV1 *MarginAppV1Caller) StateIsSupported(opts *bind.CallOpts, fixedPart INitroTypesFixedPart, proof []INitroTypesRecoveredVariablePart, candidate INitroTypesRecoveredVariablePart) (bool, string, error)

StateIsSupported is a free data retrieval call binding the contract method 0x9936d812.

Solidity: function stateIsSupported((address[],uint64,address,uint48) fixedPart, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),uint256)[] proof, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),uint256) candidate) pure returns(bool, string)

type MarginAppV1CallerRaw

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

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

func (*MarginAppV1CallerRaw) Call

func (_MarginAppV1 *MarginAppV1CallerRaw) 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 MarginAppV1CallerSession

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

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

func (*MarginAppV1CallerSession) StateIsSupported

StateIsSupported is a free data retrieval call binding the contract method 0x9936d812.

Solidity: function stateIsSupported((address[],uint64,address,uint48) fixedPart, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),uint256)[] proof, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),uint256) candidate) pure returns(bool, string)

type MarginAppV1Filterer

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

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

func NewMarginAppV1Filterer

func NewMarginAppV1Filterer(address common.Address, filterer bind.ContractFilterer) (*MarginAppV1Filterer, error)

NewMarginAppV1Filterer creates a new log filterer instance of MarginAppV1, bound to a specific deployed contract.

type MarginAppV1Raw

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

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

func (*MarginAppV1Raw) Call

func (_MarginAppV1 *MarginAppV1Raw) 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 (*MarginAppV1Raw) Transact

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

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

func (*MarginAppV1Raw) Transfer

func (_MarginAppV1 *MarginAppV1Raw) 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 MarginAppV1Session

type MarginAppV1Session struct {
	Contract     *MarginAppV1      // 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
}

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

func (*MarginAppV1Session) StateIsSupported

func (_MarginAppV1 *MarginAppV1Session) StateIsSupported(fixedPart INitroTypesFixedPart, proof []INitroTypesRecoveredVariablePart, candidate INitroTypesRecoveredVariablePart) (bool, string, error)

StateIsSupported is a free data retrieval call binding the contract method 0x9936d812.

Solidity: function stateIsSupported((address[],uint64,address,uint48) fixedPart, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),uint256)[] proof, (((address,(uint8,bytes),(bytes32,uint256,uint8,bytes)[])[],bytes,uint48,bool),uint256) candidate) pure returns(bool, string)

type MarginAppV1Transactor

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

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

func NewMarginAppV1Transactor

func NewMarginAppV1Transactor(address common.Address, transactor bind.ContractTransactor) (*MarginAppV1Transactor, error)

NewMarginAppV1Transactor creates a new write-only instance of MarginAppV1, bound to a specific deployed contract.

type MarginAppV1TransactorRaw

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

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

func (*MarginAppV1TransactorRaw) Transact

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

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

func (*MarginAppV1TransactorRaw) Transfer

func (_MarginAppV1 *MarginAppV1TransactorRaw) 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 MarginAppV1TransactorSession

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

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

Jump to

Keyboard shortcuts

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