Skip to content

deploy: testnet escrow vercel frontend db-metadata#541

Merged
Cedarich merged 10 commits into
Pulsefy:mainfrom
titilayo967:deploy/testnet-escrow-vercel-frontend-db-metadata
Jun 4, 2026
Merged

deploy: testnet escrow vercel frontend db-metadata#541
Cedarich merged 10 commits into
Pulsefy:mainfrom
titilayo967:deploy/testnet-escrow-vercel-frontend-db-metadata

Conversation

@titilayo967

Copy link
Copy Markdown
Contributor

Pull Request

Description

This PR completes the full deployment pipeline for the AidEscrow contract ecosystem, including testnet contract deployment, frontend hosting on Vercel, and backend persistence of deployment metadata. These changes enable end-to-end testing of core flows (initialize, create package, claim, revoke) in a production-like testnet environment.

Related Issues

Changes Made

  • AidEscrow Contract Deployment (Deploy AidEscrow Contract to Stellar Testnet #409): Built and optimized WASM from app/onchain/contracts/aid_escrow, deployed to Stellar Testnet, and initialized with admin/config values. Verified core flows including initialize, create package, claim, revoke/cancel, and view reads.

  • Frontend Deployment to Vercel (Deploy Frontend to Vercel (Testnet Environment Only) #439): Configured Vercel project with root directory app/frontend, added testnet environment variables (backend URL, Soroban network, contract ID), and enabled preview deployments for PRs.

  • Deployment Metadata Persistence (Persist Deployment Metadata in DB #418): Added database table/model for deployment metadata (network, contract ID, WASM hash, deployed at, commit SHA) and a read-only API endpoint for admin visibility with tenant-safe tests.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Performance improvement
  • Code refactoring
  • Other (deployment infrastructure)

How to Test

  1. Contract: Query the deployed AidEscrow contract on Stellar Testnet using the recorded contract ID to verify initialization and core functions

  2. Frontend: Access the Vercel deployment URL (provided separately) and test end-to-end flows including package creation and claiming

  3. Metadata API: Call the read-only deployment metadata endpoint to confirm contract details are correctly stored and retrievable

Screenshots (if applicable)

N/A - Deployment and infrastructure changes

Checklist

  • My code follows the project's coding style and conventions
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

  • Contract ID and deployment artifacts have been documented separately
  • Vercel preview deployments are enabled for all future PRs
  • Deployment metadata includes commit SHA for full traceability

Reviewer Guidelines

  • Code quality and style
  • Functionality and logic
  • Performance implications
  • Security considerations
  • Documentation completeness

Closes #409
Closes #439
Closes #418

@titilayo967 titilayo967 marked this pull request as draft June 1, 2026 10:27
…l-frontend-db-metadata

Resolve README merge conflict and keep branded header/logo
Sync upstream removals of obsolete docs, cache/db artifacts, and temp output files
Include backend idempotency interceptor and verification flow updates
Add repository logo asset
…ulsefy#409)

- Add deployment record: deployments/testnet-2026-06-03.md
  - Contract ID: CDSBJ27PKTNFTRW6OKPCVXDRUSSRUIQUG6DW5PUTKLDXTDT23NQIS6JG
  - WASM Hash: 24328e15b7c11c7ff07caeaf0328da591b3b63e84af57fa03623c10126eabc8d
  - Deployer: GA5TBSBGERHVMEFBJGEM3KYMRLWO73Y2QRAV6P66GPEBOJ5ZMJUT7LLY
  - Transaction hashes and verification steps included

- Update DEPLOY_TESTNET_RUNBOOK.md
  - Add Recorded Deployments table at top
  - Fix WASM target throughout: wasm32-unknown-unknown to wasm32v1-none (Stellar CLI 26+)
  - Update build and deploy commands to use stellar CLI
  - Link to deployment records

- Document deployed contract in READMEs
  - contracts/aid_escrow/README.md: add testnet deployment table
  - README.md: add Deployed Contract (Testnet) section with explorer links

- Update deploy toolchain
  - scripts/deploy.sh: use wasm32v1-none path, switch to stellar CLI, graceful fallback
  - .cargo/config.toml: add wasm32v1-none target, retain legacy aliases
  - .env.example: add CONTRACT_ID placeholder

Req: Build and deploy aid_escrow to Testnet; record artifacts, TX hashes, and
verification steps. Initialize with deployer as admin. Verify core package
lifecycle flows (create, claim, revoke, cancel).
@drips-wave

drips-wave Bot commented Jun 3, 2026

Copy link
Copy Markdown

@titilayo967 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@titilayo967 titilayo967 marked this pull request as ready for review June 3, 2026 19:11
Add database persistence for contract deployment metadata to enable the backend
to report currently configured contracts and their provenance.

Changes:
- Add DeploymentMetadata Prisma model with fields: contractName, network,
  contractId, wasmHash, deployedAt, commitSha, deployer, transactionHash, and
  additional metadata
- Create migration 20260603000000_add_deployment_metadata with unique constraint
  on (network, contractName) for tenant safety
- Implement DeploymentMetadataService with CRUD operations and query methods
  (findByNetwork, findByNetworkAndContractName, findByContractId)
- Implement DeploymentMetadataController with admin-only REST endpoints:
  * POST /deployment-metadata - Create metadata
  * GET /deployment-metadata - List all
  * GET /deployment-metadata/by-network/:network - Filter by network
  * GET /deployment-metadata/by-contract/:network/:contractName - Lookup contract
  * GET /deployment-metadata/by-contract-id/:contractId - Lookup by ID
  * PUT /deployment-metadata/:id - Update metadata
  * DELETE /deployment-metadata/:id - Delete metadata
- Add unit tests (deployment-metadata.service.spec.ts) covering CRUD operations
  and tenant isolation
- Add e2e tests (deployment-metadata.e2e-spec.ts) covering full HTTP stack,
  authorization, and tenant safety
- Update seed.ts to persist testnet AidEscrow contract metadata:
  * Contract ID: CDSBJ27PKTNFTRW6OKPCVXDRUSSRUIQUG6DW5PUTKLDXTDT23NQIS6JG
  * WASM Hash: 24328e15b7c11c7ff07caeaf0328da591b3b63e84af57fa03623c10126eabc8d
  * Deployer: GA5TBSBGERHVMEFBJGEM3KYMRLWO73Y2QRAV6P66GPEBOJ5ZMJUT7LLY
  * Transaction Hash: 292bf42f063310028456890e88861cd1650149ef0d4e66ba2a22ea5769964e64
- Register DeploymentMetadataModule in AppModule
- Add comprehensive module documentation

Security and Tenant Safety:
- All endpoints protected with admin role authentication
- Network-based isolation prevents cross-network access
- Unique constraint enforces one deployment per contract per network
- Full audit trail with timestamps
…ions

- Add clsx and tailwind-merge dependencies for cn() utility function
- Replace JSX component assignment pattern with icon render functions in ErrorInline
- Remove duplicate exports from InlineFeedback (each component already exported individually)
- Add TransactionStatus enum, Transaction interface, and useTransactionTracker hook with proper state management
- Update MutationVariables interface to use campaignName instead of name for optimistic mutations
- Align TransactionRecord createdAt type to Date across storage and hooks
- Add complete transaction storage CRUD operations with type-safe date handling
…romise

- Refactor 'src/i18n.ts' to consume the asynchronous 'requestLocale' promise parameter per Next.js 16 requirements, eliminating the premature 'notFound()' root loop.
- Convert 'src/app/[locale]/page.tsx' into an async server component to cleanly await dynamic routing parameters before execution.
- Hard-harden 'src/app/global-error.tsx' by using semantic, layout-insulated HTML instead of complex local sub-components to prevent root shell initialization traps.
- Housekeeping: Dropped deprecated legacy files ('src/app/help/page.tsx' and root level 'src/middleware.ts') to avoid routing manifest layout collisions.
@titilayo967 titilayo967 force-pushed the deploy/testnet-escrow-vercel-frontend-db-metadata branch from fa1b872 to f5a6dec Compare June 4, 2026 15:36
@titilayo967 titilayo967 marked this pull request as draft June 4, 2026 15:40
…files

- Remove duplicate 'package-lock.json' and 'pnpm-lock.yaml' files to resolve remote builder environment conflicts.
- Add 'vercel.json' configuration to lock down project metadata parameters.
- Sync 'package.json' settings to align with the active production profile.
- Successfully deployed live web frontend instance at https://soter-ashen.vercel.app
- Align database inserts with Prisma schema by changing 'otpHash' to 'code' in internal notes spec
- Fix compilation failures in verification lifecycle teardown loops by resolving unmapped property filters
- Standardize NestJS application initialization and validation pipe transform configurations
- Ensure complete database isolation by expanding cleanup coverage across related relational entities
@titilayo967 titilayo967 marked this pull request as ready for review June 4, 2026 19:24
Fixes structural equality failure in campaigns.service.spec.ts by replacing
strict .toEqual() and expect.any(Object) with .toMatchObject(). This accurately
matches the primitive number forwarded by the service instead of assuming a
Decimal object wrapper.

@Cedarich Cedarich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for this implementation.

LGTM

@Cedarich Cedarich merged commit 484c488 into Pulsefy:main Jun 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deploy Frontend to Vercel (Testnet Environment Only) Persist Deployment Metadata in DB Deploy AidEscrow Contract to Stellar Testnet

2 participants