-
Notifications
You must be signed in to change notification settings - Fork 32
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
veSugar.all() fails with web3.py #105
Comments
Confirmed! We'll take a look. |
Thanks! Adding a bit more details: I've tried for both Abi taken from the basescan And for Abi generated locally Same result in both cases |
Yeah, it won't work since in those 100 venfts limit you're requesting, there's an (m)veNFT -- a special veNFT that is used for Relay and we need to skip fetching the voting power for these (it's always 0 for these btw). |
got it, thanks Are there any other way to conveniently load all ~67k NTFs data via batches? |
btw, it seems that I have created the Solidity implementation for However, it does not include the I could share Solidity contract within this repository Or I could create a new one. what flow will be the best for us? |
Thank @Nikotos Glad it worked for you. We're not interested in Solidity contributions though. If you have time to send a PR for the VeSugar changes, that's great, otherwise we'll patch it sometime tomorrow/next days. |
I'm just not the fan of the Vyper though. However, if I will locate the bug veSugar.all() I could try to llm-estimate it's placement in Vyper code |
Finally located and tested an issue So! the problem is, veSugar.vy lines 160-161, more precisely the code below: if self.gov.address != empty(address):
governance_amount = staticcall self.gov.getVotes(_id, block.timestamp) Something like that should do the job: // Get governance amount if not managed
uint256 governanceAmount = 0;
if (ve.escrowType(_tokenId) != IVotingEscrow.EscrowType.MANAGED) {
governanceAmount = gov.getVotes(_tokenId, block.timestamp);
} Basically, adding an additional check through |
There's a fix for this in #107 |
I'm facing a weird issue with fetching veAERO NFTs data on Base
Minimal failing example:
which fails with error:
just in case, web3==6.20.1
The text was updated successfully, but these errors were encountered: