Skip to main content

src/hooks/useDeploymentTracker

4626-miniapp


4626-miniapp / src/hooks/useDeploymentTracker

src/hooks/useDeploymentTracker

Interfaces

DeploymentRecord

Defined in: hooks/useDeploymentTracker.ts:8

Deployment record stored in localStorage. Tracks a single deployment per owner address per deployment version.

Properties

contracts

contracts: object

Defined in: hooks/useDeploymentTracker.ts:18

Deployed contract addresses

burnStream?

optional burnStream: `0x${string}`

ccaStrategy?

optional ccaStrategy: `0x${string}`

gaugeController?

optional gaugeController: `0x${string}`

oracle?

optional oracle: `0x${string}`

payoutRouter?

optional payoutRouter: `0x${string}`

shareOFT

shareOFT: `0x${string}`

vault

vault: `0x${string}`

wrapper

wrapper: `0x${string}`

creatorToken

creatorToken: `0x${string}`

Defined in: hooks/useDeploymentTracker.ts:10

The creator token (Zora coin) address deployed for

deployedAt

deployedAt: number

Defined in: hooks/useDeploymentTracker.ts:16

Unix timestamp (ms) when deployment completed

owner

owner: `0x${string}`

Defined in: hooks/useDeploymentTracker.ts:12

The owner address (canonical Zora Coinbase Smart Wallet)

txHashes?

optional txHashes: object

Defined in: hooks/useDeploymentTracker.ts:29

Transaction hashes for each phase

phase1?

optional phase1: string

phase2?

optional phase2: string

phase3?

optional phase3: string

phase4?

optional phase4: string

version

version: string

Defined in: hooks/useDeploymentTracker.ts:14

Deployment version from VITE_DEPLOYMENT_VERSION

Functions

getDeploymentForOwnerVersion()

getDeploymentForOwnerVersion(owner, version): DeploymentRecord | null

Defined in: hooks/useDeploymentTracker.ts:65

Retrieves deployment for a specific owner and version.

Parameters

owner

`0x${string}`

version

string

Returns

DeploymentRecord | null


getDeploymentsForOwner()

getDeploymentsForOwner(owner): DeploymentRecord[]

Defined in: hooks/useDeploymentTracker.ts:50

Retrieves all deployments for a given owner across all versions.

Parameters

owner

`0x${string}`

Returns

DeploymentRecord[]


getDeploymentVersion()

getDeploymentVersion(): string

Defined in: hooks/useDeploymentTracker.ts:160

Utility to get the current deployment version from env.

Returns

string


useDeploymentTracker()

useDeploymentTracker(owner, version): object

Defined in: hooks/useDeploymentTracker.ts:107

Hook to track deployments per owner address per version. Enforces 1 deployment per owner per VITE_DEPLOYMENT_VERSION.

Parameters

owner

`0x${string}` | null

version

string

Returns

allDeployments

allDeployments: DeploymentRecord[]

All deployments for this owner across all versions

existingDeployment

existingDeployment: DeploymentRecord | null

The existing deployment record (if any)

hasDeployed

hasDeployed: boolean

Whether the owner has already deployed in this version

recordDeployment()

recordDeployment: (params) => DeploymentRecord | null

Record a new deployment

Parameters
params
contracts

{ burnStream?: `0x${string}`; ccaStrategy?: `0x${string}`; gaugeController?: `0x${string}`; oracle?: `0x${string}`; payoutRouter?: `0x${string}`; shareOFT: `0x${string}`; vault: `0x${string}`; wrapper: `0x${string}`; }

contracts.burnStream?

`0x${string}`

contracts.ccaStrategy?

`0x${string}`

contracts.gaugeController?

`0x${string}`

contracts.oracle?

`0x${string}`

contracts.payoutRouter?

`0x${string}`

contracts.shareOFT

`0x${string}`

contracts.vault

`0x${string}`

contracts.wrapper

`0x${string}`

creatorToken

`0x${string}`

txHashes?

{ phase1?: string; phase2?: string; phase3?: string; phase4?: string; }

txHashes.phase1?

string

txHashes.phase2?

string

txHashes.phase3?

string

txHashes.phase4?

string

Returns

DeploymentRecord | null