Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce FollowNFTTransferred & CollectNFTTransferred event handlers #1

Merged
merged 3 commits into from
Nov 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
151 changes: 125 additions & 26 deletions generated/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1932,6 +1932,113 @@ export class FollowOnlyReferenceModuleSettings extends Entity {
}
}

export class FollowNft extends Entity {
constructor(id: string) {
super();
this.set("id", Value.fromString(id));
}

save(): void {
let id = this.get("id");
assert(id != null, "Cannot save FollowNft entity without an ID");
if (id) {
assert(
id.kind == ValueKind.STRING,
`Entities of type FollowNft must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}`
);
store.set("FollowNft", id.toString(), this);
}
}

static load(id: string): FollowNft | null {
return changetype<FollowNft | null>(store.get("FollowNft", id));
}

get id(): string {
let value = this.get("id");
return value!.toString();
}

set id(value: string) {
this.set("id", Value.fromString(value));
}

get profile(): string | null {
let value = this.get("profile");
if (!value || value.kind == ValueKind.NULL) {
return null;
} else {
return value.toString();
}
}

set profile(value: string | null) {
if (!value) {
this.unset("profile");
} else {
this.set("profile", Value.fromString(<string>value));
}
}
}

export class CollectNft extends Entity {
constructor(id: string) {
super();
this.set("id", Value.fromString(id));
}

save(): void {
let id = this.get("id");
assert(id != null, "Cannot save CollectNft entity without an ID");
if (id) {
assert(
id.kind == ValueKind.STRING,
`Entities of type CollectNft must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}`
);
store.set("CollectNft", id.toString(), this);
}
}

static load(id: string): CollectNft | null {
return changetype<CollectNft | null>(store.get("CollectNft", id));
}

get id(): string {
let value = this.get("id");
return value!.toString();
}

set id(value: string) {
this.set("id", Value.fromString(value));
}

get pubId(): string {
let value = this.get("pubId");
return value!.toString();
}

set pubId(value: string) {
this.set("pubId", Value.fromString(value));
}

get profile(): string | null {
let value = this.get("profile");
if (!value || value.kind == ValueKind.NULL) {
return null;
} else {
return value.toString();
}
}

set profile(value: string | null) {
if (!value) {
this.unset("profile");
} else {
this.set("profile", Value.fromString(<string>value));
}
}
}

export class Profile extends Entity {
constructor(id: string) {
super();
Expand Down Expand Up @@ -2067,6 +2174,24 @@ export class Profile extends Entity {
}
}

get followNfts(): Array<string> {
let value = this.get("followNfts");
return value!.toStringArray();
}

set followNfts(value: Array<string>) {
this.set("followNfts", Value.fromStringArray(value));
}

get collectNfts(): Array<string> {
let value = this.get("collectNfts");
return value!.toStringArray();
}

set collectNfts(value: Array<string>) {
this.set("collectNfts", Value.fromStringArray(value));
}

get posts(): Array<string> {
let value = this.get("posts");
return value!.toStringArray();
Expand Down Expand Up @@ -2162,32 +2287,6 @@ export class Profile extends Entity {
}
}

get handle(): string {
let value = this.get("handle");
return value!.toString();
}

set handle(value: string) {
this.set("handle", Value.fromString(value));
}

get picture(): string | null {
let value = this.get("picture");
if (!value || value.kind == ValueKind.NULL) {
return null;
} else {
return value.toString();
}
}

set picture(value: string | null) {
if (!value) {
this.unset("picture");
} else {
this.set("picture", Value.fromString(<string>value));
}
}

get coverPicture(): string | null {
let value = this.get("coverPicture");
if (!value || value.kind == ValueKind.NULL) {
Expand Down
Loading