Skip to content

Commit c379c81

Browse files
Open up the 7738 registry
1 parent 3730fdd commit c379c81

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

javascript/engine-js/src/repo/sources/RegistryScriptURI.ts

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {ResolvedScriptData, ScriptInfo, SourceInterface} from "./SourceInterface";
22
import {TokenScriptEngine, ScriptSourceType} from "../../Engine";
33

4-
const HOLESKY_DEV_7738 = "0x0077380bCDb2717C9640e892B9d5Ee02Bb5e0682";
4+
const REGISTRY_7738 = "0x0077380bCDb2717C9640e892B9d5Ee02Bb5e0682";
55
const HOLESKY_ID = 17000; // TODO: Source this from engine
66
const cacheTimeout = 60 * 1000; // 1 minute cache validity
77

@@ -65,17 +65,12 @@ export class RegistryScriptURI implements SourceInterface {
6565

6666
const chainId: number = parseInt(chain);
6767

68-
// TODO: Remove once universal chain deployment is available
69-
if (chainId != HOLESKY_ID) {
70-
return [];
71-
}
72-
7368
const provider = await this.context.getWalletAdapter();
7469
let uri: string|string[]|null;
7570

7671
try {
7772
uri = Array.from(await provider.call(
78-
chainId, HOLESKY_DEV_7738, "scriptURI", [
73+
chainId, REGISTRY_7738, "scriptURI", [
7974
{
8075
internalType: "address",
8176
name: "",
@@ -99,11 +94,6 @@ export class RegistryScriptURI implements SourceInterface {
9994

10095
const chainId: number = parseInt(chain);
10196

102-
// TODO: Remove once universal chain deployment is available
103-
if (chainId != HOLESKY_ID) {
104-
return [];
105-
}
106-
10797
// use 1 minute persistence fetch cache
10898
let cachedResult = this.checkCachedMetaData(chain, contractAddr);
10999

@@ -116,7 +106,7 @@ export class RegistryScriptURI implements SourceInterface {
116106

117107
try {
118108
scriptSourceData = Array.from(await provider.call(
119-
chainId, HOLESKY_DEV_7738, "scriptData", [
109+
chainId, REGISTRY_7738, "scriptData", [
120110
{
121111
internalType: "address",
122112
name: "contractAddress",
@@ -167,6 +157,10 @@ export class RegistryScriptURI implements SourceInterface {
167157
for (let i = 0; i < scriptSourceData.length; i++) {
168158
const thisSourceData = scriptSourceData[i];
169159

160+
if (thisSourceData.tokenId == 0) {
161+
continue;
162+
}
163+
170164
sourceElements.push({
171165
name: thisSourceData.name,
172166
icon: this.context.processIpfsUrl(thisSourceData.iconURI),

0 commit comments

Comments
 (0)