abi.go 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823
  1. // Code generated - DO NOT EDIT.
  2. // This file is a generated binding and any manual changes will be lost.
  3. package abi
  4. import (
  5. "math/big"
  6. "strings"
  7. ethereum "github.com/ethereum/go-ethereum"
  8. "github.com/ethereum/go-ethereum/accounts/abi"
  9. "github.com/ethereum/go-ethereum/accounts/abi/bind"
  10. "github.com/ethereum/go-ethereum/common"
  11. "github.com/ethereum/go-ethereum/core/types"
  12. "github.com/ethereum/go-ethereum/event"
  13. )
  14. // Reference imports to suppress errors if they are not otherwise used.
  15. var (
  16. _ = big.NewInt
  17. _ = strings.NewReader
  18. _ = ethereum.NotFound
  19. _ = bind.Bind
  20. _ = common.Big1
  21. _ = types.BloomLookup
  22. _ = event.NewSubscription
  23. )
  24. // WormholeGuardianSet is an auto generated low-level Go binding around an user-defined struct.
  25. type WormholeGuardianSet struct {
  26. Keys []common.Address
  27. ExpirationTime uint32
  28. }
  29. // AbiABI is the input ABI used to generate the binding from.
  30. const AbiABI = "[{\"inputs\":[{\"components\":[{\"internalType\":\"address[]\",\"name\":\"keys\",\"type\":\"address[]\"},{\"internalType\":\"uint32\",\"name\":\"expiration_time\",\"type\":\"uint32\"}],\"internalType\":\"structWormhole.GuardianSet\",\"name\":\"initial_guardian_set\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"wrapped_asset_master\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_guardian_set_expirity\",\"type\":\"uint32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"oldGuardianIndex\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"newGuardianIndex\",\"type\":\"uint32\"}],\"name\":\"LogGuardianSetChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"target_chain\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"token_chain\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"token_decimals\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"token\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"sender\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"recipient\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"}],\"name\":\"LogTokensLocked\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\",\"payable\":true},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"consumedVAAs\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\",\"constant\":true},{\"inputs\":[],\"name\":\"guardian_set_expirity\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\",\"constant\":true},{\"inputs\":[],\"name\":\"guardian_set_index\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\",\"constant\":true},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"guardian_sets\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"expiration_time\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\",\"constant\":true},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isWrappedAsset\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\",\"constant\":true},{\"inputs\":[],\"name\":\"wrappedAssetMaster\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\",\"constant\":true},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"wrappedAssets\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\",\"constant\":true},{\"stateMutability\":\"payable\",\"type\":\"receive\",\"payable\":true},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"idx\",\"type\":\"uint32\"}],\"name\":\"getGuardianSet\",\"outputs\":[{\"components\":[{\"internalType\":\"address[]\",\"name\":\"keys\",\"type\":\"address[]\"},{\"internalType\":\"uint32\",\"name\":\"expiration_time\",\"type\":\"uint32\"}],\"internalType\":\"structWormhole.GuardianSet\",\"name\":\"gs\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\",\"constant\":true},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"vaa\",\"type\":\"bytes\"}],\"name\":\"submitVAA\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"recipient\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"target_chain\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"refund_dust\",\"type\":\"bool\"}],\"name\":\"lockAssets\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"recipient\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"target_chain\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"}],\"name\":\"lockETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\",\"payable\":true}]"
  31. // Abi is an auto generated Go binding around an Ethereum contract.
  32. type Abi struct {
  33. AbiCaller // Read-only binding to the contract
  34. AbiTransactor // Write-only binding to the contract
  35. AbiFilterer // Log filterer for contract events
  36. }
  37. // AbiCaller is an auto generated read-only Go binding around an Ethereum contract.
  38. type AbiCaller struct {
  39. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  40. }
  41. // AbiTransactor is an auto generated write-only Go binding around an Ethereum contract.
  42. type AbiTransactor struct {
  43. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  44. }
  45. // AbiFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
  46. type AbiFilterer struct {
  47. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  48. }
  49. // AbiSession is an auto generated Go binding around an Ethereum contract,
  50. // with pre-set call and transact options.
  51. type AbiSession struct {
  52. Contract *Abi // Generic contract binding to set the session for
  53. CallOpts bind.CallOpts // Call options to use throughout this session
  54. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  55. }
  56. // AbiCallerSession is an auto generated read-only Go binding around an Ethereum contract,
  57. // with pre-set call options.
  58. type AbiCallerSession struct {
  59. Contract *AbiCaller // Generic contract caller binding to set the session for
  60. CallOpts bind.CallOpts // Call options to use throughout this session
  61. }
  62. // AbiTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
  63. // with pre-set transact options.
  64. type AbiTransactorSession struct {
  65. Contract *AbiTransactor // Generic contract transactor binding to set the session for
  66. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  67. }
  68. // AbiRaw is an auto generated low-level Go binding around an Ethereum contract.
  69. type AbiRaw struct {
  70. Contract *Abi // Generic contract binding to access the raw methods on
  71. }
  72. // AbiCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
  73. type AbiCallerRaw struct {
  74. Contract *AbiCaller // Generic read-only contract binding to access the raw methods on
  75. }
  76. // AbiTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
  77. type AbiTransactorRaw struct {
  78. Contract *AbiTransactor // Generic write-only contract binding to access the raw methods on
  79. }
  80. // NewAbi creates a new instance of Abi, bound to a specific deployed contract.
  81. func NewAbi(address common.Address, backend bind.ContractBackend) (*Abi, error) {
  82. contract, err := bindAbi(address, backend, backend, backend)
  83. if err != nil {
  84. return nil, err
  85. }
  86. return &Abi{AbiCaller: AbiCaller{contract: contract}, AbiTransactor: AbiTransactor{contract: contract}, AbiFilterer: AbiFilterer{contract: contract}}, nil
  87. }
  88. // NewAbiCaller creates a new read-only instance of Abi, bound to a specific deployed contract.
  89. func NewAbiCaller(address common.Address, caller bind.ContractCaller) (*AbiCaller, error) {
  90. contract, err := bindAbi(address, caller, nil, nil)
  91. if err != nil {
  92. return nil, err
  93. }
  94. return &AbiCaller{contract: contract}, nil
  95. }
  96. // NewAbiTransactor creates a new write-only instance of Abi, bound to a specific deployed contract.
  97. func NewAbiTransactor(address common.Address, transactor bind.ContractTransactor) (*AbiTransactor, error) {
  98. contract, err := bindAbi(address, nil, transactor, nil)
  99. if err != nil {
  100. return nil, err
  101. }
  102. return &AbiTransactor{contract: contract}, nil
  103. }
  104. // NewAbiFilterer creates a new log filterer instance of Abi, bound to a specific deployed contract.
  105. func NewAbiFilterer(address common.Address, filterer bind.ContractFilterer) (*AbiFilterer, error) {
  106. contract, err := bindAbi(address, nil, nil, filterer)
  107. if err != nil {
  108. return nil, err
  109. }
  110. return &AbiFilterer{contract: contract}, nil
  111. }
  112. // bindAbi binds a generic wrapper to an already deployed contract.
  113. func bindAbi(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
  114. parsed, err := abi.JSON(strings.NewReader(AbiABI))
  115. if err != nil {
  116. return nil, err
  117. }
  118. return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
  119. }
  120. // Call invokes the (constant) contract method with params as input values and
  121. // sets the output to result. The result type might be a single field for simple
  122. // returns, a slice of interfaces for anonymous returns and a struct for named
  123. // returns.
  124. func (_Abi *AbiRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  125. return _Abi.Contract.AbiCaller.contract.Call(opts, result, method, params...)
  126. }
  127. // Transfer initiates a plain transaction to move funds to the contract, calling
  128. // its default method if one is available.
  129. func (_Abi *AbiRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  130. return _Abi.Contract.AbiTransactor.contract.Transfer(opts)
  131. }
  132. // Transact invokes the (paid) contract method with params as input values.
  133. func (_Abi *AbiRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  134. return _Abi.Contract.AbiTransactor.contract.Transact(opts, method, params...)
  135. }
  136. // Call invokes the (constant) contract method with params as input values and
  137. // sets the output to result. The result type might be a single field for simple
  138. // returns, a slice of interfaces for anonymous returns and a struct for named
  139. // returns.
  140. func (_Abi *AbiCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  141. return _Abi.Contract.contract.Call(opts, result, method, params...)
  142. }
  143. // Transfer initiates a plain transaction to move funds to the contract, calling
  144. // its default method if one is available.
  145. func (_Abi *AbiTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  146. return _Abi.Contract.contract.Transfer(opts)
  147. }
  148. // Transact invokes the (paid) contract method with params as input values.
  149. func (_Abi *AbiTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  150. return _Abi.Contract.contract.Transact(opts, method, params...)
  151. }
  152. // ConsumedVAAs is a free data retrieval call binding the contract method 0xa31fe409.
  153. //
  154. // Solidity: function consumedVAAs(bytes32 ) view returns(bool)
  155. func (_Abi *AbiCaller) ConsumedVAAs(opts *bind.CallOpts, arg0 [32]byte) (bool, error) {
  156. var out []interface{}
  157. err := _Abi.contract.Call(opts, &out, "consumedVAAs", arg0)
  158. if err != nil {
  159. return *new(bool), err
  160. }
  161. out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
  162. return out0, err
  163. }
  164. // ConsumedVAAs is a free data retrieval call binding the contract method 0xa31fe409.
  165. //
  166. // Solidity: function consumedVAAs(bytes32 ) view returns(bool)
  167. func (_Abi *AbiSession) ConsumedVAAs(arg0 [32]byte) (bool, error) {
  168. return _Abi.Contract.ConsumedVAAs(&_Abi.CallOpts, arg0)
  169. }
  170. // ConsumedVAAs is a free data retrieval call binding the contract method 0xa31fe409.
  171. //
  172. // Solidity: function consumedVAAs(bytes32 ) view returns(bool)
  173. func (_Abi *AbiCallerSession) ConsumedVAAs(arg0 [32]byte) (bool, error) {
  174. return _Abi.Contract.ConsumedVAAs(&_Abi.CallOpts, arg0)
  175. }
  176. // GetGuardianSet is a free data retrieval call binding the contract method 0xf951975a.
  177. //
  178. // Solidity: function getGuardianSet(uint32 idx) view returns((address[],uint32) gs)
  179. func (_Abi *AbiCaller) GetGuardianSet(opts *bind.CallOpts, idx uint32) (WormholeGuardianSet, error) {
  180. var out []interface{}
  181. err := _Abi.contract.Call(opts, &out, "getGuardianSet", idx)
  182. if err != nil {
  183. return *new(WormholeGuardianSet), err
  184. }
  185. out0 := *abi.ConvertType(out[0], new(WormholeGuardianSet)).(*WormholeGuardianSet)
  186. return out0, err
  187. }
  188. // GetGuardianSet is a free data retrieval call binding the contract method 0xf951975a.
  189. //
  190. // Solidity: function getGuardianSet(uint32 idx) view returns((address[],uint32) gs)
  191. func (_Abi *AbiSession) GetGuardianSet(idx uint32) (WormholeGuardianSet, error) {
  192. return _Abi.Contract.GetGuardianSet(&_Abi.CallOpts, idx)
  193. }
  194. // GetGuardianSet is a free data retrieval call binding the contract method 0xf951975a.
  195. //
  196. // Solidity: function getGuardianSet(uint32 idx) view returns((address[],uint32) gs)
  197. func (_Abi *AbiCallerSession) GetGuardianSet(idx uint32) (WormholeGuardianSet, error) {
  198. return _Abi.Contract.GetGuardianSet(&_Abi.CallOpts, idx)
  199. }
  200. // GuardianSetExpirity is a free data retrieval call binding the contract method 0x4db47840.
  201. //
  202. // Solidity: function guardian_set_expirity() view returns(uint32)
  203. func (_Abi *AbiCaller) GuardianSetExpirity(opts *bind.CallOpts) (uint32, error) {
  204. var out []interface{}
  205. err := _Abi.contract.Call(opts, &out, "guardian_set_expirity")
  206. if err != nil {
  207. return *new(uint32), err
  208. }
  209. out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32)
  210. return out0, err
  211. }
  212. // GuardianSetExpirity is a free data retrieval call binding the contract method 0x4db47840.
  213. //
  214. // Solidity: function guardian_set_expirity() view returns(uint32)
  215. func (_Abi *AbiSession) GuardianSetExpirity() (uint32, error) {
  216. return _Abi.Contract.GuardianSetExpirity(&_Abi.CallOpts)
  217. }
  218. // GuardianSetExpirity is a free data retrieval call binding the contract method 0x4db47840.
  219. //
  220. // Solidity: function guardian_set_expirity() view returns(uint32)
  221. func (_Abi *AbiCallerSession) GuardianSetExpirity() (uint32, error) {
  222. return _Abi.Contract.GuardianSetExpirity(&_Abi.CallOpts)
  223. }
  224. // GuardianSetIndex is a free data retrieval call binding the contract method 0x822d82b3.
  225. //
  226. // Solidity: function guardian_set_index() view returns(uint32)
  227. func (_Abi *AbiCaller) GuardianSetIndex(opts *bind.CallOpts) (uint32, error) {
  228. var out []interface{}
  229. err := _Abi.contract.Call(opts, &out, "guardian_set_index")
  230. if err != nil {
  231. return *new(uint32), err
  232. }
  233. out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32)
  234. return out0, err
  235. }
  236. // GuardianSetIndex is a free data retrieval call binding the contract method 0x822d82b3.
  237. //
  238. // Solidity: function guardian_set_index() view returns(uint32)
  239. func (_Abi *AbiSession) GuardianSetIndex() (uint32, error) {
  240. return _Abi.Contract.GuardianSetIndex(&_Abi.CallOpts)
  241. }
  242. // GuardianSetIndex is a free data retrieval call binding the contract method 0x822d82b3.
  243. //
  244. // Solidity: function guardian_set_index() view returns(uint32)
  245. func (_Abi *AbiCallerSession) GuardianSetIndex() (uint32, error) {
  246. return _Abi.Contract.GuardianSetIndex(&_Abi.CallOpts)
  247. }
  248. // GuardianSets is a free data retrieval call binding the contract method 0x42b0aefa.
  249. //
  250. // Solidity: function guardian_sets(uint32 ) view returns(uint32 expiration_time)
  251. func (_Abi *AbiCaller) GuardianSets(opts *bind.CallOpts, arg0 uint32) (uint32, error) {
  252. var out []interface{}
  253. err := _Abi.contract.Call(opts, &out, "guardian_sets", arg0)
  254. if err != nil {
  255. return *new(uint32), err
  256. }
  257. out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32)
  258. return out0, err
  259. }
  260. // GuardianSets is a free data retrieval call binding the contract method 0x42b0aefa.
  261. //
  262. // Solidity: function guardian_sets(uint32 ) view returns(uint32 expiration_time)
  263. func (_Abi *AbiSession) GuardianSets(arg0 uint32) (uint32, error) {
  264. return _Abi.Contract.GuardianSets(&_Abi.CallOpts, arg0)
  265. }
  266. // GuardianSets is a free data retrieval call binding the contract method 0x42b0aefa.
  267. //
  268. // Solidity: function guardian_sets(uint32 ) view returns(uint32 expiration_time)
  269. func (_Abi *AbiCallerSession) GuardianSets(arg0 uint32) (uint32, error) {
  270. return _Abi.Contract.GuardianSets(&_Abi.CallOpts, arg0)
  271. }
  272. // IsWrappedAsset is a free data retrieval call binding the contract method 0x1a2be4da.
  273. //
  274. // Solidity: function isWrappedAsset(address ) view returns(bool)
  275. func (_Abi *AbiCaller) IsWrappedAsset(opts *bind.CallOpts, arg0 common.Address) (bool, error) {
  276. var out []interface{}
  277. err := _Abi.contract.Call(opts, &out, "isWrappedAsset", arg0)
  278. if err != nil {
  279. return *new(bool), err
  280. }
  281. out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
  282. return out0, err
  283. }
  284. // IsWrappedAsset is a free data retrieval call binding the contract method 0x1a2be4da.
  285. //
  286. // Solidity: function isWrappedAsset(address ) view returns(bool)
  287. func (_Abi *AbiSession) IsWrappedAsset(arg0 common.Address) (bool, error) {
  288. return _Abi.Contract.IsWrappedAsset(&_Abi.CallOpts, arg0)
  289. }
  290. // IsWrappedAsset is a free data retrieval call binding the contract method 0x1a2be4da.
  291. //
  292. // Solidity: function isWrappedAsset(address ) view returns(bool)
  293. func (_Abi *AbiCallerSession) IsWrappedAsset(arg0 common.Address) (bool, error) {
  294. return _Abi.Contract.IsWrappedAsset(&_Abi.CallOpts, arg0)
  295. }
  296. // WrappedAssetMaster is a free data retrieval call binding the contract method 0x99da1d3c.
  297. //
  298. // Solidity: function wrappedAssetMaster() view returns(address)
  299. func (_Abi *AbiCaller) WrappedAssetMaster(opts *bind.CallOpts) (common.Address, error) {
  300. var out []interface{}
  301. err := _Abi.contract.Call(opts, &out, "wrappedAssetMaster")
  302. if err != nil {
  303. return *new(common.Address), err
  304. }
  305. out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
  306. return out0, err
  307. }
  308. // WrappedAssetMaster is a free data retrieval call binding the contract method 0x99da1d3c.
  309. //
  310. // Solidity: function wrappedAssetMaster() view returns(address)
  311. func (_Abi *AbiSession) WrappedAssetMaster() (common.Address, error) {
  312. return _Abi.Contract.WrappedAssetMaster(&_Abi.CallOpts)
  313. }
  314. // WrappedAssetMaster is a free data retrieval call binding the contract method 0x99da1d3c.
  315. //
  316. // Solidity: function wrappedAssetMaster() view returns(address)
  317. func (_Abi *AbiCallerSession) WrappedAssetMaster() (common.Address, error) {
  318. return _Abi.Contract.WrappedAssetMaster(&_Abi.CallOpts)
  319. }
  320. // WrappedAssets is a free data retrieval call binding the contract method 0xb6694c2a.
  321. //
  322. // Solidity: function wrappedAssets(bytes32 ) view returns(address)
  323. func (_Abi *AbiCaller) WrappedAssets(opts *bind.CallOpts, arg0 [32]byte) (common.Address, error) {
  324. var out []interface{}
  325. err := _Abi.contract.Call(opts, &out, "wrappedAssets", arg0)
  326. if err != nil {
  327. return *new(common.Address), err
  328. }
  329. out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
  330. return out0, err
  331. }
  332. // WrappedAssets is a free data retrieval call binding the contract method 0xb6694c2a.
  333. //
  334. // Solidity: function wrappedAssets(bytes32 ) view returns(address)
  335. func (_Abi *AbiSession) WrappedAssets(arg0 [32]byte) (common.Address, error) {
  336. return _Abi.Contract.WrappedAssets(&_Abi.CallOpts, arg0)
  337. }
  338. // WrappedAssets is a free data retrieval call binding the contract method 0xb6694c2a.
  339. //
  340. // Solidity: function wrappedAssets(bytes32 ) view returns(address)
  341. func (_Abi *AbiCallerSession) WrappedAssets(arg0 [32]byte) (common.Address, error) {
  342. return _Abi.Contract.WrappedAssets(&_Abi.CallOpts, arg0)
  343. }
  344. // LockAssets is a paid mutator transaction binding the contract method 0x70713960.
  345. //
  346. // Solidity: function lockAssets(address asset, uint256 amount, bytes32 recipient, uint8 target_chain, uint32 nonce, bool refund_dust) returns()
  347. func (_Abi *AbiTransactor) LockAssets(opts *bind.TransactOpts, asset common.Address, amount *big.Int, recipient [32]byte, target_chain uint8, nonce uint32, refund_dust bool) (*types.Transaction, error) {
  348. return _Abi.contract.Transact(opts, "lockAssets", asset, amount, recipient, target_chain, nonce, refund_dust)
  349. }
  350. // LockAssets is a paid mutator transaction binding the contract method 0x70713960.
  351. //
  352. // Solidity: function lockAssets(address asset, uint256 amount, bytes32 recipient, uint8 target_chain, uint32 nonce, bool refund_dust) returns()
  353. func (_Abi *AbiSession) LockAssets(asset common.Address, amount *big.Int, recipient [32]byte, target_chain uint8, nonce uint32, refund_dust bool) (*types.Transaction, error) {
  354. return _Abi.Contract.LockAssets(&_Abi.TransactOpts, asset, amount, recipient, target_chain, nonce, refund_dust)
  355. }
  356. // LockAssets is a paid mutator transaction binding the contract method 0x70713960.
  357. //
  358. // Solidity: function lockAssets(address asset, uint256 amount, bytes32 recipient, uint8 target_chain, uint32 nonce, bool refund_dust) returns()
  359. func (_Abi *AbiTransactorSession) LockAssets(asset common.Address, amount *big.Int, recipient [32]byte, target_chain uint8, nonce uint32, refund_dust bool) (*types.Transaction, error) {
  360. return _Abi.Contract.LockAssets(&_Abi.TransactOpts, asset, amount, recipient, target_chain, nonce, refund_dust)
  361. }
  362. // LockETH is a paid mutator transaction binding the contract method 0x58d62e46.
  363. //
  364. // Solidity: function lockETH(bytes32 recipient, uint8 target_chain, uint32 nonce) payable returns()
  365. func (_Abi *AbiTransactor) LockETH(opts *bind.TransactOpts, recipient [32]byte, target_chain uint8, nonce uint32) (*types.Transaction, error) {
  366. return _Abi.contract.Transact(opts, "lockETH", recipient, target_chain, nonce)
  367. }
  368. // LockETH is a paid mutator transaction binding the contract method 0x58d62e46.
  369. //
  370. // Solidity: function lockETH(bytes32 recipient, uint8 target_chain, uint32 nonce) payable returns()
  371. func (_Abi *AbiSession) LockETH(recipient [32]byte, target_chain uint8, nonce uint32) (*types.Transaction, error) {
  372. return _Abi.Contract.LockETH(&_Abi.TransactOpts, recipient, target_chain, nonce)
  373. }
  374. // LockETH is a paid mutator transaction binding the contract method 0x58d62e46.
  375. //
  376. // Solidity: function lockETH(bytes32 recipient, uint8 target_chain, uint32 nonce) payable returns()
  377. func (_Abi *AbiTransactorSession) LockETH(recipient [32]byte, target_chain uint8, nonce uint32) (*types.Transaction, error) {
  378. return _Abi.Contract.LockETH(&_Abi.TransactOpts, recipient, target_chain, nonce)
  379. }
  380. // SubmitVAA is a paid mutator transaction binding the contract method 0x3bc0aee6.
  381. //
  382. // Solidity: function submitVAA(bytes vaa) returns()
  383. func (_Abi *AbiTransactor) SubmitVAA(opts *bind.TransactOpts, vaa []byte) (*types.Transaction, error) {
  384. return _Abi.contract.Transact(opts, "submitVAA", vaa)
  385. }
  386. // SubmitVAA is a paid mutator transaction binding the contract method 0x3bc0aee6.
  387. //
  388. // Solidity: function submitVAA(bytes vaa) returns()
  389. func (_Abi *AbiSession) SubmitVAA(vaa []byte) (*types.Transaction, error) {
  390. return _Abi.Contract.SubmitVAA(&_Abi.TransactOpts, vaa)
  391. }
  392. // SubmitVAA is a paid mutator transaction binding the contract method 0x3bc0aee6.
  393. //
  394. // Solidity: function submitVAA(bytes vaa) returns()
  395. func (_Abi *AbiTransactorSession) SubmitVAA(vaa []byte) (*types.Transaction, error) {
  396. return _Abi.Contract.SubmitVAA(&_Abi.TransactOpts, vaa)
  397. }
  398. // Fallback is a paid mutator transaction binding the contract fallback function.
  399. //
  400. // Solidity: fallback() payable returns()
  401. func (_Abi *AbiTransactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) {
  402. return _Abi.contract.RawTransact(opts, calldata)
  403. }
  404. // Fallback is a paid mutator transaction binding the contract fallback function.
  405. //
  406. // Solidity: fallback() payable returns()
  407. func (_Abi *AbiSession) Fallback(calldata []byte) (*types.Transaction, error) {
  408. return _Abi.Contract.Fallback(&_Abi.TransactOpts, calldata)
  409. }
  410. // Fallback is a paid mutator transaction binding the contract fallback function.
  411. //
  412. // Solidity: fallback() payable returns()
  413. func (_Abi *AbiTransactorSession) Fallback(calldata []byte) (*types.Transaction, error) {
  414. return _Abi.Contract.Fallback(&_Abi.TransactOpts, calldata)
  415. }
  416. // Receive is a paid mutator transaction binding the contract receive function.
  417. //
  418. // Solidity: receive() payable returns()
  419. func (_Abi *AbiTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) {
  420. return _Abi.contract.RawTransact(opts, nil) // calldata is disallowed for receive function
  421. }
  422. // Receive is a paid mutator transaction binding the contract receive function.
  423. //
  424. // Solidity: receive() payable returns()
  425. func (_Abi *AbiSession) Receive() (*types.Transaction, error) {
  426. return _Abi.Contract.Receive(&_Abi.TransactOpts)
  427. }
  428. // Receive is a paid mutator transaction binding the contract receive function.
  429. //
  430. // Solidity: receive() payable returns()
  431. func (_Abi *AbiTransactorSession) Receive() (*types.Transaction, error) {
  432. return _Abi.Contract.Receive(&_Abi.TransactOpts)
  433. }
  434. // AbiLogGuardianSetChangedIterator is returned from FilterLogGuardianSetChanged and is used to iterate over the raw logs and unpacked data for LogGuardianSetChanged events raised by the Abi contract.
  435. type AbiLogGuardianSetChangedIterator struct {
  436. Event *AbiLogGuardianSetChanged // Event containing the contract specifics and raw log
  437. contract *bind.BoundContract // Generic contract to use for unpacking event data
  438. event string // Event name to use for unpacking event data
  439. logs chan types.Log // Log channel receiving the found contract events
  440. sub ethereum.Subscription // Subscription for errors, completion and termination
  441. done bool // Whether the subscription completed delivering logs
  442. fail error // Occurred error to stop iteration
  443. }
  444. // Next advances the iterator to the subsequent event, returning whether there
  445. // are any more events found. In case of a retrieval or parsing error, false is
  446. // returned and Error() can be queried for the exact failure.
  447. func (it *AbiLogGuardianSetChangedIterator) Next() bool {
  448. // If the iterator failed, stop iterating
  449. if it.fail != nil {
  450. return false
  451. }
  452. // If the iterator completed, deliver directly whatever's available
  453. if it.done {
  454. select {
  455. case log := <-it.logs:
  456. it.Event = new(AbiLogGuardianSetChanged)
  457. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  458. it.fail = err
  459. return false
  460. }
  461. it.Event.Raw = log
  462. return true
  463. default:
  464. return false
  465. }
  466. }
  467. // Iterator still in progress, wait for either a data or an error event
  468. select {
  469. case log := <-it.logs:
  470. it.Event = new(AbiLogGuardianSetChanged)
  471. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  472. it.fail = err
  473. return false
  474. }
  475. it.Event.Raw = log
  476. return true
  477. case err := <-it.sub.Err():
  478. it.done = true
  479. it.fail = err
  480. return it.Next()
  481. }
  482. }
  483. // Error returns any retrieval or parsing error occurred during filtering.
  484. func (it *AbiLogGuardianSetChangedIterator) Error() error {
  485. return it.fail
  486. }
  487. // Close terminates the iteration process, releasing any pending underlying
  488. // resources.
  489. func (it *AbiLogGuardianSetChangedIterator) Close() error {
  490. it.sub.Unsubscribe()
  491. return nil
  492. }
  493. // AbiLogGuardianSetChanged represents a LogGuardianSetChanged event raised by the Abi contract.
  494. type AbiLogGuardianSetChanged struct {
  495. OldGuardianIndex uint32
  496. NewGuardianIndex uint32
  497. Raw types.Log // Blockchain specific contextual infos
  498. }
  499. // FilterLogGuardianSetChanged is a free log retrieval operation binding the contract event 0xdfb80683934199683861bf00b64ecdf0984bbaf661bf27983dba382e99297a62.
  500. //
  501. // Solidity: event LogGuardianSetChanged(uint32 oldGuardianIndex, uint32 newGuardianIndex)
  502. func (_Abi *AbiFilterer) FilterLogGuardianSetChanged(opts *bind.FilterOpts) (*AbiLogGuardianSetChangedIterator, error) {
  503. logs, sub, err := _Abi.contract.FilterLogs(opts, "LogGuardianSetChanged")
  504. if err != nil {
  505. return nil, err
  506. }
  507. return &AbiLogGuardianSetChangedIterator{contract: _Abi.contract, event: "LogGuardianSetChanged", logs: logs, sub: sub}, nil
  508. }
  509. // WatchLogGuardianSetChanged is a free log subscription operation binding the contract event 0xdfb80683934199683861bf00b64ecdf0984bbaf661bf27983dba382e99297a62.
  510. //
  511. // Solidity: event LogGuardianSetChanged(uint32 oldGuardianIndex, uint32 newGuardianIndex)
  512. func (_Abi *AbiFilterer) WatchLogGuardianSetChanged(opts *bind.WatchOpts, sink chan<- *AbiLogGuardianSetChanged) (event.Subscription, error) {
  513. logs, sub, err := _Abi.contract.WatchLogs(opts, "LogGuardianSetChanged")
  514. if err != nil {
  515. return nil, err
  516. }
  517. return event.NewSubscription(func(quit <-chan struct{}) error {
  518. defer sub.Unsubscribe()
  519. for {
  520. select {
  521. case log := <-logs:
  522. // New log arrived, parse the event and forward to the user
  523. event := new(AbiLogGuardianSetChanged)
  524. if err := _Abi.contract.UnpackLog(event, "LogGuardianSetChanged", log); err != nil {
  525. return err
  526. }
  527. event.Raw = log
  528. select {
  529. case sink <- event:
  530. case err := <-sub.Err():
  531. return err
  532. case <-quit:
  533. return nil
  534. }
  535. case err := <-sub.Err():
  536. return err
  537. case <-quit:
  538. return nil
  539. }
  540. }
  541. }), nil
  542. }
  543. // ParseLogGuardianSetChanged is a log parse operation binding the contract event 0xdfb80683934199683861bf00b64ecdf0984bbaf661bf27983dba382e99297a62.
  544. //
  545. // Solidity: event LogGuardianSetChanged(uint32 oldGuardianIndex, uint32 newGuardianIndex)
  546. func (_Abi *AbiFilterer) ParseLogGuardianSetChanged(log types.Log) (*AbiLogGuardianSetChanged, error) {
  547. event := new(AbiLogGuardianSetChanged)
  548. if err := _Abi.contract.UnpackLog(event, "LogGuardianSetChanged", log); err != nil {
  549. return nil, err
  550. }
  551. return event, nil
  552. }
  553. // AbiLogTokensLockedIterator is returned from FilterLogTokensLocked and is used to iterate over the raw logs and unpacked data for LogTokensLocked events raised by the Abi contract.
  554. type AbiLogTokensLockedIterator struct {
  555. Event *AbiLogTokensLocked // Event containing the contract specifics and raw log
  556. contract *bind.BoundContract // Generic contract to use for unpacking event data
  557. event string // Event name to use for unpacking event data
  558. logs chan types.Log // Log channel receiving the found contract events
  559. sub ethereum.Subscription // Subscription for errors, completion and termination
  560. done bool // Whether the subscription completed delivering logs
  561. fail error // Occurred error to stop iteration
  562. }
  563. // Next advances the iterator to the subsequent event, returning whether there
  564. // are any more events found. In case of a retrieval or parsing error, false is
  565. // returned and Error() can be queried for the exact failure.
  566. func (it *AbiLogTokensLockedIterator) Next() bool {
  567. // If the iterator failed, stop iterating
  568. if it.fail != nil {
  569. return false
  570. }
  571. // If the iterator completed, deliver directly whatever's available
  572. if it.done {
  573. select {
  574. case log := <-it.logs:
  575. it.Event = new(AbiLogTokensLocked)
  576. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  577. it.fail = err
  578. return false
  579. }
  580. it.Event.Raw = log
  581. return true
  582. default:
  583. return false
  584. }
  585. }
  586. // Iterator still in progress, wait for either a data or an error event
  587. select {
  588. case log := <-it.logs:
  589. it.Event = new(AbiLogTokensLocked)
  590. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  591. it.fail = err
  592. return false
  593. }
  594. it.Event.Raw = log
  595. return true
  596. case err := <-it.sub.Err():
  597. it.done = true
  598. it.fail = err
  599. return it.Next()
  600. }
  601. }
  602. // Error returns any retrieval or parsing error occurred during filtering.
  603. func (it *AbiLogTokensLockedIterator) Error() error {
  604. return it.fail
  605. }
  606. // Close terminates the iteration process, releasing any pending underlying
  607. // resources.
  608. func (it *AbiLogTokensLockedIterator) Close() error {
  609. it.sub.Unsubscribe()
  610. return nil
  611. }
  612. // AbiLogTokensLocked represents a LogTokensLocked event raised by the Abi contract.
  613. type AbiLogTokensLocked struct {
  614. TargetChain uint8
  615. TokenChain uint8
  616. TokenDecimals uint8
  617. Token [32]byte
  618. Sender [32]byte
  619. Recipient [32]byte
  620. Amount *big.Int
  621. Nonce uint32
  622. Raw types.Log // Blockchain specific contextual infos
  623. }
  624. // FilterLogTokensLocked is a free log retrieval operation binding the contract event 0x6bbd554ad75919f71fd91bf917ca6e4f41c10f03ab25751596a22253bb39aab8.
  625. //
  626. // Solidity: event LogTokensLocked(uint8 target_chain, uint8 token_chain, uint8 token_decimals, bytes32 indexed token, bytes32 indexed sender, bytes32 recipient, uint256 amount, uint32 nonce)
  627. func (_Abi *AbiFilterer) FilterLogTokensLocked(opts *bind.FilterOpts, token [][32]byte, sender [][32]byte) (*AbiLogTokensLockedIterator, error) {
  628. var tokenRule []interface{}
  629. for _, tokenItem := range token {
  630. tokenRule = append(tokenRule, tokenItem)
  631. }
  632. var senderRule []interface{}
  633. for _, senderItem := range sender {
  634. senderRule = append(senderRule, senderItem)
  635. }
  636. logs, sub, err := _Abi.contract.FilterLogs(opts, "LogTokensLocked", tokenRule, senderRule)
  637. if err != nil {
  638. return nil, err
  639. }
  640. return &AbiLogTokensLockedIterator{contract: _Abi.contract, event: "LogTokensLocked", logs: logs, sub: sub}, nil
  641. }
  642. // WatchLogTokensLocked is a free log subscription operation binding the contract event 0x6bbd554ad75919f71fd91bf917ca6e4f41c10f03ab25751596a22253bb39aab8.
  643. //
  644. // Solidity: event LogTokensLocked(uint8 target_chain, uint8 token_chain, uint8 token_decimals, bytes32 indexed token, bytes32 indexed sender, bytes32 recipient, uint256 amount, uint32 nonce)
  645. func (_Abi *AbiFilterer) WatchLogTokensLocked(opts *bind.WatchOpts, sink chan<- *AbiLogTokensLocked, token [][32]byte, sender [][32]byte) (event.Subscription, error) {
  646. var tokenRule []interface{}
  647. for _, tokenItem := range token {
  648. tokenRule = append(tokenRule, tokenItem)
  649. }
  650. var senderRule []interface{}
  651. for _, senderItem := range sender {
  652. senderRule = append(senderRule, senderItem)
  653. }
  654. logs, sub, err := _Abi.contract.WatchLogs(opts, "LogTokensLocked", tokenRule, senderRule)
  655. if err != nil {
  656. return nil, err
  657. }
  658. return event.NewSubscription(func(quit <-chan struct{}) error {
  659. defer sub.Unsubscribe()
  660. for {
  661. select {
  662. case log := <-logs:
  663. // New log arrived, parse the event and forward to the user
  664. event := new(AbiLogTokensLocked)
  665. if err := _Abi.contract.UnpackLog(event, "LogTokensLocked", log); err != nil {
  666. return err
  667. }
  668. event.Raw = log
  669. select {
  670. case sink <- event:
  671. case err := <-sub.Err():
  672. return err
  673. case <-quit:
  674. return nil
  675. }
  676. case err := <-sub.Err():
  677. return err
  678. case <-quit:
  679. return nil
  680. }
  681. }
  682. }), nil
  683. }
  684. // ParseLogTokensLocked is a log parse operation binding the contract event 0x6bbd554ad75919f71fd91bf917ca6e4f41c10f03ab25751596a22253bb39aab8.
  685. //
  686. // Solidity: event LogTokensLocked(uint8 target_chain, uint8 token_chain, uint8 token_decimals, bytes32 indexed token, bytes32 indexed sender, bytes32 recipient, uint256 amount, uint32 nonce)
  687. func (_Abi *AbiFilterer) ParseLogTokensLocked(log types.Log) (*AbiLogTokensLocked, error) {
  688. event := new(AbiLogTokensLocked)
  689. if err := _Abi.contract.UnpackLog(event, "LogTokensLocked", log); err != nil {
  690. return nil, err
  691. }
  692. return event, nil
  693. }