-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow paladin incentives claims from voter and blend together s…
…cript for HH + paladin claims in single script conditionally
- Loading branch information
1 parent
e706aa8
commit 1090752
Showing
4 changed files
with
98 additions
and
22 deletions.
There are no files selected for viewing
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
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from great_ape_safe import GreatApeSafe | ||
from helpers.addresses import r | ||
|
||
|
||
def main(): | ||
voter = GreatApeSafe(r.badger_wallets.treasury_voter_multisig) | ||
trops = GreatApeSafe(r.badger_wallets.treasury_ops_multisig) | ||
voter.init_badger() | ||
|
||
hh_data = voter.badger.get_hh_data() | ||
|
||
# incentives tokens expected on epochs: $badger and/or $liquis | ||
rewards = [r.treasury_tokens.BADGER, r.treasury_tokens.LIQ] | ||
|
||
trops.take_snapshot(tokens=rewards) | ||
|
||
if len(hh_data) > 0: | ||
voter.badger.claim_bribes_hidden_hands(claim_from_strat=False) | ||
|
||
voter.badger.claim_bribes_from_paladin() | ||
|
||
for token in rewards: | ||
token = voter.contract(token) | ||
token_balance = token.balanceOf(voter) | ||
if token_balance > 0: | ||
token.transfer(trops, token_balance) | ||
|
||
trops.print_snapshot() | ||
voter.post_safe_tx() |