From 53674a5657853f9fd8dd9bd7ceb35ab398a5a724 Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Tue, 26 Apr 2022 17:52:29 -0400 Subject: [PATCH] Filter to ownerMint --- index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 5df6c51..6acb6e8 100644 --- a/index.js +++ b/index.js @@ -21,6 +21,7 @@ const blocknative = new BlocknativeSdk(options) await blocknative.configuration({ scope: "0x7d82a88Efb60Bb83B3f1665757c20D07E5C0f3ED", // [required] - either 'global' or valid Ethereum address + filters: [{"contractCall.methodName":"ownerMint"}], abi: contractABI.abi, // [optional] - valid contract ABI watchAddress: true // [optional] - Whether the server should automatically watch the "scope" value if it is an address }) @@ -48,9 +49,9 @@ emitter.on('txPool', transaction => { console.log(`Sending ${transaction.value} wei to ${transaction.to}`) }) -emitter.on('txConfirmed', transaction => { - console.log('Transaction is confirmed!') -}) +// emitter.on('txConfirmed', transaction => { + // console.log('Transaction is confirmed!') +// }) // catch every other event that occurs and log it emitter.on('all', transaction => {