-
Notifications
You must be signed in to change notification settings - Fork 414
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
Improved deposit function #815
Conversation
pub const SubAccountDeposit: Balance = 2 * ASTR; // 53 bytes on-chain | ||
pub const BasicDeposit: Balance = deposit(1, 258); // 258 bytes on-chain | ||
pub const FieldDeposit: Balance = deposit(0, 66); // 66 bytes on-chain | ||
pub const SubAccountDeposit: Balance = deposit(1, 53); // 53 bytes on-chain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to get actual sizeofs for on-chain bytes instead of hand written constants?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps the size of the struct being stored could be fetched via MaxEncodedLenTrait
but its function isn't a const. So not right now, to the best of my knowledge - perhaps in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Pull Request Summary
Make
fn deposit
function weight items and bytes differently.Summary
fn deposit
pallet-identity
withdeposit
function usageHandling
pallet-contracts
onShibuya
&Shiden
should be done as part of future update since ti requires storage migration.Check list
pallet-contracts
(requires storage migration)INIT_SUPPLY_FACTOR
where applicable?