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:
parent
ddb344b56a
commit
9e070870f4
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
}});
|
||||
}});
|
||||
|
|
Loading…
Reference in New Issue