From f34dcf79ea345a82eb4bb1b7fbba03ac81efc910 Mon Sep 17 00:00:00 2001 From: Xiaohui Date: Mon, 18 Sep 2023 17:03:34 -0700 Subject: [PATCH] minor wording --- docs/how-to-write-a-contract/built-ins.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/how-to-write-a-contract/built-ins.md b/docs/how-to-write-a-contract/built-ins.md index 5cd393087..1e98f7edd 100644 --- a/docs/how-to-write-a-contract/built-ins.md +++ b/docs/how-to-write-a-contract/built-ins.md @@ -206,11 +206,11 @@ const size = demo.scriptSize ### `loadArtifact` -Function `static loadArtifact(artifactFile: Artifact | string | undefined = undefined)` loads the contract artifact file from the path you passed in order to initialize the contract class. +Function `static loadArtifact(artifactFile: Artifact | string | undefined = undefined)` loads the contract artifact file from the path you passed in to initialize the contract class. -If no parameters are passed when calling, the function will load the artifact file from the default directory. This form is generally used when [testing](../how-to-test-a-contract.md#load-artifact) the contract. +If no parameter is passed when calling, the function will load the artifact file from the default directory. This is generally used during [testing](../how-to-test-a-contract.md#load-artifact). -You can also pass the artifact itself directly. This form will be used when the method is called at the front end. +You can also pass the artifact path directly. This is usually used when the method is called when [interacting with a contract at the front end](../how-to-integrate-a-frontend/how-to-integrate-a-frontend.md). ```ts import { TicTacToe } from './contracts/tictactoe'; @@ -218,8 +218,6 @@ import artifact from '../artifacts/tictactoe.json'; TicTacToe.loadArtifact(artifact); ``` -You may visit [here](https://academy.scrypt.io/en/courses/Build-a-Tic-tac-toe-Game-with-sCrypt-614c387bc0974f55df5af1e5/lessons/2/chapters/1) for more details about how to add a front end to a contract. - ### `checkSig` Function `checkSig(signature: Sig, publicKey: PubKey): boolean` verifies an ECDSA signature. It takes two inputs: an ECDSA signature and a public key.