bug: CASM runner deploy_syscall
doesn't support external call to deployer in constructor
#4488
Labels
bug
Something isn't working
Bug Report
Cairo version:
2.4.0-rc4
Current behavior:
The
deploy
function in the CASM runner in charge of deploying a contract first starts by executing the constructor of the contract, and only then registers the address of the contract in the starknet state.This causes a problem when a Factory contract deploys a Child contract, and this Child needs to access a method from the Factory contract as an external call, as this will fail with a
CONTRACT_NOT_DEPLOYED
error.Expected behavior:
The contract should be registered in starknet state before the execution of the constructor, so that Child contracts can call methods from their Factory.
Steps to reproduce:
Related code:
This is the part in the runner that is responsible for executing the constructor and setting the contract address
Reproducible example:
The text was updated successfully, but these errors were encountered: