0x adaptor fetches ZRX balance from ZRX Staking Vault

This commit is contained in:
Theo Gonella 2020-06-15 08:41:23 -07:00
parent a587cab574
commit 16a0e3b482
1 changed files with 29 additions and 0 deletions

29
projects/0x/index.js Normal file
View File

@ -0,0 +1,29 @@
/*==================================================
Modules
==================================================*/
const sdk = require('../../sdk');
/*==================================================
TVL
==================================================*/
async function tvl(timestamp, block) {
let balances = {
'0xe41d2489571d322189246dafa5ebde1f4699f498': (await sdk.api.abi.call({block,target: '0xe41d2489571d322189246dafa5ebde1f4699f498',params: '0xba7f8b5fb1b19c1211c5d49550fcd149177a5eaf',abi: 'erc20:balanceOf'})).output
};
return balances;
}
/*==================================================
Exports
==================================================*/
module.exports = {
name: '0x Project', // project name
token: 'ZRX', // ZRX token
category: 'dexes', // allowed values as shown on DefiPulse: 'Derivatives', 'DEXes', 'Lending', 'Payments', 'Assets'
start: 1574023865, // Nov-17-2019 08:51:05 PM +UTC
tvl // tvl adapter
}