Closed Kindhearted57 closed 4 years ago
Ok so I got an reasonable answer from https://ethereum.stackexchange.com/questions/90150/what-is-the-gas-limit-for-a-fallback-function-called-when-the-method-does-not-ex/90159#90159, this shouldn't be something related to web3.py but solc. I'm closing this.
pip freeze
outputWhat was wrong?
The contracts I used:
EtherDelta(DEX)
Freedomcoin(Token)
Here is my logic:
I use userA who deployed the two contracts to transfer 100Ether to userB, then userB invoke
depositToken
, however, as there is notransferFrom
in the token's contract, it will go to fallback function:clearly it will throw, and that's exactly what happened in remix.
However, when I tested this in bytecode using web3py, the transaction was successful,
status
was1
, and when I checkedbalanceOf
in EtherDelta, it returned the true value. I don't know what's wrong. Is this something about web3py itself?Here is my testing code, I used ganache-cli as testnet.
The result of
trueDepositReceipt
:Please don't ask why I'm using bytecode... That's the request for my experiment. I can make sure that there are nothing wrong with the function signatures.