decred.org/dcrdex@v1.0.5/dex/networks/eth/contracts/v0/contract.go (about) 1 // Code generated - DO NOT EDIT. 2 // This file is a generated binding and any manual changes will be lost. 3 4 package v0 5 6 import ( 7 "errors" 8 "math/big" 9 "strings" 10 11 ethereum "github.com/ethereum/go-ethereum" 12 "github.com/ethereum/go-ethereum/accounts/abi" 13 "github.com/ethereum/go-ethereum/accounts/abi/bind" 14 "github.com/ethereum/go-ethereum/common" 15 "github.com/ethereum/go-ethereum/core/types" 16 "github.com/ethereum/go-ethereum/event" 17 ) 18 19 // Reference imports to suppress errors if they are not otherwise used. 20 var ( 21 _ = errors.New 22 _ = big.NewInt 23 _ = strings.NewReader 24 _ = ethereum.NotFound 25 _ = bind.Bind 26 _ = common.Big1 27 _ = types.BloomLookup 28 _ = event.NewSubscription 29 ) 30 31 // ETHSwapInitiation is an auto generated low-level Go binding around an user-defined struct. 32 type ETHSwapInitiation struct { 33 RefundTimestamp *big.Int 34 SecretHash [32]byte 35 Participant common.Address 36 Value *big.Int 37 } 38 39 // ETHSwapRedemption is an auto generated low-level Go binding around an user-defined struct. 40 type ETHSwapRedemption struct { 41 Secret [32]byte 42 SecretHash [32]byte 43 } 44 45 // ETHSwapSwap is an auto generated low-level Go binding around an user-defined struct. 46 type ETHSwapSwap struct { 47 Secret [32]byte 48 Value *big.Int 49 InitBlockNumber *big.Int 50 RefundBlockTimestamp *big.Int 51 Initiator common.Address 52 Participant common.Address 53 State uint8 54 } 55 56 // ETHSwapMetaData contains all meta data concerning the ETHSwap contract. 57 var ETHSwapMetaData = &bind.MetaData{ 58 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\"}]", 59 Bin: "0x608060405234801561001057600080fd5b50610b7a806100206000396000f3fe6080604052600436106100555760003560e01c80637249fbb61461005a57806376467cbd1461007c578063a8793f94146100b2578063d0f761c0146100c5578063eb84e7f2146100f5578063f4fd17f914610171575b600080fd5b34801561006657600080fd5b5061007a610075366004610871565b610191565b005b34801561008857600080fd5b5061009c610097366004610871565b6102c9565b6040516100a991906108c2565b60405180910390f35b61007a6100c0366004610927565b6103a4565b3480156100d157600080fd5b506100e56100e0366004610871565b61059b565b60405190151581526020016100a9565b34801561010157600080fd5b5061015e610110366004610871565b60006020819052908152604090208054600182015460028301546003840154600485015460059095015493949293919290916001600160a01b0391821691811690600160a01b900460ff1687565b6040516100a9979695949392919061099c565b34801561017d57600080fd5b5061007a61018c3660046109e8565b6105e3565b3233146101b95760405162461bcd60e51b81526004016101b090610a4b565b60405180910390fd5b6101c28161059b565b6101ff5760405162461bcd60e51b815260206004820152600e60248201526d6e6f7420726566756e6461626c6560901b60448201526064016101b0565b60008181526020819052604080822060058101805460ff60a01b1916600360a01b1790556004810154600182015492519193926001600160a01b03909116918381818185875af1925050503d8060008114610276576040519150601f19603f3d011682016040523d82523d6000602084013e61027b565b606091505b50909150506001811515146102c45760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016101b0565b505050565b6103066040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a081018290529060c082015290565b60008281526020818152604091829020825160e08101845281548152600182015492810192909252600281015492820192909252600380830154606083015260048301546001600160a01b039081166080840152600584015490811660a084015291929160c0840191600160a01b90910460ff169081111561038a5761038a61088a565b600381111561039b5761039b61088a565b90525092915050565b3233146103c35760405162461bcd60e51b81526004016101b090610a4b565b6000805b8281101561056157368484838181106103e2576103e2610a75565b9050608002019050600080600083602001358152602001908152602001600020905060008260600135116104405760405162461bcd60e51b81526020600482015260056024820152640c081d985b60da1b60448201526064016101b0565b81356104825760405162461bcd60e51b815260206004820152601160248201527003020726566756e6454696d657374616d7607c1b60448201526064016101b0565b60006005820154600160a01b900460ff1660038111156104a4576104a461088a565b146104dc5760405162461bcd60e51b8152602060048201526008602482015267064757020737761760c41b60448201526064016101b0565b436002820155813560038201556004810180546001600160a01b0319163317905561050d6060830160408401610a8b565b6005820180546060850135600185018190556001600160a01b03939093166001600160a81b031990911617600160a01b17905561054a9085610aca565b93505050808061055990610ae3565b9150506103c7565b503481146102c45760405162461bcd60e51b8152602060048201526007602482015266189859081d985b60ca1b60448201526064016101b0565b600081815260208190526040812060016005820154600160a01b900460ff1660038111156105cb576105cb61088a565b1480156105dc575080600301544210155b9392505050565b3233146106025760405162461bcd60e51b81526004016101b090610a4b565b6000805b828110156107da573684848381811061062157610621610a75565b6020604091820293909301838101356000908152938490529220919250600190506005820154600160a01b900460ff1660038111156106625761066261088a565b1461069b5760405162461bcd60e51b815260206004820152600960248201526862616420737461746560b81b60448201526064016101b0565b60058101546001600160a01b031633146106e95760405162461bcd60e51b815260206004820152600f60248201526e189859081c185c9d1a58da5c185b9d608a1b60448201526064016101b0565b81602001356002836000013560405160200161070791815260200190565b60408051601f198184030181529082905261072191610afc565b602060405180830381855afa15801561073e573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906107619190610b2b565b1461079b5760405162461bcd60e51b815260206004820152600a602482015269189859081cd958dc995d60b21b60448201526064016101b0565b60058101805460ff60a01b1916600160a11b1790558135815560018101546107c39085610aca565b9350505080806107d290610ae3565b915050610606565b50604051600090339083908381818185875af1925050503d806000811461081d576040519150601f19603f3d011682016040523d82523d6000602084013e610822565b606091505b509091505060018115151461086b5760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016101b0565b50505050565b60006020828403121561088357600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b600481106108be57634e487b7160e01b600052602160045260246000fd5b9052565b600060e08201905082518252602083015160208301526040830151604083015260608301516060830152608083015160018060a01b0380821660808501528060a08601511660a0850152505060c083015161092060c08401826108a0565b5092915050565b6000806020838503121561093a57600080fd5b823567ffffffffffffffff8082111561095257600080fd5b818501915085601f83011261096657600080fd5b81358181111561097557600080fd5b8660208260071b850101111561098a57600080fd5b60209290920196919550909350505050565b8781526020810187905260408101869052606081018590526001600160a01b038481166080830152831660a082015260e081016109dc60c08301846108a0565b98975050505050505050565b600080602083850312156109fb57600080fd5b823567ffffffffffffffff80821115610a1357600080fd5b818501915085601f830112610a2757600080fd5b813581811115610a3657600080fd5b8660208260061b850101111561098a57600080fd5b60208082526010908201526f39b2b73232b910109e9037b934b3b4b760811b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610a9d57600080fd5b81356001600160a01b03811681146105dc57600080fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610add57610add610ab4565b92915050565b600060018201610af557610af5610ab4565b5060010190565b6000825160005b81811015610b1d5760208186018101518583015201610b03565b506000920191825250919050565b600060208284031215610b3d57600080fd5b505191905056fea2646970667358221220d288c9a18362adf67607179f5c8585d0abe014bdb904b6e878451ac0c393a04364736f6c63430008120033", 60 } 61 62 // ETHSwapABI is the input ABI used to generate the binding from. 63 // Deprecated: Use ETHSwapMetaData.ABI instead. 64 var ETHSwapABI = ETHSwapMetaData.ABI 65 66 // ETHSwapBin is the compiled bytecode used for deploying new contracts. 67 // Deprecated: Use ETHSwapMetaData.Bin instead. 68 var ETHSwapBin = ETHSwapMetaData.Bin 69 70 // DeployETHSwap deploys a new Ethereum contract, binding an instance of ETHSwap to it. 71 func DeployETHSwap(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ETHSwap, error) { 72 parsed, err := ETHSwapMetaData.GetAbi() 73 if err != nil { 74 return common.Address{}, nil, nil, err 75 } 76 if parsed == nil { 77 return common.Address{}, nil, nil, errors.New("GetABI returned nil") 78 } 79 80 address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(ETHSwapBin), backend) 81 if err != nil { 82 return common.Address{}, nil, nil, err 83 } 84 return address, tx, ÐSwap{ETHSwapCaller: ETHSwapCaller{contract: contract}, ETHSwapTransactor: ETHSwapTransactor{contract: contract}, ETHSwapFilterer: ETHSwapFilterer{contract: contract}}, nil 85 } 86 87 // ETHSwap is an auto generated Go binding around an Ethereum contract. 88 type ETHSwap struct { 89 ETHSwapCaller // Read-only binding to the contract 90 ETHSwapTransactor // Write-only binding to the contract 91 ETHSwapFilterer // Log filterer for contract events 92 } 93 94 // ETHSwapCaller is an auto generated read-only Go binding around an Ethereum contract. 95 type ETHSwapCaller struct { 96 contract *bind.BoundContract // Generic contract wrapper for the low level calls 97 } 98 99 // ETHSwapTransactor is an auto generated write-only Go binding around an Ethereum contract. 100 type ETHSwapTransactor struct { 101 contract *bind.BoundContract // Generic contract wrapper for the low level calls 102 } 103 104 // ETHSwapFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 105 type ETHSwapFilterer struct { 106 contract *bind.BoundContract // Generic contract wrapper for the low level calls 107 } 108 109 // ETHSwapSession is an auto generated Go binding around an Ethereum contract, 110 // with pre-set call and transact options. 111 type ETHSwapSession struct { 112 Contract *ETHSwap // Generic contract binding to set the session for 113 CallOpts bind.CallOpts // Call options to use throughout this session 114 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 115 } 116 117 // ETHSwapCallerSession is an auto generated read-only Go binding around an Ethereum contract, 118 // with pre-set call options. 119 type ETHSwapCallerSession struct { 120 Contract *ETHSwapCaller // Generic contract caller binding to set the session for 121 CallOpts bind.CallOpts // Call options to use throughout this session 122 } 123 124 // ETHSwapTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 125 // with pre-set transact options. 126 type ETHSwapTransactorSession struct { 127 Contract *ETHSwapTransactor // Generic contract transactor binding to set the session for 128 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 129 } 130 131 // ETHSwapRaw is an auto generated low-level Go binding around an Ethereum contract. 132 type ETHSwapRaw struct { 133 Contract *ETHSwap // Generic contract binding to access the raw methods on 134 } 135 136 // ETHSwapCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 137 type ETHSwapCallerRaw struct { 138 Contract *ETHSwapCaller // Generic read-only contract binding to access the raw methods on 139 } 140 141 // ETHSwapTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 142 type ETHSwapTransactorRaw struct { 143 Contract *ETHSwapTransactor // Generic write-only contract binding to access the raw methods on 144 } 145 146 // NewETHSwap creates a new instance of ETHSwap, bound to a specific deployed contract. 147 func NewETHSwap(address common.Address, backend bind.ContractBackend) (*ETHSwap, error) { 148 contract, err := bindETHSwap(address, backend, backend, backend) 149 if err != nil { 150 return nil, err 151 } 152 return ÐSwap{ETHSwapCaller: ETHSwapCaller{contract: contract}, ETHSwapTransactor: ETHSwapTransactor{contract: contract}, ETHSwapFilterer: ETHSwapFilterer{contract: contract}}, nil 153 } 154 155 // NewETHSwapCaller creates a new read-only instance of ETHSwap, bound to a specific deployed contract. 156 func NewETHSwapCaller(address common.Address, caller bind.ContractCaller) (*ETHSwapCaller, error) { 157 contract, err := bindETHSwap(address, caller, nil, nil) 158 if err != nil { 159 return nil, err 160 } 161 return ÐSwapCaller{contract: contract}, nil 162 } 163 164 // NewETHSwapTransactor creates a new write-only instance of ETHSwap, bound to a specific deployed contract. 165 func NewETHSwapTransactor(address common.Address, transactor bind.ContractTransactor) (*ETHSwapTransactor, error) { 166 contract, err := bindETHSwap(address, nil, transactor, nil) 167 if err != nil { 168 return nil, err 169 } 170 return ÐSwapTransactor{contract: contract}, nil 171 } 172 173 // NewETHSwapFilterer creates a new log filterer instance of ETHSwap, bound to a specific deployed contract. 174 func NewETHSwapFilterer(address common.Address, filterer bind.ContractFilterer) (*ETHSwapFilterer, error) { 175 contract, err := bindETHSwap(address, nil, nil, filterer) 176 if err != nil { 177 return nil, err 178 } 179 return ÐSwapFilterer{contract: contract}, nil 180 } 181 182 // bindETHSwap binds a generic wrapper to an already deployed contract. 183 func bindETHSwap(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 184 parsed, err := abi.JSON(strings.NewReader(ETHSwapABI)) 185 if err != nil { 186 return nil, err 187 } 188 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 189 } 190 191 // Call invokes the (constant) contract method with params as input values and 192 // sets the output to result. The result type might be a single field for simple 193 // returns, a slice of interfaces for anonymous returns and a struct for named 194 // returns. 195 func (_ETHSwap *ETHSwapRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 196 return _ETHSwap.Contract.ETHSwapCaller.contract.Call(opts, result, method, params...) 197 } 198 199 // Transfer initiates a plain transaction to move funds to the contract, calling 200 // its default method if one is available. 201 func (_ETHSwap *ETHSwapRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 202 return _ETHSwap.Contract.ETHSwapTransactor.contract.Transfer(opts) 203 } 204 205 // Transact invokes the (paid) contract method with params as input values. 206 func (_ETHSwap *ETHSwapRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 207 return _ETHSwap.Contract.ETHSwapTransactor.contract.Transact(opts, method, params...) 208 } 209 210 // Call invokes the (constant) contract method with params as input values and 211 // sets the output to result. The result type might be a single field for simple 212 // returns, a slice of interfaces for anonymous returns and a struct for named 213 // returns. 214 func (_ETHSwap *ETHSwapCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 215 return _ETHSwap.Contract.contract.Call(opts, result, method, params...) 216 } 217 218 // Transfer initiates a plain transaction to move funds to the contract, calling 219 // its default method if one is available. 220 func (_ETHSwap *ETHSwapTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 221 return _ETHSwap.Contract.contract.Transfer(opts) 222 } 223 224 // Transact invokes the (paid) contract method with params as input values. 225 func (_ETHSwap *ETHSwapTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 226 return _ETHSwap.Contract.contract.Transact(opts, method, params...) 227 } 228 229 // IsRefundable is a free data retrieval call binding the contract method 0xd0f761c0. 230 // 231 // Solidity: function isRefundable(bytes32 secretHash) view returns(bool) 232 func (_ETHSwap *ETHSwapCaller) IsRefundable(opts *bind.CallOpts, secretHash [32]byte) (bool, error) { 233 var out []interface{} 234 err := _ETHSwap.contract.Call(opts, &out, "isRefundable", secretHash) 235 236 if err != nil { 237 return *new(bool), err 238 } 239 240 out0 := *abi.ConvertType(out[0], new(bool)).(*bool) 241 242 return out0, err 243 244 } 245 246 // IsRefundable is a free data retrieval call binding the contract method 0xd0f761c0. 247 // 248 // Solidity: function isRefundable(bytes32 secretHash) view returns(bool) 249 func (_ETHSwap *ETHSwapSession) IsRefundable(secretHash [32]byte) (bool, error) { 250 return _ETHSwap.Contract.IsRefundable(&_ETHSwap.CallOpts, secretHash) 251 } 252 253 // IsRefundable is a free data retrieval call binding the contract method 0xd0f761c0. 254 // 255 // Solidity: function isRefundable(bytes32 secretHash) view returns(bool) 256 func (_ETHSwap *ETHSwapCallerSession) IsRefundable(secretHash [32]byte) (bool, error) { 257 return _ETHSwap.Contract.IsRefundable(&_ETHSwap.CallOpts, secretHash) 258 } 259 260 // Swap is a free data retrieval call binding the contract method 0x76467cbd. 261 // 262 // Solidity: function swap(bytes32 secretHash) view returns((bytes32,uint256,uint256,uint256,address,address,uint8)) 263 func (_ETHSwap *ETHSwapCaller) Swap(opts *bind.CallOpts, secretHash [32]byte) (ETHSwapSwap, error) { 264 var out []interface{} 265 err := _ETHSwap.contract.Call(opts, &out, "swap", secretHash) 266 267 if err != nil { 268 return *new(ETHSwapSwap), err 269 } 270 271 out0 := *abi.ConvertType(out[0], new(ETHSwapSwap)).(*ETHSwapSwap) 272 273 return out0, err 274 275 } 276 277 // Swap is a free data retrieval call binding the contract method 0x76467cbd. 278 // 279 // Solidity: function swap(bytes32 secretHash) view returns((bytes32,uint256,uint256,uint256,address,address,uint8)) 280 func (_ETHSwap *ETHSwapSession) Swap(secretHash [32]byte) (ETHSwapSwap, error) { 281 return _ETHSwap.Contract.Swap(&_ETHSwap.CallOpts, secretHash) 282 } 283 284 // Swap is a free data retrieval call binding the contract method 0x76467cbd. 285 // 286 // Solidity: function swap(bytes32 secretHash) view returns((bytes32,uint256,uint256,uint256,address,address,uint8)) 287 func (_ETHSwap *ETHSwapCallerSession) Swap(secretHash [32]byte) (ETHSwapSwap, error) { 288 return _ETHSwap.Contract.Swap(&_ETHSwap.CallOpts, secretHash) 289 } 290 291 // Swaps is a free data retrieval call binding the contract method 0xeb84e7f2. 292 // 293 // Solidity: function swaps(bytes32 ) view returns(bytes32 secret, uint256 value, uint256 initBlockNumber, uint256 refundBlockTimestamp, address initiator, address participant, uint8 state) 294 func (_ETHSwap *ETHSwapCaller) Swaps(opts *bind.CallOpts, arg0 [32]byte) (struct { 295 Secret [32]byte 296 Value *big.Int 297 InitBlockNumber *big.Int 298 RefundBlockTimestamp *big.Int 299 Initiator common.Address 300 Participant common.Address 301 State uint8 302 }, error) { 303 var out []interface{} 304 err := _ETHSwap.contract.Call(opts, &out, "swaps", arg0) 305 306 outstruct := new(struct { 307 Secret [32]byte 308 Value *big.Int 309 InitBlockNumber *big.Int 310 RefundBlockTimestamp *big.Int 311 Initiator common.Address 312 Participant common.Address 313 State uint8 314 }) 315 if err != nil { 316 return *outstruct, err 317 } 318 319 outstruct.Secret = *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) 320 outstruct.Value = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) 321 outstruct.InitBlockNumber = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) 322 outstruct.RefundBlockTimestamp = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) 323 outstruct.Initiator = *abi.ConvertType(out[4], new(common.Address)).(*common.Address) 324 outstruct.Participant = *abi.ConvertType(out[5], new(common.Address)).(*common.Address) 325 outstruct.State = *abi.ConvertType(out[6], new(uint8)).(*uint8) 326 327 return *outstruct, err 328 329 } 330 331 // Swaps is a free data retrieval call binding the contract method 0xeb84e7f2. 332 // 333 // Solidity: function swaps(bytes32 ) view returns(bytes32 secret, uint256 value, uint256 initBlockNumber, uint256 refundBlockTimestamp, address initiator, address participant, uint8 state) 334 func (_ETHSwap *ETHSwapSession) Swaps(arg0 [32]byte) (struct { 335 Secret [32]byte 336 Value *big.Int 337 InitBlockNumber *big.Int 338 RefundBlockTimestamp *big.Int 339 Initiator common.Address 340 Participant common.Address 341 State uint8 342 }, error) { 343 return _ETHSwap.Contract.Swaps(&_ETHSwap.CallOpts, arg0) 344 } 345 346 // Swaps is a free data retrieval call binding the contract method 0xeb84e7f2. 347 // 348 // Solidity: function swaps(bytes32 ) view returns(bytes32 secret, uint256 value, uint256 initBlockNumber, uint256 refundBlockTimestamp, address initiator, address participant, uint8 state) 349 func (_ETHSwap *ETHSwapCallerSession) Swaps(arg0 [32]byte) (struct { 350 Secret [32]byte 351 Value *big.Int 352 InitBlockNumber *big.Int 353 RefundBlockTimestamp *big.Int 354 Initiator common.Address 355 Participant common.Address 356 State uint8 357 }, error) { 358 return _ETHSwap.Contract.Swaps(&_ETHSwap.CallOpts, arg0) 359 } 360 361 // Initiate is a paid mutator transaction binding the contract method 0xa8793f94. 362 // 363 // Solidity: function initiate((uint256,bytes32,address,uint256)[] initiations) payable returns() 364 func (_ETHSwap *ETHSwapTransactor) Initiate(opts *bind.TransactOpts, initiations []ETHSwapInitiation) (*types.Transaction, error) { 365 return _ETHSwap.contract.Transact(opts, "initiate", initiations) 366 } 367 368 // Initiate is a paid mutator transaction binding the contract method 0xa8793f94. 369 // 370 // Solidity: function initiate((uint256,bytes32,address,uint256)[] initiations) payable returns() 371 func (_ETHSwap *ETHSwapSession) Initiate(initiations []ETHSwapInitiation) (*types.Transaction, error) { 372 return _ETHSwap.Contract.Initiate(&_ETHSwap.TransactOpts, initiations) 373 } 374 375 // Initiate is a paid mutator transaction binding the contract method 0xa8793f94. 376 // 377 // Solidity: function initiate((uint256,bytes32,address,uint256)[] initiations) payable returns() 378 func (_ETHSwap *ETHSwapTransactorSession) Initiate(initiations []ETHSwapInitiation) (*types.Transaction, error) { 379 return _ETHSwap.Contract.Initiate(&_ETHSwap.TransactOpts, initiations) 380 } 381 382 // Redeem is a paid mutator transaction binding the contract method 0xf4fd17f9. 383 // 384 // Solidity: function redeem((bytes32,bytes32)[] redemptions) returns() 385 func (_ETHSwap *ETHSwapTransactor) Redeem(opts *bind.TransactOpts, redemptions []ETHSwapRedemption) (*types.Transaction, error) { 386 return _ETHSwap.contract.Transact(opts, "redeem", redemptions) 387 } 388 389 // Redeem is a paid mutator transaction binding the contract method 0xf4fd17f9. 390 // 391 // Solidity: function redeem((bytes32,bytes32)[] redemptions) returns() 392 func (_ETHSwap *ETHSwapSession) Redeem(redemptions []ETHSwapRedemption) (*types.Transaction, error) { 393 return _ETHSwap.Contract.Redeem(&_ETHSwap.TransactOpts, redemptions) 394 } 395 396 // Redeem is a paid mutator transaction binding the contract method 0xf4fd17f9. 397 // 398 // Solidity: function redeem((bytes32,bytes32)[] redemptions) returns() 399 func (_ETHSwap *ETHSwapTransactorSession) Redeem(redemptions []ETHSwapRedemption) (*types.Transaction, error) { 400 return _ETHSwap.Contract.Redeem(&_ETHSwap.TransactOpts, redemptions) 401 } 402 403 // Refund is a paid mutator transaction binding the contract method 0x7249fbb6. 404 // 405 // Solidity: function refund(bytes32 secretHash) returns() 406 func (_ETHSwap *ETHSwapTransactor) Refund(opts *bind.TransactOpts, secretHash [32]byte) (*types.Transaction, error) { 407 return _ETHSwap.contract.Transact(opts, "refund", secretHash) 408 } 409 410 // Refund is a paid mutator transaction binding the contract method 0x7249fbb6. 411 // 412 // Solidity: function refund(bytes32 secretHash) returns() 413 func (_ETHSwap *ETHSwapSession) Refund(secretHash [32]byte) (*types.Transaction, error) { 414 return _ETHSwap.Contract.Refund(&_ETHSwap.TransactOpts, secretHash) 415 } 416 417 // Refund is a paid mutator transaction binding the contract method 0x7249fbb6. 418 // 419 // Solidity: function refund(bytes32 secretHash) returns() 420 func (_ETHSwap *ETHSwapTransactorSession) Refund(secretHash [32]byte) (*types.Transaction, error) { 421 return _ETHSwap.Contract.Refund(&_ETHSwap.TransactOpts, secretHash) 422 }