58 lines
1.5 KiB
Markdown
58 lines
1.5 KiB
Markdown
# EDUT Contracts
|
|
|
|
On-chain contracts and deployment artifacts for membership and entitlements.
|
|
|
|
## Scope
|
|
|
|
1. Human membership contract (soulbound governance identity).
|
|
2. Offer registry contract interfaces.
|
|
3. Entitlement contract interfaces.
|
|
4. ABI and deployment artifact publication.
|
|
|
|
## Current Contract
|
|
|
|
`contracts/EdutHumanMembership.sol`
|
|
|
|
Features:
|
|
|
|
1. One-time soulbound human token mint.
|
|
2. Sponsor mint support (`mintMembership(recipient)` can be paid by inviter/company wallet).
|
|
3. Owner-configurable flat mint price (`updateMintPrice`), launch default can stay flat `$5` equivalent.
|
|
4. Membership status lifecycle (`ACTIVE/SUSPENDED/REVOKED`) for runtime gates.
|
|
5. Treasury address control for settlement routing.
|
|
|
|
## Local Commands
|
|
|
|
Use a Hardhat-supported Node runtime (`20.x` recommended).
|
|
|
|
1. `npm install`
|
|
2. `npm run build`
|
|
3. `npm run test`
|
|
4. `npm run deploy:sepolia`
|
|
5. `npm run deploy:mainnet`
|
|
|
|
`make check` wraps build + tests.
|
|
|
|
## Deployment Environment
|
|
|
|
Copy `.env.example` values into your shell/session before deploy:
|
|
|
|
1. `DEPLOYER_PRIVATE_KEY`
|
|
2. `BASE_SEPOLIA_RPC_URL` / `BASE_MAINNET_RPC_URL`
|
|
3. `TREASURY_WALLET`
|
|
4. `MINT_CURRENCY_ADDRESS` (`0x000...000` for ETH)
|
|
5. `MINT_AMOUNT_ATOMIC`
|
|
6. `DEPLOY_OUTPUT_PATH` (optional)
|
|
|
|
Example (Sepolia):
|
|
|
|
```bash
|
|
cd /Users/vsg/Documents/VSG\ Codex/contracts
|
|
export $(grep -v '^#' .env | xargs)
|
|
npm run deploy:sepolia
|
|
```
|
|
|
|
## Boundary
|
|
|
|
Contracts are settlement primitives. Runtime execution remains off-chain and fail-closed by entitlement state.
|