subscan
Runtime Modules / Loans
Spec Version:
Events
Name
Lookup
Attributes
Createdbb00["PoolId","LoanId","LoanInfo"]
Borrowedbb01["PoolId","LoanId","PrincipalInput"]
Repaidbb02["PoolId","LoanId","RepaidInput"]
WrittenOffbb03["PoolId","LoanId","WriteOffStatus<Rate>"]
Mutatedbb04["PoolId","LoanId","LoanMutation<Rate>"]
Closedbb05["PoolId","LoanId","AssetOf"]
PortfolioValuationUpdatedbb06["PoolId","Balance","PortfolioValuationUpdateType"]
WriteOffPolicyUpdatedbb07["PoolId","BoundedVec<WriteOffRule<Rate>, MaxWriteOffPolicySize>"]
DebtTransferredbb08["PoolId","LoanId","LoanId","RepaidInput","PrincipalInput"]
DebtIncreasedbb09["PoolId","LoanId","PrincipalInput"]
Storage Functions
Name
Type
LastLoanId{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["U64"],"value":"U64","keys_id":11,"value_id":11}}
CreatedLoan{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat","Blake2_128Concat"],"key_vec":["U64","U64"],"value":"pallet_loans:entities:loans:CreatedLoan","keys_id":818,"value_id":869}}
ActiveLoans{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["U64"],"value":"Vec<Tuple:U64pallet_loans:entities:loans:ActiveLoan>","keys_id":11,"value_id":870}}
ClosedLoan{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat","Blake2_128Concat"],"key_vec":["U64","U64"],"value":"pallet_loans:entities:loans:ClosedLoan","keys_id":818,"value_id":879}}
WriteOffPolicy{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["U64"],"value":"Vec<pallet_loans:types:policy:WriteOffRule>","keys_id":11,"value_id":400}}
PortfolioValuation{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["U64"],"value":"cfg_types:portfolio:PortfolioValuation@880","keys_id":11,"value_id":880}}
Constants
Name
Type
Value
MaxActiveLoansPerPoolU32e8030000
MaxWriteOffPolicySizeU3264000000
Error Types
Name
Docs
PoolNotFoundEmits when pool doesn't exist
LoanNotActiveOrNotFoundEmits when loan doesn't exist or it's not active yet.
NoValidWriteOffRuleEmits when a write-off rule is not found in a policy for a specificloan. It happens when there is no policy or the loan is not overdue.
NFTOwnerNotFoundEmits when the NFT owner is not found
NotNFTOwnerEmits when NFT owner doesn't match the expected owner
NotLoanBorrowerEmits when the applicant account is not the borrower of the loan
MaxActiveLoansReachedEmits when the max number of active loans was reached
NoLoanChangeIdThe Change Id does not belong to a loan change
UnrelatedChangeIdThe Change Id exists but it's not releated with the expected change
MismatchedPricingMethodEmits when the pricing method is not compatible with the input
SettlementPriceExceedsVariationEmits when settlement price is exceeds the configured variation.
CreateLoanErrorEmits when the loan is incorrectly specified and can not be created
BorrowLoanErrorEmits when the loan can not be borrowed from
RepayLoanErrorEmits when the loan can not be repaid from
WrittenOffErrorEmits when the loan can not be written off
CloseLoanErrorEmits when the loan can not be closed
MutationErrorEmits when the loan can not be mutated
TransferDebtToSameLoanEmits when debt is transfered to the same loan
TransferDebtAmountMismatchedEmits when debt is transfered with different repaid/borrow amounts