diff --git a/.idea/.gitignore b/.idea/.gitignore
deleted file mode 100644
index b58b603..0000000
--- a/.idea/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
-# Editor-based HTTP Client requests
-/httpRequests/
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 314b3fc..0000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/tornado-subgraph.iml b/.idea/tornado-subgraph.iml
deleted file mode 100644
index 10840bb..0000000
--- a/.idea/tornado-subgraph.iml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 94a25f7..0000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/build/Echoer/Echoer.wasm b/build/Echoer/Echoer.wasm
deleted file mode 100644
index 50619a5..0000000
Binary files a/build/Echoer/Echoer.wasm and /dev/null differ
diff --git a/build/Echoer/abis/Echoer.json b/build/Echoer/abis/Echoer.json
deleted file mode 100644
index e5c4f42..0000000
--- a/build/Echoer/abis/Echoer.json
+++ /dev/null
@@ -1,21 +0,0 @@
-[
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "who",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "bytes",
- "name": "data",
- "type": "bytes"
- }
- ],
- "name": "Echo",
- "type": "event"
- }
-]
\ No newline at end of file
diff --git a/build/Instance/Instance.wasm b/build/Instance/Instance.wasm
deleted file mode 100644
index bc17bcc..0000000
Binary files a/build/Instance/Instance.wasm and /dev/null differ
diff --git a/build/Instance/abis/Instance.json b/build/Instance/abis/Instance.json
deleted file mode 100644
index f508cae..0000000
--- a/build/Instance/abis/Instance.json
+++ /dev/null
@@ -1,58 +0,0 @@
-[
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "bytes32",
- "name": "commitment",
- "type": "bytes32"
- },
- {
- "indexed": false,
- "internalType": "uint32",
- "name": "leafIndex",
- "type": "uint32"
- },
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "timestamp",
- "type": "uint256"
- }
- ],
- "name": "Deposit",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": false,
- "internalType": "address",
- "name": "to",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "bytes32",
- "name": "nullifierHash",
- "type": "bytes32"
- },
- {
- "indexed": true,
- "internalType": "address",
- "name": "relayer",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "fee",
- "type": "uint256"
- }
- ],
- "name": "Withdrawal",
- "type": "event"
- }
-]
\ No newline at end of file
diff --git a/build/Proxy/Proxy.wasm b/build/Proxy/Proxy.wasm
deleted file mode 100644
index a54d94b..0000000
Binary files a/build/Proxy/Proxy.wasm and /dev/null differ
diff --git a/build/Proxy/abis/Proxy.json b/build/Proxy/abis/Proxy.json
deleted file mode 100644
index edf0346..0000000
--- a/build/Proxy/abis/Proxy.json
+++ /dev/null
@@ -1,21 +0,0 @@
-[
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "sender",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "bytes",
- "name": "encryptedNote",
- "type": "bytes"
- }
- ],
- "name": "EncryptedNote",
- "type": "event"
- }
-]
\ No newline at end of file
diff --git a/build/schema.graphql b/build/schema.graphql
deleted file mode 100644
index 6002a52..0000000
--- a/build/schema.graphql
+++ /dev/null
@@ -1,38 +0,0 @@
-type Deposit @entity {
- id: ID!
- index: BigInt!
- amount: String!
- currency: String!
- commitment: Bytes!
- timestamp: BigInt!
- blockNumber: BigInt!
- transactionHash: Bytes!
-}
-
-type Withdrawal @entity {
- id: ID!
- to: Bytes!
- fee: BigInt!
- index: BigInt!
- amount: String!
- currency: String!
- nullifier: Bytes!
- timestamp: BigInt!
- blockNumber: BigInt!
- transactionHash: Bytes!
-}
-
-type EncryptedNote @entity {
- id: ID!
- index: BigInt!
- blockNumber: BigInt!
- encryptedNote: Bytes!
- transactionHash: Bytes!
-}
-
-type NoteAccount @entity {
- id: ID!
- index: BigInt!
- address: Bytes!
- encryptedAccount: Bytes!
-}
diff --git a/build/subgraph.yaml b/build/subgraph.yaml
deleted file mode 100644
index 4b20e25..0000000
--- a/build/subgraph.yaml
+++ /dev/null
@@ -1,138 +0,0 @@
-specVersion: 0.0.2
-description: Proxy
-repository: https://github.com/tornadocash/tornado-subgraph
-schema:
- file: schema.graphql
-dataSources:
- - kind: ethereum/contract
- name: Echoer
- network: bsc
- source:
- address: "0x0D5550d52428E7e3175bfc9550207e4ad3859b17"
- abi: Echoer
- startBlock: 8158799
- mapping:
- kind: ethereum/events
- apiVersion: 0.0.4
- language: wasm/assemblyscript
- file: Echoer/Echoer.wasm
- entities:
- - NoteAccount
- abis:
- - name: Echoer
- file: abis/Echoer.json
- eventHandlers:
- - event: Echo(indexed address,bytes)
- handler: handleEcho
- - kind: ethereum/contract
- name: Instance-0.1-bnb
- network: bsc
- source:
- address: "0x84443CFd09A48AF6eF360C6976C5392aC5023a1F"
- abi: Instance
- startBlock: 8159279
- mapping:
- kind: ethereum/events
- apiVersion: 0.0.4
- language: wasm/assemblyscript
- file: Instance-0.1-bnb/Instance-0.1-bnb.wasm
- 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-bnb
- network: bsc
- source:
- address: "0xd47438C816c9E7f2E2888E060936a499Af9582b3"
- abi: Instance
- startBlock: 8159286
- mapping:
- kind: ethereum/events
- apiVersion: 0.0.4
- language: wasm/assemblyscript
- file: Instance-0.1-bnb/Instance-0.1-bnb.wasm
- 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-bnb
- network: bsc
- source:
- address: "0x330bdFADE01eE9bF63C209Ee33102DD334618e0a"
- abi: Instance
- startBlock: 8159290
- mapping:
- kind: ethereum/events
- apiVersion: 0.0.4
- language: wasm/assemblyscript
- file: Instance-0.1-bnb/Instance-0.1-bnb.wasm
- 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-bnb
- network: bsc
- source:
- address: "0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD"
- abi: Instance
- startBlock: 8159296
- mapping:
- kind: ethereum/events
- apiVersion: 0.0.4
- language: wasm/assemblyscript
- file: Instance-0.1-bnb/Instance-0.1-bnb.wasm
- 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: bsc
- source:
- address: "0x0D5550d52428E7e3175bfc9550207e4ad3859b17"
- abi: Proxy
- startBlock: 7941563
- mapping:
- kind: ethereum/events
- apiVersion: 0.0.4
- language: wasm/assemblyscript
- file: Proxy/Proxy.wasm
- entities:
- - EncryptedNote
- abis:
- - name: Proxy
- file: abis/Proxy.json
- eventHandlers:
- - event: EncryptedNote(indexed address,bytes)
- handler: handleEncryptedNote
diff --git a/generated/Echoer/Echoer.ts b/generated/Echoer/Echoer.ts
deleted file mode 100644
index 3ffdc4f..0000000
--- a/generated/Echoer/Echoer.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
-
-import {
- ethereum,
- JSONValue,
- TypedMap,
- Entity,
- Bytes,
- Address,
- BigInt
-} from "@graphprotocol/graph-ts";
-
-export class Echo extends ethereum.Event {
- get params(): Echo__Params {
- return new Echo__Params(this);
- }
-}
-
-export class Echo__Params {
- _event: Echo;
-
- constructor(event: Echo) {
- this._event = event;
- }
-
- get who(): Address {
- return this._event.parameters[0].value.toAddress();
- }
-
- get data(): Bytes {
- return this._event.parameters[1].value.toBytes();
- }
-}
-
-export class Echoer extends ethereum.SmartContract {
- static bind(address: Address): Echoer {
- return new Echoer("Echoer", address);
- }
-}
diff --git a/generated/Instance/Instance.ts b/generated/Instance/Instance.ts
deleted file mode 100644
index 38aecb0..0000000
--- a/generated/Instance/Instance.ts
+++ /dev/null
@@ -1,65 +0,0 @@
-// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
-
-import { ethereum, JSONValue, TypedMap, Entity, Bytes, Address, BigInt } from '@graphprotocol/graph-ts';
-
-export class Deposit extends ethereum.Event {
- get params(): Deposit__Params {
- return new Deposit__Params(this);
- }
-}
-
-export class Deposit__Params {
- _event: Deposit;
-
- constructor(event: Deposit) {
- this._event = event;
- }
-
- get commitment(): Bytes {
- return this._event.parameters[0].value.toBytes();
- }
-
- get leafIndex(): BigInt {
- return this._event.parameters[1].value.toBigInt();
- }
-
- get timestamp(): BigInt {
- return this._event.parameters[2].value.toBigInt();
- }
-}
-
-export class Withdrawal extends ethereum.Event {
- get params(): Withdrawal__Params {
- return new Withdrawal__Params(this);
- }
-}
-
-export class Withdrawal__Params {
- _event: Withdrawal;
-
- constructor(event: Withdrawal) {
- this._event = event;
- }
-
- get to(): Address {
- return this._event.parameters[0].value.toAddress();
- }
-
- get nullifierHash(): Bytes {
- return this._event.parameters[1].value.toBytes();
- }
-
- get relayer(): Address {
- return this._event.parameters[2].value.toAddress();
- }
-
- get fee(): BigInt {
- return this._event.parameters[3].value.toBigInt();
- }
-}
-
-export class Instance extends ethereum.SmartContract {
- static bind(address: Address): Instance {
- return new Instance('Instance', address);
- }
-}
diff --git a/generated/Proxy/Proxy.ts b/generated/Proxy/Proxy.ts
deleted file mode 100644
index 7700179..0000000
--- a/generated/Proxy/Proxy.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
-
-import {
- ethereum,
- JSONValue,
- TypedMap,
- Entity,
- Bytes,
- Address,
- BigInt
-} from "@graphprotocol/graph-ts";
-
-export class EncryptedNote extends ethereum.Event {
- get params(): EncryptedNote__Params {
- return new EncryptedNote__Params(this);
- }
-}
-
-export class EncryptedNote__Params {
- _event: EncryptedNote;
-
- constructor(event: EncryptedNote) {
- this._event = event;
- }
-
- get sender(): Address {
- return this._event.parameters[0].value.toAddress();
- }
-
- get encryptedNote(): Bytes {
- return this._event.parameters[1].value.toBytes();
- }
-}
-
-export class Proxy extends ethereum.SmartContract {
- static bind(address: Address): Proxy {
- return new Proxy("Proxy", address);
- }
-}
diff --git a/generated/index.ts b/generated/index.ts
deleted file mode 100644
index 7bab084..0000000
--- a/generated/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export * from './Proxy/Proxy';
-export * from './Echoer/Echoer';
-export * from './Instance/Instance';
diff --git a/generated/schema.ts b/generated/schema.ts
deleted file mode 100644
index 75c95b2..0000000
--- a/generated/schema.ts
+++ /dev/null
@@ -1,344 +0,0 @@
-// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
-
-import {
- TypedMap,
- Entity,
- Value,
- ValueKind,
- store,
- Address,
- Bytes,
- BigInt,
- BigDecimal
-} from "@graphprotocol/graph-ts";
-
-export class Deposit extends Entity {
- constructor(id: string) {
- super();
- this.set("id", Value.fromString(id));
- }
-
- save(): void {
- let id = this.get("id");
- assert(id !== null, "Cannot save Deposit entity without an ID");
- assert(
- id.kind == ValueKind.STRING,
- "Cannot save Deposit entity with non-string ID. " +
- 'Considering using .toHex() to convert the "id" to a string.'
- );
- store.set("Deposit", id.toString(), this);
- }
-
- static load(id: string): Deposit | null {
- return store.get("Deposit", id) as Deposit | null;
- }
-
- get id(): string {
- let value = this.get("id");
- return value.toString();
- }
-
- set id(value: string) {
- this.set("id", Value.fromString(value));
- }
-
- get index(): BigInt {
- let value = this.get("index");
- return value.toBigInt();
- }
-
- set index(value: BigInt) {
- this.set("index", Value.fromBigInt(value));
- }
-
- get amount(): string {
- let value = this.get("amount");
- return value.toString();
- }
-
- set amount(value: string) {
- this.set("amount", Value.fromString(value));
- }
-
- get currency(): string {
- let value = this.get("currency");
- return value.toString();
- }
-
- set currency(value: string) {
- this.set("currency", Value.fromString(value));
- }
-
- get commitment(): Bytes {
- let value = this.get("commitment");
- return value.toBytes();
- }
-
- set commitment(value: Bytes) {
- this.set("commitment", Value.fromBytes(value));
- }
-
- get timestamp(): BigInt {
- let value = this.get("timestamp");
- return value.toBigInt();
- }
-
- set timestamp(value: BigInt) {
- this.set("timestamp", Value.fromBigInt(value));
- }
-
- get blockNumber(): BigInt {
- let value = this.get("blockNumber");
- return value.toBigInt();
- }
-
- set blockNumber(value: BigInt) {
- this.set("blockNumber", Value.fromBigInt(value));
- }
-
- get transactionHash(): Bytes {
- let value = this.get("transactionHash");
- return value.toBytes();
- }
-
- set transactionHash(value: Bytes) {
- this.set("transactionHash", Value.fromBytes(value));
- }
-}
-
-export class Withdrawal extends Entity {
- constructor(id: string) {
- super();
- this.set("id", Value.fromString(id));
- }
-
- save(): void {
- let id = this.get("id");
- assert(id !== null, "Cannot save Withdrawal entity without an ID");
- assert(
- id.kind == ValueKind.STRING,
- "Cannot save Withdrawal entity with non-string ID. " +
- 'Considering using .toHex() to convert the "id" to a string.'
- );
- store.set("Withdrawal", id.toString(), this);
- }
-
- static load(id: string): Withdrawal | null {
- return store.get("Withdrawal", id) as Withdrawal | null;
- }
-
- get id(): string {
- let value = this.get("id");
- return value.toString();
- }
-
- set id(value: string) {
- this.set("id", Value.fromString(value));
- }
-
- get to(): Bytes {
- let value = this.get("to");
- return value.toBytes();
- }
-
- set to(value: Bytes) {
- this.set("to", Value.fromBytes(value));
- }
-
- get fee(): BigInt {
- let value = this.get("fee");
- return value.toBigInt();
- }
-
- set fee(value: BigInt) {
- this.set("fee", Value.fromBigInt(value));
- }
-
- get index(): BigInt {
- let value = this.get("index");
- return value.toBigInt();
- }
-
- set index(value: BigInt) {
- this.set("index", Value.fromBigInt(value));
- }
-
- get amount(): string {
- let value = this.get("amount");
- return value.toString();
- }
-
- set amount(value: string) {
- this.set("amount", Value.fromString(value));
- }
-
- get currency(): string {
- let value = this.get("currency");
- return value.toString();
- }
-
- set currency(value: string) {
- this.set("currency", Value.fromString(value));
- }
-
- get nullifier(): Bytes {
- let value = this.get("nullifier");
- return value.toBytes();
- }
-
- set nullifier(value: Bytes) {
- this.set("nullifier", Value.fromBytes(value));
- }
-
- get timestamp(): BigInt {
- let value = this.get("timestamp");
- return value.toBigInt();
- }
-
- set timestamp(value: BigInt) {
- this.set("timestamp", Value.fromBigInt(value));
- }
-
- get blockNumber(): BigInt {
- let value = this.get("blockNumber");
- return value.toBigInt();
- }
-
- set blockNumber(value: BigInt) {
- this.set("blockNumber", Value.fromBigInt(value));
- }
-
- get transactionHash(): Bytes {
- let value = this.get("transactionHash");
- return value.toBytes();
- }
-
- set transactionHash(value: Bytes) {
- this.set("transactionHash", Value.fromBytes(value));
- }
-}
-
-export class EncryptedNote extends Entity {
- constructor(id: string) {
- super();
- this.set("id", Value.fromString(id));
- }
-
- save(): void {
- let id = this.get("id");
- assert(id !== null, "Cannot save EncryptedNote entity without an ID");
- assert(
- id.kind == ValueKind.STRING,
- "Cannot save EncryptedNote entity with non-string ID. " +
- 'Considering using .toHex() to convert the "id" to a string.'
- );
- store.set("EncryptedNote", id.toString(), this);
- }
-
- static load(id: string): EncryptedNote | null {
- return store.get("EncryptedNote", id) as EncryptedNote | null;
- }
-
- get id(): string {
- let value = this.get("id");
- return value.toString();
- }
-
- set id(value: string) {
- this.set("id", Value.fromString(value));
- }
-
- get index(): BigInt {
- let value = this.get("index");
- return value.toBigInt();
- }
-
- set index(value: BigInt) {
- this.set("index", Value.fromBigInt(value));
- }
-
- get blockNumber(): BigInt {
- let value = this.get("blockNumber");
- return value.toBigInt();
- }
-
- set blockNumber(value: BigInt) {
- this.set("blockNumber", Value.fromBigInt(value));
- }
-
- get encryptedNote(): Bytes {
- let value = this.get("encryptedNote");
- return value.toBytes();
- }
-
- set encryptedNote(value: Bytes) {
- this.set("encryptedNote", Value.fromBytes(value));
- }
-
- get transactionHash(): Bytes {
- let value = this.get("transactionHash");
- return value.toBytes();
- }
-
- set transactionHash(value: Bytes) {
- this.set("transactionHash", Value.fromBytes(value));
- }
-}
-
-export class NoteAccount extends Entity {
- constructor(id: string) {
- super();
- this.set("id", Value.fromString(id));
- }
-
- save(): void {
- let id = this.get("id");
- assert(id !== null, "Cannot save NoteAccount entity without an ID");
- assert(
- id.kind == ValueKind.STRING,
- "Cannot save NoteAccount entity with non-string ID. " +
- 'Considering using .toHex() to convert the "id" to a string.'
- );
- store.set("NoteAccount", id.toString(), this);
- }
-
- static load(id: string): NoteAccount | null {
- return store.get("NoteAccount", id) as NoteAccount | null;
- }
-
- get id(): string {
- let value = this.get("id");
- return value.toString();
- }
-
- set id(value: string) {
- this.set("id", Value.fromString(value));
- }
-
- get index(): BigInt {
- let value = this.get("index");
- return value.toBigInt();
- }
-
- set index(value: BigInt) {
- this.set("index", Value.fromBigInt(value));
- }
-
- get address(): Bytes {
- let value = this.get("address");
- return value.toBytes();
- }
-
- set address(value: Bytes) {
- this.set("address", Value.fromBytes(value));
- }
-
- get encryptedAccount(): Bytes {
- let value = this.get("encryptedAccount");
- return value.toBytes();
- }
-
- set encryptedAccount(value: Bytes) {
- this.set("encryptedAccount", Value.fromBytes(value));
- }
-}
diff --git a/subgraph.yaml b/subgraph.yaml
deleted file mode 100644
index 7b35600..0000000
--- a/subgraph.yaml
+++ /dev/null
@@ -1,67 +0,0 @@
-specVersion: 0.0.2
-schema:
- file: ./schema.graphql
-dataSources:
- - kind: ethereum/contract
- name: Proxy
- network: bsc
- source:
- address: "0x0D5550d52428E7e3175bfc9550207e4ad3859b17"
- abi: Proxy
- startBlock: 7941563
- mapping:
- kind: ethereum/events
- apiVersion: 0.0.4
- language: wasm/assemblyscript
- entities:
- - EncryptedNote
- abis:
- - name: Proxy
- file: ./abis/Proxy.json
- eventHandlers:
- - event: EncryptedNote(indexed address,bytes)
- handler: handleEncryptedNote
- file: ./src/mapping-encrypted-note.ts
- - kind: ethereum/contract
- name: Echoer
- network: bsc
- source:
- address: "0x60eaCBd5535ADB86955A0154E44Aded78F161643"
- abi: Echoer
- startBlock: 7941563
- mapping:
- kind: ethereum/events
- apiVersion: 0.0.4
- language: wasm/assemblyscript
- entities:
- - NoteAccount
- abis:
- - name: Echoer
- file: ./abis/Echoer.json
- eventHandlers:
- - event: Echo(indexed address,bytes)
- handler: handleEcho
- file: ./src/mapping-echo-account.ts
- - kind: ethereum/contract
- name: Instance
- network: bsc
- source:
- address: "0x0Ce22770451A8acAD1220D9d1678656b4fAe4a1d"
- abi: Instance
- startBlock: 7941563
- mapping:
- kind: ethereum/events
- apiVersion: 0.0.4
- language: wasm/assemblyscript
- 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
- file: ./src/mapping-proxy.ts