Whoops! 😨 Something unexpected happened...
[Error Code: 1101] error caused by: 1 error occurred:
* transaction execute failed: [Error Code: 1101] cadence runtime error: Execution failed:
--> 45f3c5f8df14e5c6da8bf2cb02b2b57ecba54ccc996dd5ac57ba73629258f3fb:19:11
|
19 | if tryBI(tokenInVault: flowTokenVault) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--> 45f3c5f8df14e5c6da8bf2cb02b2b57ecba54ccc996dd5ac57ba73629258f3fb:40:31
|
40 | let token1Vault <- UsdcUsdtSwapPair.swapToken1ForToken2(from: <- (token0Vault as! @FiatToken.Vault));let vaultOut <- FlowSwapPair.swapToken2ForToken1(from: <- token1Vault);earn = earn + vaultOut.balance - cur;tokenInVault.deposit(from: <- vaultOut)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--> 9c6f94adf47904b5.UsdcUsdtSwapPair:276:23
|
276 | let token2Amount = self.quoteSwapExactToken1ForToken2(amount: token1Amount)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: pre-condition failed: Not enough Token2 in the pool
--> 9c6f94adf47904b5.UsdcUsdtSwapPair:229:6
|
229 | self.token2Vault.balance >= amount: "Not enough Token2 in the pool"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^