Skip to content

Commit

Permalink
Merge pull request #445 from Badger-Finance/balancer_withdraw
Browse files Browse the repository at this point in the history
balancer badger/wbtc withdraw script
  • Loading branch information
jalbrekt85 committed May 12, 2022
2 parents 32ded36 + a27bea6 commit 6879a31
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions scripts/issue/435/badgerwbtc_withdraw.py
@@ -0,0 +1,20 @@
from great_ape_safe import GreatApeSafe
from helpers.addresses import registry
from decimal import Decimal

def main():
safe = GreatApeSafe(registry.eth.badger_wallets.treasury_ops_multisig)
safe.init_balancer()

badger = safe.contract(registry.eth.treasury_tokens.BADGER)
wbtc = safe.contract(registry.eth.treasury_tokens.WBTC)
bpt = safe.contract(registry.eth.balancer.B_20_BTC_80_BADGER)
staked_bpt = safe.contract(safe.balancer.gauge_factory.getPoolGauge(bpt))

safe.take_snapshot([badger, wbtc, bpt.address, staked_bpt.address])

underlyings = [wbtc, badger]
safe.balancer.unstake_all_and_withdraw_all(underlyings)

safe.print_snapshot()
safe.post_safe_tx()

0 comments on commit 6879a31

Please sign in to comment.