-
Notifications
You must be signed in to change notification settings - Fork 1.7k
x-contract-call failed: EVM execution error #9276
Comments
@pepyakin can you have a look? |
Haven't worked with tutorial. I think @fckt should know better. |
@zqzqz interesting. The contract call throws a panic.
So, by default contracts are compiled without proper error reporting. This is because by default we want to have small binaries. In order to see the panic message you'll need to compile the contract with the |
Thanks a lot @fckt . But I cannot figure out why "overflow" happens.
Is there anyway to print more trace log? |
This is the most verbose output we can provide for now, unfortunately.. Update: Here is a lot of examples on how to mock Endpoints, using |
Thank you @fckt . I noticed that parity_hash & bigint are combined into pwasm_abi::types. I am not sure whether they are exact same thing. |
Take a look on the tests also which demonstrates this: |
Please help, I struggled for a long time...: when using pwasm-test to test ccall (still on tutorial step-5. Only add a function xTotalSupply, add a test and change nothing else)
test code
xtotalSupply function and environment are the same as before.
|
What happens in contract.xTotalSupply(TOKEN_ADDR.clone()); ? The problem is that |
See my first comment
|
Now I understand the issue.
By adding
It's clearly a valid problem with |
Thanks. Yes the test passes by adding |
Made a fix for it openethereum/pwasm-test#32 |
Whatever kind of x-contract-call I tried, they all failed with U256 overflow. I don't think it's an accident in my code when casting U256 to u32 or u64 (actually I never do this casting manually). |
Before filing a new issue, please provide the following information.
Your issue description goes here below. Try to include actual vs. expected behavior and steps to reproduce the issue.
I am trying to use wasm contracts on Parity development chain.
Contract is based on pwasm-tutorial: step5
Add one cross-contract function:
Call it through web3:
note
Contract was built by
nightly-2018-07-24
.Current
TokenContract
andTokenContract
onxAddress
are both successfully deployed.Directly call
totalSupply
method ofxAddress
works well and return 10000000.Other methods which don't have x-contract-calls works well.
expected behavior
print a supply of
xAddress
likesupply of 0x60C7BB902469c7C3c258832326c16b7410CC273F 10000000
actual
web3:
Parity
step to reproduce
Just use x-contract-calls. Maybe my way is wrong. I am not sure which module is responsible for this, sorry if this issue belongs another repo.
The text was updated successfully, but these errors were encountered: