Documentation ¶
Index ¶
- Constants
- Variables
- type ERC20Swap
- type ERC20SwapCaller
- func (_ERC20Swap *ERC20SwapCaller) IsRedeemable(opts *bind.CallOpts, secretHash [32]byte, secret [32]byte) (bool, error)
- func (_ERC20Swap *ERC20SwapCaller) IsRefundable(opts *bind.CallOpts, secretHash [32]byte) (bool, error)
- func (_ERC20Swap *ERC20SwapCaller) Swap(opts *bind.CallOpts, secretHash [32]byte) (ethv0.ETHSwapSwap, error)
- func (_ERC20Swap *ERC20SwapCaller) Swaps(opts *bind.CallOpts, arg0 [32]byte) (struct{ ... }, error)
- func (_ERC20Swap *ERC20SwapCaller) TokenAddress(opts *bind.CallOpts) (common.Address, error)
- type ERC20SwapCallerRaw
- type ERC20SwapCallerSession
- func (_ERC20Swap *ERC20SwapCallerSession) IsRedeemable(secretHash [32]byte, secret [32]byte) (bool, error)
- func (_ERC20Swap *ERC20SwapCallerSession) IsRefundable(secretHash [32]byte) (bool, error)
- func (_ERC20Swap *ERC20SwapCallerSession) Swap(secretHash [32]byte) (ethv0.ETHSwapSwap, error)
- func (_ERC20Swap *ERC20SwapCallerSession) Swaps(arg0 [32]byte) (struct{ ... }, error)
- func (_ERC20Swap *ERC20SwapCallerSession) TokenAddress() (common.Address, error)
- type ERC20SwapFilterer
- type ERC20SwapRaw
- func (_ERC20Swap *ERC20SwapRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, ...) error
- func (_ERC20Swap *ERC20SwapRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
- func (_ERC20Swap *ERC20SwapRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
- type ERC20SwapSession
- func (_ERC20Swap *ERC20SwapSession) Initiate(initiations []ethv0.ETHSwapInitiation) (*types.Transaction, error)
- func (_ERC20Swap *ERC20SwapSession) IsRedeemable(secretHash [32]byte, secret [32]byte) (bool, error)
- func (_ERC20Swap *ERC20SwapSession) IsRefundable(secretHash [32]byte) (bool, error)
- func (_ERC20Swap *ERC20SwapSession) Redeem(redemptions []ethv0.ETHSwapRedemption) (*types.Transaction, error)
- func (_ERC20Swap *ERC20SwapSession) Refund(secretHash [32]byte) (*types.Transaction, error)
- func (_ERC20Swap *ERC20SwapSession) Swap(secretHash [32]byte) (ethv0.ETHSwapSwap, error)
- func (_ERC20Swap *ERC20SwapSession) Swaps(arg0 [32]byte) (struct{ ... }, error)
- func (_ERC20Swap *ERC20SwapSession) TokenAddress() (common.Address, error)
- type ERC20SwapTransactor
- func (_ERC20Swap *ERC20SwapTransactor) Initiate(opts *bind.TransactOpts, initiations []ethv0.ETHSwapInitiation) (*types.Transaction, error)
- func (_ERC20Swap *ERC20SwapTransactor) Redeem(opts *bind.TransactOpts, redemptions []ethv0.ETHSwapRedemption) (*types.Transaction, error)
- func (_ERC20Swap *ERC20SwapTransactor) Refund(opts *bind.TransactOpts, secretHash [32]byte) (*types.Transaction, error)
- type ERC20SwapTransactorRaw
- type ERC20SwapTransactorSession
- func (_ERC20Swap *ERC20SwapTransactorSession) Initiate(initiations []ethv0.ETHSwapInitiation) (*types.Transaction, error)
- func (_ERC20Swap *ERC20SwapTransactorSession) Redeem(redemptions []ethv0.ETHSwapRedemption) (*types.Transaction, error)
- func (_ERC20Swap *ERC20SwapTransactorSession) Refund(secretHash [32]byte) (*types.Transaction, error)
Constants ¶
const ERC20SwapRuntimeBin = "" /* 7696-byte string literal not displayed */
Variables ¶
var ERC20SwapABI = ERC20SwapMetaData.ABI
ERC20SwapABI is the input ABI used to generate the binding from. Deprecated: Use ERC20SwapMetaData.ABI instead.
var ERC20SwapBin = ERC20SwapMetaData.Bin
ERC20SwapBin is the compiled bytecode used for deploying new contracts. Deprecated: Use ERC20SwapMetaData.Bin instead.
var ERC20SwapMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"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\":\"structERC20Swap.Initiation[]\",\"name\":\"initiations\",\"type\":\"tuple[]\"}],\"name\":\"initiate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"secretHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"secret\",\"type\":\"bytes32\"}],\"name\":\"isRedeemable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"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\":\"structERC20Swap.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\":\"enumERC20Swap.State\",\"name\":\"state\",\"type\":\"uint8\"}],\"internalType\":\"structERC20Swap.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\":\"enumERC20Swap.State\",\"name\":\"state\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token_address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
Bin: "0x60a060405234801561001057600080fd5b50604051610fa7380380610fa783398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b608051610f0861009f6000396000818160d0015281816102b9015281816106890152610adb0152610f086000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063bfd2fd971161005b578063bfd2fd971461011d578063d0f761c014610140578063eb84e7f214610153578063f4fd17f9146101c257600080fd5b80637249fbb61461008d57806376467cbd146100a25780638c8e8fee146100cb578063a8793f941461010a575b600080fd5b6100a061009b366004610bb0565b6101d5565b005b6100b56100b0366004610bb0565b610394565b6040516100c29190610c01565b60405180910390f35b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c2565b6100a0610118366004610c66565b61046f565b61013061012b366004610cdb565b61076a565b60405190151581526020016100c2565b61013061014e366004610bb0565b610834565b6101af610161366004610bb0565b60006020819052908152604090208054600182015460028301546003840154600485015460059095015493949293919290916001600160a01b0391821691811690600160a01b900460ff1687565b6040516100c29796959493929190610cfd565b6100a06101d0366004610d49565b610894565b3233146101fd5760405162461bcd60e51b81526004016101f490610dac565b60405180910390fd5b61020681610834565b6102435760405162461bcd60e51b815260206004820152600e60248201526d6e6f7420726566756e6461626c6560901b60448201526064016101f4565b60008181526020818152604080832060058101805460ff60a01b1916600360a01b17905560018101548251336024820152604480820192909252835180820390920182526064018352928301805163a9059cbb60e01b6001600160e01b0390911617905290519092916060916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916102e391610dd6565b6000604051808303816000865af19150503d8060008114610320576040519150601f19603f3d011682016040523d82523d6000602084013e610325565b606091505b5090925090508180156103505750805115806103505750808060200190518101906103509190610e11565b61038e5760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016101f4565b50505050565b6103d16040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a081018290529060c082015290565b60008281526020818152604091829020825160e08101845281548152600182015492810192909252600281015492820192909252600380830154606083015260048301546001600160a01b039081166080840152600584015490811660a084015291929160c0840191600160a01b90910460ff169081111561045557610455610bc9565b600381111561046657610466610bc9565b90525092915050565b32331461048e5760405162461bcd60e51b81526004016101f490610dac565b6000805b8281101561063357368484838181106104ad576104ad610e33565b90506080020190506000806000836020013581526020019081526020016000209050600082606001351161050b5760405162461bcd60e51b81526020600482015260056024820152640c081d985b60da1b60448201526064016101f4565b813561054d5760405162461bcd60e51b815260206004820152601160248201527003020726566756e6454696d657374616d7607c1b60448201526064016101f4565b60006005820154600160a01b900460ff16600381111561056f5761056f610bc9565b146105ae5760405162461bcd60e51b815260206004820152600f60248201526e0c8eae040e6cac6e4cae840d0c2e6d608b1b60448201526064016101f4565b436002820155813560038201556004810180546001600160a01b031916331790556105df6060830160408401610e49565b6005820180546060850135600185018190556001600160a01b03939093166001600160a81b031990911617600160a01b17905561061c9085610e88565b93505050808061062b90610ea0565b915050610492565b5060408051336024820152306044820152606480820184905282518083039091018152608490910182526020810180516001600160e01b03166323b872dd60e01b17905290516000916060916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916106b391610dd6565b6000604051808303816000865af19150503d80600081146106f0576040519150601f19603f3d011682016040523d82523d6000602084013e6106f5565b606091505b5090925090508180156107205750805115806107205750808060200190518101906107209190610e11565b6107635760405162461bcd60e51b81526020600482015260146024820152731d1c985b9cd9995c88199c9bdb4819985a5b195960621b60448201526064016101f4565b5050505050565b600082815260208190526040812060016005820154600160a01b900460ff16600381111561079a5761079a610bc9565b1480156107b3575060058101546001600160a01b031633145b801561082c5750836002846040516020016107d091815260200190565b60408051601f19818403018152908290526107ea91610dd6565b602060405180830381855afa158015610807573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061082a9190610eb9565b145b949350505050565b600081815260208190526040812060016005820154600160a01b900460ff16600381111561086457610864610bc9565b14801561087d575060048101546001600160a01b031633145b801561088d575080600301544210155b9392505050565b3233146108b35760405162461bcd60e51b81526004016101f490610dac565b6000805b82811015610a8b57368484838181106108d2576108d2610e33565b6020604091820293909301838101356000908152938490529220919250600190506005820154600160a01b900460ff16600381111561091357610913610bc9565b1461094c5760405162461bcd60e51b815260206004820152600960248201526862616420737461746560b81b60448201526064016101f4565b60058101546001600160a01b0316331461099a5760405162461bcd60e51b815260206004820152600f60248201526e189859081c185c9d1a58da5c185b9d608a1b60448201526064016101f4565b8160200135600283600001356040516020016109b891815260200190565b60408051601f19818403018152908290526109d291610dd6565b602060405180830381855afa1580156109ef573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190610a129190610eb9565b14610a4c5760405162461bcd60e51b815260206004820152600a602482015269189859081cd958dc995d60b21b60448201526064016101f4565b60058101805460ff60a01b1916600160a11b179055813581556001810154610a749085610e88565b935050508080610a8390610ea0565b9150506108b7565b5060408051336024820152604480820184905282518083039091018152606490910182526020810180516001600160e01b031663a9059cbb60e01b17905290516000916060916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691610b0591610dd6565b6000604051808303816000865af19150503d8060008114610b42576040519150601f19603f3d011682016040523d82523d6000602084013e610b47565b606091505b509092509050818015610b72575080511580610b72575080806020019051810190610b729190610e11565b6107635760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016101f4565b600060208284031215610bc257600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b60048110610bfd57634e487b7160e01b600052602160045260246000fd5b9052565b600060e08201905082518252602083015160208301526040830151604083015260608301516060830152608083015160018060a01b0380821660808501528060a08601511660a0850152505060c0830151610c5f60c0840182610bdf565b5092915050565b60008060208385031215610c7957600080fd5b823567ffffffffffffffff80821115610c9157600080fd5b818501915085601f830112610ca557600080fd5b813581811115610cb457600080fd5b8660208260071b8501011115610cc957600080fd5b60209290920196919550909350505050565b60008060408385031215610cee57600080fd5b50508035926020909101359150565b8781526020810187905260408101869052606081018590526001600160a01b038481166080830152831660a082015260e08101610d3d60c0830184610bdf565b98975050505050505050565b60008060208385031215610d5c57600080fd5b823567ffffffffffffffff80821115610d7457600080fd5b818501915085601f830112610d8857600080fd5b813581811115610d9757600080fd5b8660208260061b8501011115610cc957600080fd5b60208082526010908201526f39b2b73232b910109e9037b934b3b4b760811b604082015260600190565b6000825160005b81811015610df75760208186018101518583015201610ddd565b81811115610e06576000828501525b509190910192915050565b600060208284031215610e2357600080fd5b8151801515811461088d57600080fd5b634e487b7160e01b600052603260045260246000fd5b600060208284031215610e5b57600080fd5b81356001600160a01b038116811461088d57600080fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115610e9b57610e9b610e72565b500190565b600060018201610eb257610eb2610e72565b5060010190565b600060208284031215610ecb57600080fd5b505191905056fea26469706673582212203e5af33d9672cc61834e91e1c391f408502e89feacb59762150c3e8ad4b8eb8764736f6c634300080f0033",
}
ERC20SwapMetaData contains all meta data concerning the ERC20Swap contract.
Functions ¶
This section is empty.
Types ¶
type ERC20Swap ¶
type ERC20Swap struct { ERC20SwapCaller // Read-only binding to the contract ERC20SwapTransactor // Write-only binding to the contract ERC20SwapFilterer // Log filterer for contract events }
ERC20Swap is an auto generated Go binding around an Ethereum contract.
func DeployERC20Swap ¶
func DeployERC20Swap(auth *bind.TransactOpts, backend bind.ContractBackend, token common.Address) (common.Address, *types.Transaction, *ERC20Swap, error)
DeployERC20Swap deploys a new Ethereum contract, binding an instance of ERC20Swap to it.
func NewERC20Swap ¶
NewERC20Swap creates a new instance of ERC20Swap, bound to a specific deployed contract.
type ERC20SwapCaller ¶
type ERC20SwapCaller struct {
// contains filtered or unexported fields
}
ERC20SwapCaller is an auto generated read-only Go binding around an Ethereum contract.
func NewERC20SwapCaller ¶
func NewERC20SwapCaller(address common.Address, caller bind.ContractCaller) (*ERC20SwapCaller, error)
NewERC20SwapCaller creates a new read-only instance of ERC20Swap, bound to a specific deployed contract.
func (*ERC20SwapCaller) IsRedeemable ¶
func (_ERC20Swap *ERC20SwapCaller) IsRedeemable(opts *bind.CallOpts, secretHash [32]byte, secret [32]byte) (bool, error)
IsRedeemable is a free data retrieval call binding the contract method 0xbfd2fd97.
Solidity: function isRedeemable(bytes32 secretHash, bytes32 secret) view returns(bool)
func (*ERC20SwapCaller) IsRefundable ¶
func (_ERC20Swap *ERC20SwapCaller) 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 (*ERC20SwapCaller) Swap ¶
func (_ERC20Swap *ERC20SwapCaller) Swap(opts *bind.CallOpts, secretHash [32]byte) (ethv0.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 (*ERC20SwapCaller) Swaps ¶
func (_ERC20Swap *ERC20SwapCaller) 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)
func (*ERC20SwapCaller) TokenAddress ¶
TokenAddress is a free data retrieval call binding the contract method 0x8c8e8fee.
Solidity: function token_address() view returns(address)
type ERC20SwapCallerRaw ¶
type ERC20SwapCallerRaw struct {
Contract *ERC20SwapCaller // Generic read-only contract binding to access the raw methods on
}
ERC20SwapCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
func (*ERC20SwapCallerRaw) Call ¶
func (_ERC20Swap *ERC20SwapCallerRaw) 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 ERC20SwapCallerSession ¶
type ERC20SwapCallerSession struct { Contract *ERC20SwapCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session }
ERC20SwapCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.
func (*ERC20SwapCallerSession) IsRedeemable ¶
func (_ERC20Swap *ERC20SwapCallerSession) IsRedeemable(secretHash [32]byte, secret [32]byte) (bool, error)
IsRedeemable is a free data retrieval call binding the contract method 0xbfd2fd97.
Solidity: function isRedeemable(bytes32 secretHash, bytes32 secret) view returns(bool)
func (*ERC20SwapCallerSession) IsRefundable ¶
func (_ERC20Swap *ERC20SwapCallerSession) 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 (*ERC20SwapCallerSession) Swap ¶
func (_ERC20Swap *ERC20SwapCallerSession) Swap(secretHash [32]byte) (ethv0.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 (*ERC20SwapCallerSession) Swaps ¶
func (_ERC20Swap *ERC20SwapCallerSession) 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)
func (*ERC20SwapCallerSession) TokenAddress ¶
func (_ERC20Swap *ERC20SwapCallerSession) TokenAddress() (common.Address, error)
TokenAddress is a free data retrieval call binding the contract method 0x8c8e8fee.
Solidity: function token_address() view returns(address)
type ERC20SwapFilterer ¶
type ERC20SwapFilterer struct {
// contains filtered or unexported fields
}
ERC20SwapFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
func NewERC20SwapFilterer ¶
func NewERC20SwapFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC20SwapFilterer, error)
NewERC20SwapFilterer creates a new log filterer instance of ERC20Swap, bound to a specific deployed contract.
type ERC20SwapRaw ¶
type ERC20SwapRaw struct {
Contract *ERC20Swap // Generic contract binding to access the raw methods on
}
ERC20SwapRaw is an auto generated low-level Go binding around an Ethereum contract.
func (*ERC20SwapRaw) Call ¶
func (_ERC20Swap *ERC20SwapRaw) 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 (*ERC20SwapRaw) Transact ¶
func (_ERC20Swap *ERC20SwapRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*ERC20SwapRaw) Transfer ¶
func (_ERC20Swap *ERC20SwapRaw) 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 ERC20SwapSession ¶
type ERC20SwapSession struct { Contract *ERC20Swap // 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 }
ERC20SwapSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.
func (*ERC20SwapSession) Initiate ¶
func (_ERC20Swap *ERC20SwapSession) Initiate(initiations []ethv0.ETHSwapInitiation) (*types.Transaction, error)
Initiate is a paid mutator transaction binding the contract method 0xa8793f94.
Solidity: function initiate((uint256,bytes32,address,uint256)[] initiations) returns()
func (*ERC20SwapSession) IsRedeemable ¶
func (_ERC20Swap *ERC20SwapSession) IsRedeemable(secretHash [32]byte, secret [32]byte) (bool, error)
IsRedeemable is a free data retrieval call binding the contract method 0xbfd2fd97.
Solidity: function isRedeemable(bytes32 secretHash, bytes32 secret) view returns(bool)
func (*ERC20SwapSession) IsRefundable ¶
func (_ERC20Swap *ERC20SwapSession) 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 (*ERC20SwapSession) Redeem ¶
func (_ERC20Swap *ERC20SwapSession) Redeem(redemptions []ethv0.ETHSwapRedemption) (*types.Transaction, error)
Redeem is a paid mutator transaction binding the contract method 0xf4fd17f9.
Solidity: function redeem((bytes32,bytes32)[] redemptions) returns()
func (*ERC20SwapSession) Refund ¶
func (_ERC20Swap *ERC20SwapSession) 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 (*ERC20SwapSession) Swap ¶
func (_ERC20Swap *ERC20SwapSession) Swap(secretHash [32]byte) (ethv0.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 (*ERC20SwapSession) Swaps ¶
func (_ERC20Swap *ERC20SwapSession) 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)
func (*ERC20SwapSession) TokenAddress ¶
func (_ERC20Swap *ERC20SwapSession) TokenAddress() (common.Address, error)
TokenAddress is a free data retrieval call binding the contract method 0x8c8e8fee.
Solidity: function token_address() view returns(address)
type ERC20SwapTransactor ¶
type ERC20SwapTransactor struct {
// contains filtered or unexported fields
}
ERC20SwapTransactor is an auto generated write-only Go binding around an Ethereum contract.
func NewERC20SwapTransactor ¶
func NewERC20SwapTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC20SwapTransactor, error)
NewERC20SwapTransactor creates a new write-only instance of ERC20Swap, bound to a specific deployed contract.
func (*ERC20SwapTransactor) Initiate ¶
func (_ERC20Swap *ERC20SwapTransactor) Initiate(opts *bind.TransactOpts, initiations []ethv0.ETHSwapInitiation) (*types.Transaction, error)
Initiate is a paid mutator transaction binding the contract method 0xa8793f94.
Solidity: function initiate((uint256,bytes32,address,uint256)[] initiations) returns()
func (*ERC20SwapTransactor) Redeem ¶
func (_ERC20Swap *ERC20SwapTransactor) Redeem(opts *bind.TransactOpts, redemptions []ethv0.ETHSwapRedemption) (*types.Transaction, error)
Redeem is a paid mutator transaction binding the contract method 0xf4fd17f9.
Solidity: function redeem((bytes32,bytes32)[] redemptions) returns()
func (*ERC20SwapTransactor) Refund ¶
func (_ERC20Swap *ERC20SwapTransactor) 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 ERC20SwapTransactorRaw ¶
type ERC20SwapTransactorRaw struct {
Contract *ERC20SwapTransactor // Generic write-only contract binding to access the raw methods on
}
ERC20SwapTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
func (*ERC20SwapTransactorRaw) Transact ¶
func (_ERC20Swap *ERC20SwapTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*ERC20SwapTransactorRaw) Transfer ¶
func (_ERC20Swap *ERC20SwapTransactorRaw) 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 ERC20SwapTransactorSession ¶
type ERC20SwapTransactorSession struct { Contract *ERC20SwapTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
ERC20SwapTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.
func (*ERC20SwapTransactorSession) Initiate ¶
func (_ERC20Swap *ERC20SwapTransactorSession) Initiate(initiations []ethv0.ETHSwapInitiation) (*types.Transaction, error)
Initiate is a paid mutator transaction binding the contract method 0xa8793f94.
Solidity: function initiate((uint256,bytes32,address,uint256)[] initiations) returns()
func (*ERC20SwapTransactorSession) Redeem ¶
func (_ERC20Swap *ERC20SwapTransactorSession) Redeem(redemptions []ethv0.ETHSwapRedemption) (*types.Transaction, error)
Redeem is a paid mutator transaction binding the contract method 0xf4fd17f9.
Solidity: function redeem((bytes32,bytes32)[] redemptions) returns()
func (*ERC20SwapTransactorSession) Refund ¶
func (_ERC20Swap *ERC20SwapTransactorSession) Refund(secretHash [32]byte) (*types.Transaction, error)
Refund is a paid mutator transaction binding the contract method 0x7249fbb6.
Solidity: function refund(bytes32 secretHash) returns()