Conversation
crates/extrinsics/src/lib.rs
Outdated
| // From contracts pallet version 10 deposit calculation has changed. | ||
| if contract_pallet_version >= 10 { | ||
| let existential_deposit_address = | ||
| api::constants().balances().existential_deposit(); |
There was a problem hiding this comment.
This call introduces a dependency on the Balances pallet. The drawback is that we now have an additional dependency in the metadata, which has caused its size to grow.
There was a problem hiding this comment.
I see no problem with that. We are not particularly concerned with the binary sized of cargo-contract
crates/extrinsics/src/lib.rs
Outdated
|
|
||
| let version = client | ||
| .rpc() | ||
| .storage(key.as_slice(), None) |
There was a problem hiding this comment.
Raw access to the storage
There was a problem hiding this comment.
Isn't there an RPC method to fetch a pallet version?
There was a problem hiding this comment.
I have not found it
crates/extrinsics/src/lib.rs
Outdated
| .saturating_add(storage_byte_deposit); | ||
|
|
||
| // From contracts pallet version 10 deposit calculation has changed. | ||
| if contract_pallet_version >= 10 { |
There was a problem hiding this comment.
Need to display an error to the user otherwise
There was a problem hiding this comment.
For the pallet-contracts version >=8, it works. The issue may arise for pallets-contract versions <8, as it will result in an error during the scale decoding of ContractInfo struct, which has changed at this time. It's important to note that this limitation is not introduced by this commit.
Summary
Closes #1035
inkorpallet-contracts?Add total contract deposit
Description
Added functionality to contract info command, which calculates and displays storage total deposit:
Old
Storage Deposit(which displayed contract_info.storage_item_deposit) has been renamed to theStorage Items DepositThis change depends on pallet-contracts, it should work with the versions
>=8The metadata has been extended by the
Pallet Balances, and it now includes the palletsContractsandBalancesChecklist before requesting a review
CHANGELOG.md