starknet 5.24.0 → 5.24.2

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.
package/dist/index.mjs CHANGED
@@ -1710,10 +1710,10 @@ var CallData = class {
1710
1710
  * @return Calldata - parsed arguments in format that contract is expecting
1711
1711
  * @example
1712
1712
  * ```typescript
1713
- * const calldata = myCallData.compile("constructor",["0x34a",[1,3n]]);
1713
+ * const calldata = myCallData.compile("constructor", ["0x34a", [1, 3n]]);
1714
1714
  * ```
1715
1715
  * ```typescript
1716
- * const calldata2 = myCallData.compile("constructor",{list:[1,3n],balance:"0x34"}); // wrong order is valid
1716
+ * const calldata2 = myCallData.compile("constructor", {list:[1, 3n], balance:"0x34"}); // wrong order is valid
1717
1717
  * ```
1718
1718
  */
1719
1719
  compile(method, argsCalldata) {
@@ -2653,8 +2653,8 @@ var RpcProvider = class {
2653
2653
  if (rpcError) {
2654
2654
  const { code, message, data } = rpcError;
2655
2655
  throw new LibraryError(
2656
- `RPC: ${method} with params ${JSON.stringify(params)}
2657
- ${code}: ${message}: ${data}`
2656
+ `RPC: ${method} with params ${stringify2(params)}
2657
+ ${code}: ${message}: ${stringify2(data)}`
2658
2658
  );
2659
2659
  }
2660
2660
  if (otherError instanceof LibraryError) {
@@ -3957,7 +3957,8 @@ var fromCallsToExecuteCalldata_cairo1 = (calls) => {
3957
3957
  const orderCalls = calls.map((call) => ({
3958
3958
  contractAddress: call.contractAddress,
3959
3959
  entrypoint: call.entrypoint,
3960
- calldata: call.calldata
3960
+ calldata: Array.isArray(call.calldata) && "__compiled__" in call.calldata ? call.calldata : CallData.compile(call.calldata)
3961
+ // RawArgsObject | RawArgsArray type
3961
3962
  }));
3962
3963
  return CallData.compile({ orderCalls });
3963
3964
  };