Skip to content

Commit

Permalink
Merge pull request #13 from TLX-Protocol/new-bonding-exclusion
Browse files Browse the repository at this point in the history
Add New Bonding Address to Supply Exclusions
  • Loading branch information
chase-manning authored May 14, 2024
2 parents 27047f9 + a69467d commit a29c4e1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion functions/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ export const MAX_SUPPLY = 100_000_000;
// Addresses
export const AddressProvider = "0xbaa87ecc5dd76526b51ab7fd2d0c814eb967e2e2";
export const Airdrop = "0xccf9c3162944676c524b649d2ebecac185a47fd9";
export const Bonding = "0x0d66198914740429b760f83b0008fb6cc9324440";
export const Bonding = "0xD55c83Fb5BD360362Cc95577D0AaF52861DA2F43";
export const OldBonding = "0x0d66198914740429b760f83b0008fb6cc9324440";
export const ChainlinkAutomation = "0x34A2758CbE5CB8DAde0DE0B419a19cc06ffB4289";
export const GenesisLocker = "0xc068c3261522c97ff719dc97c98c63a1356fef0f";
export const LeveragedTokenFactory = "0x26647E97d805B478B37D2D8653C41632C112aE65";
Expand Down
1 change: 1 addition & 0 deletions functions/src/db.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import admin from "firebase-admin";

// Examples
export async function exampleRead(id: string): Promise<string> {
const db = admin.database();
const snapshot = await db.ref("databaseName").child(id).get();
Expand Down
3 changes: 2 additions & 1 deletion functions/src/supply.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
Staker,
TLX,
Vesting,
OldBonding,
} from "./constants";

import bigintToNumber from "./helpers/bigint-to-number";
Expand All @@ -18,7 +19,7 @@ const erc20abi = new Interface(["function balanceOf(address) view returns (uint2
const tlx = new Contract(TLX, erc20abi, provider);

export const getCirculatingSupply = async () => {
const EXCLUDED_ADDRESSES = [Airdrop, Bonding, GenesisLocker, Vesting, Staker, AmmDistributor];
const EXCLUDED_ADDRESSES = [Airdrop, Bonding, GenesisLocker, Vesting, Staker, AmmDistributor, OldBonding];

const [airdropBalance, bondingBalance, genesisLockerBalance, vestingBalance, stakerBalance, ammBalance] =
await Promise.all(EXCLUDED_ADDRESSES.map((address) => tlx.balanceOf(address)));
Expand Down

0 comments on commit a29c4e1

Please sign in to comment.