Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update EVM Accounts text #675

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions docs/evm/build/accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,10 @@ There are three types of accounts used for EVM on Flow.

1. **Externally Owned Accounts (EOA)**: EOAs are controlled by private individuals using cryptographic keys and can initiate transactions directly. They are the primary account type for users to interact with the blockchain, holding and sending cryptocurrency or calling smart contract functions.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. **Externally Owned Accounts (EOA)**: EOAs are controlled by private individuals using cryptographic keys and can initiate transactions directly. They are the primary account type for users to interact with the blockchain, holding and sending cryptocurrency or calling smart contract functions.
1. **Externally Owned Account (EOA)**: An Externally Owned Account (EOA) is a user-controlled account type that operates through cryptographic keys. These accounts are fundamental for user interactions with the blockchain, as they are capable of directly initiating transactions. EOAs serve as the primary gateway for users, allowing them to manage, send, and receive cryptocurrencies, as well as interact with smart contract functionalities.

2. **Contract Accounts**: These accounts hold smart contract code and are governed by this code's logic. Unlike EOAs, Contract Accounts do not initiate transactions on their own but can execute transactions in response to calls they receive from EOAs or other contracts.
3. **Cadence Owned Accounts (COA)**
3. **Cadence Owned Accounts (COA)**: Bridging Cadence and EVM environments, COAs operate similarly to EOAs but execute transactions directed from Cadence. Created from Cadence without a key, COAs are assigned a 20-byte EVM address. As a Resource type owned by a Flow account in the Cadence Virtual Machine, COAs can run EVM transactions, deploy Solidity contracts from Cadence, and perform other EVM interactions. This integration allows developers to utilize the full potential of Cadence within the EVM framework on Flow.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. **Cadence Owned Accounts (COA)**: Bridging Cadence and EVM environments, COAs operate similarly to EOAs but execute transactions directed from Cadence. Created from Cadence without a key, COAs are assigned a 20-byte EVM address. As a Resource type owned by a Flow account in the Cadence Virtual Machine, COAs can run EVM transactions, deploy Solidity contracts from Cadence, and perform other EVM interactions. This integration allows developers to utilize the full potential of Cadence within the EVM framework on Flow.
3. **Cadence Owned Account (COA)**: COA is a natively supported EVM smart contract wallet type owned by a Flow account and controlled by a Cadence resource. COAs provide powerful primitives which allow bridging and control of assets, including ERC721, ERC-20, and $FLOW native tokens, and ensuring seamless composability across Cadence and EVM environments. Unlike EVM Contract Accounts, COAs can initiate transactions on their own without needing an external EOA transaction to trigger them.
**Key Features:**
- COAs are exclusively created via Cadence, assigned unique 20-byte EVM addresses based on their UUID.
- COAs can initiate and execute EVM transactions, deploy Solidity contracts from Cadence, and perform other EVM interactions, with their associated EVM address acting as `tx.origin`, and without need of an EOA trigger
- They support native cross-VM bridging capabilities for a variety of tokens, detailed in the [Flow VM Bridge improvement proposal](https://github.com/onflow/flips/pull/233).
- COAs provide dual interfaces for interaction within Flow EVM and Cadence environments. Additional details can be found in the [EVM Support FLIP](https://github.com/onflow/flips/blob/d01024385bf72e8d566f2502c343780603624210/protocol/20231116-evm-support.md#cadence-owned-account-coa)


EOAs and Contract accounts function the same as on other EVM networks. Read more about EOAs and Contract accounts on the [Ethereum docs](https://ethereum.org/developers/docs/accounts). EVM developers can use EVM on Flow without having to use COAs. However, in order to leverage all the features of Cadence, developers will need to utilize Cadence Owned Accounts.

## Cadence Owned Accounts

Cadence Owned Accounts (COAs) are a new account type on Flow which mediates interactions between EVM and Cadence environments. COAs are intended for use by end-users, the same as EOAs. However, COAs execute EVM transactions as directed from Cadence whereas EOAs run EVM transactions identically to other EVMs via the JSON-RPC endpoint.
Unlike EOAs, COAs do not have a key but are assigned a 20-byte EVM address upon creation from Cadence.

COAs exist in Cadence as a Resource type which is in turn owned by a Flow account on the Cadence VM. COAs facilitate the execution of EVM transactions using its `run` method. They also enable the deployment of Solidity contracts from Cadence, as well as other utility functions to interact with EVM.
![Account-Model](flow-evm-account-model.png)

For more information on Cadence Owned Accounts, see the [Flow EVM Support FLIP](https://github.com/onflow/flips/pull/225/files)
[EOAs and Contract](https://ethereum.org/developers/docs/accounts) accounts function the same as on other EVM networks. EVM developers can use EVM on Flow without having to use COAs. However, in order to unlock all the features of Cadence, developers may choose to utilize Cadence Owned Accounts.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[EOAs and Contract](https://ethereum.org/developers/docs/accounts) accounts function the same as on other EVM networks. EVM developers can use EVM on Flow without having to use COAs. However, in order to unlock all the features of Cadence, developers may choose to utilize Cadence Owned Accounts.
[EOAs and Contract](https://ethereum.org/developers/docs/accounts) accounts function the same as on other EVM networks. EVM developers can use EVM on Flow without having to use COAs. However, in order to unlock all the features of Cadence, developers may choose to take advantage of Cadence Owned Accounts using a Flow compatible wallet.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe link out to Wallets page?


![Account-Model](flow-evm-account-model.png)
For more information on Cadence Owned Accounts, see the [Flow EVM Support FLIP](https://github.com/onflow/flips/pull/225/files).
Loading