EVMSEALEDEVM
◆^%▓?□!╱◆**●▒%~╱▒&~▫◇$~◇!■╳○▫░?█▫▪╱$&@╱~$●▓*▫░%&╲%◆▪$╲#▪@?▒╲●□░●
Transaction ID
Execution Fee
0.00198 FLOWTransaction Summary
EVMCalled FungibleToken, FlowToken, EVM
Contracts
Script Arguments
0toEVMAddressHexString
e847D70a35bbb9DA4133EdC1Cc9cCfFe0C379b4f
1amountUInt256
0
2data[UInt8]
[ "128", "80", "13", "32", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "188", "146", "170", "194", "219", "191", "66", "33", "82", "72", "181", "104", "142", "179", "211", "210", "179", "47", "44", "141", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "15", "12", "240", "100", "221", "89", "32", "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", "2", "8", "17", "203", "220", "31", "88", "156", "190" ]
3gasLimitUInt64
16777216
Cadence Script
1// Flow Wallet - mainnet Script callContractV2 - v2.76
2// Extension-3.1.10
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}