PageSourceSearch

https://solsale.app/_next/static/chunks/pages/admin/idoV2-f071a6c0650f1774.js

js solsale.app collected 2026-09-26 06:23:35 UTC 10,049 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[595,2915,9466],{2864:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>$});var r=n(37876),i=n(14232),o=n(77328),s=n.n(o),a=n(88997),l=n(35268),c=n(60595),d=n(41316),u=n(42993),p=n(92003),g=n(1912),x=n(36785),m=n(99427),h=n(18716),F=n(18847),f=n.n(F),y=n(31874),T=n(17381),j=n(10354),P=n(65331),v=n(67710),A=n(58198),b=n(38008),w=n(27863),S=n(99870),k=n(32602),M=n(87143),C=n(71816),I=n(82909).Buffer;let N=f()(()=>n.e(3669).then(n.bind(n,93669)),{loadableGenerated:{webpack:()=>[93669]}}),B=(0,l.Ay)(c.A)(e=>{let{theme:t}=e;return{borderRadius:12,transition:"all .5s",marginTop:t.spacing(2),padding:t.spacing(3),marginBottom:t.spacing(2),display:"flex",flexDirection:"column",overflow:"visible",position:"relative",[t.breakpoints.down("md")]:{marginTop:t.spacing(5)}}});function $(){console.log("sdfsd");let e=I.from(C),t=T.Keypair.fromSecretKey(e);console.log("feeTierWallet.publicKey.toString()"),console.log(t.publicKey.toString());let{publicKey:n,sendTransaction:o}=(0,P.v)(),{connection:a}=(0,v.w)(),l=(0,A.M)(),{program:c}=(0,y.Ww)(),[F,f]=(0,i.useState)(""),[$,_]=(0,i.useState)(""),E=[[0,0,0],0,0,0],[W,L]=(0,i.useState)(""),[K,O]=(0,i.useState)(""),[R,X]=(0,i.useState)({fixedFees:E[0],raiseTokenPercentFee:E[1],projectTokenPercentFee:E[2],penaltyFee:E[3]}),[J,D]=(0,i.useState)(!1),[U,V]=(0,i.useState)(!1),[q,G]=(0,i.useState)(!1),[Y,z]=(0,i.useState)(!1),[H,Q]=(0,i.useState)(!1),[Z,ee]=(0,i.useState)(""),[et,en]=(0,i.useState)(!1),[er,ei]=(0,i.useState)(0),[eo,es]=(0,i.useState)(!1),ea={defaultBuildOption:{maxSupportedTransactionVersion:"legacy",blockhashCommitment:"confirmed"},defaultConfirmationCommitment:"confirmed",defaultSendOption:{skipPreflight:!0}},el=async()=>{if(!n)return void(0,m.M8)("Connect your wallet to continue.",{variant:"error"});try{let e=(0,S.X)(String(R.fixedFees[0]),M.L1),r=(0,S.X)(String(R.fixedFees[1]),M.L1),i=(0,S.X)(String(R.fixedFees[2]),M.L1);if(H){let t=await c.methods.updateFeeTier(new b.BN(e),new b.BN(r),new b.BN(i),R.raiseTokenPercentFee,R.projectTokenPercentFee,R.penaltyFee).accounts({globalFeeTier:M.TI,authority:n,systemProgram:T.SystemProgram.programId}).instruction();en(!0);let s=await (0,j.Ji)(a,o,n,[t]);console.log("tx",s),s&&((0,m.M8)("Fee Tier Updated!",{variant:"success"}),en(!1))}else{T.Keypair.generate();let o=await c.methods.createFeeTier(new b.BN(e),new b.BN(r),new b.BN(i),R.raiseTokenPercentFee,R.projectTokenPercentFee,R.penaltyFee).accounts({globalFeeTier:t.publicKey,authority:n,systemProgram:T.SystemProgram.programId}).instruction();en(!0);let s=new w.TransactionBuilder(a,l,ea).addInstruction({instructions:[o],cleanupInstructions:[],signers:[t]}),d=await s.buildAndExecute();console.log("tx",d),(0,m.M8)("Fee Tier Created!",{variant:"success"}),en(!1)}}catch(e){console.log(e),(0,m.M8)((0,j.FY)(e),{variant:"error"}),en(!1)}};(0,i.useEffect)(()=>{eo||ec()},[eo]);let ec=async()=>{try{if(await a.getAccountInfo(M.TI)){var e;let t=await c.account.globalFeeTier.fetch(M.TI);if(console.log("addressInfo",t),console.log(t.owner.toString()),(null==t?void 0:t.owner)&&(null==t||null==(e=t.owner)?void 0:e.toString())==M.tN.toString()){Q(!0);let e=[],n=(0,k.J)(t.feeTier[0].toString(),M.L1),r=(0,k.J)(t.feeTier[1].toString(),M.L1),i=(0,k.J)(t.feeTier[2].toString(),M.L1);e.push(n),e.push(r),e.push(i),X({fixedFees:e,raiseTokenPercentFee:t.raiseTokenPercentFee.toString(),projectTokenPercentFee:t.projectTokenPercentFee.toString(),penaltyFee:t.penaltyPercentFee.toString()})}else{(0,m.M8)("Fee tier is not configured yet",{variant:"error"}),Q(!1),es(!0);return}}else{(0,m.M8)("Fee tier is not configured yet",{variant:"error"}),Q(!1),es(!0);return}}catch(e){console.log(e)}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s(),{children:(0,r.jsx)("title",{children:"IDOv2"})}),(0,r.jsx)(B,{sx:{p:4,mx:"auto"},children:(0,r.jsxs)(d.Ay,{container:!0,spacing:3,children:[(0,r.jsxs)(d.Ay,{item:!0,xs:12,sm:6,lg:3,children:[(0,r.jsx)(u.A,{direction:"row",alignItems:"center",spacing:.5,sx:{mb:.5},children:(0,r.jsx)(p.A,{variant:"subtitle2",color:"text.disabled",children:"Fixed Fee (Simple)"})}),(0,r.jsx)(g.A,{fullWidth:!0,type:"number",inputProps:{inputMode:"numeric",pattern:"[0-9]*"},value:R.fixedFees[0],onChange:e=>{X(t=>{let n=t.fixedFees;return n[0]=e.target.value,{...t,fixedFees:n}})},sx:{width:"100%"}})]}),(0,r.jsxs)(d.Ay,{item:!0,xs:12,sm:6,lg:3,children:[(0,r.jsx)(u.A,{direction:"row",alignItems:"center",spacing:.5,sx:{mb:.5},children:(0,r.jsx)(p.A,{variant:"subtitle2",color:"text.disabled",children:"Fixed Fee (Standard)"})}),(0,r.jsx)(g.A,{fullWidth:!0,type:"number",inputProps:{inputMode:"numeric",pattern:"[0-9]*"},value:R.fixedFees[1],onChange:e=>{X(t=>{let n=t.fixedFees;return n[1]=e.target.value,{...t,fixedFees:n}})},sx:{width:"100%"}})]}),(0,r.jsxs)(d.Ay,{item:!0,xs:12,sm:6,lg:3,children:[(0,r.jsx)(u.A,{direction:"row",alignItems:"center",spacing:.5,sx:{mb:.5},children:(0,r.jsx)(p.A,{variant:"subtitle2",color:"text.disabled",children:"Fixed Fee (Premium)"})}),(0,r.jsx)(g.A,{fullWidth:!0,type:"number",inputProps:{inputMode:"numeric",pattern:"[0-9]*"},value:R.fixedFees[2],onChange:e=>{X(t=>{let n=t.fixedFees;return n[2]=e.target.value,{...t,fixedFees:n}})},sx:{width:"100%"}})]}),(0,r.jsxs)(d.Ay,{item:!0,xs:12,sm:6,lg:3,children:[(0,r.jsx)(u.A,{direction:"row",alignItems:"center",spacing:.5,sx:{mb:.5},children:(0,r.jsx)(p.A,{variant:"subtitle2",color:"text.disabled",children:"Raise Token Percent Fee"})}),(0,r.jsx)(g.A,{fullWidth:!0,type:"number",inputProps:{inputMode:"numeric",pattern:"[0-9]*",min:"0.0001",step:"0.0001",max:"100"},value:R.raiseTokenPercentFee,onChange:e=>{X(t=>({...t,raiseTokenPercentFee:e.target.value}))},error:R.raiseTokenPercentFee>100||1e4*R.raiseTokenPercentFee-Math.floor(1e4*R.raiseTokenPercentFee)>0,helperText:R.raiseTokenPercentFee>100?"Percent Fee < 100%":1e4*R.raiseTokenPercentFee-Math.floor(1e4*R.raiseTokenPercentFee)>0?"Fraction is 4":"",sx:{width:"100%"}})]}),(0,r.jsxs)(d.Ay,{item:!0,xs:12,sm:6,lg:3,children:[(0,r.jsx)(u.A,{direction:"row",alignItems:"center",spacing:.5,sx:{mb:.5},children:(0,r.jsx)(p.A,{variant:"subtitle2",color:"text.disabled",children:"Project Token Percent Fee"})}),(0,r.jsx)(g.A,{fullWidth:!0,type:"number",inputProps:{inputMode:"numeric",pattern:"[0-9]*",min:"0.0001",step:"0.0001",max:"100"},value:R.projectTokenPercentFee,onChange:e=>{X(t=>({...t,projectTokenPercentFee:e.target.value}))},error:R.projectTokenPercentFee>100||1e4*R.projectTokenPercentFee-Math.floor(1e4*R.projectTokenPercentFee)>0,helperText:R.projectTokenPercentFee>100?"Percent Fee < 100%":1e4*R.projectTokenPercentFee-Math.floor(1e4*R.projectTokenPercentFee)>0?"Fraction is 4":"",sx:{width:"100%"}})]}),(0,r.jsxs)(d.Ay,{item:!0,xs:12,sm:6,lg:3,children:[(0,r.jsx)(u.A,{direction:"row",alignItems:"center",spacing:.5,sx:{mb:.5},children:(0,r.jsx)(p.A,{variant:"subtitle2",color:"text.disabled",children:"Penalty Percent Fee"})}),(0,r.jsx)(g.A,{fullWidth:!0,type:"number",inputProps:{inputMode:"numeric",pattern:"[0-9]*",min:"0.0001",step:"0.0001",max:"100"},value:R.penaltyFee,onChange:e=>{X(t=>({...t,penaltyFee:e.target.value}))},error:R.penaltyFee>100||1e4*R.penaltyFee-Math.floor(1e4*R.penaltyFee)>0,helperText:R.penaltyFee>100?"Percent Fee < 100%":1e4*R.penaltyFee-Math.floor(1e4*R.penaltyFee)>0?"Fraction is 4":"",sx:{width:"100%"}})]}),(0,r.jsx)(d.Ay,{item:!0,xs:12,sm:6,children:E&&(!E[0].equals(R.fixedFees)||E[1]!==R.raiseTokenPercentFee||E[2]!==R.projectTokenPercentFee||E[3]!==R.penaltyFee)?Y?(0,r.jsx)(x.A,{variant:"contained",color:"primary",sx:{marginTop:"40px"},disabled:!0,children:(0,r.jsx)(h.A,{})}):(0,r.jsx)(x.A,{variant:"contained",color:"primary",sx:{marginTop:"40px"},onClick:el,children:"Change"}):""})]})}),(0,r.jsx)(N,{open:et,title:0===er?"Updating fee tier":1===er?"Approving":2===er?"Confirming":"Redirecting",content:0===er?"Loading...":1===er?"Enable spending "+name+" on SolSale":2===er?"Confirm transaction in your wallet":title+" is being listed",progress:33*er})]})}$.getLayout=e=>(0,r.jsx)(a.A,{children:e})}
1,58198:(e,t,n)=>{"use strict";n.d(t,{M:()=>o});var r=n(14232),i=n(65331);function o(){let{publicKey:e,signTransaction:t,signAllTransactions:n}=(0,i.v)();return(0,r.useMemo)(()=>e&&t&&n?{publicKey:e,signTransaction:t,signAllTransactions:n}:void 0,[e,t,n])}},60595:(e,t,n)=>{"use strict";n.d(t,{A:()=>F});var r=n(44501),i=n(40670),o=n(14232),s=n(69241),a=n(4697),l=n(35268),c=n(31723),d=n(4342),u=n(47951),p=n(45879);function g(e){return(0,p.Ay)("MuiCard",e)}(0,u.A)("MuiCard",["root"]);var x=n(37876);let m=["className","raised"],h=(0,l.Ay)(d.A,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),F=o.forwardRef(function(e,t){let n=(0,c.A)({props:e,name:"MuiCard"}),{className:o,raised:l=!1}=n,d=(0,i.A)(n,m),u=(0,r.A)({},n,{raised:l}),p=(e=>{let{classes:t}=e;return(0,a.A)({root:["root"]},g,t)})(u);return(0,x.jsx)(h,(0,r.A)({className:(0,s.A)(p.root,o),elevation:l?8:void 0,ref:t,ownerState:u},d))})},63004:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/idoV2",function(){return n(2864)}])},71816:e=>{"use strict";e.exports=JSON.parse("[153,26,88,178,152,65,156,154,133,124,133,98,56,66,181,193,238,111,85,39,78,86,19,11,228,209,11,31,54,70,164,173,179,134,220,145,201,148,225,174,33,78,237,66,43,5,53,128,250,80,64,151,237,11,185,109,68,133,5,92,136,84,105,211]")},99870:(e,t,n)=>{"use strict";function r(e,t){let[n,r="0"]=e.split("."),i=n.startsWith("-");if(i&&(n=n.slice(1)),r=r.replace(/(0+)$/,""),0===t)1===Math.round(Number(`.${r}`))&&(n=`${BigInt(n)+1n}`),r="";else if(r.length>t){let[e,i,o]=[r.slice(0,t-1),r.slice(t-1,t),r.slice(t)],s=Math.round(Number(`${i}.${o}`));(r=s>9?`${BigInt(e)+BigInt(1)}0`.padStart(e.length+1,"0"):`${e}${s}`).length>t&&(r=r.slice(1),n=`${BigInt(n)+1n}`),r=r.slice(0,t)}else r=r.padEnd(t,"0");return BigInt(`${i?"-":""}${n}${r}`)}n.d(t,{X:()=>r})}},e=>{e.O(0,[888,5154,1362,8230,1379,7227,4587,1655,9922,8334,1316,1782,6243,6286,633,6227,8378,4329,4591,4721,4401,354,636,6593,8792],()=>e(e.s=63004)),_N_E=e.O()}]);

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.