Skip to content

Add cow solver add to the test CLI - #129

Merged
kaze-cow merged 5 commits into
mainfrom
kaze/sc-299-add-functions-to-addremove-solvers
Aug 28, 2026
Merged

Add cow solver add to the test CLI#129
kaze-cow merged 5 commits into
mainfrom
kaze/sc-299-add-functions-to-addremove-solvers

Conversation

@kaze-cow

@kaze-cow kaze-cow commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Drives the new AddSolver instruction (#119) from the dev CLI:

cow solver add <address> [--manager <keypair-path>]
  • New test-cli/src/cmd/solver.rs: a solver command group whose add subcommand builds cow_settlement_client::instructions::AddSolver against the derived state PDA, sends it, and prints a summary (signature, solver, manager, statePda).
  • AddSolver needs both the manager's and the payer's signature, so --manager takes a keypair path, not an address. It defaults to by the same as --keypair, which is the payer.

Verification

I deployed a testing program for this base branch for the change at 7hwEhpgqZy1qRNMdFvVh4YjerBrZnMR7qGZUbLJTFSxg

To test adding a solver:

➜  solana-programs git:(kaze/sc-299-add-functions-to-addremove-solvers) ./target/debug/cow solver add B6acm3swJK9pJ7fe4i4GQgP7x5A3RndvsdV2bKhcA1i5 --program-id 7hwEhpgqZy1qRNMdFvVh4YjerBrZnMR7qGZUbLJTFSxg
signature = 2dsTvWAGvxL2w9MVWTHiMn76oKM73XH29GWh5eaKAGfh739A3CrB4ZRhh1hF72HppJdJyRHSmCTUY1gKi6DzwcXE
   solver = B6acm3swJK9pJ7fe4i4GQgP7x5A3RndvsdV2bKhcA1i5
  manager = B6acm3swJK9pJ7fe4i4GQgP7x5A3RndvsdV2bKhcA1i5
 statePda = HkqW1CPzMddJzZm5eFfFBK3wH6uUasLLQ5TczrM2o5VQ

The specified solver account can now be used for a settlement as in #98

🤖 Generated with Claude Code

@kaze-cow
kaze-cow requested a review from a team as a code owner August 28, 2026 09:00
@linear-code

linear-code Bot commented Aug 28, 2026

Copy link
Copy Markdown

SC-299

Drives the new `AddSolver` instruction from the dev CLI. The manager must
sign, so `--manager` takes a keypair path rather than an address, and
defaults to the payer that funds the state PDA's growth.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@kaze-cow
kaze-cow force-pushed the kaze/sc-299-add-functions-to-addremove-solvers branch from b7ff95d to 06fec9e Compare August 28, 2026 09:08

@fedgiac fedgiac left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice! Approving in advance since the two suggestions are minor and likely uncontroversial (fine if you drop them).

Comment thread test-cli/src/cmd/solver.rs Outdated
Comment thread test-cli/src/cmd/solver.rs Outdated
kaze-cow and others added 4 commits August 28, 2026 22:26
Co-authored-by: Federico Giacon <58218759+fedgiac@users.noreply.github.com>
…ub.com:cowprotocol/solana-programs into kaze/sc-299-add-functions-to-addremove-solvers
@kaze-cow
kaze-cow merged commit ce4d128 into main Aug 28, 2026
14 checks passed
@kaze-cow
kaze-cow deleted the kaze/sc-299-add-functions-to-addremove-solvers branch August 28, 2026 13:32
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