From 3f3b2d1d736790096e6827d4fdd633ba5fc9e959 Mon Sep 17 00:00:00 2001 From: PumpBase Date: Tue, 21 Oct 2025 07:51:27 -0700 Subject: [PATCH 1/2] adding PumpBase Project Adapter --- projects/PumpBase/index.js | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 projects/PumpBase/index.js diff --git a/projects/PumpBase/index.js b/projects/PumpBase/index.js new file mode 100644 index 0000000000..73f4f6f17f --- /dev/null +++ b/projects/PumpBase/index.js @@ -0,0 +1,48 @@ +const { getLogs } = require('../helper/cache/getLogs') + +const FACTORY = '0x19798E390E69a36814B25BbBC7e75530E8a0A101' +const WETH = '0x4200000000000000000000000000000000000006' +const INITIAL_LIQUIDITY = 1500_000_000_000_000_000n + +const abi = { + bondingCurveMap: "function bondingCurveMap(address) view returns (address)", + getReserves: "function getReserves() view returns (uint256 _reserveEth, uint256 _reserveToken)", + Deployed: "event Deployed(address indexed token, address indexed bondingCurve, address indexed creator, uint256 timestamp)", +} + +async function tvl(api) { + const logs = await getLogs({ + api, + target: FACTORY, + topics: ['0x0aca3d0708cc06a2b4b4bedc6fe1b5febc7f70a1c413ac1fb594bc32c911df16'], + fromBlock: 36935000, + }) + + if (logs.length === 0) return + + const allTokens = logs.map(log => `0x${log.topics[1].slice(26)}`).map(token => token.toLowerCase()) + const tokens = [...new Set(allTokens)] + + const bondingCurves = await api.multiCall({ abi: abi.bondingCurveMap, calls: tokens, target: FACTORY }) + const reserves = await api.multiCall({ abi: abi.getReserves, calls: bondingCurves }) + + let totalEth = 0n + + reserves.forEach(([reserveEth, reserveToken], i) => { + const actualEth = BigInt(reserveEth) - INITIAL_LIQUIDITY + if (actualEth > 0n) { + totalEth += actualEth + } + api.add(tokens[i], reserveToken) + }) + + if (totalEth > 0n) { + api.add(WETH, totalEth) + } +} + +module.exports = { + methodology: 'Counts ETH and tokens locked in bonding curves. ETH reserves are calculated by subtracting the fake initial liquidity (1.5 ETH) from the total reserves.', + start: 1728936000, + base: { tvl } +} From 686d3f91bb003397396cc5857835685488306fba Mon Sep 17 00:00:00 2001 From: PumpBase Date: Wed, 22 Oct 2025 17:40:14 -0700 Subject: [PATCH 2/2] Update PumpBase index --- projects/PumpBase/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/PumpBase/index.js b/projects/PumpBase/index.js index 73f4f6f17f..e4e4611192 100644 --- a/projects/PumpBase/index.js +++ b/projects/PumpBase/index.js @@ -15,7 +15,7 @@ async function tvl(api) { api, target: FACTORY, topics: ['0x0aca3d0708cc06a2b4b4bedc6fe1b5febc7f70a1c413ac1fb594bc32c911df16'], - fromBlock: 36935000, + fromBlock: 36935850, }) if (logs.length === 0) return @@ -43,6 +43,6 @@ async function tvl(api) { module.exports = { methodology: 'Counts ETH and tokens locked in bonding curves. ETH reserves are calculated by subtracting the fake initial liquidity (1.5 ETH) from the total reserves.', - start: 1728936000, + start: 1750043447, base: { tvl } }