Skip to main content
Security warningRestricted Wallet is unmaintained and has unresolved security issues.
Restricted Wallet is a specialized wallet contract that restricts transfers to predefined owner address, and some operations with Elector and Config contracts. It is used in Single Nominator project to securely hold a validator stake and participate in elections without a risk of stealing funds from it.

What makes it different

Unlike standard wallets that allow transfers to any address, Restricted Wallet implements address-based restrictions that limit where funds can be sent. Standard wallet behavior:
You can send funds to any valid address.
Restricted Wallet behavior:
You can only send funds to the predefined owner address or do operations with Elector (new stake, recover stake request, new complaint, and vote for a complaint) and Config (vote for specific proposal to change config) contracts.

How it works

Single Nominator Architecture

Allowed actions

  1. Send a message to the owner of this wallet.
  2. Send “vote for a configuration proposal” message to the Config contract.
  3. Send “new stake”, “recover stake request”, “new complaint”, or “vote for a complaint” messages to the Elector contract.
It is allowed to use message modes 128, 64, 2, and 1. Mode 2 (ignore errors) is always enabled when sending messages from this wallet.

Implementation

Source code