- First, git clone this project.
git clone https://github.com/Web3Packages/UseCases-Chainlink.git
or
git clone [email protected]:Web3Packages/UseCases-Chainlink.git
-
Copy the ".env.example" file and modify it to ".env". Then, make the necessary configuration changes. For example, private key.
-
Install all dependencies
npm install
- Change the function returns you want in "./source.js"
// for single return
const [strToUtf8ByteStr] = returnFunction();
or
// for multi-returns
const [strToUtf8ByteStr, uint8ArrayToByteStr, ...] = returnFunction();
- Change the url and namesInput in "/scripts/01_reques.js"
// single file
const url = "https://0x5d0b47bdd72265c0443d6f96065aa45c24677f04.11155111.w3link.io/[email protected]";
const namesInput = "strToUtf8ByteStr";
or
// multi-files
const url = "https://0x5d0b47bdd72265c0443d6f96065aa45c24677f04.11155111.w3link.io/[email protected][email protected]";
const namesInput = "strToUtf8ByteStr_uint8ArrayToByteStr";
- run the script to test the source
node ./scripts/01_reques.js
You can get the reponses of the request you submited after a while
node ./scripts/02_readResponse.js