You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: main/guides/zoe/contract-upgrade.md
+30-27Lines changed: 30 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,12 @@
1
1
# Contract Upgrade
2
2
3
-
The result of starting a contract includes the right to upgrade the contract instance. A call to [E(zoe).startInstance(...)](/reference/zoe-api/zoe.md#e-zoe-startinstance-installation-issuerkeywordrecord-terms-privateargs) returns a record of several objects that represent different levels of access.
4
-
The `publicFacet` and `creatorFacet` are defined by the contract.
5
-
The `adminFacet` is defined by Zoe and includes methods to upgrade the contract.
3
+
The return value when starting a contract includes a capability that conveys the right to upgrade
<small>_See [@endo/patterns](https://endojs.github.io/endo/modules/_endo_patterns.html) for more on interface guards._</small>
160
+
The interface guard also needs updating. <small>_[The Durable
161
+
objects](./contract-details.md#guards-defensive-methods) section has more on interface
162
+
guards._</small>
146
163
147
164
```js
148
165
const RoomI = M.interface('Room', {
@@ -175,20 +192,6 @@ Define all exo classes/kits before any incoming method calls from other vats --
175
192
176
193
:::
177
194
178
-
### Baggage
179
-
180
-
baggage is a MapStore that provides a way to preserve the state and behavior of objects between [smart contract upgrades](/guides/zoe/contract-upgrade) in a way that preserves the identity of objects as seen from other [vats](#vat). In the provided contract, baggage is used to ensure that the state of various components is maintained even after the contract is upgraded.
0 commit comments