Skip to content

Fix duplicate pause and unpause definitions in token contract #504

Description

@PrincessnJoy

Description

contracts/token/src/lib.rs defines both pub fn pause and pub fn unpause twice each:

Function First definition (approx. line) Second definition (approx. line)
pause ~374 ~402
unpause ~388 ~411

Rust does not allow duplicate function names in the same impl block. This is a hard compile error — the token contract cannot build in its current state.

The duplicate definitions likely originate from a merge conflict that was incorrectly resolved, or from a refactor where the pause/unpause logic was moved but the originals were not deleted.

Steps to Reproduce

cargo build -p cosmosvote-token

Expected error: error[E0201]: duplicate definitions with name pause``

Acceptance Criteria

  • Identify which of the two implementations is correct for each function (check event emission, auth checks, and storage operations against the spec in docs/governance-model.md)
  • Remove the duplicate definition of pause, keeping the correct one
  • Remove the duplicate definition of unpause, keeping the correct one
  • cargo build -p cosmosvote-token succeeds without errors
  • cargo test -p cosmosvote-token passes all tests
  • Pause and unpause emit the correct on-chain events as documented in docs/events.md

Priority

Critical — token contract cannot compile.

Estimated Effort

Small — identify and remove duplicate definitions.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions