Skip to content

Commit

Permalink
Merge pull request #71 from velocore/main
Browse files Browse the repository at this point in the history
Update Velocore adapter: mapping vote amount to the LVC token balance
  • Loading branch information
nitish-91 authored Apr 25, 2024
2 parents d7e3a13 + 793277d commit 75c8e3a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adapters/velocore/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
getUserStakesForAddressByPoolAtBlock,
getUserVoteForAddressByPoolAtBlock,
} from "./sdk/subgraphDetails";
import { getGaugesAtBlock, VE_VC_ADDRESS } from "./sdk/lensDetails";
import { getGaugesAtBlock, VC_ADDRESS } from "./sdk/lensDetails";
import BigNumber from "bignumber.js";
import { BlockData, OutputSchemaRow } from "./sdk/types";
BigNumber.set({ EXPONENTIAL_AT: 256 });
Expand Down Expand Up @@ -81,7 +81,7 @@ export const getUserTVLByBlock = async ({
userVotes.forEach((userVote) => {
const user_address = userVote.owner.toLowerCase();
const token_balance = userVote.balance;
const token_address = VE_VC_ADDRESS.toLowerCase();
const token_address = VC_ADDRESS.toLowerCase();
tokenBalanceMap[user_address] = tokenBalanceMap[user_address] ?? {};
tokenBalanceMap[user_address][token_address] = BigNumber(
tokenBalanceMap[user_address][token_address] ?? 0
Expand Down
1 change: 1 addition & 0 deletions adapters/velocore/src/sdk/lensDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export const getGaugesAtBlock = async (blockNumber: number) => {
export const LENS_ADDRESS = "0xaA18cDb16a4DD88a59f4c2f45b5c91d009549e06";
export const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
export const VE_VC_ADDRESS = "0xAeC06345b26451bdA999d83b361BEaaD6eA93F87";
export const VC_ADDRESS = "0xcc22F6AA610D1b2a0e89EF228079cB3e1831b1D1";
export type PoolType = "cpmm" | "wombat" | "converter" | "veVC";

export interface PoolRawData {
Expand Down

0 comments on commit 75c8e3a

Please sign in to comment.