text: const fs = require("fs");
  const path = require("path");
  const Web3 = require("web3");
  
  const { network, enclave } = require("../keys");
  const { createHttpProvider } = require("../helpers.js");
  const Web3Quorum = require("../../src");
  
  const artifact = fs.readFileSync(
    path.join(__dirname, "../solidity/EventEmitter/EventEmitter.json")
  );
  const { abi } = JSON.parse(artifact).output;
  const params = JSON.parse(fs.readFileSync(path.join(__dirname, "params.json")));
  
  const node = new Web3Quorum(
    new Web3(createHttpProvider(enclave.node1.jwt, network.node1.url))
  );
  
  async function run() {
    const { privacyGroupId, contractAddress } = params;
    const enclaveKey = enclave.node1.publicKey;
  
    // send a transaction
    const args = process.argv.slice(2);
    const value = args.shift() || 3;
  
    const to = contractAddress;
    const contract = new node.eth.Contract(abi);
  
    const writeReceipt = await node.priv
      .generateAndSendRawTransaction({
        to,
        data: contract.methods.store([value]).encodeABI(),
        privateFrom: enclaveKey,
        privacyGroupId,
        privateKey: network.node1.privateKey,
      })
      .then((transactionHash) => {
        return node.priv.waitForTransactionReceipt(transactionHash);
      });
  
    console.log(writeReceipt);
  }
  
  run();
  