Skip to content

Contracts - Add deployment and initialization script under contracts for testnet #485

@1nonlypiece

Description

@1nonlypiece

Contracts - Add deployment and initialization script under contracts for testnet

Description

There is no scripted deploy for the escrow contract. Add a script that builds, deploys, and initializes the contract on Stellar testnet using the stellar CLI, wiring the resulting contract id into the env vars consumed by src/lib/backend/config.ts.

Requirements and context

  • Must be secure, tested, and documented
  • Should be efficient and easy to review
  • Build with stellar contract build against contracts/Cargo.toml
  • Deploy and call initialize(admin, token, fee_recipient)
  • Output the contract id for NEXT_PUBLIC_COMMITMENT_CORE_CONTRACT
  • Keep secrets out of the script (read from env)

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b feature/contracts-testnet-deploy-script
  • Implement changes
    • Add contracts/scripts/deploy-testnet.sh
    • Add a dry-run test or lint where feasible
    • Document the deploy flow in contracts/README.md
    • Add env-var safety comments
  • Test and commit
    • Run tests, cover edge cases
    • Include test output and notes

Example commit message

feat: add testnet deploy and init script for escrow contract

Guidelines

  • Minimum 95 percent test coverage
  • Clear documentation
  • Timeframe: 96 hours

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions