Skip to content

Commit

Permalink
address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuahannan committed Jun 5, 2024
1 parent f08f23f commit 821b4fe
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Help is available during the [Cadence 1.0 Office Hours](https://calendar.google.
#### Expectations

- Any contracts that are not upgraded will fail after Testnet and Mainnet upgrade.
They **WILL NOT** be able to be upgraded again, so it is imperative
They **cannot** be upgraded again, so it is imperative
that developers stage their upgrades before the Cadence 1.0 migration.
- After the Testnet upgrade, Cadence versions will differ on Testnet (v1.0) and Mainnet (v0.42).
- Developers must take extra considerations if they wish to continue deploying on the mainnet during this period. Otherwise, incompatibilities between different Cadence versions will lead to failed deployments.
Expand Down
14 changes: 7 additions & 7 deletions versioned_docs/version-1.0/tutorial/01-first-steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ Cadence introduces new features to smart contract programming that help develope
- Resource-oriented programming, a new paradigm that pairs linear types with object capabilities to create a secure and declarative model for digital ownership
by ensuring that resources (and their associated assets) can only exist in one location at a time, cannot be copied, and cannot be accidentally lost or deleted
- Built-in pre-conditions and post-conditions for functions and [transactions](../language/transactions.md)
- The utilization of capability-based security and entitlements, which enforces access control by requiring that access to objects
- The utilization of capability-based security and entitlements,
which enforces access control by requiring that access to objects
is restricted to only the owner and those who have a valid reference to the object

Please see the [Cadence introduction](../index.md) for more information about the high level design of the language.
Expand All @@ -29,12 +30,11 @@ an in-browser editor and Flow emulator to experiment with Flow.
Using the Flow Playground, you can write Cadence smart contracts,
deploy them to a local Flow emulated blockchain, and submit transactions.

The Flow Playground should be compatible with any standard web browser,
but we recommend that you use Google Chrome with it,
because it has been tested and optimized primarily with the Chrome browser so far.
The Flow Playground should work with any standard web browser.
However, we recommend using Google Chrome, as it has been primarily tested and optimized for this browser.

The [Flow Crescendo (Cadence 1.0) upgrade](https://flow.com/upgrade/crescendo)
introduces new powerful features to Cadence. Currently, the playground uses an older version
introduces new and powerful features to Cadence. Currently, the playground uses an older version
of Cadence, but you can interact with a Cadence 1.0 playground by going to
https://v1.play.flow.com/.

Expand Down Expand Up @@ -76,8 +76,8 @@ that verifies and executes the performance of a contract (like a lawyer does)
without the need for any trusted third party anywhere in the process, because the code itself is trusted.

Programs that run on blockchains are commonly referred to as smart contracts
because they mediate important functionality (such as currency)
without having to rely on a central authority (like a bank).
because they facilitate important functions, such as managing digital currency,
without relying on a central authority like a bank.

[Cadence is the premier resource-oriented programming language](../index.md)
for developing smart contracts and is currently
Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-1.0/tutorial/03-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ Here, we explicitly have to account for the possibility that the `helloResource`
We use the nil-coalescing operator (`??`) to "unwrap" the optional.
This basically means that we are handling the case where the `load` method returns `nil`.
If it returns `nil`. We `panic`, which will abort execution of the transaction
with an error message. It is important for developers to always to provide detailed error messages
with an error message. It is important for developers to always provide detailed error messages
so that if something goes wrong in the code, it is obvious what needs to be fixed.

Refer to [Optionals In Cadence](../language/values-and-types.mdx#optionals) to learn more about optionals and how they are used.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,12 @@ which means that for any given object, a user is allowed to access a field or me
- Are the owner of the object
- Have a valid reference to that field or method (note that references can only be created from capabilities, and capabilities can only be created by the owner of the object)

When a user stores their NFT `Collection` in their account storage, it is by default not available for other users to access.
A user's authorized account object (`&Account`, which gives access to private storage)
is only accessible by its owner. To give external accounts access to the `deposit` function,
When a user stores their NFT `Collection` in their account storage,
it is by default not available for other users to access
because it requires access to the authorized account object (`auth(Storage) &Account`)
which is only accessible by a transaction that the owner authorizes and signs.

To give external accounts access to the `deposit` function,
the `getIDs` function, and the `idExists` function, the owner creates an interface that only includes those fields:

```cadence
Expand Down

0 comments on commit 821b4fe

Please sign in to comment.