feat: add xDai
This commit is contained in:
parent
30f2b64af0
commit
23f85d7ea1
@ -5,6 +5,12 @@ const contracts = [
|
|||||||
name: 'Echoer',
|
name: 'Echoer',
|
||||||
address: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4',
|
address: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prod: 17626717,
|
||||||
|
network: 'xdai',
|
||||||
|
name: 'Echoer',
|
||||||
|
address: '0xEd2B6bf192cFAb45810FC06c5E44e4Df48Eef47d',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prod: 16257996,
|
prod: 16257996,
|
||||||
network: 'matic',
|
network: 'matic',
|
||||||
|
@ -2,6 +2,7 @@ const deployedBlocks = {
|
|||||||
goerli: 3781595,
|
goerli: 3781595,
|
||||||
mainnet: 9116966,
|
mainnet: 9116966,
|
||||||
matic: 16257962,
|
matic: 16257962,
|
||||||
|
xdai: 17626717,
|
||||||
bsc: 8159290,
|
bsc: 8159290,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -38,6 +39,14 @@ const contracts = [
|
|||||||
name: 'Instance',
|
name: 'Instance',
|
||||||
address: '0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD',
|
address: '0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prod: deployedBlocks.xdai,
|
||||||
|
amount: '100',
|
||||||
|
network: 'xdai',
|
||||||
|
currency: 'xdai',
|
||||||
|
name: 'Instance',
|
||||||
|
address: '0x980C75f9b2A62d1206C2C146aE4aa1a19E4A21C0',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prod: deployedBlocks.matic,
|
prod: deployedBlocks.matic,
|
||||||
amount: '100',
|
amount: '100',
|
||||||
|
@ -5,6 +5,12 @@ const contracts = [
|
|||||||
network: 'bsc',
|
network: 'bsc',
|
||||||
address: '0x0D5550d52428E7e3175bfc9550207e4ad3859b17',
|
address: '0x0D5550d52428E7e3175bfc9550207e4ad3859b17',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prod: 17626717,
|
||||||
|
name: 'Proxy',
|
||||||
|
network: 'xdai',
|
||||||
|
address: '0xa77350E1a72bE5bC7634d359C5011b4E359f4320',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prod: 16257989,
|
prod: 16257989,
|
||||||
name: 'Proxy',
|
name: 'Proxy',
|
||||||
|
@ -4,25 +4,30 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"generate-bsc": "yarn codegen:tornado-bsc && yarn build:tornado-bsc",
|
"generate-bsc": "yarn codegen:tornado-bsc && yarn build:tornado-bsc",
|
||||||
|
"generate-xdai": "yarn codegen:tornado-xdai && yarn build:tornado-xdai",
|
||||||
"generate-matic": "yarn codegen:tornado-matic && yarn build:tornado-matic",
|
"generate-matic": "yarn codegen:tornado-matic && yarn build:tornado-matic",
|
||||||
"generate-mainnet": "yarn codegen:tornado-mainnet && yarn build:tornado-mainnet",
|
"generate-mainnet": "yarn codegen:tornado-mainnet && yarn build:tornado-mainnet",
|
||||||
"generate-goerli": "yarn codegen:tornado-goerli && yarn build:tornado-goerli",
|
"generate-goerli": "yarn codegen:tornado-goerli && yarn build:tornado-goerli",
|
||||||
"yaml:tornado-bsc": "node ./create-yaml-file create-yaml -e bsc | mustache - mustache/yaml.mustache > subgraphs/tornado-subgraph-bsc.yaml",
|
"yaml:tornado-bsc": "node ./create-yaml-file create-yaml -e bsc | mustache - mustache/yaml.mustache > subgraphs/tornado-subgraph-bsc.yaml",
|
||||||
|
"yaml:tornado-xdai": "node ./create-yaml-file create-yaml -e xdai | mustache - mustache/yaml.mustache > subgraphs/tornado-subgraph-xdai.yaml",
|
||||||
"yaml:tornado-matic": "node ./create-yaml-file create-yaml -e matic | mustache - mustache/yaml.mustache > subgraphs/tornado-subgraph-matic.yaml",
|
"yaml:tornado-matic": "node ./create-yaml-file create-yaml -e matic | mustache - mustache/yaml.mustache > subgraphs/tornado-subgraph-matic.yaml",
|
||||||
"yaml:tornado-mainnet": "node ./create-yaml-file create-yaml -e mainnet | mustache - mustache/yaml.mustache > subgraphs/tornado-subgraph-mainnet.yaml",
|
"yaml:tornado-mainnet": "node ./create-yaml-file create-yaml -e mainnet | mustache - mustache/yaml.mustache > subgraphs/tornado-subgraph-mainnet.yaml",
|
||||||
"yaml:tornado-goerli": "node ./create-yaml-file create-yaml -e goerli | mustache - mustache/yaml.mustache > subgraphs/tornado-subgraph-goerli.yaml",
|
"yaml:tornado-goerli": "node ./create-yaml-file create-yaml -e goerli | mustache - mustache/yaml.mustache > subgraphs/tornado-subgraph-goerli.yaml",
|
||||||
"codegen": "graph codegen",
|
"codegen": "graph codegen",
|
||||||
"codegen:tornado-bsc": "yarn yaml:tornado-bsc && yarn codegen -- subgraphs/tornado-subgraph-bsc.yaml",
|
"codegen:tornado-bsc": "yarn yaml:tornado-bsc && yarn codegen -- subgraphs/tornado-subgraph-bsc.yaml",
|
||||||
|
"codegen:tornado-xdai": "yarn yaml:tornado-xdai && yarn codegen -- subgraphs/tornado-subgraph-xdai.yaml",
|
||||||
"codegen:tornado-matic": "yarn yaml:tornado-matic && yarn codegen -- subgraphs/tornado-subgraph-matic.yaml",
|
"codegen:tornado-matic": "yarn yaml:tornado-matic && yarn codegen -- subgraphs/tornado-subgraph-matic.yaml",
|
||||||
"codegen:tornado-mainnet": "yarn yaml:tornado-mainnet && yarn codegen -- subgraphs/tornado-subgraph-mainnet.yaml",
|
"codegen:tornado-mainnet": "yarn yaml:tornado-mainnet && yarn codegen -- subgraphs/tornado-subgraph-mainnet.yaml",
|
||||||
"codegen:tornado-goerli": "yarn yaml:tornado-goerli && yarn codegen -- subgraphs/tornado-subgraph-goerli.yaml",
|
"codegen:tornado-goerli": "yarn yaml:tornado-goerli && yarn codegen -- subgraphs/tornado-subgraph-goerli.yaml",
|
||||||
"build": "graph build",
|
"build": "graph build",
|
||||||
"build:tornado-bsc": "graph build subgraphs/tornado-subgraph-bsc.yaml",
|
"build:tornado-bsc": "graph build subgraphs/tornado-subgraph-bsc.yaml",
|
||||||
|
"build:tornado-xdai": "graph build subgraphs/tornado-subgraph-xdai.yaml",
|
||||||
"build:tornado-matic": "graph build subgraphs/tornado-subgraph-matic.yaml",
|
"build:tornado-matic": "graph build subgraphs/tornado-subgraph-matic.yaml",
|
||||||
"build:tornado-mainnet": "graph build subgraphs/tornado-subgraph-mainnet.yaml",
|
"build:tornado-mainnet": "graph build subgraphs/tornado-subgraph-mainnet.yaml",
|
||||||
"build:tornado-goerli": "graph build subgraphs/tornado-subgraph-goerli.yaml",
|
"build:tornado-goerli": "graph build subgraphs/tornado-subgraph-goerli.yaml",
|
||||||
"deploy": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token $TOKEN",
|
"deploy": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token $TOKEN",
|
||||||
"deploy:tornado-bsc": "yarn deploy -- tornadocash/bsc-tornado-subgraph subgraphs/tornado-subgraph-bsc.yaml",
|
"deploy:tornado-bsc": "yarn deploy -- tornadocash/bsc-tornado-subgraph subgraphs/tornado-subgraph-bsc.yaml",
|
||||||
|
"deploy:tornado-xdai": "yarn deploy -- tornadocash/xdai-tornado-subgraph subgraphs/tornado-subgraph-xdai.yaml",
|
||||||
"deploy:tornado-matic": "yarn deploy -- tornadocash/matic-tornado-subgraph subgraphs/tornado-subgraph-matic.yaml",
|
"deploy:tornado-matic": "yarn deploy -- tornadocash/matic-tornado-subgraph subgraphs/tornado-subgraph-matic.yaml",
|
||||||
"deploy:tornado-mainnet": "yarn deploy -- tornadocash/mainnet-tornado-subgraph subgraphs/tornado-subgraph-mainnet.yaml",
|
"deploy:tornado-mainnet": "yarn deploy -- tornadocash/mainnet-tornado-subgraph subgraphs/tornado-subgraph-mainnet.yaml",
|
||||||
"deploy:tornado-goerli": "yarn deploy -- tornadocash/goerli-tornado-subgraph subgraphs/tornado-subgraph-goerli.yaml"
|
"deploy:tornado-goerli": "yarn deploy -- tornadocash/goerli-tornado-subgraph subgraphs/tornado-subgraph-goerli.yaml"
|
||||||
|
@ -12,6 +12,9 @@ contractsToInstances.set("0x330bdfade01ee9bf63c209ee33102dd334618e0a", // Inst
|
|||||||
contractsToInstances.set("0x1e34a77868e19a6647b1f2f47b51ed72dede95dd", // Instance-bnb-100
|
contractsToInstances.set("0x1e34a77868e19a6647b1f2f47b51ed72dede95dd", // Instance-bnb-100
|
||||||
"bnb-100"
|
"bnb-100"
|
||||||
);
|
);
|
||||||
|
contractsToInstances.set("0x980c75f9b2a62d1206c2c146ae4aa1a19e4a21c0", // Instance-xdai-100
|
||||||
|
"xdai-100"
|
||||||
|
);
|
||||||
contractsToInstances.set("0x1e34a77868e19a6647b1f2f47b51ed72dede95dd", // Instance-matic-100
|
contractsToInstances.set("0x1e34a77868e19a6647b1f2f47b51ed72dede95dd", // Instance-matic-100
|
||||||
"matic-100"
|
"matic-100"
|
||||||
);
|
);
|
||||||
|
69
subgraphs/tornado-subgraph-xdai.yaml
Normal file
69
subgraphs/tornado-subgraph-xdai.yaml
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
specVersion: 0.0.2
|
||||||
|
description: Proxy
|
||||||
|
repository: https://github.com/tornadocash/tornado-subgraph
|
||||||
|
schema:
|
||||||
|
file: ../schema.graphql
|
||||||
|
dataSources:
|
||||||
|
- kind: ethereum/contract
|
||||||
|
name: Echoer
|
||||||
|
network: xdai
|
||||||
|
source:
|
||||||
|
address: "0xEd2B6bf192cFAb45810FC06c5E44e4Df48Eef47d"
|
||||||
|
abi: Echoer
|
||||||
|
startBlock: 17626717
|
||||||
|
mapping:
|
||||||
|
kind: ethereum/events
|
||||||
|
apiVersion: 0.0.4
|
||||||
|
language: wasm/assemblyscript
|
||||||
|
file: ../src/mapping-echo-account.ts
|
||||||
|
entities:
|
||||||
|
- NoteAccount
|
||||||
|
abis:
|
||||||
|
- name: Echoer
|
||||||
|
file: ../abis/Echoer.json
|
||||||
|
eventHandlers:
|
||||||
|
- event: Echo(indexed address,bytes)
|
||||||
|
handler: handleEcho
|
||||||
|
- kind: ethereum/contract
|
||||||
|
name: Instance-100-xdai
|
||||||
|
network: xdai
|
||||||
|
source:
|
||||||
|
address: "0x980C75f9b2A62d1206C2C146aE4aa1a19E4A21C0"
|
||||||
|
abi: Instance
|
||||||
|
startBlock: 17626717
|
||||||
|
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: Proxy
|
||||||
|
network: xdai
|
||||||
|
source:
|
||||||
|
address: "0xa77350E1a72bE5bC7634d359C5011b4E359f4320"
|
||||||
|
abi: Proxy
|
||||||
|
startBlock: 17626717
|
||||||
|
mapping:
|
||||||
|
kind: ethereum/events
|
||||||
|
apiVersion: 0.0.4
|
||||||
|
language: wasm/assemblyscript
|
||||||
|
file: ../src/mapping-encrypted-note.ts
|
||||||
|
entities:
|
||||||
|
- EncryptedNote
|
||||||
|
abis:
|
||||||
|
- name: Proxy
|
||||||
|
file: ../abis/Proxy.json
|
||||||
|
eventHandlers:
|
||||||
|
- event: EncryptedNote(indexed address,bytes)
|
||||||
|
handler: handleEncryptedNote
|
Loading…
Reference in New Issue
Block a user