diff --git a/docs/index.html b/docs/index.html index 51aefe7..2b1b315 100644 --- a/docs/index.html +++ b/docs/index.html @@ -2141,12 +2141,10 @@

Something Something

--> }, async checkApprovalEvents(provider, latestBlockNumber) { - console.log("Hi hi!"); const accountAs32Bytes = '0x000000000000000000000000' + this.coinbase.substring(2, 42).toLowerCase(); console.log("accountAs32Bytes: " + accountAs32Bytes); - // const fromBlock = 18770065; const fromBlock = 0; - const toBlock = 18770065; + const toBlock = latestBlockNumber; // ERC-20 Approval (index_topic_1 address owner, index_topic_2 address spender, uint256 value) // 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925 @@ -2160,18 +2158,20 @@

Something Something

--> // ERC-1155 ApprovalForAll (index_topic_1 address account, index_topic_2 address operator, bool approved) // 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31 - // const topics = [ '0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925', accountAs32Bytes, null ]; - // const logs = await provider.getLogs({ address: null, fromBlock, toBlock, topics }); - - // const topics = [ '0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925', accountAs32Bytes, null ]; - const logs = await provider.getLogs({ + const approvalLogs = await provider.getLogs({ + address: null, + fromBlock, + toBlock, + topics: [ '0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925', accountAs32Bytes, null ], + }); + console.log("approvalLogs: " + JSON.stringify(approvalLogs, null, 2)); + const approvalForAllLogs = await provider.getLogs({ address: null, fromBlock, toBlock, - // topics: [ '0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925', accountAs32Bytes, null ], topics: [ '0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31', accountAs32Bytes, null ], }); - console.log("logs: " + JSON.stringify(logs, null, 2)); + console.log("approvalForAllLogs: " + JSON.stringify(approvalForAllLogs, null, 2)); }, async syncEvents(db, provider, latestBlockNumber) {