starknet 11.9.1 → 11.9.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
@@ -18103,8 +18103,15 @@ var RpcProvider = class {
18103
18103
  }
18104
18104
  if (isSierra(contractClass)) {
18105
18105
  if (compiler) {
18106
- const abiTest = getAbiContractVersion(contractClass.abi);
18107
- return { cairo: "1", compiler: abiTest.compiler };
18106
+ try {
18107
+ const program = contractClass.sierra_program;
18108
+ const firstFelt = BigInt(program[0]);
18109
+ if (firstFelt === utf8ToBigInt("0.1.0")) return { cairo: "1", compiler: "1" };
18110
+ const compilerMajor = BigInt(program[3]);
18111
+ if (firstFelt === 1n && compilerMajor === 1n) return { cairo: "1", compiler: "1" };
18112
+ if (firstFelt === 1n && compilerMajor === 2n) return { cairo: "1", compiler: "2" };
18113
+ } catch {
18114
+ }
18108
18115
  }
18109
18116
  return { cairo: "1", compiler: void 0 };
18110
18117
  }