ignore failure to remove
@@ -250,11 +250,7 @@ func (p *Project) Deploy(network string, update bool) ([]*project.Contract, erro
// special case for emulator updates, where we remove and add a contract because it allows us to have more freedom in changes.
// Updating contracts is limited as described in https://developers.flow.com/cadence/language/contract-updatability
if update && network == config.DefaultEmulatorNetwork().Name {
- _, err = accounts.RemoveContract(targetAccount, contract.Name)
- if err != nil {
- deployErr.add(contract, err, fmt.Sprintf("failed to remove the contract %s before the update", contract.Name))
- continue
- }
+ _, _ = accounts.RemoveContract(targetAccount, contract.Name) // ignore failure as it's meant to be best-effort
}
txID, updated, err := accounts.AddContract(
