Skip to content

Commit

Permalink
Add the bridge between Endurance and BSC
Browse files Browse the repository at this point in the history
Signed-off-by: lyfsn <[email protected]>
  • Loading branch information
lyfsn committed May 10, 2024
1 parent 27c6dad commit d3b3bde
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
22 changes: 22 additions & 0 deletions projects/endurance-bridge/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const { nullAddress } = require('../helper/tokenMapping');
const { sumTokens2 } = require('../helper/unwrapLPs');

const config = {
endurance: {
bridges: [
'0xf3310e3f0D46FF5EE7daB69C73452D0ff3979Bed',
],
tokens: {
nullAddress
}
},
};

Object.keys(config).forEach(chain => {
module.exports[chain] = {
tvl: (_, _b, {[chain]: block }) => {
const { bridges: owners, tokens } = config[chain]
return sumTokens2({ tokens: Object.values(tokens), owners, chain, block })
}
}
})
1 change: 1 addition & 0 deletions projects/helper/chains.json
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@
"vision",
"vite",
"vive",
"endurance",
"wan",
"waves",
"wax",
Expand Down
1 change: 1 addition & 0 deletions projects/helper/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const DEFAULTS = {
ANKR_API_KEY: '79258ce7f7ee046decc3b5292a24eb4bf7c910d7e39b691384c7ce0cfb839a01',
RENEC_RPC: "https://api-mainnet-beta.renec.foundation:8899/",
BSQUARED_RPC: "https://rpc.bsquared.network,https://b2-mainnet.alt.technology", // add manually, short name is b2-mainnet
ENDURANCE_RPC: "https://rpc-endurance.fusionist.io/"
}

const ENV_KEYS = [
Expand Down
3 changes: 3 additions & 0 deletions projects/helper/tokenMapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ const ibcMappings = {
}

const fixBalancesTokens = {
endurance: {
[nullAddress]: { coingeckoId: "endurance", decimals: 18 },
},
ace: {
[nullAddress]: { coingeckoId: "endurance", decimals: 18 },
'0x85119527cf38f6ccf7b1b8f8fad05145358aaa81': { coingeckoId: "endurance", decimals: 18 },
Expand Down

0 comments on commit d3b3bde

Please sign in to comment.