cli: update js/ts templates to use new `.methods` syntax (#1732)

Co-authored-by: Nikhil B N <nikhilbn365@gmail.com>
This commit is contained in:
Paul 2022-04-04 14:50:45 -04:00 committed by GitHub
parent ddb344b56a
commit 9e070870f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -16,6 +16,7 @@ The minor version will be incremented upon a breaking change and the patch versi
* lang: Add return values to CPI client ([#1598](https://github.com/project-serum/anchor/pull/1598)).
* ts: Add view functions ([#1695](https://github.com/project-serum/anchor/pull/1695)).
* avm: New `avm update` command to update the Anchor CLI to the latest version ([#1670](https://github.com/project-serum/anchor/pull/1670)).
* cli: Update js/ts templates to use new `program.methods` syntax ([#1732](https://github.com/project-serum/anchor/pull/1732)).
### Fixes

View File

@ -201,7 +201,7 @@ describe("{}", () => {{
it("Is initialized!", async () => {{
// Add your test here.
const program = anchor.workspace.{};
const tx = await program.rpc.initialize();
const tx = await program.methods.initialize().rpc();
console.log("Your transaction signature", tx);
}});
}});
@ -262,7 +262,7 @@ describe("{}", () => {{
it("Is initialized!", async () => {{
// Add your test here.
const tx = await program.rpc.initialize({{}});
const tx = await program.methods.initialize().rpc();
console.log("Your transaction signature", tx);
}});
}});