1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[595,2915,7328],{53445:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>F});var n=t(37876),i=t(14232),a=t(77328),o=t.n(a),s=t(88997),l=t(35268),c=t(60595),d=t(42993),u=t(92003),h=t(41316),f=t(1912),x=t(36785),g=t(99427),p=t(18716),A=t(31874),m=t(17381),y=t(10354),v=t(65331),j=t(67710),b=t(87143);let w=(0,l.Ay)(c.A)(e=>{let{theme:r}=e;return{borderRadius:12,transition:"all .5s",marginTop:r.spacing(2),padding:r.spacing(3),marginBottom:r.spacing(2),display:"flex",flexDirection:"column",overflow:"visible",position:"relative",[r.breakpoints.down("md")]:{marginTop:r.spacing(5)}}});function F(){let[e,r]=(0,i.useState)(""),[t,a]=(0,i.useState)(""),[s,l]=(0,i.useState)(!0),[c,F]=(0,i.useState)(!1),{locking_cpi_program:T,addPriorityFee:P}=(0,A.Ww)(),{publicKey:C,sendTransaction:M}=(0,v.v)(),{connection:_}=(0,j.w)();(0,i.useEffect)(()=>{(async()=>{try{if(!T)return;if(l(!0),await _.getAccountInfo(b.Jr)){let e=await T.account.globalFeeTier.fetch(b.Jr);r(e.raiseTokenPercentFee.toString()),a(e.projectTokenPercentFee.toString()),(0,g.M8)("Fee tier loaded successfully",{variant:"success"})}else(0,g.M8)("Fee tier not initialized yet",{variant:"info"})}catch(e){console.error("Error fetching fee tier:",e),(0,g.M8)("Failed to load fee tier data",{variant:"error"})}finally{l(!1)}})()},[T,_]);let E=async()=>{if(!C)return void(0,g.M8)("Please connect your wallet",{variant:"error"});if(!e||!t)return void(0,g.M8)("Please fill in both fee fields",{variant:"error"});try{F(!0);let r=await T.methods.updateFeeTier(Number(e),Number(t)).accounts({globalFeeTier:b.Jr,authority:C,systemProgram:m.SystemProgram.programId}).instruction(),n=await (0,y.Ji)(_,M,C,[b.fz,P,r]);console.log("Transaction signature:",n),n&&(0,g.M8)("Fee tier updated successfully!",{variant:"success"})}catch(e){console.error("Error updating fee tier:",e),(0,g.M8)((0,y.FY)(e),{variant:"error"})}finally{F(!1)}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o(),{children:(0,n.jsx)("title",{children:"Burn & Earn - Fee Tier Management"})}),(0,n.jsx)(w,{sx:{p:4,mx:"auto",maxWidth:800},children:(0,n.jsxs)(d.A,{spacing:3,children:[(0,n.jsx)(u.A,{variant:"h4",textAlign:"center",children:"Burn & Earn Fee Tier Configuration"}),(0,n.jsx)(u.A,{variant:"body2",color:"text.secondary",textAlign:"center",children:"Configure the fee percentages for Raydium CP liquidity burning and earning rewards"}),s?(0,n.jsxs)(d.A,{alignItems:"center",py:4,children:[(0,n.jsx)(p.A,{}),(0,n.jsx)(u.A,{variant:"body2",mt:2,children:"Loading current fee tier..."})]}):(0,n.jsxs)(h.Ay,{container:!0,spacing:3,children:[(0,n.jsx)(h.Ay,{item:!0,xs:12,sm:6,children:(0,n.jsxs)(d.A,{spacing:1,children:[(0,n.jsx)(u.A,{variant:"subtitle2",color:"text.disabled",children:"Raise Token Percent Fee"}),(0,n.jsx)(f.A,{fullWidth:!0,type:"number",value:e,onChange:e=>r(e.target.value),placeholder:"1",disabled:c,inputProps:{min:0,step:1},helperText:""})]})}),(0,n.jsx)(h.Ay,{item:!0,xs:12,sm:6,children:(0,n.jsxs)(d.A,{spacing:1,children:[(0,n.jsx)(u.A,{variant:"subtitle2",color:"text.disabled",children:"Project Token Percent Fee"}),(0,n.jsx)(f.A,{fullWidth:!0,type:"number",value:t,onChange:e=>a(e.target.value),placeholder:"1",disabled:c,inputProps:{min:0,step:1},helperText:""})]})}),(0,n.jsx)(h.Ay,{item:!0,xs:12,children:(0,n.jsx)(x.A,{fullWidth:!0,variant:"contained",onClick:E,disabled:c||!C,sx:{py:1.5,fontSize:16,bgcolor:"#129B7F","&:hover":{bgcolor:"#0f8267"}},children:c?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p.A,{}),(0,n.jsx)(u.A,{ml:1,children:"Updating..."})]}):"Update Fee Tier"})}),!C&&(0,n.jsx)(h.Ay,{item:!0,xs:12,children:(0,n.jsx)(u.A,{variant:"body2",color:"error",textAlign:"center",children:"Please connect your wallet to update fee tier"})})]})]})})]})}F.getLayout=e=>(0,n.jsx)(s.A,{children:e})},60595:(e,r,t)=>{"use strict";t.d(r,{A:()=>A});var n=t(44501),i=t(40670),a=t(14232),o=t(69241),s=t(4697),l=t(35268),c=t(31723),d=t(4342),u=t(47951),h=t(45879);function f(e){return(0,h.Ay)("MuiCard",e)}(0,u.A)("MuiCard",["root"]);var x=t(37876);let g=["className","raised"],p=(0,l.Ay)(d.A,{name:"MuiCard",slot:"Root",overridesResolver:(e,r)=>r.root})(()=>({overflow:"hidden"})),A=a.forwardRef(function(e,r){let t=(0,c.A)({props:e,name:"MuiCard"}),{className:a,raised:l=!1}=t,d=(0,i.A)(t,g),u=(0,n.A)({},t,{raised:l}),h=(e=>{let{classes:r}=e;return(0,s.A)({root:["root"]},f,r)})(u);return(0,x.jsx)(p,(0,n.A)({className:(0,o.A)(h.root,a),elevation:l?8:void 0,ref:r,ownerState:u},d))})},78996:(e,r,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/burnAndEarn",function(){return t(53445)}])}},e=>
1{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=78996)),_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.