I have a script that successfully does a swap, but when i try to use the received tokens I get a NotEnoughBalance
Panic error.
I noticed that the scripts address is represented as zero address (0x00) in the logs and receipts, so I have tried using 0x00 instead of my EOA address, but it seems that the script fails regardless…I’m not able to have Mira send the tokens directly to the next destination in this context.
Do i have to do something special to receive tokens and use it within the same script code?
Here are some relevant receipts, showing the initial swap:
Transfer {
id: 0x0000000000000000000000000000000000000000000000000000000000000000,
to: 0x2e40f2b244b98ed6b8204b3de0156c6961f98525c8162f80162fcf53eebd90e7,
amount: 1830266234186,
asset_id: 0x1d5d97005e41cae2187a895fd8eab0506111e0e2f3331cd3912c15c24e3c1d82,
},
TransferOut {
id: 0x2e40f2b244b98ed6b8204b3de0156c6961f98525c8162f80162fcf53eebd90e7,
to: 0xMyEoaAddress,
amount: 52540645,
asset_id: 0x286c479da40dc953bddc3bb4c453b608bba2e0ac483b077bd475174115395e6b,
},
Panic {
id: 0x0000000000000000000000000000000000000000000000000000000000000000,
reason: PanicInstruction {
reason: NotEnoughBalance,
instruction: CALL { target_struct: 0x10, fwd_coins: 0x18, asset_id_addr: 0x17, fwd_gas: 0x16 } (bytes: 2d 41 85 d6),
},
pc: 28972,
is: 10368,
contract_id: None,
},