clarinet icon indicating copy to clipboard operation
clarinet copied to clipboard

Handle contract deploy failure

Open obycode opened this issue 2 years ago • 2 comments

When deploying a contract with a deployment plan, clarinet currently waits for the contract to be available, by attempting to retrieve its source before proceeding:

                        let deployer_address = deployer.to_address();
                        let res = stacks_rpc.get_contract_source(&deployer_address, &contract_name);
                        if let Ok(_contract) = res {
                            tracker.status = TransactionStatus::Confirmed;
                            let _ = deployment_event_tx
                                .send(DeploymentEvent::TransactionUpdate(tracker.clone()));
                        } else {
                            keep_looping = true;
                            break;
                        }

If the contract deploy fails, it will hang forever. Is there any reason not to just check the nonce as is done for other transactions?

obycode avatar Nov 29 '22 15:11 obycode