You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* swarm: migrate core SDK AccountId::new() to from_bytes() literals
Replace all AccountId::new(N) usages in the 5 assigned core SDK files
with the equivalent AccountId::from_bytes([...]) byte array literals:
- storage_api.rs: STORAGE_ACCOUNT_ID constant (N=1)
- unique_api.rs: UNIQUE_HANDLER_ACCOUNT_ID constant (N=5)
- core/lib.rs: inline test AccountIds for 1, 2, 10, 42; updated
test_account_id_u128_compat to assert on bytes instead of inner()
- fungible_asset.rs: test AccountIds 1, 1111, 1234, 2222, 9999
converted to named const byte arrays
- collections/mocks.rs: MockEnvironment::new keeps u128 params but
constructs AccountId via from_bytes instead of AccountId::new
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* swarm: migrate AccountId::new() to from_bytes() in RPC, testing infra, and binaries
Replaces all AccountId::new(N: u128) calls with AccountId::from_bytes([u8;32])
across: chain-index integration tests, rpc/types log tests, evnode run_server
example, debugger (lib, replay, trace, breakpoints, inspector), storage warming
tests, testapp lib constants (MINTER, PLACEHOLDER_ACCOUNT), testapp/evd
run_custom_genesis minter_id runtime conversion, mempool_e2e tests, and txload
test. The minter_id config field remains u128 (JSON-deserialized) with an inline
conversion at the call site.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* swarm: migrate AccountId::new() to from_bytes() in SDK extensions and standards
Replace all AccountId::new(N: u128) calls with AccountId::from_bytes([u8;32])
across testing, authentication, fungible_asset standards, and token, scheduler,
nonceless_account extensions. Also change setup_token() and setup_account()
helper signatures from u128 params to AccountId to avoid internal new() usage.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* cleanup: remove AccountId::new/inner numeric compat methods
Completes TODO(account-id-cleanup). All callers have been migrated to
AccountId::from_bytes([u8;32]) in the preceding commits. The two
remaining string-fallback paths in genesis/file.rs now parse
hex-encoded 32-byte account IDs instead of decimal u128 strings.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* refactor: replace AccountId::from_bytes literals with from_u64
Add AccountId::from_u64(n: u64) const fn that encodes n in the last 8
bytes big-endian. Replace all byte literal patterns across the workspace
with the cleaner from_u64(N) form. PLACEHOLDER_ACCOUNT migrated from
u128::MAX to u64::MAX (still a never-real-account sentinel).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* refactor: use AccountId in SenderSpec/RecipientSpec instead of [u8; 32]
Eliminates raw 32-byte array literals from genesis spec types by storing
AccountId directly. Simplifies deserializers to use from_u64 and adds
manual Serialize impls to hex-encode the account ID.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* cleanup: address PR review — eliminate remaining manual byte-packing
- Change minter_id from u128 to u64 in EvdGenesisConfig
- Replace manual byte-packing with AccountId::from_u64 in evd and testapp
- Fix serde round-trip for SenderSpec/RecipientSpec hex AccountId variants
- Change MockEnvironment::new to accept u64 and use from_u64
- Extract INITIAL_ACCOUNT_NUMBER constant in runtime_api_impl
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments