Skip to content

Commit

Permalink
Merge branch 'pr/scaryswap/5405'
Browse files Browse the repository at this point in the history
  • Loading branch information
g1nt0ki committed Feb 24, 2023
2 parents a673845 + aa83dbc commit ce50d96
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 10 deletions.
23 changes: 23 additions & 0 deletions projects/scaryswap/contracts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"pools": [
"0x704e258002428ad5a8dbb433D477654404f15587",
"0x034D059190a8554f2E474Bd25c369F18ac5Ad3Ab",
"0xc35cBc7964D1eC52e23D87551bC0198bd6CA5684",
"0x2A2FBB49dDaB99a8bDFC203b70570187573ba8ac",
"0xE5E1e21B7564D6DCd36d5dC061A06eD3E97c2058",
"0x6286fC97636C79ce3Cf5cf176054C69b6FFD4333",
"0x1981a9fe49A69e1050D07CcF85B65b8aB0adFDA4",
"0x088A14e3BC62313C8D694424015657aEdD98Df26",
"0x421ACe6888c80bF5214424C71879fF69F874553c",
"0xD79666d97779C3bdeDc5e8697F48a0849ea0a9b2",
"0x64e3c3fbC549C19605Ba0B5d823d3aE673C2f8Ab"
],
"farms": [
{ "contract": "0x335974e9A7449765DfE891dFc9e9ECF4Ae0E1F08", "token": "0x8D11eC38a3EB5E956B052f67Da8Bdc9bef8Abf3E" },
{ "contract": "0x7968FC7B3aBf481d8D6577D048DbE10930Bb48BA", "token": "0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83" },
{ "contract": "0x4c2032f0F6856be925B1f5E217e01ca8bd4197F6", "token": "0x04068DA6C83AFCFA0e13ba15A6696662335D5B75" },
{ "contract": "0x1ad66466Fc9Cdd5992b3919E475885aCC572887a", "token": "0xAD522217E64Ec347601015797Dd39050A2a69694" },
{ "contract": "0xC17c92E9b2A9Be62e3547819438482033c5d4026", "token": "0xAD522217E64Ec347601015797Dd39050A2a69694" },
{ "contract": "0xDad0e7f0cc49c8B24Ba89B7c224bb0bF462dCBD5", "token": "0xAD522217E64Ec347601015797Dd39050A2a69694" }
]
}
31 changes: 21 additions & 10 deletions projects/scaryswap/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
const { getUniTVL} = require('../helper/unknownTokens')
const { getUniTVL } = require("../helper/unknownTokens");
const { pools, farms } = require("./contracts.json");
const poolAbi = require("./pool.json");
const { sumTokens2 } = require("../helper/unwrapLPs");

const chain = 'fantom'
const chain = "fantom";

module.exports = {
fantom: {
tvl: getUniTVL({
chain,
useDefaultCoreAssets: true,
factory: '0x7ceb5f3a6d1888eec74a41a5377afba5b97200ea',
}),
},
async function staking(timestamp, block, chainBlocks, { api }) {
const tokens = await api.multiCall({ abi: poolAbi.rewardsToken, calls: pools })
const tokensAndOwners = tokens.map((v, i) => [v, pools[i]])
farms.forEach(({ token, contract}) => tokensAndOwners.push([token, contract]))
return sumTokens2({ api, tokensAndOwners})
}

module.exports = {
fantom: {
tvl: getUniTVL({
chain,
useDefaultCoreAssets: true,
factory: "0x7ceb5f3a6d1888eec74a41a5377afba5b97200ea",
}),
staking: staking
},
};
1 change: 1 addition & 0 deletions projects/scaryswap/pool.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "rewardsToken": "address:rewardsToken" }

0 comments on commit ce50d96

Please sign in to comment.