Skip to content

Spin Up Local Testnet and Integrate Cairo Smart Contract on deWhitepaper Page #12

@jedstroke

Description

@jedstroke

Description

Now that the Cairo version of the BigIncGenesis smart contract is complete, we need to:

  1. Spin up a Starknet local testnet environment.
  2. Deploy the smart contract to this local testnet.
  3. Create mock USDT and USDC (ERC20) tokens compatible with Cairo/Starknet.
  4. Integrate the smart contract into the deWhitepaper page (like we did with WalletConnect, WAGMI & Veim).
  5. Enable read/write operations that power a pie chart showing the shares on-chain.

🔗 Dependency

This issue depends on the completion of Issue #7 – Starknet-React impl, for frontend contract interaction. Please ensure the contract is compiled, deployed locally, and exposes the required share-tracking functions before proceeding with integration on the deWhitepaper page.

Collaborators working on this issue should:

  • Coordinate with the smart contract team for ABI definitions and contract addresses.
  • Use the same mock token contracts deployed during testing.
  • Keep devnet deployments in sync with the frontend branch consuming the test environment.

⚙️ Tasks

🔧 Local Setup

  • Install and spin up the modern Starknet devnet stack:

    Install Scarb

    Install Starkli

    Install Katana

    Start Devnet

  • Deploy:

    • Cairo version of BigIncGenesis.
    • Mock ERC20s (USDT, USDC) with 6 decimals.
    • Use test wallets generated by Katana.

🌐 Frontend Integration

  • Use starknet-react to connect to the local Katana devnet.
  • Create reusable hooks/utilities for:
    • Reading total shares.
    • And append the blockchain data on the deWhitepaper text respectively in the previous porting
    • Reading user shares.
    • Minting shares using mock USDT/USDC.
  • Modify the ShareChart.tsx and ShareModal.tsx component:
    • Reads shareholders from the smart contract.
    • Displays ownership visually as a pie chart.
    • Includes wallet addresses and percentage ownership.
  • Mount the pie chart into the deWhitepaper page layout.

✅ Acceptance Criteria

  • Local testnet runs with deployed contract + tokens.
  • The deWhitepaper page connects to the local Starknet contract.
  • Users can mint shares using mock USDT/USDC from devnet wallets.
  • The pie chart reflects on-chain shareholder data live.

Metadata

Metadata

Assignees

Labels

onlydust-waveContribute to awesome OSS repos during OnlyDust's open source week

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions