From d01024385bf72e8d566f2502c343780603624210 Mon Sep 17 00:00:00 2001 From: ramtinms Date: Mon, 11 Mar 2024 12:26:53 -0700 Subject: [PATCH] add details about the token bridge --- protocol/20231116-evm-support.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protocol/20231116-evm-support.md b/protocol/20231116-evm-support.md index 83202b0d..49c22612 100644 --- a/protocol/20231116-evm-support.md +++ b/protocol/20231116-evm-support.md @@ -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).