1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[248],{26426:function(e,t,n){"use strict";n.r(t),n.d(t,{depositAsset:function(){return h},fetchETHBalance:function(){return v},fetchNetworkFee:function(){return w}});var a=n(47568),s=n(828),r=n(70655),i=n(9669),u=n.n(i),c=n(13012),o=n(27646),p=n.n(o),l=n(18269),y=n.n(l),d=n(74736),f=[{asset:"USDT",decimal:6,gasLimit:1e5,contractAddress:"0xdAC17F958D2ee523a2206206994597C13D831ec7",contractABI:[{constant:!0,inputs:[{name:"who",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},{asset:"BZZ",decimal:16,gasLimit:1e5,contractAddress:"0x19062190B1925b5b6689D7073fDfC8c2976EF8Cb",contractABI:[{constant:!0,inputs:[{name:"account",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}]},{asset:"ITO",decimal:18,gasLimit:1e5,contractAddress:"0x293B0Cd0991DB07c8529fEBb01bc7D052315C5Ab",contractABI:[{constant:!0,inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}]},{asset:"OTO",decimal:18,gasLimit:1e5,contractAddress:"0x028CE5EA3298a50c0D8a27b937b1F48Cf0d68b56",contractABI:[{constant:!0,inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}]},{asset:"GEFT",decimal:2,gasLimit:1e5,contractAddress:"0xd0464A1985edB76Ba82602534a2d89d8cCf3B7Ec",contractABI:[{constant:!0,inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}]}],m="wss://mainnet.infura.io/ws/v3/922889feeaa64eaca225391f15a97b86",b=function(e,t){var n=e.slice(0,t).map((function(e){return Number(e)})).reduce((function(e,t){return e+t}));return new c.Z(n).div(t).round().valueOf()},w=function(){var e=(0,a.Z)((function(e){var t,n,a,s,i,u,o,l,d,w,v;return(0,r.__generator)(this,(function(r){switch(r.label){case 0:if(t=f.find((function(t){return t.asset===e})),!e||!t)return[2];r.label=1;case 1:return r.trys.push([1,3,,4]),n=new(p())(m),a=4,[4,n.getFeeHistory(a,"pending",[50])];case 2:return s=r.sent(),i=s.baseFeePerGas,u=s.reward,o=Number(i[a-1]),l=b(u,a-1),d=new c.Z(o).times(2).plus(l).valueOf(),w=new c.Z(d).times(t.gasLimit).valueOf(),[2,"".concat(new c.Z(y().fromWei(w,"ether")).round(8,0).valueOf()," ETH")];case 3:return v=r.sent(),console.log(v.message),[3,4];case 4:return[2]}}
1))}));return function(t){return e.apply(this,arguments)}}(),v=function(){var e=(0,a.Z)((function(e){var t,n;return(0,r.__generator)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,new(p())(m).getBalance(e)];case 1:return t=a.sent(),[2,new c.Z(y().fromWei(t,"ether")).round(8,0).valueOf()];case 2:return n=a.sent(),console.log(n.message),[3,3];case 3:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),h=function(){var e=(0,a.Z)((function(e,t,n,a){var i,o,l,y,w,v,h,g,T,A,B,O,Z,C,F,_,M,E,D,I;return(0,r.__generator)(this,(function(r){switch(r.label){case 0:if(i=f.find((function(t){return t.asset===e})),!e||!i||!t||!n||!a)return[2];o=i.contractABI,l=i.contractAddress,y=i.decimal,w=i.gasLimit,r.label=1;case 1:return r.trys.push([1,4,,5]),v=new(p())(m),h=new v.Contract(o,l),g=4,[4,Promise.all([v.getFeeHistory(g,"pending",[50]),v.getBalance(t),h.methods.balanceOf(t).call()])];case 2:return T=s.Z.apply(void 0,[r.sent(),3]),A=T[0],B=T[1],O=T[2],Z=A.baseFeePerGas,C=A.reward,F=Number(Z[g-1]),_=b(C,g-1),M=new c.Z(F).times(2).plus(_).valueOf(),E=new c.Z(M).times(w).valueOf(),D=new c.Z(O).div(Math.pow(10,y)).valueOf(),parseFloat(D)<parseFloat(a)||parseFloat(B)<parseFloat(E)?[2]:[4,u().post("".concat("https://api1.ampmcx.com","/api/v1/deposit/").concat(e),{blockchain:n,address:t},{withCredentials:!0,headers:(0,d.c)(1)})];case 3:return r.sent(),[3,5];case 4:return I=r.sent(),console.log(I.message),[3,5];case 5:return[2]}}
1))}));return function(t,n,a,s){return e.apply(this,arguments)}}()},46601:function(){},89214:function(){},85568:function(){},89519:function(){},52361:function(){},94616:function(){}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.