Skip to content

Commit 055ed25

Browse files
committed
feat(calldata): implement decode functions for calldata to JSC types
1 parent fea9368 commit 055ed25

File tree

2 files changed

+326
-64
lines changed

2 files changed

+326
-64
lines changed

src/utils/cairoDataTypes/uint256.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,11 @@ export class CairoUint256 {
140140
*/
141141
static fromCalldata(calldata: [string, string]): CairoUint256 {
142142
if (calldata.length !== 2) {
143-
throw new Error("Calldata must contain exactly two elements for low and high parts of uint256.");
143+
throw new Error(
144+
'Calldata must contain exactly two elements for low and high parts of uint256.'
145+
);
144146
}
145-
147+
146148
// Validate each part to ensure they are within the acceptable range.
147149
const [low, high] = calldata;
148150
const validatedLow = CairoUint256.validateProps(low, UINT_256_LOW_MIN.toString());

0 commit comments

Comments
 (0)