EVMSEALEDEVM
~█^~*■□●○■▒$*╱*~■●*^▓#◇$$▒●╲▪#◇^!░■&○■~●◇▪%█░^█╲░□!#~&%?~◆●▪$$?■
Transaction ID
Execution Fee
0.00094 FLOWTransaction Summary
EVMCalled FungibleToken, FlowToken, EVM
Contracts
Script Arguments
0toEVMAddressHexString
1amountUFix64
0.00000000
2data[UInt8]
[ "169", "5", "156", "187", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "8", "68", "169", "103", "12", "230", "71", "220", "71", "83", "168", "251", "76", "226", "116", "31", "18", "24", "24", "216", "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", "61", "216", "123", "216", "64", "0" ]
3gasLimitUInt64
16777216
Cadence Script
1// Flow Wallet Monorepo - mainnet Script - callContract - Extension - 3.1.5
2// Platform: extension - 3.1.5 - local
3
4import FungibleToken from 0xf233dcee88fe0abe
5import FlowToken from 0x1654653399040a61
6import EVM from 0xe467b9dd11fa00df
7
8/// Transfers $FLOW from the signer's account Cadence Flow balance to the recipient's hex-encoded EVM address.
9/// Note that a COA must have a $FLOW balance in EVM before transferring value to another EVM address.
10///
11transaction(toEVMAddressHex: String, amount: UFix64, data: [UInt8], gasLimit: UInt64) {
12
13 let coa: auth(EVM.Withdraw, EVM.Call) &EVM.CadenceOwnedAccount
14 let recipientEVMAddress: EVM.EVMAddress
15
16 prepare(signer: auth(BorrowValue, SaveValue) &Account) {
17 if signer.storage.type(at: /storage/evm) == nil {
18 signer.storage.save(<-EVM.createCadenceOwnedAccount(), to: /storage/evm)
19 }
20 self.coa = signer.storage.borrow<auth(EVM.Withdraw, EVM.Call) &EVM.CadenceOwnedAccount>(from: /storage/evm)
21 ?? panic("Could not borrow reference to the signer's bridged account")
22
23 self.recipientEVMAddress = EVM.addressFromString(toEVMAddressHex)
24 }
25
26 execute {
27 if self.recipientEVMAddress.bytes == self.coa.address().bytes {
28 return
29 }
30 let valueBalance = EVM.Balance(attoflow: 0)
31 valueBalance.setFLOW(flow: amount)
32 let txResult = self.coa.call(
33 to: self.recipientEVMAddress,
34 data: data,
35 gasLimit: gasLimit,
36 value: valueBalance
37 )
38 assert(
39 txResult.status == EVM.Status.failed || txResult.status == EVM.Status.successful,
40 message: "evm_error=".concat(txResult.errorMessage)
41 )
42 }
43}