From c083151333e1179a2d06fe193cef8bf05924a3aa Mon Sep 17 00:00:00 2001 From: hg-tranche <70196848+hg-tranche@users.noreply.github.com> Date: Tue, 13 Jul 2021 15:42:22 +0530 Subject: [PATCH] added tranche v2 adapter for ethereum --- v2/projects/tranche/index.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 v2/projects/tranche/index.js diff --git a/v2/projects/tranche/index.js b/v2/projects/tranche/index.js new file mode 100644 index 00000000..61b9bbf4 --- /dev/null +++ b/v2/projects/tranche/index.js @@ -0,0 +1,22 @@ +const sdk = require('../../../sdk/index'); +const axios = require('axios'); + +module.exports = { + /* Project Metadata */ + name: "TRANCHE", + token: "SLICE", + website: "https://tranche.finance/", + category: "Derivatives", + start: 1574241665, + /* required for fetching token balances */ + tokenHolderMap: [ + { + tokens: async () => { + return (await axios.get('https://api.tranche.finance/api/v1/common/token-address?network=ethereum')).data.result || []; + }, + holders: async () => { + return (await axios.get('https://api.tranche.finance/api/v1/common/holder-address?network=ethereum')).data.result || []; + }, + } + ] +};