From 924ede1532129e2c0f82dc82b57a7f008a72d515 Mon Sep 17 00:00:00 2001 From: Danil Kovtonyuk Date: Wed, 25 Aug 2021 22:47:27 +1000 Subject: [PATCH] fix: xDai contracts --- mustache/templates/echoer/contracts.js | 4 +- mustache/templates/instance/contracts.js | 28 ++++++++- mustache/templates/proxy/contracts.js | 2 +- src/contractsToInstances.ts | 11 +++- subgraphs/tornado-subgraph-xdai.yaml | 77 ++++++++++++++++++++++-- 5 files changed, 112 insertions(+), 10 deletions(-) diff --git a/mustache/templates/echoer/contracts.js b/mustache/templates/echoer/contracts.js index bef7a9e..c70d175 100644 --- a/mustache/templates/echoer/contracts.js +++ b/mustache/templates/echoer/contracts.js @@ -6,10 +6,10 @@ const contracts = [ address: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4', }, { - prod: 17626717, + prod: 17754564, network: 'xdai', name: 'Echoer', - address: '0xEd2B6bf192cFAb45810FC06c5E44e4Df48Eef47d', + address: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4', }, { prod: 16257996, diff --git a/mustache/templates/instance/contracts.js b/mustache/templates/instance/contracts.js index ab04753..9bb3fe9 100644 --- a/mustache/templates/instance/contracts.js +++ b/mustache/templates/instance/contracts.js @@ -2,7 +2,7 @@ const deployedBlocks = { goerli: 3781595, mainnet: 9116966, matic: 16257962, - xdai: 17626717, + xdai: 17754561, bsc: 8159290, }; @@ -45,7 +45,31 @@ const contracts = [ network: 'xdai', currency: 'xdai', name: 'Instance', - address: '0x980C75f9b2A62d1206C2C146aE4aa1a19E4A21C0', + address: '0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD', + }, + { + prod: deployedBlocks.xdai, + amount: '1000', + network: 'xdai', + currency: 'xdai', + name: 'Instance', + address: '0xdf231d99Ff8b6c6CBF4E9B9a945CBAcEF9339178', + }, + { + prod: deployedBlocks.xdai, + amount: '10000', + network: 'xdai', + currency: 'xdai', + name: 'Instance', + address: '0xaf4c0B70B2Ea9FB7487C7CbB37aDa259579fe040', + }, + { + prod: deployedBlocks.xdai, + amount: '100000', + network: 'xdai', + currency: 'xdai', + name: 'Instance', + address: '0xa5C2254e4253490C54cef0a4347fddb8f75A4998', }, { prod: deployedBlocks.matic, diff --git a/mustache/templates/proxy/contracts.js b/mustache/templates/proxy/contracts.js index 874f92d..6c18df1 100644 --- a/mustache/templates/proxy/contracts.js +++ b/mustache/templates/proxy/contracts.js @@ -9,7 +9,7 @@ const contracts = [ prod: 17626717, name: 'Proxy', network: 'xdai', - address: '0xa77350E1a72bE5bC7634d359C5011b4E359f4320', + address: '0x0D5550d52428E7e3175bfc9550207e4ad3859b17', }, { prod: 16257989, diff --git a/src/contractsToInstances.ts b/src/contractsToInstances.ts index 944ab55..0760204 100644 --- a/src/contractsToInstances.ts +++ b/src/contractsToInstances.ts @@ -12,9 +12,18 @@ contractsToInstances.set("0x330bdfade01ee9bf63c209ee33102dd334618e0a", // Inst contractsToInstances.set("0x1e34a77868e19a6647b1f2f47b51ed72dede95dd", // Instance-bnb-100   "bnb-100" ); -contractsToInstances.set("0x980c75f9b2a62d1206c2c146ae4aa1a19e4a21c0", // Instance-xdai-100 +contractsToInstances.set("0x1e34a77868e19a6647b1f2f47b51ed72dede95dd", // Instance-xdai-100   "xdai-100" ); +contractsToInstances.set("0xdf231d99ff8b6c6cbf4e9b9a945cbacef9339178", // Instance-xdai-1000 +  "xdai-1000" +); +contractsToInstances.set("0xaf4c0b70b2ea9fb7487c7cbb37ada259579fe040", // Instance-xdai-10000 +  "xdai-10000" +); +contractsToInstances.set("0xa5c2254e4253490c54cef0a4347fddb8f75a4998", // Instance-xdai-100000 +  "xdai-100000" +); contractsToInstances.set("0x1e34a77868e19a6647b1f2f47b51ed72dede95dd", // Instance-matic-100   "matic-100" ); diff --git a/subgraphs/tornado-subgraph-xdai.yaml b/subgraphs/tornado-subgraph-xdai.yaml index ba84cf6..a364012 100644 --- a/subgraphs/tornado-subgraph-xdai.yaml +++ b/subgraphs/tornado-subgraph-xdai.yaml @@ -8,9 +8,9 @@ name: Echoer network: xdai source: - address: "0xEd2B6bf192cFAb45810FC06c5E44e4Df48Eef47d" + address: "0xa75BF2815618872f155b7C4B0C81bF990f5245E4" abi: Echoer - startBlock: 17626717 + startBlock: 17754564 mapping: kind: ethereum/events apiVersion: 0.0.4 @@ -28,9 +28,78 @@ name: Instance-100-xdai network: xdai source: - address: "0x980C75f9b2A62d1206C2C146aE4aa1a19E4A21C0" + address: "0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD" abi: Instance - startBlock: 17626717 + startBlock: 17754561 + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + file: ../src/mapping-instance.ts + entities: + - Deposit + - Withdrawal + abis: + - name: Instance + file: ../abis/Instance.json + eventHandlers: + - event: Deposit(indexed bytes32,uint32,uint256) + handler: handleDeposit + - event: Withdrawal(address,bytes32,indexed address,uint256) + handler: handleWithdrawal + - kind: ethereum/contract + name: Instance-1000-xdai + network: xdai + source: + address: "0xdf231d99Ff8b6c6CBF4E9B9a945CBAcEF9339178" + abi: Instance + startBlock: 17754561 + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + file: ../src/mapping-instance.ts + entities: + - Deposit + - Withdrawal + abis: + - name: Instance + file: ../abis/Instance.json + eventHandlers: + - event: Deposit(indexed bytes32,uint32,uint256) + handler: handleDeposit + - event: Withdrawal(address,bytes32,indexed address,uint256) + handler: handleWithdrawal + - kind: ethereum/contract + name: Instance-10000-xdai + network: xdai + source: + address: "0xaf4c0B70B2Ea9FB7487C7CbB37aDa259579fe040" + abi: Instance + startBlock: 17754561 + mapping: + kind: ethereum/events + apiVersion: 0.0.4 + language: wasm/assemblyscript + file: ../src/mapping-instance.ts + entities: + - Deposit + - Withdrawal + abis: + - name: Instance + file: ../abis/Instance.json + eventHandlers: + - event: Deposit(indexed bytes32,uint32,uint256) + handler: handleDeposit + - event: Withdrawal(address,bytes32,indexed address,uint256) + handler: handleWithdrawal + - kind: ethereum/contract + name: Instance-100000-xdai + network: xdai + source: + address: "0xa5C2254e4253490C54cef0a4347fddb8f75A4998" + abi: Instance + startBlock: 17754561 mapping: kind: ethereum/events apiVersion: 0.0.4