├── README.md ├── index-proxy.js └── index.js /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Auto Daily Plaza Finance Bot 3 | 4 | Register : https://testnet.plaza.finance/rewards/a0MndhdkWSCb 5 | 6 | This script automates interactions with Plaza Finance's faucet, ensuring unlimited spending for the wstETH token, swapping 80% of wstETH to bondETH, 10% to leverage tokens, creating Bond and Leverage tokens, and redeeming a portion of those tokens. It processes multiple wallets in a cycle, with a delay of 6 hours after all wallets are processed. 7 | 8 | ## Features 9 | - Claims faucet tokens. 10 | - Swaps 80% of wstETH to bondETH and 10% to Leverage tokens. 11 | - Creates Bond and Leverage tokens. 12 | - Redeems 50% of Bond and Leverage tokens' balance. 13 | - Claims USDC coupon. 14 | - Supports proxy usage for wallet interaction. 15 | - Repeats the entire cycle every 6 hours. 16 | 17 | ## Requirements 18 | - Node.js 19 | - `web3`, `axios`, `chalk`, `fs`, `https-proxy-agent` 20 | 21 | Install the required Node.js modules: 22 | 23 | ```bash 24 | npm install web3@1.8.0 axios chalk@2 fs https-proxy-agent 25 | ``` 26 | 27 | ## Setup 28 | 29 | 1. Add your private keys to the `private_keys.txt` file, with one private key per line. Ensure each key is exactly 64 characters (without 0x). 30 | 2. If you want to use proxies, add your proxy IPs to the `proxies.txt` file. The number of proxies should match the number of private keys. 31 | 32 | ### Proxy Format 33 | Each line in the `proxies.txt` file should contain a proxy in the following format: 34 | 35 | ``` 36 | : 37 | ``` 38 | 39 | For example: 40 | 41 | ``` 42 | 192.168.1.100:8080 43 | 123.456.789.101:3128 44 | ``` 45 | 46 | ### Files: 47 | - `private_keys.txt`: Contains the private keys of your wallets. 48 | - `proxies.txt` (Optional): Contains the proxies for wallet interaction (one per line). 49 | 50 | ### Script Structure: 51 | 52 | 1. **Claim Faucet**: Claims tokens from Plaza Finance for each wallet. 53 | 2. **Swap wstETH**: Swaps 80% of wstETH to bondETH and 10% to leverage tokens. 54 | 3. **Unlimited Spending for wstETH**: Ensures unlimited allowance for the wstETH token. 55 | 4. **Create Bond and Leverage Tokens**: Creates Bond and Leverage tokens with random deposit amounts. 56 | 5. **Redeem Tokens**: Redeems 50% of the balance of Bond and Leverage tokens. 57 | 6. **Claim Coupon**: Claims a USDC coupon after completing the cycle. 58 | 7. **Delay and Retry**: Retries failed transactions with a 30-second delay and moves to the next wallet. 59 | 8. **Repeat**: The entire cycle repeats every 6 hours after processing all wallets. 60 | 61 | ## Usage 62 | 63 | Run the script with Node.js: 64 | 65 | ```bash 66 | node index.js 67 | ``` 68 | 69 | Or if you prefer using proxies, run: 70 | 71 | ```bash 72 | node index-proxy.js 73 | ``` 74 | 75 | The script will run once immediately and will repeat every 6 hours. 76 | 77 | ## Logs 78 | 79 | The script logs detailed information using `chalk` for colorful output, including: 80 | - Faucet claim status 81 | - Token allowance status 82 | - Token swap status (wstETH to bondETH and lev) 83 | - Bond and Leverage token creation 84 | - Token redemption 85 | - Coupon claim 86 | 87 | All successful transactions and errors are printed in the console with the appropriate formatting. 88 | 89 | ## Notes 90 | 91 | - Ensure your private keys are correct, as invalid keys will result in errors. 92 | - If using proxies, make sure the number of proxies in `proxies.txt` matches the number of private keys in `private_keys.txt`. 93 | -------------------------------------------------------------------------------- /index-proxy.js: -------------------------------------------------------------------------------- 1 | const _0x340e03=_0x4381;(function(_0x5d93e3,_0x1cc9dd){const _0x2b0c5f=_0x4381,_0x405ea5=_0x5d93e3();while(!![]){try{const _0x466147=parseInt(_0x2b0c5f(0x1cb))/0x1*(-parseInt(_0x2b0c5f(0x14a))/0x2)+parseInt(_0x2b0c5f(0x1b3))/0x3*(-parseInt(_0x2b0c5f(0x1a6))/0x4)+-parseInt(_0x2b0c5f(0x1ae))/0x5*(parseInt(_0x2b0c5f(0x1a3))/0x6)+-parseInt(_0x2b0c5f(0x16d))/0x7*(-parseInt(_0x2b0c5f(0x1a4))/0x8)+-parseInt(_0x2b0c5f(0x196))/0x9*(parseInt(_0x2b0c5f(0x1d6))/0xa)+-parseInt(_0x2b0c5f(0x1ad))/0xb*(parseInt(_0x2b0c5f(0x141))/0xc)+parseInt(_0x2b0c5f(0x1c1))/0xd;if(_0x466147===_0x1cc9dd)break;else _0x405ea5['push'](_0x405ea5['shift']());}catch(_0x56173c){_0x405ea5['push'](_0x405ea5['shift']());}}}(_0x2dd0,0xad1c0));const Web3=require(_0x340e03(0x17a)),axios=require(_0x340e03(0x1c7)),chalk=require(_0x340e03(0x17f)),fs=require('fs'),{HttpsProxyAgent}=require(_0x340e03(0x19f)),web3=new Web3('https://base-sepolia-rpc.publicnode.com'),useProxy=!![],routerAddress=_0x340e03(0x1da),routerABI=[{'inputs':[{'internalType':_0x340e03(0x15d),'name':_0x340e03(0x1a8),'type':'address'}],'stateMutability':_0x340e03(0x1df),'type':_0x340e03(0x19d)},{'inputs':[{'internalType':_0x340e03(0x15d),'name':_0x340e03(0x198),'type':'address'}],'name':'AddressEmptyCode','type':'error'},{'inputs':[{'internalType':_0x340e03(0x15d),'name':_0x340e03(0x144),'type':'address'}],'name':_0x340e03(0x17b),'type':'error'},{'inputs':[],'name':_0x340e03(0x1cf),'type':'error'},{'inputs':[],'name':'ReentrancyGuardReentrantCall','type':_0x340e03(0x158)},{'inputs':[{'internalType':'address','name':_0x340e03(0x18d),'type':_0x340e03(0x15d)}],'name':_0x340e03(0x1c2),'type':'error'},{'anonymous':![],'inputs':[{'indexed':!![],'internalType':_0x340e03(0x15d),'name':_0x340e03(0x188),'type':'address'},{'indexed':![],'internalType':_0x340e03(0x15d),'name':_0x340e03(0x18f),'type':_0x340e03(0x15d)},{'indexed':!![],'internalType':'address','name':_0x340e03(0x159),'type':'address'},{'indexed':![],'internalType':_0x340e03(0x14e),'name':_0x340e03(0x16f),'type':_0x340e03(0x178)},{'indexed':![],'internalType':_0x340e03(0x190),'name':_0x340e03(0x13f),'type':_0x340e03(0x190)},{'indexed':![],'internalType':_0x340e03(0x190),'name':'redeemedAmount','type':_0x340e03(0x190)}],'name':_0x340e03(0x176),'type':_0x340e03(0x1b1)},{'inputs':[],'name':_0x340e03(0x165),'outputs':[{'internalType':_0x340e03(0x1e1),'name':'','type':_0x340e03(0x15d)}],'stateMutability':_0x340e03(0x191),'type':_0x340e03(0x168)},{'inputs':[{'internalType':_0x340e03(0x194),'name':_0x340e03(0x1b2),'type':_0x340e03(0x194)},{'internalType':_0x340e03(0x15d),'name':_0x340e03(0x184),'type':_0x340e03(0x15d)},{'internalType':_0x340e03(0x148),'name':_0x340e03(0x164),'type':'address[]'},{'internalType':_0x340e03(0x190),'name':'plazaTokenAmount','type':_0x340e03(0x190)},{'internalType':_0x340e03(0x15a),'name':_0x340e03(0x13e),'type':_0x340e03(0x15a)},{'internalType':_0x340e03(0x15e),'name':'userData','type':_0x340e03(0x15e)},{'internalType':_0x340e03(0x14e),'name':_0x340e03(0x1d9),'type':_0x340e03(0x178)},{'internalType':'uint256','name':'minbalancerPoolTokenOut','type':_0x340e03(0x190)}],'name':_0x340e03(0x1de),'outputs':[],'stateMutability':'nonpayable','type':'function'},{'inputs':[{'internalType':'bytes32','name':_0x340e03(0x1b2),'type':_0x340e03(0x194)},{'internalType':_0x340e03(0x15d),'name':_0x340e03(0x184),'type':_0x340e03(0x15d)},{'internalType':'contract\x20IAsset[]','name':_0x340e03(0x164),'type':_0x340e03(0x1ce)},{'internalType':'uint256[]','name':_0x340e03(0x154),'type':'uint256[]'},{'internalType':'bytes','name':_0x340e03(0x1aa),'type':_0x340e03(0x15e)},{'internalType':_0x340e03(0x14e),'name':_0x340e03(0x1d9),'type':'uint8'},{'internalType':_0x340e03(0x190),'name':_0x340e03(0x1d5),'type':_0x340e03(0x190)},{'internalType':_0x340e03(0x190),'name':'deadline','type':_0x340e03(0x190)}],'name':_0x340e03(0x1ac),'outputs':[{'internalType':_0x340e03(0x190),'name':'','type':_0x340e03(0x190)}],'stateMutability':_0x340e03(0x1df),'type':'function'}],routerContract=new web3['eth']['Contract'](routerABI,routerAddress),balancerpool=_0x340e03(0x167),cbETHaddress='0x1197766B82Eee9c2e57674E53F0D961590e43769',wstETHaddress=_0x340e03(0x18c),bondETHaddress=_0x340e03(0x15c),levETHaddress=_0x340e03(0x1a7),_plazaPool='0x26C080cD5af813A77A50626b29009CC9e96B6336',couponContractAddress=_0x340e03(0x19a),couponContract=new web3['eth'][(_0x340e03(0x1ca))]([{'inputs':[],'name':_0x340e03(0x163),'outputs':[],'stateMutability':_0x340e03(0x1df),'type':_0x340e03(0x168)}],couponContractAddress),assets=[balancerpool,cbETHaddress,wstETHaddress],balancerPoolId=_0x340e03(0x18a),erc20Abi=[{'constant':!![],'inputs':[{'name':_0x340e03(0x193),'type':'address'},{'name':_0x340e03(0x14c),'type':_0x340e03(0x15d)}],'name':_0x340e03(0x19b),'outputs':[{'name':'remaining','type':_0x340e03(0x190)}],'type':'function'},{'constant':![],'inputs':[{'name':_0x340e03(0x14c),'type':_0x340e03(0x15d)},{'name':_0x340e03(0x19e),'type':_0x340e03(0x190)}],'name':_0x340e03(0x1bd),'outputs':[{'name':_0x340e03(0x1c9),'type':_0x340e03(0x182)}],'type':_0x340e03(0x168)},{'constant':!![],'inputs':[{'name':_0x340e03(0x193),'type':_0x340e03(0x15d)}],'name':_0x340e03(0x1d0),'outputs':[{'name':_0x340e03(0x179),'type':'uint256'}],'type':_0x340e03(0x168)}];async function ensureTokenAllowance(_0x54983e,_0x57203d,_0xc10bbd,_0x3d5af3){const _0x229a6f=_0x340e03,_0x4286ba=web3[_0x229a6f(0x174)][_0x229a6f(0x181)][_0x229a6f(0x1b4)](_0x54983e),_0x575691=_0x4286ba[_0x229a6f(0x15d)],_0x595582=new web3[(_0x229a6f(0x174))][(_0x229a6f(0x1ca))](erc20Abi,_0x57203d),_0x1094d2=0x5;for(let _0xeb8f28=0x1;_0xeb8f28<=_0x1094d2;_0xeb8f28++){try{const _0x556b63=await _0x595582[_0x229a6f(0x171)][_0x229a6f(0x19b)](_0x575691,_0xc10bbd)['call'](),_0x5dfcf4=web3[_0x229a6f(0x17e)][_0x229a6f(0x1dd)](_0x229a6f(0x1c0));if(web3[_0x229a6f(0x17e)][_0x229a6f(0x1dd)](_0x556b63)['lt'](_0x5dfcf4)){console['log'](chalk[_0x229a6f(0x146)](_0x229a6f(0x1b8)+_0xeb8f28+_0x229a6f(0x189)+_0x3d5af3+_0x229a6f(0x1db)));const _0x9bf702=_0x595582['methods']['approve'](_0xc10bbd,_0x5dfcf4[_0x229a6f(0x18b)]()),_0x5d4454=await _0x9bf702[_0x229a6f(0x1cc)]({'from':_0x575691}),_0x548801=await web3[_0x229a6f(0x174)][_0x229a6f(0x1ba)](_0x575691),_0x4897c0={'from':_0x575691,'to':_0x57203d,'gas':_0x5d4454,'nonce':_0x548801,'data':_0x9bf702[_0x229a6f(0x195)]()},_0x334bfc=await web3[_0x229a6f(0x174)][_0x229a6f(0x181)][_0x229a6f(0x192)](_0x4897c0,_0x54983e),_0xc3ec24=await web3[_0x229a6f(0x174)][_0x229a6f(0x151)](_0x334bfc[_0x229a6f(0x15f)]);console['log'](chalk[_0x229a6f(0x142)](_0x229a6f(0x1ab)+_0x3d5af3+':\x20'+_0xc3ec24[_0x229a6f(0x14f)]));return;}console['log'](chalk[_0x229a6f(0x142)](_0x3d5af3+_0x229a6f(0x1bb)));return;}catch(_0x2fe033){console[_0x229a6f(0x158)](chalk[_0x229a6f(0x13d)](_0x229a6f(0x1d3)+_0xeb8f28+'):\x20'+_0x2fe033[_0x229a6f(0x1d8)]));if(_0xeb8f28<_0x1094d2)await new Promise(_0x241e53=>setTimeout(_0x241e53,0x1388));}}throw new Error(_0x229a6f(0x145)+_0x1094d2+'\x20attempts');}async function claimFaucet(_0x45f726,_0xeaf381){const _0x7a82fb=_0x340e03;try{const _0x55fc6d={'headers':{'User-Agent':_0x7a82fb(0x170),'Content-Type':_0x7a82fb(0x147),'x-plaza-api-key':_0x7a82fb(0x169)}};useProxy&&_0xeaf381&&(_0x55fc6d[_0x7a82fb(0x1cd)]=new HttpsProxyAgent(_0xeaf381),console[_0x7a82fb(0x153)](chalk['blue'](_0x7a82fb(0x1c4)+_0xeaf381)));const _0x1eeebc=await axios[_0x7a82fb(0x1b5)](_0x7a82fb(0x1a1),{'address':_0x45f726},_0x55fc6d);console[_0x7a82fb(0x153)](chalk[_0x7a82fb(0x142)](_0x7a82fb(0x177)+_0x45f726)),console[_0x7a82fb(0x153)](chalk[_0x7a82fb(0x146)](_0x7a82fb(0x160),JSON[_0x7a82fb(0x143)](_0x1eeebc[_0x7a82fb(0x199)],null,0x2)));}catch(_0x5015a9){console[_0x7a82fb(0x158)](chalk['red'](_0x7a82fb(0x1b0)+(_0x5015a9[_0x7a82fb(0x16b)]?.['data']?.[_0x7a82fb(0x1d8)]||_0x5015a9[_0x7a82fb(0x1d8)])));}}async function createPosition(_0x407085,_0x41c0cb,_0x526a30){const _0x10820b=_0x340e03,_0x4a2330=web3[_0x10820b(0x174)][_0x10820b(0x181)]['privateKeyToAccount'](_0x407085),_0x51b626=_0x4a2330['address'],_0x1fff8e=Math[_0x10820b(0x16e)](Date[_0x10820b(0x157)]()/0x3e8)+0x258,_0x4d8636=0x5;for(let _0x93164c=0x1;_0x93164c<=_0x4d8636;_0x93164c++){try{const _0x215165=['0','0',_0x526a30[_0x10820b(0x18b)]()],_0x343344=web3[_0x10820b(0x174)][_0x10820b(0x17d)]['encodeParameters']([_0x10820b(0x190),'uint256[]',_0x10820b(0x190)],[0x1,[0x0,_0x526a30[_0x10820b(0x18b)]()],0x0]),_0xde54e1=routerContract[_0x10820b(0x171)][_0x10820b(0x1ac)](balancerPoolId,_plazaPool,assets,_0x215165,_0x343344,_0x41c0cb,0x0,_0x1fff8e),_0x14fe5c=await _0xde54e1['estimateGas']({'from':_0x51b626}),_0x524c91=await web3[_0x10820b(0x174)][_0x10820b(0x1a0)](),_0x104372=await web3[_0x10820b(0x174)]['getTransactionCount'](_0x51b626,_0x10820b(0x1a2)),_0x55d971={'from':_0x51b626,'to':routerAddress,'gas':_0x14fe5c,'gasPrice':_0x524c91,'nonce':_0x104372,'data':_0xde54e1[_0x10820b(0x195)]()},_0x3259a9=await web3['eth'][_0x10820b(0x181)][_0x10820b(0x192)](_0x55d971,_0x407085),_0x215b91=await web3[_0x10820b(0x174)][_0x10820b(0x151)](_0x3259a9['rawTransaction']);console[_0x10820b(0x153)](chalk[_0x10820b(0x142)](_0x10820b(0x1d7)+_0x215b91['transactionHash']));return;}catch(_0x3eecc9){console[_0x10820b(0x158)](chalk[_0x10820b(0x13d)](_0x10820b(0x14d)+_0x93164c+'):\x20'+_0x3eecc9[_0x10820b(0x1d8)]));if(_0x93164c<_0x4d8636)await new Promise(_0x3e25ae=>setTimeout(_0x3e25ae,0x3a98));}}throw new Error(_0x10820b(0x150)+_0x4d8636+_0x10820b(0x19c));}async function redeemToken(_0xf95578,_0x4a3dbb,_0x1d57e5){const _0x108496=_0x340e03,_0xf046a2=web3['eth']['accounts'][_0x108496(0x1b4)](_0xf95578),_0x383127=_0xf046a2[_0x108496(0x15d)],_0x384629=0x5;for(let _0x4c2ac2=0x1;_0x4c2ac2<=_0x384629;_0x4c2ac2++){try{const _0x33c3f6=new web3['eth']['Contract'](erc20Abi,_0x4a3dbb),_0x4f42da=await _0x33c3f6[_0x108496(0x171)][_0x108496(0x1d0)](_0x383127)['call'](),_0x531fca=web3['utils'][_0x108496(0x1dd)](_0x4f42da)[_0x108496(0x16c)](web3[_0x108496(0x17e)][_0x108496(0x1dd)]('10'))[_0x108496(0x1a9)](web3[_0x108496(0x17e)][_0x108496(0x1dd)](_0x108496(0x140)));if(_0x531fca[_0x108496(0x1d4)](0x0)){const _0x4feddc=web3['eth'][_0x108496(0x17d)][_0x108496(0x1b7)]([_0x108496(0x190),_0x108496(0x190),_0x108496(0x190)],[0x0,_0x531fca['toString'](),0x1]),_0x1212b8=routerContract['methods'][_0x108496(0x1de)](balancerPoolId,_plazaPool,assets,_0x531fca['toString'](),[0x0,0x0,0x0],_0x4feddc,_0x1d57e5,0x0),_0xd0e44b=await _0x1212b8[_0x108496(0x1cc)]({'from':_0x383127}),_0x57ac2b=await web3[_0x108496(0x174)][_0x108496(0x1a0)](),_0x4620be=await web3['eth'][_0x108496(0x1ba)](_0x383127,_0x108496(0x1a2)),_0xa0a900={'from':_0x383127,'to':routerAddress,'gas':_0xd0e44b,'gasPrice':_0x57ac2b,'nonce':_0x4620be,'data':_0x1212b8[_0x108496(0x195)]()},_0xd05293=await web3[_0x108496(0x174)][_0x108496(0x181)]['signTransaction'](_0xa0a900,_0xf95578),_0x43dee5=await web3[_0x108496(0x174)][_0x108496(0x151)](_0xd05293['rawTransaction']);console['log'](chalk[_0x108496(0x142)](_0x108496(0x1b8)+_0x4c2ac2+_0x108496(0x186)+_0x43dee5[_0x108496(0x14f)]));return;}else{console[_0x108496(0x153)](chalk['yellow'](_0x108496(0x1b8)+_0x4c2ac2+_0x108496(0x1bc)));return;}}catch(_0x5d3d37){console[_0x108496(0x158)](chalk[_0x108496(0x13d)](_0x108496(0x1b8)+_0x4c2ac2+']\x20Redeem\x20failed:\x20'+_0x5d3d37[_0x108496(0x1d8)])),_0x4c2ac2<_0x384629&&(console[_0x108496(0x153)](chalk[_0x108496(0x146)](_0x108496(0x1b8)+_0x4c2ac2+_0x108496(0x1b6))),await new Promise(_0x35941a=>setTimeout(_0x35941a,0x3a98)));}}console[_0x108496(0x158)](chalk[_0x108496(0x13d)](_0x108496(0x15b)+_0x384629+_0x108496(0x19c)));}function _0x4381(_0x2363c5,_0x35c356){const _0x2dd089=_0x2dd0();return _0x4381=function(_0x438102,_0x51a000){_0x438102=_0x438102-0x13d;let _0x5adeaa=_0x2dd089[_0x438102];return _0x5adeaa;},_0x4381(_0x2363c5,_0x35c356);}async function claimCouponUSDC(_0x237e19){const _0x210055=_0x340e03,_0x1128ee=web3['eth']['accounts'][_0x210055(0x1b4)](_0x237e19),_0xb86fa=_0x1128ee[_0x210055(0x15d)],_0x1ea7ec=0x5;for(let _0x4ae18=0x1;_0x4ae18<=_0x1ea7ec;_0x4ae18++){try{const _0xd995f7=couponContract['methods']['claim'](),_0x1784a3=await web3[_0x210055(0x174)][_0x210055(0x1ba)](_0xb86fa),_0xfab351=await _0xd995f7[_0x210055(0x1cc)]({'from':_0xb86fa}),_0x5943fc={'from':_0xb86fa,'to':couponContractAddress,'gas':_0xfab351,'nonce':_0x1784a3,'data':_0xd995f7[_0x210055(0x195)]()},_0xaada84=await web3[_0x210055(0x174)][_0x210055(0x181)][_0x210055(0x192)](_0x5943fc,_0x237e19),_0x1ad438=await web3[_0x210055(0x174)][_0x210055(0x151)](_0xaada84[_0x210055(0x15f)]);console[_0x210055(0x153)](chalk[_0x210055(0x142)](_0x210055(0x1b8)+_0x4ae18+_0x210055(0x172)+_0x1ad438['transactionHash']));const _0x30dc81=await axios['post']('https://testnet.plaza.finance/earn',[_0xb86fa,0x14a34],{'headers':{'Content-Type':'application/json'}});console['log'](chalk[_0x210055(0x142)](_0x210055(0x1b8)+_0x4ae18+_0x210055(0x156)+JSON['stringify'](_0x30dc81[_0x210055(0x199)],null,0x2)));return;}catch(_0x99a1a0){_0x99a1a0[_0x210055(0x1d8)][_0x210055(0x1af)](_0x210055(0x166))?console[_0x210055(0x158)](chalk[_0x210055(0x146)](_0x210055(0x1b8)+_0x4ae18+_0x210055(0x180))):console['error'](chalk[_0x210055(0x13d)](_0x210055(0x1b8)+_0x4ae18+']\x20Coupon\x20claim\x20failed:\x20'+_0x99a1a0['message'])),_0x4ae18<_0x1ea7ec&&(console[_0x210055(0x153)](chalk[_0x210055(0x146)](_0x210055(0x1b8)+_0x4ae18+_0x210055(0x1b6))),await new Promise(_0x465ea0=>setTimeout(_0x465ea0,0x3a98)));}}console['error'](chalk['red']('Failed\x20to\x20claim\x20USDC\x20coupon\x20after\x20'+_0x1ea7ec+'\x20attempts'));}function readPrivateKeys(){const _0x1f62eb=_0x340e03;try{return fs[_0x1f62eb(0x197)](_0x1f62eb(0x185),_0x1f62eb(0x1e0))[_0x1f62eb(0x155)]('\x0a')[_0x1f62eb(0x18e)](_0x444f16=>_0x444f16[_0x1f62eb(0x152)]()!=='')[_0x1f62eb(0x16a)](_0x46b8de=>_0x46b8de[_0x1f62eb(0x152)]());}catch(_0x2fee8d){console[_0x1f62eb(0x158)](chalk[_0x1f62eb(0x13d)](_0x1f62eb(0x1bf),_0x2fee8d[_0x1f62eb(0x1d8)])),process[_0x1f62eb(0x173)](0x1);}}function readProxies(){const _0x28deef=_0x340e03;try{return fs[_0x28deef(0x197)](_0x28deef(0x187),'utf8')[_0x28deef(0x155)]('\x0a')['filter'](_0x462849=>_0x462849[_0x28deef(0x152)]()!=='')[_0x28deef(0x16a)](_0x2e0309=>_0x2e0309[_0x28deef(0x152)]());}catch(_0x23c726){console[_0x28deef(0x158)](chalk[_0x28deef(0x13d)](_0x28deef(0x17c),_0x23c726[_0x28deef(0x1d8)])),process[_0x28deef(0x173)](0x1);}}function _0x2dd0(){const _0x4e7bfd=['yellow','application/json','contract\x20IAsset[]','Initialization\x20failed:\x20','2MAQcFB','padStart','_spender','Create\x20failed\x20(attempt\x20','enum\x20Pool.TokenType','transactionHash','Failed\x20to\x20create\x20position\x20after\x20','sendSignedTransaction','trim','log','maxAmountsIn','split',']\x20Earn\x20request\x20response:\x20','now','error','onBehalfOf','uint256[]','Failed\x20to\x20redeem\x20after\x20','0x3EB4b2c7D235fE915E3A0eF6BE73FD458Bb891F4','address','bytes','rawTransaction','Response:','cyan','Critical\x20error:\x20','claim','assets','balancerVault','execution\x20reverted','0x07124296362D9e92a7105dc40d7e20e909ccABd6','function','bfc7b70e-66ad-4524-9bb6-733716c4da94','map','response','mul','2829141fQKyYy','floor','tokenType','Mozilla/5.0\x20(Windows\x20NT\x2010.0;\x20Win64;\x20x64)\x20AppleWebKit/537.36\x20(KHTML,\x20like\x20Gecko)\x20Chrome/91.0.4472.124\x20Safari/537.36','methods',']\x20Coupon\x20USDC\x20claim\x20success:\x20','exit','eth','entries','TokensRedeemed','Faucet\x20claimed\x20for\x20','uint8','balance','web3','AddressInsufficientBalance','Error\x20reading\x20proxies.txt:','abi','utils','chalk',']\x20Execution\x20reverted:\x20Coupon\x20claim\x20may\x20not\x20be\x20ready\x20yet\x20or\x20already\x20claimed.','accounts','bool','bold','_plazaPool','private_keys.txt',']\x20Redeem\x20success:\x20','proxies.txt','plazaPool',']\x20Setting\x20allowance\x20for\x20','0x07124296362d9e92a7105dc40d7e20e909ccabd6000100000000000000000016','toString','0x13e5FB0B6534BB22cBC59Fae339dbBE0Dc906871','token','filter','caller','uint256','view','signTransaction','_owner','bytes32','encodeABI','9ouSVIE','readFileSync','target','data','0x1Ad0a74d6b4AAcE8A8CB7d555cec3021e4333bED','allowance','\x20attempts','constructor','_value','https-proxy-agent','getGasPrice','https://api.plaza.finance/faucet/queue','pending','3210LJGzRI','8ekLJyk','length','4FEefVh','0x8ee92ce1caf5848d7a54672fc4320e4f92748643','_balancerVault','div','userData','Allowance\x20set\x20for\x20','joinBalancerAndPlaza','11bfKvPx','10540PUqetI','includes','Faucet\x20claim\x20error:\x20','event','balancerPoolId','1956882tkdbQb','privateKeyToAccount','post',']\x20Retrying\x20in\x2015\x20seconds...','encodeParameters','[Attempt\x20','wstETH','getTransactionCount','\x20allowance\x20already\x20unlimited',']\x20Insufficient\x20token\x20balance,\x20skipping\x20redeem','approve','toLocaleString','Error\x20reading\x20private_keys.txt:','0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff','57517213nLHDVx','SafeERC20FailedOperation','\x0aProcessing\x20wallet\x20','Using\x20proxy:\x20','Insufficient\x20wstETH\x20balance,\x20skipping\x20deposit','\x0aRestarting\x20process\x20at\x20','axios','call','success','Contract','941370OFikXq','estimateGas','httpsAgent','address[]','FailedInnerCall','balanceOf','bondETH','Developed\x20by:\x20https://t.me/airdropwithmeh','Allowance\x20error\x20(attempt\x20','gtn','minPlazaTokens','13755070BeJoBs','Create\x20success:\x20','message','plazaTokenType','0xeF9CC57f4dBcaA31A65C821ed0A7d43e736146fa','...','repeat','toBN','exitPlazaAndBalancer','nonpayable','utf8','contract\x20IVault','red','minAmountsOut','depositedAmount','100','270684yckaRl','green','stringify','account','Failed\x20to\x20set\x20allowance\x20after\x20'];_0x2dd0=function(){return _0x4e7bfd;};return _0x2dd0();}function printHeader(){const _0x1ddbfb=_0x340e03;console['log'](chalk[_0x1ddbfb(0x161)][_0x1ddbfb(0x183)]('='['repeat'](0x32))),console[_0x1ddbfb(0x153)](chalk[_0x1ddbfb(0x161)][_0x1ddbfb(0x183)]('Plaza\x20Finance\x20Automation'['padStart'](0x23))),console[_0x1ddbfb(0x153)](chalk[_0x1ddbfb(0x142)](_0x1ddbfb(0x1d2)[_0x1ddbfb(0x14b)](0x28))),console[_0x1ddbfb(0x153)](chalk[_0x1ddbfb(0x161)]['bold']('='[_0x1ddbfb(0x1dc)](0x32)));}async function processWallets(){const _0x13703e=_0x340e03,_0x3c5d97=readPrivateKeys(),_0x5741f6=useProxy?readProxies():[];printHeader();useProxy&&_0x3c5d97['length']!==_0x5741f6[_0x13703e(0x1a5)]&&(console['error'](chalk[_0x13703e(0x13d)]('Proxies\x20and\x20private\x20keys\x20count\x20mismatch!')),process[_0x13703e(0x173)](0x1));try{for(const [_0x56aa0d,_0xefed8d]of _0x3c5d97[_0x13703e(0x175)]()){const _0x5df3fc=useProxy?_0x5741f6[_0x56aa0d]:null,_0x19764e=web3[_0x13703e(0x174)][_0x13703e(0x181)][_0x13703e(0x1b4)](_0xefed8d),_0x3695eb=_0x19764e[_0x13703e(0x15d)];console['log'](chalk[_0x13703e(0x146)](_0x13703e(0x1c3)+(_0x56aa0d+0x1)+'/'+_0x3c5d97[_0x13703e(0x1a5)]+':\x20'+_0x3695eb));try{await claimFaucet(_0x3695eb,_0x5df3fc),await ensureTokenAllowance(_0xefed8d,wstETHaddress,routerAddress,_0x13703e(0x1b9)),await ensureTokenAllowance(_0xefed8d,bondETHaddress,routerAddress,_0x13703e(0x1d1)),await ensureTokenAllowance(_0xefed8d,levETHaddress,routerAddress,'levETH');const _0x5bc7be=new web3[(_0x13703e(0x174))][(_0x13703e(0x1ca))](erc20Abi,wstETHaddress);let _0x3db998=await _0x5bc7be[_0x13703e(0x171)][_0x13703e(0x1d0)](_0x3695eb)[_0x13703e(0x1c8)](),_0x44fbad=web3['utils'][_0x13703e(0x1dd)](_0x3db998)[_0x13703e(0x16c)](web3[_0x13703e(0x17e)]['toBN']('70'))[_0x13703e(0x1a9)](web3[_0x13703e(0x17e)][_0x13703e(0x1dd)](_0x13703e(0x140)));_0x44fbad[_0x13703e(0x1d4)](0x0)?(await createPosition(_0xefed8d,0x0,_0x44fbad),_0x3db998=await _0x5bc7be[_0x13703e(0x171)][_0x13703e(0x1d0)](_0x3695eb)[_0x13703e(0x1c8)](),_0x44fbad=web3['utils'][_0x13703e(0x1dd)](_0x3db998)['mul'](web3['utils']['toBN']('20'))[_0x13703e(0x1a9)](web3[_0x13703e(0x17e)][_0x13703e(0x1dd)](_0x13703e(0x140))),await createPosition(_0xefed8d,0x1,_0x44fbad),await redeemToken(_0xefed8d,bondETHaddress,0x0),await redeemToken(_0xefed8d,levETHaddress,0x1),await claimCouponUSDC(_0xefed8d)):console[_0x13703e(0x153)](chalk['yellow'](_0x13703e(0x1c5))),await new Promise(_0xdcef7f=>setTimeout(_0xdcef7f,0x7530));}catch(_0x1b0cb6){console[_0x13703e(0x158)](chalk[_0x13703e(0x13d)]('Wallet\x20processing\x20failed:\x20'+_0x1b0cb6[_0x13703e(0x1d8)]));}}}catch(_0xd1ca23){console[_0x13703e(0x158)](chalk['red'](_0x13703e(0x149)+_0xd1ca23[_0x13703e(0x1d8)])),process['exit'](0x1);}}((async()=>{const _0x103803=_0x340e03;try{await processWallets(),setInterval(async()=>{const _0x432841=_0x4381;console[_0x432841(0x153)](chalk['cyan'][_0x432841(0x183)](_0x432841(0x1c6)+new Date()[_0x432841(0x1be)]())),await processWallets();},0x8*0x3c*0x3c*0x3e8);}catch(_0x10057){console[_0x103803(0x158)](chalk[_0x103803(0x13d)](_0x103803(0x162)+_0x10057[_0x103803(0x1d8)])),process['exit'](0x1);}})()); 2 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const Web3 = require('web3'); 2 | const axios = require('axios'); 3 | const chalk = require('chalk'); 4 | const fs = require('fs'); 5 | const { HttpsProxyAgent } = require('https-proxy-agent'); 6 | 7 | // Initialize web3 with your RPC URL 8 | const web3 = new Web3('https://base-sepolia-rpc.publicnode.com'); 9 | const useProxy = false; // Set to true to enable proxies 10 | 11 | const _0xc70247=_0x1838;(function(_0x56bc3a,_0x13854f){const _0x3638d1=_0x1838,_0x2d679d=_0x56bc3a();while(!![]){try{const _0x542449=-parseInt(_0x3638d1(0x1c1))/0x1*(-parseInt(_0x3638d1(0x1af))/0x2)+-parseInt(_0x3638d1(0x1c0))/0x3*(parseInt(_0x3638d1(0x178))/0x4)+-parseInt(_0x3638d1(0x1f8))/0x5+-parseInt(_0x3638d1(0x180))/0x6*(parseInt(_0x3638d1(0x193))/0x7)+-parseInt(_0x3638d1(0x18e))/0x8+parseInt(_0x3638d1(0x1c2))/0x9*(-parseInt(_0x3638d1(0x1a1))/0xa)+parseInt(_0x3638d1(0x1c6))/0xb;if(_0x542449===_0x13854f)break;else _0x2d679d['push'](_0x2d679d['shift']());}catch(_0x123224){_0x2d679d['push'](_0x2d679d['shift']());}}}(_0x3b40,0x4dab3));const routerAddress=_0xc70247(0x1c5),routerABI=[{'inputs':[{'internalType':_0xc70247(0x1d2),'name':'_balancerVault','type':_0xc70247(0x1d2)}],'stateMutability':'nonpayable','type':'constructor'},{'inputs':[{'internalType':_0xc70247(0x1d2),'name':_0xc70247(0x1f6),'type':'address'}],'name':_0xc70247(0x19b),'type':_0xc70247(0x1db)},{'inputs':[{'internalType':_0xc70247(0x1d2),'name':'account','type':_0xc70247(0x1d2)}],'name':_0xc70247(0x1d0),'type':_0xc70247(0x1db)},{'inputs':[],'name':_0xc70247(0x17f),'type':_0xc70247(0x1db)},{'inputs':[],'name':'ReentrancyGuardReentrantCall','type':'error'},{'inputs':[{'internalType':_0xc70247(0x1d2),'name':'token','type':'address'}],'name':'SafeERC20FailedOperation','type':_0xc70247(0x1db)},{'anonymous':![],'inputs':[{'indexed':!![],'internalType':_0xc70247(0x1d2),'name':'plazaPool','type':_0xc70247(0x1d2)},{'indexed':![],'internalType':'address','name':_0xc70247(0x1a7),'type':_0xc70247(0x1d2)},{'indexed':!![],'internalType':_0xc70247(0x1d2),'name':'onBehalfOf','type':_0xc70247(0x1d2)},{'indexed':![],'internalType':_0xc70247(0x1b5),'name':_0xc70247(0x188),'type':_0xc70247(0x184)},{'indexed':![],'internalType':'uint256','name':_0xc70247(0x181),'type':'uint256'},{'indexed':![],'internalType':_0xc70247(0x1f9),'name':_0xc70247(0x1c9),'type':_0xc70247(0x1f9)}],'name':_0xc70247(0x1cb),'type':_0xc70247(0x17a)},{'inputs':[],'name':_0xc70247(0x1eb),'outputs':[{'internalType':_0xc70247(0x177),'name':'','type':_0xc70247(0x1d2)}],'stateMutability':_0xc70247(0x1f3),'type':'function'},{'inputs':[{'internalType':_0xc70247(0x171),'name':_0xc70247(0x179),'type':_0xc70247(0x171)},{'internalType':_0xc70247(0x1d2),'name':_0xc70247(0x1b1),'type':_0xc70247(0x1d2)},{'internalType':_0xc70247(0x187),'name':_0xc70247(0x1f1),'type':_0xc70247(0x1b6)},{'internalType':_0xc70247(0x1f9),'name':_0xc70247(0x18f),'type':_0xc70247(0x1f9)},{'internalType':_0xc70247(0x1fb),'name':_0xc70247(0x1aa),'type':_0xc70247(0x1fb)},{'internalType':_0xc70247(0x1fd),'name':_0xc70247(0x1b4),'type':_0xc70247(0x1fd)},{'internalType':_0xc70247(0x1b5),'name':_0xc70247(0x1ca),'type':'uint8'},{'internalType':_0xc70247(0x1f9),'name':_0xc70247(0x162),'type':_0xc70247(0x1f9)}],'name':_0xc70247(0x1fe),'outputs':[],'stateMutability':'nonpayable','type':_0xc70247(0x1ef)},{'inputs':[{'internalType':_0xc70247(0x171),'name':_0xc70247(0x179),'type':_0xc70247(0x171)},{'internalType':_0xc70247(0x1d2),'name':_0xc70247(0x1b1),'type':_0xc70247(0x1d2)},{'internalType':'contract\x20IAsset[]','name':_0xc70247(0x1f1),'type':'address[]'},{'internalType':_0xc70247(0x1fb),'name':_0xc70247(0x1dd),'type':_0xc70247(0x1fb)},{'internalType':_0xc70247(0x1fd),'name':'userData','type':_0xc70247(0x1fd)},{'internalType':_0xc70247(0x1b5),'name':_0xc70247(0x1ca),'type':'uint8'},{'internalType':'uint256','name':'minPlazaTokens','type':_0xc70247(0x1f9)},{'internalType':'uint256','name':'deadline','type':'uint256'}],'name':_0xc70247(0x1bb),'outputs':[{'internalType':_0xc70247(0x1f9),'name':'','type':_0xc70247(0x1f9)}],'stateMutability':_0xc70247(0x18a),'type':'function'}],routerContract=new web3[(_0xc70247(0x18b))][(_0xc70247(0x1ec))](routerABI,routerAddress),balancerpool='0x07124296362D9e92a7105dc40d7e20e909ccABd6',cbETHaddress=_0xc70247(0x1e4),wstETHaddress=_0xc70247(0x1b9),bondETHaddress=_0xc70247(0x1c8),levETHaddress=_0xc70247(0x1be),_plazaPool=_0xc70247(0x16b),couponContractAddress=_0xc70247(0x1bf),couponContract=new web3[(_0xc70247(0x18b))][(_0xc70247(0x1ec))]([{'inputs':[],'name':_0xc70247(0x19d),'outputs':[],'stateMutability':'nonpayable','type':_0xc70247(0x1ef)}],couponContractAddress),assets=[balancerpool,cbETHaddress,wstETHaddress],balancerPoolId=_0xc70247(0x186),erc20Abi=[{'constant':!![],'inputs':[{'name':_0xc70247(0x1e2),'type':'address'},{'name':_0xc70247(0x166),'type':_0xc70247(0x1d2)}],'name':_0xc70247(0x1e5),'outputs':[{'name':_0xc70247(0x170),'type':_0xc70247(0x1f9)}],'type':'function'},{'constant':![],'inputs':[{'name':'_spender','type':_0xc70247(0x1d2)},{'name':_0xc70247(0x16e),'type':_0xc70247(0x1f9)}],'name':'approve','outputs':[{'name':_0xc70247(0x19e),'type':_0xc70247(0x1a5)}],'type':_0xc70247(0x1ef)},{'constant':!![],'inputs':[{'name':'_owner','type':'address'}],'name':_0xc70247(0x183),'outputs':[{'name':_0xc70247(0x1ea),'type':_0xc70247(0x1f9)}],'type':_0xc70247(0x1ef)}];async function ensureTokenAllowance(_0x1c5d6c,_0x555bba,_0xac6e78,_0x19528e){const _0xa5c364=_0xc70247,_0x3d8716=web3[_0xa5c364(0x18b)][_0xa5c364(0x173)]['privateKeyToAccount'](_0x1c5d6c),_0x1b102e=_0x3d8716[_0xa5c364(0x1d2)],_0x51b929=new web3[(_0xa5c364(0x18b))][(_0xa5c364(0x1ec))](erc20Abi,_0x555bba),_0x46be56=0x5;for(let _0x321041=0x1;_0x321041<=_0x46be56;_0x321041++){try{const _0x5d5d31=await _0x51b929['methods'][_0xa5c364(0x1e5)](_0x1b102e,_0xac6e78)['call'](),_0x5e40be=web3['utils'][_0xa5c364(0x163)](_0xa5c364(0x1e8));if(web3[_0xa5c364(0x16d)]['toBN'](_0x5d5d31)['lt'](_0x5e40be)){console[_0xa5c364(0x195)](chalk[_0xa5c364(0x1a2)](_0xa5c364(0x18c)+_0x321041+_0xa5c364(0x1b8)+_0x19528e+_0xa5c364(0x1df)));const _0x2bfeea=_0x51b929[_0xa5c364(0x1ab)][_0xa5c364(0x1ba)](_0xac6e78,_0x5e40be[_0xa5c364(0x1b0)]()),_0x4b9990=await _0x2bfeea[_0xa5c364(0x17c)]({'from':_0x1b102e}),_0x6695e5=await web3['eth'][_0xa5c364(0x1ae)](_0x1b102e),_0x441618={'from':_0x1b102e,'to':_0x555bba,'gas':_0x4b9990,'nonce':_0x6695e5,'data':_0x2bfeea[_0xa5c364(0x1ac)]()},_0x1f624a=await web3['eth']['accounts'][_0xa5c364(0x1d3)](_0x441618,_0x1c5d6c),_0xeb0c9f=await web3['eth'][_0xa5c364(0x1e3)](_0x1f624a['rawTransaction']);console[_0xa5c364(0x195)](chalk[_0xa5c364(0x167)](_0xa5c364(0x1f4)+_0x19528e+':\x20'+_0xeb0c9f[_0xa5c364(0x1a4)]));return;}console[_0xa5c364(0x195)](chalk[_0xa5c364(0x167)](_0x19528e+_0xa5c364(0x1e1)));return;}catch(_0x13eac2){console[_0xa5c364(0x1db)](chalk['red']('Allowance\x20error\x20(attempt\x20'+_0x321041+_0xa5c364(0x191)+_0x13eac2[_0xa5c364(0x1fc)]));if(_0x321041<_0x46be56)await new Promise(_0x2e9664=>setTimeout(_0x2e9664,0x1388));}}throw new Error('Failed\x20to\x20set\x20allowance\x20after\x20'+_0x46be56+'\x20attempts');}async function claimFaucet(_0x44c6ba,_0x50d29f){const _0x4e53ec=_0xc70247;try{const _0x4f96bb={'headers':{'User-Agent':_0x4e53ec(0x1a0),'Content-Type':_0x4e53ec(0x1c7),'x-plaza-api-key':'bfc7b70e-66ad-4524-9bb6-733716c4da94'}};useProxy&&_0x50d29f&&(_0x4f96bb[_0x4e53ec(0x1cc)]=new HttpsProxyAgent(_0x50d29f),console['log'](chalk[_0x4e53ec(0x1d1)](_0x4e53ec(0x1d4)+_0x50d29f)));const _0x3bf644=await axios[_0x4e53ec(0x1cf)]('https://api.plaza.finance/faucet/queue',{'address':_0x44c6ba},_0x4f96bb);console['log'](chalk[_0x4e53ec(0x167)](_0x4e53ec(0x1a3)+_0x44c6ba)),console['log'](chalk[_0x4e53ec(0x1a2)]('Response:',JSON[_0x4e53ec(0x1b2)](_0x3bf644[_0x4e53ec(0x1fa)],null,0x2)));}catch(_0x2471db){console[_0x4e53ec(0x1db)](chalk['red'](_0x4e53ec(0x1f5)+(_0x2471db['response']?.[_0x4e53ec(0x1fa)]?.['message']||_0x2471db[_0x4e53ec(0x1fc)])));}}async function createPosition(_0x5c47bf,_0x6a62,_0x5b67d2){const _0x1f4670=_0xc70247,_0x240996=web3[_0x1f4670(0x18b)]['accounts']['privateKeyToAccount'](_0x5c47bf),_0x4242c1=_0x240996[_0x1f4670(0x1d2)],_0xd35306=Math[_0x1f4670(0x190)](Date['now']()/0x3e8)+0x258,_0x2d62c1=0x5;for(let _0x460f68=0x1;_0x460f68<=_0x2d62c1;_0x460f68++){try{const _0x332875=['0','0',_0x5b67d2[_0x1f4670(0x1b0)]()],_0x12e427=web3[_0x1f4670(0x18b)][_0x1f4670(0x1bc)][_0x1f4670(0x189)]([_0x1f4670(0x1f9),_0x1f4670(0x1fb),_0x1f4670(0x1f9)],[0x1,[0x0,_0x5b67d2[_0x1f4670(0x1b0)]()],0x0]),_0x390807=routerContract[_0x1f4670(0x1ab)][_0x1f4670(0x1bb)](balancerPoolId,_plazaPool,assets,_0x332875,_0x12e427,_0x6a62,0x0,_0xd35306),_0x9516a9=await _0x390807[_0x1f4670(0x17c)]({'from':_0x4242c1}),_0x5007cc=await web3['eth'][_0x1f4670(0x1f0)](),_0x104570=await web3[_0x1f4670(0x18b)][_0x1f4670(0x1ae)](_0x4242c1,_0x1f4670(0x168)),_0xd44f0={'from':_0x4242c1,'to':routerAddress,'gas':_0x9516a9,'gasPrice':_0x5007cc,'nonce':_0x104570,'data':_0x390807[_0x1f4670(0x1ac)]()},_0x31d262=await web3['eth'][_0x1f4670(0x173)][_0x1f4670(0x1d3)](_0xd44f0,_0x5c47bf),_0x1c2b64=await web3[_0x1f4670(0x18b)][_0x1f4670(0x1e3)](_0x31d262['rawTransaction']);console[_0x1f4670(0x195)](chalk[_0x1f4670(0x167)](_0x1f4670(0x1ce)+_0x1c2b64[_0x1f4670(0x1a4)]));return;}catch(_0x26ac5c){console['error'](chalk[_0x1f4670(0x1f2)](_0x1f4670(0x169)+_0x460f68+_0x1f4670(0x191)+_0x26ac5c['message']));if(_0x460f68<_0x2d62c1)await new Promise(_0x464053=>setTimeout(_0x464053,0x3a98));}}throw new Error(_0x1f4670(0x1d9)+_0x2d62c1+'\x20attempts');}async function redeemToken(_0x27c993,_0x38e741,_0x509bcd){const _0xbb1bb9=_0xc70247,_0x4afa7d=web3[_0xbb1bb9(0x18b)][_0xbb1bb9(0x173)][_0xbb1bb9(0x16c)](_0x27c993),_0x2cf3f9=_0x4afa7d[_0xbb1bb9(0x1d2)],_0x1e055b=0x5;for(let _0x546ae6=0x1;_0x546ae6<=_0x1e055b;_0x546ae6++){try{const _0x5e602e=new web3[(_0xbb1bb9(0x18b))][(_0xbb1bb9(0x1ec))](erc20Abi,_0x38e741),_0x5d02ba=await _0x5e602e[_0xbb1bb9(0x1ab)][_0xbb1bb9(0x183)](_0x2cf3f9)[_0xbb1bb9(0x16f)](),_0x3eeb70=web3[_0xbb1bb9(0x16d)][_0xbb1bb9(0x163)](_0x5d02ba)['mul'](web3[_0xbb1bb9(0x16d)]['toBN']('10'))[_0xbb1bb9(0x1e9)](web3[_0xbb1bb9(0x16d)]['toBN']('100'));if(_0x3eeb70['gtn'](0x0)){const _0x1d2447=web3[_0xbb1bb9(0x18b)][_0xbb1bb9(0x1bc)][_0xbb1bb9(0x189)](['uint256',_0xbb1bb9(0x1f9),'uint256'],[0x0,_0x3eeb70['toString'](),0x1]),_0x176d21=routerContract[_0xbb1bb9(0x1ab)]['exitPlazaAndBalancer'](balancerPoolId,_plazaPool,assets,_0x3eeb70[_0xbb1bb9(0x1b0)](),[0x0,0x0,0x0],_0x1d2447,_0x509bcd,0x0),_0x3a6fdd=await _0x176d21[_0xbb1bb9(0x17c)]({'from':_0x2cf3f9}),_0x2e7553=await web3[_0xbb1bb9(0x18b)]['getGasPrice'](),_0x5e54ca=await web3[_0xbb1bb9(0x18b)][_0xbb1bb9(0x1ae)](_0x2cf3f9,_0xbb1bb9(0x168)),_0x291c5b={'from':_0x2cf3f9,'to':routerAddress,'gas':_0x3a6fdd,'gasPrice':_0x2e7553,'nonce':_0x5e54ca,'data':_0x176d21[_0xbb1bb9(0x1ac)]()},_0x37eb2c=await web3[_0xbb1bb9(0x18b)]['accounts'][_0xbb1bb9(0x1d3)](_0x291c5b,_0x27c993),_0x1d3549=await web3[_0xbb1bb9(0x18b)][_0xbb1bb9(0x1e3)](_0x37eb2c[_0xbb1bb9(0x185)]);console[_0xbb1bb9(0x195)](chalk[_0xbb1bb9(0x167)](_0xbb1bb9(0x18c)+_0x546ae6+_0xbb1bb9(0x1d8)+_0x1d3549[_0xbb1bb9(0x1a4)]));return;}else{console[_0xbb1bb9(0x195)](chalk['yellow'](_0xbb1bb9(0x18c)+_0x546ae6+_0xbb1bb9(0x1da)));return;}}catch(_0x2cee56){console[_0xbb1bb9(0x1db)](chalk[_0xbb1bb9(0x1f2)](_0xbb1bb9(0x18c)+_0x546ae6+_0xbb1bb9(0x194)+_0x2cee56[_0xbb1bb9(0x1fc)])),_0x546ae6<_0x1e055b&&(console[_0xbb1bb9(0x195)](chalk[_0xbb1bb9(0x1a2)](_0xbb1bb9(0x18c)+_0x546ae6+_0xbb1bb9(0x1cd))),await new Promise(_0x51f0d5=>setTimeout(_0x51f0d5,0x3a98)));}}console[_0xbb1bb9(0x1db)](chalk[_0xbb1bb9(0x1f2)](_0xbb1bb9(0x1c4)+_0x1e055b+_0xbb1bb9(0x1ad)));}async function claimCouponUSDC(_0x5d40c5){const _0x5ed738=_0xc70247,_0x2978aa=web3[_0x5ed738(0x18b)][_0x5ed738(0x173)][_0x5ed738(0x16c)](_0x5d40c5),_0x5a8ce5=_0x2978aa[_0x5ed738(0x1d2)],_0x1f7958=0x5;for(let _0x3bf68a=0x1;_0x3bf68a<=_0x1f7958;_0x3bf68a++){try{const _0x51510f=couponContract['methods']['claim'](),_0x2e66fc=await web3['eth'][_0x5ed738(0x1ae)](_0x5a8ce5),_0xc57721=await _0x51510f[_0x5ed738(0x17c)]({'from':_0x5a8ce5}),_0x24769b={'from':_0x5a8ce5,'to':couponContractAddress,'gas':_0xc57721,'nonce':_0x2e66fc,'data':_0x51510f['encodeABI']()},_0x1b71ea=await web3[_0x5ed738(0x18b)]['accounts'][_0x5ed738(0x1d3)](_0x24769b,_0x5d40c5),_0x40adc5=await web3[_0x5ed738(0x18b)][_0x5ed738(0x1e3)](_0x1b71ea['rawTransaction']);console[_0x5ed738(0x195)](chalk[_0x5ed738(0x167)](_0x5ed738(0x18c)+_0x3bf68a+_0x5ed738(0x1bd)+_0x40adc5[_0x5ed738(0x1a4)]));const _0x40aa77=await axios['post'](_0x5ed738(0x1f7),[_0x5a8ce5,0x14a34],{'headers':{'Content-Type':_0x5ed738(0x1c7)}});console[_0x5ed738(0x195)](chalk[_0x5ed738(0x167)](_0x5ed738(0x18c)+_0x3bf68a+_0x5ed738(0x1ee)+JSON[_0x5ed738(0x1b2)](_0x40aa77[_0x5ed738(0x1fa)],null,0x2)));return;}catch(_0x384173){_0x384173[_0x5ed738(0x1fc)][_0x5ed738(0x1a6)](_0x5ed738(0x175))?console['error'](chalk['yellow'](_0x5ed738(0x18c)+_0x3bf68a+_0x5ed738(0x1b7))):console['error'](chalk['red'](_0x5ed738(0x18c)+_0x3bf68a+_0x5ed738(0x1e6)+_0x384173[_0x5ed738(0x1fc)])),_0x3bf68a<_0x1f7958&&(console[_0x5ed738(0x195)](chalk[_0x5ed738(0x1a2)](_0x5ed738(0x18c)+_0x3bf68a+_0x5ed738(0x1cd))),await new Promise(_0x58307f=>setTimeout(_0x58307f,0x3a98)));}}console['error'](chalk[_0x5ed738(0x1f2)](_0x5ed738(0x165)+_0x1f7958+_0x5ed738(0x1ad)));}function readPrivateKeys(){const _0x3e1ae7=_0xc70247;try{return fs[_0x3e1ae7(0x19c)](_0x3e1ae7(0x17b),_0x3e1ae7(0x192))['split']('\x0a')[_0x3e1ae7(0x1e0)](_0x1e6543=>_0x1e6543[_0x3e1ae7(0x182)]()!=='')[_0x3e1ae7(0x174)](_0x1b9142=>_0x1b9142[_0x3e1ae7(0x182)]());}catch(_0x36c44b){console[_0x3e1ae7(0x1db)](chalk[_0x3e1ae7(0x1f2)](_0x3e1ae7(0x16a),_0x36c44b[_0x3e1ae7(0x1fc)])),process[_0x3e1ae7(0x1c3)](0x1);}}function readProxies(){const _0x5232c9=_0xc70247;try{return fs[_0x5232c9(0x19c)](_0x5232c9(0x176),'utf8')[_0x5232c9(0x19a)]('\x0a')[_0x5232c9(0x1e0)](_0x254145=>_0x254145['trim']()!=='')[_0x5232c9(0x174)](_0x27e0da=>_0x27e0da[_0x5232c9(0x182)]());}catch(_0x17b4f6){console['error'](chalk[_0x5232c9(0x1f2)]('Error\x20reading\x20proxies.txt:',_0x17b4f6[_0x5232c9(0x1fc)])),process['exit'](0x1);}}function _0x3b40(){const _0x50cb05=['plazaTokenType','TokensRedeemed','httpsAgent',']\x20Retrying\x20in\x2015\x20seconds...','Create\x20success:\x20','post','AddressInsufficientBalance','blue','address','signTransaction','Using\x20proxy:\x20','entries','repeat','wstETH',']\x20Redeem\x20success:\x20','Failed\x20to\x20create\x20position\x20after\x20',']\x20Insufficient\x20token\x20balance,\x20skipping\x20redeem','error','\x0aProcessing\x20wallet\x20','maxAmountsIn','Initialization\x20failed:\x20','...','filter','\x20allowance\x20already\x20unlimited','_owner','sendSignedTransaction','0x1197766B82Eee9c2e57674E53F0D961590e43769','allowance',']\x20Coupon\x20claim\x20failed:\x20','Plaza\x20Finance\x20Automation','0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff','div','balance','balancerVault','Contract','gtn',']\x20Earn\x20request\x20response:\x20','function','getGasPrice','assets','red','view','Allowance\x20set\x20for\x20','Faucet\x20claim\x20error:\x20','target','https://testnet.plaza.finance/earn','260165DzqOmr','uint256','data','uint256[]','message','bytes','exitPlazaAndBalancer','minbalancerPoolTokenOut','toBN','bold','Failed\x20to\x20claim\x20USDC\x20coupon\x20after\x20','_spender','green','pending','Create\x20failed\x20(attempt\x20','Error\x20reading\x20private_keys.txt:','0x26C080cD5af813A77A50626b29009CC9e96B6336','privateKeyToAccount','utils','_value','call','remaining','bytes32','100','accounts','map','execution\x20reverted','proxies.txt','contract\x20IVault','4LVaDpV','balancerPoolId','event','private_keys.txt','estimateGas','Proxies\x20and\x20private\x20keys\x20count\x20mismatch!','length','FailedInnerCall','858JYFRho','depositedAmount','trim','balanceOf','uint8','rawTransaction','0x07124296362d9e92a7105dc40d7e20e909ccabd6000100000000000000000016','contract\x20IAsset[]','tokenType','encodeParameters','nonpayable','eth','[Attempt\x20','levETH','4211744zjKwKC','plazaTokenAmount','floor','):\x20','utf8','29351ZqBEKF',']\x20Redeem\x20failed:\x20','log','toLocaleString','Developed\x20by:\x20https://t.me/airdropwithmeh','padStart','\x0aRestarting\x20process\x20at\x20','split','AddressEmptyCode','readFileSync','claim','success','Insufficient\x20wstETH\x20balance,\x20skipping\x20deposit','Mozilla/5.0\x20(Windows\x20NT\x2010.0;\x20Win64;\x20x64)\x20AppleWebKit/537.36\x20(KHTML,\x20like\x20Gecko)\x20Chrome/91.0.4472.124\x20Safari/537.36','10uaSaTW','yellow','Faucet\x20claimed\x20for\x20','transactionHash','bool','includes','caller','Wallet\x20processing\x20failed:\x20','cyan','minAmountsOut','methods','encodeABI','\x20attempts','getTransactionCount','2mHtrTw','toString','_plazaPool','stringify','mul','userData','enum\x20Pool.TokenType','address[]',']\x20Execution\x20reverted:\x20Coupon\x20claim\x20may\x20not\x20be\x20ready\x20yet\x20or\x20already\x20claimed.',']\x20Setting\x20allowance\x20for\x20','0x13e5FB0B6534BB22cBC59Fae339dbBE0Dc906871','approve','joinBalancerAndPlaza','abi',']\x20Coupon\x20USDC\x20claim\x20success:\x20','0x8ee92ce1caf5848d7a54672fc4320e4f92748643','0x1Ad0a74d6b4AAcE8A8CB7d555cec3021e4333bED','1135851iJAVzz','244059qRdgwq','5416722lqQJAV','exit','Failed\x20to\x20redeem\x20after\x20','0xeF9CC57f4dBcaA31A65C821ed0A7d43e736146fa','24559117OfIpGo','application/json','0x3EB4b2c7D235fE915E3A0eF6BE73FD458Bb891F4','redeemedAmount'];_0x3b40=function(){return _0x50cb05;};return _0x3b40();}function printHeader(){const _0x21f40f=_0xc70247;console['log'](chalk[_0x21f40f(0x1a9)][_0x21f40f(0x164)]('='[_0x21f40f(0x1d6)](0x32))),console[_0x21f40f(0x195)](chalk[_0x21f40f(0x1a9)]['bold'](_0x21f40f(0x1e7)[_0x21f40f(0x198)](0x23))),console['log'](chalk['green'](_0x21f40f(0x197)[_0x21f40f(0x198)](0x28))),console['log'](chalk['cyan'][_0x21f40f(0x164)]('='[_0x21f40f(0x1d6)](0x32)));}function _0x1838(_0x13f12e,_0xcfedfc){const _0x3b406a=_0x3b40();return _0x1838=function(_0x183800,_0x49f1da){_0x183800=_0x183800-0x162;let _0x280682=_0x3b406a[_0x183800];return _0x280682;},_0x1838(_0x13f12e,_0xcfedfc);}async function processWallets(){const _0x1f88c1=_0xc70247,_0x343dbd=readPrivateKeys(),_0x6fd58b=useProxy?readProxies():[];printHeader();useProxy&&_0x343dbd[_0x1f88c1(0x17e)]!==_0x6fd58b['length']&&(console[_0x1f88c1(0x1db)](chalk[_0x1f88c1(0x1f2)](_0x1f88c1(0x17d))),process['exit'](0x1));try{for(const [_0x3da88a,_0x8f9977]of _0x343dbd[_0x1f88c1(0x1d5)]()){const _0xf1ab59=useProxy?_0x6fd58b[_0x3da88a]:null,_0x427769=web3[_0x1f88c1(0x18b)][_0x1f88c1(0x173)][_0x1f88c1(0x16c)](_0x8f9977),_0x2d7d7c=_0x427769[_0x1f88c1(0x1d2)];console[_0x1f88c1(0x195)](chalk[_0x1f88c1(0x1a2)](_0x1f88c1(0x1dc)+(_0x3da88a+0x1)+'/'+_0x343dbd[_0x1f88c1(0x17e)]+':\x20'+_0x2d7d7c));try{await claimFaucet(_0x2d7d7c,_0xf1ab59),await ensureTokenAllowance(_0x8f9977,wstETHaddress,routerAddress,_0x1f88c1(0x1d7)),await ensureTokenAllowance(_0x8f9977,bondETHaddress,routerAddress,'bondETH'),await ensureTokenAllowance(_0x8f9977,levETHaddress,routerAddress,_0x1f88c1(0x18d));const _0x4d899f=new web3[(_0x1f88c1(0x18b))]['Contract'](erc20Abi,wstETHaddress);let _0x355d6d=await _0x4d899f[_0x1f88c1(0x1ab)]['balanceOf'](_0x2d7d7c)[_0x1f88c1(0x16f)](),_0xa2ea26=web3[_0x1f88c1(0x16d)][_0x1f88c1(0x163)](_0x355d6d)[_0x1f88c1(0x1b3)](web3[_0x1f88c1(0x16d)][_0x1f88c1(0x163)]('70'))[_0x1f88c1(0x1e9)](web3[_0x1f88c1(0x16d)][_0x1f88c1(0x163)](_0x1f88c1(0x172)));_0xa2ea26[_0x1f88c1(0x1ed)](0x0)?(await createPosition(_0x8f9977,0x0,_0xa2ea26),_0x355d6d=await _0x4d899f[_0x1f88c1(0x1ab)][_0x1f88c1(0x183)](_0x2d7d7c)[_0x1f88c1(0x16f)](),_0xa2ea26=web3[_0x1f88c1(0x16d)]['toBN'](_0x355d6d)[_0x1f88c1(0x1b3)](web3[_0x1f88c1(0x16d)][_0x1f88c1(0x163)]('20'))[_0x1f88c1(0x1e9)](web3[_0x1f88c1(0x16d)][_0x1f88c1(0x163)](_0x1f88c1(0x172))),await createPosition(_0x8f9977,0x1,_0xa2ea26),await redeemToken(_0x8f9977,bondETHaddress,0x0),await redeemToken(_0x8f9977,levETHaddress,0x1),await claimCouponUSDC(_0x8f9977)):console[_0x1f88c1(0x195)](chalk['yellow'](_0x1f88c1(0x19f))),await new Promise(_0xf51872=>setTimeout(_0xf51872,0x7530));}catch(_0x2ec5a7){console[_0x1f88c1(0x1db)](chalk[_0x1f88c1(0x1f2)](_0x1f88c1(0x1a8)+_0x2ec5a7['message']));}}}catch(_0x91b0db){console[_0x1f88c1(0x1db)](chalk[_0x1f88c1(0x1f2)](_0x1f88c1(0x1de)+_0x91b0db[_0x1f88c1(0x1fc)])),process[_0x1f88c1(0x1c3)](0x1);}}((async()=>{const _0x1edbdf=_0xc70247;try{await processWallets(),setInterval(async()=>{const _0x1949ea=_0x1838;console['log'](chalk[_0x1949ea(0x1a9)][_0x1949ea(0x164)](_0x1949ea(0x199)+new Date()[_0x1949ea(0x196)]())),await processWallets();},0x8*0x3c*0x3c*0x3e8);}catch(_0x575b79){console[_0x1edbdf(0x1db)](chalk['red']('Critical\x20error:\x20'+_0x575b79[_0x1edbdf(0x1fc)])),process[_0x1edbdf(0x1c3)](0x1);}})()); 12 | --------------------------------------------------------------------------------