Skip to content

Commit 6735800

Browse files
Refresh testnet Bytecash config to TBYC and standardize local Python tooling. (#20)
This updates the testnet Bytecash asset fixture to the discovered TBYC asset id, adds a persistent .venv execution rule for Python commands, and applies the related ruff-compatible bytes type checks. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 558ec84 commit 6735800

4 files changed

Lines changed: 11 additions & 10 deletions

File tree

.github/workflows/live-testnet-e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ name: Live Testnet E2E (Optional)
99
default: "testnet11"
1010
required: true
1111
pair:
12-
description: "Asset pair for manager proof (example: TDBX:txch)"
12+
description: "Asset pair for manager proof (examples: TDBX:txch, TBYC:txch)"
1313
default: "TDBX:txch"
1414
required: true
1515
size_base_units:

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ These rules exist because earlier implementation rounds introduced unnecessary c
6363
## Testing and Quality Gates
6464

6565
- Python minimum version: 3.11.
66+
- For Python-related commands in this repo, use the project virtual environment binaries (for example `.venv/bin/python -m pytest`, `.venv/bin/python -m ruff`, `.venv/bin/python -m pyright`).
6667
- PR-required deterministic test harness must complete under 10 minutes wall clock (prefer under 5).
6768
- Required PR checks:
6869
- `ruff check`

config/markets.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ supported_assets_example:
3434
pool_id: null
3535
last_price_xch: "0.004119292414047852"
3636
- name: "Testnet Bytecash"
37-
base_symbol: "BYC04"
38-
asset_id: "4eadfa450c19fa51df65eb7fbf5b61077ec80ec799a7652bb187b705bff19a90"
37+
base_symbol: "TBYC"
38+
asset_id: "4d81e31c9dd9663220b9384693f6ea036b9e372ecf94f0f38b5767b54cd96d05"
3939
legacy_usd_price_per_credit: null
4040
dexie:
41-
ticker_id: "4eadfa450c19fa51df65eb7fbf5b61077ec80ec799a7652bb187b705bff19a90_xch"
41+
ticker_id: "4d81e31c9dd9663220b9384693f6ea036b9e372ecf94f0f38b5767b54cd96d05_xch"
4242
pool_id: "138c27101b3ac5b48d3530729d401d95c723d9b954d346ea982793ca22b1b27c"
4343
last_price_xch: "0.002420604183"
4444
- name: "Base warp.green USDC"
@@ -209,11 +209,11 @@ markets:
209209
split_buffer_count: 0
210210
combine_when_excess_factor: 2.0
211211

212-
- id: byc04_txch_sell
212+
- id: tbyc_txch_sell
213213
enabled: false
214214
mode: sell_only
215-
base_asset: "4eadfa450c19fa51df65eb7fbf5b61077ec80ec799a7652bb187b705bff19a90"
216-
base_symbol: "BYC04"
215+
base_asset: "4d81e31c9dd9663220b9384693f6ea036b9e372ecf94f0f38b5767b54cd96d05"
216+
base_symbol: "TBYC"
217217
quote_asset: "txch"
218218
quote_asset_type: unstable
219219
signer_key_id: "key-main-1"

greenfloor/signing.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,18 +152,18 @@ def _import_greenfloor_native() -> Any:
152152

153153

154154
def _as_bytes(value: Any) -> bytes:
155-
if isinstance(value, (bytes, bytearray, memoryview)):
155+
if isinstance(value, bytes | bytearray | memoryview):
156156
return bytes(value)
157157
to_bytes = getattr(value, "to_bytes", None)
158158
if callable(to_bytes):
159159
raw = to_bytes()
160-
if isinstance(raw, (bytes, bytearray, memoryview)):
160+
if isinstance(raw, bytes | bytearray | memoryview):
161161
return bytes(raw)
162162
raise TypeError("to_bytes did not return bytes-compatible data")
163163
to_dunder_bytes = getattr(value, "__bytes__", None)
164164
if callable(to_dunder_bytes):
165165
raw = to_dunder_bytes()
166-
if isinstance(raw, (bytes, bytearray, memoryview)):
166+
if isinstance(raw, bytes | bytearray | memoryview):
167167
return bytes(raw)
168168
raise TypeError("__bytes__ did not return bytes-compatible data")
169169
raise TypeError("value cannot be converted to bytes")

0 commit comments

Comments
 (0)