superfluid-finance / protocol-monorepo

Superfluid Protocol Monorepo: the specification, implementations, peripherals and development kits.
https://www.superfluid.finance
Other
875 stars 240 forks source link

[DEMO] how we could replace specific token operations with the generic 2771 call proxy #2035

Open d10r opened 2 weeks ago

d10r commented 2 weeks ago

Needed changes:

Here only SuperToken.increaseAllowance() was changed that way, with a new test case using it.

In order to do this, we'd need to

As long as there's SuperTokens not updated to this logic, we can't easily remove the then legacy operations types from batch call.
However we could remove the code from SuperToken if we conditionally re-map legacy operations in Superfluid.sol to use 2771Forwarder if the target token contract supports it.

github-actions[bot] commented 2 weeks ago

Changelog Reminder

Reminder to update the CHANGELOG.md for any of the modified packages in this PR.

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 87.99%. Comparing base (0b33f76) to head (8e6a20a).

Files with missing lines Patch % Lines
...reum-contracts/contracts/superfluid/SuperToken.sol 80.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## supertokenlib-iteration #2035 +/- ## =========================================================== - Coverage 88.00% 87.99% -0.02% =========================================================== Files 108 108 Lines 6768 6779 +11 Branches 974 974 =========================================================== + Hits 5956 5965 +9 - Misses 810 812 +2 Partials 2 2 ``` | [Flag](https://app.codecov.io/gh/superfluid-finance/protocol-monorepo/pull/2035/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=superfluid-finance) | Coverage Δ | | |---|---|---| | [ethereum-contracts](https://app.codecov.io/gh/superfluid-finance/protocol-monorepo/pull/2035/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=superfluid-finance) | `94.15% <83.33%> (-0.05%)` | :arrow_down: | | [sdk-core](https://app.codecov.io/gh/superfluid-finance/protocol-monorepo/pull/2035/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=superfluid-finance) | `87.99% <83.33%> (-0.02%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=superfluid-finance#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

d10r commented 2 weeks ago

note: BaseRelayRecipient._getTransactionSigner() does not do what it's natspec claims.