2020-08-06 06:43:09 -07:00
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package abi
import (
"math/big"
"strings"
ethereum "github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/event"
)
// Reference imports to suppress errors if they are not otherwise used.
var (
_ = big . NewInt
_ = strings . NewReader
_ = ethereum . NotFound
_ = bind . Bind
_ = common . Big1
_ = types . BloomLookup
_ = event . NewSubscription
)
// WormholeGuardianSet is an auto generated low-level Go binding around an user-defined struct.
type WormholeGuardianSet struct {
2020-08-17 14:01:59 -07:00
Keys [ ] common . Address
2020-08-06 06:43:09 -07:00
ExpirationTime uint32
}
2020-08-17 14:01:59 -07:00
// AbiABI is the input ABI used to generate the binding from.
2020-08-18 07:19:28 -07:00
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\":\"_vaa_expiry\",\"type\":\"uint32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address[]\",\"name\":\"keys\",\"type\":\"address[]\"},{\"internalType\":\"uint32\",\"name\":\"expiration_time\",\"type\":\"uint32\"}],\"indexed\":true,\"internalType\":\"structWormhole.GuardianSet\",\"name\":\"oldGuardian\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"keys\",\"type\":\"address[]\"},{\"internalType\":\"uint32\",\"name\":\"expiration_time\",\"type\":\"uint32\"}],\"indexed\":true,\"internalType\":\"structWormhole.GuardianSet\",\"name\":\"newGuardian\",\"type\":\"tuple\"}],\"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\":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\"}],\"name\":\"LogTokensLocked\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"guardian_set_index\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"guardian_sets\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"expiration_time\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isWrappedAsset\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vaa_expiry\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wrappedAssetMaster\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"wrappedAssets\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"},{\"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\"},{\"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\"}],\"name\":\" lockAssets \
2020-08-06 06:43:09 -07:00
2020-08-17 14:01:59 -07:00
// Abi is an auto generated Go binding around an Ethereum contract.
type Abi struct {
AbiCaller // Read-only binding to the contract
AbiTransactor // Write-only binding to the contract
AbiFilterer // Log filterer for contract events
2020-08-06 06:43:09 -07:00
}
2020-08-17 14:01:59 -07:00
// AbiCaller is an auto generated read-only Go binding around an Ethereum contract.
type AbiCaller struct {
2020-08-06 06:43:09 -07:00
contract * bind . BoundContract // Generic contract wrapper for the low level calls
}
2020-08-17 14:01:59 -07:00
// AbiTransactor is an auto generated write-only Go binding around an Ethereum contract.
type AbiTransactor struct {
2020-08-06 06:43:09 -07:00
contract * bind . BoundContract // Generic contract wrapper for the low level calls
}
2020-08-17 14:01:59 -07:00
// AbiFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type AbiFilterer struct {
2020-08-06 06:43:09 -07:00
contract * bind . BoundContract // Generic contract wrapper for the low level calls
}
2020-08-17 14:01:59 -07:00
// AbiSession is an auto generated Go binding around an Ethereum contract,
2020-08-06 06:43:09 -07:00
// with pre-set call and transact options.
2020-08-17 14:01:59 -07:00
type AbiSession struct {
Contract * Abi // Generic contract binding to set the session for
2020-08-06 06:43:09 -07:00
CallOpts bind . CallOpts // Call options to use throughout this session
TransactOpts bind . TransactOpts // Transaction auth options to use throughout this session
}
2020-08-17 14:01:59 -07:00
// AbiCallerSession is an auto generated read-only Go binding around an Ethereum contract,
2020-08-06 06:43:09 -07:00
// with pre-set call options.
2020-08-17 14:01:59 -07:00
type AbiCallerSession struct {
Contract * AbiCaller // Generic contract caller binding to set the session for
CallOpts bind . CallOpts // Call options to use throughout this session
2020-08-06 06:43:09 -07:00
}
2020-08-17 14:01:59 -07:00
// AbiTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
2020-08-06 06:43:09 -07:00
// with pre-set transact options.
2020-08-17 14:01:59 -07:00
type AbiTransactorSession struct {
Contract * AbiTransactor // Generic contract transactor binding to set the session for
TransactOpts bind . TransactOpts // Transaction auth options to use throughout this session
2020-08-06 06:43:09 -07:00
}
2020-08-17 14:01:59 -07:00
// AbiRaw is an auto generated low-level Go binding around an Ethereum contract.
type AbiRaw struct {
Contract * Abi // Generic contract binding to access the raw methods on
2020-08-06 06:43:09 -07:00
}
2020-08-17 14:01:59 -07:00
// AbiCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type AbiCallerRaw struct {
Contract * AbiCaller // Generic read-only contract binding to access the raw methods on
2020-08-06 06:43:09 -07:00
}
2020-08-17 14:01:59 -07:00
// AbiTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type AbiTransactorRaw struct {
Contract * AbiTransactor // Generic write-only contract binding to access the raw methods on
2020-08-06 06:43:09 -07:00
}
2020-08-17 14:01:59 -07:00
// NewAbi creates a new instance of Abi, bound to a specific deployed contract.
func NewAbi ( address common . Address , backend bind . ContractBackend ) ( * Abi , error ) {
contract , err := bindAbi ( address , backend , backend , backend )
2020-08-06 06:43:09 -07:00
if err != nil {
return nil , err
}
2020-08-17 14:01:59 -07:00
return & Abi { AbiCaller : AbiCaller { contract : contract } , AbiTransactor : AbiTransactor { contract : contract } , AbiFilterer : AbiFilterer { contract : contract } } , nil
2020-08-06 06:43:09 -07:00
}
2020-08-17 14:01:59 -07:00
// NewAbiCaller creates a new read-only instance of Abi, bound to a specific deployed contract.
func NewAbiCaller ( address common . Address , caller bind . ContractCaller ) ( * AbiCaller , error ) {
contract , err := bindAbi ( address , caller , nil , nil )
2020-08-06 06:43:09 -07:00
if err != nil {
return nil , err
}
2020-08-17 14:01:59 -07:00
return & AbiCaller { contract : contract } , nil
2020-08-06 06:43:09 -07:00
}
2020-08-17 14:01:59 -07:00
// NewAbiTransactor creates a new write-only instance of Abi, bound to a specific deployed contract.
func NewAbiTransactor ( address common . Address , transactor bind . ContractTransactor ) ( * AbiTransactor , error ) {
contract , err := bindAbi ( address , nil , transactor , nil )
2020-08-06 06:43:09 -07:00
if err != nil {
return nil , err
}
2020-08-17 14:01:59 -07:00
return & AbiTransactor { contract : contract } , nil
2020-08-06 06:43:09 -07:00
}
2020-08-17 14:01:59 -07:00
// NewAbiFilterer creates a new log filterer instance of Abi, bound to a specific deployed contract.
func NewAbiFilterer ( address common . Address , filterer bind . ContractFilterer ) ( * AbiFilterer , error ) {
contract , err := bindAbi ( address , nil , nil , filterer )
2020-08-06 06:43:09 -07:00
if err != nil {
return nil , err
}
2020-08-17 14:01:59 -07:00
return & AbiFilterer { contract : contract } , nil
2020-08-06 06:43:09 -07:00
}
2020-08-17 14:01:59 -07:00
// bindAbi binds a generic wrapper to an already deployed contract.
func bindAbi ( address common . Address , caller bind . ContractCaller , transactor bind . ContractTransactor , filterer bind . ContractFilterer ) ( * bind . BoundContract , error ) {
parsed , err := abi . JSON ( strings . NewReader ( AbiABI ) )
2020-08-06 06:43:09 -07:00
if err != nil {
return nil , err
}
return bind . NewBoundContract ( address , parsed , caller , transactor , filterer ) , nil
}
// 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.
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiRaw ) Call ( opts * bind . CallOpts , result interface { } , method string , params ... interface { } ) error {
return _Abi . Contract . AbiCaller . contract . Call ( opts , result , method , params ... )
2020-08-06 06:43:09 -07:00
}
// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiRaw ) Transfer ( opts * bind . TransactOpts ) ( * types . Transaction , error ) {
return _Abi . Contract . AbiTransactor . contract . Transfer ( opts )
2020-08-06 06:43:09 -07:00
}
// Transact invokes the (paid) contract method with params as input values.
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiRaw ) Transact ( opts * bind . TransactOpts , method string , params ... interface { } ) ( * types . Transaction , error ) {
return _Abi . Contract . AbiTransactor . contract . Transact ( opts , method , params ... )
2020-08-06 06:43:09 -07:00
}
// 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.
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiCallerRaw ) Call ( opts * bind . CallOpts , result interface { } , method string , params ... interface { } ) error {
return _Abi . Contract . contract . Call ( opts , result , method , params ... )
2020-08-06 06:43:09 -07:00
}
// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiTransactorRaw ) Transfer ( opts * bind . TransactOpts ) ( * types . Transaction , error ) {
return _Abi . Contract . contract . Transfer ( opts )
2020-08-06 06:43:09 -07:00
}
// Transact invokes the (paid) contract method with params as input values.
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiTransactorRaw ) Transact ( opts * bind . TransactOpts , method string , params ... interface { } ) ( * types . Transaction , error ) {
return _Abi . Contract . contract . Transact ( opts , method , params ... )
2020-08-06 06:43:09 -07:00
}
2020-08-18 07:19:28 -07:00
// GetGuardianSet is a free data retrieval call binding the contract method 0xf951975a.
//
// Solidity: function getGuardianSet(uint32 idx) view returns((address[],uint32) gs)
func ( _Abi * AbiCaller ) GetGuardianSet ( opts * bind . CallOpts , idx uint32 ) ( WormholeGuardianSet , error ) {
var (
ret0 = new ( WormholeGuardianSet )
)
out := ret0
err := _Abi . contract . Call ( opts , out , "getGuardianSet" , idx )
return * ret0 , err
}
// GetGuardianSet is a free data retrieval call binding the contract method 0xf951975a.
//
// Solidity: function getGuardianSet(uint32 idx) view returns((address[],uint32) gs)
func ( _Abi * AbiSession ) GetGuardianSet ( idx uint32 ) ( WormholeGuardianSet , error ) {
return _Abi . Contract . GetGuardianSet ( & _Abi . CallOpts , idx )
}
// GetGuardianSet is a free data retrieval call binding the contract method 0xf951975a.
//
// Solidity: function getGuardianSet(uint32 idx) view returns((address[],uint32) gs)
func ( _Abi * AbiCallerSession ) GetGuardianSet ( idx uint32 ) ( WormholeGuardianSet , error ) {
return _Abi . Contract . GetGuardianSet ( & _Abi . CallOpts , idx )
}
2020-08-06 06:43:09 -07:00
// GuardianSetIndex is a free data retrieval call binding the contract method 0x822d82b3.
//
// Solidity: function guardian_set_index() view returns(uint32)
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiCaller ) GuardianSetIndex ( opts * bind . CallOpts ) ( uint32 , error ) {
2020-08-06 06:43:09 -07:00
var (
ret0 = new ( uint32 )
)
out := ret0
2020-08-17 14:01:59 -07:00
err := _Abi . contract . Call ( opts , out , "guardian_set_index" )
2020-08-06 06:43:09 -07:00
return * ret0 , err
}
// GuardianSetIndex is a free data retrieval call binding the contract method 0x822d82b3.
//
// Solidity: function guardian_set_index() view returns(uint32)
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiSession ) GuardianSetIndex ( ) ( uint32 , error ) {
return _Abi . Contract . GuardianSetIndex ( & _Abi . CallOpts )
2020-08-06 06:43:09 -07:00
}
// GuardianSetIndex is a free data retrieval call binding the contract method 0x822d82b3.
//
// Solidity: function guardian_set_index() view returns(uint32)
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiCallerSession ) GuardianSetIndex ( ) ( uint32 , error ) {
return _Abi . Contract . GuardianSetIndex ( & _Abi . CallOpts )
}
// GuardianSets is a free data retrieval call binding the contract method 0x42b0aefa.
//
// Solidity: function guardian_sets(uint32 ) view returns(uint32 expiration_time)
func ( _Abi * AbiCaller ) GuardianSets ( opts * bind . CallOpts , arg0 uint32 ) ( uint32 , error ) {
var (
ret0 = new ( uint32 )
)
out := ret0
err := _Abi . contract . Call ( opts , out , "guardian_sets" , arg0 )
return * ret0 , err
}
// GuardianSets is a free data retrieval call binding the contract method 0x42b0aefa.
//
// Solidity: function guardian_sets(uint32 ) view returns(uint32 expiration_time)
func ( _Abi * AbiSession ) GuardianSets ( arg0 uint32 ) ( uint32 , error ) {
return _Abi . Contract . GuardianSets ( & _Abi . CallOpts , arg0 )
}
// GuardianSets is a free data retrieval call binding the contract method 0x42b0aefa.
//
// Solidity: function guardian_sets(uint32 ) view returns(uint32 expiration_time)
func ( _Abi * AbiCallerSession ) GuardianSets ( arg0 uint32 ) ( uint32 , error ) {
return _Abi . Contract . GuardianSets ( & _Abi . CallOpts , arg0 )
}
// IsWrappedAsset is a free data retrieval call binding the contract method 0x1a2be4da.
//
// Solidity: function isWrappedAsset(address ) view returns(bool)
func ( _Abi * AbiCaller ) IsWrappedAsset ( opts * bind . CallOpts , arg0 common . Address ) ( bool , error ) {
var (
ret0 = new ( bool )
)
out := ret0
err := _Abi . contract . Call ( opts , out , "isWrappedAsset" , arg0 )
return * ret0 , err
}
// IsWrappedAsset is a free data retrieval call binding the contract method 0x1a2be4da.
//
// Solidity: function isWrappedAsset(address ) view returns(bool)
func ( _Abi * AbiSession ) IsWrappedAsset ( arg0 common . Address ) ( bool , error ) {
return _Abi . Contract . IsWrappedAsset ( & _Abi . CallOpts , arg0 )
}
// IsWrappedAsset is a free data retrieval call binding the contract method 0x1a2be4da.
//
// Solidity: function isWrappedAsset(address ) view returns(bool)
func ( _Abi * AbiCallerSession ) IsWrappedAsset ( arg0 common . Address ) ( bool , error ) {
return _Abi . Contract . IsWrappedAsset ( & _Abi . CallOpts , arg0 )
2020-08-06 06:43:09 -07:00
}
// VaaExpiry is a free data retrieval call binding the contract method 0x7f04d9e6.
//
// Solidity: function vaa_expiry() view returns(uint32)
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiCaller ) VaaExpiry ( opts * bind . CallOpts ) ( uint32 , error ) {
2020-08-06 06:43:09 -07:00
var (
ret0 = new ( uint32 )
)
out := ret0
2020-08-17 14:01:59 -07:00
err := _Abi . contract . Call ( opts , out , "vaa_expiry" )
2020-08-06 06:43:09 -07:00
return * ret0 , err
}
// VaaExpiry is a free data retrieval call binding the contract method 0x7f04d9e6.
//
// Solidity: function vaa_expiry() view returns(uint32)
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiSession ) VaaExpiry ( ) ( uint32 , error ) {
return _Abi . Contract . VaaExpiry ( & _Abi . CallOpts )
2020-08-06 06:43:09 -07:00
}
// VaaExpiry is a free data retrieval call binding the contract method 0x7f04d9e6.
//
// Solidity: function vaa_expiry() view returns(uint32)
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiCallerSession ) VaaExpiry ( ) ( uint32 , error ) {
return _Abi . Contract . VaaExpiry ( & _Abi . CallOpts )
2020-08-06 06:43:09 -07:00
}
// WrappedAssetMaster is a free data retrieval call binding the contract method 0x99da1d3c.
//
// Solidity: function wrappedAssetMaster() view returns(address)
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiCaller ) WrappedAssetMaster ( opts * bind . CallOpts ) ( common . Address , error ) {
2020-08-06 06:43:09 -07:00
var (
ret0 = new ( common . Address )
)
out := ret0
2020-08-17 14:01:59 -07:00
err := _Abi . contract . Call ( opts , out , "wrappedAssetMaster" )
2020-08-06 06:43:09 -07:00
return * ret0 , err
}
// WrappedAssetMaster is a free data retrieval call binding the contract method 0x99da1d3c.
//
// Solidity: function wrappedAssetMaster() view returns(address)
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiSession ) WrappedAssetMaster ( ) ( common . Address , error ) {
return _Abi . Contract . WrappedAssetMaster ( & _Abi . CallOpts )
2020-08-06 06:43:09 -07:00
}
// WrappedAssetMaster is a free data retrieval call binding the contract method 0x99da1d3c.
//
// Solidity: function wrappedAssetMaster() view returns(address)
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiCallerSession ) WrappedAssetMaster ( ) ( common . Address , error ) {
return _Abi . Contract . WrappedAssetMaster ( & _Abi . CallOpts )
}
// WrappedAssets is a free data retrieval call binding the contract method 0xb6694c2a.
//
// Solidity: function wrappedAssets(bytes32 ) view returns(address)
func ( _Abi * AbiCaller ) WrappedAssets ( opts * bind . CallOpts , arg0 [ 32 ] byte ) ( common . Address , error ) {
var (
ret0 = new ( common . Address )
)
out := ret0
err := _Abi . contract . Call ( opts , out , "wrappedAssets" , arg0 )
return * ret0 , err
}
// WrappedAssets is a free data retrieval call binding the contract method 0xb6694c2a.
//
// Solidity: function wrappedAssets(bytes32 ) view returns(address)
func ( _Abi * AbiSession ) WrappedAssets ( arg0 [ 32 ] byte ) ( common . Address , error ) {
return _Abi . Contract . WrappedAssets ( & _Abi . CallOpts , arg0 )
}
// WrappedAssets is a free data retrieval call binding the contract method 0xb6694c2a.
//
// Solidity: function wrappedAssets(bytes32 ) view returns(address)
func ( _Abi * AbiCallerSession ) WrappedAssets ( arg0 [ 32 ] byte ) ( common . Address , error ) {
return _Abi . Contract . WrappedAssets ( & _Abi . CallOpts , arg0 )
2020-08-06 06:43:09 -07:00
}
// LockAssets is a paid mutator transaction binding the contract method 0xe66fd373.
//
// Solidity: function lockAssets(address asset, uint256 amount, bytes32 recipient, uint8 target_chain) returns()
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiTransactor ) LockAssets ( opts * bind . TransactOpts , asset common . Address , amount * big . Int , recipient [ 32 ] byte , target_chain uint8 ) ( * types . Transaction , error ) {
return _Abi . contract . Transact ( opts , "lockAssets" , asset , amount , recipient , target_chain )
2020-08-06 06:43:09 -07:00
}
// LockAssets is a paid mutator transaction binding the contract method 0xe66fd373.
//
// Solidity: function lockAssets(address asset, uint256 amount, bytes32 recipient, uint8 target_chain) returns()
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiSession ) LockAssets ( asset common . Address , amount * big . Int , recipient [ 32 ] byte , target_chain uint8 ) ( * types . Transaction , error ) {
return _Abi . Contract . LockAssets ( & _Abi . TransactOpts , asset , amount , recipient , target_chain )
2020-08-06 06:43:09 -07:00
}
// LockAssets is a paid mutator transaction binding the contract method 0xe66fd373.
//
// Solidity: function lockAssets(address asset, uint256 amount, bytes32 recipient, uint8 target_chain) returns()
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiTransactorSession ) LockAssets ( asset common . Address , amount * big . Int , recipient [ 32 ] byte , target_chain uint8 ) ( * types . Transaction , error ) {
return _Abi . Contract . LockAssets ( & _Abi . TransactOpts , asset , amount , recipient , target_chain )
2020-08-06 06:43:09 -07:00
}
// LockETH is a paid mutator transaction binding the contract method 0x780e2183.
//
// Solidity: function lockETH(bytes32 recipient, uint8 target_chain) payable returns()
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiTransactor ) LockETH ( opts * bind . TransactOpts , recipient [ 32 ] byte , target_chain uint8 ) ( * types . Transaction , error ) {
return _Abi . contract . Transact ( opts , "lockETH" , recipient , target_chain )
2020-08-06 06:43:09 -07:00
}
// LockETH is a paid mutator transaction binding the contract method 0x780e2183.
//
// Solidity: function lockETH(bytes32 recipient, uint8 target_chain) payable returns()
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiSession ) LockETH ( recipient [ 32 ] byte , target_chain uint8 ) ( * types . Transaction , error ) {
return _Abi . Contract . LockETH ( & _Abi . TransactOpts , recipient , target_chain )
2020-08-06 06:43:09 -07:00
}
// LockETH is a paid mutator transaction binding the contract method 0x780e2183.
//
// Solidity: function lockETH(bytes32 recipient, uint8 target_chain) payable returns()
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiTransactorSession ) LockETH ( recipient [ 32 ] byte , target_chain uint8 ) ( * types . Transaction , error ) {
return _Abi . Contract . LockETH ( & _Abi . TransactOpts , recipient , target_chain )
2020-08-06 06:43:09 -07:00
}
// SubmitVAA is a paid mutator transaction binding the contract method 0x3bc0aee6.
//
// Solidity: function submitVAA(bytes vaa) returns()
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiTransactor ) SubmitVAA ( opts * bind . TransactOpts , vaa [ ] byte ) ( * types . Transaction , error ) {
return _Abi . contract . Transact ( opts , "submitVAA" , vaa )
2020-08-06 06:43:09 -07:00
}
// SubmitVAA is a paid mutator transaction binding the contract method 0x3bc0aee6.
//
// Solidity: function submitVAA(bytes vaa) returns()
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiSession ) SubmitVAA ( vaa [ ] byte ) ( * types . Transaction , error ) {
return _Abi . Contract . SubmitVAA ( & _Abi . TransactOpts , vaa )
2020-08-06 06:43:09 -07:00
}
// SubmitVAA is a paid mutator transaction binding the contract method 0x3bc0aee6.
//
// Solidity: function submitVAA(bytes vaa) returns()
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiTransactorSession ) SubmitVAA ( vaa [ ] byte ) ( * types . Transaction , error ) {
return _Abi . Contract . SubmitVAA ( & _Abi . TransactOpts , vaa )
2020-08-06 06:43:09 -07:00
}
// Fallback is a paid mutator transaction binding the contract fallback function.
//
// Solidity: fallback() payable returns()
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiTransactor ) Fallback ( opts * bind . TransactOpts , calldata [ ] byte ) ( * types . Transaction , error ) {
return _Abi . contract . RawTransact ( opts , calldata )
2020-08-06 06:43:09 -07:00
}
// Fallback is a paid mutator transaction binding the contract fallback function.
//
// Solidity: fallback() payable returns()
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiSession ) Fallback ( calldata [ ] byte ) ( * types . Transaction , error ) {
return _Abi . Contract . Fallback ( & _Abi . TransactOpts , calldata )
2020-08-06 06:43:09 -07:00
}
// Fallback is a paid mutator transaction binding the contract fallback function.
//
// Solidity: fallback() payable returns()
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiTransactorSession ) Fallback ( calldata [ ] byte ) ( * types . Transaction , error ) {
return _Abi . Contract . Fallback ( & _Abi . TransactOpts , calldata )
2020-08-06 06:43:09 -07:00
}
// Receive is a paid mutator transaction binding the contract receive function.
//
// Solidity: receive() payable returns()
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiTransactor ) Receive ( opts * bind . TransactOpts ) ( * types . Transaction , error ) {
return _Abi . contract . RawTransact ( opts , nil ) // calldata is disallowed for receive function
2020-08-06 06:43:09 -07:00
}
// Receive is a paid mutator transaction binding the contract receive function.
//
// Solidity: receive() payable returns()
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiSession ) Receive ( ) ( * types . Transaction , error ) {
return _Abi . Contract . Receive ( & _Abi . TransactOpts )
2020-08-06 06:43:09 -07:00
}
// Receive is a paid mutator transaction binding the contract receive function.
//
// Solidity: receive() payable returns()
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiTransactorSession ) Receive ( ) ( * types . Transaction , error ) {
return _Abi . Contract . Receive ( & _Abi . TransactOpts )
2020-08-06 06:43:09 -07:00
}
2020-08-17 14:01:59 -07:00
// 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.
type AbiLogGuardianSetChangedIterator struct {
Event * AbiLogGuardianSetChanged // Event containing the contract specifics and raw log
2020-08-06 06:43:09 -07:00
contract * bind . BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types . Log // Log channel receiving the found contract events
sub ethereum . Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
2020-08-17 14:01:59 -07:00
func ( it * AbiLogGuardianSetChangedIterator ) Next ( ) bool {
2020-08-06 06:43:09 -07:00
// If the iterator failed, stop iterating
if it . fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it . done {
select {
case log := <- it . logs :
2020-08-17 14:01:59 -07:00
it . Event = new ( AbiLogGuardianSetChanged )
2020-08-06 06:43:09 -07:00
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
default :
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <- it . logs :
2020-08-17 14:01:59 -07:00
it . Event = new ( AbiLogGuardianSetChanged )
2020-08-06 06:43:09 -07:00
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
case err := <- it . sub . Err ( ) :
it . done = true
it . fail = err
return it . Next ( )
}
}
// Error returns any retrieval or parsing error occurred during filtering.
2020-08-17 14:01:59 -07:00
func ( it * AbiLogGuardianSetChangedIterator ) Error ( ) error {
2020-08-06 06:43:09 -07:00
return it . fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
2020-08-17 14:01:59 -07:00
func ( it * AbiLogGuardianSetChangedIterator ) Close ( ) error {
2020-08-06 06:43:09 -07:00
it . sub . Unsubscribe ( )
return nil
}
2020-08-17 14:01:59 -07:00
// AbiLogGuardianSetChanged represents a LogGuardianSetChanged event raised by the Abi contract.
type AbiLogGuardianSetChanged struct {
2020-08-06 06:43:09 -07:00
OldGuardian WormholeGuardianSet
NewGuardian WormholeGuardianSet
Raw types . Log // Blockchain specific contextual infos
}
2020-08-17 14:01:59 -07:00
// FilterLogGuardianSetChanged is a free log retrieval operation binding the contract event 0xffd222fffe5bc3841c76607f52e3101e111286ab95f24f199ba39e0d5df72acb.
2020-08-06 06:43:09 -07:00
//
2020-08-17 14:01:59 -07:00
// Solidity: event LogGuardianSetChanged((address[],uint32) indexed oldGuardian, (address[],uint32) indexed newGuardian)
func ( _Abi * AbiFilterer ) FilterLogGuardianSetChanged ( opts * bind . FilterOpts , oldGuardian [ ] WormholeGuardianSet , newGuardian [ ] WormholeGuardianSet ) ( * AbiLogGuardianSetChangedIterator , error ) {
2020-08-06 06:43:09 -07:00
var oldGuardianRule [ ] interface { }
for _ , oldGuardianItem := range oldGuardian {
oldGuardianRule = append ( oldGuardianRule , oldGuardianItem )
}
var newGuardianRule [ ] interface { }
for _ , newGuardianItem := range newGuardian {
newGuardianRule = append ( newGuardianRule , newGuardianItem )
}
2020-08-17 14:01:59 -07:00
logs , sub , err := _Abi . contract . FilterLogs ( opts , "LogGuardianSetChanged" , oldGuardianRule , newGuardianRule )
2020-08-06 06:43:09 -07:00
if err != nil {
return nil , err
}
2020-08-17 14:01:59 -07:00
return & AbiLogGuardianSetChangedIterator { contract : _Abi . contract , event : "LogGuardianSetChanged" , logs : logs , sub : sub } , nil
2020-08-06 06:43:09 -07:00
}
2020-08-17 14:01:59 -07:00
// WatchLogGuardianSetChanged is a free log subscription operation binding the contract event 0xffd222fffe5bc3841c76607f52e3101e111286ab95f24f199ba39e0d5df72acb.
2020-08-06 06:43:09 -07:00
//
2020-08-17 14:01:59 -07:00
// Solidity: event LogGuardianSetChanged((address[],uint32) indexed oldGuardian, (address[],uint32) indexed newGuardian)
func ( _Abi * AbiFilterer ) WatchLogGuardianSetChanged ( opts * bind . WatchOpts , sink chan <- * AbiLogGuardianSetChanged , oldGuardian [ ] WormholeGuardianSet , newGuardian [ ] WormholeGuardianSet ) ( event . Subscription , error ) {
2020-08-06 06:43:09 -07:00
var oldGuardianRule [ ] interface { }
for _ , oldGuardianItem := range oldGuardian {
oldGuardianRule = append ( oldGuardianRule , oldGuardianItem )
}
var newGuardianRule [ ] interface { }
for _ , newGuardianItem := range newGuardian {
newGuardianRule = append ( newGuardianRule , newGuardianItem )
}
2020-08-17 14:01:59 -07:00
logs , sub , err := _Abi . contract . WatchLogs ( opts , "LogGuardianSetChanged" , oldGuardianRule , newGuardianRule )
2020-08-06 06:43:09 -07:00
if err != nil {
return nil , err
}
return event . NewSubscription ( func ( quit <- chan struct { } ) error {
defer sub . Unsubscribe ( )
for {
select {
case log := <- logs :
// New log arrived, parse the event and forward to the user
2020-08-17 14:01:59 -07:00
event := new ( AbiLogGuardianSetChanged )
if err := _Abi . contract . UnpackLog ( event , "LogGuardianSetChanged" , log ) ; err != nil {
2020-08-06 06:43:09 -07:00
return err
}
event . Raw = log
select {
case sink <- event :
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
}
} ) , nil
}
2020-08-17 14:01:59 -07:00
// ParseLogGuardianSetChanged is a log parse operation binding the contract event 0xffd222fffe5bc3841c76607f52e3101e111286ab95f24f199ba39e0d5df72acb.
2020-08-06 06:43:09 -07:00
//
2020-08-17 14:01:59 -07:00
// Solidity: event LogGuardianSetChanged((address[],uint32) indexed oldGuardian, (address[],uint32) indexed newGuardian)
func ( _Abi * AbiFilterer ) ParseLogGuardianSetChanged ( log types . Log ) ( * AbiLogGuardianSetChanged , error ) {
event := new ( AbiLogGuardianSetChanged )
if err := _Abi . contract . UnpackLog ( event , "LogGuardianSetChanged" , log ) ; err != nil {
2020-08-06 06:43:09 -07:00
return nil , err
}
return event , nil
}
2020-08-17 14:01:59 -07:00
// 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.
type AbiLogTokensLockedIterator struct {
Event * AbiLogTokensLocked // Event containing the contract specifics and raw log
2020-08-06 06:43:09 -07:00
contract * bind . BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types . Log // Log channel receiving the found contract events
sub ethereum . Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
2020-08-17 14:01:59 -07:00
func ( it * AbiLogTokensLockedIterator ) Next ( ) bool {
2020-08-06 06:43:09 -07:00
// If the iterator failed, stop iterating
if it . fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it . done {
select {
case log := <- it . logs :
2020-08-17 14:01:59 -07:00
it . Event = new ( AbiLogTokensLocked )
2020-08-06 06:43:09 -07:00
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
default :
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <- it . logs :
2020-08-17 14:01:59 -07:00
it . Event = new ( AbiLogTokensLocked )
2020-08-06 06:43:09 -07:00
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
case err := <- it . sub . Err ( ) :
it . done = true
it . fail = err
return it . Next ( )
}
}
// Error returns any retrieval or parsing error occurred during filtering.
2020-08-17 14:01:59 -07:00
func ( it * AbiLogTokensLockedIterator ) Error ( ) error {
2020-08-06 06:43:09 -07:00
return it . fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
2020-08-17 14:01:59 -07:00
func ( it * AbiLogTokensLockedIterator ) Close ( ) error {
2020-08-06 06:43:09 -07:00
it . sub . Unsubscribe ( )
return nil
}
2020-08-17 14:01:59 -07:00
// AbiLogTokensLocked represents a LogTokensLocked event raised by the Abi contract.
type AbiLogTokensLocked struct {
2020-08-06 06:43:09 -07:00
TargetChain uint8
TokenChain uint8
Token [ 32 ] byte
Sender [ 32 ] byte
Recipient [ 32 ] byte
Amount * big . Int
Raw types . Log // Blockchain specific contextual infos
}
// FilterLogTokensLocked is a free log retrieval operation binding the contract event 0x84b445260a99044cc9529b3033663c078031a14e31f3c255ff02c62667bab14b.
//
// Solidity: event LogTokensLocked(uint8 target_chain, uint8 token_chain, bytes32 indexed token, bytes32 indexed sender, bytes32 recipient, uint256 amount)
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiFilterer ) FilterLogTokensLocked ( opts * bind . FilterOpts , token [ ] [ 32 ] byte , sender [ ] [ 32 ] byte ) ( * AbiLogTokensLockedIterator , error ) {
2020-08-06 06:43:09 -07:00
var tokenRule [ ] interface { }
for _ , tokenItem := range token {
tokenRule = append ( tokenRule , tokenItem )
}
var senderRule [ ] interface { }
for _ , senderItem := range sender {
senderRule = append ( senderRule , senderItem )
}
2020-08-17 14:01:59 -07:00
logs , sub , err := _Abi . contract . FilterLogs ( opts , "LogTokensLocked" , tokenRule , senderRule )
2020-08-06 06:43:09 -07:00
if err != nil {
return nil , err
}
2020-08-17 14:01:59 -07:00
return & AbiLogTokensLockedIterator { contract : _Abi . contract , event : "LogTokensLocked" , logs : logs , sub : sub } , nil
2020-08-06 06:43:09 -07:00
}
// WatchLogTokensLocked is a free log subscription operation binding the contract event 0x84b445260a99044cc9529b3033663c078031a14e31f3c255ff02c62667bab14b.
//
// Solidity: event LogTokensLocked(uint8 target_chain, uint8 token_chain, bytes32 indexed token, bytes32 indexed sender, bytes32 recipient, uint256 amount)
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiFilterer ) WatchLogTokensLocked ( opts * bind . WatchOpts , sink chan <- * AbiLogTokensLocked , token [ ] [ 32 ] byte , sender [ ] [ 32 ] byte ) ( event . Subscription , error ) {
2020-08-06 06:43:09 -07:00
var tokenRule [ ] interface { }
for _ , tokenItem := range token {
tokenRule = append ( tokenRule , tokenItem )
}
var senderRule [ ] interface { }
for _ , senderItem := range sender {
senderRule = append ( senderRule , senderItem )
}
2020-08-17 14:01:59 -07:00
logs , sub , err := _Abi . contract . WatchLogs ( opts , "LogTokensLocked" , tokenRule , senderRule )
2020-08-06 06:43:09 -07:00
if err != nil {
return nil , err
}
return event . NewSubscription ( func ( quit <- chan struct { } ) error {
defer sub . Unsubscribe ( )
for {
select {
case log := <- logs :
// New log arrived, parse the event and forward to the user
2020-08-17 14:01:59 -07:00
event := new ( AbiLogTokensLocked )
if err := _Abi . contract . UnpackLog ( event , "LogTokensLocked" , log ) ; err != nil {
2020-08-06 06:43:09 -07:00
return err
}
event . Raw = log
select {
case sink <- event :
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
}
} ) , nil
}
// ParseLogTokensLocked is a log parse operation binding the contract event 0x84b445260a99044cc9529b3033663c078031a14e31f3c255ff02c62667bab14b.
//
// Solidity: event LogTokensLocked(uint8 target_chain, uint8 token_chain, bytes32 indexed token, bytes32 indexed sender, bytes32 recipient, uint256 amount)
2020-08-17 14:01:59 -07:00
func ( _Abi * AbiFilterer ) ParseLogTokensLocked ( log types . Log ) ( * AbiLogTokensLocked , error ) {
event := new ( AbiLogTokensLocked )
if err := _Abi . contract . UnpackLog ( event , "LogTokensLocked" , log ) ; err != nil {
2020-08-06 06:43:09 -07:00
return nil , err
}
return event , nil
}