swap.pantherai.app Open in urlscan Pro
2606:4700:20::681a:bf9  Public Scan

Submitted URL: http://swap.pantherai.app/_next/static/chunks/3433-e0477241b4105bca.js
Effective URL: https://swap.pantherai.app/_next/static/chunks/3433-e0477241b4105bca.js
Submission: On November 11 via api from US — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3433],{12455:function(e,t,n){n.d(t,{BA:function(){return l},DA:function(){return o},m0:function(){return r}});var a=n(62656),i=n(56175);let s=(0,a.zo)(i.ZP)`
  width: ${e=>{let{width:t}=e;return null!=t?t:"100%"}};
  display: flex;
  align-items: ${e=>{let{align:t}=e;return null!=t?t:"center"}};
  justify-content: ${e=>{let{justify:t}=e;return null!=t?t:"flex-start"}};
  padding: ${e=>{let{padding:t}=e;return null!=t?t:"0"}};
  border: ${e=>{let{border:t}=e;return t}};
  border-radius: ${e=>{let{borderRadius:t}=e;return t}};
`,r=(0,a.zo)(s)`
  justify-content: space-between;
`;a.zo.div`
  display: flex;
  align-items: flex-end;
`;let l=(0,a.zo)(s)`
  flex-wrap: wrap;
  margin: ${e=>{let{gap:t}=e;return t&&`-${t}`}};
  justify-content: ${e=>{let{justify:t}=e;return t}};

  & > * {
    margin: ${e=>{let{gap:t}=e;return t}} !important;
  }
`,o=(0,a.zo)(s)`
  width: fit-content;
  margin: ${e=>{let{gap:t}=e;return t&&`-${t}`}};

  & > * {
    margin: ${e=>{let{gap:t}=e;return t}} !important;
  }
`;t.ZP=s},91698:function(e,t,n){var a=n(97458),i=n(52983),s=n(56028),r=n(59776),l=n(58143),o=n(99373),u=n(57562),d=n(12455),p=n(96486);t.Z=e=>{var t,n,c,m,y,g,f;let{fetchedDate:h,activeTab:x,setRefetch:b}=e,[v,T]=(0,i.useState)(0),[w,k]=(0,i.useState)(0),{address:j}=(0,r.mA)();async function stackTokens(){try{var e;let t=new p.ZPm(null===(e=window)||void 0===e?void 0:e.ethereum),n=new t.eth.Contract(s.F9[s.JU].TOKEN.abi,s.F9[s.JU].TOKEN.address),a=v;if(!a)return;if(isNaN(a)||0==a||0>Number(a)){l.ZP.error("Invalid token amount!");return}a=Number(a);let i=(0,s.x$)(a,18);console.log("tokenToTransfer",i),console.log(s.F9[s.JU].TOKEN.abi,s.F9[s.JU].TOKEN.address);let r=await n.methods.balanceOf(j).call();if(r=Number(r)/1e18,console.log("balMainUser",r),r<a){l.ZP.error(`insufficient tokens on ${s.F9[s.JU].network_name}.
Please buy some tokens first!`);return}let o=await n.methods.allowance(j,s.F9[s.JU].STACKING[x].address).call();console.log("balMainAllowance",o),Number(o)<Number(i)?await approveTokenSpend(i,x):await stackTokenMain(i,x)}catch(e){l.ZP.error((0,s.Rx)(e))}}async function approveTokenSpend(e,t){try{var n;let a=new p.ZPm(null===(n=window)||void 0===n?void 0:n.ethereum),i=new a.eth.Contract(s.F9[s.JU].TOKEN.abi,s.F9[s.JU].TOKEN.address),r=await i.methods.approve(s.F9[s.JU].STACKING[t].address,e).estimateGas({from:j});console.log("gasEstimation",r),i.methods.approve(s.F9[s.JU].STACKING[t].address,e).send({from:j,gas:r.toString(),gasPrice:"5000000000"}).on("transactionHash",e=>{console.log("Transaction Hash: ",e)}).on("receipt",n=>{console.log(n),stackTokenMain(e,t)}).catch(e=>{console.log(e),l.ZP.error((0,s.Rx)(e))})}catch(e){l.ZP.error((0,s.Rx)(e)),console.log(e);return}}async function stackTokenMain(e,t){let n=(0,s.yJ)(t);try{let t=await n.methods.stake(e).estimateGas({from:j});console.log("gasEstimation",t),n.methods.stake(e).send({from:j,gas:t.toString(),gasPrice:"5000000000"}).on("transactionHash",e=>{console.log("Transaction Hash: ",e)}).on("receipt",e=>{console.log(e)}).catch(e=>{l.ZP.error((0,s.Rx)(e)),console.log(e)})}catch(e){l.ZP.error((0,s.Rx)(e)),console.log(e);return}}async function unstackTokens(){try{let e=w;if(!e)return;if(isNaN(e)||0==e||0>Number(e)){l.ZP.error("Invalid token amount!");return}e=Number(e);let t=(0,s.x$)(e,18);console.log("tokenToTransfer",t);let n=(0,s.yJ)(x),a=await n.methods.getUser(j).call();if(a=Number(a.stakeAmount)/1e18,console.log("balMainUser",a),a<e){l.ZP.error(`insufficient staked tokens on ${s.F9[s.JU].network_name}!`);return}await unstackTokenMain(t,n,x)}catch(e){console.log(e),l.ZP.error((0,s.Rx)(e))}}async function unstackTokenMain(e,t,n){try{let n=await t.methods.unstake(e).estimateGas({from:j});console.log("gasEstimation",n),t.methods.unstake(e).send({from:j,gas:n,gasPrice:"5000000000"}).on("transactionHash",e=>{console.log("Transaction Hash: ",e)}).on("receipt",e=>{console.log(e),b(Math.random())}).catch(e=>{console.log(e),l.ZP.error((0,s.Rx)(e))})}catch(e){console.log(e),l.ZP.error((0,s.Rx)(e));return}}async function claimTokens(){try{let e=(0,s.yJ)(x),t=await e.methods.getUserEstimatedRewards().call({from:j});if(t=Number(t),console.log("rewardBal",t),!t){l.ZP.error("insufficient reward tokens to claim!");return}await claimTokenMain(e,x)}catch(e){console.log(e),l.ZP.error((0,s.Rx)(e))}}async function claimTokenMain(e,t){try{let t=await e.methods.claimReward().estimateGas({from:j});console.log("gasEstimation",t),e.methods.claimReward().send({from:j,gas:t,gasPrice:"5000000000"}).on("transactionHash",e=>{console.log("Transaction Hash: ",e)}).on("receipt",e=>{console.log(e),b(Math.random())}).catch(e=>{console.log(e),l.ZP.error((0,s.Rx)(e))})}catch(e){console.log(e),l.ZP.error((0,s.Rx)(e));return}}return(0,a.jsx)("div",{className:"col-lg-6 pr-25 md-pr-15",children:(0,a.jsxs)("div",{className:"project-item",children:[j&&(0,a.jsxs)("div",{className:"project-form-list wallet-connected-block",children:[(0,a.jsxs)("h5",{style:{marginBottom:"20px"},id:"user-main-balance",children:[(0,a.jsx)("span",{style:{color:"#b8add2"},children:"Balance:"})," ",null==h?void 0:null===(t=h.userBalance)||void 0===t?void 0:t.userMainBalance]}),(0,a.jsxs)("div",{className:"balance-form-area stake-btn-block",style:{display:(null==h?void 0:h.showStakeForm)?"block":"none"},children:[(0,a.jsxs)(d.ZP,{children:[(0,a.jsx)(o.Z,{id:"amount-to-stack",type:"number",min:50,max:null==h?void 0:null===(c=h.maxStakeAmount)||void 0===c?void 0:null===(n=c.toString())||void 0===n?void 0:n.split(" ")[0],value:v,onChange:e=>T(parseFloat(e.target.value)),placeholder:"00.00",style:{borderRadius:"5px"}}),(0,a.jsx)(u.Z,{variant:"tertiary",padding:0,style:{padding:"0px 10px",fontSize:"0.8rem",marginLeft:"20px",borderRadius:"7px"},className:"max max-stake",onClick:()=>{var e,t,n;let a=null==h?void 0:null===(n=h.userBalance)||void 0===n?void 0:null===(t=n.userMainBalance)||void 0===t?void 0:null===(e=t.toString())||void 0===e?void 0:e.split(" ")[0],i=parseFloat(a);isNaN(i)||T(i)},children:"MAX"})]}),(0,a.jsx)(u.Z,{style:{margin:"1rem 0",marginBottom:"2rem",borderRadius:"5px",width:"100%"},onClick:stackTokens,children:"Stake"})]}),(0,a.jsxs)("div",{className:"balance-form-area stake-btn-block",style:{display:(null==h?void 0:h.showStakeForm)?"block":"none"},children:[(0,a.jsxs)(d.ZP,{children:[(0,a.jsx)(o.Z,{id:"amount-to-stack",type:"number",min:"0",max:null==h?void 0:null===(g=h.userBalance)||void 0===g?void 0:null===(y=g.userStakeBalance)||void 0===y?void 0:null===(m=y.toString())||void 0===m?void 0:m.split(" ")[0],value:w,onChange:e=>k(parseFloat(e.target.value)),placeholder:"00.00",style:{borderRadius:"5px"}}),(0,a.jsx)(u.Z,{variant:"tertiary",padding:0,style:{padding:"0px 10px",fontSize:"0.8rem",marginLeft:"20px",borderRadius:"7px"},className:"max max-stake",onClick:()=>{var e,t,n;let a=null==h?void 0:null===(n=h.userBalance)||void 0===n?void 0:null===(t=n.userStakeBalance)||void 0===t?void 0:null===(e=t.toString())||void 0===e?void 0:e.split(" ")[0],i=parseFloat(a);isNaN(i)||k(i)},children:"MAX"})]}),(0,a.jsx)(u.Z,{style:{margin:"1rem 0",marginBottom:"3rem",borderRadius:"5px",width:"100%"},onClick:unstackTokens,children:"Withdraw"})]}),(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,a.jsxs)(u.Z,{type:"button",className:"readon black-shape-big connect-wallet-btn-for-mobile",id:"claim-btn",onClick:claimTokens,style:{marginBottom:"1rem"},children:["Claim Reward: ",null==h?void 0:null===(f=h.userBalance)||void 0===f?void 0:f.userRewardBalance]})})]}),(0,a.jsx)("div",{children:(0,a.jsx)("p",{className:"mt-10 mb-0",children:(0,a.jsx)("i",{style:{fontSize:"14px"},children:"*- T&C Applies"})})})]})})}},37034:function(e,t,n){n.d(t,{Z:function(){return stacking_Pricing}});var a=n(97458),i=n(52983),CountDown=e=>{let{targetTimestamp:t}=e,calculateTimeLeft=()=>{let e=new Date(t).getTime()-new Date().getTime(),n={days:0,hours:0,minutes:0,seconds:0};return e>0&&(n={days:Math.floor(e/864e5),hours:Math.floor(e%864e5/36e5),minutes:Math.floor(e%36e5/6e4),seconds:Math.floor(e%6e4/1e3)}),n},[n,s]=(0,i.useState)();return(0,i.useEffect)(()=>{let e=setInterval(()=>{s(calculateTimeLeft())},1e3);return console.log(`time is ----- ${t}`),()=>clearInterval(e)},[t]),(0,a.jsxs)("div",{style:{display:"flex",gap:"0.5rem",alignItems:"center",justifyContent:"center"},children:[(0,a.jsxs)("div",{children:[null==n?void 0:n.days," D"]}),(0,a.jsxs)("div",{children:[null==n?void 0:n.hours," H"]}),(0,a.jsxs)("div",{children:[null==n?void 0:n.minutes," M"]}),(0,a.jsxs)("div",{children:[null==n?void 0:n.seconds," S"]})]})},s=n(37939),stacking_Pricing=e=>{var t,n;let{fetchedData:i}=e,{isMobile:r}=(0,s.Z)();return(0,a.jsxs)("div",{className:"col-lg-6 pl-25 md-pl-15",children:[(0,a.jsxs)("div",{style:{marginBottom:"1rem",textAlign:"center"},children:[(0,a.jsx)("h3",{style:{fontSize:"1.1rem",marginBottom:"0.5rem"},id:"total-locked-tokens",children:null==i?void 0:i.totalStoked}),(0,a.jsx)("span",{children:"Total Staked Tokens"})]}),(0,a.jsxs)("div",{style:{marginBottom:"1rem",textAlign:"center"},children:[(0,a.jsx)("h3",{style:{fontSize:"1.1rem",marginBottom:"0.5rem"},id:"user-staked-balance",children:null!==(n=null==i?void 0:null===(t=i.userBalance)||void 0===t?void 0:t.userStakeBalance)&&void 0!==n?n:"0 PAI"}),(0,a.jsx)("span",{children:"Your Staked Tokens"})]}),(null==i?void 0:i.endingDate)&&(0,a.jsxs)("div",{style:{marginBottom:"1rem",textAlign:"center"},children:[(0,a.jsx)("h3",{style:{fontSize:"1.1rem",marginBottom:"0.5rem"},children:(0,a.jsx)(CountDown,{targetTimestamp:null==i?void 0:i.endingDate})}),(0,a.jsx)("span",{className:"countdown-title",children:"Remaining To Staking End"})]}),(null==i?void 0:i.startingDate)&&(0,a.jsxs)("div",{style:{marginBottom:"1rem",textAlign:"center"},children:[(0,a.jsx)("h3",{style:{fontSize:"1.1rem",marginBottom:"0.5rem"},children:(0,a.jsx)(CountDown,{targetTimestamp:null==i?void 0:i.startingDate})}),(0,a.jsx)("span",{className:"countdown-title",children:"Remaining To Staking Start"})]})]})}},37574:function(e,t,n){var a=n(97458),i=n(52983),s=n(37939),r=n(57562),l=n(12455);let Tab=e=>{let{tab:t,fetchedData:n}=e,{isMobile:i}=(0,s.Z)();return(0,a.jsx)("div",{id:t.id,className:"stake-tab-content",children:(0,a.jsx)("div",{className:"project-media mb-40",children:(0,a.jsxs)("ul",{className:"project-listing",children:[(0,a.jsxs)("div",{style:{paddingBottom:"20px",color:"#b8add2"},children:["Lock period: ",(0,a.jsx)("span",{style:{color:"#fff",fontWeight:"bolder"},children:t.content.lockPeriod}),(0,a.jsxs)("div",{style:{float:"right",marginTop:i?"1rem":0},children:[(0,a.jsx)("span",{style:{fontSize:"1.1rem",marginLeft:"10px",color:"#fff"},children:"APY Rate"}),(0,a.jsx)("br",{}),(0,a.jsx)("span",{style:{fontSize:"2rem",fontWeight:"bolder",color:"yellow"},children:t.content.apyRate})]})]}),(0,a.jsxs)("div",{style:{paddingBottom:"20px",color:"#b8add2"},children:["Minimum Staking Amount:",(0,a.jsx)("span",{style:{marginLeft:"5px",fontWeight:"bolder",color:"#fff"},className:"x-min-stake-amount",children:null==n?void 0:n.minStakeAmount})]}),(0,a.jsxs)("div",{style:{paddingBottom:"20px",color:"#b8add2"},children:["Maximum Staking Amount:",(0,a.jsx)("span",{style:{marginLeft:"5px",fontWeight:"bolder",color:"#fff"},className:"x-max-stake-amount",children:t.content.max})]}),(0,a.jsxs)("div",{style:{paddingBottom:"20px",color:"#b8add2"},children:["Additional Reward*:",(0,a.jsx)("span",{style:{marginLeft:"5px",fontWeight:"bolder",color:"#fff"},className:"x-max-stake-amount",children:t.content.reward})]}),(0,a.jsxs)("div",{style:{paddingBottom:"20px",color:"#b8add2"},children:["Status:",(0,a.jsx)("span",{style:{marginLeft:"5px",fontWeight:"bolder",color:"#fff"},className:"x-max-stake-amount",children:null==n?void 0:n.stakePauseText})]})]})})})};t.Z=e=>{let{activeTab:t,setActiveTab:n,content:s,tabs:o}=e,openTab=e=>{let t=document.getElementsByClassName("stake-tab-content");for(let e=0;e<t.length;e++)t[e].style.display="none";let a=document.getElementsByClassName("stake-tab-links");for(let e=0;e<a.length;e++)a[e].className=a[e].className.replace(" active","");document.getElementById(e).style.display="block",n(e)};return(0,i.useEffect)(()=>{var e;null===(e=document.getElementById("defaultOpen"))||void 0===e||e.click()},[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.ZP,{style:{justifyContent:"space-between",flexWrap:"wrap",gap:"0.5rem"},children:o.map(e=>(0,a.jsxs)(r.Z,{onClick:()=>openTab(e.name),style:{color:"#fff",background:t===e.name?"#21193a":"transparent",border:"2px solid #0e0e2c66",borderRadius:7,display:"flex",flexDirection:"column",height:t===e.name?"70px":"60px"},id:e.selected?"defaultOpen":void 0,children:[(0,a.jsx)("p",{className:"h6",children:e.label}),e.limited&&(0,a.jsx)("p",{style:{fontSize:"9px",color:"yellow",padding:"5px"},children:"Limited Offer"}),e.locked&&(0,a.jsx)("p",{style:{fontSize:"9px",color:"yellow",padding:"5px"},children:"Locked \uD83D\uDD12"})]},e.id))}),(0,a.jsx)("div",{className:"project-content",style:{marginTop:"2rem"},children:o.map(e=>(0,a.jsx)(Tab,{tab:e,fetchedData:s},e.id))})]})}},45531:function(e,t,n){var a=n(97458),i=n(10136),s=n(63633),r=n(37939),l=n(40749);n(52983);var o=n(56028),u=n(55589),d=n.n(u);t.Z=e=>{let{transactions:t}=e,{isMobile:n}=(0,r.Z)();return console.log(t),(0,a.jsxs)("div",{style:{width:"100%",margin:n?"0 0":"2rem 0"},children:[(0,a.jsx)(i.Z,{title:"Transaction History"}),(0,a.jsx)(s.y6,{className:"table-responsive",style:{padding:"2rem",borderRadius:"20px",width:"100%",height:"100%",borderTopRightRadius:0,borderTopLeftRadius:0},children:(0,a.jsxs)("table",{style:{width:"100%",textAlign:"center",gap:"1rem",borderCollapse:"collapse"},children:[(0,a.jsx)("thead",{children:t.length>0&&(0,a.jsxs)("tr",{children:[!n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("th",{style:{color:"#7D7AFF",padding:"1rem 5px"},children:"No"}),(0,a.jsx)("th",{style:{color:"#7D7AFF",padding:"1rem 5px"},children:"Type"})]}),(0,a.jsx)("th",{style:{color:"#7D7AFF",padding:"1rem 5px"},children:"Date"}),!n&&(0,a.jsx)("th",{style:{color:"#7D7AFF",padding:"1rem 5px"},children:"Fee"}),(0,a.jsx)("th",{style:{color:"#7D7AFF",padding:"1rem 5px"},children:"Amount"}),!n&&(0,a.jsx)("th",{style:{color:"#7D7AFF",padding:"1rem 5px"},children:"Status"}),(0,a.jsx)("th",{style:{color:"#7D7AFF",padding:"1rem 5px"},children:"Explore"})]})}),(0,a.jsxs)("tbody",{children:[d()(t)&&(null==t?void 0:t.map((e,t)=>{var i;return(0,a.jsxs)("tr",{children:[!n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{style:{padding:"1rem 5px"},children:t+1}),(0,a.jsx)("td",{style:{padding:"1rem 5px"},children:e.transaction_type})]}),(0,a.jsx)("td",{style:{padding:"1rem 5px"},children:null===(i=e.transaction_time)||void 0===i?void 0:i.toLocaleString()}),!n&&(0,a.jsx)("td",{style:{padding:"1rem 5px"},children:e.fee?`${e.fee} ${o.F9[o.JU].TOKEN.symbol}`:"-"}),(0,a.jsxs)("td",{style:{padding:"1rem 5px"},children:[e.amount," ",o.F9[o.JU].TOKEN.symbol]}),!n&&(0,a.jsx)("td",{style:{padding:"1rem 5px"},children:e.status}),(0,a.jsx)("td",{style:{padding:"1rem 5px"},align:"center",children:(0,a.jsx)(l.Z,{href:"#",style:{textAlign:"center"}})})]})})),(null==t?void 0:t.length)==0&&(0,a.jsx)("p",{style:{opacity:"0.6"},children:"No Transactions"})]})]})})]})}},56028:function(e,t,n){n.d(t,{F9:function(){return s},JU:function(){return i},Rx:function(){return formatEthErrorMsg},e:function(){return refreshBal},el:function(){return r},uY:function(){return getTxhistory},x$:function(){return addDecimal},yJ:function(){return getContractObj}});var a=n(96486);function addDecimal(e,t){let n=`${e}`.split(".");return n[1]?(n[1].length>t&&(n[1]=n[1].slice(0,t)),n[0]+n[1]+"0".repeat(t-n[1].length)):n[0]+"0".repeat(t)}let i=56,s={},r=new a.ZPm("https://bsc-dataseed.binance.org/");function getContractObj(e){var t;console.log("sClass",e);let n=new a.ZPm(null===(t=window)||void 0===t?void 0:t.ethereum);return new n.eth.Contract(s[i].STACKING.abi,s[i].STACKING[e].address)}async function refreshBal(e,t){var n;let r=new a.ZPm(null===(n=window)||void 0===n?void 0:n.ethereum);console.log(JSON.stringify(r));try{let n=new r.eth.Contract(s[i].TOKEN.abi,s[i].TOKEN.address),a=await n.methods.balanceOf(t).call();console.log("nBalMain",a);let l=BigInt(a)/BigInt(1e18),o=getContractObj(e),u=await o.methods.getUser(t).call();console.log("nBalStack",u.stakeAmount);let d=BigInt(u.stakeAmount)/BigInt(1e18);alert(`total: ${a} stacked: ${u.stakeAmount}`);let p=await o.methods.getUserEstimatedRewards().call({from:t});return console.log("rewardBal",p),{userMainBalance:`${l} ${s[i].TOKEN.symbol}`,userStakeBalance:`${d} ${s[i].TOKEN.symbol}`,userRewardBalance:`${BigInt(p)/BigInt(1e18)} ${s[i].TOKEN.symbol}`}}catch(e){console.log(e.stack)}}async function getTxhistory(e,t){try{console.log("in tx history");let n=s[i].STACKING[e].address,a=await fetch("https://7yjhmmd390.execute-api.ap-south-1.amazonaws.com/prod/staking/list",{body:JSON.stringify({from_address:t,to_address:n,nLimit:100,nStart:0}),method:"POST"}),r=await a.json();if(r.length)for(let e=0;e<r.length;e++){let{transaction_hash:n}=r[e];n.slice(0,7),n.slice(t.length-7,t.length),r[e].fee,s[i].TOKEN.symbol,r[e].fee}return{history:r}}catch(e){console.log(e)}}function formatEthErrorMsg(e){try{let t=e.message.indexOf("{"),n=e.message.lastIndexOf("}"),a=e.message.indexOf("TokenStaking: "),i=e.message.indexOf("ERC20 : "),s=e.message.indexOf("Internal JSON-RPC error");if(-1!=t&&-1!=n&&(-1!=a||-1!=i)){let i=JSON.parse(e.message.substr(t,n)),r=-1!=s?i.message:i.originalError.message;if(-1!=a)return r.split("TokenStaking: ")[1];return r.split("ERC20 : ")[1]}return e.message}catch(e){return console.log(e),"Something Went Wrong!"}}s[i]={network_name:"BNB Smart Chain Mainnet",explorer_url:"https://bscscan.com",STACKING:{sevenDays:{address:"0x977465558F4857ac11A4800E80c15F07810d5747"},tenDays:{address:"0xa914722Ea5EE6d1952cb53151F187052aef9be22"},thirtyTwoDays:{address:"0xd6Ae2EB0e7AF7048EDFe4Ce86256837eB8F2728A"},ninetyDays:{address:"0x76F2710aFBeDdFd42F66Fb2e746A35E5592c6320"},lock6M:{address:"0xbF7F4a6EB5de7817d6943972544e1808DBE89581"},lock2Y:{address:"0x994287134D475b7f416Bc1c2FBb117e6E68B64Fd"},lock3Y:{address:"0x84119a9A1867475c6b2604478485211Ac6d42e5b"},unstakeDays:{address:"0x21c0209dAa9aFaEd0ABD9132F0016D65f1D5e314"},abi:[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ClaimReward",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"EarlyUnStakeFee",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"version",type:"uint8"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"Stake",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"UnStake",type:"event"},{inputs:[],name:"APY_RATE_CHANGE_THRESHOLD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERCENTAGE_DENOMINATOR",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"claimReward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getAPY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEarlyUnstakeFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxStakingTokenLimit",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMinimumStakingAmount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakeDays",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakeEndDate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakeStartDate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStakingStatus",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTotalStakedTokens",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTotalUsers",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"userAddress",type:"address"}],name:"getUser",outputs:[{components:[{internalType:"uint256",name:"stakeAmount",type:"uint256"},{internalType:"uint256",name:"rewardAmount",type:"uint256"},{internalType:"uint256",name:"lastStakeTime",type:"uint256"},{internalType:"uint256",name:"lastRewardCalculationTime",type:"uint256"},{internalType:"uint256",name:"rewardsClaimedSoFar",type:"uint256"}],internalType:"struct PantheraiStaking.User",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserEstimatedRewards",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWithdrawableAmount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"},{internalType:"address",name:"tokenAddress_",type:"address"},{internalType:"uint256",name:"apyRate_",type:"uint256"},{internalType:"uint256",name:"minimumStakingAmount_",type:"uint256"},{internalType:"uint256",name:"maxStakeTokenLimit_",type:"uint256"},{internalType:"uint256",name:"stakeStartDate_",type:"uint256"},{internalType:"uint256",name:"stakeEndDate_",type:"uint256"},{internalType:"uint256",name:"stakeDays_",type:"uint256"},{internalType:"uint256",name:"earlyUnstakeFeePercentage_",type:"uint256"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"isStakeHolder",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"stake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"user",type:"address"}],name:"stakeForUser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"toggleStakingStatus",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newApyRate",type:"uint256"}],name:"updateAPYRate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newPercentage",type:"uint256"}],name:"updateEarlyUnstakeFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newAmount",type:"uint256"}],name:"updateMaximumStakingAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newAmount",type:"uint256"}],name:"updateMinimumStakingAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newDate",type:"uint256"}],name:"updateStakingEndDate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"}]},TOKEN:{symbol:"PAI",address:"0x13a5c811093dd001C328b59a0CC9deC88951F042",abi:[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"burner",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"feeType",type:"string"},{indexed:!1,internalType:"uint256",name:"oldPercent",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newPercent",type:"uint256"}],name:"FeePercentChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_spender",type:"address"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_value",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"changeOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newFeePercent",type:"uint256"}],name:"changeOwnerFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newFeePercent",type:"uint256"}],name:"changeTeamFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"ownerFeePercent",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"teamAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"teamFeePercent",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_to",type:"address"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_from",type:"address"},{internalType:"address",name:"_to",type:"address"},{internalType:"uint256",name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"success",type:"bool"}],stateMutability:"nonpayable",type:"function"}]}}},1837:function(e,t,n){var a=n(52983),i=n(56028);t.Z=(e,t,n)=>{let[s,r]=(0,a.useState)(""),[l,o]=(0,a.useState)(""),[u,d]=(0,a.useState)(""),[p,c]=(0,a.useState)(""),[m,y]=(0,a.useState)(""),[g,f]=(0,a.useState)(""),[h,x]=(0,a.useState)(!1),[b,v]=(0,a.useState)(!1),[T,w]=(0,a.useState)({}),[k,j]=(0,a.useState)(null),[S,N]=(0,a.useState)(null),[M,A]=(0,a.useState)([]),[F,B]=(0,a.useState)(""),fetchInitData=async()=>{try{let n;let a=new i.el.eth.Contract(i.F9[i.JU].STACKING.abi,i.F9[i.JU].STACKING[e].address),s=await a.methods.getTotalStakedTokens().call();r(`${BigInt(s)/BigInt(1e18)} ${i.F9[i.JU].TOKEN.symbol}`);let l=await a.methods.getTotalUsers().call();console.log("totalUsers",l),o(l);let u=await a.methods.getEarlyUnstakeFeePercentage().call();console.log("earlyUnstakeFee",u),d(`${BigInt(u)/BigInt(100)}%`);let p=await a.methods.getMinimumStakingAmount().call();p=Number(p),console.log("minStakeAmountT",p);let m="";m=p?`${(BigInt(p)/BigInt(1e18)).toLocaleString()} ${i.F9[i.JU].TOKEN.symbol}`:"N/A",c(m),y(`${1e6.toLocaleString()} ${i.F9[i.JU].TOKEN.symbol}`);let g=await a.methods.getStakingStatus().call();console.log("isStakingPaused",g);let h=await a.methods.getStakeStartDate().call();h=1e3*Number(h),console.log("startDate",h);let b=await a.methods.getStakeEndDate().call();b=1e3*Number(b),console.log("endDate",b);let T=new Date().getTime();console.log("currentDate",T),n=g?"Paused":T<h?"Locked":T>b?"Ended":"Active",f(n),T>h&&T<b?j(b):j(null),T<h?N(h):N(null),T>b||g?v(!1):v(!0);let k=await a.methods.getAPY().call();if(console.log("cApy",k),B(`${BigInt(k)/BigInt(100)} %`),t){console.log("adadadadadadadas",g),(T>h&&T<b||T>b)&&x(!0),alert(t);let{userStakeBalance:n,userRewardBalance:a,userMainBalance:s}=await (0,i.e)(e,t);w({userStakeBalance:n,userRewardBalance:a,userMainBalance:s});let{history:r}=await (0,i.uY)(e,t);A(r)}}catch(e){var n;alert(`outer ${null!==(n=e.message)&&void 0!==n?n:JSON.stringify(e)}`),console.log(e)}};return(0,a.useEffect)(()=>{fetchInitData()},[e,t,n]),{totalStoked:s,totalUsers:l,unstakeFee:u,minStakeAmount:p,maxStakeAmount:m,stakePauseText:g,showWalletConnected:h,showStakeForm:b,userBalance:T,endingDate:k,startingDate:S,userHistory:M,apy:F}}},63633:function(e,t,n){n.d(t,{Eh:function(){return u},Ob:function(){return o},SS:function(){return d},_J:function(){return r},y6:function(){return l}});var a=n(62656),i=n(24216),s=n(39290);let r=(0,a.zo)(i.Z)`
  cursor: pointer;
  display: flex;
  justify-content: start;
  gap: 5px;
`,l=(0,a.zo)(s.Z)`
  width: 100%;
  padding-top: 16px;
  flex-direction: column;
  gap: 16px;
  background-color: ${e=>{let{theme:t}=e;return t.card.background}};
  border: 1px solid ${e=>{let{theme:t}=e;return t.colors.cardBorder}};
  border-radius: ${e=>{let{theme:t}=e;return t.radii.card}};
  ${e=>{let{theme:t}=e;return t.mediaQueries.md}} {
    border-radius: ${e=>{let{theme:t}=e;return t.radii.card}};
  }
  overflow: hidden;
`,o=a.zo.div`
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.2em;
  margin-bottom: 1.2em;
`,u=a.zo.div`
  color: ${e=>{let{theme:t}=e;return t.colors.primary}};
  padding: 0 20px;
  &:hover {
    cursor: pointer;
  }
`,d=a.zo.div`
  height: 1px;
  background-color: ${e=>{let{theme:t}=e;return t.colors.cardBorder}};
  width: 100%;
`},10136:function(e,t,n){var a=n(97458);n(52983);var i=n(63453),s=n(24216);t.Z=e=>{let{title:t}=e;return(0,a.jsx)(i.Z,{children:(0,a.jsx)(s.Z,{fontSize:"20px",bold:!0,children:t})})}},63453:function(e,t,n){var a=n(21058),i=n(62656),s=n(13729);let r=i.zo.div.withConfig({shouldForwardProp:a.ZP})`
  background: ${e=>{let{theme:t,variant:n="default"}=e;return t.card.cardHeaderBackground[n]}};
  border-radius: ${e=>{let{theme:t}=e;return`${t.radii.card} ${t.radii.card} 0 0`}};
  ${s.Dh}
`;r.defaultProps={p:"24px"},t.Z=r},98642:function(e,t,n){var a=n(97458);n(52983);var i=n(91204);t.Z=e=>(0,a.jsxs)(i.Z,{viewBox:"0 0 24 24",...e,children:[(0,a.jsx)("g",{clipPath:"url(#clip0_2587_118570)",children:(0,a.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92c-.5.51-.86.97-1.04 1.69-.08.32-.13.68-.13 1.14h-2v-.5a3.997 3.997 0 011.17-2.83l1.24-1.26c.46-.44.68-1.1.55-1.8a1.99 1.99 0 00-1.39-1.53c-1.11-.31-2.14.32-2.47 1.27-.12.37-.43.65-.82.65h-.3C8.4 9 8 8.44 8.16 7.88a4.008 4.008 0 013.23-2.83c1.52-.24 2.97.55 3.87 1.8 1.18 1.63.83 3.38-.19 4.4z"})}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"clip0_2587_118570",children:(0,a.jsx)("path",{fill:"#fff",d:"M0 0H24V24H0z"})})})]})},45900:function(e,t,n){var a=n(97458),i=n(52983),s=n(98642),r=n(3411);let l={};t.Z=e=>{let{srcs:t,useFilledIcon:n,alt:o,...u}=e,[,d]=(0,i.useState)(0),p=t.find(e=>!l[e]);return p?(0,a.jsx)("img",{...u,alt:o,src:p,onError:()=>{p&&(l[p]=!0),d(e=>e+1)}}):n?(0,a.jsx)(s.Z,{color:"textSubtle",...u}):(0,a.jsx)(r.Z,{...u})}}}]);
//# sourceMappingURL=3433-e0477241b4105bca.js.map