forked from DefiLlama/DefiLlama-Adapters
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:buchaoqun/DefiLlama-Adapters
* 'main' of github.com:buchaoqun/DefiLlama-Adapters: fix usdx add shape chain and swan swap Dex (DefiLlama#11880) Update: Additional ZTX Staking Pool (DefiLlama#11877) Add gnosis uniswap (DefiLlama#11879) add base chain (DefiLlama#11884) symbiosis adds bsquared chain support (DefiLlama#11885) update script add usdx.money USDX (DefiLlama#11776) stkd lps find bitcoin duplicates Add WBTC tokens to CrossCurve TVL (DefiLlama#11878) Update raindex adapter (DefiLlama#11874) Update index.js Refactor: fetch BOB Gateway owners from chain (DefiLlama#11867) track alienbase treasury DefiLlama#11868 Add SuiBridge Adapter (DefiLlama#11869) add ascentyield (DefiLlama#11873) FWX DEX add chain base (DefiLlama#11871) Add solv-btc-lst bbn owner address (DefiLlama#11872)
- Loading branch information
Showing
23 changed files
with
301 additions
and
48 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
const ADDRESSES = require('../helper/coreAssets.json') | ||
const { sumTokens2 } = require("../helper/solana"); | ||
const { post } = require('../helper/http'); | ||
const { sumTokensExport } = require("../helper/unwrapLPs") | ||
|
||
|
||
const hyperliquidSubAccount = "0x75b2e5c67d2116bcf1b77c5e6444fc18bc5d38a4" // for trading at hyperliquid | ||
const jlpholder = "9nAgg9wAnuiPv57dXkmCwoGhhbTHS1RRzvYLjnRGZtXp" // for keeping JLP and USDC(buy JLP) | ||
const arbiusdcholder = "0xa6Ff9a77D6bD8B0a759055Cd8885e23228bc10Ec" // USDC on arbi(will bridge to solana) | ||
const hyperliquidMainAccount = "0x7151609Fdc7E0Cac89FB9720F0957AF9d552f8f9" // will transfer USDC to sub account | ||
|
||
|
||
module.exports = { | ||
methodology: "Aggregate trading account margins in HyperLiquid and JLP, USDC on the solana network.", | ||
solana: { | ||
tvl: async (api) => { | ||
return sumTokens2({ | ||
owner: jlpholder | ||
}); | ||
}, | ||
}, | ||
hyperliquid: { | ||
tvl: async (api) => { | ||
let data = await post('https://api.hyperliquid.xyz/info', { | ||
type: "clearinghouseState", | ||
user: hyperliquidSubAccount | ||
}) | ||
data = parseInt(data.marginSummary.accountValue) | ||
api.addCGToken('usd-coin', data) | ||
} | ||
}, | ||
arbitrum: { | ||
tvl: sumTokensExport({ | ||
owners: [arbiusdcholder, hyperliquidMainAccount], | ||
tokens: [ADDRESSES.arbitrum.USDC_CIRCLE,] | ||
}) | ||
}, | ||
}; |
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 |
---|---|---|
@@ -1,32 +1,43 @@ | ||
const ADDRESSES = require('../helper/coreAssets.json') | ||
const { sumTokens2 } = require("../helper/unwrapLPs"); | ||
|
||
const factories = { | ||
v1: "0x1831d29376eb94bba3ca855af7984db923768b27", | ||
v2: "0x37f330e667208633e1da1cf601d01f0ef8484306", | ||
v3: "0xAE6770a207E86FaE3b191564FA55ce7Bfee0Dde9", | ||
}; | ||
|
||
const abis = { | ||
v1: { | ||
allOnramps: "function allOnramps() view returns (address[])", | ||
}, | ||
v2: { | ||
allGateways: "function allGateways() view returns (address[])", | ||
}, | ||
v3: { | ||
allGateways: "function allGateways() view returns (address[])", | ||
}, | ||
}; | ||
|
||
module.exports = { | ||
bob: { | ||
tvl: (api) => | ||
sumTokens2({ | ||
tvl: async (api) => { | ||
const gateways = (await api.batchCall([ | ||
{ abi: abis.v1.allOnramps, target: factories.v1 }, | ||
{ abi: abis.v2.allGateways, target: factories.v2 }, | ||
{ abi: abis.v3.allGateways, target: factories.v3 } | ||
])).flat(); | ||
|
||
return sumTokens2({ | ||
api, | ||
chain: "bob", | ||
tokens: [ | ||
ADDRESSES.bob.WBTC, | ||
ADDRESSES.bob.TBTC, | ||
], | ||
owners: [ | ||
// taken from onramp factory (allOnramps): https://explorer.gobob.xyz/address/0x1831d29376eb94bba3ca855af7984db923768b27?tab=read_contract | ||
"0x587e6E2b280C70ec811a371671D3CBE9D7b9F691", | ||
"0xA1884124a52331Bc2fa66e2b0EFa15856C6830c6", | ||
"0x2e0A1Fa2f61985c475B869559cF2Cf733d4DB282", | ||
"0xCA94d277d04e8e6ce960F7492b2df62e2215d562", | ||
"0x9BBBc8F4e4258cC9Ec79164DDB7ef72954f381E2", | ||
"0x47340424457463Fa77B59FDAdea31cA886a241FD", | ||
// V2 gateways taken from gateway registry (allGateways): https://explorer.gobob.xyz/address/0x37f330e667208633e1da1cf601d01f0ef8484306?tab=read_contract | ||
"0x1578c26085b45A559D6B4D4cCfc1DD9e5c66F7B6", | ||
"0x2a7b7Db980B2228D5FfC47711D09d13F8F90961e", | ||
// V3 gateways taken from gateway registry (allGateways): https://explorer.gobob.xyz/address/0xAE6770a207E86FaE3b191564FA55ce7Bfee0Dde9?tab=read_contract | ||
"0xcc2c1d45A3ECeEdec364a6B9e537AE97Fa20bEa7", | ||
"0x32768E87f7E929616f43B02F83c0F155A942Bc6B", | ||
], | ||
}), | ||
owners: gateways, | ||
}); | ||
}, | ||
} | ||
}; | ||
|
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 |
---|---|---|
|
@@ -283,6 +283,7 @@ | |
"scroll", | ||
"secret", | ||
"sei", | ||
"shape", | ||
"shibarium", | ||
"shiden", | ||
"shimmer_evm", | ||
|
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,3 @@ | ||
const { uniTvlExport } = require('../helper/unknownTokens') | ||
|
||
module.exports = uniTvlExport('shape', '0x74Eac16615ed3b5A8Df2d00d72C72780beDED02A') |
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
Oops, something went wrong.