protocol-monorepo
protocol-monorepo copied to clipboard
[ETHEREUM-CONTRACTS] Completness of the upgrade/downgrade flows of Super Tokens
(... per community input ...)
Notes
Extend SuperToken upgrade/downgrade with more overloaded versions of them.
- upgrade(amount)
- upgradeTo(to, amount) # *
- upgradeTo(to, amount, userData)
- upgradeFrom(from, to, amount) # *
- upgradeFrom(from, to, amount, userData) # *
- downgrade(amount)
- downgradeTo(to, amount)
- downgradeTo(to, amount, userData) #*
- downgradeFrom(from, to, amount) # *
- downgradeFrom(from, to, amount, userData) # *
- expose the underlyingAmount <-> supertoken amount arithematic to the user for easier integration. Using the example from TOREX BLM for reference.
- e.g.: toUnderlyingAmount/fromUnderlyingAmount/toSuperTokenAmount ?
We do not add these, in favor of the macro versions:
- downgradeAllTo(to)
- downgradeAllFrom(from, to)