From 96b527d72742e8d5c023e57f956d0c141007c943 Mon Sep 17 00:00:00 2001 From: waynebruce0x Date: Fri, 10 Jan 2025 08:18:34 +0000 Subject: [PATCH] revert sophon --- projects/sophon-bridge/index.js | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 projects/sophon-bridge/index.js diff --git a/projects/sophon-bridge/index.js b/projects/sophon-bridge/index.js deleted file mode 100644 index 8e73b8c5b7..0000000000 --- a/projects/sophon-bridge/index.js +++ /dev/null @@ -1,31 +0,0 @@ -const { sumTokens2 } = require("../helper/unwrapLPs"); - -const target = "0xD7f9f54194C633F36CCD5F3da84ad4a1c38cB2cB" -const gasQuery = '0x0000000000000000000000000000000000000001' -const gasAddress = '0x0000000000000000000000000000000000000000' -const chainId = 50104 - -module.exports = { - ethereum: { - tvl: async (api) => { - const totalBalances = await sumTokens2({ - api, - owner: target, - fetchCoValentTokens: true, - }) - const balances = await api.multiCall({ - calls: [gasQuery, ...Object.keys(totalBalances)].map(token => ({ - target, params: [chainId, token.substring(token.indexOf(':') + 1)] - })), - abi: { "inputs": [{ "internalType": "uint256", "name": "chainId", "type": "uint256" }, { "internalType": "address", "name": "l1Token", "type": "address" }], "name": "chainBalance", "outputs": [{ "internalType": "uint256", "name": "balance", "type": "uint256" }], "stateMutability": "view", "type": "function" }, - permitFailure: true, - withMetadata: true - }) - api._balances._balances = {} - balances.map(call => { - const token = call.input.params[1] - api.add(token == gasQuery ? gasAddress : token, call.output) - }) - } - }, -};