subscan
Runtime Modules / Loans
Spec Version:
Call Functions
Name
Lookup
Parameters
initialise_pool64002
create64012
close64022
borrow64033
repay64043
price64054
update_nav64061
add_write_off_group64072
write_off64082
admin_write_off64094
Events
Name
Lookup
Attributes
PoolInitialised6400["PoolIdOf"]
Created6401["PoolIdOf","LoanId","AssetOf"]
Closed6402["PoolIdOf","LoanId","AssetOf"]
Priced6403["PoolIdOf","LoanId","Rate","LoanType<Rate, Balance>"]
Borrowed6404["PoolIdOf","LoanId","Balance"]
Repaid6405["PoolIdOf","LoanId","Balance"]
NAVUpdated6406["PoolIdOf","Balance","NAVUpdateType"]
WriteOffGroupAdded6407["PoolIdOf","u32"]
WrittenOff6408["PoolIdOf","LoanId","Rate","Rate","Option<u32>"]
Storage Functions
Name
Type
PoolToLoanNftClass{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["U64"],"value":"U64","keys_id":8,"value_id":8}}
LoanNftClassToPool{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["U64"],"value":"U64","keys_id":8,"value_id":8}}
NextLoanId{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["U64"],"value":"U128","keys_id":8,"value_id":6}}
Loan{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat","Blake2_128Concat"],"key_vec":["U64","U128"],"value":"pallet_loans:types:LoanDetails","keys_id":436,"value_id":492}}
ActiveLoans{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["U64"],"value":"Vec<pallet_loans:types:PricedLoanDetails>","keys_id":8,"value_id":494}}
ClosedLoans{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat","Blake2_128Concat"],"key_vec":["U64","U128"],"value":"pallet_loans:types:PricedLoanDetails","keys_id":436,"value_id":495}}
PoolNAV{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["U64"],"value":"pallet_loans:types:NAVDetails","keys_id":8,"value_id":498}}
PoolWriteOffGroups{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["U64"],"value":"Vec<pallet_loans:types:WriteOffGroup>","keys_id":8,"value_id":499}}
Constants
Name
Type
Value
LoansPalletId[U8; 8]726f632f6c6f616e
Error Types
Name
Docs
PoolMissingEmits when pool doesn't exist
PoolNotInitialisedEmits when pool is not initialised
PoolAlreadyInitialisedEmits when pool is already initialised
MissingLoanEmits when loan doesn't exist.
MaxBorrowAmountExceededEmits when the borrowed amount is more than max_borrow_amount
ValueOverflowEmits when an operation lead to the number overflow
NormalizedDebtOverflowEmits when principal debt calculation failed due to overflow
LoanIsActiveEmits when tries to update an active loan
LoanTypeInvalidEmits when loan type given is not valid
LoanNotActiveEmits when operation is done on an inactive loan
RepayTooEarly
NFTOwnerNotFoundEmits when the NFT owner is not found
NotAssetOwnerEmits when nft owner doesn't match the expected owner
NotAValidAssetEmits when the nft is not an acceptable asset
NftTokenNonceOverflowedEmits when the nft token nonce is overflowed
LoanNotRepaidEmits when loan amount not repaid but trying to close loan
LoanMaturityDatePassedEmits when maturity has passed and borrower tried to borrow more
LoanValueInvalidEmits when a loan data value is invalid
LoanAccrueFailedEmits when loan accrue calculation failed
LoanPresentValueFailedEmits when loan present value calculation failed
LoanHealthyEmits when trying to write off of a healthy loan
WrittenOffByAdminEmits when trying to write off loan that was written off by admin already
NoValidWriteOffGroupEmits when there is no valid write off group available for unhealthy loan
InvalidWriteOffGroupIndexEmits when there is no valid write off groups associated with given index
InvalidWriteOffGroupEmits when new write off group is invalid
TooManyWriteOffGroupsEmits when the max number of write off groups was reached
TooManyActiveLoansEmits when the max number of active loans was reached