'Dai balanceof showing 0 for my address after successful Uniswap swap transaction on Ganache
I am using Ganache to test out real smart contracts and protocols like minting a NFT, Uniswap , AAve etc. When I run a transaction to mint a NFT I am able to see NFT in my wallet connected to Ganache. Also when I run a wrap transaction on Uniswap I see the weth in my wallet connected with Ganache, but when I do a Uniswap swap I do not see the swapped token in my wallet. The transaction was successful and Eth got deducted but I don't see the token (for ex Dai) that I swapped for Eth. I also tried with other tokens but their balance did not change. Is there something I am doing wrong?
Here is the transaction:
curl -H 'Content-Type: application/json' --data '{"jsonrpc":"2.0", "id": 1, "method": "eth_sendTransaction", "params": [{"from":"0x4a4c43230e64b397f6A0f11C8714f880741d5A9D", "to":"0xcc9a0B7c43DC2a5F023Bb9b738E45B0Ef6B06E04", "value":"0x2C68AF0BB140000", "gas":"0x6691B7", "data":"0x474cf53d0000000000000000000000007d2768de32b0b80b7a3454c06bdac94a69ddc7a9000000000000000000000000ce8646f859769e8be39103f2fe14641502ec36d30000000000000000000000000000000000000000000000000000000000000000"}] }' http://localhost:8545
Here is the debug trace:
CALL address 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2, gas 6696889, value 200000000000000000, payload d0e30db0
CALL address 0x7d2768de32b0b80b7a3454c06bdac94a69ddc7a9, gas 6663204, value 0, payload e8eda9df000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000002c68af0bb140000000000000000000000000000ce8646f859769e8be39103f2fe14641502ec36d30000000000000000000000000000000000000000000000000000000000000000
DELEGATECALL address 0xc6845a5c768bf8d7681249f8927877efda425baf, gas 6556508, payload e8eda9df000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000002c68af0bb140000000000000000000000000000ce8646f859769e8be39103f2fe14641502ec36d30000000000000000000000000000000000000000000000000000000000000000
DELEGATECALL address 0xf5543cdd5f551635e13ebe07e47d01d0fc9cbbd5, gas 6445852, payload 0eca322b4cb5a02f592bd29403ce60c982c7f5174b16842da4fff5cfd025d6836dc48d4b00000000000000000000000000000000000000000000000002c68af0bb140000
STATICCALL address 0xf63b34710400cad3e044cffdcab00a0f32e33ecf, gas 6436009, payload b1bf962d
DELEGATECALL address 0xddde1fa049209bc24b69d5fa316a56efec918d79, gas 6332881, payload b1bf962d
RETURN: 000000000000000000000000000000000000000000005c56cd3725d693df1415
RETURN: 000000000000000000000000000000000000000000005c56cd3725d693df1415
STATICCALL address 0x4e977830ba4bd783c0bb7f15d3e243f73ff57121, gas 6406629, payload 79774338
DELEGATECALL address 0xa558ea1a875f8b576f0728d32c39f62158e49b92, gas 6303952, payload 79774338
RETURN: 0000000000000000000000000000000000000000000000102fd6f1b3ffc7187a0000000000000000000000000000000000000000000000103005d97e16fa5c34000000000000000000000000000000000000000000262e32dc3533a3b969ae6b00000000000000000000000000000000000000000000000000000000627d6bf8
RETURN: 0000000000000000000000000000000000000000000000102fd6f1b3ffc7187a0000000000000000000000000000000000000000000000103005d97e16fa5c34000000000000000000000000000000000000000000262e32dc3533a3b969ae6b00000000000000000000000000000000000000000000000000000000627d6bf8
CALL address 0x030ba81f1c18d280636f32af80b9aad02cf0854e, gas 6385329, value 0, payload 7df5bd3b0000000000000000000000000000000000000000000000000004d8e49050c95d000000000000000000000000000000000000000003422fe111e9efa9202a2f0b
DELEGATECALL address 0x541dcd3f00bcd1a683cc73e1b2a8693b602201f4, gas 6282987, payload 7df5bd3b0000000000000000000000000000000000000000000000000004d8e49050c95d000000000000000000000000000000000000000003422fe111e9efa9202a2f0b
CALL address 0xd784927ff2f95ba542bfc824c8a8a98f3495f6b5, gas 6168206, value 0, payload 31873e2e000000000000000000000000464c71f6c2f760dda6093dcb91c24c39e5d6e18c00000000000000000000000000000000000000000000fdf26cd315339f1a1a070000000000000000000000000000000000000000000000085d593d262b2bbb1f
DELEGATECALL address 0x83d055d382f25e6793099713505c68a5c7535a35, gas 6069251, payload 31873e2e000000000000000000000000464c71f6c2f760dda6093dcb91c24c39e5d6e18c00000000000000000000000000000000000000000000fdf26cd315339f1a1a070000000000000000000000000000000000000000000000085d593d262b2bbb1f
RETURN:
RETURN:
STATICCALL address 0x4e977830ba4bd783c0bb7f15d3e243f73ff57121, gas 6331984, payload f731e9be
DELEGATECALL address 0xa558ea1a875f8b576f0728d32c39f62158e49b92, gas 6232479, payload f731e9be
RETURN: 0000000000000000000000000000000000000000000000103005d97e16fa5c34000000000000000000000000000000000000000000262e32dc3533a3b969ae6b
RETURN: 00000000000000000000000
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|