From b76d17c86d72856aeec82e6120343c58fa5ead24 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Sun, 10 Sep 2023 15:19:58 +0400 Subject: [PATCH] docs(contract): add note about `getFileSystem` --- docs/guides/contracts.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/guides/contracts.md b/docs/guides/contracts.md index 9f07d71b3d..a034444964 100644 --- a/docs/guides/contracts.md +++ b/docs/guides/contracts.md @@ -210,3 +210,10 @@ As already stated various times in the guide it is possible to provide [transact Sometimes you might wonder how to pass params to the JavaScript method that calls an entrypoint of your Sophia smart contract. The conversion between JS and Sophia values is handled by aepp-calldata library. Refer to [its documentation](https://www.npmjs.com/package/@aeternity/aepp-calldata#data-types) to find the right type to use. + +## Generate file system object in Node.js +To do so you can use [getFileSystem](https://docs.aeternity.com/aepp-sdk-js/v13.2.1/api/functions/getFileSystem.html) function. +In most cases, you don't need to do it explicitly. Prefer to use `sourceCodePath` instead `sourceCode` in +[Contract::initialize](https://docs.aeternity.com/aepp-sdk-js/v13.2.1/api/classes/_internal_.Contract.html#initialize), +and [compile](https://docs.aeternity.com/aepp-sdk-js/v13.2.1/api/classes/CompilerBase.html#compile) +instead [compileBySourceCode](https://docs.aeternity.com/aepp-sdk-js/v13.2.1/api/classes/CompilerBase.html#compileBySourceCode) in CompilerBase.