Skip to content

Commit

Permalink
add details about the token bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
ramtinms committed Mar 11, 2024
1 parent 77068ea commit d010243
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions protocol/20231116-evm-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ As mentioned earlier COAs expose two interfaces for interaction, one on the Flow

- `address(): EVMAddress` returns the address of the smart contract, and the EVM address that is returned could be used to query balance, code, nonce, etc.

- `deposit(from: @FlowToken.Vault)` allows depositing FLOW tokens into the smart contract (Cadence to Flow EVM).
- `deposit(from: @FlowToken.Vault)` allows depositing FLOW tokens into the smart contract (Cadence to Flow EVM). On the EVM side, the money for the deposits are always transfering from `0x0000000000000000000000010000000000000000` (native token bridge address). The balance of that address is adjusted before transfer.

- `withdraw(balance: Balance): @FlowToken.Vault` allows withdrawing balance from the Flow EVM address and bridges it back as a FlowToken Vault to be handled on the Cadence side.
- `withdraw(balance: Balance): @FlowToken.Vault` allows withdrawing balance from the Flow EVM address and bridges it back as a FlowToken Vault to be handled on the Cadence side. On the EVM side, the money for the withdraw are always transfered to `0x0000000000000000000000010000000000000000` (native token bridge address) and then the balance of that address is adjusted.

- `deploy(code: [UInt8], gasLimit: UInt64, value: Balance): EVMAddress` lets the COA smart contract deploy smart contracts, and the returned address is the address of the new smart contract. The value (balance) is taken from the COA smart contract and moved to the new smart contract address (if they accept it).

Expand Down

1 comment on commit d010243

@Sintayew4
Copy link

Choose a reason for hiding this comment

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

Please sign in to comment.