-
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
Got contracts.StorageDepositLimitExhausted
when instantiating contract. rc-7
was OK.
#1112
Comments
@czyczk I have a similar issue on my end with |
@czyczk do you mind uploading a Gist to GitHub with your contract (Rust + TOML)? |
I see. The problem lies in the new field In previous versions (ink rc7 + node 0.3.0 + JS API 6.12.x) I'm not sure whether the field exists, but it never bothered to be specified and the instantiation worked. I just tried to pass a In the instantiation page of the Substrate Contracts Explorer (the new version of Canvas UI), I see no storage deposit limit. I don't know what version the GitHub hosted pages is based on, but clearly it works. So the question now is, how can I achieve the same effect, i.e. not specifying the storage deposit limit manually, and still make the instantiation pass? |
@czyczk @VargSupercolony We've figured it out now. It was due to a mispricing of deposits in the latest We've fixed it now and done a new release. You can find the binary releases here or install via:
|
Questions
No. Testing and compilation are OK.
Version
Rust Nightly:
cargo 1.60.0-nightly (95bb3c92b 2022-01-18)
cargo-contract:
cargo-contract 0.17.0-unknown-x86_64-linux-gnu
substrate-contract-node:
substrate-contracts-node 0.5.0-0ec18d9-x86_64-linux-gnu
ink!:
3.0.0-rc8
Describe the bug
I have a custom struct
ComplexStruct
which contains another custom struct and they have theEncode
etc. properly annotated. In the#[ink(storage)]
section I store the struct in a HashMap identified by its ID (string). TheString
and collection types are of theink_prelude
andink_storage
versions.The code in the storage section is something like this:
The
default()
constructor just instantiates them withDefault::default()
.Testing and compilation are OK. The same code got instantiated using the
default()
constructor without problem withv3.0.0-rc7
, but not so withv3.0.0-rc8
.The module error I got during the instantiation was (not original, enriched with the error metadata):
Further description
Actually it's very easy get it reproduced with a minimal example. Write an
Inner
struct and anOuter
struct which contains anInner
.Store them in hash maps like
and implement a
default()
constructor. Same error when instantiating.Expected behavior
Instantiation should succeed just as before.
Attachment
rc-7 wasm: https://1drv.ms/u/s!Aj_rPvkyS8y8gvFVvamGbf8MqsFyxQ?e=QLaqte
rc-7 metadata.json: https://1drv.ms/u/s!Aj_rPvkyS8y8gvFSEuJh7Cf74cI8Eg?e=hGXnCM
rc-8 wasm: https://1drv.ms/u/s!Aj_rPvkyS8y8gvFUY3MRjJR8WjJcRQ?e=ArsySK
rc-8 metadata.json: https://1drv.ms/u/s!Aj_rPvkyS8y8gvFTNx-spU29_T6hIA?e=H2Tgi2
The text was updated successfully, but these errors were encountered: