Skip to main content
6 events
when toggle format what by license comment
Sep 11, 2023 at 22:07 comment added Maka Appreciate the follow up, and ye that makes sense. Love that you worked through it, pretty sure you will do ok.
Sep 11, 2023 at 21:07 comment added James Hines Just to follow up: I'm new to Solidity as a programming language, so I kept forgetting that I have to use whole numbers when doing arithmetic. By simple chance, my JavaScript tests were using whole numbers as inputs, but my Python application code passed in floats as inputs, that's why everything seemed to work when I was just running my Truffle tests. I'm glad I caught this on a testnet.
Sep 11, 2023 at 4:17 comment added Maka You're welcome. That is very possible, maybe print values right before they are encoded and again as calldata then convert any hex, look for a difference. Sounds like you are on the right track.
Sep 11, 2023 at 3:48 comment added James Hines Thank you. I am doing simple arithmetic in that function (division, addition, and subtraction), and I have been able to reproduce the reversion in ganache. My js truffle tests are passing, but my application logic uses web3.py. It's a bit confusing. I have a feeling the values I'm sending to my contract when I'm building my transactions in Python are causing the error. Thanks again!
Sep 11, 2023 at 3:43 vote accept James Hines
Sep 11, 2023 at 2:35 history answered Maka CC BY-SA 4.0