Skip to content

Commit d3fb094

Browse files
committed
New command groups into the CLI & enhance README with WHETU, Staking, Subnet, and AMM commands
- Expanded README to include new commands for WHETU operations, staking, subnet management, and AMM functionalities. - Integrated new command groups into the CLI for better user experience and functionality.
1 parent f1dc917 commit d3fb094

23 files changed

+7437
-1
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The MIT License (MIT)
2-
Copyright © 2021 Hetu project
2+
Copyright © 2025 Hetu project
33

44
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
55
documentation files (the “Software”), to deal in the Software without restriction, including without limitation

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,41 @@ hetucli wallet balance <address> --rpc <rpc_url>
104104
hetucli tx send --private-key <key> --to <address> --value <hetu> --rpc <rpc_url>
105105
```
106106

107+
### Configuration
108+
109+
Set the contract address
110+
111+
```bash
112+
hetucli c set whetu_address <address>
113+
hetucli c set staking_address <address>
114+
hetucli c set subnet_address <address>
115+
hetucli c set whetu_address <address>
116+
```
117+
118+
### WHETU
119+
120+
```bash
121+
hetucli whetu deposit --contract <address> --sender <address> --value <amount>
122+
hetucli whetu withdraw --contract <address> --sender <address> --amount <amount>
123+
hetucli whetu balance-of --contract <address> --account <address>
124+
hetucli whetu transfer --contract <address> --to <address> --value <amount> --sender <address>
125+
hetucli whetu approve --contract <address> --spender <address> --value <amount> --sender <address>
126+
hetucli whetu total-eth --contract <address>
127+
hetucli whetu total-supply --contract <address>
128+
hetucli whetu nonces --contract <address> --owner <address>
129+
```
130+
131+
### Staking, Subnet, Swap
132+
133+
```bash
134+
hetucli stake total-staked --contract <address>
135+
hetucli stake add-stake --contract <address> --sender <address> --amount <amount>
136+
hetucli subnet next-netuid --contract <address>
137+
hetucli subnet register-network --contract <address> --sender <address> --name ... --description ... --token-name ... --token-symbol ...
138+
hetucli amm alpha-price --contract <address>
139+
hetucli amm swap-hetu-for-alpha --contract <address> --sender <address> --hetu-amount-in <amount> --alpha-amount-out-min <amount> --to <address>
140+
```
141+
107142
### Contract call
108143
```bash
109144
hetucli contract call --address <contract_addr> --abi-path <abi.json> --function <fn> --args "1,2,3" --rpc <rpc_url>

0 commit comments

Comments
 (0)