// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. import { TypedMap, Entity, Value, ValueKind, store, Bytes, BigInt, BigDecimal } from "@graphprotocol/graph-ts"; export class Account extends Entity { constructor(id: string) { super(); this.set("id", Value.fromString(id)); } save(): void { let id = this.get("id"); assert(id != null, "Cannot save Account entity without an ID"); if (id) { assert( id.kind == ValueKind.STRING, `Entities of type Account must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}` ); store.set("Account", id.toString(), this); } } static load(id: string): Account | null { return changetype(store.get("Account", id)); } get id(): string { let value = this.get("id"); return value!.toString(); } set id(value: string) { this.set("id", Value.fromString(value)); } get version(): BigInt { let value = this.get("version"); return value!.toBigInt(); } set version(value: BigInt) { this.set("version", Value.fromBigInt(value)); } get accountID(): BigInt { let value = this.get("accountID"); return value!.toBigInt(); } set accountID(value: BigInt) { this.set("accountID", 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 creator(): Bytes { let value = this.get("creator"); return value!.toBytes(); } set creator(value: Bytes) { this.set("creator", Value.fromBytes(value)); } get transactionsCount(): BigInt { let value = this.get("transactionsCount"); return value!.toBigInt(); } set transactionsCount(value: BigInt) { this.set("transactionsCount", Value.fromBigInt(value)); } get approvals(): Array { let value = this.get("approvals"); return value!.toStringArray(); } set approvals(value: Array) { this.set("approvals", Value.fromStringArray(value)); } } export class ApprovalEvent extends Entity { constructor(id: string) { super(); this.set("id", Value.fromString(id)); } save(): void { let id = this.get("id"); assert(id != null, "Cannot save ApprovalEvent entity without an ID"); if (id) { assert( id.kind == ValueKind.STRING, `Entities of type ApprovalEvent must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}` ); store.set("ApprovalEvent", id.toString(), this); } } static load(id: string): ApprovalEvent | null { return changetype(store.get("ApprovalEvent", id)); } get id(): string { let value = this.get("id"); return value!.toString(); } set id(value: string) { this.set("id", Value.fromString(value)); } get token(): string { let value = this.get("token"); return value!.toString(); } set token(value: string) { this.set("token", Value.fromString(value)); } get from(): Bytes { let value = this.get("from"); return value!.toBytes(); } set from(value: Bytes) { this.set("from", Value.fromBytes(value)); } get to(): Bytes { let value = this.get("to"); return value!.toBytes(); } set to(value: Bytes) { this.set("to", Value.fromBytes(value)); } get value(): BigInt { let value = this.get("value"); return value!.toBigInt(); } set value(value: BigInt) { this.set("value", Value.fromBigInt(value)); } } export class Token extends Entity { constructor(id: string) { super(); this.set("id", Value.fromString(id)); } save(): void { let id = this.get("id"); assert(id != null, "Cannot save Token entity without an ID"); if (id) { assert( id.kind == ValueKind.STRING, `Entities of type Token must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}` ); store.set("Token", id.toString(), this); } } static load(id: string): Token | null { return changetype(store.get("Token", id)); } get id(): string { let value = this.get("id"); return value!.toString(); } set id(value: string) { this.set("id", Value.fromString(value)); } get name(): string | null { let value = this.get("name"); if (!value || value.kind == ValueKind.NULL) { return null; } else { return value.toString(); } } set name(value: string | null) { if (!value) { this.unset("name"); } else { this.set("name", Value.fromString(value)); } } get symbol(): string | null { let value = this.get("symbol"); if (!value || value.kind == ValueKind.NULL) { return null; } else { return value.toString(); } } set symbol(value: string | null) { if (!value) { this.unset("symbol"); } else { this.set("symbol", Value.fromString(value)); } } get decimals(): BigInt | null { let value = this.get("decimals"); if (!value || value.kind == ValueKind.NULL) { return null; } else { return value.toBigInt(); } } set decimals(value: BigInt | null) { if (!value) { this.unset("decimals"); } else { this.set("decimals", Value.fromBigInt(value)); } } }