From 495c7a7d15db430287b0407fb0bf506a8c11c81d Mon Sep 17 00:00:00 2001 From: Xiaohui Date: Fri, 29 Sep 2023 10:52:28 -0700 Subject: [PATCH] renaming: read artifact --- docs/advanced/how-to-integrate-scrypt-service.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/advanced/how-to-integrate-scrypt-service.md b/docs/advanced/how-to-integrate-scrypt-service.md index 5d3bca4ff..86fe49074 100644 --- a/docs/advanced/how-to-integrate-scrypt-service.md +++ b/docs/advanced/how-to-integrate-scrypt-service.md @@ -203,7 +203,7 @@ const fs = require('fs').promises; const util = require('util'); // Async function to read a JSON file -async function fetchArtifactFromFile(filePath) { +async function readArtifactFromFile(filePath) { try { // Read the file using fs.promises.readFile and await for the result const data = await fs.readFile(filePath, 'utf8'); @@ -226,7 +226,7 @@ async function main() { const artifactFilePath = 'path_to_your_json_file.json'; // Fetch the JSON artifact data from the file - const artifact = await fetchArtifactFromFile(artifactFilePath); + const artifact = await readArtifactFromFile(artifactFilePath); const apiKey = '[Your API key]'; const webhookUrl = 'https://api.scrypt.io/webhooks/create'; // Use 'https://testnet-api.scrypt.io' for testnet