EVMSEALEDEVM
&@◇╲$#░■╳▫╱╲░~██%╲█◇╱&■%~▒#▒○#░~□^■◇█▒%*#&!╲~╱╱▪▒╲╳╱█●#╲◆╳^!▒▒@░
Transaction ID
Execution Fee
0.00009272 FLOWTransaction Summary
EVM
Called FungibleToken, FlowToken, EVM
Contracts
Script Arguments
Copy:
0toEVMAddressHexString
C2ede14cF047f00B1dE9D1A6A1E122451c0f46A9
1amountUInt256
0
2data[UInt8]
[ "173", "201", "119", "46", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "2", "26", "78", "136", "212", "211", "161", "208", "14", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "19", "230", "48", "0", "12", "28", "73", "33", "106" ]
3gasLimitUInt64
30000000
Cadence Script
1// Flow Wallet - mainnet Script callContractV2 - v2.72
2// Extension-2.8.7
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}