-
Notifications
You must be signed in to change notification settings - Fork 381
Conversation
5ebbc6a
to
5962971
Compare
Would it be possible to fully rely on contract calls instead of relying on external data source like subgraphs ? |
cb64f6a
to
f64ff9c
Compare
Unfortunately it's not possible, we rely on emitted events as well to compute some data points. |
async getPrice() { | ||
return 0; // Valueless token | ||
} | ||
} |
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.
Heads'up; We currently filter out balances < 0.01 $
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.
Thanks for the heads up; we'd still prefer to keep the position in the API response, even if it's not displayed on the studio app.
764794d
to
7969510
Compare
endpoint: SUBGRAPH_V1_API_BASE_URL, | ||
query: SPOOL_STAKED_QUERY, | ||
variables: { address }, | ||
}); |
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.
Look like you can call balanceOf
on 0xc3160c5cc63b6116dd182faa8393d3ad9313e213
to get staked balance
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.
balanceOf
number is a bit off - some users inadvertently transferred their tokens directly to the contract, instead of using the correct function to stake.
return rewards.toString(); | ||
}); | ||
|
||
return [stakedAmount, votingPowerRaw.toString(), ...rewardBalances]; |
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.
since voSpool is a valuless token it won't ever be displayed
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.
Thanks for the heads up; we'd still prefer to keep the position in the API response, even if it's not displayed on the studio app.
e3c07f9
to
1237097
Compare
1237097
to
29db317
Compare
We are closing Zapper Studio to new contributions. Instead, we'll be rolling out codeless app balance integrations, where folks can create integrations on Zapper's frontend (with no coding experience needed) Here's the official announcement. I'll add Spool.fi v2 to my todo since codeless app integrations aren't open to public just yet. I'll close this PR and let me know if there's anything else |
Description
Spool.fi v2 app (https://app.spool.fi/) integration
Checklist
How to test?