Using latest Devnet, this is my starknet.js example which succeeds:
const devnetProvider = new DevnetProvider();
const starknetProvider = new RpcProvider({ nodeUrl: devnetProvider.url });
const contractArtifact = getContractArtifact("test/data/simple.sierra"); // simply read json from disk
const predeployedAccount = new starknet.Account(starknetProvider, "0x1, "0x2");
const contractDeployment = await predeployedAccount.declareAndDeploy({
contract: contractArtifact,
compiledClassHash: "0x123", // should not pass
constructorCalldata: { initial_balance: 0 },
});
One could argue that it's a client-side error, but I think the server (Devnet) should check if the provided casm hash is correct and not some random value.
Using latest Devnet, this is my starknet.js example which succeeds:
One could argue that it's a client-side error, but I think the server (Devnet) should check if the provided casm hash is correct and not some random value.