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.js CHANGED
@@ -1808,10 +1808,10 @@ var CallData = class {
1808
1808
  * @return Calldata - parsed arguments in format that contract is expecting
1809
1809
  * @example
1810
1810
  * ```typescript
1811
- * const calldata = myCallData.compile("constructor",["0x34a",[1,3n]]);
1811
+ * const calldata = myCallData.compile("constructor", ["0x34a", [1, 3n]]);
1812
1812
  * ```
1813
1813
  * ```typescript
1814
- * const calldata2 = myCallData.compile("constructor",{list:[1,3n],balance:"0x34"}); // wrong order is valid
1814
+ * const calldata2 = myCallData.compile("constructor", {list:[1, 3n], balance:"0x34"}); // wrong order is valid
1815
1815
  * ```
1816
1816
  */
1817
1817
  compile(method, argsCalldata) {
@@ -2751,8 +2751,8 @@ var RpcProvider = class {
2751
2751
  if (rpcError) {
2752
2752
  const { code, message, data } = rpcError;
2753
2753
  throw new LibraryError(
2754
- `RPC: ${method} with params ${JSON.stringify(params)}
2755
- ${code}: ${message}: ${data}`
2754
+ `RPC: ${method} with params ${stringify2(params)}
2755
+ ${code}: ${message}: ${stringify2(data)}`
2756
2756
  );
2757
2757
  }
2758
2758
  if (otherError instanceof LibraryError) {
@@ -4055,7 +4055,8 @@ var fromCallsToExecuteCalldata_cairo1 = (calls) => {
4055
4055
  const orderCalls = calls.map((call) => ({
4056
4056
  contractAddress: call.contractAddress,
4057
4057
  entrypoint: call.entrypoint,
4058
- calldata: call.calldata
4058
+ calldata: Array.isArray(call.calldata) && "__compiled__" in call.calldata ? call.calldata : CallData.compile(call.calldata)
4059
+ // RawArgsObject | RawArgsArray type
4059
4060
  }));
4060
4061
  return CallData.compile({ orderCalls });
4061
4062
  };