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

updated docs with mainnet PID and instructions #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ FuZe is Zeta's cross-program integration ecosystem.
This repository contains the Zeta Cross Program Invocation (CPI) interface as well as a number of helpful examples and reference implementations on how to compose (fuse) with the Zeta DEX.

## Networks
To change the network, one must update both the `Anchor.toml` as well as the program ID in the `.env` to the desired network.

| Key | Value |
| ------- | :--------------------------------------------: |
| Devnet | <span style="color:green">Live</span> |
| Mainnet | <span style="color:grey">Coming soon...</span> |
| Network | Program ID |
| ------- | :---------------------------------------------------------------------------: |
| Devnet | <span style="color:green">BG3oRikW8d16YjUEmX3ZxHm9SiJzrGtMhsSR8aCw1Cd7</span> |
| Mainnet | <span style="color:green">ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD</span> |

## Cross Program Invocations

Expand Down
24 changes: 4 additions & 20 deletions vault/tests/vault.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,9 @@ describe("vault", () => {
console.log(vaultAdmin.publicKey.toString());
console.log(userKeypair.publicKey.toString());

// Configure the client to use the local cluster.
const url = "https://api.devnet.solana.com";
if (url === undefined) {
throw new Error("ANCHOR_PROVIDER_URL is not defined");
}
const connection = new anchor.web3.Connection(
url,
zetaUtils.defaultCommitment()
);
const provider = new anchor.Provider(
connection,
new anchor.Wallet(userKeypair),
zetaUtils.defaultCommitment()
);
// Configure the client to use the specified cluster.
const provider = anchor.Provider.env();
anchor.setProvider(provider);
const publicConnection = new anchor.web3.Connection(
"https://api.devnet.solana.com",
zetaUtils.defaultCommitment()
);

const program = anchor.workspace.Vault as anchor.Program<Vault>;
const zetaProgram = new anchor.web3.PublicKey(process.env!.zeta_program);
Expand All @@ -62,8 +46,8 @@ describe("vault", () => {
);

// Airdrop some SOL to the vault authority
await publicConnection.confirmTransaction(
await publicConnection.requestAirdrop(
await provider.connection.confirmTransaction(
await provider.connection.requestAirdrop(
vaultAdmin.publicKey,
1.0 * anchor.web3.LAMPORTS_PER_SOL // 1 SOL
),
Expand Down