approve
function that you've likely seen elsewhere), then call upgrade
on the super token wrapper contract. This will lock a defined amount of ERC20 tokens inside of the Super token contract, and mint you a corresponding amount of super tokens in return.downgrade
on the Super Token wrapper contract. This will send you the defined amount of your ERC20 asset back, and burn your corresponding Super Tokens. These wrapped assets are denominated by the Superfluid community by appending an 'x' to the end of the wrapped ERC20 asset's symbol. For example, if you wrap DAI, the newly minted super token DAI will be labeled DAIx.NOTE: we have a list of super tokens which were deployed by the Superfluid community as ERC20 wrapper contracts inside of the Network Directory. If you want to work with an ERC20 asset not listed in the directory, you can learn more about deploying your own ERC20 wrapper contract here.
upgrade
.NOTE: depending on your device, you may need to scroll down in the browser view below to view & click the button to upgrade tokens.
downgrade
on the super token contract to burn the corresponding super tokens and receive the ERC20 assets back in return.upgradeByETH
on the native asset super token contract, and pass in a msg.value
which represents the amount of the native asset you'd like to upgrade.upgradeByETH
on the contract and passing in the amount you'd like to upgrade as your msg.value
. The only difference is that you'll need to change the address of ETHx/MATICx in the below example to match the deployed address. You can use the network directory for this.