npm installSet the provider to Devnet:
anchor config set --cluster devnet
anchor config set --provider.wallet ~/.config/solana/id.jsonanchor build
anchor deployAfter successful deployment, copy the program ID shown in the terminal output.
You can run tests with:
anchor testOnce the program is built, the IDL is located in:
anchor build
target/idl/wewe_token_launch_pad.jsonimport { AnchorProvider, Program, Idl } from "@project-serum/anchor";
import { Connection, PublicKey } from "@solana/web3.js";
import idl from "./idl/wewe_token_launch_pad.json";
const connection = new Connection("https://api.devnet.solana.com");
const provider = new AnchorProvider(connection, window.solana, {});
const programId = new PublicKey("<REPLACE_WITH_PROGRAM_ID>");
const program = new Program(idl as Idl, programId, provider);