mirror of
https://github.com/tornadocash/tornado-subgraph.git
synced 2024-12-23 01:39:39 +01:00
feat: add Arbitrum
This commit is contained in:
parent
a346957d51
commit
a2d667b7bd
@ -35,6 +35,12 @@ const contracts = [
|
|||||||
name: 'Echoer',
|
name: 'Echoer',
|
||||||
address: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4',
|
address: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prod: 3430605,
|
||||||
|
network: 'arbitrum-one',
|
||||||
|
name: 'Echoer',
|
||||||
|
address: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4',
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
module.exports = contracts;
|
module.exports = contracts;
|
||||||
|
@ -4,6 +4,7 @@ const deployedBlocks = {
|
|||||||
matic: 16257962,
|
matic: 16257962,
|
||||||
goerli: 3781595,
|
goerli: 3781595,
|
||||||
mainnet: 9116966,
|
mainnet: 9116966,
|
||||||
|
arbitrum: 3430648,
|
||||||
avalanche: 4429818,
|
avalanche: 4429818,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -432,6 +433,38 @@ const contracts = [
|
|||||||
name: 'Instance',
|
name: 'Instance',
|
||||||
address: '0xaf8d1839c3c67cf571aa74B5c12398d4901147B3',
|
address: '0xaf8d1839c3c67cf571aa74B5c12398d4901147B3',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prod: deployedBlocks.arbitrum,
|
||||||
|
amount: '0.1',
|
||||||
|
network: 'arbitrum-one',
|
||||||
|
currency: 'eth',
|
||||||
|
name: 'Instance',
|
||||||
|
address: '0x84443CFd09A48AF6eF360C6976C5392aC5023a1F',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prod: deployedBlocks.arbitrum,
|
||||||
|
amount: '1',
|
||||||
|
network: 'arbitrum-one',
|
||||||
|
currency: 'eth',
|
||||||
|
name: 'Instance',
|
||||||
|
address: '0xd47438C816c9E7f2E2888E060936a499Af9582b3',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prod: deployedBlocks.arbitrum,
|
||||||
|
amount: '10',
|
||||||
|
network: 'arbitrum-one',
|
||||||
|
currency: 'eth',
|
||||||
|
name: 'Instance',
|
||||||
|
address: '0x330bdFADE01eE9bF63C209Ee33102DD334618e0a',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prod: deployedBlocks.arbitrum,
|
||||||
|
amount: '100',
|
||||||
|
network: 'arbitrum-one',
|
||||||
|
currency: 'eth',
|
||||||
|
name: 'Instance',
|
||||||
|
address: '0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD',
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
module.exports = contracts;
|
module.exports = contracts;
|
||||||
|
@ -35,6 +35,12 @@ const contracts = [
|
|||||||
network: 'avalanche',
|
network: 'avalanche',
|
||||||
address: '0x0D5550d52428E7e3175bfc9550207e4ad3859b17',
|
address: '0x0D5550d52428E7e3175bfc9550207e4ad3859b17',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prod: 3430648,
|
||||||
|
name: 'Proxy',
|
||||||
|
network: 'arbitrum-one',
|
||||||
|
address: '0x0D5550d52428E7e3175bfc9550207e4ad3859b17',
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
module.exports = contracts;
|
module.exports = contracts;
|
||||||
|
@ -9,12 +9,14 @@
|
|||||||
"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",
|
||||||
"generate-avalanche": "yarn codegen:tornado-avalanche && yarn build:tornado-avalanche",
|
"generate-avalanche": "yarn codegen:tornado-avalanche && yarn build:tornado-avalanche",
|
||||||
|
"generate-arbitrum": "yarn codegen:tornado-arbitrum && yarn build:tornado-arbitrum",
|
||||||
"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-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",
|
||||||
"yaml:tornado-avalanche": "node ./create-yaml-file create-yaml -e avalanche | mustache - mustache/yaml.mustache > subgraphs/tornado-subgraph-avalanche.yaml",
|
"yaml:tornado-avalanche": "node ./create-yaml-file create-yaml -e avalanche | mustache - mustache/yaml.mustache > subgraphs/tornado-subgraph-avalanche.yaml",
|
||||||
|
"yaml:tornado-arbitrum": "node ./create-yaml-file create-yaml -e arbitrum-one | mustache - mustache/yaml.mustache > subgraphs/tornado-subgraph-arbitrum.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-xdai": "yarn yaml:tornado-xdai && yarn codegen -- subgraphs/tornado-subgraph-xdai.yaml",
|
||||||
@ -22,6 +24,7 @@
|
|||||||
"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",
|
||||||
"codegen:tornado-avalanche": "yarn yaml:tornado-avalanche && yarn codegen -- subgraphs/tornado-subgraph-avalanche.yaml",
|
"codegen:tornado-avalanche": "yarn yaml:tornado-avalanche && yarn codegen -- subgraphs/tornado-subgraph-avalanche.yaml",
|
||||||
|
"codegen:tornado-arbitrum": "yarn yaml:tornado-arbitrum && yarn codegen -- subgraphs/tornado-subgraph-arbitrum.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-xdai": "graph build subgraphs/tornado-subgraph-xdai.yaml",
|
||||||
@ -29,13 +32,15 @@
|
|||||||
"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",
|
||||||
"build:tornado-avalanche": "graph build subgraphs/tornado-subgraph-avalanche.yaml",
|
"build:tornado-avalanche": "graph build subgraphs/tornado-subgraph-avalanche.yaml",
|
||||||
|
"build:tornado-arbitrum": "graph build subgraphs/tornado-subgraph-arbitrum.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-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",
|
||||||
"deploy:tornado-avalanche": "yarn deploy -- tornadocash/avalanche-tornado-subgraph subgraphs/tornado-subgraph-avalanche.yaml"
|
"deploy:tornado-avalanche": "yarn deploy -- tornadocash/avalanche-tornado-subgraph subgraphs/tornado-subgraph-avalanche.yaml",
|
||||||
|
"deploy:tornado-arbitrum": "yarn deploy -- tornadocash/arbitrum-tornado-subgraph subgraphs/tornado-subgraph-arbitrum.yaml"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@graphprotocol/graph-cli": "0.20.0",
|
"@graphprotocol/graph-cli": "0.20.0",
|
||||||
|
@ -159,4 +159,16 @@ contractsToInstances.set("0x1e34a77868e19a6647b1f2f47b51ed72dede95dd", // Inst
|
|||||||
contractsToInstances.set("0xaf8d1839c3c67cf571aa74b5c12398d4901147b3", // Instance-avax-500
|
contractsToInstances.set("0xaf8d1839c3c67cf571aa74b5c12398d4901147b3", // Instance-avax-500
|
||||||
"avax-500"
|
"avax-500"
|
||||||
);
|
);
|
||||||
|
contractsToInstances.set("0x84443cfd09a48af6ef360c6976c5392ac5023a1f", // Instance-eth-0.1
|
||||||
|
"eth-0.1"
|
||||||
|
);
|
||||||
|
contractsToInstances.set("0xd47438c816c9e7f2e2888e060936a499af9582b3", // Instance-eth-1
|
||||||
|
"eth-1"
|
||||||
|
);
|
||||||
|
contractsToInstances.set("0x330bdfade01ee9bf63c209ee33102dd334618e0a", // Instance-eth-10
|
||||||
|
"eth-10"
|
||||||
|
);
|
||||||
|
contractsToInstances.set("0x1e34a77868e19a6647b1f2f47b51ed72dede95dd", // Instance-eth-100
|
||||||
|
"eth-100"
|
||||||
|
);
|
||||||
// this is a read only file generated by manual inputs to file mustache/templates/rates/contracts.js.
|
// this is a read only file generated by manual inputs to file mustache/templates/rates/contracts.js.
|
||||||
|
138
subgraphs/tornado-subgraph-arbitrum.yaml
Normal file
138
subgraphs/tornado-subgraph-arbitrum.yaml
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
specVersion: 0.0.2
|
||||||
|
description: Proxy
|
||||||
|
repository: https://github.com/tornadocash/tornado-subgraph
|
||||||
|
schema:
|
||||||
|
file: ../schema.graphql
|
||||||
|
dataSources:
|
||||||
|
- kind: ethereum/contract
|
||||||
|
name: Echoer
|
||||||
|
network: arbitrum-one
|
||||||
|
source:
|
||||||
|
address: "0xa75BF2815618872f155b7C4B0C81bF990f5245E4"
|
||||||
|
abi: Echoer
|
||||||
|
startBlock: 3430605
|
||||||
|
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-0.1-eth
|
||||||
|
network: arbitrum-one
|
||||||
|
source:
|
||||||
|
address: "0x84443CFd09A48AF6eF360C6976C5392aC5023a1F"
|
||||||
|
abi: Instance
|
||||||
|
startBlock: 3430648
|
||||||
|
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-1-eth
|
||||||
|
network: arbitrum-one
|
||||||
|
source:
|
||||||
|
address: "0xd47438C816c9E7f2E2888E060936a499Af9582b3"
|
||||||
|
abi: Instance
|
||||||
|
startBlock: 3430648
|
||||||
|
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-10-eth
|
||||||
|
network: arbitrum-one
|
||||||
|
source:
|
||||||
|
address: "0x330bdFADE01eE9bF63C209Ee33102DD334618e0a"
|
||||||
|
abi: Instance
|
||||||
|
startBlock: 3430648
|
||||||
|
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-100-eth
|
||||||
|
network: arbitrum-one
|
||||||
|
source:
|
||||||
|
address: "0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD"
|
||||||
|
abi: Instance
|
||||||
|
startBlock: 3430648
|
||||||
|
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: arbitrum-one
|
||||||
|
source:
|
||||||
|
address: "0x0D5550d52428E7e3175bfc9550207e4ad3859b17"
|
||||||
|
abi: Proxy
|
||||||
|
startBlock: 3430648
|
||||||
|
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