diff --git a/packages/builder/src/runtime.ts b/packages/builder/src/runtime.ts index 3d284befa..a57bdd4fa 100644 --- a/packages/builder/src/runtime.ts +++ b/packages/builder/src/runtime.ts @@ -88,11 +88,6 @@ export class CannonStorage extends EventEmitter { const deployInfo: DeploymentInfo = await this.readBlob(uri); - // Some old packages do not have the chainId saved in artifacts and it is expected - if (!deployInfo.chainId) { - deployInfo.chainId = chainId; - } - return deployInfo; } diff --git a/packages/builder/src/types.ts b/packages/builder/src/types.ts index eb4a7469e..c6927ace4 100644 --- a/packages/builder/src/types.ts +++ b/packages/builder/src/types.ts @@ -254,7 +254,7 @@ export type DeploymentInfo = { miscUrl: string; // EVM chain which this deployment is for - chainId?: number; + chainId: number; }; export type DeploymentManifest = { diff --git a/packages/website/src/features/Deploy/QueueFromGitOpsPage.tsx b/packages/website/src/features/Deploy/QueueFromGitOpsPage.tsx index 106c20dc7..2895d397e 100644 --- a/packages/website/src/features/Deploy/QueueFromGitOpsPage.tsx +++ b/packages/website/src/features/Deploy/QueueFromGitOpsPage.tsx @@ -43,7 +43,11 @@ import { Stack, } from '@chakra-ui/react'; import { useConnectModal } from '@rainbow-me/rainbowkit'; -import { ChainBuilderContext, PackageReference } from '@usecannon/builder'; +import { + ChainBuilderContext, + PackageReference, + DeploymentInfo, +} from '@usecannon/builder'; import _ from 'lodash'; import NextLink from 'next/link'; import { useRouter } from 'next/navigation'; @@ -255,7 +259,7 @@ function QueueFromGitOps() { const uploadToPublishIpfs = useCannonWriteDeployToIpfs( buildInfo.buildResult?.runtime, cannonDefInfo.def - ? { + ? ({ generator: `cannon website ${pkg.version}`, timestamp: Math.floor(Date.now() / 1000), def: cannonDefInfo.def.toJson(), @@ -263,7 +267,8 @@ function QueueFromGitOps() { options: prevCannonDeployInfo.pkg?.options || {}, meta: prevCannonDeployInfo.pkg?.meta, miscUrl: prevCannonDeployInfo.pkg?.miscUrl || '', - } + chainId, + } satisfies DeploymentInfo) : undefined, prevCannonDeployInfo.metaUrl );