@imtbl/sdk 0.30.5 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10644,7 +10644,7 @@ declare class Passport {
10644
10644
  */
10645
10645
  declare enum ChainId {
10646
10646
  IMTBL_ZKEVM_MAINNET = 13371,
10647
- IMTBL_ZKEVM_TESTNET = 13472,
10647
+ IMTBL_ZKEVM_TESTNET = 13473,
10648
10648
  IMTBL_ZKEVM_DEVNET = 13433,
10649
10649
  ETHEREUM = 1,
10650
10650
  SEPOLIA = 11155111
@@ -11471,17 +11471,38 @@ type ExchangeOverrides = {
11471
11471
 
11472
11472
  interface CheckoutOverrides {
11473
11473
  }
11474
+ interface CheckoutFeatureConfiguration {
11475
+ enable: boolean;
11476
+ }
11477
+ /**
11478
+ * A type representing the on-ramp configurations for the checkout SDK.
11479
+ * @property {boolean} enable - To enable on-ramp feature in Checkout sdk.
11480
+ */
11481
+ interface CheckoutOnRampConfiguration extends CheckoutFeatureConfiguration {
11482
+ }
11483
+ /**
11484
+ * A type representing the swap configurations for the checkout SDK.
11485
+ * @property {boolean} enable - To enable swap feature in Checkout sdk.
11486
+ */
11487
+ interface CheckoutSwapConfiguration extends CheckoutFeatureConfiguration {
11488
+ }
11489
+ /**
11490
+ * A type representing the bridge configurations for the checkout SDK.
11491
+ * @property {boolean} enable - To enable bridge feature in Checkout sdk.
11492
+ */
11493
+ interface CheckoutBridgeConfiguration extends CheckoutFeatureConfiguration {
11494
+ }
11474
11495
  /**
11475
11496
  * A type representing checkout SDK configurations.
11476
- * @property {boolean} isOnRampEnabled - To enable on-ramp feature in Checkout sdk.
11477
- * @property {boolean} isSwapEnabled - To enable swap feature in Checkout sdk.
11478
- * @property {boolean} isBridgeEnabled - To enable bridge feature in Checkout sdk.
11479
- * @property {Passport} passport - To enable passport wallet with Checkout sdk.
11497
+ * @property {CheckoutOnRampConfiguration} onRamp - To configure the on-ramp feature.
11498
+ * @property {CheckoutSwapConfiguration} swap - To configure the swap feature.
11499
+ * @property {CheckoutBridgeConfiguration} bridge - To configure the bridge feature.
11500
+ * @property {Passport} passport - To enable passport wallet integration.
11480
11501
  */
11481
11502
  interface CheckoutModuleConfiguration extends ModuleConfiguration<CheckoutOverrides> {
11482
- isOnRampEnabled?: boolean;
11483
- isSwapEnabled?: boolean;
11484
- isBridgeEnabled?: boolean;
11503
+ onRamp?: CheckoutOnRampConfiguration;
11504
+ swap?: CheckoutSwapConfiguration;
11505
+ bridge?: CheckoutBridgeConfiguration;
11485
11506
  passport?: Passport;
11486
11507
  }
11487
11508
  /**
@@ -12952,4 +12973,4 @@ type ErrorType = {
12952
12973
  };
12953
12974
  };
12954
12975
 
12955
- export { AllowedNetworkConfig, AvailableRoutingOptions, BalanceDelta, BridgeEventType, BridgeFailed, BridgeFundingStep, BridgeSuccess, BridgeWidgetConfiguration, BridgeWidgetParams, BuyOrder, BuyParams, BuyResult, BuyResultFailed, BuyResultInsufficientFunds, BuyResultSuccess, BuyToken, CHECKOUT_API_BASE_URL, CancelParams, CancelResult, CancelResultFailed, CancelResultSuccess, ChainId, ChainName, CheckConnectionParams, CheckConnectionResult, Checkout, CheckoutConfiguration, CheckoutErrorType, CheckoutModuleConfiguration, CheckoutStatus, CheckoutWidgetsConfig, ConnectEventType, ConnectParams, ConnectResult, ConnectTargetLayer, ConnectWidgetConfiguration, ConnectWidgetParams, ConnectionFailed, ConnectionSuccess, DexConfig, ERC20ItemRequirement, ERC721Balance, ERC721ItemRequirement, ErrorType, ExchangeType, Fee, FeePercentage, FeeToken, FiatRampParams, FulfillmentTransaction, FundingItem, FundingRoute, FundingStep, FundingStepType, GasAmount, GasEstimateBridgeToL2Result, GasEstimateParams, GasEstimateSwapResult, GasEstimateTokenConfig, GasEstimateType, GasToken, GasTokenType, GetAllBalancesParams, GetAllBalancesResult, GetBalanceParams, GetBalanceResult, GetNetworkAllowListParams, GetNetworkAllowListResult, GetNetworkParams, GetTokenAllowListParams, GetTokenAllowListResult, GetWalletAllowListParams, GetWalletAllowListResult, IMTBLWidgetEvents, IWidgetsFactory, ItemBalance, ItemType, NativeItemRequirement, NetworkFilter, NetworkFilterTypes, NetworkInfo, NoRouteOptions, NoRoutesFound, OnRampEventType, OnRampFailed, OnRampFundingStep, OnRampProviderFees, OnRampSuccess, OnRampWidgetParams, OnrampWidgetConfiguration, OrchestrationEvent, OrchestrationEventData, OrchestrationEventType, OrderFee, ProviderEvent, ProviderEventType, ProviderUpdated, RemoteConfiguration, RequestBridgeEvent, RequestConnectEvent, RequestOnrampEvent, RequestSwapEvent, RequestWalletEvent, RoutesFound, RoutingOutcome, RoutingOutcomeType, SaleEventType, SaleFailed, SaleItem, SaleSuccess, SaleTransactionSuccess, SaleWidgetConfiguration, SaleWidgetParams, SellOrder, SellParams, SellResult, SellResultFailed, SellResultInsufficientFunds, SellResultSuccess, SellToken, SemanticVersion, SendTransactionParams, SendTransactionResult, SmartCheckoutInsufficient, SmartCheckoutParams, SmartCheckoutResult, SmartCheckoutRouter, SmartCheckoutSufficient, SwapEventType, SwapFailed, SwapFundingStep, SwapRejected, SwapSuccess, SwapWidgetConfiguration, SwapWidgetParams, SwitchNetworkParams, SwitchNetworkResult, TokenAmountEstimate, TokenBalance, TokenFilter, TokenFilterTypes, TokenInfo, TransactionOrGasType, TransactionRequirement, WalletDisconnect, WalletEventType, WalletFilter, WalletFilterTypes, WalletInfo, WalletNetworkSwitch, WalletProviderName, WalletWidgetConfiguration, WalletWidgetParams, Widget, WidgetConfiguration, WidgetConfigurations, WidgetEvent, WidgetEventData, WidgetEventTypes, WidgetParameters, WidgetProperties, WidgetTheme, WidgetType };
12976
+ export { AllowedNetworkConfig, AvailableRoutingOptions, BalanceDelta, BridgeEventType, BridgeFailed, BridgeFundingStep, BridgeSuccess, BridgeWidgetConfiguration, BridgeWidgetParams, BuyOrder, BuyParams, BuyResult, BuyResultFailed, BuyResultInsufficientFunds, BuyResultSuccess, BuyToken, CHECKOUT_API_BASE_URL, CancelParams, CancelResult, CancelResultFailed, CancelResultSuccess, ChainId, ChainName, CheckConnectionParams, CheckConnectionResult, Checkout, CheckoutBridgeConfiguration, CheckoutConfiguration, CheckoutErrorType, CheckoutModuleConfiguration, CheckoutOnRampConfiguration, CheckoutStatus, CheckoutSwapConfiguration, CheckoutWidgetsConfig, ConnectEventType, ConnectParams, ConnectResult, ConnectTargetLayer, ConnectWidgetConfiguration, ConnectWidgetParams, ConnectionFailed, ConnectionSuccess, DexConfig, ERC20ItemRequirement, ERC721Balance, ERC721ItemRequirement, ErrorType, ExchangeType, Fee, FeePercentage, FeeToken, FiatRampParams, FulfillmentTransaction, FundingItem, FundingRoute, FundingStep, FundingStepType, GasAmount, GasEstimateBridgeToL2Result, GasEstimateParams, GasEstimateSwapResult, GasEstimateTokenConfig, GasEstimateType, GasToken, GasTokenType, GetAllBalancesParams, GetAllBalancesResult, GetBalanceParams, GetBalanceResult, GetNetworkAllowListParams, GetNetworkAllowListResult, GetNetworkParams, GetTokenAllowListParams, GetTokenAllowListResult, GetWalletAllowListParams, GetWalletAllowListResult, IMTBLWidgetEvents, IWidgetsFactory, ItemBalance, ItemType, NativeItemRequirement, NetworkFilter, NetworkFilterTypes, NetworkInfo, NoRouteOptions, NoRoutesFound, OnRampEventType, OnRampFailed, OnRampFundingStep, OnRampProviderFees, OnRampSuccess, OnRampWidgetParams, OnrampWidgetConfiguration, OrchestrationEvent, OrchestrationEventData, OrchestrationEventType, OrderFee, ProviderEvent, ProviderEventType, ProviderUpdated, RemoteConfiguration, RequestBridgeEvent, RequestConnectEvent, RequestOnrampEvent, RequestSwapEvent, RequestWalletEvent, RoutesFound, RoutingOutcome, RoutingOutcomeType, SaleEventType, SaleFailed, SaleItem, SaleSuccess, SaleTransactionSuccess, SaleWidgetConfiguration, SaleWidgetParams, SellOrder, SellParams, SellResult, SellResultFailed, SellResultInsufficientFunds, SellResultSuccess, SellToken, SemanticVersion, SendTransactionParams, SendTransactionResult, SmartCheckoutInsufficient, SmartCheckoutParams, SmartCheckoutResult, SmartCheckoutRouter, SmartCheckoutSufficient, SwapEventType, SwapFailed, SwapFundingStep, SwapRejected, SwapSuccess, SwapWidgetConfiguration, SwapWidgetParams, SwitchNetworkParams, SwitchNetworkResult, TokenAmountEstimate, TokenBalance, TokenFilter, TokenFilterTypes, TokenInfo, TransactionOrGasType, TransactionRequirement, WalletDisconnect, WalletEventType, WalletFilter, WalletFilterTypes, WalletInfo, WalletNetworkSwitch, WalletProviderName, WalletWidgetConfiguration, WalletWidgetParams, Widget, WidgetConfiguration, WidgetConfigurations, WidgetEvent, WidgetEventData, WidgetEventTypes, WidgetParameters, WidgetProperties, WidgetTheme, WidgetType };
@@ -12863,10 +12863,60 @@ const _abi$1 = [
12863
12863
  name: "_uniRouter",
12864
12864
  type: "address",
12865
12865
  },
12866
+ {
12867
+ internalType: "address",
12868
+ name: "_wimx",
12869
+ type: "address",
12870
+ },
12866
12871
  ],
12867
12872
  stateMutability: "nonpayable",
12868
12873
  type: "constructor",
12869
12874
  },
12875
+ {
12876
+ inputs: [],
12877
+ name: "ContractPaused",
12878
+ type: "error",
12879
+ },
12880
+ {
12881
+ inputs: [],
12882
+ name: "DeadlinePassed",
12883
+ type: "error",
12884
+ },
12885
+ {
12886
+ inputs: [],
12887
+ name: "FailedToRefundNativeTokens",
12888
+ type: "error",
12889
+ },
12890
+ {
12891
+ inputs: [],
12892
+ name: "FailedToSendFees",
12893
+ type: "error",
12894
+ },
12895
+ {
12896
+ inputs: [],
12897
+ name: "FeeTooHigh",
12898
+ type: "error",
12899
+ },
12900
+ {
12901
+ inputs: [],
12902
+ name: "IncorrectRecipient",
12903
+ type: "error",
12904
+ },
12905
+ {
12906
+ inputs: [],
12907
+ name: "InputTokenNotWrapped",
12908
+ type: "error",
12909
+ },
12910
+ {
12911
+ inputs: [],
12912
+ name: "NativeTokenAmountMismatch",
12913
+ type: "error",
12914
+ },
12915
+ {
12916
+ inputs: [],
12917
+ name: "Unauthorized",
12918
+ type: "error",
12919
+ },
12870
12920
  {
12871
12921
  anonymous: false,
12872
12922
  inputs: [
@@ -12898,6 +12948,31 @@ const _abi$1 = [
12898
12948
  name: "FeeTaken",
12899
12949
  type: "event",
12900
12950
  },
12951
+ {
12952
+ anonymous: false,
12953
+ inputs: [
12954
+ {
12955
+ indexed: true,
12956
+ internalType: "address",
12957
+ name: "feePayer",
12958
+ type: "address",
12959
+ },
12960
+ {
12961
+ indexed: true,
12962
+ internalType: "address",
12963
+ name: "feeRecipient",
12964
+ type: "address",
12965
+ },
12966
+ {
12967
+ indexed: false,
12968
+ internalType: "uint256",
12969
+ name: "feeAmount",
12970
+ type: "uint256",
12971
+ },
12972
+ ],
12973
+ name: "FeeTaken",
12974
+ type: "event",
12975
+ },
12901
12976
  {
12902
12977
  anonymous: false,
12903
12978
  inputs: [
@@ -12999,19 +13074,6 @@ const _abi$1 = [
12999
13074
  name: "Unpaused",
13000
13075
  type: "event",
13001
13076
  },
13002
- {
13003
- inputs: [],
13004
- name: "BASIS_POINT_PRECISION",
13005
- outputs: [
13006
- {
13007
- internalType: "uint256",
13008
- name: "",
13009
- type: "uint256",
13010
- },
13011
- ],
13012
- stateMutability: "view",
13013
- type: "function",
13014
- },
13015
13077
  {
13016
13078
  inputs: [],
13017
13079
  name: "DEFAULT_ADMIN_ROLE",
@@ -13025,64 +13087,12 @@ const _abi$1 = [
13025
13087
  stateMutability: "view",
13026
13088
  type: "function",
13027
13089
  },
13028
- {
13029
- inputs: [],
13030
- name: "FEE_BASIS_POINTS_MAXIMUM",
13031
- outputs: [
13032
- {
13033
- internalType: "uint16",
13034
- name: "",
13035
- type: "uint16",
13036
- },
13037
- ],
13038
- stateMutability: "view",
13039
- type: "function",
13040
- },
13041
- {
13042
- inputs: [],
13043
- name: "PAUSE",
13044
- outputs: [
13045
- {
13046
- internalType: "bytes32",
13047
- name: "",
13048
- type: "bytes32",
13049
- },
13050
- ],
13051
- stateMutability: "view",
13052
- type: "function",
13053
- },
13054
- {
13055
- inputs: [],
13056
- name: "UNPAUSE",
13057
- outputs: [
13058
- {
13059
- internalType: "bytes32",
13060
- name: "",
13061
- type: "bytes32",
13062
- },
13063
- ],
13064
- stateMutability: "view",
13065
- type: "function",
13066
- },
13067
- {
13068
- inputs: [],
13069
- name: "WITHDRAW",
13070
- outputs: [
13071
- {
13072
- internalType: "bytes32",
13073
- name: "",
13074
- type: "bytes32",
13075
- },
13076
- ],
13077
- stateMutability: "view",
13078
- type: "function",
13079
- },
13080
13090
  {
13081
13091
  inputs: [
13082
13092
  {
13083
13093
  components: [
13084
13094
  {
13085
- internalType: "address",
13095
+ internalType: "address payable",
13086
13096
  name: "recipient",
13087
13097
  type: "address",
13088
13098
  },
@@ -13155,7 +13165,7 @@ const _abi$1 = [
13155
13165
  {
13156
13166
  components: [
13157
13167
  {
13158
- internalType: "address",
13168
+ internalType: "address payable",
13159
13169
  name: "recipient",
13160
13170
  type: "address",
13161
13171
  },
@@ -13213,7 +13223,7 @@ const _abi$1 = [
13213
13223
  {
13214
13224
  components: [
13215
13225
  {
13216
- internalType: "address",
13226
+ internalType: "address payable",
13217
13227
  name: "recipient",
13218
13228
  type: "address",
13219
13229
  },
@@ -13286,7 +13296,7 @@ const _abi$1 = [
13286
13296
  {
13287
13297
  components: [
13288
13298
  {
13289
- internalType: "address",
13299
+ internalType: "address payable",
13290
13300
  name: "recipient",
13291
13301
  type: "address",
13292
13302
  },
@@ -13520,22 +13530,22 @@ const _abi$1 = [
13520
13530
  },
13521
13531
  {
13522
13532
  inputs: [],
13523
- name: "uniswapRouter",
13524
- outputs: [
13525
- {
13526
- internalType: "contract IV3SwapRouter",
13527
- name: "",
13528
- type: "address",
13529
- },
13530
- ],
13531
- stateMutability: "view",
13533
+ name: "unpause",
13534
+ outputs: [],
13535
+ stateMutability: "nonpayable",
13532
13536
  type: "function",
13533
13537
  },
13534
13538
  {
13535
- inputs: [],
13536
- name: "unpause",
13539
+ inputs: [
13540
+ {
13541
+ internalType: "uint256",
13542
+ name: "amountMinimum",
13543
+ type: "uint256",
13544
+ },
13545
+ ],
13546
+ name: "unwrapNativeToken",
13537
13547
  outputs: [],
13538
- stateMutability: "nonpayable",
13548
+ stateMutability: "payable",
13539
13549
  type: "function",
13540
13550
  },
13541
13551
  {
@@ -13556,8 +13566,12 @@ const _abi$1 = [
13556
13566
  stateMutability: "nonpayable",
13557
13567
  type: "function",
13558
13568
  },
13569
+ {
13570
+ stateMutability: "payable",
13571
+ type: "receive",
13572
+ },
13559
13573
  ];
13560
- const _bytecode$1 = "0x60806040523480156200001157600080fd5b506040516200278438038062002784833981016040819052620000349162000136565b6001805460ff191690556200004b60008362000078565b600180546001600160a01b0390921661010002610100600160a81b0319909216919091179055506200016e565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000115576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620000d43390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b80516001600160a01b03811681146200013157600080fd5b919050565b600080604083850312156200014a57600080fd5b620001558362000119565b9150620001656020840162000119565b90509250929050565b612606806200017e6000396000f3fe60806040526004361061013f5760003560e01c80635ae401dc116100b657806393751f631161006f57806393751f631461038c578063a217fddf146103b5578063ac9650d8146103ca578063d547741f146103ea578063d9a6f7051461040a578063e65fad971461042057600080fd5b80635ae401dc146102ae5780635c975abb146102ce578063735de9f7146102e65780638456cb59146103235780638f3914661461033857806391d148541461036c57600080fd5b80632f2ff15d116101085780632f2ff15d1461022057806336568abe14610240578063383ebb0b146102605780633f4ba83a146102735780635640f6591461028857806358e81a501461029b57600080fd5b80620fa9fb1461014457806301ffc9a714610166578063116944b21461019b57806316ba7197146101bc578063248a9ca3146101f0575b600080fd5b34801561015057600080fd5b5061016461015f366004611db4565b610454565b005b34801561017257600080fd5b50610186610181366004611ded565b61050d565b60405190151581526020015b60405180910390f35b6101ae6101a9366004611f85565b610544565b604051908152602001610192565b3480156101c857600080fd5b506101ae7f7a8dc26796a1e50e6e190b70259f58f6a4edd5b22280ceecc82b687b8e98286981565b3480156101fc57600080fd5b506101ae61020b366004611fda565b60009081526020819052604090206001015490565b34801561022c57600080fd5b5061016461023b366004611ff3565b610634565b34801561024c57600080fd5b5061016461025b366004611ff3565b610659565b6101ae61026e3660046120db565b6106dc565b34801561027f57600080fd5b5061016461084c565b6101ae6102963660046120db565b610889565b6101ae6102a9366004611f85565b61097f565b6102c16102bc366004612187565b610ad0565b6040516101929190612222565b3480156102da57600080fd5b5060015460ff16610186565b3480156102f257600080fd5b5060015461030b9061010090046001600160a01b031681565b6040516001600160a01b039091168152602001610192565b34801561032f57600080fd5b50610164610b1e565b34801561034457600080fd5b506101ae7fe7276a2a84d8de556657ec9cf93a55a7d66f096e529d0582ed08e9e2208b92b581565b34801561037857600080fd5b50610186610387366004611ff3565b610b59565b34801561039857600080fd5b506103a26103e881565b60405161ffff9091168152602001610192565b3480156103c157600080fd5b506101ae600081565b3480156103d657600080fd5b506102c16103e5366004612284565b610b82565b3480156103f657600080fd5b50610164610405366004611ff3565b610c76565b34801561041657600080fd5b506101ae61271081565b34801561042c57600080fd5b506101ae7ffcb9fcbfa83b897fb2d5cf4b58962164105c1e71489a37ef3ae0db3fdce576f681565b61047e7f7a8dc26796a1e50e6e190b70259f58f6a4edd5b22280ceecc82b687b8e98286933610b59565b61048757600080fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156104ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f291906122c5565b90506105086001600160a01b0383168483610c9b565b505050565b60006001600160e01b03198216637965db0b60e01b148061053e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006105b08260000151836080015184606001518787808060200260200160405190810160405280939291908181526020016000905b828210156105a657610597604083028601368190038101906122de565b8152602001906001019061057a565b5050505050610cfe565b60808301526001546040516304e45aaf60e01b81526101009091046001600160a01b0316906304e45aaf906105e9908590600401612335565b6020604051808303816000875af1158015610608573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062c91906122c5565b949350505050565b60008281526020819052604090206001015461064f81610dbf565b6105088383610dcc565b6001600160a01b03811633146106ce5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6106d88282610e50565b5050565b6000806106ec8360000151610eb5565b905060008061075783866060015187602001518a8a808060200260200160405190810160405280939291908181526020016000905b8282101561074d5761073e604083028601368190038101906122de565b81526020019060010190610721565b5050505050610ee3565b606087018190526001546040516304dc09a360e11b81529294509092506000916101009091046001600160a01b0316906309b813469061079b9089906004016123db565b6020604051808303816000875af11580156107ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107de91906122c5565b905061083e8482858b8b808060200260200160405190810160405280939291908181526020016000905b8282101561083457610825604083028601368190038101906122de565b81526020019060010190610808565b5050505050610f96565b9450505050505b9392505050565b6108767fe7276a2a84d8de556657ec9cf93a55a7d66f096e529d0582ed08e9e2208b92b533610b59565b61087f57600080fd5b610887610ff7565b565b6000806108998360000151611049565b90506108f781846040015185602001518888808060200260200160405190810160405280939291908181526020016000905b828210156105a6576108e8604083028601368190038101906122de565b815260200190600101906108cb565b604084810191909152600154905163b858183f60e01b81526101009091046001600160a01b03169063b858183f906109339086906004016123db565b6020604051808303816000875af1158015610952573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097691906122c5565b95945050505050565b60008060006109e484600001518560a0015186606001518989808060200260200160405190810160405280939291908181526020016000905b8282101561074d576109d5604083028601368190038101906122de565b815260200190600101906109b8565b60a08601819052600154604051635023b4df60e01b81529294509092506000916101009091046001600160a01b031690635023b4df90610a28908890600401612335565b6020604051808303816000875af1158015610a47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6b91906122c5565b9050610ac5856000015182858a8a808060200260200160405190810160405280939291908181526020016000905b8282101561083457610ab6604083028601368190038101906122de565b81526020019060010190610a99565b979650505050505050565b606083421115610b145760405162461bcd60e51b815260206004820152600f60248201526e111958591b1a5b99481c185cdcd959608a1b60448201526064016106c5565b61062c8383610b82565b610b487ffcb9fcbfa83b897fb2d5cf4b58962164105c1e71489a37ef3ae0db3fdce576f633610b59565b610b5157600080fd5b610887611055565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6060816001600160401b03811115610b9c57610b9c611e62565b604051908082528060200260200182016040528015610bcf57816020015b6060815260200190600190039081610bba5790505b50905060005b82811015610c6f57610c3f30858584818110610bf357610bf36123ee565b9050602002810190610c059190612404565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061109092505050565b828281518110610c5157610c516123ee565b60200260200101819052508080610c6790612460565b915050610bd5565b5092915050565b600082815260208190526040902060010154610c9181610dbf565b6105088383610e50565b6040516001600160a01b03831660248201526044810182905261050890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526110b5565b60006001600160a01b0383163314610d585760405162461bcd60e51b815260206004820181905260248201527f73776170526563697069656e74206d757374206265206d73672e73656e64657260448201526064016106c5565b60015460ff16610d9757610d6b8261118a565b50600080610d79868561123d565b9092509050610d888287612479565b9550610d948782611366565b50505b610dac6001600160a01b03861633308761146f565b610db685856114ad565b50919392505050565b610dc981336115aa565b50565b610dd68282610b59565b6106d8576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610e0c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610e5a8282610b59565b156106d8576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008060148351610ec69190612479565b90506000610ed684836014611603565b905061062c816000611710565b6000806001600160a01b0384163314610f3e5760405162461bcd60e51b815260206004820181905260248201527f73776170526563697069656e74206d757374206265206d73672e73656e64657260448201526064016106c5565b6000610f498461118a565b90506000610f598261271061248c565b9050610f688761271083611775565b9250610f7488846114ad565b610f896001600160a01b03891633308a61146f565b5094969095509350505050565b6000806000610fa5868561123d565b91509150610fb560015460ff1690565b610fc357610fc387826117b5565b610fed3383610fd28989612479565b610fdc9190612479565b6001600160a01b038a169190610c9b565b610ac5828761248c565b610fff6118bc565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600061053e8282611710565b61105d611905565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2583361102c565b606061084583836040518060600160405280602781526020016125aa6027913961194b565b600061110a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166119c39092919063ffffffff16565b905080516000148061112b57508080602001905181019061112b919061249f565b6105085760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106c5565b6000805b82518110156111d4578281815181106111a9576111a96123ee565b602002602001015160200151826111c0919061248c565b9150806111cc81612460565b91505061118e565b506103e88111156112385760405162461bcd60e51b815260206004820152602860248201527f5365636f6e6461727920666565203e204645455f42415349535f504f494e54536044820152675f4d4158494d554d60c01b60648201526084016106c5565b919050565b6000606082516001600160401b0381111561125a5761125a611e62565b60405190808252806020026020018201604052801561129f57816020015b60408051808201909152600080825260208201528152602001906001900390816112785790505b50905060005b835181101561135e5760006112e48583815181106112c5576112c56123ee565b602002602001015160200151612710886119d29092919063ffffffff16565b90506040518060400160405280868481518110611303576113036123ee565b6020026020010151600001516001600160a01b0316815260200182815250838381518110611333576113336123ee565b6020908102919091010152611348818561248c565b935050808061135690612460565b9150506112a5565b509250929050565b60005b8151811015610508576113cc33838381518110611388576113886123ee565b6020026020010151600001518484815181106113a6576113a66123ee565b602002602001015160200151866001600160a01b031661146f909392919063ffffffff16565b8181815181106113de576113de6123ee565b6020026020010151600001516001600160a01b0316336001600160a01b0316846001600160a01b03167f1f9a9fdac86b6ca3c5300bec0b61555cded1f1a234378602dcca6c27085eac8e85858151811061143a5761143a6123ee565b60200260200101516020015160405161145591815260200190565b60405180910390a48061146781612460565b915050611369565b6040516001600160a01b03808516602483015283166044820152606481018290526114a79085906323b872dd60e01b90608401610cc7565b50505050565b600154604051636eb1769f60e11b81523060048201526001600160a01b0361010090920482166024820152829184169063dd62ed3e90604401602060405180830381865afa158015611503573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061152791906122c5565b10156106d85760015460405163095ea7b360e01b81526101009091046001600160a01b039081166004830152600019602483015283169063095ea7b3906044016020604051808303816000875af1158015611586573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610508919061249f565b6115b48282610b59565b6106d8576115c181611a74565b6115cc836020611a86565b6040516020016115dd9291906124c1565b60408051601f198184030181529082905262461bcd60e51b82526106c591600401612536565b60608161161181601f61248c565b10156116505760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b60448201526064016106c5565b61165a828461248c565b8451101561169e5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b60448201526064016106c5565b6060821580156116bd5760405191506000825260208201604052611707565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156116f65780518352602092830192016116de565b5050858452601f01601f1916604052505b50949350505050565b600061171d82601461248c565b835110156117655760405162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b60448201526064016106c5565b500160200151600160601b900490565b60006117828484846119d2565b90506000828061179457611794612549565b84860911156108455760001981106117ab57600080fd5b6001019392505050565b60005b8151811015610508576118198282815181106117d6576117d66123ee565b6020026020010151600001518383815181106117f4576117f46123ee565b602002602001015160200151856001600160a01b0316610c9b9092919063ffffffff16565b81818151811061182b5761182b6123ee565b6020026020010151600001516001600160a01b0316336001600160a01b0316846001600160a01b03167f1f9a9fdac86b6ca3c5300bec0b61555cded1f1a234378602dcca6c27085eac8e858581518110611887576118876123ee565b6020026020010151602001516040516118a291815260200190565b60405180910390a4806118b481612460565b9150506117b8565b60015460ff166108875760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016106c5565b60015460ff16156108875760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106c5565b6060600080856001600160a01b031685604051611968919061255f565b600060405180830381855af49150503d80600081146119a3576040519150601f19603f3d011682016040523d82523d6000602084013e6119a8565b606091505b50915091506119b986838387611c21565b9695505050505050565b606061062c8484600085611c9a565b600083830281600019858709828110838203039150508084116119f457600080fd5b80600003611a0757508290049050610845565b6000848688096000868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b606061053e6001600160a01b03831660145b60606000611a9583600261257b565b611aa090600261248c565b6001600160401b03811115611ab757611ab7611e62565b6040519080825280601f01601f191660200182016040528015611ae1576020820181803683370190505b509050600360fc1b81600081518110611afc57611afc6123ee565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611b2b57611b2b6123ee565b60200101906001600160f81b031916908160001a9053506000611b4f84600261257b565b611b5a90600161248c565b90505b6001811115611bd2576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611b8e57611b8e6123ee565b1a60f81b828281518110611ba457611ba46123ee565b60200101906001600160f81b031916908160001a90535060049490941c93611bcb81612592565b9050611b5d565b5083156108455760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106c5565b60608315611c90578251600003611c89576001600160a01b0385163b611c895760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106c5565b508161062c565b61062c8383611d6a565b606082471015611cfb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106c5565b600080866001600160a01b03168587604051611d17919061255f565b60006040518083038185875af1925050503d8060008114611d54576040519150601f19603f3d011682016040523d82523d6000602084013e611d59565b606091505b5091509150610ac587838387611c21565b815115611d7a5781518083602001fd5b8060405162461bcd60e51b81526004016106c59190612536565b6001600160a01b0381168114610dc957600080fd5b803561123881611d94565b60008060408385031215611dc757600080fd5b8235611dd281611d94565b91506020830135611de281611d94565b809150509250929050565b600060208284031215611dff57600080fd5b81356001600160e01b03198116811461084557600080fd5b60008083601f840112611e2957600080fd5b5081356001600160401b03811115611e4057600080fd5b6020830191508360208260061b8501011115611e5b57600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b0381118282101715611e9a57611e9a611e62565b60405290565b604051608081016001600160401b0381118282101715611e9a57611e9a611e62565b604051601f8201601f191681016001600160401b0381118282101715611eea57611eea611e62565b604052919050565b600060e08284031215611f0457600080fd5b611f0c611e78565b90508135611f1981611d94565b81526020820135611f2981611d94565b6020820152604082013562ffffff81168114611f4457600080fd5b6040820152611f5560608301611da9565b60608201526080820135608082015260a082013560a0820152611f7a60c08301611da9565b60c082015292915050565b60008060006101008486031215611f9b57600080fd5b83356001600160401b03811115611fb157600080fd5b611fbd86828701611e17565b9094509250611fd190508560208601611ef2565b90509250925092565b600060208284031215611fec57600080fd5b5035919050565b6000806040838503121561200657600080fd5b823591506020830135611de281611d94565b60006080828403121561202a57600080fd5b612032611ea0565b905081356001600160401b038082111561204b57600080fd5b818401915084601f83011261205f57600080fd5b813560208282111561207357612073611e62565b612085601f8301601f19168201611ec2565b9250818352868183860101111561209b57600080fd5b818185018285013760008183850101528285526120b9818701611da9565b8186015250505050604082013560408201526060820135606082015292915050565b6000806000604084860312156120f057600080fd5b83356001600160401b038082111561210757600080fd5b61211387838801611e17565b9095509350602086013591508082111561212c57600080fd5b5061213986828701612018565b9150509250925092565b60008083601f84011261215557600080fd5b5081356001600160401b0381111561216c57600080fd5b6020830191508360208260051b8501011115611e5b57600080fd5b60008060006040848603121561219c57600080fd5b8335925060208401356001600160401b038111156121b957600080fd5b6121c586828701612143565b9497909650939450505050565b60005b838110156121ed5781810151838201526020016121d5565b50506000910152565b6000815180845261220e8160208601602086016121d2565b601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561227757603f198886030184526122658583516121f6565b94509285019290850190600101612249565b5092979650505050505050565b6000806020838503121561229757600080fd5b82356001600160401b038111156122ad57600080fd5b6122b985828601612143565b90969095509350505050565b6000602082840312156122d757600080fd5b5051919050565b6000604082840312156122f057600080fd5b604051604081018181106001600160401b038211171561231257612312611e62565b604052823561232081611d94565b81526020928301359281019290925250919050565b60e0810161053e828480516001600160a01b03908116835260208083015182169084015260408083015162ffffff16908401526060808301518216908401526080808301519084015260a0828101519084015260c09182015116910152565b60008151608084526123a960808501826121f6565b6020848101516001600160a01b0316908601526040808501519086015260609384015193909401929092525090919050565b6020815260006108456020830184612394565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261241b57600080fd5b8301803591506001600160401b0382111561243557600080fd5b602001915036819003821315611e5b57600080fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016124725761247261244a565b5060010190565b8181038181111561053e5761053e61244a565b8082018082111561053e5761053e61244a565b6000602082840312156124b157600080fd5b8151801515811461084557600080fd5b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516124f98160178501602088016121d2565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161252a8160288401602088016121d2565b01602801949350505050565b60208152600061084560208301846121f6565b634e487b7160e01b600052601260045260246000fd5b600082516125718184602087016121d2565b9190910192915050565b808202811582820484141761053e5761053e61244a565b6000816125a1576125a161244a565b50600019019056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220c75a7db1b170ff1ce6888f2940825a25db3ebb624d8b84bd3f2372ebae2de1d464736f6c63430008130033";
13574
+ const _bytecode$1 = "0x60806040523480156200001157600080fd5b506040516200310b3803806200310b83398101604081905262000034916200015c565b6001805460ff191690556200004b6000846200009e565b600180546001600160a01b039384166101008102610100600160a81b03199092169190911790915560038054929093166001600160a01b03199283161790925560028054909116909117905550620001a6565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166200013b576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620000fa3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b80516001600160a01b03811681146200015757600080fd5b919050565b6000806000606084860312156200017257600080fd5b6200017d846200013f565b92506200018d602085016200013f565b91506200019d604085016200013f565b90509250925092565b612f5580620001b66000396000f3fe60806040526004361061010c5760003560e01c806358e81a50116100955780638456cb59116100645780638456cb591461029957806391d14854146102ae578063a217fddf146102ce578063ac9650d8146102e3578063d547741f1461030357600080fd5b806358e81a501461023b5780635ae401dc1461024e5780635c975abb1461026e5780635ebca7991461028657600080fd5b80632f2ff15d116100dc5780632f2ff15d146101c057806336568abe146101e0578063383ebb0b146102005780633f4ba83a146102135780635640f6591461022857600080fd5b80620fa9fb1461011857806301ffc9a71461013a578063116944b21461016f578063248a9ca31461019057600080fd5b3661011357005b600080fd5b34801561012457600080fd5b5061013861013336600461270a565b610323565b005b34801561014657600080fd5b5061015a610155366004612743565b6103ef565b60405190151581526020015b60405180910390f35b61018261017d3660046128d4565b610426565b604051908152602001610166565b34801561019c57600080fd5b506101826101ab366004612929565b60009081526020819052604090206001015490565b3480156101cc57600080fd5b506101386101db366004612942565b6106ab565b3480156101ec57600080fd5b506101386101fb366004612942565b6106d0565b61018261020e366004612a2a565b610753565b34801561021f57600080fd5b50610138610ac2565b610182610236366004612a2a565b610b12565b6101826102493660046128d4565b610d90565b61026161025c366004612ad6565b6110c5565b6040516101669190612b71565b34801561027a57600080fd5b5060015460ff1661015a565b610138610294366004612929565b6110fa565b3480156102a557600080fd5b506101386112aa565b3480156102ba57600080fd5b5061015a6102c9366004612942565b6112f8565b3480156102da57600080fd5b50610182600081565b3480156102ef57600080fd5b506102616102fe366004612bd3565b611321565b34801561030f57600080fd5b5061013861031e366004612942565b611415565b61034d7f7a8dc26796a1e50e6e190b70259f58f6a4edd5b22280ceecc82b687b8e982869336112f8565b610369576040516282b42960e81b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156103b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103d49190612c14565b90506103ea6001600160a01b038316848361143a565b505050565b60006001600160e01b03198216637965db0b60e01b148061042057506301ffc9a760e01b6001600160e01b03198316145b92915050565b600061043460015460ff1690565b156104525760405163ab35696f60e01b815260040160405180910390fd5b60608201516001600160a01b0316331461047f5760405163519bdea760e01b815260040160405180910390fd5b4780156105bf57826080015181146104aa576040516342f7487960e11b815260040160405180910390fd5b60035483516001600160a01b039081169116146104da576040516324d0121760e01b815260040160405180910390fd5b61053a83608001518686808060200260200160405190810160405280939291908181526020016000905b828210156105305761052160408302860136819003810190612c2d565b81526020019060010190610504565b505050505061149d565b608084018190526001546040516304e45aaf60e01b81526101009091046001600160a01b0316916304e45aaf91610575908790600401612c84565b60206040518083038185885af1158015610593573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906105b89190612c14565b91506106a3565b610624836000015184608001518787808060200260200160405190810160405280939291908181526020016000905b8282101561061a5761060b60408302860136819003810190612c2d565b815260200190600101906105ee565b50505050506114ef565b60808401526001546040516304e45aaf60e01b81526101009091046001600160a01b0316906304e45aaf9061065d908690600401612c84565b6020604051808303816000875af115801561067c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a09190612c14565b91505b509392505050565b6000828152602081905260409020600101546106c68161154c565b6103ea8383611559565b6001600160a01b03811633146107455760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61074f82826115dd565b5050565b600061076160015460ff1690565b1561077f5760405163ab35696f60e01b815260040160405180910390fd5b60208201516001600160a01b031633146107ac5760405163519bdea760e01b815260040160405180910390fd5b60006107bb8360000151611642565b905047801561096d576003546001600160a01b038381169116146107f2576040516324d0121760e01b815260040160405180910390fd5b83606001518114610816576040516342f7487960e11b815260040160405180910390fd5b60008061087986606001518989808060200260200160405190810160405280939291908181526020016000905b8282101561086f5761086060408302860136819003810190612c2d565b81526020019060010190610843565b5050505050611670565b606088018190526001546040516304dc09a360e11b81529294509092506000916101009091046001600160a01b0316906309b813469084906108bf908b90600401612d2a565b60206040518083038185885af11580156108dd573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906109029190612c14565b905061096181848b8b808060200260200160405190810160405280939291908181526020016000905b828210156109575761094860408302860136819003810190612c2d565b8152602001906001019061092b565b50505050506116c3565b95505050505050610abb565b6000806109d18487606001518a8a808060200260200160405190810160405280939291908181526020016000905b828210156109c7576109b860408302860136819003810190612c2d565b8152602001906001019061099b565b50505050506117b7565b606088018190526001546040516304dc09a360e11b81529294509092506000916101009091046001600160a01b0316906309b8134690610a15908a90600401612d2a565b6020604051808303816000875af1158015610a34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a589190612c14565b90506109618582858c8c808060200260200160405190810160405280939291908181526020016000905b82821015610aae57610a9f60408302860136819003810190612c2d565b81526020019060010190610a82565b5050505050611811565b50505b9392505050565b610aec7fe7276a2a84d8de556657ec9cf93a55a7d66f096e529d0582ed08e9e2208b92b5336112f8565b610b08576040516282b42960e81b815260040160405180910390fd5b610b1061186d565b565b6000610b2060015460ff1690565b15610b3e5760405163ab35696f60e01b815260040160405180910390fd5b60208201516001600160a01b03163314610b6b5760405163519bdea760e01b815260040160405180910390fd5b6000610b7a83600001516118bf565b9050478015610cb05783604001518114610ba7576040516342f7487960e11b815260040160405180910390fd5b6003546001600160a01b03838116911614610bd5576040516324d0121760e01b815260040160405180910390fd5b610c2b84604001518787808060200260200160405190810160405280939291908181526020016000905b8282101561053057610c1c60408302860136819003810190612c2d565b81526020019060010190610bff565b6040858101829052600154905163b858183f60e01b81526101009091046001600160a01b03169163b858183f91610c66908890600401612d2a565b60206040518083038185885af1158015610c84573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610ca99190612c14565b9250610ab8565b610d078285604001518888808060200260200160405190810160405280939291908181526020016000905b8282101561061a57610cf860408302860136819003810190612c2d565b81526020019060010190610cdb565b604085810191909152600154905163b858183f60e01b81526101009091046001600160a01b03169063b858183f90610d43908790600401612d2a565b6020604051808303816000875af1158015610d62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d869190612c14565b9695505050505050565b6000610d9e60015460ff1690565b15610dbc5760405163ab35696f60e01b815260040160405180910390fd5b60608201516001600160a01b03163314610de95760405163519bdea760e01b815260040160405180910390fd5b478015610f865760035483516001600160a01b03908116911614610e20576040516324d0121760e01b815260040160405180910390fd5b8260a001518114610e44576040516342f7487960e11b815260040160405180910390fd5b600080610e9d8560a001518888808060200260200160405190810160405280939291908181526020016000905b8282101561086f57610e8e60408302860136819003810190612c2d565b81526020019060010190610e71565b60a08701819052600154604051635023b4df60e01b81529294509092506000916101009091046001600160a01b031690635023b4df908490610ee3908a90600401612c84565b60206040518083038185885af1158015610f01573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f269190612c14565b9050610f7b81848a8a808060200260200160405190810160405280939291908181526020016000905b8282101561095757610f6c60408302860136819003810190612c2d565b81526020019060010190610f4f565b945050505050610abb565b600080610fe485600001518660a001518989808060200260200160405190810160405280939291908181526020016000905b828210156109c757610fd560408302860136819003810190612c2d565b81526020019060010190610fb8565b60a08701819052600154604051635023b4df60e01b81529294509092506000916101009091046001600160a01b031690635023b4df90611028908990600401612c84565b6020604051808303816000875af1158015611047573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106b9190612c14565b9050610f7b866000015182858b8b808060200260200160405190810160405280939291908181526020016000905b82821015610aae576110b660408302860136819003810190612c2d565b81526020019060010190611099565b6060834211156110e85760405163387b2e5560e11b815260040160405180910390fd5b6110f28383611321565b949350505050565b6003546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611143573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111679190612c14565b9050818110156111ad5760405162461bcd60e51b8152602060048201526011602482015270092dce6eaccccd2c6d2cadce840ae929ab607b1b604482015260640161073c565b801561074f57600354604051632e1a7d4d60e01b8152600481018390526001600160a01b0390911690632e1a7d4d90602401600060405180830381600087803b1580156111f957600080fd5b505af115801561120d573d6000803e3d6000fd5b50506040805160008082526020820192839052935033925084916112319190612d3d565b60006040518083038185875af1925050503d806000811461126e576040519150601f19603f3d011682016040523d82523d6000602084013e611273565b606091505b50509050806103ea5760405162461bcd60e51b815260206004820152600360248201526253544560e81b604482015260640161073c565b6112d47ffcb9fcbfa83b897fb2d5cf4b58962164105c1e71489a37ef3ae0db3fdce576f6336112f8565b6112f0576040516282b42960e81b815260040160405180910390fd5b610b106118cb565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6060816001600160401b0381111561133b5761133b6127b1565b60405190808252806020026020018201604052801561136e57816020015b60608152602001906001900390816113595790505b50905060005b8281101561140e576113de3085858481811061139257611392612d59565b90506020028101906113a49190612d6f565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061190692505050565b8282815181106113f0576113f0612d59565b6020026020010181905250808061140690612dcb565b915050611374565b5092915050565b6000828152602081905260409020600101546114308161154c565b6103ea83836115dd565b6040516001600160a01b0383166024820152604481018290526103ea90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261192b565b60006114a882611a00565b506000806114b68585611a73565b90925090506114c58286612de4565b94506114d081611b9c565b6003546114e6906001600160a01b031686611cc6565b50929392505050565b60006114fa82611a00565b506000806115088585611a73565b90925090506115178286612de4565b94506115238682611dc3565b6115386001600160a01b038716333088611ecc565b6115428686611cc6565b5092949350505050565b6115568133611f0a565b50565b61156382826112f8565b61074f576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556115993390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6115e782826112f8565b1561074f576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600080601483516116539190612de4565b9050600061166384836014611f63565b90506110f2816000612070565b600080600061167e84611a00565b9050600061168e82612710612df7565b905061169d86612710836120d5565b6003549093506116b6906001600160a01b031684611cc6565b85935050505b9250929050565b60008060006116d28685611a73565b915091506116df81611b9c565b600260009054906101000a90046001600160a01b03166001600160a01b03166312210e8a6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561172f57600080fd5b505af1158015611743573d6000803e3d6000fd5b5050505060008287876117569190612de4565b6117609190612de4565b604051909150600090339083156108fc0290849084818181858888f193505050509050806117a1576040516382e4f46960e01b815260040160405180910390fd5b6117ab8489612df7565b98975050505050505050565b60008060006117c584611a00565b905060006117d582612710612df7565b90506117e486612710836120d5565b92506117f08784611cc6565b6118056001600160a01b038816333089611ecc565b50939590945092505050565b60008060006118208685611a73565b9150915061182e8782612115565b611858338361183d8989612de4565b6118479190612de4565b6001600160a01b038a16919061143a565b6118628287612df7565b979650505050505050565b61187561221c565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60006104208282612070565b6118d3612265565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258336118a2565b6060610abb8383604051806060016040528060278152602001612ef9602791396122ab565b6000611980826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166123199092919063ffffffff16565b90508051600014806119a15750808060200190518101906119a19190612e0a565b6103ea5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161073c565b6000805b8251811015611a4a57828181518110611a1f57611a1f612d59565b60200260200101516020015182611a369190612df7565b915080611a4281612dcb565b915050611a04565b506103e8811115611a6e5760405163cd4e616760e01b815260040160405180910390fd5b919050565b6000606082516001600160401b03811115611a9057611a906127b1565b604051908082528060200260200182016040528015611ad557816020015b6040805180820190915260008082526020820152815260200190600190039081611aae5790505b50905060005b8351811015611b94576000611b1a858381518110611afb57611afb612d59565b602002602001015160200151612710886123289092919063ffffffff16565b90506040518060400160405280868481518110611b3957611b39612d59565b6020026020010151600001516001600160a01b0316815260200182815250838381518110611b6957611b69612d59565b6020908102919091010152611b7e8185612df7565b9350508080611b8c90612dcb565b915050611adb565b509250929050565b60005b815181101561074f576000828281518110611bbc57611bbc612d59565b6020026020010151600001516001600160a01b03166108fc848481518110611be657611be6612d59565b6020026020010151602001519081150290604051600060405180830381858888f19350505050905080611c2c5760405163647373e960e11b815260040160405180910390fd5b828281518110611c3e57611c3e612d59565b6020026020010151600001516001600160a01b0316336001600160a01b03167fe0e765ab26c1caf691c510426951246128b96830e49cc81d8c093fd551abac35858581518110611c9057611c90612d59565b602002602001015160200151604051611cab91815260200190565b60405180910390a35080611cbe81612dcb565b915050611b9f565b600154604051636eb1769f60e11b81523060048201526001600160a01b0361010090920482166024820152829184169063dd62ed3e90604401602060405180830381865afa158015611d1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d409190612c14565b101561074f5760015460405163095ea7b360e01b81526101009091046001600160a01b039081166004830152600019602483015283169063095ea7b3906044016020604051808303816000875af1158015611d9f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ea9190612e0a565b60005b81518110156103ea57611e2933838381518110611de557611de5612d59565b602002602001015160000151848481518110611e0357611e03612d59565b602002602001015160200151866001600160a01b0316611ecc909392919063ffffffff16565b818181518110611e3b57611e3b612d59565b6020026020010151600001516001600160a01b0316336001600160a01b0316846001600160a01b03167f1f9a9fdac86b6ca3c5300bec0b61555cded1f1a234378602dcca6c27085eac8e858581518110611e9757611e97612d59565b602002602001015160200151604051611eb291815260200190565b60405180910390a480611ec481612dcb565b915050611dc6565b6040516001600160a01b0380851660248301528316604482015260648101829052611f049085906323b872dd60e01b90608401611466565b50505050565b611f1482826112f8565b61074f57611f21816123ca565b611f2c8360206123dc565b604051602001611f3d929190612e2c565b60408051601f198184030181529082905262461bcd60e51b825261073c91600401612ea1565b606081611f7181601f612df7565b1015611fb05760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b604482015260640161073c565b611fba8284612df7565b84511015611ffe5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b604482015260640161073c565b60608215801561201d5760405191506000825260208201604052612067565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561205657805183526020928301920161203e565b5050858452601f01601f1916604052505b50949350505050565b600061207d826014612df7565b835110156120c55760405162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b604482015260640161073c565b500160200151600160601b900490565b60006120e2848484612328565b9050600082806120f4576120f4612eb4565b8486091115610abb57600019811061210b57600080fd5b6001019392505050565b60005b81518110156103ea5761217982828151811061213657612136612d59565b60200260200101516000015183838151811061215457612154612d59565b602002602001015160200151856001600160a01b031661143a9092919063ffffffff16565b81818151811061218b5761218b612d59565b6020026020010151600001516001600160a01b0316336001600160a01b0316846001600160a01b03167f1f9a9fdac86b6ca3c5300bec0b61555cded1f1a234378602dcca6c27085eac8e8585815181106121e7576121e7612d59565b60200260200101516020015160405161220291815260200190565b60405180910390a48061221481612dcb565b915050612118565b60015460ff16610b105760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161073c565b60015460ff1615610b105760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161073c565b6060600080856001600160a01b0316856040516122c89190612d3d565b600060405180830381855af49150503d8060008114612303576040519150601f19603f3d011682016040523d82523d6000602084013e612308565b606091505b5091509150610d8686838387612577565b60606110f284846000856125f0565b6000838302816000198587098281108382030391505080841161234a57600080fd5b8060000361235d57508290049050610abb565b6000848688096000868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b60606104206001600160a01b03831660145b606060006123eb836002612eca565b6123f6906002612df7565b6001600160401b0381111561240d5761240d6127b1565b6040519080825280601f01601f191660200182016040528015612437576020820181803683370190505b509050600360fc1b8160008151811061245257612452612d59565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061248157612481612d59565b60200101906001600160f81b031916908160001a90535060006124a5846002612eca565b6124b0906001612df7565b90505b6001811115612528576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106124e4576124e4612d59565b1a60f81b8282815181106124fa576124fa612d59565b60200101906001600160f81b031916908160001a90535060049490941c9361252181612ee1565b90506124b3565b508315610abb5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161073c565b606083156125e65782516000036125df576001600160a01b0385163b6125df5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161073c565b50816110f2565b6110f283836126c0565b6060824710156126515760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161073c565b600080866001600160a01b0316858760405161266d9190612d3d565b60006040518083038185875af1925050503d80600081146126aa576040519150601f19603f3d011682016040523d82523d6000602084013e6126af565b606091505b509150915061186287838387612577565b8151156126d05781518083602001fd5b8060405162461bcd60e51b815260040161073c9190612ea1565b6001600160a01b038116811461155657600080fd5b8035611a6e816126ea565b6000806040838503121561271d57600080fd5b8235612728816126ea565b91506020830135612738816126ea565b809150509250929050565b60006020828403121561275557600080fd5b81356001600160e01b031981168114610abb57600080fd5b60008083601f84011261277f57600080fd5b5081356001600160401b0381111561279657600080fd5b6020830191508360208260061b85010111156116bc57600080fd5b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b03811182821017156127e9576127e96127b1565b60405290565b604051608081016001600160401b03811182821017156127e9576127e96127b1565b604051601f8201601f191681016001600160401b0381118282101715612839576128396127b1565b604052919050565b600060e0828403121561285357600080fd5b61285b6127c7565b90508135612868816126ea565b81526020820135612878816126ea565b6020820152604082013562ffffff8116811461289357600080fd5b60408201526128a4606083016126ff565b60608201526080820135608082015260a082013560a08201526128c960c083016126ff565b60c082015292915050565b600080600061010084860312156128ea57600080fd5b83356001600160401b0381111561290057600080fd5b61290c8682870161276d565b909450925061292090508560208601612841565b90509250925092565b60006020828403121561293b57600080fd5b5035919050565b6000806040838503121561295557600080fd5b823591506020830135612738816126ea565b60006080828403121561297957600080fd5b6129816127ef565b905081356001600160401b038082111561299a57600080fd5b818401915084601f8301126129ae57600080fd5b81356020828211156129c2576129c26127b1565b6129d4601f8301601f19168201612811565b925081835286818386010111156129ea57600080fd5b81818501828501376000818385010152828552612a088187016126ff565b8186015250505050604082013560408201526060820135606082015292915050565b600080600060408486031215612a3f57600080fd5b83356001600160401b0380821115612a5657600080fd5b612a628783880161276d565b90955093506020860135915080821115612a7b57600080fd5b50612a8886828701612967565b9150509250925092565b60008083601f840112612aa457600080fd5b5081356001600160401b03811115612abb57600080fd5b6020830191508360208260051b85010111156116bc57600080fd5b600080600060408486031215612aeb57600080fd5b8335925060208401356001600160401b03811115612b0857600080fd5b612b1486828701612a92565b9497909650939450505050565b60005b83811015612b3c578181015183820152602001612b24565b50506000910152565b60008151808452612b5d816020860160208601612b21565b601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015612bc657603f19888603018452612bb4858351612b45565b94509285019290850190600101612b98565b5092979650505050505050565b60008060208385031215612be657600080fd5b82356001600160401b03811115612bfc57600080fd5b612c0885828601612a92565b90969095509350505050565b600060208284031215612c2657600080fd5b5051919050565b600060408284031215612c3f57600080fd5b604051604081018181106001600160401b0382111715612c6157612c616127b1565b6040528235612c6f816126ea565b81526020928301359281019290925250919050565b60e08101610420828480516001600160a01b03908116835260208083015182169084015260408083015162ffffff16908401526060808301518216908401526080808301519084015260a0828101519084015260c09182015116910152565b6000815160808452612cf86080850182612b45565b6020848101516001600160a01b0316908601526040808501519086015260609384015193909401929092525090919050565b602081526000610abb6020830184612ce3565b60008251612d4f818460208701612b21565b9190910192915050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e19843603018112612d8657600080fd5b8301803591506001600160401b03821115612da057600080fd5b6020019150368190038213156116bc57600080fd5b634e487b7160e01b600052601160045260246000fd5b600060018201612ddd57612ddd612db5565b5060010190565b8181038181111561042057610420612db5565b8082018082111561042057610420612db5565b600060208284031215612e1c57600080fd5b81518015158114610abb57600080fd5b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612e64816017850160208801612b21565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612e95816028840160208801612b21565b01602801949350505050565b602081526000610abb6020830184612b45565b634e487b7160e01b600052601260045260246000fd5b808202811582820484141761042057610420612db5565b600081612ef057612ef0612db5565b50600019019056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220eff696b5535ea5759815da07da267901ad15855b143752622fa478891337f65c64736f6c63430008130033";
13561
13575
  const isSuperArgs$1 = (xs) => xs.length > 1;
13562
13576
  class SecondaryFee__factory extends ContractFactory {
13563
13577
  constructor(...args) {
@@ -13568,11 +13582,11 @@ class SecondaryFee__factory extends ContractFactory {
13568
13582
  super(_abi$1, _bytecode$1, args[0]);
13569
13583
  }
13570
13584
  }
13571
- deploy(_admin, _uniRouter, overrides) {
13572
- return super.deploy(_admin, _uniRouter, overrides || {});
13585
+ deploy(_admin, _uniRouter, _wimx, overrides) {
13586
+ return super.deploy(_admin, _uniRouter, _wimx, overrides || {});
13573
13587
  }
13574
- getDeployTransaction(_admin, _uniRouter, overrides) {
13575
- return super.getDeployTransaction(_admin, _uniRouter, overrides || {});
13588
+ getDeployTransaction(_admin, _uniRouter, _wimx, overrides) {
13589
+ return super.getDeployTransaction(_admin, _uniRouter, _wimx, overrides || {});
13576
13590
  }
13577
13591
  attach(address) {
13578
13592
  return super.attach(address);
@@ -15351,25 +15365,24 @@ class Fees {
15351
15365
  }
15352
15366
 
15353
15367
  const IMMUTABLE_TESTNET_RPC_URL = 'https://rpc.testnet.immutable.com';
15354
- const IMMUTABLE_TESTNET_CHAIN_ID = 13472;
15355
- const TIMX_IMMUTABLE_TESTNET = {
15368
+ const IMMUTABLE_TESTNET_CHAIN_ID = 13473;
15369
+
15370
+ const NATIVE_IMX_IMMUTABLE_TESTNET = {
15356
15371
  chainId: IMMUTABLE_TESTNET_CHAIN_ID,
15357
- address: '0x0000000000000000000000000000000000001010',
15358
15372
  decimals: 18,
15359
15373
  symbol: 'tIMX',
15360
15374
  name: 'Immutable Testnet Token',
15361
- type: 'erc20',
15375
+ type: 'native',
15362
15376
  };
15363
15377
  const WIMX_IMMUTABLE_TESTNET = {
15364
15378
  chainId: IMMUTABLE_TESTNET_CHAIN_ID,
15365
- address: '0xAf7cf5D4Af0BFAa85d384d42b8D410762Ccbce69',
15379
+ address: '0x1CcCa691501174B4A623CeDA58cC8f1a76dc3439',
15366
15380
  decimals: 18,
15367
15381
  symbol: 'WIMX',
15368
15382
  name: 'Wrapped Immutable Testnet Token',
15369
15383
  type: 'erc20',
15370
15384
  };
15371
15385
  const IMMUTABLE_TESTNET_COMMON_ROUTING_TOKENS = [
15372
- TIMX_IMMUTABLE_TESTNET,
15373
15386
  WIMX_IMMUTABLE_TESTNET,
15374
15387
  ];
15375
15388
 
@@ -15415,7 +15428,7 @@ function buildSinglePoolSwap(tokenIn, tokenOut, recipient, trade, route, amountI
15415
15428
  }
15416
15429
  return calldatas;
15417
15430
  }
15418
- function buildSinglePoolSwapWithFees(recipient, trade, route, amountIn, amountOut, secondaryFees, secondaryFeeContract) {
15431
+ function buildSinglePoolSwapWithFees(recipient, trade, route, amountIn, amountOut, secondaryFees, secondaryFeeContract, tokenOut) {
15419
15432
  const secondaryFeeValues = secondaryFees.map((fee) => ({
15420
15433
  feeBasisPoints: fee.basisPoints,
15421
15434
  recipient: fee.recipient,
@@ -15449,7 +15462,11 @@ function buildSinglePoolSwapWithFees(recipient, trade, route, amountIn, amountOu
15449
15462
  },
15450
15463
  ]));
15451
15464
  }
15452
- // TODO: Add refundETH method when support is added in SecondaryFee contract
15465
+ const shouldUnwrapTokens = isNative(tokenOut);
15466
+ if (shouldUnwrapTokens) {
15467
+ // Unwrap the output token if the user specified a native token as the output
15468
+ calldatas.push(secondaryFeeContract.encodeFunctionData('unwrapNativeToken', [amountOut]));
15469
+ }
15453
15470
  return calldatas;
15454
15471
  }
15455
15472
  function buildMultiPoolSwap(tokenIn, tokenOut, recipient, trade, route, amountIn, amountOut, routerContract, paymentsContract) {
@@ -15487,7 +15504,7 @@ function buildMultiPoolSwap(tokenIn, tokenOut, recipient, trade, route, amountIn
15487
15504
  }
15488
15505
  return calldatas;
15489
15506
  }
15490
- function buildMultiPoolSwapWithFees(recipient, trade, route, amountIn, amountOut, secondaryFees, secondaryFeeContract) {
15507
+ function buildMultiPoolSwapWithFees(recipient, trade, route, amountIn, amountOut, secondaryFees, secondaryFeeContract, tokenOut) {
15491
15508
  const path = encodeRouteToPath(route, trade.tradeType === Uniswap.TradeType.EXACT_OUTPUT);
15492
15509
  const secondaryFeeValues = secondaryFees.map((fee) => ({
15493
15510
  feeBasisPoints: fee.basisPoints,
@@ -15516,7 +15533,11 @@ function buildMultiPoolSwapWithFees(recipient, trade, route, amountIn, amountOut
15516
15533
  },
15517
15534
  ]));
15518
15535
  }
15519
- // TODO: Add refundETH method when support is added in SecondaryFee contract
15536
+ const shouldUnwrapTokens = isNative(tokenOut);
15537
+ if (shouldUnwrapTokens) {
15538
+ // Unwrap the output token if the user specified a native token as the output
15539
+ calldatas.push(secondaryFeeContract.encodeFunctionData('unwrapNativeToken', [amountOut]));
15540
+ }
15520
15541
  return calldatas;
15521
15542
  }
15522
15543
  /**
@@ -15541,12 +15562,12 @@ function buildSwapParameters(tokenIn, tokenOut, recipient, trade, secondaryFees,
15541
15562
  const hasSecondaryFees = secondaryFees.length > 0;
15542
15563
  if (isSinglePoolSwap) {
15543
15564
  if (hasSecondaryFees) {
15544
- return buildSinglePoolSwapWithFees(recipient, trade, route, maximumAmountIn, minimumAmountOut, secondaryFees, secondaryFeeContract);
15565
+ return buildSinglePoolSwapWithFees(recipient, trade, route, maximumAmountIn, minimumAmountOut, secondaryFees, secondaryFeeContract, tokenOut);
15545
15566
  }
15546
15567
  return buildSinglePoolSwap(tokenIn, tokenOut, recipient, trade, route, maximumAmountIn, minimumAmountOut, routerContract, paymentsContract);
15547
15568
  }
15548
15569
  if (hasSecondaryFees) {
15549
- return buildMultiPoolSwapWithFees(recipient, trade, route, maximumAmountIn, minimumAmountOut, secondaryFees, secondaryFeeContract);
15570
+ return buildMultiPoolSwapWithFees(recipient, trade, route, maximumAmountIn, minimumAmountOut, secondaryFees, secondaryFeeContract, tokenOut);
15550
15571
  }
15551
15572
  return buildMultiPoolSwap(tokenIn, tokenOut, recipient, trade, route, maximumAmountIn, minimumAmountOut, routerContract, paymentsContract);
15552
15573
  }
@@ -15586,8 +15607,18 @@ function createSwapParameters(tokenIn, tokenOut, adjustedQuote, fromAddress, sli
15586
15607
  };
15587
15608
  }
15588
15609
  const getTransactionValue = (tokenIn, maximumAmountIn) => tokenIn.type === 'native' ? maximumAmountIn : zeroNativeCurrencyValue;
15610
+ const getSwapRecipient = (tokenOut, fromAddress, routerContractAddress, secondaryFeesContractAddress, secondaryFees) => {
15611
+ // Not native so send the tokens directly back to the caller.
15612
+ if (!isNative(tokenOut))
15613
+ return fromAddress;
15614
+ // Native but no fees, send to the Uniswap Router
15615
+ if (secondaryFees.length === 0)
15616
+ return routerContractAddress;
15617
+ // Native and fees, send to the secondary fee contract
15618
+ return secondaryFeesContractAddress;
15619
+ };
15589
15620
  function getSwap(tokenIn, tokenOut, adjustedQuote, fromAddress, slippage, deadline, routerContractAddress, secondaryFeesContractAddress, gasPrice, secondaryFees) {
15590
- const swapRecipient = isNative(tokenOut) ? routerContractAddress : fromAddress;
15621
+ const swapRecipient = getSwapRecipient(tokenOut, fromAddress, routerContractAddress, secondaryFeesContractAddress, secondaryFees);
15591
15622
  const { calldata, maximumAmountIn } = createSwapParameters(tokenIn, tokenOut, adjustedQuote, swapRecipient, slippage, deadline, secondaryFees);
15592
15623
  // TODO: Add additional gas fee estimates for secondary fees
15593
15624
  const gasFeeEstimate = gasPrice ? calculateGasFee(gasPrice, adjustedQuote.gasEstimate) : null;
@@ -15636,11 +15667,11 @@ function adjustQuoteWithFees(ourQuote, amountSpecified, fees, nativeTokenService
15636
15667
 
15637
15668
  const CONTRACTS_FOR_CHAIN_ID = {
15638
15669
  [IMMUTABLE_TESTNET_CHAIN_ID]: {
15639
- multicall: '0xD17c98b38bA28c7eA1080317EB9AB2b9663BEd92',
15640
- coreFactory: '0x8AC26EfCbf5D700b37A27aA00E6934e6904e7B8e',
15641
- quoterV2: '0x0Afe6F5f4DC34461A801420634239FFaD50A2e44',
15642
- peripheryRouter: '0x57c73281f2697a632AEF1A48CD6ff600f49ee344',
15643
- secondaryFee: '0x5893A5c7bc615Dfd36D7383366d00FFFca5f7178',
15670
+ multicall: '0x4DB567A44451b27C1fAd7f52e1cDf64b915d62f9',
15671
+ coreFactory: '0xb18c44b211065E69844FbA9AE146DA362104AfBf',
15672
+ quoterV2: '0x87854A7D4b9BaC3D37f4516A1Ac7F36fB5ad539f',
15673
+ peripheryRouter: '0x786ec643F231960D4C1A4E336990F8E7bF8f1277',
15674
+ secondaryFee: '0x1938B5B8313E1b64C2c577491Ef5441f9eD33204',
15644
15675
  },
15645
15676
  };
15646
15677
  const SUPPORTED_SANDBOX_CHAINS = {
@@ -15649,8 +15680,8 @@ const SUPPORTED_SANDBOX_CHAINS = {
15649
15680
  rpcUrl: IMMUTABLE_TESTNET_RPC_URL,
15650
15681
  contracts: CONTRACTS_FOR_CHAIN_ID[IMMUTABLE_TESTNET_CHAIN_ID],
15651
15682
  commonRoutingTokens: IMMUTABLE_TESTNET_COMMON_ROUTING_TOKENS,
15652
- nativeToken: TIMX_IMMUTABLE_TESTNET,
15653
- wrappedNativeToken: TIMX_IMMUTABLE_TESTNET, // TODO: TP-1649: Change to WIMX when ready.
15683
+ nativeToken: NATIVE_IMX_IMMUTABLE_TESTNET,
15684
+ wrappedNativeToken: WIMX_IMMUTABLE_TESTNET,
15654
15685
  },
15655
15686
  };
15656
15687
  const SUPPORTED_PRODUCTION_CHAINS = {};
@@ -17112,8 +17143,8 @@ function getOrderbookConfig(environment) {
17112
17143
  switch (environment) {
17113
17144
  case Environment$1.SANDBOX:
17114
17145
  return {
17115
- seaportContractAddress: '0x7Fb7Da6De152597830eD16361633e362A2F59410',
17116
- zoneContractAddress: '0x63441cBfBd15Dd8f5E92598E535661Ac5aCB808E',
17146
+ seaportContractAddress: '0x2CFA8f64e1B49A2DF28532D1D30Cda45117cF778',
17147
+ zoneContractAddress: '0x1Bb4Fb11Ba021Bd0104F0Ee8E5F5c728Bc83d7F1',
17117
17148
  apiEndpoint: 'https://api.sandbox.immutable.com',
17118
17149
  chainName: TESTNET_CHAIN_NAME,
17119
17150
  provider: new providers.JsonRpcProvider('https://rpc.testnet.immutable.com'),
@@ -20911,7 +20942,7 @@ class APIError extends Error {
20911
20942
 
20912
20943
  /* eslint-disable implicit-arrow-linebreak */
20913
20944
  const defaultHeaders = {
20914
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.30.5',
20945
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.31.0',
20915
20946
  };
20916
20947
  /**
20917
20948
  * createAPIConfiguration to create a custom Configuration
@@ -20948,7 +20979,7 @@ class BlockchainDataConfiguration {
20948
20979
  }
20949
20980
  case Environment$1.PRODUCTION: {
20950
20981
  this.apiConfig = createAPIConfiguration({
20951
- basePath: 'https://indexer-mr.imtbl.com',
20982
+ basePath: 'https://api.immutable.com',
20952
20983
  baseConfig,
20953
20984
  });
20954
20985
  break;
@@ -21436,7 +21467,7 @@ var WidgetTheme;
21436
21467
  var ChainId;
21437
21468
  (function (ChainId) {
21438
21469
  ChainId[ChainId["IMTBL_ZKEVM_MAINNET"] = 13371] = "IMTBL_ZKEVM_MAINNET";
21439
- ChainId[ChainId["IMTBL_ZKEVM_TESTNET"] = 13472] = "IMTBL_ZKEVM_TESTNET";
21470
+ ChainId[ChainId["IMTBL_ZKEVM_TESTNET"] = 13473] = "IMTBL_ZKEVM_TESTNET";
21440
21471
  ChainId[ChainId["IMTBL_ZKEVM_DEVNET"] = 13433] = "IMTBL_ZKEVM_DEVNET";
21441
21472
  ChainId[ChainId["ETHEREUM"] = 1] = "ETHEREUM";
21442
21473
  ChainId[ChainId["SEPOLIA"] = 11155111] = "SEPOLIA";
@@ -22297,9 +22328,9 @@ class CheckoutConfiguration {
22297
22328
  this.environment = config.baseConfig.environment;
22298
22329
  // Developer mode will super set any environment configuration
22299
22330
  this.isProduction = !this.isDevelopment && this.environment === Environment$1.PRODUCTION;
22300
- this.isOnRampEnabled = config.isOnRampEnabled ?? DEFAULT_ON_RAMP_ENABLED;
22301
- this.isSwapEnabled = config.isSwapEnabled ?? DEFAULT_SWAP_ENABLED;
22302
- this.isBridgeEnabled = config.isBridgeEnabled ?? DEFAULT_BRIDGE_ENABLED;
22331
+ this.isOnRampEnabled = config.onRamp?.enable ?? DEFAULT_ON_RAMP_ENABLED;
22332
+ this.isSwapEnabled = config.swap?.enable ?? DEFAULT_SWAP_ENABLED;
22333
+ this.isBridgeEnabled = config.bridge?.enable ?? DEFAULT_BRIDGE_ENABLED;
22303
22334
  this.networkMap = networkMap(this.isProduction, this.isDevelopment);
22304
22335
  this.remote = new RemoteConfigFetcher({
22305
22336
  isDevelopment: this.isDevelopment,
@@ -25626,7 +25657,7 @@ async function getItemRequirementsFromRequirements(provider, requirements) {
25626
25657
  return itemRequirements;
25627
25658
  }
25628
25659
 
25629
- const SDK_VERSION_MARKER = '0.30.5';
25660
+ const SDK_VERSION_MARKER = '0.31.0';
25630
25661
  // This SDK version is replaced by the `yarn build` command ran on the root level
25631
25662
  const globalPackageVersion = () => SDK_VERSION_MARKER;
25632
25663
 
@@ -17,7 +17,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
17
17
  chainID,
18
18
  coreContractAddress,
19
19
  registrationContractAddress,
20
- sdkVersion: 'ts-immutable-sdk-0.30.5',
20
+ sdkVersion: 'ts-immutable-sdk-0.31.0',
21
21
  });
22
22
  /**
23
23
  * Sets `sdkVersion` at the time of build