PageSourceSearch

https://aerodrome.finance/assets/pair.worker-cOW5yCGz.js

js aerodrome.finance collected 2026-10-02 06:15:24 UTC 3,189 bytes, 1 lines download raw bytes

1import{b as g,d as m,m as o,s as P,C as T,l as k,r as M,L as F}from"./contracts-DcsX1MC7.js";import{p as E}from"./lib-C_xr9XtR.js";import{g as H,p as q}from"./pools-l3BMkjeo.js";import{z}from"./address-DG9mKvKj.js";import{f as $}from"./formatEther-CaDowlgM.js";import"./execution-worker-Dc4cyUX5.js";import"./regex-C-cnfgZB.js";import"./isAddressEqual-Bx82kwgx.js";function N(t,s,c){return t>0?`CL${t}-${s?.symbol}/${c?.symbol}`:`${t===0?"s":"v"}AMM-${s?.symbol}/${c?.symbol}`}function x(t,s,c,n){return M({chainId:t.id,address:t.superchainConfig.sugar,abi:F,functionName:"all",args:[BigInt(c),BigInt(n),s?0n:4n]}).then(d=>d.map(i=>({...i,chainId:t.id})))}async function W(t,s){const{limit:c,upperBound:n}=await H(t);return q({limit:c,upperBound:n,fetchData:x.bind(null,t,s)})}async function X(t,s){const c=100n,n=10000n,d=g(String(24n*60n*60n)),i=g(String(c*365n)),L=g("200"),b=new Date(Date.UTC(new Date().getUTCFullYear(),new Date().getUTCMonth(),new Date().getUTCDate()-((new Date().getUTCDay()+4)%7||7),23,59,59));return(t||[]).map(e=>{const a=s[`${e.chainId}:${e.token0.toLowerCase()}`],l=s[`${e.chainId}:${e.token1.toLowerCase()}`],r=s[`${e.chainId}:${e.emissions_token.toLowerCase()}`],v=a?.balance||0n,D=l?.balance||0n,y=e.type>0?m(e.pool_fee,n,0,0):m(e.pool_fee,c,0,0),f=m(c,y,0);e.created_at>0&&e.type===-1&&(e.token0_fees=e.token0_fees*e.liquidity/10n**18n,e.token1_fees=e.token1_fees*e.liquidity/10n**18n);const h=o(e.reserve0,a?.price||0n,a?.decimals)+o(e.reserve1,l?.price||0n,l?.decimals),C=o(e.token0_fees,a?.price||0n,a?.decimals)+o(e.token1_fees,l?.price||0n,l?.decimals),S=o(C,f),A=o(e.token0_fees,f,a?.decimals,e.decimals,a?.decimals),B=o(e.token1_fees,f,l?.decimals,e.decimals,l?.decimals);let _=0n,w=0n;if(h!==0n&&e.emissions!=0n){const u=o(e.emissions,r?.price||0n,r?.decimals),U=o(u,d,r?.decimals),V=o(e.staked0,a?.price||0n,a?.decimals)+o(e.staked1,l?.price||0n,l?.decimals);_=o(m(U,V,r?.decimals),i,r?.decimals)}const I=e.gauge!==z&&e.emissions>0n&&e.gauge_alive;if(h>L&&(e.created_at||I)){let u=0n;I?u=BigInt(Math.ceil(Date.now()/1e3)-b.valueOf()/1e3):u=BigInt(Math.ceil(Date.now()/1e3)-Number(e.created_at)),w=o(P(o(m(e.token0_fees,e.reserve0,a?.decimals,a?.decimals),m(e.token1_fees,e.reserve1,l?.decimals,l?.decimals)),18),m(365n*d,u,18,0))*100n}return{...e,symbol:N(e.type,s.all[`${e.chainId}:${e.token0.toLowerCase()}`],s.all[`${e.chainId}:${e.token1.toLowerCase()}`]),address:e.lp.toLowerCase(),factory:e.factory,superchainKey:`${e.chainId}:${e.lp.toLowerCase()}`,oldCL:E.concentrated(e.type)&&e.factory.toLowerCase()!==T[e.chainId].superchainConfig.slipstreamFactory.toLowerCase(),tvl:h,apr:_,feeApr:w,token0Balance:v,token1Balance:D,poolFee:y,feesValue:C,token0Volume:A,token1Volume:B,volume:S,accountAmount0:0n,accountAmount1:0n,accountValue:0n,accountStaked0:0n,accountStaked1:0n,accountStakedValue:0n}})}function Z(t){const s=k.concat(t).flat(),c=k.orderBy(k.orderBy(s,[n=>n.symbol.split("-")[1]]),[n=>parseFloat($(n.accountValue)),n=>parseFloat($(n.accountStakedValue))],["desc","desc"]);return c.reduce((n,d)=>(n[d.chainId]||(n[d.chainId]=[]),n[d.chainId].push(d),n),{all:c})}export{W as fetchLps,Z as mergePools,X as processPools,N as symbolize};

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.