Skip to content

Add pause / unpause CLI commands #415

Description

@Levi-Ojukwu

Description:

The contract has pause() and unpause() admin functions (at lib.rs:440-465) for emergency stops. These are critical safety features that allow administrators to halt all contract operations in case of a discovered vulnerability. However, the CLI has no commands to invoke them.

The CLI commands should:

  • iln pause — pause the contract (requires admin authentication)
  • iln unpause — unpause the contract (requires admin authentication)
  • Both should display confirmation and the resulting transaction hash
  • Both should check contract state before executing (e.g., don't pause if already paused)

Why it matters: Emergency pause functionality must be accessible quickly. Requiring developers to write code to pause a contract defeats the purpose of emergency controls.

Acceptance Criteria:

  • Create cli/src/commands/pause.ts with pause and unpause subcommands
  • Require admin authentication (use configured admin keypair)
  • Display contract state after execution
  • Register in cli/src/index.ts as iln pause and iln unpause
  • Add tests

Relevant Files: cli/src/index.ts, contracts/invoice_liquidity/src/lib.rs:440-465


Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions