EVMSEALEDEVM
■▓█□&●▪╳■*░~◆▓^?~╲▪$^&◇░○@@^□◆▪╱&?▒■▪~□▒?╳○╲○░▫○$*$*$?▓▪○@○▓▫#$▒
Transaction ID
Execution Fee
0.00017794 FLOWTransaction Summary
EVM
Called FungibleToken, FlowToken, EVM
Contracts
Script Arguments
Copy:
0toEVMAddressHexString
bC92aaC2DBBF42215248B5688eB3D3d2b32F2c8d
1amountUInt256
0
2data[UInt8]
[ "97", "123", "160", "55", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "42", "171", "234", "32", "88", "181", "172", "45", "51", "155", "22", "60", "106", "182", "242", "182", "213", "58", "171", "237", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "7", "170", "57", "227", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "2", "116", "55", "23", "194", "73", "168", "212", "99", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0" ]
3gasLimitUInt64
30000000
Cadence Script
1// Flow Wallet - mainnet Script callContractV2 - v2.72
2// iOS-2.4.9-125
3
4import FungibleToken from 0xf233dcee88fe0abe
5
6import FlowToken from 0x1654653399040a61
7
8import EVM from 0xe467b9dd11fa00df
9
10
11/// Transfers $FLOW from the signer's account Cadence Flow balance to the recipient's hex-encoded EVM address.
12/// Note that a COA must have a $FLOW balance in EVM before transferring value to another EVM address.
13///
14transaction(toEVMAddressHex: String, amount: UInt256, data: [UInt8], gasLimit: UInt64) {
15
16 let coa: auth(EVM.Withdraw, EVM.Call) &EVM.CadenceOwnedAccount
17 let recipientEVMAddress: EVM.EVMAddress
18
19 prepare(signer: auth(BorrowValue, SaveValue) &Account) {
20 if signer.storage.type(at: /storage/evm) == nil {
21 signer.storage.save(<-EVM.createCadenceOwnedAccount(), to: /storage/evm)
22 }
23 self.coa = signer.storage.borrow<auth(EVM.Withdraw, EVM.Call) &EVM.CadenceOwnedAccount>(from: /storage/evm)
24 ?? panic("Could not borrow reference to the signer's bridged account")
25
26 self.recipientEVMAddress = EVM.addressFromString(toEVMAddressHex)
27 }
28
29 execute {
30 if self.recipientEVMAddress.bytes == self.coa.address().bytes {
31 return
32 }
33 let valueBalance = EVM.Balance(attoflow: UInt(amount))
34
35 let txResult = self.coa.call(
36 to: self.recipientEVMAddress,
37 data: data,
38 gasLimit: gasLimit,
39 value: valueBalance
40 )
41 assert(
42 txResult.status == EVM.Status.failed || txResult.status == EVM.Status.successful,
43 message: "evm_error=".concat(txResult.errorMessage).concat("\n")
44 )
45 }
46}