https://github.com/ngmachado/supertoken-upgrader
https://github.com/ngmachado/supertoken-upgrader
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/ngmachado/supertoken-upgrader
- Owner: ngmachado
- Created: 2022-05-03T12:05:13.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-08-04T09:20:26.000Z (almost 3 years ago)
- Last Synced: 2025-04-12T23:54:41.020Z (about 1 month ago)
- Language: JavaScript
- Size: 358 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Super Token Upgrader
Provides a contract which allows to upgrade to and downgrade from [Super Tokens](https://docs.superfluid.finance/superfluid/protocol-overview/super-tokens) on behalf of other accounts.
For this to work, the contract needs to have been given a sufficient allowance from that accounts via `ERC20.approve()`.The upgrade and downgrade operations can be triggered only by msg senders pre-approved by the contract admin through the _UPGRADER_ROLE_ using openzeppelin's [AccessControl](https://docs.openzeppelin.com/contracts/4.x/access-control) module.
Furthermore, only Super Tokens flagged as _supported_ by the contract admin can be used.The contract takes into account the possibility of the underlying ERC20 token's decimals differing from the default 18 decimals of Super Tokens. Note that in case of decimals mismatch, some token _dust_ could be left in the contract because of rounding artifacts.