▪◇??╳█◆█╱!~◇◇▪○^░&%□!░#*█@○$▪╱○◆▪◇◇╲▪$◆█#●**▓■○□@◆!▪╱╱▫◇╳○&▫▒█◆╲
Transaction ID
Execution Fee
0.00000424 FLOWExecution Error
pre-condition failed: FungibleToken.Vault.withdraw: Cannot withdraw tokens! The amount requested to be withdrawn (4944.20270000) is greater than the balance of the Vault (2344.32251087).
Raw Error
[Error Code: 1101] error caused by: 1 error occurred: * transaction execute failed: [Error Code: 1101] cadence runtime error: Execution failed: error: pre-condition failed: FungibleToken.Vault.withdraw: Cannot withdraw tokens! The amount requested to be withdrawn (4944.20270000) is greater than the balance of the Vault (2344.32251087). --> f233dcee88fe0abe.FungibleToken:224:16 Was this error unhelpful? Consider suggesting an improvement here: https://github.com/onflow/cadence/issues.
Transaction Summary
Contract CallCalled EVM, FlowEVMBridgeConfig, FlowEVMBridgeUtils +3 more
Script Arguments
[
[
"127",
"243",
"106",
"181",
"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",
"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",
"128",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"2",
"184",
"124",
"150",
"107",
"192",
"11",
"194",
"196",
"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",
"105",
"22",
"82",
"85",
"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",
"2",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"211",
"191",
"83",
"218",
"193",
"6",
"160",
"41",
"11",
"4",
"131",
"236",
"188",
"137",
"212",
"15",
"204",
"150",
"31",
"62",
"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"
]
][ "15000000" ]
[ "4944202700000000000000" ]
Cadence Script
1import EVM from 0xe467b9dd11fa00df
2import FlowEVMBridgeConfig from 0x1e4aa0b87d10b141
3import FlowEVMBridgeUtils from 0x1e4aa0b87d10b141
4import FlowEVMUtil from 0xccacabad8e80b596
5import FlowToken from 0x1654653399040a61
6import FungibleToken from 0xf233dcee88fe0abe
7
8transaction(amountIn: UFix64, minAmountOut: UFix64, txData: [[UInt8]], gasLimit: [UInt64], value: [UInt]) {
9 prepare(signer: auth(BorrowValue, CopyValue) &Account) {
10 let coa = signer.storage.borrow<auth(EVM.Bridge, EVM.Call, EVM.Withdraw) &EVM.CadenceOwnedAccount>(from: /storage/evm)!;let startVault = signer.storage.borrow<auth(FungibleToken.Withdraw) &{FungibleToken.Vault}>(from: /storage/flowTokenVault)!;let a <- startVault.withdraw(amount: amountIn);let b = FlowEVMBridgeUtils.convertCadenceAmountToERC20Amount(a.balance, erc20Address: FlowEVMBridgeConfig.getEVMAddressAssociated(with: Type<@FlowToken.Vault>())!);coa.deposit(from: <-(a as! @FlowToken.Vault))
11 let r0 = FlowEVMUtil.runCall(coa, contractAddress: EVM.addressFromString("0xf45AFe28fd5519d5f8C1d4787a4D5f724C0eFa4d"), txdata: txData[0], gasLimit: gasLimit[0], value: EVM.Balance(attoflow: UInt(b)));let c = FlowEVMUtil.convertBytesToUInt256(r0.slice(from: r0.length - 32, upTo: r0.length));let diff = FlowEVMBridgeUtils.convertERC20AmountToCadenceAmount(c, erc20Address: EVM.addressFromString("0x2aaBea2058b5aC2D339b163C6Ab6f2b6d53aabED"));assert(diff >= minAmountOut, message: diff.toString().concat(" < minAmountOut"));
12 }
13}