Skip to content

dephy-io/dephy-id-evm

Repository files navigation

DePHY ID on EVM

The DePHY ID Solidity smart contracts mono repo

Contents

  • Contracts
  • E2E test: A brief way to show how the DePHY ID works for developers
  • Test: Standard foundry smart contract tests.
  • Script: Contracts deployment scripts.
  • Extensions: A proxy wallet of the product owner.
  • Templates: A vendor contract template and cli.
  • Tools: Consists of contracts interactive typescript sdk, react demo and device simulator.

Contract addresses

Deployed contract addresses is stored in addresses.json.

Build

pnpm run build

Test / E2E Test

pnpm run e2e

Deployment

Below are the commands for deploying your application to various networks:

  • Deploy to Base Mainnet/Testnet
pnpm run deploy:base
pnpm run deploy:base_sepolia
  • Deploy to BNB Smart Chain Mainnet/Testnet
pnpm run deploy:bnb
pnpm run deploy:bnb_testnet

Ensure you have a .env file configured with the necessary RPC URLs and private key before running these commands.

Upgrade

First set ProductFactory proxy address:

PROXY=

Then execute UpgradeProductFactory.s.sol script:

forge script script/UpgradeProductFactory.s.sol --rpc-url {RPC} --broadcast

ProductFactoryV2 implementation is mounted to proxy now.