|
54 | 54 | ) |
55 | 55 | from df_py.util.retry import retry_function |
56 | 56 | from df_py.util.vesting_schedule import ( |
57 | | - get_active_reward_amount_for_week_eth, |
58 | 57 | get_active_reward_amount_for_week_eth_by_stream, |
59 | 58 | ) |
60 | 59 | from df_py.volume import csvs, queries |
@@ -936,76 +935,6 @@ def do_chain_info(): |
936 | 935 | print(f" # blocks: {block_number}") |
937 | 936 |
|
938 | 937 |
|
939 | | -# ======================================================================== |
940 | | -@enforce_types |
941 | | -def do_dispense_passive(): |
942 | | - parser = argparse.ArgumentParser(description="Dispense passive rewards") |
943 | | - parser.add_argument("command", choices=["dispense_passive"]) |
944 | | - parser.add_argument("CHAINID", type=chain_type, help=CHAINID_EXAMPLES) |
945 | | - parser.add_argument( |
946 | | - "AMOUNT", |
947 | | - type=float, |
948 | | - help="total amount of TOKEN to distribute (decimal, not wei)", |
949 | | - ) |
950 | | - parser.add_argument( |
951 | | - "ST", type=valid_date_and_convert, help="week start date -- YYYY-MM-DD" |
952 | | - ) |
953 | | - |
954 | | - arguments = parser.parse_args() |
955 | | - print_arguments(arguments) |
956 | | - |
957 | | - ADDRESS_FILE = _getAddressEnvvarOrExit() |
958 | | - record_deployed_contracts(ADDRESS_FILE, arguments.CHAINID) |
959 | | - |
960 | | - amount = arguments.AMOUNT |
961 | | - |
962 | | - if amount == 0: |
963 | | - start_date = arguments.ST |
964 | | - amount = get_active_reward_amount_for_week_eth(start_date) |
965 | | - |
966 | | - feedist = FeeDistributor(arguments.CHAINID) |
967 | | - OCEAN = OCEAN_token(arguments.CHAINID) |
968 | | - web3 = networkutil.chain_id_to_web3(arguments.CHAINID) |
969 | | - retry_function(dispense.dispense_passive, 3, 60, web3, OCEAN, feedist, amount) |
970 | | - |
971 | | - print("Dispensed passive rewards") |
972 | | - |
973 | | - |
974 | | -# ======================================================================== |
975 | | - |
976 | | - |
977 | | -@enforce_types |
978 | | -def do_fund_predictoor_ocean_dispenser(): |
979 | | - parser = argparse.ArgumentParser(description="Dispense predictoor rewards") |
980 | | - parser.add_argument("command", choices=["fund_predictoor_ocean_dispenser"]) |
981 | | - parser.add_argument("CHAINID", type=chain_type, help=CHAINID_EXAMPLES) |
982 | | - parser.add_argument("RECEIVER", type=str, help="Receiver address") |
983 | | - parser.add_argument( |
984 | | - "ST", type=valid_date_and_convert, help="week start date -- YYYY-MM-DD" |
985 | | - ) |
986 | | - arguments = parser.parse_args() |
987 | | - print_arguments(arguments) |
988 | | - ADDRESS_FILE = _getAddressEnvvarOrExit() |
989 | | - record_deployed_contracts(ADDRESS_FILE, arguments.CHAINID) |
990 | | - |
991 | | - OCEAN = OCEAN_token(arguments.CHAINID) |
992 | | - web3 = networkutil.chain_id_to_web3(arguments.CHAINID) |
993 | | - |
994 | | - predictoor_budget_week = get_active_reward_amount_for_week_eth_by_stream( |
995 | | - arguments.ST, "predictoor", arguments.CHAINID |
996 | | - ) |
997 | | - |
998 | | - retry_function( |
999 | | - dispense.multisig_transfer_tokens, |
1000 | | - 3, |
1001 | | - 60, |
1002 | | - web3, |
1003 | | - OCEAN, |
1004 | | - arguments.RECEIVER, |
1005 | | - predictoor_budget_week, |
1006 | | - ) |
1007 | | - |
1008 | | - |
1009 | 938 | # ======================================================================== |
1010 | 939 | @enforce_types |
1011 | 940 | def do_calculate_passive(): |
|
0 commit comments