async sendMethod(contract, instance, method, sender, web3, apiKey, args, data) {
        try {
          const response = await this.methodPostHelper(contract, instance, method, sender,
            apiKey, args, data);

          // Send transaction to Blockchain for POST requests only
          const { tx, submitted } = response.data.result;
          let txHash = tx.hash;
          if (!submitted) {
            const signer = web3.getSigner(tx.from);
            const ethersTx = this.formatEthersTx(tx);
            const txResponse = await signer.sendTransaction(ethersTx);
            txHash = txResponse.hash;
          }

          const receipt = await this.waitForTransactionConfirmation(txHash, web3);

          console.log(response.data.result);
          return receipt;
        } catch (e) {
          console.warn(e);
          return null;
        }
      }
// web3: a handle to the web3 instance
a handle to the web3 instance
a handle to the web3 instance
async sendMethod(contract, instance, method, sender, web3, apiKey, args, data) {
        try {
          const response = await this.methodPostHelper(contract, instance, method, sender,
            apiKey, args, data);
          const { tx, submitted } = response.data.result;
          let txHash = tx.hash;
          if (!submitted) {
            const signer = web3.getSigner(tx.from);
            const ethersTx = this.formatEthersTx(tx);
            const txResponse = await signer.sendTransaction(ethersTx);
            txHash = txResponse.hash;
          }
          const receipt = await this.waitForTransactionConfirmation(txHash, web3);
          console.log(response.data.result);
          return receipt;
        } catch (e) {
          console.warn(e);
          return null;
        }
      }
async sendMethod ( contract , instance , method , sender , web3 , apiKey , args , data ) { try { const response = await this . methodPostHelper ( contract , instance , method , sender , apiKey , args , data ) ; const { tx , submitted } = response . data . result ; let txHash = tx . hash ; if ( ! submitted ) { const signer = web3 . getSigner ( tx . from ) ; const ethersTx = this . formatEthersTx ( tx ) ; const txResponse = await signer . sendTransaction ( ethersTx ) ; txHash = txResponse . hash ; } const receipt = await this . waitForTransactionConfirmation ( txHash , web3 ) ; console . log ( response . data . result ) ; return receipt ; } catch ( e ) { console . warn ( e ) ; return null ; } }
web3: a handle to the web3 instance
web3 : a handle to the web3 instance
// Send transaction to Blockchain for POST requests only