feat(cketh): expose the sweeper address in MinterInfo - #11240
feat(cketh): expose the sweeper address in MinterInfo#11240gregorydemay wants to merge 2 commits into
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Exposes the threshold-ECDSA-derived sweeper address through get_minter_info.
Changes:
- Adds optional
sweeper_addressto the Candid and Rust API. - Derives the address from stored public-key material.
- Tests unavailable and initialized states.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
rs/ethereum/cketh/test_utils/src/lib.rs |
Adds the expected test sweeper address. |
rs/ethereum/cketh/minter/tests/cketh.rs |
Tests ckETH minter-info responses. |
rs/ethereum/cketh/minter/tests/ckerc20.rs |
Tests ckERC20 minter-info responses. |
rs/ethereum/cketh/minter/src/state.rs |
Exposes sweeper-address derivation from state. |
rs/ethereum/cketh/minter/src/main.rs |
Returns the address from get_minter_info. |
rs/ethereum/cketh/minter/src/endpoints.rs |
Extends the Rust response type. |
rs/ethereum/cketh/minter/cketh_minter.did |
Extends the public Candid interface. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
✅ No security or compliance issues detected. Reviewed everything up to d49ba1a. Security Overview
Detected Code Changes
|
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
mbjorkqvist
left a comment
There was a problem hiding this comment.
LGTM, thanks @gregorydemay! Would it make sense to expose the sweeper address in the minter dashboard also (not necessarily as part of this PR)?
Good idea, I added it as a bullet to DEFI-2922. |
The minter derives a dedicated sweeper address from its master threshold-ECDSA public key, and that address' ETH balance is the prepaid gas available for sweeping funded deposit addresses. Until now that address was not observable from outside the canister, so there was no way to check how much sweep gas was left or to top it up.
get_minter_infonow returns it assweeper_address, alongside the existingminter_address. Likeminter_address, it isnulluntil the minter has fetched its public key.🤖 Generated with Claude Code