Skip to content

Commit

Permalink
Merge pull request #122 from starlay-finance/license
Browse files Browse the repository at this point in the history
License
  • Loading branch information
artat9 authored Jul 11, 2023
2 parents f97e059 + 11ed846 commit e96fa2b
Show file tree
Hide file tree
Showing 39 changed files with 277 additions and 1 deletion.
14 changes: 14 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,17 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

Copyright 2023 Asynmatrix Pte. Ltd.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@

This repository is a Lending Protocol Template for WASM contracts using [ink!](https://use.ink/).

## Prerequisites

| Name | Version |
| -------------- | ----------------- |
| rustc | 1.70.0 |
| cargo-contract | 2.0.1 |
| swanky-node | 1.6.0-e5e6b8f914b |
| node | 20.2.0 |
| yarn | 1.22.19 |

## Contracts

We detail a few of the contracts in this repository.
Expand Down
7 changes: 7 additions & 0 deletions contracts/controller/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![cfg_attr(not(feature = "std"), no_std)]
#![feature(min_specialization)]

Expand Down
7 changes: 7 additions & 0 deletions contracts/default_interest_rate_model/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![cfg_attr(not(feature = "std"), no_std)]
#![feature(min_specialization)]

Expand Down
7 changes: 7 additions & 0 deletions contracts/flashloan_gateway/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![cfg_attr(not(feature = "std"), no_std)]
#![feature(min_specialization)]

Expand Down
7 changes: 7 additions & 0 deletions contracts/lens/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![cfg_attr(not(feature = "std"), no_std)]
#![feature(min_specialization)]

Expand Down
7 changes: 7 additions & 0 deletions contracts/manager/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![cfg_attr(not(feature = "std"), no_std)]
#![feature(min_specialization)]

Expand Down
7 changes: 7 additions & 0 deletions contracts/pool/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![cfg_attr(not(feature = "std"), no_std)]
#![feature(min_specialization)]

Expand Down
7 changes: 7 additions & 0 deletions contracts/price_oracle/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![cfg_attr(not(feature = "std"), no_std)]
#![feature(min_specialization)]

Expand Down
7 changes: 7 additions & 0 deletions contracts/weth_gateway/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![cfg_attr(not(feature = "std"), no_std)]
#![feature(min_specialization)]

Expand Down
7 changes: 7 additions & 0 deletions logics/impls/exp_no_err.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(unused)]
use core::{
ops::{
Expand Down
7 changes: 7 additions & 0 deletions logics/impls/flashloan_gateway.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

pub use crate::traits::flashloan_gateway::*;
use crate::traits::{
controller::ControllerRef,
Expand Down
7 changes: 7 additions & 0 deletions logics/impls/flashloan_receiver.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use ink::prelude::vec::Vec;
use openbrush::{
contracts::psp22::PSP22Ref,
Expand Down
7 changes: 7 additions & 0 deletions logics/impls/interest_rate_model.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use core::ops::{
Add,
Div,
Expand Down
7 changes: 7 additions & 0 deletions logics/impls/manager.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

pub use crate::traits::manager::*;
use crate::traits::{
controller::ControllerRef,
Expand Down
7 changes: 7 additions & 0 deletions logics/impls/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

pub mod controller;
pub mod exp_no_err;
pub mod flashloan_gateway;
Expand Down
7 changes: 7 additions & 0 deletions logics/impls/percent_math.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use super::wad_ray_math::Error;
use core::ops::{
Add,
Expand Down
7 changes: 7 additions & 0 deletions logics/impls/pool/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use super::{
controller::{
PoolAttributes,
Expand Down
7 changes: 7 additions & 0 deletions logics/impls/pool/utils.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use super::super::exp_no_err::{
exp_scale,
Exp,
Expand Down
7 changes: 7 additions & 0 deletions logics/impls/price_oracle.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use crate::traits::pool::PoolRef;
pub use crate::traits::price_oracle::*;
use openbrush::{
Expand Down
7 changes: 7 additions & 0 deletions logics/impls/wad_ray_math.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use core::ops::{
Add,
Div,
Expand Down
7 changes: 7 additions & 0 deletions logics/impls/weth.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

pub use crate::traits::weth::*;
use openbrush::{
contracts::psp22::extensions::metadata::*,
Expand Down
7 changes: 7 additions & 0 deletions logics/impls/weth_gateway.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

pub use crate::traits::weth_gateway::*;
use crate::traits::{
pool::PoolRef,
Expand Down
7 changes: 7 additions & 0 deletions logics/traits/controller.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use ink::prelude::vec::Vec;
use openbrush::traits::{
AccountId,
Expand Down
7 changes: 7 additions & 0 deletions logics/traits/flashloan_gateway.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use crate::traits::pool::Error as PoolError;
use ink::prelude::vec::Vec;
use openbrush::{
Expand Down
7 changes: 7 additions & 0 deletions logics/traits/flashloan_receiver.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use ink::prelude::vec::Vec;
use openbrush::traits::{
AccountId,
Expand Down
7 changes: 7 additions & 0 deletions logics/traits/interest_rate_model.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use openbrush::traits::Balance;

use super::types::WrappedU256;
Expand Down
7 changes: 7 additions & 0 deletions logics/traits/manager.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use super::{
controller::Error as ControllerError,
pool::Error as PoolError,
Expand Down
7 changes: 7 additions & 0 deletions logics/traits/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

pub mod controller;
pub mod flashloan_gateway;
pub mod flashloan_receiver;
Expand Down
7 changes: 7 additions & 0 deletions logics/traits/pool.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use ink::LangError;
use openbrush::{
contracts::{
Expand Down
7 changes: 7 additions & 0 deletions logics/traits/price_oracle.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use openbrush::traits::AccountId;

#[openbrush::wrapper]
Expand Down
7 changes: 7 additions & 0 deletions logics/traits/types.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[cfg(feature = "std")]
use ink::metadata::layout::{
Layout,
Expand Down
7 changes: 7 additions & 0 deletions logics/traits/weth.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use openbrush::{
contracts::psp22::extensions::metadata::*,
traits::Balance,
Expand Down
7 changes: 7 additions & 0 deletions logics/traits/weth_gateway.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use openbrush::{
contracts::{
ownable::*,
Expand Down
7 changes: 7 additions & 0 deletions mocks/contracts/faucet/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// Copyright 2023 Asynmatrix Pte. Ltd.
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![cfg_attr(not(feature = "std"), no_std)]
#![feature(min_specialization)]

Expand Down
Loading

0 comments on commit e96fa2b

Please sign in to comment.