2

I got this error when I was trying to deploy my ink! smart contract on Rococo:

**StorageDepositLimitExhausted
More storage was created than allowed by the storage deposit limit.**

What might be the problem?

2 Answers 2

3

A common mistake that causes this issue is to forget to send ROCs to the Contracts chain. If you don't specify the parachain ID when you request ROCs from the faucet, it will just send you ROCs on the relay chain and you will get a StorageDepositLimitExhausted error because you don't have funds to call the contract. The easiest way to avoid this is:

  • If you use the Matrix faucet (#rococo-faucet:matrix.org), specify the contracts chain paraID in this format: !drip <address:paraID>. For e.g.
!drip 5CCdh5AN2yrpvqWavkmUjnNvKhHthXVqMEBzbjc7JCHC1fsb:1002
  • If you're using the faucet UI, make sure you select the Contracts network when you're requesting ROCs.

enter image description here

Then you'll be sure to have ROCs available to use on the Contracts chain.

0

The StorageDepositLimitExhausted error occurs when the storage required by your ink! smart contract exceeds the allowed storage deposit limit on the Rococo testnet.

This error typically arises due to one or more of the following reasons:

Large storage variables: Your smart contract might have large storage variables or a large number of storage variables that, when combined, exceed the allowed storage deposit limit. You should review your contract's storage usage and consider optimizing or reducing the size of your storage variables.

Incorrect storage deposit limit configuration: It's possible that the storage deposit limit configuration in the Rococo testnet is set too low for your specific smart contract use case. If you believe this is the issue, you might want to discuss it with the developers or maintainers of the Rococo testnet.

To address this issue, you can try the following:

Optimize your smart contract: Review your ink! smart contract's storage usage and optimize it by reducing the size or number of storage variables. This might involve using more efficient data structures or rethinking your contract's design to minimize storage requirements.

Reach out to the testnet maintainers: If you believe that the storage deposit limit on the Rococo testnet is too low for your use case, consider reaching out to the testnet maintainers through their support channels or forums. They might be able to provide guidance or even adjust the storage deposit limit, if necessary.

Test on a different network: If the Rococo testnet's storage deposit limit continues to be a limitation for your smart contract, you can consider deploying and testing your contract on a different testnet or a local development network. This way, you can continue testing and development without being constrained by the storage deposit limit.

Remember that each network may have different storage deposit limits and rules, so it's essential to test your smart contract on your target network to ensure it functions as expected.

1
  • Great explanation, but would you happen to know where on the substrate-node-template you can increase this allowed storage deposit limit? What I find is when I deploy a variety of contracts with one address (400-600) contracts, I get this error.
    – BRNHINLT
    Commented Mar 19, 2023 at 20:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.