Skip to content

Commit 148075a

Browse files
authored
Merge pull request #1187 from onflow/brian-doyle/reorg-tutorials
Reorg EVM guides and move cross-vm items to tutorials
2 parents 625e22d + 49f60b5 commit 148075a

24 files changed

+107
-51
lines changed

docs/evm/data-indexers.md renamed to docs/ecosystem/data-indexers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Data Indexers
33
sidebar_label: Data Indexers
4-
sidebar_position: 9
4+
sidebar_position: 4
55
---
66

77
# Data Indexers

docs/ecosystem/faucets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ From the Faucet's landing page, click on the "Create Account" button. You'll be
7272

7373
Know that there is a distinction between Flow native accounts and EVM accounts. Native accounts allow you to interact with the Cadence runtime, while EVM accounts are used for interacting with Flow's EVM. To create an EVM account, you can use EVM tooling to generate an Ethereum Owned Account (EOA) and simply fund the associated address. Alternatively, you can create an EVM account controlled by your Flow native account - known as a Cadence Owned Account (COA) - in which case you'll need a Flow native account and should continue with the steps below.
7474

75-
For more information interacting with EVM via COAs, see the [Interacting With COAs documentation](../evm/cadence/interacting-with-coa.md).
75+
For more information interacting with EVM via COAs, see the [Interacting With COAs documentation](../tutorials/cross-vm-apps/interacting-with-coa.md).
7676

7777
:::
7878

docs/evm/accounts.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ However, in order to leverage all the features of Cadence, developers will need
2626

2727
🚨🚨🚨 **ASSET LOSS RISK** 🚨🚨🚨
2828

29-
Cadence-Owned Accounts, easily identifiable by the leading zeroes (`0x00000000000000000000000`) **only exist on Flow**. The keys to these addresses are generated in a way that is not compatible with other networks.
29+
Cadence-Owned Accounts, easily identifiable by the leading zeroes (`0x00000000000000000000000`) **only exist on Flow**. The keys to these addresses are generated in a way that is not compatible with other networks.
3030

3131
As a result, any assets sent to one of these addresses on another network **will be lost permanently!**
3232

@@ -46,7 +46,7 @@ COAs create powerful new opportunities to improve the UX, functionality and util
4646

4747
- **Enhanced Composability**: Applications written in Solidity can be extended and composed upon within Cadence. This allows developers to build upon existing EVM applications and deliver a more feature-rich user experience.
4848

49-
- **Atomic Interactions**: Developers are able to execute multiple EVM transactions atomically from a COA. This is particularly useful for applications that require multiple transactions to be executed within a single block, or require all prior transactions' state changes to revert if a single transaction in the batch fails. This is not possible natively using EOAs or with `UserOperations` when using the ERC-4337 standard; in both cases each individual transaction is distinct and cannot be reverted back once state has changed.
49+
- **Atomic Interactions**: Developers are able to execute multiple EVM transactions atomically from a COA. This is particularly useful for applications that require multiple transactions to be executed within a single block, or require all prior transactions' state changes to revert if a single transaction in the batch fails. This is not possible natively using EOAs or with `UserOperations` when using the ERC-4337 standard; in both cases each individual transaction is distinct and cannot be reverted back once state has changed.
5050

5151
- **Native Account Abstraction**: COAs are controlled by Cadence resources, which are in turn owned by Flow accounts. [Flow accounts](./accounts.md) have built-in support for multi-signature authentication, key rotation, and account recovery. As a Cadence resource, COAs naturally inherit [these features](../build/advanced-concepts/account-abstraction.md).
5252

@@ -64,6 +64,6 @@ Because COAs are owned by Cadence resources, an EVM transaction is not required
6464

6565
### More Information
6666

67-
To learn how to create and interact with COAs in Cadence, see the guide for [Interacting with COAs from Cadence](./cadence/interacting-with-coa.md).
67+
To learn how to create and interact with COAs in Cadence, see the guide for [Interacting with COAs from Cadence](../tutorials/cross-vm-apps/interacting-with-coa.md).
6868

6969
For more information about Cadence Owned Accounts, see the [Flow EVM Support FLIP](https://github.com/onflow/flips/pull/225/files)

docs/evm/cadence/_category_.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/evm/clients/_category_.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/evm/clients/ethers.md renamed to docs/evm/guides/ethers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Ethers.js on Flow Blockchain
33
sidebar_label: Ethers
4-
sidebar_position: 1
4+
sidebar_position: 8
55
---
66

77
# Ethers.js

docs/evm/clients/web3-js.md renamed to docs/evm/guides/web3-js.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Web3.js on Flow Blockchain
33
sidebar_label: Web3.js
4-
sidebar_position: 2
4+
sidebar_position: 9
55
---
66

77
# Web3.js

docs/evm/cadence/batched-evm-transactions.md renamed to docs/tutorials/cross-vm-apps/batched-evm-transactions.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ creating a [Cadence-controlled EVM account (COA)]. Specifically, we will:
3939
- Wrap FLOW as WFLOW
4040
- Approve an ERC721 to transfer WFLOW in exchange for an NFT mint
4141
- Mint an ERC721 token - this ERC721 has a 50% chance of failing (using [onchain VRF] to determine success)
42-
42+
4343
These operations let us focus on the **core concepts** of this guide:
4444

4545
1. **Batching EVM transactions** using Cadence
@@ -114,7 +114,7 @@ interact with the `WFLOW` contract on Testnet. There are a number of ways we cou
114114
IDE, Foundry's CLI, Hardhat, etc. - but for the purposes of this guide, we'll use the [Flowscan EVM block explorer].
115115

116116
Navigate to the WFLOW Testnet contract on Flowscan: [WFLOW]. Ensure you're on the `Write Contract` tab which allows you
117-
to interact with the contract's mutating functions.
117+
to interact with the contract's mutating functions.
118118

119119
Before you can interact with the contract, you need to connect your MetaMask wallet to the [Flowscan EVM block
120120
explorer]. Click the `Connect` button in the top right corner and follow the prompts to connect your MetaMask wallet.
@@ -230,7 +230,7 @@ import EVM from 0x8c5303eaa26202d6
230230
/// @param maybeMintERC721AddressHex: The EVM address hex of the ERC721 contract as a String
231231
///
232232
transaction(wflowAddressHex: String, maybeMintERC721AddressHex: String) {
233-
233+
234234
let coa: auth(EVM.Call) &EVM.CadenceOwnedAccount
235235
let mintCost: UFix64
236236
let wflowAddress: EVM.EVMAddress
@@ -349,11 +349,13 @@ transaction(wflowAddressHex: String, maybeMintERC721AddressHex: String) {
349349
}
350350
351351
```
352+
352353
</details>
353354

354355
You can run the transaction at the following link using the community-developed Flow Runner tool: [`wrap_and_mint.cdc`].
355356

356357
This transaction takes two arguments:
358+
357359
- WFLOW contract address: `0xd3bF53DAC106A0290B0483EcBC89d40FcC961f3e`
358360
- MaybeMintERC721 contract address: `0x2E2Ed0Cfd3AD2f1d34481277b3204d807Ca2F8c2`
359361

@@ -412,7 +414,7 @@ But how does our Flow account interact with EVM from the Cadence runtime? As you
412414
COA](./interacting-with-coa.md) guide, we use a Cadence-owned account (COA) to interact with EVM contracts from Cadence.
413415

414416
A COA is a [resource] providing an interface through which Cadence can interact with the EVM runtime. This is
415-
importantly ***in addition*** to the traditional routes you'd normally access normal EVMs - e.g. via the JSON-RPC API.
417+
importantly **_in addition_** to the traditional routes you'd normally access normal EVMs - e.g. via the JSON-RPC API.
416418
And with this interface, we can take advantage of all of the benefits of Cadence - namely here scripted transactions and
417419
conditional execution.
418420

@@ -712,7 +714,7 @@ Ready to level up your Cadence skills? Take a look at [these Cadence tutorials].
712714
[Flow Wallet extension]: https://wallet.flow.com/download
713715
[Faucet guide]: ../../ecosystem/faucets.md
714716
[Cadence-controlled EVM account (COA)]: ./interacting-with-coa.md
715-
[onchain VRF]: ../guides/vrf.md
717+
[onchain VRF]: ../../evm/guides/vrf.md
716718
[Overview]: #overview
717719
[Testnet]: https://evm-testnet.flowscan.io/token/0xd3bF53DAC106A0290B0483EcBC89d40FcC961f3e?tab=contract
718720
[Mainnet]: https://evm.flowscan.io/token/0xd3bF53DAC106A0290B0483EcBC89d40FcC961f3e?tab=contract
@@ -726,12 +728,12 @@ Ready to level up your Cadence skills? Take a look at [these Cadence tutorials].
726728
[Flowscan Cadence]: https://testnet.flowscan.io/
727729
[resource]: https://cadence-lang.org/docs/solidity-to-cadence#resources
728730
[entitlement]: https://cadence-lang.org/docs/language/access-control#entitlements
729-
[How Flow EVM Works]: ../how-it-works.md
731+
[How Flow EVM Works]: ../../evm/how-it-works.md
730732
[Interacting with COAs]: ./interacting-with-coa.md
731733
[Cadence Transactions]: ../../build/basics/transactions.md
732734
[these Cadence tutorials]: https://cadence-lang.org/docs/tutorial/first-steps
733735
[`setup_coa.cdc`]: https://run.dnz.dev/snippet/4ec75e1f4165fa05
734736
[`fund_coa.cdc`]: https://run.dnz.dev/snippet/0e7370601bd9123b
735737
[`wrap_flow.cdc`]: https://run.dnz.dev/snippet/9dbfb784da5300fb
736738
[`approve_maybe_mint_erc721.cdc`]: https://run.dnz.dev/snippet/1b503d82f9a2c5a7
737-
[`mint.cdc`]: https://run.dnz.dev/snippet/fd7c4dda536d006e
739+
[`mint.cdc`]: https://run.dnz.dev/snippet/fd7c4dda536d006e

0 commit comments

Comments
 (0)