1
1
import { ResolvedScriptData , ScriptInfo , SourceInterface } from "./SourceInterface" ;
2
2
import { TokenScriptEngine , ScriptSourceType } from "../../Engine" ;
3
3
4
- const HOLESKY_DEV_7738 = "0x0077380bCDb2717C9640e892B9d5Ee02Bb5e0682" ;
4
+ const REGISTRY_7738 = "0x0077380bCDb2717C9640e892B9d5Ee02Bb5e0682" ;
5
5
const HOLESKY_ID = 17000 ; // TODO: Source this from engine
6
6
const cacheTimeout = 60 * 1000 ; // 1 minute cache validity
7
7
@@ -65,17 +65,12 @@ export class RegistryScriptURI implements SourceInterface {
65
65
66
66
const chainId : number = parseInt ( chain ) ;
67
67
68
- // TODO: Remove once universal chain deployment is available
69
- if ( chainId != HOLESKY_ID ) {
70
- return [ ] ;
71
- }
72
-
73
68
const provider = await this . context . getWalletAdapter ( ) ;
74
69
let uri : string | string [ ] | null ;
75
70
76
71
try {
77
72
uri = Array . from ( await provider . call (
78
- chainId , HOLESKY_DEV_7738 , "scriptURI" , [
73
+ chainId , REGISTRY_7738 , "scriptURI" , [
79
74
{
80
75
internalType : "address" ,
81
76
name : "" ,
@@ -99,11 +94,6 @@ export class RegistryScriptURI implements SourceInterface {
99
94
100
95
const chainId : number = parseInt ( chain ) ;
101
96
102
- // TODO: Remove once universal chain deployment is available
103
- if ( chainId != HOLESKY_ID ) {
104
- return [ ] ;
105
- }
106
-
107
97
// use 1 minute persistence fetch cache
108
98
let cachedResult = this . checkCachedMetaData ( chain , contractAddr ) ;
109
99
@@ -116,7 +106,7 @@ export class RegistryScriptURI implements SourceInterface {
116
106
117
107
try {
118
108
scriptSourceData = Array . from ( await provider . call (
119
- chainId , HOLESKY_DEV_7738 , "scriptData" , [
109
+ chainId , REGISTRY_7738 , "scriptData" , [
120
110
{
121
111
internalType : "address" ,
122
112
name : "contractAddress" ,
@@ -167,6 +157,10 @@ export class RegistryScriptURI implements SourceInterface {
167
157
for ( let i = 0 ; i < scriptSourceData . length ; i ++ ) {
168
158
const thisSourceData = scriptSourceData [ i ] ;
169
159
160
+ if ( thisSourceData . tokenId == 0 ) {
161
+ continue ;
162
+ }
163
+
170
164
sourceElements . push ( {
171
165
name : thisSourceData . name ,
172
166
icon : this . context . processIpfsUrl ( thisSourceData . iconURI ) ,
0 commit comments