-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Merge pull request #87 from Jeff-CCH/feat/iota
add IOLEND and Wagmi
- @protocolink/test-helpers@0.4.7
- @protocolink/test-helpers@0.4.6
- @protocolink/smart-accounts@0.1.8
- @protocolink/lending@2.1.6
- @protocolink/lending@2.1.5
- @protocolink/lending@2.1.4
- @protocolink/lending@2.1.3
- @protocolink/core@0.6.4
- @protocolink/common@0.5.5
- @protocolink/api@1.4.6
- @protocolink/api@1.4.5
- @protocolink/api@1.4.4
- @protocolink/api@1.4.3
- @protocolink/api@1.4.2
- @protocolink/api@1.4.1
- @protocolink/api@1.4.0
Showing
12 changed files
with
135 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@protocolink/api': minor | ||
--- | ||
|
||
add Wagmi, skip Wagmi tests |
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,5 @@ | ||
--- | ||
'@protocolink/api': minor | ||
--- | ||
|
||
add IOLEND, skip IOLEND tests |
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,16 @@ | ||
import { Logic } from 'src/types'; | ||
import * as common from '@protocolink/common'; | ||
import { getProtocolTokenList } from 'src/api'; | ||
import * as logics from '@protocolink/logics'; | ||
|
||
export type BorrowFields = common.Declasifying<logics.iolend.BorrowLogicFields>; | ||
|
||
export type BorrowLogic = Logic<BorrowFields>; | ||
|
||
export async function getBorrowTokenList(chainId: number): Promise<logics.iolend.BorrowLogicTokenList> { | ||
return getProtocolTokenList(chainId, logics.iolend.BorrowLogic.rid); | ||
} | ||
|
||
export function newBorrowLogic(fields: BorrowFields): BorrowLogic { | ||
return { rid: logics.iolend.BorrowLogic.rid, fields }; | ||
} |
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,25 @@ | ||
import { Logic } from 'src/types'; | ||
import * as common from '@protocolink/common'; | ||
import { getProtocolTokenList, quote } from 'src/api'; | ||
import * as logics from '@protocolink/logics'; | ||
|
||
export type DepositParams = common.Declasifying<logics.iolend.DepositLogicParams>; | ||
|
||
export type DepositFields = common.Declasifying<logics.iolend.DepositLogicFields>; | ||
|
||
export type DepositLogic = Logic<DepositFields>; | ||
|
||
export async function getDepositTokenList(chainId: number): Promise<logics.iolend.DepositLogicTokenList> { | ||
return getProtocolTokenList(chainId, logics.iolend.DepositLogic.rid); | ||
} | ||
|
||
export async function getDepositQuotation( | ||
chainId: number, | ||
params: DepositParams | ||
): Promise<logics.iolend.DepositLogicFields> { | ||
return quote(chainId, logics.iolend.DepositLogic.rid, params); | ||
} | ||
|
||
export function newDepositLogic(fields: DepositFields): DepositLogic { | ||
return { rid: logics.iolend.DepositLogic.rid, fields }; | ||
} |
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,4 @@ | ||
export * from './borrow'; | ||
export * from './deposit'; | ||
export * from './repay'; | ||
export * from './withdraw'; |
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,22 @@ | ||
import { Logic } from 'src/types'; | ||
import * as common from '@protocolink/common'; | ||
import { getProtocolTokenList, quote } from 'src/api'; | ||
import * as logics from '@protocolink/logics'; | ||
|
||
export type RepayParams = common.Declasifying<logics.iolend.RepayLogicParams>; | ||
|
||
export type RepayFields = common.Declasifying<logics.iolend.RepayLogicFields>; | ||
|
||
export type RepayLogic = Logic<RepayFields>; | ||
|
||
export async function getRepayTokenList(chainId: number): Promise<logics.iolend.RepayLogicTokenList> { | ||
return getProtocolTokenList(chainId, logics.iolend.RepayLogic.rid); | ||
} | ||
|
||
export async function getRepayQuotation(chainId: number, params: RepayParams): Promise<logics.iolend.RepayLogicFields> { | ||
return quote(chainId, logics.iolend.RepayLogic.rid, params); | ||
} | ||
|
||
export function newRepayLogic(fields: RepayFields): RepayLogic { | ||
return { rid: logics.iolend.RepayLogic.rid, fields }; | ||
} |
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,25 @@ | ||
import { Logic } from 'src/types'; | ||
import * as common from '@protocolink/common'; | ||
import { getProtocolTokenList, quote } from 'src/api'; | ||
import * as logics from '@protocolink/logics'; | ||
|
||
export type WithdrawParams = common.Declasifying<logics.iolend.WithdrawLogicParams>; | ||
|
||
export type WithdrawFields = common.Declasifying<logics.iolend.WithdrawLogicFields>; | ||
|
||
export type WithdrawLogic = Logic<WithdrawFields>; | ||
|
||
export async function getWithdrawTokenList(chainId: number): Promise<logics.iolend.WithdrawLogicTokenList> { | ||
return getProtocolTokenList(chainId, logics.iolend.WithdrawLogic.rid); | ||
} | ||
|
||
export async function getWithdrawQuotation( | ||
chainId: number, | ||
params: WithdrawParams | ||
): Promise<logics.iolend.WithdrawLogicFields> { | ||
return quote(chainId, logics.iolend.WithdrawLogic.rid, params); | ||
} | ||
|
||
export function newWithdrawLogic(fields: WithdrawFields): WithdrawLogic { | ||
return { rid: logics.iolend.WithdrawLogic.rid, fields }; | ||
} |
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 @@ | ||
export * from './swap-token'; |
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,25 @@ | ||
import { Logic } from 'src/types'; | ||
import * as common from '@protocolink/common'; | ||
import { getProtocolTokenList, quote } from 'src/api'; | ||
import * as logics from '@protocolink/logics'; | ||
|
||
export type SwapTokenParams = common.Declasifying<logics.wagmi.SwapTokenLogicParams>; | ||
|
||
export type SwapTokenFields = common.Declasifying<logics.wagmi.SwapTokenLogicFields>; | ||
|
||
export type SwapTokenLogic = Logic<SwapTokenFields>; | ||
|
||
export async function getSwapTokenTokenList(chainId: number): Promise<logics.wagmi.SwapTokenLogicTokenList> { | ||
return getProtocolTokenList(chainId, logics.wagmi.SwapTokenLogic.rid); | ||
} | ||
|
||
export async function getSwapTokenQuotation( | ||
chainId: number, | ||
params: SwapTokenParams | ||
): Promise<logics.wagmi.SwapTokenLogicFields> { | ||
return quote(chainId, logics.wagmi.SwapTokenLogic.rid, params); | ||
} | ||
|
||
export function newSwapTokenLogic(fields: SwapTokenFields): SwapTokenLogic { | ||
return { rid: logics.wagmi.SwapTokenLogic.rid, fields }; | ||
} |
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