Skip to content

refactor/beratrax tvl adapter - #14381

Closed
AbdulRafaySiddiqui wants to merge 1 commit into
DefiLlama:mainfrom
BeraTrax:refactor/beratrax-tvl
Closed

AbdulRafaySiddiqui wants to merge 1 commit into
DefiLlama:mainfrom
BeraTrax:refactor/beratrax-tvl

Conversation

@AbdulRafaySiddiqui

@AbdulRafaySiddiqui AbdulRafaySiddiqui commented Apr 18, 2025 •

Copy link
Copy Markdown
Contributor

NOTE

Please enable "Allow edits by maintainers" while putting up the PR.


  • If you would like to add a volume adapter please submit the PR here.
  • If you would like to add a liquidations adapter, please refer to this readme document for details.
  1. Once your adapter has been merged, it takes time to show on the UI. If more than 24 hours have passed, please let us know in Discord.
  2. Sorry, We no longer accept fetch adapter for new projects, we prefer the tvl to computed from blockchain data, if you have trouble with creating a the adapter, please hop onto our discord, we are happy to assist you.
  3. Please fill the form below only if the PR is for listing a new protocol else it can be ignored/replaced with reason/details about the PR
  4. For updating listing info It is a different repo, you can find your listing in this file: https://github.com/DefiLlama/defillama-server/blob/master/defi/src/protocols/data2.ts, you can edit it there and put up a PR
  5. Do not edit/push package-lock.json file as part of your changes, we use lockfileVersion 2, and most use v1 and using that messes up our CI
  6. No need to go to our discord and announce that you've created a PR, we monitor all PRs and will review it asap

Description:

Updated the adapter to dynamically fetch vaults from our factory contract.

@ghost

ghost commented Apr 18, 2025

Copy link
Copy Markdown

The adapter at projects/beratrax exports TVL:

berachain                 142.66 k

total                    142.66 k 

@AbdulRafaySiddiqui

Copy link
Copy Markdown
Contributor Author
Screenshot 2025-04-18 at 5 49 43 PM

I get 544k when running the adapter locally.

@ghost

ghost commented Apr 21, 2025

Copy link
Copy Markdown

The adapter at projects/beratrax exports TVL:

berachain                 3.22 k

total                    3.22 k 

const logs = await getLogs2({
api,
factory,
eventAbi: "event VaultCreated(address indexed vault)",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

each factory has a different eventAbi for vault created like here? https://berascan.com/tx/0xfc061a2c3202648210d9afcb82345dca571dc224af143caaa4001add970b7d63#eventlog

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All factories have the same eventAbi

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@g1nt0ki any update on this?

@g1nt0ki

g1nt0ki commented Apr 30, 2025

Copy link
Copy Markdown
Member

merged here: #14495

@g1nt0ki g1nt0ki closed this Apr 30, 2025
@AbdulRafaySiddiqui

Copy link
Copy Markdown
Contributor Author

@g1nt0ki the website still shows wrong TVL https://defillama.com/protocol/beratrax
The following screenshot is from testing the script locally, please look into this.

Thanks

Screenshot 2025-05-02 at 5 03 51 PM

@beratraxteam
beratraxteam deleted the refactor/beratrax-tvl branch May 11, 2025 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants