Skip to content

Commit 583bf11

Browse files
authored
Merge pull request #1 from andyrobert3/feat/event-handlers
Introduce FollowNFTTransferred & CollectNFTTransferred event handlers
2 parents 08f76c8 + 7bc5c64 commit 583bf11

File tree

4 files changed

+612
-458
lines changed

4 files changed

+612
-458
lines changed

generated/schema.ts

+125-26
Original file line numberDiff line numberDiff line change
@@ -1932,6 +1932,113 @@ export class FollowOnlyReferenceModuleSettings extends Entity {
19321932
}
19331933
}
19341934

1935+
export class FollowNft extends Entity {
1936+
constructor(id: string) {
1937+
super();
1938+
this.set("id", Value.fromString(id));
1939+
}
1940+
1941+
save(): void {
1942+
let id = this.get("id");
1943+
assert(id != null, "Cannot save FollowNft entity without an ID");
1944+
if (id) {
1945+
assert(
1946+
id.kind == ValueKind.STRING,
1947+
`Entities of type FollowNft must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}`
1948+
);
1949+
store.set("FollowNft", id.toString(), this);
1950+
}
1951+
}
1952+
1953+
static load(id: string): FollowNft | null {
1954+
return changetype<FollowNft | null>(store.get("FollowNft", id));
1955+
}
1956+
1957+
get id(): string {
1958+
let value = this.get("id");
1959+
return value!.toString();
1960+
}
1961+
1962+
set id(value: string) {
1963+
this.set("id", Value.fromString(value));
1964+
}
1965+
1966+
get profile(): string | null {
1967+
let value = this.get("profile");
1968+
if (!value || value.kind == ValueKind.NULL) {
1969+
return null;
1970+
} else {
1971+
return value.toString();
1972+
}
1973+
}
1974+
1975+
set profile(value: string | null) {
1976+
if (!value) {
1977+
this.unset("profile");
1978+
} else {
1979+
this.set("profile", Value.fromString(<string>value));
1980+
}
1981+
}
1982+
}
1983+
1984+
export class CollectNft extends Entity {
1985+
constructor(id: string) {
1986+
super();
1987+
this.set("id", Value.fromString(id));
1988+
}
1989+
1990+
save(): void {
1991+
let id = this.get("id");
1992+
assert(id != null, "Cannot save CollectNft entity without an ID");
1993+
if (id) {
1994+
assert(
1995+
id.kind == ValueKind.STRING,
1996+
`Entities of type CollectNft must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}`
1997+
);
1998+
store.set("CollectNft", id.toString(), this);
1999+
}
2000+
}
2001+
2002+
static load(id: string): CollectNft | null {
2003+
return changetype<CollectNft | null>(store.get("CollectNft", id));
2004+
}
2005+
2006+
get id(): string {
2007+
let value = this.get("id");
2008+
return value!.toString();
2009+
}
2010+
2011+
set id(value: string) {
2012+
this.set("id", Value.fromString(value));
2013+
}
2014+
2015+
get pubId(): string {
2016+
let value = this.get("pubId");
2017+
return value!.toString();
2018+
}
2019+
2020+
set pubId(value: string) {
2021+
this.set("pubId", Value.fromString(value));
2022+
}
2023+
2024+
get profile(): string | null {
2025+
let value = this.get("profile");
2026+
if (!value || value.kind == ValueKind.NULL) {
2027+
return null;
2028+
} else {
2029+
return value.toString();
2030+
}
2031+
}
2032+
2033+
set profile(value: string | null) {
2034+
if (!value) {
2035+
this.unset("profile");
2036+
} else {
2037+
this.set("profile", Value.fromString(<string>value));
2038+
}
2039+
}
2040+
}
2041+
19352042
export class Profile extends Entity {
19362043
constructor(id: string) {
19372044
super();
@@ -2067,6 +2174,24 @@ export class Profile extends Entity {
20672174
}
20682175
}
20692176

2177+
get followNfts(): Array<string> {
2178+
let value = this.get("followNfts");
2179+
return value!.toStringArray();
2180+
}
2181+
2182+
set followNfts(value: Array<string>) {
2183+
this.set("followNfts", Value.fromStringArray(value));
2184+
}
2185+
2186+
get collectNfts(): Array<string> {
2187+
let value = this.get("collectNfts");
2188+
return value!.toStringArray();
2189+
}
2190+
2191+
set collectNfts(value: Array<string>) {
2192+
this.set("collectNfts", Value.fromStringArray(value));
2193+
}
2194+
20702195
get posts(): Array<string> {
20712196
let value = this.get("posts");
20722197
return value!.toStringArray();
@@ -2162,32 +2287,6 @@ export class Profile extends Entity {
21622287
}
21632288
}
21642289

2165-
get handle(): string {
2166-
let value = this.get("handle");
2167-
return value!.toString();
2168-
}
2169-
2170-
set handle(value: string) {
2171-
this.set("handle", Value.fromString(value));
2172-
}
2173-
2174-
get picture(): string | null {
2175-
let value = this.get("picture");
2176-
if (!value || value.kind == ValueKind.NULL) {
2177-
return null;
2178-
} else {
2179-
return value.toString();
2180-
}
2181-
}
2182-
2183-
set picture(value: string | null) {
2184-
if (!value) {
2185-
this.unset("picture");
2186-
} else {
2187-
this.set("picture", Value.fromString(<string>value));
2188-
}
2189-
}
2190-
21912290
get coverPicture(): string | null {
21922291
let value = this.get("coverPicture");
21932292
if (!value || value.kind == ValueKind.NULL) {

0 commit comments

Comments
 (0)