clarinet
clarinet copied to clipboard
Handle contract deploy failure
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?