DepositStorage¶
Calls¶
reclaim_deposit¶
See [Pallet::reclaim_deposit
].
Attributes¶
Name | Type |
---|---|
namespace | T::Namespace |
key | DepositKeyOf<T> |
Python¶
call = substrate.compose_call(
'DepositStorage', 'reclaim_deposit', {
'key': 'Bytes',
'namespace': ('DipProvider', ),
}
)
Events¶
DepositAdded¶
A new deposit has been reserved and stored.
Attributes¶
Name | Type | Composition |
---|---|---|
namespace | T::Namespace |
('DipProvider',) |
key | DepositKeyOf<T> |
Bytes |
deposit_entry | DepositEntryOf<T> |
{'deposit': {'owner': 'AccountId', 'amount': 'u128'}, 'reason': {None: None, 'Attestation': ('Deposit',), 'Delegation': ('Deposit',), 'Did': ('Deposit',), 'DidLookup': ('Deposit',), 'Web3Names': ('Deposit',), 'PublicCredentials': ('Deposit',), 'DepositStorage': ('Deposit',)}} |
DepositReclaimed¶
A deposit has been released and deleted from storage.
Attributes¶
Name | Type | Composition |
---|---|---|
namespace | T::Namespace |
('DipProvider',) |
key | DepositKeyOf<T> |
Bytes |
deposit_entry | DepositEntryOf<T> |
{'deposit': {'owner': 'AccountId', 'amount': 'u128'}, 'reason': {None: None, 'Attestation': ('Deposit',), 'Delegation': ('Deposit',), 'Did': ('Deposit',), 'DidLookup': ('Deposit',), 'Web3Names': ('Deposit',), 'PublicCredentials': ('Deposit',), 'DepositStorage': ('Deposit',)}} |
Storage functions¶
Deposits¶
Storage of all deposits. Its first key is a namespace, and the second one the deposit key. Its value includes the details associated to a deposit instance.
Python¶
result = substrate.query(
'DepositStorage', 'Deposits', [('DipProvider', ), 'Bytes']
)
Return value¶
{
'deposit': {'amount': 'u128', 'owner': 'AccountId'},
'reason': {
None: None,
'Attestation': ('Deposit', ),
'Delegation': ('Deposit', ),
'DepositStorage': ('Deposit', ),
'Did': ('Deposit', ),
'DidLookup': ('Deposit', ),
'PublicCredentials': ('Deposit', ),
'Web3Names': ('Deposit', ),
},
}
Constants¶
MaxKeyLength¶
The maximum length of keys.
Value¶
35
Python¶
constant = substrate.get_constant('DepositStorage', 'MaxKeyLength')
Errors¶
DepositExisting¶
A deposit with the provided key already exists within the specified namespace.
DepositNotFound¶
The deposit with the provided key was not found within the specified namespace.
FailedToHold¶
The origin did not have enough fund to pay for the deposit.
FailedToRelease¶
Error when trying to release a previously-reserved deposit.
Hook¶
The external hook failed.
Unauthorized¶
The origin was not authorized to perform the operation on the specified deposit entry.