Get Seal
Summary:
1. Imports and Environment Setup:
const {
Client,
ContractFunctionParameters,
ContractCallQuery,
Hbar, PrivateKey
} = require("@hashgraph/sdk");
require('dotenv').config({ path: 'SmartContract_Service/.env' });2. Environment Variables Retrieval and Validation:
const myAccountId = process.env.MY_ACCOUNT_ID;
const myPrivateKey = PrivateKey.fromString(process.env.MY_PRIVATE_KEY);
const contractId = process.env.CONTRACT_ID;
const hash = process.env.HASH;
if (myAccountId == null || myPrivateKey == null) {
throw new Error("Environment variables myAccountId and myPrivateKey must be present");
}3. Client Setup:
4. Main Function:
5. Execution:
Last updated