For use in contract upgrades to provide values that come from other vats.
All vats must be able to finish their upgrade without contacting other vats,
so whatever values an instance needs from other vats must be saved in the first
incarnation and read from baggage in each subsequent.
This abstracts that condition so that the contract can convert a dictionary
of thunks into a dictionary of values during its first prepare (start).
Each subsequent prepare call will automatically read from the baggage and
eschew remote calls.
The values are thunks instead of promises so that they don't start executing
unnecessarily or induce failures.
For use in contract upgrades to provide values that come from other vats. All vats must be able to finish their upgrade without contacting other vats, so whatever values an instance needs from other vats must be saved in the first incarnation and read from baggage in each subsequent.
This abstracts that condition so that the contract can convert a dictionary of thunks into a dictionary of values during its first
prepare
(start). Each subsequentprepare
call will automatically read from the baggage and eschew remote calls.The values are thunks instead of promises so that they don't start executing unnecessarily or induce failures.
For example,