Replies: 1 comment 4 replies
-
Interesting idea! I instantly liked it when you proposed it 3 days ago. But while reviewing the PR, I think that it would be an overkill for the smart contract interface. It's something that would be resolved at the UI level anyway. I also have my doubts about why Emit a structThough I agree that it is a good idea to include both versions in the events for indexers (related: #204 (comment)) but having two variations for all the amount values (either in the Struct format or two functions) will be redundant at the contract level. Given that 18 decimals are the most popular assets, the users will always see the same values for both the struct variables. The only exception would be USDC but that would be taken care of in the UI. I'd love to hear your comment on this. |
Beta Was this translation helpful? Give feedback.
-
In PR https://github.com/sablier-labs/flow/pull/205/files, I introduced a dichotomy between amounts:
Side note: in the future, we might rename these to scaled and raw, but never mind that for now
The idea is to introduce a new
Amounts
struct that encapsulates thenormalized
anddenormalized
amounts. Doing so would allow us to:Amounts
struct in all debt functionsrefundableAmountOf
andnormalizedRefundableAmountOf
functions into a single function that returns a struct (related: Rename current "refundableAmountOf" and introduce non-normalized counterpart #202)cc @sablier-labs/solidity.
Beta Was this translation helpful? Give feedback.
All reactions