|
@@ -10,15 +10,10 @@ anchor.setProvider(anchor.AnchorProvider.local());
|
|
|
async function main() {
|
|
|
// #region main
|
|
|
// Read the generated IDL.
|
|
|
- const idl = JSON.parse(
|
|
|
- require("fs").readFileSync("./target/idl/basic_0.json", "utf8")
|
|
|
- );
|
|
|
-
|
|
|
- // Address of the deployed program.
|
|
|
- const programId = new anchor.web3.PublicKey("<YOUR-PROGRAM-ID>");
|
|
|
+ const idl = require("./target/idl/basic_0.json");
|
|
|
|
|
|
// Generate the program client from IDL.
|
|
|
- const program = new anchor.Program(idl, programId);
|
|
|
+ const program = new anchor.Program(idl);
|
|
|
|
|
|
// Execute the RPC.
|
|
|
await program.rpc.initialize();
|