Skip to content

Latest commit

 

History

40 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Pinocchio Multisig

A secure, efficient Multi-Signature Program built for Solana using the Pinocchio framework.


✨ Overview

pinocchio-multisig is an on-chain program for the Solana blockchain that implements a multi-signature wallet. This design enhances security by requiring a predefined number of authorized signers (owners) to approve a transaction before it can be executed.

This program leverages the Pinocchio library, a zero-dependency, highly optimized framework for writing Solana programs in Rust, ensuring minimal compute unit (CU) consumption and a compact binary size.

💡 Features

  • Trustless Multi-Signature Logic: Securely manage funds and execute arbitrary instructions only after achieving the required consensus of owners.
  • Pinocchio Optimization: Built on Pinocchio for maximum efficiency in terms of compute units and on-chain program size.
  • Flexible Transaction Execution: Allows the creation of proposals for any arbitrary Solana instruction, providing full administrative control over the governed accounts.
  • Account Abstraction: Uses Program Derived Addresses (PDAs) to securely hold assets and execute transactions on the multisig's behalf.
  • Pure Rust Implementation: Written entirely in Rust, following the best practices for low-level Solana program development.

⚙️ Prerequisites

To build, test, and deploy this program, you need to have the following installed:

  1. Rust: The Rust programming language and Cargo package manager.
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  2. Solana CLI: The Solana Command Line Interface.
    sh -c "$(curl -sSfL https://release.solana.com/stable/install)"
  3. cargo-build-sbf: Used to compile the program for the Solana BPF (Berkeley Packet Filter) target.
    cargo install cargo-build-sbf

🛠️ Installation and Setup

  1. Clone the repository:

    git clone https://github.com/Turbin3/pinocchio-multisig.git
    cd pinocchio-multisig
  2. Build the program: The Pinocchio framework uses a standard BPF build process.

    cargo build-sbf --release

    The compiled program file (.so) will be located at target/deploy/pinocchio_multisig.so.

  3. Deploy the program (Optional): You can deploy your local build to a Solana cluster (e.g., devnet or testnet).

    solana program deploy target/deploy/pinocchio_multisig.so

📝 Usage and Instructions

The Pinocchio Multisig program typically follows a core set of instructions:

  1. Initialize Multisig: Creates the multisig account, defines the set of owners, and sets the required threshold (m of n) for transaction approval.
  2. Create Transaction: Proposes an instruction to be executed by the multisig, specifying the target program, account list, and instruction data.
  3. Approve Transaction: An owner signs the transaction proposal. Once the number of approvals reaches the required threshold, the transaction can be executed.
  4. Execute Transaction: Finalizes the proposal and executes the underlying instruction with the multisig's authority (PDA).

Specific instruction data schemas and client-side (off-chain) tooling would be required to interact with the program correctly.

🧪 Testing

To run the program's tests (if implemented with solana-program-test or similar), use the standard Cargo test command:

cargo test

🤝 Contribution

Contributions are welcome! Please feel free to fork the repository, create a feature branch, and submit a pull request for any improvements or bug fixes.


📜 License

This project is licensed under the Apache-2.0 License. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

15 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages