Skip to content

Commit

Permalink
Add docs on multisig setup
Browse files Browse the repository at this point in the history
  • Loading branch information
krebernisak committed Feb 3, 2022
1 parent d50e4c7 commit d4f1ffa
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 7 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# chainlink-solana
# Chainlink Solana

## Quick Start

For more information, see the [Chainlink Solana Documentation](./docs/).
Empty file removed docs/.keep
Empty file.
7 changes: 7 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Chainlink Solana Documentation

## Get Started

## Reference Docs

- **[Multisig](./multisig/)**: How to setup and use the multisig program.
5 changes: 5 additions & 0 deletions docs/multisig/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Multisig

This section gives a quick start on the Serum Multisig.

1. [Serum Multisig Setup](./serum-setup.md)
36 changes: 36 additions & 0 deletions docs/multisig/serum-setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Serum Multisig Setup

## Deploy Multisig program:

1. Download the program binary code from the GH Release: [https://github.com/project-serum/multisig/releases/tag/v0.9.0](https://github.com/project-serum/multisig/releases/tag/v0.9.0)

```bash
# Create the program keypair used as multisig's `program-id`
solana-keygen new --outfile multisig-program.json

# Check the binary size in bytes
wc -c target/verifiable/serum_multisig.so
234536 target/verifiable/serum_multisig.so

# Deploy the program, but add some buffer to the size as `max-len` (~2x)
solana program deploy \
--keypair PATH_TO_KEYPAIR/id.json \ # optional, custom keypair
--program-id multisig-program.json \
--max-len 500000 \
target/verifiable/serum_multisig.so
```

## Initialize Multisig state acc (wallet):

```bash
# Use the create command of the gauntlet-serum-multisig package/executable
yarn gauntlet-serum-multisig create --network=[NETWORK] --threshold=[THRESHOLD] [OWNERS...]
```

This will output 2 important addresses:

1. Multisig State Acc Address: where the multisig program data for this instance is stored (e.g., threshold, owners, proposals).
- Set this address as an env variable into `PATH_TO_GAUNTLET/networks/.env.network` as `MULTISIG_ADDRESS`
2. Multisig Signer Address: Address that will sign any transaction the multisig executes.
- This is the address we need to transfer ownership to, as all proposals will be executed virtually by this signer.
- This signer address is autogenerated from the Multisig Program ID and State Acc Address (can be derived/found at any time).
2 changes: 1 addition & 1 deletion gauntlet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ Install [Node Version Manager](https://github.com/nvm-sh/nvm) to help you manage
```
nvm use
yarn
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ LINK=9TD23DYGTgUSVGWMjQVZ9cqLrvFRbzJ7MguUncfDLbSG

BILLING_ACCESS_CONTROLLER=2KeBZNtEhe9ws5n7czJxYyAYvTfzD6vMEYWHvACxMGWd
REQUESTER_ACCESS_CONTROLLER=5UF9xKW9rjJJTzwSmvf6EKTkwTnp8RspVCXNtE4xX59d
LOWERING_ACCESS_CONTROLLER=5UF9xKW9rjJJTzwSmvf6EKTkwTnp8RspVCXNtE4xX59d
LOWERING_ACCESS_CONTROLLER=5UF9xKW9rjJJTzwSmvf6EKTkwTnp8RspVCXNtE4xX59d
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
NODE_URL=https://api.devnet.solana.com

PROGRAM_ID_OCR2=GA6oqeZii6WLgkQbR3NKaP1gsBUPeUvMAqakHiQt8mBX
PROGRAM_ID_ACCESS_CONTROLLER=
PROGRAM_ID_DEVIATION_FLAGGING_VALIDATOR=

0 comments on commit d4f1ffa

Please sign in to comment.