-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: adds Taraxa staking and tvl adapter #12651
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
const TARAXA_STAKING_CONTRACT = "0x00000000000000000000000000000000000000fe"; | ||
const TARAXA_ECOSYSTEM_FUND_ADDRESS = | ||
"0x723304d1357a2334fcf902aa3d232f5139080a1b"; | ||
const TARAXA_FOUNDATION_ADDRESS = "0x723304d1357a2334fcf902aa3d232f5139080a1b"; | ||
|
||
async function staking(api) { | ||
const balance = await api.provider.getBalance( | ||
TARAXA_STAKING_CONTRACT, | ||
api.block | ||
); | ||
api.addGasToken(Number(balance) / 10 ** 18); | ||
} | ||
|
||
async function tvl(api) { | ||
const balanceEcosystem = await api.provider.getBalance( | ||
TARAXA_ECOSYSTEM_FUND_ADDRESS, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this your treasury address? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The "Foundation" address is the treasury. This is a community fund. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually both of them count as the project treasury. The foundation tokens are never circulated and the ecosystem fund is for grants (this changes from month to month) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. okay, we can track this under treasury but not as tvl. making the change now There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cant count foundation tokens as it is not circulating |
||
api.block | ||
); | ||
|
||
const balanceFoundation = await api.provider.getBalance( | ||
TARAXA_FOUNDATION_ADDRESS, | ||
api.block | ||
); | ||
|
||
api.addGasToken((Number(balanceEcosystem) + Number(balanceFoundation)) / 10 ** 18); | ||
} | ||
|
||
module.exports = { | ||
tara: { | ||
tvl, | ||
staking, | ||
}, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, we are not tracking chain staking atm