Created
January 12, 2021 13:21
-
-
Save stefanionescu/f240a5cee0d655ad905ca981ac730d91 to your computer and use it in GitHub Desktop.
Redeeming ETH with Proto RAI Using geb-console
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm i -g @reflexer-finance/geb-console@latest | |
geb-console mainnet | |
proxy = await geb.getProxyAction("<Your ETH address>") | |
// Part I, withdraw execess collateral from a Safe: | |
await geb.getSafeFromOwner("<Your ETH address>") | |
tx = proxy.freeTokenCollateralGlobalSettlement(geb.contracts.joinETH_A.address, <Your Safe ID>) | |
metamask(tx) | |
// Part II, redeem collateral against you PRAI: | |
tx = proxy.prepareCoinsForRedeemingGlobalSettlement(wad(<Your PRAI balance>)) | |
metamask(tx) | |
tx = proxy.redeemTokenCollateralGlobalSettlement(geb.contracts.joinETH_A.address, ETH_A, wad(<Your PRAI balance>)) | |
metamask(tx) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment