-
Notifications
You must be signed in to change notification settings - Fork 428
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
[rc8] examples/erc721 build upload/deployment fails with ContractTrapped
#1108
Comments
After the #1065, the constructor should be payable to be able to get a deposit for a contract. @cmichi @athei Hmm, seems that the transferred balance will be always not zero during the instantiation of the contract. When constructor can be not payable? Maybe |
With the new automatic storage deposits we don't use the the transferred value in order to have the minimum balance. What will happen is that the required deposit is automatically transferred to the contracts account and is reserved there. This is what allows us to have non payable constructors: The minimum deposit is handled by the pallet and the transferred value is only needed (or allowed) to be non zero if the contract logic requires it (payable constructor). Essentially constructors and messages behave exactly the same there now. |
Just tested with everything on master and apps v0.103.1. Deploy works for me. What did you enter as |
@agryaznov I also can't reproduce the error. I installed |
The With I think this will be an often mistake made by users who would likely specify non-zero |
This won't be a problem in the future with polkadot-js/apps#6645. The UI won't show the |
Yeah so everything working as intended. The constructor isn't payable and therefore a |
When I'm submitting the transaction about deployment with For testing I installed the node by the next command: cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --force --locked |
That can't be because this error doesn't exist anymore. So you are most likely testing against an older node than you think you are. |
Yep, you are right, I had two nodes at the same time. With a new one everything works |
This error appears during uploading the contract through PolkadotJS Apps, however, it does not seem to be UI related, as it is clear that DispatchError is being returned from runtime:
(which is
ContractTrapped
frompallet_contracts
)The bug
examples/erc721 contract taken from ink! v3.0.0-rc8 builds successfully with cargo-contract 0.17
Uploading that build through PolkadotJS Apps v0.102.2 connected to substrate-contracts-node v0.5.0 fails with
ContractTrapped
The text was updated successfully, but these errors were encountered: