diff --git a/docs/Transceiver.md b/docs/Transceiver.md
index 0ce9ebeef..707f22ece 100644
--- a/docs/Transceiver.md
+++ b/docs/Transceiver.md
@@ -4,7 +4,7 @@
The Transceiver is intended to offer a protocol-agnostic interface for sending and receiving cross-chain messages. For Native Token Transfers, this entails initiating attestation generation on the source chain, verifying the resulting attestation on the destination chain, and delivering the message to the associated `NttManager`.
-In the provided implementations ([EVM](/evm/src/Transceiver/Transceiver.sol)/[SVM](/solana/programs/example-native-token-transfers/src/transceivers/wormhole/)), Transceiver are intended to have a many-to-one or one-to-one relationship with Managers.
+In the provided implementations ([EVM](/evm/src/Transceiver/Transceiver.sol)/[SVM](/solana/programs/ntt-transceiver/src/wormhole/)), Transceivers are intended to have a many-to-one relationship with Managers.
## Message Specification
diff --git a/evm/README.md b/evm/README.md
index 8888b52b8..74dbe66c9 100644
--- a/evm/README.md
+++ b/evm/README.md
@@ -166,7 +166,7 @@ Install Foundry tools(https://book.getfoundry.sh/getting-started/installation),
Run the following command to install necessary dependencies and to build the smart contracts:
```shell
-$ make build-evm
+$ make build
```
### Test
@@ -174,17 +174,23 @@ $ make build-evm
To run the full evm test-suite run the following command:
```shell
-$ make test-evm
+$ make test
```
The test-suite includes unit tests, along with property-based fuzz tests, and integration-tests.
### Format
-To format the files run this command from the root directory.
+To check for format errors run the following command:
```shell
-$ make fix-fmt
+$ make lint
+```
+
+To format the files run the following command:
+
+```shell
+$ make fix-lint
```
### Gas Snapshots
diff --git a/solana/Makefile b/solana/Makefile
index 5ad3a801a..9b542b5f1 100644
--- a/solana/Makefile
+++ b/solana/Makefile
@@ -1,9 +1,9 @@
.DEFAULT_GOAL = build
.PHONY: build cargo-build anchor-build prod-build test cargo-test anchor-test idl sdk clean node_modules lint cargo-lint anchor-lint fix-lint
-#find and convert version line:
-# turn `const VERSION: &str = "major.minor.patch";` into `major_minor_patch`
-#use make functions to minimize dependence on shell
+# Find and convert version line:
+# Turn `const VERSION: &str = "major.minor.patch";` into `major_minor_patch`
+# Use make functions to minimize dependence on shell
VERSION = $(subst .,_,$(subst ;,,$(subst ",,$(lastword \
$(shell grep "const VERSION" programs/example-native-token-transfers/src/lib.rs) \
))))
@@ -18,7 +18,7 @@ build: cargo-build anchor-build
cargo-build:
BPF_OUT_DIR="$(pwd)/target/deploy" cargo build-sbf
-# after building, remove the generics from the idl file. This is necessary as of anchor 0.29.0,
+# After building, remove the generics from the idl file. This is necessary as of anchor 0.29.0,
# because the javascript library does not support generics yet, and just panics
anchor-build:
anchor build --arch sbf
diff --git a/solana/README.md b/solana/README.md
index 236051d3c..2505857b6 100644
--- a/solana/README.md
+++ b/solana/README.md
@@ -1,21 +1,5 @@
# Solana
-## Prequisities
-
-Ensure that you are using the correct version of the Solana and Anchor CLI tools by consulting `Anchor.toml`.
-
-```toml
-[toolchain]
-anchor_version = "0.29.0" # CLI
-solana_version = "1.18.10"
-```
-
-You will also need to install the toolchain listed in `rust-toolchain`. You can verify this by running:
-
-```sh
-rustup show
-```
-
## Design Overview
### Message Lifecycle (Solana)
@@ -41,14 +25,14 @@ The program checks rate limits via the `consume_or_delay` function during the tr
If the transfer amount fits within the current capacity:
-- Reduce the current capacity
-- Refill the inbound capacity for the destination chain
+- Reduce the current capacity.
+- Refill the inbound capacity for the destination chain.
- Add the transfer to the outbox with `release_timestamp` set to the current timestamp, so it can be released immediately.
If the transfer amount does not fit within the current capacity:
-- If `shouldQueue = true`, add the transfer to the outbox with `release_timestamp` set to the current timestamp plus the configured `RATE_LIMIT_DURATION`.
-- If `shouldQueue = false`, revert with a `TransferExceedsRateLimit` error
+- If `should_queue = true`, add the transfer to the outbox with `release_timestamp` set to the current timestamp plus the configured `RATE_LIMIT_DURATION`.
+- If `should_queue = false`, revert with a `TransferExceedsRateLimit` error.
3. **Send**
@@ -76,7 +60,7 @@ The following will be produced in the program logs:
Program log: Instruction: ReceiveMessage
```
-[`redeem`] checks the inbound rate limit and places the message in an Inbox. Logic works the same as the outbound rate limit we mentioned previously.
+[`redeem`] checks the inbound rate limit and places the message in an Inbox. The logic works the same as the outbound rate limit we mentioned previously.
The following will be produced in the program logs:
@@ -109,51 +93,77 @@ The additional payload field should then have your custom struct available every
You can then modify [release_outbound](./programs/example-native-token-transfers/src/transceivers/wormhole/instructions/release_outbound.rs) and [redeem](./programs/example-native-token-transfers/src/instructions/redeem.rs) to generate and process the additional payload.
-## Testing
+## SPL Multisig Support
+
+Using [SPL Multisig](https://docs.rs/spl-token/latest/spl_token/state/struct.Multisig.html), you can enable multiple minters on Solana. For example, this allows NTT to burn/mint tokens without being the only authority to do so, i.e. the asset issuer can also retain mint authority.
+
+1. **Create valid SPL Multisig**
+
+The SPL Multisig should meet the following criteria to qualify as a valid mint authority for NTT:
+
+- Number of signers required ([m](https://docs.rs/spl-token/latest/spl_token/state/struct.Multisig.html#structfield.m)) should be `1`
+- One of the [signers](https://docs.rs/spl-token/latest/spl_token/state/struct.Multisig.html#structfield.signers) must be the `token_authority` PDA
+
+2. **Set valid SPL Multisig as mint authority**
+
+You can set the created multisig as the mint authority via the [`accept_token_authority`] instruction.
+
+> If the current mint authority is also an SPL Multisig, use the [`accept_token_authority_from_multisig`] instruction instead.
+
+3. **Use [`*_multisig`] instruction variants**
-The test files are loacated in the `sdk/solana/__tests__/` directory
+To initialize NTT, use the [`initialize_multisig`] instruction instead.
-In order to run them, the Solana programs must be built and their IDL made available to the SDK.
+In `burning` mode, to release the inbound transfer and the mint tokens to the recipient, use the [`release_inbound_mint_multisig`] instruction instead.
-To ensure the SDK has the generated IDL, run the tests with the make command:
+## Prerequisites
+
+### Installation
+
+Ensure that you are using the correct version of the Solana and Anchor CLI tools by consulting `Anchor.toml`.
+
+```toml
+[toolchain]
+anchor_version = "0.29.0" # CLI
+solana_version = "1.18.10"
+```
+
+Install the toolchain listed in `rust-toolchain`. You can verify this by running:
```sh
-make test
+rustup show
```
-### Troubleshooting
+Install [`jq`](https://jqlang.github.io/jq/) and [`tsx`](https://www.npmjs.com/package/tsx) globally as they are required by build scripts.
-
-make: *** No rule to make target `test'. Stop.
+### Build
-- Ensure `Makefile` has target `test`
-
+Run the following command to install necessary dependencies and to build the programs:
-
-tsx: command not found
+```sh
+make build
+```
-- Screenshot:
-
-- Update `Makefile` ([line #29](https://github.com/wormhole-foundation/example-native-token-transfers/blob/main/solana/Makefile#L29)) from:
+### Test
- ```sh
- tsx scripts/regenerateIdl.ts $$jsonfile > $$tsfile; \
- ```
+Run the following command to generate the IDL and run the full Solana test-suite:
- to:
+```sh
+make test
+```
- ```sh
- npx tsx scripts/regenerateIdl.ts $$jsonfile > $$tsfile; \
- ```
+The test-suite includes cargo unit tests and Anchor integration tests.
-
+### Format
-
- Lifecycle script `build:esm` failed with error
+Run the following command to check for lint errors:
- - Screenshot:
-
- - This occurs due to Typescript files failing compilation.
- - [`patch-idl` script](https://github.com/wormhole-foundation/example-native-token-transfers/blob/main/solana/scripts/patch-idl) requires [`jq`](https://jqlang.github.io/jq/) to be installed. Install `jq` and retry.
+```sh
+make lint
+```
+
+Run the following command to fix lint errors:
-
+```sh
+make fix-lint
+```
diff --git a/solana/images/lifecycle-script.png b/solana/images/lifecycle-script.png
deleted file mode 100644
index 4f1ec275b..000000000
Binary files a/solana/images/lifecycle-script.png and /dev/null differ
diff --git a/solana/images/tsx-command-not-found.png b/solana/images/tsx-command-not-found.png
deleted file mode 100644
index 9d4973248..000000000
Binary files a/solana/images/tsx-command-not-found.png and /dev/null differ