Skip to content

Commit

Permalink
docs:(oft-solana): mention amount flag for creation (#1092)
Browse files Browse the repository at this point in the history
  • Loading branch information
nazreen authored Dec 3, 2024
1 parent 1bb0524 commit 5b878de
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions examples/oft-solana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,31 +185,35 @@ sh -c "$(curl -sSfL https://release.solana.com/v1.17.31/install)"

### Create the Solana OFT

For OFT:
:information_source: For **OFT** and **OFT Mint-and-Burn Adapter**, the SPL token's Mint Authority is set to the **Mint Authority Multisig**, which always has the **OFT Store** as a signer. The multisig is fixed to needing 1 of N signatures.

:information_source: For **OFT** and **OFT Mint-And-Burn Adapter**, you have the option to specify additional signers through the `--additional-minters` flag. If you choose not to, you must pass in `--only-oft-store true`, which means only the **OFT Store** will be a signer for the \_Mint Authority Multisig\*.

:warning: If you choose to go with `--only-oft-store`, you will not be able to add in other signers/minters or update the Mint Authority. You will also not be able to renounce the Freeze Authority. The Mint Authority and Freeze Authority will be fixed to the Mint Authority Multisig address.

#### For OFT:

```bash
pnpm hardhat lz:oft:solana:create --eid 40168 --program-id <PROGRAM_ID>
```

:warning: You may specify the `--additional-minters` flag to add a CSV of additional minter keys to the mint
multisig. If you do not want to, you must specify `--only-oft-store true`. If you choose the latter approach, you can never
substitute in a different mint authority.
:warning: Use `--additional-minters` flag to add a CSV of additional minter addresses to the Mint Authority Multisig. If you do not want to, you must specify `--only-oft-store true`.

For OFTAdapter:
:information_source: You can also specify `--amount <AMOUNT>` to have the OFT minted to your deployer address upon token creation.

#### For OFTAdapter:

```bash
pnpm hardhat lz:oft-adapter:solana:create --eid 40168 --program-id <PROGRAM_ID> --mint <TOKEN_MINT> --token-program <TOKEN_PROGRAM_ID>
```

For OFT Mint-And-Burn Adapter (MABA):
#### For OFT Mint-And-Burn Adapter (MABA):

```bash
pnpm hardhat lz:oft:solana:create --eid 40168 --program-id <PROGRAM_ID> --mint <TOKEN_MINT> --token-program <TOKEN_PROGRAM_ID>
```

:warning: You may specify the `--additional-minters` flag to add a CSV of additional minter keys to the mint
multisig. If you do not want to, you must specify `--only-oft-store store`. If you choose the latter approach, you can never
substitute in a different mint authority.
:warning: Use `--additional-minters` flag to add a CSV of additional minter addresses to the Mint Authority Multisig. If you do not want to, you must specify `--only-oft-store true`.

### Update [layerzero.config.ts](./layerzero.config.ts)

Expand Down Expand Up @@ -250,6 +254,8 @@ With a squads multisig, you can simply append the `--multisigKey` flag to the en

### Mint OFT on Solana

This is only relevant for **OFT**. If you opted to include the `--amount` flag in the create step, that means you already have minted some Solana OFT and you can skip this section.

:information_source: This is only possible if you specified your deployer address as part of the `--additional-minters` flag when creating the Solana OFT. If you had chosen `--only-oft-store`, you will not be able to mint your OFT on Solana.

First, you need to create the Associated Token Account for your address.
Expand Down

0 comments on commit 5b878de

Please sign in to comment.