-
Notifications
You must be signed in to change notification settings - Fork 431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Identical calls executing instantiation of a sub contract fail if made from a message call, succeed from another constructor #740
Comments
found the problem, deploy() needs to be payable |
This should be the error message instead of For those finding this, add the payable decorator to your function.
|
@forgetso I looked into this issue and @vminkov I got your |
Thanks for investigating @cmichi. I'm running into this issue again and I'm using the contracts node with I've actually created an issue for this in the contracts node repo: paritytech/substrate-contracts-node#13 |
Hi @cmichi , I've found a reproducible example of If you take this repos contract: https://github.com/prosopo-io/protocol/blob/master/contracts/lib.rs And remove the
You get Reproducing this requires a fair amount of cloning repos and setup. The instructions are included in the readme here.
|
Ok, well that's good to know. I'm still building in |
I suggest you comment empty functions and start to use |
I thought |
Using ink! 3.0.0-rc3 , it always results in ContractTrapped when trying to instantiate a contract (like the delegator example) from an
#[ink(message)]
call. The same exact code succeeds when attempted to instantiate from a constructor.Different salt is used every time, increased block size and weight - it still says ContractTrapped with no details for the error.
I am attaching a repo that reproduces the case with Mocha (polkadot.js) test cases.
https://github.com/vminkov/ink-substrate-issue
The text was updated successfully, but these errors were encountered: