|
1 | | -## Foundry |
| 1 | +# Metarang PSC Governance Coin |
2 | 2 |
|
3 | | -**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.** |
| 3 | +A decentralized governance token for the Metarang ecosystem, built with Foundry. |
4 | 4 |
|
5 | | -Foundry consists of: |
| 5 | +## Overview |
6 | 6 |
|
7 | | -- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools). |
8 | | -- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data. |
9 | | -- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network. |
10 | | -- **Chisel**: Fast, utilitarian, and verbose solidity REPL. |
| 7 | +This smart contract implements a standard governance token (ERC-20 based) that enables community-driven decision making within the Metarang platform. |
11 | 8 |
|
12 | | -## Documentation |
| 9 | +## Features |
13 | 10 |
|
14 | | -https://book.getfoundry.sh/ |
| 11 | +- Voting Power - Token holders can vote on proposals |
| 12 | +- Delegation - Delegate voting power to other addresses |
| 13 | +- Proposal Creation - Submit new governance proposals |
| 14 | +- Treasury Management - Participate in budget allocation decisions |
15 | 15 |
|
16 | | -## Usage |
| 16 | +## 🏦 Investor Vesting Contract (قرارداد قفلسازی سرمایهگذار) |
17 | 17 |
|
18 | | -### Build |
| 18 | +این پروژه شامل یک قرارداد وستینگ پلهای (Step Vesting) برای سرمایهگذاران متارنگ است که توکنهای آنها را در بازههای زمانی مشخص آزاد میکند. |
19 | 19 |
|
20 | | -```shell |
21 | | -$ forge build |
22 | | -``` |
| 20 | +### شرایط وستینگ |
23 | 21 |
|
24 | | -### Test |
| 22 | +| آیتم | مقدار | |
| 23 | +|------|-------| |
| 24 | +| تعداد مراحل | 4 مرحله | |
| 25 | +| مدت هر مرحله | 180 روز (حدود 6 ماه) | |
| 26 | +| مدت کل | 720 روز (حدود 2 سال) | |
| 27 | +| برنامه آزادسازی | 25% در هر مرحله | |
25 | 28 |
|
26 | | -```shell |
27 | | -$ forge test |
28 | | -``` |
| 29 | +### جدول آزادسازی توکنها |
29 | 30 |
|
30 | | -### Format |
| 31 | +| مرحله | زمان | درصد آزاد شده | وضعیت | |
| 32 | +|-------|------|---------------|--------| |
| 33 | +| 1 | روز صفر (همان ابتدا) | 25% | قابل برداشت فوری | |
| 34 | +| 2 | پس از 180 روز | 25% | 50% کل | |
| 35 | +| 3 | پس از 360 روز | 25% | 75% کل | |
| 36 | +| 4 | پس از 540 روز | 25% | 100% کل | |
31 | 37 |
|
32 | | -```shell |
33 | | -$ forge fmt |
34 | | -``` |
| 38 | +### توابع اصلی قرارداد |
35 | 39 |
|
36 | | -### Gas Snapshots |
| 40 | +| تابع | کاربرد | |
| 41 | +|------|--------| |
| 42 | +| releasable() | نمایش مقدار توکنهای قابل برداشت در لحظه فعلی | |
| 43 | +| release() | برداشت توکنهای آزاد شده توسط سرمایهگذار | |
| 44 | +| vestedAmount() | محاسبه مقدار کل توکنهای آزاد شده تا یک تاریخ مشخص | |
37 | 45 |
|
38 | | -```shell |
39 | | -$ forge snapshot |
40 | | -``` |
| 46 | +> نکته: قرارداد قابلیت دریافت کوین بومی شبکه (ETH) را نیز دارد. |
41 | 47 |
|
42 | | -### Anvil |
| 48 | +## Technical Stack |
43 | 49 |
|
44 | | -```shell |
45 | | -$ anvil |
46 | | -``` |
| 50 | +- Solidity ^0.8.20 |
| 51 | +- Foundry (Forge, Cast, Anvil) |
| 52 | +- EVM-compatible chains (Ethereum, Polygon, BSC) |
47 | 53 |
|
48 | | -### Deploy |
| 54 | +## Quick Start |
49 | 55 |
|
50 | | -```shell |
51 | | -$ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key> |
52 | | -``` |
| 56 | +```bash |
| 57 | +# Clone the repository |
| 58 | +git clone https://github.com/iranpsc/metarang-PSC-governance-coin.git |
53 | 59 |
|
54 | | -### Cast |
| 60 | +# Install dependencies |
| 61 | +forge install |
55 | 62 |
|
56 | | -```shell |
57 | | -$ cast <subcommand> |
58 | | -``` |
| 63 | +# Build contracts |
| 64 | +forge build |
| 65 | + |
| 66 | +# Run tests |
| 67 | +forge test |
59 | 68 |
|
60 | | -### Help |
61 | 69 |
|
62 | | -```shell |
63 | | -$ forge --help |
64 | | -$ anvil --help |
65 | | -$ cast --help |
66 | | -``` |
|
0 commit comments