From 92b18c448c82d606978a9541d6f7a5d17f0644fa Mon Sep 17 00:00:00 2001 From: Tornado Contrib Date: Thu, 4 Apr 2024 10:24:38 +0000 Subject: [PATCH] Added old proxies to fetch every encrypted accounts --- mustache/templates/proxy/contracts.js | 12 ++++++++ mustache/templates/proxy/create-yaml.js | 2 +- mustache/yaml.mustache | 2 +- src/contractsToInstances.ts | 2 +- subgraphs/tornado-subgraph-mainnet.yaml | 40 +++++++++++++++++++++++++ 5 files changed, 55 insertions(+), 3 deletions(-) diff --git a/mustache/templates/proxy/contracts.js b/mustache/templates/proxy/contracts.js index 60000a0..9b6c211 100644 --- a/mustache/templates/proxy/contracts.js +++ b/mustache/templates/proxy/contracts.js @@ -17,6 +17,18 @@ const contracts = [ network: 'matic', address: '0x0D5550d52428E7e3175bfc9550207e4ad3859b17', }, + { + prod: 12143762, + name: 'Proxy-old1', + network: 'mainnet', + address: '0x722122dF12D4e14e13Ac3b6895a86e84145b6967', + }, + { + prod: 15402258, + name: 'Proxy-old2', + network: 'mainnet', + address: '0x00fce327a1c64b24a626c353e68222275d184c40', + }, { prod: 14248730, name: 'Proxy', diff --git a/mustache/templates/proxy/create-yaml.js b/mustache/templates/proxy/create-yaml.js index 94a1f84..d5e689d 100644 --- a/mustache/templates/proxy/create-yaml.js +++ b/mustache/templates/proxy/create-yaml.js @@ -12,7 +12,7 @@ module.exports = { entities: ['EncryptedNote'], abis: [ { - event: 'Proxy', + name: 'Proxy', path: '../abis/Proxy.json', }, ], diff --git a/mustache/yaml.mustache b/mustache/yaml.mustache index 83c8760..7357207 100644 --- a/mustache/yaml.mustache +++ b/mustache/yaml.mustache @@ -24,7 +24,7 @@ {{/entities}} abis: {{#abis}} - - name: {{name}} + - name: {{&name}} file: {{&path}} {{/abis}} eventHandlers: diff --git a/src/contractsToInstances.ts b/src/contractsToInstances.ts index 6574a78..529ef73 100644 --- a/src/contractsToInstances.ts +++ b/src/contractsToInstances.ts @@ -207,4 +207,4 @@ contractsToInstances.set("0xecd649870407cd43923a816cc6334a5bdf113621_sepolia",  contractsToInstances.set("0x73b4bd04bf83206b6e979be2507098f92edf4f90_sepolia", // Instance-dai-100000   "dai-100000" ); -// this is a read only file generated by manual inputs to file mustache/templates/rates/contracts.js. \ No newline at end of file +// this is a read only file generated by manual inputs to file mustache/templates/rates/contracts.js. diff --git a/subgraphs/tornado-subgraph-mainnet.yaml b/subgraphs/tornado-subgraph-mainnet.yaml index 30034d0..c83626b 100644 --- a/subgraphs/tornado-subgraph-mainnet.yaml +++ b/subgraphs/tornado-subgraph-mainnet.yaml @@ -461,6 +461,46 @@ handler: handleDeposit - event: Withdrawal(address,bytes32,indexed address,uint256) handler: handleWithdrawal + - kind: ethereum/contract + name: Proxy-old1 + network: mainnet + source: + address: "0x722122dF12D4e14e13Ac3b6895a86e84145b6967" + abi: Proxy + startBlock: 12143762 + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + file: ../src/mapping-encrypted-note.ts + entities: + - EncryptedNote + abis: + - name: Proxy + file: ../abis/Proxy.json + eventHandlers: + - event: EncryptedNote(indexed address,bytes) + handler: handleEncryptedNote + - kind: ethereum/contract + name: Proxy-old2 + network: mainnet + source: + address: "0x00fce327a1c64b24a626c353e68222275d184c40" + abi: Proxy + startBlock: 15402258 + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + file: ../src/mapping-encrypted-note.ts + entities: + - EncryptedNote + abis: + - name: Proxy + file: ../abis/Proxy.json + eventHandlers: + - event: EncryptedNote(indexed address,bytes) + handler: handleEncryptedNote - kind: ethereum/contract name: Proxy network: mainnet