Open sisyphusSmiling opened 1 year ago
Opened issue covering this open question.
Alternatives to this addition to the AuthAccount.Contracts
API include submitting a single transaction for each update.
The tryUpdate()
method was implemented and merged to Cadence 1.0 but waiting on merge to master (https://github.com/onflow/cadence/issues/2963). Awaiting on inclusion of the feature to Cadence test suite before implementing in ContractUpdater
.
The original idea was to iterate over
DelegatedUpdater
Capabilities, callingupdate()
on each. However,update_experimental()
appears to panic on unsuccessful deployment which would prevent successive updates.Some workarounds here are:
update_experimental()
method that does not panic and instead returns an optionalDeployedContract
The latter is a significantly larger lift, but resolution here will need to balance the number of transactions that need to be submitted to satisfy all updates in a timely manner so contracts are available post-spork and updates do not significantly delay network availability beyond the spork height.