tusdt-cli 0.1.4__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tusdt_cli-0.1.4 → tusdt_cli-0.2.0}/.gitignore +2 -1
- {tusdt_cli-0.1.4 → tusdt_cli-0.2.0}/PKG-INFO +126 -19
- {tusdt_cli-0.1.4 → tusdt_cli-0.2.0}/README.md +123 -18
- tusdt_cli-0.2.0/pyproject.toml +82 -0
- {tusdt_cli-0.1.4 → tusdt_cli-0.2.0}/src/tusdt_cli/__init__.py +1 -1
- {tusdt_cli-0.1.4 → tusdt_cli-0.2.0}/src/tusdt_cli/abi/tusdt_auction.json +34 -12
- {tusdt_cli-0.1.4 → tusdt_cli-0.2.0}/src/tusdt_cli/abi/tusdt_erc20.json +7 -3
- tusdt_cli-0.2.0/src/tusdt_cli/abi/tusdt_governance.json +5272 -0
- {tusdt_cli-0.1.4 → tusdt_cli-0.2.0}/src/tusdt_cli/abi/tusdt_oracle.json +19 -7
- tusdt_cli-0.2.0/src/tusdt_cli/abi/tusdt_treasury.json +1345 -0
- {tusdt_cli-0.1.4 → tusdt_cli-0.2.0}/src/tusdt_cli/abi/tusdt_vault.json +408 -77
- {tusdt_cli-0.1.4 → tusdt_cli-0.2.0}/src/tusdt_cli/cli.py +73 -31
- {tusdt_cli-0.1.4 → tusdt_cli-0.2.0}/src/tusdt_cli/client.py +340 -32
- {tusdt_cli-0.1.4 → tusdt_cli-0.2.0}/src/tusdt_cli/commands/auction.py +95 -63
- tusdt_cli-0.2.0/src/tusdt_cli/commands/governance.py +1466 -0
- {tusdt_cli-0.1.4 → tusdt_cli-0.2.0}/src/tusdt_cli/commands/oracle.py +111 -58
- {tusdt_cli-0.1.4 → tusdt_cli-0.2.0}/src/tusdt_cli/commands/token.py +30 -15
- tusdt_cli-0.2.0/src/tusdt_cli/commands/treasury.py +417 -0
- {tusdt_cli-0.1.4 → tusdt_cli-0.2.0}/src/tusdt_cli/commands/vault.py +310 -74
- {tusdt_cli-0.1.4 → tusdt_cli-0.2.0}/src/tusdt_cli/config.py +20 -5
- {tusdt_cli-0.1.4 → tusdt_cli-0.2.0}/src/tusdt_cli/utils.py +16 -10
- {tusdt_cli-0.1.4 → tusdt_cli-0.2.0}/src/tusdt_cli/wallet.py +18 -18
- tusdt_cli-0.1.4/pyproject.toml +0 -40
- {tusdt_cli-0.1.4 → tusdt_cli-0.2.0}/LICENSE +0 -0
- {tusdt_cli-0.1.4 → tusdt_cli-0.2.0}/requirements.txt +0 -0
- {tusdt_cli-0.1.4 → tusdt_cli-0.2.0}/src/tusdt_cli/commands/__init__.py +0 -0
- {tusdt_cli-0.1.4 → tusdt_cli-0.2.0}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tusdt-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: CLI for interacting with the TUSDT ink! smart contract system on subtensor(bittensor)
|
|
5
5
|
Project-URL: Homepage, https://github.com/tensorusd/tusdt-cli
|
|
6
6
|
Project-URL: Repository, https://github.com/tensorusd/tusdt-cli
|
|
@@ -17,6 +17,8 @@ Requires-Dist: click>=8.1.0
|
|
|
17
17
|
Requires-Dist: pynacl>=1.5.0
|
|
18
18
|
Requires-Dist: rich>=13.0.0
|
|
19
19
|
Requires-Dist: substrate-interface>=1.7.0
|
|
20
|
+
Provides-Extra: dev
|
|
21
|
+
Requires-Dist: ruff>=0.11.0; extra == 'dev'
|
|
20
22
|
Description-Content-Type: text/markdown
|
|
21
23
|
|
|
22
24
|
# tusdt-cli
|
|
@@ -30,6 +32,8 @@ USD-pegged stablecoin. This CLI gives you full control over:
|
|
|
30
32
|
- **Token** — check balances, transfer TUSDT, and manage spending approvals
|
|
31
33
|
- **Auctions** — browse and bid on liquidation auctions for under-collateralised vaults
|
|
32
34
|
- **Oracle** — inspect the on-chain price feed that determines collateral ratios
|
|
35
|
+
- **Governance** — manage maintainer, council, proposals, voting, and cross-contract admin
|
|
36
|
+
- **Treasury** — manage fund balances, distribute revenue, and release funds
|
|
33
37
|
|
|
34
38
|
No web UI required — everything runs from your terminal.
|
|
35
39
|
|
|
@@ -181,6 +185,70 @@ tusdt oracle price
|
|
|
181
185
|
tusdt oracle round
|
|
182
186
|
```
|
|
183
187
|
|
|
188
|
+
### 6. Governance operations
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
# View maintainer and council
|
|
192
|
+
tusdt governance maintainer
|
|
193
|
+
tusdt governance council
|
|
194
|
+
|
|
195
|
+
# Check if an account is on the council
|
|
196
|
+
tusdt governance is-council 5GrwvaEF...
|
|
197
|
+
|
|
198
|
+
# View governance parameters and current epoch
|
|
199
|
+
tusdt governance params
|
|
200
|
+
tusdt governance current-epoch
|
|
201
|
+
|
|
202
|
+
# View proposals
|
|
203
|
+
tusdt governance proposal-count
|
|
204
|
+
tusdt governance get-proposal 0
|
|
205
|
+
|
|
206
|
+
# Check if a (coldkey, hotkey) pair has voted
|
|
207
|
+
tusdt governance has-voted 0 --coldkey 5GrwvaEF... --hotkey 5GrwvaEF...
|
|
208
|
+
|
|
209
|
+
# View quorum for an epoch
|
|
210
|
+
tusdt governance quorum 42
|
|
211
|
+
|
|
212
|
+
# Submit a proposal
|
|
213
|
+
tusdt governance submit-proposal \
|
|
214
|
+
--cid "QmXyz..." --kind non-funding \
|
|
215
|
+
--hotkey 5GrwvaEF... --wallet-name MyWallet
|
|
216
|
+
|
|
217
|
+
# Cast a vote
|
|
218
|
+
tusdt governance vote 0 \
|
|
219
|
+
--hotkey 5GrwvaEF... --support \
|
|
220
|
+
--balance 1000 --multiplier-bps 10000 \
|
|
221
|
+
--proof 0xabcdef --wallet-name MyWallet
|
|
222
|
+
|
|
223
|
+
# Finalize and execute a proposal
|
|
224
|
+
tusdt governance finalize-proposal 0 --wallet-name MyWallet
|
|
225
|
+
tusdt governance execute-proposal 0 --wallet-name MyWallet
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### 7. Treasury operations
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
# View treasury governance and token address
|
|
232
|
+
tusdt treasury governance
|
|
233
|
+
tusdt treasury token
|
|
234
|
+
|
|
235
|
+
# Check fund balances
|
|
236
|
+
tusdt treasury fund-balance-tusdt emergency
|
|
237
|
+
tusdt treasury fund-balance-native insurance
|
|
238
|
+
|
|
239
|
+
# View pending distributions
|
|
240
|
+
tusdt treasury pending-tusdt
|
|
241
|
+
tusdt treasury pending-native
|
|
242
|
+
|
|
243
|
+
# Distribute pending funds
|
|
244
|
+
tusdt treasury distribute --wallet-name MyWallet
|
|
245
|
+
|
|
246
|
+
# Release funds from a fund
|
|
247
|
+
tusdt treasury release emergency \
|
|
248
|
+
--token-kind tusdt --amount 5000 \
|
|
249
|
+
--recipient 5GrwvaEF... --wallet-name MyWallet
|
|
250
|
+
```
|
|
251
|
+
|
|
184
252
|
## Network selection
|
|
185
253
|
|
|
186
254
|
Two networks are available: **finney** (mainnet, default) and **testnet**.
|
|
@@ -215,26 +283,33 @@ tusdt config set --signer "word1 word2 word3 ... word12"
|
|
|
215
283
|
|
|
216
284
|
# Override contract addresses or RPC
|
|
217
285
|
tusdt config set --rpc wss://custom-endpoint:443
|
|
218
|
-
tusdt config set --vault
|
|
286
|
+
tusdt config set --vault 5GxJ...
|
|
287
|
+
tusdt config set --governance 5CEP...
|
|
288
|
+
tusdt config set --treasury 5Fcj...
|
|
219
289
|
```
|
|
220
290
|
|
|
221
|
-
| Key
|
|
222
|
-
|
|
223
|
-
| `network`
|
|
224
|
-
| `rpc`
|
|
225
|
-
| `vault_address`
|
|
226
|
-
| `token_address`
|
|
227
|
-
| `auction_address`
|
|
228
|
-
| `oracle_address`
|
|
229
|
-
| `
|
|
230
|
-
| `
|
|
231
|
-
| `
|
|
232
|
-
| `
|
|
233
|
-
| `
|
|
234
|
-
| `
|
|
235
|
-
| `
|
|
236
|
-
| `
|
|
237
|
-
| `
|
|
291
|
+
| Key | Description | Default |
|
|
292
|
+
|------------------------|----------------------------------------|------------------------------------------------------|
|
|
293
|
+
| `network` | Active network preset | `finney` |
|
|
294
|
+
| `rpc` | WebSocket RPC endpoint | `wss://entrypoint-finney.opentensor.ai:443` |
|
|
295
|
+
| `vault_address` | Vault contract SS58 address | `5GxJw8kTpapdHRW5KUXQLVDpXMMnA61mbzS6nF6jWsEeWExV` |
|
|
296
|
+
| `token_address` | Token (ERC-20) contract SS58 address | `5CJ4HtCPdoMfdNUk6B7vZ348XryeXAnb5BmDNGejob1FziNH` |
|
|
297
|
+
| `auction_address` | Auction contract SS58 address | `5HipAvNRiuh9mpTKztPLTvwyYkhzuSqxe1wsUy1fbRwbZUbQ` |
|
|
298
|
+
| `oracle_address` | Oracle contract SS58 address | `5Dfz8xgQoCsaWWrDxjeCuKB8R6AtYymWZDDDAe2q7NE8tL8A` |
|
|
299
|
+
| `governance_address` | Governance contract SS58 address | `5CEPPTnB2YtEv7Cf8TXrFkdr6BPkDAUhDJbiT38t1A1g83g5` |
|
|
300
|
+
| `treasury_address` | Treasury contract SS58 address | `5FcjwHj8NkAMbPzkqzYweeC7KW4LffLW7KEKAR62Dx2cft2f` |
|
|
301
|
+
| `vault_metadata` | Path to vault ABI JSON | bundled |
|
|
302
|
+
| `token_metadata` | Path to token ABI JSON | bundled |
|
|
303
|
+
| `auction_metadata` | Path to auction ABI JSON | bundled |
|
|
304
|
+
| `oracle_metadata` | Path to oracle ABI JSON | bundled |
|
|
305
|
+
| `governance_metadata` | Path to governance ABI JSON | bundled |
|
|
306
|
+
| `treasury_metadata` | Path to treasury ABI JSON | bundled |
|
|
307
|
+
| `signer` | Mnemonic seed phrase or keyfile path | — |
|
|
308
|
+
| `wallet_name` | Default bittensor wallet name | — |
|
|
309
|
+
| `wallet_hotkey` | Default hotkey name | `default` |
|
|
310
|
+
| `wallet_path` | Path to wallets directory | `~/.bittensor/wallets` |
|
|
311
|
+
| `decimals` | Decimal places for balance display | `9` |
|
|
312
|
+
| `access_mode` | Command visibility (`user` or `dev`) | `user` |
|
|
238
313
|
|
|
239
314
|
## Networks
|
|
240
315
|
|
|
@@ -261,6 +336,38 @@ Finalized
|
|
|
261
336
|
The `network` parameter in the URL matches the `--network` flag (or the
|
|
262
337
|
configured default).
|
|
263
338
|
|
|
339
|
+
## Linting
|
|
340
|
+
|
|
341
|
+
```bash
|
|
342
|
+
ruff check src/ # Lint
|
|
343
|
+
ruff format src/ # Format
|
|
344
|
+
ruff check --fix src/ # Auto-fix lint issues
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
## Building & Publishing
|
|
348
|
+
|
|
349
|
+
```bash
|
|
350
|
+
# Install build tools
|
|
351
|
+
pip install build twine
|
|
352
|
+
|
|
353
|
+
# Clean old dist files
|
|
354
|
+
rm -rf dist/
|
|
355
|
+
|
|
356
|
+
# Build the package (wheel + sdist)
|
|
357
|
+
python -m build
|
|
358
|
+
|
|
359
|
+
# Check the build (optional but recommended)
|
|
360
|
+
twine check dist/*
|
|
361
|
+
|
|
362
|
+
# Publish to PyPI using an API token
|
|
363
|
+
TWINE_USERNAME=__token__ TWINE_PASSWORD=pypi-xxxx twine upload dist/*
|
|
364
|
+
|
|
365
|
+
# Publish to TestPyPI first (optional, for validation)
|
|
366
|
+
TWINE_USERNAME=__token__ TWINE_PASSWORD=pypi-xxxx twine upload --repository testpypi dist/*
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
After publishing, users can install with `pip install tusdt-cli` (or `pip install --upgrade tusdt-cli` to upgrade).
|
|
370
|
+
|
|
264
371
|
## Contributing
|
|
265
372
|
|
|
266
373
|
Contributions are welcome. To get started:
|
|
@@ -9,6 +9,8 @@ USD-pegged stablecoin. This CLI gives you full control over:
|
|
|
9
9
|
- **Token** — check balances, transfer TUSDT, and manage spending approvals
|
|
10
10
|
- **Auctions** — browse and bid on liquidation auctions for under-collateralised vaults
|
|
11
11
|
- **Oracle** — inspect the on-chain price feed that determines collateral ratios
|
|
12
|
+
- **Governance** — manage maintainer, council, proposals, voting, and cross-contract admin
|
|
13
|
+
- **Treasury** — manage fund balances, distribute revenue, and release funds
|
|
12
14
|
|
|
13
15
|
No web UI required — everything runs from your terminal.
|
|
14
16
|
|
|
@@ -160,6 +162,70 @@ tusdt oracle price
|
|
|
160
162
|
tusdt oracle round
|
|
161
163
|
```
|
|
162
164
|
|
|
165
|
+
### 6. Governance operations
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
# View maintainer and council
|
|
169
|
+
tusdt governance maintainer
|
|
170
|
+
tusdt governance council
|
|
171
|
+
|
|
172
|
+
# Check if an account is on the council
|
|
173
|
+
tusdt governance is-council 5GrwvaEF...
|
|
174
|
+
|
|
175
|
+
# View governance parameters and current epoch
|
|
176
|
+
tusdt governance params
|
|
177
|
+
tusdt governance current-epoch
|
|
178
|
+
|
|
179
|
+
# View proposals
|
|
180
|
+
tusdt governance proposal-count
|
|
181
|
+
tusdt governance get-proposal 0
|
|
182
|
+
|
|
183
|
+
# Check if a (coldkey, hotkey) pair has voted
|
|
184
|
+
tusdt governance has-voted 0 --coldkey 5GrwvaEF... --hotkey 5GrwvaEF...
|
|
185
|
+
|
|
186
|
+
# View quorum for an epoch
|
|
187
|
+
tusdt governance quorum 42
|
|
188
|
+
|
|
189
|
+
# Submit a proposal
|
|
190
|
+
tusdt governance submit-proposal \
|
|
191
|
+
--cid "QmXyz..." --kind non-funding \
|
|
192
|
+
--hotkey 5GrwvaEF... --wallet-name MyWallet
|
|
193
|
+
|
|
194
|
+
# Cast a vote
|
|
195
|
+
tusdt governance vote 0 \
|
|
196
|
+
--hotkey 5GrwvaEF... --support \
|
|
197
|
+
--balance 1000 --multiplier-bps 10000 \
|
|
198
|
+
--proof 0xabcdef --wallet-name MyWallet
|
|
199
|
+
|
|
200
|
+
# Finalize and execute a proposal
|
|
201
|
+
tusdt governance finalize-proposal 0 --wallet-name MyWallet
|
|
202
|
+
tusdt governance execute-proposal 0 --wallet-name MyWallet
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### 7. Treasury operations
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
# View treasury governance and token address
|
|
209
|
+
tusdt treasury governance
|
|
210
|
+
tusdt treasury token
|
|
211
|
+
|
|
212
|
+
# Check fund balances
|
|
213
|
+
tusdt treasury fund-balance-tusdt emergency
|
|
214
|
+
tusdt treasury fund-balance-native insurance
|
|
215
|
+
|
|
216
|
+
# View pending distributions
|
|
217
|
+
tusdt treasury pending-tusdt
|
|
218
|
+
tusdt treasury pending-native
|
|
219
|
+
|
|
220
|
+
# Distribute pending funds
|
|
221
|
+
tusdt treasury distribute --wallet-name MyWallet
|
|
222
|
+
|
|
223
|
+
# Release funds from a fund
|
|
224
|
+
tusdt treasury release emergency \
|
|
225
|
+
--token-kind tusdt --amount 5000 \
|
|
226
|
+
--recipient 5GrwvaEF... --wallet-name MyWallet
|
|
227
|
+
```
|
|
228
|
+
|
|
163
229
|
## Network selection
|
|
164
230
|
|
|
165
231
|
Two networks are available: **finney** (mainnet, default) and **testnet**.
|
|
@@ -194,26 +260,33 @@ tusdt config set --signer "word1 word2 word3 ... word12"
|
|
|
194
260
|
|
|
195
261
|
# Override contract addresses or RPC
|
|
196
262
|
tusdt config set --rpc wss://custom-endpoint:443
|
|
197
|
-
tusdt config set --vault
|
|
263
|
+
tusdt config set --vault 5GxJ...
|
|
264
|
+
tusdt config set --governance 5CEP...
|
|
265
|
+
tusdt config set --treasury 5Fcj...
|
|
198
266
|
```
|
|
199
267
|
|
|
200
|
-
| Key
|
|
201
|
-
|
|
202
|
-
| `network`
|
|
203
|
-
| `rpc`
|
|
204
|
-
| `vault_address`
|
|
205
|
-
| `token_address`
|
|
206
|
-
| `auction_address`
|
|
207
|
-
| `oracle_address`
|
|
208
|
-
| `
|
|
209
|
-
| `
|
|
210
|
-
| `
|
|
211
|
-
| `
|
|
212
|
-
| `
|
|
213
|
-
| `
|
|
214
|
-
| `
|
|
215
|
-
| `
|
|
216
|
-
| `
|
|
268
|
+
| Key | Description | Default |
|
|
269
|
+
|------------------------|----------------------------------------|------------------------------------------------------|
|
|
270
|
+
| `network` | Active network preset | `finney` |
|
|
271
|
+
| `rpc` | WebSocket RPC endpoint | `wss://entrypoint-finney.opentensor.ai:443` |
|
|
272
|
+
| `vault_address` | Vault contract SS58 address | `5GxJw8kTpapdHRW5KUXQLVDpXMMnA61mbzS6nF6jWsEeWExV` |
|
|
273
|
+
| `token_address` | Token (ERC-20) contract SS58 address | `5CJ4HtCPdoMfdNUk6B7vZ348XryeXAnb5BmDNGejob1FziNH` |
|
|
274
|
+
| `auction_address` | Auction contract SS58 address | `5HipAvNRiuh9mpTKztPLTvwyYkhzuSqxe1wsUy1fbRwbZUbQ` |
|
|
275
|
+
| `oracle_address` | Oracle contract SS58 address | `5Dfz8xgQoCsaWWrDxjeCuKB8R6AtYymWZDDDAe2q7NE8tL8A` |
|
|
276
|
+
| `governance_address` | Governance contract SS58 address | `5CEPPTnB2YtEv7Cf8TXrFkdr6BPkDAUhDJbiT38t1A1g83g5` |
|
|
277
|
+
| `treasury_address` | Treasury contract SS58 address | `5FcjwHj8NkAMbPzkqzYweeC7KW4LffLW7KEKAR62Dx2cft2f` |
|
|
278
|
+
| `vault_metadata` | Path to vault ABI JSON | bundled |
|
|
279
|
+
| `token_metadata` | Path to token ABI JSON | bundled |
|
|
280
|
+
| `auction_metadata` | Path to auction ABI JSON | bundled |
|
|
281
|
+
| `oracle_metadata` | Path to oracle ABI JSON | bundled |
|
|
282
|
+
| `governance_metadata` | Path to governance ABI JSON | bundled |
|
|
283
|
+
| `treasury_metadata` | Path to treasury ABI JSON | bundled |
|
|
284
|
+
| `signer` | Mnemonic seed phrase or keyfile path | — |
|
|
285
|
+
| `wallet_name` | Default bittensor wallet name | — |
|
|
286
|
+
| `wallet_hotkey` | Default hotkey name | `default` |
|
|
287
|
+
| `wallet_path` | Path to wallets directory | `~/.bittensor/wallets` |
|
|
288
|
+
| `decimals` | Decimal places for balance display | `9` |
|
|
289
|
+
| `access_mode` | Command visibility (`user` or `dev`) | `user` |
|
|
217
290
|
|
|
218
291
|
## Networks
|
|
219
292
|
|
|
@@ -240,6 +313,38 @@ Finalized
|
|
|
240
313
|
The `network` parameter in the URL matches the `--network` flag (or the
|
|
241
314
|
configured default).
|
|
242
315
|
|
|
316
|
+
## Linting
|
|
317
|
+
|
|
318
|
+
```bash
|
|
319
|
+
ruff check src/ # Lint
|
|
320
|
+
ruff format src/ # Format
|
|
321
|
+
ruff check --fix src/ # Auto-fix lint issues
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
## Building & Publishing
|
|
325
|
+
|
|
326
|
+
```bash
|
|
327
|
+
# Install build tools
|
|
328
|
+
pip install build twine
|
|
329
|
+
|
|
330
|
+
# Clean old dist files
|
|
331
|
+
rm -rf dist/
|
|
332
|
+
|
|
333
|
+
# Build the package (wheel + sdist)
|
|
334
|
+
python -m build
|
|
335
|
+
|
|
336
|
+
# Check the build (optional but recommended)
|
|
337
|
+
twine check dist/*
|
|
338
|
+
|
|
339
|
+
# Publish to PyPI using an API token
|
|
340
|
+
TWINE_USERNAME=__token__ TWINE_PASSWORD=pypi-xxxx twine upload dist/*
|
|
341
|
+
|
|
342
|
+
# Publish to TestPyPI first (optional, for validation)
|
|
343
|
+
TWINE_USERNAME=__token__ TWINE_PASSWORD=pypi-xxxx twine upload --repository testpypi dist/*
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
After publishing, users can install with `pip install tusdt-cli` (or `pip install --upgrade tusdt-cli` to upgrade).
|
|
347
|
+
|
|
243
348
|
## Contributing
|
|
244
349
|
|
|
245
350
|
Contributions are welcome. To get started:
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "tusdt-cli"
|
|
7
|
+
version = "0.2.0"
|
|
8
|
+
description = "CLI for interacting with the TUSDT ink! smart contract system on subtensor(bittensor)"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
requires-python = ">=3.10"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "tensorlab", email = "admin@tensorusd.com" },
|
|
14
|
+
{ name = "benup", email = "benup211@gmail.com" }
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"License :: OSI Approved :: MIT License",
|
|
20
|
+
"Operating System :: OS Independent",
|
|
21
|
+
"Environment :: Console",
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
dependencies = [
|
|
25
|
+
"click>=8.1.0",
|
|
26
|
+
"substrate-interface>=1.7.0",
|
|
27
|
+
"rich>=13.0.0",
|
|
28
|
+
"pynacl>=1.5.0",
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
[project.urls]
|
|
32
|
+
Homepage = "https://github.com/tensorusd/tusdt-cli"
|
|
33
|
+
Repository = "https://github.com/tensorusd/tusdt-cli"
|
|
34
|
+
Issues = "https://github.com/tensorusd/tusdt-cli/issues"
|
|
35
|
+
|
|
36
|
+
[project.scripts]
|
|
37
|
+
tusdt = "tusdt_cli.cli:main"
|
|
38
|
+
|
|
39
|
+
[project.optional-dependencies]
|
|
40
|
+
dev = ["ruff>=0.11.0"]
|
|
41
|
+
|
|
42
|
+
[tool.ruff]
|
|
43
|
+
target-version = "py310"
|
|
44
|
+
line-length = 110
|
|
45
|
+
|
|
46
|
+
[tool.ruff.format]
|
|
47
|
+
quote-style = "double"
|
|
48
|
+
indent-style = "space"
|
|
49
|
+
skip-magic-trailing-comma = false
|
|
50
|
+
line-ending = "auto"
|
|
51
|
+
|
|
52
|
+
[tool.ruff.lint]
|
|
53
|
+
select = [
|
|
54
|
+
"E", # pycodestyle errors
|
|
55
|
+
"F", # pyflakes
|
|
56
|
+
"I", # isort
|
|
57
|
+
"N", # pep8-naming
|
|
58
|
+
"UP", # pyupgrade
|
|
59
|
+
"B", # flake8-bugbear
|
|
60
|
+
"SIM", # flake8-simplify
|
|
61
|
+
"C4", # flake8-comprehensions
|
|
62
|
+
"RUF", # ruff-specific rules
|
|
63
|
+
]
|
|
64
|
+
ignore = [
|
|
65
|
+
"E501", # line-too-long (handled by formatter)
|
|
66
|
+
"SIM108", # use ternary operator (preference)
|
|
67
|
+
"N818", # exception names should end with Error
|
|
68
|
+
"RUF001", # ambiguous unicode characters (en-dash is intentional)
|
|
69
|
+
"RUF002", # ambiguous unicode in docstrings (en-dash is intentional)
|
|
70
|
+
"RUF003", # ambiguous unicode in comments (en-dash is intentional)
|
|
71
|
+
"RUF034", # useless if-else (defensive isinstance check is intentional)
|
|
72
|
+
"SIM102", # nested if (preference for readability)
|
|
73
|
+
]
|
|
74
|
+
|
|
75
|
+
[tool.ruff.lint.isort]
|
|
76
|
+
known-first-party = ["tusdt_cli"]
|
|
77
|
+
|
|
78
|
+
[tool.ruff.lint.pycodestyle]
|
|
79
|
+
max-doc-length = 120
|
|
80
|
+
|
|
81
|
+
[tool.hatch.build.targets.wheel]
|
|
82
|
+
packages = ["src/tusdt_cli"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"source": {
|
|
3
|
-
"hash": "
|
|
3
|
+
"hash": "0xc68a58b5ddfe56f20d9d93e1f2105532755b321c0dc7a842b0d5ef530e6211e7",
|
|
4
4
|
"language": "ink! 5.1.1",
|
|
5
5
|
"compiler": "rustc 1.91.1",
|
|
6
6
|
"build_info": {
|
|
@@ -147,7 +147,9 @@
|
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
],
|
|
150
|
-
"docs": [
|
|
150
|
+
"docs": [
|
|
151
|
+
"Emitted when the winning bid tokens are transferred out by the controller."
|
|
152
|
+
],
|
|
151
153
|
"label": "WinningBidTransferred",
|
|
152
154
|
"module_path": "tusdt_auction::auction",
|
|
153
155
|
"signature_topic": "0x2453946cbe1f6032b08342168446e55733a50984aaed83e6915336a88b93032e"
|
|
@@ -177,7 +179,9 @@
|
|
|
177
179
|
}
|
|
178
180
|
}
|
|
179
181
|
],
|
|
180
|
-
"docs": [
|
|
182
|
+
"docs": [
|
|
183
|
+
"Emitted when auction governance is transferred to a new account."
|
|
184
|
+
],
|
|
181
185
|
"label": "AuctionGovernanceUpdated",
|
|
182
186
|
"module_path": "tusdt_auction::auction",
|
|
183
187
|
"signature_topic": "0x650e7dc10cf216636c442ddc7c09760c72b7152d8c3e9e56f48fd38c4ed0e637"
|
|
@@ -229,7 +233,9 @@
|
|
|
229
233
|
}
|
|
230
234
|
}
|
|
231
235
|
],
|
|
232
|
-
"docs": [
|
|
236
|
+
"docs": [
|
|
237
|
+
"Emitted when a bid is placed or raised on an auction."
|
|
238
|
+
],
|
|
233
239
|
"label": "BidPlaced",
|
|
234
240
|
"module_path": "tusdt_auction::auction",
|
|
235
241
|
"signature_topic": "0x53773ad8dd764d7c2e273caf090006fa7ba6b468938259aa3d27ecd3b9b95f1b"
|
|
@@ -248,7 +254,9 @@
|
|
|
248
254
|
}
|
|
249
255
|
}
|
|
250
256
|
],
|
|
251
|
-
"docs": [
|
|
257
|
+
"docs": [
|
|
258
|
+
"Emitted when the admin account (allowed to bid on expired no-bid auctions) is updated."
|
|
259
|
+
],
|
|
252
260
|
"label": "AdminUpdated",
|
|
253
261
|
"module_path": "tusdt_auction::auction",
|
|
254
262
|
"signature_topic": "0xd04478a9ddad3ba01e57d8112d890c26a28aca5c43c35dfb522ed2f0107cf985"
|
|
@@ -311,7 +319,9 @@
|
|
|
311
319
|
}
|
|
312
320
|
}
|
|
313
321
|
],
|
|
314
|
-
"docs": [
|
|
322
|
+
"docs": [
|
|
323
|
+
"Emitted when a new liquidation auction is created."
|
|
324
|
+
],
|
|
315
325
|
"label": "AuctionCreated",
|
|
316
326
|
"module_path": "tusdt_auction::auction",
|
|
317
327
|
"signature_topic": "0x2d6206165e4527a66ee2e32d8b2fe44913914651cdd0fa449efd415b3b697558"
|
|
@@ -341,7 +351,9 @@
|
|
|
341
351
|
}
|
|
342
352
|
}
|
|
343
353
|
],
|
|
344
|
-
"docs": [
|
|
354
|
+
"docs": [
|
|
355
|
+
"Emitted when a losing bidder withdraws their refund."
|
|
356
|
+
],
|
|
345
357
|
"label": "RefundWithdrawn",
|
|
346
358
|
"module_path": "tusdt_auction::auction",
|
|
347
359
|
"signature_topic": "0x6040b9f8282871cf9199cf80cc6df679351435d48bc8743ad81a192b1f665d23"
|
|
@@ -404,7 +416,9 @@
|
|
|
404
416
|
}
|
|
405
417
|
}
|
|
406
418
|
],
|
|
407
|
-
"docs": [
|
|
419
|
+
"docs": [
|
|
420
|
+
"Emitted when an auction is finalized, identifying the winning bidder."
|
|
421
|
+
],
|
|
408
422
|
"label": "AuctionFinalized",
|
|
409
423
|
"module_path": "tusdt_auction::auction",
|
|
410
424
|
"signature_topic": "0x2bb1b99d11a544c4702e6bb53e1eaea4a6f257ac8d2e41b9c747027662fadd53"
|
|
@@ -445,7 +459,9 @@
|
|
|
445
459
|
}
|
|
446
460
|
}
|
|
447
461
|
],
|
|
448
|
-
"docs": [
|
|
462
|
+
"docs": [
|
|
463
|
+
"Emitted whenever an owner sets or updates a spender's allowance."
|
|
464
|
+
],
|
|
449
465
|
"label": "Approval",
|
|
450
466
|
"module_path": "tusdt_erc20::tusdt",
|
|
451
467
|
"signature_topic": "0x1a35e726f5feffda199144f6097b2ba23713e549bfcbe090c0981e3bcdfbcc1d"
|
|
@@ -486,7 +502,9 @@
|
|
|
486
502
|
}
|
|
487
503
|
}
|
|
488
504
|
],
|
|
489
|
-
"docs": [
|
|
505
|
+
"docs": [
|
|
506
|
+
"Emitted on token movement; `from = None` denotes a mint, `to = None` denotes a burn."
|
|
507
|
+
],
|
|
490
508
|
"label": "Transfer",
|
|
491
509
|
"module_path": "tusdt_erc20::tusdt",
|
|
492
510
|
"signature_topic": "0xb5b61a3e6a21a16be4f044b517c28ac692492f73c5bfd3f60178ad98c767f4cb"
|
|
@@ -595,7 +613,9 @@
|
|
|
595
613
|
}
|
|
596
614
|
],
|
|
597
615
|
"default": false,
|
|
598
|
-
"docs": [
|
|
616
|
+
"docs": [
|
|
617
|
+
" Sets or clears the admin account that may bid on expired no-bid auctions; governance-only."
|
|
618
|
+
],
|
|
599
619
|
"label": "set_admin",
|
|
600
620
|
"mutates": true,
|
|
601
621
|
"payable": false,
|
|
@@ -621,7 +641,9 @@
|
|
|
621
641
|
}
|
|
622
642
|
],
|
|
623
643
|
"default": false,
|
|
624
|
-
"docs": [
|
|
644
|
+
"docs": [
|
|
645
|
+
" Transfers auction governance to a new account; controller-only."
|
|
646
|
+
],
|
|
625
647
|
"label": "update_governance",
|
|
626
648
|
"mutates": true,
|
|
627
649
|
"payable": false,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"source": {
|
|
3
|
-
"hash": "
|
|
3
|
+
"hash": "0x970f7890a01477a723525ab58e939257faf7fa6f90c81de98ceb69a289f90316",
|
|
4
4
|
"language": "ink! 5.1.1",
|
|
5
5
|
"compiler": "rustc 1.91.1",
|
|
6
6
|
"build_info": {
|
|
@@ -129,7 +129,9 @@
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
],
|
|
132
|
-
"docs": [
|
|
132
|
+
"docs": [
|
|
133
|
+
"Emitted whenever an owner sets or updates a spender's allowance."
|
|
134
|
+
],
|
|
133
135
|
"label": "Approval",
|
|
134
136
|
"module_path": "tusdt_erc20::tusdt",
|
|
135
137
|
"signature_topic": "0x1a35e726f5feffda199144f6097b2ba23713e549bfcbe090c0981e3bcdfbcc1d"
|
|
@@ -170,7 +172,9 @@
|
|
|
170
172
|
}
|
|
171
173
|
}
|
|
172
174
|
],
|
|
173
|
-
"docs": [
|
|
175
|
+
"docs": [
|
|
176
|
+
"Emitted on token movement; `from = None` denotes a mint, `to = None` denotes a burn."
|
|
177
|
+
],
|
|
174
178
|
"label": "Transfer",
|
|
175
179
|
"module_path": "tusdt_erc20::tusdt",
|
|
176
180
|
"signature_topic": "0xb5b61a3e6a21a16be4f044b517c28ac692492f73c5bfd3f60178ad98c767f4cb"
|