File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -292,9 +292,9 @@ export const CHAIN_IDS: Record<string, number> = {
292292 'plasma-testnet' : 9746 ,
293293}
294294
295- export function chainIdOption ( chainId ?: string ) : number {
295+ export function chainIdOption ( chainId ?: string ) : number | undefined {
296296 if ( chainId == null ) {
297- return 1
297+ return undefined
298298 }
299299
300300 // @ts -expect-error - chainId is a string
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ squid-evm-typegen src/abi 0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413#contract
7676 multicall ?: boolean
7777 etherscanApi ?: string
7878 etherscanApiKey ?: string
79- chainId : number
79+ chainId ? : number
8080 etherscanChainId ?: number
8181 }
8282 let dest = new OutDir ( program . processedArgs [ 0 ] )
@@ -119,7 +119,7 @@ async function read(
119119 spec : Spec ,
120120 options : {
121121 etherscanApi ?: string ;
122- chainId : number
122+ chainId ? : number
123123 etherscanApiKey ?: string ,
124124 } ,
125125) : Promise < any > {
@@ -258,7 +258,7 @@ interface EtherscanAPIConfig {
258258function getEtherscanAPIConfig ( options : {
259259 etherscanApi ?: string
260260 etherscanApiKey ?: string
261- chainId : number
261+ chainId ? : number
262262} ) : EtherscanAPIConfig {
263263 let api : string
264264 if ( options . etherscanApi != null ) {
@@ -272,7 +272,7 @@ function getEtherscanAPIConfig(options: {
272272 return {
273273 api,
274274 apiKey : options . etherscanApiKey || undefined ,
275- chainId : options . chainId ,
275+ chainId : options . chainId ?? 1 ,
276276 }
277277}
278278
You can’t perform that action at this time.
0 commit comments