From 2bb9d3c858977b02ef8803346d916db934012b32 Mon Sep 17 00:00:00 2001 From: Aahna Ashina <95955389+aahna-ashina@users.noreply.github.com> Date: Sat, 18 May 2024 16:15:30 +0900 Subject: [PATCH] add sablier stream - dao agent (#54) #54 --- .env.sample | 1 + api/circulating-supply.ts | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.env.sample b/.env.sample index c5980ad..40b19cf 100644 --- a/.env.sample +++ b/.env.sample @@ -2,3 +2,4 @@ NATION_ADDRESS=0x333A4823466879eeF910A04D473505da62142069 VENATION_ADDRESS=0xF7deF1D2FBDA6B74beE7452fdf7894Da9201065d DAO_AGENT_ADDRESS=0x5afEb7F3259A25EB21287e3A917BeE3d4dE58dAf DAO_CRITICAL_AGENT_ADDRESS=0xE3554d26A6BE2D2DF942975BDD06B8513b29efD6 +SABLIER_V2_LOCKUP_LINEAR_ADDRESS=0xAFb979d9afAd1aD27C5eFf4E27226E3AB9e5dCC9 diff --git a/api/circulating-supply.ts b/api/circulating-supply.ts index 65fe392..cf9ac66 100644 --- a/api/circulating-supply.ts +++ b/api/circulating-supply.ts @@ -18,12 +18,13 @@ export default async (request: VercelRequest, response: VercelResponse) => { nationContract.totalSupply(), nationContract.balanceOf(process.env.VENATION_ADDRESS), nationContract.balanceOf(process.env.DAO_AGENT_ADDRESS), - nationContract.balanceOf(process.env.DAO_CRITICAL_AGENT_ADDRESS) + nationContract.balanceOf(process.env.DAO_CRITICAL_AGENT_ADDRESS), + nationContract.balanceOf(process.env.SABLIER_V2_LOCKUP_LINEAR_ADDRESS) ]) - const [totalSupply, veNationSupply, daoAgentSupply, daoCriticalAgentSupply] = supplies + const [totalSupply, veNationSupply, daoAgentSupply, daoCriticalAgentSupply, sablierSupply] = supplies - const circulatingSupply = totalSupply.sub(veNationSupply).sub(daoAgentSupply).sub(daoCriticalAgentSupply) + const circulatingSupply = totalSupply.sub(veNationSupply).sub(daoAgentSupply).sub(daoCriticalAgentSupply).sub(sablierSupply) response.status(200).send(ethers.utils.formatUnits(circulatingSupply, 18)) }