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

Feat/process queue batch #273

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Feat/process queue batch #273

wants to merge 16 commits into from

Conversation

sandybradley
Copy link
Contributor

@sandybradley sandybradley commented Dec 13, 2023

  • script and test for processWithdrawQueue batch with grantRewards
  • script and test for processWithdrawQueue batch with grantValidatorWithdraw

Notes:

  • Need to change send flag in script when sending the batch tx for signing, not testing
executeBatch(safe, false);
  • Make sure to set PRIVATE_KEY in .envrc.local to sign and send the batch tx

Copy link

height bot commented Dec 13, 2023

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@jeremyHD
Copy link

bumping into an issue here while using the ProcessQueue scripts. The cast command doesn't have the option --data

maybe the version of cast in devshell is out of date?

ERROR foundry_evm::executor::inspector::cheatcodes::ext: stderr err="error: unexpected argument '--data' found\n\n tip: to pass '--data' as a value, use '-- --data'\n\nUsage: cast wallet sign <--from <ADDRESS>|--interactive|--private-key <RAW_PRIVATE_KEY>|--mnemonic <MNEMONIC>|--mnemonic-passphrase <PASSPHRASE>|--mnemonic-derivation-path <PATH>|--mnemonic-index <INDEX>|--keystore <PATH>|--password <PASSWORD>|--password-file <PASSWORD_FILE>|--ledger|--trezor|--aws> <MESSAGE>\n\nFor more information, try '--help'.\n"

nix/shell.nix Outdated Show resolved Hide resolved
nix/shell.nix Outdated Show resolved Hide resolved
@sandybradley
Copy link
Contributor Author

bumping into an issue here while using the ProcessQueue scripts. The cast command doesn't have the option --data

maybe the version of cast in devshell is out of date?

ERROR foundry_evm::executor::inspector::cheatcodes::ext: stderr err="error: unexpected argument '--data' found\n\n tip: to pass '--data' as a value, use '-- --data'\n\nUsage: cast wallet sign <--from <ADDRESS>|--interactive|--private-key <RAW_PRIVATE_KEY>|--mnemonic <MNEMONIC>|--mnemonic-passphrase <PASSPHRASE>|--mnemonic-derivation-path <PATH>|--mnemonic-index <INDEX>|--keystore <PATH>|--password <PASSWORD>|--password-file <PASSWORD_FILE>|--ledger|--trezor|--aws> <MESSAGE>\n\nFor more information, try '--help'.\n"

For reference, this error was because nix foundry version was out of date. Fixed with nix flake update


uint256 exitsBalance = numExits * 32 ether;
// assuming rewards balance = remaing multisig balance - 10%
uint256 rewardsBalance = (safe.balance - exitsBalance) * 90 / 100;

Choose a reason for hiding this comment

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

protocol treasury safe: 0xe664B134d96fdB0bf7951E0c0557B87Bac5e5277
should transfer fee in this script too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking the same thing. Only way to do it consistently is to transfer 10% of rewardsToProcess. Then it can't double spend on leftover rewards not used in the queue processing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated:
e821ea6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants