From 1211c2874bd19266a91bc1abcd04d68b50e11e59 Mon Sep 17 00:00:00 2001 From: cobus_coetsee Date: Fri, 1 Dec 2023 21:51:58 +0200 Subject: [PATCH 1/3] Added MarketRaker circulating supply to MinSwap --- src/tokens/raker.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/tokens/raker.ts diff --git a/src/tokens/raker.ts b/src/tokens/raker.ts new file mode 100644 index 00000000..5bd01573 --- /dev/null +++ b/src/tokens/raker.ts @@ -0,0 +1,21 @@ +import { defaultFetcherOptions, SupplyFetcher } from "../types"; +import { getAmountInAddresses, getBlockFrostInstance } from "../utils"; + +const RAKER = "ace2ea0fe142a3687acf86f55bcded860a920864163ee0d3dda8b60252414b4552"; +const TREASURY_ADDRESSES = [ + "addr1q8djvsvq45pff7vmyvqdujpudkwpzr3cdejqsxg5r6qg60utvn6keknqc0ea3rs3c96naytguxq3pspqn5fkjltmr95srtewf6", // main wallet +]; + +const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => { + const blockFrost = getBlockFrostInstance(options); + const total = 10_614_254 * 1e6; // 10,614,254 million + const treasury = + Number(await getAmountInAddresses(blockFrost, RAKER, TREASURY_ADDRESSES)) / + 1e6; + return { + circulating: (total - treasury).toString(), + total: total.toString(), + }; +}; + +export default fetcher; \ No newline at end of file From 36b80594646db2219465837d1e59e4c817cc10cb Mon Sep 17 00:00:00 2001 From: Cobus Coetsee Date: Fri, 8 Dec 2023 13:46:27 +0200 Subject: [PATCH 2/3] Updated index.ts --- src/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/index.ts b/src/index.ts index 23be1a93..11c3cfee 100644 --- a/src/index.ts +++ b/src/index.ts @@ -88,6 +88,8 @@ import wozFetcher from "./tokens/woz"; import wrtFetcher from "./tokens/wrt"; import xvyfiFetcher from "./tokens/xvyfi"; import yummiFetcher from "./tokens/yummi"; +import rakerFetcher from "./tokens/raker"; + import { SupplyFetcher } from "./types"; export * from "./types"; @@ -247,4 +249,5 @@ export const supplyFetchers: Record = { nebulaFetcher, bbd0ec94cf9ccc1407b3dbc66bfbbff82ea49718ae4e3dceb817125f24574f524b: workFetcher, + "ace2ea0fe142a3687acf86f55bcded860a920864163ee0d3dda8b60252414b4552": rakerFetcher, }; From dd72e925403d1260a83d81aa5732dfd579e8936b Mon Sep 17 00:00:00 2001 From: Cobus Coetsee Date: Sat, 9 Dec 2023 07:06:07 +0200 Subject: [PATCH 3/3] Resolved sirculating supply and ran tests. --- src/index.ts | 6 ++--- src/tokens/mtc.ts | 2 +- src/tokens/nftc.ts | 56 +++++++++++++++++++-------------------- src/tokens/optim.ts | 2 +- src/tokens/proxies.ts | 8 +++--- src/tokens/raker.ts | 13 ++++----- src/tokens/spf.ts | 61 +++++++++++++++++++++++++------------------ 7 files changed, 79 insertions(+), 69 deletions(-) diff --git a/src/index.ts b/src/index.ts index 11c3cfee..ec260578 100644 --- a/src/index.ts +++ b/src/index.ts @@ -66,6 +66,7 @@ import paviaFetcher from "./tokens/pavia"; import pepeblueFetcher from "./tokens/pepeblue"; import proxiesFetcher from "./tokens/proxies"; import prsprFetcher from "./tokens/prspr"; +import rakerFetcher from "./tokens/raker"; import revuFetcher from "./tokens/revu"; import rjvFetcher from "./tokens/rjv"; import shenFetcher from "./tokens/shen"; @@ -88,8 +89,6 @@ import wozFetcher from "./tokens/woz"; import wrtFetcher from "./tokens/wrt"; import xvyfiFetcher from "./tokens/xvyfi"; import yummiFetcher from "./tokens/yummi"; -import rakerFetcher from "./tokens/raker"; - import { SupplyFetcher } from "./types"; export * from "./types"; @@ -249,5 +248,6 @@ export const supplyFetchers: Record = { nebulaFetcher, bbd0ec94cf9ccc1407b3dbc66bfbbff82ea49718ae4e3dceb817125f24574f524b: workFetcher, - "ace2ea0fe142a3687acf86f55bcded860a920864163ee0d3dda8b60252414b4552": rakerFetcher, + ace2ea0fe142a3687acf86f55bcded860a920864163ee0d3dda8b60252414b4552: + rakerFetcher, }; diff --git a/src/tokens/mtc.ts b/src/tokens/mtc.ts index 038d5380..15ef3dc3 100644 --- a/src/tokens/mtc.ts +++ b/src/tokens/mtc.ts @@ -14,7 +14,7 @@ const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => { const blockFrost = getBlockFrostInstance(options); const total = 1e6; // 1 million const treasury = Number( - await getAmountInAddresses(blockFrost, MTC, TEAM_ADDRESSES), + await getAmountInAddresses(blockFrost, MTC, TEAM_ADDRESSES) ); return { circulating: (total - treasury).toString(), diff --git a/src/tokens/nftc.ts b/src/tokens/nftc.ts index 43aedbdb..597432d0 100644 --- a/src/tokens/nftc.ts +++ b/src/tokens/nftc.ts @@ -1,28 +1,28 @@ -import { defaultFetcherOptions, SupplyFetcher } from "../types"; -import { getAmountInAddresses, getBlockFrostInstance } from "../utils"; - -const NFTC = "b0af30edf2c7f11465853821137e0a6ebc395cab71ee39c24127ffb44e465443"; - -const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => { - const blockFrost = getBlockFrostInstance(options); - const total = 10_000_000_000; - const treasuryRaw = await getAmountInAddresses(blockFrost, NFTC, [ - "stake1uxvujg8rmtyr94wt6u0mn2yzvqwd5m0vg3t6rfe9zacp5lsurk408", // 12.4M NFTC Drip - "stake1uykz753y0jx3fjhcnplltwncw07h5repj2lhw8wzq6ctelglhevnc", // 11M Faucet - "stake1u83wpvg0gq76qsww7v0ct7qvu09yf9w8pkht9fwvlna6qjgm32732", // 2.69 B Reserve - "stake1u8q5zzjlw660awfk9ka62fsy5esngpej3dsp2qlcmjzjhwgnq5weg", // 2.5 B SUPPLY - "stake1u828c3c2kvswe7asfcct8zervwfshx4s30y9mqsfdlk9cmsd9ddkl", // 1.77 B Funnel back to dapps - "stake1u9t5x4k3selfsas5c9p9w0z5pggw37mna9umaxq5t2ssedc9xv9ak", // 1.4 B LP Funds - "stake1u9f9v0z5zzlldgx58n8tklphu8mf7h4jvp2j2gddluemnssjfnkzz", // 90.89M - MINSWAP - "stake1u9uekhsgm69hvk6d0q79gawhcyaxy5p7ryq363mrpjzr83q948gaf", // 53.50M - VYFI - "stake1ux9f4e03lvna7l2lpycgssy7chnrmc06ufvskk5szrxmfqq78z5ch", // 32.70M - OUR LIQUIDITY POOL - "stake1ux7k5ztvhwj7ykv5v7vwjjzq8ckjk0v74z9p9m5w0t55f9clf62eq", // 17.82M - MINSWAP FARM. - ]); - const treasury = Number(treasuryRaw); - return { - circulating: (total - treasury).toString(), - total: total.toString(), - }; -}; - -export default fetcher; +import { defaultFetcherOptions, SupplyFetcher } from "../types"; +import { getAmountInAddresses, getBlockFrostInstance } from "../utils"; + +const NFTC = "b0af30edf2c7f11465853821137e0a6ebc395cab71ee39c24127ffb44e465443"; + +const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => { + const blockFrost = getBlockFrostInstance(options); + const total = 10_000_000_000; + const treasuryRaw = await getAmountInAddresses(blockFrost, NFTC, [ + "stake1uxvujg8rmtyr94wt6u0mn2yzvqwd5m0vg3t6rfe9zacp5lsurk408", // 12.4M NFTC Drip + "stake1uykz753y0jx3fjhcnplltwncw07h5repj2lhw8wzq6ctelglhevnc", // 11M Faucet + "stake1u83wpvg0gq76qsww7v0ct7qvu09yf9w8pkht9fwvlna6qjgm32732", // 2.69 B Reserve + "stake1u8q5zzjlw660awfk9ka62fsy5esngpej3dsp2qlcmjzjhwgnq5weg", // 2.5 B SUPPLY + "stake1u828c3c2kvswe7asfcct8zervwfshx4s30y9mqsfdlk9cmsd9ddkl", // 1.77 B Funnel back to dapps + "stake1u9t5x4k3selfsas5c9p9w0z5pggw37mna9umaxq5t2ssedc9xv9ak", // 1.4 B LP Funds + "stake1u9f9v0z5zzlldgx58n8tklphu8mf7h4jvp2j2gddluemnssjfnkzz", // 90.89M - MINSWAP + "stake1u9uekhsgm69hvk6d0q79gawhcyaxy5p7ryq363mrpjzr83q948gaf", // 53.50M - VYFI + "stake1ux9f4e03lvna7l2lpycgssy7chnrmc06ufvskk5szrxmfqq78z5ch", // 32.70M - OUR LIQUIDITY POOL + "stake1ux7k5ztvhwj7ykv5v7vwjjzq8ckjk0v74z9p9m5w0t55f9clf62eq", // 17.82M - MINSWAP FARM. + ]); + const treasury = Number(treasuryRaw); + return { + circulating: (total - treasury).toString(), + total: total.toString(), + }; +}; + +export default fetcher; diff --git a/src/tokens/optim.ts b/src/tokens/optim.ts index cfa574ad..8208be16 100644 --- a/src/tokens/optim.ts +++ b/src/tokens/optim.ts @@ -1,7 +1,7 @@ import { defaultFetcherOptions, SupplyFetcher } from "../types"; import { getAmountInAddresses, getBlockFrostInstance } from "../utils"; -const OPTIM = +const OPTIM = "e52964af4fffdb54504859875b1827b60ba679074996156461143dc14f5054494d"; const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => { diff --git a/src/tokens/proxies.ts b/src/tokens/proxies.ts index d892e634..ba475a0c 100644 --- a/src/tokens/proxies.ts +++ b/src/tokens/proxies.ts @@ -1,13 +1,14 @@ import { defaultFetcherOptions, SupplyFetcher } from "../types"; import { getAmountInAddresses, getBlockFrostInstance } from "../utils"; -const PROXIES = "20cd68533b47565f3c61efb39c30fdace9963bfa4c0060b613448e3c50524f584945"; +const PROXIES = + "20cd68533b47565f3c61efb39c30fdace9963bfa4c0060b613448e3c50524f584945"; const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => { const blockFrost = getBlockFrostInstance(options); const total = Number(21000000000000); const treasuryRaw = await getAmountInAddresses(blockFrost, PROXIES, [ - "stake1uxrtzq4epgjxz7xulm97ups30rml843trc5x8zulxxzf2rq7effsj", // Treasury + "stake1uxrtzq4epgjxz7xulm97ups30rml843trc5x8zulxxzf2rq7effsj", // Treasury ]); const treasury = Number(treasuryRaw); @@ -17,5 +18,4 @@ const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => { }; }; - -export default fetcher; \ No newline at end of file +export default fetcher; diff --git a/src/tokens/raker.ts b/src/tokens/raker.ts index 5bd01573..662cabd4 100644 --- a/src/tokens/raker.ts +++ b/src/tokens/raker.ts @@ -1,21 +1,22 @@ import { defaultFetcherOptions, SupplyFetcher } from "../types"; import { getAmountInAddresses, getBlockFrostInstance } from "../utils"; -const RAKER = "ace2ea0fe142a3687acf86f55bcded860a920864163ee0d3dda8b60252414b4552"; +const RAKER = + "ace2ea0fe142a3687acf86f55bcded860a920864163ee0d3dda8b60252414b4552"; const TREASURY_ADDRESSES = [ "addr1q8djvsvq45pff7vmyvqdujpudkwpzr3cdejqsxg5r6qg60utvn6keknqc0ea3rs3c96naytguxq3pspqn5fkjltmr95srtewf6", // main wallet ]; const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => { const blockFrost = getBlockFrostInstance(options); - const total = 10_614_254 * 1e6; // 10,614,254 million - const treasury = - Number(await getAmountInAddresses(blockFrost, RAKER, TREASURY_ADDRESSES)) / - 1e6; + const total = 10_614_254; // 10,614,254 million + const treasury = Number( + await getAmountInAddresses(blockFrost, RAKER, TREASURY_ADDRESSES) + ); return { circulating: (total - treasury).toString(), total: total.toString(), }; }; -export default fetcher; \ No newline at end of file +export default fetcher; diff --git a/src/tokens/spf.ts b/src/tokens/spf.ts index d7a31e1b..f5ab7354 100644 --- a/src/tokens/spf.ts +++ b/src/tokens/spf.ts @@ -1,35 +1,44 @@ import { defaultFetcherOptions, SupplyFetcher } from "../types"; -import { - getAmountInAddresses, - getBlockFrostInstance, -} from "../utils"; +import { getAmountInAddresses, getBlockFrostInstance } from "../utils"; const SPF = "09f2d4e4a5c3662f4c1e6a7d9600e9605279dbdcedb22d4507cb6e75535046"; -const SPECTRUM_NETWORK_VAULT_ADDRESSES = ["addr1v8njca4vkseetespu6jjtlk25sy46ya3qvrcp7n5c7zy9esj2g22a"]; -const SPF_TREASURY_ADDRESSES = ["addr1vy8h9l37fzdwpq8etmftagdc80trh9jjg0avt3je26szu8g820gnj"]; -const SPF_REWARDS_ADDRESSES = ["addr1vx3vcluw7qtulynhzsy4prfdmnjth8w52ejg2qeclsz7argu26gcf"]; +const SPECTRUM_NETWORK_VAULT_ADDRESSES = [ + "addr1v8njca4vkseetespu6jjtlk25sy46ya3qvrcp7n5c7zy9esj2g22a", +]; +const SPF_TREASURY_ADDRESSES = [ + "addr1vy8h9l37fzdwpq8etmftagdc80trh9jjg0avt3je26szu8g820gnj", +]; +const SPF_REWARDS_ADDRESSES = [ + "addr1vx3vcluw7qtulynhzsy4prfdmnjth8w52ejg2qeclsz7argu26gcf", +]; const fetcher: SupplyFetcher = async (options = defaultFetcherOptions) => { - const blockFrost = getBlockFrostInstance(options); - const total = 1e9; // 1 billion - - const treasury = - Number(await getAmountInAddresses(blockFrost, SPF, SPF_TREASURY_ADDRESSES)) / - 1e6; - - const spnVault = - Number(await getAmountInAddresses(blockFrost, SPF, SPECTRUM_NETWORK_VAULT_ADDRESSES)) / - 1e6; - - const unclaimed = - Number(await getAmountInAddresses(blockFrost, SPF, SPF_REWARDS_ADDRESSES)) / - 1e6; - - return { - circulating: (total - treasury - spnVault - unclaimed).toString(), - total: total.toString(), - }; + const blockFrost = getBlockFrostInstance(options); + const total = 1e9; // 1 billion + + const treasury = + Number( + await getAmountInAddresses(blockFrost, SPF, SPF_TREASURY_ADDRESSES) + ) / 1e6; + + const spnVault = + Number( + await getAmountInAddresses( + blockFrost, + SPF, + SPECTRUM_NETWORK_VAULT_ADDRESSES + ) + ) / 1e6; + + const unclaimed = + Number(await getAmountInAddresses(blockFrost, SPF, SPF_REWARDS_ADDRESSES)) / + 1e6; + + return { + circulating: (total - treasury - spnVault - unclaimed).toString(), + total: total.toString(), + }; }; export default fetcher;