Skip to content

feat(cketh): expose the sweeper address in MinterInfo - #11240

Open
gregorydemay wants to merge 2 commits into
masterfrom
gdemay/DEFI-2926_expose_sweeper_address
Open

feat(cketh): expose the sweeper address in MinterInfo#11240
gregorydemay wants to merge 2 commits into
masterfrom
gdemay/DEFI-2926_expose_sweeper_address

Conversation

@gregorydemay

@gregorydemay gregorydemay commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

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_info now returns it as sweeper_address, alongside the existing minter_address. Like minter_address, it is null until the minter has fetched its public key.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the feat label Aug 20, 2026
@gregorydemay
gregorydemay requested a balanced review from Copilot August 20, 2026 14:00

Copilot AI 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.

Pull request overview

Exposes the threshold-ECDSA-derived sweeper address through get_minter_info.

Changes:

  • Adds optional sweeper_address to 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.

@gregorydemay
gregorydemay marked this pull request as ready for review August 20, 2026 14:14
@gregorydemay
gregorydemay requested a review from a team as a code owner August 20, 2026 14:14
@github-actions github-actions Bot added the @defi label Aug 20, 2026
@zeropath-ai

zeropath-ai Bot commented Aug 20, 2026

Copy link
Copy Markdown

No security or compliance issues detected. Reviewed everything up to d49ba1a.

Security Overview
Detected Code Changes
Change Type Relevant files
Enhancement ► rs/ethereum/cketh/minter.did
    Add sweeper_address field to MinterInfo in did file
► rs/ethereum/cketh/minter/src/endpoints.rs
    Add sweeper_address to MinterInfo struct
► rs/ethereum/cketh/minter/src/main.rs
    Populate sweeper_address in get_minter_info
► rs/ethereum/cketh/minter/src/state.rs
    Expose sweeper_address via state and import sweeper_address
► rs/ethereum/cketh/minter/tests/ckerc20.rs
    Update tests to include SWEEPER_ADDRESS in MinterInfo
► rs/ethereum/cketh/minter/tests/cketh.rs
    Update tests to include SWEEPER_ADDRESS in MinterInfo
► rs/ethereum/cketh/minter/test_utils/src/lib.rs
    Add SWEEPER_ADDRESS constant

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants