├── .eslintrc.js ├── .github └── workflows │ └── notification.yml ├── .gitignore ├── .prettierrc.js ├── abis ├── Echoer.json ├── Instance.json └── Proxy.json ├── create-yaml-file.js ├── mustache ├── templates │ ├── base │ │ └── index.js │ ├── echoer │ │ ├── contracts.js │ │ ├── create-yaml.js │ │ └── index.js │ ├── instance │ │ ├── contracts.js │ │ ├── create-yaml.js │ │ └── index.js │ └── proxy │ │ ├── contracts.js │ │ ├── create-yaml.js │ │ └── index.js └── yaml.mustache ├── package.json ├── schema.graphql ├── src ├── contractsToInstances.ts ├── mapping-echo-account.ts ├── mapping-encrypted-note.ts └── mapping-instance.ts ├── subgraphs ├── tornado-subgraph-arbitrum.yaml ├── tornado-subgraph-avalanche.yaml ├── tornado-subgraph-bsc.yaml ├── tornado-subgraph-goerli.yaml ├── tornado-subgraph-mainnet.yaml ├── tornado-subgraph-matic.yaml ├── tornado-subgraph-optimism.yaml └── tornado-subgraph-xdai.yaml └── yarn.lock /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | es6: true, 4 | node: true, 5 | }, 6 | 7 | plugins: ['import'], 8 | extends: [ 9 | 'eslint:recommended', 10 | 'plugin:import/errors', 11 | 'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin 12 | 'plugin:prettier/recommended', // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array. 13 | ], 14 | 15 | parserOptions: { 16 | ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features 17 | sourceType: 'module', // Allows for the use of imports 18 | }, 19 | 20 | settings: { 21 | 'import/parsers': { 22 | '@typescript-eslint/parser': ['.ts', '.tsx'], 23 | }, 24 | 'import/resolver': { 25 | // use /tsconfig.json 26 | typescript: { 27 | alwaysTryTypes: true, // always try to resolve types under `@types` directory even it doesn't contain any source code, like `@types/unist` 28 | }, 29 | }, 30 | }, 31 | 32 | ignorePatterns: ['**/generated/**/*', '**/build/**/*'], 33 | 34 | rules: { 35 | quotes: ['error', 'single'], 36 | 'import/no-unresolved': 2, 37 | 'no-undef': 2, 38 | 'prefer-const': 0, 39 | semi: ['error', 'always'], 40 | 'no-console': 0, 41 | '@typescript-eslint/explicit-member-accessibility': 0, 42 | '@typescript-eslint/camelcase': 0, 43 | '@typescript-eslint/class-name-casing': 0, 44 | '@typescript-eslint/no-var-requires': 0, 45 | }, 46 | }; 47 | -------------------------------------------------------------------------------- /.github/workflows/notification.yml: -------------------------------------------------------------------------------- 1 | name: Commit notification 2 | 3 | on: 4 | push: 5 | branches: ['*'] 6 | 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Set short SHA 12 | id: vars 13 | run: echo "::set-output name=sha_short::$(echo ${GITHUB_SHA:0:7})" 14 | - name: Telegram Notification 15 | uses: appleboy/telegram-action@0.0.7 16 | with: 17 | message: 'A new commit [${{ steps.vars.outputs.sha_short }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }}) to [${{ github.repository }}](https://github.com/${{ github.repository }}) by [@${{ github.event.pusher.name }}](https://github.com/${{ github.event.pusher.name }})' 18 | format: markdown 19 | to: ${{ secrets.TELEGRAM_CHAT_ID }} 20 | token: ${{ secrets.TELEGRAM_BOT_TOKEN }} 21 | # TODO 22 | # 1. a separate file for this thing 23 | # 2. on push, pull_request, issue, comment, etc 24 | # 3. add event type to the message 25 | # 4. list of commits in message if many pushed 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (https://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules 37 | jspm_packages/ 38 | 39 | # TypeScript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | # next.js build output 61 | .next 62 | 63 | build 64 | .vscode 65 | .idea 66 | .env 67 | 68 | generated 69 | .DS_Store 70 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | semi: true, 3 | trailingComma: 'all', 4 | singleQuote: true, 5 | printWidth: 120, 6 | tabWidth: 2, 7 | }; 8 | -------------------------------------------------------------------------------- /abis/Echoer.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "address", 8 | "name": "who", 9 | "type": "address" 10 | }, 11 | { 12 | "indexed": false, 13 | "internalType": "bytes", 14 | "name": "data", 15 | "type": "bytes" 16 | } 17 | ], 18 | "name": "Echo", 19 | "type": "event" 20 | } 21 | ] 22 | -------------------------------------------------------------------------------- /abis/Instance.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "bytes32", 8 | "name": "commitment", 9 | "type": "bytes32" 10 | }, 11 | { 12 | "indexed": false, 13 | "internalType": "uint32", 14 | "name": "leafIndex", 15 | "type": "uint32" 16 | }, 17 | { 18 | "indexed": false, 19 | "internalType": "uint256", 20 | "name": "timestamp", 21 | "type": "uint256" 22 | } 23 | ], 24 | "name": "Deposit", 25 | "type": "event" 26 | }, 27 | { 28 | "anonymous": false, 29 | "inputs": [ 30 | { 31 | "indexed": false, 32 | "internalType": "address", 33 | "name": "to", 34 | "type": "address" 35 | }, 36 | { 37 | "indexed": false, 38 | "internalType": "bytes32", 39 | "name": "nullifierHash", 40 | "type": "bytes32" 41 | }, 42 | { 43 | "indexed": true, 44 | "internalType": "address", 45 | "name": "relayer", 46 | "type": "address" 47 | }, 48 | { 49 | "indexed": false, 50 | "internalType": "uint256", 51 | "name": "fee", 52 | "type": "uint256" 53 | } 54 | ], 55 | "name": "Withdrawal", 56 | "type": "event" 57 | } 58 | ] 59 | -------------------------------------------------------------------------------- /abis/Proxy.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "anonymous": false, 4 | "inputs": [ 5 | { 6 | "indexed": true, 7 | "internalType": "address", 8 | "name": "sender", 9 | "type": "address" 10 | }, 11 | { 12 | "indexed": false, 13 | "internalType": "bytes", 14 | "name": "encryptedNote", 15 | "type": "bytes" 16 | } 17 | ], 18 | "name": "EncryptedNote", 19 | "type": "event" 20 | } 21 | ] 22 | -------------------------------------------------------------------------------- /create-yaml-file.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const path = require('path'); 4 | const program = require('commander'); 5 | 6 | program 7 | .command('create-yaml') 8 | .description('Creates yaml files using the mustache templating engine') 9 | .option( 10 | '-e, --env ', 11 | 'defaults to "bsc" and uses the bsc start blocks config. Must set to "goerli" to use test start blocks config', 12 | 'bsc', 13 | ) 14 | .action(async ({ env }) => { 15 | const baseIndexPath = path.join(__dirname, 'mustache', 'templates', 'base', 'index.js'); 16 | 17 | const echoerIndexPath = path.join(__dirname, 'mustache', 'templates', 'echoer', 'index.js'); 18 | const dataEchoerSourcesPath = path.join(__dirname, 'mustache', 'templates', 'echoer', 'create-yaml.js'); 19 | 20 | const instancesIndexPath = path.join(__dirname, 'mustache', 'templates', 'instance', 'index.js'); 21 | const dataInstancesSourcesPath = path.join(__dirname, 'mustache', 'templates', 'instance', 'create-yaml.js'); 22 | 23 | const proxyIndexPath = path.join(__dirname, 'mustache', 'templates', 'proxy', 'index.js'); 24 | const dataProxySourcesPath = path.join(__dirname, 'mustache', 'templates', 'proxy', 'create-yaml.js'); 25 | 26 | const echoerDataSourcesData = require(dataEchoerSourcesPath); 27 | const instancesDataSourcesData = require(dataInstancesSourcesPath); 28 | const proxyDataSourcesData = require(dataProxySourcesPath); 29 | 30 | const dataSourcesData = [ 31 | ...echoerDataSourcesData.createYaml(env), 32 | ...instancesDataSourcesData.createYaml(env), 33 | ...proxyDataSourcesData.createYaml(env), 34 | ]; 35 | 36 | const indexData = require(baseIndexPath); 37 | 38 | const specificEchoerIndexData = require(echoerIndexPath); 39 | const specificInstancesIndexData = require(instancesIndexPath); 40 | const specificProxyIndexData = require(proxyIndexPath); 41 | 42 | indexData.yaml[0] = { 43 | ...indexData.yaml[0], 44 | ...specificEchoerIndexData, 45 | ...specificInstancesIndexData, 46 | ...specificProxyIndexData, 47 | }; 48 | indexData.yaml[0].dataSources = dataSourcesData; 49 | 50 | return console.log(JSON.stringify(indexData, null, 2) + '\n'); 51 | }); 52 | 53 | program.parse(process.argv); 54 | -------------------------------------------------------------------------------- /mustache/templates/base/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | yaml: [ 3 | { 4 | specVersion: '0.0.2', 5 | repository: 'https://github.com/tornadocash/tornado-subgraph', 6 | dataSourceKind: 'ethereum/contract', 7 | mapping: { 8 | kind: 'ethereum/events', 9 | version: '0.0.4', 10 | language: 'wasm/assemblyscript', 11 | }, 12 | }, 13 | ], 14 | }; 15 | -------------------------------------------------------------------------------- /mustache/templates/echoer/contracts.js: -------------------------------------------------------------------------------- 1 | const contracts = [ 2 | { 3 | prod: 8159269, 4 | network: 'bsc', 5 | name: 'Echoer', 6 | address: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4', 7 | }, 8 | { 9 | prod: 17754564, 10 | network: 'xdai', 11 | name: 'Echoer', 12 | address: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4', 13 | }, 14 | { 15 | prod: 16257996, 16 | network: 'matic', 17 | name: 'Echoer', 18 | address: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4', 19 | }, 20 | { 21 | prod: 11842486, 22 | network: 'mainnet', 23 | name: 'Echoer', 24 | address: '0x9B27DD5Bb15d42DC224FCD0B7caEbBe16161Df42', 25 | }, 26 | { 27 | prod: 3781595, 28 | network: 'goerli', 29 | name: 'Echoer', 30 | address: '0x37e6859804b6499d1e4a86d70a5fdd5de6a0ac65', 31 | }, 32 | { 33 | prod: 4429813, 34 | network: 'avalanche', 35 | name: 'Echoer', 36 | address: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4', 37 | }, 38 | { 39 | prod: 3430605, 40 | network: 'arbitrum-one', 41 | name: 'Echoer', 42 | address: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4', 43 | }, 44 | { 45 | prod: 2243694, 46 | network: 'optimism', 47 | name: 'Echoer', 48 | address: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4', 49 | }, 50 | ]; 51 | 52 | module.exports = contracts; 53 | -------------------------------------------------------------------------------- /mustache/templates/echoer/create-yaml.js: -------------------------------------------------------------------------------- 1 | const Contracts = require('./contracts'); 2 | 3 | module.exports = { 4 | createYaml: (env) => { 5 | const createEchoerBlock = ({ name, network, startBlocks, address }) => ({ 6 | name, 7 | network, 8 | mappingFile: '../src/mapping-echo-account.ts', 9 | startBlock: startBlocks.prod, 10 | address: `"${address}"`, 11 | abi: 'Echoer', 12 | entities: ['NoteAccount'], 13 | abis: [ 14 | { 15 | name: 'Echoer', 16 | path: '../abis/Echoer.json', 17 | }, 18 | ], 19 | events: [ 20 | { 21 | event: 'Echo(indexed address,bytes)', 22 | handler: 'handleEcho', 23 | }, 24 | ], 25 | }); 26 | 27 | return Contracts.map(({ prod, name, network, address }) => { 28 | const startBlocks = { prod }; 29 | if (network === env) { 30 | return createEchoerBlock({ name, startBlocks, network, address }); 31 | } 32 | }).filter((e) => e !== undefined); 33 | }, 34 | }; 35 | -------------------------------------------------------------------------------- /mustache/templates/echoer/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | description: 'Echoer', 3 | schemaFile: '../schema.graphql', 4 | }; 5 | -------------------------------------------------------------------------------- /mustache/templates/instance/contracts.js: -------------------------------------------------------------------------------- 1 | const deployedBlocks = { 2 | bsc: 8159290, 3 | xdai: 17754561, 4 | matic: 16257962, 5 | goerli: 3781595, 6 | mainnet: 9116966, 7 | optimism: 2243689, 8 | arbitrum: 3430648, 9 | avalanche: 4429818, 10 | }; 11 | 12 | const contracts = [ 13 | { 14 | prod: deployedBlocks.bsc, 15 | amount: '0.1', 16 | network: 'bsc', 17 | currency: 'bnb', 18 | name: 'Instance', 19 | address: '0x84443CFd09A48AF6eF360C6976C5392aC5023a1F', 20 | }, 21 | { 22 | prod: deployedBlocks.bsc, 23 | amount: '1', 24 | network: 'bsc', 25 | currency: 'bnb', 26 | name: 'Instance', 27 | address: '0xd47438C816c9E7f2E2888E060936a499Af9582b3', 28 | }, 29 | { 30 | prod: deployedBlocks.bsc, 31 | amount: '10', 32 | network: 'bsc', 33 | currency: 'bnb', 34 | name: 'Instance', 35 | address: '0x330bdFADE01eE9bF63C209Ee33102DD334618e0a', 36 | }, 37 | { 38 | prod: deployedBlocks.bsc, 39 | amount: '100', 40 | network: 'bsc', 41 | currency: 'bnb', 42 | name: 'Instance', 43 | address: '0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD', 44 | }, 45 | { 46 | prod: deployedBlocks.xdai, 47 | amount: '100', 48 | network: 'xdai', 49 | currency: 'xdai', 50 | name: 'Instance', 51 | address: '0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD', 52 | }, 53 | { 54 | prod: deployedBlocks.xdai, 55 | amount: '1000', 56 | network: 'xdai', 57 | currency: 'xdai', 58 | name: 'Instance', 59 | address: '0xdf231d99Ff8b6c6CBF4E9B9a945CBAcEF9339178', 60 | }, 61 | { 62 | prod: deployedBlocks.xdai, 63 | amount: '10000', 64 | network: 'xdai', 65 | currency: 'xdai', 66 | name: 'Instance', 67 | address: '0xaf4c0B70B2Ea9FB7487C7CbB37aDa259579fe040', 68 | }, 69 | { 70 | prod: deployedBlocks.xdai, 71 | amount: '100000', 72 | network: 'xdai', 73 | currency: 'xdai', 74 | name: 'Instance', 75 | address: '0xa5C2254e4253490C54cef0a4347fddb8f75A4998', 76 | }, 77 | { 78 | prod: deployedBlocks.matic, 79 | amount: '100', 80 | network: 'matic', 81 | currency: 'matic', 82 | name: 'Instance', 83 | address: '0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD', 84 | }, 85 | { 86 | prod: deployedBlocks.matic, 87 | amount: '1000', 88 | network: 'matic', 89 | currency: 'matic', 90 | name: 'Instance', 91 | address: '0xdf231d99Ff8b6c6CBF4E9B9a945CBAcEF9339178', 92 | }, 93 | { 94 | prod: deployedBlocks.matic, 95 | amount: '10000', 96 | network: 'matic', 97 | currency: 'matic', 98 | name: 'Instance', 99 | address: '0xaf4c0B70B2Ea9FB7487C7CbB37aDa259579fe040', 100 | }, 101 | { 102 | prod: deployedBlocks.matic, 103 | amount: '100000', 104 | network: 'matic', 105 | currency: 'matic', 106 | name: 'Instance', 107 | address: '0xa5C2254e4253490C54cef0a4347fddb8f75A4998', 108 | }, 109 | { 110 | prod: deployedBlocks.mainnet, 111 | amount: '0.1', 112 | network: 'mainnet', 113 | currency: 'eth', 114 | name: 'Instance', 115 | address: '0x12D66f87A04A9E220743712cE6d9bB1B5616B8Fc', 116 | }, 117 | { 118 | prod: deployedBlocks.mainnet, 119 | amount: '1', 120 | network: 'mainnet', 121 | currency: 'eth', 122 | name: 'Instance', 123 | address: '0x47CE0C6eD5B0Ce3d3A51fdb1C52DC66a7c3c2936', 124 | }, 125 | { 126 | prod: deployedBlocks.mainnet, 127 | amount: '10', 128 | network: 'mainnet', 129 | currency: 'eth', 130 | name: 'Instance', 131 | address: '0x910Cbd523D972eb0a6f4cAe4618aD62622b39DbF', 132 | }, 133 | { 134 | prod: deployedBlocks.mainnet, 135 | amount: '100', 136 | network: 'mainnet', 137 | currency: 'eth', 138 | name: 'Instance', 139 | address: '0xA160cdAB225685dA1d56aa342Ad8841c3b53f291', 140 | }, 141 | { 142 | prod: deployedBlocks.goerli, 143 | amount: '100', 144 | network: 'goerli', 145 | currency: 'dai', 146 | name: 'Instance', 147 | address: '0x76D85B4C0Fc497EeCc38902397aC608000A06607', 148 | }, 149 | { 150 | prod: deployedBlocks.mainnet, 151 | amount: '100', 152 | network: 'mainnet', 153 | currency: 'dai', 154 | name: 'Instance', 155 | address: '0xD4B88Df4D29F5CedD6857912842cff3b20C8Cfa3', 156 | }, 157 | { 158 | prod: deployedBlocks.mainnet, 159 | amount: '1000', 160 | network: 'mainnet', 161 | currency: 'dai', 162 | name: 'Instance', 163 | address: '0xFD8610d20aA15b7B2E3Be39B396a1bC3516c7144', 164 | }, 165 | { 166 | prod: deployedBlocks.mainnet, 167 | amount: '10000', 168 | network: 'mainnet', 169 | currency: 'dai', 170 | name: 'Instance', 171 | address: '0x07687e702b410Fa43f4cB4Af7FA097918ffD2730', 172 | }, 173 | { 174 | prod: deployedBlocks.mainnet, 175 | amount: '100000', 176 | network: 'mainnet', 177 | currency: 'dai', 178 | name: 'Instance', 179 | address: '0x23773E65ed146A459791799d01336DB287f25334', 180 | }, 181 | { 182 | prod: deployedBlocks.mainnet, 183 | amount: '5000', 184 | network: 'mainnet', 185 | currency: 'cdai', 186 | name: 'Instance', 187 | address: '0x22aaA7720ddd5388A3c0A3333430953C68f1849b', 188 | }, 189 | { 190 | prod: deployedBlocks.mainnet, 191 | amount: '50000', 192 | network: 'mainnet', 193 | currency: 'cdai', 194 | name: 'Instance', 195 | address: '0x03893a7c7463AE47D46bc7f091665f1893656003', 196 | }, 197 | { 198 | prod: deployedBlocks.mainnet, 199 | amount: '500000', 200 | network: 'mainnet', 201 | currency: 'cdai', 202 | name: 'Instance', 203 | address: '0x2717c5e28cf931547B621a5dddb772Ab6A35B701', 204 | }, 205 | { 206 | prod: deployedBlocks.mainnet, 207 | amount: '5000000', 208 | network: 'mainnet', 209 | currency: 'cdai', 210 | name: 'Instance', 211 | address: '0xD21be7248e0197Ee08E0c20D4a96DEBdaC3D20Af', 212 | }, 213 | { 214 | prod: deployedBlocks.mainnet, 215 | amount: '100', 216 | network: 'mainnet', 217 | currency: 'usdc', 218 | name: 'Instance', 219 | address: '0xd96f2B1c14Db8458374d9Aca76E26c3D18364307', 220 | }, 221 | { 222 | prod: deployedBlocks.mainnet, 223 | amount: '1000', 224 | network: 'mainnet', 225 | currency: 'usdc', 226 | name: 'Instance', 227 | address: '0x4736dCf1b7A3d580672CcE6E7c65cd5cc9cFBa9D', 228 | }, 229 | { 230 | prod: deployedBlocks.mainnet, 231 | amount: '100', 232 | network: 'mainnet', 233 | currency: 'usdt', 234 | name: 'Instance', 235 | address: '0x169AD27A470D064DEDE56a2D3ff727986b15D52B', 236 | }, 237 | { 238 | prod: deployedBlocks.mainnet, 239 | amount: '1000', 240 | network: 'mainnet', 241 | currency: 'usdt', 242 | name: 'Instance', 243 | address: '0x0836222F2B2B24A3F36f98668Ed8F0B38D1a872f', 244 | }, 245 | { 246 | prod: deployedBlocks.mainnet, 247 | amount: '0.1', 248 | network: 'mainnet', 249 | currency: 'wbtc', 250 | name: 'Instance', 251 | address: '0x178169B423a011fff22B9e3F3abeA13414dDD0F1', 252 | }, 253 | { 254 | prod: deployedBlocks.mainnet, 255 | amount: '1', 256 | network: 'mainnet', 257 | currency: 'wbtc', 258 | name: 'Instance', 259 | address: '0x610B717796ad172B316836AC95a2ffad065CeaB4', 260 | }, 261 | { 262 | prod: deployedBlocks.mainnet, 263 | amount: '10', 264 | network: 'mainnet', 265 | currency: 'wbtc', 266 | name: 'Instance', 267 | address: '0xbB93e510BbCD0B7beb5A853875f9eC60275CF498', 268 | }, 269 | { 270 | prod: deployedBlocks.goerli, 271 | amount: '1000', 272 | network: 'goerli', 273 | currency: 'dai', 274 | name: 'Instance', 275 | address: '0xCC84179FFD19A1627E79F8648d09e095252Bc418', 276 | }, 277 | { 278 | prod: deployedBlocks.goerli, 279 | amount: '10000', 280 | network: 'goerli', 281 | currency: 'dai', 282 | name: 'Instance', 283 | address: '0xD5d6f8D9e784d0e26222ad3834500801a68D027D', 284 | }, 285 | { 286 | prod: deployedBlocks.goerli, 287 | amount: '100000', 288 | network: 'goerli', 289 | currency: 'dai', 290 | name: 'Instance', 291 | address: '0x407CcEeaA7c95d2FE2250Bf9F2c105aA7AAFB512', 292 | }, 293 | { 294 | prod: deployedBlocks.goerli, 295 | amount: '5000', 296 | network: 'goerli', 297 | currency: 'cdai', 298 | name: 'Instance', 299 | address: '0x833481186f16Cece3f1Eeea1a694c42034c3a0dB', 300 | }, 301 | { 302 | prod: deployedBlocks.goerli, 303 | amount: '50000', 304 | network: 'goerli', 305 | currency: 'cdai', 306 | name: 'Instance', 307 | address: '0xd8D7DE3349ccaA0Fde6298fe6D7b7d0d34586193', 308 | }, 309 | { 310 | prod: deployedBlocks.goerli, 311 | amount: '500000', 312 | network: 'goerli', 313 | currency: 'cdai', 314 | name: 'Instance', 315 | address: '0x8281Aa6795aDE17C8973e1aedcA380258Bc124F9', 316 | }, 317 | { 318 | prod: deployedBlocks.goerli, 319 | amount: '5000000', 320 | network: 'goerli', 321 | currency: 'cdai', 322 | name: 'Instance', 323 | address: '0x57b2B8c82F065de8Ef5573f9730fC1449B403C9f', 324 | }, 325 | { 326 | prod: deployedBlocks.goerli, 327 | amount: '100', 328 | network: 'goerli', 329 | currency: 'usdc', 330 | name: 'Instance', 331 | address: '0x05E0b5B40B7b66098C2161A5EE11C5740A3A7C45', 332 | }, 333 | { 334 | prod: deployedBlocks.goerli, 335 | amount: '1000', 336 | network: 'goerli', 337 | currency: 'usdc', 338 | name: 'Instance', 339 | address: '0x23173fE8b96A4Ad8d2E17fB83EA5dcccdCa1Ae52', 340 | }, 341 | { 342 | prod: deployedBlocks.goerli, 343 | amount: '100', 344 | network: 'goerli', 345 | currency: 'usdt', 346 | name: 'Instance', 347 | address: '0x538Ab61E8A9fc1b2f93b3dd9011d662d89bE6FE6', 348 | }, 349 | { 350 | prod: deployedBlocks.goerli, 351 | amount: '1000', 352 | network: 'goerli', 353 | currency: 'usdt', 354 | name: 'Instance', 355 | address: '0x94Be88213a387E992Dd87DE56950a9aef34b9448', 356 | }, 357 | { 358 | prod: deployedBlocks.goerli, 359 | amount: '0.1', 360 | network: 'goerli', 361 | currency: 'wbtc', 362 | name: 'Instance', 363 | address: '0x242654336ca2205714071898f67E254EB49ACdCe', 364 | }, 365 | { 366 | prod: deployedBlocks.goerli, 367 | amount: '1', 368 | network: 'goerli', 369 | currency: 'wbtc', 370 | name: 'Instance', 371 | address: '0x776198CCF446DFa168347089d7338879273172cF', 372 | }, 373 | { 374 | prod: deployedBlocks.goerli, 375 | amount: '10', 376 | network: 'goerli', 377 | currency: 'wbtc', 378 | name: 'Instance', 379 | address: '0xeDC5d01286f99A066559F60a585406f3878a033e', 380 | }, 381 | { 382 | prod: deployedBlocks.goerli, 383 | amount: '0.1', 384 | network: 'goerli', 385 | currency: 'eth', 386 | name: 'Instance', 387 | address: '0x6Bf694a291DF3FeC1f7e69701E3ab6c592435Ae7', 388 | }, 389 | { 390 | prod: deployedBlocks.goerli, 391 | amount: '1', 392 | network: 'goerli', 393 | currency: 'eth', 394 | name: 'Instance', 395 | address: '0x3aac1cC67c2ec5Db4eA850957b967Ba153aD6279', 396 | }, 397 | { 398 | prod: deployedBlocks.goerli, 399 | amount: '10', 400 | network: 'goerli', 401 | currency: 'eth', 402 | name: 'Instance', 403 | address: '0x723B78e67497E85279CB204544566F4dC5d2acA0', 404 | }, 405 | { 406 | prod: deployedBlocks.goerli, 407 | amount: '100', 408 | network: 'goerli', 409 | currency: 'eth', 410 | name: 'Instance', 411 | address: '0x0E3A09dDA6B20aFbB34aC7cD4A6881493f3E7bf7', 412 | }, 413 | { 414 | prod: deployedBlocks.avalanche, 415 | amount: '10', 416 | network: 'avalanche', 417 | currency: 'avax', 418 | name: 'Instance', 419 | address: '0x330bdFADE01eE9bF63C209Ee33102DD334618e0a', 420 | }, 421 | { 422 | prod: deployedBlocks.avalanche, 423 | amount: '100', 424 | network: 'avalanche', 425 | currency: 'avax', 426 | name: 'Instance', 427 | address: '0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD', 428 | }, 429 | { 430 | prod: deployedBlocks.avalanche, 431 | amount: '500', 432 | network: 'avalanche', 433 | currency: 'avax', 434 | name: 'Instance', 435 | address: '0xaf8d1839c3c67cf571aa74B5c12398d4901147B3', 436 | }, 437 | { 438 | prod: deployedBlocks.arbitrum, 439 | amount: '0.1', 440 | network: 'arbitrum-one', 441 | currency: 'eth', 442 | name: 'Instance', 443 | address: '0x84443CFd09A48AF6eF360C6976C5392aC5023a1F', 444 | }, 445 | { 446 | prod: deployedBlocks.arbitrum, 447 | amount: '1', 448 | network: 'arbitrum-one', 449 | currency: 'eth', 450 | name: 'Instance', 451 | address: '0xd47438C816c9E7f2E2888E060936a499Af9582b3', 452 | }, 453 | { 454 | prod: deployedBlocks.arbitrum, 455 | amount: '10', 456 | network: 'arbitrum-one', 457 | currency: 'eth', 458 | name: 'Instance', 459 | address: '0x330bdFADE01eE9bF63C209Ee33102DD334618e0a', 460 | }, 461 | { 462 | prod: deployedBlocks.arbitrum, 463 | amount: '100', 464 | network: 'arbitrum-one', 465 | currency: 'eth', 466 | name: 'Instance', 467 | address: '0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD', 468 | }, 469 | { 470 | prod: deployedBlocks.optimism, 471 | amount: '0.1', 472 | network: 'optimism', 473 | currency: 'eth', 474 | name: 'Instance', 475 | address: '0x84443CFd09A48AF6eF360C6976C5392aC5023a1F', 476 | }, 477 | { 478 | prod: deployedBlocks.optimism, 479 | amount: '1', 480 | network: 'optimism', 481 | currency: 'eth', 482 | name: 'Instance', 483 | address: '0xd47438C816c9E7f2E2888E060936a499Af9582b3', 484 | }, 485 | { 486 | prod: deployedBlocks.optimism, 487 | amount: '10', 488 | network: 'optimism', 489 | currency: 'eth', 490 | name: 'Instance', 491 | address: '0x330bdFADE01eE9bF63C209Ee33102DD334618e0a', 492 | }, 493 | { 494 | prod: deployedBlocks.optimism, 495 | amount: '100', 496 | network: 'optimism', 497 | currency: 'eth', 498 | name: 'Instance', 499 | address: '0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD', 500 | }, 501 | ]; 502 | 503 | module.exports = contracts; 504 | -------------------------------------------------------------------------------- /mustache/templates/instance/create-yaml.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const path = require('path'); 3 | 4 | const Contracts = require('./contracts'); 5 | 6 | module.exports = { 7 | createYaml: (env) => { 8 | const createInstanceBlock = ({ name, amount, currency, network, startBlocks, address }) => ({ 9 | name: `${name}-${amount}-${currency}`, 10 | network, 11 | mappingFile: '../src/mapping-instance.ts', 12 | startBlock: startBlocks.prod, 13 | address: `"${address}"`, 14 | abi: 'Instance', 15 | entities: ['Deposit', 'Withdrawal'], 16 | abis: [ 17 | { 18 | name: 'Instance', 19 | path: '../abis/Instance.json', 20 | }, 21 | ], 22 | events: [ 23 | { 24 | event: 'Deposit(indexed bytes32,uint32,uint256)', 25 | handler: 'handleDeposit', 26 | }, 27 | { 28 | event: 'Withdrawal(address,bytes32,indexed address,uint256)', 29 | handler: 'handleWithdrawal', 30 | }, 31 | ], 32 | }); 33 | 34 | const newLine = '\n'; 35 | const readOnlyComment = `// this is a read only file generated by manual inputs to file mustache/templates/rates/contracts.js.${newLine}`; 36 | const space = '\xa0'; 37 | const doubleSpace = space + space; 38 | let contractsToInstancesContent = `${readOnlyComment}export let contractsToInstances = new Map();${newLine}`; 39 | let reExportContent = ''; 40 | 41 | Contracts.forEach(({ address, name, network, amount, currency }) => { 42 | if (address != null) { 43 | contractsToInstancesContent += `contractsToInstances.set("${address.toLowerCase()}",${space}//${space}${name}-${currency}-${amount}${newLine}${doubleSpace}"${currency}${'-'}${amount}"${newLine});${newLine}`; 44 | } 45 | if (network === env && reExportContent === '') { 46 | reExportContent += `${readOnlyComment}${newLine}export * from "./${name}-${amount}-${currency}/Instance";${newLine}`; 47 | } 48 | }); 49 | 50 | contractsToInstancesContent += readOnlyComment; 51 | const targetFile = path.join(__dirname, '../../../src/', 'contractsToInstances.ts'); 52 | fs.writeFileSync(targetFile, contractsToInstancesContent, 'utf8'); 53 | 54 | const targetIndexFile = path.join(__dirname, '../../../generated/', 'index.ts'); 55 | fs.writeFileSync(targetIndexFile, reExportContent, 'utf8'); 56 | 57 | return Contracts.map(({ prod, name, amount, currency, network, address }) => { 58 | const startBlocks = { prod }; 59 | if (network === env) { 60 | return createInstanceBlock({ name, startBlocks, amount, currency, network, address }); 61 | } 62 | }).filter((e) => e !== undefined); 63 | }, 64 | }; 65 | -------------------------------------------------------------------------------- /mustache/templates/instance/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | description: 'Instance', 3 | schemaFile: '../schema.graphql', 4 | }; 5 | -------------------------------------------------------------------------------- /mustache/templates/proxy/contracts.js: -------------------------------------------------------------------------------- 1 | const contracts = [ 2 | { 3 | prod: 8158799, 4 | name: 'Proxy', 5 | network: 'bsc', 6 | address: '0x0D5550d52428E7e3175bfc9550207e4ad3859b17', 7 | }, 8 | { 9 | prod: 17754561, 10 | name: 'Proxy', 11 | network: 'xdai', 12 | address: '0x0D5550d52428E7e3175bfc9550207e4ad3859b17', 13 | }, 14 | { 15 | prod: 16257989, 16 | name: 'Proxy', 17 | network: 'matic', 18 | address: '0x0D5550d52428E7e3175bfc9550207e4ad3859b17', 19 | }, 20 | { 21 | prod: 14248730, 22 | name: 'Proxy', 23 | network: 'mainnet', 24 | address: '0xd90e2f925DA726b50C4Ed8D0Fb90Ad053324F31b', 25 | }, 26 | { 27 | prod: 3781595, 28 | name: 'Proxy', 29 | network: 'goerli', 30 | address: '0x454d870a72e29d5e5697f635128d18077bd04c60', 31 | }, 32 | { 33 | prod: 4429818, 34 | name: 'Proxy', 35 | network: 'avalanche', 36 | address: '0x0D5550d52428E7e3175bfc9550207e4ad3859b17', 37 | }, 38 | { 39 | prod: 3430648, 40 | name: 'Proxy', 41 | network: 'arbitrum-one', 42 | address: '0x0D5550d52428E7e3175bfc9550207e4ad3859b17', 43 | }, 44 | { 45 | prod: 2243689, 46 | name: 'Proxy', 47 | network: 'optimism', 48 | address: '0x0D5550d52428E7e3175bfc9550207e4ad3859b17', 49 | }, 50 | ]; 51 | 52 | module.exports = contracts; 53 | -------------------------------------------------------------------------------- /mustache/templates/proxy/create-yaml.js: -------------------------------------------------------------------------------- 1 | const Contracts = require('./contracts'); 2 | 3 | module.exports = { 4 | createYaml: (env) => { 5 | const createProxyBlock = ({ name, network, startBlocks, address }) => ({ 6 | name, 7 | network, 8 | mappingFile: '../src/mapping-encrypted-note.ts', 9 | abi: 'Proxy', 10 | startBlock: startBlocks.prod, 11 | address: `"${address}"`, 12 | entities: ['EncryptedNote'], 13 | abis: [ 14 | { 15 | event: 'Proxy', 16 | path: '../abis/Proxy.json', 17 | }, 18 | ], 19 | events: [ 20 | { 21 | event: 'EncryptedNote(indexed address,bytes)', 22 | handler: 'handleEncryptedNote', 23 | }, 24 | ], 25 | }); 26 | 27 | return Contracts.map(({ prod, name, network, address }) => { 28 | const startBlocks = { prod }; 29 | if (network === env) { 30 | return createProxyBlock({ name, startBlocks, network, address }); 31 | } 32 | }).filter((e) => e !== undefined); 33 | }, 34 | }; 35 | -------------------------------------------------------------------------------- /mustache/templates/proxy/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | description: 'Proxy', 3 | schemaFile: '../schema.graphql', 4 | }; 5 | -------------------------------------------------------------------------------- /mustache/yaml.mustache: -------------------------------------------------------------------------------- 1 | {{#yaml}} 2 | specVersion: {{specVersion}} 3 | description: {{description}} 4 | repository: {{&repository}} 5 | schema: 6 | file: {{&schemaFile}} 7 | dataSources: 8 | {{#dataSources}} 9 | - kind: {{&dataSourceKind}} 10 | name: {{name}} 11 | network: {{network}} 12 | source: 13 | address: {{&address}} 14 | abi: {{abi}} 15 | startBlock: {{startBlock}} 16 | mapping: 17 | kind: {{&mapping.kind}} 18 | apiVersion: {{mapping.version}} 19 | language: {{&mapping.language}} 20 | file: {{&mappingFile}} 21 | entities: 22 | {{#entities}} 23 | - {{.}} 24 | {{/entities}} 25 | abis: 26 | {{#abis}} 27 | - name: {{name}} 28 | file: {{&path}} 29 | {{/abis}} 30 | eventHandlers: 31 | {{#events}} 32 | - event: {{event}} 33 | handler: {{handler}} 34 | {{/events}} 35 | {{/dataSources}} 36 | {{/yaml}} 37 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sub-graph-proxy", 3 | "license": "UNLICENSED", 4 | "scripts": { 5 | "lint": "eslint .", 6 | "generate-bsc": "yarn codegen:tornado-bsc && yarn build:tornado-bsc", 7 | "generate-xdai": "yarn codegen:tornado-xdai && yarn build:tornado-xdai", 8 | "generate-matic": "yarn codegen:tornado-matic && yarn build:tornado-matic", 9 | "generate-mainnet": "yarn codegen:tornado-mainnet && yarn build:tornado-mainnet", 10 | "generate-goerli": "yarn codegen:tornado-goerli && yarn build:tornado-goerli", 11 | "generate-avalanche": "yarn codegen:tornado-avalanche && yarn build:tornado-avalanche", 12 | "generate-arbitrum": "yarn codegen:tornado-arbitrum && yarn build:tornado-arbitrum", 13 | "generate-optimism": "yarn codegen:tornado-optimism && yarn build:tornado-optimism", 14 | "yaml:tornado-bsc": "node ./create-yaml-file create-yaml -e bsc | mustache - mustache/yaml.mustache > subgraphs/tornado-subgraph-bsc.yaml", 15 | "yaml:tornado-xdai": "node ./create-yaml-file create-yaml -e xdai | mustache - mustache/yaml.mustache > subgraphs/tornado-subgraph-xdai.yaml", 16 | "yaml:tornado-matic": "node ./create-yaml-file create-yaml -e matic | mustache - mustache/yaml.mustache > subgraphs/tornado-subgraph-matic.yaml", 17 | "yaml:tornado-mainnet": "node ./create-yaml-file create-yaml -e mainnet | mustache - mustache/yaml.mustache > subgraphs/tornado-subgraph-mainnet.yaml", 18 | "yaml:tornado-goerli": "node ./create-yaml-file create-yaml -e goerli | mustache - mustache/yaml.mustache > subgraphs/tornado-subgraph-goerli.yaml", 19 | "yaml:tornado-avalanche": "node ./create-yaml-file create-yaml -e avalanche | mustache - mustache/yaml.mustache > subgraphs/tornado-subgraph-avalanche.yaml", 20 | "yaml:tornado-arbitrum": "node ./create-yaml-file create-yaml -e arbitrum-one | mustache - mustache/yaml.mustache > subgraphs/tornado-subgraph-arbitrum.yaml", 21 | "yaml:tornado-optimism": "node ./create-yaml-file create-yaml -e optimism | mustache - mustache/yaml.mustache > subgraphs/tornado-subgraph-optimism.yaml", 22 | "codegen": "graph codegen", 23 | "codegen:tornado-bsc": "yarn yaml:tornado-bsc && yarn codegen -- subgraphs/tornado-subgraph-bsc.yaml", 24 | "codegen:tornado-xdai": "yarn yaml:tornado-xdai && yarn codegen -- subgraphs/tornado-subgraph-xdai.yaml", 25 | "codegen:tornado-matic": "yarn yaml:tornado-matic && yarn codegen -- subgraphs/tornado-subgraph-matic.yaml", 26 | "codegen:tornado-mainnet": "yarn yaml:tornado-mainnet && yarn codegen -- subgraphs/tornado-subgraph-mainnet.yaml", 27 | "codegen:tornado-goerli": "yarn yaml:tornado-goerli && yarn codegen -- subgraphs/tornado-subgraph-goerli.yaml", 28 | "codegen:tornado-avalanche": "yarn yaml:tornado-avalanche && yarn codegen -- subgraphs/tornado-subgraph-avalanche.yaml", 29 | "codegen:tornado-arbitrum": "yarn yaml:tornado-arbitrum && yarn codegen -- subgraphs/tornado-subgraph-arbitrum.yaml", 30 | "codegen:tornado-optimism": "yarn yaml:tornado-optimism && yarn codegen -- subgraphs/tornado-subgraph-optimism.yaml", 31 | "build": "graph build", 32 | "build:tornado-bsc": "graph build subgraphs/tornado-subgraph-bsc.yaml", 33 | "build:tornado-xdai": "graph build subgraphs/tornado-subgraph-xdai.yaml", 34 | "build:tornado-matic": "graph build subgraphs/tornado-subgraph-matic.yaml", 35 | "build:tornado-mainnet": "graph build subgraphs/tornado-subgraph-mainnet.yaml", 36 | "build:tornado-goerli": "graph build subgraphs/tornado-subgraph-goerli.yaml", 37 | "build:tornado-avalanche": "graph build subgraphs/tornado-subgraph-avalanche.yaml", 38 | "build:tornado-arbitrum": "graph build subgraphs/tornado-subgraph-arbitrum.yaml", 39 | "build:tornado-optimism": "graph build subgraphs/tornado-subgraph-optimism.yaml", 40 | "deploy": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token $TOKEN", 41 | "deploy:tornado-bsc": "yarn deploy -- tornadocash/bsc-tornado-subgraph subgraphs/tornado-subgraph-bsc.yaml", 42 | "deploy:tornado-xdai": "yarn deploy -- tornadocash/xdai-tornado-subgraph subgraphs/tornado-subgraph-xdai.yaml", 43 | "deploy:tornado-matic": "yarn deploy -- tornadocash/matic-tornado-subgraph subgraphs/tornado-subgraph-matic.yaml", 44 | "deploy:tornado-mainnet": "yarn deploy -- tornadocash/mainnet-tornado-subgraph subgraphs/tornado-subgraph-mainnet.yaml", 45 | "deploy:tornado-goerli": "yarn deploy -- tornadocash/goerli-tornado-subgraph subgraphs/tornado-subgraph-goerli.yaml", 46 | "deploy:tornado-avalanche": "yarn deploy -- tornadocash/avalanche-tornado-subgraph subgraphs/tornado-subgraph-avalanche.yaml", 47 | "deploy:tornado-arbitrum": "yarn deploy -- tornadocash/arbitrum-tornado-subgraph subgraphs/tornado-subgraph-arbitrum.yaml", 48 | "deploy:tornado-optimism": "yarn deploy -- tornadocash/optimism-tornado-subgraph subgraphs/tornado-subgraph-optimism.yaml" 49 | }, 50 | "dependencies": { 51 | "@graphprotocol/graph-cli": "0.20.0", 52 | "@graphprotocol/graph-ts": "0.20.0" 53 | }, 54 | "devDependencies": { 55 | "@typescript-eslint/eslint-plugin": "^4.26.1", 56 | "@typescript-eslint/parser": "^4.26.1", 57 | "commander": "^7.2.0", 58 | "eslint": "^7.28.0", 59 | "eslint-config-prettier": "^8.3.0", 60 | "eslint-import-resolver-typescript": "^2.4.0", 61 | "eslint-plugin-import": "^2.23.4", 62 | "eslint-plugin-prettier": "^3.4.0", 63 | "mustache": "^4.2.0", 64 | "prettier": "^2.3.1", 65 | "typescript": "^4.3.2" 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /schema.graphql: -------------------------------------------------------------------------------- 1 | type Deposit @entity { 2 | id: ID! 3 | from: Bytes! 4 | index: BigInt! 5 | amount: String! 6 | currency: String! 7 | commitment: Bytes! 8 | timestamp: BigInt! 9 | blockNumber: BigInt! 10 | transactionHash: Bytes! 11 | } 12 | 13 | type Withdrawal @entity { 14 | id: ID! 15 | to: Bytes! 16 | fee: BigInt! 17 | index: BigInt! 18 | amount: String! 19 | currency: String! 20 | nullifier: Bytes! 21 | timestamp: BigInt! 22 | blockNumber: BigInt! 23 | transactionHash: Bytes! 24 | } 25 | 26 | type EncryptedNote @entity { 27 | id: ID! 28 | index: BigInt! 29 | blockNumber: BigInt! 30 | encryptedNote: Bytes! 31 | transactionHash: Bytes! 32 | } 33 | 34 | type NoteAccount @entity { 35 | id: ID! 36 | index: BigInt! 37 | address: Bytes! 38 | encryptedAccount: Bytes! 39 | } 40 | -------------------------------------------------------------------------------- /src/contractsToInstances.ts: -------------------------------------------------------------------------------- 1 | // this is a read only file generated by manual inputs to file mustache/templates/rates/contracts.js. 2 | export let contractsToInstances = new Map(); 3 | contractsToInstances.set("0x84443cfd09a48af6ef360c6976c5392ac5023a1f", // Instance-bnb-0.1 4 |   "bnb-0.1" 5 | ); 6 | contractsToInstances.set("0xd47438c816c9e7f2e2888e060936a499af9582b3", // Instance-bnb-1 7 |   "bnb-1" 8 | ); 9 | contractsToInstances.set("0x330bdfade01ee9bf63c209ee33102dd334618e0a", // Instance-bnb-10 10 |   "bnb-10" 11 | ); 12 | contractsToInstances.set("0x1e34a77868e19a6647b1f2f47b51ed72dede95dd", // Instance-bnb-100 13 |   "bnb-100" 14 | ); 15 | contractsToInstances.set("0x1e34a77868e19a6647b1f2f47b51ed72dede95dd", // Instance-xdai-100 16 |   "xdai-100" 17 | ); 18 | contractsToInstances.set("0xdf231d99ff8b6c6cbf4e9b9a945cbacef9339178", // Instance-xdai-1000 19 |   "xdai-1000" 20 | ); 21 | contractsToInstances.set("0xaf4c0b70b2ea9fb7487c7cbb37ada259579fe040", // Instance-xdai-10000 22 |   "xdai-10000" 23 | ); 24 | contractsToInstances.set("0xa5c2254e4253490c54cef0a4347fddb8f75a4998", // Instance-xdai-100000 25 |   "xdai-100000" 26 | ); 27 | contractsToInstances.set("0x1e34a77868e19a6647b1f2f47b51ed72dede95dd", // Instance-matic-100 28 |   "matic-100" 29 | ); 30 | contractsToInstances.set("0xdf231d99ff8b6c6cbf4e9b9a945cbacef9339178", // Instance-matic-1000 31 |   "matic-1000" 32 | ); 33 | contractsToInstances.set("0xaf4c0b70b2ea9fb7487c7cbb37ada259579fe040", // Instance-matic-10000 34 |   "matic-10000" 35 | ); 36 | contractsToInstances.set("0xa5c2254e4253490c54cef0a4347fddb8f75a4998", // Instance-matic-100000 37 |   "matic-100000" 38 | ); 39 | contractsToInstances.set("0x12d66f87a04a9e220743712ce6d9bb1b5616b8fc", // Instance-eth-0.1 40 |   "eth-0.1" 41 | ); 42 | contractsToInstances.set("0x47ce0c6ed5b0ce3d3a51fdb1c52dc66a7c3c2936", // Instance-eth-1 43 |   "eth-1" 44 | ); 45 | contractsToInstances.set("0x910cbd523d972eb0a6f4cae4618ad62622b39dbf", // Instance-eth-10 46 |   "eth-10" 47 | ); 48 | contractsToInstances.set("0xa160cdab225685da1d56aa342ad8841c3b53f291", // Instance-eth-100 49 |   "eth-100" 50 | ); 51 | contractsToInstances.set("0x76d85b4c0fc497eecc38902397ac608000a06607", // Instance-dai-100 52 |   "dai-100" 53 | ); 54 | contractsToInstances.set("0xd4b88df4d29f5cedd6857912842cff3b20c8cfa3", // Instance-dai-100 55 |   "dai-100" 56 | ); 57 | contractsToInstances.set("0xfd8610d20aa15b7b2e3be39b396a1bc3516c7144", // Instance-dai-1000 58 |   "dai-1000" 59 | ); 60 | contractsToInstances.set("0x07687e702b410fa43f4cb4af7fa097918ffd2730", // Instance-dai-10000 61 |   "dai-10000" 62 | ); 63 | contractsToInstances.set("0x23773e65ed146a459791799d01336db287f25334", // Instance-dai-100000 64 |   "dai-100000" 65 | ); 66 | contractsToInstances.set("0x22aaa7720ddd5388a3c0a3333430953c68f1849b", // Instance-cdai-5000 67 |   "cdai-5000" 68 | ); 69 | contractsToInstances.set("0x03893a7c7463ae47d46bc7f091665f1893656003", // Instance-cdai-50000 70 |   "cdai-50000" 71 | ); 72 | contractsToInstances.set("0x2717c5e28cf931547b621a5dddb772ab6a35b701", // Instance-cdai-500000 73 |   "cdai-500000" 74 | ); 75 | contractsToInstances.set("0xd21be7248e0197ee08e0c20d4a96debdac3d20af", // Instance-cdai-5000000 76 |   "cdai-5000000" 77 | ); 78 | contractsToInstances.set("0xd96f2b1c14db8458374d9aca76e26c3d18364307", // Instance-usdc-100 79 |   "usdc-100" 80 | ); 81 | contractsToInstances.set("0x4736dcf1b7a3d580672cce6e7c65cd5cc9cfba9d", // Instance-usdc-1000 82 |   "usdc-1000" 83 | ); 84 | contractsToInstances.set("0x169ad27a470d064dede56a2d3ff727986b15d52b", // Instance-usdt-100 85 |   "usdt-100" 86 | ); 87 | contractsToInstances.set("0x0836222f2b2b24a3f36f98668ed8f0b38d1a872f", // Instance-usdt-1000 88 |   "usdt-1000" 89 | ); 90 | contractsToInstances.set("0x178169b423a011fff22b9e3f3abea13414ddd0f1", // Instance-wbtc-0.1 91 |   "wbtc-0.1" 92 | ); 93 | contractsToInstances.set("0x610b717796ad172b316836ac95a2ffad065ceab4", // Instance-wbtc-1 94 |   "wbtc-1" 95 | ); 96 | contractsToInstances.set("0xbb93e510bbcd0b7beb5a853875f9ec60275cf498", // Instance-wbtc-10 97 |   "wbtc-10" 98 | ); 99 | contractsToInstances.set("0xcc84179ffd19a1627e79f8648d09e095252bc418", // Instance-dai-1000 100 |   "dai-1000" 101 | ); 102 | contractsToInstances.set("0xd5d6f8d9e784d0e26222ad3834500801a68d027d", // Instance-dai-10000 103 |   "dai-10000" 104 | ); 105 | contractsToInstances.set("0x407cceeaa7c95d2fe2250bf9f2c105aa7aafb512", // Instance-dai-100000 106 |   "dai-100000" 107 | ); 108 | contractsToInstances.set("0x833481186f16cece3f1eeea1a694c42034c3a0db", // Instance-cdai-5000 109 |   "cdai-5000" 110 | ); 111 | contractsToInstances.set("0xd8d7de3349ccaa0fde6298fe6d7b7d0d34586193", // Instance-cdai-50000 112 |   "cdai-50000" 113 | ); 114 | contractsToInstances.set("0x8281aa6795ade17c8973e1aedca380258bc124f9", // Instance-cdai-500000 115 |   "cdai-500000" 116 | ); 117 | contractsToInstances.set("0x57b2b8c82f065de8ef5573f9730fc1449b403c9f", // Instance-cdai-5000000 118 |   "cdai-5000000" 119 | ); 120 | contractsToInstances.set("0x05e0b5b40b7b66098c2161a5ee11c5740a3a7c45", // Instance-usdc-100 121 |   "usdc-100" 122 | ); 123 | contractsToInstances.set("0x23173fe8b96a4ad8d2e17fb83ea5dcccdca1ae52", // Instance-usdc-1000 124 |   "usdc-1000" 125 | ); 126 | contractsToInstances.set("0x538ab61e8a9fc1b2f93b3dd9011d662d89be6fe6", // Instance-usdt-100 127 |   "usdt-100" 128 | ); 129 | contractsToInstances.set("0x94be88213a387e992dd87de56950a9aef34b9448", // Instance-usdt-1000 130 |   "usdt-1000" 131 | ); 132 | contractsToInstances.set("0x242654336ca2205714071898f67e254eb49acdce", // Instance-wbtc-0.1 133 |   "wbtc-0.1" 134 | ); 135 | contractsToInstances.set("0x776198ccf446dfa168347089d7338879273172cf", // Instance-wbtc-1 136 |   "wbtc-1" 137 | ); 138 | contractsToInstances.set("0xedc5d01286f99a066559f60a585406f3878a033e", // Instance-wbtc-10 139 |   "wbtc-10" 140 | ); 141 | contractsToInstances.set("0x6bf694a291df3fec1f7e69701e3ab6c592435ae7", // Instance-eth-0.1 142 |   "eth-0.1" 143 | ); 144 | contractsToInstances.set("0x3aac1cc67c2ec5db4ea850957b967ba153ad6279", // Instance-eth-1 145 |   "eth-1" 146 | ); 147 | contractsToInstances.set("0x723b78e67497e85279cb204544566f4dc5d2aca0", // Instance-eth-10 148 |   "eth-10" 149 | ); 150 | contractsToInstances.set("0x0e3a09dda6b20afbb34ac7cd4a6881493f3e7bf7", // Instance-eth-100 151 |   "eth-100" 152 | ); 153 | contractsToInstances.set("0x330bdfade01ee9bf63c209ee33102dd334618e0a", // Instance-avax-10 154 |   "avax-10" 155 | ); 156 | contractsToInstances.set("0x1e34a77868e19a6647b1f2f47b51ed72dede95dd", // Instance-avax-100 157 |   "avax-100" 158 | ); 159 | contractsToInstances.set("0xaf8d1839c3c67cf571aa74b5c12398d4901147b3", // Instance-avax-500 160 |   "avax-500" 161 | ); 162 | contractsToInstances.set("0x84443cfd09a48af6ef360c6976c5392ac5023a1f", // Instance-eth-0.1 163 |   "eth-0.1" 164 | ); 165 | contractsToInstances.set("0xd47438c816c9e7f2e2888e060936a499af9582b3", // Instance-eth-1 166 |   "eth-1" 167 | ); 168 | contractsToInstances.set("0x330bdfade01ee9bf63c209ee33102dd334618e0a", // Instance-eth-10 169 |   "eth-10" 170 | ); 171 | contractsToInstances.set("0x1e34a77868e19a6647b1f2f47b51ed72dede95dd", // Instance-eth-100 172 |   "eth-100" 173 | ); 174 | contractsToInstances.set("0x84443cfd09a48af6ef360c6976c5392ac5023a1f", // Instance-eth-0.1 175 |   "eth-0.1" 176 | ); 177 | contractsToInstances.set("0xd47438c816c9e7f2e2888e060936a499af9582b3", // Instance-eth-1 178 |   "eth-1" 179 | ); 180 | contractsToInstances.set("0x330bdfade01ee9bf63c209ee33102dd334618e0a", // Instance-eth-10 181 |   "eth-10" 182 | ); 183 | contractsToInstances.set("0x1e34a77868e19a6647b1f2f47b51ed72dede95dd", // Instance-eth-100 184 |   "eth-100" 185 | ); 186 | // this is a read only file generated by manual inputs to file mustache/templates/rates/contracts.js. 187 | -------------------------------------------------------------------------------- /src/mapping-echo-account.ts: -------------------------------------------------------------------------------- 1 | import { Echo } from '../generated/Echoer/Echoer'; 2 | import { NoteAccount as NoteAccountEntity } from '../generated/schema'; 3 | 4 | export function handleEcho(event: Echo): void { 5 | let entity = new NoteAccountEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString()); 6 | 7 | entity.index = event.logIndex; 8 | entity.address = event.params.who; 9 | entity.encryptedAccount = event.params.data; 10 | 11 | entity.save(); 12 | } 13 | -------------------------------------------------------------------------------- /src/mapping-encrypted-note.ts: -------------------------------------------------------------------------------- 1 | import { EncryptedNote } from '../generated/Proxy/Proxy'; 2 | import { EncryptedNote as EncryptedNoteEntity } from '../generated/schema'; 3 | 4 | export function handleEncryptedNote(event: EncryptedNote): void { 5 | let entity = new EncryptedNoteEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString()); 6 | 7 | entity.index = event.logIndex; 8 | entity.blockNumber = event.block.number; 9 | entity.transactionHash = event.transaction.hash; 10 | entity.encryptedNote = event.params.encryptedNote; 11 | 12 | if (event.params.encryptedNote.toHexString() != '0x') { 13 | entity.save(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/mapping-instance.ts: -------------------------------------------------------------------------------- 1 | import { Withdrawal, Deposit } from '../generated'; 2 | import { Withdrawal as WithdrawalEntity, Deposit as DepositEntity } from '../generated/schema'; 3 | 4 | import { contractsToInstances } from './contractsToInstances'; 5 | 6 | export function handleWithdrawal(event: Withdrawal): void { 7 | let entity = new WithdrawalEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString()); 8 | 9 | let result = contractsToInstances.get(event.address.toHexString()).split('-'); 10 | 11 | entity.amount = result[1]; 12 | entity.currency = result[0]; 13 | 14 | entity.to = event.params.to; 15 | entity.fee = event.params.fee; 16 | entity.index = event.logIndex; 17 | entity.blockNumber = event.block.number; 18 | entity.timestamp = event.block.timestamp; 19 | entity.nullifier = event.params.nullifierHash; 20 | entity.transactionHash = event.transaction.hash; 21 | 22 | entity.save(); 23 | } 24 | 25 | export function handleDeposit(event: Deposit): void { 26 | let entity = new DepositEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString()); 27 | 28 | let result = contractsToInstances.get(event.address.toHexString()).split('-'); 29 | 30 | entity.amount = result[1]; 31 | entity.currency = result[0]; 32 | 33 | entity.from = event.transaction.from; 34 | entity.index = event.params.leafIndex; 35 | entity.blockNumber = event.block.number; 36 | entity.timestamp = event.block.timestamp; 37 | entity.commitment = event.params.commitment; 38 | entity.transactionHash = event.transaction.hash; 39 | 40 | entity.save(); 41 | } 42 | -------------------------------------------------------------------------------- /subgraphs/tornado-subgraph-arbitrum.yaml: -------------------------------------------------------------------------------- 1 | specVersion: 0.0.2 2 | description: Proxy 3 | repository: https://github.com/tornadocash/tornado-subgraph 4 | schema: 5 | file: ../schema.graphql 6 | dataSources: 7 | - kind: ethereum/contract 8 | name: Echoer 9 | network: arbitrum-one 10 | source: 11 | address: "0xa75BF2815618872f155b7C4B0C81bF990f5245E4" 12 | abi: Echoer 13 | startBlock: 3430605 14 | mapping: 15 | kind: ethereum/events 16 | apiVersion: 0.0.4 17 | language: wasm/assemblyscript 18 | file: ../src/mapping-echo-account.ts 19 | entities: 20 | - NoteAccount 21 | abis: 22 | - name: Echoer 23 | file: ../abis/Echoer.json 24 | eventHandlers: 25 | - event: Echo(indexed address,bytes) 26 | handler: handleEcho 27 | - kind: ethereum/contract 28 | name: Instance-0.1-eth 29 | network: arbitrum-one 30 | source: 31 | address: "0x84443CFd09A48AF6eF360C6976C5392aC5023a1F" 32 | abi: Instance 33 | startBlock: 3430648 34 | mapping: 35 | kind: ethereum/events 36 | apiVersion: 0.0.4 37 | language: wasm/assemblyscript 38 | file: ../src/mapping-instance.ts 39 | entities: 40 | - Deposit 41 | - Withdrawal 42 | abis: 43 | - name: Instance 44 | file: ../abis/Instance.json 45 | eventHandlers: 46 | - event: Deposit(indexed bytes32,uint32,uint256) 47 | handler: handleDeposit 48 | - event: Withdrawal(address,bytes32,indexed address,uint256) 49 | handler: handleWithdrawal 50 | - kind: ethereum/contract 51 | name: Instance-1-eth 52 | network: arbitrum-one 53 | source: 54 | address: "0xd47438C816c9E7f2E2888E060936a499Af9582b3" 55 | abi: Instance 56 | startBlock: 3430648 57 | mapping: 58 | kind: ethereum/events 59 | apiVersion: 0.0.4 60 | language: wasm/assemblyscript 61 | file: ../src/mapping-instance.ts 62 | entities: 63 | - Deposit 64 | - Withdrawal 65 | abis: 66 | - name: Instance 67 | file: ../abis/Instance.json 68 | eventHandlers: 69 | - event: Deposit(indexed bytes32,uint32,uint256) 70 | handler: handleDeposit 71 | - event: Withdrawal(address,bytes32,indexed address,uint256) 72 | handler: handleWithdrawal 73 | - kind: ethereum/contract 74 | name: Instance-10-eth 75 | network: arbitrum-one 76 | source: 77 | address: "0x330bdFADE01eE9bF63C209Ee33102DD334618e0a" 78 | abi: Instance 79 | startBlock: 3430648 80 | mapping: 81 | kind: ethereum/events 82 | apiVersion: 0.0.4 83 | language: wasm/assemblyscript 84 | file: ../src/mapping-instance.ts 85 | entities: 86 | - Deposit 87 | - Withdrawal 88 | abis: 89 | - name: Instance 90 | file: ../abis/Instance.json 91 | eventHandlers: 92 | - event: Deposit(indexed bytes32,uint32,uint256) 93 | handler: handleDeposit 94 | - event: Withdrawal(address,bytes32,indexed address,uint256) 95 | handler: handleWithdrawal 96 | - kind: ethereum/contract 97 | name: Instance-100-eth 98 | network: arbitrum-one 99 | source: 100 | address: "0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD" 101 | abi: Instance 102 | startBlock: 3430648 103 | mapping: 104 | kind: ethereum/events 105 | apiVersion: 0.0.4 106 | language: wasm/assemblyscript 107 | file: ../src/mapping-instance.ts 108 | entities: 109 | - Deposit 110 | - Withdrawal 111 | abis: 112 | - name: Instance 113 | file: ../abis/Instance.json 114 | eventHandlers: 115 | - event: Deposit(indexed bytes32,uint32,uint256) 116 | handler: handleDeposit 117 | - event: Withdrawal(address,bytes32,indexed address,uint256) 118 | handler: handleWithdrawal 119 | - kind: ethereum/contract 120 | name: Proxy 121 | network: arbitrum-one 122 | source: 123 | address: "0x0D5550d52428E7e3175bfc9550207e4ad3859b17" 124 | abi: Proxy 125 | startBlock: 3430648 126 | mapping: 127 | kind: ethereum/events 128 | apiVersion: 0.0.4 129 | language: wasm/assemblyscript 130 | file: ../src/mapping-encrypted-note.ts 131 | entities: 132 | - EncryptedNote 133 | abis: 134 | - name: Proxy 135 | file: ../abis/Proxy.json 136 | eventHandlers: 137 | - event: EncryptedNote(indexed address,bytes) 138 | handler: handleEncryptedNote 139 | -------------------------------------------------------------------------------- /subgraphs/tornado-subgraph-avalanche.yaml: -------------------------------------------------------------------------------- 1 | specVersion: 0.0.2 2 | description: Proxy 3 | repository: https://github.com/tornadocash/tornado-subgraph 4 | schema: 5 | file: ../schema.graphql 6 | dataSources: 7 | - kind: ethereum/contract 8 | name: Echoer 9 | network: avalanche 10 | source: 11 | address: "0xa75BF2815618872f155b7C4B0C81bF990f5245E4" 12 | abi: Echoer 13 | startBlock: 4429813 14 | mapping: 15 | kind: ethereum/events 16 | apiVersion: 0.0.4 17 | language: wasm/assemblyscript 18 | file: ../src/mapping-echo-account.ts 19 | entities: 20 | - NoteAccount 21 | abis: 22 | - name: Echoer 23 | file: ../abis/Echoer.json 24 | eventHandlers: 25 | - event: Echo(indexed address,bytes) 26 | handler: handleEcho 27 | - kind: ethereum/contract 28 | name: Instance-10-avax 29 | network: avalanche 30 | source: 31 | address: "0x330bdFADE01eE9bF63C209Ee33102DD334618e0a" 32 | abi: Instance 33 | startBlock: 4429818 34 | mapping: 35 | kind: ethereum/events 36 | apiVersion: 0.0.4 37 | language: wasm/assemblyscript 38 | file: ../src/mapping-instance.ts 39 | entities: 40 | - Deposit 41 | - Withdrawal 42 | abis: 43 | - name: Instance 44 | file: ../abis/Instance.json 45 | eventHandlers: 46 | - event: Deposit(indexed bytes32,uint32,uint256) 47 | handler: handleDeposit 48 | - event: Withdrawal(address,bytes32,indexed address,uint256) 49 | handler: handleWithdrawal 50 | - kind: ethereum/contract 51 | name: Instance-100-avax 52 | network: avalanche 53 | source: 54 | address: "0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD" 55 | abi: Instance 56 | startBlock: 4429818 57 | mapping: 58 | kind: ethereum/events 59 | apiVersion: 0.0.4 60 | language: wasm/assemblyscript 61 | file: ../src/mapping-instance.ts 62 | entities: 63 | - Deposit 64 | - Withdrawal 65 | abis: 66 | - name: Instance 67 | file: ../abis/Instance.json 68 | eventHandlers: 69 | - event: Deposit(indexed bytes32,uint32,uint256) 70 | handler: handleDeposit 71 | - event: Withdrawal(address,bytes32,indexed address,uint256) 72 | handler: handleWithdrawal 73 | - kind: ethereum/contract 74 | name: Instance-500-avax 75 | network: avalanche 76 | source: 77 | address: "0xaf8d1839c3c67cf571aa74B5c12398d4901147B3" 78 | abi: Instance 79 | startBlock: 4429818 80 | mapping: 81 | kind: ethereum/events 82 | apiVersion: 0.0.4 83 | language: wasm/assemblyscript 84 | file: ../src/mapping-instance.ts 85 | entities: 86 | - Deposit 87 | - Withdrawal 88 | abis: 89 | - name: Instance 90 | file: ../abis/Instance.json 91 | eventHandlers: 92 | - event: Deposit(indexed bytes32,uint32,uint256) 93 | handler: handleDeposit 94 | - event: Withdrawal(address,bytes32,indexed address,uint256) 95 | handler: handleWithdrawal 96 | - kind: ethereum/contract 97 | name: Proxy 98 | network: avalanche 99 | source: 100 | address: "0x0D5550d52428E7e3175bfc9550207e4ad3859b17" 101 | abi: Proxy 102 | startBlock: 4429818 103 | mapping: 104 | kind: ethereum/events 105 | apiVersion: 0.0.4 106 | language: wasm/assemblyscript 107 | file: ../src/mapping-encrypted-note.ts 108 | entities: 109 | - EncryptedNote 110 | abis: 111 | - name: Proxy 112 | file: ../abis/Proxy.json 113 | eventHandlers: 114 | - event: EncryptedNote(indexed address,bytes) 115 | handler: handleEncryptedNote 116 | -------------------------------------------------------------------------------- /subgraphs/tornado-subgraph-bsc.yaml: -------------------------------------------------------------------------------- 1 | specVersion: 0.0.2 2 | description: Proxy 3 | repository: https://github.com/tornadocash/tornado-subgraph 4 | schema: 5 | file: ../schema.graphql 6 | dataSources: 7 | - kind: ethereum/contract 8 | name: Echoer 9 | network: bsc 10 | source: 11 | address: "0xa75BF2815618872f155b7C4B0C81bF990f5245E4" 12 | abi: Echoer 13 | startBlock: 8159269 14 | mapping: 15 | kind: ethereum/events 16 | apiVersion: 0.0.4 17 | language: wasm/assemblyscript 18 | file: ../src/mapping-echo-account.ts 19 | entities: 20 | - NoteAccount 21 | abis: 22 | - name: Echoer 23 | file: ../abis/Echoer.json 24 | eventHandlers: 25 | - event: Echo(indexed address,bytes) 26 | handler: handleEcho 27 | - kind: ethereum/contract 28 | name: Instance-0.1-bnb 29 | network: bsc 30 | source: 31 | address: "0x84443CFd09A48AF6eF360C6976C5392aC5023a1F" 32 | abi: Instance 33 | startBlock: 8159279 34 | mapping: 35 | kind: ethereum/events 36 | apiVersion: 0.0.4 37 | language: wasm/assemblyscript 38 | file: ../src/mapping-instance.ts 39 | entities: 40 | - Deposit 41 | - Withdrawal 42 | abis: 43 | - name: Instance 44 | file: ../abis/Instance.json 45 | eventHandlers: 46 | - event: Deposit(indexed bytes32,uint32,uint256) 47 | handler: handleDeposit 48 | - event: Withdrawal(address,bytes32,indexed address,uint256) 49 | handler: handleWithdrawal 50 | - kind: ethereum/contract 51 | name: Instance-1-bnb 52 | network: bsc 53 | source: 54 | address: "0xd47438C816c9E7f2E2888E060936a499Af9582b3" 55 | abi: Instance 56 | startBlock: 8159286 57 | mapping: 58 | kind: ethereum/events 59 | apiVersion: 0.0.4 60 | language: wasm/assemblyscript 61 | file: ../src/mapping-instance.ts 62 | entities: 63 | - Deposit 64 | - Withdrawal 65 | abis: 66 | - name: Instance 67 | file: ../abis/Instance.json 68 | eventHandlers: 69 | - event: Deposit(indexed bytes32,uint32,uint256) 70 | handler: handleDeposit 71 | - event: Withdrawal(address,bytes32,indexed address,uint256) 72 | handler: handleWithdrawal 73 | - kind: ethereum/contract 74 | name: Instance-10-bnb 75 | network: bsc 76 | source: 77 | address: "0x330bdFADE01eE9bF63C209Ee33102DD334618e0a" 78 | abi: Instance 79 | startBlock: 8159290 80 | mapping: 81 | kind: ethereum/events 82 | apiVersion: 0.0.4 83 | language: wasm/assemblyscript 84 | file: ../src/mapping-instance.ts 85 | entities: 86 | - Deposit 87 | - Withdrawal 88 | abis: 89 | - name: Instance 90 | file: ../abis/Instance.json 91 | eventHandlers: 92 | - event: Deposit(indexed bytes32,uint32,uint256) 93 | handler: handleDeposit 94 | - event: Withdrawal(address,bytes32,indexed address,uint256) 95 | handler: handleWithdrawal 96 | - kind: ethereum/contract 97 | name: Instance-100-bnb 98 | network: bsc 99 | source: 100 | address: "0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD" 101 | abi: Instance 102 | startBlock: 8159296 103 | mapping: 104 | kind: ethereum/events 105 | apiVersion: 0.0.4 106 | language: wasm/assemblyscript 107 | file: ../src/mapping-instance.ts 108 | entities: 109 | - Deposit 110 | - Withdrawal 111 | abis: 112 | - name: Instance 113 | file: ../abis/Instance.json 114 | eventHandlers: 115 | - event: Deposit(indexed bytes32,uint32,uint256) 116 | handler: handleDeposit 117 | - event: Withdrawal(address,bytes32,indexed address,uint256) 118 | handler: handleWithdrawal 119 | - kind: ethereum/contract 120 | name: Proxy 121 | network: bsc 122 | source: 123 | address: "0x0D5550d52428E7e3175bfc9550207e4ad3859b17" 124 | abi: Proxy 125 | startBlock: 8158799 126 | mapping: 127 | kind: ethereum/events 128 | apiVersion: 0.0.4 129 | language: wasm/assemblyscript 130 | file: ../src/mapping-encrypted-note.ts 131 | entities: 132 | - EncryptedNote 133 | abis: 134 | - name: Proxy 135 | file: ../abis/Proxy.json 136 | eventHandlers: 137 | - event: EncryptedNote(indexed address,bytes) 138 | handler: handleEncryptedNote 139 | -------------------------------------------------------------------------------- /subgraphs/tornado-subgraph-goerli.yaml: -------------------------------------------------------------------------------- 1 | specVersion: 0.0.2 2 | description: Proxy 3 | repository: https://github.com/tornadocash/tornado-subgraph 4 | schema: 5 | file: ../schema.graphql 6 | dataSources: 7 | - kind: ethereum/contract 8 | name: Echoer 9 | network: goerli 10 | source: 11 | address: "0x37e6859804b6499d1e4a86d70a5fdd5de6a0ac65" 12 | abi: Echoer 13 | startBlock: 3781595 14 | mapping: 15 | kind: ethereum/events 16 | apiVersion: 0.0.4 17 | language: wasm/assemblyscript 18 | file: ../src/mapping-echo-account.ts 19 | entities: 20 | - NoteAccount 21 | abis: 22 | - name: Echoer 23 | file: ../abis/Echoer.json 24 | eventHandlers: 25 | - event: Echo(indexed address,bytes) 26 | handler: handleEcho 27 | - kind: ethereum/contract 28 | name: Instance-100-dai 29 | network: goerli 30 | source: 31 | address: "0x76D85B4C0Fc497EeCc38902397aC608000A06607" 32 | abi: Instance 33 | startBlock: 3781595 34 | mapping: 35 | kind: ethereum/events 36 | apiVersion: 0.0.4 37 | language: wasm/assemblyscript 38 | file: ../src/mapping-instance.ts 39 | entities: 40 | - Deposit 41 | - Withdrawal 42 | abis: 43 | - name: Instance 44 | file: ../abis/Instance.json 45 | eventHandlers: 46 | - event: Deposit(indexed bytes32,uint32,uint256) 47 | handler: handleDeposit 48 | - event: Withdrawal(address,bytes32,indexed address,uint256) 49 | handler: handleWithdrawal 50 | - kind: ethereum/contract 51 | name: Instance-1000-dai 52 | network: goerli 53 | source: 54 | address: "0xCC84179FFD19A1627E79F8648d09e095252Bc418" 55 | abi: Instance 56 | startBlock: 3781595 57 | mapping: 58 | kind: ethereum/events 59 | apiVersion: 0.0.4 60 | language: wasm/assemblyscript 61 | file: ../src/mapping-instance.ts 62 | entities: 63 | - Deposit 64 | - Withdrawal 65 | abis: 66 | - name: Instance 67 | file: ../abis/Instance.json 68 | eventHandlers: 69 | - event: Deposit(indexed bytes32,uint32,uint256) 70 | handler: handleDeposit 71 | - event: Withdrawal(address,bytes32,indexed address,uint256) 72 | handler: handleWithdrawal 73 | - kind: ethereum/contract 74 | name: Instance-10000-dai 75 | network: goerli 76 | source: 77 | address: "0xD5d6f8D9e784d0e26222ad3834500801a68D027D" 78 | abi: Instance 79 | startBlock: 3781595 80 | mapping: 81 | kind: ethereum/events 82 | apiVersion: 0.0.4 83 | language: wasm/assemblyscript 84 | file: ../src/mapping-instance.ts 85 | entities: 86 | - Deposit 87 | - Withdrawal 88 | abis: 89 | - name: Instance 90 | file: ../abis/Instance.json 91 | eventHandlers: 92 | - event: Deposit(indexed bytes32,uint32,uint256) 93 | handler: handleDeposit 94 | - event: Withdrawal(address,bytes32,indexed address,uint256) 95 | handler: handleWithdrawal 96 | - kind: ethereum/contract 97 | name: Instance-100000-dai 98 | network: goerli 99 | source: 100 | address: "0x407CcEeaA7c95d2FE2250Bf9F2c105aA7AAFB512" 101 | abi: Instance 102 | startBlock: 3781595 103 | mapping: 104 | kind: ethereum/events 105 | apiVersion: 0.0.4 106 | language: wasm/assemblyscript 107 | file: ../src/mapping-instance.ts 108 | entities: 109 | - Deposit 110 | - Withdrawal 111 | abis: 112 | - name: Instance 113 | file: ../abis/Instance.json 114 | eventHandlers: 115 | - event: Deposit(indexed bytes32,uint32,uint256) 116 | handler: handleDeposit 117 | - event: Withdrawal(address,bytes32,indexed address,uint256) 118 | handler: handleWithdrawal 119 | - kind: ethereum/contract 120 | name: Instance-5000-cdai 121 | network: goerli 122 | source: 123 | address: "0x833481186f16Cece3f1Eeea1a694c42034c3a0dB" 124 | abi: Instance 125 | startBlock: 3781595 126 | mapping: 127 | kind: ethereum/events 128 | apiVersion: 0.0.4 129 | language: wasm/assemblyscript 130 | file: ../src/mapping-instance.ts 131 | entities: 132 | - Deposit 133 | - Withdrawal 134 | abis: 135 | - name: Instance 136 | file: ../abis/Instance.json 137 | eventHandlers: 138 | - event: Deposit(indexed bytes32,uint32,uint256) 139 | handler: handleDeposit 140 | - event: Withdrawal(address,bytes32,indexed address,uint256) 141 | handler: handleWithdrawal 142 | - kind: ethereum/contract 143 | name: Instance-50000-cdai 144 | network: goerli 145 | source: 146 | address: "0xd8D7DE3349ccaA0Fde6298fe6D7b7d0d34586193" 147 | abi: Instance 148 | startBlock: 3781595 149 | mapping: 150 | kind: ethereum/events 151 | apiVersion: 0.0.4 152 | language: wasm/assemblyscript 153 | file: ../src/mapping-instance.ts 154 | entities: 155 | - Deposit 156 | - Withdrawal 157 | abis: 158 | - name: Instance 159 | file: ../abis/Instance.json 160 | eventHandlers: 161 | - event: Deposit(indexed bytes32,uint32,uint256) 162 | handler: handleDeposit 163 | - event: Withdrawal(address,bytes32,indexed address,uint256) 164 | handler: handleWithdrawal 165 | - kind: ethereum/contract 166 | name: Instance-500000-cdai 167 | network: goerli 168 | source: 169 | address: "0x8281Aa6795aDE17C8973e1aedcA380258Bc124F9" 170 | abi: Instance 171 | startBlock: 3781595 172 | mapping: 173 | kind: ethereum/events 174 | apiVersion: 0.0.4 175 | language: wasm/assemblyscript 176 | file: ../src/mapping-instance.ts 177 | entities: 178 | - Deposit 179 | - Withdrawal 180 | abis: 181 | - name: Instance 182 | file: ../abis/Instance.json 183 | eventHandlers: 184 | - event: Deposit(indexed bytes32,uint32,uint256) 185 | handler: handleDeposit 186 | - event: Withdrawal(address,bytes32,indexed address,uint256) 187 | handler: handleWithdrawal 188 | - kind: ethereum/contract 189 | name: Instance-5000000-cdai 190 | network: goerli 191 | source: 192 | address: "0x57b2B8c82F065de8Ef5573f9730fC1449B403C9f" 193 | abi: Instance 194 | startBlock: 3781595 195 | mapping: 196 | kind: ethereum/events 197 | apiVersion: 0.0.4 198 | language: wasm/assemblyscript 199 | file: ../src/mapping-instance.ts 200 | entities: 201 | - Deposit 202 | - Withdrawal 203 | abis: 204 | - name: Instance 205 | file: ../abis/Instance.json 206 | eventHandlers: 207 | - event: Deposit(indexed bytes32,uint32,uint256) 208 | handler: handleDeposit 209 | - event: Withdrawal(address,bytes32,indexed address,uint256) 210 | handler: handleWithdrawal 211 | - kind: ethereum/contract 212 | name: Instance-100-usdc 213 | network: goerli 214 | source: 215 | address: "0x05E0b5B40B7b66098C2161A5EE11C5740A3A7C45" 216 | abi: Instance 217 | startBlock: 3781595 218 | mapping: 219 | kind: ethereum/events 220 | apiVersion: 0.0.4 221 | language: wasm/assemblyscript 222 | file: ../src/mapping-instance.ts 223 | entities: 224 | - Deposit 225 | - Withdrawal 226 | abis: 227 | - name: Instance 228 | file: ../abis/Instance.json 229 | eventHandlers: 230 | - event: Deposit(indexed bytes32,uint32,uint256) 231 | handler: handleDeposit 232 | - event: Withdrawal(address,bytes32,indexed address,uint256) 233 | handler: handleWithdrawal 234 | - kind: ethereum/contract 235 | name: Instance-1000-usdc 236 | network: goerli 237 | source: 238 | address: "0x23173fE8b96A4Ad8d2E17fB83EA5dcccdCa1Ae52" 239 | abi: Instance 240 | startBlock: 3781595 241 | mapping: 242 | kind: ethereum/events 243 | apiVersion: 0.0.4 244 | language: wasm/assemblyscript 245 | file: ../src/mapping-instance.ts 246 | entities: 247 | - Deposit 248 | - Withdrawal 249 | abis: 250 | - name: Instance 251 | file: ../abis/Instance.json 252 | eventHandlers: 253 | - event: Deposit(indexed bytes32,uint32,uint256) 254 | handler: handleDeposit 255 | - event: Withdrawal(address,bytes32,indexed address,uint256) 256 | handler: handleWithdrawal 257 | - kind: ethereum/contract 258 | name: Instance-100-usdt 259 | network: goerli 260 | source: 261 | address: "0x538Ab61E8A9fc1b2f93b3dd9011d662d89bE6FE6" 262 | abi: Instance 263 | startBlock: 3781595 264 | mapping: 265 | kind: ethereum/events 266 | apiVersion: 0.0.4 267 | language: wasm/assemblyscript 268 | file: ../src/mapping-instance.ts 269 | entities: 270 | - Deposit 271 | - Withdrawal 272 | abis: 273 | - name: Instance 274 | file: ../abis/Instance.json 275 | eventHandlers: 276 | - event: Deposit(indexed bytes32,uint32,uint256) 277 | handler: handleDeposit 278 | - event: Withdrawal(address,bytes32,indexed address,uint256) 279 | handler: handleWithdrawal 280 | - kind: ethereum/contract 281 | name: Instance-1000-usdt 282 | network: goerli 283 | source: 284 | address: "0x94Be88213a387E992Dd87DE56950a9aef34b9448" 285 | abi: Instance 286 | startBlock: 3781595 287 | mapping: 288 | kind: ethereum/events 289 | apiVersion: 0.0.4 290 | language: wasm/assemblyscript 291 | file: ../src/mapping-instance.ts 292 | entities: 293 | - Deposit 294 | - Withdrawal 295 | abis: 296 | - name: Instance 297 | file: ../abis/Instance.json 298 | eventHandlers: 299 | - event: Deposit(indexed bytes32,uint32,uint256) 300 | handler: handleDeposit 301 | - event: Withdrawal(address,bytes32,indexed address,uint256) 302 | handler: handleWithdrawal 303 | - kind: ethereum/contract 304 | name: Instance-0.1-wbtc 305 | network: goerli 306 | source: 307 | address: "0x242654336ca2205714071898f67E254EB49ACdCe" 308 | abi: Instance 309 | startBlock: 3781595 310 | mapping: 311 | kind: ethereum/events 312 | apiVersion: 0.0.4 313 | language: wasm/assemblyscript 314 | file: ../src/mapping-instance.ts 315 | entities: 316 | - Deposit 317 | - Withdrawal 318 | abis: 319 | - name: Instance 320 | file: ../abis/Instance.json 321 | eventHandlers: 322 | - event: Deposit(indexed bytes32,uint32,uint256) 323 | handler: handleDeposit 324 | - event: Withdrawal(address,bytes32,indexed address,uint256) 325 | handler: handleWithdrawal 326 | - kind: ethereum/contract 327 | name: Instance-1-wbtc 328 | network: goerli 329 | source: 330 | address: "0x776198CCF446DFa168347089d7338879273172cF" 331 | abi: Instance 332 | startBlock: 3781595 333 | mapping: 334 | kind: ethereum/events 335 | apiVersion: 0.0.4 336 | language: wasm/assemblyscript 337 | file: ../src/mapping-instance.ts 338 | entities: 339 | - Deposit 340 | - Withdrawal 341 | abis: 342 | - name: Instance 343 | file: ../abis/Instance.json 344 | eventHandlers: 345 | - event: Deposit(indexed bytes32,uint32,uint256) 346 | handler: handleDeposit 347 | - event: Withdrawal(address,bytes32,indexed address,uint256) 348 | handler: handleWithdrawal 349 | - kind: ethereum/contract 350 | name: Instance-10-wbtc 351 | network: goerli 352 | source: 353 | address: "0xeDC5d01286f99A066559F60a585406f3878a033e" 354 | abi: Instance 355 | startBlock: 3781595 356 | mapping: 357 | kind: ethereum/events 358 | apiVersion: 0.0.4 359 | language: wasm/assemblyscript 360 | file: ../src/mapping-instance.ts 361 | entities: 362 | - Deposit 363 | - Withdrawal 364 | abis: 365 | - name: Instance 366 | file: ../abis/Instance.json 367 | eventHandlers: 368 | - event: Deposit(indexed bytes32,uint32,uint256) 369 | handler: handleDeposit 370 | - event: Withdrawal(address,bytes32,indexed address,uint256) 371 | handler: handleWithdrawal 372 | - kind: ethereum/contract 373 | name: Instance-0.1-eth 374 | network: goerli 375 | source: 376 | address: "0x6Bf694a291DF3FeC1f7e69701E3ab6c592435Ae7" 377 | abi: Instance 378 | startBlock: 3781595 379 | mapping: 380 | kind: ethereum/events 381 | apiVersion: 0.0.4 382 | language: wasm/assemblyscript 383 | file: ../src/mapping-instance.ts 384 | entities: 385 | - Deposit 386 | - Withdrawal 387 | abis: 388 | - name: Instance 389 | file: ../abis/Instance.json 390 | eventHandlers: 391 | - event: Deposit(indexed bytes32,uint32,uint256) 392 | handler: handleDeposit 393 | - event: Withdrawal(address,bytes32,indexed address,uint256) 394 | handler: handleWithdrawal 395 | - kind: ethereum/contract 396 | name: Instance-1-eth 397 | network: goerli 398 | source: 399 | address: "0x3aac1cC67c2ec5Db4eA850957b967Ba153aD6279" 400 | abi: Instance 401 | startBlock: 3781595 402 | mapping: 403 | kind: ethereum/events 404 | apiVersion: 0.0.4 405 | language: wasm/assemblyscript 406 | file: ../src/mapping-instance.ts 407 | entities: 408 | - Deposit 409 | - Withdrawal 410 | abis: 411 | - name: Instance 412 | file: ../abis/Instance.json 413 | eventHandlers: 414 | - event: Deposit(indexed bytes32,uint32,uint256) 415 | handler: handleDeposit 416 | - event: Withdrawal(address,bytes32,indexed address,uint256) 417 | handler: handleWithdrawal 418 | - kind: ethereum/contract 419 | name: Instance-10-eth 420 | network: goerli 421 | source: 422 | address: "0x723B78e67497E85279CB204544566F4dC5d2acA0" 423 | abi: Instance 424 | startBlock: 3781595 425 | mapping: 426 | kind: ethereum/events 427 | apiVersion: 0.0.4 428 | language: wasm/assemblyscript 429 | file: ../src/mapping-instance.ts 430 | entities: 431 | - Deposit 432 | - Withdrawal 433 | abis: 434 | - name: Instance 435 | file: ../abis/Instance.json 436 | eventHandlers: 437 | - event: Deposit(indexed bytes32,uint32,uint256) 438 | handler: handleDeposit 439 | - event: Withdrawal(address,bytes32,indexed address,uint256) 440 | handler: handleWithdrawal 441 | - kind: ethereum/contract 442 | name: Instance-100-eth 443 | network: goerli 444 | source: 445 | address: "0x0E3A09dDA6B20aFbB34aC7cD4A6881493f3E7bf7" 446 | abi: Instance 447 | startBlock: 3781595 448 | mapping: 449 | kind: ethereum/events 450 | apiVersion: 0.0.4 451 | language: wasm/assemblyscript 452 | file: ../src/mapping-instance.ts 453 | entities: 454 | - Deposit 455 | - Withdrawal 456 | abis: 457 | - name: Instance 458 | file: ../abis/Instance.json 459 | eventHandlers: 460 | - event: Deposit(indexed bytes32,uint32,uint256) 461 | handler: handleDeposit 462 | - event: Withdrawal(address,bytes32,indexed address,uint256) 463 | handler: handleWithdrawal 464 | - kind: ethereum/contract 465 | name: Proxy 466 | network: goerli 467 | source: 468 | address: "0x454d870a72e29d5e5697f635128d18077bd04c60" 469 | abi: Proxy 470 | startBlock: 3781595 471 | mapping: 472 | kind: ethereum/events 473 | apiVersion: 0.0.4 474 | language: wasm/assemblyscript 475 | file: ../src/mapping-encrypted-note.ts 476 | entities: 477 | - EncryptedNote 478 | abis: 479 | - name: Proxy 480 | file: ../abis/Proxy.json 481 | eventHandlers: 482 | - event: EncryptedNote(indexed address,bytes) 483 | handler: handleEncryptedNote 484 | -------------------------------------------------------------------------------- /subgraphs/tornado-subgraph-mainnet.yaml: -------------------------------------------------------------------------------- 1 | specVersion: 0.0.2 2 | description: Proxy 3 | repository: https://github.com/tornadocash/tornado-subgraph 4 | schema: 5 | file: ../schema.graphql 6 | dataSources: 7 | - kind: ethereum/contract 8 | name: Echoer 9 | network: mainnet 10 | source: 11 | address: "0x9B27DD5Bb15d42DC224FCD0B7caEbBe16161Df42" 12 | abi: Echoer 13 | startBlock: 11842486 14 | mapping: 15 | kind: ethereum/events 16 | apiVersion: 0.0.4 17 | language: wasm/assemblyscript 18 | file: ../src/mapping-echo-account.ts 19 | entities: 20 | - NoteAccount 21 | abis: 22 | - name: Echoer 23 | file: ../abis/Echoer.json 24 | eventHandlers: 25 | - event: Echo(indexed address,bytes) 26 | handler: handleEcho 27 | - kind: ethereum/contract 28 | name: Instance-0.1-eth 29 | network: mainnet 30 | source: 31 | address: "0x12D66f87A04A9E220743712cE6d9bB1B5616B8Fc" 32 | abi: Instance 33 | startBlock: 9116966 34 | mapping: 35 | kind: ethereum/events 36 | apiVersion: 0.0.4 37 | language: wasm/assemblyscript 38 | file: ../src/mapping-instance.ts 39 | entities: 40 | - Deposit 41 | - Withdrawal 42 | abis: 43 | - name: Instance 44 | file: ../abis/Instance.json 45 | eventHandlers: 46 | - event: Deposit(indexed bytes32,uint32,uint256) 47 | handler: handleDeposit 48 | - event: Withdrawal(address,bytes32,indexed address,uint256) 49 | handler: handleWithdrawal 50 | - kind: ethereum/contract 51 | name: Instance-1-eth 52 | network: mainnet 53 | source: 54 | address: "0x47CE0C6eD5B0Ce3d3A51fdb1C52DC66a7c3c2936" 55 | abi: Instance 56 | startBlock: 9116966 57 | mapping: 58 | kind: ethereum/events 59 | apiVersion: 0.0.4 60 | language: wasm/assemblyscript 61 | file: ../src/mapping-instance.ts 62 | entities: 63 | - Deposit 64 | - Withdrawal 65 | abis: 66 | - name: Instance 67 | file: ../abis/Instance.json 68 | eventHandlers: 69 | - event: Deposit(indexed bytes32,uint32,uint256) 70 | handler: handleDeposit 71 | - event: Withdrawal(address,bytes32,indexed address,uint256) 72 | handler: handleWithdrawal 73 | - kind: ethereum/contract 74 | name: Instance-10-eth 75 | network: mainnet 76 | source: 77 | address: "0x910Cbd523D972eb0a6f4cAe4618aD62622b39DbF" 78 | abi: Instance 79 | startBlock: 9116966 80 | mapping: 81 | kind: ethereum/events 82 | apiVersion: 0.0.4 83 | language: wasm/assemblyscript 84 | file: ../src/mapping-instance.ts 85 | entities: 86 | - Deposit 87 | - Withdrawal 88 | abis: 89 | - name: Instance 90 | file: ../abis/Instance.json 91 | eventHandlers: 92 | - event: Deposit(indexed bytes32,uint32,uint256) 93 | handler: handleDeposit 94 | - event: Withdrawal(address,bytes32,indexed address,uint256) 95 | handler: handleWithdrawal 96 | - kind: ethereum/contract 97 | name: Instance-100-eth 98 | network: mainnet 99 | source: 100 | address: "0xA160cdAB225685dA1d56aa342Ad8841c3b53f291" 101 | abi: Instance 102 | startBlock: 9116966 103 | mapping: 104 | kind: ethereum/events 105 | apiVersion: 0.0.4 106 | language: wasm/assemblyscript 107 | file: ../src/mapping-instance.ts 108 | entities: 109 | - Deposit 110 | - Withdrawal 111 | abis: 112 | - name: Instance 113 | file: ../abis/Instance.json 114 | eventHandlers: 115 | - event: Deposit(indexed bytes32,uint32,uint256) 116 | handler: handleDeposit 117 | - event: Withdrawal(address,bytes32,indexed address,uint256) 118 | handler: handleWithdrawal 119 | - kind: ethereum/contract 120 | name: Instance-100-dai 121 | network: mainnet 122 | source: 123 | address: "0xD4B88Df4D29F5CedD6857912842cff3b20C8Cfa3" 124 | abi: Instance 125 | startBlock: 9116966 126 | mapping: 127 | kind: ethereum/events 128 | apiVersion: 0.0.4 129 | language: wasm/assemblyscript 130 | file: ../src/mapping-instance.ts 131 | entities: 132 | - Deposit 133 | - Withdrawal 134 | abis: 135 | - name: Instance 136 | file: ../abis/Instance.json 137 | eventHandlers: 138 | - event: Deposit(indexed bytes32,uint32,uint256) 139 | handler: handleDeposit 140 | - event: Withdrawal(address,bytes32,indexed address,uint256) 141 | handler: handleWithdrawal 142 | - kind: ethereum/contract 143 | name: Instance-1000-dai 144 | network: mainnet 145 | source: 146 | address: "0xFD8610d20aA15b7B2E3Be39B396a1bC3516c7144" 147 | abi: Instance 148 | startBlock: 9116966 149 | mapping: 150 | kind: ethereum/events 151 | apiVersion: 0.0.4 152 | language: wasm/assemblyscript 153 | file: ../src/mapping-instance.ts 154 | entities: 155 | - Deposit 156 | - Withdrawal 157 | abis: 158 | - name: Instance 159 | file: ../abis/Instance.json 160 | eventHandlers: 161 | - event: Deposit(indexed bytes32,uint32,uint256) 162 | handler: handleDeposit 163 | - event: Withdrawal(address,bytes32,indexed address,uint256) 164 | handler: handleWithdrawal 165 | - kind: ethereum/contract 166 | name: Instance-10000-dai 167 | network: mainnet 168 | source: 169 | address: "0x07687e702b410Fa43f4cB4Af7FA097918ffD2730" 170 | abi: Instance 171 | startBlock: 9116966 172 | mapping: 173 | kind: ethereum/events 174 | apiVersion: 0.0.4 175 | language: wasm/assemblyscript 176 | file: ../src/mapping-instance.ts 177 | entities: 178 | - Deposit 179 | - Withdrawal 180 | abis: 181 | - name: Instance 182 | file: ../abis/Instance.json 183 | eventHandlers: 184 | - event: Deposit(indexed bytes32,uint32,uint256) 185 | handler: handleDeposit 186 | - event: Withdrawal(address,bytes32,indexed address,uint256) 187 | handler: handleWithdrawal 188 | - kind: ethereum/contract 189 | name: Instance-100000-dai 190 | network: mainnet 191 | source: 192 | address: "0x23773E65ed146A459791799d01336DB287f25334" 193 | abi: Instance 194 | startBlock: 9116966 195 | mapping: 196 | kind: ethereum/events 197 | apiVersion: 0.0.4 198 | language: wasm/assemblyscript 199 | file: ../src/mapping-instance.ts 200 | entities: 201 | - Deposit 202 | - Withdrawal 203 | abis: 204 | - name: Instance 205 | file: ../abis/Instance.json 206 | eventHandlers: 207 | - event: Deposit(indexed bytes32,uint32,uint256) 208 | handler: handleDeposit 209 | - event: Withdrawal(address,bytes32,indexed address,uint256) 210 | handler: handleWithdrawal 211 | - kind: ethereum/contract 212 | name: Instance-5000-cdai 213 | network: mainnet 214 | source: 215 | address: "0x22aaA7720ddd5388A3c0A3333430953C68f1849b" 216 | abi: Instance 217 | startBlock: 9116966 218 | mapping: 219 | kind: ethereum/events 220 | apiVersion: 0.0.4 221 | language: wasm/assemblyscript 222 | file: ../src/mapping-instance.ts 223 | entities: 224 | - Deposit 225 | - Withdrawal 226 | abis: 227 | - name: Instance 228 | file: ../abis/Instance.json 229 | eventHandlers: 230 | - event: Deposit(indexed bytes32,uint32,uint256) 231 | handler: handleDeposit 232 | - event: Withdrawal(address,bytes32,indexed address,uint256) 233 | handler: handleWithdrawal 234 | - kind: ethereum/contract 235 | name: Instance-50000-cdai 236 | network: mainnet 237 | source: 238 | address: "0x03893a7c7463AE47D46bc7f091665f1893656003" 239 | abi: Instance 240 | startBlock: 9116966 241 | mapping: 242 | kind: ethereum/events 243 | apiVersion: 0.0.4 244 | language: wasm/assemblyscript 245 | file: ../src/mapping-instance.ts 246 | entities: 247 | - Deposit 248 | - Withdrawal 249 | abis: 250 | - name: Instance 251 | file: ../abis/Instance.json 252 | eventHandlers: 253 | - event: Deposit(indexed bytes32,uint32,uint256) 254 | handler: handleDeposit 255 | - event: Withdrawal(address,bytes32,indexed address,uint256) 256 | handler: handleWithdrawal 257 | - kind: ethereum/contract 258 | name: Instance-500000-cdai 259 | network: mainnet 260 | source: 261 | address: "0x2717c5e28cf931547B621a5dddb772Ab6A35B701" 262 | abi: Instance 263 | startBlock: 9116966 264 | mapping: 265 | kind: ethereum/events 266 | apiVersion: 0.0.4 267 | language: wasm/assemblyscript 268 | file: ../src/mapping-instance.ts 269 | entities: 270 | - Deposit 271 | - Withdrawal 272 | abis: 273 | - name: Instance 274 | file: ../abis/Instance.json 275 | eventHandlers: 276 | - event: Deposit(indexed bytes32,uint32,uint256) 277 | handler: handleDeposit 278 | - event: Withdrawal(address,bytes32,indexed address,uint256) 279 | handler: handleWithdrawal 280 | - kind: ethereum/contract 281 | name: Instance-5000000-cdai 282 | network: mainnet 283 | source: 284 | address: "0xD21be7248e0197Ee08E0c20D4a96DEBdaC3D20Af" 285 | abi: Instance 286 | startBlock: 9116966 287 | mapping: 288 | kind: ethereum/events 289 | apiVersion: 0.0.4 290 | language: wasm/assemblyscript 291 | file: ../src/mapping-instance.ts 292 | entities: 293 | - Deposit 294 | - Withdrawal 295 | abis: 296 | - name: Instance 297 | file: ../abis/Instance.json 298 | eventHandlers: 299 | - event: Deposit(indexed bytes32,uint32,uint256) 300 | handler: handleDeposit 301 | - event: Withdrawal(address,bytes32,indexed address,uint256) 302 | handler: handleWithdrawal 303 | - kind: ethereum/contract 304 | name: Instance-100-usdc 305 | network: mainnet 306 | source: 307 | address: "0xd96f2B1c14Db8458374d9Aca76E26c3D18364307" 308 | abi: Instance 309 | startBlock: 9116966 310 | mapping: 311 | kind: ethereum/events 312 | apiVersion: 0.0.4 313 | language: wasm/assemblyscript 314 | file: ../src/mapping-instance.ts 315 | entities: 316 | - Deposit 317 | - Withdrawal 318 | abis: 319 | - name: Instance 320 | file: ../abis/Instance.json 321 | eventHandlers: 322 | - event: Deposit(indexed bytes32,uint32,uint256) 323 | handler: handleDeposit 324 | - event: Withdrawal(address,bytes32,indexed address,uint256) 325 | handler: handleWithdrawal 326 | - kind: ethereum/contract 327 | name: Instance-1000-usdc 328 | network: mainnet 329 | source: 330 | address: "0x4736dCf1b7A3d580672CcE6E7c65cd5cc9cFBa9D" 331 | abi: Instance 332 | startBlock: 9116966 333 | mapping: 334 | kind: ethereum/events 335 | apiVersion: 0.0.4 336 | language: wasm/assemblyscript 337 | file: ../src/mapping-instance.ts 338 | entities: 339 | - Deposit 340 | - Withdrawal 341 | abis: 342 | - name: Instance 343 | file: ../abis/Instance.json 344 | eventHandlers: 345 | - event: Deposit(indexed bytes32,uint32,uint256) 346 | handler: handleDeposit 347 | - event: Withdrawal(address,bytes32,indexed address,uint256) 348 | handler: handleWithdrawal 349 | - kind: ethereum/contract 350 | name: Instance-100-usdt 351 | network: mainnet 352 | source: 353 | address: "0x169AD27A470D064DEDE56a2D3ff727986b15D52B" 354 | abi: Instance 355 | startBlock: 9116966 356 | mapping: 357 | kind: ethereum/events 358 | apiVersion: 0.0.4 359 | language: wasm/assemblyscript 360 | file: ../src/mapping-instance.ts 361 | entities: 362 | - Deposit 363 | - Withdrawal 364 | abis: 365 | - name: Instance 366 | file: ../abis/Instance.json 367 | eventHandlers: 368 | - event: Deposit(indexed bytes32,uint32,uint256) 369 | handler: handleDeposit 370 | - event: Withdrawal(address,bytes32,indexed address,uint256) 371 | handler: handleWithdrawal 372 | - kind: ethereum/contract 373 | name: Instance-1000-usdt 374 | network: mainnet 375 | source: 376 | address: "0x0836222F2B2B24A3F36f98668Ed8F0B38D1a872f" 377 | abi: Instance 378 | startBlock: 9116966 379 | mapping: 380 | kind: ethereum/events 381 | apiVersion: 0.0.4 382 | language: wasm/assemblyscript 383 | file: ../src/mapping-instance.ts 384 | entities: 385 | - Deposit 386 | - Withdrawal 387 | abis: 388 | - name: Instance 389 | file: ../abis/Instance.json 390 | eventHandlers: 391 | - event: Deposit(indexed bytes32,uint32,uint256) 392 | handler: handleDeposit 393 | - event: Withdrawal(address,bytes32,indexed address,uint256) 394 | handler: handleWithdrawal 395 | - kind: ethereum/contract 396 | name: Instance-0.1-wbtc 397 | network: mainnet 398 | source: 399 | address: "0x178169B423a011fff22B9e3F3abeA13414dDD0F1" 400 | abi: Instance 401 | startBlock: 9116966 402 | mapping: 403 | kind: ethereum/events 404 | apiVersion: 0.0.4 405 | language: wasm/assemblyscript 406 | file: ../src/mapping-instance.ts 407 | entities: 408 | - Deposit 409 | - Withdrawal 410 | abis: 411 | - name: Instance 412 | file: ../abis/Instance.json 413 | eventHandlers: 414 | - event: Deposit(indexed bytes32,uint32,uint256) 415 | handler: handleDeposit 416 | - event: Withdrawal(address,bytes32,indexed address,uint256) 417 | handler: handleWithdrawal 418 | - kind: ethereum/contract 419 | name: Instance-1-wbtc 420 | network: mainnet 421 | source: 422 | address: "0x610B717796ad172B316836AC95a2ffad065CeaB4" 423 | abi: Instance 424 | startBlock: 9116966 425 | mapping: 426 | kind: ethereum/events 427 | apiVersion: 0.0.4 428 | language: wasm/assemblyscript 429 | file: ../src/mapping-instance.ts 430 | entities: 431 | - Deposit 432 | - Withdrawal 433 | abis: 434 | - name: Instance 435 | file: ../abis/Instance.json 436 | eventHandlers: 437 | - event: Deposit(indexed bytes32,uint32,uint256) 438 | handler: handleDeposit 439 | - event: Withdrawal(address,bytes32,indexed address,uint256) 440 | handler: handleWithdrawal 441 | - kind: ethereum/contract 442 | name: Instance-10-wbtc 443 | network: mainnet 444 | source: 445 | address: "0xbB93e510BbCD0B7beb5A853875f9eC60275CF498" 446 | abi: Instance 447 | startBlock: 9116966 448 | mapping: 449 | kind: ethereum/events 450 | apiVersion: 0.0.4 451 | language: wasm/assemblyscript 452 | file: ../src/mapping-instance.ts 453 | entities: 454 | - Deposit 455 | - Withdrawal 456 | abis: 457 | - name: Instance 458 | file: ../abis/Instance.json 459 | eventHandlers: 460 | - event: Deposit(indexed bytes32,uint32,uint256) 461 | handler: handleDeposit 462 | - event: Withdrawal(address,bytes32,indexed address,uint256) 463 | handler: handleWithdrawal 464 | - kind: ethereum/contract 465 | name: Proxy 466 | network: mainnet 467 | source: 468 | address: "0xd90e2f925DA726b50C4Ed8D0Fb90Ad053324F31b" 469 | abi: Proxy 470 | startBlock: 14248730 471 | mapping: 472 | kind: ethereum/events 473 | apiVersion: 0.0.4 474 | language: wasm/assemblyscript 475 | file: ../src/mapping-encrypted-note.ts 476 | entities: 477 | - EncryptedNote 478 | abis: 479 | - name: Proxy 480 | file: ../abis/Proxy.json 481 | eventHandlers: 482 | - event: EncryptedNote(indexed address,bytes) 483 | handler: handleEncryptedNote 484 | -------------------------------------------------------------------------------- /subgraphs/tornado-subgraph-matic.yaml: -------------------------------------------------------------------------------- 1 | specVersion: 0.0.2 2 | description: Proxy 3 | repository: https://github.com/tornadocash/tornado-subgraph 4 | schema: 5 | file: ../schema.graphql 6 | dataSources: 7 | - kind: ethereum/contract 8 | name: Echoer 9 | network: matic 10 | source: 11 | address: "0xa75BF2815618872f155b7C4B0C81bF990f5245E4" 12 | abi: Echoer 13 | startBlock: 16257996 14 | mapping: 15 | kind: ethereum/events 16 | apiVersion: 0.0.4 17 | language: wasm/assemblyscript 18 | file: ../src/mapping-echo-account.ts 19 | entities: 20 | - NoteAccount 21 | abis: 22 | - name: Echoer 23 | file: ../abis/Echoer.json 24 | eventHandlers: 25 | - event: Echo(indexed address,bytes) 26 | handler: handleEcho 27 | - kind: ethereum/contract 28 | name: Instance-100-matic 29 | network: matic 30 | source: 31 | address: "0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD" 32 | abi: Instance 33 | startBlock: 16257962 34 | mapping: 35 | kind: ethereum/events 36 | apiVersion: 0.0.4 37 | language: wasm/assemblyscript 38 | file: ../src/mapping-instance.ts 39 | entities: 40 | - Deposit 41 | - Withdrawal 42 | abis: 43 | - name: Instance 44 | file: ../abis/Instance.json 45 | eventHandlers: 46 | - event: Deposit(indexed bytes32,uint32,uint256) 47 | handler: handleDeposit 48 | - event: Withdrawal(address,bytes32,indexed address,uint256) 49 | handler: handleWithdrawal 50 | - kind: ethereum/contract 51 | name: Instance-1000-matic 52 | network: matic 53 | source: 54 | address: "0xdf231d99Ff8b6c6CBF4E9B9a945CBAcEF9339178" 55 | abi: Instance 56 | startBlock: 16257962 57 | mapping: 58 | kind: ethereum/events 59 | apiVersion: 0.0.4 60 | language: wasm/assemblyscript 61 | file: ../src/mapping-instance.ts 62 | entities: 63 | - Deposit 64 | - Withdrawal 65 | abis: 66 | - name: Instance 67 | file: ../abis/Instance.json 68 | eventHandlers: 69 | - event: Deposit(indexed bytes32,uint32,uint256) 70 | handler: handleDeposit 71 | - event: Withdrawal(address,bytes32,indexed address,uint256) 72 | handler: handleWithdrawal 73 | - kind: ethereum/contract 74 | name: Instance-10000-matic 75 | network: matic 76 | source: 77 | address: "0xaf4c0B70B2Ea9FB7487C7CbB37aDa259579fe040" 78 | abi: Instance 79 | startBlock: 16257962 80 | mapping: 81 | kind: ethereum/events 82 | apiVersion: 0.0.4 83 | language: wasm/assemblyscript 84 | file: ../src/mapping-instance.ts 85 | entities: 86 | - Deposit 87 | - Withdrawal 88 | abis: 89 | - name: Instance 90 | file: ../abis/Instance.json 91 | eventHandlers: 92 | - event: Deposit(indexed bytes32,uint32,uint256) 93 | handler: handleDeposit 94 | - event: Withdrawal(address,bytes32,indexed address,uint256) 95 | handler: handleWithdrawal 96 | - kind: ethereum/contract 97 | name: Instance-100000-matic 98 | network: matic 99 | source: 100 | address: "0xa5C2254e4253490C54cef0a4347fddb8f75A4998" 101 | abi: Instance 102 | startBlock: 16257962 103 | mapping: 104 | kind: ethereum/events 105 | apiVersion: 0.0.4 106 | language: wasm/assemblyscript 107 | file: ../src/mapping-instance.ts 108 | entities: 109 | - Deposit 110 | - Withdrawal 111 | abis: 112 | - name: Instance 113 | file: ../abis/Instance.json 114 | eventHandlers: 115 | - event: Deposit(indexed bytes32,uint32,uint256) 116 | handler: handleDeposit 117 | - event: Withdrawal(address,bytes32,indexed address,uint256) 118 | handler: handleWithdrawal 119 | - kind: ethereum/contract 120 | name: Proxy 121 | network: matic 122 | source: 123 | address: "0x0D5550d52428E7e3175bfc9550207e4ad3859b17" 124 | abi: Proxy 125 | startBlock: 16257989 126 | mapping: 127 | kind: ethereum/events 128 | apiVersion: 0.0.4 129 | language: wasm/assemblyscript 130 | file: ../src/mapping-encrypted-note.ts 131 | entities: 132 | - EncryptedNote 133 | abis: 134 | - name: Proxy 135 | file: ../abis/Proxy.json 136 | eventHandlers: 137 | - event: EncryptedNote(indexed address,bytes) 138 | handler: handleEncryptedNote 139 | -------------------------------------------------------------------------------- /subgraphs/tornado-subgraph-optimism.yaml: -------------------------------------------------------------------------------- 1 | specVersion: 0.0.2 2 | description: Proxy 3 | repository: https://github.com/tornadocash/tornado-subgraph 4 | schema: 5 | file: ../schema.graphql 6 | dataSources: 7 | - kind: ethereum/contract 8 | name: Echoer 9 | network: optimism 10 | source: 11 | address: "0xa75BF2815618872f155b7C4B0C81bF990f5245E4" 12 | abi: Echoer 13 | startBlock: 2243694 14 | mapping: 15 | kind: ethereum/events 16 | apiVersion: 0.0.4 17 | language: wasm/assemblyscript 18 | file: ../src/mapping-echo-account.ts 19 | entities: 20 | - NoteAccount 21 | abis: 22 | - name: Echoer 23 | file: ../abis/Echoer.json 24 | eventHandlers: 25 | - event: Echo(indexed address,bytes) 26 | handler: handleEcho 27 | - kind: ethereum/contract 28 | name: Instance-0.1-eth 29 | network: optimism 30 | source: 31 | address: "0x84443CFd09A48AF6eF360C6976C5392aC5023a1F" 32 | abi: Instance 33 | startBlock: 2243689 34 | mapping: 35 | kind: ethereum/events 36 | apiVersion: 0.0.4 37 | language: wasm/assemblyscript 38 | file: ../src/mapping-instance.ts 39 | entities: 40 | - Deposit 41 | - Withdrawal 42 | abis: 43 | - name: Instance 44 | file: ../abis/Instance.json 45 | eventHandlers: 46 | - event: Deposit(indexed bytes32,uint32,uint256) 47 | handler: handleDeposit 48 | - event: Withdrawal(address,bytes32,indexed address,uint256) 49 | handler: handleWithdrawal 50 | - kind: ethereum/contract 51 | name: Instance-1-eth 52 | network: optimism 53 | source: 54 | address: "0xd47438C816c9E7f2E2888E060936a499Af9582b3" 55 | abi: Instance 56 | startBlock: 2243689 57 | mapping: 58 | kind: ethereum/events 59 | apiVersion: 0.0.4 60 | language: wasm/assemblyscript 61 | file: ../src/mapping-instance.ts 62 | entities: 63 | - Deposit 64 | - Withdrawal 65 | abis: 66 | - name: Instance 67 | file: ../abis/Instance.json 68 | eventHandlers: 69 | - event: Deposit(indexed bytes32,uint32,uint256) 70 | handler: handleDeposit 71 | - event: Withdrawal(address,bytes32,indexed address,uint256) 72 | handler: handleWithdrawal 73 | - kind: ethereum/contract 74 | name: Instance-10-eth 75 | network: optimism 76 | source: 77 | address: "0x330bdFADE01eE9bF63C209Ee33102DD334618e0a" 78 | abi: Instance 79 | startBlock: 2243689 80 | mapping: 81 | kind: ethereum/events 82 | apiVersion: 0.0.4 83 | language: wasm/assemblyscript 84 | file: ../src/mapping-instance.ts 85 | entities: 86 | - Deposit 87 | - Withdrawal 88 | abis: 89 | - name: Instance 90 | file: ../abis/Instance.json 91 | eventHandlers: 92 | - event: Deposit(indexed bytes32,uint32,uint256) 93 | handler: handleDeposit 94 | - event: Withdrawal(address,bytes32,indexed address,uint256) 95 | handler: handleWithdrawal 96 | - kind: ethereum/contract 97 | name: Instance-100-eth 98 | network: optimism 99 | source: 100 | address: "0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD" 101 | abi: Instance 102 | startBlock: 2243689 103 | mapping: 104 | kind: ethereum/events 105 | apiVersion: 0.0.4 106 | language: wasm/assemblyscript 107 | file: ../src/mapping-instance.ts 108 | entities: 109 | - Deposit 110 | - Withdrawal 111 | abis: 112 | - name: Instance 113 | file: ../abis/Instance.json 114 | eventHandlers: 115 | - event: Deposit(indexed bytes32,uint32,uint256) 116 | handler: handleDeposit 117 | - event: Withdrawal(address,bytes32,indexed address,uint256) 118 | handler: handleWithdrawal 119 | - kind: ethereum/contract 120 | name: Proxy 121 | network: optimism 122 | source: 123 | address: "0x0D5550d52428E7e3175bfc9550207e4ad3859b17" 124 | abi: Proxy 125 | startBlock: 2243689 126 | mapping: 127 | kind: ethereum/events 128 | apiVersion: 0.0.4 129 | language: wasm/assemblyscript 130 | file: ../src/mapping-encrypted-note.ts 131 | entities: 132 | - EncryptedNote 133 | abis: 134 | - name: Proxy 135 | file: ../abis/Proxy.json 136 | eventHandlers: 137 | - event: EncryptedNote(indexed address,bytes) 138 | handler: handleEncryptedNote 139 | -------------------------------------------------------------------------------- /subgraphs/tornado-subgraph-xdai.yaml: -------------------------------------------------------------------------------- 1 | specVersion: 0.0.2 2 | description: Proxy 3 | repository: https://github.com/tornadocash/tornado-subgraph 4 | schema: 5 | file: ../schema.graphql 6 | dataSources: 7 | - kind: ethereum/contract 8 | name: Echoer 9 | network: xdai 10 | source: 11 | address: "0xa75BF2815618872f155b7C4B0C81bF990f5245E4" 12 | abi: Echoer 13 | startBlock: 17754564 14 | mapping: 15 | kind: ethereum/events 16 | apiVersion: 0.0.4 17 | language: wasm/assemblyscript 18 | file: ../src/mapping-echo-account.ts 19 | entities: 20 | - NoteAccount 21 | abis: 22 | - name: Echoer 23 | file: ../abis/Echoer.json 24 | eventHandlers: 25 | - event: Echo(indexed address,bytes) 26 | handler: handleEcho 27 | - kind: ethereum/contract 28 | name: Instance-100-xdai 29 | network: xdai 30 | source: 31 | address: "0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD" 32 | abi: Instance 33 | startBlock: 17754561 34 | mapping: 35 | kind: ethereum/events 36 | apiVersion: 0.0.4 37 | language: wasm/assemblyscript 38 | file: ../src/mapping-instance.ts 39 | entities: 40 | - Deposit 41 | - Withdrawal 42 | abis: 43 | - name: Instance 44 | file: ../abis/Instance.json 45 | eventHandlers: 46 | - event: Deposit(indexed bytes32,uint32,uint256) 47 | handler: handleDeposit 48 | - event: Withdrawal(address,bytes32,indexed address,uint256) 49 | handler: handleWithdrawal 50 | - kind: ethereum/contract 51 | name: Instance-1000-xdai 52 | network: xdai 53 | source: 54 | address: "0xdf231d99Ff8b6c6CBF4E9B9a945CBAcEF9339178" 55 | abi: Instance 56 | startBlock: 17754561 57 | mapping: 58 | kind: ethereum/events 59 | apiVersion: 0.0.4 60 | language: wasm/assemblyscript 61 | file: ../src/mapping-instance.ts 62 | entities: 63 | - Deposit 64 | - Withdrawal 65 | abis: 66 | - name: Instance 67 | file: ../abis/Instance.json 68 | eventHandlers: 69 | - event: Deposit(indexed bytes32,uint32,uint256) 70 | handler: handleDeposit 71 | - event: Withdrawal(address,bytes32,indexed address,uint256) 72 | handler: handleWithdrawal 73 | - kind: ethereum/contract 74 | name: Instance-10000-xdai 75 | network: xdai 76 | source: 77 | address: "0xaf4c0B70B2Ea9FB7487C7CbB37aDa259579fe040" 78 | abi: Instance 79 | startBlock: 17754561 80 | mapping: 81 | kind: ethereum/events 82 | apiVersion: 0.0.4 83 | language: wasm/assemblyscript 84 | file: ../src/mapping-instance.ts 85 | entities: 86 | - Deposit 87 | - Withdrawal 88 | abis: 89 | - name: Instance 90 | file: ../abis/Instance.json 91 | eventHandlers: 92 | - event: Deposit(indexed bytes32,uint32,uint256) 93 | handler: handleDeposit 94 | - event: Withdrawal(address,bytes32,indexed address,uint256) 95 | handler: handleWithdrawal 96 | - kind: ethereum/contract 97 | name: Instance-100000-xdai 98 | network: xdai 99 | source: 100 | address: "0xa5C2254e4253490C54cef0a4347fddb8f75A4998" 101 | abi: Instance 102 | startBlock: 17754561 103 | mapping: 104 | kind: ethereum/events 105 | apiVersion: 0.0.4 106 | language: wasm/assemblyscript 107 | file: ../src/mapping-instance.ts 108 | entities: 109 | - Deposit 110 | - Withdrawal 111 | abis: 112 | - name: Instance 113 | file: ../abis/Instance.json 114 | eventHandlers: 115 | - event: Deposit(indexed bytes32,uint32,uint256) 116 | handler: handleDeposit 117 | - event: Withdrawal(address,bytes32,indexed address,uint256) 118 | handler: handleWithdrawal 119 | - kind: ethereum/contract 120 | name: Proxy 121 | network: xdai 122 | source: 123 | address: "0x0D5550d52428E7e3175bfc9550207e4ad3859b17" 124 | abi: Proxy 125 | startBlock: 17754561 126 | mapping: 127 | kind: ethereum/events 128 | apiVersion: 0.0.4 129 | language: wasm/assemblyscript 130 | file: ../src/mapping-encrypted-note.ts 131 | entities: 132 | - EncryptedNote 133 | abis: 134 | - name: Proxy 135 | file: ../abis/Proxy.json 136 | eventHandlers: 137 | - event: EncryptedNote(indexed address,bytes) 138 | handler: handleEncryptedNote 139 | --------------------------------------------------------------------------------