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

Add more info in slack message #475

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/fetch/payouts.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,8 @@ def construct_payouts(
f"Slippage: {total_slippage / 10**18:.4f}\n\n"
f"Exchange rate native token to COW: {exchange_rate_native_to_cow:.6g} COW/native token\n"
f"Exchange rate native token to ETH: {exchange_rate_native_to_eth:.6g} ETH/native token\n",
f"Minimum native token transfer: {config.payment_config.min_native_token_transfer / 10**18} units\n",
f"Minimum COW transfer: {config.payment_config.min_cow_transfer / 10**18} units\n",
category=Category.TOTALS,
)
payouts = prepare_transfers(
Expand Down
12 changes: 7 additions & 5 deletions src/fetch/transfer_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def auto_propose(
slack_client: WebClient,
dry_run: bool,
config: AccountingConfig,
network: Network,
) -> None:
"""
Entry point auto creation of rewards payout transaction.
Expand Down Expand Up @@ -102,7 +103,7 @@ def auto_propose(
slack_client,
channel=slack_channel,
message=(
f"Solver Rewards transaction with nonce {nonce} pending signatures.\n"
f"Solver Rewards transaction for network {network} with nonce {nonce} pending signatures.\n"
f"To sign and execute, visit:\n{config.payment_config.safe_queue_url}\n"
f"More details in thread"
),
Expand All @@ -114,10 +115,10 @@ def main() -> None:
"""Generate transfers for an accounting period"""

args = generic_script_init(description="Fetch Complete Reimbursement")
network = Network(os.environ["NETWORK"])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The network should be made part of the config, e.g., an attribute of AccountingConfig.

config = AccountingConfig.from_network(network)

config = AccountingConfig.from_network(Network(os.environ["NETWORK"]))

accounting_period = AccountingPeriod(args.start)
accounting_period = AccountingPeriod(args.start, network)

orderbook = MultiInstanceDBFetcher(
[config.orderbook_config.prod_db_url, config.orderbook_config.barn_db_url]
Expand All @@ -134,7 +135,7 @@ def main() -> None:
)

log_saver.print(
f"The data aggregated can be visualized at\n{accounting_period.dashboard_url()}",
f"The data aggregated can be visualized at\n{accounting_period.dashboard_url()}\n",
category=Category.GENERAL,
)

Expand Down Expand Up @@ -168,6 +169,7 @@ def main() -> None:
slack_client=slack_client,
dry_run=args.dry_run,
config=config,
network=network,
)
else:
manual_propose(transfers=payout_transfers, period=dune.period, config=config)
Expand Down
Loading