-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update types diagram * add ActiveLoanInfo * add decl runtime api for loans * add API to development runtime * add serialization capability to loans structs * add rpc & service * minor rename * compiling for development runtime * taplo fmt * add support for altair & centrifuge * fix clippy * Remove RPC support
- Loading branch information
Showing
8 changed files
with
187 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright 2023 Centrifuge Foundation (centrifuge.io). | ||
// This file is part of Centrifuge chain project. | ||
|
||
// Centrifuge is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version (see http://www.gnu.org/licenses). | ||
|
||
// Centrifuge is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
|
||
use codec::Codec; | ||
use sp_api::decl_runtime_apis; | ||
use sp_std::vec::Vec; | ||
|
||
decl_runtime_apis! { | ||
/// Runtime API for the rewards pallet. | ||
pub trait LoansApi<PoolId, LoanId, Loan> | ||
where | ||
PoolId: Codec, | ||
LoanId: Codec, | ||
Loan: Codec, | ||
{ | ||
fn portfolio(pool_id: PoolId) -> Vec<(LoanId, Loan)>; | ||
fn portfolio_loan(pool_id: PoolId, loan_id: LoanId) -> Option<Loan>; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters