feat: add Optimism
This commit is contained in:
parent
a2d667b7bd
commit
6d402f57df
@ -41,6 +41,12 @@ const contracts = [
|
|||||||
name: 'Echoer',
|
name: 'Echoer',
|
||||||
address: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4',
|
address: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prod: 2243694,
|
||||||
|
network: 'optimism',
|
||||||
|
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,
|
||||||
|
optimism: 2243689,
|
||||||
arbitrum: 3430648,
|
arbitrum: 3430648,
|
||||||
avalanche: 4429818,
|
avalanche: 4429818,
|
||||||
};
|
};
|
||||||
@ -465,6 +466,38 @@ const contracts = [
|
|||||||
name: 'Instance',
|
name: 'Instance',
|
||||||
address: '0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD',
|
address: '0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prod: deployedBlocks.optimism,
|
||||||
|
amount: '0.1',
|
||||||
|
network: 'optimism',
|
||||||
|
currency: 'eth',
|
||||||
|
name: 'Instance',
|
||||||
|
address: '0x84443CFd09A48AF6eF360C6976C5392aC5023a1F',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prod: deployedBlocks.optimism,
|
||||||
|
amount: '1',
|
||||||
|
network: 'optimism',
|
||||||
|
currency: 'eth',
|
||||||
|
name: 'Instance',
|
||||||
|
address: '0xd47438C816c9E7f2E2888E060936a499Af9582b3',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prod: deployedBlocks.optimism,
|
||||||
|
amount: '10',
|
||||||
|
network: 'optimism',
|
||||||
|
currency: 'eth',
|
||||||
|
name: 'Instance',
|
||||||
|
address: '0x330bdFADE01eE9bF63C209Ee33102DD334618e0a',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prod: deployedBlocks.optimism,
|
||||||
|
amount: '100',
|
||||||
|
network: 'optimism',
|
||||||
|
currency: 'eth',
|
||||||
|
name: 'Instance',
|
||||||
|
address: '0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD',
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
module.exports = contracts;
|
module.exports = contracts;
|
||||||
|
@ -41,6 +41,12 @@ const contracts = [
|
|||||||
network: 'arbitrum-one',
|
network: 'arbitrum-one',
|
||||||
address: '0x0D5550d52428E7e3175bfc9550207e4ad3859b17',
|
address: '0x0D5550d52428E7e3175bfc9550207e4ad3859b17',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prod: 2243689,
|
||||||
|
name: 'Proxy',
|
||||||
|
network: 'optimism',
|
||||||
|
address: '0x0D5550d52428E7e3175bfc9550207e4ad3859b17',
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
module.exports = contracts;
|
module.exports = contracts;
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
"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",
|
"generate-arbitrum": "yarn codegen:tornado-arbitrum && yarn build:tornado-arbitrum",
|
||||||
|
"generate-optimism": "yarn codegen:tornado-optimism && yarn build:tornado-optimism",
|
||||||
"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",
|
||||||
@ -17,6 +18,7 @@
|
|||||||
"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",
|
"yaml:tornado-arbitrum": "node ./create-yaml-file create-yaml -e arbitrum-one | mustache - mustache/yaml.mustache > subgraphs/tornado-subgraph-arbitrum.yaml",
|
||||||
|
"yaml:tornado-optimism": "node ./create-yaml-file create-yaml -e optimism | mustache - mustache/yaml.mustache > subgraphs/tornado-subgraph-optimism.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",
|
||||||
@ -25,6 +27,7 @@
|
|||||||
"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",
|
"codegen:tornado-arbitrum": "yarn yaml:tornado-arbitrum && yarn codegen -- subgraphs/tornado-subgraph-arbitrum.yaml",
|
||||||
|
"codegen:tornado-optimism": "yarn yaml:tornado-optimism && yarn codegen -- subgraphs/tornado-subgraph-optimism.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",
|
||||||
@ -33,6 +36,7 @@
|
|||||||
"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",
|
"build:tornado-arbitrum": "graph build subgraphs/tornado-subgraph-arbitrum.yaml",
|
||||||
|
"build:tornado-optimism": "graph build subgraphs/tornado-subgraph-optimism.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",
|
||||||
@ -40,7 +44,8 @@
|
|||||||
"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"
|
"deploy:tornado-arbitrum": "yarn deploy -- tornadocash/arbitrum-tornado-subgraph subgraphs/tornado-subgraph-arbitrum.yaml",
|
||||||
|
"deploy:tornado-optimism": "yarn deploy -- tornadocash/optimism-tornado-subgraph subgraphs/tornado-subgraph-optimism.yaml"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@graphprotocol/graph-cli": "0.20.0",
|
"@graphprotocol/graph-cli": "0.20.0",
|
||||||
|
@ -171,4 +171,16 @@ contractsToInstances.set("0x330bdfade01ee9bf63c209ee33102dd334618e0a", // Inst
|
|||||||
contractsToInstances.set("0x1e34a77868e19a6647b1f2f47b51ed72dede95dd", // Instance-eth-100
|
contractsToInstances.set("0x1e34a77868e19a6647b1f2f47b51ed72dede95dd", // Instance-eth-100
|
||||||
"eth-100"
|
"eth-100"
|
||||||
);
|
);
|
||||||
|
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-optimism.yaml
Normal file
138
subgraphs/tornado-subgraph-optimism.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: optimism
|
||||||
|
source:
|
||||||
|
address: "0xa75BF2815618872f155b7C4B0C81bF990f5245E4"
|
||||||
|
abi: Echoer
|
||||||
|
startBlock: 2243694
|
||||||
|
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: optimism
|
||||||
|
source:
|
||||||
|
address: "0x84443CFd09A48AF6eF360C6976C5392aC5023a1F"
|
||||||
|
abi: Instance
|
||||||
|
startBlock: 2243689
|
||||||
|
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: optimism
|
||||||
|
source:
|
||||||
|
address: "0xd47438C816c9E7f2E2888E060936a499Af9582b3"
|
||||||
|
abi: Instance
|
||||||
|
startBlock: 2243689
|
||||||
|
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: optimism
|
||||||
|
source:
|
||||||
|
address: "0x330bdFADE01eE9bF63C209Ee33102DD334618e0a"
|
||||||
|
abi: Instance
|
||||||
|
startBlock: 2243689
|
||||||
|
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: optimism
|
||||||
|
source:
|
||||||
|
address: "0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD"
|
||||||
|
abi: Instance
|
||||||
|
startBlock: 2243689
|
||||||
|
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: optimism
|
||||||
|
source:
|
||||||
|
address: "0x0D5550d52428E7e3175bfc9550207e4ad3859b17"
|
||||||
|
abi: Proxy
|
||||||
|
startBlock: 2243689
|
||||||
|
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