Skip to content

TopTrenDev/solana-multisig-wallet-smart-contract

Repository files navigation

Solana Multi-Signature Wallet Smart Contract

A decentralized multi-signature wallet smart contract built on Solana using the Anchor framework. This contract enables secure, multi-party control over wallet operations through a threshold-based approval system.

Twitter Discord Telegram

📋 Overview

This smart contract implements a multi-signature wallet where transactions require approval from a minimum number of signers (threshold) before execution. It provides a secure way to manage funds and execute operations that require consensus among multiple parties.

🔗 Contract Information

Contract Address (Program ID): 13znVHvGHzKuCngmHHFwtdYHEn42NdKAQu2nGJDq9oc6

Network: Solana Devnet

🚀 Features

  • Initialize Multisig Wallet: Set up a new multisig wallet with a threshold and list of signers
  • Create Transaction: Propose new transactions that require approval
  • Approve Transaction: Signers can approve pending transactions
  • Execute Transaction: Execute transactions once the threshold of approvals is met
  • Manage Signers: Add or remove signers from the multisig wallet
  • Update Threshold: Modify the minimum number of approvals required

📝 Transaction Examples

Create Transaction

Solscan

Transaction Signature: 5BYMKVK75eVUCZjdrVhvVPPQHXGVrRwagGrinGtfPs5E7y1YKyF1wsECqsY4LLSZWumsxJp6u7nVBmsPNetuMRjf

Link: https://solscan.io/tx/5BYMKVK75eVUCZjdrVhvVPPQHXGVrRwagGrinGtfPs5E7y1YKyF1wsECqsY4LLSZWumsxJp6u7nVBmsPNetuMRjf?cluster=devnet

Approve Transaction

Solscan

Transaction Signature: dQS8vTSHniVhKfWPRZcieBMGf3xe9Du4EWS1PZ2hx3uvUeRPjj2qSWnuxAgEzHRgPna8BQaCVpar3YtG9rkyraP

Link: https://solscan.io/tx/dQS8vTSHniVhKfWPRZcieBMGf3xe9Du4EWS1PZ2hx3uvUeRPjj2qSWnuxAgEzHRgPna8BQaCVpar3YtG9rkyraP?cluster=devnet

Execute Transaction

Solscan

Transaction Signature: 5MMWNHxohmWRP5quLa5yaKy5XeKhbgjkPhGQxZsUrMLhtkr4xSJAE5NocJkn7fhpZrNuX9RxGzizZeWtoJShnTz7

Link: https://solscan.io/tx/5MMWNHxohmWRP5quLa5yaKy5XeKhbgjkPhGQxZsUrMLhtkr4xSJAE5NocJkn7fhpZrNuX9RxGzizZeWtoJShnTz7?cluster=devnet

🛠️ Development

Building

anchor build

Testing

anchor test

Deploying

anchor deploy

📚 Program Instructions

initialize

Initialize a new multisig wallet with a threshold and list of signers.

Parameters:

  • threshold: Minimum number of approvals required (u8)
  • signers: Vector of signer public keys

create_transaction

Create a new transaction proposal that requires approval.

Parameters:

  • instructions: Vector of instruction data to execute
  • description: Optional description of the transaction

approve_transaction

Approve a pending transaction. Each signer can approve a transaction once.

execute_transaction

Execute a transaction once it has received the required number of approvals (threshold).

add_signer

Add a new signer to the multisig wallet.

Parameters:

  • new_signer: Public key of the new signer

remove_signer

Remove a signer from the multisig wallet.

Parameters:

  • signer_to_remove: Public key of the signer to remove

update_threshold

Update the minimum number of approvals required for transactions.

Parameters:

  • new_threshold: New threshold value (u8)

About

Solana Multi Signature Wallet Smart Contract: A decentralized multi-signature wallet smart contract built on Solana using the Anchor framework. This contract enables secure, multi-party control over wallet operations through a threshold-based approval system.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors