@imtbl/sdk 0.30.4 → 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.
- package/dist/blockchain_data.js +2 -2
- package/dist/browser/checkout/sdk.js +6 -6
- package/dist/browser/checkout/widgets.js +2 -2
- package/dist/checkout_sdk.d.ts +30 -9
- package/dist/checkout_sdk.js +155 -124
- package/dist/immutablex_client.js +1 -1
- package/dist/index.browser.js +4 -4
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +158 -127
- package/dist/index.d.ts +37 -10
- package/dist/index.js +158 -127
- package/dist/orderbook.d.ts +2 -2
- package/dist/orderbook.js +11 -11
- package/dist/passport.js +3 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3792,7 +3792,7 @@ class MultiRollupApiClients {
|
|
|
3792
3792
|
}
|
|
3793
3793
|
|
|
3794
3794
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
3795
|
-
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.
|
|
3795
|
+
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.31.0' };
|
|
3796
3796
|
const createConfig = ({ basePath, headers, }) => {
|
|
3797
3797
|
if (!basePath.trim()) {
|
|
3798
3798
|
throw Error('basePath can not be empty');
|
|
@@ -3852,7 +3852,7 @@ class APIError extends Error {
|
|
|
3852
3852
|
|
|
3853
3853
|
/* eslint-disable implicit-arrow-linebreak */
|
|
3854
3854
|
const defaultHeaders = {
|
|
3855
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.
|
|
3855
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.31.0',
|
|
3856
3856
|
};
|
|
3857
3857
|
/**
|
|
3858
3858
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -3889,7 +3889,7 @@ class BlockchainDataConfiguration {
|
|
|
3889
3889
|
}
|
|
3890
3890
|
case Environment$1.PRODUCTION: {
|
|
3891
3891
|
this.apiConfig = createAPIConfiguration({
|
|
3892
|
-
basePath: 'https://
|
|
3892
|
+
basePath: 'https://api.immutable.com',
|
|
3893
3893
|
baseConfig,
|
|
3894
3894
|
});
|
|
3895
3895
|
break;
|
|
@@ -4263,7 +4263,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
4263
4263
|
chainID,
|
|
4264
4264
|
coreContractAddress,
|
|
4265
4265
|
registrationContractAddress,
|
|
4266
|
-
sdkVersion: 'ts-immutable-sdk-0.
|
|
4266
|
+
sdkVersion: 'ts-immutable-sdk-0.31.0',
|
|
4267
4267
|
});
|
|
4268
4268
|
/**
|
|
4269
4269
|
* Sets `sdkVersion` at the time of build
|
|
@@ -8790,7 +8790,7 @@ const withPassportError = async (fn, customErrorType) => {
|
|
|
8790
8790
|
var ChainId$1;
|
|
8791
8791
|
(function (ChainId) {
|
|
8792
8792
|
ChainId[ChainId["IMTBL_ZKEVM_MAINNET"] = 13371] = "IMTBL_ZKEVM_MAINNET";
|
|
8793
|
-
ChainId[ChainId["IMTBL_ZKEVM_TESTNET"] =
|
|
8793
|
+
ChainId[ChainId["IMTBL_ZKEVM_TESTNET"] = 13473] = "IMTBL_ZKEVM_TESTNET";
|
|
8794
8794
|
ChainId[ChainId["IMTBL_ZKEVM_DEVNET"] = 13433] = "IMTBL_ZKEVM_DEVNET";
|
|
8795
8795
|
ChainId[ChainId["ETHEREUM"] = 1] = "ETHEREUM";
|
|
8796
8796
|
ChainId[ChainId["SEPOLIA"] = 11155111] = "SEPOLIA";
|
|
@@ -11870,13 +11870,13 @@ function mapFromOpenApiOrder(order) {
|
|
|
11870
11870
|
return {
|
|
11871
11871
|
type: 'ERC20',
|
|
11872
11872
|
contractAddress: item.contract_address,
|
|
11873
|
-
amount: item.
|
|
11873
|
+
amount: item.amount,
|
|
11874
11874
|
};
|
|
11875
11875
|
}
|
|
11876
11876
|
if (item.item_type === 'NATIVE') {
|
|
11877
11877
|
return {
|
|
11878
11878
|
type: 'NATIVE',
|
|
11879
|
-
amount: item.
|
|
11879
|
+
amount: item.amount,
|
|
11880
11880
|
};
|
|
11881
11881
|
}
|
|
11882
11882
|
throw new Error('Buy items must be either ERC20 or NATIVE');
|
|
@@ -11924,13 +11924,13 @@ function mapFromOpenApiTrade(trade) {
|
|
|
11924
11924
|
return {
|
|
11925
11925
|
type: 'ERC20',
|
|
11926
11926
|
contractAddress: item.contract_address,
|
|
11927
|
-
amount: item.
|
|
11927
|
+
amount: item.amount,
|
|
11928
11928
|
};
|
|
11929
11929
|
}
|
|
11930
11930
|
if (item.item_type === 'NATIVE') {
|
|
11931
11931
|
return {
|
|
11932
11932
|
type: 'NATIVE',
|
|
11933
|
-
amount: item.
|
|
11933
|
+
amount: item.amount,
|
|
11934
11934
|
};
|
|
11935
11935
|
}
|
|
11936
11936
|
throw new Error('Buy items must be either ERC20 or NATIVE');
|
|
@@ -12070,8 +12070,8 @@ function mapImmutableOrderToSeaportOrderComponents(order, counter, zoneAddress)
|
|
|
12070
12070
|
switch (buyItem.item_type) {
|
|
12071
12071
|
case 'NATIVE':
|
|
12072
12072
|
return {
|
|
12073
|
-
startAmount: buyItem.
|
|
12074
|
-
endAmount: buyItem.
|
|
12073
|
+
startAmount: buyItem.amount,
|
|
12074
|
+
endAmount: buyItem.amount,
|
|
12075
12075
|
itemType: ItemType$1.NATIVE,
|
|
12076
12076
|
recipient: order.account_address,
|
|
12077
12077
|
token: ethers.constants.AddressZero,
|
|
@@ -12079,8 +12079,8 @@ function mapImmutableOrderToSeaportOrderComponents(order, counter, zoneAddress)
|
|
|
12079
12079
|
};
|
|
12080
12080
|
case 'ERC20':
|
|
12081
12081
|
return {
|
|
12082
|
-
startAmount: buyItem.
|
|
12083
|
-
endAmount: buyItem.
|
|
12082
|
+
startAmount: buyItem.amount,
|
|
12083
|
+
endAmount: buyItem.amount,
|
|
12084
12084
|
itemType: ItemType$1.ERC20,
|
|
12085
12085
|
recipient: order.account_address,
|
|
12086
12086
|
token: buyItem.contract_address || ethers.constants.AddressZero,
|
|
@@ -12401,7 +12401,7 @@ class ImmutableApiClient {
|
|
|
12401
12401
|
=== ItemType$1.NATIVE
|
|
12402
12402
|
? 'NATIVE'
|
|
12403
12403
|
: 'ERC20',
|
|
12404
|
-
|
|
12404
|
+
amount: orderComponents.consideration[0].startAmount,
|
|
12405
12405
|
contract_address: orderComponents.consideration[0].token,
|
|
12406
12406
|
},
|
|
12407
12407
|
],
|
|
@@ -12456,8 +12456,8 @@ function getOrderbookConfig(environment) {
|
|
|
12456
12456
|
switch (environment) {
|
|
12457
12457
|
case Environment$1.SANDBOX:
|
|
12458
12458
|
return {
|
|
12459
|
-
seaportContractAddress: '
|
|
12460
|
-
zoneContractAddress: '
|
|
12459
|
+
seaportContractAddress: '0x2CFA8f64e1B49A2DF28532D1D30Cda45117cF778',
|
|
12460
|
+
zoneContractAddress: '0x1Bb4Fb11Ba021Bd0104F0Ee8E5F5c728Bc83d7F1',
|
|
12461
12461
|
apiEndpoint: 'https://api.sandbox.immutable.com',
|
|
12462
12462
|
chainName: TESTNET_CHAIN_NAME,
|
|
12463
12463
|
provider: new ethers.providers.JsonRpcProvider('https://rpc.testnet.immutable.com'),
|
|
@@ -26703,10 +26703,60 @@ const _abi$1 = [
|
|
|
26703
26703
|
name: "_uniRouter",
|
|
26704
26704
|
type: "address",
|
|
26705
26705
|
},
|
|
26706
|
+
{
|
|
26707
|
+
internalType: "address",
|
|
26708
|
+
name: "_wimx",
|
|
26709
|
+
type: "address",
|
|
26710
|
+
},
|
|
26706
26711
|
],
|
|
26707
26712
|
stateMutability: "nonpayable",
|
|
26708
26713
|
type: "constructor",
|
|
26709
26714
|
},
|
|
26715
|
+
{
|
|
26716
|
+
inputs: [],
|
|
26717
|
+
name: "ContractPaused",
|
|
26718
|
+
type: "error",
|
|
26719
|
+
},
|
|
26720
|
+
{
|
|
26721
|
+
inputs: [],
|
|
26722
|
+
name: "DeadlinePassed",
|
|
26723
|
+
type: "error",
|
|
26724
|
+
},
|
|
26725
|
+
{
|
|
26726
|
+
inputs: [],
|
|
26727
|
+
name: "FailedToRefundNativeTokens",
|
|
26728
|
+
type: "error",
|
|
26729
|
+
},
|
|
26730
|
+
{
|
|
26731
|
+
inputs: [],
|
|
26732
|
+
name: "FailedToSendFees",
|
|
26733
|
+
type: "error",
|
|
26734
|
+
},
|
|
26735
|
+
{
|
|
26736
|
+
inputs: [],
|
|
26737
|
+
name: "FeeTooHigh",
|
|
26738
|
+
type: "error",
|
|
26739
|
+
},
|
|
26740
|
+
{
|
|
26741
|
+
inputs: [],
|
|
26742
|
+
name: "IncorrectRecipient",
|
|
26743
|
+
type: "error",
|
|
26744
|
+
},
|
|
26745
|
+
{
|
|
26746
|
+
inputs: [],
|
|
26747
|
+
name: "InputTokenNotWrapped",
|
|
26748
|
+
type: "error",
|
|
26749
|
+
},
|
|
26750
|
+
{
|
|
26751
|
+
inputs: [],
|
|
26752
|
+
name: "NativeTokenAmountMismatch",
|
|
26753
|
+
type: "error",
|
|
26754
|
+
},
|
|
26755
|
+
{
|
|
26756
|
+
inputs: [],
|
|
26757
|
+
name: "Unauthorized",
|
|
26758
|
+
type: "error",
|
|
26759
|
+
},
|
|
26710
26760
|
{
|
|
26711
26761
|
anonymous: false,
|
|
26712
26762
|
inputs: [
|
|
@@ -26738,6 +26788,31 @@ const _abi$1 = [
|
|
|
26738
26788
|
name: "FeeTaken",
|
|
26739
26789
|
type: "event",
|
|
26740
26790
|
},
|
|
26791
|
+
{
|
|
26792
|
+
anonymous: false,
|
|
26793
|
+
inputs: [
|
|
26794
|
+
{
|
|
26795
|
+
indexed: true,
|
|
26796
|
+
internalType: "address",
|
|
26797
|
+
name: "feePayer",
|
|
26798
|
+
type: "address",
|
|
26799
|
+
},
|
|
26800
|
+
{
|
|
26801
|
+
indexed: true,
|
|
26802
|
+
internalType: "address",
|
|
26803
|
+
name: "feeRecipient",
|
|
26804
|
+
type: "address",
|
|
26805
|
+
},
|
|
26806
|
+
{
|
|
26807
|
+
indexed: false,
|
|
26808
|
+
internalType: "uint256",
|
|
26809
|
+
name: "feeAmount",
|
|
26810
|
+
type: "uint256",
|
|
26811
|
+
},
|
|
26812
|
+
],
|
|
26813
|
+
name: "FeeTaken",
|
|
26814
|
+
type: "event",
|
|
26815
|
+
},
|
|
26741
26816
|
{
|
|
26742
26817
|
anonymous: false,
|
|
26743
26818
|
inputs: [
|
|
@@ -26839,19 +26914,6 @@ const _abi$1 = [
|
|
|
26839
26914
|
name: "Unpaused",
|
|
26840
26915
|
type: "event",
|
|
26841
26916
|
},
|
|
26842
|
-
{
|
|
26843
|
-
inputs: [],
|
|
26844
|
-
name: "BASIS_POINT_PRECISION",
|
|
26845
|
-
outputs: [
|
|
26846
|
-
{
|
|
26847
|
-
internalType: "uint256",
|
|
26848
|
-
name: "",
|
|
26849
|
-
type: "uint256",
|
|
26850
|
-
},
|
|
26851
|
-
],
|
|
26852
|
-
stateMutability: "view",
|
|
26853
|
-
type: "function",
|
|
26854
|
-
},
|
|
26855
26917
|
{
|
|
26856
26918
|
inputs: [],
|
|
26857
26919
|
name: "DEFAULT_ADMIN_ROLE",
|
|
@@ -26865,64 +26927,12 @@ const _abi$1 = [
|
|
|
26865
26927
|
stateMutability: "view",
|
|
26866
26928
|
type: "function",
|
|
26867
26929
|
},
|
|
26868
|
-
{
|
|
26869
|
-
inputs: [],
|
|
26870
|
-
name: "FEE_BASIS_POINTS_MAXIMUM",
|
|
26871
|
-
outputs: [
|
|
26872
|
-
{
|
|
26873
|
-
internalType: "uint16",
|
|
26874
|
-
name: "",
|
|
26875
|
-
type: "uint16",
|
|
26876
|
-
},
|
|
26877
|
-
],
|
|
26878
|
-
stateMutability: "view",
|
|
26879
|
-
type: "function",
|
|
26880
|
-
},
|
|
26881
|
-
{
|
|
26882
|
-
inputs: [],
|
|
26883
|
-
name: "PAUSE",
|
|
26884
|
-
outputs: [
|
|
26885
|
-
{
|
|
26886
|
-
internalType: "bytes32",
|
|
26887
|
-
name: "",
|
|
26888
|
-
type: "bytes32",
|
|
26889
|
-
},
|
|
26890
|
-
],
|
|
26891
|
-
stateMutability: "view",
|
|
26892
|
-
type: "function",
|
|
26893
|
-
},
|
|
26894
|
-
{
|
|
26895
|
-
inputs: [],
|
|
26896
|
-
name: "UNPAUSE",
|
|
26897
|
-
outputs: [
|
|
26898
|
-
{
|
|
26899
|
-
internalType: "bytes32",
|
|
26900
|
-
name: "",
|
|
26901
|
-
type: "bytes32",
|
|
26902
|
-
},
|
|
26903
|
-
],
|
|
26904
|
-
stateMutability: "view",
|
|
26905
|
-
type: "function",
|
|
26906
|
-
},
|
|
26907
|
-
{
|
|
26908
|
-
inputs: [],
|
|
26909
|
-
name: "WITHDRAW",
|
|
26910
|
-
outputs: [
|
|
26911
|
-
{
|
|
26912
|
-
internalType: "bytes32",
|
|
26913
|
-
name: "",
|
|
26914
|
-
type: "bytes32",
|
|
26915
|
-
},
|
|
26916
|
-
],
|
|
26917
|
-
stateMutability: "view",
|
|
26918
|
-
type: "function",
|
|
26919
|
-
},
|
|
26920
26930
|
{
|
|
26921
26931
|
inputs: [
|
|
26922
26932
|
{
|
|
26923
26933
|
components: [
|
|
26924
26934
|
{
|
|
26925
|
-
internalType: "address",
|
|
26935
|
+
internalType: "address payable",
|
|
26926
26936
|
name: "recipient",
|
|
26927
26937
|
type: "address",
|
|
26928
26938
|
},
|
|
@@ -26995,7 +27005,7 @@ const _abi$1 = [
|
|
|
26995
27005
|
{
|
|
26996
27006
|
components: [
|
|
26997
27007
|
{
|
|
26998
|
-
internalType: "address",
|
|
27008
|
+
internalType: "address payable",
|
|
26999
27009
|
name: "recipient",
|
|
27000
27010
|
type: "address",
|
|
27001
27011
|
},
|
|
@@ -27053,7 +27063,7 @@ const _abi$1 = [
|
|
|
27053
27063
|
{
|
|
27054
27064
|
components: [
|
|
27055
27065
|
{
|
|
27056
|
-
internalType: "address",
|
|
27066
|
+
internalType: "address payable",
|
|
27057
27067
|
name: "recipient",
|
|
27058
27068
|
type: "address",
|
|
27059
27069
|
},
|
|
@@ -27126,7 +27136,7 @@ const _abi$1 = [
|
|
|
27126
27136
|
{
|
|
27127
27137
|
components: [
|
|
27128
27138
|
{
|
|
27129
|
-
internalType: "address",
|
|
27139
|
+
internalType: "address payable",
|
|
27130
27140
|
name: "recipient",
|
|
27131
27141
|
type: "address",
|
|
27132
27142
|
},
|
|
@@ -27360,22 +27370,22 @@ const _abi$1 = [
|
|
|
27360
27370
|
},
|
|
27361
27371
|
{
|
|
27362
27372
|
inputs: [],
|
|
27363
|
-
name: "
|
|
27364
|
-
outputs: [
|
|
27365
|
-
|
|
27366
|
-
internalType: "contract IV3SwapRouter",
|
|
27367
|
-
name: "",
|
|
27368
|
-
type: "address",
|
|
27369
|
-
},
|
|
27370
|
-
],
|
|
27371
|
-
stateMutability: "view",
|
|
27373
|
+
name: "unpause",
|
|
27374
|
+
outputs: [],
|
|
27375
|
+
stateMutability: "nonpayable",
|
|
27372
27376
|
type: "function",
|
|
27373
27377
|
},
|
|
27374
27378
|
{
|
|
27375
|
-
inputs: [
|
|
27376
|
-
|
|
27379
|
+
inputs: [
|
|
27380
|
+
{
|
|
27381
|
+
internalType: "uint256",
|
|
27382
|
+
name: "amountMinimum",
|
|
27383
|
+
type: "uint256",
|
|
27384
|
+
},
|
|
27385
|
+
],
|
|
27386
|
+
name: "unwrapNativeToken",
|
|
27377
27387
|
outputs: [],
|
|
27378
|
-
stateMutability: "
|
|
27388
|
+
stateMutability: "payable",
|
|
27379
27389
|
type: "function",
|
|
27380
27390
|
},
|
|
27381
27391
|
{
|
|
@@ -27396,8 +27406,12 @@ const _abi$1 = [
|
|
|
27396
27406
|
stateMutability: "nonpayable",
|
|
27397
27407
|
type: "function",
|
|
27398
27408
|
},
|
|
27409
|
+
{
|
|
27410
|
+
stateMutability: "payable",
|
|
27411
|
+
type: "receive",
|
|
27412
|
+
},
|
|
27399
27413
|
];
|
|
27400
|
-
const _bytecode$1 = "0x60806040523480156200001157600080fd5b506040516200278438038062002784833981016040819052620000349162000136565b6001805460ff191690556200004b60008362000078565b600180546001600160a01b0390921661010002610100600160a81b0319909216919091179055506200016e565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000115576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620000d43390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b80516001600160a01b03811681146200013157600080fd5b919050565b600080604083850312156200014a57600080fd5b620001558362000119565b9150620001656020840162000119565b90509250929050565b612606806200017e6000396000f3fe60806040526004361061013f5760003560e01c80635ae401dc116100b657806393751f631161006f57806393751f631461038c578063a217fddf146103b5578063ac9650d8146103ca578063d547741f146103ea578063d9a6f7051461040a578063e65fad971461042057600080fd5b80635ae401dc146102ae5780635c975abb146102ce578063735de9f7146102e65780638456cb59146103235780638f3914661461033857806391d148541461036c57600080fd5b80632f2ff15d116101085780632f2ff15d1461022057806336568abe14610240578063383ebb0b146102605780633f4ba83a146102735780635640f6591461028857806358e81a501461029b57600080fd5b80620fa9fb1461014457806301ffc9a714610166578063116944b21461019b57806316ba7197146101bc578063248a9ca3146101f0575b600080fd5b34801561015057600080fd5b5061016461015f366004611db4565b610454565b005b34801561017257600080fd5b50610186610181366004611ded565b61050d565b60405190151581526020015b60405180910390f35b6101ae6101a9366004611f85565b610544565b604051908152602001610192565b3480156101c857600080fd5b506101ae7f7a8dc26796a1e50e6e190b70259f58f6a4edd5b22280ceecc82b687b8e98286981565b3480156101fc57600080fd5b506101ae61020b366004611fda565b60009081526020819052604090206001015490565b34801561022c57600080fd5b5061016461023b366004611ff3565b610634565b34801561024c57600080fd5b5061016461025b366004611ff3565b610659565b6101ae61026e3660046120db565b6106dc565b34801561027f57600080fd5b5061016461084c565b6101ae6102963660046120db565b610889565b6101ae6102a9366004611f85565b61097f565b6102c16102bc366004612187565b610ad0565b6040516101929190612222565b3480156102da57600080fd5b5060015460ff16610186565b3480156102f257600080fd5b5060015461030b9061010090046001600160a01b031681565b6040516001600160a01b039091168152602001610192565b34801561032f57600080fd5b50610164610b1e565b34801561034457600080fd5b506101ae7fe7276a2a84d8de556657ec9cf93a55a7d66f096e529d0582ed08e9e2208b92b581565b34801561037857600080fd5b50610186610387366004611ff3565b610b59565b34801561039857600080fd5b506103a26103e881565b60405161ffff9091168152602001610192565b3480156103c157600080fd5b506101ae600081565b3480156103d657600080fd5b506102c16103e5366004612284565b610b82565b3480156103f657600080fd5b50610164610405366004611ff3565b610c76565b34801561041657600080fd5b506101ae61271081565b34801561042c57600080fd5b506101ae7ffcb9fcbfa83b897fb2d5cf4b58962164105c1e71489a37ef3ae0db3fdce576f681565b61047e7f7a8dc26796a1e50e6e190b70259f58f6a4edd5b22280ceecc82b687b8e98286933610b59565b61048757600080fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156104ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f291906122c5565b90506105086001600160a01b0383168483610c9b565b505050565b60006001600160e01b03198216637965db0b60e01b148061053e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006105b08260000151836080015184606001518787808060200260200160405190810160405280939291908181526020016000905b828210156105a657610597604083028601368190038101906122de565b8152602001906001019061057a565b5050505050610cfe565b60808301526001546040516304e45aaf60e01b81526101009091046001600160a01b0316906304e45aaf906105e9908590600401612335565b6020604051808303816000875af1158015610608573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062c91906122c5565b949350505050565b60008281526020819052604090206001015461064f81610dbf565b6105088383610dcc565b6001600160a01b03811633146106ce5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6106d88282610e50565b5050565b6000806106ec8360000151610eb5565b905060008061075783866060015187602001518a8a808060200260200160405190810160405280939291908181526020016000905b8282101561074d5761073e604083028601368190038101906122de565b81526020019060010190610721565b5050505050610ee3565b606087018190526001546040516304dc09a360e11b81529294509092506000916101009091046001600160a01b0316906309b813469061079b9089906004016123db565b6020604051808303816000875af11580156107ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107de91906122c5565b905061083e8482858b8b808060200260200160405190810160405280939291908181526020016000905b8282101561083457610825604083028601368190038101906122de565b81526020019060010190610808565b5050505050610f96565b9450505050505b9392505050565b6108767fe7276a2a84d8de556657ec9cf93a55a7d66f096e529d0582ed08e9e2208b92b533610b59565b61087f57600080fd5b610887610ff7565b565b6000806108998360000151611049565b90506108f781846040015185602001518888808060200260200160405190810160405280939291908181526020016000905b828210156105a6576108e8604083028601368190038101906122de565b815260200190600101906108cb565b604084810191909152600154905163b858183f60e01b81526101009091046001600160a01b03169063b858183f906109339086906004016123db565b6020604051808303816000875af1158015610952573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097691906122c5565b95945050505050565b60008060006109e484600001518560a0015186606001518989808060200260200160405190810160405280939291908181526020016000905b8282101561074d576109d5604083028601368190038101906122de565b815260200190600101906109b8565b60a08601819052600154604051635023b4df60e01b81529294509092506000916101009091046001600160a01b031690635023b4df90610a28908890600401612335565b6020604051808303816000875af1158015610a47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6b91906122c5565b9050610ac5856000015182858a8a808060200260200160405190810160405280939291908181526020016000905b8282101561083457610ab6604083028601368190038101906122de565b81526020019060010190610a99565b979650505050505050565b606083421115610b145760405162461bcd60e51b815260206004820152600f60248201526e111958591b1a5b99481c185cdcd959608a1b60448201526064016106c5565b61062c8383610b82565b610b487ffcb9fcbfa83b897fb2d5cf4b58962164105c1e71489a37ef3ae0db3fdce576f633610b59565b610b5157600080fd5b610887611055565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6060816001600160401b03811115610b9c57610b9c611e62565b604051908082528060200260200182016040528015610bcf57816020015b6060815260200190600190039081610bba5790505b50905060005b82811015610c6f57610c3f30858584818110610bf357610bf36123ee565b9050602002810190610c059190612404565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061109092505050565b828281518110610c5157610c516123ee565b60200260200101819052508080610c6790612460565b915050610bd5565b5092915050565b600082815260208190526040902060010154610c9181610dbf565b6105088383610e50565b6040516001600160a01b03831660248201526044810182905261050890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526110b5565b60006001600160a01b0383163314610d585760405162461bcd60e51b815260206004820181905260248201527f73776170526563697069656e74206d757374206265206d73672e73656e64657260448201526064016106c5565b60015460ff16610d9757610d6b8261118a565b50600080610d79868561123d565b9092509050610d888287612479565b9550610d948782611366565b50505b610dac6001600160a01b03861633308761146f565b610db685856114ad565b50919392505050565b610dc981336115aa565b50565b610dd68282610b59565b6106d8576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610e0c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610e5a8282610b59565b156106d8576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008060148351610ec69190612479565b90506000610ed684836014611603565b905061062c816000611710565b6000806001600160a01b0384163314610f3e5760405162461bcd60e51b815260206004820181905260248201527f73776170526563697069656e74206d757374206265206d73672e73656e64657260448201526064016106c5565b6000610f498461118a565b90506000610f598261271061248c565b9050610f688761271083611775565b9250610f7488846114ad565b610f896001600160a01b03891633308a61146f565b5094969095509350505050565b6000806000610fa5868561123d565b91509150610fb560015460ff1690565b610fc357610fc387826117b5565b610fed3383610fd28989612479565b610fdc9190612479565b6001600160a01b038a169190610c9b565b610ac5828761248c565b610fff6118bc565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600061053e8282611710565b61105d611905565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2583361102c565b606061084583836040518060600160405280602781526020016125aa6027913961194b565b600061110a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166119c39092919063ffffffff16565b905080516000148061112b57508080602001905181019061112b919061249f565b6105085760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106c5565b6000805b82518110156111d4578281815181106111a9576111a96123ee565b602002602001015160200151826111c0919061248c565b9150806111cc81612460565b91505061118e565b506103e88111156112385760405162461bcd60e51b815260206004820152602860248201527f5365636f6e6461727920666565203e204645455f42415349535f504f494e54536044820152675f4d4158494d554d60c01b60648201526084016106c5565b919050565b6000606082516001600160401b0381111561125a5761125a611e62565b60405190808252806020026020018201604052801561129f57816020015b60408051808201909152600080825260208201528152602001906001900390816112785790505b50905060005b835181101561135e5760006112e48583815181106112c5576112c56123ee565b602002602001015160200151612710886119d29092919063ffffffff16565b90506040518060400160405280868481518110611303576113036123ee565b6020026020010151600001516001600160a01b0316815260200182815250838381518110611333576113336123ee565b6020908102919091010152611348818561248c565b935050808061135690612460565b9150506112a5565b509250929050565b60005b8151811015610508576113cc33838381518110611388576113886123ee565b6020026020010151600001518484815181106113a6576113a66123ee565b602002602001015160200151866001600160a01b031661146f909392919063ffffffff16565b8181815181106113de576113de6123ee565b6020026020010151600001516001600160a01b0316336001600160a01b0316846001600160a01b03167f1f9a9fdac86b6ca3c5300bec0b61555cded1f1a234378602dcca6c27085eac8e85858151811061143a5761143a6123ee565b60200260200101516020015160405161145591815260200190565b60405180910390a48061146781612460565b915050611369565b6040516001600160a01b03808516602483015283166044820152606481018290526114a79085906323b872dd60e01b90608401610cc7565b50505050565b600154604051636eb1769f60e11b81523060048201526001600160a01b0361010090920482166024820152829184169063dd62ed3e90604401602060405180830381865afa158015611503573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061152791906122c5565b10156106d85760015460405163095ea7b360e01b81526101009091046001600160a01b039081166004830152600019602483015283169063095ea7b3906044016020604051808303816000875af1158015611586573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610508919061249f565b6115b48282610b59565b6106d8576115c181611a74565b6115cc836020611a86565b6040516020016115dd9291906124c1565b60408051601f198184030181529082905262461bcd60e51b82526106c591600401612536565b60608161161181601f61248c565b10156116505760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b60448201526064016106c5565b61165a828461248c565b8451101561169e5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b60448201526064016106c5565b6060821580156116bd5760405191506000825260208201604052611707565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156116f65780518352602092830192016116de565b5050858452601f01601f1916604052505b50949350505050565b600061171d82601461248c565b835110156117655760405162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b60448201526064016106c5565b500160200151600160601b900490565b60006117828484846119d2565b90506000828061179457611794612549565b84860911156108455760001981106117ab57600080fd5b6001019392505050565b60005b8151811015610508576118198282815181106117d6576117d66123ee565b6020026020010151600001518383815181106117f4576117f46123ee565b602002602001015160200151856001600160a01b0316610c9b9092919063ffffffff16565b81818151811061182b5761182b6123ee565b6020026020010151600001516001600160a01b0316336001600160a01b0316846001600160a01b03167f1f9a9fdac86b6ca3c5300bec0b61555cded1f1a234378602dcca6c27085eac8e858581518110611887576118876123ee565b6020026020010151602001516040516118a291815260200190565b60405180910390a4806118b481612460565b9150506117b8565b60015460ff166108875760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016106c5565b60015460ff16156108875760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106c5565b6060600080856001600160a01b031685604051611968919061255f565b600060405180830381855af49150503d80600081146119a3576040519150601f19603f3d011682016040523d82523d6000602084013e6119a8565b606091505b50915091506119b986838387611c21565b9695505050505050565b606061062c8484600085611c9a565b600083830281600019858709828110838203039150508084116119f457600080fd5b80600003611a0757508290049050610845565b6000848688096000868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b606061053e6001600160a01b03831660145b60606000611a9583600261257b565b611aa090600261248c565b6001600160401b03811115611ab757611ab7611e62565b6040519080825280601f01601f191660200182016040528015611ae1576020820181803683370190505b509050600360fc1b81600081518110611afc57611afc6123ee565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611b2b57611b2b6123ee565b60200101906001600160f81b031916908160001a9053506000611b4f84600261257b565b611b5a90600161248c565b90505b6001811115611bd2576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611b8e57611b8e6123ee565b1a60f81b828281518110611ba457611ba46123ee565b60200101906001600160f81b031916908160001a90535060049490941c93611bcb81612592565b9050611b5d565b5083156108455760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106c5565b60608315611c90578251600003611c89576001600160a01b0385163b611c895760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106c5565b508161062c565b61062c8383611d6a565b606082471015611cfb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106c5565b600080866001600160a01b03168587604051611d17919061255f565b60006040518083038185875af1925050503d8060008114611d54576040519150601f19603f3d011682016040523d82523d6000602084013e611d59565b606091505b5091509150610ac587838387611c21565b815115611d7a5781518083602001fd5b8060405162461bcd60e51b81526004016106c59190612536565b6001600160a01b0381168114610dc957600080fd5b803561123881611d94565b60008060408385031215611dc757600080fd5b8235611dd281611d94565b91506020830135611de281611d94565b809150509250929050565b600060208284031215611dff57600080fd5b81356001600160e01b03198116811461084557600080fd5b60008083601f840112611e2957600080fd5b5081356001600160401b03811115611e4057600080fd5b6020830191508360208260061b8501011115611e5b57600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b0381118282101715611e9a57611e9a611e62565b60405290565b604051608081016001600160401b0381118282101715611e9a57611e9a611e62565b604051601f8201601f191681016001600160401b0381118282101715611eea57611eea611e62565b604052919050565b600060e08284031215611f0457600080fd5b611f0c611e78565b90508135611f1981611d94565b81526020820135611f2981611d94565b6020820152604082013562ffffff81168114611f4457600080fd5b6040820152611f5560608301611da9565b60608201526080820135608082015260a082013560a0820152611f7a60c08301611da9565b60c082015292915050565b60008060006101008486031215611f9b57600080fd5b83356001600160401b03811115611fb157600080fd5b611fbd86828701611e17565b9094509250611fd190508560208601611ef2565b90509250925092565b600060208284031215611fec57600080fd5b5035919050565b6000806040838503121561200657600080fd5b823591506020830135611de281611d94565b60006080828403121561202a57600080fd5b612032611ea0565b905081356001600160401b038082111561204b57600080fd5b818401915084601f83011261205f57600080fd5b813560208282111561207357612073611e62565b612085601f8301601f19168201611ec2565b9250818352868183860101111561209b57600080fd5b818185018285013760008183850101528285526120b9818701611da9565b8186015250505050604082013560408201526060820135606082015292915050565b6000806000604084860312156120f057600080fd5b83356001600160401b038082111561210757600080fd5b61211387838801611e17565b9095509350602086013591508082111561212c57600080fd5b5061213986828701612018565b9150509250925092565b60008083601f84011261215557600080fd5b5081356001600160401b0381111561216c57600080fd5b6020830191508360208260051b8501011115611e5b57600080fd5b60008060006040848603121561219c57600080fd5b8335925060208401356001600160401b038111156121b957600080fd5b6121c586828701612143565b9497909650939450505050565b60005b838110156121ed5781810151838201526020016121d5565b50506000910152565b6000815180845261220e8160208601602086016121d2565b601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561227757603f198886030184526122658583516121f6565b94509285019290850190600101612249565b5092979650505050505050565b6000806020838503121561229757600080fd5b82356001600160401b038111156122ad57600080fd5b6122b985828601612143565b90969095509350505050565b6000602082840312156122d757600080fd5b5051919050565b6000604082840312156122f057600080fd5b604051604081018181106001600160401b038211171561231257612312611e62565b604052823561232081611d94565b81526020928301359281019290925250919050565b60e0810161053e828480516001600160a01b03908116835260208083015182169084015260408083015162ffffff16908401526060808301518216908401526080808301519084015260a0828101519084015260c09182015116910152565b60008151608084526123a960808501826121f6565b6020848101516001600160a01b0316908601526040808501519086015260609384015193909401929092525090919050565b6020815260006108456020830184612394565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261241b57600080fd5b8301803591506001600160401b0382111561243557600080fd5b602001915036819003821315611e5b57600080fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016124725761247261244a565b5060010190565b8181038181111561053e5761053e61244a565b8082018082111561053e5761053e61244a565b6000602082840312156124b157600080fd5b8151801515811461084557600080fd5b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516124f98160178501602088016121d2565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161252a8160288401602088016121d2565b01602801949350505050565b60208152600061084560208301846121f6565b634e487b7160e01b600052601260045260246000fd5b600082516125718184602087016121d2565b9190910192915050565b808202811582820484141761053e5761053e61244a565b6000816125a1576125a161244a565b50600019019056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220c75a7db1b170ff1ce6888f2940825a25db3ebb624d8b84bd3f2372ebae2de1d464736f6c63430008130033";
|
|
27414
|
+
const _bytecode$1 = "0x60806040523480156200001157600080fd5b506040516200310b3803806200310b83398101604081905262000034916200015c565b6001805460ff191690556200004b6000846200009e565b600180546001600160a01b039384166101008102610100600160a81b03199092169190911790915560038054929093166001600160a01b03199283161790925560028054909116909117905550620001a6565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166200013b576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620000fa3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b80516001600160a01b03811681146200015757600080fd5b919050565b6000806000606084860312156200017257600080fd5b6200017d846200013f565b92506200018d602085016200013f565b91506200019d604085016200013f565b90509250925092565b612f5580620001b66000396000f3fe60806040526004361061010c5760003560e01c806358e81a50116100955780638456cb59116100645780638456cb591461029957806391d14854146102ae578063a217fddf146102ce578063ac9650d8146102e3578063d547741f1461030357600080fd5b806358e81a501461023b5780635ae401dc1461024e5780635c975abb1461026e5780635ebca7991461028657600080fd5b80632f2ff15d116100dc5780632f2ff15d146101c057806336568abe146101e0578063383ebb0b146102005780633f4ba83a146102135780635640f6591461022857600080fd5b80620fa9fb1461011857806301ffc9a71461013a578063116944b21461016f578063248a9ca31461019057600080fd5b3661011357005b600080fd5b34801561012457600080fd5b5061013861013336600461270a565b610323565b005b34801561014657600080fd5b5061015a610155366004612743565b6103ef565b60405190151581526020015b60405180910390f35b61018261017d3660046128d4565b610426565b604051908152602001610166565b34801561019c57600080fd5b506101826101ab366004612929565b60009081526020819052604090206001015490565b3480156101cc57600080fd5b506101386101db366004612942565b6106ab565b3480156101ec57600080fd5b506101386101fb366004612942565b6106d0565b61018261020e366004612a2a565b610753565b34801561021f57600080fd5b50610138610ac2565b610182610236366004612a2a565b610b12565b6101826102493660046128d4565b610d90565b61026161025c366004612ad6565b6110c5565b6040516101669190612b71565b34801561027a57600080fd5b5060015460ff1661015a565b610138610294366004612929565b6110fa565b3480156102a557600080fd5b506101386112aa565b3480156102ba57600080fd5b5061015a6102c9366004612942565b6112f8565b3480156102da57600080fd5b50610182600081565b3480156102ef57600080fd5b506102616102fe366004612bd3565b611321565b34801561030f57600080fd5b5061013861031e366004612942565b611415565b61034d7f7a8dc26796a1e50e6e190b70259f58f6a4edd5b22280ceecc82b687b8e982869336112f8565b610369576040516282b42960e81b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156103b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103d49190612c14565b90506103ea6001600160a01b038316848361143a565b505050565b60006001600160e01b03198216637965db0b60e01b148061042057506301ffc9a760e01b6001600160e01b03198316145b92915050565b600061043460015460ff1690565b156104525760405163ab35696f60e01b815260040160405180910390fd5b60608201516001600160a01b0316331461047f5760405163519bdea760e01b815260040160405180910390fd5b4780156105bf57826080015181146104aa576040516342f7487960e11b815260040160405180910390fd5b60035483516001600160a01b039081169116146104da576040516324d0121760e01b815260040160405180910390fd5b61053a83608001518686808060200260200160405190810160405280939291908181526020016000905b828210156105305761052160408302860136819003810190612c2d565b81526020019060010190610504565b505050505061149d565b608084018190526001546040516304e45aaf60e01b81526101009091046001600160a01b0316916304e45aaf91610575908790600401612c84565b60206040518083038185885af1158015610593573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906105b89190612c14565b91506106a3565b610624836000015184608001518787808060200260200160405190810160405280939291908181526020016000905b8282101561061a5761060b60408302860136819003810190612c2d565b815260200190600101906105ee565b50505050506114ef565b60808401526001546040516304e45aaf60e01b81526101009091046001600160a01b0316906304e45aaf9061065d908690600401612c84565b6020604051808303816000875af115801561067c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a09190612c14565b91505b509392505050565b6000828152602081905260409020600101546106c68161154c565b6103ea8383611559565b6001600160a01b03811633146107455760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61074f82826115dd565b5050565b600061076160015460ff1690565b1561077f5760405163ab35696f60e01b815260040160405180910390fd5b60208201516001600160a01b031633146107ac5760405163519bdea760e01b815260040160405180910390fd5b60006107bb8360000151611642565b905047801561096d576003546001600160a01b038381169116146107f2576040516324d0121760e01b815260040160405180910390fd5b83606001518114610816576040516342f7487960e11b815260040160405180910390fd5b60008061087986606001518989808060200260200160405190810160405280939291908181526020016000905b8282101561086f5761086060408302860136819003810190612c2d565b81526020019060010190610843565b5050505050611670565b606088018190526001546040516304dc09a360e11b81529294509092506000916101009091046001600160a01b0316906309b813469084906108bf908b90600401612d2a565b60206040518083038185885af11580156108dd573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906109029190612c14565b905061096181848b8b808060200260200160405190810160405280939291908181526020016000905b828210156109575761094860408302860136819003810190612c2d565b8152602001906001019061092b565b50505050506116c3565b95505050505050610abb565b6000806109d18487606001518a8a808060200260200160405190810160405280939291908181526020016000905b828210156109c7576109b860408302860136819003810190612c2d565b8152602001906001019061099b565b50505050506117b7565b606088018190526001546040516304dc09a360e11b81529294509092506000916101009091046001600160a01b0316906309b8134690610a15908a90600401612d2a565b6020604051808303816000875af1158015610a34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a589190612c14565b90506109618582858c8c808060200260200160405190810160405280939291908181526020016000905b82821015610aae57610a9f60408302860136819003810190612c2d565b81526020019060010190610a82565b5050505050611811565b50505b9392505050565b610aec7fe7276a2a84d8de556657ec9cf93a55a7d66f096e529d0582ed08e9e2208b92b5336112f8565b610b08576040516282b42960e81b815260040160405180910390fd5b610b1061186d565b565b6000610b2060015460ff1690565b15610b3e5760405163ab35696f60e01b815260040160405180910390fd5b60208201516001600160a01b03163314610b6b5760405163519bdea760e01b815260040160405180910390fd5b6000610b7a83600001516118bf565b9050478015610cb05783604001518114610ba7576040516342f7487960e11b815260040160405180910390fd5b6003546001600160a01b03838116911614610bd5576040516324d0121760e01b815260040160405180910390fd5b610c2b84604001518787808060200260200160405190810160405280939291908181526020016000905b8282101561053057610c1c60408302860136819003810190612c2d565b81526020019060010190610bff565b6040858101829052600154905163b858183f60e01b81526101009091046001600160a01b03169163b858183f91610c66908890600401612d2a565b60206040518083038185885af1158015610c84573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610ca99190612c14565b9250610ab8565b610d078285604001518888808060200260200160405190810160405280939291908181526020016000905b8282101561061a57610cf860408302860136819003810190612c2d565b81526020019060010190610cdb565b604085810191909152600154905163b858183f60e01b81526101009091046001600160a01b03169063b858183f90610d43908790600401612d2a565b6020604051808303816000875af1158015610d62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d869190612c14565b9695505050505050565b6000610d9e60015460ff1690565b15610dbc5760405163ab35696f60e01b815260040160405180910390fd5b60608201516001600160a01b03163314610de95760405163519bdea760e01b815260040160405180910390fd5b478015610f865760035483516001600160a01b03908116911614610e20576040516324d0121760e01b815260040160405180910390fd5b8260a001518114610e44576040516342f7487960e11b815260040160405180910390fd5b600080610e9d8560a001518888808060200260200160405190810160405280939291908181526020016000905b8282101561086f57610e8e60408302860136819003810190612c2d565b81526020019060010190610e71565b60a08701819052600154604051635023b4df60e01b81529294509092506000916101009091046001600160a01b031690635023b4df908490610ee3908a90600401612c84565b60206040518083038185885af1158015610f01573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f269190612c14565b9050610f7b81848a8a808060200260200160405190810160405280939291908181526020016000905b8282101561095757610f6c60408302860136819003810190612c2d565b81526020019060010190610f4f565b945050505050610abb565b600080610fe485600001518660a001518989808060200260200160405190810160405280939291908181526020016000905b828210156109c757610fd560408302860136819003810190612c2d565b81526020019060010190610fb8565b60a08701819052600154604051635023b4df60e01b81529294509092506000916101009091046001600160a01b031690635023b4df90611028908990600401612c84565b6020604051808303816000875af1158015611047573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106b9190612c14565b9050610f7b866000015182858b8b808060200260200160405190810160405280939291908181526020016000905b82821015610aae576110b660408302860136819003810190612c2d565b81526020019060010190611099565b6060834211156110e85760405163387b2e5560e11b815260040160405180910390fd5b6110f28383611321565b949350505050565b6003546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611143573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111679190612c14565b9050818110156111ad5760405162461bcd60e51b8152602060048201526011602482015270092dce6eaccccd2c6d2cadce840ae929ab607b1b604482015260640161073c565b801561074f57600354604051632e1a7d4d60e01b8152600481018390526001600160a01b0390911690632e1a7d4d90602401600060405180830381600087803b1580156111f957600080fd5b505af115801561120d573d6000803e3d6000fd5b50506040805160008082526020820192839052935033925084916112319190612d3d565b60006040518083038185875af1925050503d806000811461126e576040519150601f19603f3d011682016040523d82523d6000602084013e611273565b606091505b50509050806103ea5760405162461bcd60e51b815260206004820152600360248201526253544560e81b604482015260640161073c565b6112d47ffcb9fcbfa83b897fb2d5cf4b58962164105c1e71489a37ef3ae0db3fdce576f6336112f8565b6112f0576040516282b42960e81b815260040160405180910390fd5b610b106118cb565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6060816001600160401b0381111561133b5761133b6127b1565b60405190808252806020026020018201604052801561136e57816020015b60608152602001906001900390816113595790505b50905060005b8281101561140e576113de3085858481811061139257611392612d59565b90506020028101906113a49190612d6f565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061190692505050565b8282815181106113f0576113f0612d59565b6020026020010181905250808061140690612dcb565b915050611374565b5092915050565b6000828152602081905260409020600101546114308161154c565b6103ea83836115dd565b6040516001600160a01b0383166024820152604481018290526103ea90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261192b565b60006114a882611a00565b506000806114b68585611a73565b90925090506114c58286612de4565b94506114d081611b9c565b6003546114e6906001600160a01b031686611cc6565b50929392505050565b60006114fa82611a00565b506000806115088585611a73565b90925090506115178286612de4565b94506115238682611dc3565b6115386001600160a01b038716333088611ecc565b6115428686611cc6565b5092949350505050565b6115568133611f0a565b50565b61156382826112f8565b61074f576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556115993390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6115e782826112f8565b1561074f576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600080601483516116539190612de4565b9050600061166384836014611f63565b90506110f2816000612070565b600080600061167e84611a00565b9050600061168e82612710612df7565b905061169d86612710836120d5565b6003549093506116b6906001600160a01b031684611cc6565b85935050505b9250929050565b60008060006116d28685611a73565b915091506116df81611b9c565b600260009054906101000a90046001600160a01b03166001600160a01b03166312210e8a6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561172f57600080fd5b505af1158015611743573d6000803e3d6000fd5b5050505060008287876117569190612de4565b6117609190612de4565b604051909150600090339083156108fc0290849084818181858888f193505050509050806117a1576040516382e4f46960e01b815260040160405180910390fd5b6117ab8489612df7565b98975050505050505050565b60008060006117c584611a00565b905060006117d582612710612df7565b90506117e486612710836120d5565b92506117f08784611cc6565b6118056001600160a01b038816333089611ecc565b50939590945092505050565b60008060006118208685611a73565b9150915061182e8782612115565b611858338361183d8989612de4565b6118479190612de4565b6001600160a01b038a16919061143a565b6118628287612df7565b979650505050505050565b61187561221c565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60006104208282612070565b6118d3612265565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258336118a2565b6060610abb8383604051806060016040528060278152602001612ef9602791396122ab565b6000611980826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166123199092919063ffffffff16565b90508051600014806119a15750808060200190518101906119a19190612e0a565b6103ea5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161073c565b6000805b8251811015611a4a57828181518110611a1f57611a1f612d59565b60200260200101516020015182611a369190612df7565b915080611a4281612dcb565b915050611a04565b506103e8811115611a6e5760405163cd4e616760e01b815260040160405180910390fd5b919050565b6000606082516001600160401b03811115611a9057611a906127b1565b604051908082528060200260200182016040528015611ad557816020015b6040805180820190915260008082526020820152815260200190600190039081611aae5790505b50905060005b8351811015611b94576000611b1a858381518110611afb57611afb612d59565b602002602001015160200151612710886123289092919063ffffffff16565b90506040518060400160405280868481518110611b3957611b39612d59565b6020026020010151600001516001600160a01b0316815260200182815250838381518110611b6957611b69612d59565b6020908102919091010152611b7e8185612df7565b9350508080611b8c90612dcb565b915050611adb565b509250929050565b60005b815181101561074f576000828281518110611bbc57611bbc612d59565b6020026020010151600001516001600160a01b03166108fc848481518110611be657611be6612d59565b6020026020010151602001519081150290604051600060405180830381858888f19350505050905080611c2c5760405163647373e960e11b815260040160405180910390fd5b828281518110611c3e57611c3e612d59565b6020026020010151600001516001600160a01b0316336001600160a01b03167fe0e765ab26c1caf691c510426951246128b96830e49cc81d8c093fd551abac35858581518110611c9057611c90612d59565b602002602001015160200151604051611cab91815260200190565b60405180910390a35080611cbe81612dcb565b915050611b9f565b600154604051636eb1769f60e11b81523060048201526001600160a01b0361010090920482166024820152829184169063dd62ed3e90604401602060405180830381865afa158015611d1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d409190612c14565b101561074f5760015460405163095ea7b360e01b81526101009091046001600160a01b039081166004830152600019602483015283169063095ea7b3906044016020604051808303816000875af1158015611d9f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ea9190612e0a565b60005b81518110156103ea57611e2933838381518110611de557611de5612d59565b602002602001015160000151848481518110611e0357611e03612d59565b602002602001015160200151866001600160a01b0316611ecc909392919063ffffffff16565b818181518110611e3b57611e3b612d59565b6020026020010151600001516001600160a01b0316336001600160a01b0316846001600160a01b03167f1f9a9fdac86b6ca3c5300bec0b61555cded1f1a234378602dcca6c27085eac8e858581518110611e9757611e97612d59565b602002602001015160200151604051611eb291815260200190565b60405180910390a480611ec481612dcb565b915050611dc6565b6040516001600160a01b0380851660248301528316604482015260648101829052611f049085906323b872dd60e01b90608401611466565b50505050565b611f1482826112f8565b61074f57611f21816123ca565b611f2c8360206123dc565b604051602001611f3d929190612e2c565b60408051601f198184030181529082905262461bcd60e51b825261073c91600401612ea1565b606081611f7181601f612df7565b1015611fb05760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b604482015260640161073c565b611fba8284612df7565b84511015611ffe5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b604482015260640161073c565b60608215801561201d5760405191506000825260208201604052612067565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561205657805183526020928301920161203e565b5050858452601f01601f1916604052505b50949350505050565b600061207d826014612df7565b835110156120c55760405162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b604482015260640161073c565b500160200151600160601b900490565b60006120e2848484612328565b9050600082806120f4576120f4612eb4565b8486091115610abb57600019811061210b57600080fd5b6001019392505050565b60005b81518110156103ea5761217982828151811061213657612136612d59565b60200260200101516000015183838151811061215457612154612d59565b602002602001015160200151856001600160a01b031661143a9092919063ffffffff16565b81818151811061218b5761218b612d59565b6020026020010151600001516001600160a01b0316336001600160a01b0316846001600160a01b03167f1f9a9fdac86b6ca3c5300bec0b61555cded1f1a234378602dcca6c27085eac8e8585815181106121e7576121e7612d59565b60200260200101516020015160405161220291815260200190565b60405180910390a48061221481612dcb565b915050612118565b60015460ff16610b105760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161073c565b60015460ff1615610b105760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161073c565b6060600080856001600160a01b0316856040516122c89190612d3d565b600060405180830381855af49150503d8060008114612303576040519150601f19603f3d011682016040523d82523d6000602084013e612308565b606091505b5091509150610d8686838387612577565b60606110f284846000856125f0565b6000838302816000198587098281108382030391505080841161234a57600080fd5b8060000361235d57508290049050610abb565b6000848688096000868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b60606104206001600160a01b03831660145b606060006123eb836002612eca565b6123f6906002612df7565b6001600160401b0381111561240d5761240d6127b1565b6040519080825280601f01601f191660200182016040528015612437576020820181803683370190505b509050600360fc1b8160008151811061245257612452612d59565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061248157612481612d59565b60200101906001600160f81b031916908160001a90535060006124a5846002612eca565b6124b0906001612df7565b90505b6001811115612528576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106124e4576124e4612d59565b1a60f81b8282815181106124fa576124fa612d59565b60200101906001600160f81b031916908160001a90535060049490941c9361252181612ee1565b90506124b3565b508315610abb5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161073c565b606083156125e65782516000036125df576001600160a01b0385163b6125df5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161073c565b50816110f2565b6110f283836126c0565b6060824710156126515760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161073c565b600080866001600160a01b0316858760405161266d9190612d3d565b60006040518083038185875af1925050503d80600081146126aa576040519150601f19603f3d011682016040523d82523d6000602084013e6126af565b606091505b509150915061186287838387612577565b8151156126d05781518083602001fd5b8060405162461bcd60e51b815260040161073c9190612ea1565b6001600160a01b038116811461155657600080fd5b8035611a6e816126ea565b6000806040838503121561271d57600080fd5b8235612728816126ea565b91506020830135612738816126ea565b809150509250929050565b60006020828403121561275557600080fd5b81356001600160e01b031981168114610abb57600080fd5b60008083601f84011261277f57600080fd5b5081356001600160401b0381111561279657600080fd5b6020830191508360208260061b85010111156116bc57600080fd5b634e487b7160e01b600052604160045260246000fd5b60405160e081016001600160401b03811182821017156127e9576127e96127b1565b60405290565b604051608081016001600160401b03811182821017156127e9576127e96127b1565b604051601f8201601f191681016001600160401b0381118282101715612839576128396127b1565b604052919050565b600060e0828403121561285357600080fd5b61285b6127c7565b90508135612868816126ea565b81526020820135612878816126ea565b6020820152604082013562ffffff8116811461289357600080fd5b60408201526128a4606083016126ff565b60608201526080820135608082015260a082013560a08201526128c960c083016126ff565b60c082015292915050565b600080600061010084860312156128ea57600080fd5b83356001600160401b0381111561290057600080fd5b61290c8682870161276d565b909450925061292090508560208601612841565b90509250925092565b60006020828403121561293b57600080fd5b5035919050565b6000806040838503121561295557600080fd5b823591506020830135612738816126ea565b60006080828403121561297957600080fd5b6129816127ef565b905081356001600160401b038082111561299a57600080fd5b818401915084601f8301126129ae57600080fd5b81356020828211156129c2576129c26127b1565b6129d4601f8301601f19168201612811565b925081835286818386010111156129ea57600080fd5b81818501828501376000818385010152828552612a088187016126ff565b8186015250505050604082013560408201526060820135606082015292915050565b600080600060408486031215612a3f57600080fd5b83356001600160401b0380821115612a5657600080fd5b612a628783880161276d565b90955093506020860135915080821115612a7b57600080fd5b50612a8886828701612967565b9150509250925092565b60008083601f840112612aa457600080fd5b5081356001600160401b03811115612abb57600080fd5b6020830191508360208260051b85010111156116bc57600080fd5b600080600060408486031215612aeb57600080fd5b8335925060208401356001600160401b03811115612b0857600080fd5b612b1486828701612a92565b9497909650939450505050565b60005b83811015612b3c578181015183820152602001612b24565b50506000910152565b60008151808452612b5d816020860160208601612b21565b601f01601f19169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015612bc657603f19888603018452612bb4858351612b45565b94509285019290850190600101612b98565b5092979650505050505050565b60008060208385031215612be657600080fd5b82356001600160401b03811115612bfc57600080fd5b612c0885828601612a92565b90969095509350505050565b600060208284031215612c2657600080fd5b5051919050565b600060408284031215612c3f57600080fd5b604051604081018181106001600160401b0382111715612c6157612c616127b1565b6040528235612c6f816126ea565b81526020928301359281019290925250919050565b60e08101610420828480516001600160a01b03908116835260208083015182169084015260408083015162ffffff16908401526060808301518216908401526080808301519084015260a0828101519084015260c09182015116910152565b6000815160808452612cf86080850182612b45565b6020848101516001600160a01b0316908601526040808501519086015260609384015193909401929092525090919050565b602081526000610abb6020830184612ce3565b60008251612d4f818460208701612b21565b9190910192915050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e19843603018112612d8657600080fd5b8301803591506001600160401b03821115612da057600080fd5b6020019150368190038213156116bc57600080fd5b634e487b7160e01b600052601160045260246000fd5b600060018201612ddd57612ddd612db5565b5060010190565b8181038181111561042057610420612db5565b8082018082111561042057610420612db5565b600060208284031215612e1c57600080fd5b81518015158114610abb57600080fd5b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612e64816017850160208801612b21565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612e95816028840160208801612b21565b01602801949350505050565b602081526000610abb6020830184612b45565b634e487b7160e01b600052601260045260246000fd5b808202811582820484141761042057610420612db5565b600081612ef057612ef0612db5565b50600019019056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220eff696b5535ea5759815da07da267901ad15855b143752622fa478891337f65c64736f6c63430008130033";
|
|
27401
27415
|
const isSuperArgs$1 = (xs) => xs.length > 1;
|
|
27402
27416
|
class SecondaryFee__factory extends ethers.ContractFactory {
|
|
27403
27417
|
constructor(...args) {
|
|
@@ -27408,11 +27422,11 @@ class SecondaryFee__factory extends ethers.ContractFactory {
|
|
|
27408
27422
|
super(_abi$1, _bytecode$1, args[0]);
|
|
27409
27423
|
}
|
|
27410
27424
|
}
|
|
27411
|
-
deploy(_admin, _uniRouter, overrides) {
|
|
27412
|
-
return super.deploy(_admin, _uniRouter, overrides || {});
|
|
27425
|
+
deploy(_admin, _uniRouter, _wimx, overrides) {
|
|
27426
|
+
return super.deploy(_admin, _uniRouter, _wimx, overrides || {});
|
|
27413
27427
|
}
|
|
27414
|
-
getDeployTransaction(_admin, _uniRouter, overrides) {
|
|
27415
|
-
return super.getDeployTransaction(_admin, _uniRouter, overrides || {});
|
|
27428
|
+
getDeployTransaction(_admin, _uniRouter, _wimx, overrides) {
|
|
27429
|
+
return super.getDeployTransaction(_admin, _uniRouter, _wimx, overrides || {});
|
|
27416
27430
|
}
|
|
27417
27431
|
attach(address) {
|
|
27418
27432
|
return super.attach(address);
|
|
@@ -29191,25 +29205,24 @@ class Fees {
|
|
|
29191
29205
|
}
|
|
29192
29206
|
|
|
29193
29207
|
const IMMUTABLE_TESTNET_RPC_URL = 'https://rpc.testnet.immutable.com';
|
|
29194
|
-
const IMMUTABLE_TESTNET_CHAIN_ID =
|
|
29195
|
-
|
|
29208
|
+
const IMMUTABLE_TESTNET_CHAIN_ID = 13473;
|
|
29209
|
+
|
|
29210
|
+
const NATIVE_IMX_IMMUTABLE_TESTNET = {
|
|
29196
29211
|
chainId: IMMUTABLE_TESTNET_CHAIN_ID,
|
|
29197
|
-
address: '0x0000000000000000000000000000000000001010',
|
|
29198
29212
|
decimals: 18,
|
|
29199
29213
|
symbol: 'tIMX',
|
|
29200
29214
|
name: 'Immutable Testnet Token',
|
|
29201
|
-
type: '
|
|
29215
|
+
type: 'native',
|
|
29202
29216
|
};
|
|
29203
29217
|
const WIMX_IMMUTABLE_TESTNET = {
|
|
29204
29218
|
chainId: IMMUTABLE_TESTNET_CHAIN_ID,
|
|
29205
|
-
address: '
|
|
29219
|
+
address: '0x1CcCa691501174B4A623CeDA58cC8f1a76dc3439',
|
|
29206
29220
|
decimals: 18,
|
|
29207
29221
|
symbol: 'WIMX',
|
|
29208
29222
|
name: 'Wrapped Immutable Testnet Token',
|
|
29209
29223
|
type: 'erc20',
|
|
29210
29224
|
};
|
|
29211
29225
|
const IMMUTABLE_TESTNET_COMMON_ROUTING_TOKENS = [
|
|
29212
|
-
TIMX_IMMUTABLE_TESTNET,
|
|
29213
29226
|
WIMX_IMMUTABLE_TESTNET,
|
|
29214
29227
|
];
|
|
29215
29228
|
|
|
@@ -29255,7 +29268,7 @@ function buildSinglePoolSwap(tokenIn, tokenOut, recipient, trade, route, amountI
|
|
|
29255
29268
|
}
|
|
29256
29269
|
return calldatas;
|
|
29257
29270
|
}
|
|
29258
|
-
function buildSinglePoolSwapWithFees(recipient, trade, route, amountIn, amountOut, secondaryFees, secondaryFeeContract) {
|
|
29271
|
+
function buildSinglePoolSwapWithFees(recipient, trade, route, amountIn, amountOut, secondaryFees, secondaryFeeContract, tokenOut) {
|
|
29259
29272
|
const secondaryFeeValues = secondaryFees.map((fee) => ({
|
|
29260
29273
|
feeBasisPoints: fee.basisPoints,
|
|
29261
29274
|
recipient: fee.recipient,
|
|
@@ -29289,7 +29302,11 @@ function buildSinglePoolSwapWithFees(recipient, trade, route, amountIn, amountOu
|
|
|
29289
29302
|
},
|
|
29290
29303
|
]));
|
|
29291
29304
|
}
|
|
29292
|
-
|
|
29305
|
+
const shouldUnwrapTokens = isNative(tokenOut);
|
|
29306
|
+
if (shouldUnwrapTokens) {
|
|
29307
|
+
// Unwrap the output token if the user specified a native token as the output
|
|
29308
|
+
calldatas.push(secondaryFeeContract.encodeFunctionData('unwrapNativeToken', [amountOut]));
|
|
29309
|
+
}
|
|
29293
29310
|
return calldatas;
|
|
29294
29311
|
}
|
|
29295
29312
|
function buildMultiPoolSwap(tokenIn, tokenOut, recipient, trade, route, amountIn, amountOut, routerContract, paymentsContract) {
|
|
@@ -29327,7 +29344,7 @@ function buildMultiPoolSwap(tokenIn, tokenOut, recipient, trade, route, amountIn
|
|
|
29327
29344
|
}
|
|
29328
29345
|
return calldatas;
|
|
29329
29346
|
}
|
|
29330
|
-
function buildMultiPoolSwapWithFees(recipient, trade, route, amountIn, amountOut, secondaryFees, secondaryFeeContract) {
|
|
29347
|
+
function buildMultiPoolSwapWithFees(recipient, trade, route, amountIn, amountOut, secondaryFees, secondaryFeeContract, tokenOut) {
|
|
29331
29348
|
const path = v3Sdk.encodeRouteToPath(route, trade.tradeType === Uniswap__namespace.TradeType.EXACT_OUTPUT);
|
|
29332
29349
|
const secondaryFeeValues = secondaryFees.map((fee) => ({
|
|
29333
29350
|
feeBasisPoints: fee.basisPoints,
|
|
@@ -29356,7 +29373,11 @@ function buildMultiPoolSwapWithFees(recipient, trade, route, amountIn, amountOut
|
|
|
29356
29373
|
},
|
|
29357
29374
|
]));
|
|
29358
29375
|
}
|
|
29359
|
-
|
|
29376
|
+
const shouldUnwrapTokens = isNative(tokenOut);
|
|
29377
|
+
if (shouldUnwrapTokens) {
|
|
29378
|
+
// Unwrap the output token if the user specified a native token as the output
|
|
29379
|
+
calldatas.push(secondaryFeeContract.encodeFunctionData('unwrapNativeToken', [amountOut]));
|
|
29380
|
+
}
|
|
29360
29381
|
return calldatas;
|
|
29361
29382
|
}
|
|
29362
29383
|
/**
|
|
@@ -29381,12 +29402,12 @@ function buildSwapParameters(tokenIn, tokenOut, recipient, trade, secondaryFees,
|
|
|
29381
29402
|
const hasSecondaryFees = secondaryFees.length > 0;
|
|
29382
29403
|
if (isSinglePoolSwap) {
|
|
29383
29404
|
if (hasSecondaryFees) {
|
|
29384
|
-
return buildSinglePoolSwapWithFees(recipient, trade, route, maximumAmountIn, minimumAmountOut, secondaryFees, secondaryFeeContract);
|
|
29405
|
+
return buildSinglePoolSwapWithFees(recipient, trade, route, maximumAmountIn, minimumAmountOut, secondaryFees, secondaryFeeContract, tokenOut);
|
|
29385
29406
|
}
|
|
29386
29407
|
return buildSinglePoolSwap(tokenIn, tokenOut, recipient, trade, route, maximumAmountIn, minimumAmountOut, routerContract, paymentsContract);
|
|
29387
29408
|
}
|
|
29388
29409
|
if (hasSecondaryFees) {
|
|
29389
|
-
return buildMultiPoolSwapWithFees(recipient, trade, route, maximumAmountIn, minimumAmountOut, secondaryFees, secondaryFeeContract);
|
|
29410
|
+
return buildMultiPoolSwapWithFees(recipient, trade, route, maximumAmountIn, minimumAmountOut, secondaryFees, secondaryFeeContract, tokenOut);
|
|
29390
29411
|
}
|
|
29391
29412
|
return buildMultiPoolSwap(tokenIn, tokenOut, recipient, trade, route, maximumAmountIn, minimumAmountOut, routerContract, paymentsContract);
|
|
29392
29413
|
}
|
|
@@ -29426,8 +29447,18 @@ function createSwapParameters(tokenIn, tokenOut, adjustedQuote, fromAddress, sli
|
|
|
29426
29447
|
};
|
|
29427
29448
|
}
|
|
29428
29449
|
const getTransactionValue = (tokenIn, maximumAmountIn) => tokenIn.type === 'native' ? maximumAmountIn : zeroNativeCurrencyValue;
|
|
29450
|
+
const getSwapRecipient = (tokenOut, fromAddress, routerContractAddress, secondaryFeesContractAddress, secondaryFees) => {
|
|
29451
|
+
// Not native so send the tokens directly back to the caller.
|
|
29452
|
+
if (!isNative(tokenOut))
|
|
29453
|
+
return fromAddress;
|
|
29454
|
+
// Native but no fees, send to the Uniswap Router
|
|
29455
|
+
if (secondaryFees.length === 0)
|
|
29456
|
+
return routerContractAddress;
|
|
29457
|
+
// Native and fees, send to the secondary fee contract
|
|
29458
|
+
return secondaryFeesContractAddress;
|
|
29459
|
+
};
|
|
29429
29460
|
function getSwap(tokenIn, tokenOut, adjustedQuote, fromAddress, slippage, deadline, routerContractAddress, secondaryFeesContractAddress, gasPrice, secondaryFees) {
|
|
29430
|
-
const swapRecipient =
|
|
29461
|
+
const swapRecipient = getSwapRecipient(tokenOut, fromAddress, routerContractAddress, secondaryFeesContractAddress, secondaryFees);
|
|
29431
29462
|
const { calldata, maximumAmountIn } = createSwapParameters(tokenIn, tokenOut, adjustedQuote, swapRecipient, slippage, deadline, secondaryFees);
|
|
29432
29463
|
// TODO: Add additional gas fee estimates for secondary fees
|
|
29433
29464
|
const gasFeeEstimate = gasPrice ? calculateGasFee(gasPrice, adjustedQuote.gasEstimate) : null;
|
|
@@ -29476,11 +29507,11 @@ function adjustQuoteWithFees(ourQuote, amountSpecified, fees, nativeTokenService
|
|
|
29476
29507
|
|
|
29477
29508
|
const CONTRACTS_FOR_CHAIN_ID = {
|
|
29478
29509
|
[IMMUTABLE_TESTNET_CHAIN_ID]: {
|
|
29479
|
-
multicall: '
|
|
29480
|
-
coreFactory: '
|
|
29481
|
-
quoterV2: '
|
|
29482
|
-
peripheryRouter: '
|
|
29483
|
-
secondaryFee: '
|
|
29510
|
+
multicall: '0x4DB567A44451b27C1fAd7f52e1cDf64b915d62f9',
|
|
29511
|
+
coreFactory: '0xb18c44b211065E69844FbA9AE146DA362104AfBf',
|
|
29512
|
+
quoterV2: '0x87854A7D4b9BaC3D37f4516A1Ac7F36fB5ad539f',
|
|
29513
|
+
peripheryRouter: '0x786ec643F231960D4C1A4E336990F8E7bF8f1277',
|
|
29514
|
+
secondaryFee: '0x1938B5B8313E1b64C2c577491Ef5441f9eD33204',
|
|
29484
29515
|
},
|
|
29485
29516
|
};
|
|
29486
29517
|
const SUPPORTED_SANDBOX_CHAINS = {
|
|
@@ -29489,8 +29520,8 @@ const SUPPORTED_SANDBOX_CHAINS = {
|
|
|
29489
29520
|
rpcUrl: IMMUTABLE_TESTNET_RPC_URL,
|
|
29490
29521
|
contracts: CONTRACTS_FOR_CHAIN_ID[IMMUTABLE_TESTNET_CHAIN_ID],
|
|
29491
29522
|
commonRoutingTokens: IMMUTABLE_TESTNET_COMMON_ROUTING_TOKENS,
|
|
29492
|
-
nativeToken:
|
|
29493
|
-
wrappedNativeToken:
|
|
29523
|
+
nativeToken: NATIVE_IMX_IMMUTABLE_TESTNET,
|
|
29524
|
+
wrappedNativeToken: WIMX_IMMUTABLE_TESTNET,
|
|
29494
29525
|
},
|
|
29495
29526
|
};
|
|
29496
29527
|
const SUPPORTED_PRODUCTION_CHAINS = {};
|
|
@@ -29832,7 +29863,7 @@ var WidgetTheme;
|
|
|
29832
29863
|
var ChainId;
|
|
29833
29864
|
(function (ChainId) {
|
|
29834
29865
|
ChainId[ChainId["IMTBL_ZKEVM_MAINNET"] = 13371] = "IMTBL_ZKEVM_MAINNET";
|
|
29835
|
-
ChainId[ChainId["IMTBL_ZKEVM_TESTNET"] =
|
|
29866
|
+
ChainId[ChainId["IMTBL_ZKEVM_TESTNET"] = 13473] = "IMTBL_ZKEVM_TESTNET";
|
|
29836
29867
|
ChainId[ChainId["IMTBL_ZKEVM_DEVNET"] = 13433] = "IMTBL_ZKEVM_DEVNET";
|
|
29837
29868
|
ChainId[ChainId["ETHEREUM"] = 1] = "ETHEREUM";
|
|
29838
29869
|
ChainId[ChainId["SEPOLIA"] = 11155111] = "SEPOLIA";
|
|
@@ -30693,9 +30724,9 @@ class CheckoutConfiguration {
|
|
|
30693
30724
|
this.environment = config.baseConfig.environment;
|
|
30694
30725
|
// Developer mode will super set any environment configuration
|
|
30695
30726
|
this.isProduction = !this.isDevelopment && this.environment === Environment$1.PRODUCTION;
|
|
30696
|
-
this.isOnRampEnabled = config.
|
|
30697
|
-
this.isSwapEnabled = config.
|
|
30698
|
-
this.isBridgeEnabled = config.
|
|
30727
|
+
this.isOnRampEnabled = config.onRamp?.enable ?? DEFAULT_ON_RAMP_ENABLED;
|
|
30728
|
+
this.isSwapEnabled = config.swap?.enable ?? DEFAULT_SWAP_ENABLED;
|
|
30729
|
+
this.isBridgeEnabled = config.bridge?.enable ?? DEFAULT_BRIDGE_ENABLED;
|
|
30699
30730
|
this.networkMap = networkMap(this.isProduction, this.isDevelopment);
|
|
30700
30731
|
this.remote = new RemoteConfigFetcher({
|
|
30701
30732
|
isDevelopment: this.isDevelopment,
|
|
@@ -34022,7 +34053,7 @@ async function getItemRequirementsFromRequirements(provider, requirements) {
|
|
|
34022
34053
|
return itemRequirements;
|
|
34023
34054
|
}
|
|
34024
34055
|
|
|
34025
|
-
const SDK_VERSION_MARKER = '0.
|
|
34056
|
+
const SDK_VERSION_MARKER = '0.31.0';
|
|
34026
34057
|
// This SDK version is replaced by the `yarn build` command ran on the root level
|
|
34027
34058
|
const globalPackageVersion = () => SDK_VERSION_MARKER;
|
|
34028
34059
|
|