Skip to content

Add universal receiver handlers to contracts #52

@ya7on

Description

@ya7on

Is your feature request related to a problem

During some cases (e.g. sending Excess to Lock contract) some transactions fail with exit code 130, indicating that the contract does not implement a catch-all message receiver (receiver (msg: Slice) { }).

Describe the solution you'd like

Implement a default receiver (msg: Slice) { } handler (aka "universal receiver") in the following contracts:

  • Lock
  • Skipper
  • Proposal
  • Voter

This handler should:

  1. Accept any incoming message (generic fallback).
  2. Optionally use the received TON to top up the contract’s gas reserve.
  3. Return change (leftover funds) to the sender, minus a fixed reserved amount (e.g., 0.05 TON for gas).

This would act as a safe "top-up" API and eliminate issues from unknown incoming messages.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions