mirror of
https://github.com/tornadocash/tornado-subgraph.git
synced 2024-12-23 01:39:39 +01:00
345 lines
7.4 KiB
TypeScript
345 lines
7.4 KiB
TypeScript
// 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));
|
|
}
|
|
}
|