Skip to content

Commit 27bf93a

Browse files
author
Jannis Pohlmann
committed
runtime/wasm: Remove commented-out code, update note about BigInt representation
1 parent fca22d8 commit 27bf93a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

runtime/wasm/src/asc_abi/class.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,13 +387,16 @@ pub(crate) struct AscLogParam {
387387
impl AscType for AscLogParam {}
388388

389389
pub(crate) type Bytes = Uint8Array;
390-
/// Big ints are represented in two's complement and in little-endian order.
390+
391+
/// Big ints are represented using signed number representation. Note: This differs
392+
/// from how U256 and U128 are represented (they use two's complement). So whenever
393+
/// we convert between them, we need to make sure we handle signed and unsigned
394+
/// cases correctly.
391395
pub(crate) type AscBigInt = Uint8Array;
396+
392397
pub(crate) type AscAddress = Uint8Array;
393398
pub(crate) type AscH160 = Uint8Array;
394399
pub(crate) type AscH256 = Uint8Array;
395-
//pub(crate) type AscU128 = Uint64Array;
396-
//pub(crate) type AscU256 = Uint64Array;
397400

398401
pub(crate) type AscLogParamArray = Array<AscPtr<AscLogParam>>;
399402

0 commit comments

Comments
 (0)