Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #32

Merged
merged 3 commits into from
Sep 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 70 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,78 @@
# Squads Multisig Program V4
# Squads V4 program

## Build Verification
The Squads V4 program is the latest release of the Squads multisig protocol. This program was designed to be used as a solution for on-chain treasury and smart contract management on Solana, as well as for a variety of Fintech applications that require strong security fundamentals.

You can use [Solana Verify CLI](https://github.com/Ellipsis-Labs/solana-verifiable-build) to verify that the program deployed at `SQDS4ep65T869zMMBKyuUq6aD6EgTu8psMjkvj52pCf` matches the code in this repository. After installing the CLI, run:
## Content

This repository contains:

- The Squads Protocol V4 Solana program.
- The `@sqds/multisig` Typescript SDK to interact with the Squads V4 program.
- The `squads-multisig` crate to interact with the Squads V4 program in Solana programs as well as Rust client applications.

## Smart contract Adresses

The Squads Protocol V4 program is deployed to:

- Solana Mainnet-beta: `SQDS4ep65T869zMMBKyuUq6aD6EgTu8psMjkvj52pCf`
- Solana Devnet: `SQDS4ep65T869zMMBKyuUq6aD6EgTu8psMjkvj52pCf`

Both deployments can be verified using the [Ellipsis Labs verifiable build](https://github.com/Ellipsis-Labs/solana-verifiable-build) tool.

### Compiling and testing

You can compile the code with Anchor.
```
anchor build
```
If you do not have the Solana Anchor framework CLI installed, you can do so by following [this guide](https://www.anchor-lang.com/docs/installation).

To deploy the program on a local validator instance for testing or development purposes, you can create a local instance by running this command from the [Solana CLI](https://docs.solana.com/cli/install-solana-cli-tools).
```
solana-test-validator
```
To run the tests, first install the node modules for the repository.
```
yarn
```
or
```
npm install
```
solana-verify verify-from-repo --current-dir -um --library-name multisig --program-id SQDS4ep65T869zMMBKyuUq6aD6EgTu8psMjkvj52pCf https://github.com/Squads-Protocol/v4
And run these tests with this command:
```
yarn test
```

### Verifying the code
First, compile the programs code from the `Squads-Protocol/v4` Github repository to get its bytecode.
```
git clone https://github.com/Squads-Protocol/v4.git
```

```
anchor build
```
Now, install the [Ellipsis Labs verifiable build](https://crates.io/crates/solana-verify) crate.
```
cargo install solana-verify
```
Get the executable hash of the bytecode from the Squads program that was compiled.
```
solana-verify get-executable-hash target/deploy/multisig.so
```
Get the hash from the bytecode of the on-chain Squads program you want to verify.
```
solana-verify get-program-hash -u <cluster url> SQDS4ep65T869zMMBKyuUq6aD6EgTu8psMjkvj52pCf
```
If the hash outputs of those two commands match, the code in the repository matches the on-chain programs code.


## Usage
Instructions on how to interact with the Squads V4 program can be found in [the Squads developer portal](https://developers.squads.so).

This may take a while as it builds the program inside Docker, then verifies that the build hash matches the deployed program hash. The verification process is much faster on a non-ARM machine.
## Security
The Squads protocol has undergone various independent audits by leading cybersecurity and blockchain smart contract auditing firms.


## License
Expand All @@ -18,4 +82,4 @@ The primary license for Squads Multisig Program V4 is the Business Source Licens
- The file <https://github.com/Squads-Protocol/v4/blob/main/programs/multisig/src/utils/system.rs> is derived from code released under the [Apache 2.0 license](https://github.com/coral-xyz/anchor/blob/master/LICENSE) at <https://github.com/coral-xyz/anchor/blob/714d5248636493a3d1db1481f16052836ee59e94/lang/syn/src/codegen/accounts/constraints.rs#L1126-L1179>.
- The file <https://github.com/Squads-Protocol/v4/blob/main/programs/multisig/src/utils/small_vec.rs> is derived from code released under both the [Apache 2.0 license](https://github.com/near/borsh-rs/blob/master/LICENSE-APACHE) and the [MIT license](https://github.com/near/borsh-rs/blob/master/LICENSE-MIT) at <https://github.com/near/borsh-rs/blob/master/borsh/src/de/hint.rs> and <https://github.com/near/borsh-rs/blob/master/borsh/src/ser/mod.rs>.

To the extent that each such file incorporates code from another source, such code is licensed under its respective open source license as provided above, and the original open source code is copyrighted by its respective owner as provided above.
To the extent that each such file incorporates code from another source, such code is licensed under its respective open source license as provided above, and the original open source code is copyrighted by its respective owner as provided above.