v0

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: BlueOak-1.0.0 Imports: 9 Imported by: 0

Documentation

Overview

Package v0 contains pre-generated code that should not be directly edited. See the parent package for details on how to generate.

Index

Constants

View Source
const ETHSwapRuntimeBin = "" /* 5876-byte string literal not displayed */

Variables

View Source
var ETHSwapABI = ETHSwapMetaData.ABI

ETHSwapABI is the input ABI used to generate the binding from. Deprecated: Use ETHSwapMetaData.ABI instead.

View Source
var ETHSwapBin = ETHSwapMetaData.Bin

ETHSwapBin is the compiled bytecode used for deploying new contracts. Deprecated: Use ETHSwapMetaData.Bin instead.

View Source
var ETHSwapMetaData = &bind.MetaData{
	ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"refundTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"secretHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"participant\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"structETHSwap.Initiation[]\",\"name\":\"initiations\",\"type\":\"tuple[]\"}],\"name\":\"initiate\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"secretHash\",\"type\":\"bytes32\"}],\"name\":\"isRefundable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"secret\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"secretHash\",\"type\":\"bytes32\"}],\"internalType\":\"structETHSwap.Redemption[]\",\"name\":\"redemptions\",\"type\":\"tuple[]\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"secretHash\",\"type\":\"bytes32\"}],\"name\":\"refund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"secretHash\",\"type\":\"bytes32\"}],\"name\":\"swap\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"secret\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"initBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"refundBlockTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"initiator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"participant\",\"type\":\"address\"},{\"internalType\":\"enumETHSwap.State\",\"name\":\"state\",\"type\":\"uint8\"}],\"internalType\":\"structETHSwap.Swap\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"swaps\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"secret\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"initBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"refundBlockTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"initiator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"participant\",\"type\":\"address\"},{\"internalType\":\"enumETHSwap.State\",\"name\":\"state\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
	Bin: "0x608060405234801561001057600080fd5b50610b7a806100206000396000f3fe6080604052600436106100555760003560e01c80637249fbb61461005a57806376467cbd1461007c578063a8793f94146100b2578063d0f761c0146100c5578063eb84e7f2146100f5578063f4fd17f914610171575b600080fd5b34801561006657600080fd5b5061007a610075366004610871565b610191565b005b34801561008857600080fd5b5061009c610097366004610871565b6102c9565b6040516100a991906108c2565b60405180910390f35b61007a6100c0366004610927565b6103a4565b3480156100d157600080fd5b506100e56100e0366004610871565b61059b565b60405190151581526020016100a9565b34801561010157600080fd5b5061015e610110366004610871565b60006020819052908152604090208054600182015460028301546003840154600485015460059095015493949293919290916001600160a01b0391821691811690600160a01b900460ff1687565b6040516100a9979695949392919061099c565b34801561017d57600080fd5b5061007a61018c3660046109e8565b6105e3565b3233146101b95760405162461bcd60e51b81526004016101b090610a4b565b60405180910390fd5b6101c28161059b565b6101ff5760405162461bcd60e51b815260206004820152600e60248201526d6e6f7420726566756e6461626c6560901b60448201526064016101b0565b60008181526020819052604080822060058101805460ff60a01b1916600360a01b1790556004810154600182015492519193926001600160a01b03909116918381818185875af1925050503d8060008114610276576040519150601f19603f3d011682016040523d82523d6000602084013e61027b565b606091505b50909150506001811515146102c45760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016101b0565b505050565b6103066040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a081018290529060c082015290565b60008281526020818152604091829020825160e08101845281548152600182015492810192909252600281015492820192909252600380830154606083015260048301546001600160a01b039081166080840152600584015490811660a084015291929160c0840191600160a01b90910460ff169081111561038a5761038a61088a565b600381111561039b5761039b61088a565b90525092915050565b3233146103c35760405162461bcd60e51b81526004016101b090610a4b565b6000805b8281101561056157368484838181106103e2576103e2610a75565b9050608002019050600080600083602001358152602001908152602001600020905060008260600135116104405760405162461bcd60e51b81526020600482015260056024820152640c081d985b60da1b60448201526064016101b0565b81356104825760405162461bcd60e51b815260206004820152601160248201527003020726566756e6454696d657374616d7607c1b60448201526064016101b0565b60006005820154600160a01b900460ff1660038111156104a4576104a461088a565b146104dc5760405162461bcd60e51b8152602060048201526008602482015267064757020737761760c41b60448201526064016101b0565b436002820155813560038201556004810180546001600160a01b0319163317905561050d6060830160408401610a8b565b6005820180546060850135600185018190556001600160a01b03939093166001600160a81b031990911617600160a01b17905561054a9085610aca565b93505050808061055990610ae3565b9150506103c7565b503481146102c45760405162461bcd60e51b8152602060048201526007602482015266189859081d985b60ca1b60448201526064016101b0565b600081815260208190526040812060016005820154600160a01b900460ff1660038111156105cb576105cb61088a565b1480156105dc575080600301544210155b9392505050565b3233146106025760405162461bcd60e51b81526004016101b090610a4b565b6000805b828110156107da573684848381811061062157610621610a75565b6020604091820293909301838101356000908152938490529220919250600190506005820154600160a01b900460ff1660038111156106625761066261088a565b1461069b5760405162461bcd60e51b815260206004820152600960248201526862616420737461746560b81b60448201526064016101b0565b60058101546001600160a01b031633146106e95760405162461bcd60e51b815260206004820152600f60248201526e189859081c185c9d1a58da5c185b9d608a1b60448201526064016101b0565b81602001356002836000013560405160200161070791815260200190565b60408051601f198184030181529082905261072191610afc565b602060405180830381855afa15801561073e573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906107619190610b2b565b1461079b5760405162461bcd60e51b815260206004820152600a602482015269189859081cd958dc995d60b21b60448201526064016101b0565b60058101805460ff60a01b1916600160a11b1790558135815560018101546107c39085610aca565b9350505080806107d290610ae3565b915050610606565b50604051600090339083908381818185875af1925050503d806000811461081d576040519150601f19603f3d011682016040523d82523d6000602084013e610822565b606091505b509091505060018115151461086b5760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016101b0565b50505050565b60006020828403121561088357600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b600481106108be57634e487b7160e01b600052602160045260246000fd5b9052565b600060e08201905082518252602083015160208301526040830151604083015260608301516060830152608083015160018060a01b0380821660808501528060a08601511660a0850152505060c083015161092060c08401826108a0565b5092915050565b6000806020838503121561093a57600080fd5b823567ffffffffffffffff8082111561095257600080fd5b818501915085601f83011261096657600080fd5b81358181111561097557600080fd5b8660208260071b850101111561098a57600080fd5b60209290920196919550909350505050565b8781526020810187905260408101869052606081018590526001600160a01b038481166080830152831660a082015260e081016109dc60c08301846108a0565b98975050505050505050565b600080602083850312156109fb57600080fd5b823567ffffffffffffffff80821115610a1357600080fd5b818501915085601f830112610a2757600080fd5b813581811115610a3657600080fd5b8660208260061b850101111561098a57600080fd5b60208082526010908201526f39b2b73232b910109e9037b934b3b4b760811b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610a9d57600080fd5b81356001600160a01b03811681146105dc57600080fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610add57610add610ab4565b92915050565b600060018201610af557610af5610ab4565b5060010190565b6000825160005b81811015610b1d5760208186018101518583015201610b03565b506000920191825250919050565b600060208284031215610b3d57600080fd5b505191905056fea2646970667358221220d288c9a18362adf67607179f5c8585d0abe014bdb904b6e878451ac0c393a04364736f6c63430008120033",
}

ETHSwapMetaData contains all meta data concerning the ETHSwap contract.

Functions

This section is empty.

Types

type ETHSwap

type ETHSwap struct {
	ETHSwapCaller     // Read-only binding to the contract
	ETHSwapTransactor // Write-only binding to the contract
	ETHSwapFilterer   // Log filterer for contract events
}

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

func DeployETHSwap

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

DeployETHSwap deploys a new Ethereum contract, binding an instance of ETHSwap to it.

func NewETHSwap

func NewETHSwap(address common.Address, backend bind.ContractBackend) (*ETHSwap, error)

NewETHSwap creates a new instance of ETHSwap, bound to a specific deployed contract.

type ETHSwapCaller

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

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

func NewETHSwapCaller

func NewETHSwapCaller(address common.Address, caller bind.ContractCaller) (*ETHSwapCaller, error)

NewETHSwapCaller creates a new read-only instance of ETHSwap, bound to a specific deployed contract.

func (*ETHSwapCaller) IsRefundable

func (_ETHSwap *ETHSwapCaller) IsRefundable(opts *bind.CallOpts, secretHash [32]byte) (bool, error)

IsRefundable is a free data retrieval call binding the contract method 0xd0f761c0.

Solidity: function isRefundable(bytes32 secretHash) view returns(bool)

func (*ETHSwapCaller) Swap

func (_ETHSwap *ETHSwapCaller) Swap(opts *bind.CallOpts, secretHash [32]byte) (ETHSwapSwap, error)

Swap is a free data retrieval call binding the contract method 0x76467cbd.

Solidity: function swap(bytes32 secretHash) view returns((bytes32,uint256,uint256,uint256,address,address,uint8))

func (*ETHSwapCaller) Swaps

func (_ETHSwap *ETHSwapCaller) Swaps(opts *bind.CallOpts, arg0 [32]byte) (struct {
	Secret               [32]byte
	Value                *big.Int
	InitBlockNumber      *big.Int
	RefundBlockTimestamp *big.Int
	Initiator            common.Address
	Participant          common.Address
	State                uint8
}, error)

Swaps is a free data retrieval call binding the contract method 0xeb84e7f2.

Solidity: function swaps(bytes32 ) view returns(bytes32 secret, uint256 value, uint256 initBlockNumber, uint256 refundBlockTimestamp, address initiator, address participant, uint8 state)

type ETHSwapCallerRaw

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

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

func (*ETHSwapCallerRaw) Call

func (_ETHSwap *ETHSwapCallerRaw) 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 ETHSwapCallerSession

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

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

func (*ETHSwapCallerSession) IsRefundable

func (_ETHSwap *ETHSwapCallerSession) IsRefundable(secretHash [32]byte) (bool, error)

IsRefundable is a free data retrieval call binding the contract method 0xd0f761c0.

Solidity: function isRefundable(bytes32 secretHash) view returns(bool)

func (*ETHSwapCallerSession) Swap

func (_ETHSwap *ETHSwapCallerSession) Swap(secretHash [32]byte) (ETHSwapSwap, error)

Swap is a free data retrieval call binding the contract method 0x76467cbd.

Solidity: function swap(bytes32 secretHash) view returns((bytes32,uint256,uint256,uint256,address,address,uint8))

func (*ETHSwapCallerSession) Swaps

func (_ETHSwap *ETHSwapCallerSession) Swaps(arg0 [32]byte) (struct {
	Secret               [32]byte
	Value                *big.Int
	InitBlockNumber      *big.Int
	RefundBlockTimestamp *big.Int
	Initiator            common.Address
	Participant          common.Address
	State                uint8
}, error)

Swaps is a free data retrieval call binding the contract method 0xeb84e7f2.

Solidity: function swaps(bytes32 ) view returns(bytes32 secret, uint256 value, uint256 initBlockNumber, uint256 refundBlockTimestamp, address initiator, address participant, uint8 state)

type ETHSwapFilterer

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

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

func NewETHSwapFilterer

func NewETHSwapFilterer(address common.Address, filterer bind.ContractFilterer) (*ETHSwapFilterer, error)

NewETHSwapFilterer creates a new log filterer instance of ETHSwap, bound to a specific deployed contract.

type ETHSwapInitiation

type ETHSwapInitiation struct {
	RefundTimestamp *big.Int
	SecretHash      [32]byte
	Participant     common.Address
	Value           *big.Int
}

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

type ETHSwapRaw

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

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

func (*ETHSwapRaw) Call

func (_ETHSwap *ETHSwapRaw) 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 (*ETHSwapRaw) Transact

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

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

func (*ETHSwapRaw) Transfer

func (_ETHSwap *ETHSwapRaw) 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 ETHSwapRedemption

type ETHSwapRedemption struct {
	Secret     [32]byte
	SecretHash [32]byte
}

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

type ETHSwapSession

type ETHSwapSession struct {
	Contract     *ETHSwap          // 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
}

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

func (*ETHSwapSession) Initiate

func (_ETHSwap *ETHSwapSession) Initiate(initiations []ETHSwapInitiation) (*types.Transaction, error)

Initiate is a paid mutator transaction binding the contract method 0xa8793f94.

Solidity: function initiate((uint256,bytes32,address,uint256)[] initiations) payable returns()

func (*ETHSwapSession) IsRefundable

func (_ETHSwap *ETHSwapSession) IsRefundable(secretHash [32]byte) (bool, error)

IsRefundable is a free data retrieval call binding the contract method 0xd0f761c0.

Solidity: function isRefundable(bytes32 secretHash) view returns(bool)

func (*ETHSwapSession) Redeem

func (_ETHSwap *ETHSwapSession) Redeem(redemptions []ETHSwapRedemption) (*types.Transaction, error)

Redeem is a paid mutator transaction binding the contract method 0xf4fd17f9.

Solidity: function redeem((bytes32,bytes32)[] redemptions) returns()

func (*ETHSwapSession) Refund

func (_ETHSwap *ETHSwapSession) Refund(secretHash [32]byte) (*types.Transaction, error)

Refund is a paid mutator transaction binding the contract method 0x7249fbb6.

Solidity: function refund(bytes32 secretHash) returns()

func (*ETHSwapSession) Swap

func (_ETHSwap *ETHSwapSession) Swap(secretHash [32]byte) (ETHSwapSwap, error)

Swap is a free data retrieval call binding the contract method 0x76467cbd.

Solidity: function swap(bytes32 secretHash) view returns((bytes32,uint256,uint256,uint256,address,address,uint8))

func (*ETHSwapSession) Swaps

func (_ETHSwap *ETHSwapSession) Swaps(arg0 [32]byte) (struct {
	Secret               [32]byte
	Value                *big.Int
	InitBlockNumber      *big.Int
	RefundBlockTimestamp *big.Int
	Initiator            common.Address
	Participant          common.Address
	State                uint8
}, error)

Swaps is a free data retrieval call binding the contract method 0xeb84e7f2.

Solidity: function swaps(bytes32 ) view returns(bytes32 secret, uint256 value, uint256 initBlockNumber, uint256 refundBlockTimestamp, address initiator, address participant, uint8 state)

type ETHSwapSwap

type ETHSwapSwap struct {
	Secret               [32]byte
	Value                *big.Int
	InitBlockNumber      *big.Int
	RefundBlockTimestamp *big.Int
	Initiator            common.Address
	Participant          common.Address
	State                uint8
}

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

type ETHSwapTransactor

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

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

func NewETHSwapTransactor

func NewETHSwapTransactor(address common.Address, transactor bind.ContractTransactor) (*ETHSwapTransactor, error)

NewETHSwapTransactor creates a new write-only instance of ETHSwap, bound to a specific deployed contract.

func (*ETHSwapTransactor) Initiate

func (_ETHSwap *ETHSwapTransactor) Initiate(opts *bind.TransactOpts, initiations []ETHSwapInitiation) (*types.Transaction, error)

Initiate is a paid mutator transaction binding the contract method 0xa8793f94.

Solidity: function initiate((uint256,bytes32,address,uint256)[] initiations) payable returns()

func (*ETHSwapTransactor) Redeem

func (_ETHSwap *ETHSwapTransactor) Redeem(opts *bind.TransactOpts, redemptions []ETHSwapRedemption) (*types.Transaction, error)

Redeem is a paid mutator transaction binding the contract method 0xf4fd17f9.

Solidity: function redeem((bytes32,bytes32)[] redemptions) returns()

func (*ETHSwapTransactor) Refund

func (_ETHSwap *ETHSwapTransactor) Refund(opts *bind.TransactOpts, secretHash [32]byte) (*types.Transaction, error)

Refund is a paid mutator transaction binding the contract method 0x7249fbb6.

Solidity: function refund(bytes32 secretHash) returns()

type ETHSwapTransactorRaw

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

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

func (*ETHSwapTransactorRaw) Transact

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

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

func (*ETHSwapTransactorRaw) Transfer

func (_ETHSwap *ETHSwapTransactorRaw) 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 ETHSwapTransactorSession

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

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

func (*ETHSwapTransactorSession) Initiate

func (_ETHSwap *ETHSwapTransactorSession) Initiate(initiations []ETHSwapInitiation) (*types.Transaction, error)

Initiate is a paid mutator transaction binding the contract method 0xa8793f94.

Solidity: function initiate((uint256,bytes32,address,uint256)[] initiations) payable returns()

func (*ETHSwapTransactorSession) Redeem

func (_ETHSwap *ETHSwapTransactorSession) Redeem(redemptions []ETHSwapRedemption) (*types.Transaction, error)

Redeem is a paid mutator transaction binding the contract method 0xf4fd17f9.

Solidity: function redeem((bytes32,bytes32)[] redemptions) returns()

func (*ETHSwapTransactorSession) Refund

func (_ETHSwap *ETHSwapTransactorSession) Refund(secretHash [32]byte) (*types.Transaction, error)

Refund is a paid mutator transaction binding the contract method 0x7249fbb6.

Solidity: function refund(bytes32 secretHash) returns()

Jump to

Keyboard shortcuts

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