Skip to content

Commit 72fef62

Browse files
committed
fix: comment out all realm and fake related
1 parent a884c08 commit 72fef62

File tree

4 files changed

+38
-38
lines changed

4 files changed

+38
-38
lines changed

src/mappings/diamond.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ import {
100100
getOrCreateERC1155BuyOrderExecution,
101101
} from "../utils/helpers/aavegotchi";
102102

103-
import { getOrCreateParcel } from "../utils/helpers/realm";
103+
// import { getOrCreateParcel } from "../utils/helpers/realm";
104104

105105
import {
106106
BIGINT_ONE,
@@ -772,14 +772,14 @@ export function handleERC721ListingRemoved(event: ERC721ListingRemoved): void {
772772
gotchi.locked = false;
773773
gotchi.save();
774774
} else if (listing.category.equals(BigInt.fromI32(4))) {
775-
let parcel = getOrCreateParcel(
776-
listing.tokenId,
777-
listing.seller,
778-
Address.fromString(listing.erc721TokenAddress.toHexString()),
779-
false
780-
);
781-
parcel.activeListing = null;
782-
parcel.save();
775+
// let parcel = getOrCreateParcel(
776+
// listing.tokenId,
777+
// listing.seller,
778+
// Address.fromString(listing.erc721TokenAddress.toHexString()),
779+
// false
780+
// );
781+
// parcel.activeListing = null;
782+
// parcel.save();
783783
}
784784

785785
listing.cancelled = true;
@@ -1097,12 +1097,12 @@ export function handleTransferParcel(event: Transfer): void {
10971097
}
10981098

10991099
export function handleMintParcel(event: MintParcel): void {
1100-
let parcel = getOrCreateParcel(
1101-
event.params._tokenId,
1102-
event.params._owner,
1103-
event.address
1104-
);
1105-
parcel.save();
1100+
// let parcel = getOrCreateParcel(
1101+
// event.params._tokenId,
1102+
// event.params._owner,
1103+
// event.address
1104+
// );
1105+
// parcel.save();
11061106
}
11071107

11081108
// WearablesConfig

src/utils/helpers/aavegotchi.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {
2525
AavegotchiDiamond,
2626
ERC1155ExecutedListing,
2727
} from "../../../generated/AavegotchiDiamond/AavegotchiDiamond";
28-
import { getFakeGotchiNFTToken } from "./fakegotchis";
28+
// import { getFakeGotchiNFTToken } from "./fakegotchis";
2929
import { BigInt } from "@graphprotocol/graph-ts";
3030
import { log } from "@graphprotocol/graph-ts";
3131

@@ -217,20 +217,20 @@ export function updateERC721ListingInfo(
217217
listing.blockCreated = event.block.number;
218218
}
219219

220-
let erc721Token = getFakeGotchiNFTToken(
221-
listingInfo.erc721TokenAddress,
222-
listingInfo.erc721TokenId
223-
);
224-
225-
if (erc721Token != null) {
226-
listing.fakeGotchi_name = erc721Token.name;
227-
listing.fakeGotchi_publisher = erc721Token.publisher;
228-
listing.fakeGotchi_description = erc721Token.description;
229-
listing.fakeGotchi_artist = erc721Token.artist;
230-
listing.fakeGotchi_artistName = erc721Token.artistName;
231-
listing.fakeGotchi_editions = erc721Token.editions;
232-
listing.fakeGotchi_publisherName = erc721Token.publisherName;
233-
}
220+
// let erc721Token = getFakeGotchiNFTToken(
221+
// listingInfo.erc721TokenAddress,
222+
// listingInfo.erc721TokenId
223+
// );
224+
225+
// if (erc721Token != null) {
226+
// listing.fakeGotchi_name = erc721Token.name;
227+
// listing.fakeGotchi_publisher = erc721Token.publisher;
228+
// listing.fakeGotchi_description = erc721Token.description;
229+
// listing.fakeGotchi_artist = erc721Token.artist;
230+
// listing.fakeGotchi_artistName = erc721Token.artistName;
231+
// listing.fakeGotchi_editions = erc721Token.editions;
232+
// listing.fakeGotchi_publisherName = erc721Token.publisherName;
233+
// }
234234

235235
if (listing.category.toI32() <= 2) {
236236
let portal = getOrCreatePortal(

src/utils/helpers/fakegotchis.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Address } from "@graphprotocol/graph-ts";
1+
/* import { Address } from "@graphprotocol/graph-ts";
22
import {
33
FakeGotchiCardBalance,
44
FakeGotchiNFTToken,
@@ -7,7 +7,7 @@ import {
77
import { getOrCreateUser } from "./aavegotchi";
88
import { constants } from "@amxx/graphprotocol-utils";
99
import { BigInt } from "@graphprotocol/graph-ts";
10-
// import { IERC721 } from "../../../generated/FAKEGotchisNFTDiamond/IERC721";
10+
import { IERC721 } from "../../../generated/FAKEGotchisNFTDiamond/IERC721";
1111
1212
export function fetchFakeGotchiNFTToken(
1313
contract: Address,
@@ -25,9 +25,7 @@ export function fetchFakeGotchiNFTToken(
2525
token.identifier = identifier;
2626
token.approval = getOrCreateUser(constants.ADDRESS_ZERO.toHex()).id;
2727
28-
let erc721 = /* IERC721.bind(Address.fromBytes(contract)); */ undefined;
29-
if (!erc721) return;
30-
28+
let erc721 = IERC721.bind(Address.fromBytes(contract));
3129
let try_tokenURI = erc721.try_tokenURI(identifier);
3230
token.uri = try_tokenURI.reverted ? "" : try_tokenURI.value;
3331
}
@@ -70,3 +68,4 @@ export function fetchFakeGotchiCardBalance(
7068
7169
return balance as FakeGotchiCardBalance;
7270
}
71+
*/

src/utils/helpers/realm.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { Address } from "@graphprotocol/graph-ts";
1+
/* import { Address } from "@graphprotocol/graph-ts";
22
33
import { Bytes } from "@graphprotocol/graph-ts";
44
55
import { Parcel } from "../../../generated/schema";
66
import { BIGINT_ZERO } from "../constants";
77
import { log } from "@graphprotocol/graph-ts";
8-
// import { RealmDiamond } from "../../../generated/RealmDiamond/RealmDiamond";
8+
import { RealmDiamond } from "../../../generated/RealmDiamond/RealmDiamond";
99
import { getOrCreateUser } from "./aavegotchi";
1010
import { BigInt } from "@graphprotocol/graph-ts";
1111
@@ -30,7 +30,7 @@ export function getOrCreateParcel(
3030
3131
log.debug("token address: {}", [tokenAddress.toHexString()]);
3232
33-
let contract = /* RealmDiamond.bind(tokenAddress); */ undefined;
33+
let contract = RealmDiamond.bind(tokenAddress);
3434
if (!contract) return;
3535
3636
let parcelInfo = contract.try_getParcelInfo(tokenId);
@@ -61,3 +61,4 @@ export function getOrCreateParcel(
6161
6262
return parcel as Parcel;
6363
}
64+
*/

0 commit comments

Comments
 (0)