Skip to content

Commit

Permalink
Merge pull request #160 from 00labs/delete-old-pools
Browse files Browse the repository at this point in the history
Delete old pools
  • Loading branch information
mliu authored Mar 14, 2024
2 parents 06b1431 + a0e7bfb commit 62996f6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 140 deletions.
121 changes: 1 addition & 120 deletions packages/huma-shared/src/utils/pool.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import BASE_CREDIT_POOL_ABI from '../abis/BaseCreditPool.json'
import BASE_POOL_CONFIG_ABI from '../abis/BasePoolConfig.json'
import HDT_ABI from '../abis/HDT.json'
import RECEIVABLE_FACTORING_POOL_ABI from '../abis/ReceivableFactoringPool.json'
import STEAM_FACTORING_POOL_ABI from '../abis/StreamFactoringPool.json'
import TRADABLE_STREAM_ABI from '../abis/TradableStream.json'
import { ChainEnum } from './chain'
import { configUtil } from './config'

export enum POOL_NAME {
RequestNetwork = 'RequestNetwork',
HumaCreditLine = 'HumaCreditLine',
Superfluid = 'Superfluid',
Jia = 'Jia',
Expand All @@ -17,10 +15,8 @@ export enum POOL_NAME {
ArfCreditPool1 = 'ArfCreditPool1',
ArfCreditPoolV2 = 'ArfCreditPoolV2',
ArfPoolUSDC = 'ArfPoolUSDC',
ArfUSDCMigrationTest = 'ArfUSDCMigrationTest',
BSOS = 'BSOS',
ImpactMarket = 'ImpactMarket',
Symplifi = 'Symplifi',
Raincards = 'Raincards',
Quipu = 'Quipu',
}
Expand Down Expand Up @@ -167,14 +163,6 @@ export const PoolMap: PoolMapType = {
'impactMarket is empowering entrepreneurs in developing countries to thrive by providing microcredit on-chain.',
estAPY: '20%',
},
[POOL_NAME.Symplifi]: {
name: 'Symplifi Pool',
borrowDesc:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
lendDesc:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
estAPY: '20%',
},
[POOL_NAME.Raincards]: {
name: 'Rain Receivables Pool',
borrowDesc:
Expand All @@ -190,15 +178,7 @@ export const PoolMap: PoolMapType = {
estAPY: 'N/A%',
},
},
[POOL_TYPE.Invoice]: {
[POOL_NAME.RequestNetwork]: {
name: 'Request Network',
borrowDesc:
'Invoice factoring for your crypto invoices, up to 80% of their value. Only available to select invoicing platforms.',
lendDesc:
'Earn active yield by participating in this crypto invoice factoring market where loans are backed by collateralized invoice NFTs and paid back automatically when the invoice is paid.',
},
},
[POOL_TYPE.Invoice]: {},
[POOL_TYPE.Stream]: {
[POOL_NAME.Superfluid]: {
name: 'Superfluid',
Expand Down Expand Up @@ -243,28 +223,6 @@ export const PoolSubgraphMap: PoolSubgraphMapType = {
export const PoolContractMap: PoolContractMapType = {
[ChainEnum.Polygon]: {
[POOL_TYPE.CreditLine]: {
[POOL_NAME.HumaCreditLine]: {
chainId: ChainEnum.Polygon,
poolVersion: 'v1',
basePoolConfig: '0x39f7D6040EC30B62c508723e2EDb822413837527',
pool: '0xAb3dc5221F373Dd879BEc070058c775A0f6Af759',
poolFeeManager: '0x65C5535735581039c5711A9d7c223cff9384334F',
poolUnderlyingToken: {
address: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174',
symbol: 'USDC',
decimals: 6,
icon: 'USDC',
},
poolName: POOL_NAME.HumaCreditLine,
poolType: POOL_TYPE.CreditLine,
poolAbi: BASE_CREDIT_POOL_ABI,
basePoolConfigAbi: BASE_POOL_CONFIG_ABI,
HDT: {
address: '0x73c16Db24951135BC8A628185BdbfA79115793E5',
abi: HDT_ABI,
},
extra: { hidden: true },
},
[POOL_NAME.Jia]: {
chainId: ChainEnum.Polygon,
poolVersion: 'v1',
Expand Down Expand Up @@ -377,59 +335,6 @@ export const PoolContractMap: PoolContractMapType = {
detailsPage: true,
},
},
[POOL_NAME.Quipu]: {
chainId: ChainEnum.Polygon,
poolVersion: 'v1',
basePoolConfig: '0x26446BF777dA4e1F4A85396bb6Ddc453b868Ae90',
pool: '0x1a820fd242ba87dd396519caf4c8a762b19dfdb5',
poolFeeManager: '0x09Ddc0aD35d2663a3F5446D373EB5CF01601A599',
poolUnderlyingToken: {
address: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359',
symbol: 'USDC',
decimals: 6,
icon: 'USDC',
},
poolName: POOL_NAME.Quipu,
poolType: POOL_TYPE.CreditLine,
poolAbi: BASE_CREDIT_POOL_ABI,
basePoolConfigAbi: BASE_POOL_CONFIG_ABI,
HDT: {
address: '0xF3133bd55E6783292c6e56d17D8D0f0E696d69bB',
abi: HDT_ABI,
},
extra: {
hidden: true,
borrower: '0xC00Ac1b17B62bb953e991807a047E7268e554910',
},
},
},
[POOL_TYPE.Invoice]: {
[POOL_NAME.RequestNetwork]: {
chainId: ChainEnum.Polygon,
poolVersion: 'v1',
basePoolConfig: '0x98f41d57C06b302AFf999f3F58f4ae7a3F884590',
pool: '0x58AAF1f9cB10F335111A2129273056bbED251B61',
poolFeeManager: '0x5B7841b94a3C7246662ef514745b034A6ceaAB15',
poolUnderlyingToken: {
address: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174',
symbol: 'USDC',
decimals: 6,
icon: 'USDC',
},
assetAddress: '0xA9930c8e4638D9a96a3B73e7ABe73a636F986323',
poolName: POOL_NAME.RequestNetwork,
poolType: POOL_TYPE.Invoice,
industry: 'Invoice Factoring',
poolAbi: RECEIVABLE_FACTORING_POOL_ABI,
basePoolConfigAbi: BASE_POOL_CONFIG_ABI,
HDT: {
address: '0xf5F9297c74e464933e42F4a989e81D931fb20f83',
abi: HDT_ABI,
},
extra: {
hidden: true,
},
},
},
[POOL_TYPE.Stream]: {
[POOL_NAME.Superfluid]: {
Expand Down Expand Up @@ -785,30 +690,6 @@ export const PoolContractMap: PoolContractMapType = {
abi: HDT_ABI,
},
},
[POOL_NAME.Symplifi]: {
chainId: ChainEnum.Mumbai,
poolVersion: 'v1',
basePoolConfig: '0x60de6e6727be2cfd0733d790528d7e4ce4049277',
pool: '0xCCa17BB13C94E19bAd67a59687D22A68aEe9d7e7',
poolFeeManager: '0x4CD872604DA256c752C52541B190E3E482Fd0819',
poolUnderlyingToken: {
address: '0xb961c37ABDDA55929327fa9d20eBDE6BB8B1348E',
symbol: 'USDC',
decimals: 6,
icon: 'USDC',
},
poolName: POOL_NAME.Symplifi,
poolType: POOL_TYPE.CreditLine,
poolAbi: BASE_CREDIT_POOL_ABI,
basePoolConfigAbi: BASE_POOL_CONFIG_ABI,
HDT: {
address: '0x58174E6989AfB9e265b3bB1C981B18096C13D83D',
abi: HDT_ABI,
},
extra: {
borrower: '0x71a4E7F3A2c67BDBa6Ec9F864A830c255A4bF123',
},
},
},
},
}
Expand Down
34 changes: 14 additions & 20 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4582,21 +4582,20 @@
resolved "https://registry.yarnpkg.com/@repeaterjs/repeater/-/repeater-3.0.5.tgz#b77571685410217a548a9c753aa3cdfc215bfc78"
integrity sha512-l3YHBLAol6d/IKnB9LhpD0cEZWAoe3eFKUyTYWmFmCO2Q/WOckxLQAUyMZWwZV2M/m3+4vgRoaolFqaII82/TA==

"@requestnetwork/[email protected]":
version "0.15.10"
resolved "https://registry.yarnpkg.com/@requestnetwork/multi-format/-/multi-format-0.15.10.tgz#ac02d4bf10fa044ea905f984a5739ce270f32675"
integrity sha512-6qb59lZ2tpZCpl0+FR1mtxX/Y7bH1SQ0qqNKltb6bbJ7n8lPPgij0PbIQaw1SSVRa53hS4QrOBr2JdZzi20nnA==
"@requestnetwork/multi-format@^0.15.10":
version "0.15.14"
resolved "https://registry.yarnpkg.com/@requestnetwork/multi-format/-/multi-format-0.15.14.tgz#e90976d5eeb49b612b14dc6a6908d6f5dc6b4817"
integrity sha512-pobob2Gee0KHXef19ovpsoLzIjzaTIVEPCohwSn0EKxeUl7pVYW1nfiOZ8ou2o8Mmm8Z1+1pqKLJnydcNikuKw==
dependencies:
"@requestnetwork/types" "0.36.0"
tslib "2.3.1"
"@requestnetwork/types" "0.40.0"
tslib "2.5.0"

"@requestnetwork/types@0.36.0":
version "0.36.0"
resolved "https://registry.yarnpkg.com/@requestnetwork/types/-/types-0.36.0.tgz#f20708ecc16907c390a801529c6bf8e4aabf4365"
integrity sha512-0H9Ti5qAFklf62YjdjveejUVEBL7GRPNvThz4Dqq8tlC2t4d1RTJt2Hpt1keileczef6QuNbcE0/aD8AMIiNIQ==
"@requestnetwork/types@0.40.0":
version "0.40.0"
resolved "https://registry.yarnpkg.com/@requestnetwork/types/-/types-0.40.0.tgz#9fca23958e37a691fe7852a7b14963005184864b"
integrity sha512-hDtmqsf9fZPLucEus17Y1NfERPEy3G8VgIjso2ZPzCLSSTitLn3rcd9WzsUWo3mUAuYg6G2HADVsSQRWUTCefQ==
dependencies:
ethers "5.5.1"
events "3.2.0"

"@rollup/plugin-babel@^5.2.0":
version "5.3.1"
Expand Down Expand Up @@ -11328,11 +11327,6 @@ eventemitter3@^5.0.1:
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4"
integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==

[email protected]:
version "3.2.0"
resolved "https://registry.yarnpkg.com/events/-/events-3.2.0.tgz#93b87c18f8efcd4202a461aec4dfc0556b639379"
integrity sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==

events@^3.2.0, events@^3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400"
Expand Down Expand Up @@ -21231,10 +21225,10 @@ [email protected], tslib@^1.8.1, tslib@^1.9.0:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==

tslib@2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01"
integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==
tslib@2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf"
integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==

tslib@^2.0.0, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.3.1, tslib@^2.4.0, tslib@^2.5.0, tslib@^2.6.1, tslib@^2.6.2:
version "2.6.2"
Expand Down

0 comments on commit 62996f6

Please sign in to comment.