Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into sc-4728-maple-js-add-…
Browse files Browse the repository at this point in the history
…address-constants-to-the-repo
  • Loading branch information
Jakkc committed May 12, 2022
2 parents 0836e15 + 8bd55a4 commit 1bb53e9
Show file tree
Hide file tree
Showing 6 changed files with 160 additions and 29 deletions.
3 changes: 3 additions & 0 deletions .env.exmple
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
RINKEBY_RPC_URL=
KOVAN_RPC_URL=
MAINNET_RPC_URL=
24 changes: 24 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
| Type | Ticket |
| :---------------: | :------------------------------: |
| Bug/Feature/Chore | [Link](<paste clubhouse ticket>) |

## Problem

Brief descriptions of the problem that this PR will fix or if it a new feature brief description of what is the business need.

## Solution

How we fixed the problem or implemented the new feature

## Other notes

Not mandatory section. Use this section to provide extra info like:

- PR's related to this one (maybe form maple-api)
- additional fixes
- how this feature should be tested if it's hard to test
- ...

## Screenshots

Paste all the needed screenshots or animated gifs. If this PR is a bug fix you could include the before and after screenshots.
126 changes: 100 additions & 26 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,68 +2,142 @@
"contractPackages": {
"collateralLocker": {
"repo": "@maplelabs/collateral-locker",
"alias": ["collateralLocker"],
"versions": ["v1.0.0"]
"alias": [
"collateralLocker"
],
"versions": [
"v1.0.0"
]
},
"debtLocker": {
"repo": "@maplelabs/debt-locker",
"alias": ["debtLockerV1", "debtLockerV2"],
"versions": ["v1.0.0", "v2.0.0"]
"alias": [
"debtLockerV1",
"debtLockerV2"
],
"versions": [
"v1.0.0",
"v2.0.0"
]
},
"fundingLocker": {
"repo": "@maplelabs/funding-locker",
"alias": ["fundingLocker"],
"versions": ["v1.0.0"]
"alias": [
"fundingLocker"
],
"versions": [
"v1.0.0"
]
},
"lateFeeCalculator": {
"repo": "@maplelabs/late-fee-calculator",
"alias": ["lateFeeCalculator"],
"versions": ["v1.0.0"]
"alias": [
"lateFeeCalculator"
],
"versions": [
"v1.0.0"
]
},
"liquidityLocker": {
"repo": "@maplelabs/liquidity-locker",
"alias": ["liquidityLocker"],
"versions": ["v1.0.0"]
"alias": [
"liquidityLocker"
],
"versions": [
"v1.0.0"
]
},
"loan": {
"repo": "@maplelabs/loan",
"alias": ["loanV1", "loanV2"],
"versions": ["v1.0.0", "v2.0.0"]
"alias": [
"loanV1",
"loanV2"
],
"versions": [
"v1.0.0",
"v2.0.0"
]
},
"mapleGlobals": {
"repo": "@maplelabs/globals",
"alias": ["mapleGlobals"],
"versions": ["v1.0.0"]
"alias": [
"mapleGlobals"
],
"versions": [
"v1.0.0"
]
},
"mplRewards": {
"repo": "@maplelabs/mpl-rewards",
"alias": ["mplRewards"],
"versions": ["v1.0.0"]
"alias": [
"mplRewards"
],
"versions": [
"v1.0.0"
]
},
"pool": {
"repo": "@maplelabs/pool",
"alias": ["pool"],
"versions": ["v1.0.0"]
"alias": [
"pool"
],
"versions": [
"v1.0.0"
]
},
"premiumCalculator": {
"repo": "@maplelabs/premium-calculator",
"alias": ["premiumCalculator"],
"versions": ["v1.0.0"]
"alias": [
"premiumCalculator"
],
"versions": [
"v1.0.0"
]
},
"repaymentCalculator": {
"repo": "@maplelabs/repayment-calculator",
"alias": ["repaymentCalculator"],
"versions": ["v1.0.0"]
"alias": [
"repaymentCalculator"
],
"versions": [
"v1.0.0"
]
},
"stakeLocker": {
"repo": "@maplelabs/stake-locker",
"alias": ["stakeLocker"],
"versions": ["v1.0.0"]
"alias": [
"stakeLocker"
],
"versions": [
"v1.0.0"
]
},
"xmpl": {
"repo": "@maplelabs/xmpl",
"alias": [
"xmpl"
],
"versions": [
"v1.0.1"
]
},
"mapleToken": {
"repo": "@maplelabs/maple-token",
"alias": [
"mapleToken"
],
"versions": [
"v1.0.0"
]
},
"external": {
"repo": "@maplelabs/environment-mocks",
"alias": ["environment-mocks"],
"versions": ["v1.0.0"]
"alias": [
"environment-mocks"
],
"versions": [
"v1.0.0"
]
}
}
}
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.0.2",
"version": "0.0.3",
"license": "MIT",
"name": "@maplelabs/maple-js",
"description": "Maple SDK for JavaScript",
Expand Down Expand Up @@ -43,16 +43,18 @@
"@maplelabs/liquidityLocker": "npm:@maplelabs/liquidity-locker@v1.0.0",
"@maplelabs/loanV1": "npm:@maplelabs/loan@v1.0.0",
"@maplelabs/loanV2": "npm:@maplelabs/loan@v2.0.0",
"@maplelabs/mapleToken": "npm:@maplelabs/maple-token@1.0.0 ",
"@maplelabs/mapleGlobals": "npm:@maplelabs/globals@v1.0.0",
"@maplelabs/mplRewards": "npm:@maplelabs/mpl-rewards@v1.0.0",
"@maplelabs/pool": "npm:@maplelabs/pool@v1.0.0",
"@maplelabs/premiumCalculator": "npm:@maplelabs/premium-calculator@v1.0.0",
"@maplelabs/repaymentCalculator": "npm:@maplelabs/repayment-calculator@v1.0.0",
"@maplelabs/stakeLocker": "npm:@maplelabs/stake-locker@v1.0.0",
"@maplelabs/util": "npm:@maplelabs/util@v1.0.0",
"@maplelabs/xmpl": "npm:@maplelabs/xmpl@v1.0.1",
"@typechain/ethers-v5": "^9.0.0",
"ethers": "^5.5.3",
"shelljs": "^0.8.5",
"typechain": "^7.0.0"
}
}
}
20 changes: 19 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ import * as lateFeeCalcImports from './typechain/lateFeeCalculator'
import * as liquidityLockerImports from './typechain/liquidityLocker'
import * as loanV1Imports from './typechain/loanV1'
import * as loanV2Imports from './typechain/loanV2'
import * as mapleTokenImports from './typechain/mapleToken'
import * as mapleGlobalsImports from './typechain/mapleGlobals'
import * as mapleRewardsImports from './typechain/mplRewards'
import * as poolImports from './typechain/pool'
import * as premiumCalcImports from './typechain/premiumCalculator'
import * as repaymentCalcImports from './typechain/repaymentCalculator'
import * as stakeLockerImports from './typechain/stakeLocker'
import * as xmplImports from './typechain/xmpl'
import * as environmentMocksImports from './typechain/environment-mocks'

import kovanAddresses from './addresses/kovan'
Expand Down Expand Up @@ -72,6 +74,10 @@ const mapleRewards = {
factory: mapleRewardsImports.MplRewardsFactory__factory
}

const mapleToken = {
factory: mapleTokenImports.MapleToken__factory
}

const pool = {
core: poolImports.Pool__factory,
factory: poolImports.PoolFactory__factory,
Expand Down Expand Up @@ -109,6 +115,10 @@ const uniswapRouterV2 = {
core: environmentMocksImports.UniswapV2Router02__factory
}

const xmpl = {
factory: xmplImports.XMPL__factory
}

const addresses = {
kovan: kovanAddresses,
kovanDev: kovanDevAddresses,
Expand All @@ -117,6 +127,11 @@ const addresses = {
mainnet: mainnetAddresses
}

interface ContractTypes {
xmpl: xmplImports.XMPL
mapleToken: mapleTokenImports.MapleToken
}

export {
addresses,
bPool,
Expand All @@ -132,9 +147,12 @@ export {
loanV2,
mapleGlobals,
mapleRewards,
mapleToken,
pool,
premiumCalc,
repaymentCalculator,
stakeLocker,
uniswapRouterV2
uniswapRouterV2,
xmpl,
ContractTypes
}
10 changes: 10 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,11 @@
resolved "https://registry.npmjs.org/@maplelabs/globals/-/globals-1.0.0.tgz#85fd3e667cdb5cd26e5882951e8a7cf7426645fe"
integrity sha512-pNqeltNI03JD0PdvZinJKP9UE9Xu8jFRzVxXm3mHMmLFkJmsEgwh2J8Sr8+2HSKouS9eX9RiH6vCh+nUwo45ug==

"@maplelabs/mapleToken@npm:@maplelabs/maple-token@1.0.0 ":
version "1.0.0"
resolved "https://registry.npmjs.org/@maplelabs/maple-token/-/maple-token-1.0.0.tgz#c160531e3be688d4cd90c524a1baa2d585da772c"
integrity sha512-WiJFk15Xic43gnqKC8u6Fnl11AfCADbtcY1668PswnMMIC08RJJgDlwlDy5dq1bYqyWFpMfPem6Ye/McMNua+A==

"@maplelabs/mplRewards@npm:@maplelabs/mpl-rewards@v1.0.0":
version "1.0.0"
resolved "https://registry.npmjs.org/@maplelabs/mpl-rewards/-/mpl-rewards-1.0.0.tgz#7915e10bd59bd80374784f0f8772817ca87e45ad"
Expand All @@ -940,6 +945,11 @@
resolved "https://registry.npmjs.org/@maplelabs/stake-locker/-/stake-locker-1.0.0.tgz#ea24815c50d68d2490f9e5851493732976182c00"
integrity sha512-kU6veFILrHJp8uJgf6XDWVvQCVlwSbPJTEIYYG1Z6SM9C5UuIAcau6r30HRAG0g7/Pk+oorH9bZPUm3ow8SGNw==

"@maplelabs/xmpl@npm:@maplelabs/xmpl@v1.0.1":
version "1.0.1"
resolved "https://registry.npmjs.org/@maplelabs/xmpl/-/xmpl-1.0.1.tgz#3d90df79f56e1105b1dbce9a3557d916afe2ea19"
integrity sha512-kVg7Aq5o2l9C1JgI7OQIETjmNox5CqRxg/QS9lV/k2pkp95KJKsSCMQOfh4Asp5e4zu248iMLHEakWOhr7pCgQ==

"@nodelib/fs.scandir@2.1.5":
version "2.1.5"
resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz"
Expand Down

0 comments on commit 1bb53e9

Please sign in to comment.