Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

balancer badger/wbtc withdraw script #445

Merged
merged 1 commit into from May 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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()