Skip to content

Instantly share code, notes, and snippets.

@stefanionescu
Created January 12, 2021 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefanionescu/f240a5cee0d655ad905ca981ac730d91 to your computer and use it in GitHub Desktop.
Save stefanionescu/f240a5cee0d655ad905ca981ac730d91 to your computer and use it in GitHub Desktop.
Redeeming ETH with Proto RAI Using geb-console
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