From bb86e881294215f0e5803af264190c5e00c9d7ae Mon Sep 17 00:00:00 2001 From: todd <81545601+todd-woko@users.noreply.github.com> Date: Thu, 7 Nov 2024 10:00:44 +0800 Subject: [PATCH 1/2] feat: deploy fee contract for transaction processing --- app/app.go | 30 + app/upgrades/v8/upgrade.go | 39 + client/client_test.go | 4 +- contract/bridge_fee.go | 130 + contract/bridge_fee_oracle.go | 63 + contract/bridge_fee_oracle.sol.go | 1821 +++++++++++++ contract/bridge_fee_quote.go | 52 +- contract/bridge_fee_quote.sol.go | 2344 +++++++++++++++++ contract/bridge_proxy.sol.go | 689 +++++ contract/compile.sh | 3 +- contract/contract.go | 49 +- contract/ibridge_fee_quote.sol.go | 479 ---- contract/interface.go | 21 + contract/types.go | 3 + solidity/contracts/bridge/BridgeFeeOracle.sol | 20 +- solidity/contracts/bridge/BridgeFeeQuote.sol | 26 +- solidity/contracts/bridge/BridgeProxy.sol | 29 + 17 files changed, 5291 insertions(+), 511 deletions(-) create mode 100644 contract/bridge_fee.go create mode 100644 contract/bridge_fee_oracle.go create mode 100644 contract/bridge_fee_oracle.sol.go create mode 100644 contract/bridge_fee_quote.sol.go create mode 100644 contract/bridge_proxy.sol.go delete mode 100644 contract/ibridge_fee_quote.sol.go create mode 100644 contract/interface.go create mode 100644 contract/types.go create mode 100644 solidity/contracts/bridge/BridgeProxy.sol diff --git a/app/app.go b/app/app.go index 0ce6aa61..9228b4c6 100644 --- a/app/app.go +++ b/app/app.go @@ -2,6 +2,7 @@ package app import ( "encoding/json" + "errors" "fmt" "io" "net/http" @@ -55,6 +56,7 @@ import ( fxante "github.com/functionx/fx-core/v8/ante" "github.com/functionx/fx-core/v8/app/keepers" + "github.com/functionx/fx-core/v8/contract" _ "github.com/functionx/fx-core/v8/docs/statik" fxcfg "github.com/functionx/fx-core/v8/server/config" fxauth "github.com/functionx/fx-core/v8/server/grpc/auth" @@ -64,6 +66,7 @@ import ( "github.com/functionx/fx-core/v8/x/crosschain" "github.com/functionx/fx-core/v8/x/crosschain/keeper" crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" + ethtypes "github.com/functionx/fx-core/v8/x/eth/types" fxevmtypes "github.com/functionx/fx-core/v8/x/evm/types" ibcmiddlewaretypes "github.com/functionx/fx-core/v8/x/ibc/middleware/types" ) @@ -345,6 +348,33 @@ func (app *App) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci. panic(err) } + bridgeFeeQuoteKeeper := contract.NewBridgeFeeQuoteKeeper(app.EvmKeeper, contract.BridgeFeeAddress) + bridgeFeeOracleKeeper := contract.NewBrideFeeOracleKeeper(app.EvmKeeper, contract.BridgeFeeOracleAddress) + + acc := app.AccountKeeper.GetModuleAddress(evmtypes.ModuleName) + moduleAddress := common.BytesToAddress(acc.Bytes()) + + delegations, err := app.StakingKeeper.GetAllDelegations(ctx) + if err != nil { + return nil, err + } + if len(delegations) == 0 { + return nil, errors.New("no delegations found") + } + + if err = contract.DeployBridgeFeeContract( + ctx, + app.EvmKeeper, + bridgeFeeQuoteKeeper, + bridgeFeeOracleKeeper, + map[string][]string{ + ethtypes.ModuleName: {fxtypes.DefaultDenom}, + }, + moduleAddress, moduleAddress, + common.BytesToAddress(sdk.MustAccAddressFromBech32(delegations[0].DelegatorAddress).Bytes()), + ); err != nil { + return nil, err + } return response, nil } diff --git a/app/upgrades/v8/upgrade.go b/app/upgrades/v8/upgrade.go index 41022fab..8ce12c51 100644 --- a/app/upgrades/v8/upgrade.go +++ b/app/upgrades/v8/upgrade.go @@ -2,6 +2,7 @@ package v8 import ( "context" + "errors" "strings" storetypes "cosmossdk.io/store/types" @@ -17,10 +18,12 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" ibcchanneltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" + "github.com/ethereum/go-ethereum/common" evmtypes "github.com/evmos/ethermint/x/evm/types" "github.com/functionx/fx-core/v8/app/keepers" "github.com/functionx/fx-core/v8/app/upgrades/store" + "github.com/functionx/fx-core/v8/contract" fxtypes "github.com/functionx/fx-core/v8/types" crosschaintypes "github.com/functionx/fx-core/v8/x/crosschain/types" erc20keeper "github.com/functionx/fx-core/v8/x/erc20/keeper" @@ -72,6 +75,42 @@ func CreateUpgradeHandler(cdc codec.Codec, mm *module.Manager, configurator modu store.RemoveStoreKeys(cacheCtx, app.GetKey(erc20types.StoreKey), erc20v8.GetRemovedStoreKeys()) + quoteKeeper := contract.NewBridgeFeeQuoteKeeper(app.EvmKeeper, contract.BridgeFeeAddress) + oracleKeeper := contract.NewBrideFeeOracleKeeper(app.EvmKeeper, contract.BridgeFeeOracleAddress) + bridgeDenomWithChain := make(map[string][]string) + chains := crosschaintypes.GetSupportChains() + for _, chain := range chains { + denoms := make([]string, 0) + bridgeTokens, err := app.Erc20Keeper.GetBridgeTokens(ctx, chain) + if err != nil { + return fromVM, err + } + for _, token := range bridgeTokens { + denoms = append(denoms, token.GetDenom()) + } + bridgeDenomWithChain[chain] = denoms + } + acc := app.AccountKeeper.GetModuleAddress(evmtypes.ModuleName) + moduleAddress := common.BytesToAddress(acc.Bytes()) + + oracles := app.CrosschainKeepers.EthKeeper.GetAllOracles(cacheCtx, true) + if oracles.Len() <= 0 { + return fromVM, errors.New("no oracle found") + } + + if err = contract.DeployBridgeFeeContract( + cacheCtx, + app.EvmKeeper, + quoteKeeper, + oracleKeeper, + bridgeDenomWithChain, + moduleAddress, + // TODO set bridge fee contract owner address before mainnet upgrade + moduleAddress, + common.HexToAddress(oracles[0].ExternalAddress), + ); err != nil { + return fromVM, err + } commit() cacheCtx.Logger().Info("upgrade complete", "module", "upgrade") return toVM, nil diff --git a/client/client_test.go b/client/client_test.go index 8ac0ae94..4e33764e 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -189,7 +189,7 @@ func (suite *rpcTestSuite) TestClient_Tx() { // 0. initAccount // 1.fee_collector + 2.distribution + 3.bonded_tokens_pool + 4.not_bonded_tokens_pool + 5.gov + 6.mint + 7.autytypes.NewModuleAddress(crosschain) // 8.evm 9.0x..1001 10.0x..1002 11.erc20 12.wfx-contract - suite.Equal(authtypes.NewBaseAccount(toAddress, nil, uint64(15+i), 0), account) + suite.Equal(authtypes.NewBaseAccount(toAddress, nil, uint64(19+i), 0), account) } ethPrivKey := suite.GetPrivKeyByIndex(hd2.EthSecp256k1Type, 0) @@ -224,7 +224,7 @@ func (suite *rpcTestSuite) TestClient_Tx() { account, err := cli.QueryAccount(ethAddress.String()) suite.Require().NoError(err) - suite.Equal(authtypes.NewBaseAccount(ethAddress, nil, uint64(18), 0), account) + suite.Equal(authtypes.NewBaseAccount(ethAddress, nil, uint64(22), 0), account) } for i := 0; i < len(clients); i++ { diff --git a/contract/bridge_fee.go b/contract/bridge_fee.go new file mode 100644 index 00000000..cbdfc2cc --- /dev/null +++ b/contract/bridge_fee.go @@ -0,0 +1,130 @@ +package contract + +import ( + "math/big" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" +) + +func DeployBridgeFeeContract( + ctx sdk.Context, + evmKeeper EvmKeeper, + bridgeFeeQuoteKeeper BridgeFeeQuoteKeeper, + bridgeFeeOracleKeeper BridgeFeeOracleKeeper, + bridgeDenomWithChain map[string][]string, + evmModuleAddress, owner, defaultOracleAddress common.Address, +) error { + if err := deployBridgeProxy( + ctx, + evmKeeper, + GetBridgeFeeQuote().ABI, + GetBridgeFeeQuote().Bin, + common.HexToAddress(BridgeFeeAddress), + evmModuleAddress, + ); err != nil { + return err + } + if err := deployBridgeProxy( + ctx, + evmKeeper, + GetBridgeFeeOracle().ABI, + GetBridgeFeeOracle().Bin, + common.HexToAddress(BridgeFeeOracleAddress), + evmModuleAddress, + ); err != nil { + return err + } + + if err := initBridgeFeeOracle(ctx, bridgeFeeOracleKeeper, owner, defaultOracleAddress); err != nil { + return err + } + return initBridgeFeeQuote(ctx, bridgeFeeQuoteKeeper, bridgeDenomWithChain, owner) +} + +func deployBridgeProxy( + ctx sdk.Context, + evmKeeper EvmKeeper, + logicABI abi.ABI, + logicBin []byte, + proxyAddress, evmModuleAddress common.Address, +) error { + logicContract, err := evmKeeper.DeployContract(ctx, evmModuleAddress, logicABI, logicBin) + if err != nil { + return err + } + if err = evmKeeper.CreateContractWithCode(ctx, proxyAddress, GetBridgeProxy().Code); err != nil { + return err + } + if _, err = evmKeeper.ApplyContract(ctx, evmModuleAddress, proxyAddress, nil, GetBridgeProxy().ABI, "init", logicContract); err != nil { + return err + } + return nil +} + +func initBridgeFeeOracle( + ctx sdk.Context, + bridgeFeeOracleKeeper BridgeFeeOracleKeeper, + owner, defaultOracleAddress common.Address, +) error { + if _, err := bridgeFeeOracleKeeper.Initialize(ctx); err != nil { + return err + } + role, err := bridgeFeeOracleKeeper.GetQuoteRole(ctx) + if err != nil { + return err + } + if _, err = bridgeFeeOracleKeeper.GrantRole(ctx, role, common.HexToAddress(BridgeFeeAddress)); err != nil { + return err + } + ownerRole, err := bridgeFeeOracleKeeper.GetOwnerRole(ctx) + if err != nil { + return err + } + if _, err = bridgeFeeOracleKeeper.GrantRole(ctx, ownerRole, owner); err != nil { + return err + } + upgradeRole, err := bridgeFeeOracleKeeper.GetUpgradeRole(ctx) + if err != nil { + return err + } + if _, err = bridgeFeeOracleKeeper.GrantRole(ctx, upgradeRole, owner); err != nil { + return err + } + if _, err = bridgeFeeOracleKeeper.SetDefaultOracle(ctx, defaultOracleAddress); err != nil { + return err + } + return nil +} + +func initBridgeFeeQuote( + ctx sdk.Context, + bridgeFeeQuoteKeeper BridgeFeeQuoteKeeper, + bridgeDenomWithChain map[string][]string, + owner common.Address, +) error { + if _, err := bridgeFeeQuoteKeeper.Initialize(ctx, common.HexToAddress(BridgeFeeOracleAddress), big.NewInt(DefaultMaxQuoteIndex)); err != nil { + return err + } + ownerRole, err := bridgeFeeQuoteKeeper.GetOwnerRole(ctx) + if err != nil { + return err + } + if _, err = bridgeFeeQuoteKeeper.GrantRole(ctx, ownerRole, owner); err != nil { + return err + } + upgradeRole, err := bridgeFeeQuoteKeeper.GetUpgradeRole(ctx) + if err != nil { + return err + } + if _, err = bridgeFeeQuoteKeeper.GrantRole(ctx, upgradeRole, owner); err != nil { + return err + } + for chainName, denoms := range bridgeDenomWithChain { + if _, err = bridgeFeeQuoteKeeper.RegisterChain(ctx, chainName, denoms...); err != nil { + return err + } + } + return nil +} diff --git a/contract/bridge_fee_oracle.go b/contract/bridge_fee_oracle.go new file mode 100644 index 00000000..701fcedc --- /dev/null +++ b/contract/bridge_fee_oracle.go @@ -0,0 +1,63 @@ +package contract + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" + "github.com/evmos/ethermint/x/evm/types" +) + +type BridgeFeeOracleKeeper struct { + Caller + abi abi.ABI + from common.Address + contract common.Address +} + +func NewBrideFeeOracleKeeper(caller Caller, contract string) BridgeFeeOracleKeeper { + return BridgeFeeOracleKeeper{ + Caller: caller, + abi: GetBridgeFeeOracle().ABI, + from: common.BytesToAddress(authtypes.NewModuleAddress(types.ModuleName).Bytes()), + contract: common.HexToAddress(contract), + } +} + +func (k BridgeFeeOracleKeeper) Initialize(ctx context.Context) (*types.MsgEthereumTxResponse, error) { + return k.Caller.ApplyContract(ctx, k.from, k.contract, nil, k.abi, "initialize", common.HexToAddress(CrosschainAddress)) +} + +func (k BridgeFeeOracleKeeper) GetOwnerRole(ctx context.Context) (common.Hash, error) { + var res struct{ Role common.Hash } + if err := k.QueryContract(sdk.UnwrapSDKContext(ctx), k.from, k.contract, k.abi, "OWNER_ROLE", &res); err != nil { + return common.Hash{}, err + } + return res.Role, nil +} + +func (k BridgeFeeOracleKeeper) GetUpgradeRole(ctx context.Context) (common.Hash, error) { + var res struct{ Role common.Hash } + if err := k.QueryContract(sdk.UnwrapSDKContext(ctx), k.from, k.contract, k.abi, "UPGRADE_ROLE", &res); err != nil { + return common.Hash{}, err + } + return res.Role, nil +} + +func (k BridgeFeeOracleKeeper) GetQuoteRole(ctx context.Context) (common.Hash, error) { + var res struct{ Role common.Hash } + if err := k.QueryContract(sdk.UnwrapSDKContext(ctx), k.from, k.contract, k.abi, "QUOTE_ROLE", &res); err != nil { + return common.Hash{}, err + } + return res.Role, nil +} + +func (k BridgeFeeOracleKeeper) GrantRole(ctx context.Context, role common.Hash, account common.Address) (*types.MsgEthereumTxResponse, error) { + return k.ApplyContract(ctx, k.from, k.contract, nil, k.abi, "grantRole", role, account) +} + +func (k BridgeFeeOracleKeeper) SetDefaultOracle(ctx context.Context, oracle common.Address) (*types.MsgEthereumTxResponse, error) { + return k.ApplyContract(ctx, k.from, k.contract, nil, k.abi, "setDefaultOracle", oracle) +} diff --git a/contract/bridge_fee_oracle.sol.go b/contract/bridge_fee_oracle.sol.go new file mode 100644 index 00000000..381dc26f --- /dev/null +++ b/contract/bridge_fee_oracle.sol.go @@ -0,0 +1,1821 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contract + +import ( + "errors" + "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 ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// BridgeFeeOracleMetaData contains all meta data concerning the BridgeFeeOracle contract. +var BridgeFeeOracleMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OWNER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"QUOTE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_oracle\",\"type\":\"address\"}],\"name\":\"blackOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"crosschainContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"defaultOracle\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOracleList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_crosschain\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chainName\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_oracle\",\"type\":\"address\"}],\"name\":\"isOnline\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"oracleStatus\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isBlacklisted\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"isActive\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_defaultOracle\",\"type\":\"address\"}],\"name\":\"setDefaultOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", + Bin: "0x60a06040523060805234801561001457600080fd5b50608051611c7f61004c6000396000818161054601528181610586015281816106260152818161066601526107070152611c7f6000f3fe60806040526004361061012a5760003560e01c806380dce169116100ab578063c4d66de81161006f578063c4d66de814610363578063d10c106114610383578063d547741f146103a3578063e58378bb146103c3578063e863f6a7146103e5578063ec331b2b1461043657600080fd5b806380dce169146102a157806391d14854146102da578063a217fddf146102fa578063b908afa81461030f578063c44014d21461034357600080fd5b80634f1ef286116100f25780634f1ef28614610204578063510c27ad1461021757806352d1902d146102395780635bca74db1461024e5780637c90c9a91461028157600080fd5b806301ffc9a71461012f578063248a9ca3146101645780632f2ff15d146101a257806336568abe146101c45780633659cfe6146101e4575b600080fd5b34801561013b57600080fd5b5061014f61014a3660046116bd565b610457565b60405190151581526020015b60405180910390f35b34801561017057600080fd5b5061019461017f3660046116e7565b600090815260c9602052604090206001015490565b60405190815260200161015b565b3480156101ae57600080fd5b506101c26101bd36600461171c565b61048e565b005b3480156101d057600080fd5b506101c26101df36600461171c565b6104b8565b3480156101f057600080fd5b506101c26101ff366004611748565b61053b565b6101c26102123660046117ef565b61061b565b34801561022357600080fd5b5061022c6106e8565b60405161015b9190611851565b34801561024557600080fd5b506101946106fa565b34801561025a57600080fd5b506101947e0caaa0e08f624de190c2474175cd13784c8c75bbdd1b63ae5fab5540967b3c81565b34801561028d57600080fd5b506101c261029c366004611748565b6107ad565b3480156102ad57600080fd5b5061012e546102c2906001600160a01b031681565b6040516001600160a01b03909116815260200161015b565b3480156102e657600080fd5b5061014f6102f536600461171c565b61087a565b34801561030657600080fd5b50610194600081565b34801561031b57600080fd5b506101947f88aa719609f728b0c5e7fb8dd3608d5c25d497efbb3b9dd64e9251ebba10150881565b34801561034f57600080fd5b506101c261035e366004611748565b6108a5565b34801561036f57600080fd5b506101c261037e366004611748565b610951565b34801561038f57600080fd5b5061014f61039e36600461189e565b610adb565b3480156103af57600080fd5b506101c26103be36600461171c565b610ce0565b3480156103cf57600080fd5b50610194600080516020611be383398151915281565b3480156103f157600080fd5b5061041f610400366004611748565b6101316020526000908152604090205460ff8082169161010090041682565b60408051921515835290151560208301520161015b565b34801561044257600080fd5b5061012d546102c2906001600160a01b031681565b60006001600160e01b03198216637965db0b60e01b148061048857506301ffc9a760e01b6001600160e01b03198316145b92915050565b600082815260c960205260409020600101546104a981610d05565b6104b38383610d0f565b505050565b6001600160a01b038116331461052d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105378282610d95565b5050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156105845760405162461bcd60e51b8152600401610524906118f7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166105cd600080516020611c03833981519152546001600160a01b031690565b6001600160a01b0316146105f35760405162461bcd60e51b815260040161052490611943565b6105fc81610dfc565b6040805160008082526020820190925261061891839190610e26565b50565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156106645760405162461bcd60e51b8152600401610524906118f7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166106ad600080516020611c03833981519152546001600160a01b031690565b6001600160a01b0316146106d35760405162461bcd60e51b815260040161052490611943565b6106dc82610dfc565b61053782826001610e26565b60606106f561012f610f91565b905090565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461079a5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610524565b50600080516020611c0383398151915290565b600080516020611be38339815191526107c581610d05565b6107cd610fa5565b6001600160a01b0382166000908152610131602052604090205460ff16156107f457610870565b6001600160a01b03821660009081526101316020526040902054610100900460ff161561084b576001600160a01b038216600090815261013160205260409020805461ff001916905561084961012f83610fff565b505b6001600160a01b038216600090815261013160205260409020805460ff191660011790555b610537600160fb55565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600080516020611be38339815191526108bd81610d05565b6108c961012f8361101b565b61092d576040805180820182526000808252600160208084019182526001600160a01b0387168352610131905292902090518154925161ffff1990931690151561ff001916176101009215159290920291909117905561092b61012f8361103d565b505b5061012e80546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff16158080156109715750600054600160ff909116105b8061098b5750303b15801561098b575060005460ff166001145b6109ee5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610524565b6000805460ff191660011790558015610a11576000805461ff0019166101001790555b61012d80546001600160a01b0319166001600160a01b038416179055610a38600033610d0f565b610a627f88aa719609f728b0c5e7fb8dd3608d5c25d497efbb3b9dd64e9251ebba10150833610d0f565b610a7a600080516020611be383398151915233610d0f565b610a82611052565b610a8a611052565b610a9261107b565b8015610537576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b60007e0caaa0e08f624de190c2474175cd13784c8c75bbdd1b63ae5fab5540967b3c610b0681610d05565b610b0e610fa5565b6001600160a01b03831660009081526101316020526040902054610100900460ff1615610b3e5760019150610ccf565b6001600160a01b0383166000908152610131602052604090205460ff1615610b695760009150610ccf565b61012d546040516333e7eceb60e11b81526001600160a01b03909116906367cfd9d690610b9c90879087906004016119e7565b602060405180830381865afa158015610bb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bdd9190611a11565b610bea5760009150610ccf565b61012d54604051630b63ae7d60e11b81526001600160a01b03909116906316c75cfa90610c1d90879087906004016119e7565b602060405180830381865afa158015610c3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5e9190611a11565b610c6b5760009150610ccf565b6040805180820182526000808252600160208084019182526001600160a01b0388168352610131905292902090518154925161ffff1990931690151561ff0019161761010092151592909202919091179055610cc961012f8461103d565b50600191505b610cd9600160fb55565b5092915050565b600082815260c96020526040902060010154610cfb81610d05565b6104b38383610d95565b61061881336110aa565b610d19828261087a565b61053757600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610d513390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610d9f828261087a565b1561053757600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f88aa719609f728b0c5e7fb8dd3608d5c25d497efbb3b9dd64e9251ebba10150861053781610d05565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615610e59576104b383611103565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610eb3575060408051601f3d908101601f19168201909252610eb091810190611a33565b60015b610f165760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610524565b600080516020611c038339815191528114610f855760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610524565b506104b383838361119f565b60606000610f9e836111ca565b9392505050565b600260fb541415610ff85760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610524565b600260fb55565b6000610f9e836001600160a01b038416611226565b600160fb55565b6001600160a01b03811660009081526001830160205260408120541515610f9e565b6000610f9e836001600160a01b038416611319565b600054610100900460ff166110795760405162461bcd60e51b815260040161052490611a4c565b565b600054610100900460ff166110a25760405162461bcd60e51b815260040161052490611a4c565b611079611368565b6110b4828261087a565b610537576110c18161138f565b6110cc8360206113a1565b6040516020016110dd929190611a97565b60408051601f198184030181529082905262461bcd60e51b825261052491600401611b0c565b6001600160a01b0381163b6111705760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610524565b600080516020611c0383398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6111a88361153d565b6000825111806111b55750805b156104b3576111c4838361157d565b50505050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561121a57602002820191906000526020600020905b815481526020019060010190808311611206575b50505050509050919050565b6000818152600183016020526040812054801561130f57600061124a600183611b35565b855490915060009061125e90600190611b35565b90508181146112c357600086600001828154811061127e5761127e611b4c565b90600052602060002001549050808760000184815481106112a1576112a1611b4c565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806112d4576112d4611b62565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610488565b6000915050610488565b600081815260018301602052604081205461136057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610488565b506000610488565b600054610100900460ff166110145760405162461bcd60e51b815260040161052490611a4c565b60606104886001600160a01b03831660145b606060006113b0836002611b78565b6113bb906002611b97565b67ffffffffffffffff8111156113d3576113d3611763565b6040519080825280601f01601f1916602001820160405280156113fd576020820181803683370190505b509050600360fc1b8160008151811061141857611418611b4c565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061144757611447611b4c565b60200101906001600160f81b031916908160001a905350600061146b846002611b78565b611476906001611b97565b90505b60018111156114ee576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106114aa576114aa611b4c565b1a60f81b8282815181106114c0576114c0611b4c565b60200101906001600160f81b031916908160001a90535060049490941c936114e781611baf565b9050611479565b508315610f9e5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610524565b61154681611103565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610f9e8383604051806060016040528060278152602001611c23602791396060600080856001600160a01b0316856040516115ba9190611bc6565b600060405180830381855af49150503d80600081146115f5576040519150601f19603f3d011682016040523d82523d6000602084013e6115fa565b606091505b509150915061160b86838387611615565b9695505050505050565b6060831561168157825161167a576001600160a01b0385163b61167a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610524565b508161168b565b61168b8383611693565b949350505050565b8151156116a35781518083602001fd5b8060405162461bcd60e51b81526004016105249190611b0c565b6000602082840312156116cf57600080fd5b81356001600160e01b031981168114610f9e57600080fd5b6000602082840312156116f957600080fd5b5035919050565b80356001600160a01b038116811461171757600080fd5b919050565b6000806040838503121561172f57600080fd5b8235915061173f60208401611700565b90509250929050565b60006020828403121561175a57600080fd5b610f9e82611700565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561179457611794611763565b604051601f8501601f19908116603f011681019082821181831017156117bc576117bc611763565b816040528093508581528686860111156117d557600080fd5b858560208301376000602087830101525050509392505050565b6000806040838503121561180257600080fd5b61180b83611700565b9150602083013567ffffffffffffffff81111561182757600080fd5b8301601f8101851361183857600080fd5b61184785823560208401611779565b9150509250929050565b6020808252825182820181905260009190848201906040850190845b818110156118925783516001600160a01b03168352928401929184019160010161186d565b50909695505050505050565b600080604083850312156118b157600080fd5b823567ffffffffffffffff8111156118c857600080fd5b8301601f810185136118d957600080fd5b6118e885823560208401611779565b92505061173f60208401611700565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b60005b838110156119aa578181015183820152602001611992565b838111156111c45750506000910152565b600081518084526119d381602086016020860161198f565b601f01601f19169290920160200192915050565b6040815260006119fa60408301856119bb565b905060018060a01b03831660208301529392505050565b600060208284031215611a2357600080fd5b81518015158114610f9e57600080fd5b600060208284031215611a4557600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611acf81601785016020880161198f565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611b0081602884016020880161198f565b01602801949350505050565b602081526000610f9e60208301846119bb565b634e487b7160e01b600052601160045260246000fd5b600082821015611b4757611b47611b1f565b500390565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b6000816000190483118215151615611b9257611b92611b1f565b500290565b60008219821115611baa57611baa611b1f565b500190565b600081611bbe57611bbe611b1f565b506000190190565b60008251611bd881846020870161198f565b919091019291505056feb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220ae8e57c4c6d7c195977c203a30f1be8e88223ce5ae767b698b15cfaf890080b464736f6c634300080a0033", +} + +// BridgeFeeOracleABI is the input ABI used to generate the binding from. +// Deprecated: Use BridgeFeeOracleMetaData.ABI instead. +var BridgeFeeOracleABI = BridgeFeeOracleMetaData.ABI + +// BridgeFeeOracleBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use BridgeFeeOracleMetaData.Bin instead. +var BridgeFeeOracleBin = BridgeFeeOracleMetaData.Bin + +// DeployBridgeFeeOracle deploys a new Ethereum contract, binding an instance of BridgeFeeOracle to it. +func DeployBridgeFeeOracle(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *BridgeFeeOracle, error) { + parsed, err := BridgeFeeOracleMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(BridgeFeeOracleBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &BridgeFeeOracle{BridgeFeeOracleCaller: BridgeFeeOracleCaller{contract: contract}, BridgeFeeOracleTransactor: BridgeFeeOracleTransactor{contract: contract}, BridgeFeeOracleFilterer: BridgeFeeOracleFilterer{contract: contract}}, nil +} + +// BridgeFeeOracle is an auto generated Go binding around an Ethereum contract. +type BridgeFeeOracle struct { + BridgeFeeOracleCaller // Read-only binding to the contract + BridgeFeeOracleTransactor // Write-only binding to the contract + BridgeFeeOracleFilterer // Log filterer for contract events +} + +// BridgeFeeOracleCaller is an auto generated read-only Go binding around an Ethereum contract. +type BridgeFeeOracleCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// BridgeFeeOracleTransactor is an auto generated write-only Go binding around an Ethereum contract. +type BridgeFeeOracleTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// BridgeFeeOracleFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type BridgeFeeOracleFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// BridgeFeeOracleSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type BridgeFeeOracleSession struct { + Contract *BridgeFeeOracle // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// BridgeFeeOracleCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type BridgeFeeOracleCallerSession struct { + Contract *BridgeFeeOracleCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// BridgeFeeOracleTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type BridgeFeeOracleTransactorSession struct { + Contract *BridgeFeeOracleTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// BridgeFeeOracleRaw is an auto generated low-level Go binding around an Ethereum contract. +type BridgeFeeOracleRaw struct { + Contract *BridgeFeeOracle // Generic contract binding to access the raw methods on +} + +// BridgeFeeOracleCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type BridgeFeeOracleCallerRaw struct { + Contract *BridgeFeeOracleCaller // Generic read-only contract binding to access the raw methods on +} + +// BridgeFeeOracleTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type BridgeFeeOracleTransactorRaw struct { + Contract *BridgeFeeOracleTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewBridgeFeeOracle creates a new instance of BridgeFeeOracle, bound to a specific deployed contract. +func NewBridgeFeeOracle(address common.Address, backend bind.ContractBackend) (*BridgeFeeOracle, error) { + contract, err := bindBridgeFeeOracle(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &BridgeFeeOracle{BridgeFeeOracleCaller: BridgeFeeOracleCaller{contract: contract}, BridgeFeeOracleTransactor: BridgeFeeOracleTransactor{contract: contract}, BridgeFeeOracleFilterer: BridgeFeeOracleFilterer{contract: contract}}, nil +} + +// NewBridgeFeeOracleCaller creates a new read-only instance of BridgeFeeOracle, bound to a specific deployed contract. +func NewBridgeFeeOracleCaller(address common.Address, caller bind.ContractCaller) (*BridgeFeeOracleCaller, error) { + contract, err := bindBridgeFeeOracle(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &BridgeFeeOracleCaller{contract: contract}, nil +} + +// NewBridgeFeeOracleTransactor creates a new write-only instance of BridgeFeeOracle, bound to a specific deployed contract. +func NewBridgeFeeOracleTransactor(address common.Address, transactor bind.ContractTransactor) (*BridgeFeeOracleTransactor, error) { + contract, err := bindBridgeFeeOracle(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &BridgeFeeOracleTransactor{contract: contract}, nil +} + +// NewBridgeFeeOracleFilterer creates a new log filterer instance of BridgeFeeOracle, bound to a specific deployed contract. +func NewBridgeFeeOracleFilterer(address common.Address, filterer bind.ContractFilterer) (*BridgeFeeOracleFilterer, error) { + contract, err := bindBridgeFeeOracle(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &BridgeFeeOracleFilterer{contract: contract}, nil +} + +// bindBridgeFeeOracle binds a generic wrapper to an already deployed contract. +func bindBridgeFeeOracle(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := BridgeFeeOracleMetaData.GetAbi() + 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. +func (_BridgeFeeOracle *BridgeFeeOracleRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _BridgeFeeOracle.Contract.BridgeFeeOracleCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_BridgeFeeOracle *BridgeFeeOracleRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _BridgeFeeOracle.Contract.BridgeFeeOracleTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_BridgeFeeOracle *BridgeFeeOracleRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _BridgeFeeOracle.Contract.BridgeFeeOracleTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_BridgeFeeOracle *BridgeFeeOracleCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _BridgeFeeOracle.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_BridgeFeeOracle *BridgeFeeOracleTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _BridgeFeeOracle.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_BridgeFeeOracle *BridgeFeeOracleTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _BridgeFeeOracle.Contract.contract.Transact(opts, method, params...) +} + +// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (_BridgeFeeOracle *BridgeFeeOracleCaller) DEFAULTADMINROLE(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _BridgeFeeOracle.contract.Call(opts, &out, "DEFAULT_ADMIN_ROLE") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (_BridgeFeeOracle *BridgeFeeOracleSession) DEFAULTADMINROLE() ([32]byte, error) { + return _BridgeFeeOracle.Contract.DEFAULTADMINROLE(&_BridgeFeeOracle.CallOpts) +} + +// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (_BridgeFeeOracle *BridgeFeeOracleCallerSession) DEFAULTADMINROLE() ([32]byte, error) { + return _BridgeFeeOracle.Contract.DEFAULTADMINROLE(&_BridgeFeeOracle.CallOpts) +} + +// OWNERROLE is a free data retrieval call binding the contract method 0xe58378bb. +// +// Solidity: function OWNER_ROLE() view returns(bytes32) +func (_BridgeFeeOracle *BridgeFeeOracleCaller) OWNERROLE(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _BridgeFeeOracle.contract.Call(opts, &out, "OWNER_ROLE") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// OWNERROLE is a free data retrieval call binding the contract method 0xe58378bb. +// +// Solidity: function OWNER_ROLE() view returns(bytes32) +func (_BridgeFeeOracle *BridgeFeeOracleSession) OWNERROLE() ([32]byte, error) { + return _BridgeFeeOracle.Contract.OWNERROLE(&_BridgeFeeOracle.CallOpts) +} + +// OWNERROLE is a free data retrieval call binding the contract method 0xe58378bb. +// +// Solidity: function OWNER_ROLE() view returns(bytes32) +func (_BridgeFeeOracle *BridgeFeeOracleCallerSession) OWNERROLE() ([32]byte, error) { + return _BridgeFeeOracle.Contract.OWNERROLE(&_BridgeFeeOracle.CallOpts) +} + +// QUOTEROLE is a free data retrieval call binding the contract method 0x5bca74db. +// +// Solidity: function QUOTE_ROLE() view returns(bytes32) +func (_BridgeFeeOracle *BridgeFeeOracleCaller) QUOTEROLE(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _BridgeFeeOracle.contract.Call(opts, &out, "QUOTE_ROLE") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// QUOTEROLE is a free data retrieval call binding the contract method 0x5bca74db. +// +// Solidity: function QUOTE_ROLE() view returns(bytes32) +func (_BridgeFeeOracle *BridgeFeeOracleSession) QUOTEROLE() ([32]byte, error) { + return _BridgeFeeOracle.Contract.QUOTEROLE(&_BridgeFeeOracle.CallOpts) +} + +// QUOTEROLE is a free data retrieval call binding the contract method 0x5bca74db. +// +// Solidity: function QUOTE_ROLE() view returns(bytes32) +func (_BridgeFeeOracle *BridgeFeeOracleCallerSession) QUOTEROLE() ([32]byte, error) { + return _BridgeFeeOracle.Contract.QUOTEROLE(&_BridgeFeeOracle.CallOpts) +} + +// UPGRADEROLE is a free data retrieval call binding the contract method 0xb908afa8. +// +// Solidity: function UPGRADE_ROLE() view returns(bytes32) +func (_BridgeFeeOracle *BridgeFeeOracleCaller) UPGRADEROLE(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _BridgeFeeOracle.contract.Call(opts, &out, "UPGRADE_ROLE") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// UPGRADEROLE is a free data retrieval call binding the contract method 0xb908afa8. +// +// Solidity: function UPGRADE_ROLE() view returns(bytes32) +func (_BridgeFeeOracle *BridgeFeeOracleSession) UPGRADEROLE() ([32]byte, error) { + return _BridgeFeeOracle.Contract.UPGRADEROLE(&_BridgeFeeOracle.CallOpts) +} + +// UPGRADEROLE is a free data retrieval call binding the contract method 0xb908afa8. +// +// Solidity: function UPGRADE_ROLE() view returns(bytes32) +func (_BridgeFeeOracle *BridgeFeeOracleCallerSession) UPGRADEROLE() ([32]byte, error) { + return _BridgeFeeOracle.Contract.UPGRADEROLE(&_BridgeFeeOracle.CallOpts) +} + +// CrosschainContract is a free data retrieval call binding the contract method 0xec331b2b. +// +// Solidity: function crosschainContract() view returns(address) +func (_BridgeFeeOracle *BridgeFeeOracleCaller) CrosschainContract(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _BridgeFeeOracle.contract.Call(opts, &out, "crosschainContract") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// CrosschainContract is a free data retrieval call binding the contract method 0xec331b2b. +// +// Solidity: function crosschainContract() view returns(address) +func (_BridgeFeeOracle *BridgeFeeOracleSession) CrosschainContract() (common.Address, error) { + return _BridgeFeeOracle.Contract.CrosschainContract(&_BridgeFeeOracle.CallOpts) +} + +// CrosschainContract is a free data retrieval call binding the contract method 0xec331b2b. +// +// Solidity: function crosschainContract() view returns(address) +func (_BridgeFeeOracle *BridgeFeeOracleCallerSession) CrosschainContract() (common.Address, error) { + return _BridgeFeeOracle.Contract.CrosschainContract(&_BridgeFeeOracle.CallOpts) +} + +// DefaultOracle is a free data retrieval call binding the contract method 0x80dce169. +// +// Solidity: function defaultOracle() view returns(address) +func (_BridgeFeeOracle *BridgeFeeOracleCaller) DefaultOracle(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _BridgeFeeOracle.contract.Call(opts, &out, "defaultOracle") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// DefaultOracle is a free data retrieval call binding the contract method 0x80dce169. +// +// Solidity: function defaultOracle() view returns(address) +func (_BridgeFeeOracle *BridgeFeeOracleSession) DefaultOracle() (common.Address, error) { + return _BridgeFeeOracle.Contract.DefaultOracle(&_BridgeFeeOracle.CallOpts) +} + +// DefaultOracle is a free data retrieval call binding the contract method 0x80dce169. +// +// Solidity: function defaultOracle() view returns(address) +func (_BridgeFeeOracle *BridgeFeeOracleCallerSession) DefaultOracle() (common.Address, error) { + return _BridgeFeeOracle.Contract.DefaultOracle(&_BridgeFeeOracle.CallOpts) +} + +// GetOracleList is a free data retrieval call binding the contract method 0x510c27ad. +// +// Solidity: function getOracleList() view returns(address[]) +func (_BridgeFeeOracle *BridgeFeeOracleCaller) GetOracleList(opts *bind.CallOpts) ([]common.Address, error) { + var out []interface{} + err := _BridgeFeeOracle.contract.Call(opts, &out, "getOracleList") + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + +} + +// GetOracleList is a free data retrieval call binding the contract method 0x510c27ad. +// +// Solidity: function getOracleList() view returns(address[]) +func (_BridgeFeeOracle *BridgeFeeOracleSession) GetOracleList() ([]common.Address, error) { + return _BridgeFeeOracle.Contract.GetOracleList(&_BridgeFeeOracle.CallOpts) +} + +// GetOracleList is a free data retrieval call binding the contract method 0x510c27ad. +// +// Solidity: function getOracleList() view returns(address[]) +func (_BridgeFeeOracle *BridgeFeeOracleCallerSession) GetOracleList() ([]common.Address, error) { + return _BridgeFeeOracle.Contract.GetOracleList(&_BridgeFeeOracle.CallOpts) +} + +// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (_BridgeFeeOracle *BridgeFeeOracleCaller) GetRoleAdmin(opts *bind.CallOpts, role [32]byte) ([32]byte, error) { + var out []interface{} + err := _BridgeFeeOracle.contract.Call(opts, &out, "getRoleAdmin", role) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (_BridgeFeeOracle *BridgeFeeOracleSession) GetRoleAdmin(role [32]byte) ([32]byte, error) { + return _BridgeFeeOracle.Contract.GetRoleAdmin(&_BridgeFeeOracle.CallOpts, role) +} + +// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (_BridgeFeeOracle *BridgeFeeOracleCallerSession) GetRoleAdmin(role [32]byte) ([32]byte, error) { + return _BridgeFeeOracle.Contract.GetRoleAdmin(&_BridgeFeeOracle.CallOpts, role) +} + +// HasRole is a free data retrieval call binding the contract method 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (_BridgeFeeOracle *BridgeFeeOracleCaller) HasRole(opts *bind.CallOpts, role [32]byte, account common.Address) (bool, error) { + var out []interface{} + err := _BridgeFeeOracle.contract.Call(opts, &out, "hasRole", role, account) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// HasRole is a free data retrieval call binding the contract method 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (_BridgeFeeOracle *BridgeFeeOracleSession) HasRole(role [32]byte, account common.Address) (bool, error) { + return _BridgeFeeOracle.Contract.HasRole(&_BridgeFeeOracle.CallOpts, role, account) +} + +// HasRole is a free data retrieval call binding the contract method 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (_BridgeFeeOracle *BridgeFeeOracleCallerSession) HasRole(role [32]byte, account common.Address) (bool, error) { + return _BridgeFeeOracle.Contract.HasRole(&_BridgeFeeOracle.CallOpts, role, account) +} + +// OracleStatus is a free data retrieval call binding the contract method 0xe863f6a7. +// +// Solidity: function oracleStatus(address ) view returns(bool isBlacklisted, bool isActive) +func (_BridgeFeeOracle *BridgeFeeOracleCaller) OracleStatus(opts *bind.CallOpts, arg0 common.Address) (struct { + IsBlacklisted bool + IsActive bool +}, error) { + var out []interface{} + err := _BridgeFeeOracle.contract.Call(opts, &out, "oracleStatus", arg0) + + outstruct := new(struct { + IsBlacklisted bool + IsActive bool + }) + if err != nil { + return *outstruct, err + } + + outstruct.IsBlacklisted = *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.IsActive = *abi.ConvertType(out[1], new(bool)).(*bool) + + return *outstruct, err + +} + +// OracleStatus is a free data retrieval call binding the contract method 0xe863f6a7. +// +// Solidity: function oracleStatus(address ) view returns(bool isBlacklisted, bool isActive) +func (_BridgeFeeOracle *BridgeFeeOracleSession) OracleStatus(arg0 common.Address) (struct { + IsBlacklisted bool + IsActive bool +}, error) { + return _BridgeFeeOracle.Contract.OracleStatus(&_BridgeFeeOracle.CallOpts, arg0) +} + +// OracleStatus is a free data retrieval call binding the contract method 0xe863f6a7. +// +// Solidity: function oracleStatus(address ) view returns(bool isBlacklisted, bool isActive) +func (_BridgeFeeOracle *BridgeFeeOracleCallerSession) OracleStatus(arg0 common.Address) (struct { + IsBlacklisted bool + IsActive bool +}, error) { + return _BridgeFeeOracle.Contract.OracleStatus(&_BridgeFeeOracle.CallOpts, arg0) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_BridgeFeeOracle *BridgeFeeOracleCaller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _BridgeFeeOracle.contract.Call(opts, &out, "proxiableUUID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_BridgeFeeOracle *BridgeFeeOracleSession) ProxiableUUID() ([32]byte, error) { + return _BridgeFeeOracle.Contract.ProxiableUUID(&_BridgeFeeOracle.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_BridgeFeeOracle *BridgeFeeOracleCallerSession) ProxiableUUID() ([32]byte, error) { + return _BridgeFeeOracle.Contract.ProxiableUUID(&_BridgeFeeOracle.CallOpts) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_BridgeFeeOracle *BridgeFeeOracleCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { + var out []interface{} + err := _BridgeFeeOracle.contract.Call(opts, &out, "supportsInterface", interfaceId) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_BridgeFeeOracle *BridgeFeeOracleSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _BridgeFeeOracle.Contract.SupportsInterface(&_BridgeFeeOracle.CallOpts, interfaceId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_BridgeFeeOracle *BridgeFeeOracleCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _BridgeFeeOracle.Contract.SupportsInterface(&_BridgeFeeOracle.CallOpts, interfaceId) +} + +// BlackOracle is a paid mutator transaction binding the contract method 0x7c90c9a9. +// +// Solidity: function blackOracle(address _oracle) returns() +func (_BridgeFeeOracle *BridgeFeeOracleTransactor) BlackOracle(opts *bind.TransactOpts, _oracle common.Address) (*types.Transaction, error) { + return _BridgeFeeOracle.contract.Transact(opts, "blackOracle", _oracle) +} + +// BlackOracle is a paid mutator transaction binding the contract method 0x7c90c9a9. +// +// Solidity: function blackOracle(address _oracle) returns() +func (_BridgeFeeOracle *BridgeFeeOracleSession) BlackOracle(_oracle common.Address) (*types.Transaction, error) { + return _BridgeFeeOracle.Contract.BlackOracle(&_BridgeFeeOracle.TransactOpts, _oracle) +} + +// BlackOracle is a paid mutator transaction binding the contract method 0x7c90c9a9. +// +// Solidity: function blackOracle(address _oracle) returns() +func (_BridgeFeeOracle *BridgeFeeOracleTransactorSession) BlackOracle(_oracle common.Address) (*types.Transaction, error) { + return _BridgeFeeOracle.Contract.BlackOracle(&_BridgeFeeOracle.TransactOpts, _oracle) +} + +// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (_BridgeFeeOracle *BridgeFeeOracleTransactor) GrantRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { + return _BridgeFeeOracle.contract.Transact(opts, "grantRole", role, account) +} + +// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (_BridgeFeeOracle *BridgeFeeOracleSession) GrantRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _BridgeFeeOracle.Contract.GrantRole(&_BridgeFeeOracle.TransactOpts, role, account) +} + +// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (_BridgeFeeOracle *BridgeFeeOracleTransactorSession) GrantRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _BridgeFeeOracle.Contract.GrantRole(&_BridgeFeeOracle.TransactOpts, role, account) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address _crosschain) returns() +func (_BridgeFeeOracle *BridgeFeeOracleTransactor) Initialize(opts *bind.TransactOpts, _crosschain common.Address) (*types.Transaction, error) { + return _BridgeFeeOracle.contract.Transact(opts, "initialize", _crosschain) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address _crosschain) returns() +func (_BridgeFeeOracle *BridgeFeeOracleSession) Initialize(_crosschain common.Address) (*types.Transaction, error) { + return _BridgeFeeOracle.Contract.Initialize(&_BridgeFeeOracle.TransactOpts, _crosschain) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address _crosschain) returns() +func (_BridgeFeeOracle *BridgeFeeOracleTransactorSession) Initialize(_crosschain common.Address) (*types.Transaction, error) { + return _BridgeFeeOracle.Contract.Initialize(&_BridgeFeeOracle.TransactOpts, _crosschain) +} + +// IsOnline is a paid mutator transaction binding the contract method 0xd10c1061. +// +// Solidity: function isOnline(string _chainName, address _oracle) returns(bool) +func (_BridgeFeeOracle *BridgeFeeOracleTransactor) IsOnline(opts *bind.TransactOpts, _chainName string, _oracle common.Address) (*types.Transaction, error) { + return _BridgeFeeOracle.contract.Transact(opts, "isOnline", _chainName, _oracle) +} + +// IsOnline is a paid mutator transaction binding the contract method 0xd10c1061. +// +// Solidity: function isOnline(string _chainName, address _oracle) returns(bool) +func (_BridgeFeeOracle *BridgeFeeOracleSession) IsOnline(_chainName string, _oracle common.Address) (*types.Transaction, error) { + return _BridgeFeeOracle.Contract.IsOnline(&_BridgeFeeOracle.TransactOpts, _chainName, _oracle) +} + +// IsOnline is a paid mutator transaction binding the contract method 0xd10c1061. +// +// Solidity: function isOnline(string _chainName, address _oracle) returns(bool) +func (_BridgeFeeOracle *BridgeFeeOracleTransactorSession) IsOnline(_chainName string, _oracle common.Address) (*types.Transaction, error) { + return _BridgeFeeOracle.Contract.IsOnline(&_BridgeFeeOracle.TransactOpts, _chainName, _oracle) +} + +// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (_BridgeFeeOracle *BridgeFeeOracleTransactor) RenounceRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { + return _BridgeFeeOracle.contract.Transact(opts, "renounceRole", role, account) +} + +// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (_BridgeFeeOracle *BridgeFeeOracleSession) RenounceRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _BridgeFeeOracle.Contract.RenounceRole(&_BridgeFeeOracle.TransactOpts, role, account) +} + +// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (_BridgeFeeOracle *BridgeFeeOracleTransactorSession) RenounceRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _BridgeFeeOracle.Contract.RenounceRole(&_BridgeFeeOracle.TransactOpts, role, account) +} + +// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (_BridgeFeeOracle *BridgeFeeOracleTransactor) RevokeRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { + return _BridgeFeeOracle.contract.Transact(opts, "revokeRole", role, account) +} + +// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (_BridgeFeeOracle *BridgeFeeOracleSession) RevokeRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _BridgeFeeOracle.Contract.RevokeRole(&_BridgeFeeOracle.TransactOpts, role, account) +} + +// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (_BridgeFeeOracle *BridgeFeeOracleTransactorSession) RevokeRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _BridgeFeeOracle.Contract.RevokeRole(&_BridgeFeeOracle.TransactOpts, role, account) +} + +// SetDefaultOracle is a paid mutator transaction binding the contract method 0xc44014d2. +// +// Solidity: function setDefaultOracle(address _defaultOracle) returns() +func (_BridgeFeeOracle *BridgeFeeOracleTransactor) SetDefaultOracle(opts *bind.TransactOpts, _defaultOracle common.Address) (*types.Transaction, error) { + return _BridgeFeeOracle.contract.Transact(opts, "setDefaultOracle", _defaultOracle) +} + +// SetDefaultOracle is a paid mutator transaction binding the contract method 0xc44014d2. +// +// Solidity: function setDefaultOracle(address _defaultOracle) returns() +func (_BridgeFeeOracle *BridgeFeeOracleSession) SetDefaultOracle(_defaultOracle common.Address) (*types.Transaction, error) { + return _BridgeFeeOracle.Contract.SetDefaultOracle(&_BridgeFeeOracle.TransactOpts, _defaultOracle) +} + +// SetDefaultOracle is a paid mutator transaction binding the contract method 0xc44014d2. +// +// Solidity: function setDefaultOracle(address _defaultOracle) returns() +func (_BridgeFeeOracle *BridgeFeeOracleTransactorSession) SetDefaultOracle(_defaultOracle common.Address) (*types.Transaction, error) { + return _BridgeFeeOracle.Contract.SetDefaultOracle(&_BridgeFeeOracle.TransactOpts, _defaultOracle) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_BridgeFeeOracle *BridgeFeeOracleTransactor) UpgradeTo(opts *bind.TransactOpts, newImplementation common.Address) (*types.Transaction, error) { + return _BridgeFeeOracle.contract.Transact(opts, "upgradeTo", newImplementation) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_BridgeFeeOracle *BridgeFeeOracleSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) { + return _BridgeFeeOracle.Contract.UpgradeTo(&_BridgeFeeOracle.TransactOpts, newImplementation) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_BridgeFeeOracle *BridgeFeeOracleTransactorSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) { + return _BridgeFeeOracle.Contract.UpgradeTo(&_BridgeFeeOracle.TransactOpts, newImplementation) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_BridgeFeeOracle *BridgeFeeOracleTransactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _BridgeFeeOracle.contract.Transact(opts, "upgradeToAndCall", newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_BridgeFeeOracle *BridgeFeeOracleSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _BridgeFeeOracle.Contract.UpgradeToAndCall(&_BridgeFeeOracle.TransactOpts, newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_BridgeFeeOracle *BridgeFeeOracleTransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _BridgeFeeOracle.Contract.UpgradeToAndCall(&_BridgeFeeOracle.TransactOpts, newImplementation, data) +} + +// BridgeFeeOracleAdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the BridgeFeeOracle contract. +type BridgeFeeOracleAdminChangedIterator struct { + Event *BridgeFeeOracleAdminChanged // Event containing the contract specifics and raw log + + 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. +func (it *BridgeFeeOracleAdminChangedIterator) Next() bool { + // 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: + it.Event = new(BridgeFeeOracleAdminChanged) + 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: + it.Event = new(BridgeFeeOracleAdminChanged) + 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. +func (it *BridgeFeeOracleAdminChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeFeeOracleAdminChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeFeeOracleAdminChanged represents a AdminChanged event raised by the BridgeFeeOracle contract. +type BridgeFeeOracleAdminChanged struct { + PreviousAdmin common.Address + NewAdmin common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAdminChanged is a free log retrieval operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_BridgeFeeOracle *BridgeFeeOracleFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*BridgeFeeOracleAdminChangedIterator, error) { + + logs, sub, err := _BridgeFeeOracle.contract.FilterLogs(opts, "AdminChanged") + if err != nil { + return nil, err + } + return &BridgeFeeOracleAdminChangedIterator{contract: _BridgeFeeOracle.contract, event: "AdminChanged", logs: logs, sub: sub}, nil +} + +// WatchAdminChanged is a free log subscription operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_BridgeFeeOracle *BridgeFeeOracleFilterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *BridgeFeeOracleAdminChanged) (event.Subscription, error) { + + logs, sub, err := _BridgeFeeOracle.contract.WatchLogs(opts, "AdminChanged") + 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 + event := new(BridgeFeeOracleAdminChanged) + if err := _BridgeFeeOracle.contract.UnpackLog(event, "AdminChanged", log); err != nil { + 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 +} + +// ParseAdminChanged is a log parse operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_BridgeFeeOracle *BridgeFeeOracleFilterer) ParseAdminChanged(log types.Log) (*BridgeFeeOracleAdminChanged, error) { + event := new(BridgeFeeOracleAdminChanged) + if err := _BridgeFeeOracle.contract.UnpackLog(event, "AdminChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeFeeOracleBeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the BridgeFeeOracle contract. +type BridgeFeeOracleBeaconUpgradedIterator struct { + Event *BridgeFeeOracleBeaconUpgraded // Event containing the contract specifics and raw log + + 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. +func (it *BridgeFeeOracleBeaconUpgradedIterator) Next() bool { + // 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: + it.Event = new(BridgeFeeOracleBeaconUpgraded) + 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: + it.Event = new(BridgeFeeOracleBeaconUpgraded) + 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. +func (it *BridgeFeeOracleBeaconUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeFeeOracleBeaconUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeFeeOracleBeaconUpgraded represents a BeaconUpgraded event raised by the BridgeFeeOracle contract. +type BridgeFeeOracleBeaconUpgraded struct { + Beacon common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBeaconUpgraded is a free log retrieval operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_BridgeFeeOracle *BridgeFeeOracleFilterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*BridgeFeeOracleBeaconUpgradedIterator, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _BridgeFeeOracle.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule) + if err != nil { + return nil, err + } + return &BridgeFeeOracleBeaconUpgradedIterator{contract: _BridgeFeeOracle.contract, event: "BeaconUpgraded", logs: logs, sub: sub}, nil +} + +// WatchBeaconUpgraded is a free log subscription operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_BridgeFeeOracle *BridgeFeeOracleFilterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *BridgeFeeOracleBeaconUpgraded, beacon []common.Address) (event.Subscription, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _BridgeFeeOracle.contract.WatchLogs(opts, "BeaconUpgraded", beaconRule) + 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 + event := new(BridgeFeeOracleBeaconUpgraded) + if err := _BridgeFeeOracle.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil { + 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 +} + +// ParseBeaconUpgraded is a log parse operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_BridgeFeeOracle *BridgeFeeOracleFilterer) ParseBeaconUpgraded(log types.Log) (*BridgeFeeOracleBeaconUpgraded, error) { + event := new(BridgeFeeOracleBeaconUpgraded) + if err := _BridgeFeeOracle.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeFeeOracleInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the BridgeFeeOracle contract. +type BridgeFeeOracleInitializedIterator struct { + Event *BridgeFeeOracleInitialized // Event containing the contract specifics and raw log + + 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. +func (it *BridgeFeeOracleInitializedIterator) Next() bool { + // 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: + it.Event = new(BridgeFeeOracleInitialized) + 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: + it.Event = new(BridgeFeeOracleInitialized) + 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. +func (it *BridgeFeeOracleInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeFeeOracleInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeFeeOracleInitialized represents a Initialized event raised by the BridgeFeeOracle contract. +type BridgeFeeOracleInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_BridgeFeeOracle *BridgeFeeOracleFilterer) FilterInitialized(opts *bind.FilterOpts) (*BridgeFeeOracleInitializedIterator, error) { + + logs, sub, err := _BridgeFeeOracle.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &BridgeFeeOracleInitializedIterator{contract: _BridgeFeeOracle.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_BridgeFeeOracle *BridgeFeeOracleFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *BridgeFeeOracleInitialized) (event.Subscription, error) { + + logs, sub, err := _BridgeFeeOracle.contract.WatchLogs(opts, "Initialized") + 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 + event := new(BridgeFeeOracleInitialized) + if err := _BridgeFeeOracle.contract.UnpackLog(event, "Initialized", log); err != nil { + 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 +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_BridgeFeeOracle *BridgeFeeOracleFilterer) ParseInitialized(log types.Log) (*BridgeFeeOracleInitialized, error) { + event := new(BridgeFeeOracleInitialized) + if err := _BridgeFeeOracle.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeFeeOracleRoleAdminChangedIterator is returned from FilterRoleAdminChanged and is used to iterate over the raw logs and unpacked data for RoleAdminChanged events raised by the BridgeFeeOracle contract. +type BridgeFeeOracleRoleAdminChangedIterator struct { + Event *BridgeFeeOracleRoleAdminChanged // Event containing the contract specifics and raw log + + 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. +func (it *BridgeFeeOracleRoleAdminChangedIterator) Next() bool { + // 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: + it.Event = new(BridgeFeeOracleRoleAdminChanged) + 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: + it.Event = new(BridgeFeeOracleRoleAdminChanged) + 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. +func (it *BridgeFeeOracleRoleAdminChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeFeeOracleRoleAdminChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeFeeOracleRoleAdminChanged represents a RoleAdminChanged event raised by the BridgeFeeOracle contract. +type BridgeFeeOracleRoleAdminChanged struct { + Role [32]byte + PreviousAdminRole [32]byte + NewAdminRole [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRoleAdminChanged is a free log retrieval operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. +// +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (_BridgeFeeOracle *BridgeFeeOracleFilterer) FilterRoleAdminChanged(opts *bind.FilterOpts, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (*BridgeFeeOracleRoleAdminChangedIterator, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var previousAdminRoleRule []interface{} + for _, previousAdminRoleItem := range previousAdminRole { + previousAdminRoleRule = append(previousAdminRoleRule, previousAdminRoleItem) + } + var newAdminRoleRule []interface{} + for _, newAdminRoleItem := range newAdminRole { + newAdminRoleRule = append(newAdminRoleRule, newAdminRoleItem) + } + + logs, sub, err := _BridgeFeeOracle.contract.FilterLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) + if err != nil { + return nil, err + } + return &BridgeFeeOracleRoleAdminChangedIterator{contract: _BridgeFeeOracle.contract, event: "RoleAdminChanged", logs: logs, sub: sub}, nil +} + +// WatchRoleAdminChanged is a free log subscription operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. +// +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (_BridgeFeeOracle *BridgeFeeOracleFilterer) WatchRoleAdminChanged(opts *bind.WatchOpts, sink chan<- *BridgeFeeOracleRoleAdminChanged, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (event.Subscription, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var previousAdminRoleRule []interface{} + for _, previousAdminRoleItem := range previousAdminRole { + previousAdminRoleRule = append(previousAdminRoleRule, previousAdminRoleItem) + } + var newAdminRoleRule []interface{} + for _, newAdminRoleItem := range newAdminRole { + newAdminRoleRule = append(newAdminRoleRule, newAdminRoleItem) + } + + logs, sub, err := _BridgeFeeOracle.contract.WatchLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) + 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 + event := new(BridgeFeeOracleRoleAdminChanged) + if err := _BridgeFeeOracle.contract.UnpackLog(event, "RoleAdminChanged", log); err != nil { + 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 +} + +// ParseRoleAdminChanged is a log parse operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. +// +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (_BridgeFeeOracle *BridgeFeeOracleFilterer) ParseRoleAdminChanged(log types.Log) (*BridgeFeeOracleRoleAdminChanged, error) { + event := new(BridgeFeeOracleRoleAdminChanged) + if err := _BridgeFeeOracle.contract.UnpackLog(event, "RoleAdminChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeFeeOracleRoleGrantedIterator is returned from FilterRoleGranted and is used to iterate over the raw logs and unpacked data for RoleGranted events raised by the BridgeFeeOracle contract. +type BridgeFeeOracleRoleGrantedIterator struct { + Event *BridgeFeeOracleRoleGranted // Event containing the contract specifics and raw log + + 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. +func (it *BridgeFeeOracleRoleGrantedIterator) Next() bool { + // 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: + it.Event = new(BridgeFeeOracleRoleGranted) + 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: + it.Event = new(BridgeFeeOracleRoleGranted) + 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. +func (it *BridgeFeeOracleRoleGrantedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeFeeOracleRoleGrantedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeFeeOracleRoleGranted represents a RoleGranted event raised by the BridgeFeeOracle contract. +type BridgeFeeOracleRoleGranted struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRoleGranted is a free log retrieval operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. +// +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (_BridgeFeeOracle *BridgeFeeOracleFilterer) FilterRoleGranted(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*BridgeFeeOracleRoleGrantedIterator, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _BridgeFeeOracle.contract.FilterLogs(opts, "RoleGranted", roleRule, accountRule, senderRule) + if err != nil { + return nil, err + } + return &BridgeFeeOracleRoleGrantedIterator{contract: _BridgeFeeOracle.contract, event: "RoleGranted", logs: logs, sub: sub}, nil +} + +// WatchRoleGranted is a free log subscription operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. +// +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (_BridgeFeeOracle *BridgeFeeOracleFilterer) WatchRoleGranted(opts *bind.WatchOpts, sink chan<- *BridgeFeeOracleRoleGranted, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _BridgeFeeOracle.contract.WatchLogs(opts, "RoleGranted", roleRule, accountRule, senderRule) + 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 + event := new(BridgeFeeOracleRoleGranted) + if err := _BridgeFeeOracle.contract.UnpackLog(event, "RoleGranted", log); err != nil { + 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 +} + +// ParseRoleGranted is a log parse operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. +// +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (_BridgeFeeOracle *BridgeFeeOracleFilterer) ParseRoleGranted(log types.Log) (*BridgeFeeOracleRoleGranted, error) { + event := new(BridgeFeeOracleRoleGranted) + if err := _BridgeFeeOracle.contract.UnpackLog(event, "RoleGranted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeFeeOracleRoleRevokedIterator is returned from FilterRoleRevoked and is used to iterate over the raw logs and unpacked data for RoleRevoked events raised by the BridgeFeeOracle contract. +type BridgeFeeOracleRoleRevokedIterator struct { + Event *BridgeFeeOracleRoleRevoked // Event containing the contract specifics and raw log + + 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. +func (it *BridgeFeeOracleRoleRevokedIterator) Next() bool { + // 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: + it.Event = new(BridgeFeeOracleRoleRevoked) + 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: + it.Event = new(BridgeFeeOracleRoleRevoked) + 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. +func (it *BridgeFeeOracleRoleRevokedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeFeeOracleRoleRevokedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeFeeOracleRoleRevoked represents a RoleRevoked event raised by the BridgeFeeOracle contract. +type BridgeFeeOracleRoleRevoked struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRoleRevoked is a free log retrieval operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. +// +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (_BridgeFeeOracle *BridgeFeeOracleFilterer) FilterRoleRevoked(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*BridgeFeeOracleRoleRevokedIterator, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _BridgeFeeOracle.contract.FilterLogs(opts, "RoleRevoked", roleRule, accountRule, senderRule) + if err != nil { + return nil, err + } + return &BridgeFeeOracleRoleRevokedIterator{contract: _BridgeFeeOracle.contract, event: "RoleRevoked", logs: logs, sub: sub}, nil +} + +// WatchRoleRevoked is a free log subscription operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. +// +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (_BridgeFeeOracle *BridgeFeeOracleFilterer) WatchRoleRevoked(opts *bind.WatchOpts, sink chan<- *BridgeFeeOracleRoleRevoked, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _BridgeFeeOracle.contract.WatchLogs(opts, "RoleRevoked", roleRule, accountRule, senderRule) + 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 + event := new(BridgeFeeOracleRoleRevoked) + if err := _BridgeFeeOracle.contract.UnpackLog(event, "RoleRevoked", log); err != nil { + 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 +} + +// ParseRoleRevoked is a log parse operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. +// +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (_BridgeFeeOracle *BridgeFeeOracleFilterer) ParseRoleRevoked(log types.Log) (*BridgeFeeOracleRoleRevoked, error) { + event := new(BridgeFeeOracleRoleRevoked) + if err := _BridgeFeeOracle.contract.UnpackLog(event, "RoleRevoked", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeFeeOracleUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the BridgeFeeOracle contract. +type BridgeFeeOracleUpgradedIterator struct { + Event *BridgeFeeOracleUpgraded // Event containing the contract specifics and raw log + + 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. +func (it *BridgeFeeOracleUpgradedIterator) Next() bool { + // 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: + it.Event = new(BridgeFeeOracleUpgraded) + 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: + it.Event = new(BridgeFeeOracleUpgraded) + 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. +func (it *BridgeFeeOracleUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeFeeOracleUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeFeeOracleUpgraded represents a Upgraded event raised by the BridgeFeeOracle contract. +type BridgeFeeOracleUpgraded struct { + Implementation common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_BridgeFeeOracle *BridgeFeeOracleFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*BridgeFeeOracleUpgradedIterator, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _BridgeFeeOracle.contract.FilterLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return &BridgeFeeOracleUpgradedIterator{contract: _BridgeFeeOracle.contract, event: "Upgraded", logs: logs, sub: sub}, nil +} + +// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_BridgeFeeOracle *BridgeFeeOracleFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *BridgeFeeOracleUpgraded, implementation []common.Address) (event.Subscription, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _BridgeFeeOracle.contract.WatchLogs(opts, "Upgraded", implementationRule) + 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 + event := new(BridgeFeeOracleUpgraded) + if err := _BridgeFeeOracle.contract.UnpackLog(event, "Upgraded", log); err != nil { + 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 +} + +// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_BridgeFeeOracle *BridgeFeeOracleFilterer) ParseUpgraded(log types.Log) (*BridgeFeeOracleUpgraded, error) { + event := new(BridgeFeeOracleUpgraded) + if err := _BridgeFeeOracle.contract.UnpackLog(event, "Upgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/contract/bridge_fee_quote.go b/contract/bridge_fee_quote.go index e6589bce..233ddbcf 100644 --- a/contract/bridge_fee_quote.go +++ b/contract/bridge_fee_quote.go @@ -11,24 +11,24 @@ import ( "github.com/evmos/ethermint/x/evm/types" ) -type BrideFeeQuoteKeeper struct { +type BridgeFeeQuoteKeeper struct { Caller abi abi.ABI from common.Address contract common.Address } -func NewBridgeFeeQuoteKeeper(caller Caller, contract string) BrideFeeQuoteKeeper { - return BrideFeeQuoteKeeper{ +func NewBridgeFeeQuoteKeeper(caller Caller, contract string) BridgeFeeQuoteKeeper { + return BridgeFeeQuoteKeeper{ Caller: caller, - abi: bridgeFeeQuoteABI, + abi: GetBridgeFeeQuote().ABI, // evm module address from: common.BytesToAddress(authtypes.NewModuleAddress(types.ModuleName).Bytes()), contract: common.HexToAddress(contract), } } -func (k BrideFeeQuoteKeeper) GetQuotesByToken(ctx context.Context, chainName, tokenName string) ([]IBridgeFeeQuoteQuoteInfo, error) { +func (k BridgeFeeQuoteKeeper) GetQuotesByToken(ctx context.Context, chainName, tokenName string) ([]IBridgeFeeQuoteQuoteInfo, error) { var res struct{ Quotes []IBridgeFeeQuoteQuoteInfo } if err := k.QueryContract(sdk.UnwrapSDKContext(ctx), k.from, k.contract, k.abi, "getQuotesByToken", &res, chainName, tokenName); err != nil { return nil, err @@ -36,10 +36,50 @@ func (k BrideFeeQuoteKeeper) GetQuotesByToken(ctx context.Context, chainName, to return res.Quotes, nil } -func (k BrideFeeQuoteKeeper) GetQuoteById(ctx context.Context, id *big.Int) (IBridgeFeeQuoteQuoteInfo, error) { +func (k BridgeFeeQuoteKeeper) GetQuoteById(ctx context.Context, id *big.Int) (IBridgeFeeQuoteQuoteInfo, error) { var res struct{ Quote IBridgeFeeQuoteQuoteInfo } if err := k.QueryContract(sdk.UnwrapSDKContext(ctx), k.from, k.contract, k.abi, "getQuoteById", &res, id); err != nil { return IBridgeFeeQuoteQuoteInfo{}, err } return res.Quote, nil } + +func (k BridgeFeeQuoteKeeper) Initialize(ctx context.Context, oracle common.Address, maxQuoteIndex *big.Int) (*types.MsgEthereumTxResponse, error) { + return k.ApplyContract(ctx, k.from, k.contract, nil, k.abi, "initialize", oracle, maxQuoteIndex) +} + +func (k BridgeFeeQuoteKeeper) GetOwnerRole(ctx context.Context) (common.Hash, error) { + var res struct{ Role common.Hash } + if err := k.QueryContract(sdk.UnwrapSDKContext(ctx), k.from, k.contract, k.abi, "OWNER_ROLE", &res); err != nil { + return common.Hash{}, err + } + return res.Role, nil +} + +func (k BridgeFeeQuoteKeeper) GetUpgradeRole(ctx context.Context) (common.Hash, error) { + var res struct{ Role common.Hash } + if err := k.QueryContract(sdk.UnwrapSDKContext(ctx), k.from, k.contract, k.abi, "UPGRADE_ROLE", &res); err != nil { + return common.Hash{}, err + } + return res.Role, nil +} + +func (k BridgeFeeQuoteKeeper) GrantRole(ctx context.Context, role common.Hash, account common.Address) (*types.MsgEthereumTxResponse, error) { + return k.ApplyContract(ctx, k.from, k.contract, nil, k.abi, "grantRole", role, account) +} + +func (k BridgeFeeQuoteKeeper) RegisterChain(ctx context.Context, chainName string, tokenNames ...string) (*types.MsgEthereumTxResponse, error) { + res, err := k.ApplyContract(ctx, k.from, k.contract, nil, k.abi, "registerChain", chainName, tokenNames) + if err != nil { + return nil, err + } + return unpackRetIsOk(k.abi, "registerChain", res) +} + +func (k BridgeFeeQuoteKeeper) RegisterTokenName(ctx context.Context, chainName string, tokenNames []string) (*types.MsgEthereumTxResponse, error) { + res, err := k.ApplyContract(ctx, k.from, k.contract, nil, k.abi, "registerTokenName", chainName, tokenNames) + if err != nil { + return nil, err + } + return unpackRetIsOk(k.abi, "registerTokenName", res) +} diff --git a/contract/bridge_fee_quote.sol.go b/contract/bridge_fee_quote.sol.go new file mode 100644 index 00000000..624e35b7 --- /dev/null +++ b/contract/bridge_fee_quote.sol.go @@ -0,0 +1,2344 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contract + +import ( + "errors" + "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 ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// IBridgeFeeQuoteAsset is an auto generated low-level Go binding around an user-defined struct. +type IBridgeFeeQuoteAsset struct { + IsActive bool + TokenNames []string +} + +// IBridgeFeeQuoteQuoteInfo is an auto generated low-level Go binding around an user-defined struct. +type IBridgeFeeQuoteQuoteInfo struct { + Id *big.Int + ChainName string + TokenName string + Oracle common.Address + Fee *big.Int + GasLimit *big.Int + Expiry *big.Int +} + +// IBridgeFeeQuoteQuoteInput is an auto generated low-level Go binding around an user-defined struct. +type IBridgeFeeQuoteQuoteInput struct { + ChainName string + TokenName string + Oracle common.Address + QuoteIndex *big.Int + Fee *big.Int + GasLimit *big.Int + Expiry *big.Int + Signature []byte +} + +// BridgeFeeQuoteMetaData contains all meta data concerning the BridgeFeeQuote contract. +var BridgeFeeQuoteMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"name\":\"ChainNameAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ChainNameInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OracleInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"QuoteExpired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"QuoteIndexInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"QuoteNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenNameAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenNameInvalid\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"VerifySignatureFailed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"chainName\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenName\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"NewQuote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OWNER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chainName\",\"type\":\"string\"}],\"name\":\"activeTokenNames\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"assets\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isActive\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"chainNames\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_tokenName\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_oracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getQuote\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenName\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"internalType\":\"structIBridgeFeeQuote.QuoteInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"}],\"name\":\"getQuoteById\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenName\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"internalType\":\"structIBridgeFeeQuote.QuoteInfo\",\"name\":\"q\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chainName\",\"type\":\"string\"}],\"name\":\"getQuoteList\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenName\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"internalType\":\"structIBridgeFeeQuote.QuoteInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_tokenName\",\"type\":\"string\"}],\"name\":\"getQuotesByToken\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenName\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"internalType\":\"structIBridgeFeeQuote.QuoteInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_oracleContract\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxQuoteIndex\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_tokenName\",\"type\":\"string\"}],\"name\":\"isActiveTokenName\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_tokenName\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_expiry\",\"type\":\"uint256\"}],\"name\":\"makeMessageHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxQuoteIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracleContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenName\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"quoteIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"structIBridgeFeeQuote.QuoteInput[]\",\"name\":\"_inputs\",\"type\":\"tuple[]\"}],\"name\":\"quote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"quoteNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chainName\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"_tokenNames\",\"type\":\"string[]\"}],\"name\":\"registerChain\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chainName\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"_tokenNames\",\"type\":\"string[]\"}],\"name\":\"registerTokenName\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chainName\",\"type\":\"string\"}],\"name\":\"supportAssets\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isActive\",\"type\":\"bool\"},{\"internalType\":\"string[]\",\"name\":\"tokenNames\",\"type\":\"string[]\"}],\"internalType\":\"structIBridgeFeeQuote.Asset\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"supportChainNames\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxQuoteIndex\",\"type\":\"uint256\"}],\"name\":\"updateMaxQuoteIndex\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_oracleContract\",\"type\":\"address\"}],\"name\":\"updateOracleContract\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x60a06040523060805234801561001457600080fd5b50608051613d8761004c60003960008181610961015281816109a1015281816111350152818161117501526112040152613d876000f3fe6080604052600436106101e75760003560e01c806391d1485411610102578063cd6dc68711610095578063d547741f11610064578063d547741f146105fb578063db2231941461061b578063e58378bb1461063b578063ec5af5861461065d57600080fd5b8063cd6dc6871461057b578063d3bab58f1461059b578063d43e62c0146105bb578063d4b8c24f146105db57600080fd5b8063a8541c17116100d1578063a8541c17146104c1578063b908afa8146104ee578063bece753214610522578063c994e71a1461055b57600080fd5b806391d148541461044c578063976646b91461046c578063a217fddf1461048c578063a59f39c7146104a157600080fd5b8063398a0e6b1161017a57806352d1902d1161014957806352d1902d146103ae5780637223c6ba146103c357806385936228146103f05780638b2b25e01461042c57600080fd5b8063398a0e6b1461032e5780633dd7c98c1461035b5780633fc57c3d1461037b5780634f1ef2861461039b57600080fd5b80632c189169116101b65780632c189169146102b55780632f2ff15d146102cc57806336568abe146102ee5780633659cfe61461030e57600080fd5b806301ffc9a7146101f35780630a1d133c146102285780631b826a1b1461024a578063248a9ca31461027757600080fd5b366101ee57005b600080fd5b3480156101ff57600080fd5b5061021361020e366004613012565b610674565b60405190151581526020015b60405180910390f35b34801561023457600080fd5b5061023d6106ab565b60405161021f91906130ec565b34801561025657600080fd5b5061026a6102653660046131eb565b610785565b60405161021f919061321f565b34801561028357600080fd5b506102a7610292366004613246565b600090815260c9602052604090206001015490565b60405190815260200161021f565b3480156102c157600080fd5b506102a761012f5481565b3480156102d857600080fd5b506102ec6102e736600461327f565b6108a9565b005b3480156102fa57600080fd5b506102ec61030936600461327f565b6108d3565b34801561031a57600080fd5b506102ec6103293660046132af565b610956565b34801561033a57600080fd5b5061034e6103493660046131eb565b610a36565b60405161021f9190613341565b34801561036757600080fd5b5061034e6103763660046133a3565b610ec6565b34801561038757600080fd5b506102a7610396366004613406565b6110ee565b6102ec6103a9366004613484565b61112a565b3480156103ba57600080fd5b506102a76111f7565b3480156103cf57600080fd5b506103e36103de366004613246565b6112aa565b60405161021f91906134c9565b3480156103fc57600080fd5b5061021361040b3660046131eb565b80516020818301810180516101318252928201919093012091525460ff1681565b34801561043857600080fd5b5061023d6104473660046131eb565b611357565b34801561045857600080fd5b5061021361046736600461327f565b611452565b34801561047857600080fd5b50610213610487366004613246565b61147d565b34801561049857600080fd5b506102a7600081565b3480156104ad57600080fd5b506102136104bc3660046134ff565b6114a8565b3480156104cd57600080fd5b506104e16104dc366004613246565b6115b5565b60405161021f91906135d3565b3480156104fa57600080fd5b506102a77f88aa719609f728b0c5e7fb8dd3608d5c25d497efbb3b9dd64e9251ebba10150881565b34801561052e57600080fd5b5061012d54610543906001600160a01b031681565b6040516001600160a01b03909116815260200161021f565b34801561056757600080fd5b506102136105763660046135e6565b61173b565b34801561058757600080fd5b506102ec61059636600461375c565b611ab0565b3480156105a757600080fd5b506102136105b63660046132af565b611c41565b3480156105c757600080fd5b506102136105d63660046134ff565b611c83565b3480156105e757600080fd5b506102136105f63660046133a3565b611dfc565b34801561060757600080fd5b506102ec61061636600461327f565b611f5f565b34801561062757600080fd5b506104e1610636366004613788565b611f84565b34801561064757600080fd5b506102a7600080516020613ceb83398151915281565b34801561066957600080fd5b506102a761012e5481565b60006001600160e01b03198216637965db0b60e01b14806106a557506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060610130805480602002602001604051908101604052809291908181526020016000905b8282101561077c5783829060005260206000200180546106ef90613805565b80601f016020809104026020016040519081016040528092919081815260200182805461071b90613805565b80156107685780601f1061073d57610100808354040283529160200191610768565b820191906000526020600020905b81548152906001019060200180831161074b57829003601f168201915b5050505050815260200190600101906106d0565b50505050905090565b604080518082019091526000815260606020820152610131826040516107ab919061383a565b9081526040805191829003602090810183208383018352805460ff161515845260018101805484518185028101850190955280855291938584019390929060009084015b8282101561089b57838290600052602060002001805461080e90613805565b80601f016020809104026020016040519081016040528092919081815260200182805461083a90613805565b80156108875780601f1061085c57610100808354040283529160200191610887565b820191906000526020600020905b81548152906001019060200180831161086a57829003601f168201915b5050505050815260200190600101906107ef565b505050915250909392505050565b600082815260c960205260409020600101546108c48161206c565b6108ce8383612076565b505050565b6001600160a01b03811633146109485760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61095282826120fc565b5050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016141561099f5760405162461bcd60e51b815260040161093f90613856565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166109e8600080516020613d0b833981519152546001600160a01b031690565b6001600160a01b031614610a0e5760405162461bcd60e51b815260040161093f906138a2565b610a1781612163565b60408051600080825260208201909252610a339183919061218d565b50565b606061013182604051610a49919061383a565b9081526040519081900360200190205460ff16610a785760405162b9a46560e61b815260040160405180910390fd5b6000610a83836122f8565b6001600160401b03811115610a9a57610a9a6130ff565b604051908082528060200260200182016040528015610ad357816020015b610ac0612e83565b815260200190600190039081610ab85790505b50905060008061012d60009054906101000a90046001600160a01b03166001600160a01b031663510c27ad6040518163ffffffff1660e01b8152600401600060405180830381865afa158015610b2d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b5591908101906138ee565b905060005b8151811015610ebc5760005b61013187604051610b77919061383a565b90815260405190819003602001902060010154811015610ea95760005b61012e54811015610e96576000610c8b896101318b604051610bb6919061383a565b90815260200160405180910390206001018581548110610bd857610bd8613987565b906000526020600020018054610bed90613805565b80601f0160208091040260200160405190810160405280929190818152602001828054610c1990613805565b8015610c665780601f10610c3b57610100808354040283529160200191610c66565b820191906000526020600020905b815481529060010190602001808311610c4957829003601f168201915b5050505050878781518110610c7d57610c7d613987565b602002602001015185612459565b90504261013282604051610c9f919061383a565b90815260200160405180910390206003015410610e83576040518060e0016040528061013283604051610cd2919061383a565b90815260200160405180910390206000015481526020018a81526020016101318b604051610d00919061383a565b90815260200160405180910390206001018581548110610d2257610d22613987565b906000526020600020018054610d3790613805565b80601f0160208091040260200160405190810160405280929190818152602001828054610d6390613805565b8015610db05780601f10610d8557610100808354040283529160200191610db0565b820191906000526020600020905b815481529060010190602001808311610d9357829003601f168201915b50505050508152602001868681518110610dcc57610dcc613987565b60200260200101516001600160a01b0316815260200161013283604051610df3919061383a565b908152602001604051809103902060010154815260200161013283604051610e1b919061383a565b908152602001604051809103902060020154815260200161013283604051610e43919061383a565b908152602001604051809103902060030154815250878781518110610e6a57610e6a613987565b6020908102919091010152610e806001876139b3565b95505b5080610e8e816139cb565b915050610b94565b5080610ea1816139cb565b915050610b66565b5080610eb4816139cb565b915050610b5a565b5091949350505050565b606061013183604051610ed9919061383a565b9081526040519081900360200190205460ff16610f085760405162b9a46560e61b815260040160405180910390fd5b61012d54604080516380dce16960e01b815290516000926001600160a01b0316916380dce1699160048083019260209291908290030181865afa158015610f53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7791906139e6565b9050600061012e546001600160401b03811115610f9657610f966130ff565b604051908082528060200260200182016040528015610fcf57816020015b610fbc612e83565b815260200190600190039081610fb45790505b50905060005b61012e548110156110e5576000610fee87878685612459565b90506040518060e001604052806101328360405161100c919061383a565b9081526020016040518091039020600001548152602001888152602001878152602001856001600160a01b031681526020016101328360405161104f919061383a565b908152602001604051809103902060010154815260200161013283604051611077919061383a565b90815260200160405180910390206002015481526020016101328360405161109f919061383a565b9081526020016040518091039020600301548152508383815181106110c6576110c6613987565b60200260200101819052505080806110dd906139cb565b915050610fd5565b50949350505050565b60008585858585604051602001611109959493929190613a03565b60405160208183030381529060405280519060200120905095945050505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156111735760405162461bcd60e51b815260040161093f90613856565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166111bc600080516020613d0b833981519152546001600160a01b031690565b6001600160a01b0316146111e25760405162461bcd60e51b815260040161093f906138a2565b6111eb82612163565b6109528282600161218d565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146112975760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000606482015260840161093f565b50600080516020613d0b83398151915290565b61013081815481106112bb57600080fd5b9060005260206000200160009150905080546112d690613805565b80601f016020809104026020016040519081016040528092919081815260200182805461130290613805565b801561134f5780601f106113245761010080835404028352916020019161134f565b820191906000526020600020905b81548152906001019060200180831161133257829003601f168201915b505050505081565b60606101318260405161136a919061383a565b9081526020016040518091039020600101805480602002602001604051908101604052809291908181526020016000905b828210156114475783829060005260206000200180546113ba90613805565b80601f01602080910402602001604051908101604052809291908181526020018280546113e690613805565b80156114335780601f1061140857610100808354040283529160200191611433565b820191906000526020600020905b81548152906001019060200180831161141657829003601f168201915b50505050508152602001906001019061139b565b505050509050919050565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000600080516020613ceb8339815191526114978161206c565b61012e839055600191505b50919050565b6000600080516020613ceb8339815191526114c28161206c565b610131846040516114d3919061383a565b9081526040519081900360200190205460ff161561150457604051630bb9107160e11b815260040160405180910390fd5b604080518082018252600181526020810185905290516101319061152990879061383a565b908152604051602091819003820190208251815460ff1916901515178155828201518051919261156192600185019290910190612ec9565b5050610130805460018101825560009190915285516115aa92507f2f605e086faac1d93117bbfbc18835d434e9405fadc1ca66faf4b864746daf34909101906020870190612f26565b506001949350505050565b6115bd612e83565b60008281526101336020526040812080546115d790613805565b80601f016020809104026020016040519081016040528092919081815260200182805461160390613805565b80156116505780601f1061162557610100808354040283529160200191611650565b820191906000526020600020905b81548152906001019060200180831161163357829003601f168201915b5050505050905080516000141561167a5760405163cf533f4960e01b815260040160405180910390fd5b60008060006116888461248b565b509250925092506040518060e00160405280878152602001848152602001838152602001826001600160a01b03168152602001610132866040516116cc919061383a565b9081526020016040518091039020600101548152602001610132866040516116f4919061383a565b90815260200160405180910390206002015481526020016101328660405161171c919061383a565b9081526040519081900360200190206003015490529695505050505050565b60006117456124b4565b60005b8251811015611a9c5761177383828151811061176657611766613987565b602002602001015161250e565b61179583828151811061178857611788613987565b6020026020010151612662565b60006118178483815181106117ac576117ac613987565b6020026020010151600001518584815181106117ca576117ca613987565b6020026020010151602001518685815181106117e8576117e8613987565b60200260200101516040015187868151811061180657611806613987565b602002602001015160600151612459565b905060006101328260405161182c919061383a565b90815260405190819003602001902054111561188457610133600061013283604051611858919061383a565b908152602001604051809103902060000154815260200190815260200160002060006118849190612fa6565b604051806080016040528061012f5481526020018584815181106118aa576118aa613987565b60200260200101516080015181526020018584815181106118cd576118cd613987565b602002602001015160a0015181526020018584815181106118f0576118f0613987565b602002602001015160c0015181525061013282604051611910919061383a565b90815260408051602092819003830190208351815583830151600182015583820151600282015560609093015160039093019290925561012f546000908152610133825291909120825161196692840190612f26565b5083828151811061197957611979613987565b602002602001015160000151604051611992919061383a565b60405180910390208483815181106119ac576119ac613987565b6020026020010151604001516001600160a01b031661012f547f0b48a34dfbe17b8e2330b80c7d240dd45b1cdb6aee27ebaaee4edb666318e4d68786815181106119f8576119f8613987565b602002602001015160200151888781518110611a1657611a16613987565b602002602001015160800151898881518110611a3457611a34613987565b602002602001015160a001518a8981518110611a5257611a52613987565b602002602001015160c00151604051611a6e9493929190613a46565b60405180910390a461012f54611a859060016139b3565b61012f555080611a94816139cb565b915050611748565b5060019050611aab600160fb55565b919050565b600054610100900460ff1615808015611ad05750600054600160ff909116105b80611aea5750303b158015611aea575060005460ff166001145b611b4d5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161093f565b6000805460ff191660011790558015611b70576000805461ff0019166101001790555b61012d80546001600160a01b0319166001600160a01b03851617905561012e829055611b9d600033612076565b611bc77f88aa719609f728b0c5e7fb8dd3608d5c25d497efbb3b9dd64e9251ebba10150833612076565b611bdf600080516020613ceb83398151915233612076565b611be7612726565b611bef612726565b611bf761274f565b80156108ce576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b6000600080516020613ceb833981519152611c5b8161206c565b61012d80546001600160a01b0385166001600160a01b03199091161790556001915050919050565b6000600080516020613ceb833981519152611c9d8161206c565b61013184604051611cae919061383a565b9081526040519081900360200190205460ff16611cdd5760405162b9a46560e61b815260040160405180910390fd5b60005b83518110156115aa57611d2460405180602001604052806000815250858381518110611d0e57611d0e613987565b602002602001015161277e90919063ffffffff16565b15611d4257604051637557bb2f60e11b815260040160405180910390fd5b611d6585858381518110611d5857611d58613987565b6020026020010151611dfc565b15611d8357604051634234cba560e01b815260040160405180910390fd5b61013185604051611d94919061383a565b9081526020016040518091039020600101848281518110611db757611db7613987565b60209081029190910181015182546001810184556000938452928290208151611de99491909101929190910190612f26565b5080611df4816139cb565b915050611ce0565b60008061013184604051611e10919061383a565b9081526040805191829003602090810183208383018352805460ff161515845260018101805484518185028101850190955280855291938584019390929060009084015b82821015611f00578382906000526020600020018054611e7390613805565b80601f0160208091040260200160405190810160405280929190818152602001828054611e9f90613805565b8015611eec5780601f10611ec157610100808354040283529160200191611eec565b820191906000526020600020905b815481529060010190602001808311611ecf57829003601f168201915b505050505081526020019060010190611e54565b5050505081525050905060005b816020015151811015611f5457611f348483602001518381518110611d0e57611d0e613987565b15611f4257505190506106a5565b80611f4c816139cb565b915050611f0d565b506000949350505050565b600082815260c96020526040902060010154611f7a8161206c565b6108ce83836120fc565b611f8c612e83565b6000611f9a86868686612459565b90506040518060e0016040528061013283604051611fb8919061383a565b9081526020016040518091039020600001548152602001878152602001868152602001856001600160a01b0316815260200161013283604051611ffb919061383a565b908152602001604051809103902060010154815260200161013283604051612023919061383a565b90815260200160405180910390206002015481526020016101328360405161204b919061383a565b9081526020016040518091039020600301548152509150505b949350505050565b610a338133612794565b6120808282611452565b61095257600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff191660011790556120b83390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6121068282611452565b1561095257600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f88aa719609f728b0c5e7fb8dd3608d5c25d497efbb3b9dd64e9251ebba1015086109528161206c565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156121c0576108ce836127ed565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561221a575060408051601f3d908101601f1916820190925261221791810190613a75565b60015b61227d5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b606482015260840161093f565b600080516020613d0b83398151915281146122ec5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b606482015260840161093f565b506108ce838383612889565b60008060009050600061012d60009054906101000a90046001600160a01b03166001600160a01b031663510c27ad6040518163ffffffff1660e01b8152600401600060405180830381865afa158015612355573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261237d91908101906138ee565b905060005b81518110156124505760005b6101318660405161239f919061383a565b9081526040519081900360200190206001015481101561243d5760005b61012e5481101561242a5760006123de886101318a604051610bb6919061383a565b905042610132826040516123f2919061383a565b90815260200160405180910390206003015410612417576124146001876139b3565b95505b5080612422816139cb565b9150506123bc565b5080612435816139cb565b91505061238e565b5080612448816139cb565b915050612382565b50909392505050565b6060848484846040516020016124729493929190613a8e565b6040516020818303038152906040529050949350505050565b606080600080848060200190518101906124a59190613b15565b92989197509550909350915050565b600260fb5414156125075760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161093f565b600260fb55565b8051604051610131916125209161383a565b9081526040519081900360200190205460ff1661254f5760405162b9a46560e61b815260040160405180910390fd5b61256181600001518260200151611dfc565b61257e57604051637557bb2f60e11b815260040160405180910390fd5b61012d548151604080840151905163d10c106160e01b81526001600160a01b039093169263d10c1061926125b6929091600401613b92565b6020604051808303816000875af11580156125d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125f99190613bbc565b61261657604051635a10f29160e11b815260040160405180910390fd5b61012e5481606001511061263d5760405163336662f360e21b815260040160405180910390fd5b428160c001511015610a3357604051638727a7f960e01b815260040160405180910390fd5b60006126858260000151836020015184608001518560a001518660c001516110ee565b905060006126ce8360e001516126c8847f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b906128b4565b9050806001600160a01b031683604001516001600160a01b0316146108ce57604080840151905163ea575af760e01b81526001600160a01b039182166004820152908216602482015260440161093f565b600160fb55565b600054610100900460ff1661274d5760405162461bcd60e51b815260040161093f90613bde565b565b600054610100900460ff166127765760405162461bcd60e51b815260040161093f90613bde565b61274d6128d8565b8051602091820120825192909101919091201490565b61279e8282611452565b610952576127ab816128ff565b6127b6836020612911565b6040516020016127c7929190613c29565b60408051601f198184030181529082905262461bcd60e51b825261093f916004016134c9565b6001600160a01b0381163b61285a5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161093f565b600080516020613d0b83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b61289283612ab3565b60008251118061289f5750805b156108ce576128ae8383612af3565b50505050565b60008060006128c38585612b18565b915091506128d081612b5e565b509392505050565b600054610100900460ff1661271f5760405162461bcd60e51b815260040161093f90613bde565b60606106a56001600160a01b03831660145b60606000612920836002613c9e565b61292b9060026139b3565b6001600160401b03811115612942576129426130ff565b6040519080825280601f01601f19166020018201604052801561296c576020820181803683370190505b509050600360fc1b8160008151811061298757612987613987565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106129b6576129b6613987565b60200101906001600160f81b031916908160001a90535060006129da846002613c9e565b6129e59060016139b3565b90505b6001811115612a5d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612a1957612a19613987565b1a60f81b828281518110612a2f57612a2f613987565b60200101906001600160f81b031916908160001a90535060049490941c93612a5681613cbd565b90506129e8565b508315612aac5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161093f565b9392505050565b612abc816127ed565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060612aac8383604051806060016040528060278152602001613d2b60279139612cac565b600080825160411415612b4f5760208301516040840151606085015160001a612b4387828585612d24565b94509450505050612b57565b506000905060025b9250929050565b6000816004811115612b7257612b72613cd4565b1415612b7b5750565b6001816004811115612b8f57612b8f613cd4565b1415612bdd5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161093f565b6002816004811115612bf157612bf1613cd4565b1415612c3f5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161093f565b6003816004811115612c5357612c53613cd4565b1415610a335760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161093f565b6060600080856001600160a01b031685604051612cc9919061383a565b600060405180830381855af49150503d8060008114612d04576040519150601f19603f3d011682016040523d82523d6000602084013e612d09565b606091505b5091509150612d1a86838387612de8565b9695505050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612d5b5750600090506003612ddf565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612daf573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612dd857600060019250925050612ddf565b9150600090505b94509492505050565b60608315612e54578251612e4d576001600160a01b0385163b612e4d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161093f565b5081612064565b6120648383815115612e695781518083602001fd5b8060405162461bcd60e51b815260040161093f91906134c9565b6040518060e0016040528060008152602001606081526020016060815260200160006001600160a01b031681526020016000815260200160008152602001600081525090565b828054828255906000526020600020908101928215612f16579160200282015b82811115612f165782518051612f06918491602090910190612f26565b5091602001919060010190612ee9565b50612f22929150612fe0565b5090565b828054612f3290613805565b90600052602060002090601f016020900481019282612f545760008555612f9a565b82601f10612f6d57805160ff1916838001178555612f9a565b82800160010185558215612f9a579182015b82811115612f9a578251825591602001919060010190612f7f565b50612f22929150612ffd565b508054612fb290613805565b6000825580601f10612fc2575050565b601f016020900490600052602060002090810190610a339190612ffd565b80821115612f22576000612ff48282612fa6565b50600101612fe0565b5b80821115612f225760008155600101612ffe565b60006020828403121561302457600080fd5b81356001600160e01b031981168114612aac57600080fd5b60005b8381101561305757818101518382015260200161303f565b838111156128ae5750506000910152565b6000815180845261308081602086016020860161303c565b601f01601f19169290920160200192915050565b600082825180855260208086019550808260051b84010181860160005b848110156130df57601f198684030189526130cd838351613068565b988401989250908301906001016130b1565b5090979650505050505050565b602081526000612aac6020830184613094565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b0381118282101715613138576131386130ff565b60405290565b604051601f8201601f191681016001600160401b0381118282101715613166576131666130ff565b604052919050565b60006001600160401b03821115613187576131876130ff565b50601f01601f191660200190565b600082601f8301126131a657600080fd5b81356131b96131b48261316e565b61313e565b8181528460208386010111156131ce57600080fd5b816020850160208301376000918101602001919091529392505050565b6000602082840312156131fd57600080fd5b81356001600160401b0381111561321357600080fd5b61206484828501613195565b60208152815115156020820152600060208301516040808401526120646060840182613094565b60006020828403121561325857600080fd5b5035919050565b6001600160a01b0381168114610a3357600080fd5b8035611aab8161325f565b6000806040838503121561329257600080fd5b8235915060208301356132a48161325f565b809150509250929050565b6000602082840312156132c157600080fd5b8135612aac8161325f565b805182526000602082015160e060208501526132eb60e0850182613068565b9050604083015184820360408601526133048282613068565b6060858101516001600160a01b0316908701526080808601519087015260a0858101519087015260c0948501519490950193909352509192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561339657603f198886030184526133848583516132cc565b94509285019290850190600101613368565b5092979650505050505050565b600080604083850312156133b657600080fd5b82356001600160401b03808211156133cd57600080fd5b6133d986838701613195565b935060208501359150808211156133ef57600080fd5b506133fc85828601613195565b9150509250929050565b600080600080600060a0868803121561341e57600080fd5b85356001600160401b038082111561343557600080fd5b61344189838a01613195565b9650602088013591508082111561345757600080fd5b5061346488828901613195565b959895975050505060408401359360608101359360809091013592509050565b6000806040838503121561349757600080fd5b82356134a28161325f565b915060208301356001600160401b038111156134bd57600080fd5b6133fc85828601613195565b602081526000612aac6020830184613068565b60006001600160401b038211156134f5576134f56130ff565b5060051b60200190565b6000806040838503121561351257600080fd5b82356001600160401b038082111561352957600080fd5b61353586838701613195565b935060209150818501358181111561354c57600080fd5b8501601f8101871361355d57600080fd5b803561356b6131b4826134dc565b81815260059190911b8201840190848101908983111561358a57600080fd5b8584015b838110156135c2578035868111156135a65760008081fd5b6135b48c8983890101613195565b84525091860191860161358e565b508096505050505050509250929050565b602081526000612aac60208301846132cc565b600060208083850312156135f957600080fd5b82356001600160401b038082111561361057600080fd5b818501915085601f83011261362457600080fd5b81356136326131b4826134dc565b81815260059190911b8301840190848101908883111561365157600080fd5b8585015b8381101561374f5780358581111561366d5760008081fd5b8601610100818c03601f19018113156136865760008081fd5b61368e613115565b89830135888111156136a05760008081fd5b6136ae8e8c83870101613195565b825250604080840135898111156136c55760008081fd5b6136d38f8d83880101613195565b8c8401525060606136e5818601613274565b828401526080915081850135818401525060a0808501358284015260c0915081850135818401525060e080850135828401528385013593508984111561372d57600091508182fd5b61373b8f8d86880101613195565b908301525085525050918601918601613655565b5098975050505050505050565b6000806040838503121561376f57600080fd5b823561377a8161325f565b946020939093013593505050565b6000806000806080858703121561379e57600080fd5b84356001600160401b03808211156137b557600080fd5b6137c188838901613195565b955060208701359150808211156137d757600080fd5b506137e487828801613195565b93505060408501356137f58161325f565b9396929550929360600135925050565b600181811c9082168061381957607f821691505b602082108114156114a257634e487b7160e01b600052602260045260246000fd5b6000825161384c81846020870161303c565b9190910192915050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6000602080838503121561390157600080fd5b82516001600160401b0381111561391757600080fd5b8301601f8101851361392857600080fd5b80516139366131b4826134dc565b81815260059190911b8201830190838101908783111561395557600080fd5b928401925b8284101561397c57835161396d8161325f565b8252928401929084019061395a565b979650505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156139c6576139c661399d565b500190565b60006000198214156139df576139df61399d565b5060010190565b6000602082840312156139f857600080fd5b8151612aac8161325f565b60a081526000613a1660a0830188613068565b8281036020840152613a288188613068565b60408401969096525050606081019290925260809091015292915050565b608081526000613a596080830187613068565b6020830195909552506040810192909252606090910152919050565b600060208284031215613a8757600080fd5b5051919050565b608081526000613aa16080830187613068565b8281036020840152613ab38187613068565b6001600160a01b0395909516604084015250506060015292915050565b600082601f830112613ae157600080fd5b8151613aef6131b48261316e565b818152846020838601011115613b0457600080fd5b61206482602083016020870161303c565b60008060008060808587031215613b2b57600080fd5b84516001600160401b0380821115613b4257600080fd5b613b4e88838901613ad0565b95506020870151915080821115613b6457600080fd5b50613b7187828801613ad0565b9350506040850151613b828161325f565b6060959095015193969295505050565b604081526000613ba56040830185613068565b905060018060a01b03831660208301529392505050565b600060208284031215613bce57600080fd5b81518015158114612aac57600080fd5b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613c6181601785016020880161303c565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613c9281602884016020880161303c565b01602801949350505050565b6000816000190483118215151615613cb857613cb861399d565b500290565b600081613ccc57613ccc61399d565b506000190190565b634e487b7160e01b600052602160045260246000fdfeb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122004ba99ac2716ec24f50b5799b00a76384937fdd53760506be55de69354ca326764736f6c634300080a0033", +} + +// BridgeFeeQuoteABI is the input ABI used to generate the binding from. +// Deprecated: Use BridgeFeeQuoteMetaData.ABI instead. +var BridgeFeeQuoteABI = BridgeFeeQuoteMetaData.ABI + +// BridgeFeeQuoteBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use BridgeFeeQuoteMetaData.Bin instead. +var BridgeFeeQuoteBin = BridgeFeeQuoteMetaData.Bin + +// DeployBridgeFeeQuote deploys a new Ethereum contract, binding an instance of BridgeFeeQuote to it. +func DeployBridgeFeeQuote(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *BridgeFeeQuote, error) { + parsed, err := BridgeFeeQuoteMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(BridgeFeeQuoteBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &BridgeFeeQuote{BridgeFeeQuoteCaller: BridgeFeeQuoteCaller{contract: contract}, BridgeFeeQuoteTransactor: BridgeFeeQuoteTransactor{contract: contract}, BridgeFeeQuoteFilterer: BridgeFeeQuoteFilterer{contract: contract}}, nil +} + +// BridgeFeeQuote is an auto generated Go binding around an Ethereum contract. +type BridgeFeeQuote struct { + BridgeFeeQuoteCaller // Read-only binding to the contract + BridgeFeeQuoteTransactor // Write-only binding to the contract + BridgeFeeQuoteFilterer // Log filterer for contract events +} + +// BridgeFeeQuoteCaller is an auto generated read-only Go binding around an Ethereum contract. +type BridgeFeeQuoteCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// BridgeFeeQuoteTransactor is an auto generated write-only Go binding around an Ethereum contract. +type BridgeFeeQuoteTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// BridgeFeeQuoteFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type BridgeFeeQuoteFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// BridgeFeeQuoteSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type BridgeFeeQuoteSession struct { + Contract *BridgeFeeQuote // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// BridgeFeeQuoteCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type BridgeFeeQuoteCallerSession struct { + Contract *BridgeFeeQuoteCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// BridgeFeeQuoteTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type BridgeFeeQuoteTransactorSession struct { + Contract *BridgeFeeQuoteTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// BridgeFeeQuoteRaw is an auto generated low-level Go binding around an Ethereum contract. +type BridgeFeeQuoteRaw struct { + Contract *BridgeFeeQuote // Generic contract binding to access the raw methods on +} + +// BridgeFeeQuoteCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type BridgeFeeQuoteCallerRaw struct { + Contract *BridgeFeeQuoteCaller // Generic read-only contract binding to access the raw methods on +} + +// BridgeFeeQuoteTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type BridgeFeeQuoteTransactorRaw struct { + Contract *BridgeFeeQuoteTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewBridgeFeeQuote creates a new instance of BridgeFeeQuote, bound to a specific deployed contract. +func NewBridgeFeeQuote(address common.Address, backend bind.ContractBackend) (*BridgeFeeQuote, error) { + contract, err := bindBridgeFeeQuote(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &BridgeFeeQuote{BridgeFeeQuoteCaller: BridgeFeeQuoteCaller{contract: contract}, BridgeFeeQuoteTransactor: BridgeFeeQuoteTransactor{contract: contract}, BridgeFeeQuoteFilterer: BridgeFeeQuoteFilterer{contract: contract}}, nil +} + +// NewBridgeFeeQuoteCaller creates a new read-only instance of BridgeFeeQuote, bound to a specific deployed contract. +func NewBridgeFeeQuoteCaller(address common.Address, caller bind.ContractCaller) (*BridgeFeeQuoteCaller, error) { + contract, err := bindBridgeFeeQuote(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &BridgeFeeQuoteCaller{contract: contract}, nil +} + +// NewBridgeFeeQuoteTransactor creates a new write-only instance of BridgeFeeQuote, bound to a specific deployed contract. +func NewBridgeFeeQuoteTransactor(address common.Address, transactor bind.ContractTransactor) (*BridgeFeeQuoteTransactor, error) { + contract, err := bindBridgeFeeQuote(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &BridgeFeeQuoteTransactor{contract: contract}, nil +} + +// NewBridgeFeeQuoteFilterer creates a new log filterer instance of BridgeFeeQuote, bound to a specific deployed contract. +func NewBridgeFeeQuoteFilterer(address common.Address, filterer bind.ContractFilterer) (*BridgeFeeQuoteFilterer, error) { + contract, err := bindBridgeFeeQuote(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &BridgeFeeQuoteFilterer{contract: contract}, nil +} + +// bindBridgeFeeQuote binds a generic wrapper to an already deployed contract. +func bindBridgeFeeQuote(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := BridgeFeeQuoteMetaData.GetAbi() + 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. +func (_BridgeFeeQuote *BridgeFeeQuoteRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _BridgeFeeQuote.Contract.BridgeFeeQuoteCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_BridgeFeeQuote *BridgeFeeQuoteRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.BridgeFeeQuoteTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_BridgeFeeQuote *BridgeFeeQuoteRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.BridgeFeeQuoteTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_BridgeFeeQuote *BridgeFeeQuoteCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _BridgeFeeQuote.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_BridgeFeeQuote *BridgeFeeQuoteTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_BridgeFeeQuote *BridgeFeeQuoteTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.contract.Transact(opts, method, params...) +} + +// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (_BridgeFeeQuote *BridgeFeeQuoteCaller) DEFAULTADMINROLE(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _BridgeFeeQuote.contract.Call(opts, &out, "DEFAULT_ADMIN_ROLE") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) DEFAULTADMINROLE() ([32]byte, error) { + return _BridgeFeeQuote.Contract.DEFAULTADMINROLE(&_BridgeFeeQuote.CallOpts) +} + +// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (_BridgeFeeQuote *BridgeFeeQuoteCallerSession) DEFAULTADMINROLE() ([32]byte, error) { + return _BridgeFeeQuote.Contract.DEFAULTADMINROLE(&_BridgeFeeQuote.CallOpts) +} + +// OWNERROLE is a free data retrieval call binding the contract method 0xe58378bb. +// +// Solidity: function OWNER_ROLE() view returns(bytes32) +func (_BridgeFeeQuote *BridgeFeeQuoteCaller) OWNERROLE(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _BridgeFeeQuote.contract.Call(opts, &out, "OWNER_ROLE") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// OWNERROLE is a free data retrieval call binding the contract method 0xe58378bb. +// +// Solidity: function OWNER_ROLE() view returns(bytes32) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) OWNERROLE() ([32]byte, error) { + return _BridgeFeeQuote.Contract.OWNERROLE(&_BridgeFeeQuote.CallOpts) +} + +// OWNERROLE is a free data retrieval call binding the contract method 0xe58378bb. +// +// Solidity: function OWNER_ROLE() view returns(bytes32) +func (_BridgeFeeQuote *BridgeFeeQuoteCallerSession) OWNERROLE() ([32]byte, error) { + return _BridgeFeeQuote.Contract.OWNERROLE(&_BridgeFeeQuote.CallOpts) +} + +// UPGRADEROLE is a free data retrieval call binding the contract method 0xb908afa8. +// +// Solidity: function UPGRADE_ROLE() view returns(bytes32) +func (_BridgeFeeQuote *BridgeFeeQuoteCaller) UPGRADEROLE(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _BridgeFeeQuote.contract.Call(opts, &out, "UPGRADE_ROLE") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// UPGRADEROLE is a free data retrieval call binding the contract method 0xb908afa8. +// +// Solidity: function UPGRADE_ROLE() view returns(bytes32) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) UPGRADEROLE() ([32]byte, error) { + return _BridgeFeeQuote.Contract.UPGRADEROLE(&_BridgeFeeQuote.CallOpts) +} + +// UPGRADEROLE is a free data retrieval call binding the contract method 0xb908afa8. +// +// Solidity: function UPGRADE_ROLE() view returns(bytes32) +func (_BridgeFeeQuote *BridgeFeeQuoteCallerSession) UPGRADEROLE() ([32]byte, error) { + return _BridgeFeeQuote.Contract.UPGRADEROLE(&_BridgeFeeQuote.CallOpts) +} + +// ActiveTokenNames is a free data retrieval call binding the contract method 0x8b2b25e0. +// +// Solidity: function activeTokenNames(string _chainName) view returns(string[]) +func (_BridgeFeeQuote *BridgeFeeQuoteCaller) ActiveTokenNames(opts *bind.CallOpts, _chainName string) ([]string, error) { + var out []interface{} + err := _BridgeFeeQuote.contract.Call(opts, &out, "activeTokenNames", _chainName) + + if err != nil { + return *new([]string), err + } + + out0 := *abi.ConvertType(out[0], new([]string)).(*[]string) + + return out0, err + +} + +// ActiveTokenNames is a free data retrieval call binding the contract method 0x8b2b25e0. +// +// Solidity: function activeTokenNames(string _chainName) view returns(string[]) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) ActiveTokenNames(_chainName string) ([]string, error) { + return _BridgeFeeQuote.Contract.ActiveTokenNames(&_BridgeFeeQuote.CallOpts, _chainName) +} + +// ActiveTokenNames is a free data retrieval call binding the contract method 0x8b2b25e0. +// +// Solidity: function activeTokenNames(string _chainName) view returns(string[]) +func (_BridgeFeeQuote *BridgeFeeQuoteCallerSession) ActiveTokenNames(_chainName string) ([]string, error) { + return _BridgeFeeQuote.Contract.ActiveTokenNames(&_BridgeFeeQuote.CallOpts, _chainName) +} + +// Assets is a free data retrieval call binding the contract method 0x85936228. +// +// Solidity: function assets(string ) view returns(bool isActive) +func (_BridgeFeeQuote *BridgeFeeQuoteCaller) Assets(opts *bind.CallOpts, arg0 string) (bool, error) { + var out []interface{} + err := _BridgeFeeQuote.contract.Call(opts, &out, "assets", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Assets is a free data retrieval call binding the contract method 0x85936228. +// +// Solidity: function assets(string ) view returns(bool isActive) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) Assets(arg0 string) (bool, error) { + return _BridgeFeeQuote.Contract.Assets(&_BridgeFeeQuote.CallOpts, arg0) +} + +// Assets is a free data retrieval call binding the contract method 0x85936228. +// +// Solidity: function assets(string ) view returns(bool isActive) +func (_BridgeFeeQuote *BridgeFeeQuoteCallerSession) Assets(arg0 string) (bool, error) { + return _BridgeFeeQuote.Contract.Assets(&_BridgeFeeQuote.CallOpts, arg0) +} + +// ChainNames is a free data retrieval call binding the contract method 0x7223c6ba. +// +// Solidity: function chainNames(uint256 ) view returns(string) +func (_BridgeFeeQuote *BridgeFeeQuoteCaller) ChainNames(opts *bind.CallOpts, arg0 *big.Int) (string, error) { + var out []interface{} + err := _BridgeFeeQuote.contract.Call(opts, &out, "chainNames", arg0) + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// ChainNames is a free data retrieval call binding the contract method 0x7223c6ba. +// +// Solidity: function chainNames(uint256 ) view returns(string) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) ChainNames(arg0 *big.Int) (string, error) { + return _BridgeFeeQuote.Contract.ChainNames(&_BridgeFeeQuote.CallOpts, arg0) +} + +// ChainNames is a free data retrieval call binding the contract method 0x7223c6ba. +// +// Solidity: function chainNames(uint256 ) view returns(string) +func (_BridgeFeeQuote *BridgeFeeQuoteCallerSession) ChainNames(arg0 *big.Int) (string, error) { + return _BridgeFeeQuote.Contract.ChainNames(&_BridgeFeeQuote.CallOpts, arg0) +} + +// GetQuote is a free data retrieval call binding the contract method 0xdb223194. +// +// Solidity: function getQuote(string _chainName, string _tokenName, address _oracle, uint256 _index) view returns((uint256,string,string,address,uint256,uint256,uint256)) +func (_BridgeFeeQuote *BridgeFeeQuoteCaller) GetQuote(opts *bind.CallOpts, _chainName string, _tokenName string, _oracle common.Address, _index *big.Int) (IBridgeFeeQuoteQuoteInfo, error) { + var out []interface{} + err := _BridgeFeeQuote.contract.Call(opts, &out, "getQuote", _chainName, _tokenName, _oracle, _index) + + if err != nil { + return *new(IBridgeFeeQuoteQuoteInfo), err + } + + out0 := *abi.ConvertType(out[0], new(IBridgeFeeQuoteQuoteInfo)).(*IBridgeFeeQuoteQuoteInfo) + + return out0, err + +} + +// GetQuote is a free data retrieval call binding the contract method 0xdb223194. +// +// Solidity: function getQuote(string _chainName, string _tokenName, address _oracle, uint256 _index) view returns((uint256,string,string,address,uint256,uint256,uint256)) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) GetQuote(_chainName string, _tokenName string, _oracle common.Address, _index *big.Int) (IBridgeFeeQuoteQuoteInfo, error) { + return _BridgeFeeQuote.Contract.GetQuote(&_BridgeFeeQuote.CallOpts, _chainName, _tokenName, _oracle, _index) +} + +// GetQuote is a free data retrieval call binding the contract method 0xdb223194. +// +// Solidity: function getQuote(string _chainName, string _tokenName, address _oracle, uint256 _index) view returns((uint256,string,string,address,uint256,uint256,uint256)) +func (_BridgeFeeQuote *BridgeFeeQuoteCallerSession) GetQuote(_chainName string, _tokenName string, _oracle common.Address, _index *big.Int) (IBridgeFeeQuoteQuoteInfo, error) { + return _BridgeFeeQuote.Contract.GetQuote(&_BridgeFeeQuote.CallOpts, _chainName, _tokenName, _oracle, _index) +} + +// GetQuoteById is a free data retrieval call binding the contract method 0xa8541c17. +// +// Solidity: function getQuoteById(uint256 _id) view returns((uint256,string,string,address,uint256,uint256,uint256) q) +func (_BridgeFeeQuote *BridgeFeeQuoteCaller) GetQuoteById(opts *bind.CallOpts, _id *big.Int) (IBridgeFeeQuoteQuoteInfo, error) { + var out []interface{} + err := _BridgeFeeQuote.contract.Call(opts, &out, "getQuoteById", _id) + + if err != nil { + return *new(IBridgeFeeQuoteQuoteInfo), err + } + + out0 := *abi.ConvertType(out[0], new(IBridgeFeeQuoteQuoteInfo)).(*IBridgeFeeQuoteQuoteInfo) + + return out0, err + +} + +// GetQuoteById is a free data retrieval call binding the contract method 0xa8541c17. +// +// Solidity: function getQuoteById(uint256 _id) view returns((uint256,string,string,address,uint256,uint256,uint256) q) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) GetQuoteById(_id *big.Int) (IBridgeFeeQuoteQuoteInfo, error) { + return _BridgeFeeQuote.Contract.GetQuoteById(&_BridgeFeeQuote.CallOpts, _id) +} + +// GetQuoteById is a free data retrieval call binding the contract method 0xa8541c17. +// +// Solidity: function getQuoteById(uint256 _id) view returns((uint256,string,string,address,uint256,uint256,uint256) q) +func (_BridgeFeeQuote *BridgeFeeQuoteCallerSession) GetQuoteById(_id *big.Int) (IBridgeFeeQuoteQuoteInfo, error) { + return _BridgeFeeQuote.Contract.GetQuoteById(&_BridgeFeeQuote.CallOpts, _id) +} + +// GetQuoteList is a free data retrieval call binding the contract method 0x398a0e6b. +// +// Solidity: function getQuoteList(string _chainName) view returns((uint256,string,string,address,uint256,uint256,uint256)[]) +func (_BridgeFeeQuote *BridgeFeeQuoteCaller) GetQuoteList(opts *bind.CallOpts, _chainName string) ([]IBridgeFeeQuoteQuoteInfo, error) { + var out []interface{} + err := _BridgeFeeQuote.contract.Call(opts, &out, "getQuoteList", _chainName) + + if err != nil { + return *new([]IBridgeFeeQuoteQuoteInfo), err + } + + out0 := *abi.ConvertType(out[0], new([]IBridgeFeeQuoteQuoteInfo)).(*[]IBridgeFeeQuoteQuoteInfo) + + return out0, err + +} + +// GetQuoteList is a free data retrieval call binding the contract method 0x398a0e6b. +// +// Solidity: function getQuoteList(string _chainName) view returns((uint256,string,string,address,uint256,uint256,uint256)[]) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) GetQuoteList(_chainName string) ([]IBridgeFeeQuoteQuoteInfo, error) { + return _BridgeFeeQuote.Contract.GetQuoteList(&_BridgeFeeQuote.CallOpts, _chainName) +} + +// GetQuoteList is a free data retrieval call binding the contract method 0x398a0e6b. +// +// Solidity: function getQuoteList(string _chainName) view returns((uint256,string,string,address,uint256,uint256,uint256)[]) +func (_BridgeFeeQuote *BridgeFeeQuoteCallerSession) GetQuoteList(_chainName string) ([]IBridgeFeeQuoteQuoteInfo, error) { + return _BridgeFeeQuote.Contract.GetQuoteList(&_BridgeFeeQuote.CallOpts, _chainName) +} + +// GetQuotesByToken is a free data retrieval call binding the contract method 0x3dd7c98c. +// +// Solidity: function getQuotesByToken(string _chainName, string _tokenName) view returns((uint256,string,string,address,uint256,uint256,uint256)[]) +func (_BridgeFeeQuote *BridgeFeeQuoteCaller) GetQuotesByToken(opts *bind.CallOpts, _chainName string, _tokenName string) ([]IBridgeFeeQuoteQuoteInfo, error) { + var out []interface{} + err := _BridgeFeeQuote.contract.Call(opts, &out, "getQuotesByToken", _chainName, _tokenName) + + if err != nil { + return *new([]IBridgeFeeQuoteQuoteInfo), err + } + + out0 := *abi.ConvertType(out[0], new([]IBridgeFeeQuoteQuoteInfo)).(*[]IBridgeFeeQuoteQuoteInfo) + + return out0, err + +} + +// GetQuotesByToken is a free data retrieval call binding the contract method 0x3dd7c98c. +// +// Solidity: function getQuotesByToken(string _chainName, string _tokenName) view returns((uint256,string,string,address,uint256,uint256,uint256)[]) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) GetQuotesByToken(_chainName string, _tokenName string) ([]IBridgeFeeQuoteQuoteInfo, error) { + return _BridgeFeeQuote.Contract.GetQuotesByToken(&_BridgeFeeQuote.CallOpts, _chainName, _tokenName) +} + +// GetQuotesByToken is a free data retrieval call binding the contract method 0x3dd7c98c. +// +// Solidity: function getQuotesByToken(string _chainName, string _tokenName) view returns((uint256,string,string,address,uint256,uint256,uint256)[]) +func (_BridgeFeeQuote *BridgeFeeQuoteCallerSession) GetQuotesByToken(_chainName string, _tokenName string) ([]IBridgeFeeQuoteQuoteInfo, error) { + return _BridgeFeeQuote.Contract.GetQuotesByToken(&_BridgeFeeQuote.CallOpts, _chainName, _tokenName) +} + +// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (_BridgeFeeQuote *BridgeFeeQuoteCaller) GetRoleAdmin(opts *bind.CallOpts, role [32]byte) ([32]byte, error) { + var out []interface{} + err := _BridgeFeeQuote.contract.Call(opts, &out, "getRoleAdmin", role) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) GetRoleAdmin(role [32]byte) ([32]byte, error) { + return _BridgeFeeQuote.Contract.GetRoleAdmin(&_BridgeFeeQuote.CallOpts, role) +} + +// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (_BridgeFeeQuote *BridgeFeeQuoteCallerSession) GetRoleAdmin(role [32]byte) ([32]byte, error) { + return _BridgeFeeQuote.Contract.GetRoleAdmin(&_BridgeFeeQuote.CallOpts, role) +} + +// HasRole is a free data retrieval call binding the contract method 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (_BridgeFeeQuote *BridgeFeeQuoteCaller) HasRole(opts *bind.CallOpts, role [32]byte, account common.Address) (bool, error) { + var out []interface{} + err := _BridgeFeeQuote.contract.Call(opts, &out, "hasRole", role, account) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// HasRole is a free data retrieval call binding the contract method 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) HasRole(role [32]byte, account common.Address) (bool, error) { + return _BridgeFeeQuote.Contract.HasRole(&_BridgeFeeQuote.CallOpts, role, account) +} + +// HasRole is a free data retrieval call binding the contract method 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (_BridgeFeeQuote *BridgeFeeQuoteCallerSession) HasRole(role [32]byte, account common.Address) (bool, error) { + return _BridgeFeeQuote.Contract.HasRole(&_BridgeFeeQuote.CallOpts, role, account) +} + +// IsActiveTokenName is a free data retrieval call binding the contract method 0xd4b8c24f. +// +// Solidity: function isActiveTokenName(string _chainName, string _tokenName) view returns(bool) +func (_BridgeFeeQuote *BridgeFeeQuoteCaller) IsActiveTokenName(opts *bind.CallOpts, _chainName string, _tokenName string) (bool, error) { + var out []interface{} + err := _BridgeFeeQuote.contract.Call(opts, &out, "isActiveTokenName", _chainName, _tokenName) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsActiveTokenName is a free data retrieval call binding the contract method 0xd4b8c24f. +// +// Solidity: function isActiveTokenName(string _chainName, string _tokenName) view returns(bool) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) IsActiveTokenName(_chainName string, _tokenName string) (bool, error) { + return _BridgeFeeQuote.Contract.IsActiveTokenName(&_BridgeFeeQuote.CallOpts, _chainName, _tokenName) +} + +// IsActiveTokenName is a free data retrieval call binding the contract method 0xd4b8c24f. +// +// Solidity: function isActiveTokenName(string _chainName, string _tokenName) view returns(bool) +func (_BridgeFeeQuote *BridgeFeeQuoteCallerSession) IsActiveTokenName(_chainName string, _tokenName string) (bool, error) { + return _BridgeFeeQuote.Contract.IsActiveTokenName(&_BridgeFeeQuote.CallOpts, _chainName, _tokenName) +} + +// MakeMessageHash is a free data retrieval call binding the contract method 0x3fc57c3d. +// +// Solidity: function makeMessageHash(string _chainName, string _tokenName, uint256 _fee, uint256 _gasLimit, uint256 _expiry) pure returns(bytes32) +func (_BridgeFeeQuote *BridgeFeeQuoteCaller) MakeMessageHash(opts *bind.CallOpts, _chainName string, _tokenName string, _fee *big.Int, _gasLimit *big.Int, _expiry *big.Int) ([32]byte, error) { + var out []interface{} + err := _BridgeFeeQuote.contract.Call(opts, &out, "makeMessageHash", _chainName, _tokenName, _fee, _gasLimit, _expiry) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// MakeMessageHash is a free data retrieval call binding the contract method 0x3fc57c3d. +// +// Solidity: function makeMessageHash(string _chainName, string _tokenName, uint256 _fee, uint256 _gasLimit, uint256 _expiry) pure returns(bytes32) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) MakeMessageHash(_chainName string, _tokenName string, _fee *big.Int, _gasLimit *big.Int, _expiry *big.Int) ([32]byte, error) { + return _BridgeFeeQuote.Contract.MakeMessageHash(&_BridgeFeeQuote.CallOpts, _chainName, _tokenName, _fee, _gasLimit, _expiry) +} + +// MakeMessageHash is a free data retrieval call binding the contract method 0x3fc57c3d. +// +// Solidity: function makeMessageHash(string _chainName, string _tokenName, uint256 _fee, uint256 _gasLimit, uint256 _expiry) pure returns(bytes32) +func (_BridgeFeeQuote *BridgeFeeQuoteCallerSession) MakeMessageHash(_chainName string, _tokenName string, _fee *big.Int, _gasLimit *big.Int, _expiry *big.Int) ([32]byte, error) { + return _BridgeFeeQuote.Contract.MakeMessageHash(&_BridgeFeeQuote.CallOpts, _chainName, _tokenName, _fee, _gasLimit, _expiry) +} + +// MaxQuoteIndex is a free data retrieval call binding the contract method 0xec5af586. +// +// Solidity: function maxQuoteIndex() view returns(uint256) +func (_BridgeFeeQuote *BridgeFeeQuoteCaller) MaxQuoteIndex(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _BridgeFeeQuote.contract.Call(opts, &out, "maxQuoteIndex") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MaxQuoteIndex is a free data retrieval call binding the contract method 0xec5af586. +// +// Solidity: function maxQuoteIndex() view returns(uint256) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) MaxQuoteIndex() (*big.Int, error) { + return _BridgeFeeQuote.Contract.MaxQuoteIndex(&_BridgeFeeQuote.CallOpts) +} + +// MaxQuoteIndex is a free data retrieval call binding the contract method 0xec5af586. +// +// Solidity: function maxQuoteIndex() view returns(uint256) +func (_BridgeFeeQuote *BridgeFeeQuoteCallerSession) MaxQuoteIndex() (*big.Int, error) { + return _BridgeFeeQuote.Contract.MaxQuoteIndex(&_BridgeFeeQuote.CallOpts) +} + +// OracleContract is a free data retrieval call binding the contract method 0xbece7532. +// +// Solidity: function oracleContract() view returns(address) +func (_BridgeFeeQuote *BridgeFeeQuoteCaller) OracleContract(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _BridgeFeeQuote.contract.Call(opts, &out, "oracleContract") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// OracleContract is a free data retrieval call binding the contract method 0xbece7532. +// +// Solidity: function oracleContract() view returns(address) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) OracleContract() (common.Address, error) { + return _BridgeFeeQuote.Contract.OracleContract(&_BridgeFeeQuote.CallOpts) +} + +// OracleContract is a free data retrieval call binding the contract method 0xbece7532. +// +// Solidity: function oracleContract() view returns(address) +func (_BridgeFeeQuote *BridgeFeeQuoteCallerSession) OracleContract() (common.Address, error) { + return _BridgeFeeQuote.Contract.OracleContract(&_BridgeFeeQuote.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_BridgeFeeQuote *BridgeFeeQuoteCaller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _BridgeFeeQuote.contract.Call(opts, &out, "proxiableUUID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) ProxiableUUID() ([32]byte, error) { + return _BridgeFeeQuote.Contract.ProxiableUUID(&_BridgeFeeQuote.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_BridgeFeeQuote *BridgeFeeQuoteCallerSession) ProxiableUUID() ([32]byte, error) { + return _BridgeFeeQuote.Contract.ProxiableUUID(&_BridgeFeeQuote.CallOpts) +} + +// QuoteNonce is a free data retrieval call binding the contract method 0x2c189169. +// +// Solidity: function quoteNonce() view returns(uint256) +func (_BridgeFeeQuote *BridgeFeeQuoteCaller) QuoteNonce(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _BridgeFeeQuote.contract.Call(opts, &out, "quoteNonce") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// QuoteNonce is a free data retrieval call binding the contract method 0x2c189169. +// +// Solidity: function quoteNonce() view returns(uint256) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) QuoteNonce() (*big.Int, error) { + return _BridgeFeeQuote.Contract.QuoteNonce(&_BridgeFeeQuote.CallOpts) +} + +// QuoteNonce is a free data retrieval call binding the contract method 0x2c189169. +// +// Solidity: function quoteNonce() view returns(uint256) +func (_BridgeFeeQuote *BridgeFeeQuoteCallerSession) QuoteNonce() (*big.Int, error) { + return _BridgeFeeQuote.Contract.QuoteNonce(&_BridgeFeeQuote.CallOpts) +} + +// SupportAssets is a free data retrieval call binding the contract method 0x1b826a1b. +// +// Solidity: function supportAssets(string _chainName) view returns((bool,string[])) +func (_BridgeFeeQuote *BridgeFeeQuoteCaller) SupportAssets(opts *bind.CallOpts, _chainName string) (IBridgeFeeQuoteAsset, error) { + var out []interface{} + err := _BridgeFeeQuote.contract.Call(opts, &out, "supportAssets", _chainName) + + if err != nil { + return *new(IBridgeFeeQuoteAsset), err + } + + out0 := *abi.ConvertType(out[0], new(IBridgeFeeQuoteAsset)).(*IBridgeFeeQuoteAsset) + + return out0, err + +} + +// SupportAssets is a free data retrieval call binding the contract method 0x1b826a1b. +// +// Solidity: function supportAssets(string _chainName) view returns((bool,string[])) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) SupportAssets(_chainName string) (IBridgeFeeQuoteAsset, error) { + return _BridgeFeeQuote.Contract.SupportAssets(&_BridgeFeeQuote.CallOpts, _chainName) +} + +// SupportAssets is a free data retrieval call binding the contract method 0x1b826a1b. +// +// Solidity: function supportAssets(string _chainName) view returns((bool,string[])) +func (_BridgeFeeQuote *BridgeFeeQuoteCallerSession) SupportAssets(_chainName string) (IBridgeFeeQuoteAsset, error) { + return _BridgeFeeQuote.Contract.SupportAssets(&_BridgeFeeQuote.CallOpts, _chainName) +} + +// SupportChainNames is a free data retrieval call binding the contract method 0x0a1d133c. +// +// Solidity: function supportChainNames() view returns(string[]) +func (_BridgeFeeQuote *BridgeFeeQuoteCaller) SupportChainNames(opts *bind.CallOpts) ([]string, error) { + var out []interface{} + err := _BridgeFeeQuote.contract.Call(opts, &out, "supportChainNames") + + if err != nil { + return *new([]string), err + } + + out0 := *abi.ConvertType(out[0], new([]string)).(*[]string) + + return out0, err + +} + +// SupportChainNames is a free data retrieval call binding the contract method 0x0a1d133c. +// +// Solidity: function supportChainNames() view returns(string[]) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) SupportChainNames() ([]string, error) { + return _BridgeFeeQuote.Contract.SupportChainNames(&_BridgeFeeQuote.CallOpts) +} + +// SupportChainNames is a free data retrieval call binding the contract method 0x0a1d133c. +// +// Solidity: function supportChainNames() view returns(string[]) +func (_BridgeFeeQuote *BridgeFeeQuoteCallerSession) SupportChainNames() ([]string, error) { + return _BridgeFeeQuote.Contract.SupportChainNames(&_BridgeFeeQuote.CallOpts) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_BridgeFeeQuote *BridgeFeeQuoteCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { + var out []interface{} + err := _BridgeFeeQuote.contract.Call(opts, &out, "supportsInterface", interfaceId) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _BridgeFeeQuote.Contract.SupportsInterface(&_BridgeFeeQuote.CallOpts, interfaceId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_BridgeFeeQuote *BridgeFeeQuoteCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _BridgeFeeQuote.Contract.SupportsInterface(&_BridgeFeeQuote.CallOpts, interfaceId) +} + +// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (_BridgeFeeQuote *BridgeFeeQuoteTransactor) GrantRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { + return _BridgeFeeQuote.contract.Transact(opts, "grantRole", role, account) +} + +// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (_BridgeFeeQuote *BridgeFeeQuoteSession) GrantRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.GrantRole(&_BridgeFeeQuote.TransactOpts, role, account) +} + +// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (_BridgeFeeQuote *BridgeFeeQuoteTransactorSession) GrantRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.GrantRole(&_BridgeFeeQuote.TransactOpts, role, account) +} + +// Initialize is a paid mutator transaction binding the contract method 0xcd6dc687. +// +// Solidity: function initialize(address _oracleContract, uint256 _maxQuoteIndex) returns() +func (_BridgeFeeQuote *BridgeFeeQuoteTransactor) Initialize(opts *bind.TransactOpts, _oracleContract common.Address, _maxQuoteIndex *big.Int) (*types.Transaction, error) { + return _BridgeFeeQuote.contract.Transact(opts, "initialize", _oracleContract, _maxQuoteIndex) +} + +// Initialize is a paid mutator transaction binding the contract method 0xcd6dc687. +// +// Solidity: function initialize(address _oracleContract, uint256 _maxQuoteIndex) returns() +func (_BridgeFeeQuote *BridgeFeeQuoteSession) Initialize(_oracleContract common.Address, _maxQuoteIndex *big.Int) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.Initialize(&_BridgeFeeQuote.TransactOpts, _oracleContract, _maxQuoteIndex) +} + +// Initialize is a paid mutator transaction binding the contract method 0xcd6dc687. +// +// Solidity: function initialize(address _oracleContract, uint256 _maxQuoteIndex) returns() +func (_BridgeFeeQuote *BridgeFeeQuoteTransactorSession) Initialize(_oracleContract common.Address, _maxQuoteIndex *big.Int) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.Initialize(&_BridgeFeeQuote.TransactOpts, _oracleContract, _maxQuoteIndex) +} + +// Quote is a paid mutator transaction binding the contract method 0xc994e71a. +// +// Solidity: function quote((string,string,address,uint256,uint256,uint256,uint256,bytes)[] _inputs) returns(bool) +func (_BridgeFeeQuote *BridgeFeeQuoteTransactor) Quote(opts *bind.TransactOpts, _inputs []IBridgeFeeQuoteQuoteInput) (*types.Transaction, error) { + return _BridgeFeeQuote.contract.Transact(opts, "quote", _inputs) +} + +// Quote is a paid mutator transaction binding the contract method 0xc994e71a. +// +// Solidity: function quote((string,string,address,uint256,uint256,uint256,uint256,bytes)[] _inputs) returns(bool) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) Quote(_inputs []IBridgeFeeQuoteQuoteInput) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.Quote(&_BridgeFeeQuote.TransactOpts, _inputs) +} + +// Quote is a paid mutator transaction binding the contract method 0xc994e71a. +// +// Solidity: function quote((string,string,address,uint256,uint256,uint256,uint256,bytes)[] _inputs) returns(bool) +func (_BridgeFeeQuote *BridgeFeeQuoteTransactorSession) Quote(_inputs []IBridgeFeeQuoteQuoteInput) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.Quote(&_BridgeFeeQuote.TransactOpts, _inputs) +} + +// RegisterChain is a paid mutator transaction binding the contract method 0xa59f39c7. +// +// Solidity: function registerChain(string _chainName, string[] _tokenNames) returns(bool) +func (_BridgeFeeQuote *BridgeFeeQuoteTransactor) RegisterChain(opts *bind.TransactOpts, _chainName string, _tokenNames []string) (*types.Transaction, error) { + return _BridgeFeeQuote.contract.Transact(opts, "registerChain", _chainName, _tokenNames) +} + +// RegisterChain is a paid mutator transaction binding the contract method 0xa59f39c7. +// +// Solidity: function registerChain(string _chainName, string[] _tokenNames) returns(bool) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) RegisterChain(_chainName string, _tokenNames []string) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.RegisterChain(&_BridgeFeeQuote.TransactOpts, _chainName, _tokenNames) +} + +// RegisterChain is a paid mutator transaction binding the contract method 0xa59f39c7. +// +// Solidity: function registerChain(string _chainName, string[] _tokenNames) returns(bool) +func (_BridgeFeeQuote *BridgeFeeQuoteTransactorSession) RegisterChain(_chainName string, _tokenNames []string) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.RegisterChain(&_BridgeFeeQuote.TransactOpts, _chainName, _tokenNames) +} + +// RegisterTokenName is a paid mutator transaction binding the contract method 0xd43e62c0. +// +// Solidity: function registerTokenName(string _chainName, string[] _tokenNames) returns(bool) +func (_BridgeFeeQuote *BridgeFeeQuoteTransactor) RegisterTokenName(opts *bind.TransactOpts, _chainName string, _tokenNames []string) (*types.Transaction, error) { + return _BridgeFeeQuote.contract.Transact(opts, "registerTokenName", _chainName, _tokenNames) +} + +// RegisterTokenName is a paid mutator transaction binding the contract method 0xd43e62c0. +// +// Solidity: function registerTokenName(string _chainName, string[] _tokenNames) returns(bool) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) RegisterTokenName(_chainName string, _tokenNames []string) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.RegisterTokenName(&_BridgeFeeQuote.TransactOpts, _chainName, _tokenNames) +} + +// RegisterTokenName is a paid mutator transaction binding the contract method 0xd43e62c0. +// +// Solidity: function registerTokenName(string _chainName, string[] _tokenNames) returns(bool) +func (_BridgeFeeQuote *BridgeFeeQuoteTransactorSession) RegisterTokenName(_chainName string, _tokenNames []string) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.RegisterTokenName(&_BridgeFeeQuote.TransactOpts, _chainName, _tokenNames) +} + +// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (_BridgeFeeQuote *BridgeFeeQuoteTransactor) RenounceRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { + return _BridgeFeeQuote.contract.Transact(opts, "renounceRole", role, account) +} + +// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (_BridgeFeeQuote *BridgeFeeQuoteSession) RenounceRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.RenounceRole(&_BridgeFeeQuote.TransactOpts, role, account) +} + +// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (_BridgeFeeQuote *BridgeFeeQuoteTransactorSession) RenounceRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.RenounceRole(&_BridgeFeeQuote.TransactOpts, role, account) +} + +// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (_BridgeFeeQuote *BridgeFeeQuoteTransactor) RevokeRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { + return _BridgeFeeQuote.contract.Transact(opts, "revokeRole", role, account) +} + +// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (_BridgeFeeQuote *BridgeFeeQuoteSession) RevokeRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.RevokeRole(&_BridgeFeeQuote.TransactOpts, role, account) +} + +// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (_BridgeFeeQuote *BridgeFeeQuoteTransactorSession) RevokeRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.RevokeRole(&_BridgeFeeQuote.TransactOpts, role, account) +} + +// UpdateMaxQuoteIndex is a paid mutator transaction binding the contract method 0x976646b9. +// +// Solidity: function updateMaxQuoteIndex(uint256 _maxQuoteIndex) returns(bool) +func (_BridgeFeeQuote *BridgeFeeQuoteTransactor) UpdateMaxQuoteIndex(opts *bind.TransactOpts, _maxQuoteIndex *big.Int) (*types.Transaction, error) { + return _BridgeFeeQuote.contract.Transact(opts, "updateMaxQuoteIndex", _maxQuoteIndex) +} + +// UpdateMaxQuoteIndex is a paid mutator transaction binding the contract method 0x976646b9. +// +// Solidity: function updateMaxQuoteIndex(uint256 _maxQuoteIndex) returns(bool) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) UpdateMaxQuoteIndex(_maxQuoteIndex *big.Int) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.UpdateMaxQuoteIndex(&_BridgeFeeQuote.TransactOpts, _maxQuoteIndex) +} + +// UpdateMaxQuoteIndex is a paid mutator transaction binding the contract method 0x976646b9. +// +// Solidity: function updateMaxQuoteIndex(uint256 _maxQuoteIndex) returns(bool) +func (_BridgeFeeQuote *BridgeFeeQuoteTransactorSession) UpdateMaxQuoteIndex(_maxQuoteIndex *big.Int) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.UpdateMaxQuoteIndex(&_BridgeFeeQuote.TransactOpts, _maxQuoteIndex) +} + +// UpdateOracleContract is a paid mutator transaction binding the contract method 0xd3bab58f. +// +// Solidity: function updateOracleContract(address _oracleContract) returns(bool) +func (_BridgeFeeQuote *BridgeFeeQuoteTransactor) UpdateOracleContract(opts *bind.TransactOpts, _oracleContract common.Address) (*types.Transaction, error) { + return _BridgeFeeQuote.contract.Transact(opts, "updateOracleContract", _oracleContract) +} + +// UpdateOracleContract is a paid mutator transaction binding the contract method 0xd3bab58f. +// +// Solidity: function updateOracleContract(address _oracleContract) returns(bool) +func (_BridgeFeeQuote *BridgeFeeQuoteSession) UpdateOracleContract(_oracleContract common.Address) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.UpdateOracleContract(&_BridgeFeeQuote.TransactOpts, _oracleContract) +} + +// UpdateOracleContract is a paid mutator transaction binding the contract method 0xd3bab58f. +// +// Solidity: function updateOracleContract(address _oracleContract) returns(bool) +func (_BridgeFeeQuote *BridgeFeeQuoteTransactorSession) UpdateOracleContract(_oracleContract common.Address) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.UpdateOracleContract(&_BridgeFeeQuote.TransactOpts, _oracleContract) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_BridgeFeeQuote *BridgeFeeQuoteTransactor) UpgradeTo(opts *bind.TransactOpts, newImplementation common.Address) (*types.Transaction, error) { + return _BridgeFeeQuote.contract.Transact(opts, "upgradeTo", newImplementation) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_BridgeFeeQuote *BridgeFeeQuoteSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.UpgradeTo(&_BridgeFeeQuote.TransactOpts, newImplementation) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_BridgeFeeQuote *BridgeFeeQuoteTransactorSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.UpgradeTo(&_BridgeFeeQuote.TransactOpts, newImplementation) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_BridgeFeeQuote *BridgeFeeQuoteTransactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _BridgeFeeQuote.contract.Transact(opts, "upgradeToAndCall", newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_BridgeFeeQuote *BridgeFeeQuoteSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.UpgradeToAndCall(&_BridgeFeeQuote.TransactOpts, newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_BridgeFeeQuote *BridgeFeeQuoteTransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.UpgradeToAndCall(&_BridgeFeeQuote.TransactOpts, newImplementation, data) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_BridgeFeeQuote *BridgeFeeQuoteTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _BridgeFeeQuote.contract.RawTransact(opts, nil) // calldata is disallowed for receive function +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_BridgeFeeQuote *BridgeFeeQuoteSession) Receive() (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.Receive(&_BridgeFeeQuote.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_BridgeFeeQuote *BridgeFeeQuoteTransactorSession) Receive() (*types.Transaction, error) { + return _BridgeFeeQuote.Contract.Receive(&_BridgeFeeQuote.TransactOpts) +} + +// BridgeFeeQuoteAdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the BridgeFeeQuote contract. +type BridgeFeeQuoteAdminChangedIterator struct { + Event *BridgeFeeQuoteAdminChanged // Event containing the contract specifics and raw log + + 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. +func (it *BridgeFeeQuoteAdminChangedIterator) Next() bool { + // 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: + it.Event = new(BridgeFeeQuoteAdminChanged) + 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: + it.Event = new(BridgeFeeQuoteAdminChanged) + 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. +func (it *BridgeFeeQuoteAdminChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeFeeQuoteAdminChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeFeeQuoteAdminChanged represents a AdminChanged event raised by the BridgeFeeQuote contract. +type BridgeFeeQuoteAdminChanged struct { + PreviousAdmin common.Address + NewAdmin common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAdminChanged is a free log retrieval operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_BridgeFeeQuote *BridgeFeeQuoteFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*BridgeFeeQuoteAdminChangedIterator, error) { + + logs, sub, err := _BridgeFeeQuote.contract.FilterLogs(opts, "AdminChanged") + if err != nil { + return nil, err + } + return &BridgeFeeQuoteAdminChangedIterator{contract: _BridgeFeeQuote.contract, event: "AdminChanged", logs: logs, sub: sub}, nil +} + +// WatchAdminChanged is a free log subscription operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_BridgeFeeQuote *BridgeFeeQuoteFilterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *BridgeFeeQuoteAdminChanged) (event.Subscription, error) { + + logs, sub, err := _BridgeFeeQuote.contract.WatchLogs(opts, "AdminChanged") + 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 + event := new(BridgeFeeQuoteAdminChanged) + if err := _BridgeFeeQuote.contract.UnpackLog(event, "AdminChanged", log); err != nil { + 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 +} + +// ParseAdminChanged is a log parse operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_BridgeFeeQuote *BridgeFeeQuoteFilterer) ParseAdminChanged(log types.Log) (*BridgeFeeQuoteAdminChanged, error) { + event := new(BridgeFeeQuoteAdminChanged) + if err := _BridgeFeeQuote.contract.UnpackLog(event, "AdminChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeFeeQuoteBeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the BridgeFeeQuote contract. +type BridgeFeeQuoteBeaconUpgradedIterator struct { + Event *BridgeFeeQuoteBeaconUpgraded // Event containing the contract specifics and raw log + + 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. +func (it *BridgeFeeQuoteBeaconUpgradedIterator) Next() bool { + // 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: + it.Event = new(BridgeFeeQuoteBeaconUpgraded) + 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: + it.Event = new(BridgeFeeQuoteBeaconUpgraded) + 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. +func (it *BridgeFeeQuoteBeaconUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeFeeQuoteBeaconUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeFeeQuoteBeaconUpgraded represents a BeaconUpgraded event raised by the BridgeFeeQuote contract. +type BridgeFeeQuoteBeaconUpgraded struct { + Beacon common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBeaconUpgraded is a free log retrieval operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_BridgeFeeQuote *BridgeFeeQuoteFilterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*BridgeFeeQuoteBeaconUpgradedIterator, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _BridgeFeeQuote.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule) + if err != nil { + return nil, err + } + return &BridgeFeeQuoteBeaconUpgradedIterator{contract: _BridgeFeeQuote.contract, event: "BeaconUpgraded", logs: logs, sub: sub}, nil +} + +// WatchBeaconUpgraded is a free log subscription operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_BridgeFeeQuote *BridgeFeeQuoteFilterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *BridgeFeeQuoteBeaconUpgraded, beacon []common.Address) (event.Subscription, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _BridgeFeeQuote.contract.WatchLogs(opts, "BeaconUpgraded", beaconRule) + 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 + event := new(BridgeFeeQuoteBeaconUpgraded) + if err := _BridgeFeeQuote.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil { + 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 +} + +// ParseBeaconUpgraded is a log parse operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_BridgeFeeQuote *BridgeFeeQuoteFilterer) ParseBeaconUpgraded(log types.Log) (*BridgeFeeQuoteBeaconUpgraded, error) { + event := new(BridgeFeeQuoteBeaconUpgraded) + if err := _BridgeFeeQuote.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeFeeQuoteInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the BridgeFeeQuote contract. +type BridgeFeeQuoteInitializedIterator struct { + Event *BridgeFeeQuoteInitialized // Event containing the contract specifics and raw log + + 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. +func (it *BridgeFeeQuoteInitializedIterator) Next() bool { + // 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: + it.Event = new(BridgeFeeQuoteInitialized) + 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: + it.Event = new(BridgeFeeQuoteInitialized) + 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. +func (it *BridgeFeeQuoteInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeFeeQuoteInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeFeeQuoteInitialized represents a Initialized event raised by the BridgeFeeQuote contract. +type BridgeFeeQuoteInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_BridgeFeeQuote *BridgeFeeQuoteFilterer) FilterInitialized(opts *bind.FilterOpts) (*BridgeFeeQuoteInitializedIterator, error) { + + logs, sub, err := _BridgeFeeQuote.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &BridgeFeeQuoteInitializedIterator{contract: _BridgeFeeQuote.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_BridgeFeeQuote *BridgeFeeQuoteFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *BridgeFeeQuoteInitialized) (event.Subscription, error) { + + logs, sub, err := _BridgeFeeQuote.contract.WatchLogs(opts, "Initialized") + 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 + event := new(BridgeFeeQuoteInitialized) + if err := _BridgeFeeQuote.contract.UnpackLog(event, "Initialized", log); err != nil { + 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 +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_BridgeFeeQuote *BridgeFeeQuoteFilterer) ParseInitialized(log types.Log) (*BridgeFeeQuoteInitialized, error) { + event := new(BridgeFeeQuoteInitialized) + if err := _BridgeFeeQuote.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeFeeQuoteNewQuoteIterator is returned from FilterNewQuote and is used to iterate over the raw logs and unpacked data for NewQuote events raised by the BridgeFeeQuote contract. +type BridgeFeeQuoteNewQuoteIterator struct { + Event *BridgeFeeQuoteNewQuote // Event containing the contract specifics and raw log + + 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. +func (it *BridgeFeeQuoteNewQuoteIterator) Next() bool { + // 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: + it.Event = new(BridgeFeeQuoteNewQuote) + 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: + it.Event = new(BridgeFeeQuoteNewQuote) + 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. +func (it *BridgeFeeQuoteNewQuoteIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeFeeQuoteNewQuoteIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeFeeQuoteNewQuote represents a NewQuote event raised by the BridgeFeeQuote contract. +type BridgeFeeQuoteNewQuote struct { + Id *big.Int + Oracle common.Address + ChainName common.Hash + TokenName string + Fee *big.Int + GasLimit *big.Int + Expiry *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterNewQuote is a free log retrieval operation binding the contract event 0x0b48a34dfbe17b8e2330b80c7d240dd45b1cdb6aee27ebaaee4edb666318e4d6. +// +// Solidity: event NewQuote(uint256 indexed id, address indexed oracle, string indexed chainName, string tokenName, uint256 fee, uint256 gasLimit, uint256 expiry) +func (_BridgeFeeQuote *BridgeFeeQuoteFilterer) FilterNewQuote(opts *bind.FilterOpts, id []*big.Int, oracle []common.Address, chainName []string) (*BridgeFeeQuoteNewQuoteIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + var oracleRule []interface{} + for _, oracleItem := range oracle { + oracleRule = append(oracleRule, oracleItem) + } + var chainNameRule []interface{} + for _, chainNameItem := range chainName { + chainNameRule = append(chainNameRule, chainNameItem) + } + + logs, sub, err := _BridgeFeeQuote.contract.FilterLogs(opts, "NewQuote", idRule, oracleRule, chainNameRule) + if err != nil { + return nil, err + } + return &BridgeFeeQuoteNewQuoteIterator{contract: _BridgeFeeQuote.contract, event: "NewQuote", logs: logs, sub: sub}, nil +} + +// WatchNewQuote is a free log subscription operation binding the contract event 0x0b48a34dfbe17b8e2330b80c7d240dd45b1cdb6aee27ebaaee4edb666318e4d6. +// +// Solidity: event NewQuote(uint256 indexed id, address indexed oracle, string indexed chainName, string tokenName, uint256 fee, uint256 gasLimit, uint256 expiry) +func (_BridgeFeeQuote *BridgeFeeQuoteFilterer) WatchNewQuote(opts *bind.WatchOpts, sink chan<- *BridgeFeeQuoteNewQuote, id []*big.Int, oracle []common.Address, chainName []string) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + var oracleRule []interface{} + for _, oracleItem := range oracle { + oracleRule = append(oracleRule, oracleItem) + } + var chainNameRule []interface{} + for _, chainNameItem := range chainName { + chainNameRule = append(chainNameRule, chainNameItem) + } + + logs, sub, err := _BridgeFeeQuote.contract.WatchLogs(opts, "NewQuote", idRule, oracleRule, chainNameRule) + 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 + event := new(BridgeFeeQuoteNewQuote) + if err := _BridgeFeeQuote.contract.UnpackLog(event, "NewQuote", log); err != nil { + 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 +} + +// ParseNewQuote is a log parse operation binding the contract event 0x0b48a34dfbe17b8e2330b80c7d240dd45b1cdb6aee27ebaaee4edb666318e4d6. +// +// Solidity: event NewQuote(uint256 indexed id, address indexed oracle, string indexed chainName, string tokenName, uint256 fee, uint256 gasLimit, uint256 expiry) +func (_BridgeFeeQuote *BridgeFeeQuoteFilterer) ParseNewQuote(log types.Log) (*BridgeFeeQuoteNewQuote, error) { + event := new(BridgeFeeQuoteNewQuote) + if err := _BridgeFeeQuote.contract.UnpackLog(event, "NewQuote", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeFeeQuoteRoleAdminChangedIterator is returned from FilterRoleAdminChanged and is used to iterate over the raw logs and unpacked data for RoleAdminChanged events raised by the BridgeFeeQuote contract. +type BridgeFeeQuoteRoleAdminChangedIterator struct { + Event *BridgeFeeQuoteRoleAdminChanged // Event containing the contract specifics and raw log + + 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. +func (it *BridgeFeeQuoteRoleAdminChangedIterator) Next() bool { + // 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: + it.Event = new(BridgeFeeQuoteRoleAdminChanged) + 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: + it.Event = new(BridgeFeeQuoteRoleAdminChanged) + 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. +func (it *BridgeFeeQuoteRoleAdminChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeFeeQuoteRoleAdminChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeFeeQuoteRoleAdminChanged represents a RoleAdminChanged event raised by the BridgeFeeQuote contract. +type BridgeFeeQuoteRoleAdminChanged struct { + Role [32]byte + PreviousAdminRole [32]byte + NewAdminRole [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRoleAdminChanged is a free log retrieval operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. +// +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (_BridgeFeeQuote *BridgeFeeQuoteFilterer) FilterRoleAdminChanged(opts *bind.FilterOpts, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (*BridgeFeeQuoteRoleAdminChangedIterator, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var previousAdminRoleRule []interface{} + for _, previousAdminRoleItem := range previousAdminRole { + previousAdminRoleRule = append(previousAdminRoleRule, previousAdminRoleItem) + } + var newAdminRoleRule []interface{} + for _, newAdminRoleItem := range newAdminRole { + newAdminRoleRule = append(newAdminRoleRule, newAdminRoleItem) + } + + logs, sub, err := _BridgeFeeQuote.contract.FilterLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) + if err != nil { + return nil, err + } + return &BridgeFeeQuoteRoleAdminChangedIterator{contract: _BridgeFeeQuote.contract, event: "RoleAdminChanged", logs: logs, sub: sub}, nil +} + +// WatchRoleAdminChanged is a free log subscription operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. +// +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (_BridgeFeeQuote *BridgeFeeQuoteFilterer) WatchRoleAdminChanged(opts *bind.WatchOpts, sink chan<- *BridgeFeeQuoteRoleAdminChanged, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (event.Subscription, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var previousAdminRoleRule []interface{} + for _, previousAdminRoleItem := range previousAdminRole { + previousAdminRoleRule = append(previousAdminRoleRule, previousAdminRoleItem) + } + var newAdminRoleRule []interface{} + for _, newAdminRoleItem := range newAdminRole { + newAdminRoleRule = append(newAdminRoleRule, newAdminRoleItem) + } + + logs, sub, err := _BridgeFeeQuote.contract.WatchLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) + 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 + event := new(BridgeFeeQuoteRoleAdminChanged) + if err := _BridgeFeeQuote.contract.UnpackLog(event, "RoleAdminChanged", log); err != nil { + 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 +} + +// ParseRoleAdminChanged is a log parse operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. +// +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (_BridgeFeeQuote *BridgeFeeQuoteFilterer) ParseRoleAdminChanged(log types.Log) (*BridgeFeeQuoteRoleAdminChanged, error) { + event := new(BridgeFeeQuoteRoleAdminChanged) + if err := _BridgeFeeQuote.contract.UnpackLog(event, "RoleAdminChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeFeeQuoteRoleGrantedIterator is returned from FilterRoleGranted and is used to iterate over the raw logs and unpacked data for RoleGranted events raised by the BridgeFeeQuote contract. +type BridgeFeeQuoteRoleGrantedIterator struct { + Event *BridgeFeeQuoteRoleGranted // Event containing the contract specifics and raw log + + 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. +func (it *BridgeFeeQuoteRoleGrantedIterator) Next() bool { + // 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: + it.Event = new(BridgeFeeQuoteRoleGranted) + 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: + it.Event = new(BridgeFeeQuoteRoleGranted) + 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. +func (it *BridgeFeeQuoteRoleGrantedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeFeeQuoteRoleGrantedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeFeeQuoteRoleGranted represents a RoleGranted event raised by the BridgeFeeQuote contract. +type BridgeFeeQuoteRoleGranted struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRoleGranted is a free log retrieval operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. +// +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (_BridgeFeeQuote *BridgeFeeQuoteFilterer) FilterRoleGranted(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*BridgeFeeQuoteRoleGrantedIterator, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _BridgeFeeQuote.contract.FilterLogs(opts, "RoleGranted", roleRule, accountRule, senderRule) + if err != nil { + return nil, err + } + return &BridgeFeeQuoteRoleGrantedIterator{contract: _BridgeFeeQuote.contract, event: "RoleGranted", logs: logs, sub: sub}, nil +} + +// WatchRoleGranted is a free log subscription operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. +// +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (_BridgeFeeQuote *BridgeFeeQuoteFilterer) WatchRoleGranted(opts *bind.WatchOpts, sink chan<- *BridgeFeeQuoteRoleGranted, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _BridgeFeeQuote.contract.WatchLogs(opts, "RoleGranted", roleRule, accountRule, senderRule) + 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 + event := new(BridgeFeeQuoteRoleGranted) + if err := _BridgeFeeQuote.contract.UnpackLog(event, "RoleGranted", log); err != nil { + 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 +} + +// ParseRoleGranted is a log parse operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. +// +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (_BridgeFeeQuote *BridgeFeeQuoteFilterer) ParseRoleGranted(log types.Log) (*BridgeFeeQuoteRoleGranted, error) { + event := new(BridgeFeeQuoteRoleGranted) + if err := _BridgeFeeQuote.contract.UnpackLog(event, "RoleGranted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeFeeQuoteRoleRevokedIterator is returned from FilterRoleRevoked and is used to iterate over the raw logs and unpacked data for RoleRevoked events raised by the BridgeFeeQuote contract. +type BridgeFeeQuoteRoleRevokedIterator struct { + Event *BridgeFeeQuoteRoleRevoked // Event containing the contract specifics and raw log + + 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. +func (it *BridgeFeeQuoteRoleRevokedIterator) Next() bool { + // 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: + it.Event = new(BridgeFeeQuoteRoleRevoked) + 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: + it.Event = new(BridgeFeeQuoteRoleRevoked) + 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. +func (it *BridgeFeeQuoteRoleRevokedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeFeeQuoteRoleRevokedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeFeeQuoteRoleRevoked represents a RoleRevoked event raised by the BridgeFeeQuote contract. +type BridgeFeeQuoteRoleRevoked struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRoleRevoked is a free log retrieval operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. +// +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (_BridgeFeeQuote *BridgeFeeQuoteFilterer) FilterRoleRevoked(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*BridgeFeeQuoteRoleRevokedIterator, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _BridgeFeeQuote.contract.FilterLogs(opts, "RoleRevoked", roleRule, accountRule, senderRule) + if err != nil { + return nil, err + } + return &BridgeFeeQuoteRoleRevokedIterator{contract: _BridgeFeeQuote.contract, event: "RoleRevoked", logs: logs, sub: sub}, nil +} + +// WatchRoleRevoked is a free log subscription operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. +// +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (_BridgeFeeQuote *BridgeFeeQuoteFilterer) WatchRoleRevoked(opts *bind.WatchOpts, sink chan<- *BridgeFeeQuoteRoleRevoked, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _BridgeFeeQuote.contract.WatchLogs(opts, "RoleRevoked", roleRule, accountRule, senderRule) + 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 + event := new(BridgeFeeQuoteRoleRevoked) + if err := _BridgeFeeQuote.contract.UnpackLog(event, "RoleRevoked", log); err != nil { + 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 +} + +// ParseRoleRevoked is a log parse operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. +// +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (_BridgeFeeQuote *BridgeFeeQuoteFilterer) ParseRoleRevoked(log types.Log) (*BridgeFeeQuoteRoleRevoked, error) { + event := new(BridgeFeeQuoteRoleRevoked) + if err := _BridgeFeeQuote.contract.UnpackLog(event, "RoleRevoked", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeFeeQuoteUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the BridgeFeeQuote contract. +type BridgeFeeQuoteUpgradedIterator struct { + Event *BridgeFeeQuoteUpgraded // Event containing the contract specifics and raw log + + 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. +func (it *BridgeFeeQuoteUpgradedIterator) Next() bool { + // 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: + it.Event = new(BridgeFeeQuoteUpgraded) + 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: + it.Event = new(BridgeFeeQuoteUpgraded) + 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. +func (it *BridgeFeeQuoteUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeFeeQuoteUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeFeeQuoteUpgraded represents a Upgraded event raised by the BridgeFeeQuote contract. +type BridgeFeeQuoteUpgraded struct { + Implementation common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_BridgeFeeQuote *BridgeFeeQuoteFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*BridgeFeeQuoteUpgradedIterator, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _BridgeFeeQuote.contract.FilterLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return &BridgeFeeQuoteUpgradedIterator{contract: _BridgeFeeQuote.contract, event: "Upgraded", logs: logs, sub: sub}, nil +} + +// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_BridgeFeeQuote *BridgeFeeQuoteFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *BridgeFeeQuoteUpgraded, implementation []common.Address) (event.Subscription, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _BridgeFeeQuote.contract.WatchLogs(opts, "Upgraded", implementationRule) + 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 + event := new(BridgeFeeQuoteUpgraded) + if err := _BridgeFeeQuote.contract.UnpackLog(event, "Upgraded", log); err != nil { + 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 +} + +// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_BridgeFeeQuote *BridgeFeeQuoteFilterer) ParseUpgraded(log types.Log) (*BridgeFeeQuoteUpgraded, error) { + event := new(BridgeFeeQuoteUpgraded) + if err := _BridgeFeeQuote.contract.UnpackLog(event, "Upgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/contract/bridge_proxy.sol.go b/contract/bridge_proxy.sol.go new file mode 100644 index 00000000..663d921f --- /dev/null +++ b/contract/bridge_proxy.sol.go @@ -0,0 +1,689 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contract + +import ( + "errors" + "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 ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// BridgeProxyMetaData contains all meta data concerning the BridgeProxy contract. +var BridgeProxyMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x608060405234801561001057600080fd5b50610284806100206000396000f3fe6080604052600436106100225760003560e01c806319ab453c1461003957610031565b366100315761002f610059565b005b61002f610059565b34801561004557600080fd5b5061002f61005436600461021e565b61006b565b6100696100646100d0565b610108565b565b600061009e7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b0316146100c45760405162dc149f60e41b815260040160405180910390fd5b6100cd8161012c565b50565b60006101037f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015610127573d6000f35b3d6000fd5b6101358161016c565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381163b6101dd5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840160405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b60006020828403121561023057600080fd5b81356001600160a01b038116811461024757600080fd5b939250505056fea2646970667358221220f5fd2c6b493d2d8c8fccb10ef0e5ed3a7f4f1914bae22833db4f76dbce6da4fe64736f6c634300080a0033", +} + +// BridgeProxyABI is the input ABI used to generate the binding from. +// Deprecated: Use BridgeProxyMetaData.ABI instead. +var BridgeProxyABI = BridgeProxyMetaData.ABI + +// BridgeProxyBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use BridgeProxyMetaData.Bin instead. +var BridgeProxyBin = BridgeProxyMetaData.Bin + +// DeployBridgeProxy deploys a new Ethereum contract, binding an instance of BridgeProxy to it. +func DeployBridgeProxy(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *BridgeProxy, error) { + parsed, err := BridgeProxyMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(BridgeProxyBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &BridgeProxy{BridgeProxyCaller: BridgeProxyCaller{contract: contract}, BridgeProxyTransactor: BridgeProxyTransactor{contract: contract}, BridgeProxyFilterer: BridgeProxyFilterer{contract: contract}}, nil +} + +// BridgeProxy is an auto generated Go binding around an Ethereum contract. +type BridgeProxy struct { + BridgeProxyCaller // Read-only binding to the contract + BridgeProxyTransactor // Write-only binding to the contract + BridgeProxyFilterer // Log filterer for contract events +} + +// BridgeProxyCaller is an auto generated read-only Go binding around an Ethereum contract. +type BridgeProxyCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// BridgeProxyTransactor is an auto generated write-only Go binding around an Ethereum contract. +type BridgeProxyTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// BridgeProxyFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type BridgeProxyFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// BridgeProxySession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type BridgeProxySession struct { + Contract *BridgeProxy // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// BridgeProxyCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type BridgeProxyCallerSession struct { + Contract *BridgeProxyCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// BridgeProxyTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type BridgeProxyTransactorSession struct { + Contract *BridgeProxyTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// BridgeProxyRaw is an auto generated low-level Go binding around an Ethereum contract. +type BridgeProxyRaw struct { + Contract *BridgeProxy // Generic contract binding to access the raw methods on +} + +// BridgeProxyCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type BridgeProxyCallerRaw struct { + Contract *BridgeProxyCaller // Generic read-only contract binding to access the raw methods on +} + +// BridgeProxyTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type BridgeProxyTransactorRaw struct { + Contract *BridgeProxyTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewBridgeProxy creates a new instance of BridgeProxy, bound to a specific deployed contract. +func NewBridgeProxy(address common.Address, backend bind.ContractBackend) (*BridgeProxy, error) { + contract, err := bindBridgeProxy(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &BridgeProxy{BridgeProxyCaller: BridgeProxyCaller{contract: contract}, BridgeProxyTransactor: BridgeProxyTransactor{contract: contract}, BridgeProxyFilterer: BridgeProxyFilterer{contract: contract}}, nil +} + +// NewBridgeProxyCaller creates a new read-only instance of BridgeProxy, bound to a specific deployed contract. +func NewBridgeProxyCaller(address common.Address, caller bind.ContractCaller) (*BridgeProxyCaller, error) { + contract, err := bindBridgeProxy(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &BridgeProxyCaller{contract: contract}, nil +} + +// NewBridgeProxyTransactor creates a new write-only instance of BridgeProxy, bound to a specific deployed contract. +func NewBridgeProxyTransactor(address common.Address, transactor bind.ContractTransactor) (*BridgeProxyTransactor, error) { + contract, err := bindBridgeProxy(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &BridgeProxyTransactor{contract: contract}, nil +} + +// NewBridgeProxyFilterer creates a new log filterer instance of BridgeProxy, bound to a specific deployed contract. +func NewBridgeProxyFilterer(address common.Address, filterer bind.ContractFilterer) (*BridgeProxyFilterer, error) { + contract, err := bindBridgeProxy(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &BridgeProxyFilterer{contract: contract}, nil +} + +// bindBridgeProxy binds a generic wrapper to an already deployed contract. +func bindBridgeProxy(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := BridgeProxyMetaData.GetAbi() + 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. +func (_BridgeProxy *BridgeProxyRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _BridgeProxy.Contract.BridgeProxyCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_BridgeProxy *BridgeProxyRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _BridgeProxy.Contract.BridgeProxyTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_BridgeProxy *BridgeProxyRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _BridgeProxy.Contract.BridgeProxyTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_BridgeProxy *BridgeProxyCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _BridgeProxy.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_BridgeProxy *BridgeProxyTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _BridgeProxy.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_BridgeProxy *BridgeProxyTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _BridgeProxy.Contract.contract.Transact(opts, method, params...) +} + +// Init is a paid mutator transaction binding the contract method 0x19ab453c. +// +// Solidity: function init(address _logic) returns() +func (_BridgeProxy *BridgeProxyTransactor) Init(opts *bind.TransactOpts, _logic common.Address) (*types.Transaction, error) { + return _BridgeProxy.contract.Transact(opts, "init", _logic) +} + +// Init is a paid mutator transaction binding the contract method 0x19ab453c. +// +// Solidity: function init(address _logic) returns() +func (_BridgeProxy *BridgeProxySession) Init(_logic common.Address) (*types.Transaction, error) { + return _BridgeProxy.Contract.Init(&_BridgeProxy.TransactOpts, _logic) +} + +// Init is a paid mutator transaction binding the contract method 0x19ab453c. +// +// Solidity: function init(address _logic) returns() +func (_BridgeProxy *BridgeProxyTransactorSession) Init(_logic common.Address) (*types.Transaction, error) { + return _BridgeProxy.Contract.Init(&_BridgeProxy.TransactOpts, _logic) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_BridgeProxy *BridgeProxyTransactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) { + return _BridgeProxy.contract.RawTransact(opts, calldata) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_BridgeProxy *BridgeProxySession) Fallback(calldata []byte) (*types.Transaction, error) { + return _BridgeProxy.Contract.Fallback(&_BridgeProxy.TransactOpts, calldata) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() payable returns() +func (_BridgeProxy *BridgeProxyTransactorSession) Fallback(calldata []byte) (*types.Transaction, error) { + return _BridgeProxy.Contract.Fallback(&_BridgeProxy.TransactOpts, calldata) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_BridgeProxy *BridgeProxyTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _BridgeProxy.contract.RawTransact(opts, nil) // calldata is disallowed for receive function +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_BridgeProxy *BridgeProxySession) Receive() (*types.Transaction, error) { + return _BridgeProxy.Contract.Receive(&_BridgeProxy.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_BridgeProxy *BridgeProxyTransactorSession) Receive() (*types.Transaction, error) { + return _BridgeProxy.Contract.Receive(&_BridgeProxy.TransactOpts) +} + +// BridgeProxyAdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the BridgeProxy contract. +type BridgeProxyAdminChangedIterator struct { + Event *BridgeProxyAdminChanged // Event containing the contract specifics and raw log + + 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. +func (it *BridgeProxyAdminChangedIterator) Next() bool { + // 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: + it.Event = new(BridgeProxyAdminChanged) + 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: + it.Event = new(BridgeProxyAdminChanged) + 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. +func (it *BridgeProxyAdminChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeProxyAdminChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeProxyAdminChanged represents a AdminChanged event raised by the BridgeProxy contract. +type BridgeProxyAdminChanged struct { + PreviousAdmin common.Address + NewAdmin common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAdminChanged is a free log retrieval operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_BridgeProxy *BridgeProxyFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*BridgeProxyAdminChangedIterator, error) { + + logs, sub, err := _BridgeProxy.contract.FilterLogs(opts, "AdminChanged") + if err != nil { + return nil, err + } + return &BridgeProxyAdminChangedIterator{contract: _BridgeProxy.contract, event: "AdminChanged", logs: logs, sub: sub}, nil +} + +// WatchAdminChanged is a free log subscription operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_BridgeProxy *BridgeProxyFilterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *BridgeProxyAdminChanged) (event.Subscription, error) { + + logs, sub, err := _BridgeProxy.contract.WatchLogs(opts, "AdminChanged") + 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 + event := new(BridgeProxyAdminChanged) + if err := _BridgeProxy.contract.UnpackLog(event, "AdminChanged", log); err != nil { + 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 +} + +// ParseAdminChanged is a log parse operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_BridgeProxy *BridgeProxyFilterer) ParseAdminChanged(log types.Log) (*BridgeProxyAdminChanged, error) { + event := new(BridgeProxyAdminChanged) + if err := _BridgeProxy.contract.UnpackLog(event, "AdminChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeProxyBeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the BridgeProxy contract. +type BridgeProxyBeaconUpgradedIterator struct { + Event *BridgeProxyBeaconUpgraded // Event containing the contract specifics and raw log + + 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. +func (it *BridgeProxyBeaconUpgradedIterator) Next() bool { + // 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: + it.Event = new(BridgeProxyBeaconUpgraded) + 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: + it.Event = new(BridgeProxyBeaconUpgraded) + 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. +func (it *BridgeProxyBeaconUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeProxyBeaconUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeProxyBeaconUpgraded represents a BeaconUpgraded event raised by the BridgeProxy contract. +type BridgeProxyBeaconUpgraded struct { + Beacon common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBeaconUpgraded is a free log retrieval operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_BridgeProxy *BridgeProxyFilterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*BridgeProxyBeaconUpgradedIterator, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _BridgeProxy.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule) + if err != nil { + return nil, err + } + return &BridgeProxyBeaconUpgradedIterator{contract: _BridgeProxy.contract, event: "BeaconUpgraded", logs: logs, sub: sub}, nil +} + +// WatchBeaconUpgraded is a free log subscription operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_BridgeProxy *BridgeProxyFilterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *BridgeProxyBeaconUpgraded, beacon []common.Address) (event.Subscription, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _BridgeProxy.contract.WatchLogs(opts, "BeaconUpgraded", beaconRule) + 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 + event := new(BridgeProxyBeaconUpgraded) + if err := _BridgeProxy.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil { + 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 +} + +// ParseBeaconUpgraded is a log parse operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_BridgeProxy *BridgeProxyFilterer) ParseBeaconUpgraded(log types.Log) (*BridgeProxyBeaconUpgraded, error) { + event := new(BridgeProxyBeaconUpgraded) + if err := _BridgeProxy.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeProxyUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the BridgeProxy contract. +type BridgeProxyUpgradedIterator struct { + Event *BridgeProxyUpgraded // Event containing the contract specifics and raw log + + 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. +func (it *BridgeProxyUpgradedIterator) Next() bool { + // 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: + it.Event = new(BridgeProxyUpgraded) + 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: + it.Event = new(BridgeProxyUpgraded) + 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. +func (it *BridgeProxyUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeProxyUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeProxyUpgraded represents a Upgraded event raised by the BridgeProxy contract. +type BridgeProxyUpgraded struct { + Implementation common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_BridgeProxy *BridgeProxyFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*BridgeProxyUpgradedIterator, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _BridgeProxy.contract.FilterLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return &BridgeProxyUpgradedIterator{contract: _BridgeProxy.contract, event: "Upgraded", logs: logs, sub: sub}, nil +} + +// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_BridgeProxy *BridgeProxyFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *BridgeProxyUpgraded, implementation []common.Address) (event.Subscription, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _BridgeProxy.contract.WatchLogs(opts, "Upgraded", implementationRule) + 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 + event := new(BridgeProxyUpgraded) + if err := _BridgeProxy.contract.UnpackLog(event, "Upgraded", log); err != nil { + 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 +} + +// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_BridgeProxy *BridgeProxyFilterer) ParseUpgraded(log types.Log) (*BridgeProxyUpgraded, error) { + event := new(BridgeProxyUpgraded) + if err := _BridgeProxy.contract.UnpackLog(event, "Upgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/contract/compile.sh b/contract/compile.sh index ad2c0555..e3264afc 100755 --- a/contract/compile.sh +++ b/contract/compile.sh @@ -31,7 +31,8 @@ echo "===> Compiling contracts" [[ ! -d "$project_dir/contract/artifacts" ]] && mkdir -p "$project_dir/contract/artifacts" contracts=(WFXUpgradable FIP20Upgradable IStaking IError ERC1967Proxy) -contracts+=(IFxBridgeLogic IBridgeCallback IBridgeFeeQuote ICrosschain) +contracts+=(IFxBridgeLogic IBridgeCallback ICrosschain) +contracts+=(BridgeFeeQuote BridgeFeeOracle BridgeProxy) contracts+=(CrosschainTest StakingTest ERC721TokenTest) for contract in "${contracts[@]}"; do diff --git a/contract/contract.go b/contract/contract.go index fda2f780..5c048ee0 100644 --- a/contract/contract.go +++ b/contract/contract.go @@ -17,9 +17,10 @@ const ( FIP20LogicAddress = "0x0000000000000000000000000000000000001001" WFXLogicAddress = "0x0000000000000000000000000000000000001002" - StakingAddress = "0x0000000000000000000000000000000000001003" - CrosschainAddress = "0x0000000000000000000000000000000000001004" - BridgeFeeAddress = "0x0000000000000000000000000000000000001005" + StakingAddress = "0x0000000000000000000000000000000000001003" + CrosschainAddress = "0x0000000000000000000000000000000000001004" + BridgeFeeAddress = "0x0000000000000000000000000000000000001005" + BridgeFeeOracleAddress = "0x0000000000000000000000000000000000001006" ) const DefaultGasCap uint64 = 30000000 @@ -29,14 +30,17 @@ var ( Address: common.HexToAddress(FIP20LogicAddress), ABI: MustABIJson(FIP20UpgradableMetaData.ABI), Bin: MustDecodeHex(FIP20UpgradableMetaData.Bin), - Code: MustDecodeHex("0x6080604052600436106101095760003560e01c806370a08231116100955780639dc29fac116100645780639dc29fac146102bc578063a9059cbb146102dc578063dd62ed3e146102fc578063de7ea79d14610342578063f2fde38b1461036257600080fd5b806370a0823114610234578063715018a61461026a5780638da5cb5b1461027f57806395d89b41146102a757600080fd5b8063313ce567116100dc578063313ce567146101a85780633659cfe6146101ca57806340c10f19146101ec5780634f1ef2861461020c57806352d1902d1461021f57600080fd5b806306fdde031461010e578063095ea7b31461013957806318160ddd1461016957806323b872dd14610188575b600080fd5b34801561011a57600080fd5b50610123610382565b60405161013091906113d1565b60405180910390f35b34801561014557600080fd5b50610159610154366004611420565b610414565b6040519015158152602001610130565b34801561017557600080fd5b5060cc545b604051908152602001610130565b34801561019457600080fd5b506101596101a336600461144a565b61046a565b3480156101b457600080fd5b5060cb5460405160ff9091168152602001610130565b3480156101d657600080fd5b506101ea6101e5366004611486565b610517565b005b3480156101f857600080fd5b506101ea610207366004611420565b6105f7565b6101ea61021a36600461152d565b61060d565b34801561022b57600080fd5b5061017a6106da565b34801561024057600080fd5b5061017a61024f366004611486565b6001600160a01b0316600090815260cd602052604090205490565b34801561027657600080fd5b506101ea61078d565b34801561028b57600080fd5b506097546040516001600160a01b039091168152602001610130565b3480156102b357600080fd5b506101236107a1565b3480156102c857600080fd5b506101ea6102d7366004611420565b6107b0565b3480156102e857600080fd5b506101596102f7366004611420565b6107c2565b34801561030857600080fd5b5061017a61031736600461158f565b6001600160a01b03918216600090815260ce6020908152604080832093909416825291909152205490565b34801561034e57600080fd5b506101ea61035d3660046115e2565b6107d8565b34801561036e57600080fd5b506101ea61037d366004611486565b610947565b606060c980546103919061166f565b80601f01602080910402602001604051908101604052809291908181526020018280546103bd9061166f565b801561040a5780601f106103df5761010080835404028352916020019161040a565b820191906000526020600020905b8154815290600101906020018083116103ed57829003601f168201915b5050505050905090565b60006104213384846109bd565b6040518281526001600160a01b0384169033907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259060200160405180910390a350600192915050565b6001600160a01b038316600090815260ce60209081526040808320338452909152812054828110156104ed5760405162461bcd60e51b815260206004820152602160248201527f7472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636044820152606560f81b60648201526084015b60405180910390fd5b61050185336104fc86856116c0565b6109bd565b61050c858585610a3f565b506001949350505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000010011614156105605760405162461bcd60e51b81526004016104e4906116d7565b7f00000000000000000000000000000000000000000000000000000000000010016001600160a01b03166105a9600080516020611808833981519152546001600160a01b031690565b6001600160a01b0316146105cf5760405162461bcd60e51b81526004016104e490611723565b6105d881610bee565b604080516000808252602082019092526105f491839190610bf6565b50565b6105ff610d66565b6106098282610dc0565b5050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000010011614156106565760405162461bcd60e51b81526004016104e4906116d7565b7f00000000000000000000000000000000000000000000000000000000000010016001600160a01b031661069f600080516020611808833981519152546001600160a01b031690565b6001600160a01b0316146106c55760405162461bcd60e51b81526004016104e490611723565b6106ce82610bee565b61060982826001610bf6565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000001001161461077a5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016104e4565b5060008051602061180883398151915290565b610795610d66565b61079f6000610e9f565b565b606060ca80546103919061166f565b6107b8610d66565b6106098282610ef1565b60006107cf338484610a3f565b50600192915050565b600054610100900460ff16158080156107f85750600054600160ff909116105b806108125750303b158015610812575060005460ff166001145b6108755760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016104e4565b6000805460ff191660011790558015610898576000805461ff0019166101001790555b84516108ab9060c990602088019061130c565b5083516108bf9060ca90602087019061130c565b5060cb805460ff191660ff851617905560cf80546001600160a01b0319166001600160a01b0384161790556108f2611033565b6108fa611062565b8015610940576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b61094f610d66565b6001600160a01b0381166109b45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104e4565b6105f481610e9f565b6001600160a01b038316610a135760405162461bcd60e51b815260206004820152601d60248201527f617070726f76652066726f6d20746865207a65726f206164647265737300000060448201526064016104e4565b6001600160a01b03928316600090815260ce602090815260408083209490951682529290925291902055565b6001600160a01b038316610a955760405162461bcd60e51b815260206004820152601e60248201527f7472616e736665722066726f6d20746865207a65726f2061646472657373000060448201526064016104e4565b6001600160a01b038216610aeb5760405162461bcd60e51b815260206004820152601c60248201527f7472616e7366657220746f20746865207a65726f20616464726573730000000060448201526064016104e4565b6001600160a01b038316600090815260cd602052604090205481811015610b545760405162461bcd60e51b815260206004820152601f60248201527f7472616e7366657220616d6f756e7420657863656564732062616c616e63650060448201526064016104e4565b610b5e82826116c0565b6001600160a01b03808616600090815260cd60205260408082209390935590851681529081208054849290610b9490849061176f565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610be091815260200190565b60405180910390a350505050565b6105f4610d66565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615610c2e57610c2983611089565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610c88575060408051601f3d908101601f19168201909252610c8591810190611787565b60015b610ceb5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016104e4565b6000805160206118088339815191528114610d5a5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016104e4565b50610c29838383611125565b6097546001600160a01b0316331461079f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104e4565b6001600160a01b038216610e165760405162461bcd60e51b815260206004820152601860248201527f6d696e7420746f20746865207a65726f2061646472657373000000000000000060448201526064016104e4565b8060cc6000828254610e28919061176f565b90915550506001600160a01b038216600090815260cd602052604081208054839290610e5590849061176f565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038216610f475760405162461bcd60e51b815260206004820152601a60248201527f6275726e2066726f6d20746865207a65726f206164647265737300000000000060448201526064016104e4565b6001600160a01b038216600090815260cd602052604090205481811015610fb05760405162461bcd60e51b815260206004820152601b60248201527f6275726e20616d6f756e7420657863656564732062616c616e6365000000000060448201526064016104e4565b610fba82826116c0565b6001600160a01b038416600090815260cd602052604081209190915560cc8054849290610fe89084906116c0565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600054610100900460ff1661105a5760405162461bcd60e51b81526004016104e4906117a0565b61079f611150565b600054610100900460ff1661079f5760405162461bcd60e51b81526004016104e4906117a0565b6001600160a01b0381163b6110f65760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016104e4565b60008051602061180883398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b61112e83611180565b60008251118061113b5750805b15610c295761114a83836111c0565b50505050565b600054610100900460ff166111775760405162461bcd60e51b81526004016104e4906117a0565b61079f33610e9f565b61118981611089565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606111e58383604051806060016040528060278152602001611828602791396111ec565b9392505050565b6060600080856001600160a01b03168560405161120991906117eb565b600060405180830381855af49150503d8060008114611244576040519150601f19603f3d011682016040523d82523d6000602084013e611249565b606091505b509150915061125a86838387611264565b9695505050505050565b606083156112d05782516112c9576001600160a01b0385163b6112c95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104e4565b50816112da565b6112da83836112e2565b949350505050565b8151156112f25781518083602001fd5b8060405162461bcd60e51b81526004016104e491906113d1565b8280546113189061166f565b90600052602060002090601f01602090048101928261133a5760008555611380565b82601f1061135357805160ff1916838001178555611380565b82800160010185558215611380579182015b82811115611380578251825591602001919060010190611365565b5061138c929150611390565b5090565b5b8082111561138c5760008155600101611391565b60005b838110156113c05781810151838201526020016113a8565b8381111561114a5750506000910152565b60208152600082518060208401526113f08160408501602087016113a5565b601f01601f19169190910160400192915050565b80356001600160a01b038116811461141b57600080fd5b919050565b6000806040838503121561143357600080fd5b61143c83611404565b946020939093013593505050565b60008060006060848603121561145f57600080fd5b61146884611404565b925061147660208501611404565b9150604084013590509250925092565b60006020828403121561149857600080fd5b6111e582611404565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156114d2576114d26114a1565b604051601f8501601f19908116603f011681019082821181831017156114fa576114fa6114a1565b8160405280935085815286868601111561151357600080fd5b858560208301376000602087830101525050509392505050565b6000806040838503121561154057600080fd5b61154983611404565b9150602083013567ffffffffffffffff81111561156557600080fd5b8301601f8101851361157657600080fd5b611585858235602084016114b7565b9150509250929050565b600080604083850312156115a257600080fd5b6115ab83611404565b91506115b960208401611404565b90509250929050565b600082601f8301126115d357600080fd5b6111e5838335602085016114b7565b600080600080608085870312156115f857600080fd5b843567ffffffffffffffff8082111561161057600080fd5b61161c888389016115c2565b9550602087013591508082111561163257600080fd5b5061163f878288016115c2565b935050604085013560ff8116811461165657600080fd5b915061166460608601611404565b905092959194509250565b600181811c9082168061168357607f821691505b602082108114156116a457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000828210156116d2576116d26116aa565b500390565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b60008219821115611782576117826116aa565b500190565b60006020828403121561179957600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082516117fd8184602087016113a5565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220c24d636966a60df9636041ea92ff12a963fc67961fabb8564b1631506b7785e864736f6c634300080a0033"), + // deploy code from solidity/contracts/fip20/FIP20Upgradable.sol + Code: MustDecodeHex("0x6080604052600436106101095760003560e01c806370a08231116100955780639dc29fac116100645780639dc29fac146102bc578063a9059cbb146102dc578063dd62ed3e146102fc578063de7ea79d14610342578063f2fde38b1461036257600080fd5b806370a0823114610234578063715018a61461026a5780638da5cb5b1461027f57806395d89b41146102a757600080fd5b8063313ce567116100dc578063313ce567146101a85780633659cfe6146101ca57806340c10f19146101ec5780634f1ef2861461020c57806352d1902d1461021f57600080fd5b806306fdde031461010e578063095ea7b31461013957806318160ddd1461016957806323b872dd14610188575b600080fd5b34801561011a57600080fd5b50610123610382565b60405161013091906113d1565b60405180910390f35b34801561014557600080fd5b50610159610154366004611420565b610414565b6040519015158152602001610130565b34801561017557600080fd5b5060cc545b604051908152602001610130565b34801561019457600080fd5b506101596101a336600461144a565b61046a565b3480156101b457600080fd5b5060cb5460405160ff9091168152602001610130565b3480156101d657600080fd5b506101ea6101e5366004611486565b610517565b005b3480156101f857600080fd5b506101ea610207366004611420565b6105f7565b6101ea61021a36600461152d565b61060d565b34801561022b57600080fd5b5061017a6106da565b34801561024057600080fd5b5061017a61024f366004611486565b6001600160a01b0316600090815260cd602052604090205490565b34801561027657600080fd5b506101ea61078d565b34801561028b57600080fd5b506097546040516001600160a01b039091168152602001610130565b3480156102b357600080fd5b506101236107a1565b3480156102c857600080fd5b506101ea6102d7366004611420565b6107b0565b3480156102e857600080fd5b506101596102f7366004611420565b6107c2565b34801561030857600080fd5b5061017a61031736600461158f565b6001600160a01b03918216600090815260ce6020908152604080832093909416825291909152205490565b34801561034e57600080fd5b506101ea61035d3660046115e2565b6107d8565b34801561036e57600080fd5b506101ea61037d366004611486565b610947565b606060c980546103919061166f565b80601f01602080910402602001604051908101604052809291908181526020018280546103bd9061166f565b801561040a5780601f106103df5761010080835404028352916020019161040a565b820191906000526020600020905b8154815290600101906020018083116103ed57829003601f168201915b5050505050905090565b60006104213384846109bd565b6040518281526001600160a01b0384169033907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259060200160405180910390a350600192915050565b6001600160a01b038316600090815260ce60209081526040808320338452909152812054828110156104ed5760405162461bcd60e51b815260206004820152602160248201527f7472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636044820152606560f81b60648201526084015b60405180910390fd5b61050185336104fc86856116c0565b6109bd565b61050c858585610a3f565b506001949350505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000010011614156105605760405162461bcd60e51b81526004016104e4906116d7565b7f00000000000000000000000000000000000000000000000000000000000010016001600160a01b03166105a9600080516020611808833981519152546001600160a01b031690565b6001600160a01b0316146105cf5760405162461bcd60e51b81526004016104e490611723565b6105d881610bee565b604080516000808252602082019092526105f491839190610bf6565b50565b6105ff610d66565b6106098282610dc0565b5050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000010011614156106565760405162461bcd60e51b81526004016104e4906116d7565b7f00000000000000000000000000000000000000000000000000000000000010016001600160a01b031661069f600080516020611808833981519152546001600160a01b031690565b6001600160a01b0316146106c55760405162461bcd60e51b81526004016104e490611723565b6106ce82610bee565b61060982826001610bf6565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000001001161461077a5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016104e4565b5060008051602061180883398151915290565b610795610d66565b61079f6000610e9f565b565b606060ca80546103919061166f565b6107b8610d66565b6106098282610ef1565b60006107cf338484610a3f565b50600192915050565b600054610100900460ff16158080156107f85750600054600160ff909116105b806108125750303b158015610812575060005460ff166001145b6108755760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016104e4565b6000805460ff191660011790558015610898576000805461ff0019166101001790555b84516108ab9060c990602088019061130c565b5083516108bf9060ca90602087019061130c565b5060cb805460ff191660ff851617905560cf80546001600160a01b0319166001600160a01b0384161790556108f2611033565b6108fa611062565b8015610940576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b61094f610d66565b6001600160a01b0381166109b45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104e4565b6105f481610e9f565b6001600160a01b038316610a135760405162461bcd60e51b815260206004820152601d60248201527f617070726f76652066726f6d20746865207a65726f206164647265737300000060448201526064016104e4565b6001600160a01b03928316600090815260ce602090815260408083209490951682529290925291902055565b6001600160a01b038316610a955760405162461bcd60e51b815260206004820152601e60248201527f7472616e736665722066726f6d20746865207a65726f2061646472657373000060448201526064016104e4565b6001600160a01b038216610aeb5760405162461bcd60e51b815260206004820152601c60248201527f7472616e7366657220746f20746865207a65726f20616464726573730000000060448201526064016104e4565b6001600160a01b038316600090815260cd602052604090205481811015610b545760405162461bcd60e51b815260206004820152601f60248201527f7472616e7366657220616d6f756e7420657863656564732062616c616e63650060448201526064016104e4565b610b5e82826116c0565b6001600160a01b03808616600090815260cd60205260408082209390935590851681529081208054849290610b9490849061176f565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610be091815260200190565b60405180910390a350505050565b6105f4610d66565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615610c2e57610c2983611089565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610c88575060408051601f3d908101601f19168201909252610c8591810190611787565b60015b610ceb5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016104e4565b6000805160206118088339815191528114610d5a5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016104e4565b50610c29838383611125565b6097546001600160a01b0316331461079f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104e4565b6001600160a01b038216610e165760405162461bcd60e51b815260206004820152601860248201527f6d696e7420746f20746865207a65726f2061646472657373000000000000000060448201526064016104e4565b8060cc6000828254610e28919061176f565b90915550506001600160a01b038216600090815260cd602052604081208054839290610e5590849061176f565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038216610f475760405162461bcd60e51b815260206004820152601a60248201527f6275726e2066726f6d20746865207a65726f206164647265737300000000000060448201526064016104e4565b6001600160a01b038216600090815260cd602052604090205481811015610fb05760405162461bcd60e51b815260206004820152601b60248201527f6275726e20616d6f756e7420657863656564732062616c616e6365000000000060448201526064016104e4565b610fba82826116c0565b6001600160a01b038416600090815260cd602052604081209190915560cc8054849290610fe89084906116c0565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600054610100900460ff1661105a5760405162461bcd60e51b81526004016104e4906117a0565b61079f611150565b600054610100900460ff1661079f5760405162461bcd60e51b81526004016104e4906117a0565b6001600160a01b0381163b6110f65760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016104e4565b60008051602061180883398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b61112e83611180565b60008251118061113b5750805b15610c295761114a83836111c0565b50505050565b600054610100900460ff166111775760405162461bcd60e51b81526004016104e4906117a0565b61079f33610e9f565b61118981611089565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606111e58383604051806060016040528060278152602001611828602791396111ec565b9392505050565b6060600080856001600160a01b03168560405161120991906117eb565b600060405180830381855af49150503d8060008114611244576040519150601f19603f3d011682016040523d82523d6000602084013e611249565b606091505b509150915061125a86838387611264565b9695505050505050565b606083156112d05782516112c9576001600160a01b0385163b6112c95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104e4565b50816112da565b6112da83836112e2565b949350505050565b8151156112f25781518083602001fd5b8060405162461bcd60e51b81526004016104e491906113d1565b8280546113189061166f565b90600052602060002090601f01602090048101928261133a5760008555611380565b82601f1061135357805160ff1916838001178555611380565b82800160010185558215611380579182015b82811115611380578251825591602001919060010190611365565b5061138c929150611390565b5090565b5b8082111561138c5760008155600101611391565b60005b838110156113c05781810151838201526020016113a8565b8381111561114a5750506000910152565b60208152600082518060208401526113f08160408501602087016113a5565b601f01601f19169190910160400192915050565b80356001600160a01b038116811461141b57600080fd5b919050565b6000806040838503121561143357600080fd5b61143c83611404565b946020939093013593505050565b60008060006060848603121561145f57600080fd5b61146884611404565b925061147660208501611404565b9150604084013590509250925092565b60006020828403121561149857600080fd5b6111e582611404565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156114d2576114d26114a1565b604051601f8501601f19908116603f011681019082821181831017156114fa576114fa6114a1565b8160405280935085815286868601111561151357600080fd5b858560208301376000602087830101525050509392505050565b6000806040838503121561154057600080fd5b61154983611404565b9150602083013567ffffffffffffffff81111561156557600080fd5b8301601f8101851361157657600080fd5b611585858235602084016114b7565b9150509250929050565b600080604083850312156115a257600080fd5b6115ab83611404565b91506115b960208401611404565b90509250929050565b600082601f8301126115d357600080fd5b6111e5838335602085016114b7565b600080600080608085870312156115f857600080fd5b843567ffffffffffffffff8082111561161057600080fd5b61161c888389016115c2565b9550602087013591508082111561163257600080fd5b5061163f878288016115c2565b935050604085013560ff8116811461165657600080fd5b915061166460608601611404565b905092959194509250565b600181811c9082168061168357607f821691505b602082108114156116a457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000828210156116d2576116d26116aa565b500390565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b60008219821115611782576117826116aa565b500190565b60006020828403121561179957600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082516117fd8184602087016113a5565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220c24d636966a60df9636041ea92ff12a963fc67961fabb8564b1631506b7785e864736f6c634300080a0033"), } wfxInit = Contract{ Address: common.HexToAddress(WFXLogicAddress), ABI: MustABIJson(WFXUpgradableMetaData.ABI), Bin: MustDecodeHex(WFXUpgradableMetaData.Bin), - Code: MustDecodeHex("0x6080604052600436106101395760003560e01c8063715018a6116100ab578063b86d52981161006f578063b86d529814610366578063d0e30db014610148578063dd62ed3e14610384578063de7ea79d146103ca578063f2fde38b146103ea578063f3fef3a31461040a57610148565b8063715018a6146102ca5780638da5cb5b146102df57806395d89b41146103115780639dc29fac14610326578063a9059cbb1461034657610148565b8063313ce567116100fd578063313ce5671461020a5780633659cfe61461022c57806340c10f191461024c5780634f1ef2861461026c57806352d1902d1461027f57806370a082311461029457610148565b806306fdde0314610150578063095ea7b31461017b57806318160ddd146101ab57806323b872dd146101ca5780632e1a7d4d146101ea57610148565b366101485761014661042a565b005b61014661042a565b34801561015c57600080fd5b5061016561046b565b60405161017291906115a9565b60405180910390f35b34801561018757600080fd5b5061019b6101963660046115f1565b6104fd565b6040519015158152602001610172565b3480156101b757600080fd5b5060cc545b604051908152602001610172565b3480156101d657600080fd5b5061019b6101e536600461161d565b610553565b3480156101f657600080fd5b5061014661020536600461165e565b610600565b34801561021657600080fd5b5060cb5460405160ff9091168152602001610172565b34801561023857600080fd5b50610146610247366004611677565b610671565b34801561025857600080fd5b506101466102673660046115f1565b610751565b61014661027a366004611720565b610767565b34801561028b57600080fd5b506101bc610834565b3480156102a057600080fd5b506101bc6102af366004611677565b6001600160a01b0316600090815260cd602052604090205490565b3480156102d657600080fd5b506101466108e7565b3480156102eb57600080fd5b506097546001600160a01b03165b6040516001600160a01b039091168152602001610172565b34801561031d57600080fd5b506101656108fb565b34801561033257600080fd5b506101466103413660046115f1565b61090a565b34801561035257600080fd5b5061019b6103613660046115f1565b61091c565b34801561037257600080fd5b5060cf546001600160a01b03166102f9565b34801561039057600080fd5b506101bc61039f366004611784565b6001600160a01b03918216600090815260ce6020908152604080832093909416825291909152205490565b3480156103d657600080fd5b506101466103e53660046117dd565b610932565b3480156103f657600080fd5b50610146610405366004611677565b610aa1565b34801561041657600080fd5b506101466104253660046115f1565b610b17565b6104343334610b9c565b60405134815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a2565b606060c9805461047a9061186c565b80601f01602080910402602001604051908101604052809291908181526020018280546104a69061186c565b80156104f35780601f106104c8576101008083540402835291602001916104f3565b820191906000526020600020905b8154815290600101906020018083116104d657829003601f168201915b5050505050905090565b600061050a338484610c74565b6040518281526001600160a01b0384169033907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259060200160405180910390a350600192915050565b6001600160a01b038316600090815260ce60209081526040808320338452909152812054828110156105d65760405162461bcd60e51b815260206004820152602160248201527f7472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636044820152606560f81b60648201526084015b60405180910390fd5b6105ea85336105e586856118bd565b610c74565b6105f5858585610cf6565b506001949350505050565b61060b335b82610ea5565b604051339082156108fc029083906000818181858888f19350505050158015610638573d6000803e3d6000fd5b5060405181815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a250565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000010021614156106ba5760405162461bcd60e51b81526004016105cd906118d4565b7f00000000000000000000000000000000000000000000000000000000000010026001600160a01b0316610703600080516020611a05833981519152546001600160a01b031690565b6001600160a01b0316146107295760405162461bcd60e51b81526004016105cd90611920565b61073281610fe7565b6040805160008082526020820190925261074e91839190610fef565b50565b61075961115f565b6107638282610b9c565b5050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000010021614156107b05760405162461bcd60e51b81526004016105cd906118d4565b7f00000000000000000000000000000000000000000000000000000000000010026001600160a01b03166107f9600080516020611a05833981519152546001600160a01b031690565b6001600160a01b03161461081f5760405162461bcd60e51b81526004016105cd90611920565b61082882610fe7565b61076382826001610fef565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000100216146108d45760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016105cd565b50600080516020611a0583398151915290565b6108ef61115f565b6108f960006111b9565b565b606060ca805461047a9061186c565b61091261115f565b6107638282610ea5565b6000610929338484610cf6565b50600192915050565b600054610100900460ff16158080156109525750600054600160ff909116105b8061096c5750303b15801561096c575060005460ff166001145b6109cf5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105cd565b6000805460ff1916600117905580156109f2576000805461ff0019166101001790555b8451610a059060c99060208801906114e4565b508351610a199060ca9060208701906114e4565b5060cb805460ff191660ff851617905560cf80546001600160a01b0319166001600160a01b038416179055610a4c61120b565b610a5461123a565b8015610a9a576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b610aa961115f565b6001600160a01b038116610b0e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105cd565b61074e816111b9565b610b2033610605565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610b56573d6000803e3d6000fd5b506040518181526001600160a01b0383169033907f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb906020015b60405180910390a35050565b6001600160a01b038216610bf25760405162461bcd60e51b815260206004820152601860248201527f6d696e7420746f20746865207a65726f2061646472657373000000000000000060448201526064016105cd565b8060cc6000828254610c04919061196c565b90915550506001600160a01b038216600090815260cd602052604081208054839290610c3190849061196c565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610b90565b6001600160a01b038316610cca5760405162461bcd60e51b815260206004820152601d60248201527f617070726f76652066726f6d20746865207a65726f206164647265737300000060448201526064016105cd565b6001600160a01b03928316600090815260ce602090815260408083209490951682529290925291902055565b6001600160a01b038316610d4c5760405162461bcd60e51b815260206004820152601e60248201527f7472616e736665722066726f6d20746865207a65726f2061646472657373000060448201526064016105cd565b6001600160a01b038216610da25760405162461bcd60e51b815260206004820152601c60248201527f7472616e7366657220746f20746865207a65726f20616464726573730000000060448201526064016105cd565b6001600160a01b038316600090815260cd602052604090205481811015610e0b5760405162461bcd60e51b815260206004820152601f60248201527f7472616e7366657220616d6f756e7420657863656564732062616c616e63650060448201526064016105cd565b610e1582826118bd565b6001600160a01b03808616600090815260cd60205260408082209390935590851681529081208054849290610e4b90849061196c565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610e9791815260200190565b60405180910390a350505050565b6001600160a01b038216610efb5760405162461bcd60e51b815260206004820152601a60248201527f6275726e2066726f6d20746865207a65726f206164647265737300000000000060448201526064016105cd565b6001600160a01b038216600090815260cd602052604090205481811015610f645760405162461bcd60e51b815260206004820152601b60248201527f6275726e20616d6f756e7420657863656564732062616c616e6365000000000060448201526064016105cd565b610f6e82826118bd565b6001600160a01b038416600090815260cd602052604081209190915560cc8054849290610f9c9084906118bd565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b61074e61115f565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156110275761102283611261565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611081575060408051601f3d908101601f1916820190925261107e91810190611984565b60015b6110e45760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016105cd565b600080516020611a0583398151915281146111535760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016105cd565b506110228383836112fd565b6097546001600160a01b031633146108f95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105cd565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166112325760405162461bcd60e51b81526004016105cd9061199d565b6108f9611328565b600054610100900460ff166108f95760405162461bcd60e51b81526004016105cd9061199d565b6001600160a01b0381163b6112ce5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016105cd565b600080516020611a0583398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b61130683611358565b6000825111806113135750805b15611022576113228383611398565b50505050565b600054610100900460ff1661134f5760405162461bcd60e51b81526004016105cd9061199d565b6108f9336111b9565b61136181611261565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606113bd8383604051806060016040528060278152602001611a25602791396113c4565b9392505050565b6060600080856001600160a01b0316856040516113e191906119e8565b600060405180830381855af49150503d806000811461141c576040519150601f19603f3d011682016040523d82523d6000602084013e611421565b606091505b50915091506114328683838761143c565b9695505050505050565b606083156114a85782516114a1576001600160a01b0385163b6114a15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105cd565b50816114b2565b6114b283836114ba565b949350505050565b8151156114ca5781518083602001fd5b8060405162461bcd60e51b81526004016105cd91906115a9565b8280546114f09061186c565b90600052602060002090601f0160209004810192826115125760008555611558565b82601f1061152b57805160ff1916838001178555611558565b82800160010185558215611558579182015b8281111561155857825182559160200191906001019061153d565b50611564929150611568565b5090565b5b808211156115645760008155600101611569565b60005b83811015611598578181015183820152602001611580565b838111156113225750506000910152565b60208152600082518060208401526115c881604085016020870161157d565b601f01601f19169190910160400192915050565b6001600160a01b038116811461074e57600080fd5b6000806040838503121561160457600080fd5b823561160f816115dc565b946020939093013593505050565b60008060006060848603121561163257600080fd5b833561163d816115dc565b9250602084013561164d816115dc565b929592945050506040919091013590565b60006020828403121561167057600080fd5b5035919050565b60006020828403121561168957600080fd5b81356113bd816115dc565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156116c5576116c5611694565b604051601f8501601f19908116603f011681019082821181831017156116ed576116ed611694565b8160405280935085815286868601111561170657600080fd5b858560208301376000602087830101525050509392505050565b6000806040838503121561173357600080fd5b823561173e816115dc565b9150602083013567ffffffffffffffff81111561175a57600080fd5b8301601f8101851361176b57600080fd5b61177a858235602084016116aa565b9150509250929050565b6000806040838503121561179757600080fd5b82356117a2816115dc565b915060208301356117b2816115dc565b809150509250929050565b600082601f8301126117ce57600080fd5b6113bd838335602085016116aa565b600080600080608085870312156117f357600080fd5b843567ffffffffffffffff8082111561180b57600080fd5b611817888389016117bd565b9550602087013591508082111561182d57600080fd5b5061183a878288016117bd565b935050604085013560ff8116811461185157600080fd5b91506060850135611861816115dc565b939692955090935050565b600181811c9082168061188057607f821691505b602082108114156118a157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000828210156118cf576118cf6118a7565b500390565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6000821982111561197f5761197f6118a7565b500190565b60006020828403121561199657600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082516119fa81846020870161157d565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212203491f4b9433597e502b7d2b2ea2025687fa17dcc511ea87b77ea73cb9c0109d464736f6c634300080a0033"), + // deploy code from solidity/contracts/fip20/WFXUpgradable.sol + Code: MustDecodeHex("0x6080604052600436106101395760003560e01c8063715018a6116100ab578063b86d52981161006f578063b86d529814610366578063d0e30db014610148578063dd62ed3e14610384578063de7ea79d146103ca578063f2fde38b146103ea578063f3fef3a31461040a57610148565b8063715018a6146102ca5780638da5cb5b146102df57806395d89b41146103115780639dc29fac14610326578063a9059cbb1461034657610148565b8063313ce567116100fd578063313ce5671461020a5780633659cfe61461022c57806340c10f191461024c5780634f1ef2861461026c57806352d1902d1461027f57806370a082311461029457610148565b806306fdde0314610150578063095ea7b31461017b57806318160ddd146101ab57806323b872dd146101ca5780632e1a7d4d146101ea57610148565b366101485761014661042a565b005b61014661042a565b34801561015c57600080fd5b5061016561046b565b60405161017291906115a9565b60405180910390f35b34801561018757600080fd5b5061019b6101963660046115f1565b6104fd565b6040519015158152602001610172565b3480156101b757600080fd5b5060cc545b604051908152602001610172565b3480156101d657600080fd5b5061019b6101e536600461161d565b610553565b3480156101f657600080fd5b5061014661020536600461165e565b610600565b34801561021657600080fd5b5060cb5460405160ff9091168152602001610172565b34801561023857600080fd5b50610146610247366004611677565b610671565b34801561025857600080fd5b506101466102673660046115f1565b610751565b61014661027a366004611720565b610767565b34801561028b57600080fd5b506101bc610834565b3480156102a057600080fd5b506101bc6102af366004611677565b6001600160a01b0316600090815260cd602052604090205490565b3480156102d657600080fd5b506101466108e7565b3480156102eb57600080fd5b506097546001600160a01b03165b6040516001600160a01b039091168152602001610172565b34801561031d57600080fd5b506101656108fb565b34801561033257600080fd5b506101466103413660046115f1565b61090a565b34801561035257600080fd5b5061019b6103613660046115f1565b61091c565b34801561037257600080fd5b5060cf546001600160a01b03166102f9565b34801561039057600080fd5b506101bc61039f366004611784565b6001600160a01b03918216600090815260ce6020908152604080832093909416825291909152205490565b3480156103d657600080fd5b506101466103e53660046117dd565b610932565b3480156103f657600080fd5b50610146610405366004611677565b610aa1565b34801561041657600080fd5b506101466104253660046115f1565b610b17565b6104343334610b9c565b60405134815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a2565b606060c9805461047a9061186c565b80601f01602080910402602001604051908101604052809291908181526020018280546104a69061186c565b80156104f35780601f106104c8576101008083540402835291602001916104f3565b820191906000526020600020905b8154815290600101906020018083116104d657829003601f168201915b5050505050905090565b600061050a338484610c74565b6040518281526001600160a01b0384169033907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259060200160405180910390a350600192915050565b6001600160a01b038316600090815260ce60209081526040808320338452909152812054828110156105d65760405162461bcd60e51b815260206004820152602160248201527f7472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636044820152606560f81b60648201526084015b60405180910390fd5b6105ea85336105e586856118bd565b610c74565b6105f5858585610cf6565b506001949350505050565b61060b335b82610ea5565b604051339082156108fc029083906000818181858888f19350505050158015610638573d6000803e3d6000fd5b5060405181815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a250565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000010021614156106ba5760405162461bcd60e51b81526004016105cd906118d4565b7f00000000000000000000000000000000000000000000000000000000000010026001600160a01b0316610703600080516020611a05833981519152546001600160a01b031690565b6001600160a01b0316146107295760405162461bcd60e51b81526004016105cd90611920565b61073281610fe7565b6040805160008082526020820190925261074e91839190610fef565b50565b61075961115f565b6107638282610b9c565b5050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000010021614156107b05760405162461bcd60e51b81526004016105cd906118d4565b7f00000000000000000000000000000000000000000000000000000000000010026001600160a01b03166107f9600080516020611a05833981519152546001600160a01b031690565b6001600160a01b03161461081f5760405162461bcd60e51b81526004016105cd90611920565b61082882610fe7565b61076382826001610fef565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000100216146108d45760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016105cd565b50600080516020611a0583398151915290565b6108ef61115f565b6108f960006111b9565b565b606060ca805461047a9061186c565b61091261115f565b6107638282610ea5565b6000610929338484610cf6565b50600192915050565b600054610100900460ff16158080156109525750600054600160ff909116105b8061096c5750303b15801561096c575060005460ff166001145b6109cf5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105cd565b6000805460ff1916600117905580156109f2576000805461ff0019166101001790555b8451610a059060c99060208801906114e4565b508351610a199060ca9060208701906114e4565b5060cb805460ff191660ff851617905560cf80546001600160a01b0319166001600160a01b038416179055610a4c61120b565b610a5461123a565b8015610a9a576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b610aa961115f565b6001600160a01b038116610b0e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105cd565b61074e816111b9565b610b2033610605565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610b56573d6000803e3d6000fd5b506040518181526001600160a01b0383169033907f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb906020015b60405180910390a35050565b6001600160a01b038216610bf25760405162461bcd60e51b815260206004820152601860248201527f6d696e7420746f20746865207a65726f2061646472657373000000000000000060448201526064016105cd565b8060cc6000828254610c04919061196c565b90915550506001600160a01b038216600090815260cd602052604081208054839290610c3190849061196c565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610b90565b6001600160a01b038316610cca5760405162461bcd60e51b815260206004820152601d60248201527f617070726f76652066726f6d20746865207a65726f206164647265737300000060448201526064016105cd565b6001600160a01b03928316600090815260ce602090815260408083209490951682529290925291902055565b6001600160a01b038316610d4c5760405162461bcd60e51b815260206004820152601e60248201527f7472616e736665722066726f6d20746865207a65726f2061646472657373000060448201526064016105cd565b6001600160a01b038216610da25760405162461bcd60e51b815260206004820152601c60248201527f7472616e7366657220746f20746865207a65726f20616464726573730000000060448201526064016105cd565b6001600160a01b038316600090815260cd602052604090205481811015610e0b5760405162461bcd60e51b815260206004820152601f60248201527f7472616e7366657220616d6f756e7420657863656564732062616c616e63650060448201526064016105cd565b610e1582826118bd565b6001600160a01b03808616600090815260cd60205260408082209390935590851681529081208054849290610e4b90849061196c565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610e9791815260200190565b60405180910390a350505050565b6001600160a01b038216610efb5760405162461bcd60e51b815260206004820152601a60248201527f6275726e2066726f6d20746865207a65726f206164647265737300000000000060448201526064016105cd565b6001600160a01b038216600090815260cd602052604090205481811015610f645760405162461bcd60e51b815260206004820152601b60248201527f6275726e20616d6f756e7420657863656564732062616c616e6365000000000060448201526064016105cd565b610f6e82826118bd565b6001600160a01b038416600090815260cd602052604081209190915560cc8054849290610f9c9084906118bd565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b61074e61115f565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156110275761102283611261565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611081575060408051601f3d908101601f1916820190925261107e91810190611984565b60015b6110e45760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016105cd565b600080516020611a0583398151915281146111535760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016105cd565b506110228383836112fd565b6097546001600160a01b031633146108f95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105cd565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166112325760405162461bcd60e51b81526004016105cd9061199d565b6108f9611328565b600054610100900460ff166108f95760405162461bcd60e51b81526004016105cd9061199d565b6001600160a01b0381163b6112ce5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016105cd565b600080516020611a0583398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b61130683611358565b6000825111806113135750805b15611022576113228383611398565b50505050565b600054610100900460ff1661134f5760405162461bcd60e51b81526004016105cd9061199d565b6108f9336111b9565b61136181611261565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606113bd8383604051806060016040528060278152602001611a25602791396113c4565b9392505050565b6060600080856001600160a01b0316856040516113e191906119e8565b600060405180830381855af49150503d806000811461141c576040519150601f19603f3d011682016040523d82523d6000602084013e611421565b606091505b50915091506114328683838761143c565b9695505050505050565b606083156114a85782516114a1576001600160a01b0385163b6114a15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105cd565b50816114b2565b6114b283836114ba565b949350505050565b8151156114ca5781518083602001fd5b8060405162461bcd60e51b81526004016105cd91906115a9565b8280546114f09061186c565b90600052602060002090601f0160209004810192826115125760008555611558565b82601f1061152b57805160ff1916838001178555611558565b82800160010185558215611558579182015b8281111561155857825182559160200191906001019061153d565b50611564929150611568565b5090565b5b808211156115645760008155600101611569565b60005b83811015611598578181015183820152602001611580565b838111156113225750506000910152565b60208152600082518060208401526115c881604085016020870161157d565b601f01601f19169190910160400192915050565b6001600160a01b038116811461074e57600080fd5b6000806040838503121561160457600080fd5b823561160f816115dc565b946020939093013593505050565b60008060006060848603121561163257600080fd5b833561163d816115dc565b9250602084013561164d816115dc565b929592945050506040919091013590565b60006020828403121561167057600080fd5b5035919050565b60006020828403121561168957600080fd5b81356113bd816115dc565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156116c5576116c5611694565b604051601f8501601f19908116603f011681019082821181831017156116ed576116ed611694565b8160405280935085815286868601111561170657600080fd5b858560208301376000602087830101525050509392505050565b6000806040838503121561173357600080fd5b823561173e816115dc565b9150602083013567ffffffffffffffff81111561175a57600080fd5b8301601f8101851361176b57600080fd5b61177a858235602084016116aa565b9150509250929050565b6000806040838503121561179757600080fd5b82356117a2816115dc565b915060208301356117b2816115dc565b809150509250929050565b600082601f8301126117ce57600080fd5b6113bd838335602085016116aa565b600080600080608085870312156117f357600080fd5b843567ffffffffffffffff8082111561180b57600080fd5b611817888389016117bd565b9550602087013591508082111561182d57600080fd5b5061183a878288016117bd565b935050604085013560ff8116811461185157600080fd5b91506060850135611861816115dc565b939692955090935050565b600181811c9082168061188057607f821691505b602082108114156118a157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000828210156118cf576118cf6118a7565b500390565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6000821982111561197f5761197f6118a7565b500190565b60006020828403121561199657600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082516119fa81846020870161157d565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212203491f4b9433597e502b7d2b2ea2025687fa17dcc511ea87b77ea73cb9c0109d464736f6c634300080a0033"), } + erc1967Proxy = Contract{ Address: common.Address{}, ABI: MustABIJson(ERC1967ProxyMetaData.ABI), @@ -44,10 +48,31 @@ var ( Code: []byte{}, } + bridgeProxy = Contract{ + Address: common.Address{}, + ABI: MustABIJson(BridgeProxyMetaData.ABI), + Bin: MustDecodeHex(BridgeProxyMetaData.Bin), + // deploy code from solidity/contracts/bridge/BridgeProxy.sol + Code: MustDecodeHex("0x6080604052600436106100225760003560e01c806319ab453c1461003957610031565b366100315761002f610059565b005b61002f610059565b34801561004557600080fd5b5061002f61005436600461021e565b61006b565b6100696100646100d0565b610108565b565b600061009e7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b0316146100c45760405162dc149f60e41b815260040160405180910390fd5b6100cd8161012c565b50565b60006101037f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015610127573d6000f35b3d6000fd5b6101358161016c565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381163b6101dd5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840160405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b60006020828403121561023057600080fd5b81356001600160a01b038116811461024757600080fd5b939250505056fea2646970667358221220f5fd2c6b493d2d8c8fccb10ef0e5ed3a7f4f1914bae22833db4f76dbce6da4fe64736f6c634300080a0033"), + } + + bridgeFeeQuote = Contract{ + Address: common.Address{}, + ABI: MustABIJson(BridgeFeeQuoteMetaData.ABI), + Bin: MustDecodeHex(BridgeFeeQuoteMetaData.Bin), + Code: []byte{}, + } + + bridgeFeeOracle = Contract{ + Address: common.Address{}, + ABI: MustABIJson(BridgeFeeOracleMetaData.ABI), + Bin: MustDecodeHex(BridgeFeeOracleMetaData.Bin), + Code: []byte{}, + } + fxBridgeABI = MustABIJson(IFxBridgeLogicMetaData.ABI) bridgeCallbackABI = MustABIJson(IBridgeCallbackMetaData.ABI) errorABI = MustABIJson(IErrorMetaData.ABI) - bridgeFeeQuoteABI = MustABIJson(IBridgeFeeQuoteMetaData.ABI) ) type Caller interface { @@ -78,6 +103,18 @@ func GetERC1967Proxy() Contract { return erc1967Proxy } +func GetBridgeProxy() Contract { + return bridgeProxy +} + +func GetBridgeFeeQuote() Contract { + return bridgeFeeQuote +} + +func GetBridgeFeeOracle() Contract { + return bridgeFeeOracle +} + func MustDecodeHex(str string) []byte { bz, err := hexutil.Decode(str) if err != nil { diff --git a/contract/ibridge_fee_quote.sol.go b/contract/ibridge_fee_quote.sol.go deleted file mode 100644 index 5b6c5565..00000000 --- a/contract/ibridge_fee_quote.sol.go +++ /dev/null @@ -1,479 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package contract - -import ( - "errors" - "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 ( - _ = errors.New - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription - _ = abi.ConvertType -) - -// IBridgeFeeQuoteAsset is an auto generated low-level Go binding around an user-defined struct. -type IBridgeFeeQuoteAsset struct { - IsActive bool - TokenNames []string -} - -// IBridgeFeeQuoteQuoteInfo is an auto generated low-level Go binding around an user-defined struct. -type IBridgeFeeQuoteQuoteInfo struct { - Id *big.Int - ChainName string - TokenName string - Oracle common.Address - Fee *big.Int - GasLimit *big.Int - Expiry *big.Int -} - -// IBridgeFeeQuoteQuoteInput is an auto generated low-level Go binding around an user-defined struct. -type IBridgeFeeQuoteQuoteInput struct { - ChainName string - TokenName string - Oracle common.Address - QuoteIndex *big.Int - Fee *big.Int - GasLimit *big.Int - Expiry *big.Int - Signature []byte -} - -// IBridgeFeeQuoteMetaData contains all meta data concerning the IBridgeFeeQuote contract. -var IBridgeFeeQuoteMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_tokenName\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_oracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getQuote\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenName\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"internalType\":\"structIBridgeFeeQuote.QuoteInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"}],\"name\":\"getQuoteById\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenName\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"internalType\":\"structIBridgeFeeQuote.QuoteInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chainName\",\"type\":\"string\"}],\"name\":\"getQuoteList\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenName\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"internalType\":\"structIBridgeFeeQuote.QuoteInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_tokenName\",\"type\":\"string\"}],\"name\":\"getQuotesByToken\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenName\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"internalType\":\"structIBridgeFeeQuote.QuoteInfo[]\",\"name\":\"quotes\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_tokenName\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_expiry\",\"type\":\"uint256\"}],\"name\":\"makeMessageHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxQuoteIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenName\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"quoteIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"structIBridgeFeeQuote.QuoteInput[]\",\"name\":\"_inputs\",\"type\":\"tuple[]\"}],\"name\":\"quote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chainName\",\"type\":\"string\"}],\"name\":\"supportAssets\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isActive\",\"type\":\"bool\"},{\"internalType\":\"string[]\",\"name\":\"tokenNames\",\"type\":\"string[]\"}],\"internalType\":\"structIBridgeFeeQuote.Asset\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"supportChainNames\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", -} - -// IBridgeFeeQuoteABI is the input ABI used to generate the binding from. -// Deprecated: Use IBridgeFeeQuoteMetaData.ABI instead. -var IBridgeFeeQuoteABI = IBridgeFeeQuoteMetaData.ABI - -// IBridgeFeeQuote is an auto generated Go binding around an Ethereum contract. -type IBridgeFeeQuote struct { - IBridgeFeeQuoteCaller // Read-only binding to the contract - IBridgeFeeQuoteTransactor // Write-only binding to the contract - IBridgeFeeQuoteFilterer // Log filterer for contract events -} - -// IBridgeFeeQuoteCaller is an auto generated read-only Go binding around an Ethereum contract. -type IBridgeFeeQuoteCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IBridgeFeeQuoteTransactor is an auto generated write-only Go binding around an Ethereum contract. -type IBridgeFeeQuoteTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IBridgeFeeQuoteFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type IBridgeFeeQuoteFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IBridgeFeeQuoteSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type IBridgeFeeQuoteSession struct { - Contract *IBridgeFeeQuote // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IBridgeFeeQuoteCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type IBridgeFeeQuoteCallerSession struct { - Contract *IBridgeFeeQuoteCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// IBridgeFeeQuoteTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type IBridgeFeeQuoteTransactorSession struct { - Contract *IBridgeFeeQuoteTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IBridgeFeeQuoteRaw is an auto generated low-level Go binding around an Ethereum contract. -type IBridgeFeeQuoteRaw struct { - Contract *IBridgeFeeQuote // Generic contract binding to access the raw methods on -} - -// IBridgeFeeQuoteCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type IBridgeFeeQuoteCallerRaw struct { - Contract *IBridgeFeeQuoteCaller // Generic read-only contract binding to access the raw methods on -} - -// IBridgeFeeQuoteTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type IBridgeFeeQuoteTransactorRaw struct { - Contract *IBridgeFeeQuoteTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewIBridgeFeeQuote creates a new instance of IBridgeFeeQuote, bound to a specific deployed contract. -func NewIBridgeFeeQuote(address common.Address, backend bind.ContractBackend) (*IBridgeFeeQuote, error) { - contract, err := bindIBridgeFeeQuote(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &IBridgeFeeQuote{IBridgeFeeQuoteCaller: IBridgeFeeQuoteCaller{contract: contract}, IBridgeFeeQuoteTransactor: IBridgeFeeQuoteTransactor{contract: contract}, IBridgeFeeQuoteFilterer: IBridgeFeeQuoteFilterer{contract: contract}}, nil -} - -// NewIBridgeFeeQuoteCaller creates a new read-only instance of IBridgeFeeQuote, bound to a specific deployed contract. -func NewIBridgeFeeQuoteCaller(address common.Address, caller bind.ContractCaller) (*IBridgeFeeQuoteCaller, error) { - contract, err := bindIBridgeFeeQuote(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &IBridgeFeeQuoteCaller{contract: contract}, nil -} - -// NewIBridgeFeeQuoteTransactor creates a new write-only instance of IBridgeFeeQuote, bound to a specific deployed contract. -func NewIBridgeFeeQuoteTransactor(address common.Address, transactor bind.ContractTransactor) (*IBridgeFeeQuoteTransactor, error) { - contract, err := bindIBridgeFeeQuote(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &IBridgeFeeQuoteTransactor{contract: contract}, nil -} - -// NewIBridgeFeeQuoteFilterer creates a new log filterer instance of IBridgeFeeQuote, bound to a specific deployed contract. -func NewIBridgeFeeQuoteFilterer(address common.Address, filterer bind.ContractFilterer) (*IBridgeFeeQuoteFilterer, error) { - contract, err := bindIBridgeFeeQuote(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &IBridgeFeeQuoteFilterer{contract: contract}, nil -} - -// bindIBridgeFeeQuote binds a generic wrapper to an already deployed contract. -func bindIBridgeFeeQuote(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := IBridgeFeeQuoteMetaData.GetAbi() - 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. -func (_IBridgeFeeQuote *IBridgeFeeQuoteRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _IBridgeFeeQuote.Contract.IBridgeFeeQuoteCaller.contract.Call(opts, result, method, params...) -} - -// Transfer initiates a plain transaction to move funds to the contract, calling -// its default method if one is available. -func (_IBridgeFeeQuote *IBridgeFeeQuoteRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IBridgeFeeQuote.Contract.IBridgeFeeQuoteTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IBridgeFeeQuote *IBridgeFeeQuoteRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IBridgeFeeQuote.Contract.IBridgeFeeQuoteTransactor.contract.Transact(opts, method, params...) -} - -// Call invokes the (constant) contract method with params as input values and -// sets the output to result. The result type might be a single field for simple -// returns, a slice of interfaces for anonymous returns and a struct for named -// returns. -func (_IBridgeFeeQuote *IBridgeFeeQuoteCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _IBridgeFeeQuote.Contract.contract.Call(opts, result, method, params...) -} - -// Transfer initiates a plain transaction to move funds to the contract, calling -// its default method if one is available. -func (_IBridgeFeeQuote *IBridgeFeeQuoteTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IBridgeFeeQuote.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IBridgeFeeQuote *IBridgeFeeQuoteTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IBridgeFeeQuote.Contract.contract.Transact(opts, method, params...) -} - -// GetQuote is a free data retrieval call binding the contract method 0xdb223194. -// -// Solidity: function getQuote(string _chainName, string _tokenName, address _oracle, uint256 _index) view returns((uint256,string,string,address,uint256,uint256,uint256)) -func (_IBridgeFeeQuote *IBridgeFeeQuoteCaller) GetQuote(opts *bind.CallOpts, _chainName string, _tokenName string, _oracle common.Address, _index *big.Int) (IBridgeFeeQuoteQuoteInfo, error) { - var out []interface{} - err := _IBridgeFeeQuote.contract.Call(opts, &out, "getQuote", _chainName, _tokenName, _oracle, _index) - - if err != nil { - return *new(IBridgeFeeQuoteQuoteInfo), err - } - - out0 := *abi.ConvertType(out[0], new(IBridgeFeeQuoteQuoteInfo)).(*IBridgeFeeQuoteQuoteInfo) - - return out0, err - -} - -// GetQuote is a free data retrieval call binding the contract method 0xdb223194. -// -// Solidity: function getQuote(string _chainName, string _tokenName, address _oracle, uint256 _index) view returns((uint256,string,string,address,uint256,uint256,uint256)) -func (_IBridgeFeeQuote *IBridgeFeeQuoteSession) GetQuote(_chainName string, _tokenName string, _oracle common.Address, _index *big.Int) (IBridgeFeeQuoteQuoteInfo, error) { - return _IBridgeFeeQuote.Contract.GetQuote(&_IBridgeFeeQuote.CallOpts, _chainName, _tokenName, _oracle, _index) -} - -// GetQuote is a free data retrieval call binding the contract method 0xdb223194. -// -// Solidity: function getQuote(string _chainName, string _tokenName, address _oracle, uint256 _index) view returns((uint256,string,string,address,uint256,uint256,uint256)) -func (_IBridgeFeeQuote *IBridgeFeeQuoteCallerSession) GetQuote(_chainName string, _tokenName string, _oracle common.Address, _index *big.Int) (IBridgeFeeQuoteQuoteInfo, error) { - return _IBridgeFeeQuote.Contract.GetQuote(&_IBridgeFeeQuote.CallOpts, _chainName, _tokenName, _oracle, _index) -} - -// GetQuoteById is a free data retrieval call binding the contract method 0xa8541c17. -// -// Solidity: function getQuoteById(uint256 _id) view returns((uint256,string,string,address,uint256,uint256,uint256)) -func (_IBridgeFeeQuote *IBridgeFeeQuoteCaller) GetQuoteById(opts *bind.CallOpts, _id *big.Int) (IBridgeFeeQuoteQuoteInfo, error) { - var out []interface{} - err := _IBridgeFeeQuote.contract.Call(opts, &out, "getQuoteById", _id) - - if err != nil { - return *new(IBridgeFeeQuoteQuoteInfo), err - } - - out0 := *abi.ConvertType(out[0], new(IBridgeFeeQuoteQuoteInfo)).(*IBridgeFeeQuoteQuoteInfo) - - return out0, err - -} - -// GetQuoteById is a free data retrieval call binding the contract method 0xa8541c17. -// -// Solidity: function getQuoteById(uint256 _id) view returns((uint256,string,string,address,uint256,uint256,uint256)) -func (_IBridgeFeeQuote *IBridgeFeeQuoteSession) GetQuoteById(_id *big.Int) (IBridgeFeeQuoteQuoteInfo, error) { - return _IBridgeFeeQuote.Contract.GetQuoteById(&_IBridgeFeeQuote.CallOpts, _id) -} - -// GetQuoteById is a free data retrieval call binding the contract method 0xa8541c17. -// -// Solidity: function getQuoteById(uint256 _id) view returns((uint256,string,string,address,uint256,uint256,uint256)) -func (_IBridgeFeeQuote *IBridgeFeeQuoteCallerSession) GetQuoteById(_id *big.Int) (IBridgeFeeQuoteQuoteInfo, error) { - return _IBridgeFeeQuote.Contract.GetQuoteById(&_IBridgeFeeQuote.CallOpts, _id) -} - -// GetQuoteList is a free data retrieval call binding the contract method 0x398a0e6b. -// -// Solidity: function getQuoteList(string _chainName) view returns((uint256,string,string,address,uint256,uint256,uint256)[]) -func (_IBridgeFeeQuote *IBridgeFeeQuoteCaller) GetQuoteList(opts *bind.CallOpts, _chainName string) ([]IBridgeFeeQuoteQuoteInfo, error) { - var out []interface{} - err := _IBridgeFeeQuote.contract.Call(opts, &out, "getQuoteList", _chainName) - - if err != nil { - return *new([]IBridgeFeeQuoteQuoteInfo), err - } - - out0 := *abi.ConvertType(out[0], new([]IBridgeFeeQuoteQuoteInfo)).(*[]IBridgeFeeQuoteQuoteInfo) - - return out0, err - -} - -// GetQuoteList is a free data retrieval call binding the contract method 0x398a0e6b. -// -// Solidity: function getQuoteList(string _chainName) view returns((uint256,string,string,address,uint256,uint256,uint256)[]) -func (_IBridgeFeeQuote *IBridgeFeeQuoteSession) GetQuoteList(_chainName string) ([]IBridgeFeeQuoteQuoteInfo, error) { - return _IBridgeFeeQuote.Contract.GetQuoteList(&_IBridgeFeeQuote.CallOpts, _chainName) -} - -// GetQuoteList is a free data retrieval call binding the contract method 0x398a0e6b. -// -// Solidity: function getQuoteList(string _chainName) view returns((uint256,string,string,address,uint256,uint256,uint256)[]) -func (_IBridgeFeeQuote *IBridgeFeeQuoteCallerSession) GetQuoteList(_chainName string) ([]IBridgeFeeQuoteQuoteInfo, error) { - return _IBridgeFeeQuote.Contract.GetQuoteList(&_IBridgeFeeQuote.CallOpts, _chainName) -} - -// GetQuotesByToken is a free data retrieval call binding the contract method 0x3dd7c98c. -// -// Solidity: function getQuotesByToken(string _chainName, string _tokenName) view returns((uint256,string,string,address,uint256,uint256,uint256)[] quotes) -func (_IBridgeFeeQuote *IBridgeFeeQuoteCaller) GetQuotesByToken(opts *bind.CallOpts, _chainName string, _tokenName string) ([]IBridgeFeeQuoteQuoteInfo, error) { - var out []interface{} - err := _IBridgeFeeQuote.contract.Call(opts, &out, "getQuotesByToken", _chainName, _tokenName) - - if err != nil { - return *new([]IBridgeFeeQuoteQuoteInfo), err - } - - out0 := *abi.ConvertType(out[0], new([]IBridgeFeeQuoteQuoteInfo)).(*[]IBridgeFeeQuoteQuoteInfo) - - return out0, err - -} - -// GetQuotesByToken is a free data retrieval call binding the contract method 0x3dd7c98c. -// -// Solidity: function getQuotesByToken(string _chainName, string _tokenName) view returns((uint256,string,string,address,uint256,uint256,uint256)[] quotes) -func (_IBridgeFeeQuote *IBridgeFeeQuoteSession) GetQuotesByToken(_chainName string, _tokenName string) ([]IBridgeFeeQuoteQuoteInfo, error) { - return _IBridgeFeeQuote.Contract.GetQuotesByToken(&_IBridgeFeeQuote.CallOpts, _chainName, _tokenName) -} - -// GetQuotesByToken is a free data retrieval call binding the contract method 0x3dd7c98c. -// -// Solidity: function getQuotesByToken(string _chainName, string _tokenName) view returns((uint256,string,string,address,uint256,uint256,uint256)[] quotes) -func (_IBridgeFeeQuote *IBridgeFeeQuoteCallerSession) GetQuotesByToken(_chainName string, _tokenName string) ([]IBridgeFeeQuoteQuoteInfo, error) { - return _IBridgeFeeQuote.Contract.GetQuotesByToken(&_IBridgeFeeQuote.CallOpts, _chainName, _tokenName) -} - -// MakeMessageHash is a free data retrieval call binding the contract method 0x3fc57c3d. -// -// Solidity: function makeMessageHash(string _chainName, string _tokenName, uint256 _fee, uint256 _gasLimit, uint256 _expiry) pure returns(bytes32) -func (_IBridgeFeeQuote *IBridgeFeeQuoteCaller) MakeMessageHash(opts *bind.CallOpts, _chainName string, _tokenName string, _fee *big.Int, _gasLimit *big.Int, _expiry *big.Int) ([32]byte, error) { - var out []interface{} - err := _IBridgeFeeQuote.contract.Call(opts, &out, "makeMessageHash", _chainName, _tokenName, _fee, _gasLimit, _expiry) - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// MakeMessageHash is a free data retrieval call binding the contract method 0x3fc57c3d. -// -// Solidity: function makeMessageHash(string _chainName, string _tokenName, uint256 _fee, uint256 _gasLimit, uint256 _expiry) pure returns(bytes32) -func (_IBridgeFeeQuote *IBridgeFeeQuoteSession) MakeMessageHash(_chainName string, _tokenName string, _fee *big.Int, _gasLimit *big.Int, _expiry *big.Int) ([32]byte, error) { - return _IBridgeFeeQuote.Contract.MakeMessageHash(&_IBridgeFeeQuote.CallOpts, _chainName, _tokenName, _fee, _gasLimit, _expiry) -} - -// MakeMessageHash is a free data retrieval call binding the contract method 0x3fc57c3d. -// -// Solidity: function makeMessageHash(string _chainName, string _tokenName, uint256 _fee, uint256 _gasLimit, uint256 _expiry) pure returns(bytes32) -func (_IBridgeFeeQuote *IBridgeFeeQuoteCallerSession) MakeMessageHash(_chainName string, _tokenName string, _fee *big.Int, _gasLimit *big.Int, _expiry *big.Int) ([32]byte, error) { - return _IBridgeFeeQuote.Contract.MakeMessageHash(&_IBridgeFeeQuote.CallOpts, _chainName, _tokenName, _fee, _gasLimit, _expiry) -} - -// MaxQuoteIndex is a free data retrieval call binding the contract method 0xec5af586. -// -// Solidity: function maxQuoteIndex() view returns(uint256) -func (_IBridgeFeeQuote *IBridgeFeeQuoteCaller) MaxQuoteIndex(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _IBridgeFeeQuote.contract.Call(opts, &out, "maxQuoteIndex") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// MaxQuoteIndex is a free data retrieval call binding the contract method 0xec5af586. -// -// Solidity: function maxQuoteIndex() view returns(uint256) -func (_IBridgeFeeQuote *IBridgeFeeQuoteSession) MaxQuoteIndex() (*big.Int, error) { - return _IBridgeFeeQuote.Contract.MaxQuoteIndex(&_IBridgeFeeQuote.CallOpts) -} - -// MaxQuoteIndex is a free data retrieval call binding the contract method 0xec5af586. -// -// Solidity: function maxQuoteIndex() view returns(uint256) -func (_IBridgeFeeQuote *IBridgeFeeQuoteCallerSession) MaxQuoteIndex() (*big.Int, error) { - return _IBridgeFeeQuote.Contract.MaxQuoteIndex(&_IBridgeFeeQuote.CallOpts) -} - -// SupportAssets is a free data retrieval call binding the contract method 0x1b826a1b. -// -// Solidity: function supportAssets(string _chainName) view returns((bool,string[])) -func (_IBridgeFeeQuote *IBridgeFeeQuoteCaller) SupportAssets(opts *bind.CallOpts, _chainName string) (IBridgeFeeQuoteAsset, error) { - var out []interface{} - err := _IBridgeFeeQuote.contract.Call(opts, &out, "supportAssets", _chainName) - - if err != nil { - return *new(IBridgeFeeQuoteAsset), err - } - - out0 := *abi.ConvertType(out[0], new(IBridgeFeeQuoteAsset)).(*IBridgeFeeQuoteAsset) - - return out0, err - -} - -// SupportAssets is a free data retrieval call binding the contract method 0x1b826a1b. -// -// Solidity: function supportAssets(string _chainName) view returns((bool,string[])) -func (_IBridgeFeeQuote *IBridgeFeeQuoteSession) SupportAssets(_chainName string) (IBridgeFeeQuoteAsset, error) { - return _IBridgeFeeQuote.Contract.SupportAssets(&_IBridgeFeeQuote.CallOpts, _chainName) -} - -// SupportAssets is a free data retrieval call binding the contract method 0x1b826a1b. -// -// Solidity: function supportAssets(string _chainName) view returns((bool,string[])) -func (_IBridgeFeeQuote *IBridgeFeeQuoteCallerSession) SupportAssets(_chainName string) (IBridgeFeeQuoteAsset, error) { - return _IBridgeFeeQuote.Contract.SupportAssets(&_IBridgeFeeQuote.CallOpts, _chainName) -} - -// SupportChainNames is a free data retrieval call binding the contract method 0x0a1d133c. -// -// Solidity: function supportChainNames() view returns(string[]) -func (_IBridgeFeeQuote *IBridgeFeeQuoteCaller) SupportChainNames(opts *bind.CallOpts) ([]string, error) { - var out []interface{} - err := _IBridgeFeeQuote.contract.Call(opts, &out, "supportChainNames") - - if err != nil { - return *new([]string), err - } - - out0 := *abi.ConvertType(out[0], new([]string)).(*[]string) - - return out0, err - -} - -// SupportChainNames is a free data retrieval call binding the contract method 0x0a1d133c. -// -// Solidity: function supportChainNames() view returns(string[]) -func (_IBridgeFeeQuote *IBridgeFeeQuoteSession) SupportChainNames() ([]string, error) { - return _IBridgeFeeQuote.Contract.SupportChainNames(&_IBridgeFeeQuote.CallOpts) -} - -// SupportChainNames is a free data retrieval call binding the contract method 0x0a1d133c. -// -// Solidity: function supportChainNames() view returns(string[]) -func (_IBridgeFeeQuote *IBridgeFeeQuoteCallerSession) SupportChainNames() ([]string, error) { - return _IBridgeFeeQuote.Contract.SupportChainNames(&_IBridgeFeeQuote.CallOpts) -} - -// Quote is a paid mutator transaction binding the contract method 0xc994e71a. -// -// Solidity: function quote((string,string,address,uint256,uint256,uint256,uint256,bytes)[] _inputs) returns(bool) -func (_IBridgeFeeQuote *IBridgeFeeQuoteTransactor) Quote(opts *bind.TransactOpts, _inputs []IBridgeFeeQuoteQuoteInput) (*types.Transaction, error) { - return _IBridgeFeeQuote.contract.Transact(opts, "quote", _inputs) -} - -// Quote is a paid mutator transaction binding the contract method 0xc994e71a. -// -// Solidity: function quote((string,string,address,uint256,uint256,uint256,uint256,bytes)[] _inputs) returns(bool) -func (_IBridgeFeeQuote *IBridgeFeeQuoteSession) Quote(_inputs []IBridgeFeeQuoteQuoteInput) (*types.Transaction, error) { - return _IBridgeFeeQuote.Contract.Quote(&_IBridgeFeeQuote.TransactOpts, _inputs) -} - -// Quote is a paid mutator transaction binding the contract method 0xc994e71a. -// -// Solidity: function quote((string,string,address,uint256,uint256,uint256,uint256,bytes)[] _inputs) returns(bool) -func (_IBridgeFeeQuote *IBridgeFeeQuoteTransactorSession) Quote(_inputs []IBridgeFeeQuoteQuoteInput) (*types.Transaction, error) { - return _IBridgeFeeQuote.Contract.Quote(&_IBridgeFeeQuote.TransactOpts, _inputs) -} diff --git a/contract/interface.go b/contract/interface.go new file mode 100644 index 00000000..93ac36de --- /dev/null +++ b/contract/interface.go @@ -0,0 +1,21 @@ +package contract + +import ( + "context" + "math/big" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" + evmtypes "github.com/evmos/ethermint/x/evm/types" +) + +type EvmKeeper interface { + DeployContract(ctx sdk.Context, from common.Address, abi abi.ABI, bin []byte, args ...interface{}) (common.Address, error) + CreateContractWithCode(ctx sdk.Context, address common.Address, code []byte) error + ApplyContract(ctx context.Context, from, contract common.Address, value *big.Int, abi abi.ABI, method string, constructorData ...interface{}) (*evmtypes.MsgEthereumTxResponse, error) +} + +type AccountKeeper interface { + GetModuleAddress(moduleName string) sdk.AccAddress +} diff --git a/contract/types.go b/contract/types.go new file mode 100644 index 00000000..456ea64a --- /dev/null +++ b/contract/types.go @@ -0,0 +1,3 @@ +package contract + +const DefaultMaxQuoteIndex = 3 diff --git a/solidity/contracts/bridge/BridgeFeeOracle.sol b/solidity/contracts/bridge/BridgeFeeOracle.sol index 06e50e81..e283a820 100644 --- a/solidity/contracts/bridge/BridgeFeeOracle.sol +++ b/solidity/contracts/bridge/BridgeFeeOracle.sol @@ -19,6 +19,8 @@ contract BridgeFeeOracle is using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; bytes32 public constant QUOTE_ROLE = keccak256("QUOTE_ROLE"); + bytes32 public constant OWNER_ROLE = keccak256("OWNER_ROLE"); + bytes32 public constant UPGRADE_ROLE = keccak256("UPGRADE_ROLE"); address public crosschainContract; address public defaultOracle; @@ -31,14 +33,16 @@ contract BridgeFeeOracle is EnumerableSetUpgradeable.AddressSet private oracles; mapping(address => State) public oracleStatus; - function initialize(address _crossChain) public initializer { + function initialize(address _crosschain) public initializer { + crosschainContract = _crosschain; + + _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); + _grantRole(UPGRADE_ROLE, msg.sender); + _grantRole(OWNER_ROLE, msg.sender); + __AccessControl_init(); __UUPSUpgradeable_init(); __ReentrancyGuard_init(); - - crosschainContract = _crossChain; - - _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); } /** @@ -68,7 +72,7 @@ contract BridgeFeeOracle is function blackOracle( address _oracle - ) external onlyRole(DEFAULT_ADMIN_ROLE) nonReentrant { + ) external onlyRole(OWNER_ROLE) nonReentrant { if (oracleStatus[_oracle].isBlacklisted) return; if (oracleStatus[_oracle].isActive) { oracleStatus[_oracle].isActive = false; @@ -79,7 +83,7 @@ contract BridgeFeeOracle is function setDefaultOracle( address _defaultOracle - ) external onlyRole(DEFAULT_ADMIN_ROLE) { + ) external onlyRole(OWNER_ROLE) { if (!oracles.contains(_defaultOracle)) { oracleStatus[_defaultOracle] = State(false, true); oracles.add(_defaultOracle); @@ -93,5 +97,5 @@ contract BridgeFeeOracle is function _authorizeUpgrade( address - ) internal override onlyRole(DEFAULT_ADMIN_ROLE) {} // solhint-disable-line no-empty-blocks + ) internal override onlyRole(UPGRADE_ROLE) {} // solhint-disable-line no-empty-blocks } diff --git a/solidity/contracts/bridge/BridgeFeeQuote.sol b/solidity/contracts/bridge/BridgeFeeQuote.sol index 6969f8ab..f83cb5b2 100644 --- a/solidity/contracts/bridge/BridgeFeeQuote.sol +++ b/solidity/contracts/bridge/BridgeFeeQuote.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.0; import {IBridgeFeeQuote, IBridgeFeeOracle} from "./IBridgeFee.sol"; -import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; +import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; import {IERC20MetadataUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol"; @@ -25,13 +25,16 @@ contract BridgeFeeQuote is IBridgeFeeQuote, Initializable, UUPSUpgradeable, - OwnableUpgradeable, + AccessControlUpgradeable, ReentrancyGuardUpgradeable { using SafeERC20Upgradeable for IERC20MetadataUpgradeable; using ECDSAUpgradeable for bytes32; using StringsUpgradeable for string; + bytes32 public constant OWNER_ROLE = keccak256("OWNER_ROLE"); + bytes32 public constant UPGRADE_ROLE = keccak256("UPGRADE_ROLE"); + struct Quote { uint256 id; uint256 fee; @@ -62,7 +65,11 @@ contract BridgeFeeQuote is oracleContract = _oracleContract; maxQuoteIndex = _maxQuoteIndex; - __Ownable_init(); + _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); + _grantRole(UPGRADE_ROLE, msg.sender); + _grantRole(OWNER_ROLE, msg.sender); + + __AccessControl_init(); __UUPSUpgradeable_init(); __ReentrancyGuard_init(); } @@ -404,7 +411,7 @@ contract BridgeFeeQuote is function registerChain( string memory _chainName, string[] memory _tokenNames - ) external onlyOwner returns (bool) { + ) external onlyRole(OWNER_ROLE) returns (bool) { if (assets[_chainName].isActive) { revert ChainNameAlreadyExists(); } @@ -416,7 +423,7 @@ contract BridgeFeeQuote is function registerTokenName( string memory _chainName, string[] memory _tokenNames - ) external onlyOwner returns (bool) { + ) external onlyRole(OWNER_ROLE) returns (bool) { if (!assets[_chainName].isActive) { revert ChainNameInvalid(); } @@ -434,20 +441,21 @@ contract BridgeFeeQuote is function updateOracleContract( address _oracleContract - ) external onlyOwner returns (bool) { + ) external onlyRole(OWNER_ROLE) returns (bool) { oracleContract = _oracleContract; return true; } function updateMaxQuoteIndex( uint256 _maxQuoteIndex - ) external onlyOwner returns (bool) { + ) external onlyRole(OWNER_ROLE) returns (bool) { maxQuoteIndex = _maxQuoteIndex; return true; } receive() external payable {} - // solhint-disable-next-line no-empty-blocks - function _authorizeUpgrade(address) internal override onlyOwner {} + function _authorizeUpgrade( + address + ) internal override onlyRole(UPGRADE_ROLE) {} // solhint-disable-line no-empty-blocks } diff --git a/solidity/contracts/bridge/BridgeProxy.sol b/solidity/contracts/bridge/BridgeProxy.sol new file mode 100644 index 00000000..efca1b4f --- /dev/null +++ b/solidity/contracts/bridge/BridgeProxy.sol @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {ERC1967Upgrade} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol"; +import {Proxy} from "@openzeppelin/contracts/proxy/Proxy.sol"; + +error AlreadyInitialized(); + +contract BridgeProxy is Proxy, ERC1967Upgrade { + function init(address _logic) public { + if (_getImplementation() != address(0)) { + revert AlreadyInitialized(); + } + _upgradeTo(_logic); + } + + /** + * @dev Returns the current implementation address. + */ + function _implementation() + internal + view + virtual + override + returns (address impl) + { + return _getImplementation(); + } +} From 77314f3e0dae146a9d4cf6b542f968b0867f3283 Mon Sep 17 00:00:00 2001 From: zakir <80246097+zakir-code@users.noreply.github.com> Date: Thu, 7 Nov 2024 14:29:33 +0800 Subject: [PATCH 2/2] fix: refine function handling in 807 (#808) Co-authored-by: todd <81545601+todd-woko@users.noreply.github.com> --- app/app.go | 13 ++++++++----- app/upgrades/v8/upgrade.go | 15 +++++++++------ contract/bridge_fee.go | 10 +++++----- contract/bridge_fee_oracle.go | 2 +- contract/bridge_fee_oracle.sol.go | 2 +- contract/bridge_fee_quote.sol.go | 2 +- contract/types.go | 5 +++++ solidity/contracts/bridge/BridgeFeeOracle.sol | 8 ++++---- solidity/contracts/bridge/BridgeFeeQuote.sol | 11 +++++++---- 9 files changed, 41 insertions(+), 27 deletions(-) diff --git a/app/app.go b/app/app.go index 9228b4c6..a15ef14c 100644 --- a/app/app.go +++ b/app/app.go @@ -349,7 +349,7 @@ func (app *App) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci. } bridgeFeeQuoteKeeper := contract.NewBridgeFeeQuoteKeeper(app.EvmKeeper, contract.BridgeFeeAddress) - bridgeFeeOracleKeeper := contract.NewBrideFeeOracleKeeper(app.EvmKeeper, contract.BridgeFeeOracleAddress) + bridgeFeeOracleKeeper := contract.NewBridgeFeeOracleKeeper(app.EvmKeeper, contract.BridgeFeeOracleAddress) acc := app.AccountKeeper.GetModuleAddress(evmtypes.ModuleName) moduleAddress := common.BytesToAddress(acc.Bytes()) @@ -361,15 +361,18 @@ func (app *App) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci. if len(delegations) == 0 { return nil, errors.New("no delegations found") } - + bridgeDenoms := []contract.BridgeDenoms{ + { + ChainName: ethtypes.ModuleName, + Denoms: []string{fxtypes.DefaultDenom}, + }, + } if err = contract.DeployBridgeFeeContract( ctx, app.EvmKeeper, bridgeFeeQuoteKeeper, bridgeFeeOracleKeeper, - map[string][]string{ - ethtypes.ModuleName: {fxtypes.DefaultDenom}, - }, + bridgeDenoms, moduleAddress, moduleAddress, common.BytesToAddress(sdk.MustAccAddressFromBech32(delegations[0].DelegatorAddress).Bytes()), ); err != nil { diff --git a/app/upgrades/v8/upgrade.go b/app/upgrades/v8/upgrade.go index 8ce12c51..9f1fd064 100644 --- a/app/upgrades/v8/upgrade.go +++ b/app/upgrades/v8/upgrade.go @@ -76,19 +76,22 @@ func CreateUpgradeHandler(cdc codec.Codec, mm *module.Manager, configurator modu store.RemoveStoreKeys(cacheCtx, app.GetKey(erc20types.StoreKey), erc20v8.GetRemovedStoreKeys()) quoteKeeper := contract.NewBridgeFeeQuoteKeeper(app.EvmKeeper, contract.BridgeFeeAddress) - oracleKeeper := contract.NewBrideFeeOracleKeeper(app.EvmKeeper, contract.BridgeFeeOracleAddress) - bridgeDenomWithChain := make(map[string][]string) + oracleKeeper := contract.NewBridgeFeeOracleKeeper(app.EvmKeeper, contract.BridgeFeeOracleAddress) chains := crosschaintypes.GetSupportChains() - for _, chain := range chains { + bridgeDenoms := make([]contract.BridgeDenoms, len(chains)) + for index, chain := range chains { denoms := make([]string, 0) - bridgeTokens, err := app.Erc20Keeper.GetBridgeTokens(ctx, chain) + bridgeTokens, err := app.Erc20Keeper.GetBridgeTokens(cacheCtx, chain) if err != nil { return fromVM, err } for _, token := range bridgeTokens { denoms = append(denoms, token.GetDenom()) } - bridgeDenomWithChain[chain] = denoms + bridgeDenoms[index] = contract.BridgeDenoms{ + ChainName: chain, + Denoms: denoms, + } } acc := app.AccountKeeper.GetModuleAddress(evmtypes.ModuleName) moduleAddress := common.BytesToAddress(acc.Bytes()) @@ -103,7 +106,7 @@ func CreateUpgradeHandler(cdc codec.Codec, mm *module.Manager, configurator modu app.EvmKeeper, quoteKeeper, oracleKeeper, - bridgeDenomWithChain, + bridgeDenoms, moduleAddress, // TODO set bridge fee contract owner address before mainnet upgrade moduleAddress, diff --git a/contract/bridge_fee.go b/contract/bridge_fee.go index cbdfc2cc..4e2d0ae0 100644 --- a/contract/bridge_fee.go +++ b/contract/bridge_fee.go @@ -13,7 +13,7 @@ func DeployBridgeFeeContract( evmKeeper EvmKeeper, bridgeFeeQuoteKeeper BridgeFeeQuoteKeeper, bridgeFeeOracleKeeper BridgeFeeOracleKeeper, - bridgeDenomWithChain map[string][]string, + bridgeDenoms []BridgeDenoms, evmModuleAddress, owner, defaultOracleAddress common.Address, ) error { if err := deployBridgeProxy( @@ -40,7 +40,7 @@ func DeployBridgeFeeContract( if err := initBridgeFeeOracle(ctx, bridgeFeeOracleKeeper, owner, defaultOracleAddress); err != nil { return err } - return initBridgeFeeQuote(ctx, bridgeFeeQuoteKeeper, bridgeDenomWithChain, owner) + return initBridgeFeeQuote(ctx, bridgeFeeQuoteKeeper, bridgeDenoms, owner) } func deployBridgeProxy( @@ -101,7 +101,7 @@ func initBridgeFeeOracle( func initBridgeFeeQuote( ctx sdk.Context, bridgeFeeQuoteKeeper BridgeFeeQuoteKeeper, - bridgeDenomWithChain map[string][]string, + bridgeDenoms []BridgeDenoms, owner common.Address, ) error { if _, err := bridgeFeeQuoteKeeper.Initialize(ctx, common.HexToAddress(BridgeFeeOracleAddress), big.NewInt(DefaultMaxQuoteIndex)); err != nil { @@ -121,8 +121,8 @@ func initBridgeFeeQuote( if _, err = bridgeFeeQuoteKeeper.GrantRole(ctx, upgradeRole, owner); err != nil { return err } - for chainName, denoms := range bridgeDenomWithChain { - if _, err = bridgeFeeQuoteKeeper.RegisterChain(ctx, chainName, denoms...); err != nil { + for _, bridgeDenom := range bridgeDenoms { + if _, err = bridgeFeeQuoteKeeper.RegisterChain(ctx, bridgeDenom.ChainName, bridgeDenom.Denoms...); err != nil { return err } } diff --git a/contract/bridge_fee_oracle.go b/contract/bridge_fee_oracle.go index 701fcedc..cf37c41e 100644 --- a/contract/bridge_fee_oracle.go +++ b/contract/bridge_fee_oracle.go @@ -17,7 +17,7 @@ type BridgeFeeOracleKeeper struct { contract common.Address } -func NewBrideFeeOracleKeeper(caller Caller, contract string) BridgeFeeOracleKeeper { +func NewBridgeFeeOracleKeeper(caller Caller, contract string) BridgeFeeOracleKeeper { return BridgeFeeOracleKeeper{ Caller: caller, abi: GetBridgeFeeOracle().ABI, diff --git a/contract/bridge_fee_oracle.sol.go b/contract/bridge_fee_oracle.sol.go index 381dc26f..8bdf50b7 100644 --- a/contract/bridge_fee_oracle.sol.go +++ b/contract/bridge_fee_oracle.sol.go @@ -32,7 +32,7 @@ var ( // BridgeFeeOracleMetaData contains all meta data concerning the BridgeFeeOracle contract. var BridgeFeeOracleMetaData = &bind.MetaData{ ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OWNER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"QUOTE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_oracle\",\"type\":\"address\"}],\"name\":\"blackOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"crosschainContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"defaultOracle\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOracleList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_crosschain\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chainName\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_oracle\",\"type\":\"address\"}],\"name\":\"isOnline\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"oracleStatus\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isBlacklisted\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"isActive\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_defaultOracle\",\"type\":\"address\"}],\"name\":\"setDefaultOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", - Bin: "0x60a06040523060805234801561001457600080fd5b50608051611c7f61004c6000396000818161054601528181610586015281816106260152818161066601526107070152611c7f6000f3fe60806040526004361061012a5760003560e01c806380dce169116100ab578063c4d66de81161006f578063c4d66de814610363578063d10c106114610383578063d547741f146103a3578063e58378bb146103c3578063e863f6a7146103e5578063ec331b2b1461043657600080fd5b806380dce169146102a157806391d14854146102da578063a217fddf146102fa578063b908afa81461030f578063c44014d21461034357600080fd5b80634f1ef286116100f25780634f1ef28614610204578063510c27ad1461021757806352d1902d146102395780635bca74db1461024e5780637c90c9a91461028157600080fd5b806301ffc9a71461012f578063248a9ca3146101645780632f2ff15d146101a257806336568abe146101c45780633659cfe6146101e4575b600080fd5b34801561013b57600080fd5b5061014f61014a3660046116bd565b610457565b60405190151581526020015b60405180910390f35b34801561017057600080fd5b5061019461017f3660046116e7565b600090815260c9602052604090206001015490565b60405190815260200161015b565b3480156101ae57600080fd5b506101c26101bd36600461171c565b61048e565b005b3480156101d057600080fd5b506101c26101df36600461171c565b6104b8565b3480156101f057600080fd5b506101c26101ff366004611748565b61053b565b6101c26102123660046117ef565b61061b565b34801561022357600080fd5b5061022c6106e8565b60405161015b9190611851565b34801561024557600080fd5b506101946106fa565b34801561025a57600080fd5b506101947e0caaa0e08f624de190c2474175cd13784c8c75bbdd1b63ae5fab5540967b3c81565b34801561028d57600080fd5b506101c261029c366004611748565b6107ad565b3480156102ad57600080fd5b5061012e546102c2906001600160a01b031681565b6040516001600160a01b03909116815260200161015b565b3480156102e657600080fd5b5061014f6102f536600461171c565b61087a565b34801561030657600080fd5b50610194600081565b34801561031b57600080fd5b506101947f88aa719609f728b0c5e7fb8dd3608d5c25d497efbb3b9dd64e9251ebba10150881565b34801561034f57600080fd5b506101c261035e366004611748565b6108a5565b34801561036f57600080fd5b506101c261037e366004611748565b610951565b34801561038f57600080fd5b5061014f61039e36600461189e565b610adb565b3480156103af57600080fd5b506101c26103be36600461171c565b610ce0565b3480156103cf57600080fd5b50610194600080516020611be383398151915281565b3480156103f157600080fd5b5061041f610400366004611748565b6101316020526000908152604090205460ff8082169161010090041682565b60408051921515835290151560208301520161015b565b34801561044257600080fd5b5061012d546102c2906001600160a01b031681565b60006001600160e01b03198216637965db0b60e01b148061048857506301ffc9a760e01b6001600160e01b03198316145b92915050565b600082815260c960205260409020600101546104a981610d05565b6104b38383610d0f565b505050565b6001600160a01b038116331461052d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105378282610d95565b5050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156105845760405162461bcd60e51b8152600401610524906118f7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166105cd600080516020611c03833981519152546001600160a01b031690565b6001600160a01b0316146105f35760405162461bcd60e51b815260040161052490611943565b6105fc81610dfc565b6040805160008082526020820190925261061891839190610e26565b50565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156106645760405162461bcd60e51b8152600401610524906118f7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166106ad600080516020611c03833981519152546001600160a01b031690565b6001600160a01b0316146106d35760405162461bcd60e51b815260040161052490611943565b6106dc82610dfc565b61053782826001610e26565b60606106f561012f610f91565b905090565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461079a5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610524565b50600080516020611c0383398151915290565b600080516020611be38339815191526107c581610d05565b6107cd610fa5565b6001600160a01b0382166000908152610131602052604090205460ff16156107f457610870565b6001600160a01b03821660009081526101316020526040902054610100900460ff161561084b576001600160a01b038216600090815261013160205260409020805461ff001916905561084961012f83610fff565b505b6001600160a01b038216600090815261013160205260409020805460ff191660011790555b610537600160fb55565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600080516020611be38339815191526108bd81610d05565b6108c961012f8361101b565b61092d576040805180820182526000808252600160208084019182526001600160a01b0387168352610131905292902090518154925161ffff1990931690151561ff001916176101009215159290920291909117905561092b61012f8361103d565b505b5061012e80546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff16158080156109715750600054600160ff909116105b8061098b5750303b15801561098b575060005460ff166001145b6109ee5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610524565b6000805460ff191660011790558015610a11576000805461ff0019166101001790555b61012d80546001600160a01b0319166001600160a01b038416179055610a38600033610d0f565b610a627f88aa719609f728b0c5e7fb8dd3608d5c25d497efbb3b9dd64e9251ebba10150833610d0f565b610a7a600080516020611be383398151915233610d0f565b610a82611052565b610a8a611052565b610a9261107b565b8015610537576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b60007e0caaa0e08f624de190c2474175cd13784c8c75bbdd1b63ae5fab5540967b3c610b0681610d05565b610b0e610fa5565b6001600160a01b03831660009081526101316020526040902054610100900460ff1615610b3e5760019150610ccf565b6001600160a01b0383166000908152610131602052604090205460ff1615610b695760009150610ccf565b61012d546040516333e7eceb60e11b81526001600160a01b03909116906367cfd9d690610b9c90879087906004016119e7565b602060405180830381865afa158015610bb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bdd9190611a11565b610bea5760009150610ccf565b61012d54604051630b63ae7d60e11b81526001600160a01b03909116906316c75cfa90610c1d90879087906004016119e7565b602060405180830381865afa158015610c3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5e9190611a11565b610c6b5760009150610ccf565b6040805180820182526000808252600160208084019182526001600160a01b0388168352610131905292902090518154925161ffff1990931690151561ff0019161761010092151592909202919091179055610cc961012f8461103d565b50600191505b610cd9600160fb55565b5092915050565b600082815260c96020526040902060010154610cfb81610d05565b6104b38383610d95565b61061881336110aa565b610d19828261087a565b61053757600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610d513390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610d9f828261087a565b1561053757600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f88aa719609f728b0c5e7fb8dd3608d5c25d497efbb3b9dd64e9251ebba10150861053781610d05565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615610e59576104b383611103565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610eb3575060408051601f3d908101601f19168201909252610eb091810190611a33565b60015b610f165760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610524565b600080516020611c038339815191528114610f855760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610524565b506104b383838361119f565b60606000610f9e836111ca565b9392505050565b600260fb541415610ff85760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610524565b600260fb55565b6000610f9e836001600160a01b038416611226565b600160fb55565b6001600160a01b03811660009081526001830160205260408120541515610f9e565b6000610f9e836001600160a01b038416611319565b600054610100900460ff166110795760405162461bcd60e51b815260040161052490611a4c565b565b600054610100900460ff166110a25760405162461bcd60e51b815260040161052490611a4c565b611079611368565b6110b4828261087a565b610537576110c18161138f565b6110cc8360206113a1565b6040516020016110dd929190611a97565b60408051601f198184030181529082905262461bcd60e51b825261052491600401611b0c565b6001600160a01b0381163b6111705760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610524565b600080516020611c0383398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6111a88361153d565b6000825111806111b55750805b156104b3576111c4838361157d565b50505050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561121a57602002820191906000526020600020905b815481526020019060010190808311611206575b50505050509050919050565b6000818152600183016020526040812054801561130f57600061124a600183611b35565b855490915060009061125e90600190611b35565b90508181146112c357600086600001828154811061127e5761127e611b4c565b90600052602060002001549050808760000184815481106112a1576112a1611b4c565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806112d4576112d4611b62565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610488565b6000915050610488565b600081815260018301602052604081205461136057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610488565b506000610488565b600054610100900460ff166110145760405162461bcd60e51b815260040161052490611a4c565b60606104886001600160a01b03831660145b606060006113b0836002611b78565b6113bb906002611b97565b67ffffffffffffffff8111156113d3576113d3611763565b6040519080825280601f01601f1916602001820160405280156113fd576020820181803683370190505b509050600360fc1b8160008151811061141857611418611b4c565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061144757611447611b4c565b60200101906001600160f81b031916908160001a905350600061146b846002611b78565b611476906001611b97565b90505b60018111156114ee576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106114aa576114aa611b4c565b1a60f81b8282815181106114c0576114c0611b4c565b60200101906001600160f81b031916908160001a90535060049490941c936114e781611baf565b9050611479565b508315610f9e5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610524565b61154681611103565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610f9e8383604051806060016040528060278152602001611c23602791396060600080856001600160a01b0316856040516115ba9190611bc6565b600060405180830381855af49150503d80600081146115f5576040519150601f19603f3d011682016040523d82523d6000602084013e6115fa565b606091505b509150915061160b86838387611615565b9695505050505050565b6060831561168157825161167a576001600160a01b0385163b61167a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610524565b508161168b565b61168b8383611693565b949350505050565b8151156116a35781518083602001fd5b8060405162461bcd60e51b81526004016105249190611b0c565b6000602082840312156116cf57600080fd5b81356001600160e01b031981168114610f9e57600080fd5b6000602082840312156116f957600080fd5b5035919050565b80356001600160a01b038116811461171757600080fd5b919050565b6000806040838503121561172f57600080fd5b8235915061173f60208401611700565b90509250929050565b60006020828403121561175a57600080fd5b610f9e82611700565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561179457611794611763565b604051601f8501601f19908116603f011681019082821181831017156117bc576117bc611763565b816040528093508581528686860111156117d557600080fd5b858560208301376000602087830101525050509392505050565b6000806040838503121561180257600080fd5b61180b83611700565b9150602083013567ffffffffffffffff81111561182757600080fd5b8301601f8101851361183857600080fd5b61184785823560208401611779565b9150509250929050565b6020808252825182820181905260009190848201906040850190845b818110156118925783516001600160a01b03168352928401929184019160010161186d565b50909695505050505050565b600080604083850312156118b157600080fd5b823567ffffffffffffffff8111156118c857600080fd5b8301601f810185136118d957600080fd5b6118e885823560208401611779565b92505061173f60208401611700565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b60005b838110156119aa578181015183820152602001611992565b838111156111c45750506000910152565b600081518084526119d381602086016020860161198f565b601f01601f19169290920160200192915050565b6040815260006119fa60408301856119bb565b905060018060a01b03831660208301529392505050565b600060208284031215611a2357600080fd5b81518015158114610f9e57600080fd5b600060208284031215611a4557600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611acf81601785016020880161198f565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611b0081602884016020880161198f565b01602801949350505050565b602081526000610f9e60208301846119bb565b634e487b7160e01b600052601160045260246000fd5b600082821015611b4757611b47611b1f565b500390565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b6000816000190483118215151615611b9257611b92611b1f565b500290565b60008219821115611baa57611baa611b1f565b500190565b600081611bbe57611bbe611b1f565b506000190190565b60008251611bd881846020870161198f565b919091019291505056feb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220ae8e57c4c6d7c195977c203a30f1be8e88223ce5ae767b698b15cfaf890080b464736f6c634300080a0033", + Bin: "0x60a06040523060805234801561001457600080fd5b50608051611c7f61004c6000396000818161054601528181610586015281816106260152818161066601526107070152611c7f6000f3fe60806040526004361061012a5760003560e01c806380dce169116100ab578063c4d66de81161006f578063c4d66de814610363578063d10c106114610383578063d547741f146103a3578063e58378bb146103c3578063e863f6a7146103e5578063ec331b2b1461043657600080fd5b806380dce169146102a157806391d14854146102da578063a217fddf146102fa578063b908afa81461030f578063c44014d21461034357600080fd5b80634f1ef286116100f25780634f1ef28614610204578063510c27ad1461021757806352d1902d146102395780635bca74db1461024e5780637c90c9a91461028157600080fd5b806301ffc9a71461012f578063248a9ca3146101645780632f2ff15d146101a257806336568abe146101c45780633659cfe6146101e4575b600080fd5b34801561013b57600080fd5b5061014f61014a3660046116bd565b610457565b60405190151581526020015b60405180910390f35b34801561017057600080fd5b5061019461017f3660046116e7565b600090815260c9602052604090206001015490565b60405190815260200161015b565b3480156101ae57600080fd5b506101c26101bd36600461171c565b61048e565b005b3480156101d057600080fd5b506101c26101df36600461171c565b6104b8565b3480156101f057600080fd5b506101c26101ff366004611748565b61053b565b6101c26102123660046117ef565b61061b565b34801561022357600080fd5b5061022c6106e8565b60405161015b9190611851565b34801561024557600080fd5b506101946106fa565b34801561025a57600080fd5b506101947e0caaa0e08f624de190c2474175cd13784c8c75bbdd1b63ae5fab5540967b3c81565b34801561028d57600080fd5b506101c261029c366004611748565b6107ad565b3480156102ad57600080fd5b5061012e546102c2906001600160a01b031681565b6040516001600160a01b03909116815260200161015b565b3480156102e657600080fd5b5061014f6102f536600461171c565b61087a565b34801561030657600080fd5b50610194600081565b34801561031b57600080fd5b506101947f88aa719609f728b0c5e7fb8dd3608d5c25d497efbb3b9dd64e9251ebba10150881565b34801561034f57600080fd5b506101c261035e366004611748565b6108a5565b34801561036f57600080fd5b506101c261037e366004611748565b610951565b34801561038f57600080fd5b5061014f61039e36600461189e565b610adb565b3480156103af57600080fd5b506101c26103be36600461171c565b610ce0565b3480156103cf57600080fd5b50610194600080516020611be383398151915281565b3480156103f157600080fd5b5061041f610400366004611748565b6101316020526000908152604090205460ff8082169161010090041682565b60408051921515835290151560208301520161015b565b34801561044257600080fd5b5061012d546102c2906001600160a01b031681565b60006001600160e01b03198216637965db0b60e01b148061048857506301ffc9a760e01b6001600160e01b03198316145b92915050565b600082815260c960205260409020600101546104a981610d05565b6104b38383610d0f565b505050565b6001600160a01b038116331461052d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105378282610d95565b5050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156105845760405162461bcd60e51b8152600401610524906118f7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166105cd600080516020611c03833981519152546001600160a01b031690565b6001600160a01b0316146105f35760405162461bcd60e51b815260040161052490611943565b6105fc81610dfc565b6040805160008082526020820190925261061891839190610e26565b50565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156106645760405162461bcd60e51b8152600401610524906118f7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166106ad600080516020611c03833981519152546001600160a01b031690565b6001600160a01b0316146106d35760405162461bcd60e51b815260040161052490611943565b6106dc82610dfc565b61053782826001610e26565b60606106f561012f610f91565b905090565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461079a5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610524565b50600080516020611c0383398151915290565b600080516020611be38339815191526107c581610d05565b6107cd610fa5565b6001600160a01b0382166000908152610131602052604090205460ff16156107f457610870565b6001600160a01b03821660009081526101316020526040902054610100900460ff161561084b576001600160a01b038216600090815261013160205260409020805461ff001916905561084961012f83610fff565b505b6001600160a01b038216600090815261013160205260409020805460ff191660011790555b610537600160fb55565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600080516020611be38339815191526108bd81610d05565b6108c961012f8361101b565b61092d576040805180820182526000808252600160208084019182526001600160a01b0387168352610131905292902090518154925161ffff1990931690151561ff001916176101009215159290920291909117905561092b61012f8361103d565b505b5061012e80546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff16158080156109715750600054600160ff909116105b8061098b5750303b15801561098b575060005460ff166001145b6109ee5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610524565b6000805460ff191660011790558015610a11576000805461ff0019166101001790555b61012d80546001600160a01b0319166001600160a01b038416179055610a35611052565b610a3d611052565b610a4561107b565b610a50600033610d0f565b610a7a7f88aa719609f728b0c5e7fb8dd3608d5c25d497efbb3b9dd64e9251ebba10150833610d0f565b610a92600080516020611be383398151915233610d0f565b8015610537576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b60007e0caaa0e08f624de190c2474175cd13784c8c75bbdd1b63ae5fab5540967b3c610b0681610d05565b610b0e610fa5565b6001600160a01b03831660009081526101316020526040902054610100900460ff1615610b3e5760019150610ccf565b6001600160a01b0383166000908152610131602052604090205460ff1615610b695760009150610ccf565b61012d546040516333e7eceb60e11b81526001600160a01b03909116906367cfd9d690610b9c90879087906004016119e7565b602060405180830381865afa158015610bb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bdd9190611a11565b610bea5760009150610ccf565b61012d54604051630b63ae7d60e11b81526001600160a01b03909116906316c75cfa90610c1d90879087906004016119e7565b602060405180830381865afa158015610c3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5e9190611a11565b610c6b5760009150610ccf565b6040805180820182526000808252600160208084019182526001600160a01b0388168352610131905292902090518154925161ffff1990931690151561ff0019161761010092151592909202919091179055610cc961012f8461103d565b50600191505b610cd9600160fb55565b5092915050565b600082815260c96020526040902060010154610cfb81610d05565b6104b38383610d95565b61061881336110aa565b610d19828261087a565b61053757600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610d513390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610d9f828261087a565b1561053757600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f88aa719609f728b0c5e7fb8dd3608d5c25d497efbb3b9dd64e9251ebba10150861053781610d05565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615610e59576104b383611103565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610eb3575060408051601f3d908101601f19168201909252610eb091810190611a33565b60015b610f165760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610524565b600080516020611c038339815191528114610f855760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610524565b506104b383838361119f565b60606000610f9e836111ca565b9392505050565b600260fb541415610ff85760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610524565b600260fb55565b6000610f9e836001600160a01b038416611226565b600160fb55565b6001600160a01b03811660009081526001830160205260408120541515610f9e565b6000610f9e836001600160a01b038416611319565b600054610100900460ff166110795760405162461bcd60e51b815260040161052490611a4c565b565b600054610100900460ff166110a25760405162461bcd60e51b815260040161052490611a4c565b611079611368565b6110b4828261087a565b610537576110c18161138f565b6110cc8360206113a1565b6040516020016110dd929190611a97565b60408051601f198184030181529082905262461bcd60e51b825261052491600401611b0c565b6001600160a01b0381163b6111705760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610524565b600080516020611c0383398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6111a88361153d565b6000825111806111b55750805b156104b3576111c4838361157d565b50505050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561121a57602002820191906000526020600020905b815481526020019060010190808311611206575b50505050509050919050565b6000818152600183016020526040812054801561130f57600061124a600183611b35565b855490915060009061125e90600190611b35565b90508181146112c357600086600001828154811061127e5761127e611b4c565b90600052602060002001549050808760000184815481106112a1576112a1611b4c565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806112d4576112d4611b62565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610488565b6000915050610488565b600081815260018301602052604081205461136057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610488565b506000610488565b600054610100900460ff166110145760405162461bcd60e51b815260040161052490611a4c565b60606104886001600160a01b03831660145b606060006113b0836002611b78565b6113bb906002611b97565b67ffffffffffffffff8111156113d3576113d3611763565b6040519080825280601f01601f1916602001820160405280156113fd576020820181803683370190505b509050600360fc1b8160008151811061141857611418611b4c565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061144757611447611b4c565b60200101906001600160f81b031916908160001a905350600061146b846002611b78565b611476906001611b97565b90505b60018111156114ee576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106114aa576114aa611b4c565b1a60f81b8282815181106114c0576114c0611b4c565b60200101906001600160f81b031916908160001a90535060049490941c936114e781611baf565b9050611479565b508315610f9e5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610524565b61154681611103565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610f9e8383604051806060016040528060278152602001611c23602791396060600080856001600160a01b0316856040516115ba9190611bc6565b600060405180830381855af49150503d80600081146115f5576040519150601f19603f3d011682016040523d82523d6000602084013e6115fa565b606091505b509150915061160b86838387611615565b9695505050505050565b6060831561168157825161167a576001600160a01b0385163b61167a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610524565b508161168b565b61168b8383611693565b949350505050565b8151156116a35781518083602001fd5b8060405162461bcd60e51b81526004016105249190611b0c565b6000602082840312156116cf57600080fd5b81356001600160e01b031981168114610f9e57600080fd5b6000602082840312156116f957600080fd5b5035919050565b80356001600160a01b038116811461171757600080fd5b919050565b6000806040838503121561172f57600080fd5b8235915061173f60208401611700565b90509250929050565b60006020828403121561175a57600080fd5b610f9e82611700565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561179457611794611763565b604051601f8501601f19908116603f011681019082821181831017156117bc576117bc611763565b816040528093508581528686860111156117d557600080fd5b858560208301376000602087830101525050509392505050565b6000806040838503121561180257600080fd5b61180b83611700565b9150602083013567ffffffffffffffff81111561182757600080fd5b8301601f8101851361183857600080fd5b61184785823560208401611779565b9150509250929050565b6020808252825182820181905260009190848201906040850190845b818110156118925783516001600160a01b03168352928401929184019160010161186d565b50909695505050505050565b600080604083850312156118b157600080fd5b823567ffffffffffffffff8111156118c857600080fd5b8301601f810185136118d957600080fd5b6118e885823560208401611779565b92505061173f60208401611700565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b60005b838110156119aa578181015183820152602001611992565b838111156111c45750506000910152565b600081518084526119d381602086016020860161198f565b601f01601f19169290920160200192915050565b6040815260006119fa60408301856119bb565b905060018060a01b03831660208301529392505050565b600060208284031215611a2357600080fd5b81518015158114610f9e57600080fd5b600060208284031215611a4557600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611acf81601785016020880161198f565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611b0081602884016020880161198f565b01602801949350505050565b602081526000610f9e60208301846119bb565b634e487b7160e01b600052601160045260246000fd5b600082821015611b4757611b47611b1f565b500390565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b6000816000190483118215151615611b9257611b92611b1f565b500290565b60008219821115611baa57611baa611b1f565b500190565b600081611bbe57611bbe611b1f565b506000190190565b60008251611bd881846020870161198f565b919091019291505056feb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122018c0d1d90402a72b5b7878acf38fd5b80864638916316e4caf30dc368a20fb4864736f6c634300080a0033", } // BridgeFeeOracleABI is the input ABI used to generate the binding from. diff --git a/contract/bridge_fee_quote.sol.go b/contract/bridge_fee_quote.sol.go index 624e35b7..4fb5f2d1 100644 --- a/contract/bridge_fee_quote.sol.go +++ b/contract/bridge_fee_quote.sol.go @@ -61,7 +61,7 @@ type IBridgeFeeQuoteQuoteInput struct { // BridgeFeeQuoteMetaData contains all meta data concerning the BridgeFeeQuote contract. var BridgeFeeQuoteMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[],\"name\":\"ChainNameAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ChainNameInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OracleInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"QuoteExpired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"QuoteIndexInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"QuoteNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenNameAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenNameInvalid\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"VerifySignatureFailed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"chainName\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"tokenName\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"name\":\"NewQuote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OWNER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chainName\",\"type\":\"string\"}],\"name\":\"activeTokenNames\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"assets\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isActive\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"chainNames\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_tokenName\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_oracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getQuote\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenName\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"internalType\":\"structIBridgeFeeQuote.QuoteInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_id\",\"type\":\"uint256\"}],\"name\":\"getQuoteById\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenName\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"internalType\":\"structIBridgeFeeQuote.QuoteInfo\",\"name\":\"q\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chainName\",\"type\":\"string\"}],\"name\":\"getQuoteList\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenName\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"internalType\":\"structIBridgeFeeQuote.QuoteInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_tokenName\",\"type\":\"string\"}],\"name\":\"getQuotesByToken\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenName\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"}],\"internalType\":\"structIBridgeFeeQuote.QuoteInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_oracleContract\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxQuoteIndex\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_tokenName\",\"type\":\"string\"}],\"name\":\"isActiveTokenName\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_tokenName\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_expiry\",\"type\":\"uint256\"}],\"name\":\"makeMessageHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxQuoteIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracleContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"chainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenName\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"quoteIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"structIBridgeFeeQuote.QuoteInput[]\",\"name\":\"_inputs\",\"type\":\"tuple[]\"}],\"name\":\"quote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"quoteNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chainName\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"_tokenNames\",\"type\":\"string[]\"}],\"name\":\"registerChain\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chainName\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"_tokenNames\",\"type\":\"string[]\"}],\"name\":\"registerTokenName\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_chainName\",\"type\":\"string\"}],\"name\":\"supportAssets\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isActive\",\"type\":\"bool\"},{\"internalType\":\"string[]\",\"name\":\"tokenNames\",\"type\":\"string[]\"}],\"internalType\":\"structIBridgeFeeQuote.Asset\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"supportChainNames\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxQuoteIndex\",\"type\":\"uint256\"}],\"name\":\"updateMaxQuoteIndex\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_oracleContract\",\"type\":\"address\"}],\"name\":\"updateOracleContract\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x60a06040523060805234801561001457600080fd5b50608051613d8761004c60003960008181610961015281816109a1015281816111350152818161117501526112040152613d876000f3fe6080604052600436106101e75760003560e01c806391d1485411610102578063cd6dc68711610095578063d547741f11610064578063d547741f146105fb578063db2231941461061b578063e58378bb1461063b578063ec5af5861461065d57600080fd5b8063cd6dc6871461057b578063d3bab58f1461059b578063d43e62c0146105bb578063d4b8c24f146105db57600080fd5b8063a8541c17116100d1578063a8541c17146104c1578063b908afa8146104ee578063bece753214610522578063c994e71a1461055b57600080fd5b806391d148541461044c578063976646b91461046c578063a217fddf1461048c578063a59f39c7146104a157600080fd5b8063398a0e6b1161017a57806352d1902d1161014957806352d1902d146103ae5780637223c6ba146103c357806385936228146103f05780638b2b25e01461042c57600080fd5b8063398a0e6b1461032e5780633dd7c98c1461035b5780633fc57c3d1461037b5780634f1ef2861461039b57600080fd5b80632c189169116101b65780632c189169146102b55780632f2ff15d146102cc57806336568abe146102ee5780633659cfe61461030e57600080fd5b806301ffc9a7146101f35780630a1d133c146102285780631b826a1b1461024a578063248a9ca31461027757600080fd5b366101ee57005b600080fd5b3480156101ff57600080fd5b5061021361020e366004613012565b610674565b60405190151581526020015b60405180910390f35b34801561023457600080fd5b5061023d6106ab565b60405161021f91906130ec565b34801561025657600080fd5b5061026a6102653660046131eb565b610785565b60405161021f919061321f565b34801561028357600080fd5b506102a7610292366004613246565b600090815260c9602052604090206001015490565b60405190815260200161021f565b3480156102c157600080fd5b506102a761012f5481565b3480156102d857600080fd5b506102ec6102e736600461327f565b6108a9565b005b3480156102fa57600080fd5b506102ec61030936600461327f565b6108d3565b34801561031a57600080fd5b506102ec6103293660046132af565b610956565b34801561033a57600080fd5b5061034e6103493660046131eb565b610a36565b60405161021f9190613341565b34801561036757600080fd5b5061034e6103763660046133a3565b610ec6565b34801561038757600080fd5b506102a7610396366004613406565b6110ee565b6102ec6103a9366004613484565b61112a565b3480156103ba57600080fd5b506102a76111f7565b3480156103cf57600080fd5b506103e36103de366004613246565b6112aa565b60405161021f91906134c9565b3480156103fc57600080fd5b5061021361040b3660046131eb565b80516020818301810180516101318252928201919093012091525460ff1681565b34801561043857600080fd5b5061023d6104473660046131eb565b611357565b34801561045857600080fd5b5061021361046736600461327f565b611452565b34801561047857600080fd5b50610213610487366004613246565b61147d565b34801561049857600080fd5b506102a7600081565b3480156104ad57600080fd5b506102136104bc3660046134ff565b6114a8565b3480156104cd57600080fd5b506104e16104dc366004613246565b6115b5565b60405161021f91906135d3565b3480156104fa57600080fd5b506102a77f88aa719609f728b0c5e7fb8dd3608d5c25d497efbb3b9dd64e9251ebba10150881565b34801561052e57600080fd5b5061012d54610543906001600160a01b031681565b6040516001600160a01b03909116815260200161021f565b34801561056757600080fd5b506102136105763660046135e6565b61173b565b34801561058757600080fd5b506102ec61059636600461375c565b611ab0565b3480156105a757600080fd5b506102136105b63660046132af565b611c41565b3480156105c757600080fd5b506102136105d63660046134ff565b611c83565b3480156105e757600080fd5b506102136105f63660046133a3565b611dfc565b34801561060757600080fd5b506102ec61061636600461327f565b611f5f565b34801561062757600080fd5b506104e1610636366004613788565b611f84565b34801561064757600080fd5b506102a7600080516020613ceb83398151915281565b34801561066957600080fd5b506102a761012e5481565b60006001600160e01b03198216637965db0b60e01b14806106a557506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060610130805480602002602001604051908101604052809291908181526020016000905b8282101561077c5783829060005260206000200180546106ef90613805565b80601f016020809104026020016040519081016040528092919081815260200182805461071b90613805565b80156107685780601f1061073d57610100808354040283529160200191610768565b820191906000526020600020905b81548152906001019060200180831161074b57829003601f168201915b5050505050815260200190600101906106d0565b50505050905090565b604080518082019091526000815260606020820152610131826040516107ab919061383a565b9081526040805191829003602090810183208383018352805460ff161515845260018101805484518185028101850190955280855291938584019390929060009084015b8282101561089b57838290600052602060002001805461080e90613805565b80601f016020809104026020016040519081016040528092919081815260200182805461083a90613805565b80156108875780601f1061085c57610100808354040283529160200191610887565b820191906000526020600020905b81548152906001019060200180831161086a57829003601f168201915b5050505050815260200190600101906107ef565b505050915250909392505050565b600082815260c960205260409020600101546108c48161206c565b6108ce8383612076565b505050565b6001600160a01b03811633146109485760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61095282826120fc565b5050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016141561099f5760405162461bcd60e51b815260040161093f90613856565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166109e8600080516020613d0b833981519152546001600160a01b031690565b6001600160a01b031614610a0e5760405162461bcd60e51b815260040161093f906138a2565b610a1781612163565b60408051600080825260208201909252610a339183919061218d565b50565b606061013182604051610a49919061383a565b9081526040519081900360200190205460ff16610a785760405162b9a46560e61b815260040160405180910390fd5b6000610a83836122f8565b6001600160401b03811115610a9a57610a9a6130ff565b604051908082528060200260200182016040528015610ad357816020015b610ac0612e83565b815260200190600190039081610ab85790505b50905060008061012d60009054906101000a90046001600160a01b03166001600160a01b031663510c27ad6040518163ffffffff1660e01b8152600401600060405180830381865afa158015610b2d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b5591908101906138ee565b905060005b8151811015610ebc5760005b61013187604051610b77919061383a565b90815260405190819003602001902060010154811015610ea95760005b61012e54811015610e96576000610c8b896101318b604051610bb6919061383a565b90815260200160405180910390206001018581548110610bd857610bd8613987565b906000526020600020018054610bed90613805565b80601f0160208091040260200160405190810160405280929190818152602001828054610c1990613805565b8015610c665780601f10610c3b57610100808354040283529160200191610c66565b820191906000526020600020905b815481529060010190602001808311610c4957829003601f168201915b5050505050878781518110610c7d57610c7d613987565b602002602001015185612459565b90504261013282604051610c9f919061383a565b90815260200160405180910390206003015410610e83576040518060e0016040528061013283604051610cd2919061383a565b90815260200160405180910390206000015481526020018a81526020016101318b604051610d00919061383a565b90815260200160405180910390206001018581548110610d2257610d22613987565b906000526020600020018054610d3790613805565b80601f0160208091040260200160405190810160405280929190818152602001828054610d6390613805565b8015610db05780601f10610d8557610100808354040283529160200191610db0565b820191906000526020600020905b815481529060010190602001808311610d9357829003601f168201915b50505050508152602001868681518110610dcc57610dcc613987565b60200260200101516001600160a01b0316815260200161013283604051610df3919061383a565b908152602001604051809103902060010154815260200161013283604051610e1b919061383a565b908152602001604051809103902060020154815260200161013283604051610e43919061383a565b908152602001604051809103902060030154815250878781518110610e6a57610e6a613987565b6020908102919091010152610e806001876139b3565b95505b5080610e8e816139cb565b915050610b94565b5080610ea1816139cb565b915050610b66565b5080610eb4816139cb565b915050610b5a565b5091949350505050565b606061013183604051610ed9919061383a565b9081526040519081900360200190205460ff16610f085760405162b9a46560e61b815260040160405180910390fd5b61012d54604080516380dce16960e01b815290516000926001600160a01b0316916380dce1699160048083019260209291908290030181865afa158015610f53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7791906139e6565b9050600061012e546001600160401b03811115610f9657610f966130ff565b604051908082528060200260200182016040528015610fcf57816020015b610fbc612e83565b815260200190600190039081610fb45790505b50905060005b61012e548110156110e5576000610fee87878685612459565b90506040518060e001604052806101328360405161100c919061383a565b9081526020016040518091039020600001548152602001888152602001878152602001856001600160a01b031681526020016101328360405161104f919061383a565b908152602001604051809103902060010154815260200161013283604051611077919061383a565b90815260200160405180910390206002015481526020016101328360405161109f919061383a565b9081526020016040518091039020600301548152508383815181106110c6576110c6613987565b60200260200101819052505080806110dd906139cb565b915050610fd5565b50949350505050565b60008585858585604051602001611109959493929190613a03565b60405160208183030381529060405280519060200120905095945050505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156111735760405162461bcd60e51b815260040161093f90613856565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166111bc600080516020613d0b833981519152546001600160a01b031690565b6001600160a01b0316146111e25760405162461bcd60e51b815260040161093f906138a2565b6111eb82612163565b6109528282600161218d565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146112975760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000606482015260840161093f565b50600080516020613d0b83398151915290565b61013081815481106112bb57600080fd5b9060005260206000200160009150905080546112d690613805565b80601f016020809104026020016040519081016040528092919081815260200182805461130290613805565b801561134f5780601f106113245761010080835404028352916020019161134f565b820191906000526020600020905b81548152906001019060200180831161133257829003601f168201915b505050505081565b60606101318260405161136a919061383a565b9081526020016040518091039020600101805480602002602001604051908101604052809291908181526020016000905b828210156114475783829060005260206000200180546113ba90613805565b80601f01602080910402602001604051908101604052809291908181526020018280546113e690613805565b80156114335780601f1061140857610100808354040283529160200191611433565b820191906000526020600020905b81548152906001019060200180831161141657829003601f168201915b50505050508152602001906001019061139b565b505050509050919050565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000600080516020613ceb8339815191526114978161206c565b61012e839055600191505b50919050565b6000600080516020613ceb8339815191526114c28161206c565b610131846040516114d3919061383a565b9081526040519081900360200190205460ff161561150457604051630bb9107160e11b815260040160405180910390fd5b604080518082018252600181526020810185905290516101319061152990879061383a565b908152604051602091819003820190208251815460ff1916901515178155828201518051919261156192600185019290910190612ec9565b5050610130805460018101825560009190915285516115aa92507f2f605e086faac1d93117bbfbc18835d434e9405fadc1ca66faf4b864746daf34909101906020870190612f26565b506001949350505050565b6115bd612e83565b60008281526101336020526040812080546115d790613805565b80601f016020809104026020016040519081016040528092919081815260200182805461160390613805565b80156116505780601f1061162557610100808354040283529160200191611650565b820191906000526020600020905b81548152906001019060200180831161163357829003601f168201915b5050505050905080516000141561167a5760405163cf533f4960e01b815260040160405180910390fd5b60008060006116888461248b565b509250925092506040518060e00160405280878152602001848152602001838152602001826001600160a01b03168152602001610132866040516116cc919061383a565b9081526020016040518091039020600101548152602001610132866040516116f4919061383a565b90815260200160405180910390206002015481526020016101328660405161171c919061383a565b9081526040519081900360200190206003015490529695505050505050565b60006117456124b4565b60005b8251811015611a9c5761177383828151811061176657611766613987565b602002602001015161250e565b61179583828151811061178857611788613987565b6020026020010151612662565b60006118178483815181106117ac576117ac613987565b6020026020010151600001518584815181106117ca576117ca613987565b6020026020010151602001518685815181106117e8576117e8613987565b60200260200101516040015187868151811061180657611806613987565b602002602001015160600151612459565b905060006101328260405161182c919061383a565b90815260405190819003602001902054111561188457610133600061013283604051611858919061383a565b908152602001604051809103902060000154815260200190815260200160002060006118849190612fa6565b604051806080016040528061012f5481526020018584815181106118aa576118aa613987565b60200260200101516080015181526020018584815181106118cd576118cd613987565b602002602001015160a0015181526020018584815181106118f0576118f0613987565b602002602001015160c0015181525061013282604051611910919061383a565b90815260408051602092819003830190208351815583830151600182015583820151600282015560609093015160039093019290925561012f546000908152610133825291909120825161196692840190612f26565b5083828151811061197957611979613987565b602002602001015160000151604051611992919061383a565b60405180910390208483815181106119ac576119ac613987565b6020026020010151604001516001600160a01b031661012f547f0b48a34dfbe17b8e2330b80c7d240dd45b1cdb6aee27ebaaee4edb666318e4d68786815181106119f8576119f8613987565b602002602001015160200151888781518110611a1657611a16613987565b602002602001015160800151898881518110611a3457611a34613987565b602002602001015160a001518a8981518110611a5257611a52613987565b602002602001015160c00151604051611a6e9493929190613a46565b60405180910390a461012f54611a859060016139b3565b61012f555080611a94816139cb565b915050611748565b5060019050611aab600160fb55565b919050565b600054610100900460ff1615808015611ad05750600054600160ff909116105b80611aea5750303b158015611aea575060005460ff166001145b611b4d5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161093f565b6000805460ff191660011790558015611b70576000805461ff0019166101001790555b61012d80546001600160a01b0319166001600160a01b03851617905561012e829055611b9d600033612076565b611bc77f88aa719609f728b0c5e7fb8dd3608d5c25d497efbb3b9dd64e9251ebba10150833612076565b611bdf600080516020613ceb83398151915233612076565b611be7612726565b611bef612726565b611bf761274f565b80156108ce576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b6000600080516020613ceb833981519152611c5b8161206c565b61012d80546001600160a01b0385166001600160a01b03199091161790556001915050919050565b6000600080516020613ceb833981519152611c9d8161206c565b61013184604051611cae919061383a565b9081526040519081900360200190205460ff16611cdd5760405162b9a46560e61b815260040160405180910390fd5b60005b83518110156115aa57611d2460405180602001604052806000815250858381518110611d0e57611d0e613987565b602002602001015161277e90919063ffffffff16565b15611d4257604051637557bb2f60e11b815260040160405180910390fd5b611d6585858381518110611d5857611d58613987565b6020026020010151611dfc565b15611d8357604051634234cba560e01b815260040160405180910390fd5b61013185604051611d94919061383a565b9081526020016040518091039020600101848281518110611db757611db7613987565b60209081029190910181015182546001810184556000938452928290208151611de99491909101929190910190612f26565b5080611df4816139cb565b915050611ce0565b60008061013184604051611e10919061383a565b9081526040805191829003602090810183208383018352805460ff161515845260018101805484518185028101850190955280855291938584019390929060009084015b82821015611f00578382906000526020600020018054611e7390613805565b80601f0160208091040260200160405190810160405280929190818152602001828054611e9f90613805565b8015611eec5780601f10611ec157610100808354040283529160200191611eec565b820191906000526020600020905b815481529060010190602001808311611ecf57829003601f168201915b505050505081526020019060010190611e54565b5050505081525050905060005b816020015151811015611f5457611f348483602001518381518110611d0e57611d0e613987565b15611f4257505190506106a5565b80611f4c816139cb565b915050611f0d565b506000949350505050565b600082815260c96020526040902060010154611f7a8161206c565b6108ce83836120fc565b611f8c612e83565b6000611f9a86868686612459565b90506040518060e0016040528061013283604051611fb8919061383a565b9081526020016040518091039020600001548152602001878152602001868152602001856001600160a01b0316815260200161013283604051611ffb919061383a565b908152602001604051809103902060010154815260200161013283604051612023919061383a565b90815260200160405180910390206002015481526020016101328360405161204b919061383a565b9081526020016040518091039020600301548152509150505b949350505050565b610a338133612794565b6120808282611452565b61095257600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff191660011790556120b83390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6121068282611452565b1561095257600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f88aa719609f728b0c5e7fb8dd3608d5c25d497efbb3b9dd64e9251ebba1015086109528161206c565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156121c0576108ce836127ed565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561221a575060408051601f3d908101601f1916820190925261221791810190613a75565b60015b61227d5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b606482015260840161093f565b600080516020613d0b83398151915281146122ec5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b606482015260840161093f565b506108ce838383612889565b60008060009050600061012d60009054906101000a90046001600160a01b03166001600160a01b031663510c27ad6040518163ffffffff1660e01b8152600401600060405180830381865afa158015612355573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261237d91908101906138ee565b905060005b81518110156124505760005b6101318660405161239f919061383a565b9081526040519081900360200190206001015481101561243d5760005b61012e5481101561242a5760006123de886101318a604051610bb6919061383a565b905042610132826040516123f2919061383a565b90815260200160405180910390206003015410612417576124146001876139b3565b95505b5080612422816139cb565b9150506123bc565b5080612435816139cb565b91505061238e565b5080612448816139cb565b915050612382565b50909392505050565b6060848484846040516020016124729493929190613a8e565b6040516020818303038152906040529050949350505050565b606080600080848060200190518101906124a59190613b15565b92989197509550909350915050565b600260fb5414156125075760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161093f565b600260fb55565b8051604051610131916125209161383a565b9081526040519081900360200190205460ff1661254f5760405162b9a46560e61b815260040160405180910390fd5b61256181600001518260200151611dfc565b61257e57604051637557bb2f60e11b815260040160405180910390fd5b61012d548151604080840151905163d10c106160e01b81526001600160a01b039093169263d10c1061926125b6929091600401613b92565b6020604051808303816000875af11580156125d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125f99190613bbc565b61261657604051635a10f29160e11b815260040160405180910390fd5b61012e5481606001511061263d5760405163336662f360e21b815260040160405180910390fd5b428160c001511015610a3357604051638727a7f960e01b815260040160405180910390fd5b60006126858260000151836020015184608001518560a001518660c001516110ee565b905060006126ce8360e001516126c8847f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b906128b4565b9050806001600160a01b031683604001516001600160a01b0316146108ce57604080840151905163ea575af760e01b81526001600160a01b039182166004820152908216602482015260440161093f565b600160fb55565b600054610100900460ff1661274d5760405162461bcd60e51b815260040161093f90613bde565b565b600054610100900460ff166127765760405162461bcd60e51b815260040161093f90613bde565b61274d6128d8565b8051602091820120825192909101919091201490565b61279e8282611452565b610952576127ab816128ff565b6127b6836020612911565b6040516020016127c7929190613c29565b60408051601f198184030181529082905262461bcd60e51b825261093f916004016134c9565b6001600160a01b0381163b61285a5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161093f565b600080516020613d0b83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b61289283612ab3565b60008251118061289f5750805b156108ce576128ae8383612af3565b50505050565b60008060006128c38585612b18565b915091506128d081612b5e565b509392505050565b600054610100900460ff1661271f5760405162461bcd60e51b815260040161093f90613bde565b60606106a56001600160a01b03831660145b60606000612920836002613c9e565b61292b9060026139b3565b6001600160401b03811115612942576129426130ff565b6040519080825280601f01601f19166020018201604052801561296c576020820181803683370190505b509050600360fc1b8160008151811061298757612987613987565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106129b6576129b6613987565b60200101906001600160f81b031916908160001a90535060006129da846002613c9e565b6129e59060016139b3565b90505b6001811115612a5d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612a1957612a19613987565b1a60f81b828281518110612a2f57612a2f613987565b60200101906001600160f81b031916908160001a90535060049490941c93612a5681613cbd565b90506129e8565b508315612aac5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161093f565b9392505050565b612abc816127ed565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060612aac8383604051806060016040528060278152602001613d2b60279139612cac565b600080825160411415612b4f5760208301516040840151606085015160001a612b4387828585612d24565b94509450505050612b57565b506000905060025b9250929050565b6000816004811115612b7257612b72613cd4565b1415612b7b5750565b6001816004811115612b8f57612b8f613cd4565b1415612bdd5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161093f565b6002816004811115612bf157612bf1613cd4565b1415612c3f5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161093f565b6003816004811115612c5357612c53613cd4565b1415610a335760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161093f565b6060600080856001600160a01b031685604051612cc9919061383a565b600060405180830381855af49150503d8060008114612d04576040519150601f19603f3d011682016040523d82523d6000602084013e612d09565b606091505b5091509150612d1a86838387612de8565b9695505050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612d5b5750600090506003612ddf565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612daf573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612dd857600060019250925050612ddf565b9150600090505b94509492505050565b60608315612e54578251612e4d576001600160a01b0385163b612e4d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161093f565b5081612064565b6120648383815115612e695781518083602001fd5b8060405162461bcd60e51b815260040161093f91906134c9565b6040518060e0016040528060008152602001606081526020016060815260200160006001600160a01b031681526020016000815260200160008152602001600081525090565b828054828255906000526020600020908101928215612f16579160200282015b82811115612f165782518051612f06918491602090910190612f26565b5091602001919060010190612ee9565b50612f22929150612fe0565b5090565b828054612f3290613805565b90600052602060002090601f016020900481019282612f545760008555612f9a565b82601f10612f6d57805160ff1916838001178555612f9a565b82800160010185558215612f9a579182015b82811115612f9a578251825591602001919060010190612f7f565b50612f22929150612ffd565b508054612fb290613805565b6000825580601f10612fc2575050565b601f016020900490600052602060002090810190610a339190612ffd565b80821115612f22576000612ff48282612fa6565b50600101612fe0565b5b80821115612f225760008155600101612ffe565b60006020828403121561302457600080fd5b81356001600160e01b031981168114612aac57600080fd5b60005b8381101561305757818101518382015260200161303f565b838111156128ae5750506000910152565b6000815180845261308081602086016020860161303c565b601f01601f19169290920160200192915050565b600082825180855260208086019550808260051b84010181860160005b848110156130df57601f198684030189526130cd838351613068565b988401989250908301906001016130b1565b5090979650505050505050565b602081526000612aac6020830184613094565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b0381118282101715613138576131386130ff565b60405290565b604051601f8201601f191681016001600160401b0381118282101715613166576131666130ff565b604052919050565b60006001600160401b03821115613187576131876130ff565b50601f01601f191660200190565b600082601f8301126131a657600080fd5b81356131b96131b48261316e565b61313e565b8181528460208386010111156131ce57600080fd5b816020850160208301376000918101602001919091529392505050565b6000602082840312156131fd57600080fd5b81356001600160401b0381111561321357600080fd5b61206484828501613195565b60208152815115156020820152600060208301516040808401526120646060840182613094565b60006020828403121561325857600080fd5b5035919050565b6001600160a01b0381168114610a3357600080fd5b8035611aab8161325f565b6000806040838503121561329257600080fd5b8235915060208301356132a48161325f565b809150509250929050565b6000602082840312156132c157600080fd5b8135612aac8161325f565b805182526000602082015160e060208501526132eb60e0850182613068565b9050604083015184820360408601526133048282613068565b6060858101516001600160a01b0316908701526080808601519087015260a0858101519087015260c0948501519490950193909352509192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561339657603f198886030184526133848583516132cc565b94509285019290850190600101613368565b5092979650505050505050565b600080604083850312156133b657600080fd5b82356001600160401b03808211156133cd57600080fd5b6133d986838701613195565b935060208501359150808211156133ef57600080fd5b506133fc85828601613195565b9150509250929050565b600080600080600060a0868803121561341e57600080fd5b85356001600160401b038082111561343557600080fd5b61344189838a01613195565b9650602088013591508082111561345757600080fd5b5061346488828901613195565b959895975050505060408401359360608101359360809091013592509050565b6000806040838503121561349757600080fd5b82356134a28161325f565b915060208301356001600160401b038111156134bd57600080fd5b6133fc85828601613195565b602081526000612aac6020830184613068565b60006001600160401b038211156134f5576134f56130ff565b5060051b60200190565b6000806040838503121561351257600080fd5b82356001600160401b038082111561352957600080fd5b61353586838701613195565b935060209150818501358181111561354c57600080fd5b8501601f8101871361355d57600080fd5b803561356b6131b4826134dc565b81815260059190911b8201840190848101908983111561358a57600080fd5b8584015b838110156135c2578035868111156135a65760008081fd5b6135b48c8983890101613195565b84525091860191860161358e565b508096505050505050509250929050565b602081526000612aac60208301846132cc565b600060208083850312156135f957600080fd5b82356001600160401b038082111561361057600080fd5b818501915085601f83011261362457600080fd5b81356136326131b4826134dc565b81815260059190911b8301840190848101908883111561365157600080fd5b8585015b8381101561374f5780358581111561366d5760008081fd5b8601610100818c03601f19018113156136865760008081fd5b61368e613115565b89830135888111156136a05760008081fd5b6136ae8e8c83870101613195565b825250604080840135898111156136c55760008081fd5b6136d38f8d83880101613195565b8c8401525060606136e5818601613274565b828401526080915081850135818401525060a0808501358284015260c0915081850135818401525060e080850135828401528385013593508984111561372d57600091508182fd5b61373b8f8d86880101613195565b908301525085525050918601918601613655565b5098975050505050505050565b6000806040838503121561376f57600080fd5b823561377a8161325f565b946020939093013593505050565b6000806000806080858703121561379e57600080fd5b84356001600160401b03808211156137b557600080fd5b6137c188838901613195565b955060208701359150808211156137d757600080fd5b506137e487828801613195565b93505060408501356137f58161325f565b9396929550929360600135925050565b600181811c9082168061381957607f821691505b602082108114156114a257634e487b7160e01b600052602260045260246000fd5b6000825161384c81846020870161303c565b9190910192915050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6000602080838503121561390157600080fd5b82516001600160401b0381111561391757600080fd5b8301601f8101851361392857600080fd5b80516139366131b4826134dc565b81815260059190911b8201830190838101908783111561395557600080fd5b928401925b8284101561397c57835161396d8161325f565b8252928401929084019061395a565b979650505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156139c6576139c661399d565b500190565b60006000198214156139df576139df61399d565b5060010190565b6000602082840312156139f857600080fd5b8151612aac8161325f565b60a081526000613a1660a0830188613068565b8281036020840152613a288188613068565b60408401969096525050606081019290925260809091015292915050565b608081526000613a596080830187613068565b6020830195909552506040810192909252606090910152919050565b600060208284031215613a8757600080fd5b5051919050565b608081526000613aa16080830187613068565b8281036020840152613ab38187613068565b6001600160a01b0395909516604084015250506060015292915050565b600082601f830112613ae157600080fd5b8151613aef6131b48261316e565b818152846020838601011115613b0457600080fd5b61206482602083016020870161303c565b60008060008060808587031215613b2b57600080fd5b84516001600160401b0380821115613b4257600080fd5b613b4e88838901613ad0565b95506020870151915080821115613b6457600080fd5b50613b7187828801613ad0565b9350506040850151613b828161325f565b6060959095015193969295505050565b604081526000613ba56040830185613068565b905060018060a01b03831660208301529392505050565b600060208284031215613bce57600080fd5b81518015158114612aac57600080fd5b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613c6181601785016020880161303c565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613c9281602884016020880161303c565b01602801949350505050565b6000816000190483118215151615613cb857613cb861399d565b500290565b600081613ccc57613ccc61399d565b506000190190565b634e487b7160e01b600052602160045260246000fdfeb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122004ba99ac2716ec24f50b5799b00a76384937fdd53760506be55de69354ca326764736f6c634300080a0033", + Bin: "0x60a06040523060805234801561001457600080fd5b50608051613ddc61004c60003960008181610961015281816109a1015281816111350152818161117501526112040152613ddc6000f3fe6080604052600436106101e75760003560e01c806391d1485411610102578063cd6dc68711610095578063d547741f11610064578063d547741f146105fb578063db2231941461061b578063e58378bb1461063b578063ec5af5861461065d57600080fd5b8063cd6dc6871461057b578063d3bab58f1461059b578063d43e62c0146105bb578063d4b8c24f146105db57600080fd5b8063a8541c17116100d1578063a8541c17146104c1578063b908afa8146104ee578063bece753214610522578063c994e71a1461055b57600080fd5b806391d148541461044c578063976646b91461046c578063a217fddf1461048c578063a59f39c7146104a157600080fd5b8063398a0e6b1161017a57806352d1902d1161014957806352d1902d146103ae5780637223c6ba146103c357806385936228146103f05780638b2b25e01461042c57600080fd5b8063398a0e6b1461032e5780633dd7c98c1461035b5780633fc57c3d1461037b5780634f1ef2861461039b57600080fd5b80632c189169116101b65780632c189169146102b55780632f2ff15d146102cc57806336568abe146102ee5780633659cfe61461030e57600080fd5b806301ffc9a7146101f35780630a1d133c146102285780631b826a1b1461024a578063248a9ca31461027757600080fd5b366101ee57005b600080fd5b3480156101ff57600080fd5b5061021361020e366004613067565b610674565b60405190151581526020015b60405180910390f35b34801561023457600080fd5b5061023d6106ab565b60405161021f9190613141565b34801561025657600080fd5b5061026a610265366004613240565b610785565b60405161021f9190613274565b34801561028357600080fd5b506102a761029236600461329b565b600090815260c9602052604090206001015490565b60405190815260200161021f565b3480156102c157600080fd5b506102a761012f5481565b3480156102d857600080fd5b506102ec6102e73660046132d4565b6108a9565b005b3480156102fa57600080fd5b506102ec6103093660046132d4565b6108d3565b34801561031a57600080fd5b506102ec610329366004613304565b610956565b34801561033a57600080fd5b5061034e610349366004613240565b610a36565b60405161021f9190613396565b34801561036757600080fd5b5061034e6103763660046133f8565b610ec6565b34801561038757600080fd5b506102a761039636600461345b565b6110ee565b6102ec6103a93660046134d9565b61112a565b3480156103ba57600080fd5b506102a76111f7565b3480156103cf57600080fd5b506103e36103de36600461329b565b6112aa565b60405161021f919061351e565b3480156103fc57600080fd5b5061021361040b366004613240565b80516020818301810180516101318252928201919093012091525460ff1681565b34801561043857600080fd5b5061023d610447366004613240565b611357565b34801561045857600080fd5b506102136104673660046132d4565b611452565b34801561047857600080fd5b5061021361048736600461329b565b61147d565b34801561049857600080fd5b506102a7600081565b3480156104ad57600080fd5b506102136104bc366004613554565b6114a8565b3480156104cd57600080fd5b506104e16104dc36600461329b565b61160a565b60405161021f9190613628565b3480156104fa57600080fd5b506102a77f88aa719609f728b0c5e7fb8dd3608d5c25d497efbb3b9dd64e9251ebba10150881565b34801561052e57600080fd5b5061012d54610543906001600160a01b031681565b6040516001600160a01b03909116815260200161021f565b34801561056757600080fd5b5061021361057636600461363b565b611790565b34801561058757600080fd5b506102ec6105963660046137b1565b611b05565b3480156105a757600080fd5b506102136105b6366004613304565b611c96565b3480156105c757600080fd5b506102136105d6366004613554565b611cd8565b3480156105e757600080fd5b506102136105f63660046133f8565b611e51565b34801561060757600080fd5b506102ec6106163660046132d4565b611fb4565b34801561062757600080fd5b506104e16106363660046137dd565b611fd9565b34801561064757600080fd5b506102a7600080516020613d4083398151915281565b34801561066957600080fd5b506102a761012e5481565b60006001600160e01b03198216637965db0b60e01b14806106a557506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060610130805480602002602001604051908101604052809291908181526020016000905b8282101561077c5783829060005260206000200180546106ef9061385a565b80601f016020809104026020016040519081016040528092919081815260200182805461071b9061385a565b80156107685780601f1061073d57610100808354040283529160200191610768565b820191906000526020600020905b81548152906001019060200180831161074b57829003601f168201915b5050505050815260200190600101906106d0565b50505050905090565b604080518082019091526000815260606020820152610131826040516107ab919061388f565b9081526040805191829003602090810183208383018352805460ff161515845260018101805484518185028101850190955280855291938584019390929060009084015b8282101561089b57838290600052602060002001805461080e9061385a565b80601f016020809104026020016040519081016040528092919081815260200182805461083a9061385a565b80156108875780601f1061085c57610100808354040283529160200191610887565b820191906000526020600020905b81548152906001019060200180831161086a57829003601f168201915b5050505050815260200190600101906107ef565b505050915250909392505050565b600082815260c960205260409020600101546108c4816120c1565b6108ce83836120cb565b505050565b6001600160a01b03811633146109485760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6109528282612151565b5050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016141561099f5760405162461bcd60e51b815260040161093f906138ab565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166109e8600080516020613d60833981519152546001600160a01b031690565b6001600160a01b031614610a0e5760405162461bcd60e51b815260040161093f906138f7565b610a17816121b8565b60408051600080825260208201909252610a33918391906121e2565b50565b606061013182604051610a49919061388f565b9081526040519081900360200190205460ff16610a785760405162b9a46560e61b815260040160405180910390fd5b6000610a838361234d565b6001600160401b03811115610a9a57610a9a613154565b604051908082528060200260200182016040528015610ad357816020015b610ac0612ed8565b815260200190600190039081610ab85790505b50905060008061012d60009054906101000a90046001600160a01b03166001600160a01b031663510c27ad6040518163ffffffff1660e01b8152600401600060405180830381865afa158015610b2d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b559190810190613943565b905060005b8151811015610ebc5760005b61013187604051610b77919061388f565b90815260405190819003602001902060010154811015610ea95760005b61012e54811015610e96576000610c8b896101318b604051610bb6919061388f565b90815260200160405180910390206001018581548110610bd857610bd86139dc565b906000526020600020018054610bed9061385a565b80601f0160208091040260200160405190810160405280929190818152602001828054610c199061385a565b8015610c665780601f10610c3b57610100808354040283529160200191610c66565b820191906000526020600020905b815481529060010190602001808311610c4957829003601f168201915b5050505050878781518110610c7d57610c7d6139dc565b6020026020010151856124ae565b90504261013282604051610c9f919061388f565b90815260200160405180910390206003015410610e83576040518060e0016040528061013283604051610cd2919061388f565b90815260200160405180910390206000015481526020018a81526020016101318b604051610d00919061388f565b90815260200160405180910390206001018581548110610d2257610d226139dc565b906000526020600020018054610d379061385a565b80601f0160208091040260200160405190810160405280929190818152602001828054610d639061385a565b8015610db05780601f10610d8557610100808354040283529160200191610db0565b820191906000526020600020905b815481529060010190602001808311610d9357829003601f168201915b50505050508152602001868681518110610dcc57610dcc6139dc565b60200260200101516001600160a01b0316815260200161013283604051610df3919061388f565b908152602001604051809103902060010154815260200161013283604051610e1b919061388f565b908152602001604051809103902060020154815260200161013283604051610e43919061388f565b908152602001604051809103902060030154815250878781518110610e6a57610e6a6139dc565b6020908102919091010152610e80600187613a08565b95505b5080610e8e81613a20565b915050610b94565b5080610ea181613a20565b915050610b66565b5080610eb481613a20565b915050610b5a565b5091949350505050565b606061013183604051610ed9919061388f565b9081526040519081900360200190205460ff16610f085760405162b9a46560e61b815260040160405180910390fd5b61012d54604080516380dce16960e01b815290516000926001600160a01b0316916380dce1699160048083019260209291908290030181865afa158015610f53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f779190613a3b565b9050600061012e546001600160401b03811115610f9657610f96613154565b604051908082528060200260200182016040528015610fcf57816020015b610fbc612ed8565b815260200190600190039081610fb45790505b50905060005b61012e548110156110e5576000610fee878786856124ae565b90506040518060e001604052806101328360405161100c919061388f565b9081526020016040518091039020600001548152602001888152602001878152602001856001600160a01b031681526020016101328360405161104f919061388f565b908152602001604051809103902060010154815260200161013283604051611077919061388f565b90815260200160405180910390206002015481526020016101328360405161109f919061388f565b9081526020016040518091039020600301548152508383815181106110c6576110c66139dc565b60200260200101819052505080806110dd90613a20565b915050610fd5565b50949350505050565b60008585858585604051602001611109959493929190613a58565b60405160208183030381529060405280519060200120905095945050505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156111735760405162461bcd60e51b815260040161093f906138ab565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166111bc600080516020613d60833981519152546001600160a01b031690565b6001600160a01b0316146111e25760405162461bcd60e51b815260040161093f906138f7565b6111eb826121b8565b610952828260016121e2565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146112975760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000606482015260840161093f565b50600080516020613d6083398151915290565b61013081815481106112bb57600080fd5b9060005260206000200160009150905080546112d69061385a565b80601f01602080910402602001604051908101604052809291908181526020018280546113029061385a565b801561134f5780601f106113245761010080835404028352916020019161134f565b820191906000526020600020905b81548152906001019060200180831161133257829003601f168201915b505050505081565b60606101318260405161136a919061388f565b9081526020016040518091039020600101805480602002602001604051908101604052809291908181526020016000905b828210156114475783829060005260206000200180546113ba9061385a565b80601f01602080910402602001604051908101604052809291908181526020018280546113e69061385a565b80156114335780601f1061140857610100808354040283529160200191611433565b820191906000526020600020905b81548152906001019060200180831161141657829003601f168201915b50505050508152602001906001019061139b565b505050509050919050565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000600080516020613d40833981519152611497816120c1565b61012e839055600191505b50919050565b6000600080516020613d408339815191526114c2816120c1565b610131846040516114d3919061388f565b9081526040519081900360200190205460ff161561150457604051630bb9107160e11b815260040160405180910390fd5b604080516020808201909252600090528451908501207fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47014156115595760405162b9a46560e61b815260040160405180910390fd5b604080518082018252600181526020810185905290516101319061157e90879061388f565b908152604051602091819003820190208251815460ff191690151517815582820151805191926115b692600185019290910190612f1e565b5050610130805460018101825560009190915285516115ff92507f2f605e086faac1d93117bbfbc18835d434e9405fadc1ca66faf4b864746daf34909101906020870190612f7b565b506001949350505050565b611612612ed8565b600082815261013360205260408120805461162c9061385a565b80601f01602080910402602001604051908101604052809291908181526020018280546116589061385a565b80156116a55780601f1061167a576101008083540402835291602001916116a5565b820191906000526020600020905b81548152906001019060200180831161168857829003601f168201915b505050505090508051600014156116cf5760405163cf533f4960e01b815260040160405180910390fd5b60008060006116dd846124f6565b509250925092506040518060e00160405280878152602001848152602001838152602001826001600160a01b0316815260200161013286604051611721919061388f565b908152602001604051809103902060010154815260200161013286604051611749919061388f565b908152602001604051809103902060020154815260200161013286604051611771919061388f565b9081526040519081900360200190206003015490529695505050505050565b600061179a61251f565b60005b8251811015611af1576117c88382815181106117bb576117bb6139dc565b6020026020010151612579565b6117ea8382815181106117dd576117dd6139dc565b60200260200101516126cd565b600061186c848381518110611801576118016139dc565b60200260200101516000015185848151811061181f5761181f6139dc565b60200260200101516020015186858151811061183d5761183d6139dc565b60200260200101516040015187868151811061185b5761185b6139dc565b6020026020010151606001516124ae565b9050600061013282604051611881919061388f565b9081526040519081900360200190205411156118d9576101336000610132836040516118ad919061388f565b908152602001604051809103902060000154815260200190815260200160002060006118d99190612ffb565b604051806080016040528061012f5481526020018584815181106118ff576118ff6139dc565b6020026020010151608001518152602001858481518110611922576119226139dc565b602002602001015160a001518152602001858481518110611945576119456139dc565b602002602001015160c0015181525061013282604051611965919061388f565b90815260408051602092819003830190208351815583830151600182015583820151600282015560609093015160039093019290925561012f54600090815261013382529190912082516119bb92840190612f7b565b508382815181106119ce576119ce6139dc565b6020026020010151600001516040516119e7919061388f565b6040518091039020848381518110611a0157611a016139dc565b6020026020010151604001516001600160a01b031661012f547f0b48a34dfbe17b8e2330b80c7d240dd45b1cdb6aee27ebaaee4edb666318e4d6878681518110611a4d57611a4d6139dc565b602002602001015160200151888781518110611a6b57611a6b6139dc565b602002602001015160800151898881518110611a8957611a896139dc565b602002602001015160a001518a8981518110611aa757611aa76139dc565b602002602001015160c00151604051611ac39493929190613a9b565b60405180910390a461012f54611ada906001613a08565b61012f555080611ae981613a20565b91505061179d565b5060019050611b00600160fb55565b919050565b600054610100900460ff1615808015611b255750600054600160ff909116105b80611b3f5750303b158015611b3f575060005460ff166001145b611ba25760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161093f565b6000805460ff191660011790558015611bc5576000805461ff0019166101001790555b61012d80546001600160a01b0319166001600160a01b03851617905561012e829055611bef612791565b611bf7612791565b611bff6127ba565b611c0a6000336120cb565b611c347f88aa719609f728b0c5e7fb8dd3608d5c25d497efbb3b9dd64e9251ebba101508336120cb565b611c4c600080516020613d40833981519152336120cb565b80156108ce576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b6000600080516020613d40833981519152611cb0816120c1565b61012d80546001600160a01b0385166001600160a01b03199091161790556001915050919050565b6000600080516020613d40833981519152611cf2816120c1565b61013184604051611d03919061388f565b9081526040519081900360200190205460ff16611d325760405162b9a46560e61b815260040160405180910390fd5b60005b83518110156115ff57611d7960405180602001604052806000815250858381518110611d6357611d636139dc565b60200260200101516124e090919063ffffffff16565b15611d9757604051637557bb2f60e11b815260040160405180910390fd5b611dba85858381518110611dad57611dad6139dc565b6020026020010151611e51565b15611dd857604051634234cba560e01b815260040160405180910390fd5b61013185604051611de9919061388f565b9081526020016040518091039020600101848281518110611e0c57611e0c6139dc565b60209081029190910181015182546001810184556000938452928290208151611e3e9491909101929190910190612f7b565b5080611e4981613a20565b915050611d35565b60008061013184604051611e65919061388f565b9081526040805191829003602090810183208383018352805460ff161515845260018101805484518185028101850190955280855291938584019390929060009084015b82821015611f55578382906000526020600020018054611ec89061385a565b80601f0160208091040260200160405190810160405280929190818152602001828054611ef49061385a565b8015611f415780601f10611f1657610100808354040283529160200191611f41565b820191906000526020600020905b815481529060010190602001808311611f2457829003601f168201915b505050505081526020019060010190611ea9565b5050505081525050905060005b816020015151811015611fa957611f898483602001518381518110611d6357611d636139dc565b15611f9757505190506106a5565b80611fa181613a20565b915050611f62565b506000949350505050565b600082815260c96020526040902060010154611fcf816120c1565b6108ce8383612151565b611fe1612ed8565b6000611fef868686866124ae565b90506040518060e001604052806101328360405161200d919061388f565b9081526020016040518091039020600001548152602001878152602001868152602001856001600160a01b0316815260200161013283604051612050919061388f565b908152602001604051809103902060010154815260200161013283604051612078919061388f565b9081526020016040518091039020600201548152602001610132836040516120a0919061388f565b9081526020016040518091039020600301548152509150505b949350505050565b610a3381336127e9565b6120d58282611452565b61095257600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561210d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61215b8282611452565b1561095257600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f88aa719609f728b0c5e7fb8dd3608d5c25d497efbb3b9dd64e9251ebba101508610952816120c1565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615612215576108ce83612842565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561226f575060408051601f3d908101601f1916820190925261226c91810190613aca565b60015b6122d25760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b606482015260840161093f565b600080516020613d6083398151915281146123415760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b606482015260840161093f565b506108ce8383836128de565b60008060009050600061012d60009054906101000a90046001600160a01b03166001600160a01b031663510c27ad6040518163ffffffff1660e01b8152600401600060405180830381865afa1580156123aa573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526123d29190810190613943565b905060005b81518110156124a55760005b610131866040516123f4919061388f565b908152604051908190036020019020600101548110156124925760005b61012e5481101561247f576000612433886101318a604051610bb6919061388f565b90504261013282604051612447919061388f565b9081526020016040518091039020600301541061246c57612469600187613a08565b95505b508061247781613a20565b915050612411565b508061248a81613a20565b9150506123e3565b508061249d81613a20565b9150506123d7565b50909392505050565b6060848484846040516020016124c79493929190613ae3565b6040516020818303038152906040529050949350505050565b8051602091820120825192909101919091201490565b606080600080848060200190518101906125109190613b6a565b92989197509550909350915050565b600260fb5414156125725760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161093f565b600260fb55565b80516040516101319161258b9161388f565b9081526040519081900360200190205460ff166125ba5760405162b9a46560e61b815260040160405180910390fd5b6125cc81600001518260200151611e51565b6125e957604051637557bb2f60e11b815260040160405180910390fd5b61012d548151604080840151905163d10c106160e01b81526001600160a01b039093169263d10c106192612621929091600401613be7565b6020604051808303816000875af1158015612640573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126649190613c11565b61268157604051635a10f29160e11b815260040160405180910390fd5b61012e548160600151106126a85760405163336662f360e21b815260040160405180910390fd5b428160c001511015610a3357604051638727a7f960e01b815260040160405180910390fd5b60006126f08260000151836020015184608001518560a001518660c001516110ee565b905060006127398360e00151612733847f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b90612909565b9050806001600160a01b031683604001516001600160a01b0316146108ce57604080840151905163ea575af760e01b81526001600160a01b039182166004820152908216602482015260440161093f565b600160fb55565b600054610100900460ff166127b85760405162461bcd60e51b815260040161093f90613c33565b565b600054610100900460ff166127e15760405162461bcd60e51b815260040161093f90613c33565b6127b861292d565b6127f38282611452565b6109525761280081612954565b61280b836020612966565b60405160200161281c929190613c7e565b60408051601f198184030181529082905262461bcd60e51b825261093f9160040161351e565b6001600160a01b0381163b6128af5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161093f565b600080516020613d6083398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6128e783612b08565b6000825111806128f45750805b156108ce576129038383612b48565b50505050565b60008060006129188585612b6d565b9150915061292581612bb3565b509392505050565b600054610100900460ff1661278a5760405162461bcd60e51b815260040161093f90613c33565b60606106a56001600160a01b03831660145b60606000612975836002613cf3565b612980906002613a08565b6001600160401b0381111561299757612997613154565b6040519080825280601f01601f1916602001820160405280156129c1576020820181803683370190505b509050600360fc1b816000815181106129dc576129dc6139dc565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612a0b57612a0b6139dc565b60200101906001600160f81b031916908160001a9053506000612a2f846002613cf3565b612a3a906001613a08565b90505b6001811115612ab2576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612a6e57612a6e6139dc565b1a60f81b828281518110612a8457612a846139dc565b60200101906001600160f81b031916908160001a90535060049490941c93612aab81613d12565b9050612a3d565b508315612b015760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161093f565b9392505050565b612b1181612842565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060612b018383604051806060016040528060278152602001613d8060279139612d01565b600080825160411415612ba45760208301516040840151606085015160001a612b9887828585612d79565b94509450505050612bac565b506000905060025b9250929050565b6000816004811115612bc757612bc7613d29565b1415612bd05750565b6001816004811115612be457612be4613d29565b1415612c325760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161093f565b6002816004811115612c4657612c46613d29565b1415612c945760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161093f565b6003816004811115612ca857612ca8613d29565b1415610a335760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161093f565b6060600080856001600160a01b031685604051612d1e919061388f565b600060405180830381855af49150503d8060008114612d59576040519150601f19603f3d011682016040523d82523d6000602084013e612d5e565b606091505b5091509150612d6f86838387612e3d565b9695505050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612db05750600090506003612e34565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612e04573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612e2d57600060019250925050612e34565b9150600090505b94509492505050565b60608315612ea9578251612ea2576001600160a01b0385163b612ea25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161093f565b50816120b9565b6120b98383815115612ebe5781518083602001fd5b8060405162461bcd60e51b815260040161093f919061351e565b6040518060e0016040528060008152602001606081526020016060815260200160006001600160a01b031681526020016000815260200160008152602001600081525090565b828054828255906000526020600020908101928215612f6b579160200282015b82811115612f6b5782518051612f5b918491602090910190612f7b565b5091602001919060010190612f3e565b50612f77929150613035565b5090565b828054612f879061385a565b90600052602060002090601f016020900481019282612fa95760008555612fef565b82601f10612fc257805160ff1916838001178555612fef565b82800160010185558215612fef579182015b82811115612fef578251825591602001919060010190612fd4565b50612f77929150613052565b5080546130079061385a565b6000825580601f10613017575050565b601f016020900490600052602060002090810190610a339190613052565b80821115612f775760006130498282612ffb565b50600101613035565b5b80821115612f775760008155600101613053565b60006020828403121561307957600080fd5b81356001600160e01b031981168114612b0157600080fd5b60005b838110156130ac578181015183820152602001613094565b838111156129035750506000910152565b600081518084526130d5816020860160208601613091565b601f01601f19169290920160200192915050565b600082825180855260208086019550808260051b84010181860160005b8481101561313457601f198684030189526131228383516130bd565b98840198925090830190600101613106565b5090979650505050505050565b602081526000612b0160208301846130e9565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b038111828210171561318d5761318d613154565b60405290565b604051601f8201601f191681016001600160401b03811182821017156131bb576131bb613154565b604052919050565b60006001600160401b038211156131dc576131dc613154565b50601f01601f191660200190565b600082601f8301126131fb57600080fd5b813561320e613209826131c3565b613193565b81815284602083860101111561322357600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561325257600080fd5b81356001600160401b0381111561326857600080fd5b6120b9848285016131ea565b60208152815115156020820152600060208301516040808401526120b960608401826130e9565b6000602082840312156132ad57600080fd5b5035919050565b6001600160a01b0381168114610a3357600080fd5b8035611b00816132b4565b600080604083850312156132e757600080fd5b8235915060208301356132f9816132b4565b809150509250929050565b60006020828403121561331657600080fd5b8135612b01816132b4565b805182526000602082015160e0602085015261334060e08501826130bd565b90506040830151848203604086015261335982826130bd565b6060858101516001600160a01b0316908701526080808601519087015260a0858101519087015260c0948501519490950193909352509192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156133eb57603f198886030184526133d9858351613321565b945092850192908501906001016133bd565b5092979650505050505050565b6000806040838503121561340b57600080fd5b82356001600160401b038082111561342257600080fd5b61342e868387016131ea565b9350602085013591508082111561344457600080fd5b50613451858286016131ea565b9150509250929050565b600080600080600060a0868803121561347357600080fd5b85356001600160401b038082111561348a57600080fd5b61349689838a016131ea565b965060208801359150808211156134ac57600080fd5b506134b9888289016131ea565b959895975050505060408401359360608101359360809091013592509050565b600080604083850312156134ec57600080fd5b82356134f7816132b4565b915060208301356001600160401b0381111561351257600080fd5b613451858286016131ea565b602081526000612b0160208301846130bd565b60006001600160401b0382111561354a5761354a613154565b5060051b60200190565b6000806040838503121561356757600080fd5b82356001600160401b038082111561357e57600080fd5b61358a868387016131ea565b93506020915081850135818111156135a157600080fd5b8501601f810187136135b257600080fd5b80356135c061320982613531565b81815260059190911b820184019084810190898311156135df57600080fd5b8584015b83811015613617578035868111156135fb5760008081fd5b6136098c89838901016131ea565b8452509186019186016135e3565b508096505050505050509250929050565b602081526000612b016020830184613321565b6000602080838503121561364e57600080fd5b82356001600160401b038082111561366557600080fd5b818501915085601f83011261367957600080fd5b813561368761320982613531565b81815260059190911b830184019084810190888311156136a657600080fd5b8585015b838110156137a4578035858111156136c25760008081fd5b8601610100818c03601f19018113156136db5760008081fd5b6136e361316a565b89830135888111156136f55760008081fd5b6137038e8c838701016131ea565b8252506040808401358981111561371a5760008081fd5b6137288f8d838801016131ea565b8c84015250606061373a8186016132c9565b828401526080915081850135818401525060a0808501358284015260c0915081850135818401525060e080850135828401528385013593508984111561378257600091508182fd5b6137908f8d868801016131ea565b9083015250855250509186019186016136aa565b5098975050505050505050565b600080604083850312156137c457600080fd5b82356137cf816132b4565b946020939093013593505050565b600080600080608085870312156137f357600080fd5b84356001600160401b038082111561380a57600080fd5b613816888389016131ea565b9550602087013591508082111561382c57600080fd5b50613839878288016131ea565b935050604085013561384a816132b4565b9396929550929360600135925050565b600181811c9082168061386e57607f821691505b602082108114156114a257634e487b7160e01b600052602260045260246000fd5b600082516138a1818460208701613091565b9190910192915050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6000602080838503121561395657600080fd5b82516001600160401b0381111561396c57600080fd5b8301601f8101851361397d57600080fd5b805161398b61320982613531565b81815260059190911b820183019083810190878311156139aa57600080fd5b928401925b828410156139d15783516139c2816132b4565b825292840192908401906139af565b979650505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115613a1b57613a1b6139f2565b500190565b6000600019821415613a3457613a346139f2565b5060010190565b600060208284031215613a4d57600080fd5b8151612b01816132b4565b60a081526000613a6b60a08301886130bd565b8281036020840152613a7d81886130bd565b60408401969096525050606081019290925260809091015292915050565b608081526000613aae60808301876130bd565b6020830195909552506040810192909252606090910152919050565b600060208284031215613adc57600080fd5b5051919050565b608081526000613af660808301876130bd565b8281036020840152613b0881876130bd565b6001600160a01b0395909516604084015250506060015292915050565b600082601f830112613b3657600080fd5b8151613b44613209826131c3565b818152846020838601011115613b5957600080fd5b6120b9826020830160208701613091565b60008060008060808587031215613b8057600080fd5b84516001600160401b0380821115613b9757600080fd5b613ba388838901613b25565b95506020870151915080821115613bb957600080fd5b50613bc687828801613b25565b9350506040850151613bd7816132b4565b6060959095015193969295505050565b604081526000613bfa60408301856130bd565b905060018060a01b03831660208301529392505050565b600060208284031215613c2357600080fd5b81518015158114612b0157600080fd5b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613cb6816017850160208801613091565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613ce7816028840160208801613091565b01602801949350505050565b6000816000190483118215151615613d0d57613d0d6139f2565b500290565b600081613d2157613d216139f2565b506000190190565b634e487b7160e01b600052602160045260246000fdfeb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220f6669836a8af07faaa193198bb3ffa530de5fd1dc7a633291aef62dfa423305164736f6c634300080a0033", } // BridgeFeeQuoteABI is the input ABI used to generate the binding from. diff --git a/contract/types.go b/contract/types.go index 456ea64a..c26d55bb 100644 --- a/contract/types.go +++ b/contract/types.go @@ -1,3 +1,8 @@ package contract const DefaultMaxQuoteIndex = 3 + +type BridgeDenoms struct { + ChainName string + Denoms []string +} diff --git a/solidity/contracts/bridge/BridgeFeeOracle.sol b/solidity/contracts/bridge/BridgeFeeOracle.sol index e283a820..18347f15 100644 --- a/solidity/contracts/bridge/BridgeFeeOracle.sol +++ b/solidity/contracts/bridge/BridgeFeeOracle.sol @@ -36,13 +36,13 @@ contract BridgeFeeOracle is function initialize(address _crosschain) public initializer { crosschainContract = _crosschain; - _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); - _grantRole(UPGRADE_ROLE, msg.sender); - _grantRole(OWNER_ROLE, msg.sender); - __AccessControl_init(); __UUPSUpgradeable_init(); __ReentrancyGuard_init(); + + _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); + _grantRole(UPGRADE_ROLE, msg.sender); + _grantRole(OWNER_ROLE, msg.sender); } /** diff --git a/solidity/contracts/bridge/BridgeFeeQuote.sol b/solidity/contracts/bridge/BridgeFeeQuote.sol index f83cb5b2..2d954124 100644 --- a/solidity/contracts/bridge/BridgeFeeQuote.sol +++ b/solidity/contracts/bridge/BridgeFeeQuote.sol @@ -65,13 +65,13 @@ contract BridgeFeeQuote is oracleContract = _oracleContract; maxQuoteIndex = _maxQuoteIndex; - _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); - _grantRole(UPGRADE_ROLE, msg.sender); - _grantRole(OWNER_ROLE, msg.sender); - __AccessControl_init(); __UUPSUpgradeable_init(); __ReentrancyGuard_init(); + + _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); + _grantRole(UPGRADE_ROLE, msg.sender); + _grantRole(OWNER_ROLE, msg.sender); } event NewQuote( @@ -415,6 +415,9 @@ contract BridgeFeeQuote is if (assets[_chainName].isActive) { revert ChainNameAlreadyExists(); } + if (_chainName.equal("")) { + revert ChainNameInvalid(); + } assets[_chainName] = Asset({isActive: true, tokenNames: _tokenNames}); chainNames.push(_chainName); return true;