|
@ -21,6 +21,7 @@ const blocknative = new BlocknativeSdk(options) |
|
|
|
|
|
|
|
|
await blocknative.configuration({ |
|
|
await blocknative.configuration({ |
|
|
scope: "0x7d82a88Efb60Bb83B3f1665757c20D07E5C0f3ED", // [required] - either 'global' or valid Ethereum address
|
|
|
scope: "0x7d82a88Efb60Bb83B3f1665757c20D07E5C0f3ED", // [required] - either 'global' or valid Ethereum address
|
|
|
|
|
|
filters: [{"contractCall.methodName":"ownerMint"}], |
|
|
abi: contractABI.abi, // [optional] - valid contract ABI
|
|
|
abi: contractABI.abi, // [optional] - valid contract ABI
|
|
|
watchAddress: true // [optional] - Whether the server should automatically watch the "scope" value if it is an address
|
|
|
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}`) |
|
|
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
|
|
|
// catch every other event that occurs and log it
|
|
|
emitter.on('all', transaction => { |
|
|
emitter.on('all', transaction => { |
|
|