Skip to content

Commit

Permalink
Update naj-contract.md (#1582)
Browse files Browse the repository at this point in the history
Update outdated usage of contract api
  • Loading branch information
ailisp authored Nov 14, 2023
1 parent fedd84d commit 30243e3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/4.tools/near-api-js/naj-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ When you instantiate an instance of `Contract` you need to specify the names of
Then the new instance of `Contract` will have methods with the same names as your smart contract functions.
For example if you deployed a contract with `my_smart_contract_function` function on it, then this will work:
```js
const contract = new Contract(account, {
const contract = new Contract(account, "example-contract.testnet", {
changeMethods: ["my_smart_contract_function"], // your smart-contract has a function `my_smart_contract_function`
sender: account
});
// `contract` object has `my_smart_contract_function` function on it:
contract.my_smart_contract_function()
Expand Down

0 comments on commit 30243e3

Please sign in to comment.