subscan
Runtime Modules / Loans
Spec Version:
Call Functions
Events
Name
Lookup
Attributes
Created6400["PoolIdOf","LoanId","LoanInfoOf"]
Borrowed6401["PoolIdOf","LoanId","Balance"]
Repaid6402["PoolIdOf","LoanId","Balance"]
WrittenOff6403["PoolIdOf","LoanId","WriteOffStatus<Rate>"]
Closed6404["PoolIdOf","LoanId","AssetOf"]
PortfolioValuationUpdated6405["PoolIdOf","Balance","PortfolioValuationUpdateType"]
WriteOffPolicyUpdated6406["PoolIdOf","BoundedVec<WriteOffState<Rate>, MaxWriteOffPolicySize>"]
Storage Functions
Name
Type
LastLoanId{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["U64"],"value":"U64","keys_id":10,"value_id":10}}
CreatedLoan{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat","Blake2_128Concat"],"key_vec":["U64","U64"],"value":"pallet_loans_ref:types:CreatedLoan","keys_id":535,"value_id":550}}
ActiveLoans{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["U64"],"value":"Vec<Tuple:pallet_loans_ref:types:ActiveLoanU64>","keys_id":10,"value_id":551}}
ClosedLoan{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat","Blake2_128Concat"],"key_vec":["U64","U64"],"value":"pallet_loans_ref:types:ClosedLoan","keys_id":535,"value_id":555}}
WriteOffPolicy{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["U64"],"value":"Vec<pallet_loans_ref:types:WriteOffState>","keys_id":10,"value_id":126}}
PortfolioValuation{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["U64"],"value":"pallet_loans_ref:types:PortfolioValuation","keys_id":10,"value_id":556}}
Constants
Name
Type
Value
MaxActiveLoansPerPoolU322c010000
MaxWriteOffPolicySizeU3264000000
Error Types
Name
Docs
PoolNotFoundEmits when pool doesn't exist
LoanNotFoundEmits when loan doesn't exist
LoanNotActiveEmits when a loan exist but it's not active
NoValidWriteOffStateEmits when a write-off state is not found in a policy for a specific loan.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
CreateLoanErrorEmits when the loan is incorrectly specified and can not be created
BorrowLoanErrorEmits when the loan can not be borrowed from
WrittenOffErrorEmits when the loan can not be written off
CloseLoanErrorEmits when the loan can not be closed