mirror of
https://github.com/Instadapp/Swap-Aggregator-Subgraph.git
synced 2024-07-29 21:57:12 +00:00
231 lines
5.0 KiB
TypeScript
231 lines
5.0 KiB
TypeScript
// 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 SwapAggregatorData extends Entity {
|
|
constructor(id: string) {
|
|
super();
|
|
this.set("id", Value.fromString(id));
|
|
}
|
|
|
|
save(): void {
|
|
let id = this.get("id");
|
|
assert(id != null, "Cannot save SwapAggregatorData entity without an ID");
|
|
if (id) {
|
|
assert(
|
|
id.kind == ValueKind.STRING,
|
|
`Entities of type SwapAggregatorData must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}`
|
|
);
|
|
store.set("SwapAggregatorData", id.toString(), this);
|
|
}
|
|
}
|
|
|
|
static load(id: string): SwapAggregatorData | null {
|
|
return changetype<SwapAggregatorData | null>(
|
|
store.get("SwapAggregatorData", id)
|
|
);
|
|
}
|
|
|
|
get id(): string {
|
|
let value = this.get("id");
|
|
return value!.toString();
|
|
}
|
|
|
|
set id(value: string) {
|
|
this.set("id", Value.fromString(value));
|
|
}
|
|
|
|
get connectors(): Array<string> {
|
|
let value = this.get("connectors");
|
|
return value!.toStringArray();
|
|
}
|
|
|
|
set connectors(value: Array<string>) {
|
|
this.set("connectors", Value.fromStringArray(value));
|
|
}
|
|
|
|
get callData(): Array<Bytes> {
|
|
let value = this.get("callData");
|
|
return value!.toBytesArray();
|
|
}
|
|
|
|
set callData(value: Array<Bytes>) {
|
|
this.set("callData", Value.fromBytesArray(value));
|
|
}
|
|
|
|
get eventName(): string {
|
|
let value = this.get("eventName");
|
|
return value!.toString();
|
|
}
|
|
|
|
set eventName(value: string) {
|
|
this.set("eventName", Value.fromString(value));
|
|
}
|
|
|
|
get eventParams(): Bytes {
|
|
let value = this.get("eventParams");
|
|
return value!.toBytes();
|
|
}
|
|
|
|
set eventParams(value: Bytes) {
|
|
this.set("eventParams", Value.fromBytes(value));
|
|
}
|
|
|
|
get transactionDetail(): string {
|
|
let value = this.get("transactionDetail");
|
|
return value!.toString();
|
|
}
|
|
|
|
set transactionDetail(value: string) {
|
|
this.set("transactionDetail", Value.fromString(value));
|
|
}
|
|
}
|
|
|
|
export class TransactionData extends Entity {
|
|
constructor(id: string) {
|
|
super();
|
|
this.set("id", Value.fromString(id));
|
|
}
|
|
|
|
save(): void {
|
|
let id = this.get("id");
|
|
assert(id != null, "Cannot save TransactionData entity without an ID");
|
|
if (id) {
|
|
assert(
|
|
id.kind == ValueKind.STRING,
|
|
`Entities of type TransactionData must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}`
|
|
);
|
|
store.set("TransactionData", id.toString(), this);
|
|
}
|
|
}
|
|
|
|
static load(id: string): TransactionData | null {
|
|
return changetype<TransactionData | null>(store.get("TransactionData", id));
|
|
}
|
|
|
|
get id(): string {
|
|
let value = this.get("id");
|
|
return value!.toString();
|
|
}
|
|
|
|
set id(value: string) {
|
|
this.set("id", Value.fromString(value));
|
|
}
|
|
|
|
get hash(): Bytes {
|
|
let value = this.get("hash");
|
|
return value!.toBytes();
|
|
}
|
|
|
|
set hash(value: Bytes) {
|
|
this.set("hash", Value.fromBytes(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 | null {
|
|
let value = this.get("to");
|
|
if (!value || value.kind == ValueKind.NULL) {
|
|
return null;
|
|
} else {
|
|
return value.toBytes();
|
|
}
|
|
}
|
|
|
|
set to(value: Bytes | null) {
|
|
if (!value) {
|
|
this.unset("to");
|
|
} else {
|
|
this.set("to", Value.fromBytes(<Bytes>value));
|
|
}
|
|
}
|
|
|
|
get input(): Bytes {
|
|
let value = this.get("input");
|
|
return value!.toBytes();
|
|
}
|
|
|
|
set input(value: Bytes) {
|
|
this.set("input", Value.fromBytes(value));
|
|
}
|
|
|
|
get index(): BigInt {
|
|
let value = this.get("index");
|
|
return value!.toBigInt();
|
|
}
|
|
|
|
set index(value: BigInt) {
|
|
this.set("index", Value.fromBigInt(value));
|
|
}
|
|
|
|
get value(): BigInt {
|
|
let value = this.get("value");
|
|
return value!.toBigInt();
|
|
}
|
|
|
|
set value(value: BigInt) {
|
|
this.set("value", Value.fromBigInt(value));
|
|
}
|
|
|
|
get gasUsed(): BigInt {
|
|
let value = this.get("gasUsed");
|
|
return value!.toBigInt();
|
|
}
|
|
|
|
set gasUsed(value: BigInt) {
|
|
this.set("gasUsed", Value.fromBigInt(value));
|
|
}
|
|
|
|
get gasLimit(): BigInt {
|
|
let value = this.get("gasLimit");
|
|
return value!.toBigInt();
|
|
}
|
|
|
|
set gasLimit(value: BigInt) {
|
|
this.set("gasLimit", Value.fromBigInt(value));
|
|
}
|
|
|
|
get gasPrice(): BigInt {
|
|
let value = this.get("gasPrice");
|
|
return value!.toBigInt();
|
|
}
|
|
|
|
set gasPrice(value: BigInt) {
|
|
this.set("gasPrice", 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 timestamp(): BigInt {
|
|
let value = this.get("timestamp");
|
|
return value!.toBigInt();
|
|
}
|
|
|
|
set timestamp(value: BigInt) {
|
|
this.set("timestamp", Value.fromBigInt(value));
|
|
}
|
|
}
|