From 1b8e44bce3778509281ca8235893dd3cac9b776d Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Thu, 26 Nov 2020 05:49:19 +0800 Subject: [PATCH 001/254] - Fix the invest API - Changed the mongoDB - Integrated TheGraph API --- Dockerfile | 15 +- app.js | 34 + config/abi.js | 1333 ++++++++++++++++++ config/db.js | 39 + config/serverless/domain.js | 23 +- docker-compose.yml | 35 +- models/apy.model.js | 31 + models/vault.model.js | 31 + package-lock.json | 143 +- package.json | 11 + services/user/vaults/statistics/handler.js | 82 +- services/user/vaults/transactions/handler.js | 145 +- services/vaults/apy/handler.js | 47 +- services/vaults/apy/save/handler.js | 37 +- services/vaults/handler.js | 9 +- services/vaults/save/handler.js | 27 +- utils/api.js | 22 + 17 files changed, 1915 insertions(+), 149 deletions(-) create mode 100644 app.js create mode 100644 config/abi.js create mode 100644 config/db.js create mode 100644 models/apy.model.js create mode 100644 models/vault.model.js create mode 100644 utils/api.js diff --git a/Dockerfile b/Dockerfile index 7182a0b..c42827c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,13 @@ -FROM node:14-buster +FROM node:14 -RUN npm install -g serverless && \ - npm install -g serverless-offline +WORKDIR /api -WORKDIR /opt/app - -COPY package*.json ./ +COPY package*.json /api/ RUN npm install -COPY . . +COPY ./ /api/ -EXPOSE 3000 +EXPOSE 8080 -CMD [ "sls", "offline", "--host", "0.0.0.0" ] +CMD ["npm", "start"] diff --git a/app.js b/app.js new file mode 100644 index 0000000..5b8696d --- /dev/null +++ b/app.js @@ -0,0 +1,34 @@ +const express = require('express'); +const db = require('./config/db') +const vaultsApy = require('./services/vaults/apy/handler'); +const vaultApySave = require('./services/vaults/apy/save/handler'); +const userStatistics = require('./services/user/vaults/statistics/handler'); +const userTransactions = require('./services/user/vaults/transactions/handler'); +const vaultSave = require('./services/vaults/save/handler'); +const app = express(); +const port = process.env.PORT || 8080; + +async function init() { + // Improve debugging + process.on('unhandledRejection', (reason, p) => { + console.log('Unhandled Rejection at:', p, 'reason:', reason) + }); + + db.connectDB(async (err) => { + if (err) throw err; + }) + + // TODO Run Cron Job everyday 00:00 (Save Vault APY, Save Vault, Add Price Updated and store into database) + + app.get('/vaults/apy', (req, res) => vaultsApy.handler(res)); + app.get('/vaults/apy/save', (req, res) => vaultApySave.handler(res)); + app.get('/vaults/save', (req, res) => vaultSave.handler(res)); + app.get('/user/:userAddress/vaults/statistics', (req, res) => userStatistics.handler(req, res)); + app.get('/user/:userAddress/vaults/tranasctions', (req, res) => userTransactions.handler(req, res)); + + app.listen(port, () => console.log(`Listening on ${port}`)); +}; + +init(); + + diff --git a/config/abi.js b/config/abi.js new file mode 100644 index 0000000..a0d871e --- /dev/null +++ b/config/abi.js @@ -0,0 +1,1333 @@ +const earnABIContract = [ + { + inputs: [], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "from", type: "address" }, + { indexed: true, internalType: "address", name: "to", type: "address" }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + constant: true, + inputs: [], + name: "aave", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "aavePool", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "aaveToken", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { internalType: "address", name: "owner", type: "address" }, + { internalType: "address", name: "spender", type: "address" }, + ], + name: "allowance", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "approve", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [], + name: "approveToken", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "apr", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balance", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceAave", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceAaveAvailable", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceCompound", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceCompoundInToken", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceDydx", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceDydxAvailable", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceFulcrum", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceFulcrumAvailable", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceFulcrumInToken", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [{ internalType: "address", name: "account", type: "address" }], + name: "balanceOf", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "calcPoolValueInToken", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "compound", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "dToken", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "decimals", + outputs: [{ internalType: "uint8", name: "", type: "uint8" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "subtractedValue", type: "uint256" }, + ], + name: "decreaseAllowance", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "_amount", type: "uint256" }], + name: "deposit", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "dydx", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "fulcrum", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getAave", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getAaveCore", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getPricePerFullShare", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "addedValue", type: "uint256" }, + ], + name: "increaseAllowance", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "isOwner", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "name", + outputs: [{ internalType: "string", name: "", type: "string" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "owner", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "pool", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "provider", + outputs: [{ internalType: "enum yUSDT.Lender", name: "", type: "uint8" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "rebalance", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "recommend", + outputs: [{ internalType: "enum yUSDT.Lender", name: "", type: "uint8" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "renounceOwnership", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "address", name: "_new_AAVE", type: "address" }], + name: "set_new_AAVE", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "address", name: "_new_APR", type: "address" }], + name: "set_new_APR", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "address", name: "_new_ATOKEN", type: "address" }], + name: "set_new_ATOKEN", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "_new_COMPOUND", type: "address" }, + ], + name: "set_new_COMPOUND", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "_new_DTOKEN", type: "uint256" }], + name: "set_new_DTOKEN", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "_new_FULCRUM", type: "address" }, + ], + name: "set_new_FULCRUM", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "amount", type: "uint256" }], + name: "supplyAave", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "amount", type: "uint256" }], + name: "supplyCompound", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "amount", type: "uint256" }], + name: "supplyDydx", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "amount", type: "uint256" }], + name: "supplyFulcrum", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "symbol", + outputs: [{ internalType: "string", name: "", type: "string" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "token", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "recipient", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "transfer", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "sender", type: "address" }, + { internalType: "address", name: "recipient", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "transferFrom", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "address", name: "newOwner", type: "address" }], + name: "transferOwnership", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "_shares", type: "uint256" }], + name: "withdraw", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "amount", type: "uint256" }], + name: "withdrawAave", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "amount", type: "uint256" }], + name: "withdrawDydx", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "_amount", type: "uint256" }], + name: "withdrawSomeCompound", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "_amount", type: "uint256" }], + name: "withdrawSomeFulcrum", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +]; + +const vaultABIContract = [ + { + inputs: [ + { internalType: "address", name: "_token", type: "address" }, + { internalType: "address", name: "_controller", type: "address" }, + ], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "from", type: "address" }, + { indexed: true, internalType: "address", name: "to", type: "address" }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + constant: true, + inputs: [ + { internalType: "address", name: "owner", type: "address" }, + { internalType: "address", name: "spender", type: "address" }, + ], + name: "allowance", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "approve", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "available", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balance", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [{ internalType: "address", name: "account", type: "address" }], + name: "balanceOf", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "controller", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "decimals", + outputs: [{ internalType: "uint8", name: "", type: "uint8" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "subtractedValue", type: "uint256" }, + ], + name: "decreaseAllowance", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "_amount", type: "uint256" }], + name: "deposit", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [], + name: "depositAll", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [], + name: "earn", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getPricePerFullShare", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "governance", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "reserve", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "harvest", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "addedValue", type: "uint256" }, + ], + name: "increaseAllowance", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "max", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "min", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "name", + outputs: [{ internalType: "string", name: "", type: "string" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "address", name: "_controller", type: "address" }], + name: "setController", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "address", name: "_governance", type: "address" }], + name: "setGovernance", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "_min", type: "uint256" }], + name: "setMin", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "symbol", + outputs: [{ internalType: "string", name: "", type: "string" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "token", + outputs: [{ internalType: "contract IERC20", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "recipient", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "transfer", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "sender", type: "address" }, + { internalType: "address", name: "recipient", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "transferFrom", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "_shares", type: "uint256" }], + name: "withdraw", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [], + name: "withdrawAll", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +]; + +const yfUSDTABIContract = [ + { + inputs: [ + { internalType: "address", name: "_token", type: "address" }, + { internalType: "address", name: "_earn", type: "address" }, + { internalType: "address", name: "_vault", type: "address" }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "from", type: "address" }, + { indexed: true, internalType: "address", name: "to", type: "address" }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "MAX_UINT", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "owner", type: "address" }, + { internalType: "address", name: "spender", type: "address" }, + ], + name: "allowance", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "approve", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "approvePooling", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "account", type: "address" }], + name: "balanceOf", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [{ internalType: "uint8", name: "", type: "uint8" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "subtractedValue", type: "uint256" }, + ], + name: "decreaseAllowance", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "earnAmount", type: "uint256" }, + { internalType: "uint256", name: "vaultAmount", type: "uint256" }, + ], + name: "deposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "earn", + outputs: [{ internalType: "contract IYearn", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_address", type: "address" }], + name: "earnBalanceOf", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_address", type: "address" }], + name: "earnDepositBalanceOf", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "earnPool", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "earnPrice", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "feePercentages", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "addedValue", type: "uint256" }, + ], + name: "increaseAllowance", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "isVesting", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "refundEarn", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "refundVault", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "revertContract", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_contract", type: "address" }], + name: "setEarn", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_percentage", type: "uint256" }], + name: "setFeePercentages", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_contract", type: "address" }], + name: "setVault", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "token", + outputs: [{ internalType: "contract IERC20", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "recipient", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "transfer", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "sender", type: "address" }, + { internalType: "address", name: "recipient", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "transferFrom", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "newOwner", type: "address" }], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "unlockDate", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "vault", + outputs: [{ internalType: "contract IYvault", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_address", type: "address" }], + name: "vaultBalanceOf", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_address", type: "address" }], + name: "vaultDepositBalanceOf", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "vaultPool", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "vaultPrice", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "vesting", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_shares", type: "uint256" }], + name: "withdrawEarn", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "withdrawToken", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_shares", type: "uint256" }], + name: "withdrawVault", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +module.exports = { + earnABIContract, + vaultABIContract, + yfUSDTABIContract, +}; diff --git a/config/db.js b/config/db.js new file mode 100644 index 0000000..904f90d --- /dev/null +++ b/config/db.js @@ -0,0 +1,39 @@ +const MongoClient = require('mongodb').MongoClient; +const { + MONGO_USERNAME, + MONGO_PASSWORD, + MONGO_HOSTNAME, + MONGO_PORT, + MONGO_DB, + AUTH_MECHANISM +} = process.env; +const Api = require('../utils/api') + +let _db; +const connectDB = async (callback) => { + var url = ''; + if (process.env.PRODUCTION != null && process.env.PRODUCTION != '') { + url = `mongodb://${encodeURIComponent(MONGO_USERNAME)}:${encodeURIComponent(MONGO_PASSWORD)}@${MONGO_HOSTNAME}:${MONGO_PORT}/${MONGO_DB}?authMechanism=${AUTH_MECHANISM}`; + } else { + url = `mongodb://${MONGO_HOSTNAME}`; + } + MongoClient.connect(url, { + reconnectTries: Number.MAX_VALUE, + autoReconnect: true, + useNewUrlParser: true, + }, (err, client) => { + if (err) { + console.error(err); + Api.pushSlackErrorAlert('Yearn API\nDB Connection', "", JSON.stringify(err)) + } else { + console.log('Connected successfully to database'); + _db = client.db(MONGO_DB, { useUnifiedTopology: true }); + } + + return callback(err); + }) +}; + +const getDB = () => _db; + +module.exports = { connectDB, getDB }; \ No newline at end of file diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 42be9c9..735dcc7 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -17,7 +17,7 @@ module.exports.prod = () => DEFAULT; module.exports.staging = () => { return _.merge({}, DEFAULT, { - domainName: `staging-${DEFAULT.domainName}`, + domainName: `staging-${DEFAULT.domainName}` }); }; @@ -26,3 +26,24 @@ module.exports.dev = () => { domainName: `dev-${DEFAULT.domainName}`, }); }; + +const devEarnContract = "0x431691E15b74279c8FADCdD4c92bAe16E72DbbEF"; +const devVaultContract = "0x7Cc77422B3EE0fd6c1544A9893802801Ba62C6eB"; +const devYfUSDTContract = "0x4f6C84ed8bE874431e727881bF2D48C9BCB0228D"; +const prodEarnContract = "0xe6354ed5bc4b393a5aad09f21c46e101e692d447"; +const prodVaultContract = "0x2f08119c6f07c006695e079aafc638b8789faf18"; +const prodYfUSDTContract = "0xE8c9F440677bDC8bA915734e6c7C1b232916877d"; + +module.exports.devContract = { + devEarnContract, + devVaultContract, + devYfUSDTContract +}; + +module.exports.prodContract = { + prodEarnContract, + prodVaultContract, + prodYfUSDTContract +} + + diff --git a/docker-compose.yml b/docker-compose.yml index 05b1acc..9045e26 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,19 +1,28 @@ version: '3.6' services: - serverless: + database: + image: mongo + container_name: 'database' + restart: 'always' + ports: + - '27017:27017' + volumes: + - 'mongodata:/data/db' + api: + container_name: 'api' + restart: 'always' build: context: . - environment: - - SUBGRAPH_ENDPOINT=${SUBGRAPH_ENDPOINT} - - WEB3_ENDPOINT=${WEB3_ENDPOINT} - - ARCHIVENODE_ENDPOINT=${ARCHIVENODE_ENDPOINT} - - ETHERSCAN_API_KEY=${ETHERSCAN_API_KEY} - - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} - - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} - - AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION} + env_file: + - .env ports: - - "3000:3000" + - "8080:8080" volumes: - - "./config:/opt/app/config:ro" - - "./services:/opt/app/services:ro" - - "./utils:/opt/app/utils:ro" + - "./config:/api/config:ro" + - "./services:/api/services:ro" + - "./utils:/api/utils:ro" + - "./models:/api/models:ro" + depends_on: + - database +volumes: + mongodata: diff --git a/models/apy.model.js b/models/apy.model.js new file mode 100644 index 0000000..a142b56 --- /dev/null +++ b/models/apy.model.js @@ -0,0 +1,31 @@ +const mongo = require('../config/db'); +const collection = 'apy'; + +const findAll = async () => { + const db = mongo.getDB(); + return await db.collection(collection).find({}).toArray(); +}; + +const add = async (params) => { + const db = mongo.getDB(); + const result = await db.collection(collection).findOne({ + name: params.name + }); + if (result != null) { + return await db.collection(collection).updateOne({ + name: params.name + }, + { + $set: { + ...params + } + }); + } else { + return await db.collection(collection).insertOne(params); + } +} + +module.exports = { + findAll, + add +}; \ No newline at end of file diff --git a/models/vault.model.js b/models/vault.model.js new file mode 100644 index 0000000..49959aa --- /dev/null +++ b/models/vault.model.js @@ -0,0 +1,31 @@ +const mongo = require('../config/db'); +const collection = 'vaults'; + +const findAll = async () => { + const db = mongo.getDB(); + return await db.collection(collection).find({}).toArray(); +}; + +const add = async (params) => { + const db = mongo.getDB(); + const result = await db.collection(collection).findOne({ + name: params.name + }); + if (result != null) { + return await db.collection(collection).updateOne({ + name: params.name + }, + { + $set: { + ...params + } + }); + } else { + return await db.collection(collection).insertOne(params); + } +} + +module.exports = { + findAll, + add +}; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 558cade..af27b06 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,8 @@ { - "requires": true, + "name": "yearn-api", + "version": "1.0.0", "lockfileVersion": 1, + "requires": true, "dependencies": { "@ethersproject/abi": { "version": "5.0.0-beta.153", @@ -699,6 +701,14 @@ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz", "integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==" }, + "axios": { + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.0.tgz", + "integrity": "sha512-fmkJBknJKoZwem3/IKSSLpkdNXZeBu5Q7GA/aRsr2btgrptmSCxi2oFjZHqGdK9DoTil9PIHlPIZw2EcRJXRvw==", + "requires": { + "follow-redirects": "^1.10.0" + } + }, "base-x": { "version": "3.0.8", "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", @@ -730,6 +740,39 @@ "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==" }, + "bl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", + "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, "blakejs": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.0.tgz", @@ -872,6 +915,11 @@ "safe-buffer": "^5.1.2" } }, + "bson": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.5.tgz", + "integrity": "sha512-kDuEzldR21lHciPQAIulLs1LZlCXdLziXI6Mb/TDkwXhb//UORJNPXgcRs2CuO4H0DcMkpfT3/ySsP3unoZjBg==" + }, "buffer": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", @@ -1280,6 +1328,11 @@ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, + "denque": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/denque/-/denque-1.4.1.tgz", + "integrity": "sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ==" + }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -1722,6 +1775,11 @@ "unpipe": "~1.0.0" } }, + "follow-redirects": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz", + "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==" + }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -2157,8 +2215,7 @@ "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "isexe": { "version": "2.0.0", @@ -2515,6 +2572,12 @@ } } }, + "memory-pager": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", + "optional": true + }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -2641,6 +2704,19 @@ "moment": ">= 2.9.0" } }, + "mongodb": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.3.tgz", + "integrity": "sha512-rOZuR0QkodZiM+UbQE5kDsJykBqWi0CL4Ec2i1nrGrUI3KO11r6Fbxskqmq3JK2NH7aW4dcccBuUujAP0ERl5w==", + "requires": { + "bl": "^2.2.1", + "bson": "^1.1.4", + "denque": "^1.4.1", + "require_optional": "^1.0.1", + "safe-buffer": "^5.1.2", + "saslprep": "^1.0.0" + } + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -2704,6 +2780,15 @@ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" }, + "node-cron": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/node-cron/-/node-cron-2.0.3.tgz", + "integrity": "sha512-eJI+QitXlwcgiZwNNSRbqsjeZMp5shyajMR81RZCqeW0ZDEj4zU9tpd4nTh/1JsBiKbF8d08FCewiipDmVIYjg==", + "requires": { + "opencollective-postinstall": "^2.0.0", + "tz-offset": "0.0.1" + } + }, "node-fetch": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", @@ -2862,6 +2947,11 @@ "mimic-fn": "^2.1.0" } }, + "opencollective-postinstall": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz", + "integrity": "sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==" + }, "p-cancelable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", @@ -3085,8 +3175,7 @@ "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, "proxy-addr": { "version": "2.0.6", @@ -3271,6 +3360,27 @@ } } }, + "require_optional": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", + "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==", + "requires": { + "resolve-from": "^2.0.0", + "semver": "^5.1.0" + }, + "dependencies": { + "resolve-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", + "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, "resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", @@ -3318,6 +3428,15 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, + "saslprep": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", + "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", + "optional": true, + "requires": { + "sparse-bitfield": "^3.0.3" + } + }, "sax": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", @@ -3629,6 +3748,15 @@ "integrity": "sha512-2sqgzeFlid6N4Z2fUQ1cvFmTOLRi/sEDzSQ0OKYchqgoPmQBVyM3959qYx3fpS6Esef80KjmpgPeEr028dP3OA==", "dev": true }, + "sparse-bitfield": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", + "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", + "optional": true, + "requires": { + "memory-pager": "^1.0.2" + } + }, "sshpk": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", @@ -3927,6 +4055,11 @@ "is-typedarray": "^1.0.0" } }, + "tz-offset": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tz-offset/-/tz-offset-0.0.1.tgz", + "integrity": "sha512-kMBmblijHJXyOpKzgDhKx9INYU4u4E1RPMB0HqmKSgWG8vEcf3exEfLh4FFfzd3xdQOw9EuIy/cP0akY6rHopQ==" + }, "ultron": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", diff --git a/package.json b/package.json index d27b785..2c4332f 100644 --- a/package.json +++ b/package.json @@ -1,4 +1,11 @@ { + "name": "yearn-api", + "version": "1.0.0", + "description": "", + "main": "app.js", + "scripts": { + "start": "node --max-old-space-size=4096 app.js -enableServer 1" + }, "devDependencies": { "prettier": "^2.1.1", "serverless-aws-documentation": "^1.1.0", @@ -7,11 +14,15 @@ "serverless-offline": "^6.7.0" }, "dependencies": { + "axios": "^0.21.0", "bignumber": "^1.1.0", "delay": "^4.4.0", "dotenv": "^8.2.0", + "express": "^4.17.1", "lodash": "^4.17.20", "moment": "^2.28.0", + "mongodb": "^3.6.3", + "node-cron": "^2.0.3", "node-fetch": "^2.6.1", "ramda": "^0.27.1", "web3": "^1.3.0" diff --git a/services/user/vaults/statistics/handler.js b/services/user/vaults/statistics/handler.js index d137f60..801af6b 100644 --- a/services/user/vaults/statistics/handler.js +++ b/services/user/vaults/statistics/handler.js @@ -7,6 +7,13 @@ const BigNumber = require("bignumber.js"); const subgraphUrl = process.env.SUBGRAPH_ENDPOINT; const Web3 = require("web3"); const web3 = new Web3(process.env.WEB3_ENDPOINT); +const earnABIContract = require('../../../../config/abi').earnABIContract; +const vaultABIContract = require('../../../../config/abi').vaultABIContract; +const yfUSDTABIContract = require('../../../../config/abi').yfUSDTABIContract; +const { + devContract, + prodContract, +} = require('../../../../config/serverless/domain'); const { getTransactions, @@ -20,6 +27,11 @@ const getVaultContract = (vaultAddress) => { return contract; }; +const getContract = (abi, contractAddress) => { + const contract = new web3.eth.Contract(abi, contractAddress); + return contract; +}; + const getDepositedShares = async (vaultContract, userAddress) => { const balance = await vaultContract.methods.balanceOf(userAddress).call(); return balance; @@ -32,15 +44,37 @@ const getPricePerFullShare = async (vaultContract) => { return pricePerFullShare; }; -const getVaultStatistics = async (vaultAddress, transactions, userAddress) => { - const findVault = (vault) => - vault.vaultAddress.toLowerCase() === vaultAddress; +const getVaultStatistics = async (contractAddress, transactions, userAddress) => { + const findVault = (vault) => { + console.log('vault', JSON.stringify(vault)); + return vault.vaultAddress.toLowerCase() === contractAddress; + } + const transactionsForVault = _.find(transactions, findVault); - - const vaultContract = getVaultContract(vaultAddress); - const depositedShares = await getDepositedShares(vaultContract, userAddress); - - const pricePerFullShare = await getPricePerFullShare(vaultContract); + console.log('contractAddress', contractAddress); + + let earnAddress = ""; + let vaultAddress = ""; + let yfUSDTAddress = ""; + + if (process.env.PRODUCTION != null && process.env.PRODUCTION != '') { + earnAddress = prodContract.prodEarnContract; + vaultAddress = prodContract.prodVaultContract; + yfUSDTAddress = prodContract.prodYfUSDTContract; + } else { + earnAddress = devContract.devEarnContract; + vaultAddress = devContract.devVaultContract; + yfUSDTAddress = devContract.devYfUSDTContract; + } + + const earnContract = getContract(earnABIContract, earnAddress); + const vaultContract = getContract(vaultABIContract, vaultAddress); + const farmerContract = getContract(yfUSDTABIContract, yfUSDTAddress); + + const depositedShares = await getDepositedShares(farmerContract, userAddress); + const earnPricePerFullShare = await getPricePerFullShare(earnContract); + const vaultPricePerFullShare = await getPricePerFullShare(vaultContract); + const pricePerFullShare = earnPricePerFullShare + vaultPricePerFullShare / 2; const depositedAmount = new BigNumber(depositedShares) .times(pricePerFullShare) @@ -92,26 +126,30 @@ const getVaultStatistics = async (vaultAddress, transactions, userAddress) => { const getVaultsStatistics = async (userAddress) => { const vaultAddressesForUser = await getVaultAddressesForUser(userAddress); const transactions = await getTransactions(userAddress); - const getVaultStatisticsWithTransactions = async (vault) => - await getVaultStatistics(vault, transactions, userAddress); - + const getVaultStatisticsWithTransactions = async (vault) => { + return await getVaultStatistics(vault, transactions, userAddress); + } + const vaultsStatistics = await Promise.all( vaultAddressesForUser.map(getVaultStatisticsWithTransactions) ); return vaultsStatistics; }; -module.exports.handler = async (event) => { - const userAddress = event.pathParameters.userAddress; - const vaultsStatistics = await getVaultsStatistics(userAddress); - return { - statusCode: 200, - headers: { - "Access-Control-Allow-Origin": "*", - "Access-Control-Allow-Credentials": true, - }, - body: JSON.stringify(vaultsStatistics), - }; +module.exports.handler = async (req, res) => { + const userAddress = req.params.userAddress || ''; + if (userAddress === '') { + res.status(200).json({ + message: 'User Address is empty.', + body: null + }); + } else { + const vaultsStatistics = await getVaultsStatistics(req.params.userAddress); + res.status(200).json({ + message: '', + body: vaultsStatistics + }); + } }; function getMinimalVaultABI() { diff --git a/services/user/vaults/transactions/handler.js b/services/user/vaults/transactions/handler.js index 4cdbee6..2245b50 100644 --- a/services/user/vaults/transactions/handler.js +++ b/services/user/vaults/transactions/handler.js @@ -7,51 +7,112 @@ const BigNumber = require("bignumber.js"); const subgraphUrl = process.env.SUBGRAPH_ENDPOINT; const { getVaults } = require("../../../vaults/handler"); const _ = require("lodash"); +const { + devContract, + prodContract, +} = require('../../../../config/serverless/domain'); -module.exports.handler = async (event) => { - const userAddress = event.pathParameters.userAddress; - const transactions = await getTransactions(userAddress); - return { - statusCode: 200, - headers: { - "Access-Control-Allow-Origin": "*", - "Access-Control-Allow-Credentials": true, - }, - body: JSON.stringify(transactions), - }; +module.exports.handler = async (req, res) => { + const userAddress = req.params.userAddress || ''; + if (userAddress === '') { + res.status(200).json({ + message: 'User Address is empty.', + body: null + }); + } else { + const transactions = await getTransactions(userAddress); + res.status(200).json({ + message: '', + body: transactions + }); + } }; const getGraphTransactions = async (userAddress) => { + // const query = ` + // { + // deposits: deposits (where: {account: "${userAddress}"}, orderBy: blockNumber) { + // transactionAddress: id + // vaultAddress + // amount + // timestamp + // } + // withdrawals: withdraws (where: {account: "${userAddress}"}, orderBy: blockNumber) { + // transactionAddress: id + // vaultAddress + // amount + // timestamp + // } + // transfersIn: transfers(where: {to: "${userAddress}", from_not: "0x0000000000000000000000000000000000000000"}, orderBy: blockNumber) { + // transactionAddress: id + // timestamp + // vaultAddress + // balance + // totalSupply + // shares: value + // } + // transfersOut: transfers(where: {from: "${userAddress}", to_not: "0x0000000000000000000000000000000000000000"}, orderBy: blockNumber) { + // transactionAddress: id + // shares: value + // vaultAddress + // timestamp + // balance + // totalSupply + // shares: value + // } + // } + // `; const query = ` { - deposits: deposits (where: {account: "${userAddress}"}, orderBy: blockNumber) { - transactionAddress: id - vaultAddress + deposits: deposits (where: {account: "${userAddress}"}) { + transactionAddress: transaction { + id + } + vaultAddress: farmer { + id + } amount - timestamp + transaction { + timestamp + } } - withdrawals: withdraws (where: {account: "${userAddress}"}, orderBy: blockNumber) { - transactionAddress: id - vaultAddress + withdrawals (where: {account: "${userAddress}"}) { + transactionAddress: transaction { + id + } + vaultAddress: farmer { + id + } amount - timestamp + transaction { + timestamp + } } - transfersIn: transfers(where: {to: "${userAddress}", from_not: "0x0000000000000000000000000000000000000000"}, orderBy: blockNumber) { - transactionAddress: id - timestamp - vaultAddress - balance - totalSupply + transfersIn: transfers(where: {to: "${userAddress}", from_not: "0x0000000000000000000000000000000000000000"}) { + transactionAddress: transaction { + id + } + transaction { + timestamp + } + vaultAddress: farmer { + id + } + amount shares: value } - transfersOut: transfers(where: {from: "${userAddress}", to_not: "0x0000000000000000000000000000000000000000"}, orderBy: blockNumber) { - transactionAddress: id - shares: value - vaultAddress - timestamp - balance - totalSupply + transfersOut: transfers(where: {from: "${userAddress}", to_not: "0x0000000000000000000000000000000000000000"}) { + transactionAddress: transaction { + id + } shares: value + transaction { + timestamp + } + vaultAddress: farmer { + id + } + amount } } `; @@ -76,6 +137,22 @@ const getVaultAddressesForUserWithGraphTransactions = ( transfersIn, transfersOut, } = graphTransactions; + + const txMapping = (tx) => { + tx.vaultAddress = tx.vaultAddress.id; + tx.transactionAddress = tx. transactionAddress.id; + tx.timestamp = tx.transaction.timestamp; + + return { + ...tx + }; + } + + deposits.map(txMapping); + withdrawals.map(txMapping); + transfersIn.map(txMapping); + transfersOut.map(txMapping); + const vaultAddressesForUser = uniq([ ...pluck("vaultAddress", deposits), ...pluck("vaultAddress", withdrawals), @@ -144,8 +221,10 @@ const getTransactions = async (userAddress) => { const vault = vaults.find(findVault); + //TODO Change dynamic address const vaultTransactions = { - vaultAddress: vault.address, + // vaultAddress: vault.address, + vaultAddress: process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? prodContract.prodYfUSDTContract : devContract.devYfUSDTContract, deposits: depositsToVault.map(correctTransactionAddress), withdrawals: withdrawalsFromVault.map(correctTransactionAddress), transfersIn: transfersIntoVault.map(correctTransactionAddress), diff --git a/services/vaults/apy/handler.js b/services/vaults/apy/handler.js index 6479302..021dee2 100644 --- a/services/vaults/apy/handler.js +++ b/services/vaults/apy/handler.js @@ -1,33 +1,36 @@ const AWS = require("aws-sdk"); -const db = new AWS.DynamoDB.DocumentClient({ apiVersion: "2012-08-10" }); +// const db = new AWS.DynamoDB.DocumentClient({ apiVersion: "2012-08-10" }); const _ = require("lodash"); +const ApyModel = require('../../../models/apy.model') -const getVaultsApy = async () => { - const params = { - TableName: "vaultApy", - }; - const entries = await db.scan(params).promise(); - const apy = entries.Items; +// const getVaultsApy = async () => { +// const params = { +// TableName: "vaultApy", +// }; +// const entries = await db.scan(params).promise(); +// const apy = entries.Items; + +// const injectVaultAddress = (vault) => { +// vault.vaultAddress = vault.address; +// return vault; +// }; +// const vaultAddress = _.map(apy, injectVaultAddress); +// return apy; +// }; - const injectVaultAddress = (vault) => { - vault.vaultAddress = vault.address; - return vault; - }; - const vaultAddress = _.map(apy, injectVaultAddress); +const getVaultsApy = async () => { + const apy = await ApyModel.findAll(); + apy.forEach((v) => delete v._id) return apy; }; exports.getVaultsApy = getVaultsApy; -exports.handler = async (event) => { +exports.handler = async (res) => { const apy = await getVaultsApy(); - const response = { - statusCode: 200, - headers: { - "Access-Control-Allow-Origin": "*", - "Access-Control-Allow-Credentials": true, - }, - body: JSON.stringify(apy), - }; - return response; + + res.status(200).json({ + message: '', + body: apy + }); }; diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index a219370..8945dd8 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -1,6 +1,7 @@ require("dotenv").config(); const AWS = require("aws-sdk"); -const db = new AWS.DynamoDB.DocumentClient({ apiVersion: "2012-08-10" }); +// const db = new AWS.DynamoDB.DocumentClient({ apiVersion: "2012-08-10" }); +const db = require('../../../../models/apy.model'); const Web3 = require("web3"); const moment = require("moment"); const delay = require("delay"); @@ -42,14 +43,16 @@ const pools = [ ]; const saveVault = async (data) => { - const params = { - TableName: "vaultApy", - Item: data, - }; - await db - .put(params) - .promise() - .catch((err) => console.log("err", err)); + // const params = { + // TableName: "vaultApy", + // Item: data, + // }; + // await db + // .put(params) + // .promise() + // .catch((err) => console.log("err", err)); + + await db.add(data).catch((err) => console.log('err', err)); console.log(`Saved ${data.name}`); }; @@ -278,7 +281,7 @@ const readVault = async (vault) => { return data; }; -module.exports.handler = async (context) => { +module.exports.handler = async (res) => { console.log("Fetching historical blocks"); currentBlockNbr = await infuraWeb3.eth.getBlockNumber(); await delay(delayTime); @@ -297,13 +300,9 @@ module.exports.handler = async (context) => { } await delay(delayTime); } - const response = { - statusCode: 200, - headers: { - "Access-Control-Allow-Origin": "*", - "Access-Control-Allow-Credentials": true, - }, - body: JSON.stringify(vaultsWithApy), - }; - return response; + + return res.status(200).json({ + message: '', + body: vaultsWithApy + }); }; diff --git a/services/vaults/handler.js b/services/vaults/handler.js index 94c593e..caf0ab9 100644 --- a/services/vaults/handler.js +++ b/services/vaults/handler.js @@ -1,15 +1,12 @@ const AWS = require("aws-sdk"); -const db = new AWS.DynamoDB.DocumentClient({ apiVersion: "2012-08-10" }); +// const db = new AWS.DynamoDB.DocumentClient({ apiVersion: "2012-08-10" }); +const db = require('../../models/vault.model'); const _ = require("lodash"); const { injectDataIntoVaultAtKey } = require("../../utils/vaults"); const { getVaultsApy } = require("../vaults/apy/handler"); const getVaults = async () => { - const params = { - TableName: "vaults", - }; - const entries = await db.scan(params).promise(); - const vaults = entries.Items; + const vaults = await db.findAll(); return vaults; }; diff --git a/services/vaults/save/handler.js b/services/vaults/save/handler.js index 6324349..a55a7eb 100644 --- a/services/vaults/save/handler.js +++ b/services/vaults/save/handler.js @@ -1,6 +1,7 @@ require("dotenv").config(); const AWS = require("aws-sdk"); -const db = new AWS.DynamoDB.DocumentClient({ apiVersion: "2012-08-10" }); +// const db = new AWS.DynamoDB.DocumentClient({ apiVersion: "2012-08-10" }); +const db = require('../../../models/vault.model'); const _ = require("lodash"); const fetch = require("node-fetch"); const Web3 = require("web3"); @@ -70,18 +71,11 @@ const callContractMethod = async (contract, method) => { }; const saveVault = async (vault) => { - const params = { - TableName: "vaults", - Item: vault, - }; - await db - .put(params) - .promise() - .catch((err) => console.log("err", err)); + await db.add(vault).catch((err) => console.log('err', err)); console.log(`Saved ${vault.name}`); }; -module.exports.handler = async (event) => { +module.exports.handler = async (res) => { const registryContract = new web3.eth.Contract( yRegistryAbi, yRegistryAddress @@ -151,13 +145,8 @@ module.exports.handler = async (event) => { vaults.push(vault); } - const response = { - statusCode: 200, - headers: { - "Access-Control-Allow-Origin": "*", - "Access-Control-Allow-Credentials": true, - }, - body: JSON.stringify(vaults), - }; - return response; + res.status(200).json({ + message: '', + body: vaults + }) }; diff --git a/utils/api.js b/utils/api.js new file mode 100644 index 0000000..bbe4cec --- /dev/null +++ b/utils/api.js @@ -0,0 +1,22 @@ +const axios = require('axios'); + +const pushSlackErrorAlert = (method, url, err) => { + const requestBody = { + text: url !== "" ? `API Error - ${err}\nMethod - ${method}\nSource <${url}|${url}>` : `API Error - ${err}\nMethod - ${method}` + }; + + const request = { + method: "post", + url: "https://hooks.slack.com/services/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", + headers: { + "Content-Type": "application/json" + }, + data: requestBody + }; + axios(request) +}; + +module.exports = +{ + pushSlackErrorAlert +}; \ No newline at end of file From 4ed05690bc5f03e8e5e1eb45fab41dba6e8f034f Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Thu, 26 Nov 2020 06:06:51 +0800 Subject: [PATCH 002/254] Hide slack hook URL --- .env.example | 1 + app.js | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index a0f88eb..419622f 100644 --- a/.env.example +++ b/.env.example @@ -2,6 +2,7 @@ SUBGRAPH_ENDPOINT = https://api.thegraph.com/subgraphs/name/rrridges-crypto/year WEB3_ENDPOINT = https://mainnet.infura.io/v3/4f8bf400ab354820998e6dfdea0a1b78 ARCHIVENODE_ENDPOINT = https://api.archivenode.io/93mwpmy684fb0dc3c0q93mwpmwlssf6a ETHERSCAN_API_KEY = GEQXZDY67RZ4QHNU1A57QVPNDV3RP1RYH4 +SLACK_HOOK_URL = AWS_ACCESS_KEY_ID = AKIA2FCIA3THEGVNNLSN AWS_SECRET_ACCESS_KEY = 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 diff --git a/app.js b/app.js index 5b8696d..a36111e 100644 --- a/app.js +++ b/app.js @@ -7,6 +7,7 @@ const userTransactions = require('./services/user/vaults/transactions/handler'); const vaultSave = require('./services/vaults/save/handler'); const app = express(); const port = process.env.PORT || 8080; +const jobs = require('./jobs/task'); async function init() { // Improve debugging @@ -16,13 +17,16 @@ async function init() { db.connectDB(async (err) => { if (err) throw err; + + jobs.saveVault(); + jobs.saveVaultAPY(); }) // TODO Run Cron Job everyday 00:00 (Save Vault APY, Save Vault, Add Price Updated and store into database) app.get('/vaults/apy', (req, res) => vaultsApy.handler(res)); - app.get('/vaults/apy/save', (req, res) => vaultApySave.handler(res)); - app.get('/vaults/save', (req, res) => vaultSave.handler(res)); + // app.get('/vaults/apy/save', (req, res) => vaultApySave.handler(res)); + // app.get('/vaults/save', (req, res) => vaultSave.handler(res)); app.get('/user/:userAddress/vaults/statistics', (req, res) => userStatistics.handler(req, res)); app.get('/user/:userAddress/vaults/tranasctions', (req, res) => userTransactions.handler(req, res)); From d889b14fdf134f6c0a1ab11e78708a9c59b48d75 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Thu, 26 Nov 2020 06:07:51 +0800 Subject: [PATCH 003/254] Added database configuration environment --- .env.example | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.env.example b/.env.example index 419622f..7e1641c 100644 --- a/.env.example +++ b/.env.example @@ -7,3 +7,11 @@ SLACK_HOOK_URL = AWS_ACCESS_KEY_ID = AKIA2FCIA3THEGVNNLSN AWS_SECRET_ACCESS_KEY = eORUabA7s4qecne/1h/kyRO2czJj8U/uu1i0OUzF AWS_DEFAULT_REGION = us-east-1 + +MONGO_USERNAME= +MONGO_PASSWORD= +MONGO_HOSTNAME= +MONGO_PORT= +MONGO_DB= +PRODUCTION= +AUTH_MECHANISM= From 9c1ebc569861fa1ec95cad0a2348b9d86b1cdff5 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Mon, 30 Nov 2020 15:41:00 +0800 Subject: [PATCH 004/254] - Added backend API --- app.js | 15 +- config/abi.js | 558 +++++++++++++++++++ config/db.js | 1 + config/serverless/domain.js | 13 +- jobs/task.js | 57 ++ models/historical-apy.model.js | 31 ++ models/price.model.js | 31 ++ package.json | 1 + services/user/vaults/statistics/handler.js | 40 +- services/user/vaults/transactions/handler.js | 40 +- services/vaults/apy/save/handler.js | 131 ++++- services/vaults/apy/save/vaults.js | 490 ++++++++-------- services/vaults/price/handler.js | 95 ++++ services/vaults/save/handler.js | 7 +- utils/api.js | 2 +- 15 files changed, 1224 insertions(+), 288 deletions(-) create mode 100644 jobs/task.js create mode 100644 models/historical-apy.model.js create mode 100644 models/price.model.js create mode 100644 services/vaults/price/handler.js diff --git a/app.js b/app.js index a36111e..9949d03 100644 --- a/app.js +++ b/app.js @@ -1,11 +1,12 @@ const express = require('express'); const db = require('./config/db') const vaultsApy = require('./services/vaults/apy/handler'); -const vaultApySave = require('./services/vaults/apy/save/handler'); const userStatistics = require('./services/user/vaults/statistics/handler'); const userTransactions = require('./services/user/vaults/transactions/handler'); -const vaultSave = require('./services/vaults/save/handler'); +const vaultsPrice = require('./services/vaults/price/handler'); +const vaultAPYSave = require('./services/vaults/apy/save/handler'); const app = express(); +const cors = require('cors') const port = process.env.PORT || 8080; const jobs = require('./jobs/task'); @@ -20,15 +21,17 @@ async function init() { jobs.saveVault(); jobs.saveVaultAPY(); + jobs.savePricePerFullShare(); + jobs.saveAPY(); }) - // TODO Run Cron Job everyday 00:00 (Save Vault APY, Save Vault, Add Price Updated and store into database) + app.use(cors()); app.get('/vaults/apy', (req, res) => vaultsApy.handler(res)); - // app.get('/vaults/apy/save', (req, res) => vaultApySave.handler(res)); - // app.get('/vaults/save', (req, res) => vaultSave.handler(res)); app.get('/user/:userAddress/vaults/statistics', (req, res) => userStatistics.handler(req, res)); - app.get('/user/:userAddress/vaults/tranasctions', (req, res) => userTransactions.handler(req, res)); + app.get('/user/:userAddress/vaults/transactions', (req, res) => userTransactions.handler(req, res)); + app.get('/vaults/price/:contractAddress/:days', (req, res) => vaultsPrice.handleHistoricialPrice(req, res)); + app.get('/vaults/historical-apy/:contractAddress/:days', (req, res) => vaultAPYSave.handleHistoricialAPY(req, res)); app.listen(port, () => console.log(`Listening on ${port}`)); }; diff --git a/config/abi.js b/config/abi.js index a0d871e..7a982aa 100644 --- a/config/abi.js +++ b/config/abi.js @@ -1326,8 +1326,566 @@ const yfUSDTABIContract = [ }, ]; +const aggregatedContractABI = [ + { + inputs: [], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + constant: true, + inputs: [], + name: "APR", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "UNI", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "UNIAPR", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "UNIROI", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "aave", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "aaveUni", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "token", type: "address" }, + { internalType: "address", name: "aToken", type: "address" }, + ], + name: "addAToken", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "token", type: "address" }, + { internalType: "address", name: "aToken", type: "address" }, + ], + name: "addAUniToken", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "token", type: "address" }, + { internalType: "address", name: "cToken", type: "address" }, + ], + name: "addCToken", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "token", type: "address" }, + { internalType: "uint256", name: "dToken", type: "uint256" }, + ], + name: "addDToken", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "token", type: "address" }, + { internalType: "address", name: "iToken", type: "address" }, + ], + name: "addIToken", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "token", type: "address" }, + { internalType: "uint256", name: "created", type: "uint256" }, + ], + name: "addPool", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "compound", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "dydx", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "fulcrum", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [{ internalType: "address", name: "_token", type: "address" }], + name: "getAPROptions", + outputs: [ + { internalType: "uint256", name: "uniapr", type: "uint256" }, + { internalType: "uint256", name: "capr", type: "uint256" }, + { internalType: "uint256", name: "unicapr", type: "uint256" }, + { internalType: "uint256", name: "iapr", type: "uint256" }, + { internalType: "uint256", name: "uniiapr", type: "uint256" }, + { internalType: "uint256", name: "aapr", type: "uint256" }, + { internalType: "uint256", name: "uniaapr", type: "uint256" }, + { internalType: "uint256", name: "dapr", type: "uint256" }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getBAT", + outputs: [ + { internalType: "uint256", name: "uniapr", type: "uint256" }, + { internalType: "uint256", name: "capr", type: "uint256" }, + { internalType: "uint256", name: "unicapr", type: "uint256" }, + { internalType: "uint256", name: "iapr", type: "uint256" }, + { internalType: "uint256", name: "uniiapr", type: "uint256" }, + { internalType: "uint256", name: "aapr", type: "uint256" }, + { internalType: "uint256", name: "uniaapr", type: "uint256" }, + { internalType: "uint256", name: "dapr", type: "uint256" }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getDAI", + outputs: [ + { internalType: "uint256", name: "uniapr", type: "uint256" }, + { internalType: "uint256", name: "capr", type: "uint256" }, + { internalType: "uint256", name: "unicapr", type: "uint256" }, + { internalType: "uint256", name: "iapr", type: "uint256" }, + { internalType: "uint256", name: "uniiapr", type: "uint256" }, + { internalType: "uint256", name: "aapr", type: "uint256" }, + { internalType: "uint256", name: "uniaapr", type: "uint256" }, + { internalType: "uint256", name: "dapr", type: "uint256" }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getETH", + outputs: [ + { internalType: "uint256", name: "uniapr", type: "uint256" }, + { internalType: "uint256", name: "capr", type: "uint256" }, + { internalType: "uint256", name: "unicapr", type: "uint256" }, + { internalType: "uint256", name: "iapr", type: "uint256" }, + { internalType: "uint256", name: "uniiapr", type: "uint256" }, + { internalType: "uint256", name: "aapr", type: "uint256" }, + { internalType: "uint256", name: "uniaapr", type: "uint256" }, + { internalType: "uint256", name: "dapr", type: "uint256" }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getKNC", + outputs: [ + { internalType: "uint256", name: "uniapr", type: "uint256" }, + { internalType: "uint256", name: "capr", type: "uint256" }, + { internalType: "uint256", name: "unicapr", type: "uint256" }, + { internalType: "uint256", name: "iapr", type: "uint256" }, + { internalType: "uint256", name: "uniiapr", type: "uint256" }, + { internalType: "uint256", name: "aapr", type: "uint256" }, + { internalType: "uint256", name: "uniaapr", type: "uint256" }, + { internalType: "uint256", name: "dapr", type: "uint256" }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getLINK", + outputs: [ + { internalType: "uint256", name: "uniapr", type: "uint256" }, + { internalType: "uint256", name: "capr", type: "uint256" }, + { internalType: "uint256", name: "unicapr", type: "uint256" }, + { internalType: "uint256", name: "iapr", type: "uint256" }, + { internalType: "uint256", name: "uniiapr", type: "uint256" }, + { internalType: "uint256", name: "aapr", type: "uint256" }, + { internalType: "uint256", name: "uniaapr", type: "uint256" }, + { internalType: "uint256", name: "dapr", type: "uint256" }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getMKR", + outputs: [ + { internalType: "uint256", name: "uniapr", type: "uint256" }, + { internalType: "uint256", name: "capr", type: "uint256" }, + { internalType: "uint256", name: "unicapr", type: "uint256" }, + { internalType: "uint256", name: "iapr", type: "uint256" }, + { internalType: "uint256", name: "uniiapr", type: "uint256" }, + { internalType: "uint256", name: "aapr", type: "uint256" }, + { internalType: "uint256", name: "uniaapr", type: "uint256" }, + { internalType: "uint256", name: "dapr", type: "uint256" }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getREP", + outputs: [ + { internalType: "uint256", name: "uniapr", type: "uint256" }, + { internalType: "uint256", name: "capr", type: "uint256" }, + { internalType: "uint256", name: "unicapr", type: "uint256" }, + { internalType: "uint256", name: "iapr", type: "uint256" }, + { internalType: "uint256", name: "uniiapr", type: "uint256" }, + { internalType: "uint256", name: "aapr", type: "uint256" }, + { internalType: "uint256", name: "uniaapr", type: "uint256" }, + { internalType: "uint256", name: "dapr", type: "uint256" }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getSNX", + outputs: [ + { internalType: "uint256", name: "uniapr", type: "uint256" }, + { internalType: "uint256", name: "capr", type: "uint256" }, + { internalType: "uint256", name: "unicapr", type: "uint256" }, + { internalType: "uint256", name: "iapr", type: "uint256" }, + { internalType: "uint256", name: "uniiapr", type: "uint256" }, + { internalType: "uint256", name: "aapr", type: "uint256" }, + { internalType: "uint256", name: "uniaapr", type: "uint256" }, + { internalType: "uint256", name: "dapr", type: "uint256" }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getSUSD", + outputs: [ + { internalType: "uint256", name: "uniapr", type: "uint256" }, + { internalType: "uint256", name: "capr", type: "uint256" }, + { internalType: "uint256", name: "unicapr", type: "uint256" }, + { internalType: "uint256", name: "iapr", type: "uint256" }, + { internalType: "uint256", name: "uniiapr", type: "uint256" }, + { internalType: "uint256", name: "aapr", type: "uint256" }, + { internalType: "uint256", name: "uniaapr", type: "uint256" }, + { internalType: "uint256", name: "dapr", type: "uint256" }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getUSDC", + outputs: [ + { internalType: "uint256", name: "uniapr", type: "uint256" }, + { internalType: "uint256", name: "capr", type: "uint256" }, + { internalType: "uint256", name: "unicapr", type: "uint256" }, + { internalType: "uint256", name: "iapr", type: "uint256" }, + { internalType: "uint256", name: "uniiapr", type: "uint256" }, + { internalType: "uint256", name: "aapr", type: "uint256" }, + { internalType: "uint256", name: "uniaapr", type: "uint256" }, + { internalType: "uint256", name: "dapr", type: "uint256" }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getUSDT", + outputs: [ + { internalType: "uint256", name: "uniapr", type: "uint256" }, + { internalType: "uint256", name: "capr", type: "uint256" }, + { internalType: "uint256", name: "unicapr", type: "uint256" }, + { internalType: "uint256", name: "iapr", type: "uint256" }, + { internalType: "uint256", name: "uniiapr", type: "uint256" }, + { internalType: "uint256", name: "aapr", type: "uint256" }, + { internalType: "uint256", name: "uniaapr", type: "uint256" }, + { internalType: "uint256", name: "dapr", type: "uint256" }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getWBTC", + outputs: [ + { internalType: "uint256", name: "uniapr", type: "uint256" }, + { internalType: "uint256", name: "capr", type: "uint256" }, + { internalType: "uint256", name: "unicapr", type: "uint256" }, + { internalType: "uint256", name: "iapr", type: "uint256" }, + { internalType: "uint256", name: "uniiapr", type: "uint256" }, + { internalType: "uint256", name: "aapr", type: "uint256" }, + { internalType: "uint256", name: "uniaapr", type: "uint256" }, + { internalType: "uint256", name: "dapr", type: "uint256" }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getZRX", + outputs: [ + { internalType: "uint256", name: "uniapr", type: "uint256" }, + { internalType: "uint256", name: "capr", type: "uint256" }, + { internalType: "uint256", name: "unicapr", type: "uint256" }, + { internalType: "uint256", name: "iapr", type: "uint256" }, + { internalType: "uint256", name: "uniiapr", type: "uint256" }, + { internalType: "uint256", name: "aapr", type: "uint256" }, + { internalType: "uint256", name: "uniaapr", type: "uint256" }, + { internalType: "uint256", name: "dapr", type: "uint256" }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "inCaseETHGetsStuck", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "contract IERC20", + name: "_TokenAddress", + type: "address", + }, + ], + name: "inCaseTokenGetsStuck", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "isOwner", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "owner", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "pools", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "renounceOwnership", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "address", name: "_new_APR", type: "address" }], + name: "set_new_APR", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "address", name: "_new_UNI", type: "address" }], + name: "set_new_UNI", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "_new_UNIAPR", type: "address" }, + ], + name: "set_new_UNIAPR", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "_new_UNIROI", type: "address" }, + ], + name: "set_new_UNIROI", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "address", name: "newOwner", type: "address" }], + name: "transferOwnership", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [{ internalType: "address", name: "_token", type: "address" }], + name: "viewPool", + outputs: [ + { internalType: "address", name: "token", type: "address" }, + { internalType: "address", name: "unipool", type: "address" }, + { internalType: "uint256", name: "created", type: "uint256" }, + { internalType: "string", name: "name", type: "string" }, + { internalType: "string", name: "symbol", type: "string" }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, +]; + module.exports = { earnABIContract, vaultABIContract, yfUSDTABIContract, + aggregatedContractABI, }; diff --git a/config/db.js b/config/db.js index 904f90d..d973952 100644 --- a/config/db.js +++ b/config/db.js @@ -14,6 +14,7 @@ const connectDB = async (callback) => { var url = ''; if (process.env.PRODUCTION != null && process.env.PRODUCTION != '') { url = `mongodb://${encodeURIComponent(MONGO_USERNAME)}:${encodeURIComponent(MONGO_PASSWORD)}@${MONGO_HOSTNAME}:${MONGO_PORT}/${MONGO_DB}?authMechanism=${AUTH_MECHANISM}`; + // url = `mongodb://${MONGO_HOSTNAME}`; } else { url = `mongodb://${MONGO_HOSTNAME}`; } diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 735dcc7..830b124 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -27,23 +27,26 @@ module.exports.dev = () => { }); }; -const devEarnContract = "0x431691E15b74279c8FADCdD4c92bAe16E72DbbEF"; -const devVaultContract = "0x7Cc77422B3EE0fd6c1544A9893802801Ba62C6eB"; -const devYfUSDTContract = "0x4f6C84ed8bE874431e727881bF2D48C9BCB0228D"; +const devEarnContract = "0xCBc690078c24a57fE7D95c61989c722712DCd3f9"; +const devVaultContract = "0x99dd34943c741E17EB772041cd3D7E8d317FA92f"; +const devYfUSDTContract = "0x9680CF4CfED6Cf04eF0Eeb513c2399c192D0c0B0"; const prodEarnContract = "0xe6354ed5bc4b393a5aad09f21c46e101e692d447"; const prodVaultContract = "0x2f08119c6f07c006695e079aafc638b8789faf18"; const prodYfUSDTContract = "0xE8c9F440677bDC8bA915734e6c7C1b232916877d"; +const aggregatedContractAddress = "0x9cad8ab10daa9af1a9d2b878541f41b697268eec"; module.exports.devContract = { devEarnContract, devVaultContract, - devYfUSDTContract + devYfUSDTContract, + aggregatedContractAddress }; module.exports.prodContract = { prodEarnContract, prodVaultContract, - prodYfUSDTContract + prodYfUSDTContract, + aggregatedContractAddress } diff --git a/jobs/task.js b/jobs/task.js new file mode 100644 index 0000000..08704a9 --- /dev/null +++ b/jobs/task.js @@ -0,0 +1,57 @@ +const cron = require('node-cron'); +const vaultApySave = require('../services/vaults/apy/save/handler'); +const vaultSave = require('../services/vaults/save/handler'); +const priceSave = require('../services/vaults/price/handler'); + +/** Save Vault APY */ +const saveVaultAPY = async () => { + await vaultApySave.handler(); + cron.schedule('0 0 0 * * *', async () => { + console.log('[saveVaultAPY]'); + await vaultApySave.handler(); + }, { + scheduled: true, + timezone: "Etc/UTC" // UTC +0 + }) +} + +/** Save Vault **/ +const saveVault = async () => { + await vaultSave.handler(); + cron.schedule('0 0 0 * * *', async () => { + console.log('[saveVault]'); + await vaultSave.handler(); + }, { + scheduled: true, + timezone: "Etc/UTC" // UTC +0 + }) +} + +/** Store getPricePerFullShare */ +const savePricePerFullShare = async () => { + await priceSave.handler(); + cron.schedule('*/5 * * * *', async () => { + console.log('[savePricePerFullShare]', new Date().getTime()); + await priceSave.handler(); + }, { + scheduled: true + }) +} + +/** Store APY */ +const saveAPY = async () => { + await vaultApySave.saveHandler(); + cron.schedule('*/5 * * * *', async () => { + console.log('[saveAPY]', new Date().getTime()); + await vaultApySave.saveHandler(); + }, { + scheduled: true + }) +} + +module.exports = { + saveVaultAPY, + saveVault, + savePricePerFullShare, + saveAPY +} \ No newline at end of file diff --git a/models/historical-apy.model.js b/models/historical-apy.model.js new file mode 100644 index 0000000..1ed8cac --- /dev/null +++ b/models/historical-apy.model.js @@ -0,0 +1,31 @@ +const mongo = require('../config/db'); +const collection = 'historical-apy'; + +const findAll = async () => { + const db = mongo.getDB(); + return await db.collection(collection).find({}).toArray(); +}; + +const findWithTimePeriods = async (startTime, endTime) => { + const db = mongo.getDB(); + return await db.collection(collection).find({ + timestamp: { + $gte: startTime, + $lte: endTime + } + }).toArray(); +} + +const add = async (params) => { + const db = mongo.getDB(); + Object.assign(params, { + timestamp: new Date().getTime() + }) + return await db.collection(collection).insertOne(params); +} + +module.exports = { + findAll, + findWithTimePeriods, + add +}; \ No newline at end of file diff --git a/models/price.model.js b/models/price.model.js new file mode 100644 index 0000000..f8912bd --- /dev/null +++ b/models/price.model.js @@ -0,0 +1,31 @@ +const mongo = require('../config/db'); +const collection = 'yfUSDT_price'; + +const findAll = async () => { + const db = mongo.getDB(); + return await db.collection(collection).find({}).toArray(); +}; + +const findPriceWithTimePeriods = async (startTime, endTime) => { + const db = mongo.getDB(); + return await db.collection(collection).find({ + timestamp: { + $gte: startTime, + $lte: endTime + } + }).toArray(); +} + +const add = async (params) => { + const db = mongo.getDB(); + Object.assign(params, { + timestamp: new Date().getTime() + }) + return await db.collection(collection).insertOne(params); +} + +module.exports = { + findAll, + findPriceWithTimePeriods, + add +}; \ No newline at end of file diff --git a/package.json b/package.json index 2c4332f..ae1db25 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "dependencies": { "axios": "^0.21.0", "bignumber": "^1.1.0", + "cors": "^2.8.5", "delay": "^4.4.0", "dotenv": "^8.2.0", "express": "^4.17.1", diff --git a/services/user/vaults/statistics/handler.js b/services/user/vaults/statistics/handler.js index 801af6b..b9362c0 100644 --- a/services/user/vaults/statistics/handler.js +++ b/services/user/vaults/statistics/handler.js @@ -37,21 +37,33 @@ const getDepositedShares = async (vaultContract, userAddress) => { return balance; }; -const getPricePerFullShare = async (vaultContract) => { - const pricePerFullShare = await vaultContract.methods +const getPricePerFullShare = async (contract) => { + const pricePerFullShare = await contract.methods .getPricePerFullShare() .call(); return pricePerFullShare; }; +const getBalanceOf = async (contract, address) => { + const balance = await contract.methods + .balanceOf(address) + .call(); + return balance; +}; + +const getTotalSupply = async (contract) => { + const totalSupply = await contract.methods + .totalSupply() + .call(); + return totalSupply; +}; + const getVaultStatistics = async (contractAddress, transactions, userAddress) => { const findVault = (vault) => { - console.log('vault', JSON.stringify(vault)); return vault.vaultAddress.toLowerCase() === contractAddress; } const transactionsForVault = _.find(transactions, findVault); - console.log('contractAddress', contractAddress); let earnAddress = ""; let vaultAddress = ""; @@ -74,7 +86,12 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => const depositedShares = await getDepositedShares(farmerContract, userAddress); const earnPricePerFullShare = await getPricePerFullShare(earnContract); const vaultPricePerFullShare = await getPricePerFullShare(vaultContract); - const pricePerFullShare = earnPricePerFullShare + vaultPricePerFullShare / 2; + const earnBalance = await getBalanceOf(earnContract, yfUSDTAddress); + const vaultBalance = await getBalanceOf(vaultContract, yfUSDTAddress); + const totalSupply = await getTotalSupply(farmerContract, yfUSDTAddress); + const pricePerFullShare = (new BigNumber(earnPricePerFullShare).times(new BigNumber(earnBalance)) + .plus(new BigNumber(vaultPricePerFullShare).times(new BigNumber(vaultBalance)))) + .dividedBy(new BigNumber(totalSupply)); const depositedAmount = new BigNumber(depositedShares) .times(pricePerFullShare) @@ -111,7 +128,7 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => .plus(totalTransferredOut); const statistics = { - vaultAddress, + contractAddress: yfUSDTAddress, totalDeposits: totalDeposits.toFixed(), totalWithdrawals: totalWithdrawals.toFixed(), totalTransferredIn: totalTransferredIn.toFixed(), @@ -136,7 +153,7 @@ const getVaultsStatistics = async (userAddress) => { return vaultsStatistics; }; -module.exports.handler = async (req, res) => { +const handler = async (req, res) => { const userAddress = req.params.userAddress || ''; if (userAddress === '') { res.status(200).json({ @@ -173,4 +190,11 @@ function getMinimalVaultABI() { ]; } -module.exports.getVaultsStatistics = getVaultsStatistics; +module.exports = { + getVaultsStatistics, + getContract, + getPricePerFullShare, + getBalanceOf, + getTotalSupply, + handler +} diff --git a/services/user/vaults/transactions/handler.js b/services/user/vaults/transactions/handler.js index 2245b50..02f6f41 100644 --- a/services/user/vaults/transactions/handler.js +++ b/services/user/vaults/transactions/handler.js @@ -21,6 +21,24 @@ module.exports.handler = async (req, res) => { }); } else { const transactions = await getTransactions(userAddress); + const contentMapping = (data) => { + data.contractAddress = data.vaultAddress; + delete data.vaultAddress; + + const transactionMapping = (tx) => { + delete tx.transaction; + tx.timestamp = Number(tx.timestamp); + return tx; + } + + data.deposits.map(transactionMapping); + data.withdrawals.map(transactionMapping); + data.transfersIn.map(transactionMapping); + data.transfersOut.map(transactionMapping); + return data; + } + + transactions.map(contentMapping); res.status(200).json({ message: '', body: transactions @@ -121,7 +139,7 @@ const getGraphTransactions = async (userAddress) => { method: "POST", body: JSON.stringify({ query }), }); - + const responseJson = await response.json(); const graphTransactions = responseJson.data; return graphTransactions; @@ -175,17 +193,17 @@ const getTransactions = async (userAddress) => { const graphTransactions = await getGraphTransactions(userAddress); let { deposits, withdrawals, transfersIn, transfersOut } = graphTransactions; - const injectAmountIntoTransfer = (transfer) => { - const amount = (transfer.balance * transfer.shares) / transfer.totalSupply; - const newTransfer = { - ...transfer, - amount, - }; - return newTransfer; - }; + // const injectAmountIntoTransfer = (transfer) => { + // const amount = (transfer.balance * transfer.shares) / transfer.totalSupply; + // const newTransfer = { + // ...transfer, + // amount, + // }; + // return newTransfer; + // }; - transfersIn = transfersIn.map(injectAmountIntoTransfer); - transfersOut = transfersOut.map(injectAmountIntoTransfer); + // transfersIn = transfersIn.map(injectAmountIntoTransfer); + // transfersOut = transfersOut.map(injectAmountIntoTransfer); // Get all the vaults the address has interacted with. const vaultAddresses = getVaultAddressesForUserWithGraphTransactions( diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index 8945dd8..187f6ac 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -2,6 +2,7 @@ require("dotenv").config(); const AWS = require("aws-sdk"); // const db = new AWS.DynamoDB.DocumentClient({ apiVersion: "2012-08-10" }); const db = require('../../../../models/apy.model'); +const historicalDb = require('../../../../models/historical-apy.model'); const Web3 = require("web3"); const moment = require("moment"); const delay = require("delay"); @@ -15,6 +16,8 @@ const infuraUrl = process.env.WEB3_ENDPOINT; const archiveNodeWeb3 = new Web3(archiveNodeUrl); const infuraWeb3 = new Web3(infuraUrl); const blocks = new EthDater(archiveNodeWeb3, delayTime); +const { aggregatedContractABI } = require('../../../../config/abi'); +const { devContract, prodContract } = require('../../../../config/serverless/domain'); let currentBlockNbr; let oneDayAgoBlock; @@ -56,6 +59,10 @@ const saveVault = async (data) => { console.log(`Saved ${data.name}`); }; +const saveHistoricalAPY = async (data) => { + await historicalDb.add(data).catch((err) => console.log('err', err)); +}; + const getApy = async ( previousValue, currentValue, @@ -247,6 +254,14 @@ const getLoanscanApyForVault = async (vault) => { ); }; +const getHistoricalAPY = async (startTime, contractAddress) => { + var result = []; + if (contractAddress == devContract.devYfUSDTContract || contractAddress == prodContract.prodYfUSDTContract) { + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime()) + } + return result; +} + const readVault = async (vault) => { const { name, @@ -281,7 +296,50 @@ const readVault = async (vault) => { return data; }; -module.exports.handler = async (res) => { +const saveAndReadVault = async (vault) => { + const { + name, + symbol, + description, + vaultSymbol, + vaultContractABI: abi, + vaultContractAddress: address, + erc20address: tokenAddress, + } = vault; + console.log(`Reading vault ${vault.name}`); + if (!abi || !address) { + console.log(`Vault ABI not found: ${name}`); + return null; + } + const apy = await getApyForVault(vault); + const aprContract = new infuraWeb3.eth.Contract(aggregatedContractABI, prodContract.aggregatedContractAddress); + var call = 'getAPROptions';//+asset.symbol + var aprs = 0; + aprs = await aprContract.methods[call](vault.erc20address).call(); + + const keys = Object.keys(aprs) + const workKeys = keys.filter((key) => { + return isNaN(key) + }) + const maxApr = Math.max.apply(Math, workKeys.map(function(o) { + if(o === 'uniapr' || o === 'unicapr' || o === "iapr") { + return aprs[o]-100000000000000000000 + } + return aprs[o]; + })) + + aprs = infuraWeb3.utils.fromWei(maxApr.toFixed(0), 'ether') + console.log("Vault: ", name, apy); + const data = { + ...apy, + aprs, + symbol + }; + await saveHistoricalAPY(data); + return data; +}; + +module.exports.saveHandler = async () => { console.log("Fetching historical blocks"); currentBlockNbr = await infuraWeb3.eth.getBlockNumber(); await delay(delayTime); @@ -294,15 +352,76 @@ module.exports.handler = async (res) => { const vaultsWithApy = []; for (const vault of vaults) { - const vaultWithApy = await readVault(vault); + const vaultWithApy = await saveAndReadVault(vault); if (vaultWithApy !== null) { vaultsWithApy.push(vaultWithApy); } await delay(delayTime); } +} + +module.exports.handleHistoricialAPY = async (req, res) => { + if (req.params.days == null || req.params.days == '') { + res.status(200).json({ + message: 'Days is empty.', + body: null + }); + } else if (req.params.contractAddress == null || req.params.contractAddress == '') { + res.status(200).json({ + message: 'Contract Address is empty.', + body: null + }); + } else { + var startTime = -1; + switch (req.params.days) { + case '30d': + startTime = moment().subtract(30, 'days'); + break; + case '7d': + startTime = moment().subtract(7, 'days'); + break; + case '1d': + startTime = moment().subtract(1, 'days'); + break; + } + + if (startTime !== -1) { + var result = await getHistoricalAPY(startTime.unix(), req.params.contractAddress); + const resultMapping = (apy) => { + delete apy._id; + return apy; + }; + result = result.map(resultMapping); + res.status(200).json({ + message: '', + body: result + }) + } else { + res.status(200).json({ + message: "Please only pass '30d', '7d' or '1d' as days option.", + body: null + }) + } + } +} - return res.status(200).json({ - message: '', - body: vaultsWithApy - }); +module.exports.handler = async () => { + console.log("Fetching historical blocks"); + currentBlockNbr = await infuraWeb3.eth.getBlockNumber(); + await delay(delayTime); + oneDayAgoBlock = (await blocks.getDate(oneDayAgo)).block; + threeDaysAgoBlock = (await blocks.getDate(threeDaysAgo)).block; + oneWeekAgoBlock = (await blocks.getDate(oneWeekAgo)).block; + oneMonthAgoBlock = (await blocks.getDate(oneMonthAgo)).block; + nbrBlocksInDay = currentBlockNbr - oneDayAgoBlock; + console.log("Done fetching historical blocks"); + + const vaultsWithApy = []; + for (const vault of vaults) { + const vaultWithApy = await readVault(vault); + if (vaultWithApy !== null) { + vaultsWithApy.push(vaultWithApy); + } + await delay(delayTime); + } }; diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 2ee3cda..1238a42 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -1,210 +1,210 @@ const config = require("./config.js"); module.exports = [ - { - id: "3Crv", - name: "curve.fi/3pool LP", - symbol: "3Crv", - description: "yDAI/yUSDC/yUSDT", - vaultSymbol: "y3Crv", - erc20address: "0x6c3f90f043a72fa612cbac8115ee7e52bde6e490", - vaultContractAddress: "0x9cA85572E6A3EbF24dEDd195623F188735A5179f", - vaultContractABI: config.vaultContractV5ABI, - balance: 0, - vaultBalance: 0, - decimals: 18, - deposit: true, - depositAll: true, - withdraw: true, - withdrawAll: true, - lastMeasurement: 11039340, - measurement: 1e18, - depositDisabled: false, - price_id: "curve-fi-ydai-yusdc-yusdt-ytusd", // TODO: Update this when Coingecko adds token - }, - { - id: "ETH", - name: "ETH", - symbol: "ETH", - description: "Ether", - vaultSymbol: "yETH", - erc20address: "Ethereum", - vaultContractAddress: "0xe1237aA7f535b0CC33Fd973D66cBf830354D16c7", - vaultContractABI: config.vaultContractV4ABI, - balance: 0, - vaultBalance: 0, - decimals: 18, - deposit: true, - depositAll: false, - withdraw: true, - withdrawAll: true, - lastMeasurement: 10774489, - measurement: 1e18, - depositDisabled: true, - price_id: "ethereum", - }, - { - id: "WETH", - name: "WETH", - symbol: "WETH", - description: "Wrappeth Ether", - vaultSymbol: "yWETH", - erc20address: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - vaultContractAddress: "0xe1237aA7f535b0CC33Fd973D66cBf830354D16c7", - vaultContractABI: config.vaultContractV4ABI, - balance: 0, - vaultBalance: 0, - decimals: 18, - deposit: true, - depositAll: true, - withdraw: true, - withdrawAll: true, - lastMeasurement: 10774489, - measurement: 1e18, - depositDisabled: true, - price_id: "ethereum", - }, - { - id: "YFI", - name: "yearn.finance", - symbol: "YFI", - description: "yearn.finance", - vaultSymbol: "yYFI", - erc20address: "0x0bc529c00c6401aef6d220be8c6ea1667f6ad93e", - vaultContractAddress: "0xBA2E7Fed597fd0E3e70f5130BcDbbFE06bB94fe1", - vaultContractABI: config.vaultContractV2ABI, - balance: 0, - vaultBalance: 0, - decimals: 18, - deposit: true, - depositAll: true, - withdraw: true, - withdrawAll: true, - lastMeasurement: 10695309, - measurement: 1e18, - price_id: "yearn-finance", - }, - { - id: "CRV", - name: "curve.fi/y LP", - symbol: "yCRV", - description: "yDAI/yUSDC/yUSDT/yTUSD", - vaultSymbol: "yUSD", - erc20address: "0xdf5e0e81dff6faf3a7e52ba697820c5e32d806a8", - vaultContractAddress: "0x5dbcF33D8c2E976c6b560249878e6F1491Bca25c", - vaultContractABI: config.vaultContractABI, - balance: 0, - vaultBalance: 0, - decimals: 18, - deposit: true, - depositAll: false, - withdraw: true, - withdrawAll: false, - lastMeasurement: 10559448, - measurement: 1e18, - price_id: "curve-fi-ydai-yusdc-yusdt-ytusd", - }, - { - id: "crvBUSD", - name: "curve.fi/busd LP", - symbol: "crvBUSD", - description: "yDAI/yUSDC/yUSDT/yBUSD", - vaultSymbol: "ycrvBUSD", - erc20address: "0x3B3Ac5386837Dc563660FB6a0937DFAa5924333B", - vaultContractAddress: "0x2994529c0652d127b7842094103715ec5299bbed", - vaultContractABI: config.vaultContractV3ABI, - balance: 0, - vaultBalance: 0, - decimals: 18, - deposit: true, - depositAll: true, - withdraw: true, - withdrawAll: true, - depositDisabled: false, - lastMeasurement: 10709740, - measurement: 1e18, - price_id: "lp-bcurve", - }, - { - id: "crvBTC", - name: "curve.fi/sbtc LP", - symbol: "crvBTC", - description: "renBTC/wBTC/sBTC", - vaultSymbol: "ycrvBTC", - erc20address: "0x075b1bb99792c9E1041bA13afEf80C91a1e70fB3", - vaultContractAddress: "0x7Ff566E1d69DEfF32a7b244aE7276b9f90e9D0f6", - vaultContractABI: config.vaultContractV3ABI, - balance: 0, - vaultBalance: 0, - decimals: 18, - deposit: true, - depositAll: true, - withdraw: true, - withdrawAll: true, - lastMeasurement: 10734341, - measurement: 1e18, - price_id: "lp-sbtc-curve", - }, - { - id: "DAI", - name: "DAI", - symbol: "DAI", - description: "DAI Stablecoin", - vaultSymbol: "yDAI", - erc20address: "0x6b175474e89094c44da98b954eedeac495271d0f", - vaultContractAddress: "0xACd43E627e64355f1861cEC6d3a6688B31a6F952", - vaultContractABI: config.vaultContractV2ABI, - balance: 0, - vaultBalance: 0, - decimals: 18, - deposit: true, - depositAll: true, - withdraw: true, - withdrawAll: true, - lastMeasurement: 10650116, - measurement: 1e18, - price_id: "dai", - }, - { - id: "TUSD", - name: "TUSD", - symbol: "TUSD", - description: "TrueUSD", - vaultSymbol: "yTUSD", - erc20address: "0x0000000000085d4780B73119b644AE5ecd22b376", - vaultContractAddress: "0x37d19d1c4E1fa9DC47bD1eA12f742a0887eDa74a", - vaultContractABI: config.vaultContractV2ABI, - balance: 0, - vaultBalance: 0, - decimals: 18, - deposit: true, - depositAll: true, - withdraw: true, - withdrawAll: true, - lastMeasurement: 10603368, - measurement: 1e18, - price_id: "true-usd", - }, - { - id: "USDC", - name: "USD Coin", - symbol: "USDC", - description: "USD//C", - vaultSymbol: "yUSDC", - erc20address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - vaultContractAddress: "0x597aD1e0c13Bfe8025993D9e79C69E1c0233522e", - vaultContractABI: config.vaultContractABI, - balance: 0, - vaultBalance: 0, - decimals: 6, - deposit: true, - depositAll: false, - withdraw: true, - withdrawAll: false, - lastMeasurement: 10532708, - measurement: 1e18, - price_id: "usd-coin", - }, + // { + // id: "3Crv", + // name: "curve.fi/3pool LP", + // symbol: "3Crv", + // description: "yDAI/yUSDC/yUSDT", + // vaultSymbol: "y3Crv", + // erc20address: "0x6c3f90f043a72fa612cbac8115ee7e52bde6e490", + // vaultContractAddress: "0x9cA85572E6A3EbF24dEDd195623F188735A5179f", + // vaultContractABI: config.vaultContractV5ABI, + // balance: 0, + // vaultBalance: 0, + // decimals: 18, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // lastMeasurement: 11039340, + // measurement: 1e18, + // depositDisabled: false, + // price_id: "curve-fi-ydai-yusdc-yusdt-ytusd", // TODO: Update this when Coingecko adds token + // }, + // { + // id: "ETH", + // name: "ETH", + // symbol: "ETH", + // description: "Ether", + // vaultSymbol: "yETH", + // erc20address: "Ethereum", + // vaultContractAddress: "0xe1237aA7f535b0CC33Fd973D66cBf830354D16c7", + // vaultContractABI: config.vaultContractV4ABI, + // balance: 0, + // vaultBalance: 0, + // decimals: 18, + // deposit: true, + // depositAll: false, + // withdraw: true, + // withdrawAll: true, + // lastMeasurement: 10774489, + // measurement: 1e18, + // depositDisabled: true, + // price_id: "ethereum", + // }, + // { + // id: "WETH", + // name: "WETH", + // symbol: "WETH", + // description: "Wrappeth Ether", + // vaultSymbol: "yWETH", + // erc20address: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + // vaultContractAddress: "0xe1237aA7f535b0CC33Fd973D66cBf830354D16c7", + // vaultContractABI: config.vaultContractV4ABI, + // balance: 0, + // vaultBalance: 0, + // decimals: 18, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // lastMeasurement: 10774489, + // measurement: 1e18, + // depositDisabled: true, + // price_id: "ethereum", + // }, + // { + // id: "YFI", + // name: "yearn.finance", + // symbol: "YFI", + // description: "yearn.finance", + // vaultSymbol: "yYFI", + // erc20address: "0x0bc529c00c6401aef6d220be8c6ea1667f6ad93e", + // vaultContractAddress: "0xBA2E7Fed597fd0E3e70f5130BcDbbFE06bB94fe1", + // vaultContractABI: config.vaultContractV2ABI, + // balance: 0, + // vaultBalance: 0, + // decimals: 18, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // lastMeasurement: 10695309, + // measurement: 1e18, + // price_id: "yearn-finance", + // }, + // { + // id: "CRV", + // name: "curve.fi/y LP", + // symbol: "yCRV", + // description: "yDAI/yUSDC/yUSDT/yTUSD", + // vaultSymbol: "yUSD", + // erc20address: "0xdf5e0e81dff6faf3a7e52ba697820c5e32d806a8", + // vaultContractAddress: "0x5dbcF33D8c2E976c6b560249878e6F1491Bca25c", + // vaultContractABI: config.vaultContractABI, + // balance: 0, + // vaultBalance: 0, + // decimals: 18, + // deposit: true, + // depositAll: false, + // withdraw: true, + // withdrawAll: false, + // lastMeasurement: 10559448, + // measurement: 1e18, + // price_id: "curve-fi-ydai-yusdc-yusdt-ytusd", + // }, + // { + // id: "crvBUSD", + // name: "curve.fi/busd LP", + // symbol: "crvBUSD", + // description: "yDAI/yUSDC/yUSDT/yBUSD", + // vaultSymbol: "ycrvBUSD", + // erc20address: "0x3B3Ac5386837Dc563660FB6a0937DFAa5924333B", + // vaultContractAddress: "0x2994529c0652d127b7842094103715ec5299bbed", + // vaultContractABI: config.vaultContractV3ABI, + // balance: 0, + // vaultBalance: 0, + // decimals: 18, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // depositDisabled: false, + // lastMeasurement: 10709740, + // measurement: 1e18, + // price_id: "lp-bcurve", + // }, + // { + // id: "crvBTC", + // name: "curve.fi/sbtc LP", + // symbol: "crvBTC", + // description: "renBTC/wBTC/sBTC", + // vaultSymbol: "ycrvBTC", + // erc20address: "0x075b1bb99792c9E1041bA13afEf80C91a1e70fB3", + // vaultContractAddress: "0x7Ff566E1d69DEfF32a7b244aE7276b9f90e9D0f6", + // vaultContractABI: config.vaultContractV3ABI, + // balance: 0, + // vaultBalance: 0, + // decimals: 18, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // lastMeasurement: 10734341, + // measurement: 1e18, + // price_id: "lp-sbtc-curve", + // }, + // { + // id: "DAI", + // name: "DAI", + // symbol: "DAI", + // description: "DAI Stablecoin", + // vaultSymbol: "yDAI", + // erc20address: "0x6b175474e89094c44da98b954eedeac495271d0f", + // vaultContractAddress: "0xACd43E627e64355f1861cEC6d3a6688B31a6F952", + // vaultContractABI: config.vaultContractV2ABI, + // balance: 0, + // vaultBalance: 0, + // decimals: 18, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // lastMeasurement: 10650116, + // measurement: 1e18, + // price_id: "dai", + // }, + // { + // id: "TUSD", + // name: "TUSD", + // symbol: "TUSD", + // description: "TrueUSD", + // vaultSymbol: "yTUSD", + // erc20address: "0x0000000000085d4780B73119b644AE5ecd22b376", + // vaultContractAddress: "0x37d19d1c4E1fa9DC47bD1eA12f742a0887eDa74a", + // vaultContractABI: config.vaultContractV2ABI, + // balance: 0, + // vaultBalance: 0, + // decimals: 18, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // lastMeasurement: 10603368, + // measurement: 1e18, + // price_id: "true-usd", + // }, + // { + // id: "USDC", + // name: "USD Coin", + // symbol: "USDC", + // description: "USD//C", + // vaultSymbol: "yUSDC", + // erc20address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + // vaultContractAddress: "0x597aD1e0c13Bfe8025993D9e79C69E1c0233522e", + // vaultContractABI: config.vaultContractABI, + // balance: 0, + // vaultBalance: 0, + // decimals: 6, + // deposit: true, + // depositAll: false, + // withdraw: true, + // withdrawAll: false, + // lastMeasurement: 10532708, + // measurement: 1e18, + // price_id: "usd-coin", + // }, { id: "USDT", name: "USDT", @@ -225,45 +225,45 @@ module.exports = [ measurement: 1e18, price_id: "tether", }, - { - id: "aLINK", - name: "aLINK", - symbol: "aLINK", - description: "Aave Interest bearing LINK", - vaultSymbol: "yaLINK", - erc20address: "0xA64BD6C70Cb9051F6A9ba1F163Fdc07E0DfB5F84", - vaultContractAddress: "0x29E240CFD7946BA20895a7a02eDb25C210f9f324", - vaultContractABI: config.vaultContractV2ABI, - balance: 0, - vaultBalance: 0, - decimals: 18, - deposit: true, - depositAll: true, - withdraw: true, - withdrawAll: true, - lastMeasurement: 10599617, - measurement: 1e18, - price_id: "aave-link", - }, - { - id: "LINK", - name: "ChainLink", - symbol: "LINK", - description: "ChainLink", - vaultSymbol: "yLINK", - erc20address: "0x514910771af9ca656af840dff83e8264ecf986ca", - vaultContractAddress: "0x881b06da56BB5675c54E4Ed311c21E54C5025298", - vaultContractABI: config.vaultContractV2ABI, - balance: 0, - vaultBalance: 0, - decimals: 18, - deposit: true, - depositAll: true, - withdraw: true, - withdrawAll: true, - depositDisabled: true, - lastMeasurement: 10604016, - measurement: 1e18, - price_id: "chainlink", - }, + // { + // id: "aLINK", + // name: "aLINK", + // symbol: "aLINK", + // description: "Aave Interest bearing LINK", + // vaultSymbol: "yaLINK", + // erc20address: "0xA64BD6C70Cb9051F6A9ba1F163Fdc07E0DfB5F84", + // vaultContractAddress: "0x29E240CFD7946BA20895a7a02eDb25C210f9f324", + // vaultContractABI: config.vaultContractV2ABI, + // balance: 0, + // vaultBalance: 0, + // decimals: 18, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // lastMeasurement: 10599617, + // measurement: 1e18, + // price_id: "aave-link", + // }, + // { + // id: "LINK", + // name: "ChainLink", + // symbol: "LINK", + // description: "ChainLink", + // vaultSymbol: "yLINK", + // erc20address: "0x514910771af9ca656af840dff83e8264ecf986ca", + // vaultContractAddress: "0x881b06da56BB5675c54E4Ed311c21E54C5025298", + // vaultContractABI: config.vaultContractV2ABI, + // balance: 0, + // vaultBalance: 0, + // decimals: 18, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // depositDisabled: true, + // lastMeasurement: 10604016, + // measurement: 1e18, + // price_id: "chainlink", + // }, ]; diff --git a/services/vaults/price/handler.js b/services/vaults/price/handler.js new file mode 100644 index 0000000..72bcf7c --- /dev/null +++ b/services/vaults/price/handler.js @@ -0,0 +1,95 @@ +"use strict" + +const { + devContract, + prodContract, +} = require('../../../config/serverless/domain'); +const earnABIContract = require('../../../config/abi').earnABIContract; +const vaultABIContract = require('../../../config/abi').vaultABIContract; +const { + getContract, + getPricePerFullShare +} = require('../../user/vaults/statistics/handler'); +const db = require('../../../models/price.model'); +const moment = require("moment"); + +const getCurrentPrice = async () => { + let earnAddress = ""; + let vaultAddress = ""; + + if (process.env.PRODUCTION != null && process.env.PRODUCTION != '') { + earnAddress = prodContract.prodEarnContract; + vaultAddress = prodContract.prodVaultContract; + } else { + earnAddress = devContract.devEarnContract; + vaultAddress = devContract.devVaultContract; + } + + + const earnContract = getContract(earnABIContract, earnAddress); + const vaultContract = getContract(vaultABIContract, vaultAddress); + + const earnPricePerFullShare = await getPricePerFullShare(earnContract); + const vaultPricePerFullShare = await getPricePerFullShare(vaultContract); + await db.add({ + earnPrice: earnPricePerFullShare, + vaultPrice: vaultPricePerFullShare, + }).catch((err) => console.log('err', err)); +} + +const getHistoricalPrice = async (startTime, contractAddress) => { + var result = []; + if (contractAddress == devContract.devYfUSDTContract || contractAddress == prodContract.prodYfUSDTContract) { + result = await db.findPriceWithTimePeriods(startTime, new Date().getTime()) + } + return result; +} + +module.exports.handler = async () => { + await getCurrentPrice(); +} + +module.exports.handleHistoricialPrice = async (req, res) => { + if (req.params.days == null || req.params.days == '') { + res.status(200).json({ + message: 'Days is empty.', + body: null + }); + } else if (req.params.contractAddress == null || req.params.contractAddress == '') { + res.status(200).json({ + message: 'Contract Address is empty.', + body: null + }); + } else { + var startTime = -1; + switch (req.params.days) { + case '30d': + startTime = moment().subtract(30, 'days'); + break; + case '7d': + startTime = moment().subtract(7, 'days'); + break; + case '1d': + startTime = moment().subtract(1, 'days'); + break; + } + + if (startTime !== -1) { + var result = await getHistoricalPrice(startTime.unix(), req.params.contractAddress); + const resultMapping = (price) => { + delete price._id; + return price; + }; + result = result.map(resultMapping); + res.status(200).json({ + message: '', + body: result + }) + } else { + res.status(200).json({ + message: "Please only pass '30d', '7d' or '1d' as days option.", + body: null + }) + } + } +} diff --git a/services/vaults/save/handler.js b/services/vaults/save/handler.js index a55a7eb..b5a8cb2 100644 --- a/services/vaults/save/handler.js +++ b/services/vaults/save/handler.js @@ -75,7 +75,7 @@ const saveVault = async (vault) => { console.log(`Saved ${vault.name}`); }; -module.exports.handler = async (res) => { +module.exports.handler = async () => { const registryContract = new web3.eth.Contract( yRegistryAbi, yRegistryAddress @@ -144,9 +144,4 @@ module.exports.handler = async (res) => { const vault = await getVault(vaultAddress, idx); vaults.push(vault); } - - res.status(200).json({ - message: '', - body: vaults - }) }; diff --git a/utils/api.js b/utils/api.js index bbe4cec..eaffd0f 100644 --- a/utils/api.js +++ b/utils/api.js @@ -7,7 +7,7 @@ const pushSlackErrorAlert = (method, url, err) => { const request = { method: "post", - url: "https://hooks.slack.com/services/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", + url: process.env.SLACK_HOOK_URL, headers: { "Content-Type": "application/json" }, From a0bdbc2e373f350132872629f946775595a23754 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Mon, 30 Nov 2020 16:00:13 +0800 Subject: [PATCH 005/254] Update database credentials config --- config/db.js | 1 - docker-compose.yml | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/config/db.js b/config/db.js index d973952..904f90d 100644 --- a/config/db.js +++ b/config/db.js @@ -14,7 +14,6 @@ const connectDB = async (callback) => { var url = ''; if (process.env.PRODUCTION != null && process.env.PRODUCTION != '') { url = `mongodb://${encodeURIComponent(MONGO_USERNAME)}:${encodeURIComponent(MONGO_PASSWORD)}@${MONGO_HOSTNAME}:${MONGO_PORT}/${MONGO_DB}?authMechanism=${AUTH_MECHANISM}`; - // url = `mongodb://${MONGO_HOSTNAME}`; } else { url = `mongodb://${MONGO_HOSTNAME}`; } diff --git a/docker-compose.yml b/docker-compose.yml index 9045e26..2d9e224 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,6 +3,7 @@ services: database: image: mongo container_name: 'database' + command: [--auth] restart: 'always' ports: - '27017:27017' From c5f9c06c8089d5159567f57e3778c0bb87026a05 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Mon, 30 Nov 2020 16:35:42 +0800 Subject: [PATCH 006/254] Update prod contract --- config/serverless/domain.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 830b124..a80ba35 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -32,7 +32,7 @@ const devVaultContract = "0x99dd34943c741E17EB772041cd3D7E8d317FA92f"; const devYfUSDTContract = "0x9680CF4CfED6Cf04eF0Eeb513c2399c192D0c0B0"; const prodEarnContract = "0xe6354ed5bc4b393a5aad09f21c46e101e692d447"; const prodVaultContract = "0x2f08119c6f07c006695e079aafc638b8789faf18"; -const prodYfUSDTContract = "0xE8c9F440677bDC8bA915734e6c7C1b232916877d"; +const prodYfUSDTContract = "0xA0db955B5bdFA7C279CdE6C136FBA20C195CdEe5"; const aggregatedContractAddress = "0x9cad8ab10daa9af1a9d2b878541f41b697268eec"; module.exports.devContract = { From 165bb138c9fe3fc78017b3ba021432363d4584bb Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Mon, 30 Nov 2020 17:48:05 +0800 Subject: [PATCH 007/254] - Added nginx config --- docker-compose.yml | 26 ++++++++++++++++++++++++++ nginx/default.conf | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 nginx/default.conf diff --git a/docker-compose.yml b/docker-compose.yml index 2d9e224..48cdf9f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,5 +25,31 @@ services: - "./models:/api/models:ro" depends_on: - database + networks: + - backend + webserver: + image: nginx:1.13 + container_name: webserver + restart: unless-stopped + ports: + - "8000:8000" + - "8443:8443" + volumes: + - ./nginx-conf:/etc/nginx/conf.d + - ./certbot/conf:/etc/letsencrypt + - ./certbot/www:/var/www/certbot + depends_on: + - api + networks: + - backend + certbot: + image: certbot/certbot + volumes: + - ./certbot/conf:/etc/letsencrypt + - ./certbot/www:/var/www/certbot + entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'" volumes: mongodata: +networks: + - backend + diff --git a/nginx/default.conf b/nginx/default.conf new file mode 100644 index 0000000..f017b13 --- /dev/null +++ b/nginx/default.conf @@ -0,0 +1,35 @@ +server { + listen 8000; + server_name test.daoventures.co www.test.daoventures.co; + + location / { + rewrite ^ https://$host$request_uri? permanent; + } + + location /.well-known/acme-challenge/ { + root /var/www/certbot; + } +} + +server { + listen 8443 ssl; + server_name test.daoventures.co www.test.daoventures.co; + + ssl_certificate /etc/letsencrypt/live/test.daoventures.co/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/test.daoventures.co/privkey.pem; + + include /etc/letsencrypt/options-ssl-nginx.conf; + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; + + location / { + proxy_pass http://api:8080; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + + error_page 500 502 503 504 /50x.html; + + location = /50x.html { + root /usr/share/nginx/html; + } +} \ No newline at end of file From 92787d3b8ca180956ee5c20d18ea662e30fb87a5 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Mon, 30 Nov 2020 17:54:44 +0800 Subject: [PATCH 008/254] Fix docker config issue --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 48cdf9f..16af91c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -51,5 +51,5 @@ services: volumes: mongodata: networks: - - backend + backend: From f047badb007e49e0f798007d3c6fdbfbd662cea7 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Mon, 30 Nov 2020 17:58:36 +0800 Subject: [PATCH 009/254] - Update --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 16af91c..c5be840 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,7 +27,7 @@ services: - database networks: - backend - webserver: + nginx: image: nginx:1.13 container_name: webserver restart: unless-stopped From 1e9725da765894cdb154c790371aee37bdbafd82 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Mon, 30 Nov 2020 19:17:01 +0800 Subject: [PATCH 010/254] Update docker config --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index c5be840..16867c3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -35,7 +35,7 @@ services: - "8000:8000" - "8443:8443" volumes: - - ./nginx-conf:/etc/nginx/conf.d + - ./nginx:/etc/nginx/conf.d - ./certbot/conf:/etc/letsencrypt - ./certbot/www:/var/www/certbot depends_on: From ce271d769958995ea2427cee55f7cb3d71ae70c9 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Mon, 30 Nov 2020 19:21:20 +0800 Subject: [PATCH 011/254] Update docker configuration --- docker-compose.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 16867c3..27488f0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -38,8 +38,7 @@ services: - ./nginx:/etc/nginx/conf.d - ./certbot/conf:/etc/letsencrypt - ./certbot/www:/var/www/certbot - depends_on: - - api + command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'" networks: - backend certbot: From 6f9997a4106e400546b20e8a5b98f3912551b3e5 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Mon, 30 Nov 2020 19:31:22 +0800 Subject: [PATCH 012/254] Update nginx config --- docker-compose.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 27488f0..58c8a69 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,14 +4,14 @@ services: image: mongo container_name: 'database' command: [--auth] - restart: 'always' + restart: always ports: - '27017:27017' volumes: - 'mongodata:/data/db' api: container_name: 'api' - restart: 'always' + restart: always build: context: . env_file: @@ -29,8 +29,8 @@ services: - backend nginx: image: nginx:1.13 - container_name: webserver - restart: unless-stopped + container_name: nginx + restart: always ports: - "8000:8000" - "8443:8443" From d6f6f3fa6c91572e62845eb7b3c7a5c55816ec75 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Mon, 30 Nov 2020 19:35:54 +0800 Subject: [PATCH 013/254] Update docker config --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index 58c8a69..402a7c3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -51,4 +51,5 @@ volumes: mongodata: networks: backend: + driver: bridge From 75ed671369c01e73d19bdc81e4df36d036268ee3 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Mon, 30 Nov 2020 19:41:21 +0800 Subject: [PATCH 014/254] Update config --- docker-compose.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 402a7c3..8b9e3c0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,8 +25,6 @@ services: - "./models:/api/models:ro" depends_on: - database - networks: - - backend nginx: image: nginx:1.13 container_name: nginx @@ -39,8 +37,8 @@ services: - ./certbot/conf:/etc/letsencrypt - ./certbot/www:/var/www/certbot command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'" - networks: - - backend + depends_on: + - api certbot: image: certbot/certbot volumes: @@ -49,7 +47,3 @@ services: entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'" volumes: mongodata: -networks: - backend: - driver: bridge - From 6fe1616245db30b423863057f758ed1e7f321df7 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Mon, 30 Nov 2020 20:29:08 +0800 Subject: [PATCH 015/254] Update --- docker-compose.yml | 25 +++++-------------------- nginx/default.conf | 35 ----------------------------------- 2 files changed, 5 insertions(+), 55 deletions(-) delete mode 100644 nginx/default.conf diff --git a/docker-compose.yml b/docker-compose.yml index 8b9e3c0..41d2666 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,25 +25,10 @@ services: - "./models:/api/models:ro" depends_on: - database - nginx: - image: nginx:1.13 - container_name: nginx - restart: always - ports: - - "8000:8000" - - "8443:8443" - volumes: - - ./nginx:/etc/nginx/conf.d - - ./certbot/conf:/etc/letsencrypt - - ./certbot/www:/var/www/certbot - command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'" - depends_on: - - api - certbot: - image: certbot/certbot - volumes: - - ./certbot/conf:/etc/letsencrypt - - ./certbot/www:/var/www/certbot - entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'" + networks: + - backend volumes: mongodata: +networks: + backend: + driver: bridge diff --git a/nginx/default.conf b/nginx/default.conf deleted file mode 100644 index f017b13..0000000 --- a/nginx/default.conf +++ /dev/null @@ -1,35 +0,0 @@ -server { - listen 8000; - server_name test.daoventures.co www.test.daoventures.co; - - location / { - rewrite ^ https://$host$request_uri? permanent; - } - - location /.well-known/acme-challenge/ { - root /var/www/certbot; - } -} - -server { - listen 8443 ssl; - server_name test.daoventures.co www.test.daoventures.co; - - ssl_certificate /etc/letsencrypt/live/test.daoventures.co/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/test.daoventures.co/privkey.pem; - - include /etc/letsencrypt/options-ssl-nginx.conf; - ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; - - location / { - proxy_pass http://api:8080; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - } - - error_page 500 502 503 504 /50x.html; - - location = /50x.html { - root /usr/share/nginx/html; - } -} \ No newline at end of file From a24e2cf73e66893be715d160cb2116625fe45a22 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Mon, 30 Nov 2020 20:47:52 +0800 Subject: [PATCH 016/254] Update --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 41d2666..d3cb66f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,6 +9,8 @@ services: - '27017:27017' volumes: - 'mongodata:/data/db' + networks: + - backend api: container_name: 'api' restart: always @@ -23,8 +25,6 @@ services: - "./services:/api/services:ro" - "./utils:/api/utils:ro" - "./models:/api/models:ro" - depends_on: - - database networks: - backend volumes: From 9a1d1296432852a7db280f73e6d35c191bf8d466 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Thu, 10 Dec 2020 19:43:24 +0800 Subject: [PATCH 017/254] Add logging --- services/vaults/apy/save/handler.js | 1 + 1 file changed, 1 insertion(+) diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index 187f6ac..a091222 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -60,6 +60,7 @@ const saveVault = async (data) => { }; const saveHistoricalAPY = async (data) => { + console.log('history-apy', data) await historicalDb.add(data).catch((err) => console.log('err', err)); }; From 3c27184b1b8012b86a0146f2df1fbe90c5cd4874 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Fri, 19 Mar 2021 20:35:22 +0800 Subject: [PATCH 018/254] Add logging --- services/vaults/save/handler.js | 1 + 1 file changed, 1 insertion(+) diff --git a/services/vaults/save/handler.js b/services/vaults/save/handler.js index b5a8cb2..1f75751 100644 --- a/services/vaults/save/handler.js +++ b/services/vaults/save/handler.js @@ -102,6 +102,7 @@ module.exports.handler = async () => { 10 ); + console.log('tokenAddress', tokenAddress); const tokenInfo = await fetch( `https://api.coingecko.com/api/v3/coins/ethereum/contract/${tokenAddress}` ).then((res) => res.json()); From 8f834d57f4d36ae9a7cc2f938209e5186e1ae5df Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Sat, 20 Mar 2021 15:02:39 +0800 Subject: [PATCH 019/254] Added logging --- services/vaults/apy/save/handler.js | 4 +- services/vaults/save/handler.js | 64 +++++++++++++++-------------- 2 files changed, 36 insertions(+), 32 deletions(-) diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index a091222..7af5fd1 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -341,7 +341,7 @@ const saveAndReadVault = async (vault) => { }; module.exports.saveHandler = async () => { - console.log("Fetching historical blocks"); + console.log("Fetching historical blocks", 'save APY history'); currentBlockNbr = await infuraWeb3.eth.getBlockNumber(); await delay(delayTime); oneDayAgoBlock = (await blocks.getDate(oneDayAgo)).block; @@ -407,7 +407,7 @@ module.exports.handleHistoricialAPY = async (req, res) => { } module.exports.handler = async () => { - console.log("Fetching historical blocks"); + console.log("Fetching historical blocks", 'save Vault APY'); currentBlockNbr = await infuraWeb3.eth.getBlockNumber(); await delay(delayTime); oneDayAgoBlock = (await blocks.getDate(oneDayAgo)).block; diff --git a/services/vaults/save/handler.js b/services/vaults/save/handler.js index 1f75751..d0a5e9e 100644 --- a/services/vaults/save/handler.js +++ b/services/vaults/save/handler.js @@ -102,39 +102,43 @@ module.exports.handler = async () => { 10 ); - console.log('tokenAddress', tokenAddress); const tokenInfo = await fetch( `https://api.coingecko.com/api/v3/coins/ethereum/contract/${tokenAddress}` ).then((res) => res.json()); - const tokenSymbolAlias = tokenSymbolAliases[tokenSymbol] || tokenSymbol; - const symbolAlias = symbolAliases[vaultSymbol] || `y${tokenSymbolAlias}`; - const vaultAlias = - vaultAliases[vaultAddress] || `${tokenSymbolAlias} Vault`; - const tokenIcon = tokenInfo.image.large; - const vaultIcon = vaultIcons[tokenSymbol]; - const vault = { - address: vaultAddress, - name: vaultName, - vaultAlias, - vaultIcon, - symbol: vaultSymbol, - symbolAlias, - controllerAddress: controllerAddress, - controllerName: await fetchContractName(controllerAddress), - strategyAddress: strategyAddress, - strategyName: await fetchContractName(strategyAddress), - tokenAddress: tokenAddress, - tokenName: tokenName, - tokenSymbol: tokenSymbol, - tokenSymbolAlias, - tokenIcon: tokenIcon, - decimals: decimals, - wrapped: vaultInfo.isWrappedArray[idx], - delegated: vaultInfo.isDelegatedArray[idx], - timestamp: Date.now(), - }; - await saveVault(vault); - return vault; + + if (tokenInfo) { + const tokenSymbolAlias = tokenSymbolAliases[tokenSymbol] || tokenSymbol; + const symbolAlias = symbolAliases[vaultSymbol] || `y${tokenSymbolAlias}`; + const vaultAlias = + vaultAliases[vaultAddress] || `${tokenSymbolAlias} Vault`; + const tokenIcon = tokenInfo.image.large; + const vaultIcon = vaultIcons[tokenSymbol]; + const vault = { + address: vaultAddress, + name: vaultName, + vaultAlias, + vaultIcon, + symbol: vaultSymbol, + symbolAlias, + controllerAddress: controllerAddress, + controllerName: await fetchContractName(controllerAddress), + strategyAddress: strategyAddress, + strategyName: await fetchContractName(strategyAddress), + tokenAddress: tokenAddress, + tokenName: tokenName, + tokenSymbol: tokenSymbol, + tokenSymbolAlias, + tokenIcon: tokenIcon, + decimals: decimals, + wrapped: vaultInfo.isWrappedArray[idx], + delegated: vaultInfo.isDelegatedArray[idx], + timestamp: Date.now(), + }; + await saveVault(vault); + return vault; + } + + return; }; const vaults = []; From 21c5558d3b17f207eb3096c176cb606119d15eb0 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Sat, 20 Mar 2021 16:15:55 +0800 Subject: [PATCH 020/254] updated --- services/vaults/apy/save/handler.js | 1 - 1 file changed, 1 deletion(-) diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index 7af5fd1..9ebac43 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -343,7 +343,6 @@ const saveAndReadVault = async (vault) => { module.exports.saveHandler = async () => { console.log("Fetching historical blocks", 'save APY history'); currentBlockNbr = await infuraWeb3.eth.getBlockNumber(); - await delay(delayTime); oneDayAgoBlock = (await blocks.getDate(oneDayAgo)).block; threeDaysAgoBlock = (await blocks.getDate(threeDaysAgo)).block; oneWeekAgoBlock = (await blocks.getDate(oneWeekAgo)).block; From c5d21a849dfcc90d996c368ddab670dd5dd52189 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Sun, 21 Mar 2021 17:29:46 +0800 Subject: [PATCH 021/254] Update archive node --- app.js | 2 +- jobs/task.js | 6 +++--- services/vaults/apy/save/handler.js | 4 +--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/app.js b/app.js index 9949d03..1a6b4d9 100644 --- a/app.js +++ b/app.js @@ -22,7 +22,7 @@ async function init() { jobs.saveVault(); jobs.saveVaultAPY(); jobs.savePricePerFullShare(); - jobs.saveAPY(); + jobs.saveHistoricalAPY(); }) app.use(cors()); diff --git a/jobs/task.js b/jobs/task.js index 08704a9..c2e078e 100644 --- a/jobs/task.js +++ b/jobs/task.js @@ -38,8 +38,8 @@ const savePricePerFullShare = async () => { }) } -/** Store APY */ -const saveAPY = async () => { +/** Store Historical APY */ +const saveHistoricalAPY = async () => { await vaultApySave.saveHandler(); cron.schedule('*/5 * * * *', async () => { console.log('[saveAPY]', new Date().getTime()); @@ -53,5 +53,5 @@ module.exports = { saveVaultAPY, saveVault, savePricePerFullShare, - saveAPY + saveHistoricalAPY } \ No newline at end of file diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index 9ebac43..3e35867 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -157,8 +157,6 @@ const getApyForVault = async (vault) => { inceptionBlockNbr ); - const now = Date.now(); - const apyInceptionSample = await getApy( pricePerFullShareInception, pricePerFullShareCurrent, @@ -280,7 +278,7 @@ const readVault = async (vault) => { } const contract = new infuraWeb3.eth.Contract(abi, address); const apy = await getApyForVault(vault); - const loanscanApy = await getLoanscanApyForVault(vault); + // const loanscanApy = await getLoanscanApyForVault(vault); console.log("Vault: ", name, apy); const data = { address, From a92aefae384a1f2706b24ed5c3a8bc288cbea04d Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Sun, 21 Mar 2021 17:40:41 +0800 Subject: [PATCH 022/254] fix bug issues --- services/vaults/apy/save/handler.js | 70 ++++++++++++++++------------- services/vaults/save/handler.js | 2 +- 2 files changed, 40 insertions(+), 32 deletions(-) diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index 3e35867..53aff1b 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -339,22 +339,26 @@ const saveAndReadVault = async (vault) => { }; module.exports.saveHandler = async () => { - console.log("Fetching historical blocks", 'save APY history'); - currentBlockNbr = await infuraWeb3.eth.getBlockNumber(); - oneDayAgoBlock = (await blocks.getDate(oneDayAgo)).block; - threeDaysAgoBlock = (await blocks.getDate(threeDaysAgo)).block; - oneWeekAgoBlock = (await blocks.getDate(oneWeekAgo)).block; - oneMonthAgoBlock = (await blocks.getDate(oneMonthAgo)).block; - nbrBlocksInDay = currentBlockNbr - oneDayAgoBlock; - console.log("Done fetching historical blocks"); - - const vaultsWithApy = []; - for (const vault of vaults) { - const vaultWithApy = await saveAndReadVault(vault); - if (vaultWithApy !== null) { - vaultsWithApy.push(vaultWithApy); + try { + console.log("Fetching historical blocks", 'save APY history'); + currentBlockNbr = await infuraWeb3.eth.getBlockNumber(); + oneDayAgoBlock = (await blocks.getDate(oneDayAgo)).block; + threeDaysAgoBlock = (await blocks.getDate(threeDaysAgo)).block; + oneWeekAgoBlock = (await blocks.getDate(oneWeekAgo)).block; + oneMonthAgoBlock = (await blocks.getDate(oneMonthAgo)).block; + nbrBlocksInDay = currentBlockNbr - oneDayAgoBlock; + console.log("Done fetching historical blocks"); + + const vaultsWithApy = []; + for (const vault of vaults) { + const vaultWithApy = await saveAndReadVault(vault); + if (vaultWithApy !== null) { + vaultsWithApy.push(vaultWithApy); + } + await delay(delayTime); } - await delay(delayTime); + } catch (err) { + console.error(err); } } @@ -404,22 +408,26 @@ module.exports.handleHistoricialAPY = async (req, res) => { } module.exports.handler = async () => { - console.log("Fetching historical blocks", 'save Vault APY'); - currentBlockNbr = await infuraWeb3.eth.getBlockNumber(); - await delay(delayTime); - oneDayAgoBlock = (await blocks.getDate(oneDayAgo)).block; - threeDaysAgoBlock = (await blocks.getDate(threeDaysAgo)).block; - oneWeekAgoBlock = (await blocks.getDate(oneWeekAgo)).block; - oneMonthAgoBlock = (await blocks.getDate(oneMonthAgo)).block; - nbrBlocksInDay = currentBlockNbr - oneDayAgoBlock; - console.log("Done fetching historical blocks"); - - const vaultsWithApy = []; - for (const vault of vaults) { - const vaultWithApy = await readVault(vault); - if (vaultWithApy !== null) { - vaultsWithApy.push(vaultWithApy); - } + try { + console.log("Fetching historical blocks", 'save Vault APY'); + currentBlockNbr = await infuraWeb3.eth.getBlockNumber(); await delay(delayTime); + oneDayAgoBlock = (await blocks.getDate(oneDayAgo)).block; + threeDaysAgoBlock = (await blocks.getDate(threeDaysAgo)).block; + oneWeekAgoBlock = (await blocks.getDate(oneWeekAgo)).block; + oneMonthAgoBlock = (await blocks.getDate(oneMonthAgo)).block; + nbrBlocksInDay = currentBlockNbr - oneDayAgoBlock; + console.log("Done fetching historical blocks"); + + const vaultsWithApy = []; + for (const vault of vaults) { + const vaultWithApy = await readVault(vault); + if (vaultWithApy !== null) { + vaultsWithApy.push(vaultWithApy); + } + await delay(delayTime); + } + } catch (err) { + console.error(err); } }; diff --git a/services/vaults/save/handler.js b/services/vaults/save/handler.js index d0a5e9e..ab7c8cc 100644 --- a/services/vaults/save/handler.js +++ b/services/vaults/save/handler.js @@ -111,7 +111,7 @@ module.exports.handler = async () => { const symbolAlias = symbolAliases[vaultSymbol] || `y${tokenSymbolAlias}`; const vaultAlias = vaultAliases[vaultAddress] || `${tokenSymbolAlias} Vault`; - const tokenIcon = tokenInfo.image.large; + const tokenIcon = tokenInfo.image ? tokenInfo.image.large : ''; const vaultIcon = vaultIcons[tokenSymbol]; const vault = { address: vaultAddress, From ba3c5794e6517c2503f022ace3670c226b73f86c Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Tue, 23 Mar 2021 20:57:02 +0800 Subject: [PATCH 023/254] - Revamp to Yearn Farmerv2 --- .env.example | 4 - app.js | 2 +- config/abi.js | 3680 ++++++++++++++++++ config/serverless/domain.js | 142 +- jobs/task.js | 20 +- models/historical-apy.model.js | 13 +- models/price.model.js | 13 +- services/user/vaults/statistics/handler.js | 48 +- services/user/vaults/transactions/handler.js | 16 +- services/vaults/apy/save/handler.js | 58 +- services/vaults/apy/save/vaults.js | 90 +- services/vaults/price/handler.js | 73 +- 12 files changed, 4042 insertions(+), 117 deletions(-) diff --git a/.env.example b/.env.example index 7e1641c..cee5ce7 100644 --- a/.env.example +++ b/.env.example @@ -4,10 +4,6 @@ ARCHIVENODE_ENDPOINT = https://api.archivenode.io/93mwpmy684fb0dc3c0q93mwpmwlssf ETHERSCAN_API_KEY = GEQXZDY67RZ4QHNU1A57QVPNDV3RP1RYH4 SLACK_HOOK_URL = -AWS_ACCESS_KEY_ID = AKIA2FCIA3THEGVNNLSN -AWS_SECRET_ACCESS_KEY = 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 -AWS_DEFAULT_REGION = us-east-1 - MONGO_USERNAME= MONGO_PASSWORD= MONGO_HOSTNAME= diff --git a/app.js b/app.js index 1a6b4d9..3172e8d 100644 --- a/app.js +++ b/app.js @@ -30,7 +30,7 @@ async function init() { app.get('/vaults/apy', (req, res) => vaultsApy.handler(res)); app.get('/user/:userAddress/vaults/statistics', (req, res) => userStatistics.handler(req, res)); app.get('/user/:userAddress/vaults/transactions', (req, res) => userTransactions.handler(req, res)); - app.get('/vaults/price/:contractAddress/:days', (req, res) => vaultsPrice.handleHistoricialPrice(req, res)); + app.get('/vaults/price/:farmer/:days', (req, res) => vaultsPrice.handleHistoricialPrice(req, res)); app.get('/vaults/historical-apy/:contractAddress/:days', (req, res) => vaultAPYSave.handleHistoricialAPY(req, res)); app.listen(port, () => console.log(`Listening on ${port}`)); diff --git a/config/abi.js b/config/abi.js index 7a982aa..3b31978 100644 --- a/config/abi.js +++ b/config/abi.js @@ -1883,9 +1883,3689 @@ const aggregatedContractABI = [ }, ]; +const earnUSDTABIContract = [{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"supplyDydx","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"aaveToken","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"provider","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"amount","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceFulcrum","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pool","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"sender","type":"address"},{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceDydx","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"withdrawDydx","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_new_APR","type":"address"}],"name":"set_new_APR","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"withdrawAave","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"apr","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"fulcrum","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balanceCompound","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"supplyAave","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"withdrawSomeFulcrum","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"calcPoolValueInToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getPricePerFullShare","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"rebalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"supplyFulcrum","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_new_AAVE","type":"address"}],"name":"set_new_AAVE","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"aave","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dydx","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balanceFulcrumAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"approveToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_new_DTOKEN","type":"uint256"}],"name":"set_new_DTOKEN","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"aavePool","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"recommend","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceCompoundInToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_new_ATOKEN","type":"address"}],"name":"set_new_ATOKEN","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceAaveAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"withdrawSomeCompound","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_new_FULCRUM","type":"address"}],"name":"set_new_FULCRUM","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceAave","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balanceDydxAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"supplyCompound","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceFulcrumInToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_new_COMPOUND","type":"address"}],"name":"set_new_COMPOUND","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"compound","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getAave","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getAaveCore","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"}] + +const earnUSDCABIContract = [{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"supplyDydx","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"aaveToken","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"provider","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"amount","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceFulcrum","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pool","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_new_APOOL","type":"address"}],"name":"set_new_APOOL","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"sender","type":"address"},{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceDydx","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"withdrawDydx","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_new_APR","type":"address"}],"name":"set_new_APR","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"withdrawAave","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"apr","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"fulcrum","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balanceCompound","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"supplyAave","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"withdrawSomeFulcrum","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"calcPoolValueInToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getPricePerFullShare","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"rebalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"supplyFulcrum","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_new_AAVE","type":"address"}],"name":"set_new_AAVE","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"aave","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dydx","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balanceFulcrumAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"approveToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_new_DTOKEN","type":"uint256"}],"name":"set_new_DTOKEN","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"aavePool","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"recommend","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceCompoundInToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_new_ATOKEN","type":"address"}],"name":"set_new_ATOKEN","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceAaveAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"withdrawSomeCompound","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_new_FULCRUM","type":"address"}],"name":"set_new_FULCRUM","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceAave","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balanceDydxAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"supplyCompound","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceFulcrumInToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_new_COMPOUND","type":"address"}],"name":"set_new_COMPOUND","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"compound","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getAave","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getAaveCore","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"}] + +const earnDAIABIContract = [{"constant":true,"inputs":[],"name":"aaveToken","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"provider","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"amount","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceFulcrum","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pool","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"sender","type":"address"},{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceDydx","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"apr","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"fulcrum","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balanceCompound","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"calcPoolValueInToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getPricePerFullShare","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"rebalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"aave","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dydx","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balanceFulcrumAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"approveToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"aavePool","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"recommend","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceCompoundInToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceAaveAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"chai","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceAave","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balanceDydxAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceFulcrumInToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"compound","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getAave","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getAaveCore","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"}] + +const earnTUSDABIContract = [{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"supplyDydx","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"aaveToken","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"provider","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"amount","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceFulcrum","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pool","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"sender","type":"address"},{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceDydx","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_new_APR","type":"address"}],"name":"set_new_APR","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"apr","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"fulcrum","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balanceCompound","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"supplyAave","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"calcPoolValueInToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getPricePerFullShare","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"rebalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"supplyFulcrum","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"aave","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dydx","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"approveToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_new_DTOKEN","type":"uint256"}],"name":"set_new_DTOKEN","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"recommend","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceCompoundInToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceAave","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"supplyCompound","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceFulcrumInToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_new_COMPOUND","type":"address"}],"name":"set_new_COMPOUND","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"compound","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getAave","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getAaveCore","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"}] + +const vaultUSDTABIContract = [{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_controller","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"available","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"controller","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"depositAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"earn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getPricePerFullShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"reserve","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"harvest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"max","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"min","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_controller","type":"address"}],"name":"setController","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_governance","type":"address"}],"name":"setGovernance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_min","type":"uint256"}],"name":"setMin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}] + +const vaultUSDCABIContract = [{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_controller","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"available","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"controller","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"depositAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"earn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getPricePerFullShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"reserve","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"harvest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"max","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"min","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_controller","type":"address"}],"name":"setController","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_governance","type":"address"}],"name":"setGovernance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_min","type":"uint256"}],"name":"setMin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}] + +const vaultDAIABIContract = [{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_controller","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"available","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"controller","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"depositAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"earn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getPricePerFullShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"reserve","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"harvest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"max","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"min","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_controller","type":"address"}],"name":"setController","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_governance","type":"address"}],"name":"setGovernance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_min","type":"uint256"}],"name":"setMin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}] + +const vaultTUSDABIContract = [{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_controller","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"available","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"controller","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"depositAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"earn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getPricePerFullShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"reserve","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"harvest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"max","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"min","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_controller","type":"address"}],"name":"setController","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_governance","type":"address"}],"name":"setGovernance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_min","type":"uint256"}],"name":"setMin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}] + +const yearnDAIABIContract = [ + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_earn", + "type": "address" + }, + { + "internalType": "address", + "name": "_vault", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldCommunityWallet", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newCommunityWallet", + "type": "address" + } + ], + "name": "SetCommunityWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldCustomNetworkFeePercentage", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newCustomNetworkFeePercentage", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldCustomNetworkFeeTier", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newCustomNetworkFeeTier", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeeTier", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeePercentage", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeePercentage", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeeTier2", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeeTier2", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeeTier2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldProfileSharingFeePercentage", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newProfileSharingFeePercentage", + "type": "uint256" + } + ], + "name": "SetProfileSharingFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldTreasuryWallet", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newTreasuryWallet", + "type": "address" + } + ], + "name": "SetTreasuryWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "approveMigrate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeeTier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "daoVault", + "outputs": [ + { + "internalType": "contract IDaoVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_amounts", + "type": "uint256[]" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "earn", + "outputs": [ + { + "internalType": "contract IYearn", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "getEarnDepositBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "result", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "getSharesValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "getVaultDepositBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "result", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isVesting", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeeTier2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pool", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "profileSharingFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "refund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_communityWallet", + "type": "address" + } + ], + "name": "setCommunityWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_percentage", + "type": "uint256" + } + ], + "name": "setCustomNetworkFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_customNetworkFeeTier", + "type": "uint256" + } + ], + "name": "setCustomNetworkFeeTier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeePercentage", + "type": "uint256[]" + } + ], + "name": "setNetworkFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeeTier2", + "type": "uint256[]" + } + ], + "name": "setNetworkFeeTier2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_percentage", + "type": "uint256" + } + ], + "name": "setProfileSharingFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_treasuryWallet", + "type": "address" + } + ], + "name": "setTreasuryWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "setVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vault", + "outputs": [ + { + "internalType": "contract IYvault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vesting", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_shares", + "type": "uint256[]" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; + +const yearnTUSDABIContract = [ + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_earn", + "type": "address" + }, + { + "internalType": "address", + "name": "_vault", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldCommunityWallet", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newCommunityWallet", + "type": "address" + } + ], + "name": "SetCommunityWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldCustomNetworkFeePercentage", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newCustomNetworkFeePercentage", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldCustomNetworkFeeTier", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newCustomNetworkFeeTier", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeeTier", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeePercentage", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeePercentage", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeeTier2", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeeTier2", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeeTier2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldProfileSharingFeePercentage", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newProfileSharingFeePercentage", + "type": "uint256" + } + ], + "name": "SetProfileSharingFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldTreasuryWallet", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newTreasuryWallet", + "type": "address" + } + ], + "name": "SetTreasuryWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "approveMigrate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeeTier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "daoVault", + "outputs": [ + { + "internalType": "contract IDaoVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_amounts", + "type": "uint256[]" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "earn", + "outputs": [ + { + "internalType": "contract IYearn", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "getEarnDepositBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "result", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "getSharesValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "getVaultDepositBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "result", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isVesting", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeeTier2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pool", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "profileSharingFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "refund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_communityWallet", + "type": "address" + } + ], + "name": "setCommunityWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_percentage", + "type": "uint256" + } + ], + "name": "setCustomNetworkFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_customNetworkFeeTier", + "type": "uint256" + } + ], + "name": "setCustomNetworkFeeTier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeePercentage", + "type": "uint256[]" + } + ], + "name": "setNetworkFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeeTier2", + "type": "uint256[]" + } + ], + "name": "setNetworkFeeTier2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_percentage", + "type": "uint256" + } + ], + "name": "setProfileSharingFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_treasuryWallet", + "type": "address" + } + ], + "name": "setTreasuryWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "setVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vault", + "outputs": [ + { + "internalType": "contract IYvault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vesting", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_shares", + "type": "uint256[]" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; + +const yearnUSDCABIContract = [ + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_earn", + "type": "address" + }, + { + "internalType": "address", + "name": "_vault", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldCommunityWallet", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newCommunityWallet", + "type": "address" + } + ], + "name": "SetCommunityWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldCustomNetworkFeePercentage", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newCustomNetworkFeePercentage", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldCustomNetworkFeeTier", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newCustomNetworkFeeTier", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeeTier", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeePercentage", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeePercentage", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeeTier2", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeeTier2", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeeTier2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldProfileSharingFeePercentage", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newProfileSharingFeePercentage", + "type": "uint256" + } + ], + "name": "SetProfileSharingFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldTreasuryWallet", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newTreasuryWallet", + "type": "address" + } + ], + "name": "SetTreasuryWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "approveMigrate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeeTier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "daoVault", + "outputs": [ + { + "internalType": "contract IDaoVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_amounts", + "type": "uint256[]" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "earn", + "outputs": [ + { + "internalType": "contract IYearn", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "getEarnDepositBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "result", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "getSharesValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "getVaultDepositBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "result", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isVesting", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeeTier2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pool", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "profileSharingFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "refund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_communityWallet", + "type": "address" + } + ], + "name": "setCommunityWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_percentage", + "type": "uint256" + } + ], + "name": "setCustomNetworkFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_customNetworkFeeTier", + "type": "uint256" + } + ], + "name": "setCustomNetworkFeeTier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeePercentage", + "type": "uint256[]" + } + ], + "name": "setNetworkFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeeTier2", + "type": "uint256[]" + } + ], + "name": "setNetworkFeeTier2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_percentage", + "type": "uint256" + } + ], + "name": "setProfileSharingFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_treasuryWallet", + "type": "address" + } + ], + "name": "setTreasuryWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "setVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vault", + "outputs": [ + { + "internalType": "contract IYvault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vesting", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_shares", + "type": "uint256[]" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; + +const yearnUSDTABIContract = [ + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_earn", + "type": "address" + }, + { + "internalType": "address", + "name": "_vault", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldCommunityWallet", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newCommunityWallet", + "type": "address" + } + ], + "name": "SetCommunityWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldCustomNetworkFeePercentage", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newCustomNetworkFeePercentage", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldCustomNetworkFeeTier", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newCustomNetworkFeeTier", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeeTier", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeePercentage", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeePercentage", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeeTier2", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeeTier2", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeeTier2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldProfileSharingFeePercentage", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newProfileSharingFeePercentage", + "type": "uint256" + } + ], + "name": "SetProfileSharingFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldTreasuryWallet", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newTreasuryWallet", + "type": "address" + } + ], + "name": "SetTreasuryWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "approveMigrate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeeTier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "daoVault", + "outputs": [ + { + "internalType": "contract IDaoVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_amounts", + "type": "uint256[]" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "earn", + "outputs": [ + { + "internalType": "contract IYearn", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "getEarnDepositBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "result", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "getSharesValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "getVaultDepositBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "result", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isVesting", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeeTier2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pool", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "profileSharingFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "refund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_communityWallet", + "type": "address" + } + ], + "name": "setCommunityWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_percentage", + "type": "uint256" + } + ], + "name": "setCustomNetworkFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_customNetworkFeeTier", + "type": "uint256" + } + ], + "name": "setCustomNetworkFeeTier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeePercentage", + "type": "uint256[]" + } + ], + "name": "setNetworkFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeeTier2", + "type": "uint256[]" + } + ], + "name": "setNetworkFeeTier2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_percentage", + "type": "uint256" + } + ], + "name": "setProfileSharingFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_treasuryWallet", + "type": "address" + } + ], + "name": "setTreasuryWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "setVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vault", + "outputs": [ + { + "internalType": "contract IYvault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vesting", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_shares", + "type": "uint256[]" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; + module.exports = { + earnUSDTABIContract, + earnUSDCABIContract, + earnDAIABIContract, + earnTUSDABIContract, + vaultUSDTABIContract, + vaultUSDCABIContract, + vaultDAIABIContract, + vaultTUSDABIContract, earnABIContract, vaultABIContract, yfUSDTABIContract, aggregatedContractABI, + yearnDAIABIContract, + yearnTUSDABIContract, + yearnUSDCABIContract, + yearnUSDTABIContract, }; diff --git a/config/serverless/domain.js b/config/serverless/domain.js index a80ba35..ce4c075 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -1,4 +1,6 @@ const _ = require("lodash"); +const abi = require('../abi'); +const config = require("../../services/vaults/apy/save/config"); const DEFAULT = { domainName: "api.yearn.tools", @@ -27,7 +29,137 @@ module.exports.dev = () => { }); }; -const devEarnContract = "0xCBc690078c24a57fE7D95c61989c722712DCd3f9"; +const testContracts = { + earn: { + 'yUSDT': { + address: '0xdb12e805d004698fc58f6e4fbdd876268df2dffe', + abi: abi.earnUSDTABIContract, + }, + 'yUSDC': { + address: '0xC6Be21D8533e90Fd136905eBe70c9d9148237f2d', + abi: abi.earnUSDCABIContract, + }, + 'yDAI': { + address: '0x21857b392b7d0ca20c439bc39896f38ee74c6023', + abi: abi.earnDAIABIContract, + }, + 'yTUSD': { + address: '0x63659fcb4a1f62e0c80690ddc67084e8e1560c61', + abi: abi.earnTUSDABIContract, + }, + }, + vault: { + 'yUSDT': { + address: '0x359902517f43b8d38cf9718fe90e552375476f05', + abi: config.vaultContractV2ABI, + }, + 'yUSDC': { + address: '0x231991d392dbe5980586665bc1a066f8efac78c8', + abi: config.vaultContractABI, + }, + 'yDAI': { + address: '0x193b83e8cc108c86362e47a4c2d3048837d4996e', + abi: config.vaultContractV2ABI, + }, + 'yTUSD': { + address: '0x0c9ddf949e32221612145807e34483ccf946b2b9', + abi: config.vaultContractV2ABI, + }, + }, + farmer: { + 'yUSDT': { + address: '0x132b495eC9451c9D572A791Ef9cB6f96Dcb67020', + abi: abi.vaultUSDTABIContract, + strategyAddress: '0x157fbacbbf6ba50c45e1375ae728f88f0cde1615', + strategyABI: abi.yearnUSDTABIContract, + }, + 'yUSDC': { + address: '0xBdf7cC9c7a9dFF3d54Aa976e9586CE9935484005', + abi: abi.vaultUSDCABIContract, + strategyAddress: '0xf5a1988a9d02ce26b2cca31a56368e5f6a9b55ac', + strategyABI: abi.yearnUSDCABIContract, + }, + 'yDAI': { + address: '0x2BB53Ee2592319e3c3cF2323f1a81B1bF7854B7C', + abi: abi.vaultDAIABIContract, + strategyAddress: '0x26cd801a2dbd05caad547b9d67ac2665e45dbc7e', + strategyABI: abi.yearnDAIABIContract, + }, + 'yTUSD': { + address: '0xa8B73aE1E978315886E318FB086504231A3Ef917', + abi: abi.vaultTUSDABIContract, + strategyAddress: '0x5abeadf41fe9ea8dbd49ddf4e9659dd098da9610', + strategyABI: abi.yearnTUSDABIContract, + }, + } +}; + +const mainContracts = { + earn: { + 'yUSDT': { + address: '0xdb12e805d004698fc58f6e4fbdd876268df2dffe', + abi: abi.earnUSDTABIContract, + }, + 'yUSDC': { + address: '0xC6Be21D8533e90Fd136905eBe70c9d9148237f2d', + abi: abi.earnUSDCABIContract, + }, + 'yDAI': { + address: '0x21857b392b7d0ca20c439bc39896f38ee74c6023', + abi: abi.earnDAIABIContract, + }, + 'yTUSD': { + address: '0x63659fcb4a1f62e0c80690ddc67084e8e1560c61', + abi: abi.earnTUSDABIContract, + }, + }, + vault: { + 'yUSDT': { + address: '0x2f08119c6f07c006695e079aafc638b8789faf18', + abi: config.vaultContractV2ABI, + }, + 'yUSDC': { + address: '0x597ad1e0c13bfe8025993d9e79c69e1c0233522e', + abi: config.vaultContractABI, + }, + 'yDAI': { + address: '0xacd43e627e64355f1861cec6d3a6688b31a6f952', + abi: config.vaultContractV2ABI, + }, + 'yTUSD': { + address: '0x37d19d1c4e1fa9dc47bd1ea12f742a0887eda74a', + abi: config.vaultContractV2ABI, + }, + }, + farmer: { + 'yUSDT': { + address: '0x4F0C1c9bA6B9CCd0BEd6166e86b672ac8EE621F7', + abi: abi.vaultUSDTABIContract, + strategyAddress: '0x3DB93e95c9881BC7D9f2C845ce12e97130Ebf5f2', + strategyABI: abi.yearnUSDTABIContract, + }, + 'yUSDC': { + address: '0x9f0230FbDC0379E5FefAcca89bE03A42Fec5fb6E', + abi: abi.vaultUSDCABIContract, + strategyAddress: '0x4A9dE4dA5eC67E1dbc8e18F26E178B40D690A11D', + strategyABI: abi.yearnUSDCABIContract, + }, + 'yDAI': { + address: '0x2bFc2Da293C911e5FfeC4D2A2946A599Bc4Ae770', + abi: abi.vaultDAIABIContract, + strategyAddress: '0x3685fB7CA1C555Cb5BD5A246422ee1f2c53DdB71', + strategyABI: abi.yearnDAIABIContract, + }, + 'yTUSD': { + address: '0x2C8de02aD4312069355B94Fb936EFE6CFE0C8FF6', + abi: abi.vaultTUSDABIContract, + strategyAddress: '0xA6F1409a259B21a84c8346ED1B0826D656959a54', + strategyABI: abi.yearnTUSDABIContract, + }, + } +} + +const devEarnContract = "0xdb12e805d004698fc58f6e4fbdd876268df2dffe"; const devVaultContract = "0x99dd34943c741E17EB772041cd3D7E8d317FA92f"; const devYfUSDTContract = "0x9680CF4CfED6Cf04eF0Eeb513c2399c192D0c0B0"; const prodEarnContract = "0xe6354ed5bc4b393a5aad09f21c46e101e692d447"; @@ -39,14 +171,18 @@ module.exports.devContract = { devEarnContract, devVaultContract, devYfUSDTContract, - aggregatedContractAddress }; module.exports.prodContract = { prodEarnContract, prodVaultContract, prodYfUSDTContract, - aggregatedContractAddress +} + +module.exports = { + testContracts, + mainContracts, + aggregatedContractAddress, } diff --git a/jobs/task.js b/jobs/task.js index c2e078e..6b4124e 100644 --- a/jobs/task.js +++ b/jobs/task.js @@ -3,24 +3,24 @@ const vaultApySave = require('../services/vaults/apy/save/handler'); const vaultSave = require('../services/vaults/save/handler'); const priceSave = require('../services/vaults/price/handler'); -/** Save Vault APY */ -const saveVaultAPY = async () => { - await vaultApySave.handler(); +/** Save Vault **/ +const saveVault = async () => { + await vaultSave.handler(); cron.schedule('0 0 0 * * *', async () => { - console.log('[saveVaultAPY]'); - await vaultApySave.handler(); + console.log('[saveVault]'); + await vaultSave.handler(); }, { scheduled: true, timezone: "Etc/UTC" // UTC +0 }) } -/** Save Vault **/ -const saveVault = async () => { - await vaultSave.handler(); +/** Save Vault APY */ +const saveVaultAPY = async () => { + await vaultApySave.handler(); cron.schedule('0 0 0 * * *', async () => { - console.log('[saveVault]'); - await vaultSave.handler(); + console.log('[saveVaultAPY]'); + await vaultApySave.handler(); }, { scheduled: true, timezone: "Etc/UTC" // UTC +0 diff --git a/models/historical-apy.model.js b/models/historical-apy.model.js index 1ed8cac..3aa14eb 100644 --- a/models/historical-apy.model.js +++ b/models/historical-apy.model.js @@ -1,12 +1,11 @@ const mongo = require('../config/db'); -const collection = 'historical-apy'; -const findAll = async () => { +const findAll = async (collection) => { const db = mongo.getDB(); return await db.collection(collection).find({}).toArray(); }; -const findWithTimePeriods = async (startTime, endTime) => { +const findWithTimePeriods = async (startTime, endTime, collection) => { const db = mongo.getDB(); return await db.collection(collection).find({ timestamp: { @@ -16,7 +15,7 @@ const findWithTimePeriods = async (startTime, endTime) => { }).toArray(); } -const add = async (params) => { +const add = async (params, collection) => { const db = mongo.getDB(); Object.assign(params, { timestamp: new Date().getTime() @@ -27,5 +26,9 @@ const add = async (params) => { module.exports = { findAll, findWithTimePeriods, - add + add, + usdtFarmer: 'yUSDT_historical-apy', + usdcFarmer: 'yUSDC_historical-apy', + tusdFarmer: 'yTUSD_historical-apy', + daiFarmer: 'yDAI_historical-apy', }; \ No newline at end of file diff --git a/models/price.model.js b/models/price.model.js index f8912bd..7838601 100644 --- a/models/price.model.js +++ b/models/price.model.js @@ -1,12 +1,11 @@ const mongo = require('../config/db'); -const collection = 'yfUSDT_price'; -const findAll = async () => { +const findAll = async (collection) => { const db = mongo.getDB(); return await db.collection(collection).find({}).toArray(); }; -const findPriceWithTimePeriods = async (startTime, endTime) => { +const findPriceWithTimePeriods = async (collection, startTime, endTime) => { const db = mongo.getDB(); return await db.collection(collection).find({ timestamp: { @@ -16,7 +15,7 @@ const findPriceWithTimePeriods = async (startTime, endTime) => { }).toArray(); } -const add = async (params) => { +const add = async (collection, params) => { const db = mongo.getDB(); Object.assign(params, { timestamp: new Date().getTime() @@ -27,5 +26,9 @@ const add = async (params) => { module.exports = { findAll, findPriceWithTimePeriods, - add + add, + usdtFarmer: 'yUSDT_price', + usdcFarmer: 'yUSDC_price', + tusdFarmer: 'yTUSD_price', + daiFarmer: 'yDAI_price', }; \ No newline at end of file diff --git a/services/user/vaults/statistics/handler.js b/services/user/vaults/statistics/handler.js index b9362c0..821dae8 100644 --- a/services/user/vaults/statistics/handler.js +++ b/services/user/vaults/statistics/handler.js @@ -13,6 +13,8 @@ const yfUSDTABIContract = require('../../../../config/abi').yfUSDTABIContract; const { devContract, prodContract, + testContracts, + mainContracts } = require('../../../../config/serverless/domain'); const { @@ -60,42 +62,32 @@ const getTotalSupply = async (contract) => { const getVaultStatistics = async (contractAddress, transactions, userAddress) => { const findVault = (vault) => { + if (vault.vaultAddress == null) return false; return vault.vaultAddress.toLowerCase() === contractAddress; } const transactionsForVault = _.find(transactions, findVault); - let earnAddress = ""; - let vaultAddress = ""; - let yfUSDTAddress = ""; + // Get User Deposit Amount + let strategyContract; + let vaultContract; if (process.env.PRODUCTION != null && process.env.PRODUCTION != '') { - earnAddress = prodContract.prodEarnContract; - vaultAddress = prodContract.prodVaultContract; - yfUSDTAddress = prodContract.prodYfUSDTContract; + const symbol = Object.keys(mainContracts.farmer).find(key => mainContracts.farmer[key].address.toLowerCase() === contractAddress.toLowerCase()); + strategyContract = getContract(mainContracts.farmer[symbol].strategyABI, mainContracts.farmer[symbol].strategyAddress); + vaultContract = getContract(mainContracts.farmer[symbol].abi, mainContracts.farmer[symbol].address); } else { - earnAddress = devContract.devEarnContract; - vaultAddress = devContract.devVaultContract; - yfUSDTAddress = devContract.devYfUSDTContract; - } - - const earnContract = getContract(earnABIContract, earnAddress); - const vaultContract = getContract(vaultABIContract, vaultAddress); - const farmerContract = getContract(yfUSDTABIContract, yfUSDTAddress); + const symbol = Object.keys(testContracts.farmer).find(key => testContracts.farmer[key].address.toLowerCase() === contractAddress.toLowerCase()); - const depositedShares = await getDepositedShares(farmerContract, userAddress); - const earnPricePerFullShare = await getPricePerFullShare(earnContract); - const vaultPricePerFullShare = await getPricePerFullShare(vaultContract); - const earnBalance = await getBalanceOf(earnContract, yfUSDTAddress); - const vaultBalance = await getBalanceOf(vaultContract, yfUSDTAddress); - const totalSupply = await getTotalSupply(farmerContract, yfUSDTAddress); - const pricePerFullShare = (new BigNumber(earnPricePerFullShare).times(new BigNumber(earnBalance)) - .plus(new BigNumber(vaultPricePerFullShare).times(new BigNumber(vaultBalance)))) - .dividedBy(new BigNumber(totalSupply)); + strategyContract = getContract(testContracts.farmer[symbol].strategyABI, testContracts.farmer[symbol].strategyAddress); + vaultContract = getContract(testContracts.farmer[symbol].abi, testContracts.farmer[symbol].address); + } + const earnDepositAmount = await strategyContract.methods.getEarnDepositBalance(userAddress).call(); + const vaultDepositAmount = await strategyContract.methods.getVaultDepositBalance(userAddress).call(); + const depositedAmount = new BigNumber(earnDepositAmount) + .plus(vaultDepositAmount); - const depositedAmount = new BigNumber(depositedShares) - .times(pricePerFullShare) - .dividedBy(10 ** 18); + const depositedShares = await getDepositedShares(vaultContract, userAddress); const { deposits, @@ -128,13 +120,13 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => .plus(totalTransferredOut); const statistics = { - contractAddress: yfUSDTAddress, + contractAddress, totalDeposits: totalDeposits.toFixed(), totalWithdrawals: totalWithdrawals.toFixed(), totalTransferredIn: totalTransferredIn.toFixed(), totalTransferredOut: totalTransferredOut.toFixed(), depositedShares, - depositedAmount: depositedAmount.toFixed(0), + depositedAmount: depositedAmount, earnings: earnings.toFixed(0), }; return statistics; diff --git a/services/user/vaults/transactions/handler.js b/services/user/vaults/transactions/handler.js index 02f6f41..4ddcaf8 100644 --- a/services/user/vaults/transactions/handler.js +++ b/services/user/vaults/transactions/handler.js @@ -3,13 +3,14 @@ require("dotenv").config(); const fetch = require("node-fetch"); const { pluck, uniq } = require("ramda/dist/ramda"); -const BigNumber = require("bignumber.js"); const subgraphUrl = process.env.SUBGRAPH_ENDPOINT; const { getVaults } = require("../../../vaults/handler"); const _ = require("lodash"); const { devContract, prodContract, + testContracts, + mainContracts } = require('../../../../config/serverless/domain'); module.exports.handler = async (req, res) => { @@ -181,7 +182,7 @@ const getVaultAddressesForUserWithGraphTransactions = ( }; const getVaultAddressesForUser = async (userAddress) => { - const graphTransactions = await getGraphTransactions(userAddress); + const graphTransactions = await getGraphTransactions(userAddress.toLowerCase()); const vaultAddressesForUser = getVaultAddressesForUserWithGraphTransactions( userAddress, graphTransactions @@ -211,15 +212,14 @@ const getTransactions = async (userAddress) => { graphTransactions ); - const vaults = await getVaults(); + const farmers = process.env.PRODUCTION == '' ? Object.values(testContracts.farmer) : Object.values(mainContracts.farmer); const removeVaultAddressField = (deposit) => _.omit(deposit, "vaultAddress"); const getTransactionsByVaultAddress = (vaultAddress) => { const findItemByVaultAddress = (item) => item.vaultAddress === vaultAddress; - const findVault = (vault) => - vault.address.toLowerCase() === vaultAddress.toLowerCase(); + const findVault = (vault) => vault.address.toLowerCase() === vaultAddress.toLowerCase(); const depositsToVault = deposits .filter(findItemByVaultAddress) @@ -237,12 +237,12 @@ const getTransactions = async (userAddress) => { .filter(findItemByVaultAddress) .map(stripUnneededTransferFields); - const vault = vaults.find(findVault); + const farmer = farmers.find(findVault); //TODO Change dynamic address const vaultTransactions = { - // vaultAddress: vault.address, - vaultAddress: process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? prodContract.prodYfUSDTContract : devContract.devYfUSDTContract, + vaultAddress: farmer.address, + // vaultAddress: process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? prodContract.prodYfUSDTContract : devContract.devYfUSDTContract, deposits: depositsToVault.map(correctTransactionAddress), withdrawals: withdrawalsFromVault.map(correctTransactionAddress), transfersIn: transfersIntoVault.map(correctTransactionAddress), diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index 53aff1b..d1ed14d 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -17,7 +17,7 @@ const archiveNodeWeb3 = new Web3(archiveNodeUrl); const infuraWeb3 = new Web3(infuraUrl); const blocks = new EthDater(archiveNodeWeb3, delayTime); const { aggregatedContractABI } = require('../../../../config/abi'); -const { devContract, prodContract } = require('../../../../config/serverless/domain'); +const { devContract, prodContract, aggregatedContractAddress, testContracts, mainContracts } = require('../../../../config/serverless/domain'); let currentBlockNbr; let oneDayAgoBlock; @@ -45,7 +45,7 @@ const pools = [ }, ]; -const saveVault = async (data) => { +const saveVaultWithApy = async (data) => { // const params = { // TableName: "vaultApy", // Item: data, @@ -59,12 +59,11 @@ const saveVault = async (data) => { console.log(`Saved ${data.name}`); }; -const saveHistoricalAPY = async (data) => { - console.log('history-apy', data) - await historicalDb.add(data).catch((err) => console.log('err', err)); +const saveHistoricalAPY = async (data, collection) => { + await historicalDb.add(data, collection).catch((err) => console.log('err', err)); }; -const getApy = async ( +const getApy = ( previousValue, currentValue, previousBlockNbr, @@ -73,10 +72,10 @@ const getApy = async ( if (!previousValue) { return 0; } - const pricePerFullShareDelta = (currentValue - previousValue) / 1e18; const blockDelta = currentBlockNbr - previousBlockNbr; - const dailyRoi = (pricePerFullShareDelta / blockDelta) * 100 * nbrBlocksInDay; - const yearlyRoi = dailyRoi * 365; + const returnSincePrevBlock = (currentValue - previousValue) / previousValue; + const days = blockDelta / nbrBlocksInDay; + const yearlyRoi = 100 * ((1 + returnSincePrevBlock) ** (365.2425 / days) - 1); return yearlyRoi; }; @@ -96,6 +95,7 @@ const getPricePerFullShare = async ( ) => { const contractDidntExist = block < inceptionBlockNbr; const inceptionBlock = block === inceptionBlockNbr; + if (inceptionBlock) { return 1e18; } @@ -157,7 +157,7 @@ const getApyForVault = async (vault) => { inceptionBlockNbr ); - const apyInceptionSample = await getApy( + const apyInceptionSample = getApy( pricePerFullShareInception, pricePerFullShareCurrent, inceptionBlockNbr, @@ -165,7 +165,7 @@ const getApyForVault = async (vault) => { ); const apyOneDaySample = - (await getApy( + (getApy( pricePerFullShareOneDayAgo, pricePerFullShareCurrent, oneDayAgoBlock, @@ -173,7 +173,7 @@ const getApyForVault = async (vault) => { )) || apyInceptionSample; const apyThreeDaySample = - (await getApy( + (getApy( pricePerFullShareThreeDaysAgo, pricePerFullShareCurrent, threeDaysAgoBlock, @@ -181,7 +181,7 @@ const getApyForVault = async (vault) => { )) || apyInceptionSample; const apyOneWeekSample = - (await getApy( + (getApy( pricePerFullShareOneWeekAgo, pricePerFullShareCurrent, oneWeekAgoBlock, @@ -189,7 +189,7 @@ const getApyForVault = async (vault) => { )) || apyInceptionSample; const apyOneMonthSample = - (await getApy( + (getApy( pricePerFullShareOneMonthAgo, pricePerFullShareCurrent, oneMonthAgoBlock, @@ -255,9 +255,25 @@ const getLoanscanApyForVault = async (vault) => { const getHistoricalAPY = async (startTime, contractAddress) => { var result = []; - if (contractAddress == devContract.devYfUSDTContract || contractAddress == prodContract.prodYfUSDTContract) { - result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime()) + switch (contractAddress.toLowerCase()) { + case testContracts.vault['yUSDT'].address: + case mainContracts.vault['yUSDT'].address: + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.usdtFarmer); + break; + case testContracts.vault['yUSDC'].address: + case mainContracts.vault['yUSDC'].address: + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.usdcFarmer); + break; + case testContracts.vault['yDAI'].address: + case mainContracts.vault['yDAI'].address: + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.daiFarmer); + break; + case testContracts.vault['yTUSD'].address: + case mainContracts.vault['yTUSD'].address: + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.tusdFarmer); + break; } + return result; } @@ -276,10 +292,9 @@ const readVault = async (vault) => { console.log(`Vault ABI not found: ${name}`); return null; } - const contract = new infuraWeb3.eth.Contract(abi, address); + // const contract = new infuraWeb3.eth.Contract(abi, address); const apy = await getApyForVault(vault); // const loanscanApy = await getLoanscanApyForVault(vault); - console.log("Vault: ", name, apy); const data = { address, name, @@ -291,7 +306,7 @@ const readVault = async (vault) => { timestamp: Date.now(), ...apy, }; - await saveVault(data); + await saveVaultWithApy(data); return data; }; @@ -311,7 +326,7 @@ const saveAndReadVault = async (vault) => { return null; } const apy = await getApyForVault(vault); - const aprContract = new infuraWeb3.eth.Contract(aggregatedContractABI, prodContract.aggregatedContractAddress); + const aprContract = new infuraWeb3.eth.Contract(aggregatedContractABI, aggregatedContractAddress); var call = 'getAPROptions';//+asset.symbol var aprs = 0; aprs = await aprContract.methods[call](vault.erc20address).call(); @@ -328,13 +343,12 @@ const saveAndReadVault = async (vault) => { })) aprs = infuraWeb3.utils.fromWei(maxApr.toFixed(0), 'ether') - console.log("Vault: ", name, apy); const data = { ...apy, aprs, symbol }; - await saveHistoricalAPY(data); + await saveHistoricalAPY(data, vaultSymbol + '_historical-apy'); return data; }; diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 1238a42..387320f 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -152,7 +152,7 @@ module.exports = [ // description: "DAI Stablecoin", // vaultSymbol: "yDAI", // erc20address: "0x6b175474e89094c44da98b954eedeac495271d0f", - // vaultContractAddress: "0xACd43E627e64355f1861cEC6d3a6688B31a6F952", + // vaultContractAddress: "0xacd43e627e64355f1861cec6d3a6688b31a6f952", // vaultContractABI: config.vaultContractV2ABI, // balance: 0, // vaultBalance: 0, @@ -172,7 +172,7 @@ module.exports = [ // description: "TrueUSD", // vaultSymbol: "yTUSD", // erc20address: "0x0000000000085d4780B73119b644AE5ecd22b376", - // vaultContractAddress: "0x37d19d1c4E1fa9DC47bD1eA12f742a0887eDa74a", + // vaultContractAddress: "0x37d19d1c4e1fa9dc47bd1ea12f742a0887eda74a", // vaultContractABI: config.vaultContractV2ABI, // balance: 0, // vaultBalance: 0, @@ -192,7 +192,7 @@ module.exports = [ // description: "USD//C", // vaultSymbol: "yUSDC", // erc20address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - // vaultContractAddress: "0x597aD1e0c13Bfe8025993D9e79C69E1c0233522e", + // vaultContractAddress: "0x597ad1e0c13bfe8025993d9e79c69e1c0233522e", // vaultContractABI: config.vaultContractABI, // balance: 0, // vaultBalance: 0, @@ -205,14 +205,94 @@ module.exports = [ // measurement: 1e18, // price_id: "usd-coin", // }, + // { + // id: "USDT", + // name: "USDT", + // symbol: "USDT", + // description: "Tether USD", + // vaultSymbol: "yUSDT", + // erc20address: "0xdac17f958d2ee523a2206206994597c13d831ec7", + // vaultContractAddress: "0x2f08119c6f07c006695e079aafc638b8789faf18", + // vaultContractABI: config.vaultContractV2ABI, + // balance: 0, + // vaultBalance: 0, + // decimals: 6, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // lastMeasurement: 10651402, + // measurement: 1e18, + // price_id: "tether", + // }, + { + id: "DAI", + name: "DAI", + symbol: "DAI", + description: "DAI Stablecoin", + vaultSymbol: "yDAI", + erc20address: "0x5592ec0cfb4dbc12d3ab100b257153436a1f0fea", + vaultContractAddress: "0x193b83e8cc108c86362e47a4c2d3048837d4996e", + vaultContractABI: config.vaultContractV2ABI, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 10650116, + measurement: 1e18, + price_id: "dai", + }, + { + id: "TUSD", + name: "TUSD", + symbol: "TUSD", + description: "TrueUSD", + vaultSymbol: "yTUSD", + erc20address: "0xe1964bdd447ee6f0ee2bc734f1043eba35444cfc", + vaultContractAddress: "0x0c9ddf949e32221612145807e34483ccf946b2b9", + vaultContractABI: config.vaultContractV2ABI, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 10603368, + measurement: 1e18, + price_id: "true-usd", + }, + { + id: "USDC", + name: "USD Coin", + symbol: "USDC", + description: "USD//C", + vaultSymbol: "yUSDC", + erc20address: "0x4dbcdf9b62e891a7cec5a2568c3f4faf9e8abe2b", + vaultContractAddress: "0x231991d392dbe5980586665bc1a066f8efac78c8", + vaultContractABI: config.vaultContractABI, + balance: 0, + vaultBalance: 0, + decimals: 6, + deposit: true, + depositAll: false, + withdraw: true, + withdrawAll: false, + lastMeasurement: 10532708, + measurement: 1e18, + price_id: "usd-coin", + }, { id: "USDT", name: "USDT", symbol: "USDT", description: "Tether USD", vaultSymbol: "yUSDT", - erc20address: "0xdAC17F958D2ee523a2206206994597C13D831ec7", - vaultContractAddress: "0x2f08119C6f07c006695E079AAFc638b8789FAf18", + erc20address: "0xd9ba894e0097f8cc2bbc9d24d308b98e36dc6d02", + vaultContractAddress: "0x359902517f43b8d38cf9718fe90e552375476f05", vaultContractABI: config.vaultContractV2ABI, balance: 0, vaultBalance: 0, diff --git a/services/vaults/price/handler.js b/services/vaults/price/handler.js index 72bcf7c..547170d 100644 --- a/services/vaults/price/handler.js +++ b/services/vaults/price/handler.js @@ -3,6 +3,8 @@ const { devContract, prodContract, + testContracts, + mainContracts, } = require('../../../config/serverless/domain'); const earnABIContract = require('../../../config/abi').earnABIContract; const vaultABIContract = require('../../../config/abi').vaultABIContract; @@ -14,34 +16,31 @@ const db = require('../../../models/price.model'); const moment = require("moment"); const getCurrentPrice = async () => { - let earnAddress = ""; - let vaultAddress = ""; - - if (process.env.PRODUCTION != null && process.env.PRODUCTION != '') { - earnAddress = prodContract.prodEarnContract; - vaultAddress = prodContract.prodVaultContract; - } else { - earnAddress = devContract.devEarnContract; - vaultAddress = devContract.devVaultContract; - } + let contracts = process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? mainContracts : testContracts; + for (const key of Object.keys(contracts.earn)) { + const earnContract = getContract(contracts.earn[key].abi, contracts.earn[key].address); + const vaultContract = getContract(contracts.vault[key].abi, contracts.vault[key].address); - const earnContract = getContract(earnABIContract, earnAddress); - const vaultContract = getContract(vaultABIContract, vaultAddress); - - const earnPricePerFullShare = await getPricePerFullShare(earnContract); - const vaultPricePerFullShare = await getPricePerFullShare(vaultContract); - await db.add({ - earnPrice: earnPricePerFullShare, - vaultPrice: vaultPricePerFullShare, - }).catch((err) => console.log('err', err)); + try { + const earnPricePerFullShare = await getPricePerFullShare(earnContract); + const vaultPricePerFullShare = await getPricePerFullShare(vaultContract); + await db.add(key + '_price', { + earnPrice: earnPricePerFullShare, + vaultPrice: vaultPricePerFullShare, + }).catch((err) => console.log('err', err)); + } catch (err) { + await db.add(key + '_price', { + earnPrice: "0", + vaultPrice: "0", + }).catch((err) => console.log('err', err)); + } + } } -const getHistoricalPrice = async (startTime, contractAddress) => { +const getHistoricalPrice = async (startTime, collection) => { var result = []; - if (contractAddress == devContract.devYfUSDTContract || contractAddress == prodContract.prodYfUSDTContract) { - result = await db.findPriceWithTimePeriods(startTime, new Date().getTime()) - } + result = await db.findPriceWithTimePeriods(collection, startTime, new Date().getTime()) return result; } @@ -55,12 +54,34 @@ module.exports.handleHistoricialPrice = async (req, res) => { message: 'Days is empty.', body: null }); - } else if (req.params.contractAddress == null || req.params.contractAddress == '') { + } else if (req.params.farmer == null || req.params.farmer == '') { res.status(200).json({ - message: 'Contract Address is empty.', + message: 'Farmer is empty.', body: null }); } else { + let collection = ''; + switch (req.params.farmer) { + case db.usdtFarmer: + collection = db.usdtFarmer; + break; + case db.usdcFarmer: + collection = db.usdcFarmer; + break; + case db.daiFarmer: + collection = db.daiFarmer; + break; + case db.tusdFarmer: + collection = db.tusdFarmer; + break; + default: + res.status(200).json({ + message: 'Invalid Farmer', + body: null + }) + return; + } + var startTime = -1; switch (req.params.days) { case '30d': @@ -75,7 +96,7 @@ module.exports.handleHistoricialPrice = async (req, res) => { } if (startTime !== -1) { - var result = await getHistoricalPrice(startTime.unix(), req.params.contractAddress); + var result = await getHistoricalPrice(startTime.unix(), collection); const resultMapping = (price) => { delete price._id; return price; From 59fa3295d752c61467260d255a9bb4e47669c604 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Tue, 23 Mar 2021 20:57:46 +0800 Subject: [PATCH 024/254] Change to mainnet vault --- services/vaults/apy/save/vaults.js | 176 ++++++++++++++--------------- 1 file changed, 88 insertions(+), 88 deletions(-) diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 387320f..926ad2d 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -145,94 +145,14 @@ module.exports = [ // measurement: 1e18, // price_id: "lp-sbtc-curve", // }, - // { - // id: "DAI", - // name: "DAI", - // symbol: "DAI", - // description: "DAI Stablecoin", - // vaultSymbol: "yDAI", - // erc20address: "0x6b175474e89094c44da98b954eedeac495271d0f", - // vaultContractAddress: "0xacd43e627e64355f1861cec6d3a6688b31a6f952", - // vaultContractABI: config.vaultContractV2ABI, - // balance: 0, - // vaultBalance: 0, - // decimals: 18, - // deposit: true, - // depositAll: true, - // withdraw: true, - // withdrawAll: true, - // lastMeasurement: 10650116, - // measurement: 1e18, - // price_id: "dai", - // }, - // { - // id: "TUSD", - // name: "TUSD", - // symbol: "TUSD", - // description: "TrueUSD", - // vaultSymbol: "yTUSD", - // erc20address: "0x0000000000085d4780B73119b644AE5ecd22b376", - // vaultContractAddress: "0x37d19d1c4e1fa9dc47bd1ea12f742a0887eda74a", - // vaultContractABI: config.vaultContractV2ABI, - // balance: 0, - // vaultBalance: 0, - // decimals: 18, - // deposit: true, - // depositAll: true, - // withdraw: true, - // withdrawAll: true, - // lastMeasurement: 10603368, - // measurement: 1e18, - // price_id: "true-usd", - // }, - // { - // id: "USDC", - // name: "USD Coin", - // symbol: "USDC", - // description: "USD//C", - // vaultSymbol: "yUSDC", - // erc20address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - // vaultContractAddress: "0x597ad1e0c13bfe8025993d9e79c69e1c0233522e", - // vaultContractABI: config.vaultContractABI, - // balance: 0, - // vaultBalance: 0, - // decimals: 6, - // deposit: true, - // depositAll: false, - // withdraw: true, - // withdrawAll: false, - // lastMeasurement: 10532708, - // measurement: 1e18, - // price_id: "usd-coin", - // }, - // { - // id: "USDT", - // name: "USDT", - // symbol: "USDT", - // description: "Tether USD", - // vaultSymbol: "yUSDT", - // erc20address: "0xdac17f958d2ee523a2206206994597c13d831ec7", - // vaultContractAddress: "0x2f08119c6f07c006695e079aafc638b8789faf18", - // vaultContractABI: config.vaultContractV2ABI, - // balance: 0, - // vaultBalance: 0, - // decimals: 6, - // deposit: true, - // depositAll: true, - // withdraw: true, - // withdrawAll: true, - // lastMeasurement: 10651402, - // measurement: 1e18, - // price_id: "tether", - // }, { id: "DAI", name: "DAI", symbol: "DAI", description: "DAI Stablecoin", vaultSymbol: "yDAI", - erc20address: "0x5592ec0cfb4dbc12d3ab100b257153436a1f0fea", - vaultContractAddress: "0x193b83e8cc108c86362e47a4c2d3048837d4996e", + erc20address: "0x6b175474e89094c44da98b954eedeac495271d0f", + vaultContractAddress: "0xacd43e627e64355f1861cec6d3a6688b31a6f952", vaultContractABI: config.vaultContractV2ABI, balance: 0, vaultBalance: 0, @@ -251,8 +171,8 @@ module.exports = [ symbol: "TUSD", description: "TrueUSD", vaultSymbol: "yTUSD", - erc20address: "0xe1964bdd447ee6f0ee2bc734f1043eba35444cfc", - vaultContractAddress: "0x0c9ddf949e32221612145807e34483ccf946b2b9", + erc20address: "0x0000000000085d4780B73119b644AE5ecd22b376", + vaultContractAddress: "0x37d19d1c4e1fa9dc47bd1ea12f742a0887eda74a", vaultContractABI: config.vaultContractV2ABI, balance: 0, vaultBalance: 0, @@ -271,8 +191,8 @@ module.exports = [ symbol: "USDC", description: "USD//C", vaultSymbol: "yUSDC", - erc20address: "0x4dbcdf9b62e891a7cec5a2568c3f4faf9e8abe2b", - vaultContractAddress: "0x231991d392dbe5980586665bc1a066f8efac78c8", + erc20address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + vaultContractAddress: "0x597ad1e0c13bfe8025993d9e79c69e1c0233522e", vaultContractABI: config.vaultContractABI, balance: 0, vaultBalance: 0, @@ -291,8 +211,8 @@ module.exports = [ symbol: "USDT", description: "Tether USD", vaultSymbol: "yUSDT", - erc20address: "0xd9ba894e0097f8cc2bbc9d24d308b98e36dc6d02", - vaultContractAddress: "0x359902517f43b8d38cf9718fe90e552375476f05", + erc20address: "0xdac17f958d2ee523a2206206994597c13d831ec7", + vaultContractAddress: "0x2f08119c6f07c006695e079aafc638b8789faf18", vaultContractABI: config.vaultContractV2ABI, balance: 0, vaultBalance: 0, @@ -306,6 +226,86 @@ module.exports = [ price_id: "tether", }, // { + // id: "DAI", + // name: "DAI", + // symbol: "DAI", + // description: "DAI Stablecoin", + // vaultSymbol: "yDAI", + // erc20address: "0x5592ec0cfb4dbc12d3ab100b257153436a1f0fea", + // vaultContractAddress: "0x193b83e8cc108c86362e47a4c2d3048837d4996e", + // vaultContractABI: config.vaultContractV2ABI, + // balance: 0, + // vaultBalance: 0, + // decimals: 18, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // lastMeasurement: 10650116, + // measurement: 1e18, + // price_id: "dai", + // }, + // { + // id: "TUSD", + // name: "TUSD", + // symbol: "TUSD", + // description: "TrueUSD", + // vaultSymbol: "yTUSD", + // erc20address: "0xe1964bdd447ee6f0ee2bc734f1043eba35444cfc", + // vaultContractAddress: "0x0c9ddf949e32221612145807e34483ccf946b2b9", + // vaultContractABI: config.vaultContractV2ABI, + // balance: 0, + // vaultBalance: 0, + // decimals: 18, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // lastMeasurement: 10603368, + // measurement: 1e18, + // price_id: "true-usd", + // }, + // { + // id: "USDC", + // name: "USD Coin", + // symbol: "USDC", + // description: "USD//C", + // vaultSymbol: "yUSDC", + // erc20address: "0x4dbcdf9b62e891a7cec5a2568c3f4faf9e8abe2b", + // vaultContractAddress: "0x231991d392dbe5980586665bc1a066f8efac78c8", + // vaultContractABI: config.vaultContractABI, + // balance: 0, + // vaultBalance: 0, + // decimals: 6, + // deposit: true, + // depositAll: false, + // withdraw: true, + // withdrawAll: false, + // lastMeasurement: 10532708, + // measurement: 1e18, + // price_id: "usd-coin", + // }, + // { + // id: "USDT", + // name: "USDT", + // symbol: "USDT", + // description: "Tether USD", + // vaultSymbol: "yUSDT", + // erc20address: "0xd9ba894e0097f8cc2bbc9d24d308b98e36dc6d02", + // vaultContractAddress: "0x359902517f43b8d38cf9718fe90e552375476f05", + // vaultContractABI: config.vaultContractV2ABI, + // balance: 0, + // vaultBalance: 0, + // decimals: 6, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // lastMeasurement: 10651402, + // measurement: 1e18, + // price_id: "tether", + // }, + // { // id: "aLINK", // name: "aLINK", // symbol: "aLINK", From b616532af314c45d3c4c7483f1ab5ec7505d16b3 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Tue, 23 Mar 2021 21:25:22 +0800 Subject: [PATCH 025/254] Added error handling --- services/vaults/save/handler.js | 102 +++++++++++++++++--------------- 1 file changed, 53 insertions(+), 49 deletions(-) diff --git a/services/vaults/save/handler.js b/services/vaults/save/handler.js index ab7c8cc..e6a4e3a 100644 --- a/services/vaults/save/handler.js +++ b/services/vaults/save/handler.js @@ -87,55 +87,59 @@ module.exports.handler = async () => { await delay(delayTime); const getVault = async (vaultAddress, idx) => { - const controllerAddress = vaultInfo.controllerArray[idx]; - const strategyAddress = vaultInfo.strategyArray[idx]; - const vaultContract = await getContract(vaultAddress); - const controllerContract = await getContract(controllerAddress); - const strategyContract = await getContract(strategyAddress); - const vaultName = await callContractMethod(vaultContract, "name"); - const vaultSymbol = await callContractMethod(vaultContract, "symbol"); - const tokenSymbol = vaultSymbol.substring(1); - const tokenAddress = vaultInfo.tokenArray[idx]; - const tokenName = vaultName.substring(6); - const decimals = parseInt( - await callContractMethod(vaultContract, "decimals"), - 10 - ); - - const tokenInfo = await fetch( - `https://api.coingecko.com/api/v3/coins/ethereum/contract/${tokenAddress}` - ).then((res) => res.json()); - - if (tokenInfo) { - const tokenSymbolAlias = tokenSymbolAliases[tokenSymbol] || tokenSymbol; - const symbolAlias = symbolAliases[vaultSymbol] || `y${tokenSymbolAlias}`; - const vaultAlias = - vaultAliases[vaultAddress] || `${tokenSymbolAlias} Vault`; - const tokenIcon = tokenInfo.image ? tokenInfo.image.large : ''; - const vaultIcon = vaultIcons[tokenSymbol]; - const vault = { - address: vaultAddress, - name: vaultName, - vaultAlias, - vaultIcon, - symbol: vaultSymbol, - symbolAlias, - controllerAddress: controllerAddress, - controllerName: await fetchContractName(controllerAddress), - strategyAddress: strategyAddress, - strategyName: await fetchContractName(strategyAddress), - tokenAddress: tokenAddress, - tokenName: tokenName, - tokenSymbol: tokenSymbol, - tokenSymbolAlias, - tokenIcon: tokenIcon, - decimals: decimals, - wrapped: vaultInfo.isWrappedArray[idx], - delegated: vaultInfo.isDelegatedArray[idx], - timestamp: Date.now(), - }; - await saveVault(vault); - return vault; + try { + const controllerAddress = vaultInfo.controllerArray[idx]; + const strategyAddress = vaultInfo.strategyArray[idx]; + const vaultContract = await getContract(vaultAddress); + const controllerContract = await getContract(controllerAddress); + const strategyContract = await getContract(strategyAddress); + const vaultName = await callContractMethod(vaultContract, "name"); + const vaultSymbol = await callContractMethod(vaultContract, "symbol"); + const tokenSymbol = vaultSymbol.substring(1); + const tokenAddress = vaultInfo.tokenArray[idx]; + const tokenName = vaultName.substring(6); + const decimals = parseInt( + await callContractMethod(vaultContract, "decimals"), + 10 + ); + + const tokenInfo = await fetch( + `https://api.coingecko.com/api/v3/coins/ethereum/contract/${tokenAddress}` + ).then((res) => res.json()); + + if (tokenInfo) { + const tokenSymbolAlias = tokenSymbolAliases[tokenSymbol] || tokenSymbol; + const symbolAlias = symbolAliases[vaultSymbol] || `y${tokenSymbolAlias}`; + const vaultAlias = + vaultAliases[vaultAddress] || `${tokenSymbolAlias} Vault`; + const tokenIcon = tokenInfo.image ? tokenInfo.image.large : ''; + const vaultIcon = vaultIcons[tokenSymbol]; + const vault = { + address: vaultAddress, + name: vaultName, + vaultAlias, + vaultIcon, + symbol: vaultSymbol, + symbolAlias, + controllerAddress: controllerAddress, + controllerName: await fetchContractName(controllerAddress), + strategyAddress: strategyAddress, + strategyName: await fetchContractName(strategyAddress), + tokenAddress: tokenAddress, + tokenName: tokenName, + tokenSymbol: tokenSymbol, + tokenSymbolAlias, + tokenIcon: tokenIcon, + decimals: decimals, + wrapped: vaultInfo.isWrappedArray[idx], + delegated: vaultInfo.isDelegatedArray[idx], + timestamp: Date.now(), + }; + await saveVault(vault); + return vault; + } + } catch (err) { + console.log(err); } return; From 499e168b70369927d4dfa7a665b485d6259adf47 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Tue, 23 Mar 2021 22:08:02 +0800 Subject: [PATCH 026/254] Update memory --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ae1db25..ffc8ab0 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "", "main": "app.js", "scripts": { - "start": "node --max-old-space-size=4096 app.js -enableServer 1" + "start": "node --max-old-space-size=8192 app.js -enableServer 1" }, "devDependencies": { "prettier": "^2.1.1", From ffd943fde37b4a1a7e61a240ed4036e5fe696ef7 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Tue, 23 Mar 2021 22:17:39 +0800 Subject: [PATCH 027/254] Revamp block calculation --- .../vaults/apy/save/ethereum-block-by-date.js | 269 +++++++++--------- 1 file changed, 128 insertions(+), 141 deletions(-) diff --git a/services/vaults/apy/save/ethereum-block-by-date.js b/services/vaults/apy/save/ethereum-block-by-date.js index 505616e..ae2e5f6 100644 --- a/services/vaults/apy/save/ethereum-block-by-date.js +++ b/services/vaults/apy/save/ethereum-block-by-date.js @@ -1,146 +1,133 @@ +/* eslint-disable */ + /** * Forked/modified version of etehereum-block-by-date * Made the library synchronous and added delays for rate-limited arachivenode */ -const moment = require("moment"); -const delay = require("delay"); - -module.exports = class { - constructor(web3, delayTime) { - this.web3 = web3; - this.checkedBlocks = {}; - this.savedBlocks = {}; - this.requests = 0; - this.delayTime = delayTime; - } - - async getBlockTime() { - let latest = await this.getBlockWrapper("latest"); - let first = await this.getBlockWrapper(1); - this.blockTime = - (parseInt(latest.timestamp, 10) - parseInt(first.timestamp, 10)) / - (parseInt(latest.number, 10) - 1); - this.firstTimestamp = moment.unix(first.timestamp); - } - - async getDate(date, after = true) { - if (!moment.isMoment(date)) date = moment(date).utc(); - if ( - typeof this.firstTimestamp == "undefined" || - this.blockTime == "undefined" - ) - await this.getBlockTime(); - if (date.isBefore(this.firstTimestamp)) - return { date: date.format(), block: 1 }; - if (date.isSameOrAfter(this.savedBlocks.latest)) - return { - date: date.format(), - block: await this.web3.eth.getBlockNumber(), - }; - await delay(this.delayTime); - this.checkedBlocks[date.unix()] = []; - let predictedBlock = await this.getBlockWrapper( - Math.ceil( - date.diff(this.firstTimestamp, "seconds") / this.blockTime - ) - ); - return { - date: date.format(), - block: await this.findBetter(date, predictedBlock, after), - }; - } - - async getEvery(duration, start, end, every = 1, after = true) { - (start = moment(start)), (end = moment(end)); - let current = start, - dates = []; - while (current.isSameOrBefore(end)) { - dates.push(current.format()); - current.add(every, duration); - } - if ( - typeof this.firstTimestamp == "undefined" || - this.blockTime == "undefined" - ) - await this.getBlockTime(); - return await Promise.all( - dates.map((date) => this.getDate(date, after)) - ); - } - - async findBetter(date, predictedBlock, after, blockTime = this.blockTime) { - if (await this.isBetterBlock(date, predictedBlock, after)) - return predictedBlock.number; - let difference = date.diff( - moment.unix(predictedBlock.timestamp), - "seconds" - ); - let skip = Math.ceil(difference / blockTime); - if (skip == 0) skip = difference < 0 ? -1 : 1; - let nextPredictedBlock = await this.getBlockWrapper( - this.getNextBlock(date, predictedBlock.number, skip) - ); - blockTime = Math.abs( - (parseInt(predictedBlock.timestamp, 10) - - parseInt(nextPredictedBlock.timestamp, 10)) / - (parseInt(predictedBlock.number, 10) - - parseInt(nextPredictedBlock.number, 10)) - ); - return this.findBetter(date, nextPredictedBlock, after, blockTime); - } - - async isBetterBlock(date, predictedBlock, after) { - let blockTime = moment.unix(predictedBlock.timestamp); - if (after) { - if (blockTime.isBefore(date)) return false; - let previousBlock = await this.getBlockWrapper( - predictedBlock.number - 1 - ); - if ( - blockTime.isSameOrAfter(date) && - moment.unix(previousBlock.timestamp).isBefore(date) - ) - return true; - } else { - if (blockTime.isSameOrAfter(date)) return false; - let nextBlock = await this.getBlockWrapper( - predictedBlock.number + 1 - ); - if ( - blockTime.isBefore(date) && - moment.unix(nextBlock.timestamp).isSameOrAfter(date) - ) - return true; - } - return false; - } - - getNextBlock(date, currentBlock, skip) { - let nextBlock = currentBlock + skip; - if (this.checkedBlocks[date.unix()].includes(nextBlock)) - return this.getNextBlock( - date, - currentBlock, - skip < 0 ? ++skip : --skip - ); - this.checkedBlocks[date.unix()].push(nextBlock); - return nextBlock; - } - - async getBlockWrapper(block) { - if (this.savedBlocks[block]) return this.savedBlocks[block]; - let { timestamp } = await this.web3.eth.getBlock(block); - await delay(this.delayTime); - this.savedBlocks[block] = { - timestamp: timestamp, - number: - block == "latest" - ? await this.web3.eth.getBlockNumber() - : block, - }; - await delay(this.delayTime); - this.requests++; - return this.savedBlocks[block]; - } -}; + const moment = require('moment'); + const delay = require('delay'); + + module.exports = class { + constructor(web3, delayTime) { + this.web3 = web3; + this.checkedBlocks = {}; + this.savedBlocks = {}; + this.requests = 0; + this.delayTime = delayTime; + } + + async getBlockTime() { + let latest = await this.getBlockWrapper('latest'); + let first = await this.getBlockWrapper(1); + this.blockTime = + (parseInt(latest.timestamp, 10) - parseInt(first.timestamp, 10)) / + (parseInt(latest.number, 10) - 1); + this.firstTimestamp = moment.unix(first.timestamp); + } + + async getDate(date, after = true) { + if (!moment.isMoment(date)) date = moment(date).utc(); + if ( + typeof this.firstTimestamp == 'undefined' || + this.blockTime == 'undefined' + ) + await this.getBlockTime(); + if (date.isBefore(this.firstTimestamp)) + return { date: date.format(), block: 1 }; + if (date.isSameOrAfter(this.savedBlocks.latest)) + return { + date: date.format(), + block: await this.web3.eth.getBlockNumber(), + }; + await delay(this.delayTime); + this.checkedBlocks[date.unix()] = []; + let predictedBlock = await this.getBlockWrapper( + Math.ceil(date.diff(this.firstTimestamp, 'seconds') / this.blockTime), + ); + return { + date: date.format(), + block: await this.findBetter(date, predictedBlock, after), + }; + } + + async getEvery(duration, start, end, every = 1, after = true) { + (start = moment(start)), (end = moment(end)); + let current = start, + dates = []; + while (current.isSameOrBefore(end)) { + dates.push(current.format()); + current.add(every, duration); + } + if ( + typeof this.firstTimestamp == 'undefined' || + this.blockTime == 'undefined' + ) + await this.getBlockTime(); + return await Promise.all(dates.map((date) => this.getDate(date, after))); + } + + async findBetter(date, predictedBlock, after, blockTime = this.blockTime) { + if (await this.isBetterBlock(date, predictedBlock, after)) + return predictedBlock.number; + let difference = date.diff( + moment.unix(predictedBlock.timestamp), + 'seconds', + ); + let skip = Math.ceil(difference / blockTime); + if (skip == 0) skip = difference < 0 ? -1 : 1; + let nextPredictedBlock = await this.getBlockWrapper( + this.getNextBlock(date, predictedBlock.number, skip), + ); + blockTime = Math.abs( + (parseInt(predictedBlock.timestamp, 10) - + parseInt(nextPredictedBlock.timestamp, 10)) / + (parseInt(predictedBlock.number, 10) - + parseInt(nextPredictedBlock.number, 10)), + ); + return this.findBetter(date, nextPredictedBlock, after, blockTime); + } + + async isBetterBlock(date, predictedBlock, after) { + let blockTime = moment.unix(predictedBlock.timestamp); + if (after) { + if (blockTime.isBefore(date)) return false; + let previousBlock = await this.getBlockWrapper(predictedBlock.number - 1); + if ( + blockTime.isSameOrAfter(date) && + moment.unix(previousBlock.timestamp).isBefore(date) + ) + return true; + } else { + if (blockTime.isSameOrAfter(date)) return false; + let nextBlock = await this.getBlockWrapper(predictedBlock.number + 1); + if ( + blockTime.isBefore(date) && + moment.unix(nextBlock.timestamp).isSameOrAfter(date) + ) + return true; + } + return false; + } + + getNextBlock(date, currentBlock, skip) { + let nextBlock = currentBlock + skip; + if (this.checkedBlocks[date.unix()].includes(nextBlock)) + return this.getNextBlock(date, currentBlock, skip < 0 ? ++skip : --skip); + this.checkedBlocks[date.unix()].push(nextBlock); + return nextBlock; + } + + async getBlockWrapper(block) { + if (this.savedBlocks[block]) return this.savedBlocks[block]; + let { timestamp } = await this.web3.eth.getBlock(block); + await delay(this.delayTime); + this.savedBlocks[block] = { + timestamp: timestamp, + number: block == 'latest' ? await this.web3.eth.getBlockNumber() : block, + }; + await delay(this.delayTime); + this.requests++; + return this.savedBlocks[block]; + } + }; \ No newline at end of file From 9f29e1c3b414da69435578b57fee53b399bff63a Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Wed, 24 Mar 2021 01:17:21 +0800 Subject: [PATCH 028/254] Updated block by date --- .../vaults/apy/save/ethereum-block-by-date.js | 269 +++++++++--------- services/vaults/save/handler.js | 4 +- 2 files changed, 142 insertions(+), 131 deletions(-) diff --git a/services/vaults/apy/save/ethereum-block-by-date.js b/services/vaults/apy/save/ethereum-block-by-date.js index ae2e5f6..505616e 100644 --- a/services/vaults/apy/save/ethereum-block-by-date.js +++ b/services/vaults/apy/save/ethereum-block-by-date.js @@ -1,133 +1,146 @@ -/* eslint-disable */ - /** * Forked/modified version of etehereum-block-by-date * Made the library synchronous and added delays for rate-limited arachivenode */ - const moment = require('moment'); - const delay = require('delay'); - - module.exports = class { - constructor(web3, delayTime) { - this.web3 = web3; - this.checkedBlocks = {}; - this.savedBlocks = {}; - this.requests = 0; - this.delayTime = delayTime; - } - - async getBlockTime() { - let latest = await this.getBlockWrapper('latest'); - let first = await this.getBlockWrapper(1); - this.blockTime = - (parseInt(latest.timestamp, 10) - parseInt(first.timestamp, 10)) / - (parseInt(latest.number, 10) - 1); - this.firstTimestamp = moment.unix(first.timestamp); - } - - async getDate(date, after = true) { - if (!moment.isMoment(date)) date = moment(date).utc(); - if ( - typeof this.firstTimestamp == 'undefined' || - this.blockTime == 'undefined' - ) - await this.getBlockTime(); - if (date.isBefore(this.firstTimestamp)) - return { date: date.format(), block: 1 }; - if (date.isSameOrAfter(this.savedBlocks.latest)) - return { - date: date.format(), - block: await this.web3.eth.getBlockNumber(), - }; - await delay(this.delayTime); - this.checkedBlocks[date.unix()] = []; - let predictedBlock = await this.getBlockWrapper( - Math.ceil(date.diff(this.firstTimestamp, 'seconds') / this.blockTime), - ); - return { - date: date.format(), - block: await this.findBetter(date, predictedBlock, after), - }; - } - - async getEvery(duration, start, end, every = 1, after = true) { - (start = moment(start)), (end = moment(end)); - let current = start, - dates = []; - while (current.isSameOrBefore(end)) { - dates.push(current.format()); - current.add(every, duration); - } - if ( - typeof this.firstTimestamp == 'undefined' || - this.blockTime == 'undefined' - ) - await this.getBlockTime(); - return await Promise.all(dates.map((date) => this.getDate(date, after))); - } - - async findBetter(date, predictedBlock, after, blockTime = this.blockTime) { - if (await this.isBetterBlock(date, predictedBlock, after)) - return predictedBlock.number; - let difference = date.diff( - moment.unix(predictedBlock.timestamp), - 'seconds', - ); - let skip = Math.ceil(difference / blockTime); - if (skip == 0) skip = difference < 0 ? -1 : 1; - let nextPredictedBlock = await this.getBlockWrapper( - this.getNextBlock(date, predictedBlock.number, skip), - ); - blockTime = Math.abs( - (parseInt(predictedBlock.timestamp, 10) - - parseInt(nextPredictedBlock.timestamp, 10)) / - (parseInt(predictedBlock.number, 10) - - parseInt(nextPredictedBlock.number, 10)), - ); - return this.findBetter(date, nextPredictedBlock, after, blockTime); - } - - async isBetterBlock(date, predictedBlock, after) { - let blockTime = moment.unix(predictedBlock.timestamp); - if (after) { - if (blockTime.isBefore(date)) return false; - let previousBlock = await this.getBlockWrapper(predictedBlock.number - 1); - if ( - blockTime.isSameOrAfter(date) && - moment.unix(previousBlock.timestamp).isBefore(date) - ) - return true; - } else { - if (blockTime.isSameOrAfter(date)) return false; - let nextBlock = await this.getBlockWrapper(predictedBlock.number + 1); - if ( - blockTime.isBefore(date) && - moment.unix(nextBlock.timestamp).isSameOrAfter(date) - ) - return true; - } - return false; - } - - getNextBlock(date, currentBlock, skip) { - let nextBlock = currentBlock + skip; - if (this.checkedBlocks[date.unix()].includes(nextBlock)) - return this.getNextBlock(date, currentBlock, skip < 0 ? ++skip : --skip); - this.checkedBlocks[date.unix()].push(nextBlock); - return nextBlock; - } - - async getBlockWrapper(block) { - if (this.savedBlocks[block]) return this.savedBlocks[block]; - let { timestamp } = await this.web3.eth.getBlock(block); - await delay(this.delayTime); - this.savedBlocks[block] = { - timestamp: timestamp, - number: block == 'latest' ? await this.web3.eth.getBlockNumber() : block, - }; - await delay(this.delayTime); - this.requests++; - return this.savedBlocks[block]; - } - }; \ No newline at end of file +const moment = require("moment"); +const delay = require("delay"); + +module.exports = class { + constructor(web3, delayTime) { + this.web3 = web3; + this.checkedBlocks = {}; + this.savedBlocks = {}; + this.requests = 0; + this.delayTime = delayTime; + } + + async getBlockTime() { + let latest = await this.getBlockWrapper("latest"); + let first = await this.getBlockWrapper(1); + this.blockTime = + (parseInt(latest.timestamp, 10) - parseInt(first.timestamp, 10)) / + (parseInt(latest.number, 10) - 1); + this.firstTimestamp = moment.unix(first.timestamp); + } + + async getDate(date, after = true) { + if (!moment.isMoment(date)) date = moment(date).utc(); + if ( + typeof this.firstTimestamp == "undefined" || + this.blockTime == "undefined" + ) + await this.getBlockTime(); + if (date.isBefore(this.firstTimestamp)) + return { date: date.format(), block: 1 }; + if (date.isSameOrAfter(this.savedBlocks.latest)) + return { + date: date.format(), + block: await this.web3.eth.getBlockNumber(), + }; + await delay(this.delayTime); + this.checkedBlocks[date.unix()] = []; + let predictedBlock = await this.getBlockWrapper( + Math.ceil( + date.diff(this.firstTimestamp, "seconds") / this.blockTime + ) + ); + return { + date: date.format(), + block: await this.findBetter(date, predictedBlock, after), + }; + } + + async getEvery(duration, start, end, every = 1, after = true) { + (start = moment(start)), (end = moment(end)); + let current = start, + dates = []; + while (current.isSameOrBefore(end)) { + dates.push(current.format()); + current.add(every, duration); + } + if ( + typeof this.firstTimestamp == "undefined" || + this.blockTime == "undefined" + ) + await this.getBlockTime(); + return await Promise.all( + dates.map((date) => this.getDate(date, after)) + ); + } + + async findBetter(date, predictedBlock, after, blockTime = this.blockTime) { + if (await this.isBetterBlock(date, predictedBlock, after)) + return predictedBlock.number; + let difference = date.diff( + moment.unix(predictedBlock.timestamp), + "seconds" + ); + let skip = Math.ceil(difference / blockTime); + if (skip == 0) skip = difference < 0 ? -1 : 1; + let nextPredictedBlock = await this.getBlockWrapper( + this.getNextBlock(date, predictedBlock.number, skip) + ); + blockTime = Math.abs( + (parseInt(predictedBlock.timestamp, 10) - + parseInt(nextPredictedBlock.timestamp, 10)) / + (parseInt(predictedBlock.number, 10) - + parseInt(nextPredictedBlock.number, 10)) + ); + return this.findBetter(date, nextPredictedBlock, after, blockTime); + } + + async isBetterBlock(date, predictedBlock, after) { + let blockTime = moment.unix(predictedBlock.timestamp); + if (after) { + if (blockTime.isBefore(date)) return false; + let previousBlock = await this.getBlockWrapper( + predictedBlock.number - 1 + ); + if ( + blockTime.isSameOrAfter(date) && + moment.unix(previousBlock.timestamp).isBefore(date) + ) + return true; + } else { + if (blockTime.isSameOrAfter(date)) return false; + let nextBlock = await this.getBlockWrapper( + predictedBlock.number + 1 + ); + if ( + blockTime.isBefore(date) && + moment.unix(nextBlock.timestamp).isSameOrAfter(date) + ) + return true; + } + return false; + } + + getNextBlock(date, currentBlock, skip) { + let nextBlock = currentBlock + skip; + if (this.checkedBlocks[date.unix()].includes(nextBlock)) + return this.getNextBlock( + date, + currentBlock, + skip < 0 ? ++skip : --skip + ); + this.checkedBlocks[date.unix()].push(nextBlock); + return nextBlock; + } + + async getBlockWrapper(block) { + if (this.savedBlocks[block]) return this.savedBlocks[block]; + let { timestamp } = await this.web3.eth.getBlock(block); + await delay(this.delayTime); + this.savedBlocks[block] = { + timestamp: timestamp, + number: + block == "latest" + ? await this.web3.eth.getBlockNumber() + : block, + }; + await delay(this.delayTime); + this.requests++; + return this.savedBlocks[block]; + } +}; diff --git a/services/vaults/save/handler.js b/services/vaults/save/handler.js index e6a4e3a..1b59536 100644 --- a/services/vaults/save/handler.js +++ b/services/vaults/save/handler.js @@ -138,9 +138,7 @@ module.exports.handler = async () => { await saveVault(vault); return vault; } - } catch (err) { - console.log(err); - } + } catch (err) {} return; }; From 65169c0fd39cb6360bd23e1816a360e2fc0e189a Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Sun, 28 Mar 2021 21:28:05 +0800 Subject: [PATCH 029/254] - Added Compound Farmer --- config/abi.js | 5799 ++++++++++++++++++ config/serverless/domain.js | 78 + models/historical-apy.model.js | 3 + models/price.model.js | 3 + services/user/vaults/statistics/handler.js | 20 +- services/user/vaults/transactions/handler.js | 3 - services/vaults/apy/save/handler.js | 317 +- services/vaults/apy/save/vaults.js | 271 +- services/vaults/price/handler.js | 45 +- 9 files changed, 6242 insertions(+), 297 deletions(-) diff --git a/config/abi.js b/config/abi.js index 3b31978..f9a91d5 100644 --- a/config/abi.js +++ b/config/abi.js @@ -5551,6 +5551,5800 @@ const yearnUSDTABIContract = [ } ]; +const compoundStrategyContract = [ + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_cToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_compToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_comptroller", + "type": "address" + }, + { + "internalType": "address", + "name": "_uniswapRouter", + "type": "address" + }, + { + "internalType": "address", + "name": "_WETH", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldCommunityWallet", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newCommunityWallet", + "type": "address" + } + ], + "name": "SetCommunityWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldCustomNetworkFeePercentage", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newCustomNetworkFeePercentage", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldCustomNetworkFeeTier", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newCustomNetworkFeeTier", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeeTier", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeePercentage", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeePercentage", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeeTier2", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeeTier2", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeeTier2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldProfileSharingFeePercentage", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newProfileSharingFeePercentage", + "type": "uint256" + } + ], + "name": "SetProfileSharingFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldTreasuryWallet", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newTreasuryWallet", + "type": "address" + } + ], + "name": "SetTreasuryWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DAOVault", + "outputs": [ + { + "internalType": "contract IDAOVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WETH", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "amountOutMinPerc", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "approveMigrate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cToken", + "outputs": [ + { + "internalType": "contract ICERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "compToken", + "outputs": [ + { + "internalType": "contract ICOMPERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "comptroller", + "outputs": [ + { + "internalType": "contract IComptroller", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeeTier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "deadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "getCurrentBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "result", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isVesting", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeeTier2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pool", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "profileSharingFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "refund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "revertVesting", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_percentage", + "type": "uint256" + } + ], + "name": "setAmountOutMinPerc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_communityWallet", + "type": "address" + } + ], + "name": "setCommunityWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_percentage", + "type": "uint256" + } + ], + "name": "setCustomNetworkFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_customNetworkFeeTier", + "type": "uint256" + } + ], + "name": "setCustomNetworkFeeTier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_seconds", + "type": "uint256" + } + ], + "name": "setDeadline", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeePercentage", + "type": "uint256[]" + } + ], + "name": "setNetworkFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeeTier2", + "type": "uint256[]" + } + ], + "name": "setNetworkFeeTier2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_percentage", + "type": "uint256" + } + ], + "name": "setProfileSharingFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_treasuryWallet", + "type": "address" + } + ], + "name": "setTreasuryWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "setVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "uniswapRouter", + "outputs": [ + { + "internalType": "contract IUniswapV2Router02", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vesting", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; + +const compoundVaultContract = [ + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_strategy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "fromStrategy", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toStrategy", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "MigrateFunds", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "LOCKTIME", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "canSetPendingStrategy", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "migrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingStrategy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "refund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pendingStrategy", + "type": "address" + } + ], + "name": "setPendingStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "strategy", + "outputs": [ + { + "internalType": "contract IStrategy", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unlockMigrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unlockTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; + +const cUSDTContract = [ + { + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address payable", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor", + "signature": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "cashPrior", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "interestAccumulated", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "borrowIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBorrows", + "type": "uint256" + } + ], + "name": "AccrueInterest", + "type": "event", + "signature": "0x4dec04e750ca11537cabcd8a9eab06494de08da3735bc8871cd41250e190bc04" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event", + "signature": "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accountBorrows", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBorrows", + "type": "uint256" + } + ], + "name": "Borrow", + "type": "event", + "signature": "0x13ed6866d4e1ee6da46f845c46d7e54120883d75c5ea9a2dacc1c4ca8984ab80" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "error", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "info", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "detail", + "type": "uint256" + } + ], + "name": "Failure", + "type": "event", + "signature": "0x45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa0" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "cTokenCollateral", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "seizeTokens", + "type": "uint256" + } + ], + "name": "LiquidateBorrow", + "type": "event", + "signature": "0x298637f684da70674f26509b10f07ec2fbc77a335ab1e7d6215a4b2484d8bb52" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + } + ], + "name": "Mint", + "type": "event", + "signature": "0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "NewAdmin", + "type": "event", + "signature": "0xf9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", + "type": "address" + } + ], + "name": "NewComptroller", + "type": "event", + "signature": "0x7ac369dbd14fa5ea3f473ed67cc9d598964a77501540ba6751eb0b3decf5870d" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "NewImplementation", + "type": "event", + "signature": "0xd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract InterestRateModel", + "name": "oldInterestRateModel", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract InterestRateModel", + "name": "newInterestRateModel", + "type": "address" + } + ], + "name": "NewMarketInterestRateModel", + "type": "event", + "signature": "0xedffc32e068c7c95dfd4bdfd5c4d939a084d6b11c4199eac8436ed234d72f926" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldPendingAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "NewPendingAdmin", + "type": "event", + "signature": "0xca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReserveFactorMantissa", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReserveFactorMantissa", + "type": "uint256" + } + ], + "name": "NewReserveFactor", + "type": "event", + "signature": "0xaaa68312e2ea9d50e16af5068410ab56e1a1fd06037b1a35664812c30f821460" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "Redeem", + "type": "event", + "signature": "0xe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a929" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "payer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accountBorrows", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBorrows", + "type": "uint256" + } + ], + "name": "RepayBorrow", + "type": "event", + "signature": "0x1a2a22cb034d26d1854bdc6666a5b91fe25efbbb5dcad3b0355478d6f5c362a1" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "benefactor", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "addAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newTotalReserves", + "type": "uint256" + } + ], + "name": "ReservesAdded", + "type": "event", + "signature": "0xa91e67c5ea634cd43a12c5a482724b03de01e85ca68702a53d0c2f45cb7c1dc5" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "reduceAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newTotalReserves", + "type": "uint256" + } + ], + "name": "ReservesReduced", + "type": "event", + "signature": "0x3bad0c59cf2f06e7314077049f48a93578cd16f5ef92329f1dab1420a99c177e" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event", + "signature": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "constant": false, + "inputs": [], + "name": "_acceptAdmin", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xe9c714f2" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "addAmount", + "type": "uint256" + } + ], + "name": "_addReserves", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x3e941010" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "reduceAmount", + "type": "uint256" + } + ], + "name": "_reduceReserves", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x601a0bf1" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", + "type": "address" + } + ], + "name": "_setComptroller", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x4576b5db" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowResign", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x555bcc40" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract InterestRateModel", + "name": "newInterestRateModel", + "type": "address" + } + ], + "name": "_setInterestRateModel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xf2b3abbd" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "_setPendingAdmin", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xb71d1a0c" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReserveFactorMantissa", + "type": "uint256" + } + ], + "name": "_setReserveFactor", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xfca7820b" + }, + { + "constant": true, + "inputs": [], + "name": "accrualBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x6c540baf" + }, + { + "constant": false, + "inputs": [], + "name": "accrueInterest", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xa6afed95" + }, + { + "constant": true, + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xf851a440" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xdd62ed3e" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x095ea7b3" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x70a08231" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOfUnderlying", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x3af9e669" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + } + ], + "name": "borrow", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xc5ebeaec" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "borrowBalanceCurrent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x17bfdfbc" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "borrowBalanceStored", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x95dd9193" + }, + { + "constant": true, + "inputs": [], + "name": "borrowIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xaa5af0fd" + }, + { + "constant": true, + "inputs": [], + "name": "borrowRatePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xf8f9da28" + }, + { + "constant": true, + "inputs": [], + "name": "comptroller", + "outputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x5fe3b567" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x313ce567" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x0933c1ed" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToViewImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x4487152f" + }, + { + "constant": false, + "inputs": [], + "name": "exchangeRateCurrent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xbd6d894d" + }, + { + "constant": true, + "inputs": [], + "name": "exchangeRateStored", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x182df0f5" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getAccountSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xc37f68e2" + }, + { + "constant": true, + "inputs": [], + "name": "getCash", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x3b1d21a2" + }, + { + "constant": true, + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x5c60da1b" + }, + { + "constant": true, + "inputs": [], + "name": "interestRateModel", + "outputs": [ + { + "internalType": "contract InterestRateModel", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xf3fdb15a" + }, + { + "constant": true, + "inputs": [], + "name": "isCToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xfe9c44ae" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + }, + { + "internalType": "contract CTokenInterface", + "name": "cTokenCollateral", + "type": "address" + } + ], + "name": "liquidateBorrow", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xf5e3c462" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xa0712d68" + }, + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x06fdde03" + }, + { + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x26782247" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "redeem", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xdb006a75" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "redeemAmount", + "type": "uint256" + } + ], + "name": "redeemUnderlying", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x852a12e3" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + } + ], + "name": "repayBorrow", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x0e752702" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + } + ], + "name": "repayBorrowBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x2608f818" + }, + { + "constant": true, + "inputs": [], + "name": "reserveFactorMantissa", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x173b9904" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "seizeTokens", + "type": "uint256" + } + ], + "name": "seize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xb2a02ff1" + }, + { + "constant": true, + "inputs": [], + "name": "supplyRatePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xae9d70b0" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x95d89b41" + }, + { + "constant": true, + "inputs": [], + "name": "totalBorrows", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x47bd3718" + }, + { + "constant": false, + "inputs": [], + "name": "totalBorrowsCurrent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x73acee98" + }, + { + "constant": true, + "inputs": [], + "name": "totalReserves", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x8f840ddd" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x18160ddd" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "dst", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xa9059cbb" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "src", + "type": "address" + }, + { + "internalType": "address", + "name": "dst", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x23b872dd" + }, + { + "constant": true, + "inputs": [], + "name": "underlying", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x6f307dc3" + } +]; + +const cDAIContract = [ + { + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address payable", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor", + "signature": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "cashPrior", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "interestAccumulated", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "borrowIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBorrows", + "type": "uint256" + } + ], + "name": "AccrueInterest", + "type": "event", + "signature": "0x4dec04e750ca11537cabcd8a9eab06494de08da3735bc8871cd41250e190bc04" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event", + "signature": "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accountBorrows", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBorrows", + "type": "uint256" + } + ], + "name": "Borrow", + "type": "event", + "signature": "0x13ed6866d4e1ee6da46f845c46d7e54120883d75c5ea9a2dacc1c4ca8984ab80" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "error", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "info", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "detail", + "type": "uint256" + } + ], + "name": "Failure", + "type": "event", + "signature": "0x45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa0" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "cTokenCollateral", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "seizeTokens", + "type": "uint256" + } + ], + "name": "LiquidateBorrow", + "type": "event", + "signature": "0x298637f684da70674f26509b10f07ec2fbc77a335ab1e7d6215a4b2484d8bb52" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + } + ], + "name": "Mint", + "type": "event", + "signature": "0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "NewAdmin", + "type": "event", + "signature": "0xf9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", + "type": "address" + } + ], + "name": "NewComptroller", + "type": "event", + "signature": "0x7ac369dbd14fa5ea3f473ed67cc9d598964a77501540ba6751eb0b3decf5870d" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "NewImplementation", + "type": "event", + "signature": "0xd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract InterestRateModel", + "name": "oldInterestRateModel", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract InterestRateModel", + "name": "newInterestRateModel", + "type": "address" + } + ], + "name": "NewMarketInterestRateModel", + "type": "event", + "signature": "0xedffc32e068c7c95dfd4bdfd5c4d939a084d6b11c4199eac8436ed234d72f926" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldPendingAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "NewPendingAdmin", + "type": "event", + "signature": "0xca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReserveFactorMantissa", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReserveFactorMantissa", + "type": "uint256" + } + ], + "name": "NewReserveFactor", + "type": "event", + "signature": "0xaaa68312e2ea9d50e16af5068410ab56e1a1fd06037b1a35664812c30f821460" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "Redeem", + "type": "event", + "signature": "0xe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a929" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "payer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accountBorrows", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBorrows", + "type": "uint256" + } + ], + "name": "RepayBorrow", + "type": "event", + "signature": "0x1a2a22cb034d26d1854bdc6666a5b91fe25efbbb5dcad3b0355478d6f5c362a1" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "benefactor", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "addAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newTotalReserves", + "type": "uint256" + } + ], + "name": "ReservesAdded", + "type": "event", + "signature": "0xa91e67c5ea634cd43a12c5a482724b03de01e85ca68702a53d0c2f45cb7c1dc5" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "reduceAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newTotalReserves", + "type": "uint256" + } + ], + "name": "ReservesReduced", + "type": "event", + "signature": "0x3bad0c59cf2f06e7314077049f48a93578cd16f5ef92329f1dab1420a99c177e" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event", + "signature": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "constant": false, + "inputs": [], + "name": "_acceptAdmin", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xe9c714f2" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "addAmount", + "type": "uint256" + } + ], + "name": "_addReserves", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x3e941010" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "reduceAmount", + "type": "uint256" + } + ], + "name": "_reduceReserves", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x601a0bf1" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", + "type": "address" + } + ], + "name": "_setComptroller", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x4576b5db" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowResign", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x555bcc40" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract InterestRateModel", + "name": "newInterestRateModel", + "type": "address" + } + ], + "name": "_setInterestRateModel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xf2b3abbd" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "_setPendingAdmin", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xb71d1a0c" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReserveFactorMantissa", + "type": "uint256" + } + ], + "name": "_setReserveFactor", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xfca7820b" + }, + { + "constant": true, + "inputs": [], + "name": "accrualBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x6c540baf" + }, + { + "constant": false, + "inputs": [], + "name": "accrueInterest", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xa6afed95" + }, + { + "constant": true, + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xf851a440" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xdd62ed3e" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x095ea7b3" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x70a08231" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOfUnderlying", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x3af9e669" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + } + ], + "name": "borrow", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xc5ebeaec" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "borrowBalanceCurrent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x17bfdfbc" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "borrowBalanceStored", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x95dd9193" + }, + { + "constant": true, + "inputs": [], + "name": "borrowIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xaa5af0fd" + }, + { + "constant": true, + "inputs": [], + "name": "borrowRatePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xf8f9da28" + }, + { + "constant": true, + "inputs": [], + "name": "comptroller", + "outputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x5fe3b567" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x313ce567" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x0933c1ed" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToViewImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x4487152f" + }, + { + "constant": false, + "inputs": [], + "name": "exchangeRateCurrent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xbd6d894d" + }, + { + "constant": true, + "inputs": [], + "name": "exchangeRateStored", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x182df0f5" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getAccountSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xc37f68e2" + }, + { + "constant": true, + "inputs": [], + "name": "getCash", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x3b1d21a2" + }, + { + "constant": true, + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x5c60da1b" + }, + { + "constant": true, + "inputs": [], + "name": "interestRateModel", + "outputs": [ + { + "internalType": "contract InterestRateModel", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xf3fdb15a" + }, + { + "constant": true, + "inputs": [], + "name": "isCToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xfe9c44ae" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + }, + { + "internalType": "contract CTokenInterface", + "name": "cTokenCollateral", + "type": "address" + } + ], + "name": "liquidateBorrow", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xf5e3c462" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xa0712d68" + }, + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x06fdde03" + }, + { + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x26782247" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "redeem", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xdb006a75" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "redeemAmount", + "type": "uint256" + } + ], + "name": "redeemUnderlying", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x852a12e3" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + } + ], + "name": "repayBorrow", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x0e752702" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + } + ], + "name": "repayBorrowBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x2608f818" + }, + { + "constant": true, + "inputs": [], + "name": "reserveFactorMantissa", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x173b9904" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "seizeTokens", + "type": "uint256" + } + ], + "name": "seize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xb2a02ff1" + }, + { + "constant": true, + "inputs": [], + "name": "supplyRatePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xae9d70b0" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x95d89b41" + }, + { + "constant": true, + "inputs": [], + "name": "totalBorrows", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x47bd3718" + }, + { + "constant": false, + "inputs": [], + "name": "totalBorrowsCurrent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x73acee98" + }, + { + "constant": true, + "inputs": [], + "name": "totalReserves", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x8f840ddd" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x18160ddd" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "dst", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xa9059cbb" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "src", + "type": "address" + }, + { + "internalType": "address", + "name": "dst", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x23b872dd" + }, + { + "constant": true, + "inputs": [], + "name": "underlying", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x6f307dc3" + } +]; + +const cUSDCContract = [ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x06fdde03" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x095ea7b3" + }, + { + "constant": false, + "inputs": [ + { + "name": "repayAmount", + "type": "uint256" + } + ], + "name": "repayBorrow", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x0e752702" + }, + { + "constant": true, + "inputs": [], + "name": "reserveFactorMantissa", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x173b9904" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "borrowBalanceCurrent", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x17bfdfbc" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x18160ddd" + }, + { + "constant": true, + "inputs": [], + "name": "exchangeRateStored", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x182df0f5" + }, + { + "constant": false, + "inputs": [ + { + "name": "src", + "type": "address" + }, + { + "name": "dst", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x23b872dd" + }, + { + "constant": false, + "inputs": [ + { + "name": "borrower", + "type": "address" + }, + { + "name": "repayAmount", + "type": "uint256" + } + ], + "name": "repayBorrowBehalf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x2608f818" + }, + { + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x26782247" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x313ce567" + }, + { + "constant": false, + "inputs": [ + { + "name": "owner", + "type": "address" + } + ], + "name": "balanceOfUnderlying", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x3af9e669" + }, + { + "constant": true, + "inputs": [], + "name": "getCash", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x3b1d21a2" + }, + { + "constant": false, + "inputs": [ + { + "name": "newComptroller", + "type": "address" + } + ], + "name": "_setComptroller", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x4576b5db" + }, + { + "constant": true, + "inputs": [], + "name": "totalBorrows", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x47bd3718" + }, + { + "constant": true, + "inputs": [], + "name": "comptroller", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x5fe3b567" + }, + { + "constant": false, + "inputs": [ + { + "name": "reduceAmount", + "type": "uint256" + } + ], + "name": "_reduceReserves", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x601a0bf1" + }, + { + "constant": true, + "inputs": [], + "name": "initialExchangeRateMantissa", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x675d972c" + }, + { + "constant": true, + "inputs": [], + "name": "accrualBlockNumber", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x6c540baf" + }, + { + "constant": true, + "inputs": [], + "name": "underlying", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x6f307dc3" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x70a08231" + }, + { + "constant": false, + "inputs": [], + "name": "totalBorrowsCurrent", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x73acee98" + }, + { + "constant": false, + "inputs": [ + { + "name": "redeemAmount", + "type": "uint256" + } + ], + "name": "redeemUnderlying", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0x852a12e3" + }, + { + "constant": true, + "inputs": [], + "name": "totalReserves", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x8f840ddd" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x95d89b41" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "borrowBalanceStored", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0x95dd9193" + }, + { + "constant": false, + "inputs": [ + { + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xa0712d68" + }, + { + "constant": false, + "inputs": [], + "name": "accrueInterest", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xa6afed95" + }, + { + "constant": false, + "inputs": [ + { + "name": "dst", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xa9059cbb" + }, + { + "constant": true, + "inputs": [], + "name": "borrowIndex", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xaa5af0fd" + }, + { + "constant": true, + "inputs": [], + "name": "supplyRatePerBlock", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xae9d70b0" + }, + { + "constant": false, + "inputs": [ + { + "name": "liquidator", + "type": "address" + }, + { + "name": "borrower", + "type": "address" + }, + { + "name": "seizeTokens", + "type": "uint256" + } + ], + "name": "seize", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xb2a02ff1" + }, + { + "constant": false, + "inputs": [ + { + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "_setPendingAdmin", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xb71d1a0c" + }, + { + "constant": false, + "inputs": [], + "name": "exchangeRateCurrent", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xbd6d894d" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "getAccountSnapshot", + "outputs": [ + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xc37f68e2" + }, + { + "constant": false, + "inputs": [ + { + "name": "borrowAmount", + "type": "uint256" + } + ], + "name": "borrow", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xc5ebeaec" + }, + { + "constant": false, + "inputs": [ + { + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "redeem", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xdb006a75" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xdd62ed3e" + }, + { + "constant": false, + "inputs": [], + "name": "_acceptAdmin", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xe9c714f2" + }, + { + "constant": false, + "inputs": [ + { + "name": "newInterestRateModel", + "type": "address" + } + ], + "name": "_setInterestRateModel", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xf2b3abbd" + }, + { + "constant": true, + "inputs": [], + "name": "interestRateModel", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xf3fdb15a" + }, + { + "constant": false, + "inputs": [ + { + "name": "borrower", + "type": "address" + }, + { + "name": "repayAmount", + "type": "uint256" + }, + { + "name": "cTokenCollateral", + "type": "address" + } + ], + "name": "liquidateBorrow", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xf5e3c462" + }, + { + "constant": true, + "inputs": [], + "name": "admin", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xf851a440" + }, + { + "constant": true, + "inputs": [], + "name": "borrowRatePerBlock", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xf8f9da28" + }, + { + "constant": false, + "inputs": [ + { + "name": "newReserveFactorMantissa", + "type": "uint256" + } + ], + "name": "_setReserveFactor", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function", + "signature": "0xfca7820b" + }, + { + "constant": true, + "inputs": [], + "name": "isCToken", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function", + "signature": "0xfe9c44ae" + }, + { + "inputs": [ + { + "name": "underlying_", + "type": "address" + }, + { + "name": "comptroller_", + "type": "address" + }, + { + "name": "interestRateModel_", + "type": "address" + }, + { + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "name": "name_", + "type": "string" + }, + { + "name": "symbol_", + "type": "string" + }, + { + "name": "decimals_", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor", + "signature": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "interestAccumulated", + "type": "uint256" + }, + { + "indexed": false, + "name": "borrowIndex", + "type": "uint256" + }, + { + "indexed": false, + "name": "totalBorrows", + "type": "uint256" + } + ], + "name": "AccrueInterest", + "type": "event", + "signature": "0x875352fb3fadeb8c0be7cbbe8ff761b308fa7033470cd0287f02f3436fd76cb9" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "name": "mintTokens", + "type": "uint256" + } + ], + "name": "Mint", + "type": "event", + "signature": "0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "redeemer", + "type": "address" + }, + { + "indexed": false, + "name": "redeemAmount", + "type": "uint256" + }, + { + "indexed": false, + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "Redeem", + "type": "event", + "signature": "0xe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a929" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "name": "borrowAmount", + "type": "uint256" + }, + { + "indexed": false, + "name": "accountBorrows", + "type": "uint256" + }, + { + "indexed": false, + "name": "totalBorrows", + "type": "uint256" + } + ], + "name": "Borrow", + "type": "event", + "signature": "0x13ed6866d4e1ee6da46f845c46d7e54120883d75c5ea9a2dacc1c4ca8984ab80" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "payer", + "type": "address" + }, + { + "indexed": false, + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "name": "repayAmount", + "type": "uint256" + }, + { + "indexed": false, + "name": "accountBorrows", + "type": "uint256" + }, + { + "indexed": false, + "name": "totalBorrows", + "type": "uint256" + } + ], + "name": "RepayBorrow", + "type": "event", + "signature": "0x1a2a22cb034d26d1854bdc6666a5b91fe25efbbb5dcad3b0355478d6f5c362a1" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "liquidator", + "type": "address" + }, + { + "indexed": false, + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "name": "repayAmount", + "type": "uint256" + }, + { + "indexed": false, + "name": "cTokenCollateral", + "type": "address" + }, + { + "indexed": false, + "name": "seizeTokens", + "type": "uint256" + } + ], + "name": "LiquidateBorrow", + "type": "event", + "signature": "0x298637f684da70674f26509b10f07ec2fbc77a335ab1e7d6215a4b2484d8bb52" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "oldPendingAdmin", + "type": "address" + }, + { + "indexed": false, + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "NewPendingAdmin", + "type": "event", + "signature": "0xca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": false, + "name": "newAdmin", + "type": "address" + } + ], + "name": "NewAdmin", + "type": "event", + "signature": "0xf9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "oldComptroller", + "type": "address" + }, + { + "indexed": false, + "name": "newComptroller", + "type": "address" + } + ], + "name": "NewComptroller", + "type": "event", + "signature": "0x7ac369dbd14fa5ea3f473ed67cc9d598964a77501540ba6751eb0b3decf5870d" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "oldInterestRateModel", + "type": "address" + }, + { + "indexed": false, + "name": "newInterestRateModel", + "type": "address" + } + ], + "name": "NewMarketInterestRateModel", + "type": "event", + "signature": "0xedffc32e068c7c95dfd4bdfd5c4d939a084d6b11c4199eac8436ed234d72f926" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "oldReserveFactorMantissa", + "type": "uint256" + }, + { + "indexed": false, + "name": "newReserveFactorMantissa", + "type": "uint256" + } + ], + "name": "NewReserveFactor", + "type": "event", + "signature": "0xaaa68312e2ea9d50e16af5068410ab56e1a1fd06037b1a35664812c30f821460" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "admin", + "type": "address" + }, + { + "indexed": false, + "name": "reduceAmount", + "type": "uint256" + }, + { + "indexed": false, + "name": "newTotalReserves", + "type": "uint256" + } + ], + "name": "ReservesReduced", + "type": "event", + "signature": "0x3bad0c59cf2f06e7314077049f48a93578cd16f5ef92329f1dab1420a99c177e" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "error", + "type": "uint256" + }, + { + "indexed": false, + "name": "info", + "type": "uint256" + }, + { + "indexed": false, + "name": "detail", + "type": "uint256" + } + ], + "name": "Failure", + "type": "event", + "signature": "0x45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa0" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "amount", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event", + "signature": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "amount", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event", + "signature": "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925" + } +]; + module.exports = { earnUSDTABIContract, earnUSDCABIContract, @@ -5568,4 +11362,9 @@ module.exports = { yearnTUSDABIContract, yearnUSDCABIContract, yearnUSDTABIContract, + compoundStrategyContract, + compoundVaultContract, + cUSDTContract, + cDAIContract, + cUSDCContract, }; diff --git a/config/serverless/domain.js b/config/serverless/domain.js index ce4c075..835978d 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -72,25 +72,64 @@ const testContracts = { abi: abi.vaultUSDTABIContract, strategyAddress: '0x157fbacbbf6ba50c45e1375ae728f88f0cde1615', strategyABI: abi.yearnUSDTABIContract, + contractType: 'yearn' }, 'yUSDC': { address: '0xBdf7cC9c7a9dFF3d54Aa976e9586CE9935484005', abi: abi.vaultUSDCABIContract, strategyAddress: '0xf5a1988a9d02ce26b2cca31a56368e5f6a9b55ac', strategyABI: abi.yearnUSDCABIContract, + contractType: 'yearn' }, 'yDAI': { address: '0x2BB53Ee2592319e3c3cF2323f1a81B1bF7854B7C', abi: abi.vaultDAIABIContract, strategyAddress: '0x26cd801a2dbd05caad547b9d67ac2665e45dbc7e', strategyABI: abi.yearnDAIABIContract, + contractType: 'yearn' }, 'yTUSD': { address: '0xa8B73aE1E978315886E318FB086504231A3Ef917', abi: abi.vaultTUSDABIContract, strategyAddress: '0x5abeadf41fe9ea8dbd49ddf4e9659dd098da9610', strategyABI: abi.yearnTUSDABIContract, + contractType: 'yearn' }, + 'cUSDT': { + address: '0x5d102e0bdf2037899e1ff2e8cc50987108533c52', + abi: abi.compoundVaultContract, + strategyAddress: '0xa5c956aef6a21c986665de9cf889ef36613c7d5e', + strategyABI: abi.compoundStrategyContract, + contractType: 'compound' + }, + 'cUSDC': { + address: '0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e', + abi: abi.compoundVaultContract, + strategyAddress: '0x3add8a9d3176c4b30dddeeababf9ca5cc3d49944', + strategyABI: abi.compoundStrategyContract, + contractType: 'compound' + }, + 'cDAI': { + address: '0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d', + abi: abi.compoundVaultContract, + strategyAddress: '0xb951976a7d79fd8a589a7ca9753641380f5c1ab4', + strategyABI: abi.compoundStrategyContract, + contractType: 'compound' + }, + }, + compund: { + 'cUSDT': { + address: '0x3f0a0ea2f86bae6362cf9799b523ba06647da018', + abi: abi.cUSDTContract, + }, + 'cUSDC': { + address: '0x4a92e71227d294f041bd82dd8f78591b75140d63', + abi: abi.cUSDCContract, + }, + 'cDAI': { + address: '0xf0d0eb522cfa50b716b3b1604c4f0fa6f04376ad', + abi: abi.cDAIContract, + } } }; @@ -137,25 +176,64 @@ const mainContracts = { abi: abi.vaultUSDTABIContract, strategyAddress: '0x3DB93e95c9881BC7D9f2C845ce12e97130Ebf5f2', strategyABI: abi.yearnUSDTABIContract, + contractType: 'yearn' }, 'yUSDC': { address: '0x9f0230FbDC0379E5FefAcca89bE03A42Fec5fb6E', abi: abi.vaultUSDCABIContract, strategyAddress: '0x4A9dE4dA5eC67E1dbc8e18F26E178B40D690A11D', strategyABI: abi.yearnUSDCABIContract, + contractType: 'yearn' }, 'yDAI': { address: '0x2bFc2Da293C911e5FfeC4D2A2946A599Bc4Ae770', abi: abi.vaultDAIABIContract, strategyAddress: '0x3685fB7CA1C555Cb5BD5A246422ee1f2c53DdB71', strategyABI: abi.yearnDAIABIContract, + contractType: 'yearn' }, 'yTUSD': { address: '0x2C8de02aD4312069355B94Fb936EFE6CFE0C8FF6', abi: abi.vaultTUSDABIContract, strategyAddress: '0xA6F1409a259B21a84c8346ED1B0826D656959a54', strategyABI: abi.yearnTUSDABIContract, + contractType: 'yearn' + }, + 'cUSDT': { + address: '0xEeCe6AD323a93d4B021BDAaC587DCC04b5cf0a78', + abi: abi.compoundVaultContract, + strategyAddress: '0x11af10648ed5094f41753ccb69a2f74135697631', + strategyABI: abi.compoundStrategyContract, + contractType: 'compound' + }, + 'cUSDC': { + address: '0xd1D7f950899C0269a7F2aad5E854cdc3a1350ba9', + abi: abi.compoundVaultContract, + strategyAddress: '0x89be389b0529ca3187b6e81e689496cb3bad8557', + strategyABI: abi.compoundStrategyContract, + contractType: 'compound' + }, + 'cDAI': { + address: '0x43C20638C3914Eca3c96e9cAc8ebE7d652Be45c6', + abi: abi.compoundVaultContract, + strategyAddress: '0x0c5cff1c9ec7ce8e28998503471b19c848c5a581', + strategyABI: abi.compoundStrategyContract, + contractType: 'compound' + }, + }, + compund: { + 'cUSDT': { + address: '0xf650c3d88d12db855b8bf7d11be6c55a4e07dcc9', + abi: abi.cUSDTContract, + }, + 'cUSDC': { + address: '0x39aa39c021dfbae8fac545936693ac917d5e7563', + abi: abi.cUSDTContract, }, + 'cDAI': { + address: '0x5d3a536e4d6dbd6114cc1ead35777bab948e3643', + abi: abi.cDAIContract, + } } } diff --git a/models/historical-apy.model.js b/models/historical-apy.model.js index 3aa14eb..8c6180b 100644 --- a/models/historical-apy.model.js +++ b/models/historical-apy.model.js @@ -31,4 +31,7 @@ module.exports = { usdcFarmer: 'yUSDC_historical-apy', tusdFarmer: 'yTUSD_historical-apy', daiFarmer: 'yDAI_historical-apy', + cUsdtFarmer: 'cUSDT_historical-apy', + cUsdcFarmer: 'cUSDC_historical-apy', + cDaiFarmer: 'cDAI_historical-apy', }; \ No newline at end of file diff --git a/models/price.model.js b/models/price.model.js index 7838601..aed0668 100644 --- a/models/price.model.js +++ b/models/price.model.js @@ -31,4 +31,7 @@ module.exports = { usdcFarmer: 'yUSDC_price', tusdFarmer: 'yTUSD_price', daiFarmer: 'yDAI_price', + cUsdtFarmer: 'cUSDT_price', + cUsdcFarmer: 'cUSDC_price', + cDaiFarmer: 'cDAI_price', }; \ No newline at end of file diff --git a/services/user/vaults/statistics/handler.js b/services/user/vaults/statistics/handler.js index 821dae8..1b71fa8 100644 --- a/services/user/vaults/statistics/handler.js +++ b/services/user/vaults/statistics/handler.js @@ -71,21 +71,31 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => // Get User Deposit Amount let strategyContract; let vaultContract; + let type = ''; if (process.env.PRODUCTION != null && process.env.PRODUCTION != '') { const symbol = Object.keys(mainContracts.farmer).find(key => mainContracts.farmer[key].address.toLowerCase() === contractAddress.toLowerCase()); strategyContract = getContract(mainContracts.farmer[symbol].strategyABI, mainContracts.farmer[symbol].strategyAddress); vaultContract = getContract(mainContracts.farmer[symbol].abi, mainContracts.farmer[symbol].address); + type = mainContracts.farmer[symbol].contractType; } else { const symbol = Object.keys(testContracts.farmer).find(key => testContracts.farmer[key].address.toLowerCase() === contractAddress.toLowerCase()); - strategyContract = getContract(testContracts.farmer[symbol].strategyABI, testContracts.farmer[symbol].strategyAddress); vaultContract = getContract(testContracts.farmer[symbol].abi, testContracts.farmer[symbol].address); + type = mainContracts.farmer[symbol].contractType; + } + + let depositedAmount = new BigNumber(0); + + if (type === 'yearn') { + const earnDepositAmount = await strategyContract.methods.getEarnDepositBalance(userAddress).call(); + const vaultDepositAmount = await strategyContract.methods.getVaultDepositBalance(userAddress).call(); + depositedAmount = new BigNumber(earnDepositAmount) + .plus(vaultDepositAmount); + } else if (type === 'compound') { + depositedAmount = await strategyContract.methods.getCurrentBalance(userAddress).call(); + depositedAmount = new BigNumber(depositedAmount); } - const earnDepositAmount = await strategyContract.methods.getEarnDepositBalance(userAddress).call(); - const vaultDepositAmount = await strategyContract.methods.getVaultDepositBalance(userAddress).call(); - const depositedAmount = new BigNumber(earnDepositAmount) - .plus(vaultDepositAmount); const depositedShares = await getDepositedShares(vaultContract, userAddress); diff --git a/services/user/vaults/transactions/handler.js b/services/user/vaults/transactions/handler.js index 4ddcaf8..c5fd028 100644 --- a/services/user/vaults/transactions/handler.js +++ b/services/user/vaults/transactions/handler.js @@ -4,11 +4,8 @@ require("dotenv").config(); const fetch = require("node-fetch"); const { pluck, uniq } = require("ramda/dist/ramda"); const subgraphUrl = process.env.SUBGRAPH_ENDPOINT; -const { getVaults } = require("../../../vaults/handler"); const _ = require("lodash"); const { - devContract, - prodContract, testContracts, mainContracts } = require('../../../../config/serverless/domain'); diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index d1ed14d..66297e7 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -17,7 +17,7 @@ const archiveNodeWeb3 = new Web3(archiveNodeUrl); const infuraWeb3 = new Web3(infuraUrl); const blocks = new EthDater(archiveNodeWeb3, delayTime); const { aggregatedContractABI } = require('../../../../config/abi'); -const { devContract, prodContract, aggregatedContractAddress, testContracts, mainContracts } = require('../../../../config/serverless/domain'); +const { aggregatedContractAddress, testContracts, mainContracts } = require('../../../../config/serverless/domain'); let currentBlockNbr; let oneDayAgoBlock; @@ -46,15 +46,6 @@ const pools = [ ]; const saveVaultWithApy = async (data) => { - // const params = { - // TableName: "vaultApy", - // Item: data, - // }; - // await db - // .put(params) - // .promise() - // .catch((err) => console.log("err", err)); - await db.add(data).catch((err) => console.log('err', err)); console.log(`Saved ${data.name}`); }; @@ -79,6 +70,16 @@ const getApy = ( return yearlyRoi; }; +const getCompoundSupplyApy = async (cToken) => { + const ethMantissa = 1e18; + const blocksPerDay = 4 * 60 * 24; + const daysPerYear = 365; + + const supplyRatePerBlock = await cToken.methods.supplyRatePerBlock().call(); + const supplyApy = (((Math.pow((supplyRatePerBlock / ethMantissa * blocksPerDay) + 1, daysPerYear))) - 1) * 100; + return supplyApy; +}; + const getVirtualPrice = async (address, block) => { const poolContract = new archiveNodeWeb3.eth.Contract(poolABI, address); const virtualPrice = await poolContract.methods @@ -117,124 +118,148 @@ const getApyForVault = async (vault) => { symbol, } = vault; - const pool = _.find(pools, { symbol }); - - const vaultContract = new archiveNodeWeb3.eth.Contract(abi, address); - - const pricePerFullShareInception = await getPricePerFullShare( - vaultContract, - inceptionBlockNbr, - inceptionBlockNbr - ); - - const pricePerFullShareCurrent = await getPricePerFullShare( - vaultContract, - currentBlockNbr, - inceptionBlockNbr - ); - - const pricePerFullShareOneDayAgo = await getPricePerFullShare( - vaultContract, - oneDayAgoBlock, - inceptionBlockNbr - ); + // Compound Vault + if (vault.isCompound) { + let cToken; - const pricePerFullShareThreeDaysAgo = await getPricePerFullShare( - vaultContract, - threeDaysAgoBlock, - inceptionBlockNbr - ); - - const pricePerFullShareOneWeekAgo = await getPricePerFullShare( - vaultContract, - oneWeekAgoBlock, - inceptionBlockNbr - ); - - const pricePerFullShareOneMonthAgo = await getPricePerFullShare( - vaultContract, - oneMonthAgoBlock, - inceptionBlockNbr - ); - - const apyInceptionSample = getApy( - pricePerFullShareInception, - pricePerFullShareCurrent, - inceptionBlockNbr, - currentBlockNbr - ); - - const apyOneDaySample = - (getApy( - pricePerFullShareOneDayAgo, - pricePerFullShareCurrent, + if (process.env.PRODUCTION != '') { + const symbol = Object.keys(mainContracts.farmer).find((key) => mainContracts.farmer[key].address.toLowerCase() === vault.vaultContractAddress.toLowerCase()); + cToken = new archiveNodeWeb3.eth.Contract(mainContracts.compund[symbol].abi, mainContracts.compund[symbol].address); + } else { + const symbol = Object.keys(testContracts.farmer).find((key) => testContracts.farmer[key].address.toLowerCase() === vault.vaultContractAddress.toLowerCase()); + cToken = new archiveNodeWeb3.eth.Contract(testContracts.compund[symbol].abi, testContracts.compund[symbol].address); + } + const compoundApy = await getCompoundSupplyApy(cToken) + return { + apyInceptionSample: 0, + apyOneDaySample: 0, + apyThreeDaySample: 0, + apyOneWeekSample: 0, + apyOneMonthSample: 0, + apyLoanscan: 0, + compoundApy, + }; + } else { + // Yearn Vault + const pool = _.find(pools, { symbol }); + const vaultContract = new archiveNodeWeb3.eth.Contract(abi, address); + + const pricePerFullShareInception = await getPricePerFullShare( + vaultContract, + inceptionBlockNbr, + inceptionBlockNbr + ); + + const pricePerFullShareCurrent = await getPricePerFullShare( + vaultContract, + currentBlockNbr, + inceptionBlockNbr + ); + + const pricePerFullShareOneDayAgo = await getPricePerFullShare( + vaultContract, oneDayAgoBlock, - currentBlockNbr - )) || apyInceptionSample; - - const apyThreeDaySample = - (getApy( - pricePerFullShareThreeDaysAgo, - pricePerFullShareCurrent, + inceptionBlockNbr + ); + + const pricePerFullShareThreeDaysAgo = await getPricePerFullShare( + vaultContract, threeDaysAgoBlock, - currentBlockNbr - )) || apyInceptionSample; - - const apyOneWeekSample = - (getApy( - pricePerFullShareOneWeekAgo, - pricePerFullShareCurrent, + inceptionBlockNbr + ); + + const pricePerFullShareOneWeekAgo = await getPricePerFullShare( + vaultContract, oneWeekAgoBlock, - currentBlockNbr - )) || apyInceptionSample; - - const apyOneMonthSample = - (getApy( - pricePerFullShareOneMonthAgo, - pricePerFullShareCurrent, - oneMonthAgoBlock, - currentBlockNbr - )) || apyInceptionSample; - - let apyLoanscan = apyOneDaySample; - - const apyData = { - apyInceptionSample, - apyOneDaySample, - apyThreeDaySample, - apyOneWeekSample, - apyOneMonthSample, - }; - - if (pool) { - const poolAddress = pool.address; - const virtualPriceCurrent = await getVirtualPrice( - poolAddress, - currentBlockNbr + inceptionBlockNbr ); - const virtualPriceOneDayAgo = await getVirtualPrice( - poolAddress, - oneDayAgoBlock + + const pricePerFullShareOneMonthAgo = await getPricePerFullShare( + vaultContract, + oneMonthAgoBlock, + inceptionBlockNbr ); - - const poolApy = await getApy( - virtualPriceOneDayAgo, - virtualPriceCurrent, - oneDayAgoBlock, + + const apyInceptionSample = getApy( + pricePerFullShareInception, + pricePerFullShareCurrent, + inceptionBlockNbr, currentBlockNbr ); - - const poolPct = poolApy / 100; - const vaultPct = apyOneDaySample / 100; - apyLoanscan = ((1 + poolPct) * (1 + vaultPct) - 1) * 100; - - return { ...apyData, poolApy, apyLoanscan }; + + const apyOneDaySample = + (getApy( + pricePerFullShareOneDayAgo, + pricePerFullShareCurrent, + oneDayAgoBlock, + currentBlockNbr + )) || apyInceptionSample; + + const apyThreeDaySample = + (getApy( + pricePerFullShareThreeDaysAgo, + pricePerFullShareCurrent, + threeDaysAgoBlock, + currentBlockNbr + )) || apyInceptionSample; + + const apyOneWeekSample = + (getApy( + pricePerFullShareOneWeekAgo, + pricePerFullShareCurrent, + oneWeekAgoBlock, + currentBlockNbr + )) || apyInceptionSample; + + const apyOneMonthSample = + (getApy( + pricePerFullShareOneMonthAgo, + pricePerFullShareCurrent, + oneMonthAgoBlock, + currentBlockNbr + )) || apyInceptionSample; + + let apyLoanscan = 0; + + const apyData = { + apyInceptionSample, + apyOneDaySample, + apyThreeDaySample, + apyOneWeekSample, + apyOneMonthSample, + }; + + if (pool) { + const poolAddress = pool.address; + const virtualPriceCurrent = await getVirtualPrice( + poolAddress, + currentBlockNbr + ); + const virtualPriceOneDayAgo = await getVirtualPrice( + poolAddress, + oneDayAgoBlock + ); + + const poolApy = await getApy( + virtualPriceOneDayAgo, + virtualPriceCurrent, + oneDayAgoBlock, + currentBlockNbr + ); + + const poolPct = poolApy / 100; + const vaultPct = apyOneDaySample / 100; + apyLoanscan = ((1 + poolPct) * (1 + vaultPct) - 1) * 100; + + return { ...apyData, poolApy, apyLoanscan }; + } + + return { + ...apyData, + apyLoanscan, + compoundApy: 0, + }; } - - return { - ...apyData, - apyLoanscan, - }; }; const getLoanscanApyForVault = async (vault) => { @@ -272,6 +297,18 @@ const getHistoricalAPY = async (startTime, contractAddress) => { case mainContracts.vault['yTUSD'].address: result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.tusdFarmer); break; + case testContracts.farmer['cDAI'].address: + case mainContracts.farmer['cDAI'].address: + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.cDaiFarmer); + break; + case testContracts.farmer['cUSDC'].address: + case mainContracts.farmer['cUSDC'].address: + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.cUsdcFarmer); + break; + case testContracts.farmer['cUSDT'].address: + case mainContracts.farmer['cUSDT'].address: + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.cUsdtFarmer); + break; } return result; @@ -294,6 +331,7 @@ const readVault = async (vault) => { } // const contract = new infuraWeb3.eth.Contract(abi, address); const apy = await getApyForVault(vault); + // const loanscanApy = await getLoanscanApyForVault(vault); const data = { address, @@ -326,23 +364,27 @@ const saveAndReadVault = async (vault) => { return null; } const apy = await getApyForVault(vault); - const aprContract = new infuraWeb3.eth.Contract(aggregatedContractABI, aggregatedContractAddress); - var call = 'getAPROptions';//+asset.symbol var aprs = 0; - aprs = await aprContract.methods[call](vault.erc20address).call(); - - const keys = Object.keys(aprs) - const workKeys = keys.filter((key) => { - return isNaN(key) - }) - const maxApr = Math.max.apply(Math, workKeys.map(function(o) { - if(o === 'uniapr' || o === 'unicapr' || o === "iapr") { - return aprs[o]-100000000000000000000 - } - return aprs[o]; - })) - - aprs = infuraWeb3.utils.fromWei(maxApr.toFixed(0), 'ether') + if (!vault.isCompound) { + const aprContract = new infuraWeb3.eth.Contract(aggregatedContractABI, aggregatedContractAddress); + var call = 'getAPROptions';//+asset.symbol + + aprs = await aprContract.methods[call](vault.erc20address).call(); + + const keys = Object.keys(aprs) + const workKeys = keys.filter((key) => { + return isNaN(key) + }) + const maxApr = Math.max.apply(Math, workKeys.map(function(o) { + if(o === 'uniapr' || o === 'unicapr' || o === "iapr") { + return aprs[o]-100000000000000000000 + } + return aprs[o]; + })) + + aprs = infuraWeb3.utils.fromWei(maxApr.toFixed(0), 'ether') + } + const data = { ...apy, aprs, @@ -356,10 +398,15 @@ module.exports.saveHandler = async () => { try { console.log("Fetching historical blocks", 'save APY history'); currentBlockNbr = await infuraWeb3.eth.getBlockNumber(); + console.log("currentBlockNbr", currentBlockNbr); oneDayAgoBlock = (await blocks.getDate(oneDayAgo)).block; + console.log("oneDayAgoBlock", oneDayAgoBlock); threeDaysAgoBlock = (await blocks.getDate(threeDaysAgo)).block; + console.log("threeDaysAgoBlock", threeDaysAgoBlock); oneWeekAgoBlock = (await blocks.getDate(oneWeekAgo)).block; + console.log("oneWeekAgoBlock", oneWeekAgoBlock); oneMonthAgoBlock = (await blocks.getDate(oneMonthAgo)).block; + console.log("oneMonthAgoBlock", oneMonthAgoBlock); nbrBlocksInDay = currentBlockNbr - oneDayAgoBlock; console.log("Done fetching historical blocks"); diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 926ad2d..bf3e6b3 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -1,150 +1,7 @@ const config = require("./config.js"); +const abi = require('../../../../config/abi') module.exports = [ - // { - // id: "3Crv", - // name: "curve.fi/3pool LP", - // symbol: "3Crv", - // description: "yDAI/yUSDC/yUSDT", - // vaultSymbol: "y3Crv", - // erc20address: "0x6c3f90f043a72fa612cbac8115ee7e52bde6e490", - // vaultContractAddress: "0x9cA85572E6A3EbF24dEDd195623F188735A5179f", - // vaultContractABI: config.vaultContractV5ABI, - // balance: 0, - // vaultBalance: 0, - // decimals: 18, - // deposit: true, - // depositAll: true, - // withdraw: true, - // withdrawAll: true, - // lastMeasurement: 11039340, - // measurement: 1e18, - // depositDisabled: false, - // price_id: "curve-fi-ydai-yusdc-yusdt-ytusd", // TODO: Update this when Coingecko adds token - // }, - // { - // id: "ETH", - // name: "ETH", - // symbol: "ETH", - // description: "Ether", - // vaultSymbol: "yETH", - // erc20address: "Ethereum", - // vaultContractAddress: "0xe1237aA7f535b0CC33Fd973D66cBf830354D16c7", - // vaultContractABI: config.vaultContractV4ABI, - // balance: 0, - // vaultBalance: 0, - // decimals: 18, - // deposit: true, - // depositAll: false, - // withdraw: true, - // withdrawAll: true, - // lastMeasurement: 10774489, - // measurement: 1e18, - // depositDisabled: true, - // price_id: "ethereum", - // }, - // { - // id: "WETH", - // name: "WETH", - // symbol: "WETH", - // description: "Wrappeth Ether", - // vaultSymbol: "yWETH", - // erc20address: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - // vaultContractAddress: "0xe1237aA7f535b0CC33Fd973D66cBf830354D16c7", - // vaultContractABI: config.vaultContractV4ABI, - // balance: 0, - // vaultBalance: 0, - // decimals: 18, - // deposit: true, - // depositAll: true, - // withdraw: true, - // withdrawAll: true, - // lastMeasurement: 10774489, - // measurement: 1e18, - // depositDisabled: true, - // price_id: "ethereum", - // }, - // { - // id: "YFI", - // name: "yearn.finance", - // symbol: "YFI", - // description: "yearn.finance", - // vaultSymbol: "yYFI", - // erc20address: "0x0bc529c00c6401aef6d220be8c6ea1667f6ad93e", - // vaultContractAddress: "0xBA2E7Fed597fd0E3e70f5130BcDbbFE06bB94fe1", - // vaultContractABI: config.vaultContractV2ABI, - // balance: 0, - // vaultBalance: 0, - // decimals: 18, - // deposit: true, - // depositAll: true, - // withdraw: true, - // withdrawAll: true, - // lastMeasurement: 10695309, - // measurement: 1e18, - // price_id: "yearn-finance", - // }, - // { - // id: "CRV", - // name: "curve.fi/y LP", - // symbol: "yCRV", - // description: "yDAI/yUSDC/yUSDT/yTUSD", - // vaultSymbol: "yUSD", - // erc20address: "0xdf5e0e81dff6faf3a7e52ba697820c5e32d806a8", - // vaultContractAddress: "0x5dbcF33D8c2E976c6b560249878e6F1491Bca25c", - // vaultContractABI: config.vaultContractABI, - // balance: 0, - // vaultBalance: 0, - // decimals: 18, - // deposit: true, - // depositAll: false, - // withdraw: true, - // withdrawAll: false, - // lastMeasurement: 10559448, - // measurement: 1e18, - // price_id: "curve-fi-ydai-yusdc-yusdt-ytusd", - // }, - // { - // id: "crvBUSD", - // name: "curve.fi/busd LP", - // symbol: "crvBUSD", - // description: "yDAI/yUSDC/yUSDT/yBUSD", - // vaultSymbol: "ycrvBUSD", - // erc20address: "0x3B3Ac5386837Dc563660FB6a0937DFAa5924333B", - // vaultContractAddress: "0x2994529c0652d127b7842094103715ec5299bbed", - // vaultContractABI: config.vaultContractV3ABI, - // balance: 0, - // vaultBalance: 0, - // decimals: 18, - // deposit: true, - // depositAll: true, - // withdraw: true, - // withdrawAll: true, - // depositDisabled: false, - // lastMeasurement: 10709740, - // measurement: 1e18, - // price_id: "lp-bcurve", - // }, - // { - // id: "crvBTC", - // name: "curve.fi/sbtc LP", - // symbol: "crvBTC", - // description: "renBTC/wBTC/sBTC", - // vaultSymbol: "ycrvBTC", - // erc20address: "0x075b1bb99792c9E1041bA13afEf80C91a1e70fB3", - // vaultContractAddress: "0x7Ff566E1d69DEfF32a7b244aE7276b9f90e9D0f6", - // vaultContractABI: config.vaultContractV3ABI, - // balance: 0, - // vaultBalance: 0, - // decimals: 18, - // deposit: true, - // depositAll: true, - // withdraw: true, - // withdrawAll: true, - // lastMeasurement: 10734341, - // measurement: 1e18, - // price_id: "lp-sbtc-curve", - // }, { id: "DAI", name: "DAI", @@ -225,6 +82,132 @@ module.exports = [ measurement: 1e18, price_id: "tether", }, + { + id: "cDAI", + name: "Compound DAI", + symbol: "cDAI", + description: "Compound DAI", + erc20address: "0x6b175474e89094c44da98b954eedeac495271d0f", + vaultContractAddress: "0x43C20638C3914Eca3c96e9cAc8ebE7d652Be45c6", + vaultContractABI: abi.cDAIContract, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 10650116, + measurement: 1e18, + price_id: "cdai", + vaultSymbol: 'cDAI', + isCompound: true, + }, + { + id: "cUSDC", + name: "Compound USDC", + symbol: "cUSDC", + description: "Compound USDC", + erc20address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + vaultContractAddress: "0xd1D7f950899C0269a7F2aad5E854cdc3a1350ba9", + vaultContractABI: abi.cUSDCContract, + balance: 0, + vaultBalance: 0, + decimals: 6, + deposit: true, + depositAll: false, + withdraw: true, + withdrawAll: false, + lastMeasurement: 10532708, + measurement: 1e18, + price_id: "compound-usd-coin", + vaultSymbol: 'cUSDC', + isCompound: true, + }, + { + id: "cUSDT", + name: "Compound USDT", + symbol: "cUSDT", + description: "Compound USDT", + erc20address: "0xdac17f958d2ee523a2206206994597c13d831ec7", + vaultContractAddress: "0xEeCe6AD323a93d4B021BDAaC587DCC04b5cf0a78", + vaultContractABI: abi.cUSDTContract, + balance: 0, + vaultBalance: 0, + decimals: 6, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 10651402, + measurement: 1e18, + price_id: "compound-usdt", + vaultSymbol: 'cUSDT', + isCompound: true, + }, + // { + // id: "cDAI", + // name: "Compound DAI", + // symbol: "cDAI", + // description: "Compound DAI", + // erc20address: "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa", + // vaultContractAddress: "0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d", + // vaultContractABI: abi.cDAIContract, + // balance: 0, + // vaultBalance: 0, + // decimals: 18, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // lastMeasurement: 10650116, + // measurement: 1e18, + // price_id: "dai", + // vaultSymbol: 'cDAI', + // isCompound: true, + // }, + // { + // id: "cUSDC", + // name: "Compound USDC", + // symbol: "cUSDC", + // description: "Compound USDC", + // erc20address: "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", + // vaultContractAddress: "0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e", + // vaultContractABI: abi.cUSDCContract, + // balance: 0, + // vaultBalance: 0, + // decimals: 6, + // deposit: true, + // depositAll: false, + // withdraw: true, + // withdrawAll: false, + // lastMeasurement: 10532708, + // measurement: 1e18, + // price_id: "usd-coin", + // vaultSymbol: 'cUSDC', + // isCompound: true, + // }, + // { + // id: "cUSDT", + // name: "Compound USDT", + // symbol: "cUSDT", + // description: "Compound USDT", + // erc20address: "0x07de306ff27a2b630b1141956844eb1552b956b5", + // vaultContractAddress: "0x5d102e0bdf2037899e1ff2e8cc50987108533c52", + // vaultContractABI: abi.cUSDTContract, + // balance: 0, + // vaultBalance: 0, + // decimals: 6, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // lastMeasurement: 10651402, + // measurement: 1e18, + // price_id: "tether", + // vaultSymbol: 'cUSDT', + // isCompound: true, + // }, // { // id: "DAI", // name: "DAI", diff --git a/services/vaults/price/handler.js b/services/vaults/price/handler.js index 547170d..ccb77eb 100644 --- a/services/vaults/price/handler.js +++ b/services/vaults/price/handler.js @@ -18,17 +18,33 @@ const moment = require("moment"); const getCurrentPrice = async () => { let contracts = process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? mainContracts : testContracts; - for (const key of Object.keys(contracts.earn)) { - const earnContract = getContract(contracts.earn[key].abi, contracts.earn[key].address); - const vaultContract = getContract(contracts.vault[key].abi, contracts.vault[key].address); - + for (const key of Object.keys(contracts.farmer)) { try { - const earnPricePerFullShare = await getPricePerFullShare(earnContract); - const vaultPricePerFullShare = await getPricePerFullShare(vaultContract); - await db.add(key + '_price', { - earnPrice: earnPricePerFullShare, - vaultPrice: vaultPricePerFullShare, - }).catch((err) => console.log('err', err)); + if (contracts.farmer[key].contractType === 'yearn') { + const earnContract = getContract(contracts.earn[key].abi, contracts.earn[key].address); + const vaultContract = getContract(contracts.vault[key].abi, contracts.vault[key].address); + + const earnPricePerFullShare = await getPricePerFullShare(earnContract); + const vaultPricePerFullShare = await getPricePerFullShare(vaultContract); + await db.add(key + '_price', { + earnPrice: earnPricePerFullShare, + vaultPrice: vaultPricePerFullShare, + compoundExchangeRate: 0, + }).catch((err) => console.log('err', err)); + } else if (contracts.farmer[key].contractType === 'compound') { + const compoundContract = getContract(contracts.compund[key].abi, contracts.compund[key].address); + const getCash = await compoundContract.methods.getCash().call({ from: account.address }); + const totalBorrows = await compoundContract.methods.totalBorrows().call({ from: account.address }); + const totalReserves = await compoundContract.methods.totalReserves().call({ from: account.address }); + const totalSupply = await compoundContract.methods.totalSupply().call({ from: account.address }); + const exchangeRate = (getCash + totalBorrows - totalReserves) / totalSupply; + + await db.add(key + '_price', { + earnPrice: 0, + vaultPrice: 0, + compoundExchangeRate: exchangeRate, + }).catch((err) => console.log('err', err)); + } } catch (err) { await db.add(key + '_price', { earnPrice: "0", @@ -74,6 +90,15 @@ module.exports.handleHistoricialPrice = async (req, res) => { case db.tusdFarmer: collection = db.tusdFarmer; break; + case db.cUsdtFarmer: + collection = db.cUsdtFarmer; + break; + case db.cUsdcFarmer: + collection = db.cUsdcFarmer; + break; + case db.cDaiFarmer: + collection = db.cDaiFarmer; + break; default: res.status(200).json({ message: 'Invalid Farmer', From e05301d835b5df67482767a2edd3e7dee39a3afd Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Sun, 28 Mar 2021 23:20:23 +0800 Subject: [PATCH 030/254] Restructure and bug fix --- app.js | 4 +- jobs/task.js | 7 +- services/vaults/apy/handler.js | 17 - services/vaults/apy/save/handler.js | 164 +------ services/vaults/apy/save/historical-handle.js | 427 ++++++++++++++++++ 5 files changed, 434 insertions(+), 185 deletions(-) create mode 100644 services/vaults/apy/save/historical-handle.js diff --git a/app.js b/app.js index 3172e8d..67fa0da 100644 --- a/app.js +++ b/app.js @@ -4,7 +4,7 @@ const vaultsApy = require('./services/vaults/apy/handler'); const userStatistics = require('./services/user/vaults/statistics/handler'); const userTransactions = require('./services/user/vaults/transactions/handler'); const vaultsPrice = require('./services/vaults/price/handler'); -const vaultAPYSave = require('./services/vaults/apy/save/handler'); +const vaultHistoricalAPYSave = require('./services/vaults/apy/save/historical-handle'); const app = express(); const cors = require('cors') const port = process.env.PORT || 8080; @@ -31,7 +31,7 @@ async function init() { app.get('/user/:userAddress/vaults/statistics', (req, res) => userStatistics.handler(req, res)); app.get('/user/:userAddress/vaults/transactions', (req, res) => userTransactions.handler(req, res)); app.get('/vaults/price/:farmer/:days', (req, res) => vaultsPrice.handleHistoricialPrice(req, res)); - app.get('/vaults/historical-apy/:contractAddress/:days', (req, res) => vaultAPYSave.handleHistoricialAPY(req, res)); + app.get('/vaults/historical-apy/:contractAddress/:days', (req, res) => vaultHistoricalAPYSave.handleHistoricialAPY(req, res)); app.listen(port, () => console.log(`Listening on ${port}`)); }; diff --git a/jobs/task.js b/jobs/task.js index 6b4124e..b0aa954 100644 --- a/jobs/task.js +++ b/jobs/task.js @@ -1,5 +1,6 @@ const cron = require('node-cron'); -const vaultApySave = require('../services/vaults/apy/save/handler'); +const vaultApySave = require('../services/vaults/apy/save/historical-handle'); +const vaultHandlerSave = require('../services/vaults/apy/save/handler'); const vaultSave = require('../services/vaults/save/handler'); const priceSave = require('../services/vaults/price/handler'); @@ -17,10 +18,10 @@ const saveVault = async () => { /** Save Vault APY */ const saveVaultAPY = async () => { - await vaultApySave.handler(); + await vaultHandlerSave.handler(); cron.schedule('0 0 0 * * *', async () => { console.log('[saveVaultAPY]'); - await vaultApySave.handler(); + await vaultHandlerSave.handler(); }, { scheduled: true, timezone: "Etc/UTC" // UTC +0 diff --git a/services/vaults/apy/handler.js b/services/vaults/apy/handler.js index 021dee2..7c55ce3 100644 --- a/services/vaults/apy/handler.js +++ b/services/vaults/apy/handler.js @@ -1,23 +1,6 @@ -const AWS = require("aws-sdk"); -// const db = new AWS.DynamoDB.DocumentClient({ apiVersion: "2012-08-10" }); const _ = require("lodash"); const ApyModel = require('../../../models/apy.model') -// const getVaultsApy = async () => { -// const params = { -// TableName: "vaultApy", -// }; -// const entries = await db.scan(params).promise(); -// const apy = entries.Items; - -// const injectVaultAddress = (vault) => { -// vault.vaultAddress = vault.address; -// return vault; -// }; -// const vaultAddress = _.map(apy, injectVaultAddress); -// return apy; -// }; - const getVaultsApy = async () => { const apy = await ApyModel.findAll(); apy.forEach((v) => delete v._id) diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index 66297e7..fdb12f2 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -2,7 +2,6 @@ require("dotenv").config(); const AWS = require("aws-sdk"); // const db = new AWS.DynamoDB.DocumentClient({ apiVersion: "2012-08-10" }); const db = require('../../../../models/apy.model'); -const historicalDb = require('../../../../models/historical-apy.model'); const Web3 = require("web3"); const moment = require("moment"); const delay = require("delay"); @@ -16,8 +15,7 @@ const infuraUrl = process.env.WEB3_ENDPOINT; const archiveNodeWeb3 = new Web3(archiveNodeUrl); const infuraWeb3 = new Web3(infuraUrl); const blocks = new EthDater(archiveNodeWeb3, delayTime); -const { aggregatedContractABI } = require('../../../../config/abi'); -const { aggregatedContractAddress, testContracts, mainContracts } = require('../../../../config/serverless/domain'); +const { testContracts, mainContracts } = require('../../../../config/serverless/domain'); let currentBlockNbr; let oneDayAgoBlock; @@ -50,10 +48,6 @@ const saveVaultWithApy = async (data) => { console.log(`Saved ${data.name}`); }; -const saveHistoricalAPY = async (data, collection) => { - await historicalDb.add(data, collection).catch((err) => console.log('err', err)); -}; - const getApy = ( previousValue, currentValue, @@ -278,42 +272,6 @@ const getLoanscanApyForVault = async (vault) => { ); }; -const getHistoricalAPY = async (startTime, contractAddress) => { - var result = []; - switch (contractAddress.toLowerCase()) { - case testContracts.vault['yUSDT'].address: - case mainContracts.vault['yUSDT'].address: - result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.usdtFarmer); - break; - case testContracts.vault['yUSDC'].address: - case mainContracts.vault['yUSDC'].address: - result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.usdcFarmer); - break; - case testContracts.vault['yDAI'].address: - case mainContracts.vault['yDAI'].address: - result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.daiFarmer); - break; - case testContracts.vault['yTUSD'].address: - case mainContracts.vault['yTUSD'].address: - result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.tusdFarmer); - break; - case testContracts.farmer['cDAI'].address: - case mainContracts.farmer['cDAI'].address: - result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.cDaiFarmer); - break; - case testContracts.farmer['cUSDC'].address: - case mainContracts.farmer['cUSDC'].address: - result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.cUsdcFarmer); - break; - case testContracts.farmer['cUSDT'].address: - case mainContracts.farmer['cUSDT'].address: - result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.cUsdtFarmer); - break; - } - - return result; -} - const readVault = async (vault) => { const { name, @@ -348,126 +306,6 @@ const readVault = async (vault) => { return data; }; -const saveAndReadVault = async (vault) => { - const { - name, - symbol, - description, - vaultSymbol, - vaultContractABI: abi, - vaultContractAddress: address, - erc20address: tokenAddress, - } = vault; - console.log(`Reading vault ${vault.name}`); - if (!abi || !address) { - console.log(`Vault ABI not found: ${name}`); - return null; - } - const apy = await getApyForVault(vault); - var aprs = 0; - if (!vault.isCompound) { - const aprContract = new infuraWeb3.eth.Contract(aggregatedContractABI, aggregatedContractAddress); - var call = 'getAPROptions';//+asset.symbol - - aprs = await aprContract.methods[call](vault.erc20address).call(); - - const keys = Object.keys(aprs) - const workKeys = keys.filter((key) => { - return isNaN(key) - }) - const maxApr = Math.max.apply(Math, workKeys.map(function(o) { - if(o === 'uniapr' || o === 'unicapr' || o === "iapr") { - return aprs[o]-100000000000000000000 - } - return aprs[o]; - })) - - aprs = infuraWeb3.utils.fromWei(maxApr.toFixed(0), 'ether') - } - - const data = { - ...apy, - aprs, - symbol - }; - await saveHistoricalAPY(data, vaultSymbol + '_historical-apy'); - return data; -}; - -module.exports.saveHandler = async () => { - try { - console.log("Fetching historical blocks", 'save APY history'); - currentBlockNbr = await infuraWeb3.eth.getBlockNumber(); - console.log("currentBlockNbr", currentBlockNbr); - oneDayAgoBlock = (await blocks.getDate(oneDayAgo)).block; - console.log("oneDayAgoBlock", oneDayAgoBlock); - threeDaysAgoBlock = (await blocks.getDate(threeDaysAgo)).block; - console.log("threeDaysAgoBlock", threeDaysAgoBlock); - oneWeekAgoBlock = (await blocks.getDate(oneWeekAgo)).block; - console.log("oneWeekAgoBlock", oneWeekAgoBlock); - oneMonthAgoBlock = (await blocks.getDate(oneMonthAgo)).block; - console.log("oneMonthAgoBlock", oneMonthAgoBlock); - nbrBlocksInDay = currentBlockNbr - oneDayAgoBlock; - console.log("Done fetching historical blocks"); - - const vaultsWithApy = []; - for (const vault of vaults) { - const vaultWithApy = await saveAndReadVault(vault); - if (vaultWithApy !== null) { - vaultsWithApy.push(vaultWithApy); - } - await delay(delayTime); - } - } catch (err) { - console.error(err); - } -} - -module.exports.handleHistoricialAPY = async (req, res) => { - if (req.params.days == null || req.params.days == '') { - res.status(200).json({ - message: 'Days is empty.', - body: null - }); - } else if (req.params.contractAddress == null || req.params.contractAddress == '') { - res.status(200).json({ - message: 'Contract Address is empty.', - body: null - }); - } else { - var startTime = -1; - switch (req.params.days) { - case '30d': - startTime = moment().subtract(30, 'days'); - break; - case '7d': - startTime = moment().subtract(7, 'days'); - break; - case '1d': - startTime = moment().subtract(1, 'days'); - break; - } - - if (startTime !== -1) { - var result = await getHistoricalAPY(startTime.unix(), req.params.contractAddress); - const resultMapping = (apy) => { - delete apy._id; - return apy; - }; - result = result.map(resultMapping); - res.status(200).json({ - message: '', - body: result - }) - } else { - res.status(200).json({ - message: "Please only pass '30d', '7d' or '1d' as days option.", - body: null - }) - } - } -} - module.exports.handler = async () => { try { console.log("Fetching historical blocks", 'save Vault APY'); diff --git a/services/vaults/apy/save/historical-handle.js b/services/vaults/apy/save/historical-handle.js new file mode 100644 index 0000000..fb604e0 --- /dev/null +++ b/services/vaults/apy/save/historical-handle.js @@ -0,0 +1,427 @@ +require("dotenv").config(); +const historicalDb = require('../../../../models/historical-apy.model'); +const Web3 = require("web3"); +const moment = require("moment"); +const delay = require("delay"); +const _ = require("lodash"); +const vaults = require("./vaults"); +const EthDater = require("./ethereum-block-by-date.js"); +const { delayTime } = require("./config"); +const poolABI = require("./abis/pool"); +const archiveNodeUrl = process.env.ARCHIVENODE_ENDPOINT; +const infuraUrl = process.env.WEB3_ENDPOINT; +const archiveNodeWeb3 = new Web3(archiveNodeUrl); +const infuraWeb3 = new Web3(infuraUrl); +const blocks = new EthDater(archiveNodeWeb3, delayTime); +const { aggregatedContractABI } = require('../../../../config/abi'); +const { aggregatedContractAddress, testContracts, mainContracts } = require('../../../../config/serverless/domain'); + +let currentBlockNbr; +let oneDayAgoBlock; +let threeDaysAgoBlock; +let oneWeekAgoBlock; +let oneMonthAgoBlock; +let nbrBlocksInDay; +const oneDayAgo = moment().subtract(1, "days").valueOf(); +const threeDaysAgo = moment().subtract(3, "days").valueOf(); +const oneWeekAgo = moment().subtract(1, "weeks").valueOf(); +const oneMonthAgo = moment().subtract(1, "months").valueOf(); + +const pools = [ + { + symbol: "yCRV", + address: "0x45F783CCE6B7FF23B2ab2D70e416cdb7D6055f51", + }, + { + symbol: "crvBUSD", + address: "0x79a8C46DeA5aDa233ABaFFD40F3A0A2B1e5A4F27", + }, + { + symbol: "crvBTC", + address: "0x7fC77b5c7614E1533320Ea6DDc2Eb61fa00A9714", + }, +]; + +const saveHistoricalAPY = async (data, collection) => { + await historicalDb.add(data, collection).catch((err) => console.log('err', err)); +}; + +const getApy = ( + previousValue, + currentValue, + previousBlockNbr, + currentBlockNbr +) => { + if (!previousValue) { + return 0; + } + const blockDelta = currentBlockNbr - previousBlockNbr; + const returnSincePrevBlock = (currentValue - previousValue) / previousValue; + const days = blockDelta / nbrBlocksInDay; + const yearlyRoi = 100 * ((1 + returnSincePrevBlock) ** (365.2425 / days) - 1); + return yearlyRoi; +}; + +const getCompoundSupplyApy = async (cToken) => { + const ethMantissa = 1e18; + const blocksPerDay = 4 * 60 * 24; + const daysPerYear = 365; + + const supplyRatePerBlock = await cToken.methods.supplyRatePerBlock().call(); + const supplyApy = (((Math.pow((supplyRatePerBlock / ethMantissa * blocksPerDay) + 1, daysPerYear))) - 1) * 100; + return supplyApy; +}; + +const getVirtualPrice = async (address, block) => { + const poolContract = new archiveNodeWeb3.eth.Contract(poolABI, address); + const virtualPrice = await poolContract.methods + .get_virtual_price() + .call(undefined, block); + await delay(delayTime); + return virtualPrice; +}; + +const getPricePerFullShare = async ( + vaultContract, + block, + inceptionBlockNbr +) => { + const contractDidntExist = block < inceptionBlockNbr; + const inceptionBlock = block === inceptionBlockNbr; + + if (inceptionBlock) { + return 1e18; + } + if (contractDidntExist) { + return 0; + } + const pricePerFullShare = await vaultContract.methods + .getPricePerFullShare() + .call(undefined, block); + await delay(delayTime); + return pricePerFullShare; +}; + +const getApyForVault = async (vault) => { + const { + lastMeasurement: inceptionBlockNbr, + vaultContractABI: abi, + vaultContractAddress: address, + symbol, + } = vault; + + // Compound Vault + if (vault.isCompound) { + let cToken; + + if (process.env.PRODUCTION != '') { + const symbol = Object.keys(mainContracts.farmer).find((key) => mainContracts.farmer[key].address.toLowerCase() === vault.vaultContractAddress.toLowerCase()); + cToken = new archiveNodeWeb3.eth.Contract(mainContracts.compund[symbol].abi, mainContracts.compund[symbol].address); + } else { + const symbol = Object.keys(testContracts.farmer).find((key) => testContracts.farmer[key].address.toLowerCase() === vault.vaultContractAddress.toLowerCase()); + cToken = new archiveNodeWeb3.eth.Contract(testContracts.compund[symbol].abi, testContracts.compund[symbol].address); + } + const compoundApy = await getCompoundSupplyApy(cToken) + return { + apyInceptionSample: 0, + apyOneDaySample: 0, + apyThreeDaySample: 0, + apyOneWeekSample: 0, + apyOneMonthSample: 0, + apyLoanscan: 0, + compoundApy, + }; + } else { + // Yearn Vault + const pool = _.find(pools, { symbol }); + const vaultContract = new archiveNodeWeb3.eth.Contract(abi, address); + + const pricePerFullShareInception = await getPricePerFullShare( + vaultContract, + inceptionBlockNbr, + inceptionBlockNbr + ); + + const pricePerFullShareCurrent = await getPricePerFullShare( + vaultContract, + currentBlockNbr, + inceptionBlockNbr + ); + + const pricePerFullShareOneDayAgo = await getPricePerFullShare( + vaultContract, + oneDayAgoBlock, + inceptionBlockNbr + ); + + const pricePerFullShareThreeDaysAgo = await getPricePerFullShare( + vaultContract, + threeDaysAgoBlock, + inceptionBlockNbr + ); + + const pricePerFullShareOneWeekAgo = await getPricePerFullShare( + vaultContract, + oneWeekAgoBlock, + inceptionBlockNbr + ); + + const pricePerFullShareOneMonthAgo = await getPricePerFullShare( + vaultContract, + oneMonthAgoBlock, + inceptionBlockNbr + ); + + const apyInceptionSample = getApy( + pricePerFullShareInception, + pricePerFullShareCurrent, + inceptionBlockNbr, + currentBlockNbr + ); + + const apyOneDaySample = + (getApy( + pricePerFullShareOneDayAgo, + pricePerFullShareCurrent, + oneDayAgoBlock, + currentBlockNbr + )) || apyInceptionSample; + + const apyThreeDaySample = + (getApy( + pricePerFullShareThreeDaysAgo, + pricePerFullShareCurrent, + threeDaysAgoBlock, + currentBlockNbr + )) || apyInceptionSample; + + const apyOneWeekSample = + (getApy( + pricePerFullShareOneWeekAgo, + pricePerFullShareCurrent, + oneWeekAgoBlock, + currentBlockNbr + )) || apyInceptionSample; + + const apyOneMonthSample = + (getApy( + pricePerFullShareOneMonthAgo, + pricePerFullShareCurrent, + oneMonthAgoBlock, + currentBlockNbr + )) || apyInceptionSample; + + let apyLoanscan = 0; + + const apyData = { + apyInceptionSample, + apyOneDaySample, + apyThreeDaySample, + apyOneWeekSample, + apyOneMonthSample, + }; + + if (pool) { + const poolAddress = pool.address; + const virtualPriceCurrent = await getVirtualPrice( + poolAddress, + currentBlockNbr + ); + const virtualPriceOneDayAgo = await getVirtualPrice( + poolAddress, + oneDayAgoBlock + ); + + const poolApy = await getApy( + virtualPriceOneDayAgo, + virtualPriceCurrent, + oneDayAgoBlock, + currentBlockNbr + ); + + const poolPct = poolApy / 100; + const vaultPct = apyOneDaySample / 100; + apyLoanscan = ((1 + poolPct) * (1 + vaultPct) - 1) * 100; + + return { ...apyData, poolApy, apyLoanscan }; + } + + return { + ...apyData, + apyLoanscan, + compoundApy: 0, + }; + } +}; + +const getLoanscanApyForVault = async (vault) => { + const { + lastMeasurement: inceptionBlockNbr, + vaultContractABI: abi, + vaultContractAddress: address, + } = vault; + + const vaultContract = new archiveNodeWeb3.eth.Contract(abi, address); + + const pricePerFullShareInception = await getPricePerFullShare( + vaultContract, + inceptionBlockNbr, + inceptionBlockNbr + ); +}; + +const getHistoricalAPY = async (startTime, contractAddress) => { + var result = []; + switch (contractAddress.toLowerCase()) { + case testContracts.vault['yUSDT'].address: + case mainContracts.vault['yUSDT'].address: + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.usdtFarmer); + break; + case testContracts.vault['yUSDC'].address: + case mainContracts.vault['yUSDC'].address: + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.usdcFarmer); + break; + case testContracts.vault['yDAI'].address: + case mainContracts.vault['yDAI'].address: + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.daiFarmer); + break; + case testContracts.vault['yTUSD'].address: + case mainContracts.vault['yTUSD'].address: + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.tusdFarmer); + break; + case testContracts.farmer['cDAI'].address: + case mainContracts.farmer['cDAI'].address: + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.cDaiFarmer); + break; + case testContracts.farmer['cUSDC'].address: + case mainContracts.farmer['cUSDC'].address: + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.cUsdcFarmer); + break; + case testContracts.farmer['cUSDT'].address: + case mainContracts.farmer['cUSDT'].address: + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.cUsdtFarmer); + break; + } + + return result; +} + +const saveAndReadVault = async (vault) => { + const { + name, + symbol, + description, + vaultSymbol, + vaultContractABI: abi, + vaultContractAddress: address, + erc20address: tokenAddress, + } = vault; + console.log(`Reading vault ${vault.name}`); + if (!abi || !address) { + console.log(`Vault ABI not found: ${name}`); + return null; + } + const apy = await getApyForVault(vault); + var aprs = 0; + if (!vault.isCompound) { + const aprContract = new infuraWeb3.eth.Contract(aggregatedContractABI, aggregatedContractAddress); + var call = 'getAPROptions';//+asset.symbol + + aprs = await aprContract.methods[call](vault.erc20address).call(); + + const keys = Object.keys(aprs) + const workKeys = keys.filter((key) => { + return isNaN(key) + }) + const maxApr = Math.max.apply(Math, workKeys.map(function(o) { + if(o === 'uniapr' || o === 'unicapr' || o === "iapr") { + return aprs[o]-100000000000000000000 + } + return aprs[o]; + })) + + aprs = infuraWeb3.utils.fromWei(maxApr.toFixed(0), 'ether') + } + + const data = { + ...apy, + aprs, + symbol + }; + await saveHistoricalAPY(data, vaultSymbol + '_historical-apy'); + return data; +}; + +module.exports.saveHandler = async () => { + try { + console.log("Fetching historical blocks", 'save APY history'); + currentBlockNbr = await infuraWeb3.eth.getBlockNumber(); + console.log("currentBlockNbr", currentBlockNbr); + oneDayAgoBlock = (await blocks.getDate(oneDayAgo)).block; + console.log("oneDayAgoBlock", oneDayAgoBlock); + threeDaysAgoBlock = (await blocks.getDate(threeDaysAgo)).block; + console.log("threeDaysAgoBlock", threeDaysAgoBlock); + oneWeekAgoBlock = (await blocks.getDate(oneWeekAgo)).block; + console.log("oneWeekAgoBlock", oneWeekAgoBlock); + oneMonthAgoBlock = (await blocks.getDate(oneMonthAgo)).block; + console.log("oneMonthAgoBlock", oneMonthAgoBlock); + nbrBlocksInDay = currentBlockNbr - oneDayAgoBlock; + console.log("Done fetching historical blocks"); + + const vaultsWithApy = []; + for (const vault of vaults) { + const vaultWithApy = await saveAndReadVault(vault); + if (vaultWithApy !== null) { + vaultsWithApy.push(vaultWithApy); + } + await delay(delayTime); + } + } catch (err) { + console.error(err); + } +} + +module.exports.handleHistoricialAPY = async (req, res) => { + if (req.params.days == null || req.params.days == '') { + res.status(200).json({ + message: 'Days is empty.', + body: null + }); + } else if (req.params.contractAddress == null || req.params.contractAddress == '') { + res.status(200).json({ + message: 'Contract Address is empty.', + body: null + }); + } else { + var startTime = -1; + switch (req.params.days) { + case '30d': + startTime = moment().subtract(30, 'days'); + break; + case '7d': + startTime = moment().subtract(7, 'days'); + break; + case '1d': + startTime = moment().subtract(1, 'days'); + break; + } + + if (startTime !== -1) { + var result = await getHistoricalAPY(startTime.unix(), req.params.contractAddress); + const resultMapping = (apy) => { + delete apy._id; + return apy; + }; + result = result.map(resultMapping); + res.status(200).json({ + message: '', + body: result + }) + } else { + res.status(200).json({ + message: "Please only pass '30d', '7d' or '1d' as days option.", + body: null + }) + } + } +} From 669ade5b3215556c502399cbd2753861c4e0a417 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Thu, 8 Apr 2021 21:54:16 +0800 Subject: [PATCH 031/254] - Fix the APY issues --- services/vaults/apy/save/handler.js | 9 +++++---- services/vaults/apy/save/historical-handle.js | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index fdb12f2..7fa81fb 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -23,10 +23,6 @@ let threeDaysAgoBlock; let oneWeekAgoBlock; let oneMonthAgoBlock; let nbrBlocksInDay; -const oneDayAgo = moment().subtract(1, "days").valueOf(); -const threeDaysAgo = moment().subtract(3, "days").valueOf(); -const oneWeekAgo = moment().subtract(1, "weeks").valueOf(); -const oneMonthAgo = moment().subtract(1, "months").valueOf(); const pools = [ { @@ -308,6 +304,11 @@ const readVault = async (vault) => { module.exports.handler = async () => { try { + const oneDayAgo = moment().subtract(1, "days").valueOf(); + const threeDaysAgo = moment().subtract(3, "days").valueOf(); + const oneWeekAgo = moment().subtract(1, "weeks").valueOf(); + const oneMonthAgo = moment().subtract(1, "months").valueOf(); + console.log("Fetching historical blocks", 'save Vault APY'); currentBlockNbr = await infuraWeb3.eth.getBlockNumber(); await delay(delayTime); diff --git a/services/vaults/apy/save/historical-handle.js b/services/vaults/apy/save/historical-handle.js index fb604e0..cd8717f 100644 --- a/services/vaults/apy/save/historical-handle.js +++ b/services/vaults/apy/save/historical-handle.js @@ -22,10 +22,6 @@ let threeDaysAgoBlock; let oneWeekAgoBlock; let oneMonthAgoBlock; let nbrBlocksInDay; -const oneDayAgo = moment().subtract(1, "days").valueOf(); -const threeDaysAgo = moment().subtract(3, "days").valueOf(); -const oneWeekAgo = moment().subtract(1, "weeks").valueOf(); -const oneMonthAgo = moment().subtract(1, "months").valueOf(); const pools = [ { @@ -354,6 +350,11 @@ const saveAndReadVault = async (vault) => { module.exports.saveHandler = async () => { try { + const oneDayAgo = moment().subtract(1, "days").valueOf(); + const threeDaysAgo = moment().subtract(3, "days").valueOf(); + const oneWeekAgo = moment().subtract(1, "weeks").valueOf(); + const oneMonthAgo = moment().subtract(1, "months").valueOf(); + console.log("Fetching historical blocks", 'save APY history'); currentBlockNbr = await infuraWeb3.eth.getBlockNumber(); console.log("currentBlockNbr", currentBlockNbr); From cf52c86542b4fda6a7b56afb033e44e23231b965 Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Sat, 1 May 2021 14:25:34 +0800 Subject: [PATCH 032/254] Add Coingecko API to package.json --- package-lock.json | 11 +++++------ package.json | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index af27b06..8385951 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1086,6 +1086,11 @@ "mimic-response": "^1.0.0" } }, + "coingecko-api": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/coingecko-api/-/coingecko-api-1.0.10.tgz", + "integrity": "sha512-7YLLC85+daxAw5QlBWoHVBVpJRwoPr4HtwanCr8V/WRjoyHTa1Lb9DQAvv4MDJZHiz4no6HGnDQnddtjV35oRA==" + }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -3161,12 +3166,6 @@ "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" }, - "prettier": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.1.tgz", - "integrity": "sha512-9bY+5ZWCfqj3ghYBLxApy2zf6m+NJo5GzmLTpr9FsApsfjriNnS2dahWReHMi7qNPhhHl9SYHJs2cHZLgexNIw==", - "dev": true - }, "process": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", diff --git a/package.json b/package.json index ffc8ab0..68c0331 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,6 @@ "start": "node --max-old-space-size=8192 app.js -enableServer 1" }, "devDependencies": { - "prettier": "^2.1.1", "serverless-aws-documentation": "^1.1.0", "serverless-domain-manager": "^4.2.0", "serverless-export-swagger": "^2.0.0", @@ -16,6 +15,7 @@ "dependencies": { "axios": "^0.21.0", "bignumber": "^1.1.0", + "coingecko-api": "^1.0.10", "cors": "^2.8.5", "delay": "^4.4.0", "dotenv": "^8.2.0", From 51f90aca59bc1badb7ca707a968a730b18f4733f Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Sat, 1 May 2021 14:30:48 +0800 Subject: [PATCH 033/254] Add TVL API --- app.js | 55 +++--- config/db.js | 58 +++--- config/serverless/domain.js | 310 ++++++++++++++++++++------------- jobs/task.js | 107 ++++++++---- models/tvl.model.js | 54 ++++++ services/vaults/tvl/handler.js | 256 +++++++++++++++++++++++++++ 6 files changed, 643 insertions(+), 197 deletions(-) create mode 100644 models/tvl.model.js create mode 100644 services/vaults/tvl/handler.js diff --git a/app.js b/app.js index 67fa0da..95da4ec 100644 --- a/app.js +++ b/app.js @@ -1,19 +1,20 @@ -const express = require('express'); -const db = require('./config/db') -const vaultsApy = require('./services/vaults/apy/handler'); -const userStatistics = require('./services/user/vaults/statistics/handler'); -const userTransactions = require('./services/user/vaults/transactions/handler'); -const vaultsPrice = require('./services/vaults/price/handler'); -const vaultHistoricalAPYSave = require('./services/vaults/apy/save/historical-handle'); +const express = require("express"); +const db = require("./config/db"); +const vaultsApy = require("./services/vaults/apy/handler"); +const userStatistics = require("./services/user/vaults/statistics/handler"); +const userTransactions = require("./services/user/vaults/transactions/handler"); +const vaultsPrice = require("./services/vaults/price/handler"); +const vaultsTvl = require("./services/vaults/tvl/handler"); +const vaultHistoricalAPYSave = require("./services/vaults/apy/save/historical-handle"); const app = express(); -const cors = require('cors') +const cors = require("cors"); const port = process.env.PORT || 8080; -const jobs = require('./jobs/task'); +const jobs = require("./jobs/task"); async function init() { // Improve debugging - process.on('unhandledRejection', (reason, p) => { - console.log('Unhandled Rejection at:', p, 'reason:', reason) + process.on("unhandledRejection", (reason, p) => { + console.log("Unhandled Rejection at:", p, "reason:", reason); }); db.connectDB(async (err) => { @@ -23,19 +24,33 @@ async function init() { jobs.saveVaultAPY(); jobs.savePricePerFullShare(); jobs.saveHistoricalAPY(); - }) + jobs.saveHistoricalTVL(); + }); app.use(cors()); - app.get('/vaults/apy', (req, res) => vaultsApy.handler(res)); - app.get('/user/:userAddress/vaults/statistics', (req, res) => userStatistics.handler(req, res)); - app.get('/user/:userAddress/vaults/transactions', (req, res) => userTransactions.handler(req, res)); - app.get('/vaults/price/:farmer/:days', (req, res) => vaultsPrice.handleHistoricialPrice(req, res)); - app.get('/vaults/historical-apy/:contractAddress/:days', (req, res) => vaultHistoricalAPYSave.handleHistoricialAPY(req, res)); + app.get("/vaults/apy", (req, res) => vaultsApy.handler(res)); + app.get("/user/:userAddress/vaults/statistics", (req, res) => + userStatistics.handler(req, res) + ); + app.get("/user/:userAddress/vaults/transactions", (req, res) => + userTransactions.handler(req, res) + ); + app.get("/vaults/price/:farmer/:days", (req, res) => + vaultsPrice.handleHistoricialPrice(req, res) + ); + app.get("/vaults/historical-apy/:contractAddress/:days", (req, res) => + vaultHistoricalAPYSave.handleHistoricialAPY(req, res) + ); + app.get("/vaults/tvl/:farmer", (req, res) => + vaultsTvl.getTVLhandle(req, res) + ); + + app.get("/vaults/tvl/total", (req, res) => + vaultsTvl.getTotalTVLhandle(req, res) + ); app.listen(port, () => console.log(`Listening on ${port}`)); -}; +} init(); - - diff --git a/config/db.js b/config/db.js index 904f90d..37dbde7 100644 --- a/config/db.js +++ b/config/db.js @@ -1,39 +1,53 @@ -const MongoClient = require('mongodb').MongoClient; +const MongoClient = require("mongodb").MongoClient; const { MONGO_USERNAME, MONGO_PASSWORD, MONGO_HOSTNAME, MONGO_PORT, MONGO_DB, - AUTH_MECHANISM + AUTH_MECHANISM, } = process.env; -const Api = require('../utils/api') +const Api = require("../utils/api"); let _db; const connectDB = async (callback) => { - var url = ''; - if (process.env.PRODUCTION != null && process.env.PRODUCTION != '') { - url = `mongodb://${encodeURIComponent(MONGO_USERNAME)}:${encodeURIComponent(MONGO_PASSWORD)}@${MONGO_HOSTNAME}:${MONGO_PORT}/${MONGO_DB}?authMechanism=${AUTH_MECHANISM}`; + var url = ""; + if ( + process.env.PRODUCTION != null && + process.env.PRODUCTION != "" && + process.env.MONGO_AUTH != "" + ) { + url = `mongodb://${encodeURIComponent(MONGO_USERNAME)}:${encodeURIComponent( + MONGO_PASSWORD + )}@${MONGO_HOSTNAME}:${MONGO_PORT}/${MONGO_DB}?authMechanism=${AUTH_MECHANISM}`; } else { - url = `mongodb://${MONGO_HOSTNAME}`; + url = `mongodb://${MONGO_HOSTNAME}:${MONGO_PORT}/${MONGO_DB}`; } - MongoClient.connect(url, { - reconnectTries: Number.MAX_VALUE, - autoReconnect: true, - useNewUrlParser: true, - }, (err, client) => { - if (err) { - console.error(err); - Api.pushSlackErrorAlert('Yearn API\nDB Connection', "", JSON.stringify(err)) - } else { - console.log('Connected successfully to database'); - _db = client.db(MONGO_DB, { useUnifiedTopology: true }); + MongoClient.connect( + url, + { + reconnectTries: Number.MAX_VALUE, + autoReconnect: true, + useNewUrlParser: true, + }, + (err, client) => { + if (err) { + console.error(err); + Api.pushSlackErrorAlert( + "Yearn API\nDB Connection", + "", + JSON.stringify(err) + ); + } else { + console.log("Connected successfully to database"); + _db = client.db(MONGO_DB, { useUnifiedTopology: true }); + } + + return callback(err); } - - return callback(err); - }) + ); }; const getDB = () => _db; -module.exports = { connectDB, getDB }; \ No newline at end of file +module.exports = { connectDB, getDB }; diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 835978d..d0f8095 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -1,5 +1,5 @@ const _ = require("lodash"); -const abi = require('../abi'); +const abi = require("../abi"); const config = require("../../services/vaults/apy/save/config"); const DEFAULT = { @@ -19,7 +19,7 @@ module.exports.prod = () => DEFAULT; module.exports.staging = () => { return _.merge({}, DEFAULT, { - domainName: `staging-${DEFAULT.domainName}` + domainName: `staging-${DEFAULT.domainName}`, }); }; @@ -28,214 +28,290 @@ module.exports.dev = () => { domainName: `dev-${DEFAULT.domainName}`, }); }; - +// yearn = rinkeby const testContracts = { earn: { - 'yUSDT': { - address: '0xdb12e805d004698fc58f6e4fbdd876268df2dffe', + yUSDT: { + address: "0xdb12e805d004698fc58f6e4fbdd876268df2dffe", abi: abi.earnUSDTABIContract, + network: "rinkeby", }, - 'yUSDC': { - address: '0xC6Be21D8533e90Fd136905eBe70c9d9148237f2d', + yUSDC: { + address: "0xC6Be21D8533e90Fd136905eBe70c9d9148237f2d", abi: abi.earnUSDCABIContract, + network: "rinkeby", }, - 'yDAI': { - address: '0x21857b392b7d0ca20c439bc39896f38ee74c6023', + yDAI: { + address: "0x21857b392b7d0ca20c439bc39896f38ee74c6023", abi: abi.earnDAIABIContract, + network: "rinkeby", }, - 'yTUSD': { - address: '0x63659fcb4a1f62e0c80690ddc67084e8e1560c61', + yTUSD: { + address: "0x63659fcb4a1f62e0c80690ddc67084e8e1560c61", abi: abi.earnTUSDABIContract, + network: "rinkeby", }, }, vault: { - 'yUSDT': { - address: '0x359902517f43b8d38cf9718fe90e552375476f05', + yUSDT: { + address: "0x359902517f43b8d38cf9718fe90e552375476f05", abi: config.vaultContractV2ABI, + network: "rinkeby", }, - 'yUSDC': { - address: '0x231991d392dbe5980586665bc1a066f8efac78c8', + yUSDC: { + address: "0x231991d392dbe5980586665bc1a066f8efac78c8", abi: config.vaultContractABI, + network: "rinkeby", }, - 'yDAI': { - address: '0x193b83e8cc108c86362e47a4c2d3048837d4996e', + yDAI: { + address: "0x193b83e8cc108c86362e47a4c2d3048837d4996e", abi: config.vaultContractV2ABI, + network: "rinkeby", }, - 'yTUSD': { - address: '0x0c9ddf949e32221612145807e34483ccf946b2b9', + yTUSD: { + address: "0x0c9ddf949e32221612145807e34483ccf946b2b9", abi: config.vaultContractV2ABI, + network: "rinkeby", + }, + }, + + compund: { + cUSDT: { + address: "0x3f0a0ea2f86bae6362cf9799b523ba06647da018", + abi: abi.cUSDTContract, + network: "kovan", + }, + cUSDC: { + address: "0x4a92e71227d294f041bd82dd8f78591b75140d63", + abi: abi.cUSDCContract, + network: "kovan", + }, + cDAI: { + address: "0xf0d0eb522cfa50b716b3b1604c4f0fa6f04376ad", + abi: abi.cDAIContract, + network: "kovan", }, }, farmer: { - 'yUSDT': { - address: '0x132b495eC9451c9D572A791Ef9cB6f96Dcb67020', + yUSDT: { + name: "yUSDT", + address: "0x132b495eC9451c9D572A791Ef9cB6f96Dcb67020", abi: abi.vaultUSDTABIContract, - strategyAddress: '0x157fbacbbf6ba50c45e1375ae728f88f0cde1615', + strategyAddress: "0x157fbacbbf6ba50c45e1375ae728f88f0cde1615", strategyABI: abi.yearnUSDTABIContract, - contractType: 'yearn' + contractType: "yearn", + network: "rinkeby", + tokenId: "tether", }, - 'yUSDC': { - address: '0xBdf7cC9c7a9dFF3d54Aa976e9586CE9935484005', + yUSDC: { + name: "yUSDC", + address: "0xBdf7cC9c7a9dFF3d54Aa976e9586CE9935484005", abi: abi.vaultUSDCABIContract, - strategyAddress: '0xf5a1988a9d02ce26b2cca31a56368e5f6a9b55ac', + strategyAddress: "0xf5a1988a9d02ce26b2cca31a56368e5f6a9b55ac", strategyABI: abi.yearnUSDCABIContract, - contractType: 'yearn' + contractType: "yearn", + network: "rinkeby", + tokenId: "usd-coin", }, - 'yDAI': { - address: '0x2BB53Ee2592319e3c3cF2323f1a81B1bF7854B7C', + yDAI: { + name: "yDAI", + address: "0x2BB53Ee2592319e3c3cF2323f1a81B1bF7854B7C", abi: abi.vaultDAIABIContract, - strategyAddress: '0x26cd801a2dbd05caad547b9d67ac2665e45dbc7e', + strategyAddress: "0x26cd801a2dbd05caad547b9d67ac2665e45dbc7e", strategyABI: abi.yearnDAIABIContract, - contractType: 'yearn' + contractType: "yearn", + network: "rinkeby", + tokenId: "dai", }, - 'yTUSD': { - address: '0xa8B73aE1E978315886E318FB086504231A3Ef917', + yTUSD: { + name: "yTUSD", + address: "0xa8B73aE1E978315886E318FB086504231A3Ef917", abi: abi.vaultTUSDABIContract, - strategyAddress: '0x5abeadf41fe9ea8dbd49ddf4e9659dd098da9610', + strategyAddress: "0x5abeadf41fe9ea8dbd49ddf4e9659dd098da9610", strategyABI: abi.yearnTUSDABIContract, - contractType: 'yearn' + contractType: "yearn", + network: "rinkeby", + tokenId: "true-usd", }, - 'cUSDT': { - address: '0x5d102e0bdf2037899e1ff2e8cc50987108533c52', + cUSDT: { + name: "cUSD", + address: "0x5d102e0bdf2037899e1ff2e8cc50987108533c52", abi: abi.compoundVaultContract, - strategyAddress: '0xa5c956aef6a21c986665de9cf889ef36613c7d5e', + strategyAddress: "0xa5c956aef6a21c986665de9cf889ef36613c7d5e", strategyABI: abi.compoundStrategyContract, - contractType: 'compound' + contractType: "compound", + network: "kovan", + tokenId: "tether", }, - 'cUSDC': { - address: '0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e', + cUSDC: { + name: "cUSDC", + address: "0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e", abi: abi.compoundVaultContract, - strategyAddress: '0x3add8a9d3176c4b30dddeeababf9ca5cc3d49944', + strategyAddress: "0x3add8a9d3176c4b30dddeeababf9ca5cc3d49944", strategyABI: abi.compoundStrategyContract, - contractType: 'compound' + contractType: "compound", + network: "kovan", + tokenId: "usd-coin", }, - 'cDAI': { - address: '0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d', + cDAI: { + name: "cDAI", + address: "0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d", abi: abi.compoundVaultContract, - strategyAddress: '0xb951976a7d79fd8a589a7ca9753641380f5c1ab4', + strategyAddress: "0xb951976a7d79fd8a589a7ca9753641380f5c1ab4", strategyABI: abi.compoundStrategyContract, - contractType: 'compound' + contractType: "compound", + network: "kovan", + tokenId: "dai", }, }, - compund: { - 'cUSDT': { - address: '0x3f0a0ea2f86bae6362cf9799b523ba06647da018', - abi: abi.cUSDTContract, - }, - 'cUSDC': { - address: '0x4a92e71227d294f041bd82dd8f78591b75140d63', - abi: abi.cUSDCContract, - }, - 'cDAI': { - address: '0xf0d0eb522cfa50b716b3b1604c4f0fa6f04376ad', - abi: abi.cDAIContract, - } - } }; const mainContracts = { earn: { - 'yUSDT': { - address: '0xdb12e805d004698fc58f6e4fbdd876268df2dffe', + yUSDT: { + address: "0xdb12e805d004698fc58f6e4fbdd876268df2dffe", abi: abi.earnUSDTABIContract, + network: "main", + tokenId: "tether", }, - 'yUSDC': { - address: '0xC6Be21D8533e90Fd136905eBe70c9d9148237f2d', + yUSDC: { + address: "0xC6Be21D8533e90Fd136905eBe70c9d9148237f2d", abi: abi.earnUSDCABIContract, + network: "main", + tokenId: "usd-coin", }, - 'yDAI': { - address: '0x21857b392b7d0ca20c439bc39896f38ee74c6023', + yDAI: { + address: "0x21857b392b7d0ca20c439bc39896f38ee74c6023", abi: abi.earnDAIABIContract, + network: "main", + tokenId: "dai", }, - 'yTUSD': { - address: '0x63659fcb4a1f62e0c80690ddc67084e8e1560c61', + yTUSD: { + address: "0x63659fcb4a1f62e0c80690ddc67084e8e1560c61", abi: abi.earnTUSDABIContract, + network: "main", + tokenId: "true-usd", }, }, vault: { - 'yUSDT': { - address: '0x2f08119c6f07c006695e079aafc638b8789faf18', + yUSDT: { + address: "0x2f08119c6f07c006695e079aafc638b8789faf18", abi: config.vaultContractV2ABI, + network: "main", + tokenId: "tether", }, - 'yUSDC': { - address: '0x597ad1e0c13bfe8025993d9e79c69e1c0233522e', + yUSDC: { + address: "0x597ad1e0c13bfe8025993d9e79c69e1c0233522e", abi: config.vaultContractABI, + network: "main", + tokenId: "usd-coin", }, - 'yDAI': { - address: '0xacd43e627e64355f1861cec6d3a6688b31a6f952', + yDAI: { + address: "0xacd43e627e64355f1861cec6d3a6688b31a6f952", abi: config.vaultContractV2ABI, + network: "main", + tokenId: "dai", }, - 'yTUSD': { - address: '0x37d19d1c4e1fa9dc47bd1ea12f742a0887eda74a', + yTUSD: { + address: "0x37d19d1c4e1fa9dc47bd1ea12f742a0887eda74a", abi: config.vaultContractV2ABI, + network: "main", + tokenId: "true-usd", }, }, farmer: { - 'yUSDT': { - address: '0x4F0C1c9bA6B9CCd0BEd6166e86b672ac8EE621F7', + yUSDT: { + name: "yUSDT", + address: "0x4F0C1c9bA6B9CCd0BEd6166e86b672ac8EE621F7", abi: abi.vaultUSDTABIContract, - strategyAddress: '0x3DB93e95c9881BC7D9f2C845ce12e97130Ebf5f2', + strategyAddress: "0x3DB93e95c9881BC7D9f2C845ce12e97130Ebf5f2", strategyABI: abi.yearnUSDTABIContract, - contractType: 'yearn' + contractType: "yearn", + network: "main", + tokenId: "tether", }, - 'yUSDC': { - address: '0x9f0230FbDC0379E5FefAcca89bE03A42Fec5fb6E', + yUSDC: { + name: "yUSDC", + address: "0x9f0230FbDC0379E5FefAcca89bE03A42Fec5fb6E", abi: abi.vaultUSDCABIContract, - strategyAddress: '0x4A9dE4dA5eC67E1dbc8e18F26E178B40D690A11D', + strategyAddress: "0x4A9dE4dA5eC67E1dbc8e18F26E178B40D690A11D", strategyABI: abi.yearnUSDCABIContract, - contractType: 'yearn' + contractType: "yearn", + network: "main", + tokenId: "usd-coin", }, - 'yDAI': { - address: '0x2bFc2Da293C911e5FfeC4D2A2946A599Bc4Ae770', + yDAI: { + name: "yDAI", + address: "0x2bFc2Da293C911e5FfeC4D2A2946A599Bc4Ae770", abi: abi.vaultDAIABIContract, - strategyAddress: '0x3685fB7CA1C555Cb5BD5A246422ee1f2c53DdB71', + strategyAddress: "0x3685fB7CA1C555Cb5BD5A246422ee1f2c53DdB71", strategyABI: abi.yearnDAIABIContract, - contractType: 'yearn' + contractType: "yearn", + network: "main", + tokenId: "dai", }, - 'yTUSD': { - address: '0x2C8de02aD4312069355B94Fb936EFE6CFE0C8FF6', + yTUSD: { + name: "yTUSD", + address: "0x2C8de02aD4312069355B94Fb936EFE6CFE0C8FF6", abi: abi.vaultTUSDABIContract, - strategyAddress: '0xA6F1409a259B21a84c8346ED1B0826D656959a54', + strategyAddress: "0xA6F1409a259B21a84c8346ED1B0826D656959a54", strategyABI: abi.yearnTUSDABIContract, - contractType: 'yearn' + contractType: "yearn", + network: "main", + tokenId: "true-usd", }, - 'cUSDT': { - address: '0xEeCe6AD323a93d4B021BDAaC587DCC04b5cf0a78', + cUSDT: { + name: "cUSDT", + address: "0xEeCe6AD323a93d4B021BDAaC587DCC04b5cf0a78", abi: abi.compoundVaultContract, - strategyAddress: '0x11af10648ed5094f41753ccb69a2f74135697631', + strategyAddress: "0x11af10648ed5094f41753ccb69a2f74135697631", strategyABI: abi.compoundStrategyContract, - contractType: 'compound' + contractType: "compound", + network: "main", + tokenId: "tether", }, - 'cUSDC': { - address: '0xd1D7f950899C0269a7F2aad5E854cdc3a1350ba9', + cUSDC: { + name: "cUSDC", + address: "0xd1D7f950899C0269a7F2aad5E854cdc3a1350ba9", abi: abi.compoundVaultContract, - strategyAddress: '0x89be389b0529ca3187b6e81e689496cb3bad8557', + strategyAddress: "0x89be389b0529ca3187b6e81e689496cb3bad8557", strategyABI: abi.compoundStrategyContract, - contractType: 'compound' + contractType: "compound", + network: "main", + tokenId: "usd-coin", }, - 'cDAI': { - address: '0x43C20638C3914Eca3c96e9cAc8ebE7d652Be45c6', + cDAI: { + name: "cDAI", + address: "0x43C20638C3914Eca3c96e9cAc8ebE7d652Be45c6", abi: abi.compoundVaultContract, - strategyAddress: '0x0c5cff1c9ec7ce8e28998503471b19c848c5a581', + strategyAddress: "0x0c5cff1c9ec7ce8e28998503471b19c848c5a581", strategyABI: abi.compoundStrategyContract, - contractType: 'compound' + contractType: "compound", + network: "main", + tokenId: "dai", }, }, compund: { - 'cUSDT': { - address: '0xf650c3d88d12db855b8bf7d11be6c55a4e07dcc9', + cUSDT: { + address: "0xf650c3d88d12db855b8bf7d11be6c55a4e07dcc9", abi: abi.cUSDTContract, + network: "main", + tokenId: "tether", }, - 'cUSDC': { - address: '0x39aa39c021dfbae8fac545936693ac917d5e7563', + cUSDC: { + address: "0x39aa39c021dfbae8fac545936693ac917d5e7563", abi: abi.cUSDTContract, + network: "main", + tokenId: "usd-coin", }, - 'cDAI': { - address: '0x5d3a536e4d6dbd6114cc1ead35777bab948e3643', + cDAI: { + address: "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643", abi: abi.cDAIContract, - } - } -} + network: "main", + tokenId: "dai", + }, + }, +}; const devEarnContract = "0xdb12e805d004698fc58f6e4fbdd876268df2dffe"; const devVaultContract = "0x99dd34943c741E17EB772041cd3D7E8d317FA92f"; @@ -255,12 +331,10 @@ module.exports.prodContract = { prodEarnContract, prodVaultContract, prodYfUSDTContract, -} +}; module.exports = { testContracts, mainContracts, aggregatedContractAddress, -} - - +}; diff --git a/jobs/task.js b/jobs/task.js index b0aa954..7679267 100644 --- a/jobs/task.js +++ b/jobs/task.js @@ -1,58 +1,91 @@ -const cron = require('node-cron'); -const vaultApySave = require('../services/vaults/apy/save/historical-handle'); -const vaultHandlerSave = require('../services/vaults/apy/save/handler'); -const vaultSave = require('../services/vaults/save/handler'); -const priceSave = require('../services/vaults/price/handler'); +const cron = require("node-cron"); +const vaultApySave = require("../services/vaults/apy/save/historical-handle"); +const vaultHandlerSave = require("../services/vaults/apy/save/handler"); +const vaultSave = require("../services/vaults/save/handler"); +const priceSave = require("../services/vaults/price/handler"); +const tvlSave = require("../services/vaults/tvl/handler"); /** Save Vault **/ const saveVault = async () => { await vaultSave.handler(); - cron.schedule('0 0 0 * * *', async () => { - console.log('[saveVault]'); - await vaultSave.handler(); - }, { - scheduled: true, - timezone: "Etc/UTC" // UTC +0 - }) -} + cron.schedule( + "0 0 0 * * *", + async () => { + console.log("[saveVault]"); + await vaultSave.handler(); + }, + { + scheduled: true, + timezone: "Etc/UTC", // UTC +0 + } + ); +}; /** Save Vault APY */ const saveVaultAPY = async () => { await vaultHandlerSave.handler(); - cron.schedule('0 0 0 * * *', async () => { - console.log('[saveVaultAPY]'); - await vaultHandlerSave.handler(); - }, { - scheduled: true, - timezone: "Etc/UTC" // UTC +0 - }) -} + cron.schedule( + "0 0 0 * * *", + async () => { + console.log("[saveVaultAPY]"); + await vaultHandlerSave.handler(); + }, + { + scheduled: true, + timezone: "Etc/UTC", // UTC +0 + } + ); +}; /** Store getPricePerFullShare */ const savePricePerFullShare = async () => { await priceSave.handler(); - cron.schedule('*/5 * * * *', async () => { - console.log('[savePricePerFullShare]', new Date().getTime()); - await priceSave.handler(); - }, { - scheduled: true - }) -} + cron.schedule( + "*/5 * * * *", + async () => { + console.log("[savePricePerFullShare]", new Date().getTime()); + await priceSave.handler(); + }, + { + scheduled: true, + } + ); +}; /** Store Historical APY */ const saveHistoricalAPY = async () => { await vaultApySave.saveHandler(); - cron.schedule('*/5 * * * *', async () => { - console.log('[saveAPY]', new Date().getTime()); - await vaultApySave.saveHandler(); - }, { - scheduled: true - }) -} + cron.schedule( + "*/5 * * * *", + async () => { + console.log("[saveAPY]", new Date().getTime()); + await vaultApySave.saveHandler(); + }, + { + scheduled: true, + } + ); +}; + +/** Store Historical TVL */ +const saveHistoricalTVL = async () => { + await tvlSave.saveAllTVLhandler(); + cron.schedule( + "*/5 * * * *", + async () => { + console.log("[saveTVL]", new Date().getTime()); + await tvlSave.saveAllTVLhandler(); + }, + { + scheduled: true, + } + ); +}; module.exports = { + saveHistoricalTVL, saveVaultAPY, saveVault, savePricePerFullShare, - saveHistoricalAPY -} \ No newline at end of file + saveHistoricalAPY, +}; diff --git a/models/tvl.model.js b/models/tvl.model.js new file mode 100644 index 0000000..460a25a --- /dev/null +++ b/models/tvl.model.js @@ -0,0 +1,54 @@ +const mongo = require("../config/db"); +// const collection = "tvl"; + +const findAll = async () => { + const db = mongo.getDB(); + return await db.collection(collection).find({}).toArray(); +}; + +// Get TVL based on farm name +// yUSDT, yUSDC, yDAI, yTUSD, cUSDT, cUSDC, yDAI +const getTVL = async (collection, params) => { + const db = mongo.getDB(); + return await db + .collection(collection) + .find() + .sort({ $natural: -1 }) + .limit(params.limit) + .toArray(); +}; + +const getTotalTVL = async (params) => { + const db = mongo.getDB(); + return await db + .collection("total_tvl") + .find() + .sort({ $natural: -1 }) + .limit(params.limit) + .toArray(); +}; + +const add = async (collection, params) => { + const db = mongo.getDB(); + + // add timestamp to params + Object.assign(params, { + timestamp: new Date().getTime(), + }); + + return await db.collection(collection).insertOne(params); +}; + +module.exports = { + findAll, + getTotalTVL, + getTVL, + add, + usdtFarmer: "yUSDT_tvl", + usdcFarmer: "yUSDC_tvl", + tusdFarmer: "yTUSD_tvl", + daiFarmer: "yDAI_tvl", + cUsdtFarmer: "cUSDT_tvl", + cUsdcFarmer: "cUSDC_tvl", + cDaiFarmer: "cDAI_tvl", +}; diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js new file mode 100644 index 0000000..b4f39c2 --- /dev/null +++ b/services/vaults/tvl/handler.js @@ -0,0 +1,256 @@ +const _ = require("lodash"); +const db = require("../../../models/tvl.model"); + +const Web3 = require("web3"); +const CoinGecko = require("coingecko-api"); +const CoinGeckoClient = new CoinGecko(); +const archiveNodeUrl = process.env.ARCHIVENODE_ENDPOINT; +const infuraMainnetUrl = + `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`; +const infuraKovanUrl = + `https://kovan.infura.io/v3/${process.env.INFURA_API_KEY}`; +const infuraRinkebyUrl = + `https://rinkeby.infura.io/v3/${process.env.INFURA_API_KEY}`; +const infuraRopstenUrl = + `https://ropsten.infura.io/v3/${process.env.INFURA_API_KEY}`; +const archiveNodeWeb3 = new Web3(archiveNodeUrl); + +const infuraMainnetWeb3 = new Web3(infuraMainnetUrl); +const infuraKovanWeb3 = new Web3(infuraKovanUrl); +const infuraRinkebyWeb3 = new Web3(infuraRinkebyUrl); +const infuraRopstenWeb3 = new Web3(infuraRopstenUrl); + +const { + testContracts, + mainContracts, +} = require("../../../config/serverless/domain"); + +const getDecimals = async (contract) => { + try { + let decimals = await contract.methods.decimals().call(); + // console.log("Decimals", decimals); + return decimals; + } catch (err) { + // Catch error + console.log(err); + } +}; + +/** + * Get pool amount from specified vault. + */ +const getPoolAmount = async (contract) => { + try { + let poolAmount = await contract.methods.pool().call(); + return poolAmount; + } catch (err) { + // Catch error + console.log(err); + } +}; + +const getContract = (vault) => { + const { strategyABI, strategyAddress, network } = vault; + let contract; + + // console.log(network); + if (network === "main") { + contract = new infuraMainnetWeb3.eth.Contract(strategyABI, strategyAddress); + } else if (network === "kovan") { + contract = new infuraKovanWeb3.eth.Contract(strategyABI, strategyAddress); + } else if (network === "rinkeby") { + contract = new infuraRinkebyWeb3.eth.Contract(strategyABI, strategyAddress); + } else if (network === "ropsten") { + contract = new infuraRopstenWeb3.eth.Contract(strategyABI, strategyAddress); + } + + return contract; +}; + +/** + * Get Token price from coingecko + */ +const getTokenPrice = async (coingecko_token_id) => { + // console.log(coingecko_token_id); + let data; + try { + data = await CoinGeckoClient.simple.price({ + ids: coingecko_token_id, + vs_currencies: ["usd"], + }); + } catch (err) { + // Catch error + console.log(err); + } + + return data.data[coingecko_token_id]["usd"]; +}; + +/** + * Get TVL of specified vault. + * TVL = poolAmount * tokenPrice + */ +const getTVL = async (vault) => { + const { tokenId } = vault; + let tvl; + const contract = getContract(vault); + const poolAmount = await getPoolAmount(contract); + const decimals = await getDecimals(contract); + const tokenPrice = await getTokenPrice(tokenId); + + tvl = (poolAmount / 10 ** decimals) * tokenPrice; + console.log("TVL for", vault.name, tvl) + return tvl; +}; + +// Get and Save all TVL of all Vaults +const getAllTVL = await = async () => { + let vaults = + process.env.PRODUCTION != null && process.env.PRODUCTION != "" + ? mainContracts + : testContracts; + + let tvls = Array(); + // console.log(vaults); + for (vault in vaults.farmer) { + // console.log(vaults.farmer[vault]); + let _vault = vaults.farmer[vault]; + let tvl = await getTVL(_vault); + tvls.push(tvl); + + await saveTVL(_vault, tvl); + + // console.log("TVL", tvl); + } + + return tvls; +}; + +// Get Total TVL +const getTotalTVL = async (tvls) => { + let totalTVL + try{ + totalTVL = _.sum(tvls); + console.log("Total TVL", totalTVL) + } catch (err) { + // Catch error + console.log(err); + } + return totalTVL; +}; + +// Write to Total TVL to DB +const saveTotalTVL = async (totalTVL) => { + await db + .add("total_tvl", { + tvl: totalTVL, + }) + .catch((err) => console.log("err", err)); +}; + +// Save TVL of specified Vault +const saveTVL = async (vault, tvl) => { + const { name } = vault; + + await db + .add(name + "_tvl", { + tvl: tvl, + }) + .catch((err) => console.log("err", err)); +}; + +// const vault = testContracts.farmer.cUSDT; + +// getPoolAmount(vault); +// const tvls = await (); + +const getVaults = async () => { + const vaults = await db.findAll(); + return vaults; +}; + +// Save All TVLs to database +module.exports.saveAllTVLhandler = async () => { + const tvls = await getAllTVL(); + const totalTvl = await getTotalTVL(tvls); + await saveTotalTVL(totalTvl); +}; + +// Read from DB +module.exports.getTotalTVLhandle = async () => { + // Get and save all TVL + const totalTvl = await db.getTotalTVL({limit: 1}) + + res.status(200).json({ + message: "Total TVL", + body: totalTvl, + }); +}; + +/* HANDLERS */ + +module.exports.getTVLhandle = async (req, res) => { + // check if vault param is input + console.log("get TVL handle"); + + if (req.params.farmer === null || req.params.farmer === "") { + res.status(200).json({ + message: "Farmer is empty.", + body: null, + }); + } + + const result = await db.getTVL(req.params.farmer + "_tvl", {limit: 1}); + if (result) { + res.status(200).json({ + message: `TVL for ${req.params.farmer}`, + body: result, + }); + } +}; + +module.exports.getHistoricalTVLhandle = async (req, res) => { + if (req.params.days == null || req.params.days == "") { + res.status(200).json({ + message: "Days is empty.", + body: null, + }); + } else if (req.params.farmer == null || req.params.farmer == "") { + res.status(200).json({ + message: "Farmer is empty.", + body: null, + }); + } else { + let collection = ""; + + switch (req.params.farmer) { + case db.usdtFarmer: + collection = db.usdtFarmer; + break; + case db.usdcFarmer: + collection = db.usdcFarmer; + break; + case db.daiFarmer: + collection = db.daiFarmer; + break; + case db.tusdFarmer: + collection = db.tusdFarmer; + break; + case db.cUsdtFarmer: + collection = db.cUsdtFarmer; + break; + case db.cUsdcFarmer: + collection = db.cUsdcFarmer; + break; + case db.cDaiFarmer: + collection = db.cDaiFarmer; + break; + default: + res.status(200).json({ + message: "Invalid Farmer", + body: null, + }); + return; + } + } +}; From 5eb0bf787364ee685f916a94b6031311f9474739 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Fri, 7 May 2021 15:46:06 +0800 Subject: [PATCH 034/254] Commit for harvest farmer --- config/abi.js | 1399 +++++++++++++++++ config/serverless/domain.js | 75 +- models/historical-apy.model.js | 3 + models/price.model.js | 3 + services/user/vaults/statistics/handler.js | 5 +- services/vaults/apy/save/abis/daovault.js | 861 ++++++++++ services/vaults/apy/save/config.js | 2 + services/vaults/apy/save/handler.js | 8 +- services/vaults/apy/save/historical-handle.js | 65 +- services/vaults/apy/save/vaults.js | 390 ++--- services/vaults/price/handler.js | 22 + 11 files changed, 2602 insertions(+), 231 deletions(-) create mode 100644 services/vaults/apy/save/abis/daovault.js diff --git a/config/abi.js b/config/abi.js index f9a91d5..4b6c990 100644 --- a/config/abi.js +++ b/config/abi.js @@ -11345,6 +11345,1402 @@ const cUSDCContract = [ } ]; +const hfDAOContract = [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "fromStrategy", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toStrategy", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "MigrateFunds", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldCommunityWallet", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newCommunityWallet", + "type": "address" + } + ], + "name": "SetCommunityWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldCustomNetworkFeePercentage", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newCustomNetworkFeePercentage", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldCustomNetworkFeeTier", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newCustomNetworkFeeTier", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeeTier", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeePercentage", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeePercentage", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeeTier2", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeeTier2", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeeTier2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldTreasuryWallet", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newTreasuryWallet", + "type": "address" + } + ], + "name": "SetTreasuryWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "LOCKTIME", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "canSetPendingStrategy", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeeTier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "getCurrentBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "result", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_vaultName", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_strategy", + "type": "address" + }, + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "migrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeeTier2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingStrategy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "refund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_communityWallet", + "type": "address" + } + ], + "name": "setCommunityWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_percentage", + "type": "uint256" + } + ], + "name": "setCustomNetworkFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_customNetworkFeeTier", + "type": "uint256" + } + ], + "name": "setCustomNetworkFeeTier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeePercentage", + "type": "uint256[]" + } + ], + "name": "setNetworkFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeeTier2", + "type": "uint256[]" + } + ], + "name": "setNetworkFeeTier2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pendingStrategy", + "type": "address" + } + ], + "name": "setPendingStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_treasuryWallet", + "type": "address" + } + ], + "name": "setTreasuryWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "strategy", + "outputs": [ + { + "internalType": "contract IStrategy2", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unlockMigrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unlockTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vaultName", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; + +const hfStrategyContract = [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldCommunityWallet", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newCommunityWallet", + "type": "address" + } + ], + "name": "SetCommunityWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldProfileSharingFeePercentage", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newProfileSharingFeePercentage", + "type": "uint256" + } + ], + "name": "SetProfileSharingFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldTreasuryWallet", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newTreasuryWallet", + "type": "address" + } + ], + "name": "SetTreasuryWallet", + "type": "event" + }, + { + "inputs": [], + "name": "DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FARM", + "outputs": [ + { + "internalType": "contract IFARM", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WETH", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "amountOutMinPerc", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "approveMigrate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "communityFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "daoVault", + "outputs": [ + { + "internalType": "contract IDAOVault2", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "deadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "hfStake", + "outputs": [ + { + "internalType": "contract IHFStake", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hfVault", + "outputs": [ + { + "internalType": "contract IHFVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_strategyName", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_hfVault", + "type": "address" + }, + { + "internalType": "address", + "name": "_hfStake", + "type": "address" + }, + { + "internalType": "address", + "name": "_FARM", + "type": "address" + }, + { + "internalType": "address", + "name": "_uniswapRouter", + "type": "address" + }, + { + "internalType": "address", + "name": "_WETH", + "type": "address" + }, + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isVesting", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pool", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "profileSharingFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "refund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "reuseContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "revertVesting", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_percentage", + "type": "uint256" + } + ], + "name": "setAmountOutMinPerc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_communityWallet", + "type": "address" + } + ], + "name": "setCommunityWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_seconds", + "type": "uint256" + } + ], + "name": "setDeadline", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_percentage", + "type": "uint256" + } + ], + "name": "setProfileSharingFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_treasuryWallet", + "type": "address" + } + ], + "name": "setTreasuryWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "setVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "strategyName", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "uniswapRouter", + "outputs": [ + { + "internalType": "contract IUniswapV2Router02", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vesting", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; + +const hfVault = [{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Invest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newStrategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"StrategyAnnounced","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newStrategy","type":"address"},{"indexed":false,"internalType":"address","name":"oldStrategy","type":"address"}],"name":"StrategyChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_strategy","type":"address"}],"name":"announceStrategyUpdate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"availableToInvestOut","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_strategy","type":"address"}],"name":"canUpdateStrategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"controller","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"holder","type":"address"}],"name":"depositFor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"doHardWork","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"finalizeStrategyUpdate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"finalizeUpgrade","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"futureStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getPricePerFullShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint8","name":"decimals","type":"uint8"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_underlying","type":"address"},{"internalType":"uint256","name":"_toInvestNumerator","type":"uint256"},{"internalType":"uint256","name":"_toInvestDenominator","type":"uint256"},{"internalType":"uint256","name":"_underlyingUnit","type":"uint256"},{"internalType":"uint256","name":"_implementationChangeDelay","type":"uint256"},{"internalType":"uint256","name":"_strategyChangeDelay","type":"uint256"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_storage","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_storage","type":"address"},{"internalType":"address","name":"_underlying","type":"address"},{"internalType":"uint256","name":"_toInvestNumerator","type":"uint256"},{"internalType":"uint256","name":"_toInvestDenominator","type":"uint256"}],"name":"initializeVault","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"nextImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"nextImplementationDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"nextImplementationTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"rebalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"impl","type":"address"}],"name":"scheduleUpgrade","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_store","type":"address"}],"name":"setStorage","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_strategy","type":"address"}],"name":"setStrategy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"numerator","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"setVaultFractionToInvest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"shouldUpgrade","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"strategy","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"strategyTimeLock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"strategyUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"underlying","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"underlyingBalanceInVault","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"underlyingBalanceWithInvestment","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"holder","type":"address"}],"name":"underlyingBalanceWithInvestmentForHolder","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"underlyingUnit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vaultFractionToInvestDenominator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vaultFractionToInvestNumerator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"numberOfShares","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}] + module.exports = { earnUSDTABIContract, earnUSDCABIContract, @@ -11367,4 +12763,7 @@ module.exports = { cUSDTContract, cDAIContract, cUSDCContract, + hfDAOContract, + hfStrategyContract, + hfVault, }; diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 835978d..0035623 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -95,26 +95,47 @@ const testContracts = { strategyABI: abi.yearnTUSDABIContract, contractType: 'yearn' }, - 'cUSDT': { - address: '0x5d102e0bdf2037899e1ff2e8cc50987108533c52', - abi: abi.compoundVaultContract, - strategyAddress: '0xa5c956aef6a21c986665de9cf889ef36613c7d5e', - strategyABI: abi.compoundStrategyContract, - contractType: 'compound' - }, - 'cUSDC': { - address: '0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e', - abi: abi.compoundVaultContract, - strategyAddress: '0x3add8a9d3176c4b30dddeeababf9ca5cc3d49944', - strategyABI: abi.compoundStrategyContract, - contractType: 'compound' - }, - 'cDAI': { - address: '0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d', - abi: abi.compoundVaultContract, - strategyAddress: '0xb951976a7d79fd8a589a7ca9753641380f5c1ab4', - strategyABI: abi.compoundStrategyContract, - contractType: 'compound' + // 'cUSDT': { + // address: '0x5d102e0bdf2037899e1ff2e8cc50987108533c52', + // abi: abi.compoundVaultContract, + // strategyAddress: '0xa5c956aef6a21c986665de9cf889ef36613c7d5e', + // strategyABI: abi.compoundStrategyContract, + // contractType: 'compound' + // }, + // 'cUSDC': { + // address: '0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e', + // abi: abi.compoundVaultContract, + // strategyAddress: '0x3add8a9d3176c4b30dddeeababf9ca5cc3d49944', + // strategyABI: abi.compoundStrategyContract, + // contractType: 'compound' + // }, + // 'cDAI': { + // address: '0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d', + // abi: abi.compoundVaultContract, + // strategyAddress: '0xb951976a7d79fd8a589a7ca9753641380f5c1ab4', + // strategyABI: abi.compoundStrategyContract, + // contractType: 'compound' + // }, + 'hfDAI': { + address: '0xf6cd30117e16feacaebd2bd30a6d682af6fb9844', + abi: abi.hfDAOContract, + strategyAddress: '0xd505538106e0e4fe73e913f990688f2eafd75901', + strategyABI: abi.hfStrategyContract, + contractType: 'harvest' + }, + 'hfUSDC': { + address: '0xefd426cee17809039c84da8e37951c634901e427', + abi: abi.hfDAOContract, + strategyAddress: '0x3568bcd1d00db319dade2c5611c474e8f4d661d1', + strategyABI: abi.hfStrategyContract, + contractType: 'harvest' + }, + 'hfUSDT': { + address: '0xb0f92a610e83602bf5df258265dbe1561ae33e85', + abi: abi.hfDAOContract, + strategyAddress: '0x5f75141042e8ac06a6f7aecac665acad228faae1', + strategyABI: abi.hfStrategyContract, + contractType: 'harvest' }, }, compund: { @@ -130,6 +151,20 @@ const testContracts = { address: '0xf0d0eb522cfa50b716b3b1604c4f0fa6f04376ad', abi: abi.cDAIContract, } + }, + harvest: { + 'hfDAI': { + address: '0xed2ebf9cde8c8fcc4f82ec6e3675130ae5649442', + abi: abi.hfVault, + }, + 'hfUSDC': { + address: '0xeff936f12c1600b8ce60f0e0575f520f82aedce3', + abi: abi.hfVault, + }, + 'hfUSDT': { + address: '0x1298e9b9a2350ad91f2baf68ab4de8ecb9267621', + abi: abi.hfVault, + } } }; diff --git a/models/historical-apy.model.js b/models/historical-apy.model.js index 8c6180b..765f1bd 100644 --- a/models/historical-apy.model.js +++ b/models/historical-apy.model.js @@ -34,4 +34,7 @@ module.exports = { cUsdtFarmer: 'cUSDT_historical-apy', cUsdcFarmer: 'cUSDC_historical-apy', cDaiFarmer: 'cDAI_historical-apy', + hfDaiFarmer: 'hfDAI_historical-apy', + hfUsdcFarmer: 'hfUSDC_historical-apy', + hfUsdtFarmer: 'hfUSDT_historical-apy' }; \ No newline at end of file diff --git a/models/price.model.js b/models/price.model.js index aed0668..6ed52e1 100644 --- a/models/price.model.js +++ b/models/price.model.js @@ -34,4 +34,7 @@ module.exports = { cUsdtFarmer: 'cUSDT_price', cUsdcFarmer: 'cUSDC_price', cDaiFarmer: 'cDAI_price', + hfDaiFarmer: 'hfDAI_price', + hfUsdcFarmer: 'hfUSDC_price', + hfUsdtFarmer: 'hfUSDT_price', }; \ No newline at end of file diff --git a/services/user/vaults/statistics/handler.js b/services/user/vaults/statistics/handler.js index 1b71fa8..e548c26 100644 --- a/services/user/vaults/statistics/handler.js +++ b/services/user/vaults/statistics/handler.js @@ -82,7 +82,7 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => const symbol = Object.keys(testContracts.farmer).find(key => testContracts.farmer[key].address.toLowerCase() === contractAddress.toLowerCase()); strategyContract = getContract(testContracts.farmer[symbol].strategyABI, testContracts.farmer[symbol].strategyAddress); vaultContract = getContract(testContracts.farmer[symbol].abi, testContracts.farmer[symbol].address); - type = mainContracts.farmer[symbol].contractType; + type = testContracts.farmer[symbol].contractType; } let depositedAmount = new BigNumber(0); @@ -95,6 +95,9 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => } else if (type === 'compound') { depositedAmount = await strategyContract.methods.getCurrentBalance(userAddress).call(); depositedAmount = new BigNumber(depositedAmount); + } else if (type === 'harvest') { + depositedAmount = await vaultContract.methods.getCurrentBalance(userAddress).call(); + depositedAmount = new BigNumber(depositedAmount); } const depositedShares = await getDepositedShares(vaultContract, userAddress); diff --git a/services/vaults/apy/save/abis/daovault.js b/services/vaults/apy/save/abis/daovault.js new file mode 100644 index 0000000..3219cc5 --- /dev/null +++ b/services/vaults/apy/save/abis/daovault.js @@ -0,0 +1,861 @@ +module.exports = [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "fromStrategy", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toStrategy", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "MigrateFunds", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldCommunityWallet", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newCommunityWallet", + "type": "address" + } + ], + "name": "SetCommunityWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldCustomNetworkFeePercentage", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newCustomNetworkFeePercentage", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldCustomNetworkFeeTier", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newCustomNetworkFeeTier", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeeTier", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeePercentage", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeePercentage", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeeTier2", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeeTier2", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeeTier2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldTreasuryWallet", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newTreasuryWallet", + "type": "address" + } + ], + "name": "SetTreasuryWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "LOCKTIME", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "canSetPendingStrategy", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeeTier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "getCurrentBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "result", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_vaultName", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_strategy", + "type": "address" + }, + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "migrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeeTier2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingStrategy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "refund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_communityWallet", + "type": "address" + } + ], + "name": "setCommunityWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_percentage", + "type": "uint256" + } + ], + "name": "setCustomNetworkFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_customNetworkFeeTier", + "type": "uint256" + } + ], + "name": "setCustomNetworkFeeTier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeePercentage", + "type": "uint256[]" + } + ], + "name": "setNetworkFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeeTier2", + "type": "uint256[]" + } + ], + "name": "setNetworkFeeTier2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pendingStrategy", + "type": "address" + } + ], + "name": "setPendingStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_treasuryWallet", + "type": "address" + } + ], + "name": "setTreasuryWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "strategy", + "outputs": [ + { + "internalType": "contract IStrategy2", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unlockMigrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unlockTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vaultName", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/services/vaults/apy/save/config.js b/services/vaults/apy/save/config.js index 883a27f..5f7e987 100644 --- a/services/vaults/apy/save/config.js +++ b/services/vaults/apy/save/config.js @@ -3,6 +3,7 @@ const vaultContractV2ABI = require("./abis/vaultV2"); const vaultContractV3ABI = require("./abis/vaultV3"); const vaultContractV4ABI = require("./abis/vaultV4"); const vaultContractV5ABI = require("./abis/vaultV5"); +const daoVaultABI = require("./abis/daovault"); module.exports = { delayTime: 1000, @@ -11,4 +12,5 @@ module.exports = { vaultContractV3ABI, vaultContractV4ABI, vaultContractV5ABI, + daoVaultABI, }; diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index 7fa81fb..5a12b5f 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -132,7 +132,13 @@ const getApyForVault = async (vault) => { } else { // Yearn Vault const pool = _.find(pools, { symbol }); - const vaultContract = new archiveNodeWeb3.eth.Contract(abi, address); + var vaultContract; + if (vault.isHarvest) { + const envContracts = process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? mainContracts : testContracts; + vaultContract = new archiveNodeWeb3.eth.Contract(envContracts.harvest[vault.id].abi, envContracts.harvest[vault.id].address); + } else { + vaultContract = new archiveNodeWeb3.eth.Contract(abi, address); + } const pricePerFullShareInception = await getPricePerFullShare( vaultContract, diff --git a/services/vaults/apy/save/historical-handle.js b/services/vaults/apy/save/historical-handle.js index cd8717f..95447a0 100644 --- a/services/vaults/apy/save/historical-handle.js +++ b/services/vaults/apy/save/historical-handle.js @@ -54,6 +54,8 @@ const getApy = ( const blockDelta = currentBlockNbr - previousBlockNbr; const returnSincePrevBlock = (currentValue - previousValue) / previousValue; const days = blockDelta / nbrBlocksInDay; + console.log('returnSincePrevBlock', returnSincePrevBlock) + console.log('days', days) const yearlyRoi = 100 * ((1 + returnSincePrevBlock) ** (365.2425 / days) - 1); return yearlyRoi; }; @@ -91,6 +93,7 @@ const getPricePerFullShare = async ( if (contractDidntExist) { return 0; } + console.log('block', block); const pricePerFullShare = await vaultContract.methods .getPricePerFullShare() .call(undefined, block); @@ -130,50 +133,59 @@ const getApyForVault = async (vault) => { } else { // Yearn Vault const pool = _.find(pools, { symbol }); - const vaultContract = new archiveNodeWeb3.eth.Contract(abi, address); - + var vaultContract; + if (vault.isHarvest) { + const envContracts = process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? mainContracts : testContracts; + vaultContract = new archiveNodeWeb3.eth.Contract(envContracts.harvest[vault.id].abi, envContracts.harvest[vault.id].address); + } else { + vaultContract = new archiveNodeWeb3.eth.Contract(abi, address); + } + const pricePerFullShareInception = await getPricePerFullShare( vaultContract, inceptionBlockNbr, inceptionBlockNbr ); - + console.log('pricePerFullShareInception', pricePerFullShareInception); + const pricePerFullShareCurrent = await getPricePerFullShare( vaultContract, currentBlockNbr, inceptionBlockNbr ); + console.log('pricePerFullShareCurrent', pricePerFullShareCurrent); const pricePerFullShareOneDayAgo = await getPricePerFullShare( vaultContract, oneDayAgoBlock, inceptionBlockNbr ); - + console.log('pricePerFullShareOneDayAgo', pricePerFullShareOneDayAgo); const pricePerFullShareThreeDaysAgo = await getPricePerFullShare( vaultContract, threeDaysAgoBlock, inceptionBlockNbr ); - + console.log('pricePerFullShareThreeDaysAgo', pricePerFullShareThreeDaysAgo); const pricePerFullShareOneWeekAgo = await getPricePerFullShare( vaultContract, oneWeekAgoBlock, inceptionBlockNbr ); - + console.log('pricePerFullShareOneWeekAgo', pricePerFullShareOneWeekAgo); const pricePerFullShareOneMonthAgo = await getPricePerFullShare( vaultContract, oneMonthAgoBlock, inceptionBlockNbr ); - + console.log('pricePerFullShareOneMonthAgo', pricePerFullShareOneMonthAgo); const apyInceptionSample = getApy( pricePerFullShareInception, pricePerFullShareCurrent, inceptionBlockNbr, currentBlockNbr ); + console.log('apyInceptionSample', apyInceptionSample) const apyOneDaySample = (getApy( @@ -182,7 +194,7 @@ const getApyForVault = async (vault) => { oneDayAgoBlock, currentBlockNbr )) || apyInceptionSample; - + console.log('apyOneDaySample', apyOneDaySample) const apyThreeDaySample = (getApy( pricePerFullShareThreeDaysAgo, @@ -319,24 +331,26 @@ const saveAndReadVault = async (vault) => { } const apy = await getApyForVault(vault); var aprs = 0; - if (!vault.isCompound) { - const aprContract = new infuraWeb3.eth.Contract(aggregatedContractABI, aggregatedContractAddress); - var call = 'getAPROptions';//+asset.symbol + if (!vault.isCompound && !vault.isHarvest) { + try { + const aprContract = new infuraWeb3.eth.Contract(aggregatedContractABI, aggregatedContractAddress); + var call = 'getAPROptions';//+asset.symbol + + aprs = await aprContract.methods[call](vault.erc20address).call(); - aprs = await aprContract.methods[call](vault.erc20address).call(); - - const keys = Object.keys(aprs) - const workKeys = keys.filter((key) => { - return isNaN(key) - }) - const maxApr = Math.max.apply(Math, workKeys.map(function(o) { - if(o === 'uniapr' || o === 'unicapr' || o === "iapr") { - return aprs[o]-100000000000000000000 - } - return aprs[o]; - })) - - aprs = infuraWeb3.utils.fromWei(maxApr.toFixed(0), 'ether') + const keys = Object.keys(aprs) + const workKeys = keys.filter((key) => { + return isNaN(key) + }) + const maxApr = Math.max.apply(Math, workKeys.map(function(o) { + if(o === 'uniapr' || o === 'unicapr' || o === "iapr") { + return aprs[o]-100000000000000000000 + } + return aprs[o]; + })) + + aprs = infuraWeb3.utils.fromWei(maxApr.toFixed(0), 'ether') + } catch (ex) {} } const data = { @@ -344,6 +358,7 @@ const saveAndReadVault = async (vault) => { aprs, symbol }; + console.log('vaultSymbol', vaultSymbol) await saveHistoricalAPY(data, vaultSymbol + '_historical-apy'); return data; }; diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index bf3e6b3..eaa3362 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -2,149 +2,149 @@ const config = require("./config.js"); const abi = require('../../../../config/abi') module.exports = [ - { - id: "DAI", - name: "DAI", - symbol: "DAI", - description: "DAI Stablecoin", - vaultSymbol: "yDAI", - erc20address: "0x6b175474e89094c44da98b954eedeac495271d0f", - vaultContractAddress: "0xacd43e627e64355f1861cec6d3a6688b31a6f952", - vaultContractABI: config.vaultContractV2ABI, - balance: 0, - vaultBalance: 0, - decimals: 18, - deposit: true, - depositAll: true, - withdraw: true, - withdrawAll: true, - lastMeasurement: 10650116, - measurement: 1e18, - price_id: "dai", - }, - { - id: "TUSD", - name: "TUSD", - symbol: "TUSD", - description: "TrueUSD", - vaultSymbol: "yTUSD", - erc20address: "0x0000000000085d4780B73119b644AE5ecd22b376", - vaultContractAddress: "0x37d19d1c4e1fa9dc47bd1ea12f742a0887eda74a", - vaultContractABI: config.vaultContractV2ABI, - balance: 0, - vaultBalance: 0, - decimals: 18, - deposit: true, - depositAll: true, - withdraw: true, - withdrawAll: true, - lastMeasurement: 10603368, - measurement: 1e18, - price_id: "true-usd", - }, - { - id: "USDC", - name: "USD Coin", - symbol: "USDC", - description: "USD//C", - vaultSymbol: "yUSDC", - erc20address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - vaultContractAddress: "0x597ad1e0c13bfe8025993d9e79c69e1c0233522e", - vaultContractABI: config.vaultContractABI, - balance: 0, - vaultBalance: 0, - decimals: 6, - deposit: true, - depositAll: false, - withdraw: true, - withdrawAll: false, - lastMeasurement: 10532708, - measurement: 1e18, - price_id: "usd-coin", - }, - { - id: "USDT", - name: "USDT", - symbol: "USDT", - description: "Tether USD", - vaultSymbol: "yUSDT", - erc20address: "0xdac17f958d2ee523a2206206994597c13d831ec7", - vaultContractAddress: "0x2f08119c6f07c006695e079aafc638b8789faf18", - vaultContractABI: config.vaultContractV2ABI, - balance: 0, - vaultBalance: 0, - decimals: 6, - deposit: true, - depositAll: true, - withdraw: true, - withdrawAll: true, - lastMeasurement: 10651402, - measurement: 1e18, - price_id: "tether", - }, - { - id: "cDAI", - name: "Compound DAI", - symbol: "cDAI", - description: "Compound DAI", - erc20address: "0x6b175474e89094c44da98b954eedeac495271d0f", - vaultContractAddress: "0x43C20638C3914Eca3c96e9cAc8ebE7d652Be45c6", - vaultContractABI: abi.cDAIContract, - balance: 0, - vaultBalance: 0, - decimals: 18, - deposit: true, - depositAll: true, - withdraw: true, - withdrawAll: true, - lastMeasurement: 10650116, - measurement: 1e18, - price_id: "cdai", - vaultSymbol: 'cDAI', - isCompound: true, - }, - { - id: "cUSDC", - name: "Compound USDC", - symbol: "cUSDC", - description: "Compound USDC", - erc20address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - vaultContractAddress: "0xd1D7f950899C0269a7F2aad5E854cdc3a1350ba9", - vaultContractABI: abi.cUSDCContract, - balance: 0, - vaultBalance: 0, - decimals: 6, - deposit: true, - depositAll: false, - withdraw: true, - withdrawAll: false, - lastMeasurement: 10532708, - measurement: 1e18, - price_id: "compound-usd-coin", - vaultSymbol: 'cUSDC', - isCompound: true, - }, - { - id: "cUSDT", - name: "Compound USDT", - symbol: "cUSDT", - description: "Compound USDT", - erc20address: "0xdac17f958d2ee523a2206206994597c13d831ec7", - vaultContractAddress: "0xEeCe6AD323a93d4B021BDAaC587DCC04b5cf0a78", - vaultContractABI: abi.cUSDTContract, - balance: 0, - vaultBalance: 0, - decimals: 6, - deposit: true, - depositAll: true, - withdraw: true, - withdrawAll: true, - lastMeasurement: 10651402, - measurement: 1e18, - price_id: "compound-usdt", - vaultSymbol: 'cUSDT', - isCompound: true, - }, + // { + // id: "DAI", + // name: "DAI", + // symbol: "DAI", + // description: "DAI Stablecoin", + // vaultSymbol: "yDAI", + // erc20address: "0x6b175474e89094c44da98b954eedeac495271d0f", + // vaultContractAddress: "0xacd43e627e64355f1861cec6d3a6688b31a6f952", + // vaultContractABI: config.vaultContractV2ABI, + // balance: 0, + // vaultBalance: 0, + // decimals: 18, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // lastMeasurement: 10650116, + // measurement: 1e18, + // price_id: "dai", + // }, + // { + // id: "TUSD", + // name: "TUSD", + // symbol: "TUSD", + // description: "TrueUSD", + // vaultSymbol: "yTUSD", + // erc20address: "0x0000000000085d4780B73119b644AE5ecd22b376", + // vaultContractAddress: "0x37d19d1c4e1fa9dc47bd1ea12f742a0887eda74a", + // vaultContractABI: config.vaultContractV2ABI, + // balance: 0, + // vaultBalance: 0, + // decimals: 18, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // lastMeasurement: 10603368, + // measurement: 1e18, + // price_id: "true-usd", + // }, + // { + // id: "USDC", + // name: "USD Coin", + // symbol: "USDC", + // description: "USD//C", + // vaultSymbol: "yUSDC", + // erc20address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + // vaultContractAddress: "0x597ad1e0c13bfe8025993d9e79c69e1c0233522e", + // vaultContractABI: config.vaultContractABI, + // balance: 0, + // vaultBalance: 0, + // decimals: 6, + // deposit: true, + // depositAll: false, + // withdraw: true, + // withdrawAll: false, + // lastMeasurement: 10532708, + // measurement: 1e18, + // price_id: "usd-coin", + // }, + // { + // id: "USDT", + // name: "USDT", + // symbol: "USDT", + // description: "Tether USD", + // vaultSymbol: "yUSDT", + // erc20address: "0xdac17f958d2ee523a2206206994597c13d831ec7", + // vaultContractAddress: "0x2f08119c6f07c006695e079aafc638b8789faf18", + // vaultContractABI: config.vaultContractV2ABI, + // balance: 0, + // vaultBalance: 0, + // decimals: 6, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // lastMeasurement: 10651402, + // measurement: 1e18, + // price_id: "tether", + // }, + // { + // id: "cDAI", + // name: "Compound DAI", + // symbol: "cDAI", + // description: "Compound DAI", + // erc20address: "0x6b175474e89094c44da98b954eedeac495271d0f", + // vaultContractAddress: "0x43C20638C3914Eca3c96e9cAc8ebE7d652Be45c6", + // vaultContractABI: abi.cDAIContract, + // balance: 0, + // vaultBalance: 0, + // decimals: 18, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // lastMeasurement: 10650116, + // measurement: 1e18, + // price_id: "cdai", + // vaultSymbol: 'cDAI', + // isCompound: true, + // }, + // { + // id: "cUSDC", + // name: "Compound USDC", + // symbol: "cUSDC", + // description: "Compound USDC", + // erc20address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + // vaultContractAddress: "0xd1D7f950899C0269a7F2aad5E854cdc3a1350ba9", + // vaultContractABI: abi.cUSDCContract, + // balance: 0, + // vaultBalance: 0, + // decimals: 6, + // deposit: true, + // depositAll: false, + // withdraw: true, + // withdrawAll: false, + // lastMeasurement: 10532708, + // measurement: 1e18, + // price_id: "compound-usd-coin", + // vaultSymbol: 'cUSDC', + // isCompound: true, + // }, + // { + // id: "cUSDT", + // name: "Compound USDT", + // symbol: "cUSDT", + // description: "Compound USDT", + // erc20address: "0xdac17f958d2ee523a2206206994597c13d831ec7", + // vaultContractAddress: "0xEeCe6AD323a93d4B021BDAaC587DCC04b5cf0a78", + // vaultContractABI: abi.cUSDTContract, + // balance: 0, + // vaultBalance: 0, + // decimals: 6, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // lastMeasurement: 10651402, + // measurement: 1e18, + // price_id: "compound-usdt", + // vaultSymbol: 'cUSDT', + // isCompound: true, + // }, // { // id: "cDAI", // name: "Compound DAI", @@ -288,45 +288,67 @@ module.exports = [ // measurement: 1e18, // price_id: "tether", // }, - // { - // id: "aLINK", - // name: "aLINK", - // symbol: "aLINK", - // description: "Aave Interest bearing LINK", - // vaultSymbol: "yaLINK", - // erc20address: "0xA64BD6C70Cb9051F6A9ba1F163Fdc07E0DfB5F84", - // vaultContractAddress: "0x29E240CFD7946BA20895a7a02eDb25C210f9f324", - // vaultContractABI: config.vaultContractV2ABI, - // balance: 0, - // vaultBalance: 0, - // decimals: 18, - // deposit: true, - // depositAll: true, - // withdraw: true, - // withdrawAll: true, - // lastMeasurement: 10599617, - // measurement: 1e18, - // price_id: "aave-link", - // }, - // { - // id: "LINK", - // name: "ChainLink", - // symbol: "LINK", - // description: "ChainLink", - // vaultSymbol: "yLINK", - // erc20address: "0x514910771af9ca656af840dff83e8264ecf986ca", - // vaultContractAddress: "0x881b06da56BB5675c54E4Ed311c21E54C5025298", - // vaultContractABI: config.vaultContractV2ABI, - // balance: 0, - // vaultBalance: 0, - // decimals: 18, - // deposit: true, - // depositAll: true, - // withdraw: true, - // withdrawAll: true, - // depositDisabled: true, - // lastMeasurement: 10604016, - // measurement: 1e18, - // price_id: "chainlink", - // }, + { + id: "hfDAI", + name: "DAI", + symbol: "DAI", + description: "DAI Stablecoin", + vaultSymbol: "hfDAI", + erc20address: "0x5592ec0cfb4dbc12d3ab100b257153436a1f0fea", + vaultContractAddress: "0xf6cd30117e16feacaebd2bd30a6d682af6fb9844", + vaultContractABI: config.daoVaultABI, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 10650116, + measurement: 1e18, + price_id: "dai", + isHarvest: true + }, + { + id: "hfUSDC", + name: "USD Coin", + symbol: "USDC", + description: "USD//C", + vaultSymbol: "hfUSDC", + erc20address: "0x4dbcdf9b62e891a7cec5a2568c3f4faf9e8abe2b", + vaultContractAddress: "0xefd426cee17809039c84da8e37951c634901e427", + vaultContractABI: config.daoVaultABI, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: false, + withdraw: true, + withdrawAll: false, + lastMeasurement: 10532708, + measurement: 1e18, + price_id: "usd-coin", + isHarvest: true + }, + { + id: "hfUSDT", + name: "USDT", + symbol: "USDT", + description: "Tether USD", + vaultSymbol: "hfUSDT", + erc20address: "0xd9ba894e0097f8cc2bbc9d24d308b98e36dc6d02", + vaultContractAddress: "0xb0f92a610e83602bf5df258265dbe1561ae33e85", + vaultContractABI: config.daoVaultABI, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 10651402, + measurement: 1e18, + price_id: "tether", + isHarvest: true + }, ]; diff --git a/services/vaults/price/handler.js b/services/vaults/price/handler.js index ccb77eb..93dbaaf 100644 --- a/services/vaults/price/handler.js +++ b/services/vaults/price/handler.js @@ -30,6 +30,7 @@ const getCurrentPrice = async () => { earnPrice: earnPricePerFullShare, vaultPrice: vaultPricePerFullShare, compoundExchangeRate: 0, + price: 0 }).catch((err) => console.log('err', err)); } else if (contracts.farmer[key].contractType === 'compound') { const compoundContract = getContract(contracts.compund[key].abi, contracts.compund[key].address); @@ -43,12 +44,24 @@ const getCurrentPrice = async () => { earnPrice: 0, vaultPrice: 0, compoundExchangeRate: exchangeRate, + price: 0 }).catch((err) => console.log('err', err)); + } else if (contracts.farmer[key].contractType === 'harvest') { + const contract = getContract(contracts.harvest[key].abi, contracts.harvest[key].address); + const pricePerFullShare = await getPricePerFullShare(contract); + await db.add(key + '_price', { + earnPrice: 0, + vaultPrice: 0, + compoundExchangeRate: 0, + price: pricePerFullShare + }) } } catch (err) { await db.add(key + '_price', { earnPrice: "0", vaultPrice: "0", + compoundExchangeRate: 0, + price: "0" }).catch((err) => console.log('err', err)); } } @@ -99,6 +112,15 @@ module.exports.handleHistoricialPrice = async (req, res) => { case db.cDaiFarmer: collection = db.cDaiFarmer; break; + case db.hfDaiFarmer: + collection = db.hfDaiFarmer; + break; + case db.hfUsdcFarmer: + collection = db.hfUsdcFarmer; + break; + case db.hfUsdtFarmer: + collection = db.hfUsdtFarmer; + break; default: res.status(200).json({ message: 'Invalid Farmer', From 57dbb999b60e4444d537c95748aeeac7596e693c Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Sun, 9 May 2021 21:20:31 +0800 Subject: [PATCH 035/254] Update staging environment --- config/serverless/domain.js | 32 +- services/user/vaults/statistics/handler.js | 3 +- services/user/vaults/transactions/handler.js | 36 +- services/vaults/apy/save/handler.js | 12 +- services/vaults/apy/save/historical-handle.js | 9 +- services/vaults/apy/save/vaults.js | 334 ++++-------------- services/vaults/save/handler.js | 2 +- 7 files changed, 109 insertions(+), 319 deletions(-) diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 835978d..4ff5e57 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -32,66 +32,66 @@ module.exports.dev = () => { const testContracts = { earn: { 'yUSDT': { - address: '0xdb12e805d004698fc58f6e4fbdd876268df2dffe', + address: '0x2ad9f8d4c24652ea9f8a954f7e1fdb50a3be1dfd', abi: abi.earnUSDTABIContract, }, 'yUSDC': { - address: '0xC6Be21D8533e90Fd136905eBe70c9d9148237f2d', + address: '0x2200a7e736821f5915ed3c40e7088a7e56dea64a', abi: abi.earnUSDCABIContract, }, 'yDAI': { - address: '0x21857b392b7d0ca20c439bc39896f38ee74c6023', + address: '0x690bcadb0d5633766510be078b97796d90acc7d8', abi: abi.earnDAIABIContract, }, 'yTUSD': { - address: '0x63659fcb4a1f62e0c80690ddc67084e8e1560c61', + address: '0x6c45ba691a8f587e3fd7f17c7adefce8dfa452aa', abi: abi.earnTUSDABIContract, }, }, vault: { 'yUSDT': { - address: '0x359902517f43b8d38cf9718fe90e552375476f05', + address: '0xa5c53c76729e92630a2a3c549215110a330c902d', abi: config.vaultContractV2ABI, }, 'yUSDC': { - address: '0x231991d392dbe5980586665bc1a066f8efac78c8', + address: '0xabdb489ded91b6646fadc8eeb0ca82ea1d526182', abi: config.vaultContractABI, }, 'yDAI': { - address: '0x193b83e8cc108c86362e47a4c2d3048837d4996e', + address: '0x5c2eea0a960cc1f604bf3c35a52ca2273f12e67e', abi: config.vaultContractV2ABI, }, 'yTUSD': { - address: '0x0c9ddf949e32221612145807e34483ccf946b2b9', + address: '0xa8564f8d255c33175d4882e55f1a6d19e7a7d351', abi: config.vaultContractV2ABI, }, }, farmer: { 'yUSDT': { - address: '0x132b495eC9451c9D572A791Ef9cB6f96Dcb67020', + address: '0x6B150E9BD70E216775c8b73270E64e870a3110c1', abi: abi.vaultUSDTABIContract, - strategyAddress: '0x157fbacbbf6ba50c45e1375ae728f88f0cde1615', + strategyAddress: '0x31324c1c0bb6b4b6f8102acb8346b065307926fa', strategyABI: abi.yearnUSDTABIContract, contractType: 'yearn' }, 'yUSDC': { - address: '0xBdf7cC9c7a9dFF3d54Aa976e9586CE9935484005', + address: '0x6E15e283dc430eca010Ade8b11b5B377902d6e56', abi: abi.vaultUSDCABIContract, - strategyAddress: '0xf5a1988a9d02ce26b2cca31a56368e5f6a9b55ac', + strategyAddress: '0xe77ad5e2c4e7143fdbac6a4dde891727fc395c75', strategyABI: abi.yearnUSDCABIContract, contractType: 'yearn' }, 'yDAI': { - address: '0x2BB53Ee2592319e3c3cF2323f1a81B1bF7854B7C', + address: '0x2428bFD238a3632552B343297c504F60283009eD', abi: abi.vaultDAIABIContract, - strategyAddress: '0x26cd801a2dbd05caad547b9d67ac2665e45dbc7e', + strategyAddress: '0x8615dfb5b53e9ddb3751fbc3fc59512d4aba9a22', strategyABI: abi.yearnDAIABIContract, contractType: 'yearn' }, 'yTUSD': { - address: '0xa8B73aE1E978315886E318FB086504231A3Ef917', + address: '0xEcCb98c36bfc8c49c6065d1cD90bcf1c6F02D4AD', abi: abi.vaultTUSDABIContract, - strategyAddress: '0x5abeadf41fe9ea8dbd49ddf4e9659dd098da9610', + strategyAddress: '0xf64674cfc6597d597275144a1a746dad564b0fcd', strategyABI: abi.yearnTUSDABIContract, contractType: 'yearn' }, diff --git a/services/user/vaults/statistics/handler.js b/services/user/vaults/statistics/handler.js index 1b71fa8..e094b36 100644 --- a/services/user/vaults/statistics/handler.js +++ b/services/user/vaults/statistics/handler.js @@ -82,11 +82,10 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => const symbol = Object.keys(testContracts.farmer).find(key => testContracts.farmer[key].address.toLowerCase() === contractAddress.toLowerCase()); strategyContract = getContract(testContracts.farmer[symbol].strategyABI, testContracts.farmer[symbol].strategyAddress); vaultContract = getContract(testContracts.farmer[symbol].abi, testContracts.farmer[symbol].address); - type = mainContracts.farmer[symbol].contractType; + type = testContracts.farmer[symbol].contractType; } let depositedAmount = new BigNumber(0); - if (type === 'yearn') { const earnDepositAmount = await strategyContract.methods.getEarnDepositBalance(userAddress).call(); const vaultDepositAmount = await strategyContract.methods.getVaultDepositBalance(userAddress).call(); diff --git a/services/user/vaults/transactions/handler.js b/services/user/vaults/transactions/handler.js index c5fd028..11daa53 100644 --- a/services/user/vaults/transactions/handler.js +++ b/services/user/vaults/transactions/handler.js @@ -45,39 +45,6 @@ module.exports.handler = async (req, res) => { }; const getGraphTransactions = async (userAddress) => { - // const query = ` - // { - // deposits: deposits (where: {account: "${userAddress}"}, orderBy: blockNumber) { - // transactionAddress: id - // vaultAddress - // amount - // timestamp - // } - // withdrawals: withdraws (where: {account: "${userAddress}"}, orderBy: blockNumber) { - // transactionAddress: id - // vaultAddress - // amount - // timestamp - // } - // transfersIn: transfers(where: {to: "${userAddress}", from_not: "0x0000000000000000000000000000000000000000"}, orderBy: blockNumber) { - // transactionAddress: id - // timestamp - // vaultAddress - // balance - // totalSupply - // shares: value - // } - // transfersOut: transfers(where: {from: "${userAddress}", to_not: "0x0000000000000000000000000000000000000000"}, orderBy: blockNumber) { - // transactionAddress: id - // shares: value - // vaultAddress - // timestamp - // balance - // totalSupply - // shares: value - // } - // } - // `; const query = ` { deposits: deposits (where: {account: "${userAddress}"}) { @@ -208,12 +175,13 @@ const getTransactions = async (userAddress) => { userAddress, graphTransactions ); - + const farmers = process.env.PRODUCTION == '' ? Object.values(testContracts.farmer) : Object.values(mainContracts.farmer); const removeVaultAddressField = (deposit) => _.omit(deposit, "vaultAddress"); const getTransactionsByVaultAddress = (vaultAddress) => { + console.log('vaultAddress', vaultAddress); const findItemByVaultAddress = (item) => item.vaultAddress === vaultAddress; const findVault = (vault) => vault.address.toLowerCase() === vaultAddress.toLowerCase(); diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index 7fa81fb..80a2a37 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -93,9 +93,14 @@ const getPricePerFullShare = async ( if (contractDidntExist) { return 0; } - const pricePerFullShare = await vaultContract.methods + + let pricePerFullShare = 0; + try { + pricePerFullShare = await vaultContract.methods .getPricePerFullShare() .call(undefined, block); + } catch (ex) {} + await delay(delayTime); return pricePerFullShare; }; @@ -107,7 +112,6 @@ const getApyForVault = async (vault) => { vaultContractAddress: address, symbol, } = vault; - // Compound Vault if (vault.isCompound) { let cToken; @@ -139,13 +143,13 @@ const getApyForVault = async (vault) => { inceptionBlockNbr, inceptionBlockNbr ); - + const pricePerFullShareCurrent = await getPricePerFullShare( vaultContract, currentBlockNbr, inceptionBlockNbr ); - + const pricePerFullShareOneDayAgo = await getPricePerFullShare( vaultContract, oneDayAgoBlock, diff --git a/services/vaults/apy/save/historical-handle.js b/services/vaults/apy/save/historical-handle.js index cd8717f..f5f8417 100644 --- a/services/vaults/apy/save/historical-handle.js +++ b/services/vaults/apy/save/historical-handle.js @@ -91,9 +91,12 @@ const getPricePerFullShare = async ( if (contractDidntExist) { return 0; } - const pricePerFullShare = await vaultContract.methods + let pricePerFullShare = 0; + try { + pricePerFullShare = await vaultContract.methods .getPricePerFullShare() .call(undefined, block); + } catch (ex) {} await delay(delayTime); return pricePerFullShare; }; @@ -167,7 +170,7 @@ const getApyForVault = async (vault) => { oneMonthAgoBlock, inceptionBlockNbr ); - + const apyInceptionSample = getApy( pricePerFullShareInception, pricePerFullShareCurrent, @@ -319,7 +322,7 @@ const saveAndReadVault = async (vault) => { } const apy = await getApyForVault(vault); var aprs = 0; - if (!vault.isCompound) { + if (!vault.isCompound && process.env.PRODUCTION != '') { const aprContract = new infuraWeb3.eth.Contract(aggregatedContractABI, aggregatedContractAddress); var call = 'getAPROptions';//+asset.symbol diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index bf3e6b3..6916ebd 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -2,14 +2,77 @@ const config = require("./config.js"); const abi = require('../../../../config/abi') module.exports = [ + { + id: "cDAI", + name: "Compound DAI", + symbol: "cDAI", + description: "Compound DAI", + erc20address: "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa", + vaultContractAddress: "0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d", + vaultContractABI: abi.cDAIContract, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 10650116, + measurement: 1e18, + price_id: "dai", + vaultSymbol: 'cDAI', + isCompound: true, + }, + { + id: "cUSDC", + name: "Compound USDC", + symbol: "cUSDC", + description: "Compound USDC", + erc20address: "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", + vaultContractAddress: "0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e", + vaultContractABI: abi.cUSDCContract, + balance: 0, + vaultBalance: 0, + decimals: 6, + deposit: true, + depositAll: false, + withdraw: true, + withdrawAll: false, + lastMeasurement: 10532708, + measurement: 1e18, + price_id: "usd-coin", + vaultSymbol: 'cUSDC', + isCompound: true, + }, + { + id: "cUSDT", + name: "Compound USDT", + symbol: "cUSDT", + description: "Compound USDT", + erc20address: "0x07de306ff27a2b630b1141956844eb1552b956b5", + vaultContractAddress: "0x5d102e0bdf2037899e1ff2e8cc50987108533c52", + vaultContractABI: abi.cUSDTContract, + balance: 0, + vaultBalance: 0, + decimals: 6, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 10651402, + measurement: 1e18, + price_id: "tether", + vaultSymbol: 'cUSDT', + isCompound: true, + }, { id: "DAI", name: "DAI", symbol: "DAI", description: "DAI Stablecoin", vaultSymbol: "yDAI", - erc20address: "0x6b175474e89094c44da98b954eedeac495271d0f", - vaultContractAddress: "0xacd43e627e64355f1861cec6d3a6688b31a6f952", + erc20address: "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa", + vaultContractAddress: "0x5c2eea0a960cc1f604bf3c35a52ca2273f12e67e", vaultContractABI: config.vaultContractV2ABI, balance: 0, vaultBalance: 0, @@ -18,7 +81,7 @@ module.exports = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 10650116, + lastMeasurement: 24563615, measurement: 1e18, price_id: "dai", }, @@ -28,8 +91,8 @@ module.exports = [ symbol: "TUSD", description: "TrueUSD", vaultSymbol: "yTUSD", - erc20address: "0x0000000000085d4780B73119b644AE5ecd22b376", - vaultContractAddress: "0x37d19d1c4e1fa9dc47bd1ea12f742a0887eda74a", + erc20address: "0xf0a112a9da3cae4668270729c3d5917b6cb79564", + vaultContractAddress: "0xa8564f8d255c33175d4882e55f1a6d19e7a7d351", vaultContractABI: config.vaultContractV2ABI, balance: 0, vaultBalance: 0, @@ -38,7 +101,7 @@ module.exports = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 10603368, + lastMeasurement: 24737399, measurement: 1e18, price_id: "true-usd", }, @@ -48,8 +111,8 @@ module.exports = [ symbol: "USDC", description: "USD//C", vaultSymbol: "yUSDC", - erc20address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - vaultContractAddress: "0x597ad1e0c13bfe8025993d9e79c69e1c0233522e", + erc20address: "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", + vaultContractAddress: "0xabdb489ded91b6646fadc8eeb0ca82ea1d526182", vaultContractABI: config.vaultContractABI, balance: 0, vaultBalance: 0, @@ -58,7 +121,7 @@ module.exports = [ depositAll: false, withdraw: true, withdrawAll: false, - lastMeasurement: 10532708, + lastMeasurement: 24563583, measurement: 1e18, price_id: "usd-coin", }, @@ -68,8 +131,8 @@ module.exports = [ symbol: "USDT", description: "Tether USD", vaultSymbol: "yUSDT", - erc20address: "0xdac17f958d2ee523a2206206994597c13d831ec7", - vaultContractAddress: "0x2f08119c6f07c006695e079aafc638b8789faf18", + erc20address: "0x07de306ff27a2b630b1141956844eb1552b956b5", + vaultContractAddress: "0xa5c53c76729e92630a2a3c549215110a330c902d", vaultContractABI: config.vaultContractV2ABI, balance: 0, vaultBalance: 0, @@ -78,255 +141,8 @@ module.exports = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 10651402, + lastMeasurement: 24547196, measurement: 1e18, price_id: "tether", }, - { - id: "cDAI", - name: "Compound DAI", - symbol: "cDAI", - description: "Compound DAI", - erc20address: "0x6b175474e89094c44da98b954eedeac495271d0f", - vaultContractAddress: "0x43C20638C3914Eca3c96e9cAc8ebE7d652Be45c6", - vaultContractABI: abi.cDAIContract, - balance: 0, - vaultBalance: 0, - decimals: 18, - deposit: true, - depositAll: true, - withdraw: true, - withdrawAll: true, - lastMeasurement: 10650116, - measurement: 1e18, - price_id: "cdai", - vaultSymbol: 'cDAI', - isCompound: true, - }, - { - id: "cUSDC", - name: "Compound USDC", - symbol: "cUSDC", - description: "Compound USDC", - erc20address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - vaultContractAddress: "0xd1D7f950899C0269a7F2aad5E854cdc3a1350ba9", - vaultContractABI: abi.cUSDCContract, - balance: 0, - vaultBalance: 0, - decimals: 6, - deposit: true, - depositAll: false, - withdraw: true, - withdrawAll: false, - lastMeasurement: 10532708, - measurement: 1e18, - price_id: "compound-usd-coin", - vaultSymbol: 'cUSDC', - isCompound: true, - }, - { - id: "cUSDT", - name: "Compound USDT", - symbol: "cUSDT", - description: "Compound USDT", - erc20address: "0xdac17f958d2ee523a2206206994597c13d831ec7", - vaultContractAddress: "0xEeCe6AD323a93d4B021BDAaC587DCC04b5cf0a78", - vaultContractABI: abi.cUSDTContract, - balance: 0, - vaultBalance: 0, - decimals: 6, - deposit: true, - depositAll: true, - withdraw: true, - withdrawAll: true, - lastMeasurement: 10651402, - measurement: 1e18, - price_id: "compound-usdt", - vaultSymbol: 'cUSDT', - isCompound: true, - }, - // { - // id: "cDAI", - // name: "Compound DAI", - // symbol: "cDAI", - // description: "Compound DAI", - // erc20address: "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa", - // vaultContractAddress: "0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d", - // vaultContractABI: abi.cDAIContract, - // balance: 0, - // vaultBalance: 0, - // decimals: 18, - // deposit: true, - // depositAll: true, - // withdraw: true, - // withdrawAll: true, - // lastMeasurement: 10650116, - // measurement: 1e18, - // price_id: "dai", - // vaultSymbol: 'cDAI', - // isCompound: true, - // }, - // { - // id: "cUSDC", - // name: "Compound USDC", - // symbol: "cUSDC", - // description: "Compound USDC", - // erc20address: "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", - // vaultContractAddress: "0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e", - // vaultContractABI: abi.cUSDCContract, - // balance: 0, - // vaultBalance: 0, - // decimals: 6, - // deposit: true, - // depositAll: false, - // withdraw: true, - // withdrawAll: false, - // lastMeasurement: 10532708, - // measurement: 1e18, - // price_id: "usd-coin", - // vaultSymbol: 'cUSDC', - // isCompound: true, - // }, - // { - // id: "cUSDT", - // name: "Compound USDT", - // symbol: "cUSDT", - // description: "Compound USDT", - // erc20address: "0x07de306ff27a2b630b1141956844eb1552b956b5", - // vaultContractAddress: "0x5d102e0bdf2037899e1ff2e8cc50987108533c52", - // vaultContractABI: abi.cUSDTContract, - // balance: 0, - // vaultBalance: 0, - // decimals: 6, - // deposit: true, - // depositAll: true, - // withdraw: true, - // withdrawAll: true, - // lastMeasurement: 10651402, - // measurement: 1e18, - // price_id: "tether", - // vaultSymbol: 'cUSDT', - // isCompound: true, - // }, - // { - // id: "DAI", - // name: "DAI", - // symbol: "DAI", - // description: "DAI Stablecoin", - // vaultSymbol: "yDAI", - // erc20address: "0x5592ec0cfb4dbc12d3ab100b257153436a1f0fea", - // vaultContractAddress: "0x193b83e8cc108c86362e47a4c2d3048837d4996e", - // vaultContractABI: config.vaultContractV2ABI, - // balance: 0, - // vaultBalance: 0, - // decimals: 18, - // deposit: true, - // depositAll: true, - // withdraw: true, - // withdrawAll: true, - // lastMeasurement: 10650116, - // measurement: 1e18, - // price_id: "dai", - // }, - // { - // id: "TUSD", - // name: "TUSD", - // symbol: "TUSD", - // description: "TrueUSD", - // vaultSymbol: "yTUSD", - // erc20address: "0xe1964bdd447ee6f0ee2bc734f1043eba35444cfc", - // vaultContractAddress: "0x0c9ddf949e32221612145807e34483ccf946b2b9", - // vaultContractABI: config.vaultContractV2ABI, - // balance: 0, - // vaultBalance: 0, - // decimals: 18, - // deposit: true, - // depositAll: true, - // withdraw: true, - // withdrawAll: true, - // lastMeasurement: 10603368, - // measurement: 1e18, - // price_id: "true-usd", - // }, - // { - // id: "USDC", - // name: "USD Coin", - // symbol: "USDC", - // description: "USD//C", - // vaultSymbol: "yUSDC", - // erc20address: "0x4dbcdf9b62e891a7cec5a2568c3f4faf9e8abe2b", - // vaultContractAddress: "0x231991d392dbe5980586665bc1a066f8efac78c8", - // vaultContractABI: config.vaultContractABI, - // balance: 0, - // vaultBalance: 0, - // decimals: 6, - // deposit: true, - // depositAll: false, - // withdraw: true, - // withdrawAll: false, - // lastMeasurement: 10532708, - // measurement: 1e18, - // price_id: "usd-coin", - // }, - // { - // id: "USDT", - // name: "USDT", - // symbol: "USDT", - // description: "Tether USD", - // vaultSymbol: "yUSDT", - // erc20address: "0xd9ba894e0097f8cc2bbc9d24d308b98e36dc6d02", - // vaultContractAddress: "0x359902517f43b8d38cf9718fe90e552375476f05", - // vaultContractABI: config.vaultContractV2ABI, - // balance: 0, - // vaultBalance: 0, - // decimals: 6, - // deposit: true, - // depositAll: true, - // withdraw: true, - // withdrawAll: true, - // lastMeasurement: 10651402, - // measurement: 1e18, - // price_id: "tether", - // }, - // { - // id: "aLINK", - // name: "aLINK", - // symbol: "aLINK", - // description: "Aave Interest bearing LINK", - // vaultSymbol: "yaLINK", - // erc20address: "0xA64BD6C70Cb9051F6A9ba1F163Fdc07E0DfB5F84", - // vaultContractAddress: "0x29E240CFD7946BA20895a7a02eDb25C210f9f324", - // vaultContractABI: config.vaultContractV2ABI, - // balance: 0, - // vaultBalance: 0, - // decimals: 18, - // deposit: true, - // depositAll: true, - // withdraw: true, - // withdrawAll: true, - // lastMeasurement: 10599617, - // measurement: 1e18, - // price_id: "aave-link", - // }, - // { - // id: "LINK", - // name: "ChainLink", - // symbol: "LINK", - // description: "ChainLink", - // vaultSymbol: "yLINK", - // erc20address: "0x514910771af9ca656af840dff83e8264ecf986ca", - // vaultContractAddress: "0x881b06da56BB5675c54E4Ed311c21E54C5025298", - // vaultContractABI: config.vaultContractV2ABI, - // balance: 0, - // vaultBalance: 0, - // decimals: 18, - // deposit: true, - // depositAll: true, - // withdraw: true, - // withdrawAll: true, - // depositDisabled: true, - // lastMeasurement: 10604016, - // measurement: 1e18, - // price_id: "chainlink", - // }, ]; diff --git a/services/vaults/save/handler.js b/services/vaults/save/handler.js index 1b59536..82998ca 100644 --- a/services/vaults/save/handler.js +++ b/services/vaults/save/handler.js @@ -5,7 +5,7 @@ const db = require('../../../models/vault.model'); const _ = require("lodash"); const fetch = require("node-fetch"); const Web3 = require("web3"); -const web3 = new Web3(process.env.WEB3_ENDPOINT); +const web3 = new Web3(process.env.MAIN_WEB3_ENDPOINT); const etherscanApiKey = process.env.ETHERSCAN_API_KEY; const yRegistryAbi = require("./abis/yRegistry"); const yRegistryAddress = "0x3ee41c098f9666ed2ea246f4d2558010e59d63a0"; From 15084eac4cb100ed004f1de821768f1df22a1feb Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Sun, 9 May 2021 22:22:54 +0800 Subject: [PATCH 036/254] Added auth --- .env.example | 1 + config/db.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index cee5ce7..54bf18c 100644 --- a/.env.example +++ b/.env.example @@ -11,3 +11,4 @@ MONGO_PORT= MONGO_DB= PRODUCTION= AUTH_MECHANISM= +MONGO_AUTH= diff --git a/config/db.js b/config/db.js index 904f90d..f74d859 100644 --- a/config/db.js +++ b/config/db.js @@ -12,7 +12,7 @@ const Api = require('../utils/api') let _db; const connectDB = async (callback) => { var url = ''; - if (process.env.PRODUCTION != null && process.env.PRODUCTION != '') { + if (process.env.MONGO_AUTH != '') { url = `mongodb://${encodeURIComponent(MONGO_USERNAME)}:${encodeURIComponent(MONGO_PASSWORD)}@${MONGO_HOSTNAME}:${MONGO_PORT}/${MONGO_DB}?authMechanism=${AUTH_MECHANISM}`; } else { url = `mongodb://${MONGO_HOSTNAME}`; From 8aa41ffb5f3b2c8556baa5bd2e228f1325802450 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Mon, 10 May 2021 14:14:14 +0800 Subject: [PATCH 037/254] - Enhance TVL changes - Added Category oof Vaults --- app.js | 19 +++ config/serverless/domain.js | 62 ------- models/vault-category.model.js | 11 ++ package-lock.json | 13 ++ package.json | 1 + scripts/initial.js | 21 +++ services/user/vaults/transactions/handler.js | 1 - services/vaults/category/handler.js | 15 ++ services/vaults/tvl/handler.js | 48 ++---- swagger.json | 171 +++++++++++++++++++ 10 files changed, 262 insertions(+), 100 deletions(-) create mode 100644 models/vault-category.model.js create mode 100644 scripts/initial.js create mode 100644 services/vaults/category/handler.js create mode 100644 swagger.json diff --git a/app.js b/app.js index 95da4ec..4ba4c6e 100644 --- a/app.js +++ b/app.js @@ -6,10 +6,13 @@ const userTransactions = require("./services/user/vaults/transactions/handler"); const vaultsPrice = require("./services/vaults/price/handler"); const vaultsTvl = require("./services/vaults/tvl/handler"); const vaultHistoricalAPYSave = require("./services/vaults/apy/save/historical-handle"); +const vaultCategory = require('./services/vaults/category/handler'); const app = express(); const cors = require("cors"); const port = process.env.PORT || 8080; const jobs = require("./jobs/task"); +const swaggerUi = require('swagger-ui-express'); +const swaggerDocument = require('./swagger.json'); async function init() { // Improve debugging @@ -50,6 +53,22 @@ async function init() { vaultsTvl.getTotalTVLhandle(req, res) ); + app.get("/vaults/category", (req, res) => + vaultCategory.getVaultCategory(req, res) + ); + + const options = { + definition: { + openapi: '3.0.0', + info: { + title: 'Hello World', + version: '1.0.0', + }, + }, + apis: ['./src/routes*.js'], // files containing annotations as above + }; + app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument)); + app.listen(port, () => console.log(`Listening on ${port}`)); } diff --git a/config/serverless/domain.js b/config/serverless/domain.js index c743412..0162fe4 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -34,133 +34,107 @@ const testContracts = { 'yUSDT': { address: '0x2ad9f8d4c24652ea9f8a954f7e1fdb50a3be1dfd', abi: abi.earnUSDTABIContract, - network: "rinkeby", }, 'yUSDC': { address: '0x2200a7e736821f5915ed3c40e7088a7e56dea64a', abi: abi.earnUSDCABIContract, - network: "rinkeby", }, 'yDAI': { address: '0x690bcadb0d5633766510be078b97796d90acc7d8', abi: abi.earnDAIABIContract, - network: "rinkeby", }, 'yTUSD': { address: '0x6c45ba691a8f587e3fd7f17c7adefce8dfa452aa', abi: abi.earnTUSDABIContract, - network: "rinkeby", }, }, vault: { 'yUSDT': { address: '0xa5c53c76729e92630a2a3c549215110a330c902d', abi: config.vaultContractV2ABI, - network: "rinkeby", }, 'yUSDC': { address: '0xabdb489ded91b6646fadc8eeb0ca82ea1d526182', abi: config.vaultContractABI, - network: "rinkeby", }, 'yDAI': { address: '0x5c2eea0a960cc1f604bf3c35a52ca2273f12e67e', abi: config.vaultContractV2ABI, - network: "rinkeby", }, 'yTUSD': { address: '0xa8564f8d255c33175d4882e55f1a6d19e7a7d351', abi: config.vaultContractV2ABI, - network: "rinkeby", }, }, - compund: { cUSDT: { address: "0x3f0a0ea2f86bae6362cf9799b523ba06647da018", abi: abi.cUSDTContract, - network: "kovan", }, cUSDC: { address: "0x4a92e71227d294f041bd82dd8f78591b75140d63", abi: abi.cUSDCContract, - network: "kovan", }, cDAI: { address: "0xf0d0eb522cfa50b716b3b1604c4f0fa6f04376ad", abi: abi.cDAIContract, - network: "kovan", }, }, farmer: { 'yUSDT': { - name: "yUSDT", address: '0x6B150E9BD70E216775c8b73270E64e870a3110c1', abi: abi.vaultUSDTABIContract, strategyAddress: '0x31324c1c0bb6b4b6f8102acb8346b065307926fa', strategyABI: abi.yearnUSDTABIContract, contractType: "yearn", - network: "rinkeby", tokenId: "tether", }, 'yUSDC': { - name: "yUSDC", address: '0x6E15e283dc430eca010Ade8b11b5B377902d6e56', abi: abi.vaultUSDCABIContract, strategyAddress: '0xe77ad5e2c4e7143fdbac6a4dde891727fc395c75', strategyABI: abi.yearnUSDCABIContract, contractType: "yearn", - network: "rinkeby", tokenId: "usd-coin", }, 'yDAI': { - name: "yDAI", address: '0x2428bFD238a3632552B343297c504F60283009eD', abi: abi.vaultDAIABIContract, strategyAddress: '0x8615dfb5b53e9ddb3751fbc3fc59512d4aba9a22', strategyABI: abi.yearnDAIABIContract, contractType: "yearn", - network: "rinkeby", tokenId: "dai", }, 'yTUSD': { - name: "yTUSD", address: '0xEcCb98c36bfc8c49c6065d1cD90bcf1c6F02D4AD', abi: abi.vaultTUSDABIContract, strategyAddress: '0xf64674cfc6597d597275144a1a746dad564b0fcd', strategyABI: abi.yearnTUSDABIContract, contractType: "yearn", - network: "rinkeby", tokenId: "true-usd", }, cUSDT: { - name: "cUSD", address: "0x5d102e0bdf2037899e1ff2e8cc50987108533c52", abi: abi.compoundVaultContract, strategyAddress: "0xa5c956aef6a21c986665de9cf889ef36613c7d5e", strategyABI: abi.compoundStrategyContract, contractType: "compound", - network: "kovan", tokenId: "tether", }, cUSDC: { - name: "cUSDC", address: "0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e", abi: abi.compoundVaultContract, strategyAddress: "0x3add8a9d3176c4b30dddeeababf9ca5cc3d49944", strategyABI: abi.compoundStrategyContract, contractType: "compound", - network: "kovan", tokenId: "usd-coin", }, cDAI: { - name: "cDAI", address: "0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d", abi: abi.compoundVaultContract, strategyAddress: "0xb951976a7d79fd8a589a7ca9753641380f5c1ab4", strategyABI: abi.compoundStrategyContract, contractType: "compound", - network: "kovan", tokenId: "dai", }, }, @@ -171,123 +145,93 @@ const mainContracts = { yUSDT: { address: "0xdb12e805d004698fc58f6e4fbdd876268df2dffe", abi: abi.earnUSDTABIContract, - network: "main", - tokenId: "tether", }, yUSDC: { address: "0xC6Be21D8533e90Fd136905eBe70c9d9148237f2d", abi: abi.earnUSDCABIContract, - network: "main", - tokenId: "usd-coin", }, yDAI: { address: "0x21857b392b7d0ca20c439bc39896f38ee74c6023", abi: abi.earnDAIABIContract, - network: "main", - tokenId: "dai", }, yTUSD: { address: "0x63659fcb4a1f62e0c80690ddc67084e8e1560c61", abi: abi.earnTUSDABIContract, - network: "main", - tokenId: "true-usd", }, }, vault: { yUSDT: { address: "0x2f08119c6f07c006695e079aafc638b8789faf18", abi: config.vaultContractV2ABI, - network: "main", - tokenId: "tether", }, yUSDC: { address: "0x597ad1e0c13bfe8025993d9e79c69e1c0233522e", abi: config.vaultContractABI, - network: "main", - tokenId: "usd-coin", }, yDAI: { address: "0xacd43e627e64355f1861cec6d3a6688b31a6f952", abi: config.vaultContractV2ABI, - network: "main", - tokenId: "dai", }, yTUSD: { address: "0x37d19d1c4e1fa9dc47bd1ea12f742a0887eda74a", abi: config.vaultContractV2ABI, - network: "main", - tokenId: "true-usd", }, }, farmer: { yUSDT: { - name: "yUSDT", address: "0x4F0C1c9bA6B9CCd0BEd6166e86b672ac8EE621F7", abi: abi.vaultUSDTABIContract, strategyAddress: "0x3DB93e95c9881BC7D9f2C845ce12e97130Ebf5f2", strategyABI: abi.yearnUSDTABIContract, contractType: "yearn", - network: "main", tokenId: "tether", }, yUSDC: { - name: "yUSDC", address: "0x9f0230FbDC0379E5FefAcca89bE03A42Fec5fb6E", abi: abi.vaultUSDCABIContract, strategyAddress: "0x4A9dE4dA5eC67E1dbc8e18F26E178B40D690A11D", strategyABI: abi.yearnUSDCABIContract, contractType: "yearn", - network: "main", tokenId: "usd-coin", }, yDAI: { - name: "yDAI", address: "0x2bFc2Da293C911e5FfeC4D2A2946A599Bc4Ae770", abi: abi.vaultDAIABIContract, strategyAddress: "0x3685fB7CA1C555Cb5BD5A246422ee1f2c53DdB71", strategyABI: abi.yearnDAIABIContract, contractType: "yearn", - network: "main", tokenId: "dai", }, yTUSD: { - name: "yTUSD", address: "0x2C8de02aD4312069355B94Fb936EFE6CFE0C8FF6", abi: abi.vaultTUSDABIContract, strategyAddress: "0xA6F1409a259B21a84c8346ED1B0826D656959a54", strategyABI: abi.yearnTUSDABIContract, contractType: "yearn", - network: "main", tokenId: "true-usd", }, cUSDT: { - name: "cUSDT", address: "0xEeCe6AD323a93d4B021BDAaC587DCC04b5cf0a78", abi: abi.compoundVaultContract, strategyAddress: "0x11af10648ed5094f41753ccb69a2f74135697631", strategyABI: abi.compoundStrategyContract, contractType: "compound", - network: "main", tokenId: "tether", }, cUSDC: { - name: "cUSDC", address: "0xd1D7f950899C0269a7F2aad5E854cdc3a1350ba9", abi: abi.compoundVaultContract, strategyAddress: "0x89be389b0529ca3187b6e81e689496cb3bad8557", strategyABI: abi.compoundStrategyContract, contractType: "compound", - network: "main", tokenId: "usd-coin", }, cDAI: { - name: "cDAI", address: "0x43C20638C3914Eca3c96e9cAc8ebE7d652Be45c6", abi: abi.compoundVaultContract, strategyAddress: "0x0c5cff1c9ec7ce8e28998503471b19c848c5a581", strategyABI: abi.compoundStrategyContract, contractType: "compound", - network: "main", tokenId: "dai", }, }, @@ -295,20 +239,14 @@ const mainContracts = { cUSDT: { address: "0xf650c3d88d12db855b8bf7d11be6c55a4e07dcc9", abi: abi.cUSDTContract, - network: "main", - tokenId: "tether", }, cUSDC: { address: "0x39aa39c021dfbae8fac545936693ac917d5e7563", abi: abi.cUSDTContract, - network: "main", - tokenId: "usd-coin", }, cDAI: { address: "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643", abi: abi.cDAIContract, - network: "main", - tokenId: "dai", }, }, }; diff --git a/models/vault-category.model.js b/models/vault-category.model.js new file mode 100644 index 0000000..bc8186c --- /dev/null +++ b/models/vault-category.model.js @@ -0,0 +1,11 @@ +const mongo = require('../config/db'); +const collection = 'vault_categories'; + +const findAll = async () => { + const db = mongo.getDB(); + return await db.collection(collection).find({}).toArray(); +}; + +module.exports = { + findAll, +}; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 8385951..bd996b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3895,6 +3895,19 @@ "has-flag": "^4.0.0" } }, + "swagger-ui-dist": { + "version": "3.48.0", + "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-3.48.0.tgz", + "integrity": "sha512-UgpKIQW5RAb4nYRG8B615blmQzct0DNuvtX4904Fe2aMWAVfWeKHKl4kwzFXuBJgr2WYWTwM1PnhZ+qqkLrpPg==" + }, + "swagger-ui-express": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/swagger-ui-express/-/swagger-ui-express-4.1.6.tgz", + "integrity": "sha512-Xs2BGGudvDBtL7RXcYtNvHsFtP1DBFPMJFRxHe5ez/VG/rzVOEjazJOOSc/kSCyxreCTKfJrII6MJlL9a6t8vw==", + "requires": { + "swagger-ui-dist": "^3.18.1" + } + }, "swarm-js": { "version": "0.1.40", "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.40.tgz", diff --git a/package.json b/package.json index 68c0331..0592181 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "node-cron": "^2.0.3", "node-fetch": "^2.6.1", "ramda": "^0.27.1", + "swagger-ui-express": "^4.1.6", "web3": "^1.3.0" } } diff --git a/scripts/initial.js b/scripts/initial.js new file mode 100644 index 0000000..b073938 --- /dev/null +++ b/scripts/initial.js @@ -0,0 +1,21 @@ +// Mainnet Contracts +db.vault_categories.insertMany([ + { name: 'advance', contract_address: '0x4F0C1c9bA6B9CCd0BEd6166e86b672ac8EE621F7', symbol: 'yUSDT' }, + { name: 'advance', contract_address: '0x9f0230FbDC0379E5FefAcca89bE03A42Fec5fb6E', symbol: 'yUSDC' }, + { name: 'advance', contract_address: '0x2bFc2Da293C911e5FfeC4D2A2946A599Bc4Ae770', symbol: 'yDAI' }, + { name: 'advance', contract_address: '0x2C8de02aD4312069355B94Fb936EFE6CFE0C8FF6', symbol: 'yTUSD' }, + { name: 'basic', contract_address: '0xEeCe6AD323a93d4B021BDAaC587DCC04b5cf0a78', symbol: 'cUSDT' }, + { name: 'basic', contract_address: '0xd1D7f950899C0269a7F2aad5E854cdc3a1350ba9', symbol: 'cUSDC', }, + { name: 'basic', contract_address: '0x43C20638C3914Eca3c96e9cAc8ebE7d652Be45c6', symbol: 'cDAI', }, +]); + +// Testnet Contracts +db.vault_categories.insertMany([ + { name: 'advance', contract_address: '0x6B150E9BD70E216775c8b73270E64e870a3110c1', symbol: 'yUSDT' }, + { name: 'advance', contract_address: '0x6E15e283dc430eca010Ade8b11b5B377902d6e56', symbol: 'yUSDC' }, + { name: 'advance', contract_address: '0x2428bFD238a3632552B343297c504F60283009eD', symbol: 'yDAI' }, + { name: 'advance', contract_address: '0xEcCb98c36bfc8c49c6065d1cD90bcf1c6F02D4AD', symbol: 'yTUSD' }, + { name: 'basic', contract_address: '0x5d102e0bdf2037899e1ff2e8cc50987108533c52', symbol: 'cUSDT' }, + { name: 'basic', contract_address: '0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e', symbol: 'cUSDC', }, + { name: 'basic', contract_address: '0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d', symbol: 'cDAI', }, +]); \ No newline at end of file diff --git a/services/user/vaults/transactions/handler.js b/services/user/vaults/transactions/handler.js index 11daa53..69f3125 100644 --- a/services/user/vaults/transactions/handler.js +++ b/services/user/vaults/transactions/handler.js @@ -181,7 +181,6 @@ const getTransactions = async (userAddress) => { const removeVaultAddressField = (deposit) => _.omit(deposit, "vaultAddress"); const getTransactionsByVaultAddress = (vaultAddress) => { - console.log('vaultAddress', vaultAddress); const findItemByVaultAddress = (item) => item.vaultAddress === vaultAddress; const findVault = (vault) => vault.address.toLowerCase() === vaultAddress.toLowerCase(); diff --git a/services/vaults/category/handler.js b/services/vaults/category/handler.js new file mode 100644 index 0000000..49e64d0 --- /dev/null +++ b/services/vaults/category/handler.js @@ -0,0 +1,15 @@ +"use strict" + +const db = require('../../../models/vault-category.model'); + +module.exports.getVaultCategory = async (req, res) => { + let result = await db.findAll(); + if (result.length > 0) { + result.forEach((v) => delete v._id) + } + + res.status(200).json({ + message: "", + body: result, + }); +} diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index b4f39c2..60d7ec2 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -5,6 +5,7 @@ const Web3 = require("web3"); const CoinGecko = require("coingecko-api"); const CoinGeckoClient = new CoinGecko(); const archiveNodeUrl = process.env.ARCHIVENODE_ENDPOINT; +const web3Url = process.env.WEB3_ENDPOINT; const infuraMainnetUrl = `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`; const infuraKovanUrl = @@ -15,7 +16,7 @@ const infuraRopstenUrl = `https://ropsten.infura.io/v3/${process.env.INFURA_API_KEY}`; const archiveNodeWeb3 = new Web3(archiveNodeUrl); -const infuraMainnetWeb3 = new Web3(infuraMainnetUrl); +const infuraWeb3 = new Web3(web3Url); const infuraKovanWeb3 = new Web3(infuraKovanUrl); const infuraRinkebyWeb3 = new Web3(infuraRinkebyUrl); const infuraRopstenWeb3 = new Web3(infuraRopstenUrl); @@ -28,7 +29,6 @@ const { const getDecimals = async (contract) => { try { let decimals = await contract.methods.decimals().call(); - // console.log("Decimals", decimals); return decimals; } catch (err) { // Catch error @@ -50,20 +50,8 @@ const getPoolAmount = async (contract) => { }; const getContract = (vault) => { - const { strategyABI, strategyAddress, network } = vault; - let contract; - - // console.log(network); - if (network === "main") { - contract = new infuraMainnetWeb3.eth.Contract(strategyABI, strategyAddress); - } else if (network === "kovan") { - contract = new infuraKovanWeb3.eth.Contract(strategyABI, strategyAddress); - } else if (network === "rinkeby") { - contract = new infuraRinkebyWeb3.eth.Contract(strategyABI, strategyAddress); - } else if (network === "ropsten") { - contract = new infuraRopstenWeb3.eth.Contract(strategyABI, strategyAddress); - } - + const { strategyABI, strategyAddress } = vault; + const contract = new archiveNodeWeb3.eth.Contract(strategyABI, strategyAddress); return contract; }; @@ -99,7 +87,6 @@ const getTVL = async (vault) => { const tokenPrice = await getTokenPrice(tokenId); tvl = (poolAmount / 10 ** decimals) * tokenPrice; - console.log("TVL for", vault.name, tvl) return tvl; }; @@ -111,16 +98,12 @@ const getAllTVL = await = async () => { : testContracts; let tvls = Array(); - // console.log(vaults); for (vault in vaults.farmer) { - // console.log(vaults.farmer[vault]); let _vault = vaults.farmer[vault]; let tvl = await getTVL(_vault); tvls.push(tvl); - await saveTVL(_vault, tvl); - - // console.log("TVL", tvl); + await saveTVL(vault, tvl); } return tvls; @@ -131,7 +114,6 @@ const getTotalTVL = async (tvls) => { let totalTVL try{ totalTVL = _.sum(tvls); - console.log("Total TVL", totalTVL) } catch (err) { // Catch error console.log(err); @@ -149,9 +131,7 @@ const saveTotalTVL = async (totalTVL) => { }; // Save TVL of specified Vault -const saveTVL = async (vault, tvl) => { - const { name } = vault; - +const saveTVL = async (name, tvl) => { await db .add(name + "_tvl", { tvl: tvl, @@ -159,15 +139,11 @@ const saveTVL = async (vault, tvl) => { .catch((err) => console.log("err", err)); }; -// const vault = testContracts.farmer.cUSDT; - -// getPoolAmount(vault); -// const tvls = await (); - -const getVaults = async () => { - const vaults = await db.findAll(); - return vaults; -}; +const getVaults = () => { + return process.env.PRODUCTION != null && process.env.PRODUCTION != "" + ? mainContracts + : testContracts; +} // Save All TVLs to database module.exports.saveAllTVLhandler = async () => { @@ -191,8 +167,6 @@ module.exports.getTotalTVLhandle = async () => { module.exports.getTVLhandle = async (req, res) => { // check if vault param is input - console.log("get TVL handle"); - if (req.params.farmer === null || req.params.farmer === "") { res.status(200).json({ message: "Farmer is empty.", diff --git a/swagger.json b/swagger.json new file mode 100644 index 0000000..41a459f --- /dev/null +++ b/swagger.json @@ -0,0 +1,171 @@ +{ + "swagger": "2.0", + "info": { + "version": "1.0.0", + "title": "DAOventures API", + "description": "DAOventures API documentation" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/vaults/apy": { + "get": { + "tags": [ + "Vaults" + ], + "description": "Vault Information with APY", + "produces": [ + "application/json" + ], + "responses": {} + } + }, + "/user/{userAddress}/vaults/statistics": { + "get": { + "tags": [ + "Users" + ], + "description": "Transaction information of the user and vaults", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "userAddress", + "in": "path", + "description": "User Wallet Address (Lower Case)", + "required": true, + "type": "string" + } + ], + "responses": {} + } + }, + "/user/{userAddress}/vaults/transactions": { + "get": { + "tags": [ + "Users" + ], + "description": "Transaction history of the user", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "userAddress", + "in": "path", + "description": "User Wallet Address (Lower Case)", + "required": true, + "type": "string" + } + ], + "responses": {} + } + }, + "/vaults/price/{farmer}/{days}": { + "get": { + "tags": [ + "Vaults" + ], + "description": "Price history of the vault", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "farmer", + "in": "path", + "description": "Vault ID with '_price'", + "required": true, + "type": "string" + }, + { + "name": "days", + "in": "path", + "description": "Number of days. Only available for '30d', '7d', '1d'.", + "required": true, + "type": "string" + } + ], + "responses": {} + } + }, + "/vaults/historical-apy/{contractAddress}/{days}": { + "get": { + "tags": [ + "Vaults" + ], + "description": "APY history of the vaults", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "contractAddress", + "in": "path", + "description": "Vault Address", + "required": true, + "type": "string" + }, + { + "name": "days", + "in": "path", + "description": "Number of days. Only available for '30d', '7d', '1d'.", + "required": true, + "type": "string" + } + ], + "responses": {} + } + }, + "/vaults/tvl/{farmer}": { + "get": { + "tags": [ + "Vaults" + ], + "description": "TVL of the vault", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "farmer", + "in": "path", + "description": "Vault ID", + "required": true, + "type": "string" + } + ], + "responses": {} + } + }, + "/vaults/tvl/total": { + "get": { + "tags": [ + "Vaults" + ], + "description": "Total TVL of all the existing vaults", + "produces": [ + "application/json" + ], + "responses": {} + } + }, + "/vaults/category": { + "get": { + "tags": [ + "Vaults" + ], + "description": "Get All Vault Categories", + "produces": [ + "application/json" + ], + "responses": {} + } + } + } +} \ No newline at end of file From 91b028bec25c15b77cdaad9466a97569f55940c1 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Mon, 10 May 2021 14:22:30 +0800 Subject: [PATCH 038/254] Add basePath for swagger documentation --- swagger.json | 1 + 1 file changed, 1 insertion(+) diff --git a/swagger.json b/swagger.json index 41a459f..3686d1b 100644 --- a/swagger.json +++ b/swagger.json @@ -5,6 +5,7 @@ "title": "DAOventures API", "description": "DAOventures API documentation" }, + "basePath": "/api/", "consumes": [ "application/json" ], From 942a30ffd0e59eb4880c961d39a6f8a303d83e76 Mon Sep 17 00:00:00 2001 From: Soon Lai <43904148+soonlai814@users.noreply.github.com> Date: Mon, 10 May 2021 14:24:06 +0800 Subject: [PATCH 039/254] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1d6b9a4..feaa41b 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Yearn API intentions are as follows: ## Interact -https://yearn.tools +https://test.daoventures.co/api/api-docs/ ## Setup Instructions From 1e1273ffbef6b28df48cf0bce78ec920253ae141 Mon Sep 17 00:00:00 2001 From: Soon Lai <43904148+soonlai814@users.noreply.github.com> Date: Mon, 10 May 2021 14:26:23 +0800 Subject: [PATCH 040/254] Update README.md --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index feaa41b..6cd54e4 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ https://test.daoventures.co/api/api-docs/ - Execute terminal commands ``` -git clone https://github.com/yearn-integrations/yearn-api.git +git clone https://github.com/daoventures/yearn-api.git cd yearn-api cp .env.example .env docker-compose up @@ -48,9 +48,8 @@ docker-compose up ## Stages - Currently three stages are available -- `prod` is used for production deployments. Production endpoint is https://api.yearn.tools -- `dev` is used for development purposes. Development endpoint is https://dev-api.yearn.tools -- `staging` is used for APIs pending production deployment. Staging endpoint is https://staging-api.yearn.tools +- `beta` is used for beta deployments. Beta endpoint is https://beta.daoventures.co/api/ +- `test` is used for development purposes. Development endpoint is https://test.daoventures.co/api/ ### Reset a stage From 83aac03dff9e1b68449dd58176bc15a90d958075 Mon Sep 17 00:00:00 2001 From: Soon Lai <43904148+soonlai814@users.noreply.github.com> Date: Mon, 10 May 2021 14:26:48 +0800 Subject: [PATCH 041/254] Update README.md --- README.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/README.md b/README.md index 6cd54e4..344c972 100644 --- a/README.md +++ b/README.md @@ -50,12 +50,3 @@ docker-compose up - Currently three stages are available - `beta` is used for beta deployments. Beta endpoint is https://beta.daoventures.co/api/ - `test` is used for development purposes. Development endpoint is https://test.daoventures.co/api/ - -### Reset a stage - -- Use the command `sls remove --stage dev` to remove all functions and custom domains associated with a stage - -### API deployment - -- Use the command `sls deploy --stage dev` to deploy -- You can also deploy a single function using `sls deploy function -f functionName --stage dev` From d77b9ca4f44523a40837d22e9decd579f697da21 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Mon, 17 May 2021 08:17:41 +0800 Subject: [PATCH 042/254] - Added vipDVG token API - Added stake pool API --- app.js | 18 +++++------ models/stake-pool.model.js | 31 +++++++++++++++++++ models/xdvg-token.model.js | 31 +++++++++++++++++++ scripts/initial.js | 14 ++++++++- services/staking/handler.js | 53 ++++++++++++++++++++++++++++++++ services/staking/xdvg/handler.js | 45 +++++++++++++++++++++++++++ swagger.json | 24 +++++++++++++++ 7 files changed, 205 insertions(+), 11 deletions(-) create mode 100644 models/stake-pool.model.js create mode 100644 models/xdvg-token.model.js create mode 100644 services/staking/handler.js create mode 100644 services/staking/xdvg/handler.js diff --git a/app.js b/app.js index 4ba4c6e..7ef7889 100644 --- a/app.js +++ b/app.js @@ -7,6 +7,8 @@ const vaultsPrice = require("./services/vaults/price/handler"); const vaultsTvl = require("./services/vaults/tvl/handler"); const vaultHistoricalAPYSave = require("./services/vaults/apy/save/historical-handle"); const vaultCategory = require('./services/vaults/category/handler'); +const stakeVIP = require('./services/staking/xdvg/handler'); +const stakePool = require('./services/staking/handler'); const app = express(); const cors = require("cors"); const port = process.env.PORT || 8080; @@ -56,17 +58,13 @@ async function init() { app.get("/vaults/category", (req, res) => vaultCategory.getVaultCategory(req, res) ); + app.get("/staking/get-vip-tokens", (req, res) => + stakeVIP.getVipDVGToken(req, res) + ); + app.get("/staking/get-pools", (req, res) => + stakePool.getPools(req, res) + ); - const options = { - definition: { - openapi: '3.0.0', - info: { - title: 'Hello World', - version: '1.0.0', - }, - }, - apis: ['./src/routes*.js'], // files containing annotations as above - }; app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument)); app.listen(port, () => console.log(`Listening on ${port}`)); diff --git a/models/stake-pool.model.js b/models/stake-pool.model.js new file mode 100644 index 0000000..2f02820 --- /dev/null +++ b/models/stake-pool.model.js @@ -0,0 +1,31 @@ +const mongo = require('../config/db'); +const collection = 'stake_pool'; + +const findAll = async () => { + const db = mongo.getDB(); + return await db.collection(collection).find({}).toArray(); +}; + +const add = async (params) => { + const db = mongo.getDB(); + const result = await db.collection(collection).findOne({ + name: params.name + }); + if (result != null) { + return await db.collection(collection).updateOne({ + name: params.name + }, + { + $set: { + ...params + } + }); + } else { + return await db.collection(collection).insertOne(params); + } +} + +module.exports = { + findAll, + add +}; \ No newline at end of file diff --git a/models/xdvg-token.model.js b/models/xdvg-token.model.js new file mode 100644 index 0000000..c036dd5 --- /dev/null +++ b/models/xdvg-token.model.js @@ -0,0 +1,31 @@ +const mongo = require('../config/db'); +const collection = 'xdvg_token'; + +const find = async () => { + const db = mongo.getDB(); + return await db.collection(collection).findOne({}); +}; + +const add = async (params) => { + const db = mongo.getDB(); + const result = await db.collection(collection).findOne({ + name: params.name + }); + if (result != null) { + return await db.collection(collection).updateOne({ + name: params.name + }, + { + $set: { + ...params + } + }); + } else { + return await db.collection(collection).insertOne(params); + } +} + +module.exports = { + find, + add +}; \ No newline at end of file diff --git a/scripts/initial.js b/scripts/initial.js index b073938..874ca07 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -18,4 +18,16 @@ db.vault_categories.insertMany([ { name: 'basic', contract_address: '0x5d102e0bdf2037899e1ff2e8cc50987108533c52', symbol: 'cUSDT' }, { name: 'basic', contract_address: '0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e', symbol: 'cUSDC', }, { name: 'basic', contract_address: '0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d', symbol: 'cDAI', }, -]); \ No newline at end of file +]); + +db.xdvg_token.insert({ + name: 'USDT', + contract_address: '0x07de306FF27a2B630B1141956844eB1552B956B5' +}); + +db.stake_pool.insert({ + name: 'USDT', + contract_address: '0x07de306FF27a2B630B1141956844eB1552B956B5', + status: 'A', + pid: '0' +}); \ No newline at end of file diff --git a/services/staking/handler.js b/services/staking/handler.js new file mode 100644 index 0000000..c3aed87 --- /dev/null +++ b/services/staking/handler.js @@ -0,0 +1,53 @@ +const db = require("../../models/stake-pool.model"); +const fetch = require("node-fetch"); +const delay = require("delay"); +const _ = require("lodash"); + +const delayTime = 500; + +const fetchContractABI = async (address) => { + let network = ''; + if (process.env.PRODUCTION == null || process.env.PRODUCTION == "") { + network = '-kovan'; + } + const url = `https://api${network}.etherscan.io/api?module=contract&action=getabi&address=${address}&apikey=${process.env.ETHERSCAN_API_KEY}`; + const resp = await fetch(url).then((res) => res.json()); + const metadata = resp.result; + await delay(delayTime); + return metadata; +}; + +const getPoolInfo = async (pool) => { + const abi = await fetchContractABI(pool.contract_address); + delete pool._id; + Object.assign(pool, { + abi, + }); + return pool; +} + +module.exports.getPools = async (req, res) => { + try { + const pls = []; + const pools = await db.findAll(); + const poolSize = _.size(pools); + for (idx = 0; idx < poolSize; idx++) { + const pool = await getPoolInfo(pools[idx]); + pls.push(pool); + } + + res.status(200).json({ + message: 'Successful Response', + body: { + pools: pls, + } + }); + } catch (err) { + res.status(200).json({ + message: err.message, + body: null + }); + } + + return; +} \ No newline at end of file diff --git a/services/staking/xdvg/handler.js b/services/staking/xdvg/handler.js new file mode 100644 index 0000000..1372dee --- /dev/null +++ b/services/staking/xdvg/handler.js @@ -0,0 +1,45 @@ +const db = require("../../../models/xdvg-token.model"); +const fetch = require("node-fetch"); +const delay = require("delay"); +const delayTime = 500; + +const fetchContractABI = async (address) => { + let network = ''; + if (process.env.PRODUCTION == null || process.env.PRODUCTION == "") { + network = '-kovan'; + } + const url = `https://api${network}.etherscan.io/api?module=contract&action=getabi&address=${address}&apikey=${process.env.ETHERSCAN_API_KEY}`; + const resp = await fetch(url).then((res) => res.json()); + const metadata = resp.result; + await delay(delayTime); + return metadata; +}; + +module.exports.getVipDVGToken = async (req, res) => { + try { + const token = await db.find(); + let abi; + if (token) { + abi = await fetchContractABI(token.contract_address); + } + + delete token._id; + Object.assign(token, { + abi, + }); + + res.status(200).json({ + message: 'Successful Response', + body: { + token, + } + }); + } catch (err) { + res.status(200).json({ + message: err.message, + body: null + }); + } + + return; +} \ No newline at end of file diff --git a/swagger.json b/swagger.json index 3686d1b..0092632 100644 --- a/swagger.json +++ b/swagger.json @@ -167,6 +167,30 @@ ], "responses": {} } + }, + "/staking/get-vip-tokens": { + "get": { + "tags": [ + "Stake" + ], + "description": "vipDVG Token Information", + "produces": [ + "application/json" + ], + "responses": {} + } + }, + "/staking/get-pools": { + "get": { + "tags": [ + "Stake" + ], + "description": "Stake Pools Information", + "produces": [ + "application/json" + ], + "responses": {} + } } } } \ No newline at end of file From 3ae4dcefaa7aac0d251acbd9ee08ff3da29264a0 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Tue, 18 May 2021 10:04:24 +0800 Subject: [PATCH 043/254] update local --- config/db.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/db.js b/config/db.js index aeb5f2e..9b25eaf 100644 --- a/config/db.js +++ b/config/db.js @@ -15,7 +15,7 @@ const connectDB = async (callback) => { if (process.env.MONGO_AUTH != '') { url = `mongodb://${encodeURIComponent(MONGO_USERNAME)}:${encodeURIComponent(MONGO_PASSWORD)}@${MONGO_HOSTNAME}:${MONGO_PORT}/${MONGO_DB}?authMechanism=${AUTH_MECHANISM}`; } else { - url = `mongodb://${MONGO_HOSTNAME}:${MONGO_PORT}/${MONGO_DB}`; + url = `mongodb://${MONGO_HOSTNAME}`; } MongoClient.connect( url, From 8dfbfed68e6e7e1ab9ade9b46a9c6478c6d46067 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Wed, 19 May 2021 20:17:12 +0800 Subject: [PATCH 044/254] add handler for vipDVG. --- services/staking/vipdvg/handler.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 services/staking/vipdvg/handler.js diff --git a/services/staking/vipdvg/handler.js b/services/staking/vipdvg/handler.js new file mode 100644 index 0000000..e69de29 From 0379abb9ab65f907397d677ddc462bf9354b95ab Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Thu, 20 May 2021 08:55:11 +0800 Subject: [PATCH 045/254] Revert "add handler for vipDVG." This reverts commit 8dfbfed68e6e7e1ab9ade9b46a9c6478c6d46067. --- services/staking/vipdvg/handler.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 services/staking/vipdvg/handler.js diff --git a/services/staking/vipdvg/handler.js b/services/staking/vipdvg/handler.js deleted file mode 100644 index e69de29..0000000 From 3556c75ad668a040cf7d52583a00c77252a95048 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Thu, 20 May 2021 17:51:58 +0800 Subject: [PATCH 046/254] Add implementation for get xDVG stack. --- app.js | 2 + config/abi.js | 1016 ++++++++++++++++++++++++++++ config/serverless/domain.js | 9 + services/staking/vipdvg/handler.js | 128 ++++ swagger.json | 21 + 5 files changed, 1176 insertions(+) create mode 100644 services/staking/vipdvg/handler.js diff --git a/app.js b/app.js index 7ef7889..daeb87a 100644 --- a/app.js +++ b/app.js @@ -9,6 +9,7 @@ const vaultHistoricalAPYSave = require("./services/vaults/apy/save/historical-ha const vaultCategory = require('./services/vaults/category/handler'); const stakeVIP = require('./services/staking/xdvg/handler'); const stakePool = require('./services/staking/handler'); +const stakeXDvg = require('./services/staking/vipdvg/handler'); const app = express(); const cors = require("cors"); const port = process.env.PORT || 8080; @@ -64,6 +65,7 @@ async function init() { app.get("/staking/get-pools", (req, res) => stakePool.getPools(req, res) ); + app.get("/staking/get-xdvg-stake/:amount", (req, res) => stakeXDvg.getxDVGStake(req, res)); app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument)); diff --git a/config/abi.js b/config/abi.js index f9a91d5..c5eca33 100644 --- a/config/abi.js +++ b/config/abi.js @@ -11345,6 +11345,1020 @@ const cUSDCContract = [ } ]; +const vipDVGContract = [ + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_dvg", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "dvgAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "xDVGAmount", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "dvgAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "xDVGAmount", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "dvg", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_share", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; + +const dvgContract = [ + { + "inputs": [ + { + "internalType": "address", + "name": "_treasuryWalletAddr", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_dvgInAdvance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DELEGATION_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "checkpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "fromBlock", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegator", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "dvgInAdvance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPriorVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryWalletAddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } +]; + module.exports = { earnUSDTABIContract, earnUSDCABIContract, @@ -11367,4 +12381,6 @@ module.exports = { cUSDTContract, cDAIContract, cUSDCContract, + vipDVGContract, + dvgContract }; diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 0162fe4..46fb5cc 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -138,6 +138,15 @@ const testContracts = { tokenId: "dai", }, }, + vipDVG: { + address: "0x3aa8e8B6D3562a1E7aCB0dddD02b27896C00c424", + abi: abi.vipDVGContract + }, + DVG: { + address: "0xea9726eFc9831EF0499fD4Db4Ab143F15a797673", + abi: abi.dvgContract, + tokenId: "daoventures" + } }; const mainContracts = { diff --git a/services/staking/vipdvg/handler.js b/services/staking/vipdvg/handler.js new file mode 100644 index 0000000..1191988 --- /dev/null +++ b/services/staking/vipdvg/handler.js @@ -0,0 +1,128 @@ +const { testContracts, mainContracts } = require("../../../config/serverless/domain"); + +const Web3 = require("web3"); +const CoinGecko = require("coingecko-api"); +const CoinGeckoClient = new CoinGecko(); + +const archiveNodeUrl = process.env.ARCHIVENODE_ENDPOINT; +const archiveNodeWeb3 = new Web3(archiveNodeUrl); + +let dvgContract; +let xDVGContract; + +let dvgContractInfo; +let xDVGContractInfo; + +let dvgBalanceOfxDVG = 0; +let xDVGTotalSupply = 0; +let dvgPrice = 0; +let xDVGPrice = 0; + +// Get VIP DVG contract info from domain based on enviroment +const getContractInfo = (name) => { + const contracts = process.env.PRODUCTION != null && process.env.PRODUCTION != "" + ? mainContracts : testContracts; + return contracts[name]; +} + +// Get contract +const getContract = async (contractInfo) => { + const { abi, address } = contractInfo; + const contract = new archiveNodeWeb3.eth.Contract(abi, address); + return contract; +} + +// Get Token Price +const getTokenPrice = async (coingecko_token_id) => { + let data; + try { + data = await CoinGeckoClient.simple.price({ + ids: coingecko_token_id, + vs_currencies: ["usd"], + }); + return data.data[coingecko_token_id]["usd"]; + } catch (err) { + console.log("Error in getTokenPrice(): ", err); + } + return; +} + +// Get vipDVG's total supply +const getxDVGTotalSupply = async() => { + try { + xDVGTotalSupply = await xDVGContract.methods.totalSupply().call(); + } catch(err) { + console.log("Error in getxDVGTotalSupply(): ", err); + } +} + +// DVG's balance of vipDVG contract +const getDVGBalanceOfxDVG = async() => { + try { + dvgBalanceOfVipDVG = await dvgContract.methods.balanceOf(xDVGContractInfo.address).call(); + } catch (err) { + console.log("Error in getDVGBalanceOfxDVG(): ", err) + } +} + +// xDVGPrice Formula : xDVG price = ( DVG amount of xDVG SC * DVG price) / xDVG amount +const getxDVGPrice = async (xDVGAmount) => { + return (dvgBalanceOfxDVG * dvgPrice) / xDVGAmount; +} + +// APR calculation Formula : (xDVG's total supply * xDVG price) / (DVG.balanceOf(xDVG) * DVG price) +const getxDVGAPR = async (xDVGAmount) => { + await getxDVGTotalSupply(); + await getDVGBalanceOfxDVG(); + dvgPrice = await getTokenPrice(dvgContractInfo.tokenId); + xDVGPrice = await getxDVGPrice(xDVGAmount); + + console.log("total supply: ", xDVGTotalSupply); + console.log("balance: ", dvgBalanceOfxDVG); + console.log("dvg price: ", dvgPrice); + console.log("xDVG price", xDVGPrice); + + const apr = (xDVGTotalSupply * xDVGPrice) / (dvgBalanceOfxDVG * dvgPrice); + console.log("apr", apr); + + return apr; +} + +module.exports.getxDVGStake = async(req, res) => { + if(req.params.amount == null || req.params.amount == "") { + res.status(200).json({ + message: "xDVG amount is empty.", + body: null + }) + } + + try { + // Get vipDVG contract + xDVGContractInfo = getContractInfo("vipDVG"); + xDVGContract = await getContract(xDVGContractInfo); + + // Get DVG contract + dvgContractInfo = getContractInfo("DVG"); + dvgContract = await getContract(dvgContractInfo); + + let apr = await getxDVGAPR(req.params.amount); + + if(!apr || isNaN(apr)) { + apr = 0.00; + } + + const result = { apr, dvgPrice }; + + res.status(200).json({ + message: 'Successful Response', + body: result + }); + + } catch (err) { + res.status(200).json({ + message: err.message, + body: null + }); + } + return; +}; \ No newline at end of file diff --git a/swagger.json b/swagger.json index 0092632..7a398cc 100644 --- a/swagger.json +++ b/swagger.json @@ -191,6 +191,27 @@ ], "responses": {} } + }, + "/staking/get-xdvg-stake/{amount}" :{ + "get": { + "tags": [ + "Stake" + ], + "description": "Get xDVG stake", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "amount", + "in": "path", + "description": "xDVG amount", + "required": true, + "type": "string" + } + ], + "responses": {} + } } } } \ No newline at end of file From 531b1a9b5934592a94e52a7d0656e79f42844e65 Mon Sep 17 00:00:00 2001 From: 2manslkh Date: Fri, 21 May 2021 09:31:02 +0800 Subject: [PATCH 047/254] Add xDVG TVL --- config/abi.js | 21341 +++++++++++++++++++------------ config/serverless/domain.js | 88 +- docker-compose.yml | 28 +- services/vaults/tvl/handler.js | 123 +- 4 files changed, 13095 insertions(+), 8485 deletions(-) diff --git a/config/abi.js b/config/abi.js index f9a91d5..64361d0 100644 --- a/config/abi.js +++ b/config/abi.js @@ -1837,9 +1837,7 @@ const aggregatedContractABI = [ }, { constant: false, - inputs: [ - { internalType: "address", name: "_new_UNIAPR", type: "address" }, - ], + inputs: [{ internalType: "address", name: "_new_UNIAPR", type: "address" }], name: "set_new_UNIAPR", outputs: [], payable: false, @@ -1848,9 +1846,7 @@ const aggregatedContractABI = [ }, { constant: false, - inputs: [ - { internalType: "address", name: "_new_UNIROI", type: "address" }, - ], + inputs: [{ internalType: "address", name: "_new_UNIROI", type: "address" }], name: "set_new_UNIROI", outputs: [], payable: false, @@ -1883,9466 +1879,13968 @@ const aggregatedContractABI = [ }, ]; -const earnUSDTABIContract = [{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"supplyDydx","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"aaveToken","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"provider","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"amount","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceFulcrum","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pool","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"sender","type":"address"},{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceDydx","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"withdrawDydx","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_new_APR","type":"address"}],"name":"set_new_APR","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"withdrawAave","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"apr","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"fulcrum","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balanceCompound","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"supplyAave","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"withdrawSomeFulcrum","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"calcPoolValueInToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getPricePerFullShare","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"rebalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"supplyFulcrum","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_new_AAVE","type":"address"}],"name":"set_new_AAVE","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"aave","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dydx","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balanceFulcrumAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"approveToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_new_DTOKEN","type":"uint256"}],"name":"set_new_DTOKEN","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"aavePool","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"recommend","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceCompoundInToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_new_ATOKEN","type":"address"}],"name":"set_new_ATOKEN","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceAaveAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"withdrawSomeCompound","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_new_FULCRUM","type":"address"}],"name":"set_new_FULCRUM","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceAave","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balanceDydxAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"supplyCompound","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceFulcrumInToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_new_COMPOUND","type":"address"}],"name":"set_new_COMPOUND","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"compound","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getAave","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getAaveCore","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"}] - -const earnUSDCABIContract = [{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"supplyDydx","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"aaveToken","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"provider","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"amount","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceFulcrum","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pool","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_new_APOOL","type":"address"}],"name":"set_new_APOOL","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"sender","type":"address"},{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceDydx","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"withdrawDydx","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_new_APR","type":"address"}],"name":"set_new_APR","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"withdrawAave","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"apr","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"fulcrum","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balanceCompound","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"supplyAave","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"withdrawSomeFulcrum","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"calcPoolValueInToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getPricePerFullShare","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"rebalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"supplyFulcrum","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_new_AAVE","type":"address"}],"name":"set_new_AAVE","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"aave","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dydx","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balanceFulcrumAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"approveToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_new_DTOKEN","type":"uint256"}],"name":"set_new_DTOKEN","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"aavePool","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"recommend","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceCompoundInToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_new_ATOKEN","type":"address"}],"name":"set_new_ATOKEN","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceAaveAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"withdrawSomeCompound","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_new_FULCRUM","type":"address"}],"name":"set_new_FULCRUM","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceAave","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balanceDydxAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"supplyCompound","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceFulcrumInToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_new_COMPOUND","type":"address"}],"name":"set_new_COMPOUND","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"compound","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getAave","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getAaveCore","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"}] - -const earnDAIABIContract = [{"constant":true,"inputs":[],"name":"aaveToken","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"provider","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"amount","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceFulcrum","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pool","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"sender","type":"address"},{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceDydx","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"apr","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"fulcrum","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balanceCompound","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"calcPoolValueInToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getPricePerFullShare","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"rebalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"aave","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dydx","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balanceFulcrumAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"approveToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"aavePool","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"recommend","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceCompoundInToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceAaveAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"chai","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceAave","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balanceDydxAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceFulcrumInToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"compound","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getAave","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getAaveCore","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"}] - -const earnTUSDABIContract = [{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"supplyDydx","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"aaveToken","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"provider","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"amount","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceFulcrum","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pool","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"sender","type":"address"},{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceDydx","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_new_APR","type":"address"}],"name":"set_new_APR","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"apr","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"fulcrum","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balanceCompound","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"supplyAave","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"calcPoolValueInToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getPricePerFullShare","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"rebalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"supplyFulcrum","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"aave","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dydx","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"approveToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_new_DTOKEN","type":"uint256"}],"name":"set_new_DTOKEN","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"recommend","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceCompoundInToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceAave","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"supplyCompound","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"balanceFulcrumInToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_new_COMPOUND","type":"address"}],"name":"set_new_COMPOUND","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"compound","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getAave","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getAaveCore","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"}] - -const vaultUSDTABIContract = [{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_controller","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"available","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"controller","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"depositAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"earn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getPricePerFullShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"reserve","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"harvest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"max","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"min","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_controller","type":"address"}],"name":"setController","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_governance","type":"address"}],"name":"setGovernance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_min","type":"uint256"}],"name":"setMin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}] - -const vaultUSDCABIContract = [{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_controller","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"available","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"controller","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"depositAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"earn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getPricePerFullShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"reserve","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"harvest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"max","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"min","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_controller","type":"address"}],"name":"setController","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_governance","type":"address"}],"name":"setGovernance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_min","type":"uint256"}],"name":"setMin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}] - -const vaultDAIABIContract = [{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_controller","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"available","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"controller","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"depositAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"earn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getPricePerFullShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"reserve","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"harvest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"max","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"min","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_controller","type":"address"}],"name":"setController","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_governance","type":"address"}],"name":"setGovernance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_min","type":"uint256"}],"name":"setMin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}] - -const vaultTUSDABIContract = [{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_controller","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"available","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"controller","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"depositAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"earn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getPricePerFullShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"reserve","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"harvest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"max","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"min","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_controller","type":"address"}],"name":"setController","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_governance","type":"address"}],"name":"setGovernance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_min","type":"uint256"}],"name":"setMin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}] - -const yearnDAIABIContract = [ - { - "inputs": [ - { - "internalType": "address", - "name": "_token", - "type": "address" - }, - { - "internalType": "address", - "name": "_earn", - "type": "address" - }, - { - "internalType": "address", - "name": "_vault", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, +const earnUSDTABIContract = [ { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" + constant: false, + inputs: [{ name: "amount", type: "uint256" }], + name: "supplyDydx", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" + constant: true, + inputs: [], + name: "aaveToken", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldCommunityWallet", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newCommunityWallet", - "type": "address" - } - ], - "name": "SetCommunityWallet", - "type": "event" + constant: true, + inputs: [], + name: "name", + outputs: [{ name: "", type: "string" }], + payable: false, + stateMutability: "view", + type: "function", }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "oldCustomNetworkFeePercentage", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "newCustomNetworkFeePercentage", - "type": "uint256" - } - ], - "name": "SetCustomNetworkFeePercentage", - "type": "event" + constant: true, + inputs: [], + name: "provider", + outputs: [{ name: "", type: "uint8" }], + payable: false, + stateMutability: "view", + type: "function", }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "oldCustomNetworkFeeTier", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "newCustomNetworkFeeTier", - "type": "uint256" - } + constant: false, + inputs: [ + { name: "spender", type: "address" }, + { name: "amount", type: "uint256" }, ], - "name": "SetCustomNetworkFeeTier", - "type": "event" + name: "approve", + outputs: [{ name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256[]", - "name": "oldNetworkFeePercentage", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "newNetworkFeePercentage", - "type": "uint256[]" - } - ], - "name": "SetNetworkFeePercentage", - "type": "event" + constant: true, + inputs: [], + name: "balanceFulcrum", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256[]", - "name": "oldNetworkFeeTier2", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "newNetworkFeeTier2", - "type": "uint256[]" - } - ], - "name": "SetNetworkFeeTier2", - "type": "event" + constant: true, + inputs: [], + name: "pool", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "oldProfileSharingFeePercentage", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "newProfileSharingFeePercentage", - "type": "uint256" - } - ], - "name": "SetProfileSharingFeePercentage", - "type": "event" + constant: true, + inputs: [], + name: "totalSupply", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldTreasuryWallet", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newTreasuryWallet", - "type": "address" - } + constant: false, + inputs: [ + { name: "sender", type: "address" }, + { name: "recipient", type: "address" }, + { name: "amount", type: "uint256" }, ], - "name": "SetTreasuryWallet", - "type": "event" + name: "transferFrom", + outputs: [{ name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" + constant: false, + inputs: [{ name: "_shares", type: "uint256" }], + name: "withdraw", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [], - "name": "DENOMINATOR", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + constant: true, + inputs: [], + name: "decimals", + outputs: [{ name: "", type: "uint8" }], + payable: false, + stateMutability: "view", + type: "function", }, { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + constant: false, + inputs: [ + { name: "spender", type: "address" }, + { name: "addedValue", type: "uint256" }, ], - "stateMutability": "view", - "type": "function" + name: "increaseAllowance", + outputs: [{ name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" + constant: true, + inputs: [], + name: "balanceDydx", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", }, { - "inputs": [], - "name": "approveMigrate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + constant: false, + inputs: [{ name: "amount", type: "uint256" }], + name: "withdrawDydx", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + constant: false, + inputs: [{ name: "_new_APR", type: "address" }], + name: "set_new_APR", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [], - "name": "communityFee", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + constant: false, + inputs: [{ name: "amount", type: "uint256" }], + name: "withdrawAave", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [], - "name": "communityWallet", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" + constant: true, + inputs: [], + name: "apr", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", }, { - "inputs": [], - "name": "customNetworkFeePercentage", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + constant: true, + inputs: [], + name: "fulcrum", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", }, { - "inputs": [], - "name": "customNetworkFeeTier", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + constant: true, + inputs: [], + name: "balanceCompound", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", }, { - "inputs": [], - "name": "daoVault", - "outputs": [ - { - "internalType": "contract IDaoVault", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" + constant: false, + inputs: [{ name: "amount", type: "uint256" }], + name: "supplyAave", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" + constant: false, + inputs: [{ name: "_amount", type: "uint256" }], + name: "withdrawSomeFulcrum", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" + constant: true, + inputs: [{ name: "account", type: "address" }], + name: "balanceOf", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", }, { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_amounts", - "type": "uint256[]" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + constant: true, + inputs: [], + name: "calcPoolValueInToken", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", }, { - "inputs": [], - "name": "earn", - "outputs": [ - { - "internalType": "contract IYearn", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" + constant: false, + inputs: [], + name: "renounceOwnership", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "getEarnDepositBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "result", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + constant: true, + inputs: [], + name: "getPricePerFullShare", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", }, { - "inputs": [ + constant: false, + inputs: [], + name: "rebalance", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ name: "amount", type: "uint256" }], + name: "supplyFulcrum", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ name: "_new_AAVE", type: "address" }], + name: "set_new_AAVE", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "aave", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "owner", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "dydx", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "isOwner", + outputs: [{ name: "", type: "bool" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceFulcrumAvailable", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "symbol", + outputs: [{ name: "", type: "string" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "approveToken", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ name: "_new_DTOKEN", type: "uint256" }], + name: "set_new_DTOKEN", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "aavePool", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "recommend", + outputs: [{ name: "", type: "uint8" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { name: "spender", type: "address" }, + { name: "subtractedValue", type: "uint256" }, + ], + name: "decreaseAllowance", + outputs: [{ name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceCompoundInToken", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { name: "recipient", type: "address" }, + { name: "amount", type: "uint256" }, + ], + name: "transfer", + outputs: [{ name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ name: "_new_ATOKEN", type: "address" }], + name: "set_new_ATOKEN", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceAaveAvailable", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ name: "_amount", type: "uint256" }], + name: "withdrawSomeCompound", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balance", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ name: "_amount", type: "uint256" }], + name: "deposit", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ name: "_new_FULCRUM", type: "address" }], + name: "set_new_FULCRUM", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceAave", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceDydxAvailable", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "dToken", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { name: "owner", type: "address" }, + { name: "spender", type: "address" }, + ], + name: "allowance", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ name: "amount", type: "uint256" }], + name: "supplyCompound", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ name: "newOwner", type: "address" }], + name: "transferOwnership", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceFulcrumInToken", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ name: "_new_COMPOUND", type: "address" }], + name: "set_new_COMPOUND", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "compound", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getAave", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getAaveCore", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "token", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + inputs: [], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { indexed: true, name: "previousOwner", type: "address" }, + { indexed: true, name: "newOwner", type: "address" }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, name: "from", type: "address" }, + { indexed: true, name: "to", type: "address" }, + { indexed: false, name: "value", type: "uint256" }, + ], + name: "Transfer", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, name: "owner", type: "address" }, + { indexed: true, name: "spender", type: "address" }, + { indexed: false, name: "value", type: "uint256" }, + ], + name: "Approval", + type: "event", + }, +]; + +const earnUSDCABIContract = [ + { + constant: false, + inputs: [{ name: "amount", type: "uint256" }], + name: "supplyDydx", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "aaveToken", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "name", + outputs: [{ name: "", type: "string" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "provider", + outputs: [{ name: "", type: "uint8" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { name: "spender", type: "address" }, + { name: "amount", type: "uint256" }, + ], + name: "approve", + outputs: [{ name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceFulcrum", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "pool", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ name: "_new_APOOL", type: "address" }], + name: "set_new_APOOL", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { name: "sender", type: "address" }, + { name: "recipient", type: "address" }, + { name: "amount", type: "uint256" }, + ], + name: "transferFrom", + outputs: [{ name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ name: "_shares", type: "uint256" }], + name: "withdraw", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "decimals", + outputs: [{ name: "", type: "uint8" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { name: "spender", type: "address" }, + { name: "addedValue", type: "uint256" }, + ], + name: "increaseAllowance", + outputs: [{ name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceDydx", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ name: "amount", type: "uint256" }], + name: "withdrawDydx", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ name: "_new_APR", type: "address" }], + name: "set_new_APR", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ name: "amount", type: "uint256" }], + name: "withdrawAave", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "apr", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "fulcrum", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceCompound", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ name: "amount", type: "uint256" }], + name: "supplyAave", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ name: "_amount", type: "uint256" }], + name: "withdrawSomeFulcrum", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [{ name: "account", type: "address" }], + name: "balanceOf", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "calcPoolValueInToken", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "renounceOwnership", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getPricePerFullShare", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "rebalance", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ name: "amount", type: "uint256" }], + name: "supplyFulcrum", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ name: "_new_AAVE", type: "address" }], + name: "set_new_AAVE", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "aave", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "owner", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "dydx", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "isOwner", + outputs: [{ name: "", type: "bool" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceFulcrumAvailable", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "symbol", + outputs: [{ name: "", type: "string" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "approveToken", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ name: "_new_DTOKEN", type: "uint256" }], + name: "set_new_DTOKEN", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "aavePool", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "recommend", + outputs: [{ name: "", type: "uint8" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { name: "spender", type: "address" }, + { name: "subtractedValue", type: "uint256" }, + ], + name: "decreaseAllowance", + outputs: [{ name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceCompoundInToken", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { name: "recipient", type: "address" }, + { name: "amount", type: "uint256" }, + ], + name: "transfer", + outputs: [{ name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ name: "_new_ATOKEN", type: "address" }], + name: "set_new_ATOKEN", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceAaveAvailable", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ name: "_amount", type: "uint256" }], + name: "withdrawSomeCompound", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balance", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ name: "_amount", type: "uint256" }], + name: "deposit", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ name: "_new_FULCRUM", type: "address" }], + name: "set_new_FULCRUM", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceAave", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceDydxAvailable", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "dToken", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { name: "owner", type: "address" }, + { name: "spender", type: "address" }, + ], + name: "allowance", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ name: "amount", type: "uint256" }], + name: "supplyCompound", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ name: "newOwner", type: "address" }], + name: "transferOwnership", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceFulcrumInToken", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ name: "_new_COMPOUND", type: "address" }], + name: "set_new_COMPOUND", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "compound", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getAave", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getAaveCore", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "token", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + inputs: [], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { indexed: true, name: "previousOwner", type: "address" }, + { indexed: true, name: "newOwner", type: "address" }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, name: "from", type: "address" }, + { indexed: true, name: "to", type: "address" }, + { indexed: false, name: "value", type: "uint256" }, + ], + name: "Transfer", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, name: "owner", type: "address" }, + { indexed: true, name: "spender", type: "address" }, + { indexed: false, name: "value", type: "uint256" }, + ], + name: "Approval", + type: "event", + }, +]; + +const earnDAIABIContract = [ + { + constant: true, + inputs: [], + name: "aaveToken", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "name", + outputs: [{ name: "", type: "string" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "provider", + outputs: [{ name: "", type: "uint8" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { name: "spender", type: "address" }, + { name: "amount", type: "uint256" }, + ], + name: "approve", + outputs: [{ name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceFulcrum", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "pool", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { name: "sender", type: "address" }, + { name: "recipient", type: "address" }, + { name: "amount", type: "uint256" }, + ], + name: "transferFrom", + outputs: [{ name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ name: "_shares", type: "uint256" }], + name: "withdraw", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "decimals", + outputs: [{ name: "", type: "uint8" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { name: "spender", type: "address" }, + { name: "addedValue", type: "uint256" }, + ], + name: "increaseAllowance", + outputs: [{ name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceDydx", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "apr", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "fulcrum", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceCompound", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [{ name: "account", type: "address" }], + name: "balanceOf", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "calcPoolValueInToken", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "renounceOwnership", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getPricePerFullShare", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "rebalance", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "aave", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "owner", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "dydx", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "isOwner", + outputs: [{ name: "", type: "bool" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceFulcrumAvailable", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "symbol", + outputs: [{ name: "", type: "string" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "approveToken", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "aavePool", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "recommend", + outputs: [{ name: "", type: "uint8" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { name: "spender", type: "address" }, + { name: "subtractedValue", type: "uint256" }, + ], + name: "decreaseAllowance", + outputs: [{ name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceCompoundInToken", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { name: "recipient", type: "address" }, + { name: "amount", type: "uint256" }, + ], + name: "transfer", + outputs: [{ name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceAaveAvailable", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "chai", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balance", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ name: "_amount", type: "uint256" }], + name: "deposit", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceAave", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceDydxAvailable", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "dToken", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { name: "owner", type: "address" }, + { name: "spender", type: "address" }, + ], + name: "allowance", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ name: "newOwner", type: "address" }], + name: "transferOwnership", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceFulcrumInToken", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "compound", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getAave", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getAaveCore", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "token", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + inputs: [], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { indexed: true, name: "previousOwner", type: "address" }, + { indexed: true, name: "newOwner", type: "address" }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, name: "from", type: "address" }, + { indexed: true, name: "to", type: "address" }, + { indexed: false, name: "value", type: "uint256" }, + ], + name: "Transfer", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, name: "owner", type: "address" }, + { indexed: true, name: "spender", type: "address" }, + { indexed: false, name: "value", type: "uint256" }, + ], + name: "Approval", + type: "event", + }, +]; + +const earnTUSDABIContract = [ + { + constant: false, + inputs: [{ name: "amount", type: "uint256" }], + name: "supplyDydx", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "aaveToken", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "name", + outputs: [{ name: "", type: "string" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "provider", + outputs: [{ name: "", type: "uint8" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { name: "spender", type: "address" }, + { name: "amount", type: "uint256" }, + ], + name: "approve", + outputs: [{ name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceFulcrum", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "pool", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { name: "sender", type: "address" }, + { name: "recipient", type: "address" }, + { name: "amount", type: "uint256" }, + ], + name: "transferFrom", + outputs: [{ name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ name: "_shares", type: "uint256" }], + name: "withdraw", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "decimals", + outputs: [{ name: "", type: "uint8" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { name: "spender", type: "address" }, + { name: "addedValue", type: "uint256" }, + ], + name: "increaseAllowance", + outputs: [{ name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceDydx", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ name: "_new_APR", type: "address" }], + name: "set_new_APR", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "apr", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "fulcrum", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceCompound", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ name: "amount", type: "uint256" }], + name: "supplyAave", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [{ name: "account", type: "address" }], + name: "balanceOf", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "calcPoolValueInToken", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "renounceOwnership", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getPricePerFullShare", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "rebalance", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ name: "amount", type: "uint256" }], + name: "supplyFulcrum", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "aave", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "owner", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "dydx", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "isOwner", + outputs: [{ name: "", type: "bool" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "symbol", + outputs: [{ name: "", type: "string" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "approveToken", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ name: "_new_DTOKEN", type: "uint256" }], + name: "set_new_DTOKEN", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "recommend", + outputs: [{ name: "", type: "uint8" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { name: "spender", type: "address" }, + { name: "subtractedValue", type: "uint256" }, + ], + name: "decreaseAllowance", + outputs: [{ name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceCompoundInToken", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { name: "recipient", type: "address" }, + { name: "amount", type: "uint256" }, + ], + name: "transfer", + outputs: [{ name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balance", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ name: "_amount", type: "uint256" }], + name: "deposit", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceAave", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "dToken", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { name: "owner", type: "address" }, + { name: "spender", type: "address" }, + ], + name: "allowance", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ name: "amount", type: "uint256" }], + name: "supplyCompound", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ name: "newOwner", type: "address" }], + name: "transferOwnership", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balanceFulcrumInToken", + outputs: [{ name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ name: "_new_COMPOUND", type: "address" }], + name: "set_new_COMPOUND", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "compound", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getAave", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getAaveCore", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "token", + outputs: [{ name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + inputs: [], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { payable: true, stateMutability: "payable", type: "fallback" }, + { + anonymous: false, + inputs: [ + { indexed: true, name: "previousOwner", type: "address" }, + { indexed: true, name: "newOwner", type: "address" }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, name: "from", type: "address" }, + { indexed: true, name: "to", type: "address" }, + { indexed: false, name: "value", type: "uint256" }, + ], + name: "Transfer", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, name: "owner", type: "address" }, + { indexed: true, name: "spender", type: "address" }, + { indexed: false, name: "value", type: "uint256" }, + ], + name: "Approval", + type: "event", + }, +]; + +const vaultUSDTABIContract = [ + { + inputs: [ + { internalType: "address", name: "_token", type: "address" }, + { internalType: "address", name: "_controller", type: "address" }, + ], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "from", type: "address" }, + { indexed: true, internalType: "address", name: "to", type: "address" }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + constant: true, + inputs: [ + { internalType: "address", name: "owner", type: "address" }, + { internalType: "address", name: "spender", type: "address" }, + ], + name: "allowance", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "approve", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "available", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balance", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [{ internalType: "address", name: "account", type: "address" }], + name: "balanceOf", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "controller", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "decimals", + outputs: [{ internalType: "uint8", name: "", type: "uint8" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "subtractedValue", type: "uint256" }, + ], + name: "decreaseAllowance", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "_amount", type: "uint256" }], + name: "deposit", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [], + name: "depositAll", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [], + name: "earn", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getPricePerFullShare", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "governance", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "reserve", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "harvest", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "addedValue", type: "uint256" }, + ], + name: "increaseAllowance", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "max", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "min", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "name", + outputs: [{ internalType: "string", name: "", type: "string" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "address", name: "_controller", type: "address" }], + name: "setController", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "address", name: "_governance", type: "address" }], + name: "setGovernance", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "_min", type: "uint256" }], + name: "setMin", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "symbol", + outputs: [{ internalType: "string", name: "", type: "string" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "token", + outputs: [{ internalType: "contract IERC20", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "recipient", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "transfer", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "sender", type: "address" }, + { internalType: "address", name: "recipient", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "transferFrom", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "_shares", type: "uint256" }], + name: "withdraw", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [], + name: "withdrawAll", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +]; + +const vaultUSDCABIContract = [ + { + inputs: [ + { internalType: "address", name: "_token", type: "address" }, + { internalType: "address", name: "_controller", type: "address" }, + ], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "from", type: "address" }, + { indexed: true, internalType: "address", name: "to", type: "address" }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + constant: true, + inputs: [ + { internalType: "address", name: "owner", type: "address" }, + { internalType: "address", name: "spender", type: "address" }, + ], + name: "allowance", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "approve", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "available", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balance", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [{ internalType: "address", name: "account", type: "address" }], + name: "balanceOf", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "controller", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "decimals", + outputs: [{ internalType: "uint8", name: "", type: "uint8" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "subtractedValue", type: "uint256" }, + ], + name: "decreaseAllowance", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "_amount", type: "uint256" }], + name: "deposit", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [], + name: "depositAll", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [], + name: "earn", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getPricePerFullShare", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "governance", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "reserve", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "harvest", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "addedValue", type: "uint256" }, + ], + name: "increaseAllowance", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "max", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "min", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "name", + outputs: [{ internalType: "string", name: "", type: "string" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "address", name: "_controller", type: "address" }], + name: "setController", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "address", name: "_governance", type: "address" }], + name: "setGovernance", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "_min", type: "uint256" }], + name: "setMin", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "symbol", + outputs: [{ internalType: "string", name: "", type: "string" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "token", + outputs: [{ internalType: "contract IERC20", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "recipient", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "transfer", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "sender", type: "address" }, + { internalType: "address", name: "recipient", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "transferFrom", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "_shares", type: "uint256" }], + name: "withdraw", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [], + name: "withdrawAll", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +]; + +const vaultDAIABIContract = [ + { + inputs: [ + { internalType: "address", name: "_token", type: "address" }, + { internalType: "address", name: "_controller", type: "address" }, + ], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "from", type: "address" }, + { indexed: true, internalType: "address", name: "to", type: "address" }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + constant: true, + inputs: [ + { internalType: "address", name: "owner", type: "address" }, + { internalType: "address", name: "spender", type: "address" }, + ], + name: "allowance", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "approve", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "available", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balance", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [{ internalType: "address", name: "account", type: "address" }], + name: "balanceOf", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "controller", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "decimals", + outputs: [{ internalType: "uint8", name: "", type: "uint8" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "subtractedValue", type: "uint256" }, + ], + name: "decreaseAllowance", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "_amount", type: "uint256" }], + name: "deposit", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [], + name: "depositAll", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [], + name: "earn", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getPricePerFullShare", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "governance", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "reserve", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "harvest", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "addedValue", type: "uint256" }, + ], + name: "increaseAllowance", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "max", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "min", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "name", + outputs: [{ internalType: "string", name: "", type: "string" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "address", name: "_controller", type: "address" }], + name: "setController", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "address", name: "_governance", type: "address" }], + name: "setGovernance", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "_min", type: "uint256" }], + name: "setMin", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "symbol", + outputs: [{ internalType: "string", name: "", type: "string" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "token", + outputs: [{ internalType: "contract IERC20", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "recipient", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "transfer", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "sender", type: "address" }, + { internalType: "address", name: "recipient", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "transferFrom", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "_shares", type: "uint256" }], + name: "withdraw", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [], + name: "withdrawAll", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +]; + +const vaultTUSDABIContract = [ + { + inputs: [ + { internalType: "address", name: "_token", type: "address" }, + { internalType: "address", name: "_controller", type: "address" }, + ], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "from", type: "address" }, + { indexed: true, internalType: "address", name: "to", type: "address" }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + constant: true, + inputs: [ + { internalType: "address", name: "owner", type: "address" }, + { internalType: "address", name: "spender", type: "address" }, + ], + name: "allowance", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "approve", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "available", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "balance", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [{ internalType: "address", name: "account", type: "address" }], + name: "balanceOf", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "controller", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "decimals", + outputs: [{ internalType: "uint8", name: "", type: "uint8" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "subtractedValue", type: "uint256" }, + ], + name: "decreaseAllowance", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "_amount", type: "uint256" }], + name: "deposit", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [], + name: "depositAll", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [], + name: "earn", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getPricePerFullShare", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "governance", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "reserve", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "harvest", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "addedValue", type: "uint256" }, + ], + name: "increaseAllowance", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "max", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "min", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "name", + outputs: [{ internalType: "string", name: "", type: "string" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "address", name: "_controller", type: "address" }], + name: "setController", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "address", name: "_governance", type: "address" }], + name: "setGovernance", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "_min", type: "uint256" }], + name: "setMin", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "symbol", + outputs: [{ internalType: "string", name: "", type: "string" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "token", + outputs: [{ internalType: "contract IERC20", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "recipient", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "transfer", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "sender", type: "address" }, + { internalType: "address", name: "recipient", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "transferFrom", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "uint256", name: "_shares", type: "uint256" }], + name: "withdraw", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [], + name: "withdrawAll", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +]; + +const yearnDAIABIContract = [ + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "address", + name: "_earn", + type: "address", + }, + { + internalType: "address", + name: "_vault", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "oldCommunityWallet", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newCommunityWallet", + type: "address", + }, + ], + name: "SetCommunityWallet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "oldCustomNetworkFeePercentage", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "newCustomNetworkFeePercentage", + type: "uint256", + }, + ], + name: "SetCustomNetworkFeePercentage", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "oldCustomNetworkFeeTier", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "newCustomNetworkFeeTier", + type: "uint256", + }, + ], + name: "SetCustomNetworkFeeTier", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256[]", + name: "oldNetworkFeePercentage", + type: "uint256[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "newNetworkFeePercentage", + type: "uint256[]", + }, + ], + name: "SetNetworkFeePercentage", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256[]", + name: "oldNetworkFeeTier2", + type: "uint256[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "newNetworkFeeTier2", + type: "uint256[]", + }, + ], + name: "SetNetworkFeeTier2", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "oldProfileSharingFeePercentage", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "newProfileSharingFeePercentage", + type: "uint256", + }, + ], + name: "SetProfileSharingFeePercentage", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "oldTreasuryWallet", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newTreasuryWallet", + type: "address", + }, + ], + name: "SetTreasuryWallet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "DENOMINATOR", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "approveMigrate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "communityFee", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "communityWallet", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "customNetworkFeePercentage", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "customNetworkFeeTier", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "daoVault", + outputs: [ + { + internalType: "contract IDaoVault", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_amounts", + type: "uint256[]", + }, + ], + name: "deposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "earn", + outputs: [ + { + internalType: "contract IYearn", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "getEarnDepositBalance", + outputs: [ + { + internalType: "uint256", + name: "result", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "getSharesValue", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "getVaultDepositBalance", + outputs: [ + { + internalType: "uint256", + name: "result", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "isVesting", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "networkFeePercentage", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "networkFeeTier2", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "pool", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "profileSharingFeePercentage", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_shares", + type: "uint256", + }, + ], + name: "refund", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_communityWallet", + type: "address", + }, + ], + name: "setCommunityWallet", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_percentage", + type: "uint256", + }, + ], + name: "setCustomNetworkFeePercentage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_customNetworkFeeTier", + type: "uint256", + }, + ], + name: "setCustomNetworkFeeTier", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_networkFeePercentage", + type: "uint256[]", + }, + ], + name: "setNetworkFeePercentage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_networkFeeTier2", + type: "uint256[]", + }, + ], + name: "setNetworkFeeTier2", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_percentage", + type: "uint256", + }, + ], + name: "setProfileSharingFeePercentage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_treasuryWallet", + type: "address", + }, + ], + name: "setTreasuryWallet", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "setVault", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "token", + outputs: [ + { + internalType: "contract IERC20", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "treasuryFee", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "treasuryWallet", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "vault", + outputs: [ + { + internalType: "contract IYvault", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "vesting", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_shares", + type: "uint256[]", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const yearnTUSDABIContract = [ + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "address", + name: "_earn", + type: "address", + }, + { + internalType: "address", + name: "_vault", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "oldCommunityWallet", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newCommunityWallet", + type: "address", + }, + ], + name: "SetCommunityWallet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "oldCustomNetworkFeePercentage", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "newCustomNetworkFeePercentage", + type: "uint256", + }, + ], + name: "SetCustomNetworkFeePercentage", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "oldCustomNetworkFeeTier", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "newCustomNetworkFeeTier", + type: "uint256", + }, + ], + name: "SetCustomNetworkFeeTier", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256[]", + name: "oldNetworkFeePercentage", + type: "uint256[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "newNetworkFeePercentage", + type: "uint256[]", + }, + ], + name: "SetNetworkFeePercentage", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256[]", + name: "oldNetworkFeeTier2", + type: "uint256[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "newNetworkFeeTier2", + type: "uint256[]", + }, + ], + name: "SetNetworkFeeTier2", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "oldProfileSharingFeePercentage", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "newProfileSharingFeePercentage", + type: "uint256", + }, + ], + name: "SetProfileSharingFeePercentage", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "oldTreasuryWallet", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newTreasuryWallet", + type: "address", + }, + ], + name: "SetTreasuryWallet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "DENOMINATOR", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "approveMigrate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "communityFee", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "communityWallet", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "customNetworkFeePercentage", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "customNetworkFeeTier", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "daoVault", + outputs: [ + { + internalType: "contract IDaoVault", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_amounts", + type: "uint256[]", + }, + ], + name: "deposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "earn", + outputs: [ + { + internalType: "contract IYearn", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "getEarnDepositBalance", + outputs: [ + { + internalType: "uint256", + name: "result", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "getSharesValue", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "getVaultDepositBalance", + outputs: [ + { + internalType: "uint256", + name: "result", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "isVesting", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "networkFeePercentage", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "networkFeeTier2", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "pool", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "profileSharingFeePercentage", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_shares", + type: "uint256", + }, + ], + name: "refund", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_communityWallet", + type: "address", + }, + ], + name: "setCommunityWallet", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_percentage", + type: "uint256", + }, + ], + name: "setCustomNetworkFeePercentage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_customNetworkFeeTier", + type: "uint256", + }, + ], + name: "setCustomNetworkFeeTier", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_networkFeePercentage", + type: "uint256[]", + }, + ], + name: "setNetworkFeePercentage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_networkFeeTier2", + type: "uint256[]", + }, + ], + name: "setNetworkFeeTier2", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_percentage", + type: "uint256", + }, + ], + name: "setProfileSharingFeePercentage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_treasuryWallet", + type: "address", + }, + ], + name: "setTreasuryWallet", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "setVault", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "token", + outputs: [ + { + internalType: "contract IERC20", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "treasuryFee", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "treasuryWallet", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "vault", + outputs: [ + { + internalType: "contract IYvault", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "vesting", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_shares", + type: "uint256[]", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const yearnUSDCABIContract = [ + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "address", + name: "_earn", + type: "address", + }, + { + internalType: "address", + name: "_vault", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "oldCommunityWallet", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newCommunityWallet", + type: "address", + }, + ], + name: "SetCommunityWallet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "oldCustomNetworkFeePercentage", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "newCustomNetworkFeePercentage", + type: "uint256", + }, + ], + name: "SetCustomNetworkFeePercentage", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "oldCustomNetworkFeeTier", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "newCustomNetworkFeeTier", + type: "uint256", + }, + ], + name: "SetCustomNetworkFeeTier", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256[]", + name: "oldNetworkFeePercentage", + type: "uint256[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "newNetworkFeePercentage", + type: "uint256[]", + }, + ], + name: "SetNetworkFeePercentage", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256[]", + name: "oldNetworkFeeTier2", + type: "uint256[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "newNetworkFeeTier2", + type: "uint256[]", + }, + ], + name: "SetNetworkFeeTier2", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "oldProfileSharingFeePercentage", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "newProfileSharingFeePercentage", + type: "uint256", + }, + ], + name: "SetProfileSharingFeePercentage", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "oldTreasuryWallet", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newTreasuryWallet", + type: "address", + }, + ], + name: "SetTreasuryWallet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "DENOMINATOR", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "approveMigrate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "communityFee", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "communityWallet", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "customNetworkFeePercentage", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "customNetworkFeeTier", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "daoVault", + outputs: [ + { + internalType: "contract IDaoVault", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_amounts", + type: "uint256[]", + }, + ], + name: "deposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "earn", + outputs: [ + { + internalType: "contract IYearn", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "getEarnDepositBalance", + outputs: [ + { + internalType: "uint256", + name: "result", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "getSharesValue", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "getVaultDepositBalance", + outputs: [ + { + internalType: "uint256", + name: "result", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "isVesting", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "networkFeePercentage", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "networkFeeTier2", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "pool", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "profileSharingFeePercentage", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_shares", + type: "uint256", + }, + ], + name: "refund", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_communityWallet", + type: "address", + }, + ], + name: "setCommunityWallet", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_percentage", + type: "uint256", + }, + ], + name: "setCustomNetworkFeePercentage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_customNetworkFeeTier", + type: "uint256", + }, + ], + name: "setCustomNetworkFeeTier", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_networkFeePercentage", + type: "uint256[]", + }, + ], + name: "setNetworkFeePercentage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_networkFeeTier2", + type: "uint256[]", + }, + ], + name: "setNetworkFeeTier2", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_percentage", + type: "uint256", + }, + ], + name: "setProfileSharingFeePercentage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_treasuryWallet", + type: "address", + }, + ], + name: "setTreasuryWallet", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "setVault", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "token", + outputs: [ + { + internalType: "contract IERC20", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "treasuryFee", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "treasuryWallet", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "vault", + outputs: [ + { + internalType: "contract IYvault", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "vesting", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_shares", + type: "uint256[]", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const yearnUSDTABIContract = [ + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "address", + name: "_earn", + type: "address", + }, + { + internalType: "address", + name: "_vault", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "oldCommunityWallet", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newCommunityWallet", + type: "address", + }, + ], + name: "SetCommunityWallet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "oldCustomNetworkFeePercentage", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "newCustomNetworkFeePercentage", + type: "uint256", + }, + ], + name: "SetCustomNetworkFeePercentage", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "oldCustomNetworkFeeTier", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "newCustomNetworkFeeTier", + type: "uint256", + }, + ], + name: "SetCustomNetworkFeeTier", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256[]", + name: "oldNetworkFeePercentage", + type: "uint256[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "newNetworkFeePercentage", + type: "uint256[]", + }, + ], + name: "SetNetworkFeePercentage", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256[]", + name: "oldNetworkFeeTier2", + type: "uint256[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "newNetworkFeeTier2", + type: "uint256[]", + }, + ], + name: "SetNetworkFeeTier2", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "oldProfileSharingFeePercentage", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "newProfileSharingFeePercentage", + type: "uint256", + }, + ], + name: "SetProfileSharingFeePercentage", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "oldTreasuryWallet", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newTreasuryWallet", + type: "address", + }, + ], + name: "SetTreasuryWallet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "DENOMINATOR", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "approveMigrate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "communityFee", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "communityWallet", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "customNetworkFeePercentage", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "customNetworkFeeTier", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "daoVault", + outputs: [ + { + internalType: "contract IDaoVault", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_amounts", + type: "uint256[]", + }, + ], + name: "deposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "earn", + outputs: [ + { + internalType: "contract IYearn", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "getEarnDepositBalance", + outputs: [ + { + internalType: "uint256", + name: "result", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "getSharesValue", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "getVaultDepositBalance", + outputs: [ + { + internalType: "uint256", + name: "result", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "isVesting", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "networkFeePercentage", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "networkFeeTier2", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "pool", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "profileSharingFeePercentage", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_shares", + type: "uint256", + }, + ], + name: "refund", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_communityWallet", + type: "address", + }, + ], + name: "setCommunityWallet", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_percentage", + type: "uint256", + }, + ], + name: "setCustomNetworkFeePercentage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_customNetworkFeeTier", + type: "uint256", + }, + ], + name: "setCustomNetworkFeeTier", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_networkFeePercentage", + type: "uint256[]", + }, + ], + name: "setNetworkFeePercentage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_networkFeeTier2", + type: "uint256[]", + }, + ], + name: "setNetworkFeeTier2", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_percentage", + type: "uint256", + }, + ], + name: "setProfileSharingFeePercentage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_treasuryWallet", + type: "address", + }, + ], + name: "setTreasuryWallet", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "setVault", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "token", + outputs: [ + { + internalType: "contract IERC20", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "treasuryFee", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "treasuryWallet", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "vault", + outputs: [ + { + internalType: "contract IYvault", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "vesting", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_shares", + type: "uint256[]", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const compoundStrategyContract = [ + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "address", + name: "_cToken", + type: "address", + }, + { + internalType: "address", + name: "_compToken", + type: "address", + }, + { + internalType: "address", + name: "_comptroller", + type: "address", + }, + { + internalType: "address", + name: "_uniswapRouter", + type: "address", + }, + { + internalType: "address", + name: "_WETH", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "oldCommunityWallet", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newCommunityWallet", + type: "address", + }, + ], + name: "SetCommunityWallet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldCustomNetworkFeePercentage", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newCustomNetworkFeePercentage", + type: "uint256", + }, + ], + name: "SetCustomNetworkFeePercentage", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "oldCustomNetworkFeeTier", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "newCustomNetworkFeeTier", + type: "uint256", + }, + ], + name: "SetCustomNetworkFeeTier", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256[]", + name: "oldNetworkFeePercentage", + type: "uint256[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "newNetworkFeePercentage", + type: "uint256[]", + }, + ], + name: "SetNetworkFeePercentage", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256[]", + name: "oldNetworkFeeTier2", + type: "uint256[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "newNetworkFeeTier2", + type: "uint256[]", + }, + ], + name: "SetNetworkFeeTier2", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "oldProfileSharingFeePercentage", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "newProfileSharingFeePercentage", + type: "uint256", + }, + ], + name: "SetProfileSharingFeePercentage", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "oldTreasuryWallet", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newTreasuryWallet", + type: "address", + }, + ], + name: "SetTreasuryWallet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "DAOVault", + outputs: [ + { + internalType: "contract IDAOVault", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "DENOMINATOR", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "WETH", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "amountOutMinPerc", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "approveMigrate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "cToken", + outputs: [ + { + internalType: "contract ICERC20", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "communityFee", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "communityWallet", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "compToken", + outputs: [ + { + internalType: "contract ICOMPERC20", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "comptroller", + outputs: [ + { + internalType: "contract IComptroller", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "customNetworkFeePercentage", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "customNetworkFeeTier", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "deadline", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "deposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "getCurrentBalance", + outputs: [ + { + internalType: "uint256", + name: "result", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "isVesting", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "networkFeePercentage", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "networkFeeTier2", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "pool", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "profileSharingFeePercentage", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_shares", + type: "uint256", + }, + ], + name: "refund", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "revertVesting", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_percentage", + type: "uint256", + }, + ], + name: "setAmountOutMinPerc", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_communityWallet", + type: "address", + }, + ], + name: "setCommunityWallet", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_percentage", + type: "uint256", + }, + ], + name: "setCustomNetworkFeePercentage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_customNetworkFeeTier", + type: "uint256", + }, + ], + name: "setCustomNetworkFeeTier", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_seconds", + type: "uint256", + }, + ], + name: "setDeadline", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_networkFeePercentage", + type: "uint256[]", + }, + ], + name: "setNetworkFeePercentage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_networkFeeTier2", + type: "uint256[]", + }, + ], + name: "setNetworkFeeTier2", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_percentage", + type: "uint256", + }, + ], + name: "setProfileSharingFeePercentage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_treasuryWallet", + type: "address", + }, + ], + name: "setTreasuryWallet", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "setVault", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "token", + outputs: [ + { + internalType: "contract IERC20", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "treasuryFee", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "treasuryWallet", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "uniswapRouter", + outputs: [ + { + internalType: "contract IUniswapV2Router02", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "vesting", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const compoundVaultContract = [ + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "address", + name: "_strategy", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "fromStrategy", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "toStrategy", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "MigrateFunds", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "LOCKTIME", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "canSetPendingStrategy", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "deposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "migrateFunds", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "pendingStrategy", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "refund", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_pendingStrategy", + type: "address", + }, + ], + name: "setPendingStrategy", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "strategy", + outputs: [ + { + internalType: "contract IStrategy", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "token", + outputs: [ + { + internalType: "contract IERC20", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "unlockMigrateFunds", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "unlockTime", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const cUSDTContract = [ + { + inputs: [ + { + internalType: "address", + name: "underlying_", + type: "address", + }, + { + internalType: "contract ComptrollerInterface", + name: "comptroller_", + type: "address", + }, + { + internalType: "contract InterestRateModel", + name: "interestRateModel_", + type: "address", + }, + { + internalType: "uint256", + name: "initialExchangeRateMantissa_", + type: "uint256", + }, + { + internalType: "string", + name: "name_", + type: "string", + }, + { + internalType: "string", + name: "symbol_", + type: "string", + }, + { + internalType: "uint8", + name: "decimals_", + type: "uint8", + }, + { + internalType: "address payable", + name: "admin_", + type: "address", + }, + { + internalType: "address", + name: "implementation_", + type: "address", + }, + { + internalType: "bytes", + name: "becomeImplementationData", + type: "bytes", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + signature: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "cashPrior", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "interestAccumulated", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "borrowIndex", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "totalBorrows", + type: "uint256", + }, + ], + name: "AccrueInterest", + type: "event", + signature: + "0x4dec04e750ca11537cabcd8a9eab06494de08da3735bc8871cd41250e190bc04", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + signature: + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "borrower", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "borrowAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "accountBorrows", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "totalBorrows", + type: "uint256", + }, + ], + name: "Borrow", + type: "event", + signature: + "0x13ed6866d4e1ee6da46f845c46d7e54120883d75c5ea9a2dacc1c4ca8984ab80", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "error", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "info", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "detail", + type: "uint256", + }, + ], + name: "Failure", + type: "event", + signature: + "0x45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa0", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "liquidator", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "borrower", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "repayAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "cTokenCollateral", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "seizeTokens", + type: "uint256", + }, + ], + name: "LiquidateBorrow", + type: "event", + signature: + "0x298637f684da70674f26509b10f07ec2fbc77a335ab1e7d6215a4b2484d8bb52", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "minter", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "mintAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "mintTokens", + type: "uint256", + }, + ], + name: "Mint", + type: "event", + signature: + "0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldAdmin", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newAdmin", + type: "address", + }, + ], + name: "NewAdmin", + type: "event", + signature: + "0xf9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "contract ComptrollerInterface", + name: "oldComptroller", + type: "address", + }, + { + indexed: false, + internalType: "contract ComptrollerInterface", + name: "newComptroller", + type: "address", + }, + ], + name: "NewComptroller", + type: "event", + signature: + "0x7ac369dbd14fa5ea3f473ed67cc9d598964a77501540ba6751eb0b3decf5870d", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldImplementation", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newImplementation", + type: "address", + }, + ], + name: "NewImplementation", + type: "event", + signature: + "0xd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "contract InterestRateModel", + name: "oldInterestRateModel", + type: "address", + }, + { + indexed: false, + internalType: "contract InterestRateModel", + name: "newInterestRateModel", + type: "address", + }, + ], + name: "NewMarketInterestRateModel", + type: "event", + signature: + "0xedffc32e068c7c95dfd4bdfd5c4d939a084d6b11c4199eac8436ed234d72f926", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldPendingAdmin", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newPendingAdmin", + type: "address", + }, + ], + name: "NewPendingAdmin", + type: "event", + signature: + "0xca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldReserveFactorMantissa", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newReserveFactorMantissa", + type: "uint256", + }, + ], + name: "NewReserveFactor", + type: "event", + signature: + "0xaaa68312e2ea9d50e16af5068410ab56e1a1fd06037b1a35664812c30f821460", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "redeemer", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "redeemAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "redeemTokens", + type: "uint256", + }, + ], + name: "Redeem", + type: "event", + signature: + "0xe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a929", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "payer", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "borrower", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "repayAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "accountBorrows", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "totalBorrows", + type: "uint256", + }, + ], + name: "RepayBorrow", + type: "event", + signature: + "0x1a2a22cb034d26d1854bdc6666a5b91fe25efbbb5dcad3b0355478d6f5c362a1", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "benefactor", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "addAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newTotalReserves", + type: "uint256", + }, + ], + name: "ReservesAdded", + type: "event", + signature: + "0xa91e67c5ea634cd43a12c5a482724b03de01e85ca68702a53d0c2f45cb7c1dc5", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "admin", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "reduceAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newTotalReserves", + type: "uint256", + }, + ], + name: "ReservesReduced", + type: "event", + signature: + "0x3bad0c59cf2f06e7314077049f48a93578cd16f5ef92329f1dab1420a99c177e", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + signature: + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + }, + { + payable: true, + stateMutability: "payable", + type: "fallback", + }, + { + constant: false, + inputs: [], + name: "_acceptAdmin", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xe9c714f2", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "addAmount", + type: "uint256", + }, + ], + name: "_addReserves", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x3e941010", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "reduceAmount", + type: "uint256", + }, + ], + name: "_reduceReserves", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x601a0bf1", + }, + { + constant: false, + inputs: [ + { + internalType: "contract ComptrollerInterface", + name: "newComptroller", + type: "address", + }, + ], + name: "_setComptroller", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x4576b5db", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "implementation_", + type: "address", + }, + { + internalType: "bool", + name: "allowResign", + type: "bool", + }, + { + internalType: "bytes", + name: "becomeImplementationData", + type: "bytes", + }, + ], + name: "_setImplementation", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x555bcc40", + }, + { + constant: false, + inputs: [ + { + internalType: "contract InterestRateModel", + name: "newInterestRateModel", + type: "address", + }, + ], + name: "_setInterestRateModel", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xf2b3abbd", + }, + { + constant: false, + inputs: [ + { + internalType: "address payable", + name: "newPendingAdmin", + type: "address", + }, + ], + name: "_setPendingAdmin", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xb71d1a0c", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "newReserveFactorMantissa", + type: "uint256", + }, + ], + name: "_setReserveFactor", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xfca7820b", + }, + { + constant: true, + inputs: [], + name: "accrualBlockNumber", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0x6c540baf", + }, + { + constant: false, + inputs: [], + name: "accrueInterest", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xa6afed95", + }, + { + constant: true, + inputs: [], + name: "admin", + outputs: [ + { + internalType: "address payable", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0xf851a440", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0xdd62ed3e", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x095ea7b3", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0x70a08231", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "balanceOfUnderlying", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x3af9e669", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "borrowAmount", + type: "uint256", + }, + ], + name: "borrow", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xc5ebeaec", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "borrowBalanceCurrent", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x17bfdfbc", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "borrowBalanceStored", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0x95dd9193", + }, + { + constant: true, + inputs: [], + name: "borrowIndex", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0xaa5af0fd", + }, + { + constant: true, + inputs: [], + name: "borrowRatePerBlock", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0xf8f9da28", + }, + { + constant: true, + inputs: [], + name: "comptroller", + outputs: [ + { + internalType: "contract ComptrollerInterface", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0x5fe3b567", + }, + { + constant: true, + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0x313ce567", + }, + { + constant: false, + inputs: [ + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "delegateToImplementation", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x0933c1ed", + }, + { + constant: true, + inputs: [ + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "delegateToViewImplementation", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0x4487152f", + }, + { + constant: false, + inputs: [], + name: "exchangeRateCurrent", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xbd6d894d", + }, + { + constant: true, + inputs: [], + name: "exchangeRateStored", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0x182df0f5", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "getAccountSnapshot", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0xc37f68e2", + }, + { + constant: true, + inputs: [], + name: "getCash", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0x3b1d21a2", + }, + { + constant: true, + inputs: [], + name: "implementation", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0x5c60da1b", + }, + { + constant: true, + inputs: [], + name: "interestRateModel", + outputs: [ + { + internalType: "contract InterestRateModel", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0xf3fdb15a", + }, + { + constant: true, + inputs: [], + name: "isCToken", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0xfe9c44ae", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "borrower", + type: "address", + }, + { + internalType: "uint256", + name: "repayAmount", + type: "uint256", + }, + { + internalType: "contract CTokenInterface", + name: "cTokenCollateral", + type: "address", + }, + ], + name: "liquidateBorrow", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xf5e3c462", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "mintAmount", + type: "uint256", + }, + ], + name: "mint", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xa0712d68", + }, + { + constant: true, + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0x06fdde03", + }, + { + constant: true, + inputs: [], + name: "pendingAdmin", + outputs: [ + { + internalType: "address payable", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0x26782247", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "redeemTokens", + type: "uint256", + }, + ], + name: "redeem", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xdb006a75", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "redeemAmount", + type: "uint256", + }, + ], + name: "redeemUnderlying", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x852a12e3", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "repayAmount", + type: "uint256", + }, + ], + name: "repayBorrow", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x0e752702", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "borrower", + type: "address", + }, + { + internalType: "uint256", + name: "repayAmount", + type: "uint256", + }, + ], + name: "repayBorrowBehalf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x2608f818", + }, + { + constant: true, + inputs: [], + name: "reserveFactorMantissa", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0x173b9904", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "liquidator", + type: "address", + }, + { + internalType: "address", + name: "borrower", + type: "address", + }, + { + internalType: "uint256", + name: "seizeTokens", + type: "uint256", + }, + ], + name: "seize", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xb2a02ff1", + }, + { + constant: true, + inputs: [], + name: "supplyRatePerBlock", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0xae9d70b0", + }, + { + constant: true, + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0x95d89b41", + }, + { + constant: true, + inputs: [], + name: "totalBorrows", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0x47bd3718", + }, + { + constant: false, + inputs: [], + name: "totalBorrowsCurrent", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x73acee98", + }, + { + constant: true, + inputs: [], + name: "totalReserves", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0x8f840ddd", + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0x18160ddd", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "dst", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xa9059cbb", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "src", + type: "address", + }, + { + internalType: "address", + name: "dst", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x23b872dd", + }, + { + constant: true, + inputs: [], + name: "underlying", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0x6f307dc3", + }, +]; + +const cDAIContract = [ + { + inputs: [ + { + internalType: "address", + name: "underlying_", + type: "address", + }, + { + internalType: "contract ComptrollerInterface", + name: "comptroller_", + type: "address", + }, + { + internalType: "contract InterestRateModel", + name: "interestRateModel_", + type: "address", + }, + { + internalType: "uint256", + name: "initialExchangeRateMantissa_", + type: "uint256", + }, + { + internalType: "string", + name: "name_", + type: "string", + }, + { + internalType: "string", + name: "symbol_", + type: "string", + }, + { + internalType: "uint8", + name: "decimals_", + type: "uint8", + }, + { + internalType: "address payable", + name: "admin_", + type: "address", + }, + { + internalType: "address", + name: "implementation_", + type: "address", + }, + { + internalType: "bytes", + name: "becomeImplementationData", + type: "bytes", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + signature: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "cashPrior", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "interestAccumulated", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "borrowIndex", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "totalBorrows", + type: "uint256", + }, + ], + name: "AccrueInterest", + type: "event", + signature: + "0x4dec04e750ca11537cabcd8a9eab06494de08da3735bc8871cd41250e190bc04", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + signature: + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "borrower", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "borrowAmount", + type: "uint256", + }, { - "internalType": "address", - "name": "_address", - "type": "address" - } + indexed: false, + internalType: "uint256", + name: "accountBorrows", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "totalBorrows", + type: "uint256", + }, ], - "name": "getSharesValue", - "outputs": [ + name: "Borrow", + type: "event", + signature: + "0x13ed6866d4e1ee6da46f845c46d7e54120883d75c5ea9a2dacc1c4ca8984ab80", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "error", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "info", + type: "uint256", + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + indexed: false, + internalType: "uint256", + name: "detail", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + name: "Failure", + type: "event", + signature: + "0x45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa0", }, { - "inputs": [ + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "liquidator", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "borrower", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "repayAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "cTokenCollateral", + type: "address", + }, { - "internalType": "address", - "name": "_address", - "type": "address" - } + indexed: false, + internalType: "uint256", + name: "seizeTokens", + type: "uint256", + }, ], - "name": "getVaultDepositBalance", - "outputs": [ + name: "LiquidateBorrow", + type: "event", + signature: + "0x298637f684da70674f26509b10f07ec2fbc77a335ab1e7d6215a4b2484d8bb52", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "minter", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "mintAmount", + type: "uint256", + }, { - "internalType": "uint256", - "name": "result", - "type": "uint256" - } + indexed: false, + internalType: "uint256", + name: "mintTokens", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + name: "Mint", + type: "event", + signature: + "0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f", }, { - "inputs": [ + anonymous: false, + inputs: [ { - "internalType": "address", - "name": "spender", - "type": "address" + indexed: false, + internalType: "address", + name: "oldAdmin", + type: "address", }, { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } + indexed: false, + internalType: "address", + name: "newAdmin", + type: "address", + }, ], - "name": "increaseAllowance", - "outputs": [ + name: "NewAdmin", + type: "event", + signature: + "0xf9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "contract ComptrollerInterface", + name: "oldComptroller", + type: "address", + }, { - "internalType": "bool", - "name": "", - "type": "bool" - } + indexed: false, + internalType: "contract ComptrollerInterface", + name: "newComptroller", + type: "address", + }, ], - "stateMutability": "nonpayable", - "type": "function" + name: "NewComptroller", + type: "event", + signature: + "0x7ac369dbd14fa5ea3f473ed67cc9d598964a77501540ba6751eb0b3decf5870d", }, { - "inputs": [], - "name": "isVesting", - "outputs": [ + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldImplementation", + type: "address", + }, { - "internalType": "bool", - "name": "", - "type": "bool" - } + indexed: false, + internalType: "address", + name: "newImplementation", + type: "address", + }, ], - "stateMutability": "view", - "type": "function" + name: "NewImplementation", + type: "event", + signature: + "0xd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a", }, { - "inputs": [], - "name": "name", - "outputs": [ + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "contract InterestRateModel", + name: "oldInterestRateModel", + type: "address", + }, { - "internalType": "string", - "name": "", - "type": "string" - } + indexed: false, + internalType: "contract InterestRateModel", + name: "newInterestRateModel", + type: "address", + }, ], - "stateMutability": "view", - "type": "function" + name: "NewMarketInterestRateModel", + type: "event", + signature: + "0xedffc32e068c7c95dfd4bdfd5c4d939a084d6b11c4199eac8436ed234d72f926", }, { - "inputs": [ + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldPendingAdmin", + type: "address", + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + indexed: false, + internalType: "address", + name: "newPendingAdmin", + type: "address", + }, ], - "name": "networkFeePercentage", - "outputs": [ + name: "NewPendingAdmin", + type: "event", + signature: + "0xca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldReserveFactorMantissa", + type: "uint256", + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + indexed: false, + internalType: "uint256", + name: "newReserveFactorMantissa", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + name: "NewReserveFactor", + type: "event", + signature: + "0xaaa68312e2ea9d50e16af5068410ab56e1a1fd06037b1a35664812c30f821460", }, { - "inputs": [ + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "redeemer", + type: "address", + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + indexed: false, + internalType: "uint256", + name: "redeemAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "redeemTokens", + type: "uint256", + }, ], - "name": "networkFeeTier2", - "outputs": [ + name: "Redeem", + type: "event", + signature: + "0xe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a929", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "payer", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "borrower", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "repayAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "accountBorrows", + type: "uint256", + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + indexed: false, + internalType: "uint256", + name: "totalBorrows", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + name: "RepayBorrow", + type: "event", + signature: + "0x1a2a22cb034d26d1854bdc6666a5b91fe25efbbb5dcad3b0355478d6f5c362a1", }, { - "inputs": [], - "name": "owner", - "outputs": [ + anonymous: false, + inputs: [ { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pool", - "outputs": [ + indexed: false, + internalType: "address", + name: "benefactor", + type: "address", + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "profileSharingFeePercentage", - "outputs": [ + indexed: false, + internalType: "uint256", + name: "addAmount", + type: "uint256", + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + indexed: false, + internalType: "uint256", + name: "newTotalReserves", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + name: "ReservesAdded", + type: "event", + signature: + "0xa91e67c5ea634cd43a12c5a482724b03de01e85ca68702a53d0c2f45cb7c1dc5", }, { - "inputs": [ + anonymous: false, + inputs: [ { - "internalType": "uint256", - "name": "_shares", - "type": "uint256" - } - ], - "name": "refund", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + indexed: false, + internalType: "address", + name: "admin", + type: "address", + }, { - "internalType": "address", - "name": "_communityWallet", - "type": "address" - } - ], - "name": "setCommunityWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + indexed: false, + internalType: "uint256", + name: "reduceAmount", + type: "uint256", + }, { - "internalType": "uint256", - "name": "_percentage", - "type": "uint256" - } + indexed: false, + internalType: "uint256", + name: "newTotalReserves", + type: "uint256", + }, ], - "name": "setCustomNetworkFeePercentage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: "ReservesReduced", + type: "event", + signature: + "0x3bad0c59cf2f06e7314077049f48a93578cd16f5ef92329f1dab1420a99c177e", }, { - "inputs": [ + anonymous: false, + inputs: [ { - "internalType": "uint256", - "name": "_customNetworkFeeTier", - "type": "uint256" - } - ], - "name": "setCustomNetworkFeeTier", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, { - "internalType": "uint256[]", - "name": "_networkFeePercentage", - "type": "uint256[]" - } - ], - "name": "setNetworkFeePercentage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, { - "internalType": "uint256[]", - "name": "_networkFeeTier2", - "type": "uint256[]" - } + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, ], - "name": "setNetworkFeeTier2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: "Transfer", + type: "event", + signature: + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", }, { - "inputs": [ - { - "internalType": "uint256", - "name": "_percentage", - "type": "uint256" - } - ], - "name": "setProfileSharingFeePercentage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + payable: true, + stateMutability: "payable", + type: "fallback", }, { - "inputs": [ + constant: false, + inputs: [], + name: "_acceptAdmin", + outputs: [ { - "internalType": "address", - "name": "_treasuryWallet", - "type": "address" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "name": "setTreasuryWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xe9c714f2", }, { - "inputs": [ + constant: false, + inputs: [ { - "internalType": "address", - "name": "_address", - "type": "address" - } + internalType: "uint256", + name: "addAmount", + type: "uint256", + }, ], - "name": "setVault", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ + name: "_addReserves", + outputs: [ { - "internalType": "string", - "name": "", - "type": "string" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x3e941010", }, { - "inputs": [], - "name": "token", - "outputs": [ + constant: false, + inputs: [ { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } + internalType: "uint256", + name: "reduceAmount", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ + name: "_reduceReserves", + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x601a0bf1", }, { - "inputs": [ + constant: false, + inputs: [ { - "internalType": "address", - "name": "recipient", - "type": "address" + internalType: "contract ComptrollerInterface", + name: "newComptroller", + type: "address", }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } ], - "name": "transfer", - "outputs": [ + name: "_setComptroller", + outputs: [ { - "internalType": "bool", - "name": "", - "type": "bool" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x4576b5db", }, { - "inputs": [ + constant: false, + inputs: [ { - "internalType": "address", - "name": "sender", - "type": "address" + internalType: "address", + name: "implementation_", + type: "address", }, { - "internalType": "address", - "name": "recipient", - "type": "address" + internalType: "bool", + name: "allowResign", + type: "bool", }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "treasuryFee", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: "bytes", + name: "becomeImplementationData", + type: "bytes", + }, ], - "stateMutability": "view", - "type": "function" + name: "_setImplementation", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x555bcc40", }, { - "inputs": [], - "name": "treasuryWallet", - "outputs": [ + constant: false, + inputs: [ { - "internalType": "address", - "name": "", - "type": "address" - } + internalType: "contract InterestRateModel", + name: "newInterestRateModel", + type: "address", + }, ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "vault", - "outputs": [ + name: "_setInterestRateModel", + outputs: [ { - "internalType": "contract IYvault", - "name": "", - "type": "address" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "vesting", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xf2b3abbd", }, { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_shares", - "type": "uint256[]" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -]; - -const yearnTUSDABIContract = [ - { - "inputs": [ + constant: false, + inputs: [ { - "internalType": "address", - "name": "_token", - "type": "address" + internalType: "address payable", + name: "newPendingAdmin", + type: "address", }, + ], + name: "_setPendingAdmin", + outputs: [ { - "internalType": "address", - "name": "_earn", - "type": "address" + internalType: "uint256", + name: "", + type: "uint256", }, - { - "internalType": "address", - "name": "_vault", - "type": "address" - } ], - "stateMutability": "nonpayable", - "type": "constructor" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xb71d1a0c", }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, + constant: false, + inputs: [ { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" + internalType: "uint256", + name: "newReserveFactorMantissa", + type: "uint256", }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + name: "_setReserveFactor", + outputs: [ { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" + internalType: "uint256", + name: "", + type: "uint256", }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } ], - "name": "OwnershipTransferred", - "type": "event" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xfca7820b", }, { - "anonymous": false, - "inputs": [ + constant: true, + inputs: [], + name: "accrualBlockNumber", + outputs: [ { - "indexed": true, - "internalType": "address", - "name": "oldCommunityWallet", - "type": "address" + internalType: "uint256", + name: "", + type: "uint256", }, - { - "indexed": true, - "internalType": "address", - "name": "newCommunityWallet", - "type": "address" - } ], - "name": "SetCommunityWallet", - "type": "event" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x6c540baf", }, { - "anonymous": false, - "inputs": [ + constant: false, + inputs: [], + name: "accrueInterest", + outputs: [ { - "indexed": true, - "internalType": "uint256", - "name": "oldCustomNetworkFeePercentage", - "type": "uint256" + internalType: "uint256", + name: "", + type: "uint256", }, - { - "indexed": true, - "internalType": "uint256", - "name": "newCustomNetworkFeePercentage", - "type": "uint256" - } ], - "name": "SetCustomNetworkFeePercentage", - "type": "event" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xa6afed95", }, { - "anonymous": false, - "inputs": [ + constant: true, + inputs: [], + name: "admin", + outputs: [ { - "indexed": true, - "internalType": "uint256", - "name": "oldCustomNetworkFeeTier", - "type": "uint256" + internalType: "address payable", + name: "", + type: "address", }, - { - "indexed": true, - "internalType": "uint256", - "name": "newCustomNetworkFeeTier", - "type": "uint256" - } ], - "name": "SetCustomNetworkFeeTier", - "type": "event" + payable: false, + stateMutability: "view", + type: "function", + signature: "0xf851a440", }, { - "anonymous": false, - "inputs": [ + constant: true, + inputs: [ { - "indexed": false, - "internalType": "uint256[]", - "name": "oldNetworkFeePercentage", - "type": "uint256[]" + internalType: "address", + name: "owner", + type: "address", }, { - "indexed": false, - "internalType": "uint256[]", - "name": "newNetworkFeePercentage", - "type": "uint256[]" - } + internalType: "address", + name: "spender", + type: "address", + }, ], - "name": "SetNetworkFeePercentage", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + name: "allowance", + outputs: [ { - "indexed": false, - "internalType": "uint256[]", - "name": "oldNetworkFeeTier2", - "type": "uint256[]" + internalType: "uint256", + name: "", + type: "uint256", }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "newNetworkFeeTier2", - "type": "uint256[]" - } ], - "name": "SetNetworkFeeTier2", - "type": "event" + payable: false, + stateMutability: "view", + type: "function", + signature: "0xdd62ed3e", }, { - "anonymous": false, - "inputs": [ + constant: false, + inputs: [ { - "indexed": true, - "internalType": "uint256", - "name": "oldProfileSharingFeePercentage", - "type": "uint256" + internalType: "address", + name: "spender", + type: "address", }, { - "indexed": true, - "internalType": "uint256", - "name": "newProfileSharingFeePercentage", - "type": "uint256" - } + internalType: "uint256", + name: "amount", + type: "uint256", + }, ], - "name": "SetProfileSharingFeePercentage", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + name: "approve", + outputs: [ { - "indexed": true, - "internalType": "address", - "name": "oldTreasuryWallet", - "type": "address" + internalType: "bool", + name: "", + type: "bool", }, - { - "indexed": true, - "internalType": "address", - "name": "newTreasuryWallet", - "type": "address" - } ], - "name": "SetTreasuryWallet", - "type": "event" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x095ea7b3", }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, + constant: true, + inputs: [ { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" + internalType: "address", + name: "owner", + type: "address", }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "DENOMINATOR", - "outputs": [ + name: "balanceOf", + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x70a08231", }, { - "inputs": [ + constant: false, + inputs: [ { - "internalType": "address", - "name": "owner", - "type": "address" + internalType: "address", + name: "owner", + type: "address", }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } ], - "name": "allowance", - "outputs": [ + name: "balanceOfUnderlying", + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x3af9e669", }, { - "inputs": [ + constant: false, + inputs: [ { - "internalType": "address", - "name": "spender", - "type": "address" + internalType: "uint256", + name: "borrowAmount", + type: "uint256", }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } ], - "name": "approve", - "outputs": [ + name: "borrow", + outputs: [ { - "internalType": "bool", - "name": "", - "type": "bool" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "approveMigrate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xc5ebeaec", }, { - "inputs": [ + constant: false, + inputs: [ { - "internalType": "address", - "name": "account", - "type": "address" - } + internalType: "address", + name: "account", + type: "address", + }, ], - "name": "balanceOf", - "outputs": [ + name: "borrowBalanceCurrent", + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x17bfdfbc", }, { - "inputs": [], - "name": "communityFee", - "outputs": [ + constant: true, + inputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: "address", + name: "account", + type: "address", + }, ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "communityWallet", - "outputs": [ + name: "borrowBalanceStored", + outputs: [ { - "internalType": "address", - "name": "", - "type": "address" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x95dd9193", }, { - "inputs": [], - "name": "customNetworkFeePercentage", - "outputs": [ + constant: true, + inputs: [], + name: "borrowIndex", + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0xaa5af0fd", }, { - "inputs": [], - "name": "customNetworkFeeTier", - "outputs": [ + constant: true, + inputs: [], + name: "borrowRatePerBlock", + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0xf8f9da28", }, { - "inputs": [], - "name": "daoVault", - "outputs": [ + constant: true, + inputs: [], + name: "comptroller", + outputs: [ { - "internalType": "contract IDaoVault", - "name": "", - "type": "address" - } + internalType: "contract ComptrollerInterface", + name: "", + type: "address", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x5fe3b567", }, { - "inputs": [], - "name": "decimals", - "outputs": [ + constant: true, + inputs: [], + name: "decimals", + outputs: [ { - "internalType": "uint8", - "name": "", - "type": "uint8" - } + internalType: "uint8", + name: "", + type: "uint8", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x313ce567", }, { - "inputs": [ + constant: false, + inputs: [ { - "internalType": "address", - "name": "spender", - "type": "address" + internalType: "bytes", + name: "data", + type: "bytes", }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } ], - "name": "decreaseAllowance", - "outputs": [ + name: "delegateToImplementation", + outputs: [ { - "internalType": "bool", - "name": "", - "type": "bool" - } + internalType: "bytes", + name: "", + type: "bytes", + }, ], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x0933c1ed", }, { - "inputs": [ + constant: true, + inputs: [ { - "internalType": "uint256[]", - "name": "_amounts", - "type": "uint256[]" - } + internalType: "bytes", + name: "data", + type: "bytes", + }, ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "earn", - "outputs": [ + name: "delegateToViewImplementation", + outputs: [ { - "internalType": "contract IYearn", - "name": "", - "type": "address" - } + internalType: "bytes", + name: "", + type: "bytes", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x4487152f", }, { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "getEarnDepositBalance", - "outputs": [ + constant: false, + inputs: [], + name: "exchangeRateCurrent", + outputs: [ { - "internalType": "uint256", - "name": "result", - "type": "uint256" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xbd6d894d", }, { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "getSharesValue", - "outputs": [ + constant: true, + inputs: [], + name: "exchangeRateStored", + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x182df0f5", }, { - "inputs": [ + constant: true, + inputs: [ { - "internalType": "address", - "name": "_address", - "type": "address" - } + internalType: "address", + name: "account", + type: "address", + }, ], - "name": "getVaultDepositBalance", - "outputs": [ + name: "getAccountSnapshot", + outputs: [ { - "internalType": "uint256", - "name": "result", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ + internalType: "uint256", + name: "", + type: "uint256", + }, { - "internalType": "address", - "name": "spender", - "type": "address" + internalType: "uint256", + name: "", + type: "uint256", }, { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ + internalType: "uint256", + name: "", + type: "uint256", + }, { - "internalType": "bool", - "name": "", - "type": "bool" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0xc37f68e2", }, { - "inputs": [], - "name": "isVesting", - "outputs": [ + constant: true, + inputs: [], + name: "getCash", + outputs: [ { - "internalType": "bool", - "name": "", - "type": "bool" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x3b1d21a2", }, { - "inputs": [], - "name": "name", - "outputs": [ + constant: true, + inputs: [], + name: "implementation", + outputs: [ { - "internalType": "string", - "name": "", - "type": "string" - } + internalType: "address", + name: "", + type: "address", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x5c60da1b", }, { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "networkFeePercentage", - "outputs": [ + constant: true, + inputs: [], + name: "interestRateModel", + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: "contract InterestRateModel", + name: "", + type: "address", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0xf3fdb15a", }, { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "networkFeeTier2", - "outputs": [ + constant: true, + inputs: [], + name: "isCToken", + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: "bool", + name: "", + type: "bool", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0xfe9c44ae", }, { - "inputs": [], - "name": "owner", - "outputs": [ + constant: false, + inputs: [ { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pool", - "outputs": [ + internalType: "address", + name: "borrower", + type: "address", + }, + { + internalType: "uint256", + name: "repayAmount", + type: "uint256", + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: "contract CTokenInterface", + name: "cTokenCollateral", + type: "address", + }, ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "profileSharingFeePercentage", - "outputs": [ + name: "liquidateBorrow", + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xf5e3c462", }, { - "inputs": [ + constant: false, + inputs: [ { - "internalType": "uint256", - "name": "_shares", - "type": "uint256" - } + internalType: "uint256", + name: "mintAmount", + type: "uint256", + }, ], - "name": "refund", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + name: "mint", + outputs: [ { - "internalType": "address", - "name": "_communityWallet", - "type": "address" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "name": "setCommunityWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xa0712d68", }, { - "inputs": [ + constant: true, + inputs: [], + name: "name", + outputs: [ { - "internalType": "uint256", - "name": "_percentage", - "type": "uint256" - } + internalType: "string", + name: "", + type: "string", + }, ], - "name": "setCustomNetworkFeePercentage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x06fdde03", }, { - "inputs": [ + constant: true, + inputs: [], + name: "pendingAdmin", + outputs: [ { - "internalType": "uint256", - "name": "_customNetworkFeeTier", - "type": "uint256" - } + internalType: "address payable", + name: "", + type: "address", + }, ], - "name": "setCustomNetworkFeeTier", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x26782247", }, { - "inputs": [ + constant: false, + inputs: [ { - "internalType": "uint256[]", - "name": "_networkFeePercentage", - "type": "uint256[]" - } + internalType: "uint256", + name: "redeemTokens", + type: "uint256", + }, ], - "name": "setNetworkFeePercentage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + name: "redeem", + outputs: [ { - "internalType": "uint256[]", - "name": "_networkFeeTier2", - "type": "uint256[]" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "name": "setNetworkFeeTier2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xdb006a75", }, { - "inputs": [ + constant: false, + inputs: [ { - "internalType": "uint256", - "name": "_percentage", - "type": "uint256" - } + internalType: "uint256", + name: "redeemAmount", + type: "uint256", + }, ], - "name": "setProfileSharingFeePercentage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + name: "redeemUnderlying", + outputs: [ { - "internalType": "address", - "name": "_treasuryWallet", - "type": "address" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "name": "setTreasuryWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x852a12e3", }, { - "inputs": [ + constant: false, + inputs: [ { - "internalType": "address", - "name": "_address", - "type": "address" - } + internalType: "uint256", + name: "repayAmount", + type: "uint256", + }, ], - "name": "setVault", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ + name: "repayBorrow", + outputs: [ { - "internalType": "string", - "name": "", - "type": "string" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x0e752702", }, { - "inputs": [], - "name": "token", - "outputs": [ + constant: false, + inputs: [ + { + internalType: "address", + name: "borrower", + type: "address", + }, { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } + internalType: "uint256", + name: "repayAmount", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ + name: "repayBorrowBehalf", + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x2608f818", }, { - "inputs": [ + constant: true, + inputs: [], + name: "reserveFactorMantissa", + outputs: [ { - "internalType": "address", - "name": "recipient", - "type": "address" + internalType: "uint256", + name: "", + type: "uint256", }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } ], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x173b9904", }, { - "inputs": [ + constant: false, + inputs: [ { - "internalType": "address", - "name": "sender", - "type": "address" + internalType: "address", + name: "liquidator", + type: "address", }, { - "internalType": "address", - "name": "recipient", - "type": "address" + internalType: "address", + name: "borrower", + type: "address", }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } + internalType: "uint256", + name: "seizeTokens", + type: "uint256", + }, ], - "name": "transferFrom", - "outputs": [ + name: "seize", + outputs: [ { - "internalType": "bool", - "name": "", - "type": "bool" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xb2a02ff1", }, { - "inputs": [ + constant: true, + inputs: [], + name: "supplyRatePerBlock", + outputs: [ { - "internalType": "address", - "name": "newOwner", - "type": "address" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0xae9d70b0", }, { - "inputs": [], - "name": "treasuryFee", - "outputs": [ + constant: true, + inputs: [], + name: "symbol", + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: "string", + name: "", + type: "string", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x95d89b41", }, { - "inputs": [], - "name": "treasuryWallet", - "outputs": [ + constant: true, + inputs: [], + name: "totalBorrows", + outputs: [ { - "internalType": "address", - "name": "", - "type": "address" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x47bd3718", }, { - "inputs": [], - "name": "vault", - "outputs": [ + constant: false, + inputs: [], + name: "totalBorrowsCurrent", + outputs: [ { - "internalType": "contract IYvault", - "name": "", - "type": "address" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x73acee98", }, { - "inputs": [], - "name": "vesting", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + constant: true, + inputs: [], + name: "totalReserves", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + signature: "0x8f840ddd", }, { - "inputs": [ + constant: true, + inputs: [], + name: "totalSupply", + outputs: [ { - "internalType": "uint256[]", - "name": "_shares", - "type": "uint256[]" - } + internalType: "uint256", + name: "", + type: "uint256", + }, ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -]; - -const yearnUSDCABIContract = [ + payable: false, + stateMutability: "view", + type: "function", + signature: "0x18160ddd", + }, { - "inputs": [ + constant: false, + inputs: [ { - "internalType": "address", - "name": "_token", - "type": "address" + internalType: "address", + name: "dst", + type: "address", }, { - "internalType": "address", - "name": "_earn", - "type": "address" + internalType: "uint256", + name: "amount", + type: "uint256", }, + ], + name: "transfer", + outputs: [ { - "internalType": "address", - "name": "_vault", - "type": "address" - } + internalType: "bool", + name: "", + type: "bool", + }, ], - "stateMutability": "nonpayable", - "type": "constructor" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xa9059cbb", }, { - "anonymous": false, - "inputs": [ + constant: false, + inputs: [ { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" + internalType: "address", + name: "src", + type: "address", }, { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" + internalType: "address", + name: "dst", + type: "address", }, { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } + internalType: "uint256", + name: "amount", + type: "uint256", + }, ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + name: "transferFrom", + outputs: [ { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" + internalType: "bool", + name: "", + type: "bool", }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } ], - "name": "OwnershipTransferred", - "type": "event" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x23b872dd", }, { - "anonymous": false, - "inputs": [ + constant: true, + inputs: [], + name: "underlying", + outputs: [ { - "indexed": true, - "internalType": "address", - "name": "oldCommunityWallet", - "type": "address" + internalType: "address", + name: "", + type: "address", }, - { - "indexed": true, - "internalType": "address", - "name": "newCommunityWallet", - "type": "address" - } ], - "name": "SetCommunityWallet", - "type": "event" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x6f307dc3", }, +]; + +const cUSDCContract = [ { - "anonymous": false, - "inputs": [ + constant: true, + inputs: [], + name: "name", + outputs: [ { - "indexed": true, - "internalType": "uint256", - "name": "oldCustomNetworkFeePercentage", - "type": "uint256" + name: "", + type: "string", }, - { - "indexed": true, - "internalType": "uint256", - "name": "newCustomNetworkFeePercentage", - "type": "uint256" - } ], - "name": "SetCustomNetworkFeePercentage", - "type": "event" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x06fdde03", }, { - "anonymous": false, - "inputs": [ + constant: false, + inputs: [ { - "indexed": true, - "internalType": "uint256", - "name": "oldCustomNetworkFeeTier", - "type": "uint256" + name: "spender", + type: "address", }, { - "indexed": true, - "internalType": "uint256", - "name": "newCustomNetworkFeeTier", - "type": "uint256" - } + name: "amount", + type: "uint256", + }, ], - "name": "SetCustomNetworkFeeTier", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + name: "approve", + outputs: [ { - "indexed": false, - "internalType": "uint256[]", - "name": "oldNetworkFeePercentage", - "type": "uint256[]" + name: "", + type: "bool", }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "newNetworkFeePercentage", - "type": "uint256[]" - } ], - "name": "SetNetworkFeePercentage", - "type": "event" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x095ea7b3", }, { - "anonymous": false, - "inputs": [ + constant: false, + inputs: [ { - "indexed": false, - "internalType": "uint256[]", - "name": "oldNetworkFeeTier2", - "type": "uint256[]" + name: "repayAmount", + type: "uint256", }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "newNetworkFeeTier2", - "type": "uint256[]" - } ], - "name": "SetNetworkFeeTier2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + name: "repayBorrow", + outputs: [ { - "indexed": true, - "internalType": "uint256", - "name": "oldProfileSharingFeePercentage", - "type": "uint256" + name: "", + type: "uint256", }, - { - "indexed": true, - "internalType": "uint256", - "name": "newProfileSharingFeePercentage", - "type": "uint256" - } ], - "name": "SetProfileSharingFeePercentage", - "type": "event" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x0e752702", }, { - "anonymous": false, - "inputs": [ + constant: true, + inputs: [], + name: "reserveFactorMantissa", + outputs: [ { - "indexed": true, - "internalType": "address", - "name": "oldTreasuryWallet", - "type": "address" + name: "", + type: "uint256", }, - { - "indexed": true, - "internalType": "address", - "name": "newTreasuryWallet", - "type": "address" - } ], - "name": "SetTreasuryWallet", - "type": "event" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x173b9904", }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, + constant: false, + inputs: [ { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" + name: "account", + type: "address", }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "DENOMINATOR", - "outputs": [ + name: "borrowBalanceCurrent", + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x17bfdfbc", }, { - "inputs": [ + constant: true, + inputs: [], + name: "totalSupply", + outputs: [ { - "internalType": "address", - "name": "owner", - "type": "address" + name: "", + type: "uint256", }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x18160ddd", }, { - "inputs": [ + constant: true, + inputs: [], + name: "exchangeRateStored", + outputs: [ { - "internalType": "address", - "name": "spender", - "type": "address" + name: "", + type: "uint256", }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "approveMigrate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x182df0f5", }, { - "inputs": [ + constant: false, + inputs: [ { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ + name: "src", + type: "address", + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "communityFee", - "outputs": [ + name: "dst", + type: "address", + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + name: "amount", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "communityWallet", - "outputs": [ + name: "transferFrom", + outputs: [ { - "internalType": "address", - "name": "", - "type": "address" - } + name: "", + type: "bool", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x23b872dd", }, { - "inputs": [], - "name": "customNetworkFeePercentage", - "outputs": [ + constant: false, + inputs: [ + { + name: "borrower", + type: "address", + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + name: "repayAmount", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "customNetworkFeeTier", - "outputs": [ + name: "repayBorrowBehalf", + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x2608f818", }, { - "inputs": [], - "name": "daoVault", - "outputs": [ + constant: true, + inputs: [], + name: "pendingAdmin", + outputs: [ { - "internalType": "contract IDaoVault", - "name": "", - "type": "address" - } + name: "", + type: "address", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x26782247", }, { - "inputs": [], - "name": "decimals", - "outputs": [ + constant: true, + inputs: [], + name: "decimals", + outputs: [ { - "internalType": "uint8", - "name": "", - "type": "uint8" - } + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x313ce567", }, { - "inputs": [ + constant: false, + inputs: [ { - "internalType": "address", - "name": "spender", - "type": "address" + name: "owner", + type: "address", }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + name: "balanceOfUnderlying", + outputs: [ { - "internalType": "uint256[]", - "name": "_amounts", - "type": "uint256[]" - } + name: "", + type: "uint256", + }, ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x3af9e669", }, { - "inputs": [], - "name": "earn", - "outputs": [ + constant: true, + inputs: [], + name: "getCash", + outputs: [ { - "internalType": "contract IYearn", - "name": "", - "type": "address" - } + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x3b1d21a2", }, { - "inputs": [ + constant: false, + inputs: [ { - "internalType": "address", - "name": "_address", - "type": "address" - } + name: "newComptroller", + type: "address", + }, ], - "name": "getEarnDepositBalance", - "outputs": [ + name: "_setComptroller", + outputs: [ { - "internalType": "uint256", - "name": "result", - "type": "uint256" - } + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x4576b5db", }, { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "getSharesValue", - "outputs": [ + constant: true, + inputs: [], + name: "totalBorrows", + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x47bd3718", }, { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "getVaultDepositBalance", - "outputs": [ + constant: true, + inputs: [], + name: "comptroller", + outputs: [ { - "internalType": "uint256", - "name": "result", - "type": "uint256" - } + name: "", + type: "address", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x5fe3b567", }, { - "inputs": [ + constant: false, + inputs: [ { - "internalType": "address", - "name": "spender", - "type": "address" + name: "reduceAmount", + type: "uint256", }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } ], - "name": "increaseAllowance", - "outputs": [ + name: "_reduceReserves", + outputs: [ { - "internalType": "bool", - "name": "", - "type": "bool" - } + name: "", + type: "uint256", + }, ], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x601a0bf1", }, { - "inputs": [], - "name": "isVesting", - "outputs": [ + constant: true, + inputs: [], + name: "initialExchangeRateMantissa", + outputs: [ { - "internalType": "bool", - "name": "", - "type": "bool" - } + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x675d972c", }, { - "inputs": [], - "name": "name", - "outputs": [ + constant: true, + inputs: [], + name: "accrualBlockNumber", + outputs: [ { - "internalType": "string", - "name": "", - "type": "string" - } + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x6c540baf", }, { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "networkFeePercentage", - "outputs": [ + constant: true, + inputs: [], + name: "underlying", + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + name: "", + type: "address", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x6f307dc3", }, { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "networkFeeTier2", - "outputs": [ + constant: true, + inputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + name: "owner", + type: "address", + }, ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ + name: "balanceOf", + outputs: [ { - "internalType": "address", - "name": "", - "type": "address" - } + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x70a08231", }, { - "inputs": [], - "name": "pool", - "outputs": [ + constant: false, + inputs: [], + name: "totalBorrowsCurrent", + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x73acee98", }, { - "inputs": [], - "name": "profileSharingFeePercentage", - "outputs": [ + constant: false, + inputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + name: "redeemAmount", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ + name: "redeemUnderlying", + outputs: [ { - "internalType": "uint256", - "name": "_shares", - "type": "uint256" - } + name: "", + type: "uint256", + }, ], - "name": "refund", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0x852a12e3", }, { - "inputs": [ + constant: true, + inputs: [], + name: "totalReserves", + outputs: [ { - "internalType": "address", - "name": "_communityWallet", - "type": "address" - } + name: "", + type: "uint256", + }, ], - "name": "setCommunityWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x8f840ddd", }, { - "inputs": [ + constant: true, + inputs: [], + name: "symbol", + outputs: [ { - "internalType": "uint256", - "name": "_percentage", - "type": "uint256" - } + name: "", + type: "string", + }, ], - "name": "setCustomNetworkFeePercentage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x95d89b41", }, { - "inputs": [ + constant: true, + inputs: [ { - "internalType": "uint256", - "name": "_customNetworkFeeTier", - "type": "uint256" - } + name: "account", + type: "address", + }, ], - "name": "setCustomNetworkFeeTier", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + name: "borrowBalanceStored", + outputs: [ { - "internalType": "uint256[]", - "name": "_networkFeePercentage", - "type": "uint256[]" - } + name: "", + type: "uint256", + }, ], - "name": "setNetworkFeePercentage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0x95dd9193", }, { - "inputs": [ + constant: false, + inputs: [ { - "internalType": "uint256[]", - "name": "_networkFeeTier2", - "type": "uint256[]" - } + name: "mintAmount", + type: "uint256", + }, ], - "name": "setNetworkFeeTier2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + name: "mint", + outputs: [ { - "internalType": "uint256", - "name": "_percentage", - "type": "uint256" - } + name: "", + type: "uint256", + }, ], - "name": "setProfileSharingFeePercentage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xa0712d68", }, { - "inputs": [ + constant: false, + inputs: [], + name: "accrueInterest", + outputs: [ { - "internalType": "address", - "name": "_treasuryWallet", - "type": "address" - } + name: "", + type: "uint256", + }, ], - "name": "setTreasuryWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xa6afed95", }, { - "inputs": [ + constant: false, + inputs: [ { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "setVault", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ + name: "dst", + type: "address", + }, { - "internalType": "string", - "name": "", - "type": "string" - } + name: "amount", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ + name: "transfer", + outputs: [ { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } + name: "", + type: "bool", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xa9059cbb", }, { - "inputs": [], - "name": "totalSupply", - "outputs": [ + constant: true, + inputs: [], + name: "borrowIndex", + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0xaa5af0fd", }, { - "inputs": [ + constant: true, + inputs: [], + name: "supplyRatePerBlock", + outputs: [ { - "internalType": "address", - "name": "recipient", - "type": "address" + name: "", + type: "uint256", }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } ], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0xae9d70b0", }, { - "inputs": [ + constant: false, + inputs: [ { - "internalType": "address", - "name": "sender", - "type": "address" + name: "liquidator", + type: "address", }, { - "internalType": "address", - "name": "recipient", - "type": "address" + name: "borrower", + type: "address", }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } + name: "seizeTokens", + type: "uint256", + }, ], - "name": "transferFrom", - "outputs": [ + name: "seize", + outputs: [ { - "internalType": "bool", - "name": "", - "type": "bool" - } + name: "", + type: "uint256", + }, ], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xb2a02ff1", }, { - "inputs": [ + constant: false, + inputs: [ { - "internalType": "address", - "name": "newOwner", - "type": "address" - } + name: "newPendingAdmin", + type: "address", + }, ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "treasuryFee", - "outputs": [ + name: "_setPendingAdmin", + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xb71d1a0c", }, { - "inputs": [], - "name": "treasuryWallet", - "outputs": [ + constant: false, + inputs: [], + name: "exchangeRateCurrent", + outputs: [ { - "internalType": "address", - "name": "", - "type": "address" - } + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xbd6d894d", }, { - "inputs": [], - "name": "vault", - "outputs": [ + constant: true, + inputs: [ { - "internalType": "contract IYvault", - "name": "", - "type": "address" - } + name: "account", + type: "address", + }, ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "vesting", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + name: "getAccountSnapshot", + outputs: [ { - "internalType": "uint256[]", - "name": "_shares", - "type": "uint256[]" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -]; - -const yearnUSDTABIContract = [ - { - "inputs": [ + name: "", + type: "uint256", + }, { - "internalType": "address", - "name": "_token", - "type": "address" + name: "", + type: "uint256", }, { - "internalType": "address", - "name": "_earn", - "type": "address" + name: "", + type: "uint256", }, { - "internalType": "address", - "name": "_vault", - "type": "address" - } + name: "", + type: "uint256", + }, ], - "stateMutability": "nonpayable", - "type": "constructor" + payable: false, + stateMutability: "view", + type: "function", + signature: "0xc37f68e2", }, { - "anonymous": false, - "inputs": [ + constant: false, + inputs: [ { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" + name: "borrowAmount", + type: "uint256", }, + ], + name: "borrow", + outputs: [ { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" + name: "", + type: "uint256", }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } ], - "name": "Approval", - "type": "event" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xc5ebeaec", }, { - "anonymous": false, - "inputs": [ + constant: false, + inputs: [ { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" + name: "redeemTokens", + type: "uint256", }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + name: "redeem", + outputs: [ { - "indexed": true, - "internalType": "address", - "name": "oldCommunityWallet", - "type": "address" + name: "", + type: "uint256", }, - { - "indexed": true, - "internalType": "address", - "name": "newCommunityWallet", - "type": "address" - } ], - "name": "SetCommunityWallet", - "type": "event" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xdb006a75", }, { - "anonymous": false, - "inputs": [ + constant: true, + inputs: [ { - "indexed": true, - "internalType": "uint256", - "name": "oldCustomNetworkFeePercentage", - "type": "uint256" + name: "owner", + type: "address", }, { - "indexed": true, - "internalType": "uint256", - "name": "newCustomNetworkFeePercentage", - "type": "uint256" - } + name: "spender", + type: "address", + }, ], - "name": "SetCustomNetworkFeePercentage", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + name: "allowance", + outputs: [ { - "indexed": true, - "internalType": "uint256", - "name": "oldCustomNetworkFeeTier", - "type": "uint256" + name: "", + type: "uint256", }, - { - "indexed": true, - "internalType": "uint256", - "name": "newCustomNetworkFeeTier", - "type": "uint256" - } ], - "name": "SetCustomNetworkFeeTier", - "type": "event" + payable: false, + stateMutability: "view", + type: "function", + signature: "0xdd62ed3e", }, { - "anonymous": false, - "inputs": [ + constant: false, + inputs: [], + name: "_acceptAdmin", + outputs: [ { - "indexed": false, - "internalType": "uint256[]", - "name": "oldNetworkFeePercentage", - "type": "uint256[]" + name: "", + type: "uint256", }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "newNetworkFeePercentage", - "type": "uint256[]" - } ], - "name": "SetNetworkFeePercentage", - "type": "event" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xe9c714f2", }, { - "anonymous": false, - "inputs": [ + constant: false, + inputs: [ { - "indexed": false, - "internalType": "uint256[]", - "name": "oldNetworkFeeTier2", - "type": "uint256[]" + name: "newInterestRateModel", + type: "address", }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "newNetworkFeeTier2", - "type": "uint256[]" - } ], - "name": "SetNetworkFeeTier2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + name: "_setInterestRateModel", + outputs: [ { - "indexed": true, - "internalType": "uint256", - "name": "oldProfileSharingFeePercentage", - "type": "uint256" + name: "", + type: "uint256", }, - { - "indexed": true, - "internalType": "uint256", - "name": "newProfileSharingFeePercentage", - "type": "uint256" - } ], - "name": "SetProfileSharingFeePercentage", - "type": "event" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xf2b3abbd", }, { - "anonymous": false, - "inputs": [ + constant: true, + inputs: [], + name: "interestRateModel", + outputs: [ { - "indexed": true, - "internalType": "address", - "name": "oldTreasuryWallet", - "type": "address" + name: "", + type: "address", }, - { - "indexed": true, - "internalType": "address", - "name": "newTreasuryWallet", - "type": "address" - } ], - "name": "SetTreasuryWallet", - "type": "event" + payable: false, + stateMutability: "view", + type: "function", + signature: "0xf3fdb15a", }, { - "anonymous": false, - "inputs": [ + constant: false, + inputs: [ { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" + name: "borrower", + type: "address", }, { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" + name: "repayAmount", + type: "uint256", }, { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } + name: "cTokenCollateral", + type: "address", + }, ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "DENOMINATOR", - "outputs": [ + name: "liquidateBorrow", + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xf5e3c462", }, { - "inputs": [ + constant: true, + inputs: [], + name: "admin", + outputs: [ { - "internalType": "address", - "name": "owner", - "type": "address" + name: "", + type: "address", }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0xf851a440", }, { - "inputs": [ + constant: true, + inputs: [], + name: "borrowRatePerBlock", + outputs: [ { - "internalType": "address", - "name": "spender", - "type": "address" + name: "", + type: "uint256", }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "approveMigrate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0xf8f9da28", }, { - "inputs": [ + constant: false, + inputs: [ { - "internalType": "address", - "name": "account", - "type": "address" - } + name: "newReserveFactorMantissa", + type: "uint256", + }, ], - "name": "balanceOf", - "outputs": [ + name: "_setReserveFactor", + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + name: "", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "function", + signature: "0xfca7820b", }, { - "inputs": [], - "name": "communityFee", - "outputs": [ + constant: true, + inputs: [], + name: "isCToken", + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + name: "", + type: "bool", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "view", + type: "function", + signature: "0xfe9c44ae", }, { - "inputs": [], - "name": "communityWallet", - "outputs": [ + inputs: [ { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "customNetworkFeePercentage", - "outputs": [ + name: "underlying_", + type: "address", + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "customNetworkFeeTier", - "outputs": [ + name: "comptroller_", + type: "address", + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "daoVault", - "outputs": [ + name: "interestRateModel_", + type: "address", + }, { - "internalType": "contract IDaoVault", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ + name: "initialExchangeRateMantissa_", + type: "uint256", + }, + { + name: "name_", + type: "string", + }, + { + name: "symbol_", + type: "string", + }, { - "internalType": "uint8", - "name": "", - "type": "uint8" - } + name: "decimals_", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + payable: false, + stateMutability: "nonpayable", + type: "constructor", + signature: "constructor", }, { - "inputs": [ + anonymous: false, + inputs: [ { - "internalType": "address", - "name": "spender", - "type": "address" + indexed: false, + name: "interestAccumulated", + type: "uint256", }, { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ + indexed: false, + name: "borrowIndex", + type: "uint256", + }, { - "internalType": "bool", - "name": "", - "type": "bool" - } + indexed: false, + name: "totalBorrows", + type: "uint256", + }, ], - "stateMutability": "nonpayable", - "type": "function" + name: "AccrueInterest", + type: "event", + signature: + "0x875352fb3fadeb8c0be7cbbe8ff761b308fa7033470cd0287f02f3436fd76cb9", }, { - "inputs": [ + anonymous: false, + inputs: [ { - "internalType": "uint256[]", - "name": "_amounts", - "type": "uint256[]" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "earn", - "outputs": [ + indexed: false, + name: "minter", + type: "address", + }, + { + indexed: false, + name: "mintAmount", + type: "uint256", + }, { - "internalType": "contract IYearn", - "name": "", - "type": "address" - } + indexed: false, + name: "mintTokens", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + name: "Mint", + type: "event", + signature: + "0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f", }, { - "inputs": [ + anonymous: false, + inputs: [ + { + indexed: false, + name: "redeemer", + type: "address", + }, { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "getEarnDepositBalance", - "outputs": [ + indexed: false, + name: "redeemAmount", + type: "uint256", + }, { - "internalType": "uint256", - "name": "result", - "type": "uint256" - } + indexed: false, + name: "redeemTokens", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + name: "Redeem", + type: "event", + signature: + "0xe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a929", }, { - "inputs": [ + anonymous: false, + inputs: [ { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "getSharesValue", - "outputs": [ + indexed: false, + name: "borrower", + type: "address", + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ + indexed: false, + name: "borrowAmount", + type: "uint256", + }, { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "getVaultDepositBalance", - "outputs": [ + indexed: false, + name: "accountBorrows", + type: "uint256", + }, { - "internalType": "uint256", - "name": "result", - "type": "uint256" - } + indexed: false, + name: "totalBorrows", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + name: "Borrow", + type: "event", + signature: + "0x13ed6866d4e1ee6da46f845c46d7e54120883d75c5ea9a2dacc1c4ca8984ab80", }, { - "inputs": [ + anonymous: false, + inputs: [ { - "internalType": "address", - "name": "spender", - "type": "address" + indexed: false, + name: "payer", + type: "address", }, { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ + indexed: false, + name: "borrower", + type: "address", + }, { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "isVesting", - "outputs": [ + indexed: false, + name: "repayAmount", + type: "uint256", + }, { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ + indexed: false, + name: "accountBorrows", + type: "uint256", + }, { - "internalType": "string", - "name": "", - "type": "string" - } + indexed: false, + name: "totalBorrows", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + name: "RepayBorrow", + type: "event", + signature: + "0x1a2a22cb034d26d1854bdc6666a5b91fe25efbbb5dcad3b0355478d6f5c362a1", }, { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "networkFeePercentage", - "outputs": [ + anonymous: false, + inputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ + indexed: false, + name: "liquidator", + type: "address", + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "networkFeeTier2", - "outputs": [ + indexed: false, + name: "borrower", + type: "address", + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ + indexed: false, + name: "repayAmount", + type: "uint256", + }, { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pool", - "outputs": [ + indexed: false, + name: "cTokenCollateral", + type: "address", + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + indexed: false, + name: "seizeTokens", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + name: "LiquidateBorrow", + type: "event", + signature: + "0x298637f684da70674f26509b10f07ec2fbc77a335ab1e7d6215a4b2484d8bb52", }, { - "inputs": [], - "name": "profileSharingFeePercentage", - "outputs": [ + anonymous: false, + inputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ + indexed: false, + name: "oldPendingAdmin", + type: "address", + }, { - "internalType": "uint256", - "name": "_shares", - "type": "uint256" - } + indexed: false, + name: "newPendingAdmin", + type: "address", + }, ], - "name": "refund", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: "NewPendingAdmin", + type: "event", + signature: + "0xca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9", }, { - "inputs": [ + anonymous: false, + inputs: [ { - "internalType": "address", - "name": "_communityWallet", - "type": "address" - } - ], - "name": "setCommunityWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + indexed: false, + name: "oldAdmin", + type: "address", + }, { - "internalType": "uint256", - "name": "_percentage", - "type": "uint256" - } + indexed: false, + name: "newAdmin", + type: "address", + }, ], - "name": "setCustomNetworkFeePercentage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: "NewAdmin", + type: "event", + signature: + "0xf9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc", }, { - "inputs": [ + anonymous: false, + inputs: [ { - "internalType": "uint256", - "name": "_customNetworkFeeTier", - "type": "uint256" - } - ], - "name": "setCustomNetworkFeeTier", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + indexed: false, + name: "oldComptroller", + type: "address", + }, { - "internalType": "uint256[]", - "name": "_networkFeePercentage", - "type": "uint256[]" - } + indexed: false, + name: "newComptroller", + type: "address", + }, ], - "name": "setNetworkFeePercentage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: "NewComptroller", + type: "event", + signature: + "0x7ac369dbd14fa5ea3f473ed67cc9d598964a77501540ba6751eb0b3decf5870d", }, { - "inputs": [ + anonymous: false, + inputs: [ { - "internalType": "uint256[]", - "name": "_networkFeeTier2", - "type": "uint256[]" - } - ], - "name": "setNetworkFeeTier2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + indexed: false, + name: "oldInterestRateModel", + type: "address", + }, { - "internalType": "uint256", - "name": "_percentage", - "type": "uint256" - } + indexed: false, + name: "newInterestRateModel", + type: "address", + }, ], - "name": "setProfileSharingFeePercentage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: "NewMarketInterestRateModel", + type: "event", + signature: + "0xedffc32e068c7c95dfd4bdfd5c4d939a084d6b11c4199eac8436ed234d72f926", }, { - "inputs": [ + anonymous: false, + inputs: [ { - "internalType": "address", - "name": "_treasuryWallet", - "type": "address" - } - ], - "name": "setTreasuryWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + indexed: false, + name: "oldReserveFactorMantissa", + type: "uint256", + }, { - "internalType": "address", - "name": "_address", - "type": "address" - } + indexed: false, + name: "newReserveFactorMantissa", + type: "uint256", + }, ], - "name": "setVault", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: "NewReserveFactor", + type: "event", + signature: + "0xaaa68312e2ea9d50e16af5068410ab56e1a1fd06037b1a35664812c30f821460", }, { - "inputs": [], - "name": "symbol", - "outputs": [ + anonymous: false, + inputs: [ { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ + indexed: false, + name: "admin", + type: "address", + }, { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ + indexed: false, + name: "reduceAmount", + type: "uint256", + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + indexed: false, + name: "newTotalReserves", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + name: "ReservesReduced", + type: "event", + signature: + "0x3bad0c59cf2f06e7314077049f48a93578cd16f5ef92329f1dab1420a99c177e", }, { - "inputs": [ + anonymous: false, + inputs: [ { - "internalType": "address", - "name": "recipient", - "type": "address" + indexed: false, + name: "error", + type: "uint256", }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ + indexed: false, + name: "info", + type: "uint256", + }, { - "internalType": "bool", - "name": "", - "type": "bool" - } + indexed: false, + name: "detail", + type: "uint256", + }, ], - "stateMutability": "nonpayable", - "type": "function" + name: "Failure", + type: "event", + signature: + "0x45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa0", }, { - "inputs": [ + anonymous: false, + inputs: [ { - "internalType": "address", - "name": "sender", - "type": "address" + indexed: true, + name: "from", + type: "address", }, { - "internalType": "address", - "name": "recipient", - "type": "address" + indexed: true, + name: "to", + type: "address", }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } + indexed: false, + name: "amount", + type: "uint256", + }, ], - "stateMutability": "nonpayable", - "type": "function" + name: "Transfer", + type: "event", + signature: + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", }, { - "inputs": [ + anonymous: false, + inputs: [ { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "treasuryFee", - "outputs": [ + indexed: true, + name: "owner", + type: "address", + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "treasuryWallet", - "outputs": [ + indexed: true, + name: "spender", + type: "address", + }, { - "internalType": "address", - "name": "", - "type": "address" - } + indexed: false, + name: "amount", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + name: "Approval", + type: "event", + signature: + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", }, +]; + +xDVGABIContract = [ { - "inputs": [], - "name": "vault", - "outputs": [ - { - "internalType": "contract IYvault", - "name": "", - "type": "address" - } + inputs: [ + { internalType: "contract IERC20", name: "_dvg", type: "address" }, ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "vesting", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + stateMutability: "nonpayable", + type: "constructor", }, { - "inputs": [ + anonymous: false, + inputs: [ { - "internalType": "uint256[]", - "name": "_shares", - "type": "uint256[]" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -]; - -const compoundStrategyContract = [ - { - "inputs": [ + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, { - "internalType": "address", - "name": "_token", - "type": "address" + indexed: true, + internalType: "address", + name: "spender", + type: "address", }, { - "internalType": "address", - "name": "_cToken", - "type": "address" + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "user", type: "address" }, { - "internalType": "address", - "name": "_compToken", - "type": "address" + indexed: false, + internalType: "uint256", + name: "dvgAmount", + type: "uint256", }, { - "internalType": "address", - "name": "_comptroller", - "type": "address" + indexed: false, + internalType: "uint256", + name: "xDVGAmount", + type: "uint256", }, + ], + name: "Deposit", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "from", type: "address" }, + { indexed: true, internalType: "address", name: "to", type: "address" }, { - "internalType": "address", - "name": "_uniswapRouter", - "type": "address" + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", }, - { - "internalType": "address", - "name": "_WETH", - "type": "address" - } ], - "stateMutability": "nonpayable", - "type": "constructor" + name: "Transfer", + type: "event", }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "user", type: "address" }, { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" + indexed: false, + internalType: "uint256", + name: "dvgAmount", + type: "uint256", }, { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" + indexed: false, + internalType: "uint256", + name: "xDVGAmount", + type: "uint256", }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } ], - "name": "Approval", - "type": "event" + name: "Withdraw", + type: "event", }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } + inputs: [ + { internalType: "address", name: "owner", type: "address" }, + { internalType: "address", name: "spender", type: "address" }, ], - "name": "OwnershipTransferred", - "type": "event" + name: "allowance", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldCommunityWallet", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newCommunityWallet", - "type": "address" - } + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, ], - "name": "SetCommunityWallet", - "type": "event" + name: "approve", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function", }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldCustomNetworkFeePercentage", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newCustomNetworkFeePercentage", - "type": "uint256" - } - ], - "name": "SetCustomNetworkFeePercentage", - "type": "event" + inputs: [{ internalType: "address", name: "account", type: "address" }], + name: "balanceOf", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "oldCustomNetworkFeeTier", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "newCustomNetworkFeeTier", - "type": "uint256" - } - ], - "name": "SetCustomNetworkFeeTier", - "type": "event" + inputs: [], + name: "decimals", + outputs: [{ internalType: "uint8", name: "", type: "uint8" }], + stateMutability: "view", + type: "function", }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256[]", - "name": "oldNetworkFeePercentage", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "newNetworkFeePercentage", - "type": "uint256[]" - } + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "subtractedValue", type: "uint256" }, ], - "name": "SetNetworkFeePercentage", - "type": "event" + name: "decreaseAllowance", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function", }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256[]", - "name": "oldNetworkFeeTier2", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "newNetworkFeeTier2", - "type": "uint256[]" - } - ], - "name": "SetNetworkFeeTier2", - "type": "event" + inputs: [{ internalType: "uint256", name: "_amount", type: "uint256" }], + name: "deposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "oldProfileSharingFeePercentage", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "newProfileSharingFeePercentage", - "type": "uint256" - } - ], - "name": "SetProfileSharingFeePercentage", - "type": "event" + inputs: [], + name: "dvg", + outputs: [{ internalType: "contract IERC20", name: "", type: "address" }], + stateMutability: "view", + type: "function", }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldTreasuryWallet", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newTreasuryWallet", - "type": "address" - } + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "addedValue", type: "uint256" }, ], - "name": "SetTreasuryWallet", - "type": "event" + name: "increaseAllowance", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function", }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" + inputs: [], + name: "name", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "view", + type: "function", }, { - "inputs": [], - "name": "DAOVault", - "outputs": [ - { - "internalType": "contract IDAOVault", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" + inputs: [], + name: "symbol", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "view", + type: "function", }, { - "inputs": [], - "name": "DENOMINATOR", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + inputs: [], + name: "totalSupply", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", }, { - "inputs": [], - "name": "WETH", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } + inputs: [ + { internalType: "address", name: "recipient", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, ], - "stateMutability": "view", - "type": "function" + name: "transfer", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + inputs: [ + { internalType: "address", name: "sender", type: "address" }, + { internalType: "address", name: "recipient", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, ], - "stateMutability": "view", - "type": "function" + name: "transferFrom", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [], - "name": "amountOutMinPerc", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + inputs: [{ internalType: "uint256", name: "_share", type: "uint256" }], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +DVGABIContract = [ + { + inputs: [ + { internalType: "address", name: "_treasuryWalletAddr", type: "address" }, + { internalType: "uint256", name: "_dvgInAdvance", type: "uint256" }, ], - "stateMutability": "view", - "type": "function" + stateMutability: "nonpayable", + type: "constructor", }, { - "inputs": [ + anonymous: false, + inputs: [ { - "internalType": "address", - "name": "spender", - "type": "address" + indexed: true, + internalType: "address", + name: "owner", + type: "address", }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, { - "internalType": "bool", - "name": "", - "type": "bool" - } + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "approveMigrate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: "Approval", + type: "event", }, { - "inputs": [ + anonymous: false, + inputs: [ { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ + indexed: true, + internalType: "address", + name: "delegator", + type: "address", + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "cToken", - "outputs": [ + indexed: true, + internalType: "address", + name: "fromDelegate", + type: "address", + }, { - "internalType": "contract ICERC20", - "name": "", - "type": "address" - } + indexed: true, + internalType: "address", + name: "toDelegate", + type: "address", + }, ], - "stateMutability": "view", - "type": "function" + name: "DelegateChanged", + type: "event", }, { - "inputs": [], - "name": "communityFee", - "outputs": [ + anonymous: false, + inputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "communityWallet", - "outputs": [ + indexed: true, + internalType: "address", + name: "delegate", + type: "address", + }, { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "compToken", - "outputs": [ + indexed: false, + internalType: "uint256", + name: "previousBalance", + type: "uint256", + }, { - "internalType": "contract ICOMPERC20", - "name": "", - "type": "address" - } + indexed: false, + internalType: "uint256", + name: "newBalance", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + name: "DelegateVotesChanged", + type: "event", }, { - "inputs": [], - "name": "comptroller", - "outputs": [ + anonymous: false, + inputs: [ { - "internalType": "contract IComptroller", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "customNetworkFeePercentage", - "outputs": [ + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, ], - "stateMutability": "view", - "type": "function" + name: "OwnershipTransferred", + type: "event", }, { - "inputs": [], - "name": "customNetworkFeeTier", - "outputs": [ + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "from", type: "address" }, + { indexed: true, internalType: "address", name: "to", type: "address" }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + name: "Transfer", + type: "event", }, { - "inputs": [], - "name": "deadline", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + inputs: [], + name: "DELEGATION_TYPEHASH", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", }, { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" + inputs: [], + name: "DOMAIN_TYPEHASH", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", }, { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } + inputs: [ + { internalType: "address", name: "owner", type: "address" }, + { internalType: "address", name: "spender", type: "address" }, ], - "stateMutability": "nonpayable", - "type": "function" + name: "allowance", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", }, { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: "approve", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "getCurrentBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "result", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + inputs: [{ internalType: "address", name: "account", type: "address" }], + name: "balanceOf", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", }, { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } + inputs: [ + { internalType: "address", name: "", type: "address" }, + { internalType: "uint32", name: "", type: "uint32" }, ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } + name: "checkpoints", + outputs: [ + { internalType: "uint32", name: "fromBlock", type: "uint32" }, + { internalType: "uint256", name: "votes", type: "uint256" }, ], - "stateMutability": "nonpayable", - "type": "function" + stateMutability: "view", + type: "function", }, { - "inputs": [], - "name": "isVesting", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" + inputs: [], + name: "decimals", + outputs: [{ internalType: "uint8", name: "", type: "uint8" }], + stateMutability: "view", + type: "function", }, { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "subtractedValue", type: "uint256" }, ], - "stateMutability": "view", - "type": "function" + name: "decreaseAllowance", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "networkFeePercentage", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + inputs: [{ internalType: "address", name: "delegatee", type: "address" }], + name: "delegate", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "networkFeeTier2", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + inputs: [ + { internalType: "address", name: "delegatee", type: "address" }, + { internalType: "uint256", name: "nonce", type: "uint256" }, + { internalType: "uint256", name: "expiry", type: "uint256" }, + { internalType: "uint8", name: "v", type: "uint8" }, + { internalType: "bytes32", name: "r", type: "bytes32" }, + { internalType: "bytes32", name: "s", type: "bytes32" }, + ], + name: "delegateBySig", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" + inputs: [{ internalType: "address", name: "delegator", type: "address" }], + name: "delegates", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", }, { - "inputs": [], - "name": "pool", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + inputs: [], + name: "dvgInAdvance", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", }, { - "inputs": [], - "name": "profileSharingFeePercentage", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + inputs: [{ internalType: "address", name: "account", type: "address" }], + name: "getCurrentVotes", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", }, { - "inputs": [ - { - "internalType": "uint256", - "name": "_shares", - "type": "uint256" - } + inputs: [ + { internalType: "address", name: "account", type: "address" }, + { internalType: "uint256", name: "blockNumber", type: "uint256" }, ], - "name": "refund", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: "getPriorVotes", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", }, { - "inputs": [], - "name": "revertVesting", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "addedValue", type: "uint256" }, + ], + name: "increaseAllowance", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [ - { - "internalType": "uint256", - "name": "_percentage", - "type": "uint256" - } + inputs: [ + { internalType: "address", name: "_to", type: "address" }, + { internalType: "uint256", name: "_amount", type: "uint256" }, ], - "name": "setAmountOutMinPerc", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: "mint", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [ - { - "internalType": "address", - "name": "_communityWallet", - "type": "address" - } - ], - "name": "setCommunityWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + inputs: [], + name: "name", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "view", + type: "function", }, { - "inputs": [ - { - "internalType": "uint256", - "name": "_percentage", - "type": "uint256" - } - ], - "name": "setCustomNetworkFeePercentage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "nonces", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", }, { - "inputs": [ - { - "internalType": "uint256", - "name": "_customNetworkFeeTier", - "type": "uint256" - } - ], - "name": "setCustomNetworkFeeTier", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "numCheckpoints", + outputs: [{ internalType: "uint32", name: "", type: "uint32" }], + stateMutability: "view", + type: "function", }, { - "inputs": [ - { - "internalType": "uint256", - "name": "_seconds", - "type": "uint256" - } - ], - "name": "setDeadline", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + inputs: [], + name: "owner", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", }, { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_networkFeePercentage", - "type": "uint256[]" - } - ], - "name": "setNetworkFeePercentage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_networkFeeTier2", - "type": "uint256[]" - } - ], - "name": "setNetworkFeeTier2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + inputs: [], + name: "symbol", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "view", + type: "function", }, { - "inputs": [ - { - "internalType": "uint256", - "name": "_percentage", - "type": "uint256" - } - ], - "name": "setProfileSharingFeePercentage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + inputs: [], + name: "totalSupply", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", }, { - "inputs": [ - { - "internalType": "address", - "name": "_treasuryWallet", - "type": "address" - } + inputs: [ + { internalType: "address", name: "recipient", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, ], - "name": "setTreasuryWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: "transfer", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } + inputs: [ + { internalType: "address", name: "sender", type: "address" }, + { internalType: "address", name: "recipient", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, ], - "name": "setVault", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: "transferFrom", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" + inputs: [{ internalType: "address", name: "newOwner", type: "address" }], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" + inputs: [], + name: "treasuryWalletAddr", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", }, +]; + +daoStakeStrategyContract = [ { - "inputs": [], - "name": "totalSupply", - "outputs": [ + inputs: [ + { internalType: "address", name: "_treasuryWalletAddr", type: "address" }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: "address", + name: "_communityWalletAddr", + type: "address", + }, + { internalType: "contract DVGToken", name: "_dvg", type: "address" }, ], - "stateMutability": "view", - "type": "function" + stateMutability: "nonpayable", + type: "constructor", }, { - "inputs": [ + anonymous: false, + inputs: [ { - "internalType": "address", - "name": "recipient", - "type": "address" + indexed: true, + internalType: "address", + name: "lpTokenAddress", + type: "address", }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ + indexed: true, + internalType: "uint256", + name: "poolWeight", + type: "uint256", + }, { - "internalType": "bool", - "name": "", - "type": "bool" - } + indexed: true, + internalType: "uint256", + name: "lastRewardBlock", + type: "uint256", + }, ], - "stateMutability": "nonpayable", - "type": "function" + name: "AddPool", + type: "event", }, { - "inputs": [ + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "user", type: "address" }, { - "internalType": "address", - "name": "sender", - "type": "address" + indexed: true, + internalType: "uint256", + name: "poolId", + type: "uint256", }, { - "internalType": "address", - "name": "recipient", - "type": "address" + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } ], - "stateMutability": "nonpayable", - "type": "function" + name: "Deposit", + type: "event", }, { - "inputs": [ + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "user", type: "address" }, { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "treasuryFee", - "outputs": [ + indexed: true, + internalType: "uint256", + name: "poolId", + type: "uint256", + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + name: "EmergencyWithdraw", + type: "event", }, { - "inputs": [], - "name": "treasuryWallet", - "outputs": [ + anonymous: false, + inputs: [ { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "uniswapRouter", - "outputs": [ + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, { - "internalType": "contract IUniswapV2Router02", - "name": "", - "type": "address" - } + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "vesting", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: "OwnershipTransferred", + type: "event", }, { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -]; - -const compoundVaultContract = [ - { - "inputs": [ + anonymous: false, + inputs: [ { - "internalType": "address", - "name": "_token", - "type": "address" + indexed: true, + internalType: "contract DVGToken", + name: "dvg", + type: "address", }, - { - "internalType": "address", - "name": "_strategy", - "type": "address" - } ], - "stateMutability": "nonpayable", - "type": "constructor" + name: "SetDVG", + type: "event", }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" + indexed: true, + internalType: "uint256", + name: "poolId", + type: "uint256", }, { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" + indexed: true, + internalType: "uint256", + name: "poolWeight", + type: "uint256", }, { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } + indexed: false, + internalType: "uint256", + name: "totalPoolWeight", + type: "uint256", + }, ], - "name": "Approval", - "type": "event" + name: "SetPoolWeight", + type: "event", }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": true, - "internalType": "address", - "name": "fromStrategy", - "type": "address" + indexed: true, + internalType: "address", + name: "treasuryWalletAddr", + type: "address", }, { - "indexed": true, - "internalType": "address", - "name": "toStrategy", - "type": "address" + indexed: true, + internalType: "address", + name: "communityWalletAddr", + type: "address", }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } ], - "name": "MigrateFunds", - "type": "event" + name: "SetWalletAddress", + type: "event", }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } ], - "name": "OwnershipTransferred", - "type": "event" + name: "TransferDVGOwnership", + type: "event", }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" + indexed: true, + internalType: "uint256", + name: "poolId", + type: "uint256", }, { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" + indexed: true, + internalType: "uint256", + name: "lastRewardBlock", + type: "uint256", }, { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "LOCKTIME", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + indexed: false, + internalType: "uint256", + name: "totalDVG", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + name: "UpdatePool", + type: "event", }, { - "inputs": [ + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "user", type: "address" }, { - "internalType": "address", - "name": "owner", - "type": "address" + indexed: true, + internalType: "uint256", + name: "poolId", + type: "uint256", }, { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, ], - "stateMutability": "view", - "type": "function" + name: "Withdraw", + type: "event", }, { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" + inputs: [], + name: "BLOCK_PER_PERIOD", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", }, { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + inputs: [], + name: "COMMUNITY_WALLET_PERCENT", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", }, { - "inputs": [], - "name": "canSetPendingStrategy", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" + inputs: [], + name: "END_BLOCK", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", }, { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" + inputs: [], + name: "PERIOD_AMOUNT", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", }, { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" + inputs: [], + name: "POOL_PERCENT", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", }, { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + inputs: [], + name: "START_BLOCK", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", }, { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } + inputs: [], + name: "TREASURY_WALLET_PERCENT", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_lpTokenAddress", type: "address" }, + { internalType: "uint256", name: "_poolWeight", type: "uint256" }, + { internalType: "bool", name: "_withUpdate", type: "bool" }, ], - "stateMutability": "nonpayable", - "type": "function" + name: "addPool", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [], - "name": "migrateFunds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + inputs: [], + name: "communityWalletAddr", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", }, { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } + inputs: [ + { internalType: "uint256", name: "_pid", type: "uint256" }, + { internalType: "uint256", name: "_amount", type: "uint256" }, ], - "stateMutability": "view", - "type": "function" + name: "deposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" + inputs: [], + name: "dvg", + outputs: [{ internalType: "contract DVGToken", name: "", type: "address" }], + stateMutability: "view", + type: "function", }, { - "inputs": [], - "name": "pendingStrategy", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } + inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" }], + name: "emergencyWithdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_from", type: "uint256" }, + { internalType: "uint256", name: "_to", type: "uint256" }, ], - "stateMutability": "view", - "type": "function" + name: "getMultiplier", + outputs: [{ internalType: "uint256", name: "multiplier", type: "uint256" }], + stateMutability: "view", + type: "function", }, { - "inputs": [], - "name": "refund", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + inputs: [], + name: "massUpdatePools", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + inputs: [], + name: "owner", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", }, { - "inputs": [ - { - "internalType": "address", - "name": "_pendingStrategy", - "type": "address" - } + inputs: [ + { internalType: "uint256", name: "_pid", type: "uint256" }, + { internalType: "address", name: "_user", type: "address" }, ], - "name": "setPendingStrategy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: "pendingDVG", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", }, { - "inputs": [], - "name": "strategy", - "outputs": [ - { - "internalType": "contract IStrategy", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" + inputs: [{ internalType: "uint256", name: "", type: "uint256" }], + name: "periodDVGPerBlock", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", }, { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } + inputs: [{ internalType: "uint256", name: "", type: "uint256" }], + name: "pool", + outputs: [ + { internalType: "address", name: "lpTokenAddress", type: "address" }, + { internalType: "uint256", name: "poolWeight", type: "uint256" }, + { internalType: "uint256", name: "lastRewardBlock", type: "uint256" }, + { internalType: "uint256", name: "accDVGPerLP", type: "uint256" }, ], - "stateMutability": "view", - "type": "function" + stateMutability: "view", + type: "function", }, { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" + inputs: [], + name: "poolLength", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", }, { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } + inputs: [ + { internalType: "contract DVGToken", name: "_dvg", type: "address" }, ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } + name: "setDVG", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_pid", type: "uint256" }, + { internalType: "uint256", name: "_poolWeight", type: "uint256" }, + { internalType: "bool", name: "_withUpdate", type: "bool" }, ], - "stateMutability": "nonpayable", - "type": "function" + name: "setPoolWeight", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, + inputs: [ + { internalType: "address", name: "_treasuryWalletAddr", type: "address" }, { - "internalType": "address", - "name": "recipient", - "type": "address" + internalType: "address", + name: "_communityWalletAddr", + type: "address", }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } ], - "stateMutability": "nonpayable", - "type": "function" + name: "setWalletAddress", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + inputs: [], + name: "totalPoolWeight", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", }, { - "inputs": [], - "name": "unlockMigrateFunds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + inputs: [{ internalType: "address", name: "_newOwner", type: "address" }], + name: "transferDVGOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [], - "name": "unlockTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + inputs: [{ internalType: "address", name: "newOwner", type: "address" }], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -]; - -const cUSDTContract = [ + inputs: [], + name: "treasuryWalletAddr", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor", - "signature": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event", - "signature": "0x4dec04e750ca11537cabcd8a9eab06494de08da3735bc8871cd41250e190bc04" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event", - "signature": "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event", - "signature": "0x13ed6866d4e1ee6da46f845c46d7e54120883d75c5ea9a2dacc1c4ca8984ab80" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event", - "signature": "0x45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa0" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "cTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event", - "signature": "0x298637f684da70674f26509b10f07ec2fbc77a335ab1e7d6215a4b2484d8bb52" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event", - "signature": "0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event", - "signature": "0xf9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event", - "signature": "0x7ac369dbd14fa5ea3f473ed67cc9d598964a77501540ba6751eb0b3decf5870d" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event", - "signature": "0xd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event", - "signature": "0xedffc32e068c7c95dfd4bdfd5c4d939a084d6b11c4199eac8436ed234d72f926" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event", - "signature": "0xca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event", - "signature": "0xaaa68312e2ea9d50e16af5068410ab56e1a1fd06037b1a35664812c30f821460" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event", - "signature": "0xe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a929" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event", - "signature": "0x1a2a22cb034d26d1854bdc6666a5b91fe25efbbb5dcad3b0355478d6f5c362a1" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event", - "signature": "0xa91e67c5ea634cd43a12c5a482724b03de01e85ca68702a53d0c2f45cb7c1dc5" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event", - "signature": "0x3bad0c59cf2f06e7314077049f48a93578cd16f5ef92329f1dab1420a99c177e" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event", - "signature": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xe9c714f2" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x3e941010" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x601a0bf1" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x4576b5db" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x555bcc40" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xf2b3abbd" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xb71d1a0c" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xfca7820b" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x6c540baf" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xa6afed95" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xf851a440" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xdd62ed3e" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x095ea7b3" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x70a08231" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x3af9e669" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xc5ebeaec" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x17bfdfbc" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x95dd9193" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xaa5af0fd" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xf8f9da28" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x5fe3b567" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x313ce567" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x0933c1ed" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x4487152f" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xbd6d894d" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x182df0f5" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xc37f68e2" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x3b1d21a2" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x5c60da1b" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xf3fdb15a" - }, - { - "constant": true, - "inputs": [], - "name": "isCToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xfe9c44ae" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract CTokenInterface", - "name": "cTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xf5e3c462" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xa0712d68" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x06fdde03" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x26782247" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xdb006a75" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x852a12e3" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x0e752702" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x2608f818" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x173b9904" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xb2a02ff1" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xae9d70b0" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x95d89b41" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x47bd3718" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x73acee98" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x8f840ddd" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x18160ddd" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xa9059cbb" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x23b872dd" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x6f307dc3" - } -]; - -const cDAIContract = [ + inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" }], + name: "updatePool", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor", - "signature": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event", - "signature": "0x4dec04e750ca11537cabcd8a9eab06494de08da3735bc8871cd41250e190bc04" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event", - "signature": "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event", - "signature": "0x13ed6866d4e1ee6da46f845c46d7e54120883d75c5ea9a2dacc1c4ca8984ab80" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event", - "signature": "0x45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa0" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "cTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event", - "signature": "0x298637f684da70674f26509b10f07ec2fbc77a335ab1e7d6215a4b2484d8bb52" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event", - "signature": "0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event", - "signature": "0xf9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event", - "signature": "0x7ac369dbd14fa5ea3f473ed67cc9d598964a77501540ba6751eb0b3decf5870d" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event", - "signature": "0xd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event", - "signature": "0xedffc32e068c7c95dfd4bdfd5c4d939a084d6b11c4199eac8436ed234d72f926" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event", - "signature": "0xca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event", - "signature": "0xaaa68312e2ea9d50e16af5068410ab56e1a1fd06037b1a35664812c30f821460" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event", - "signature": "0xe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a929" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event", - "signature": "0x1a2a22cb034d26d1854bdc6666a5b91fe25efbbb5dcad3b0355478d6f5c362a1" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event", - "signature": "0xa91e67c5ea634cd43a12c5a482724b03de01e85ca68702a53d0c2f45cb7c1dc5" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event", - "signature": "0x3bad0c59cf2f06e7314077049f48a93578cd16f5ef92329f1dab1420a99c177e" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event", - "signature": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xe9c714f2" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x3e941010" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x601a0bf1" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x4576b5db" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x555bcc40" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xf2b3abbd" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xb71d1a0c" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xfca7820b" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x6c540baf" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xa6afed95" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xf851a440" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xdd62ed3e" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x095ea7b3" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x70a08231" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x3af9e669" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xc5ebeaec" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x17bfdfbc" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x95dd9193" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xaa5af0fd" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xf8f9da28" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x5fe3b567" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x313ce567" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x0933c1ed" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x4487152f" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xbd6d894d" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x182df0f5" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xc37f68e2" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x3b1d21a2" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x5c60da1b" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xf3fdb15a" - }, - { - "constant": true, - "inputs": [], - "name": "isCToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xfe9c44ae" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract CTokenInterface", - "name": "cTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xf5e3c462" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xa0712d68" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x06fdde03" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x26782247" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xdb006a75" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x852a12e3" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x0e752702" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x2608f818" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x173b9904" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xb2a02ff1" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xae9d70b0" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x95d89b41" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x47bd3718" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x73acee98" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x8f840ddd" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x18160ddd" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xa9059cbb" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x23b872dd" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x6f307dc3" - } -]; - -const cUSDCContract = [ + inputs: [ + { internalType: "uint256", name: "", type: "uint256" }, + { internalType: "address", name: "", type: "address" }, + ], + name: "user", + outputs: [ + { internalType: "uint256", name: "lpAmount", type: "uint256" }, + { internalType: "uint256", name: "finishedDVG", type: "uint256" }, + ], + stateMutability: "view", + type: "function", + }, { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x06fdde03" - }, - { - "constant": false, - "inputs": [ - { - "name": "spender", - "type": "address" - }, - { - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x095ea7b3" - }, - { - "constant": false, - "inputs": [ - { - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x0e752702" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x173b9904" - }, - { - "constant": false, - "inputs": [ - { - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x17bfdfbc" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x18160ddd" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x182df0f5" - }, - { - "constant": false, - "inputs": [ - { - "name": "src", - "type": "address" - }, - { - "name": "dst", - "type": "address" - }, - { - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x23b872dd" - }, - { - "constant": false, - "inputs": [ - { - "name": "borrower", - "type": "address" - }, - { - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x2608f818" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x26782247" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x313ce567" - }, - { - "constant": false, - "inputs": [ - { - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x3af9e669" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x3b1d21a2" - }, - { - "constant": false, - "inputs": [ - { - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x4576b5db" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x47bd3718" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x5fe3b567" - }, - { - "constant": false, - "inputs": [ - { - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x601a0bf1" - }, - { - "constant": true, - "inputs": [], - "name": "initialExchangeRateMantissa", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x675d972c" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x6c540baf" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x6f307dc3" - }, - { - "constant": true, - "inputs": [ - { - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x70a08231" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x73acee98" - }, - { - "constant": false, - "inputs": [ - { - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0x852a12e3" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x8f840ddd" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x95d89b41" - }, - { - "constant": true, - "inputs": [ - { - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0x95dd9193" - }, - { - "constant": false, - "inputs": [ - { - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xa0712d68" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xa6afed95" - }, - { - "constant": false, - "inputs": [ - { - "name": "dst", - "type": "address" - }, - { - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xa9059cbb" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xaa5af0fd" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xae9d70b0" - }, - { - "constant": false, - "inputs": [ - { - "name": "liquidator", - "type": "address" - }, - { - "name": "borrower", - "type": "address" - }, - { - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xb2a02ff1" - }, - { - "constant": false, - "inputs": [ - { - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xb71d1a0c" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xbd6d894d" - }, - { - "constant": true, - "inputs": [ - { - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "name": "", - "type": "uint256" - }, - { - "name": "", - "type": "uint256" - }, - { - "name": "", - "type": "uint256" - }, - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xc37f68e2" - }, - { - "constant": false, - "inputs": [ - { - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xc5ebeaec" - }, - { - "constant": false, - "inputs": [ - { - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xdb006a75" - }, - { - "constant": true, - "inputs": [ - { - "name": "owner", - "type": "address" - }, - { - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xdd62ed3e" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xe9c714f2" - }, - { - "constant": false, - "inputs": [ - { - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xf2b3abbd" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xf3fdb15a" - }, - { - "constant": false, - "inputs": [ - { - "name": "borrower", - "type": "address" - }, - { - "name": "repayAmount", - "type": "uint256" - }, - { - "name": "cTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xf5e3c462" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xf851a440" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xf8f9da28" - }, - { - "constant": false, - "inputs": [ - { - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function", - "signature": "0xfca7820b" - }, - { - "constant": true, - "inputs": [], - "name": "isCToken", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function", - "signature": "0xfe9c44ae" - }, - { - "inputs": [ - { - "name": "underlying_", - "type": "address" - }, - { - "name": "comptroller_", - "type": "address" - }, - { - "name": "interestRateModel_", - "type": "address" - }, - { - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "name": "name_", - "type": "string" - }, - { - "name": "symbol_", - "type": "string" - }, - { - "name": "decimals_", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor", - "signature": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event", - "signature": "0x875352fb3fadeb8c0be7cbbe8ff761b308fa7033470cd0287f02f3436fd76cb9" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event", - "signature": "0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event", - "signature": "0xe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a929" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event", - "signature": "0x13ed6866d4e1ee6da46f845c46d7e54120883d75c5ea9a2dacc1c4ca8984ab80" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event", - "signature": "0x1a2a22cb034d26d1854bdc6666a5b91fe25efbbb5dcad3b0355478d6f5c362a1" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "name": "cTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event", - "signature": "0x298637f684da70674f26509b10f07ec2fbc77a335ab1e7d6215a4b2484d8bb52" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event", - "signature": "0xca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event", - "signature": "0xf9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event", - "signature": "0x7ac369dbd14fa5ea3f473ed67cc9d598964a77501540ba6751eb0b3decf5870d" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event", - "signature": "0xedffc32e068c7c95dfd4bdfd5c4d939a084d6b11c4199eac8436ed234d72f926" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event", - "signature": "0xaaa68312e2ea9d50e16af5068410ab56e1a1fd06037b1a35664812c30f821460" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event", - "signature": "0x3bad0c59cf2f06e7314077049f48a93578cd16f5ef92329f1dab1420a99c177e" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event", - "signature": "0x45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa0" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "from", - "type": "address" - }, - { - "indexed": true, - "name": "to", - "type": "address" - }, - { - "indexed": false, - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event", - "signature": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event", - "signature": "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925" - } + inputs: [ + { internalType: "uint256", name: "_pid", type: "uint256" }, + { internalType: "uint256", name: "_amount", type: "uint256" }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, ]; module.exports = { @@ -11367,4 +15865,7 @@ module.exports = { cUSDTContract, cDAIContract, cUSDCContract, + xDVGABIContract, + DVGABIContract, + daoStakeStrategyContract, }; diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 0162fe4..8e19035 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -31,38 +31,38 @@ module.exports.dev = () => { // yearn = rinkeby const testContracts = { earn: { - 'yUSDT': { - address: '0x2ad9f8d4c24652ea9f8a954f7e1fdb50a3be1dfd', + yUSDT: { + address: "0x2ad9f8d4c24652ea9f8a954f7e1fdb50a3be1dfd", abi: abi.earnUSDTABIContract, }, - 'yUSDC': { - address: '0x2200a7e736821f5915ed3c40e7088a7e56dea64a', + yUSDC: { + address: "0x2200a7e736821f5915ed3c40e7088a7e56dea64a", abi: abi.earnUSDCABIContract, }, - 'yDAI': { - address: '0x690bcadb0d5633766510be078b97796d90acc7d8', + yDAI: { + address: "0x690bcadb0d5633766510be078b97796d90acc7d8", abi: abi.earnDAIABIContract, }, - 'yTUSD': { - address: '0x6c45ba691a8f587e3fd7f17c7adefce8dfa452aa', + yTUSD: { + address: "0x6c45ba691a8f587e3fd7f17c7adefce8dfa452aa", abi: abi.earnTUSDABIContract, }, }, vault: { - 'yUSDT': { - address: '0xa5c53c76729e92630a2a3c549215110a330c902d', + yUSDT: { + address: "0xa5c53c76729e92630a2a3c549215110a330c902d", abi: config.vaultContractV2ABI, }, - 'yUSDC': { - address: '0xabdb489ded91b6646fadc8eeb0ca82ea1d526182', + yUSDC: { + address: "0xabdb489ded91b6646fadc8eeb0ca82ea1d526182", abi: config.vaultContractABI, }, - 'yDAI': { - address: '0x5c2eea0a960cc1f604bf3c35a52ca2273f12e67e', + yDAI: { + address: "0x5c2eea0a960cc1f604bf3c35a52ca2273f12e67e", abi: config.vaultContractV2ABI, }, - 'yTUSD': { - address: '0xa8564f8d255c33175d4882e55f1a6d19e7a7d351', + yTUSD: { + address: "0xa8564f8d255c33175d4882e55f1a6d19e7a7d351", abi: config.vaultContractV2ABI, }, }, @@ -81,34 +81,34 @@ const testContracts = { }, }, farmer: { - 'yUSDT': { - address: '0x6B150E9BD70E216775c8b73270E64e870a3110c1', + yUSDT: { + address: "0x6B150E9BD70E216775c8b73270E64e870a3110c1", abi: abi.vaultUSDTABIContract, - strategyAddress: '0x31324c1c0bb6b4b6f8102acb8346b065307926fa', + strategyAddress: "0x31324c1c0bb6b4b6f8102acb8346b065307926fa", strategyABI: abi.yearnUSDTABIContract, contractType: "yearn", tokenId: "tether", }, - 'yUSDC': { - address: '0x6E15e283dc430eca010Ade8b11b5B377902d6e56', + yUSDC: { + address: "0x6E15e283dc430eca010Ade8b11b5B377902d6e56", abi: abi.vaultUSDCABIContract, - strategyAddress: '0xe77ad5e2c4e7143fdbac6a4dde891727fc395c75', + strategyAddress: "0xe77ad5e2c4e7143fdbac6a4dde891727fc395c75", strategyABI: abi.yearnUSDCABIContract, contractType: "yearn", tokenId: "usd-coin", }, - 'yDAI': { - address: '0x2428bFD238a3632552B343297c504F60283009eD', + yDAI: { + address: "0x2428bFD238a3632552B343297c504F60283009eD", abi: abi.vaultDAIABIContract, - strategyAddress: '0x8615dfb5b53e9ddb3751fbc3fc59512d4aba9a22', + strategyAddress: "0x8615dfb5b53e9ddb3751fbc3fc59512d4aba9a22", strategyABI: abi.yearnDAIABIContract, contractType: "yearn", tokenId: "dai", }, - 'yTUSD': { - address: '0xEcCb98c36bfc8c49c6065d1cD90bcf1c6F02D4AD', + yTUSD: { + address: "0xEcCb98c36bfc8c49c6065d1cD90bcf1c6F02D4AD", abi: abi.vaultTUSDABIContract, - strategyAddress: '0xf64674cfc6597d597275144a1a746dad564b0fcd', + strategyAddress: "0xf64674cfc6597d597275144a1a746dad564b0fcd", strategyABI: abi.yearnTUSDABIContract, contractType: "yearn", tokenId: "true-usd", @@ -138,6 +138,22 @@ const testContracts = { tokenId: "dai", }, }, + vipDVG: { + xDVG: { + address: "0x3aa8e8B6D3562a1E7aCB0dddD02b27896C00c424", + abi: abi.xDVGABIContract, + contractType: "vipDVG", + tokenId: "xDVG", + }, + }, + DVG: { + DVG: { + address: "0xea9726eFc9831EF0499fD4Db4Ab143F15a797673", + abi: abi.DVGABIContract, + contractType: "DVG", + tokenId: "DVG", + }, + }, }; const mainContracts = { @@ -249,6 +265,22 @@ const mainContracts = { abi: abi.cDAIContract, }, }, + vipDVG: { + xDVG: { + address: "", // TODO: Update mainnet address + abi: abi.xDVGABIContract, + contractType: "vipDVG", + tokenId: "xDVG", + }, + }, + DVG: { + DVG: { + address: "", // TODO: Update mainnet address + abi: abi.xDVGABIContract, + contractType: "vipDVG", + tokenId: "xDVG", + }, + }, }; const devEarnContract = "0xdb12e805d004698fc58f6e4fbdd876268df2dffe"; diff --git a/docker-compose.yml b/docker-compose.yml index d3cb66f..5227595 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,22 +1,22 @@ -version: '3.6' +version: "3.6" services: database: image: mongo - container_name: 'database' - command: [--auth] + container_name: "database" + # command: [--auth] restart: always - ports: - - '27017:27017' - volumes: - - 'mongodata:/data/db' - networks: + ports: + - "27017:27017" + volumes: + - "mongodata:/data/db" + networks: - backend api: - container_name: 'api' + container_name: "api" restart: always build: context: . - env_file: + env_file: - .env ports: - "8080:8080" @@ -25,10 +25,10 @@ services: - "./services:/api/services:ro" - "./utils:/api/utils:ro" - "./models:/api/models:ro" - networks: + networks: - backend -volumes: +volumes: mongodata: -networks: - backend: +networks: + backend: driver: bridge diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index 60d7ec2..ada8bd4 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -6,14 +6,10 @@ const CoinGecko = require("coingecko-api"); const CoinGeckoClient = new CoinGecko(); const archiveNodeUrl = process.env.ARCHIVENODE_ENDPOINT; const web3Url = process.env.WEB3_ENDPOINT; -const infuraMainnetUrl = - `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`; -const infuraKovanUrl = - `https://kovan.infura.io/v3/${process.env.INFURA_API_KEY}`; -const infuraRinkebyUrl = - `https://rinkeby.infura.io/v3/${process.env.INFURA_API_KEY}`; -const infuraRopstenUrl = - `https://ropsten.infura.io/v3/${process.env.INFURA_API_KEY}`; +const infuraMainnetUrl = `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`; +const infuraKovanUrl = `https://kovan.infura.io/v3/${process.env.INFURA_API_KEY}`; +const infuraRinkebyUrl = `https://rinkeby.infura.io/v3/${process.env.INFURA_API_KEY}`; +const infuraRopstenUrl = `https://ropsten.infura.io/v3/${process.env.INFURA_API_KEY}`; const archiveNodeWeb3 = new Web3(archiveNodeUrl); const infuraWeb3 = new Web3(web3Url); @@ -25,6 +21,7 @@ const { testContracts, mainContracts, } = require("../../../config/serverless/domain"); +const e = require("cors"); const getDecimals = async (contract) => { try { @@ -49,9 +46,38 @@ const getPoolAmount = async (contract) => { } }; -const getContract = (vault) => { +const getBalance = async (contract, address) => { + try { + let balanceOf = await contract.methods.balanceOf(address).call(); + return balanceOf; + } catch (err) { + // Catch error + console.log(err); + } +}; + +const getTotalSupply = async (contract) => { + try { + let totalSupply = await contract.methods.totalSupply().call(); + return totalSupply; + } catch (err) { + // Catch error + console.log(err); + } +}; + +const getContract = async (vault) => { const { strategyABI, strategyAddress } = vault; - const contract = new archiveNodeWeb3.eth.Contract(strategyABI, strategyAddress); + const contract = new archiveNodeWeb3.eth.Contract( + strategyABI, + strategyAddress + ); + return contract; +}; + +const getTokenContract = async (vault) => { + const { abi, address } = vault; + const contract = new archiveNodeWeb3.eth.Contract(abi, address); return contract; }; @@ -66,12 +92,41 @@ const getTokenPrice = async (coingecko_token_id) => { ids: coingecko_token_id, vs_currencies: ["usd"], }); + console.log(data); + console.log(Object.keys(data.data).length); + if (Object.keys(data.data).length != 0) { + console.log("Data", coingecko_token_id); + return data.data[coingecko_token_id]["usd"]; + } else { + console.log("No Data from CoinGecko for", coingecko_token_id); + return 1; + } } catch (err) { - // Catch error + // Catch error, Default Value = 1 console.log(err); } +}; + +const getxDVGPrice = async () => { + // TODO: Apply xDVG Price formula + // xDVG price = DVG amount of xDVG SC * DVG price / xDVG amount + const contracts = + process.env.PRODUCTION != null && process.env.PRODUCTION != "" + ? mainContracts + : testContracts; + + const DVGcontract = await getTokenContract(contracts.DVG.DVG); + const xDVGcontract = await getTokenContract(contracts.vipDVG.xDVG); + const amountDVG = await getBalance( + DVGcontract, + contracts.vipDVG.xDVG.address + ); + const amountxDVG = await getTotalSupply(xDVGcontract); + const priceDVG = await getTokenPrice(contracts.DVG.DVG.tokenId); - return data.data[coingecko_token_id]["usd"]; + const pricexDVG = amountxDVG == 0 ? 1 : (amountDVG * priceDVG) / amountxDVG; + console.log("Price of xDVG", pricexDVG); + return pricexDVG; }; /** @@ -81,7 +136,7 @@ const getTokenPrice = async (coingecko_token_id) => { const getTVL = async (vault) => { const { tokenId } = vault; let tvl; - const contract = getContract(vault); + const contract = await getContract(vault); const poolAmount = await getPoolAmount(contract); const decimals = await getDecimals(contract); const tokenPrice = await getTokenPrice(tokenId); @@ -90,29 +145,50 @@ const getTVL = async (vault) => { return tvl; }; +/** + * Get TVL of xDVG. + * TVL = totalSupply * xDVG Price + */ +const getTVLxDVG = async (vault) => { + const { tokenId } = vault; + let tvl; + const contract = await getTokenContract(vault); + const totalSupply = await getTotalSupply(contract); + const decimals = await getDecimals(contract); + const tokenPrice = await getxDVGPrice(tokenId); // Not implemented yet + + tvl = (totalSupply / 10 ** decimals) * tokenPrice; + console.log("TVL xDVG", tvl); + return tvl; +}; + // Get and Save all TVL of all Vaults -const getAllTVL = await = async () => { +const getAllTVL = async () => { let vaults = process.env.PRODUCTION != null && process.env.PRODUCTION != "" ? mainContracts - : testContracts; + : testContracts; let tvls = Array(); for (vault in vaults.farmer) { let _vault = vaults.farmer[vault]; let tvl = await getTVL(_vault); tvls.push(tvl); - await saveTVL(vault, tvl); } + let _vault = vaults.vipDVG.xDVG; + let tvl = await getTVLxDVG(_vault); + tvls.push(tvl); + await saveTVL("xDVG", tvl); + return tvls; }; // Get Total TVL const getTotalTVL = async (tvls) => { - let totalTVL - try{ + let totalTVL; + try { totalTVL = _.sum(tvls); } catch (err) { // Catch error @@ -137,13 +213,14 @@ const saveTVL = async (name, tvl) => { tvl: tvl, }) .catch((err) => console.log("err", err)); + console.log("saved xdvg tvl", tvl); }; const getVaults = () => { return process.env.PRODUCTION != null && process.env.PRODUCTION != "" - ? mainContracts - : testContracts; -} + ? mainContracts + : testContracts; +}; // Save All TVLs to database module.exports.saveAllTVLhandler = async () => { @@ -155,7 +232,7 @@ module.exports.saveAllTVLhandler = async () => { // Read from DB module.exports.getTotalTVLhandle = async () => { // Get and save all TVL - const totalTvl = await db.getTotalTVL({limit: 1}) + const totalTvl = await db.getTotalTVL({ limit: 1 }); res.status(200).json({ message: "Total TVL", @@ -174,7 +251,7 @@ module.exports.getTVLhandle = async (req, res) => { }); } - const result = await db.getTVL(req.params.farmer + "_tvl", {limit: 1}); + const result = await db.getTVL(req.params.farmer + "_tvl", { limit: 1 }); if (result) { res.status(200).json({ message: `TVL for ${req.params.farmer}`, From 04de7fb6aaad35277440a2b5180a53049ca6a0ad Mon Sep 17 00:00:00 2001 From: 2manslkh Date: Fri, 21 May 2021 12:02:14 +0800 Subject: [PATCH 048/254] Add xDVG TVL --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 5227595..0873532 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ services: database: image: mongo container_name: "database" - # command: [--auth] + command: [--auth] restart: always ports: - "27017:27017" From 6ef52fc222808a39072a5b2da72d02ff1385ca5f Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Fri, 21 May 2021 19:21:14 +0800 Subject: [PATCH 049/254] add command --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 850f36a..d3cb66f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ services: database: image: mongo container_name: 'database' - # command: [--auth] + command: [--auth] restart: always ports: - '27017:27017' From 7c904a9ac8b106a0b46304f58980aa7617c66c37 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Sat, 22 May 2021 11:57:25 +0800 Subject: [PATCH 050/254] Commit for DAOstake. --- app.js | 3 + config/abi.js | 719 +++++++++++++++++++++++++- config/serverless/domain.js | 8 +- scripts/initial.js | 64 ++- services/staking/dao-stake/handler.js | 237 +++++++++ swagger.json | 12 + 6 files changed, 1035 insertions(+), 8 deletions(-) create mode 100644 services/staking/dao-stake/handler.js diff --git a/app.js b/app.js index daeb87a..49e4de9 100644 --- a/app.js +++ b/app.js @@ -10,6 +10,7 @@ const vaultCategory = require('./services/vaults/category/handler'); const stakeVIP = require('./services/staking/xdvg/handler'); const stakePool = require('./services/staking/handler'); const stakeXDvg = require('./services/staking/vipdvg/handler'); +const stakeDaoStakes = require('./services/staking/dao-stake/handler'); const app = express(); const cors = require("cors"); const port = process.env.PORT || 8080; @@ -67,6 +68,8 @@ async function init() { ); app.get("/staking/get-xdvg-stake/:amount", (req, res) => stakeXDvg.getxDVGStake(req, res)); + app.get("/staking/get-dao-stakes", (req, res) => stakeDaoStakes.getDaoStake(req, res)); + app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument)); app.listen(port, () => console.log(`Listening on ${port}`)); diff --git a/config/abi.js b/config/abi.js index c5eca33..27ae201 100644 --- a/config/abi.js +++ b/config/abi.js @@ -12359,6 +12359,722 @@ const dvgContract = [ } ]; +const daoStakeContract = [ + { + "inputs": [ + { + "internalType": "address", + "name": "_treasuryWalletAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "_communityWalletAddr", + "type": "address" + }, + { + "internalType": "contract DVGToken", + "name": "_dvg", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "lpTokenAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "poolWeight", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + } + ], + "name": "AddPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "poolId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "poolId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EmergencyWithdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract DVGToken", + "name": "dvg", + "type": "address" + } + ], + "name": "SetDVG", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "poolId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "poolWeight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalPoolWeight", + "type": "uint256" + } + ], + "name": "SetPoolWeight", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "treasuryWalletAddr", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "communityWalletAddr", + "type": "address" + } + ], + "name": "SetWalletAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "TransferDVGOwnership", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "poolId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalDVG", + "type": "uint256" + } + ], + "name": "UpdatePool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "poolId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "BLOCK_PER_PERIOD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COMMUNITY_WALLET_PERCENT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "END_BLOCK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PERIOD_AMOUNT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "POOL_PERCENT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "START_BLOCK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "TREASURY_WALLET_PERCENT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_lpTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_poolWeight", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "addPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "communityWalletAddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "dvg", + "outputs": [ + { + "internalType": "contract DVGToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_from", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_to", + "type": "uint256" + } + ], + "name": "getMultiplier", + "outputs": [ + { + "internalType": "uint256", + "name": "multiplier", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "massUpdatePools", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "pendingDVG", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "periodDVGPerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "pool", + "outputs": [ + { + "internalType": "address", + "name": "lpTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "poolWeight", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accDVGPerLP", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract DVGToken", + "name": "_dvg", + "type": "address" + } + ], + "name": "setDVG", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_poolWeight", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "setPoolWeight", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_treasuryWalletAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "_communityWalletAddr", + "type": "address" + } + ], + "name": "setWalletAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "totalPoolWeight", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferDVGOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryWalletAddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "updatePool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "user", + "outputs": [ + { + "internalType": "uint256", + "name": "lpAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "finishedDVG", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; + module.exports = { earnUSDTABIContract, earnUSDCABIContract, @@ -12382,5 +13098,6 @@ module.exports = { cDAIContract, cUSDCContract, vipDVGContract, - dvgContract + dvgContract, + daoStakeContract }; diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 46fb5cc..2112df8 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -146,7 +146,13 @@ const testContracts = { address: "0xea9726eFc9831EF0499fD4Db4Ab143F15a797673", abi: abi.dvgContract, tokenId: "daoventures" - } + }, + daoStake: { + address: "0x949798E1DC431338948653e1274E30C33Db42Ad8", + abi: abi.daoStakeContract, + startBlock: 24824850, + poolPercent: 0.51 + }, }; const mainContracts = { diff --git a/scripts/initial.js b/scripts/initial.js index 874ca07..7abc5ce 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -25,9 +25,61 @@ db.xdvg_token.insert({ contract_address: '0x07de306FF27a2B630B1141956844eB1552B956B5' }); -db.stake_pool.insert({ - name: 'USDT', - contract_address: '0x07de306FF27a2B630B1141956844eB1552B956B5', - status: 'A', - pid: '0' -}); \ No newline at end of file +db.stake_pool.insertMany([ + { + name: 'USDT', + contract_address: '0x6B150E9BD70E216775c8b73270E64e870a3110c1', + strategy_address: '0x31324c1c0bb6b4b6f8102acb8346b065307926fa', + status: 'A', + pid: '2', + category: 'advance' + }, + { + name: 'USDC', + contract_address: '0x6E15e283dc430eca010Ade8b11b5B377902d6e56', + strategy_address: '0xe77ad5e2c4e7143fdbac6a4dde891727fc395c75', + status: 'A', + pid: '3', + category: 'advance' + }, + { + name: 'DAI', + contract_address: '0x2428bFD238a3632552B343297c504F60283009eD', + strategy_address: '0x8615dfb5b53e9ddb3751fbc3fc59512d4aba9a22', + status: 'A', + pid: '4', + category: 'advance' + }, + { + name: 'TUSD', + contract_address: '0xEcCb98c36bfc8c49c6065d1cD90bcf1c6F02D4AD', + strategy_address: '0xf64674cfc6597d597275144a1a746dad564b0fcd', + status: 'A', + pid: '5', + category: 'advance' + }, + { + name: 'USDT', + contract_address: '0x5d102e0bdf2037899e1ff2e8cc50987108533c52', + strategy_address: "0xa5c956aef6a21c986665de9cf889ef36613c7d5e", + status: 'A', + pid: '6', + category: 'basic' + }, + { + name: 'USDC', + contract_address: '0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e', + strategy_address: "0x3add8a9d3176c4b30dddeeababf9ca5cc3d49944", + status: 'A', + pid: '7', + category: 'basic' + }, + { + name: 'DAI', + contract_address: '0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d', + strategy_address: "0xb951976a7d79fd8a589a7ca9753641380f5c1ab4", + status: 'A', + pid: '8', + category: 'basic' + } +]); \ No newline at end of file diff --git a/services/staking/dao-stake/handler.js b/services/staking/dao-stake/handler.js new file mode 100644 index 0000000..3b72a1c --- /dev/null +++ b/services/staking/dao-stake/handler.js @@ -0,0 +1,237 @@ +const db = require ("../../../models/stake-pool.model"); +const { testContracts, mainContracts } = require("../../../config/serverless/domain"); + +const _ = require("lodash"); +const delay = require("delay"); +const fetch = require("node-fetch"); + +const CoinGecko = require("coingecko-api"); +const CoinGeckoClient = new CoinGecko(); + +const Web3 = require("web3"); +const archiveNodeUrl = process.env.ARCHIVENODE_ENDPOINT; +const archiveNodeWeb3 = new Web3(archiveNodeUrl); + +const delayTime = 500; +let contracts = []; + +// Get token price +const getTokenPrice = async () => { + const tokens = [ + { name: "USDT", tokenId: "tether", price: 0.00, }, + { name: "USDC", tokenId: "usd-coin", price: 0.00 }, + { name: "DAI", tokenId: "dai", price: 0.00 }, + { name: "TUSD", tokenId: "true-usd", price: 0.00 }, + { name: "DVG", tokenId: "daoventures", price: 0.00 } + ]; + + const tokenIds = tokens.map(t => t.tokenId); + + try { + data = await CoinGeckoClient.simple.price({ + ids: tokenIds, + vs_currencies: ["usd"], + }); + + // Append price to each token + if(data.code == 200 && data.message == 'OK' && data.data) { + const result = data.data; + + tokens.map(t => { + t.price = result[t.tokenId]["usd"]; + }) + } + + return tokens; + } catch (err) { + console.log("Error in getTokenPrice(): ", err); + } + return; +} + +const getContractInfo = (name) => { + contracts = process.env.PRODUCTION != null && process.env.PRODUCTION != "" + ? mainContracts : testContracts; + return contracts[name]; +} + +const getContract = async (contractInfo) => { + const { abi, address } = contractInfo; + const contract = new archiveNodeWeb3.eth.Contract(abi, address); + return contract; +} + +const fetchContractABI = async (address) => { + let network = ''; + + if (process.env.PRODUCTION == null || process.env.PRODUCTION == "") { + network = '-kovan'; + } + const url = `https://api${network}.etherscan.io/api?module=contract&action=getabi&address=${address}&apikey=${process.env.ETHERSCAN_API_KEY}`; + const resp = await fetch(url).then((res) => res.json()); + const metadata = resp.result; + + await delay(delayTime); + return metadata; +} + +// DAOstake totalPoolWeight() +const getDaoStakeTotalPoolWeight = async (daoStakeContract) => { + try { + let totalPoolWeight = await daoStakeContract.methods.totalPoolWeight().call(); + totalPoolWeight = totalPoolWeight / (10 ** 15); + return totalPoolWeight; + } catch (err) { + console.log("Error in getDaoStakeTotalPoolWeight(): ", err); + } +} + +// Get token balanceOf(DAOstake) +const getLPTokenBalanceOfDAOStake = async (contract, daoStakeAddress) => { + try { + const lpTokenBalOfDaoStake = await contract.methods.balanceOf(daoStakeAddress).call(); + return lpTokenBalOfDaoStake; + } catch (err) { + console.log("Error in getLPTokenBalanceOfDAOStake(): ", err); + } +} + +// getMultiplier() from DAOstake contract +const getMultiplier = async(start, current, daoStakeContract) => { + try { + let multiplier = await daoStakeContract.methods.getMultiplier(start, current).call(); + multiplier = multiplier / (10 ** 18); + return multiplier; + } catch (err) { + console.log("Error in getMultiplier(): ", err); + } +} + +// getPool() from DAOstake contract +const getPoolFromDaoStake = async(pid, daoStakeContract) => { + try { + const pool = await daoStakeContract.methods.pool(pid).call(); + return pool; + } catch (err) { + console.log("Error in getPoolFromDaoStake(): ", err); + } +} + +// getTotalSupply() from token contract +const getTokenTotalSupply = async (contract) => { + try { + const totalSupply = await contract.methods.totalSupply().call(); + return totalSupply; + } catch (err) { + console.log("Error in getTokenTotalSupply(): ", err); + } +} + +// Calculate APR and TVL for pool +const poolCalculation = async(daoStake, poolInfo, tokensPrice) => { + // Extract data from daoStake param + const { startBlock, poolPercent, totalPoolWeight , daoStakeContract } = daoStake; + + // Extract data from poolInfo param + const { poolContract, pool } = poolInfo; + + // Extract data from tokensPrice param + const { tokens, dvgPrice } = tokensPrice; + + // Pass in DAOstake contract, pool's pid to invoke pool() in DAOstake contract + const getPool = await getPoolFromDaoStake(pool.pid, daoStakeContract); + const { lastRewardBlock, poolWeight } = getPool; + + // Pass in pool's contract, DAOstake address get balanceOf() in pool's contract + const tokenBalOfDAOStake = await getLPTokenBalanceOfDAOStake(poolContract, daoStakeContract._address); + + // Pass in start block, last reward block to invoke getMultiplier() in DAOstake contract + const multiplier = await getMultiplier(startBlock,lastRewardBlock, daoStakeContract); + + // Find pool token price + const poolTokenPrice = tokens.find(t => t.name === pool.name).price; + + // APR Calculation + const apr = (multiplier * poolPercent * dvgPrice * (poolWeight / (10 ** 15))) / + (totalPoolWeight * tokenBalOfDAOStake * poolTokenPrice); + console.log("apr for " + pool.pid + ": " + apr); + + // TVL Calculation + const totalSupply = await getTokenTotalSupply(poolContract); + const tvl = totalSupply * poolTokenPrice; + console.log("tvl for " + pool.pid + ": " + tvl); + + Object.assign(pool, { apr, tvl }); + + return pool; +} + +module.exports.getDaoStake = async(req, res) => { + try { + const result = []; + + // Find price for each token + const tokens = await getTokenPrice(); + // Get DVG price + const dvgPrice = tokens.find(t => t.name == 'DVG').price; + const tokensPrice = { tokens, dvgPrice }; + + // Get DAOstake + const daoStakeContractInfo = getContractInfo("daoStake"); + const daoStakeContract = await getContract(daoStakeContractInfo); + const totalPoolWeight = await getDaoStakeTotalPoolWeight(daoStakeContract); + const daoStake = { + daoStakeContract: daoStakeContract, + totalPoolWeight, + startBlock: daoStakeContractInfo.startBlock, + poolPercent: daoStakeContractInfo.poolPercent + }; + + // Find all pools + const pools = await db.findAll(); + const poolSize = _.size(pools); + + // Find pool contract and contract abi value pair + const poolAbiContractMap = new Map(); + Object.values(contracts.farmer).map(v => { + poolAbiContractMap.set(v.address, v.abi); + }); + + for (index = 0 ; index < poolSize; index ++) { + // Fetch abi of pool contract + const poolContractInfo = { + address: pools[index].contract_address, + abi: poolAbiContractMap.get(pools[index].contract_address) + }; + + // Get pool contract + const poolContract = await getContract(poolContractInfo); + let poolInfo = { + pool: pools[index], + poolContract, + } + + const pool = await poolCalculation(daoStake, poolInfo, tokensPrice); + + delete pools[index].strategy_address; + delete pools[index]._id; + + result.push(pool); + } + + res.status(200).json({ + message: "Successful response", + body: { + pools: result + } + }); + + } catch (err) { + console.log(err); + res.status(200).json({ + message: err.messge, + body: null + }) + } + return; +} \ No newline at end of file diff --git a/swagger.json b/swagger.json index 7a398cc..5a9aef1 100644 --- a/swagger.json +++ b/swagger.json @@ -212,6 +212,18 @@ ], "responses": {} } + }, + "/staking/get-dao-stakes" :{ + "get": { + "tags": [ + "Stake" + ], + "description": "Get DAOstake", + "produces": [ + "application/json" + ], + "responses": {} + } } } } \ No newline at end of file From 9bc7d3333b2bd319a7f6cfcf3b275863d1c275ff Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Sat, 22 May 2021 13:40:45 +0800 Subject: [PATCH 051/254] Update README.md --- README.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 344c972..91ac371 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Yearn API intentions are as follows: ## Interact -https://test.daoventures.co/api/api-docs/ +[https://test.daoventures.co/api/api-docs/] ## Setup Instructions @@ -20,8 +20,8 @@ https://test.daoventures.co/api/api-docs/ - Install docker - Execute terminal commands -``` -git clone https://github.com/daoventures/yearn-api.git +```cmd +git clone [https://github.com/daoventures/yearn-api.git] cd yearn-api cp .env.example .env docker-compose up @@ -48,5 +48,13 @@ docker-compose up ## Stages - Currently three stages are available -- `beta` is used for beta deployments. Beta endpoint is https://beta.daoventures.co/api/ -- `test` is used for development purposes. Development endpoint is https://test.daoventures.co/api/ +- `beta` is used for beta deployments. Beta endpoint is [https://beta.daoventures.co/api/] +- `test` is used for development purposes. Development endpoint is [https://test.daoventures.co/api/] + +## Testing Locally + +Comment out the following line in docker-compose.yml + +```yml +command: [--auth] +``` From 415f16fb30cd810638673b665683cf5b2b0b5ede Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Sat, 22 May 2021 13:51:21 +0800 Subject: [PATCH 052/254] Remove _id from API Call --- models/tvl.model.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/models/tvl.model.js b/models/tvl.model.js index 460a25a..d5598d2 100644 --- a/models/tvl.model.js +++ b/models/tvl.model.js @@ -10,9 +10,19 @@ const findAll = async () => { // yUSDT, yUSDC, yDAI, yTUSD, cUSDT, cUSDC, yDAI const getTVL = async (collection, params) => { const db = mongo.getDB(); + console.log( + await db + .collection(collection) + .find() + .project({ _id: 0 }) + .sort({ $natural: -1 }) + .limit(params.limit) + .toArray() + ); return await db .collection(collection) .find() + .project({ _id: 0 }) .sort({ $natural: -1 }) .limit(params.limit) .toArray(); @@ -22,7 +32,7 @@ const getTotalTVL = async (params) => { const db = mongo.getDB(); return await db .collection("total_tvl") - .find() + .find({}, { _id: 0 }) .sort({ $natural: -1 }) .limit(params.limit) .toArray(); From beb8112814c3b4ee5cf3a543f6fd015a419faf84 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Sat, 22 May 2021 13:56:45 +0800 Subject: [PATCH 053/254] Enhancement on xDVG stake api. --- app.js | 2 +- services/staking/vipdvg/handler.js | 67 ++++++++++++------------------ swagger.json | 11 +---- 3 files changed, 28 insertions(+), 52 deletions(-) diff --git a/app.js b/app.js index 49e4de9..f498a21 100644 --- a/app.js +++ b/app.js @@ -66,7 +66,7 @@ async function init() { app.get("/staking/get-pools", (req, res) => stakePool.getPools(req, res) ); - app.get("/staking/get-xdvg-stake/:amount", (req, res) => stakeXDvg.getxDVGStake(req, res)); + app.get("/staking/get-xdvg-stake", (req, res) => stakeXDvg.getxDVGStake(req, res)); app.get("/staking/get-dao-stakes", (req, res) => stakeDaoStakes.getDaoStake(req, res)); diff --git a/services/staking/vipdvg/handler.js b/services/staking/vipdvg/handler.js index 1191988..e22d22f 100644 --- a/services/staking/vipdvg/handler.js +++ b/services/staking/vipdvg/handler.js @@ -7,17 +7,6 @@ const CoinGeckoClient = new CoinGecko(); const archiveNodeUrl = process.env.ARCHIVENODE_ENDPOINT; const archiveNodeWeb3 = new Web3(archiveNodeUrl); -let dvgContract; -let xDVGContract; - -let dvgContractInfo; -let xDVGContractInfo; - -let dvgBalanceOfxDVG = 0; -let xDVGTotalSupply = 0; -let dvgPrice = 0; -let xDVGPrice = 0; - // Get VIP DVG contract info from domain based on enviroment const getContractInfo = (name) => { const contracts = process.env.PRODUCTION != null && process.env.PRODUCTION != "" @@ -48,74 +37,70 @@ const getTokenPrice = async (coingecko_token_id) => { } // Get vipDVG's total supply -const getxDVGTotalSupply = async() => { +const getxDVGTotalSupply = async(xDVGContract) => { try { - xDVGTotalSupply = await xDVGContract.methods.totalSupply().call(); + const xDVGTotalSupply = await xDVGContract.methods.totalSupply().call(); + return xDVGTotalSupply; } catch(err) { console.log("Error in getxDVGTotalSupply(): ", err); } } // DVG's balance of vipDVG contract -const getDVGBalanceOfxDVG = async() => { +const getDVGBalanceOfxDVG = async(dvgContract, xDVGAddress) => { try { - dvgBalanceOfVipDVG = await dvgContract.methods.balanceOf(xDVGContractInfo.address).call(); + const dvgBalanceOfVipDVG = await dvgContract.methods.balanceOf(xDVGAddress).call(); + return dvgBalanceOfVipDVG; } catch (err) { console.log("Error in getDVGBalanceOfxDVG(): ", err) } } // xDVGPrice Formula : xDVG price = ( DVG amount of xDVG SC * DVG price) / xDVG amount -const getxDVGPrice = async (xDVGAmount) => { +const getxDVGPrice = async (xDVGAmount, dvgBalanceOfxDVG, dvgPrice) => { return (dvgBalanceOfxDVG * dvgPrice) / xDVGAmount; } // APR calculation Formula : (xDVG's total supply * xDVG price) / (DVG.balanceOf(xDVG) * DVG price) -const getxDVGAPR = async (xDVGAmount) => { - await getxDVGTotalSupply(); - await getDVGBalanceOfxDVG(); - dvgPrice = await getTokenPrice(dvgContractInfo.tokenId); - xDVGPrice = await getxDVGPrice(xDVGAmount); +const getxDVGAPR = async (dvgContract, xDVGContract) => { + const xDVGTotalSupply = await getxDVGTotalSupply(xDVGContract); + const dvgBalOfxDVG = await getDVGBalanceOfxDVG(dvgContract, xDVGContract._address); + + const dvgPrice = await getTokenPrice("daoventures"); + const xDVGPrice = await getxDVGPrice(xDVGTotalSupply, dvgBalOfxDVG, dvgPrice); console.log("total supply: ", xDVGTotalSupply); - console.log("balance: ", dvgBalanceOfxDVG); + console.log("balance: ", dvgBalOfxDVG); console.log("dvg price: ", dvgPrice); console.log("xDVG price", xDVGPrice); - const apr = (xDVGTotalSupply * xDVGPrice) / (dvgBalanceOfxDVG * dvgPrice); + const apr = (xDVGTotalSupply * xDVGPrice) / (dvgBalOfxDVG * dvgPrice); console.log("apr", apr); - return apr; + return { apr, dvgPrice }; } module.exports.getxDVGStake = async(req, res) => { - if(req.params.amount == null || req.params.amount == "") { - res.status(200).json({ - message: "xDVG amount is empty.", - body: null - }) - } - try { // Get vipDVG contract - xDVGContractInfo = getContractInfo("vipDVG"); - xDVGContract = await getContract(xDVGContractInfo); + const xDVGContractInfo = getContractInfo("vipDVG"); + const xDVGContract = await getContract(xDVGContractInfo); // Get DVG contract - dvgContractInfo = getContractInfo("DVG"); - dvgContract = await getContract(dvgContractInfo); + const dvgContractInfo = getContractInfo("DVG"); + const dvgContract = await getContract(dvgContractInfo); - let apr = await getxDVGAPR(req.params.amount); + let result = await getxDVGAPR(dvgContract, xDVGContract); - if(!apr || isNaN(apr)) { - apr = 0.00; + if(!result.apr || isNaN(result.apr)) { + result.apr = 0.00; } - const result = { apr, dvgPrice }; - res.status(200).json({ message: 'Successful Response', - body: result + body: { + xdvg: result + } }); } catch (err) { diff --git a/swagger.json b/swagger.json index 5a9aef1..2bbd982 100644 --- a/swagger.json +++ b/swagger.json @@ -192,7 +192,7 @@ "responses": {} } }, - "/staking/get-xdvg-stake/{amount}" :{ + "/staking/get-xdvg-stake" :{ "get": { "tags": [ "Stake" @@ -201,15 +201,6 @@ "produces": [ "application/json" ], - "parameters": [ - { - "name": "amount", - "in": "path", - "description": "xDVG amount", - "required": true, - "type": "string" - } - ], "responses": {} } }, From 5db1d3171fb5fa57a65c33318fb41f47a79fa6d5 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Sat, 22 May 2021 13:57:14 +0800 Subject: [PATCH 054/254] Fixes at dao-stake handler. --- services/staking/dao-stake/handler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/staking/dao-stake/handler.js b/services/staking/dao-stake/handler.js index 3b72a1c..d8d5a42 100644 --- a/services/staking/dao-stake/handler.js +++ b/services/staking/dao-stake/handler.js @@ -213,8 +213,8 @@ module.exports.getDaoStake = async(req, res) => { const pool = await poolCalculation(daoStake, poolInfo, tokensPrice); - delete pools[index].strategy_address; - delete pools[index]._id; + delete pool.strategy_address; + delete pool._id; result.push(pool); } From a823b8258532181ac9401ed123f80414308b55c9 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Sun, 23 May 2021 11:08:19 +0800 Subject: [PATCH 055/254] correction on decimals --- services/staking/dao-stake/handler.js | 42 +++++++++++++-------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/services/staking/dao-stake/handler.js b/services/staking/dao-stake/handler.js index d8d5a42..f6f900b 100644 --- a/services/staking/dao-stake/handler.js +++ b/services/staking/dao-stake/handler.js @@ -78,8 +78,7 @@ const fetchContractABI = async (address) => { // DAOstake totalPoolWeight() const getDaoStakeTotalPoolWeight = async (daoStakeContract) => { try { - let totalPoolWeight = await daoStakeContract.methods.totalPoolWeight().call(); - totalPoolWeight = totalPoolWeight / (10 ** 15); + const totalPoolWeight = await daoStakeContract.methods.totalPoolWeight().call(); return totalPoolWeight; } catch (err) { console.log("Error in getDaoStakeTotalPoolWeight(): ", err); @@ -89,7 +88,9 @@ const getDaoStakeTotalPoolWeight = async (daoStakeContract) => { // Get token balanceOf(DAOstake) const getLPTokenBalanceOfDAOStake = async (contract, daoStakeAddress) => { try { - const lpTokenBalOfDaoStake = await contract.methods.balanceOf(daoStakeAddress).call(); + const decimals = await contract.methods.decimals().call(); + let lpTokenBalOfDaoStake = await contract.methods.balanceOf(daoStakeAddress).call(); + lpTokenBalOfDaoStake = lpTokenBalOfDaoStake * ( 10 ** decimals); return lpTokenBalOfDaoStake; } catch (err) { console.log("Error in getLPTokenBalanceOfDAOStake(): ", err); @@ -117,18 +118,10 @@ const getPoolFromDaoStake = async(pid, daoStakeContract) => { } } -// getTotalSupply() from token contract -const getTokenTotalSupply = async (contract) => { - try { - const totalSupply = await contract.methods.totalSupply().call(); - return totalSupply; - } catch (err) { - console.log("Error in getTokenTotalSupply(): ", err); - } -} - // Calculate APR and TVL for pool const poolCalculation = async(daoStake, poolInfo, tokensPrice) => { + let apr = 0; + // Extract data from daoStake param const { startBlock, poolPercent, totalPoolWeight , daoStakeContract } = daoStake; @@ -144,22 +137,29 @@ const poolCalculation = async(daoStake, poolInfo, tokensPrice) => { // Pass in pool's contract, DAOstake address get balanceOf() in pool's contract const tokenBalOfDAOStake = await getLPTokenBalanceOfDAOStake(poolContract, daoStakeContract._address); - + // Pass in start block, last reward block to invoke getMultiplier() in DAOstake contract const multiplier = await getMultiplier(startBlock,lastRewardBlock, daoStakeContract); - + // Find pool token price const poolTokenPrice = tokens.find(t => t.name === pool.name).price; + + console.log("pid: " + pool.pid); + console.log("multiplier: " + multiplier); + console.log("pool percent: " + poolPercent); + console.log("dvg price: " + dvgPrice); + console.log("pool weight: " + poolWeight); + console.log("total pool weight: "+ totalPoolWeight); + console.log("token bal of dao stake" + tokenBalOfDAOStake); + console.log("pool token price" + poolTokenPrice); // APR Calculation - const apr = (multiplier * poolPercent * dvgPrice * (poolWeight / (10 ** 15))) / + apr = (multiplier * poolPercent * dvgPrice * poolWeight) / (totalPoolWeight * tokenBalOfDAOStake * poolTokenPrice); - console.log("apr for " + pool.pid + ": " + apr); - + // TVL Calculation - const totalSupply = await getTokenTotalSupply(poolContract); - const tvl = totalSupply * poolTokenPrice; - console.log("tvl for " + pool.pid + ": " + tvl); + const tvl = tokenBalOfDAOStake * poolTokenPrice; + console.log("apr: "+ apr + ", tvl: " + tvl); Object.assign(pool, { apr, tvl }); From 00eae7da0cbf7e67452702bcaf56e79b1ceff704 Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Sun, 23 May 2021 12:07:45 +0800 Subject: [PATCH 056/254] Remove console.logs --- services/vaults/tvl/handler.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index ada8bd4..03c6cfd 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -92,13 +92,9 @@ const getTokenPrice = async (coingecko_token_id) => { ids: coingecko_token_id, vs_currencies: ["usd"], }); - console.log(data); - console.log(Object.keys(data.data).length); if (Object.keys(data.data).length != 0) { - console.log("Data", coingecko_token_id); return data.data[coingecko_token_id]["usd"]; } else { - console.log("No Data from CoinGecko for", coingecko_token_id); return 1; } } catch (err) { @@ -125,7 +121,6 @@ const getxDVGPrice = async () => { const priceDVG = await getTokenPrice(contracts.DVG.DVG.tokenId); const pricexDVG = amountxDVG == 0 ? 1 : (amountDVG * priceDVG) / amountxDVG; - console.log("Price of xDVG", pricexDVG); return pricexDVG; }; @@ -158,7 +153,6 @@ const getTVLxDVG = async (vault) => { const tokenPrice = await getxDVGPrice(tokenId); // Not implemented yet tvl = (totalSupply / 10 ** decimals) * tokenPrice; - console.log("TVL xDVG", tvl); return tvl; }; @@ -213,7 +207,6 @@ const saveTVL = async (name, tvl) => { tvl: tvl, }) .catch((err) => console.log("err", err)); - console.log("saved xdvg tvl", tvl); }; const getVaults = () => { From 2fbeacf6cc7ba1347840b18268c94ea05ad937a4 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Mon, 24 May 2021 20:54:17 +0800 Subject: [PATCH 057/254] Add pool contract address checking with farmer contract address, and pool status must be active. Add strategy address property in returned result --- services/staking/dao-stake/handler.js | 39 ++++++++++++++------------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/services/staking/dao-stake/handler.js b/services/staking/dao-stake/handler.js index f6f900b..3ab20c5 100644 --- a/services/staking/dao-stake/handler.js +++ b/services/staking/dao-stake/handler.js @@ -195,28 +195,31 @@ module.exports.getDaoStake = async(req, res) => { const poolAbiContractMap = new Map(); Object.values(contracts.farmer).map(v => { poolAbiContractMap.set(v.address, v.abi); + return v.address; }); + for (index = 0 ; index < poolSize; index ++) { - // Fetch abi of pool contract - const poolContractInfo = { - address: pools[index].contract_address, - abi: poolAbiContractMap.get(pools[index].contract_address) - }; - - // Get pool contract - const poolContract = await getContract(poolContractInfo); - let poolInfo = { - pool: pools[index], - poolContract, + if(poolAbiContractMap.has(pools[index].contract_address) && pools[index].status == 'A') { + // Fetch abi of pool contract + const poolContractInfo = { + address: pools[index].contract_address, + abi: poolAbiContractMap.get(pools[index].contract_address) + }; + + // Get pool contract + const poolContract = await getContract(poolContractInfo); + let poolInfo = { + pool: pools[index], + poolContract, + } + + const pool = await poolCalculation(daoStake, poolInfo, tokensPrice); + + delete pool._id; + + result.push(pool); } - - const pool = await poolCalculation(daoStake, poolInfo, tokensPrice); - - delete pool.strategy_address; - delete pool._id; - - result.push(pool); } res.status(200).json({ From 9c15225f96a7dab3677469ec1afb79e189dbc2e0 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Mon, 24 May 2021 20:56:12 +0800 Subject: [PATCH 058/254] Minor Fix. --- services/staking/dao-stake/handler.js | 1 - 1 file changed, 1 deletion(-) diff --git a/services/staking/dao-stake/handler.js b/services/staking/dao-stake/handler.js index 3ab20c5..ef386a1 100644 --- a/services/staking/dao-stake/handler.js +++ b/services/staking/dao-stake/handler.js @@ -195,7 +195,6 @@ module.exports.getDaoStake = async(req, res) => { const poolAbiContractMap = new Map(); Object.values(contracts.farmer).map(v => { poolAbiContractMap.set(v.address, v.abi); - return v.address; }); From 9c5d56563db942a5354de88c624b8d10fb5e9084 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Tue, 25 May 2021 16:25:03 +0800 Subject: [PATCH 059/254] Add APR Calculation for Harvest Farmer pools --- app.js | 4 +- config/abi.js | 904 ++++++++++++++++++++++++++-- services/vaults/apy/save/handler.js | 102 +++- services/vaults/apy/save/vaults.js | 30 +- 4 files changed, 956 insertions(+), 84 deletions(-) diff --git a/app.js b/app.js index ead64b0..541f5ae 100644 --- a/app.js +++ b/app.js @@ -26,7 +26,7 @@ async function init() { if (err) throw err; // jobs.saveVault(); - // jobs.saveVaultAPY(); + jobs.saveVaultAPY(); // jobs.savePricePerFullShare(); // jobs.saveHistoricalAPY(); jobs.saveHistoricalTVL(); @@ -64,7 +64,7 @@ async function init() { app.get("/staking/get-pools", (req, res) => stakePool.getPools(req, res) ); - + app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument)); app.listen(port, () => console.log(`Listening on ${port}`)); diff --git a/config/abi.js b/config/abi.js index 4b6c990..ac5fdeb 100644 --- a/config/abi.js +++ b/config/abi.js @@ -12207,7 +12207,7 @@ const hfDAOContract = [ } ]; -const hfStrategyContract = [ +const hfStrategyContract =[ { "anonymous": false, "inputs": [ @@ -12284,19 +12284,6 @@ const hfStrategyContract = [ "name": "SetTreasuryWallet", "type": "event" }, - { - "inputs": [], - "name": "DENOMINATOR", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "FARM", @@ -12345,12 +12332,12 @@ const hfStrategyContract = [ }, { "inputs": [], - "name": "communityFee", + "name": "communityWallet", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "stateMutability": "view", @@ -12358,10 +12345,10 @@ const hfStrategyContract = [ }, { "inputs": [], - "name": "communityWallet", + "name": "daoVault", "outputs": [ { - "internalType": "address", + "internalType": "contract IDAOVault2", "name": "", "type": "address" } @@ -12370,25 +12357,31 @@ const hfStrategyContract = [ "type": "function" }, { - "inputs": [], - "name": "daoVault", - "outputs": [ + "inputs": [ { - "internalType": "contract IDAOVault2", - "name": "", - "type": "address" + "internalType": "uint256", + "name": "_amount", + "type": "uint256" } ], - "stateMutability": "view", + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "deadline", + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "getCurrentBalance", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "result", "type": "uint256" } ], @@ -12396,16 +12389,16 @@ const hfStrategyContract = [ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "getPseudoPool", + "outputs": [ { "internalType": "uint256", - "name": "_amount", + "name": "pseudoPool", "type": "uint256" } ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -12482,6 +12475,13 @@ const hfStrategyContract = [ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "invest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "isVesting", @@ -12538,7 +12538,7 @@ const hfStrategyContract = [ "inputs": [ { "internalType": "uint256", - "name": "_shares", + "name": "_amount", "type": "uint256" } ], @@ -12587,19 +12587,6 @@ const hfStrategyContract = [ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_seconds", - "type": "uint256" - } - ], - "name": "setDeadline", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -12678,19 +12665,6 @@ const hfStrategyContract = [ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "treasuryFee", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "treasuryWallet", @@ -12733,13 +12707,815 @@ const hfStrategyContract = [ } ], "name": "withdraw", - "outputs": [], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "nonpayable", "type": "function" } ]; -const hfVault = [{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Invest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newStrategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"StrategyAnnounced","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newStrategy","type":"address"},{"indexed":false,"internalType":"address","name":"oldStrategy","type":"address"}],"name":"StrategyChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_strategy","type":"address"}],"name":"announceStrategyUpdate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"availableToInvestOut","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_strategy","type":"address"}],"name":"canUpdateStrategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"controller","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"holder","type":"address"}],"name":"depositFor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"doHardWork","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"finalizeStrategyUpdate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"finalizeUpgrade","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"futureStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getPricePerFullShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint8","name":"decimals","type":"uint8"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_underlying","type":"address"},{"internalType":"uint256","name":"_toInvestNumerator","type":"uint256"},{"internalType":"uint256","name":"_toInvestDenominator","type":"uint256"},{"internalType":"uint256","name":"_underlyingUnit","type":"uint256"},{"internalType":"uint256","name":"_implementationChangeDelay","type":"uint256"},{"internalType":"uint256","name":"_strategyChangeDelay","type":"uint256"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_storage","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_storage","type":"address"},{"internalType":"address","name":"_underlying","type":"address"},{"internalType":"uint256","name":"_toInvestNumerator","type":"uint256"},{"internalType":"uint256","name":"_toInvestDenominator","type":"uint256"}],"name":"initializeVault","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"nextImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"nextImplementationDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"nextImplementationTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"rebalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"impl","type":"address"}],"name":"scheduleUpgrade","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_store","type":"address"}],"name":"setStorage","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_strategy","type":"address"}],"name":"setStrategy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"numerator","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"setVaultFractionToInvest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"shouldUpgrade","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"strategy","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"strategyTimeLock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"strategyUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"underlying","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"underlyingBalanceInVault","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"underlyingBalanceWithInvestment","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"holder","type":"address"}],"name":"underlyingBalanceWithInvestmentForHolder","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"underlyingUnit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vaultFractionToInvestDenominator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vaultFractionToInvestNumerator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"numberOfShares","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}] +const hfVaultContract = [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "fromStrategy", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toStrategy", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "MigrateFunds", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldCommunityWallet", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newCommunityWallet", + "type": "address" + } + ], + "name": "SetCommunityWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldCustomNetworkFeePercentage", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newCustomNetworkFeePercentage", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldCustomNetworkFeeTier", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newCustomNetworkFeeTier", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeeTier", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeePercentage", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeePercentage", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeeTier2", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeeTier2", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeeTier2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldTreasuryWallet", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newTreasuryWallet", + "type": "address" + } + ], + "name": "SetTreasuryWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "canSetPendingStrategy", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeeTier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_vaultName", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_strategy", + "type": "address" + }, + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "invest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "migrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeeTier2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingStrategy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "refund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_communityWallet", + "type": "address" + } + ], + "name": "setCommunityWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_percentage", + "type": "uint256" + } + ], + "name": "setCustomNetworkFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_customNetworkFeeTier", + "type": "uint256" + } + ], + "name": "setCustomNetworkFeeTier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeePercentage", + "type": "uint256[]" + } + ], + "name": "setNetworkFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeeTier2", + "type": "uint256[]" + } + ], + "name": "setNetworkFeeTier2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pendingStrategy", + "type": "address" + } + ], + "name": "setPendingStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_treasuryWallet", + "type": "address" + } + ], + "name": "setTreasuryWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "strategy", + "outputs": [ + { + "internalType": "contract IStrategy2", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unlockMigrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unlockTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vaultName", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; module.exports = { earnUSDTABIContract, @@ -12765,5 +13541,5 @@ module.exports = { cUSDCContract, hfDAOContract, hfStrategyContract, - hfVault, + hfVaultContract, }; diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index ebb0389..2de82ea 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -133,16 +133,78 @@ const getApyForVault = async (vault) => { apyLoanscan: 0, compoundApy, }; + } else if (vault.isHarvest) { + // Harvest Vault + const vaultContract = new archiveNodeWeb3.eth.Contract(vault.vaultContractABI, vault.vaultContractAddress); + const strategyContract = new archiveNodeWeb3.eth.Contract(vault.strategyABI, vault.strategyContractAddress); + + // Get current price per full share + const pool = strategyContract.methods.pool().call(); + const totalSupply = vaultContract.methods.totalSupply().call(); + const currentPricePerFullShare = pool / totalSupply; + + const dataRequiredForCalculation = { + vaultContract, + strategyContract, + currentPricePerFullShare, + lastMeasurement: vault.lastMeasurement + }; + + // APR based on one day sample + Object.assign(dataRequiredForCalculation, { blockNumber: oneDayAgoBlock }); + const aprOneDaySample = await getHarvestFarmerAPR( + vaultContract, + strategyContract, + oneDayAgoBlock, + currentPricePerFullShare); + + // APR based on three day sample + Object.assign(dataRequiredForCalculation, { blockNumber: threeDaysAgoBlock }); + const aprThreeDaySample = await getHarvestFarmerAPR( + vaultContract, + strategyContract, + threeDaysAgoBlock, + currentPricePerFullShare); + + // APR based on one week sample + Object.assign(dataRequiredForCalculation, { blockNumber: oneWeekAgoBlock }); + const aprOneWeekSample = await getHarvestFarmerAPR( + vaultContract, + strategyContract, + oneWeekAgoBlock, + currentPricePerFullShare); + + // APR based on one month sample + Object.assign(dataRequiredForCalculation, { blockNumber: oneMonthAgoBlock }); + const aprOneMonthSample = await getHarvestFarmerAPR( + vaultContract, + strategyContract, + oneMonthAgoBlock, + currentPricePerFullShare); + + const aprData = { + aprOneDaySample, + aprThreeDaySample, + aprOneWeekSample, + aprOneMonthSample + } + + return { + ...aprData, + compoundApy: 0, + }; + } else { // Yearn Vault const pool = _.find(pools, { symbol }); var vaultContract; - if (vault.isHarvest) { - const envContracts = process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? mainContracts : testContracts; - vaultContract = new archiveNodeWeb3.eth.Contract(envContracts.harvest[vault.id].abi, envContracts.harvest[vault.id].address); - } else { - vaultContract = new archiveNodeWeb3.eth.Contract(abi, address); - } + + // if (vault.isHarvest) { + // const envContracts = process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? mainContracts : testContracts; + // vaultContract = new archiveNodeWeb3.eth.Contract(envContracts.harvest[vault.id].abi, envContracts.harvest[vault.id].address); + // } else {} + + vaultContract = new archiveNodeWeb3.eth.Contract(abi, address); const pricePerFullShareInception = await getPricePerFullShare( vaultContract, @@ -288,11 +350,14 @@ const readVault = async (vault) => { vaultContractAddress: address, erc20address: tokenAddress, } = vault; + console.log(`Reading vault ${vault.name}`); + if (!abi || !address) { console.log(`Vault ABI not found: ${name}`); return null; } + // const contract = new infuraWeb3.eth.Contract(abi, address); const apy = await getApyForVault(vault); @@ -308,10 +373,35 @@ const readVault = async (vault) => { timestamp: Date.now(), ...apy, }; + await saveVaultWithApy(data); return data; }; +const getHarvestFarmerAPR = async (vaultData) => { + const { + vaultContract, + strategyContract, + currentPricePerFullShare, + lastMeasurement, + blockNumber, + } = vaultData; + + let apr = 0; + + // To ensure block number happens after contract creation + if(blockNumber >= lastMeasurement) { + const pool = await strategyContract.methods.pool().call(undefined, blockNumber); + const totalSupply = await vaultContract.methods.totalSupply().call(undefined, blockNumber); + + const pricePerFullShareOfBeforeDay = pool / totalSupply; + + // APR calculation + apr = (currentPricePerFullShare - pricePerFullShareOfBeforeDay) * 100 * 365; + } + return apr; +}; + module.exports.handler = async () => { try { const oneDayAgo = moment().subtract(1, "days").valueOf(); diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 9ec5be8..08b4342 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -151,9 +151,11 @@ module.exports = [ symbol: "DAI", description: "DAI Stablecoin", vaultSymbol: "hfDAI", - erc20address: "0x5592ec0cfb4dbc12d3ab100b257153436a1f0fea", - vaultContractAddress: "0xf6cd30117e16feacaebd2bd30a6d682af6fb9844", - vaultContractABI: config.daoVaultABI, + erc20address: "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa", + vaultContractAddress: "0x0f89EE5b95d1d5cfb10F29775d816fC6D8Adb9FC", + vaultContractABI: abi.hfVaultContract, + strategyContractAddress: "0xE5331cAF0B4E15C88E878551b93df0647738Af35", + strategyABI: abi.hfStrategyContract, balance: 0, vaultBalance: 0, decimals: 18, @@ -161,7 +163,7 @@ module.exports = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 10650116, + lastMeasurement: 24943134, measurement: 1e18, price_id: "dai", isHarvest: true @@ -172,9 +174,11 @@ module.exports = [ symbol: "USDC", description: "USD//C", vaultSymbol: "hfUSDC", - erc20address: "0x4dbcdf9b62e891a7cec5a2568c3f4faf9e8abe2b", - vaultContractAddress: "0xefd426cee17809039c84da8e37951c634901e427", - vaultContractABI: config.daoVaultABI, + erc20address: "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", + vaultContractAddress: "0x54783464848b35d6fb9bba37C1dDd23aC3B1A11A", + vaultContractABI: abi.hfVaultContract, + strategyContractAddress: "0xE5331cAF0B4E15C88E878551b93df0647738Af35", + strategyABI: abi.hfStrategyContract, balance: 0, vaultBalance: 0, decimals: 18, @@ -182,7 +186,7 @@ module.exports = [ depositAll: false, withdraw: true, withdrawAll: false, - lastMeasurement: 10532708, + lastMeasurement: 24943141, measurement: 1e18, price_id: "usd-coin", isHarvest: true @@ -193,9 +197,11 @@ module.exports = [ symbol: "USDT", description: "Tether USD", vaultSymbol: "hfUSDT", - erc20address: "0xd9ba894e0097f8cc2bbc9d24d308b98e36dc6d02", - vaultContractAddress: "0xb0f92a610e83602bf5df258265dbe1561ae33e85", - vaultContractABI: config.daoVaultABI, + erc20address: "0x07de306ff27a2b630b1141956844eb1552b956b5", + vaultContractAddress: "0xb41A49De82e95dc1E028839C3440Ac97f9A7832C", + vaultContractABI: abi.hfVaultContract, + strategyContractAddress: "0x0bFA86d10A383B435748E39Cedf8852CFD2B1A9d", + strategyABI: abi.hfStrategyContract, balance: 0, vaultBalance: 0, decimals: 18, @@ -203,7 +209,7 @@ module.exports = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 10651402, + lastMeasurement: 24943148, measurement: 1e18, price_id: "tether", isHarvest: true From 16bd9a33f56089d2d8386dbfd5678794afce5c58 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Tue, 25 May 2021 18:35:14 +0800 Subject: [PATCH 060/254] Add price per full share implementation for Harvest Farmer in savePricePerFullShare cronjob. --- app.js | 4 ++-- config/serverless/domain.js | 18 +++++++++--------- services/vaults/price/handler.js | 15 +++++++++++++-- 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/app.js b/app.js index 541f5ae..2fe8b3b 100644 --- a/app.js +++ b/app.js @@ -27,7 +27,7 @@ async function init() { // jobs.saveVault(); jobs.saveVaultAPY(); - // jobs.savePricePerFullShare(); + jobs.savePricePerFullShare(); // jobs.saveHistoricalAPY(); jobs.saveHistoricalTVL(); }); @@ -64,7 +64,7 @@ async function init() { app.get("/staking/get-pools", (req, res) => stakePool.getPools(req, res) ); - + app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument)); app.listen(port, () => console.log(`Listening on ${port}`)); diff --git a/config/serverless/domain.js b/config/serverless/domain.js index ec55b19..daa5e99 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -138,25 +138,25 @@ const testContracts = { tokenId: "dai", }, 'hfDAI': { - address: '0xf6cd30117e16feacaebd2bd30a6d682af6fb9844', - abi: abi.hfDAOContract, - strategyAddress: '0xd505538106e0e4fe73e913f990688f2eafd75901', + address: '0x0f89EE5b95d1d5cfb10F29775d816fC6D8Adb9FC', + abi: abi.hfVaultContract, + strategyAddress: '0x1032E051bc71D36D82F2FDE298cee1311852Dd29', strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "dai", }, 'hfUSDC': { - address: '0xefd426cee17809039c84da8e37951c634901e427', - abi: abi.hfDAOContract, - strategyAddress: '0x3568bcd1d00db319dade2c5611c474e8f4d661d1', + address: '0x54783464848b35d6fb9bba37C1dDd23aC3B1A11A', + abi: abi.hfVaultContract, + strategyAddress: '0xE5331cAF0B4E15C88E878551b93df0647738Af35', strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "usd-coin", }, 'hfUSDT': { - address: '0xb0f92a610e83602bf5df258265dbe1561ae33e85', - abi: abi.hfDAOContract, - strategyAddress: '0x5f75141042e8ac06a6f7aecac665acad228faae1', + address: '0xb41A49De82e95dc1E028839C3440Ac97f9A7832C', + abi: abi.hfVaultContract, + strategyAddress: '0x0bFA86d10A383B435748E39Cedf8852CFD2B1A9d', strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "tether", diff --git a/services/vaults/price/handler.js b/services/vaults/price/handler.js index 93dbaaf..3f7e521 100644 --- a/services/vaults/price/handler.js +++ b/services/vaults/price/handler.js @@ -47,8 +47,19 @@ const getCurrentPrice = async () => { price: 0 }).catch((err) => console.log('err', err)); } else if (contracts.farmer[key].contractType === 'harvest') { - const contract = getContract(contracts.harvest[key].abi, contracts.harvest[key].address); - const pricePerFullShare = await getPricePerFullShare(contract); + // Get vault contract and strategy contract + const vaultContract = getContract(contracts.farmer[key].abi, contracts.farmer[key].address); + const strategyContract = getContract(contracts.farmer[key].strategyABI, contracts.farmer[key].strategyAddress); + + // Get pool + const pool = await strategyContract.methods.pool().call(); + + // Get total supply + const totalSupply = await vaultContract.methods.totalSupply().call(); + + // Calculate price per full share + const pricePerFullShare = pool / totalSupply; + await db.add(key + '_price', { earnPrice: 0, vaultPrice: 0, From 8e83604d63a9aa5ec94cce42b5cbd3ef556a6c2d Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Wed, 26 May 2021 08:20:20 +0800 Subject: [PATCH 061/254] - Added cron job and api revamp for dao-stake - Enhanced logic and calculation of APR and TVL - Change DAOstake address and naming of LP token --- app.js | 3 +- config/serverless/domain.js | 4 +- jobs/task.js | 17 ++++++++ models/stake-pool.model.js | 5 +++ scripts/initial.js | 56 +++++++++++++-------------- services/staking/dao-stake/handler.js | 54 ++++++++++++++++---------- 6 files changed, 87 insertions(+), 52 deletions(-) diff --git a/app.js b/app.js index f498a21..a97db4e 100644 --- a/app.js +++ b/app.js @@ -32,6 +32,7 @@ async function init() { jobs.savePricePerFullShare(); jobs.saveHistoricalAPY(); jobs.saveHistoricalTVL(); + jobs.saveHistoricalPools(); }); app.use(cors()); @@ -68,7 +69,7 @@ async function init() { ); app.get("/staking/get-xdvg-stake", (req, res) => stakeXDvg.getxDVGStake(req, res)); - app.get("/staking/get-dao-stakes", (req, res) => stakeDaoStakes.getDaoStake(req, res)); + app.get("/staking/get-dao-stakes", (req, res) => stakeDaoStakes.getStakePools(req, res)); app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument)); diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 2112df8..f400d2c 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -148,9 +148,9 @@ const testContracts = { tokenId: "daoventures" }, daoStake: { - address: "0x949798E1DC431338948653e1274E30C33Db42Ad8", + address: "0x2d04c8A39fe41Dc94595Df81ABDaB1dD905B38B3", abi: abi.daoStakeContract, - startBlock: 24824850, + startBlock: 25055584, poolPercent: 0.51 }, }; diff --git a/jobs/task.js b/jobs/task.js index 7679267..f363890 100644 --- a/jobs/task.js +++ b/jobs/task.js @@ -4,6 +4,7 @@ const vaultHandlerSave = require("../services/vaults/apy/save/handler"); const vaultSave = require("../services/vaults/save/handler"); const priceSave = require("../services/vaults/price/handler"); const tvlSave = require("../services/vaults/tvl/handler"); +const stakeSave = require("../services/staking/dao-stake/handler"); /** Save Vault **/ const saveVault = async () => { @@ -82,10 +83,26 @@ const saveHistoricalTVL = async () => { ); }; +/** Store Historical Stake Pools */ +const saveHistoricalPools = async () => { + await stakeSave.saveStakedPools(); + cron.schedule( + "*/5 * * * *", + async () => { + console.log("[saveStakedPools]", new Date().getTime()); + await stakeSave.saveStakedPools(); + }, + { + scheduled: true, + } + ); +}; + module.exports = { saveHistoricalTVL, saveVaultAPY, saveVault, savePricePerFullShare, saveHistoricalAPY, + saveHistoricalPools, }; diff --git a/models/stake-pool.model.js b/models/stake-pool.model.js index 2f02820..3e6e095 100644 --- a/models/stake-pool.model.js +++ b/models/stake-pool.model.js @@ -11,6 +11,11 @@ const add = async (params) => { const result = await db.collection(collection).findOne({ name: params.name }); + + Object.assign(params, { + timestamp: new Date().getTime(), + }); + if (result != null) { return await db.collection(collection).updateOne({ name: params.name diff --git a/scripts/initial.js b/scripts/initial.js index 7abc5ce..24b7775 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -27,59 +27,59 @@ db.xdvg_token.insert({ db.stake_pool.insertMany([ { - name: 'USDT', + name: 'dvmUSDT', contract_address: '0x6B150E9BD70E216775c8b73270E64e870a3110c1', - strategy_address: '0x31324c1c0bb6b4b6f8102acb8346b065307926fa', status: 'A', - pid: '2', - category: 'advance' + pid: '0', + category: 'advance', + tokenId: 'tether' }, { - name: 'USDC', + name: 'dvmUSDC', contract_address: '0x6E15e283dc430eca010Ade8b11b5B377902d6e56', - strategy_address: '0xe77ad5e2c4e7143fdbac6a4dde891727fc395c75', status: 'A', - pid: '3', - category: 'advance' + pid: '1', + category: 'advance', + tokenId: 'usd-coin' }, { - name: 'DAI', + name: 'dvmDAI', contract_address: '0x2428bFD238a3632552B343297c504F60283009eD', - strategy_address: '0x8615dfb5b53e9ddb3751fbc3fc59512d4aba9a22', status: 'A', - pid: '4', - category: 'advance' + pid: '2', + category: 'advance', + tokenId: 'dai' }, { - name: 'TUSD', + name: 'dvmTUSD', contract_address: '0xEcCb98c36bfc8c49c6065d1cD90bcf1c6F02D4AD', - strategy_address: '0xf64674cfc6597d597275144a1a746dad564b0fcd', status: 'A', - pid: '5', - category: 'advance' + pid: '3', + category: 'advance', + tokenId: 'true-usd' }, { - name: 'USDT', + name: 'dvlUSDT', contract_address: '0x5d102e0bdf2037899e1ff2e8cc50987108533c52', - strategy_address: "0xa5c956aef6a21c986665de9cf889ef36613c7d5e", status: 'A', - pid: '6', - category: 'basic' + pid: '4', + category: 'basic', + tokenId: 'tether' }, { - name: 'USDC', + name: 'dvlUSDC', contract_address: '0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e', - strategy_address: "0x3add8a9d3176c4b30dddeeababf9ca5cc3d49944", status: 'A', - pid: '7', - category: 'basic' + pid: '5', + category: 'basic', + tokenId: 'usd-coin' }, { - name: 'DAI', + name: 'dvlDAI', contract_address: '0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d', - strategy_address: "0xb951976a7d79fd8a589a7ca9753641380f5c1ab4", status: 'A', - pid: '8', - category: 'basic' + pid: '6', + category: 'basic', + tokenId: 'dai' } ]); \ No newline at end of file diff --git a/services/staking/dao-stake/handler.js b/services/staking/dao-stake/handler.js index ef386a1..719a8ec 100644 --- a/services/staking/dao-stake/handler.js +++ b/services/staking/dao-stake/handler.js @@ -18,11 +18,11 @@ let contracts = []; // Get token price const getTokenPrice = async () => { const tokens = [ - { name: "USDT", tokenId: "tether", price: 0.00, }, - { name: "USDC", tokenId: "usd-coin", price: 0.00 }, - { name: "DAI", tokenId: "dai", price: 0.00 }, - { name: "TUSD", tokenId: "true-usd", price: 0.00 }, - { name: "DVG", tokenId: "daoventures", price: 0.00 } + { tokenId: "tether", price: 0.00, }, + { tokenId: "usd-coin", price: 0.00 }, + { tokenId: "dai", price: 0.00 }, + { tokenId: "true-usd", price: 0.00 }, + { tokenId: "daoventures", price: 0.00 } ]; const tokenIds = tokens.map(t => t.tokenId); @@ -90,7 +90,7 @@ const getLPTokenBalanceOfDAOStake = async (contract, daoStakeAddress) => { try { const decimals = await contract.methods.decimals().call(); let lpTokenBalOfDaoStake = await contract.methods.balanceOf(daoStakeAddress).call(); - lpTokenBalOfDaoStake = lpTokenBalOfDaoStake * ( 10 ** decimals); + lpTokenBalOfDaoStake = lpTokenBalOfDaoStake / ( 10 ** decimals); return lpTokenBalOfDaoStake; } catch (err) { console.log("Error in getLPTokenBalanceOfDAOStake(): ", err); @@ -142,7 +142,7 @@ const poolCalculation = async(daoStake, poolInfo, tokensPrice) => { const multiplier = await getMultiplier(startBlock,lastRewardBlock, daoStakeContract); // Find pool token price - const poolTokenPrice = tokens.find(t => t.name === pool.name).price; + const poolTokenPrice = tokens.find(t => t.tokenId === pool.tokenId).price; console.log("pid: " + pool.pid); console.log("multiplier: " + multiplier); @@ -150,30 +150,28 @@ const poolCalculation = async(daoStake, poolInfo, tokensPrice) => { console.log("dvg price: " + dvgPrice); console.log("pool weight: " + poolWeight); console.log("total pool weight: "+ totalPoolWeight); - console.log("token bal of dao stake" + tokenBalOfDAOStake); - console.log("pool token price" + poolTokenPrice); + console.log("token bal of dao stake: " + tokenBalOfDAOStake); + console.log("pool token price: " + poolTokenPrice); // APR Calculation - apr = (multiplier * poolPercent * dvgPrice * poolWeight) / - (totalPoolWeight * tokenBalOfDAOStake * poolTokenPrice); + apr = (multiplier * poolPercent * dvgPrice * (poolWeight / 100)) / + ((totalPoolWeight / 100) * tokenBalOfDAOStake * poolTokenPrice); // TVL Calculation const tvl = tokenBalOfDAOStake * poolTokenPrice; console.log("apr: "+ apr + ", tvl: " + tvl); - Object.assign(pool, { apr, tvl }); + Object.assign(pool, { apr: apr === Infinity ? 0 : apr, tvl }); return pool; } -module.exports.getDaoStake = async(req, res) => { +module.exports.saveStakedPools = async() => { try { - const result = []; - // Find price for each token const tokens = await getTokenPrice(); // Get DVG price - const dvgPrice = tokens.find(t => t.name == 'DVG').price; + const dvgPrice = tokens.find(t => t.tokenId === 'daoventures').price; const tokensPrice = { tokens, dvgPrice }; // Get DAOstake @@ -216,24 +214,38 @@ module.exports.getDaoStake = async(req, res) => { const pool = await poolCalculation(daoStake, poolInfo, tokensPrice); delete pool._id; - - result.push(pool); + db.add(pool); } } + } catch (err) { + console.error(err); + } + return; +} +module.exports.getStakePools = async (req, res) => { + try { + const pools = await db.findAll(); + const result = []; + + pools + .filter((pool) => pool.status === 'A') + .forEach((pool) => { + delete pool._id; + result.push(pool); + }); + res.status(200).json({ message: "Successful response", body: { pools: result } }); - } catch (err) { - console.log(err); res.status(200).json({ message: err.messge, body: null - }) + }); } return; } \ No newline at end of file From ff4c1da4f518cecf2c76c7c1b81d425088d354c1 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Wed, 26 May 2021 09:18:18 +0800 Subject: [PATCH 062/254] Do cleanup and bug fixes --- app.js | 9 +- config/abi.js | 470 +-------------------------------- config/serverless/domain.js | 40 ++- services/vaults/tvl/handler.js | 130 ++++----- swagger.json | 2 +- 5 files changed, 74 insertions(+), 577 deletions(-) diff --git a/app.js b/app.js index 7ef7889..dc0e918 100644 --- a/app.js +++ b/app.js @@ -47,12 +47,11 @@ async function init() { app.get("/vaults/historical-apy/:contractAddress/:days", (req, res) => vaultHistoricalAPYSave.handleHistoricialAPY(req, res) ); - app.get("/vaults/tvl/:farmer", (req, res) => - vaultsTvl.getTVLhandle(req, res) - ); - app.get("/vaults/tvl/total", (req, res) => - vaultsTvl.getTotalTVLhandle(req, res) + vaultsTvl.totalHandle(req, res) + ); + app.get("/vaults/tvl/:farmer", (req, res) => + vaultsTvl.tvlHandle(req, res) ); app.get("/vaults/category", (req, res) => diff --git a/config/abi.js b/config/abi.js index 64361d0..4c73384 100644 --- a/config/abi.js +++ b/config/abi.js @@ -14824,7 +14824,7 @@ const cUSDCContract = [ }, ]; -xDVGABIContract = [ +const xDVGABIContract = [ { inputs: [ { internalType: "contract IERC20", name: "_dvg", type: "address" }, @@ -15031,7 +15031,7 @@ xDVGABIContract = [ }, ]; -DVGABIContract = [ +const DVGABIContract = [ { inputs: [ { internalType: "address", name: "_treasuryWalletAddr", type: "address" }, @@ -15378,471 +15378,6 @@ DVGABIContract = [ }, ]; -daoStakeStrategyContract = [ - { - inputs: [ - { internalType: "address", name: "_treasuryWalletAddr", type: "address" }, - { - internalType: "address", - name: "_communityWalletAddr", - type: "address", - }, - { internalType: "contract DVGToken", name: "_dvg", type: "address" }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "lpTokenAddress", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "poolWeight", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "lastRewardBlock", - type: "uint256", - }, - ], - name: "AddPool", - type: "event", - }, - { - anonymous: false, - inputs: [ - { indexed: true, internalType: "address", name: "user", type: "address" }, - { - indexed: true, - internalType: "uint256", - name: "poolId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "Deposit", - type: "event", - }, - { - anonymous: false, - inputs: [ - { indexed: true, internalType: "address", name: "user", type: "address" }, - { - indexed: true, - internalType: "uint256", - name: "poolId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "EmergencyWithdraw", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "OwnershipTransferred", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract DVGToken", - name: "dvg", - type: "address", - }, - ], - name: "SetDVG", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "poolId", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "poolWeight", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "totalPoolWeight", - type: "uint256", - }, - ], - name: "SetPoolWeight", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "treasuryWalletAddr", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "communityWalletAddr", - type: "address", - }, - ], - name: "SetWalletAddress", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "TransferDVGOwnership", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "poolId", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "lastRewardBlock", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "totalDVG", - type: "uint256", - }, - ], - name: "UpdatePool", - type: "event", - }, - { - anonymous: false, - inputs: [ - { indexed: true, internalType: "address", name: "user", type: "address" }, - { - indexed: true, - internalType: "uint256", - name: "poolId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "Withdraw", - type: "event", - }, - { - inputs: [], - name: "BLOCK_PER_PERIOD", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "COMMUNITY_WALLET_PERCENT", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "END_BLOCK", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "PERIOD_AMOUNT", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "POOL_PERCENT", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "START_BLOCK", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "TREASURY_WALLET_PERCENT", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "_lpTokenAddress", type: "address" }, - { internalType: "uint256", name: "_poolWeight", type: "uint256" }, - { internalType: "bool", name: "_withUpdate", type: "bool" }, - ], - name: "addPool", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "communityWalletAddr", - outputs: [{ internalType: "address", name: "", type: "address" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "uint256", name: "_pid", type: "uint256" }, - { internalType: "uint256", name: "_amount", type: "uint256" }, - ], - name: "deposit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "dvg", - outputs: [{ internalType: "contract DVGToken", name: "", type: "address" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" }], - name: "emergencyWithdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "uint256", name: "_from", type: "uint256" }, - { internalType: "uint256", name: "_to", type: "uint256" }, - ], - name: "getMultiplier", - outputs: [{ internalType: "uint256", name: "multiplier", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "massUpdatePools", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "owner", - outputs: [{ internalType: "address", name: "", type: "address" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "uint256", name: "_pid", type: "uint256" }, - { internalType: "address", name: "_user", type: "address" }, - ], - name: "pendingDVG", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [{ internalType: "uint256", name: "", type: "uint256" }], - name: "periodDVGPerBlock", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [{ internalType: "uint256", name: "", type: "uint256" }], - name: "pool", - outputs: [ - { internalType: "address", name: "lpTokenAddress", type: "address" }, - { internalType: "uint256", name: "poolWeight", type: "uint256" }, - { internalType: "uint256", name: "lastRewardBlock", type: "uint256" }, - { internalType: "uint256", name: "accDVGPerLP", type: "uint256" }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "poolLength", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "renounceOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "contract DVGToken", name: "_dvg", type: "address" }, - ], - name: "setDVG", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "uint256", name: "_pid", type: "uint256" }, - { internalType: "uint256", name: "_poolWeight", type: "uint256" }, - { internalType: "bool", name: "_withUpdate", type: "bool" }, - ], - name: "setPoolWeight", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "_treasuryWalletAddr", type: "address" }, - { - internalType: "address", - name: "_communityWalletAddr", - type: "address", - }, - ], - name: "setWalletAddress", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "totalPoolWeight", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [{ internalType: "address", name: "_newOwner", type: "address" }], - name: "transferDVGOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [{ internalType: "address", name: "newOwner", type: "address" }], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "treasuryWalletAddr", - outputs: [{ internalType: "address", name: "", type: "address" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" }], - name: "updatePool", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "uint256", name: "", type: "uint256" }, - { internalType: "address", name: "", type: "address" }, - ], - name: "user", - outputs: [ - { internalType: "uint256", name: "lpAmount", type: "uint256" }, - { internalType: "uint256", name: "finishedDVG", type: "uint256" }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "uint256", name: "_pid", type: "uint256" }, - { internalType: "uint256", name: "_amount", type: "uint256" }, - ], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - module.exports = { earnUSDTABIContract, earnUSDCABIContract, @@ -15867,5 +15402,4 @@ module.exports = { cUSDCContract, xDVGABIContract, DVGABIContract, - daoStakeStrategyContract, }; diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 8e19035..799d572 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -139,20 +139,16 @@ const testContracts = { }, }, vipDVG: { - xDVG: { - address: "0x3aa8e8B6D3562a1E7aCB0dddD02b27896C00c424", - abi: abi.xDVGABIContract, - contractType: "vipDVG", - tokenId: "xDVG", - }, + address: "0x3aa8e8B6D3562a1E7aCB0dddD02b27896C00c424", + abi: abi.xDVGABIContract, + contractType: "vipDVG", + tokenId: "xDVG", }, DVG: { - DVG: { - address: "0xea9726eFc9831EF0499fD4Db4Ab143F15a797673", - abi: abi.DVGABIContract, - contractType: "DVG", - tokenId: "DVG", - }, + address: "0xea9726eFc9831EF0499fD4Db4Ab143F15a797673", + abi: abi.DVGABIContract, + contractType: "DVG", + tokenId: "DVG", }, }; @@ -266,20 +262,16 @@ const mainContracts = { }, }, vipDVG: { - xDVG: { - address: "", // TODO: Update mainnet address - abi: abi.xDVGABIContract, - contractType: "vipDVG", - tokenId: "xDVG", - }, + address: "", // TODO: Update mainnet address + abi: abi.xDVGABIContract, + contractType: "vipDVG", + tokenId: "xDVG", }, DVG: { - DVG: { - address: "", // TODO: Update mainnet address - abi: abi.xDVGABIContract, - contractType: "vipDVG", - tokenId: "xDVG", - }, + address: "", // TODO: Update mainnet address + abi: abi.xDVGABIContract, + contractType: "vipDVG", + tokenId: "xDVG", }, }; diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index 03c6cfd..72590c1 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -5,23 +5,12 @@ const Web3 = require("web3"); const CoinGecko = require("coingecko-api"); const CoinGeckoClient = new CoinGecko(); const archiveNodeUrl = process.env.ARCHIVENODE_ENDPOINT; -const web3Url = process.env.WEB3_ENDPOINT; -const infuraMainnetUrl = `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`; -const infuraKovanUrl = `https://kovan.infura.io/v3/${process.env.INFURA_API_KEY}`; -const infuraRinkebyUrl = `https://rinkeby.infura.io/v3/${process.env.INFURA_API_KEY}`; -const infuraRopstenUrl = `https://ropsten.infura.io/v3/${process.env.INFURA_API_KEY}`; const archiveNodeWeb3 = new Web3(archiveNodeUrl); -const infuraWeb3 = new Web3(web3Url); -const infuraKovanWeb3 = new Web3(infuraKovanUrl); -const infuraRinkebyWeb3 = new Web3(infuraRinkebyUrl); -const infuraRopstenWeb3 = new Web3(infuraRopstenUrl); - const { testContracts, mainContracts, } = require("../../../config/serverless/domain"); -const e = require("cors"); const getDecimals = async (contract) => { try { @@ -111,14 +100,14 @@ const getxDVGPrice = async () => { ? mainContracts : testContracts; - const DVGcontract = await getTokenContract(contracts.DVG.DVG); - const xDVGcontract = await getTokenContract(contracts.vipDVG.xDVG); + const DVGcontract = await getTokenContract(contracts.DVG); + const xDVGcontract = await getTokenContract(contracts.vipDVG); const amountDVG = await getBalance( DVGcontract, - contracts.vipDVG.xDVG.address + contracts.vipDVG.address ); const amountxDVG = await getTotalSupply(xDVGcontract); - const priceDVG = await getTokenPrice(contracts.DVG.DVG.tokenId); + const priceDVG = await getTokenPrice(contracts.DVG.tokenId); const pricexDVG = amountxDVG == 0 ? 1 : (amountDVG * priceDVG) / amountxDVG; return pricexDVG; @@ -171,7 +160,7 @@ const getAllTVL = async () => { await saveTVL(vault, tvl); } - let _vault = vaults.vipDVG.xDVG; + let _vault = vaults.vipDVG; let tvl = await getTVLxDVG(_vault); tvls.push(tvl); await saveTVL("xDVG", tvl); @@ -209,12 +198,6 @@ const saveTVL = async (name, tvl) => { .catch((err) => console.log("err", err)); }; -const getVaults = () => { - return process.env.PRODUCTION != null && process.env.PRODUCTION != "" - ? mainContracts - : testContracts; -}; - // Save All TVLs to database module.exports.saveAllTVLhandler = async () => { const tvls = await getAllTVL(); @@ -222,20 +205,9 @@ module.exports.saveAllTVLhandler = async () => { await saveTotalTVL(totalTvl); }; -// Read from DB -module.exports.getTotalTVLhandle = async () => { - // Get and save all TVL - const totalTvl = await db.getTotalTVL({ limit: 1 }); - - res.status(200).json({ - message: "Total TVL", - body: totalTvl, - }); -}; - /* HANDLERS */ -module.exports.getTVLhandle = async (req, res) => { +module.exports.tvlHandle = async (req, res) => { // check if vault param is input if (req.params.farmer === null || req.params.farmer === "") { res.status(200).json({ @@ -244,57 +216,57 @@ module.exports.getTVLhandle = async (req, res) => { }); } - const result = await db.getTVL(req.params.farmer + "_tvl", { limit: 1 }); + let collection = ""; + + switch (req.params.farmer) { + case db.usdtFarmer: + collection = db.usdtFarmer; + break; + case db.usdcFarmer: + collection = db.usdcFarmer; + break; + case db.daiFarmer: + collection = db.daiFarmer; + break; + case db.tusdFarmer: + collection = db.tusdFarmer; + break; + case db.cUsdtFarmer: + collection = db.cUsdtFarmer; + break; + case db.cUsdcFarmer: + collection = db.cUsdcFarmer; + break; + case db.cDaiFarmer: + collection = db.cDaiFarmer; + break; + default: + res.status(200).json({ + message: "Invalid Farmer", + body: null, + }); + return; + } + + const result = await db.getTVL(collection, { limit: 1 }); if (result) { res.status(200).json({ message: `TVL for ${req.params.farmer}`, body: result, }); } + return; }; -module.exports.getHistoricalTVLhandle = async (req, res) => { - if (req.params.days == null || req.params.days == "") { - res.status(200).json({ - message: "Days is empty.", - body: null, - }); - } else if (req.params.farmer == null || req.params.farmer == "") { - res.status(200).json({ - message: "Farmer is empty.", - body: null, - }); - } else { - let collection = ""; - - switch (req.params.farmer) { - case db.usdtFarmer: - collection = db.usdtFarmer; - break; - case db.usdcFarmer: - collection = db.usdcFarmer; - break; - case db.daiFarmer: - collection = db.daiFarmer; - break; - case db.tusdFarmer: - collection = db.tusdFarmer; - break; - case db.cUsdtFarmer: - collection = db.cUsdtFarmer; - break; - case db.cUsdcFarmer: - collection = db.cUsdcFarmer; - break; - case db.cDaiFarmer: - collection = db.cDaiFarmer; - break; - default: - res.status(200).json({ - message: "Invalid Farmer", - body: null, - }); - return; - } - } +module.exports.totalHandle = async (req, res) => { + // Get and save all TVL + const totalTvl = await db.getTotalTVL({ limit: 1 }); + + delete totalTvl[0]._id; + + res.status(200).json({ + message: "Total TVL", + body: totalTvl, + }); + return; }; diff --git a/swagger.json b/swagger.json index 0092632..0bc0bdf 100644 --- a/swagger.json +++ b/swagger.json @@ -136,7 +136,7 @@ { "name": "farmer", "in": "path", - "description": "Vault ID", + "description": "Vault ID with '_tvl'", "required": true, "type": "string" } From aeec1189e34591ac5fff3360e5d8718f2015174a Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Wed, 26 May 2021 09:33:59 +0800 Subject: [PATCH 063/254] - resolve conflict --- config/abi.js | 717 ++++++++++++++++++++++++++++++++++++ config/serverless/domain.js | 16 +- 2 files changed, 729 insertions(+), 4 deletions(-) diff --git a/config/abi.js b/config/abi.js index 4c73384..3ae3b7b 100644 --- a/config/abi.js +++ b/config/abi.js @@ -15378,6 +15378,722 @@ const DVGABIContract = [ }, ]; +const daoStakeContract = [ + { + "inputs": [ + { + "internalType": "address", + "name": "_treasuryWalletAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "_communityWalletAddr", + "type": "address" + }, + { + "internalType": "contract DVGToken", + "name": "_dvg", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "lpTokenAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "poolWeight", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + } + ], + "name": "AddPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "poolId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "poolId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EmergencyWithdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract DVGToken", + "name": "dvg", + "type": "address" + } + ], + "name": "SetDVG", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "poolId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "poolWeight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalPoolWeight", + "type": "uint256" + } + ], + "name": "SetPoolWeight", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "treasuryWalletAddr", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "communityWalletAddr", + "type": "address" + } + ], + "name": "SetWalletAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "TransferDVGOwnership", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "poolId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalDVG", + "type": "uint256" + } + ], + "name": "UpdatePool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "poolId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "BLOCK_PER_PERIOD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COMMUNITY_WALLET_PERCENT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "END_BLOCK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PERIOD_AMOUNT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "POOL_PERCENT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "START_BLOCK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "TREASURY_WALLET_PERCENT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_lpTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_poolWeight", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "addPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "communityWalletAddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "dvg", + "outputs": [ + { + "internalType": "contract DVGToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_from", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_to", + "type": "uint256" + } + ], + "name": "getMultiplier", + "outputs": [ + { + "internalType": "uint256", + "name": "multiplier", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "massUpdatePools", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "pendingDVG", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "periodDVGPerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "pool", + "outputs": [ + { + "internalType": "address", + "name": "lpTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "poolWeight", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accDVGPerLP", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract DVGToken", + "name": "_dvg", + "type": "address" + } + ], + "name": "setDVG", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_poolWeight", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "setPoolWeight", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_treasuryWalletAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "_communityWalletAddr", + "type": "address" + } + ], + "name": "setWalletAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "totalPoolWeight", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferDVGOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryWalletAddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "updatePool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "user", + "outputs": [ + { + "internalType": "uint256", + "name": "lpAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "finishedDVG", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; + module.exports = { earnUSDTABIContract, earnUSDCABIContract, @@ -15402,4 +16118,5 @@ module.exports = { cUSDCContract, xDVGABIContract, DVGABIContract, + daoStakeContract, }; diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 799d572..e85e70c 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -141,15 +141,19 @@ const testContracts = { vipDVG: { address: "0x3aa8e8B6D3562a1E7aCB0dddD02b27896C00c424", abi: abi.xDVGABIContract, - contractType: "vipDVG", tokenId: "xDVG", }, DVG: { address: "0xea9726eFc9831EF0499fD4Db4Ab143F15a797673", abi: abi.DVGABIContract, - contractType: "DVG", tokenId: "DVG", }, + daoStake: { + address: "0x2d04c8A39fe41Dc94595Df81ABDaB1dD905B38B3", + abi: abi.daoStakeContract, + startBlock: 25055584, + poolPercent: 0.51 + }, }; const mainContracts = { @@ -264,15 +268,19 @@ const mainContracts = { vipDVG: { address: "", // TODO: Update mainnet address abi: abi.xDVGABIContract, - contractType: "vipDVG", tokenId: "xDVG", }, DVG: { address: "", // TODO: Update mainnet address abi: abi.xDVGABIContract, - contractType: "vipDVG", tokenId: "xDVG", }, + daoStake: { + address: "", // Upadte mainnet address + abi: abi.daoStakeContract, + startBlock: 25055584, // Update mainnet block + poolPercent: 0.51 + }, }; const devEarnContract = "0xdb12e805d004698fc58f6e4fbdd876268df2dffe"; From 7a3522e23168aeb5004c89044af885818c8cf8c8 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Wed, 26 May 2021 09:52:09 +0800 Subject: [PATCH 064/254] - Enhanced pool performance --- app.js | 1 + jobs/task.js | 17 +++++++++++++++++ services/staking/handler.js | 20 ++++++++++++++++++-- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index 43034e9..a1a5b3c 100644 --- a/app.js +++ b/app.js @@ -33,6 +33,7 @@ async function init() { jobs.saveHistoricalAPY(); jobs.saveHistoricalTVL(); jobs.saveHistoricalPools(); + jobs.saveABIPools(); }); app.use(cors()); diff --git a/jobs/task.js b/jobs/task.js index f363890..9301127 100644 --- a/jobs/task.js +++ b/jobs/task.js @@ -5,6 +5,7 @@ const vaultSave = require("../services/vaults/save/handler"); const priceSave = require("../services/vaults/price/handler"); const tvlSave = require("../services/vaults/tvl/handler"); const stakeSave = require("../services/staking/dao-stake/handler"); +const poolSave = require("../services/staking/handler"); /** Save Vault **/ const saveVault = async () => { @@ -98,6 +99,21 @@ const saveHistoricalPools = async () => { ); }; +/** Store Stake Pools ABI */ +const saveABIPools = async () => { + await poolSave.savePoolInfo(); + cron.schedule( + "*/5 * * * *", + async () => { + console.log("[savePoolInfo]", new Date().getTime()); + await poolSave.savePoolInfo(); + }, + { + scheduled: true, + } + ); +}; + module.exports = { saveHistoricalTVL, saveVaultAPY, @@ -105,4 +121,5 @@ module.exports = { savePricePerFullShare, saveHistoricalAPY, saveHistoricalPools, + saveABIPools, }; diff --git a/services/staking/handler.js b/services/staking/handler.js index c3aed87..549c861 100644 --- a/services/staking/handler.js +++ b/services/staking/handler.js @@ -26,14 +26,30 @@ const getPoolInfo = async (pool) => { return pool; } +module.exports.savePoolInfo = async () => { + try { + const pools = await db.findAll(); + const poolSize = _.size(pools); + for (idx = 0; idx < poolSize; idx++) { + if (pools[idx].status === 'A') { + const pool = await getPoolInfo(pools[idx]); + db.add(pool); + } + } + } catch (err) { + console.error(err.message); + } +} + module.exports.getPools = async (req, res) => { try { const pls = []; const pools = await db.findAll(); const poolSize = _.size(pools); for (idx = 0; idx < poolSize; idx++) { - const pool = await getPoolInfo(pools[idx]); - pls.push(pool); + if (pools[idx].status === 'A') { + pls.push(pools[idx]); + } } res.status(200).json({ From 868fdbcbe42e9fb8a66fd8d71f93d8c21e5ae228 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Wed, 26 May 2021 11:24:07 +0800 Subject: [PATCH 065/254] 1. Update contract address into lower case. 2. Add APR Calculation into historical handler for Harvest Farmer vault. --- app.js | 4 +- config/serverless/domain.js | 36 +++++- services/vaults/apy/save/historical-handle.js | 111 ++++++++++++++++-- 3 files changed, 136 insertions(+), 15 deletions(-) diff --git a/app.js b/app.js index 2fe8b3b..ead64b0 100644 --- a/app.js +++ b/app.js @@ -26,8 +26,8 @@ async function init() { if (err) throw err; // jobs.saveVault(); - jobs.saveVaultAPY(); - jobs.savePricePerFullShare(); + // jobs.saveVaultAPY(); + // jobs.savePricePerFullShare(); // jobs.saveHistoricalAPY(); jobs.saveHistoricalTVL(); }); diff --git a/config/serverless/domain.js b/config/serverless/domain.js index daa5e99..4dc23b2 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -138,25 +138,25 @@ const testContracts = { tokenId: "dai", }, 'hfDAI': { - address: '0x0f89EE5b95d1d5cfb10F29775d816fC6D8Adb9FC', + address: '0x0f89ee5b95d1d5cfb10f29775d816fc6d8adb9fc', abi: abi.hfVaultContract, - strategyAddress: '0x1032E051bc71D36D82F2FDE298cee1311852Dd29', + strategyAddress: '0x1032e051bc71d36d82f2fde298cee1311852dd29', strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "dai", }, 'hfUSDC': { - address: '0x54783464848b35d6fb9bba37C1dDd23aC3B1A11A', + address: '0x54783464848b35d6fb9bba37c1ddd23ac3b1a11a', abi: abi.hfVaultContract, - strategyAddress: '0xE5331cAF0B4E15C88E878551b93df0647738Af35', + strategyAddress: '0xe5331caf0b4e15c88e878551b93df0647738af35', strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "usd-coin", }, 'hfUSDT': { - address: '0xb41A49De82e95dc1E028839C3440Ac97f9A7832C', + address: '0xb41a49de82e95dc1e028839c3440ac97f9a7832c', abi: abi.hfVaultContract, - strategyAddress: '0x0bFA86d10A383B435748E39Cedf8852CFD2B1A9d', + strategyAddress: '0x0bfa86d10a383b435748e39cedf8852cfd2b1a9d', strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "tether", @@ -272,6 +272,30 @@ const mainContracts = { contractType: "compound", tokenId: "dai", }, + hfDAI: { + address: '', // TODO: Update that this to mainnet address + abi: abi.hfVaultContract, + strategyAddress: '', + strategyABI: abi.hfStrategyContract, + contractType: 'harvest', + tokenId: "dai", + }, + hfUSDC: { + address: '', // TODO: Update that this to mainnet address + abi: abi.hfVaultContract, + strategyAddress: '', + strategyABI: abi.hfStrategyContract, + contractType: 'harvest', + tokenId: "usd-coin", + }, + hfUSDT: { + address: '', // TODO: Update that this to mainnet address + abi: abi.hfVaultContract, + strategyAddress: '', + strategyABI: abi.hfStrategyContract, + contractType: 'harvest', + tokenId: "tether", + }, }, compund: { cUSDT: { diff --git a/services/vaults/apy/save/historical-handle.js b/services/vaults/apy/save/historical-handle.js index dc5e464..9b156aa 100644 --- a/services/vaults/apy/save/historical-handle.js +++ b/services/vaults/apy/save/historical-handle.js @@ -132,16 +132,75 @@ const getApyForVault = async (vault) => { apyLoanscan: 0, compoundApy, }; - } else { + } else if (vault.isHarvest) { + // Harvest Vault + const vaultContract = new archiveNodeWeb3.eth.Contract(vault.vaultContractABI, vault.vaultContractAddress); + const strategyContract = new archiveNodeWeb3.eth.Contract(vault.strategyABI, vault.strategyContractAddress); + + // Get current price per full share + const pool = strategyContract.methods.pool().call(); + const totalSupply = vaultContract.methods.totalSupply().call(); + const currentPricePerFullShare = pool / totalSupply; + + const dataRequiredForCalculation = { + vaultContract, + strategyContract, + currentPricePerFullShare, + lastMeasurement: vault.lastMeasurement + }; + + // APR based on one day sample + Object.assign(dataRequiredForCalculation, { blockNumber: oneDayAgoBlock }); + const aprOneDaySample = await getHarvestFarmerAPR( + vaultContract, + strategyContract, + oneDayAgoBlock, + currentPricePerFullShare); + + // APR based on three day sample + Object.assign(dataRequiredForCalculation, { blockNumber: threeDaysAgoBlock }); + const aprThreeDaySample = await getHarvestFarmerAPR( + vaultContract, + strategyContract, + threeDaysAgoBlock, + currentPricePerFullShare); + + // APR based on one week sample + Object.assign(dataRequiredForCalculation, { blockNumber: oneWeekAgoBlock }); + const aprOneWeekSample = await getHarvestFarmerAPR( + vaultContract, + strategyContract, + oneWeekAgoBlock, + currentPricePerFullShare); + + // APR based on one month sample + Object.assign(dataRequiredForCalculation, { blockNumber: oneMonthAgoBlock }); + const aprOneMonthSample = await getHarvestFarmerAPR( + vaultContract, + strategyContract, + oneMonthAgoBlock, + currentPricePerFullShare); + + const aprData = { + aprOneDaySample, + aprThreeDaySample, + aprOneWeekSample, + aprOneMonthSample + } + + return { + ...aprData, + compoundApy: 0, + }; + }else { // Yearn Vault const pool = _.find(pools, { symbol }); var vaultContract; - if (vault.isHarvest) { - const envContracts = process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? mainContracts : testContracts; - vaultContract = new archiveNodeWeb3.eth.Contract(envContracts.harvest[vault.id].abi, envContracts.harvest[vault.id].address); - } else { - vaultContract = new archiveNodeWeb3.eth.Contract(abi, address); - } + // if (vault.isHarvest) { + // const envContracts = process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? mainContracts : testContracts; + // vaultContract = new archiveNodeWeb3.eth.Contract(envContracts.harvest[vault.id].abi, envContracts.harvest[vault.id].address); + // } else {} + vaultContract = new archiveNodeWeb3.eth.Contract(abi, address); const pricePerFullShareInception = await getPricePerFullShare( vaultContract, @@ -305,6 +364,20 @@ const getHistoricalAPY = async (startTime, contractAddress) => { case mainContracts.farmer['cUSDT'].address: result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.cUsdtFarmer); break; + case testContracts.farmer['hfDAI'].address: + case mainContracts.farmer['hfDAI'].address: + console.log("herererer"); + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.hfDaiFarmer); + console.log("result", result); + break; + case testContracts.farmer['hfUSDC'].address: + case mainContracts.farmer['hfUSDC'].address: + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.hfUsdcFarmer); + break; + case testContracts.farmer['hfUSDT'].address: + case mainContracts.farmer['hfUSDT'].address: + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.hfUsdtFarmer); + break; } return result; @@ -359,6 +432,30 @@ const saveAndReadVault = async (vault) => { return data; }; +const getHarvestFarmerAPR = async (vaultData) => { + const { + vaultContract, + strategyContract, + currentPricePerFullShare, + lastMeasurement, + blockNumber, + } = vaultData; + + let apr = 0; + + // To ensure block number happens after contract creation + if(blockNumber >= lastMeasurement) { + const pool = await strategyContract.methods.pool().call(undefined, blockNumber); + const totalSupply = await vaultContract.methods.totalSupply().call(undefined, blockNumber); + + const pricePerFullShareOfBeforeDay = pool / totalSupply; + + // APR calculation + apr = (currentPricePerFullShare - pricePerFullShareOfBeforeDay) * 100 * 365; + } + return apr; +}; + module.exports.saveHandler = async () => { try { const oneDayAgo = moment().subtract(1, "days").valueOf(); From 29c414db769be20e7e704d22b58201708c75dd37 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Wed, 26 May 2021 17:18:42 +0800 Subject: [PATCH 066/254] Add Harvest Farmer into TVL model js. Add decimals handling if no decimals is returned and tvl value handling if tvl is undefined. --- models/tvl.model.js | 3 +++ services/vaults/tvl/handler.js | 29 ++++++++++++++++++++--------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/models/tvl.model.js b/models/tvl.model.js index 460a25a..8c287e6 100644 --- a/models/tvl.model.js +++ b/models/tvl.model.js @@ -51,4 +51,7 @@ module.exports = { cUsdtFarmer: "cUSDT_tvl", cUsdcFarmer: "cUSDC_tvl", cDaiFarmer: "cDAI_tvl", + hfDaiFarmer: "hfDAI_tvl", + hfUsdtFarmer: "hfUSDT_tvl", + hfUsdcFarmer: "hfUSDC_tvl", }; diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index 60d7ec2..33a4227 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -79,15 +79,25 @@ const getTokenPrice = async (coingecko_token_id) => { * TVL = poolAmount * tokenPrice */ const getTVL = async (vault) => { - const { tokenId } = vault; - let tvl; - const contract = getContract(vault); - const poolAmount = await getPoolAmount(contract); - const decimals = await getDecimals(contract); - const tokenPrice = await getTokenPrice(tokenId); - - tvl = (poolAmount / 10 ** decimals) * tokenPrice; - return tvl; + try { + const { tokenId } = vault; + let tvl; + + const contract = getContract(vault); + const poolAmount = await getPoolAmount(contract); + + let decimals = await getDecimals(contract); + decimals = decimals ? decimals : 18; + + const tokenPrice = await getTokenPrice(tokenId); + + tvl = (poolAmount / 10 ** decimals) * tokenPrice; + + return tvl === undefined ? 0 : tvl; + } catch (err) { + console.log(err); + return 0; + } }; // Get and Save all TVL of all Vaults @@ -219,6 +229,7 @@ module.exports.getHistoricalTVLhandle = async (req, res) => { case db.cDaiFarmer: collection = db.cDaiFarmer; break; + case db. default: res.status(200).json({ message: "Invalid Farmer", From 48bb27e1780f653143b3a4116b1db7511b37f91f Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Wed, 26 May 2021 22:57:08 +0800 Subject: [PATCH 067/254] - Added DAOvip in Stake Pool API - Added ETH<->DVG Uniswap LP Pool in Stake Pool API --- app.js | 2 - config/abi.js | 3 + config/serverless/domain.js | 17 ++- scripts/initial.js | 16 +++ services/staking/dao-stake/handler.js | 152 +++++++++++++++++--------- services/staking/handler.js | 1 + swagger.json | 12 -- 7 files changed, 133 insertions(+), 70 deletions(-) diff --git a/app.js b/app.js index a1a5b3c..e97cae0 100644 --- a/app.js +++ b/app.js @@ -69,8 +69,6 @@ async function init() { ); app.get("/staking/get-xdvg-stake", (req, res) => stakeXDvg.getxDVGStake(req, res)); - app.get("/staking/get-dao-stakes", (req, res) => stakeDaoStakes.getStakePools(req, res)); - app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument)); app.listen(port, () => console.log(`Listening on ${port}`)); diff --git a/config/abi.js b/config/abi.js index 3ae3b7b..5b1edbf 100644 --- a/config/abi.js +++ b/config/abi.js @@ -16094,6 +16094,8 @@ const daoStakeContract = [ } ]; +const uniswapPairABIContract = [{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount0Out","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1Out","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Swap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint112","name":"reserve0","type":"uint112"},{"indexed":false,"internalType":"uint112","name":"reserve1","type":"uint112"}],"name":"Sync","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MINIMUM_LIQUIDITY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"burn","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getReserves","outputs":[{"internalType":"uint112","name":"_reserve0","type":"uint112"},{"internalType":"uint112","name":"_reserve1","type":"uint112"},{"internalType":"uint32","name":"_blockTimestampLast","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token0","type":"address"},{"internalType":"address","name":"_token1","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"kLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"liquidity","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"price0CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"price1CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"skim","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount0Out","type":"uint256"},{"internalType":"uint256","name":"amount1Out","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"swap","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"sync","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"token0","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token1","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]; + module.exports = { earnUSDTABIContract, earnUSDCABIContract, @@ -16119,4 +16121,5 @@ module.exports = { xDVGABIContract, DVGABIContract, daoStakeContract, + uniswapPairABIContract, }; diff --git a/config/serverless/domain.js b/config/serverless/domain.js index e85e70c..621d4a3 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -28,7 +28,6 @@ module.exports.dev = () => { domainName: `dev-${DEFAULT.domainName}`, }); }; -// yearn = rinkeby const testContracts = { earn: { yUSDT: { @@ -154,6 +153,12 @@ const testContracts = { startBlock: 25055584, poolPercent: 0.51 }, + uniswap: { + ethDVG: { + address: "0x0A15e37442e2a41A3A51A9Eff7fE1DCE0E96f0bB", + abi: abi.uniswapPairABIContract, + } + } }; const mainContracts = { @@ -273,14 +278,20 @@ const mainContracts = { DVG: { address: "", // TODO: Update mainnet address abi: abi.xDVGABIContract, - tokenId: "xDVG", + tokenId: "DVG", }, daoStake: { - address: "", // Upadte mainnet address + address: "", // Update mainnet address abi: abi.daoStakeContract, startBlock: 25055584, // Update mainnet block poolPercent: 0.51 }, + uniswap: { + ethDVG: { + address: "", // Update mainnet address + abi: abi.uniswapPairABIContract, + } + } }; const devEarnContract = "0xdb12e805d004698fc58f6e4fbdd876268df2dffe"; diff --git a/scripts/initial.js b/scripts/initial.js index 24b7775..3db391e 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -81,5 +81,21 @@ db.stake_pool.insertMany([ pid: '6', category: 'basic', tokenId: 'dai' + }, + { + name: 'xDVG', + contract_address: '0x3aa8e8B6D3562a1E7aCB0dddD02b27896C00c424', + status: 'A', + pid: '7', + category: 'basic', + tokenId: 'xDVG' + }, + { + name: 'ETH<->DVG', + contract_address: '0x0A15e37442e2a41A3A51A9Eff7fE1DCE0E96f0bB', + status: 'A', + pid: '7', + category: 'basic', + tokenId: 'ethDVG' } ]); \ No newline at end of file diff --git a/services/staking/dao-stake/handler.js b/services/staking/dao-stake/handler.js index 719a8ec..c07f8a5 100644 --- a/services/staking/dao-stake/handler.js +++ b/services/staking/dao-stake/handler.js @@ -15,6 +15,31 @@ const archiveNodeWeb3 = new Web3(archiveNodeUrl); const delayTime = 500; let contracts = []; +// xDVGPrice Formula : xDVG price = ( DVG amount of xDVG SC * DVG price) / xDVG amount +const getxDVGPrice = async (xDVGAmount, dvgBalanceOfxDVG, dvgPrice) => { + return (dvgBalanceOfxDVG * dvgPrice) / xDVGAmount; +} + +// Get vipDVG's total supply +const getxDVGTotalSupply = async(xDVGContract) => { + try { + const xDVGTotalSupply = await xDVGContract.methods.totalSupply().call(); + return xDVGTotalSupply; + } catch(err) { + console.log("Error in getxDVGTotalSupply(): ", err); + } +} + +// DVG's balance of vipDVG contract +const getDVGBalanceOfxDVG = async(dvgContract, xDVGAddress) => { + try { + const dvgBalanceOfVipDVG = await dvgContract.methods.balanceOf(xDVGAddress).call(); + return dvgBalanceOfVipDVG; + } catch (err) { + console.log("Error in getDVGBalanceOfxDVG(): ", err) + } +} + // Get token price const getTokenPrice = async () => { const tokens = [ @@ -22,7 +47,8 @@ const getTokenPrice = async () => { { tokenId: "usd-coin", price: 0.00 }, { tokenId: "dai", price: 0.00 }, { tokenId: "true-usd", price: 0.00 }, - { tokenId: "daoventures", price: 0.00 } + { tokenId: "daoventures", price: 0.00 }, + { tokenId: "ethereum", price: 0.00 }, ]; const tokenIds = tokens.map(t => t.tokenId); @@ -42,6 +68,32 @@ const getTokenPrice = async () => { }) } + /**** DAOvip ***/ + // Get vipDVG contract + const xDVGContractInfo = getContractInfo("vipDVG"); + const xDVGContract = await getContract(xDVGContractInfo); + + // Get DVG contract + const dvgContractInfo = getContractInfo("DVG"); + const dvgContract = await getContract(dvgContractInfo); + + const xDVGTotalSupply = await getxDVGTotalSupply(xDVGContract); + const dvgBalOfxDVG = await getDVGBalanceOfxDVG(dvgContract, xDVGContract._address); + const xDVGPrice = await getxDVGPrice(xDVGTotalSupply, dvgBalOfxDVG, tokens.find(t => t.tokenId === 'daoventures').price); + tokens.push({ + tokenId: 'xDVG', + price: xDVGPrice, + }); + + /** Uniswap ETH<->DVG LP **/ + const ethDVGPoolInfo = getContractInfo("uniswap").ethDVG; + const ethDVGPoolContract = await getContract(ethDVGPoolInfo); + const ethDVGPoolPrice = await getUniswapLPTokenPrice(ethDVGPoolContract, ethDVGPoolInfo.address, tokens, 'ethereum', 'daoventures'); + tokens.push({ + tokenId: 'ethDVG', + price: ethDVGPoolPrice, + }); + return tokens; } catch (err) { console.log("Error in getTokenPrice(): ", err); @@ -61,20 +113,6 @@ const getContract = async (contractInfo) => { return contract; } -const fetchContractABI = async (address) => { - let network = ''; - - if (process.env.PRODUCTION == null || process.env.PRODUCTION == "") { - network = '-kovan'; - } - const url = `https://api${network}.etherscan.io/api?module=contract&action=getabi&address=${address}&apikey=${process.env.ETHERSCAN_API_KEY}`; - const resp = await fetch(url).then((res) => res.json()); - const metadata = resp.result; - - await delay(delayTime); - return metadata; -} - // DAOstake totalPoolWeight() const getDaoStakeTotalPoolWeight = async (daoStakeContract) => { try { @@ -118,6 +156,46 @@ const getPoolFromDaoStake = async(pid, daoStakeContract) => { } } +const fetchContractABI = async (address) => { + let network = ''; + if (process.env.PRODUCTION == null || process.env.PRODUCTION == "") { + network = '-kovan'; + } + const url = `https://api${network}.etherscan.io/api?module=contract&action=getabi&address=${address}&apikey=${process.env.ETHERSCAN_API_KEY}`; + const resp = await fetch(url).then((res) => res.json()); + const metadata = resp.result; + await delay(delayTime); + return metadata; +}; + +const getUniswapLPTokenPrice = async (poolContract, poolAddress, tokenPrices, token0Id, token1Id) => { + const token0Address = await poolContract.methods.token0().call(); + const token1Address = await poolContract.methods.token1().call(); + const totalSupply = await poolContract.methods.totalSupply().call(); + + const token0Abi = await fetchContractABI(token0Address); + const token1Abi = await fetchContractABI(token1Address); + + const token0 = await getContract({ + address: token0Address, + abi: JSON.parse(token0Abi), + }); + + const token1 = await getContract({ + address: token1Address, + abi: JSON.parse(token1Abi), + }); + + // Balance of Both pairs + const token0Bal = await token0.methods.balanceOf(poolAddress).call(); + const token1Bal = await token1.methods.balanceOf(poolAddress).call(); + const token0Price = tokenPrices.find(t => t.tokenId === token0Id).price; + const token1Price = tokenPrices.find(t => t.tokenId === token1Id).price; + const pool = token0Bal * token0Price + token1Bal * token1Price; + const price = pool / totalSupply; + return price; +} + // Calculate APR and TVL for pool const poolCalculation = async(daoStake, poolInfo, tokensPrice) => { let apr = 0; @@ -143,15 +221,6 @@ const poolCalculation = async(daoStake, poolInfo, tokensPrice) => { // Find pool token price const poolTokenPrice = tokens.find(t => t.tokenId === pool.tokenId).price; - - console.log("pid: " + pool.pid); - console.log("multiplier: " + multiplier); - console.log("pool percent: " + poolPercent); - console.log("dvg price: " + dvgPrice); - console.log("pool weight: " + poolWeight); - console.log("total pool weight: "+ totalPoolWeight); - console.log("token bal of dao stake: " + tokenBalOfDAOStake); - console.log("pool token price: " + poolTokenPrice); // APR Calculation apr = (multiplier * poolPercent * dvgPrice * (poolWeight / 100)) / @@ -159,14 +228,13 @@ const poolCalculation = async(daoStake, poolInfo, tokensPrice) => { // TVL Calculation const tvl = tokenBalOfDAOStake * poolTokenPrice; - console.log("apr: "+ apr + ", tvl: " + tvl); Object.assign(pool, { apr: apr === Infinity ? 0 : apr, tvl }); return pool; } -module.exports.saveStakedPools = async() => { +module.exports.saveStakedPools = async () => { try { // Find price for each token const tokens = await getTokenPrice(); @@ -195,6 +263,11 @@ module.exports.saveStakedPools = async() => { poolAbiContractMap.set(v.address, v.abi); }); + // DAOvip + poolAbiContractMap.set(contracts.vipDVG.address, contracts.vipDVG.abi); + + // Uniswap ETH <-> DVG Pool + poolAbiContractMap.set(contracts.uniswap.ethDVG.address, contracts.uniswap.ethDVG.abi) for (index = 0 ; index < poolSize; index ++) { if(poolAbiContractMap.has(pools[index].contract_address) && pools[index].status == 'A') { @@ -221,31 +294,4 @@ module.exports.saveStakedPools = async() => { console.error(err); } return; -} - -module.exports.getStakePools = async (req, res) => { - try { - const pools = await db.findAll(); - const result = []; - - pools - .filter((pool) => pool.status === 'A') - .forEach((pool) => { - delete pool._id; - result.push(pool); - }); - - res.status(200).json({ - message: "Successful response", - body: { - pools: result - } - }); - } catch (err) { - res.status(200).json({ - message: err.messge, - body: null - }); - } - return; } \ No newline at end of file diff --git a/services/staking/handler.js b/services/staking/handler.js index 549c861..f970bca 100644 --- a/services/staking/handler.js +++ b/services/staking/handler.js @@ -48,6 +48,7 @@ module.exports.getPools = async (req, res) => { const poolSize = _.size(pools); for (idx = 0; idx < poolSize; idx++) { if (pools[idx].status === 'A') { + delete pools[idx]._id; pls.push(pools[idx]); } } diff --git a/swagger.json b/swagger.json index ec7be53..374c16f 100644 --- a/swagger.json +++ b/swagger.json @@ -203,18 +203,6 @@ ], "responses": {} } - }, - "/staking/get-dao-stakes" :{ - "get": { - "tags": [ - "Stake" - ], - "description": "Get DAOstake", - "produces": [ - "application/json" - ], - "responses": {} - } } } } \ No newline at end of file From 52531669e650c92375be88a4246f146f0e06bcd0 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Thu, 27 May 2021 09:53:59 +0800 Subject: [PATCH 068/254] Add in harvest farmer. --- scripts/initial.js | 8 ++++++++ services/vaults/tvl/handler.js | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/scripts/initial.js b/scripts/initial.js index 874ca07..677e7cf 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -7,6 +7,10 @@ db.vault_categories.insertMany([ { name: 'basic', contract_address: '0xEeCe6AD323a93d4B021BDAaC587DCC04b5cf0a78', symbol: 'cUSDT' }, { name: 'basic', contract_address: '0xd1D7f950899C0269a7F2aad5E854cdc3a1350ba9', symbol: 'cUSDC', }, { name: 'basic', contract_address: '0x43C20638C3914Eca3c96e9cAc8ebE7d652Be45c6', symbol: 'cDAI', }, + // TODO: add in mainnet contract addresss + // { name: 'basic', contract_address: '', symbol: 'hfUSDT'}, + // { name: 'basic', contract_address: '', symbol: 'hfUSDC'}, + // { name: 'basic', contract_address: '', symbol: 'hfDAI'}, ]); // Testnet Contracts @@ -18,6 +22,10 @@ db.vault_categories.insertMany([ { name: 'basic', contract_address: '0x5d102e0bdf2037899e1ff2e8cc50987108533c52', symbol: 'cUSDT' }, { name: 'basic', contract_address: '0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e', symbol: 'cUSDC', }, { name: 'basic', contract_address: '0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d', symbol: 'cDAI', }, + // TODO: update name for these harvest fighter series + { name: 'basic', contract_address: '0xb41a49de82e95dc1e028839c3440ac97f9a7832c', symbol: 'hfUSDT'}, + { name: 'basic', contract_address: '0x54783464848b35d6fb9bba37c1ddd23ac3b1a11a', symbol: 'hfUSDC'}, + { name: 'basic', contract_address: '0x0f89ee5b95d1d5cfb10f29775d816fc6d8adb9fc', symbol: 'hfDAI'}, ]); db.xdvg_token.insert({ diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index 33a4227..0a836ca 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -229,7 +229,15 @@ module.exports.getHistoricalTVLhandle = async (req, res) => { case db.cDaiFarmer: collection = db.cDaiFarmer; break; - case db. + case db.hfDaiFarmer: + collection = db.hfDaiFarmer; + break; + case db.hfUsdcFarmer: + collection = db.hfUsdcFarmer; + break; + case db.hfUsdtFarmer: + collection = db.hfUsdtFarmer; + break; default: res.status(200).json({ message: "Invalid Farmer", From 4152b1b9782df5b67bb488c9cd3e56a04809498a Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Tue, 25 May 2021 16:25:03 +0800 Subject: [PATCH 069/254] Add APR Calculation for Harvest Farmer pools (cherry picked from commit 9c5d56563db942a5354de88c624b8d10fb5e9084) --- app.js | 4 +- config/abi.js | 904 ++++++++++++++++++++++++++-- services/vaults/apy/save/handler.js | 102 +++- services/vaults/apy/save/vaults.js | 30 +- 4 files changed, 956 insertions(+), 84 deletions(-) diff --git a/app.js b/app.js index ead64b0..541f5ae 100644 --- a/app.js +++ b/app.js @@ -26,7 +26,7 @@ async function init() { if (err) throw err; // jobs.saveVault(); - // jobs.saveVaultAPY(); + jobs.saveVaultAPY(); // jobs.savePricePerFullShare(); // jobs.saveHistoricalAPY(); jobs.saveHistoricalTVL(); @@ -64,7 +64,7 @@ async function init() { app.get("/staking/get-pools", (req, res) => stakePool.getPools(req, res) ); - + app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument)); app.listen(port, () => console.log(`Listening on ${port}`)); diff --git a/config/abi.js b/config/abi.js index 4b6c990..ac5fdeb 100644 --- a/config/abi.js +++ b/config/abi.js @@ -12207,7 +12207,7 @@ const hfDAOContract = [ } ]; -const hfStrategyContract = [ +const hfStrategyContract =[ { "anonymous": false, "inputs": [ @@ -12284,19 +12284,6 @@ const hfStrategyContract = [ "name": "SetTreasuryWallet", "type": "event" }, - { - "inputs": [], - "name": "DENOMINATOR", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "FARM", @@ -12345,12 +12332,12 @@ const hfStrategyContract = [ }, { "inputs": [], - "name": "communityFee", + "name": "communityWallet", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "stateMutability": "view", @@ -12358,10 +12345,10 @@ const hfStrategyContract = [ }, { "inputs": [], - "name": "communityWallet", + "name": "daoVault", "outputs": [ { - "internalType": "address", + "internalType": "contract IDAOVault2", "name": "", "type": "address" } @@ -12370,25 +12357,31 @@ const hfStrategyContract = [ "type": "function" }, { - "inputs": [], - "name": "daoVault", - "outputs": [ + "inputs": [ { - "internalType": "contract IDAOVault2", - "name": "", - "type": "address" + "internalType": "uint256", + "name": "_amount", + "type": "uint256" } ], - "stateMutability": "view", + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "deadline", + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "getCurrentBalance", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "result", "type": "uint256" } ], @@ -12396,16 +12389,16 @@ const hfStrategyContract = [ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "getPseudoPool", + "outputs": [ { "internalType": "uint256", - "name": "_amount", + "name": "pseudoPool", "type": "uint256" } ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -12482,6 +12475,13 @@ const hfStrategyContract = [ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "invest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "isVesting", @@ -12538,7 +12538,7 @@ const hfStrategyContract = [ "inputs": [ { "internalType": "uint256", - "name": "_shares", + "name": "_amount", "type": "uint256" } ], @@ -12587,19 +12587,6 @@ const hfStrategyContract = [ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_seconds", - "type": "uint256" - } - ], - "name": "setDeadline", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -12678,19 +12665,6 @@ const hfStrategyContract = [ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "treasuryFee", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "treasuryWallet", @@ -12733,13 +12707,815 @@ const hfStrategyContract = [ } ], "name": "withdraw", - "outputs": [], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "stateMutability": "nonpayable", "type": "function" } ]; -const hfVault = [{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Invest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newStrategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"StrategyAnnounced","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newStrategy","type":"address"},{"indexed":false,"internalType":"address","name":"oldStrategy","type":"address"}],"name":"StrategyChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_strategy","type":"address"}],"name":"announceStrategyUpdate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"availableToInvestOut","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_strategy","type":"address"}],"name":"canUpdateStrategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"controller","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"holder","type":"address"}],"name":"depositFor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"doHardWork","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"finalizeStrategyUpdate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"finalizeUpgrade","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"futureStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getPricePerFullShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint8","name":"decimals","type":"uint8"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_underlying","type":"address"},{"internalType":"uint256","name":"_toInvestNumerator","type":"uint256"},{"internalType":"uint256","name":"_toInvestDenominator","type":"uint256"},{"internalType":"uint256","name":"_underlyingUnit","type":"uint256"},{"internalType":"uint256","name":"_implementationChangeDelay","type":"uint256"},{"internalType":"uint256","name":"_strategyChangeDelay","type":"uint256"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_storage","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_storage","type":"address"},{"internalType":"address","name":"_underlying","type":"address"},{"internalType":"uint256","name":"_toInvestNumerator","type":"uint256"},{"internalType":"uint256","name":"_toInvestDenominator","type":"uint256"}],"name":"initializeVault","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"nextImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"nextImplementationDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"nextImplementationTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"rebalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"impl","type":"address"}],"name":"scheduleUpgrade","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_store","type":"address"}],"name":"setStorage","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_strategy","type":"address"}],"name":"setStrategy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"numerator","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"setVaultFractionToInvest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"shouldUpgrade","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"strategy","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"strategyTimeLock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"strategyUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"underlying","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"underlyingBalanceInVault","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"underlyingBalanceWithInvestment","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"holder","type":"address"}],"name":"underlyingBalanceWithInvestmentForHolder","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"underlyingUnit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vaultFractionToInvestDenominator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vaultFractionToInvestNumerator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"numberOfShares","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}] +const hfVaultContract = [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "fromStrategy", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toStrategy", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "MigrateFunds", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldCommunityWallet", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newCommunityWallet", + "type": "address" + } + ], + "name": "SetCommunityWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldCustomNetworkFeePercentage", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newCustomNetworkFeePercentage", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldCustomNetworkFeeTier", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newCustomNetworkFeeTier", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeeTier", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeePercentage", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeePercentage", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeeTier2", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeeTier2", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeeTier2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldTreasuryWallet", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newTreasuryWallet", + "type": "address" + } + ], + "name": "SetTreasuryWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "canSetPendingStrategy", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeeTier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_vaultName", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_strategy", + "type": "address" + }, + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "invest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "migrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeeTier2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingStrategy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "refund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_communityWallet", + "type": "address" + } + ], + "name": "setCommunityWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_percentage", + "type": "uint256" + } + ], + "name": "setCustomNetworkFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_customNetworkFeeTier", + "type": "uint256" + } + ], + "name": "setCustomNetworkFeeTier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeePercentage", + "type": "uint256[]" + } + ], + "name": "setNetworkFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeeTier2", + "type": "uint256[]" + } + ], + "name": "setNetworkFeeTier2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pendingStrategy", + "type": "address" + } + ], + "name": "setPendingStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_treasuryWallet", + "type": "address" + } + ], + "name": "setTreasuryWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "strategy", + "outputs": [ + { + "internalType": "contract IStrategy2", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unlockMigrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unlockTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vaultName", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; module.exports = { earnUSDTABIContract, @@ -12765,5 +13541,5 @@ module.exports = { cUSDCContract, hfDAOContract, hfStrategyContract, - hfVault, + hfVaultContract, }; diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index ebb0389..2de82ea 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -133,16 +133,78 @@ const getApyForVault = async (vault) => { apyLoanscan: 0, compoundApy, }; + } else if (vault.isHarvest) { + // Harvest Vault + const vaultContract = new archiveNodeWeb3.eth.Contract(vault.vaultContractABI, vault.vaultContractAddress); + const strategyContract = new archiveNodeWeb3.eth.Contract(vault.strategyABI, vault.strategyContractAddress); + + // Get current price per full share + const pool = strategyContract.methods.pool().call(); + const totalSupply = vaultContract.methods.totalSupply().call(); + const currentPricePerFullShare = pool / totalSupply; + + const dataRequiredForCalculation = { + vaultContract, + strategyContract, + currentPricePerFullShare, + lastMeasurement: vault.lastMeasurement + }; + + // APR based on one day sample + Object.assign(dataRequiredForCalculation, { blockNumber: oneDayAgoBlock }); + const aprOneDaySample = await getHarvestFarmerAPR( + vaultContract, + strategyContract, + oneDayAgoBlock, + currentPricePerFullShare); + + // APR based on three day sample + Object.assign(dataRequiredForCalculation, { blockNumber: threeDaysAgoBlock }); + const aprThreeDaySample = await getHarvestFarmerAPR( + vaultContract, + strategyContract, + threeDaysAgoBlock, + currentPricePerFullShare); + + // APR based on one week sample + Object.assign(dataRequiredForCalculation, { blockNumber: oneWeekAgoBlock }); + const aprOneWeekSample = await getHarvestFarmerAPR( + vaultContract, + strategyContract, + oneWeekAgoBlock, + currentPricePerFullShare); + + // APR based on one month sample + Object.assign(dataRequiredForCalculation, { blockNumber: oneMonthAgoBlock }); + const aprOneMonthSample = await getHarvestFarmerAPR( + vaultContract, + strategyContract, + oneMonthAgoBlock, + currentPricePerFullShare); + + const aprData = { + aprOneDaySample, + aprThreeDaySample, + aprOneWeekSample, + aprOneMonthSample + } + + return { + ...aprData, + compoundApy: 0, + }; + } else { // Yearn Vault const pool = _.find(pools, { symbol }); var vaultContract; - if (vault.isHarvest) { - const envContracts = process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? mainContracts : testContracts; - vaultContract = new archiveNodeWeb3.eth.Contract(envContracts.harvest[vault.id].abi, envContracts.harvest[vault.id].address); - } else { - vaultContract = new archiveNodeWeb3.eth.Contract(abi, address); - } + + // if (vault.isHarvest) { + // const envContracts = process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? mainContracts : testContracts; + // vaultContract = new archiveNodeWeb3.eth.Contract(envContracts.harvest[vault.id].abi, envContracts.harvest[vault.id].address); + // } else {} + + vaultContract = new archiveNodeWeb3.eth.Contract(abi, address); const pricePerFullShareInception = await getPricePerFullShare( vaultContract, @@ -288,11 +350,14 @@ const readVault = async (vault) => { vaultContractAddress: address, erc20address: tokenAddress, } = vault; + console.log(`Reading vault ${vault.name}`); + if (!abi || !address) { console.log(`Vault ABI not found: ${name}`); return null; } + // const contract = new infuraWeb3.eth.Contract(abi, address); const apy = await getApyForVault(vault); @@ -308,10 +373,35 @@ const readVault = async (vault) => { timestamp: Date.now(), ...apy, }; + await saveVaultWithApy(data); return data; }; +const getHarvestFarmerAPR = async (vaultData) => { + const { + vaultContract, + strategyContract, + currentPricePerFullShare, + lastMeasurement, + blockNumber, + } = vaultData; + + let apr = 0; + + // To ensure block number happens after contract creation + if(blockNumber >= lastMeasurement) { + const pool = await strategyContract.methods.pool().call(undefined, blockNumber); + const totalSupply = await vaultContract.methods.totalSupply().call(undefined, blockNumber); + + const pricePerFullShareOfBeforeDay = pool / totalSupply; + + // APR calculation + apr = (currentPricePerFullShare - pricePerFullShareOfBeforeDay) * 100 * 365; + } + return apr; +}; + module.exports.handler = async () => { try { const oneDayAgo = moment().subtract(1, "days").valueOf(); diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 9ec5be8..08b4342 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -151,9 +151,11 @@ module.exports = [ symbol: "DAI", description: "DAI Stablecoin", vaultSymbol: "hfDAI", - erc20address: "0x5592ec0cfb4dbc12d3ab100b257153436a1f0fea", - vaultContractAddress: "0xf6cd30117e16feacaebd2bd30a6d682af6fb9844", - vaultContractABI: config.daoVaultABI, + erc20address: "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa", + vaultContractAddress: "0x0f89EE5b95d1d5cfb10F29775d816fC6D8Adb9FC", + vaultContractABI: abi.hfVaultContract, + strategyContractAddress: "0xE5331cAF0B4E15C88E878551b93df0647738Af35", + strategyABI: abi.hfStrategyContract, balance: 0, vaultBalance: 0, decimals: 18, @@ -161,7 +163,7 @@ module.exports = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 10650116, + lastMeasurement: 24943134, measurement: 1e18, price_id: "dai", isHarvest: true @@ -172,9 +174,11 @@ module.exports = [ symbol: "USDC", description: "USD//C", vaultSymbol: "hfUSDC", - erc20address: "0x4dbcdf9b62e891a7cec5a2568c3f4faf9e8abe2b", - vaultContractAddress: "0xefd426cee17809039c84da8e37951c634901e427", - vaultContractABI: config.daoVaultABI, + erc20address: "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", + vaultContractAddress: "0x54783464848b35d6fb9bba37C1dDd23aC3B1A11A", + vaultContractABI: abi.hfVaultContract, + strategyContractAddress: "0xE5331cAF0B4E15C88E878551b93df0647738Af35", + strategyABI: abi.hfStrategyContract, balance: 0, vaultBalance: 0, decimals: 18, @@ -182,7 +186,7 @@ module.exports = [ depositAll: false, withdraw: true, withdrawAll: false, - lastMeasurement: 10532708, + lastMeasurement: 24943141, measurement: 1e18, price_id: "usd-coin", isHarvest: true @@ -193,9 +197,11 @@ module.exports = [ symbol: "USDT", description: "Tether USD", vaultSymbol: "hfUSDT", - erc20address: "0xd9ba894e0097f8cc2bbc9d24d308b98e36dc6d02", - vaultContractAddress: "0xb0f92a610e83602bf5df258265dbe1561ae33e85", - vaultContractABI: config.daoVaultABI, + erc20address: "0x07de306ff27a2b630b1141956844eb1552b956b5", + vaultContractAddress: "0xb41A49De82e95dc1E028839C3440Ac97f9A7832C", + vaultContractABI: abi.hfVaultContract, + strategyContractAddress: "0x0bFA86d10A383B435748E39Cedf8852CFD2B1A9d", + strategyABI: abi.hfStrategyContract, balance: 0, vaultBalance: 0, decimals: 18, @@ -203,7 +209,7 @@ module.exports = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 10651402, + lastMeasurement: 24943148, measurement: 1e18, price_id: "tether", isHarvest: true From 6c305a2e25078071064ba6c49194313b71f4f913 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Tue, 25 May 2021 18:35:14 +0800 Subject: [PATCH 070/254] Add price per full share implementation for Harvest Farmer in savePricePerFullShare cronjob. (cherry picked from commit 16bd9a33f56089d2d8386dbfd5678794afce5c58) --- app.js | 4 ++-- config/serverless/domain.js | 18 +++++++++--------- services/vaults/price/handler.js | 15 +++++++++++++-- 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/app.js b/app.js index 541f5ae..2fe8b3b 100644 --- a/app.js +++ b/app.js @@ -27,7 +27,7 @@ async function init() { // jobs.saveVault(); jobs.saveVaultAPY(); - // jobs.savePricePerFullShare(); + jobs.savePricePerFullShare(); // jobs.saveHistoricalAPY(); jobs.saveHistoricalTVL(); }); @@ -64,7 +64,7 @@ async function init() { app.get("/staking/get-pools", (req, res) => stakePool.getPools(req, res) ); - + app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument)); app.listen(port, () => console.log(`Listening on ${port}`)); diff --git a/config/serverless/domain.js b/config/serverless/domain.js index ec55b19..daa5e99 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -138,25 +138,25 @@ const testContracts = { tokenId: "dai", }, 'hfDAI': { - address: '0xf6cd30117e16feacaebd2bd30a6d682af6fb9844', - abi: abi.hfDAOContract, - strategyAddress: '0xd505538106e0e4fe73e913f990688f2eafd75901', + address: '0x0f89EE5b95d1d5cfb10F29775d816fC6D8Adb9FC', + abi: abi.hfVaultContract, + strategyAddress: '0x1032E051bc71D36D82F2FDE298cee1311852Dd29', strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "dai", }, 'hfUSDC': { - address: '0xefd426cee17809039c84da8e37951c634901e427', - abi: abi.hfDAOContract, - strategyAddress: '0x3568bcd1d00db319dade2c5611c474e8f4d661d1', + address: '0x54783464848b35d6fb9bba37C1dDd23aC3B1A11A', + abi: abi.hfVaultContract, + strategyAddress: '0xE5331cAF0B4E15C88E878551b93df0647738Af35', strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "usd-coin", }, 'hfUSDT': { - address: '0xb0f92a610e83602bf5df258265dbe1561ae33e85', - abi: abi.hfDAOContract, - strategyAddress: '0x5f75141042e8ac06a6f7aecac665acad228faae1', + address: '0xb41A49De82e95dc1E028839C3440Ac97f9A7832C', + abi: abi.hfVaultContract, + strategyAddress: '0x0bFA86d10A383B435748E39Cedf8852CFD2B1A9d', strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "tether", diff --git a/services/vaults/price/handler.js b/services/vaults/price/handler.js index 93dbaaf..3f7e521 100644 --- a/services/vaults/price/handler.js +++ b/services/vaults/price/handler.js @@ -47,8 +47,19 @@ const getCurrentPrice = async () => { price: 0 }).catch((err) => console.log('err', err)); } else if (contracts.farmer[key].contractType === 'harvest') { - const contract = getContract(contracts.harvest[key].abi, contracts.harvest[key].address); - const pricePerFullShare = await getPricePerFullShare(contract); + // Get vault contract and strategy contract + const vaultContract = getContract(contracts.farmer[key].abi, contracts.farmer[key].address); + const strategyContract = getContract(contracts.farmer[key].strategyABI, contracts.farmer[key].strategyAddress); + + // Get pool + const pool = await strategyContract.methods.pool().call(); + + // Get total supply + const totalSupply = await vaultContract.methods.totalSupply().call(); + + // Calculate price per full share + const pricePerFullShare = pool / totalSupply; + await db.add(key + '_price', { earnPrice: 0, vaultPrice: 0, From fe4fcd38d3a7783720429fe6a1dd5c499cf2fa1f Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Wed, 26 May 2021 11:24:07 +0800 Subject: [PATCH 071/254] 1. Update contract address into lower case. 2. Add APR Calculation into historical handler for Harvest Farmer vault. (cherry picked from commit 868fdbcbe42e9fb8a66fd8d71f93d8c21e5ae228) --- app.js | 4 +- config/serverless/domain.js | 36 +++++- services/vaults/apy/save/historical-handle.js | 111 ++++++++++++++++-- 3 files changed, 136 insertions(+), 15 deletions(-) diff --git a/app.js b/app.js index 2fe8b3b..ead64b0 100644 --- a/app.js +++ b/app.js @@ -26,8 +26,8 @@ async function init() { if (err) throw err; // jobs.saveVault(); - jobs.saveVaultAPY(); - jobs.savePricePerFullShare(); + // jobs.saveVaultAPY(); + // jobs.savePricePerFullShare(); // jobs.saveHistoricalAPY(); jobs.saveHistoricalTVL(); }); diff --git a/config/serverless/domain.js b/config/serverless/domain.js index daa5e99..4dc23b2 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -138,25 +138,25 @@ const testContracts = { tokenId: "dai", }, 'hfDAI': { - address: '0x0f89EE5b95d1d5cfb10F29775d816fC6D8Adb9FC', + address: '0x0f89ee5b95d1d5cfb10f29775d816fc6d8adb9fc', abi: abi.hfVaultContract, - strategyAddress: '0x1032E051bc71D36D82F2FDE298cee1311852Dd29', + strategyAddress: '0x1032e051bc71d36d82f2fde298cee1311852dd29', strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "dai", }, 'hfUSDC': { - address: '0x54783464848b35d6fb9bba37C1dDd23aC3B1A11A', + address: '0x54783464848b35d6fb9bba37c1ddd23ac3b1a11a', abi: abi.hfVaultContract, - strategyAddress: '0xE5331cAF0B4E15C88E878551b93df0647738Af35', + strategyAddress: '0xe5331caf0b4e15c88e878551b93df0647738af35', strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "usd-coin", }, 'hfUSDT': { - address: '0xb41A49De82e95dc1E028839C3440Ac97f9A7832C', + address: '0xb41a49de82e95dc1e028839c3440ac97f9a7832c', abi: abi.hfVaultContract, - strategyAddress: '0x0bFA86d10A383B435748E39Cedf8852CFD2B1A9d', + strategyAddress: '0x0bfa86d10a383b435748e39cedf8852cfd2b1a9d', strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "tether", @@ -272,6 +272,30 @@ const mainContracts = { contractType: "compound", tokenId: "dai", }, + hfDAI: { + address: '', // TODO: Update that this to mainnet address + abi: abi.hfVaultContract, + strategyAddress: '', + strategyABI: abi.hfStrategyContract, + contractType: 'harvest', + tokenId: "dai", + }, + hfUSDC: { + address: '', // TODO: Update that this to mainnet address + abi: abi.hfVaultContract, + strategyAddress: '', + strategyABI: abi.hfStrategyContract, + contractType: 'harvest', + tokenId: "usd-coin", + }, + hfUSDT: { + address: '', // TODO: Update that this to mainnet address + abi: abi.hfVaultContract, + strategyAddress: '', + strategyABI: abi.hfStrategyContract, + contractType: 'harvest', + tokenId: "tether", + }, }, compund: { cUSDT: { diff --git a/services/vaults/apy/save/historical-handle.js b/services/vaults/apy/save/historical-handle.js index dc5e464..9b156aa 100644 --- a/services/vaults/apy/save/historical-handle.js +++ b/services/vaults/apy/save/historical-handle.js @@ -132,16 +132,75 @@ const getApyForVault = async (vault) => { apyLoanscan: 0, compoundApy, }; - } else { + } else if (vault.isHarvest) { + // Harvest Vault + const vaultContract = new archiveNodeWeb3.eth.Contract(vault.vaultContractABI, vault.vaultContractAddress); + const strategyContract = new archiveNodeWeb3.eth.Contract(vault.strategyABI, vault.strategyContractAddress); + + // Get current price per full share + const pool = strategyContract.methods.pool().call(); + const totalSupply = vaultContract.methods.totalSupply().call(); + const currentPricePerFullShare = pool / totalSupply; + + const dataRequiredForCalculation = { + vaultContract, + strategyContract, + currentPricePerFullShare, + lastMeasurement: vault.lastMeasurement + }; + + // APR based on one day sample + Object.assign(dataRequiredForCalculation, { blockNumber: oneDayAgoBlock }); + const aprOneDaySample = await getHarvestFarmerAPR( + vaultContract, + strategyContract, + oneDayAgoBlock, + currentPricePerFullShare); + + // APR based on three day sample + Object.assign(dataRequiredForCalculation, { blockNumber: threeDaysAgoBlock }); + const aprThreeDaySample = await getHarvestFarmerAPR( + vaultContract, + strategyContract, + threeDaysAgoBlock, + currentPricePerFullShare); + + // APR based on one week sample + Object.assign(dataRequiredForCalculation, { blockNumber: oneWeekAgoBlock }); + const aprOneWeekSample = await getHarvestFarmerAPR( + vaultContract, + strategyContract, + oneWeekAgoBlock, + currentPricePerFullShare); + + // APR based on one month sample + Object.assign(dataRequiredForCalculation, { blockNumber: oneMonthAgoBlock }); + const aprOneMonthSample = await getHarvestFarmerAPR( + vaultContract, + strategyContract, + oneMonthAgoBlock, + currentPricePerFullShare); + + const aprData = { + aprOneDaySample, + aprThreeDaySample, + aprOneWeekSample, + aprOneMonthSample + } + + return { + ...aprData, + compoundApy: 0, + }; + }else { // Yearn Vault const pool = _.find(pools, { symbol }); var vaultContract; - if (vault.isHarvest) { - const envContracts = process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? mainContracts : testContracts; - vaultContract = new archiveNodeWeb3.eth.Contract(envContracts.harvest[vault.id].abi, envContracts.harvest[vault.id].address); - } else { - vaultContract = new archiveNodeWeb3.eth.Contract(abi, address); - } + // if (vault.isHarvest) { + // const envContracts = process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? mainContracts : testContracts; + // vaultContract = new archiveNodeWeb3.eth.Contract(envContracts.harvest[vault.id].abi, envContracts.harvest[vault.id].address); + // } else {} + vaultContract = new archiveNodeWeb3.eth.Contract(abi, address); const pricePerFullShareInception = await getPricePerFullShare( vaultContract, @@ -305,6 +364,20 @@ const getHistoricalAPY = async (startTime, contractAddress) => { case mainContracts.farmer['cUSDT'].address: result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.cUsdtFarmer); break; + case testContracts.farmer['hfDAI'].address: + case mainContracts.farmer['hfDAI'].address: + console.log("herererer"); + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.hfDaiFarmer); + console.log("result", result); + break; + case testContracts.farmer['hfUSDC'].address: + case mainContracts.farmer['hfUSDC'].address: + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.hfUsdcFarmer); + break; + case testContracts.farmer['hfUSDT'].address: + case mainContracts.farmer['hfUSDT'].address: + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.hfUsdtFarmer); + break; } return result; @@ -359,6 +432,30 @@ const saveAndReadVault = async (vault) => { return data; }; +const getHarvestFarmerAPR = async (vaultData) => { + const { + vaultContract, + strategyContract, + currentPricePerFullShare, + lastMeasurement, + blockNumber, + } = vaultData; + + let apr = 0; + + // To ensure block number happens after contract creation + if(blockNumber >= lastMeasurement) { + const pool = await strategyContract.methods.pool().call(undefined, blockNumber); + const totalSupply = await vaultContract.methods.totalSupply().call(undefined, blockNumber); + + const pricePerFullShareOfBeforeDay = pool / totalSupply; + + // APR calculation + apr = (currentPricePerFullShare - pricePerFullShareOfBeforeDay) * 100 * 365; + } + return apr; +}; + module.exports.saveHandler = async () => { try { const oneDayAgo = moment().subtract(1, "days").valueOf(); From 125d6ee3e1b9cdbf913f9b8c88837649caabe58b Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Wed, 26 May 2021 17:18:42 +0800 Subject: [PATCH 072/254] Add Harvest Farmer into TVL model js. Add decimals handling if no decimals is returned and tvl value handling if tvl is undefined. (cherry picked from commit 29c414db769be20e7e704d22b58201708c75dd37) --- models/tvl.model.js | 3 +++ services/vaults/tvl/handler.js | 29 ++++++++++++++++++++--------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/models/tvl.model.js b/models/tvl.model.js index 460a25a..8c287e6 100644 --- a/models/tvl.model.js +++ b/models/tvl.model.js @@ -51,4 +51,7 @@ module.exports = { cUsdtFarmer: "cUSDT_tvl", cUsdcFarmer: "cUSDC_tvl", cDaiFarmer: "cDAI_tvl", + hfDaiFarmer: "hfDAI_tvl", + hfUsdtFarmer: "hfUSDT_tvl", + hfUsdcFarmer: "hfUSDC_tvl", }; diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index 60d7ec2..33a4227 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -79,15 +79,25 @@ const getTokenPrice = async (coingecko_token_id) => { * TVL = poolAmount * tokenPrice */ const getTVL = async (vault) => { - const { tokenId } = vault; - let tvl; - const contract = getContract(vault); - const poolAmount = await getPoolAmount(contract); - const decimals = await getDecimals(contract); - const tokenPrice = await getTokenPrice(tokenId); - - tvl = (poolAmount / 10 ** decimals) * tokenPrice; - return tvl; + try { + const { tokenId } = vault; + let tvl; + + const contract = getContract(vault); + const poolAmount = await getPoolAmount(contract); + + let decimals = await getDecimals(contract); + decimals = decimals ? decimals : 18; + + const tokenPrice = await getTokenPrice(tokenId); + + tvl = (poolAmount / 10 ** decimals) * tokenPrice; + + return tvl === undefined ? 0 : tvl; + } catch (err) { + console.log(err); + return 0; + } }; // Get and Save all TVL of all Vaults @@ -219,6 +229,7 @@ module.exports.getHistoricalTVLhandle = async (req, res) => { case db.cDaiFarmer: collection = db.cDaiFarmer; break; + case db. default: res.status(200).json({ message: "Invalid Farmer", From be33430e81f8b65887b5bb3179e173fc016c8657 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Thu, 27 May 2021 09:53:59 +0800 Subject: [PATCH 073/254] Add in harvest farmer. (cherry picked from commit 52531669e650c92375be88a4246f146f0e06bcd0) --- scripts/initial.js | 8 ++++++++ services/vaults/tvl/handler.js | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/scripts/initial.js b/scripts/initial.js index 874ca07..677e7cf 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -7,6 +7,10 @@ db.vault_categories.insertMany([ { name: 'basic', contract_address: '0xEeCe6AD323a93d4B021BDAaC587DCC04b5cf0a78', symbol: 'cUSDT' }, { name: 'basic', contract_address: '0xd1D7f950899C0269a7F2aad5E854cdc3a1350ba9', symbol: 'cUSDC', }, { name: 'basic', contract_address: '0x43C20638C3914Eca3c96e9cAc8ebE7d652Be45c6', symbol: 'cDAI', }, + // TODO: add in mainnet contract addresss + // { name: 'basic', contract_address: '', symbol: 'hfUSDT'}, + // { name: 'basic', contract_address: '', symbol: 'hfUSDC'}, + // { name: 'basic', contract_address: '', symbol: 'hfDAI'}, ]); // Testnet Contracts @@ -18,6 +22,10 @@ db.vault_categories.insertMany([ { name: 'basic', contract_address: '0x5d102e0bdf2037899e1ff2e8cc50987108533c52', symbol: 'cUSDT' }, { name: 'basic', contract_address: '0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e', symbol: 'cUSDC', }, { name: 'basic', contract_address: '0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d', symbol: 'cDAI', }, + // TODO: update name for these harvest fighter series + { name: 'basic', contract_address: '0xb41a49de82e95dc1e028839c3440ac97f9a7832c', symbol: 'hfUSDT'}, + { name: 'basic', contract_address: '0x54783464848b35d6fb9bba37c1ddd23ac3b1a11a', symbol: 'hfUSDC'}, + { name: 'basic', contract_address: '0x0f89ee5b95d1d5cfb10f29775d816fc6d8adb9fc', symbol: 'hfDAI'}, ]); db.xdvg_token.insert({ diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index 33a4227..0a836ca 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -229,7 +229,15 @@ module.exports.getHistoricalTVLhandle = async (req, res) => { case db.cDaiFarmer: collection = db.cDaiFarmer; break; - case db. + case db.hfDaiFarmer: + collection = db.hfDaiFarmer; + break; + case db.hfUsdcFarmer: + collection = db.hfUsdcFarmer; + break; + case db.hfUsdtFarmer: + collection = db.hfUsdtFarmer; + break; default: res.status(200).json({ message: "Invalid Farmer", From 7221810967c8c18d628c15ec652e0538181fab2d Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Fri, 28 May 2021 09:08:26 +0800 Subject: [PATCH 074/254] Revert "Add in harvest farmer." This reverts commit 52531669e650c92375be88a4246f146f0e06bcd0. --- scripts/initial.js | 8 -------- services/vaults/tvl/handler.js | 10 +--------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/scripts/initial.js b/scripts/initial.js index 677e7cf..874ca07 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -7,10 +7,6 @@ db.vault_categories.insertMany([ { name: 'basic', contract_address: '0xEeCe6AD323a93d4B021BDAaC587DCC04b5cf0a78', symbol: 'cUSDT' }, { name: 'basic', contract_address: '0xd1D7f950899C0269a7F2aad5E854cdc3a1350ba9', symbol: 'cUSDC', }, { name: 'basic', contract_address: '0x43C20638C3914Eca3c96e9cAc8ebE7d652Be45c6', symbol: 'cDAI', }, - // TODO: add in mainnet contract addresss - // { name: 'basic', contract_address: '', symbol: 'hfUSDT'}, - // { name: 'basic', contract_address: '', symbol: 'hfUSDC'}, - // { name: 'basic', contract_address: '', symbol: 'hfDAI'}, ]); // Testnet Contracts @@ -22,10 +18,6 @@ db.vault_categories.insertMany([ { name: 'basic', contract_address: '0x5d102e0bdf2037899e1ff2e8cc50987108533c52', symbol: 'cUSDT' }, { name: 'basic', contract_address: '0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e', symbol: 'cUSDC', }, { name: 'basic', contract_address: '0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d', symbol: 'cDAI', }, - // TODO: update name for these harvest fighter series - { name: 'basic', contract_address: '0xb41a49de82e95dc1e028839c3440ac97f9a7832c', symbol: 'hfUSDT'}, - { name: 'basic', contract_address: '0x54783464848b35d6fb9bba37c1ddd23ac3b1a11a', symbol: 'hfUSDC'}, - { name: 'basic', contract_address: '0x0f89ee5b95d1d5cfb10f29775d816fc6d8adb9fc', symbol: 'hfDAI'}, ]); db.xdvg_token.insert({ diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index 0a836ca..33a4227 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -229,15 +229,7 @@ module.exports.getHistoricalTVLhandle = async (req, res) => { case db.cDaiFarmer: collection = db.cDaiFarmer; break; - case db.hfDaiFarmer: - collection = db.hfDaiFarmer; - break; - case db.hfUsdcFarmer: - collection = db.hfUsdcFarmer; - break; - case db.hfUsdtFarmer: - collection = db.hfUsdtFarmer; - break; + case db. default: res.status(200).json({ message: "Invalid Farmer", From 37b4f9abf95ad996d069c6d6906acd87424c5e8b Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Fri, 28 May 2021 09:08:42 +0800 Subject: [PATCH 075/254] Revert "Add Harvest Farmer into TVL model js. Add decimals handling if no decimals is returned and tvl value handling if tvl is undefined." This reverts commit 29c414db769be20e7e704d22b58201708c75dd37. --- models/tvl.model.js | 3 --- services/vaults/tvl/handler.js | 29 +++++++++-------------------- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/models/tvl.model.js b/models/tvl.model.js index 8c287e6..460a25a 100644 --- a/models/tvl.model.js +++ b/models/tvl.model.js @@ -51,7 +51,4 @@ module.exports = { cUsdtFarmer: "cUSDT_tvl", cUsdcFarmer: "cUSDC_tvl", cDaiFarmer: "cDAI_tvl", - hfDaiFarmer: "hfDAI_tvl", - hfUsdtFarmer: "hfUSDT_tvl", - hfUsdcFarmer: "hfUSDC_tvl", }; diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index 33a4227..60d7ec2 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -79,25 +79,15 @@ const getTokenPrice = async (coingecko_token_id) => { * TVL = poolAmount * tokenPrice */ const getTVL = async (vault) => { - try { - const { tokenId } = vault; - let tvl; - - const contract = getContract(vault); - const poolAmount = await getPoolAmount(contract); - - let decimals = await getDecimals(contract); - decimals = decimals ? decimals : 18; - - const tokenPrice = await getTokenPrice(tokenId); - - tvl = (poolAmount / 10 ** decimals) * tokenPrice; - - return tvl === undefined ? 0 : tvl; - } catch (err) { - console.log(err); - return 0; - } + const { tokenId } = vault; + let tvl; + const contract = getContract(vault); + const poolAmount = await getPoolAmount(contract); + const decimals = await getDecimals(contract); + const tokenPrice = await getTokenPrice(tokenId); + + tvl = (poolAmount / 10 ** decimals) * tokenPrice; + return tvl; }; // Get and Save all TVL of all Vaults @@ -229,7 +219,6 @@ module.exports.getHistoricalTVLhandle = async (req, res) => { case db.cDaiFarmer: collection = db.cDaiFarmer; break; - case db. default: res.status(200).json({ message: "Invalid Farmer", From 00ab8b2a8fc808ddaf6f7c465563261ec7fe2ac7 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Fri, 28 May 2021 09:09:29 +0800 Subject: [PATCH 076/254] Revert "1. Update contract address into lower case. 2. Add APR Calculation into historical handler for Harvest Farmer vault." This reverts commit 868fdbcbe42e9fb8a66fd8d71f93d8c21e5ae228. --- app.js | 4 +- config/serverless/domain.js | 36 +----- services/vaults/apy/save/historical-handle.js | 111 ++---------------- 3 files changed, 15 insertions(+), 136 deletions(-) diff --git a/app.js b/app.js index ead64b0..2fe8b3b 100644 --- a/app.js +++ b/app.js @@ -26,8 +26,8 @@ async function init() { if (err) throw err; // jobs.saveVault(); - // jobs.saveVaultAPY(); - // jobs.savePricePerFullShare(); + jobs.saveVaultAPY(); + jobs.savePricePerFullShare(); // jobs.saveHistoricalAPY(); jobs.saveHistoricalTVL(); }); diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 4dc23b2..daa5e99 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -138,25 +138,25 @@ const testContracts = { tokenId: "dai", }, 'hfDAI': { - address: '0x0f89ee5b95d1d5cfb10f29775d816fc6d8adb9fc', + address: '0x0f89EE5b95d1d5cfb10F29775d816fC6D8Adb9FC', abi: abi.hfVaultContract, - strategyAddress: '0x1032e051bc71d36d82f2fde298cee1311852dd29', + strategyAddress: '0x1032E051bc71D36D82F2FDE298cee1311852Dd29', strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "dai", }, 'hfUSDC': { - address: '0x54783464848b35d6fb9bba37c1ddd23ac3b1a11a', + address: '0x54783464848b35d6fb9bba37C1dDd23aC3B1A11A', abi: abi.hfVaultContract, - strategyAddress: '0xe5331caf0b4e15c88e878551b93df0647738af35', + strategyAddress: '0xE5331cAF0B4E15C88E878551b93df0647738Af35', strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "usd-coin", }, 'hfUSDT': { - address: '0xb41a49de82e95dc1e028839c3440ac97f9a7832c', + address: '0xb41A49De82e95dc1E028839C3440Ac97f9A7832C', abi: abi.hfVaultContract, - strategyAddress: '0x0bfa86d10a383b435748e39cedf8852cfd2b1a9d', + strategyAddress: '0x0bFA86d10A383B435748E39Cedf8852CFD2B1A9d', strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "tether", @@ -272,30 +272,6 @@ const mainContracts = { contractType: "compound", tokenId: "dai", }, - hfDAI: { - address: '', // TODO: Update that this to mainnet address - abi: abi.hfVaultContract, - strategyAddress: '', - strategyABI: abi.hfStrategyContract, - contractType: 'harvest', - tokenId: "dai", - }, - hfUSDC: { - address: '', // TODO: Update that this to mainnet address - abi: abi.hfVaultContract, - strategyAddress: '', - strategyABI: abi.hfStrategyContract, - contractType: 'harvest', - tokenId: "usd-coin", - }, - hfUSDT: { - address: '', // TODO: Update that this to mainnet address - abi: abi.hfVaultContract, - strategyAddress: '', - strategyABI: abi.hfStrategyContract, - contractType: 'harvest', - tokenId: "tether", - }, }, compund: { cUSDT: { diff --git a/services/vaults/apy/save/historical-handle.js b/services/vaults/apy/save/historical-handle.js index 9b156aa..dc5e464 100644 --- a/services/vaults/apy/save/historical-handle.js +++ b/services/vaults/apy/save/historical-handle.js @@ -132,75 +132,16 @@ const getApyForVault = async (vault) => { apyLoanscan: 0, compoundApy, }; - } else if (vault.isHarvest) { - // Harvest Vault - const vaultContract = new archiveNodeWeb3.eth.Contract(vault.vaultContractABI, vault.vaultContractAddress); - const strategyContract = new archiveNodeWeb3.eth.Contract(vault.strategyABI, vault.strategyContractAddress); - - // Get current price per full share - const pool = strategyContract.methods.pool().call(); - const totalSupply = vaultContract.methods.totalSupply().call(); - const currentPricePerFullShare = pool / totalSupply; - - const dataRequiredForCalculation = { - vaultContract, - strategyContract, - currentPricePerFullShare, - lastMeasurement: vault.lastMeasurement - }; - - // APR based on one day sample - Object.assign(dataRequiredForCalculation, { blockNumber: oneDayAgoBlock }); - const aprOneDaySample = await getHarvestFarmerAPR( - vaultContract, - strategyContract, - oneDayAgoBlock, - currentPricePerFullShare); - - // APR based on three day sample - Object.assign(dataRequiredForCalculation, { blockNumber: threeDaysAgoBlock }); - const aprThreeDaySample = await getHarvestFarmerAPR( - vaultContract, - strategyContract, - threeDaysAgoBlock, - currentPricePerFullShare); - - // APR based on one week sample - Object.assign(dataRequiredForCalculation, { blockNumber: oneWeekAgoBlock }); - const aprOneWeekSample = await getHarvestFarmerAPR( - vaultContract, - strategyContract, - oneWeekAgoBlock, - currentPricePerFullShare); - - // APR based on one month sample - Object.assign(dataRequiredForCalculation, { blockNumber: oneMonthAgoBlock }); - const aprOneMonthSample = await getHarvestFarmerAPR( - vaultContract, - strategyContract, - oneMonthAgoBlock, - currentPricePerFullShare); - - const aprData = { - aprOneDaySample, - aprThreeDaySample, - aprOneWeekSample, - aprOneMonthSample - } - - return { - ...aprData, - compoundApy: 0, - }; - }else { + } else { // Yearn Vault const pool = _.find(pools, { symbol }); var vaultContract; - // if (vault.isHarvest) { - // const envContracts = process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? mainContracts : testContracts; - // vaultContract = new archiveNodeWeb3.eth.Contract(envContracts.harvest[vault.id].abi, envContracts.harvest[vault.id].address); - // } else {} - vaultContract = new archiveNodeWeb3.eth.Contract(abi, address); + if (vault.isHarvest) { + const envContracts = process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? mainContracts : testContracts; + vaultContract = new archiveNodeWeb3.eth.Contract(envContracts.harvest[vault.id].abi, envContracts.harvest[vault.id].address); + } else { + vaultContract = new archiveNodeWeb3.eth.Contract(abi, address); + } const pricePerFullShareInception = await getPricePerFullShare( vaultContract, @@ -364,20 +305,6 @@ const getHistoricalAPY = async (startTime, contractAddress) => { case mainContracts.farmer['cUSDT'].address: result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.cUsdtFarmer); break; - case testContracts.farmer['hfDAI'].address: - case mainContracts.farmer['hfDAI'].address: - console.log("herererer"); - result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.hfDaiFarmer); - console.log("result", result); - break; - case testContracts.farmer['hfUSDC'].address: - case mainContracts.farmer['hfUSDC'].address: - result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.hfUsdcFarmer); - break; - case testContracts.farmer['hfUSDT'].address: - case mainContracts.farmer['hfUSDT'].address: - result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.hfUsdtFarmer); - break; } return result; @@ -432,30 +359,6 @@ const saveAndReadVault = async (vault) => { return data; }; -const getHarvestFarmerAPR = async (vaultData) => { - const { - vaultContract, - strategyContract, - currentPricePerFullShare, - lastMeasurement, - blockNumber, - } = vaultData; - - let apr = 0; - - // To ensure block number happens after contract creation - if(blockNumber >= lastMeasurement) { - const pool = await strategyContract.methods.pool().call(undefined, blockNumber); - const totalSupply = await vaultContract.methods.totalSupply().call(undefined, blockNumber); - - const pricePerFullShareOfBeforeDay = pool / totalSupply; - - // APR calculation - apr = (currentPricePerFullShare - pricePerFullShareOfBeforeDay) * 100 * 365; - } - return apr; -}; - module.exports.saveHandler = async () => { try { const oneDayAgo = moment().subtract(1, "days").valueOf(); From 7274229a00a6596d3de0db70a93080bd56439e89 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Fri, 28 May 2021 09:09:45 +0800 Subject: [PATCH 077/254] Revert "Add price per full share implementation for Harvest Farmer in savePricePerFullShare cronjob." This reverts commit 16bd9a33f56089d2d8386dbfd5678794afce5c58. --- app.js | 4 ++-- config/serverless/domain.js | 18 +++++++++--------- services/vaults/price/handler.js | 15 ++------------- 3 files changed, 13 insertions(+), 24 deletions(-) diff --git a/app.js b/app.js index 2fe8b3b..541f5ae 100644 --- a/app.js +++ b/app.js @@ -27,7 +27,7 @@ async function init() { // jobs.saveVault(); jobs.saveVaultAPY(); - jobs.savePricePerFullShare(); + // jobs.savePricePerFullShare(); // jobs.saveHistoricalAPY(); jobs.saveHistoricalTVL(); }); @@ -64,7 +64,7 @@ async function init() { app.get("/staking/get-pools", (req, res) => stakePool.getPools(req, res) ); - + app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument)); app.listen(port, () => console.log(`Listening on ${port}`)); diff --git a/config/serverless/domain.js b/config/serverless/domain.js index daa5e99..ec55b19 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -138,25 +138,25 @@ const testContracts = { tokenId: "dai", }, 'hfDAI': { - address: '0x0f89EE5b95d1d5cfb10F29775d816fC6D8Adb9FC', - abi: abi.hfVaultContract, - strategyAddress: '0x1032E051bc71D36D82F2FDE298cee1311852Dd29', + address: '0xf6cd30117e16feacaebd2bd30a6d682af6fb9844', + abi: abi.hfDAOContract, + strategyAddress: '0xd505538106e0e4fe73e913f990688f2eafd75901', strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "dai", }, 'hfUSDC': { - address: '0x54783464848b35d6fb9bba37C1dDd23aC3B1A11A', - abi: abi.hfVaultContract, - strategyAddress: '0xE5331cAF0B4E15C88E878551b93df0647738Af35', + address: '0xefd426cee17809039c84da8e37951c634901e427', + abi: abi.hfDAOContract, + strategyAddress: '0x3568bcd1d00db319dade2c5611c474e8f4d661d1', strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "usd-coin", }, 'hfUSDT': { - address: '0xb41A49De82e95dc1E028839C3440Ac97f9A7832C', - abi: abi.hfVaultContract, - strategyAddress: '0x0bFA86d10A383B435748E39Cedf8852CFD2B1A9d', + address: '0xb0f92a610e83602bf5df258265dbe1561ae33e85', + abi: abi.hfDAOContract, + strategyAddress: '0x5f75141042e8ac06a6f7aecac665acad228faae1', strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "tether", diff --git a/services/vaults/price/handler.js b/services/vaults/price/handler.js index 3f7e521..93dbaaf 100644 --- a/services/vaults/price/handler.js +++ b/services/vaults/price/handler.js @@ -47,19 +47,8 @@ const getCurrentPrice = async () => { price: 0 }).catch((err) => console.log('err', err)); } else if (contracts.farmer[key].contractType === 'harvest') { - // Get vault contract and strategy contract - const vaultContract = getContract(contracts.farmer[key].abi, contracts.farmer[key].address); - const strategyContract = getContract(contracts.farmer[key].strategyABI, contracts.farmer[key].strategyAddress); - - // Get pool - const pool = await strategyContract.methods.pool().call(); - - // Get total supply - const totalSupply = await vaultContract.methods.totalSupply().call(); - - // Calculate price per full share - const pricePerFullShare = pool / totalSupply; - + const contract = getContract(contracts.harvest[key].abi, contracts.harvest[key].address); + const pricePerFullShare = await getPricePerFullShare(contract); await db.add(key + '_price', { earnPrice: 0, vaultPrice: 0, From 862f652ae470f60a3daf568b3322c678a1d44b71 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Fri, 28 May 2021 09:10:01 +0800 Subject: [PATCH 078/254] Revert "Add APR Calculation for Harvest Farmer pools" This reverts commit 9c5d56563db942a5354de88c624b8d10fb5e9084. --- app.js | 4 +- config/abi.js | 904 ++-------------------------- services/vaults/apy/save/handler.js | 102 +--- services/vaults/apy/save/vaults.js | 30 +- 4 files changed, 84 insertions(+), 956 deletions(-) diff --git a/app.js b/app.js index 541f5ae..ead64b0 100644 --- a/app.js +++ b/app.js @@ -26,7 +26,7 @@ async function init() { if (err) throw err; // jobs.saveVault(); - jobs.saveVaultAPY(); + // jobs.saveVaultAPY(); // jobs.savePricePerFullShare(); // jobs.saveHistoricalAPY(); jobs.saveHistoricalTVL(); @@ -64,7 +64,7 @@ async function init() { app.get("/staking/get-pools", (req, res) => stakePool.getPools(req, res) ); - + app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument)); app.listen(port, () => console.log(`Listening on ${port}`)); diff --git a/config/abi.js b/config/abi.js index ac5fdeb..4b6c990 100644 --- a/config/abi.js +++ b/config/abi.js @@ -12207,7 +12207,7 @@ const hfDAOContract = [ } ]; -const hfStrategyContract =[ +const hfStrategyContract = [ { "anonymous": false, "inputs": [ @@ -12284,6 +12284,19 @@ const hfStrategyContract =[ "name": "SetTreasuryWallet", "type": "event" }, + { + "inputs": [], + "name": "DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "FARM", @@ -12332,12 +12345,12 @@ const hfStrategyContract =[ }, { "inputs": [], - "name": "communityWallet", + "name": "communityFee", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", @@ -12345,10 +12358,10 @@ const hfStrategyContract =[ }, { "inputs": [], - "name": "daoVault", + "name": "communityWallet", "outputs": [ { - "internalType": "contract IDAOVault2", + "internalType": "address", "name": "", "type": "address" } @@ -12357,31 +12370,25 @@ const hfStrategyContract =[ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "daoVault", + "outputs": [ { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" + "internalType": "contract IDAOVault2", + "name": "", + "type": "address" } ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "getCurrentBalance", + "inputs": [], + "name": "deadline", "outputs": [ { "internalType": "uint256", - "name": "result", + "name": "", "type": "uint256" } ], @@ -12389,16 +12396,16 @@ const hfStrategyContract =[ "type": "function" }, { - "inputs": [], - "name": "getPseudoPool", - "outputs": [ + "inputs": [ { "internalType": "uint256", - "name": "pseudoPool", + "name": "_amount", "type": "uint256" } ], - "stateMutability": "view", + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { @@ -12475,13 +12482,6 @@ const hfStrategyContract =[ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "invest", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "isVesting", @@ -12538,7 +12538,7 @@ const hfStrategyContract =[ "inputs": [ { "internalType": "uint256", - "name": "_amount", + "name": "_shares", "type": "uint256" } ], @@ -12587,6 +12587,19 @@ const hfStrategyContract =[ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_seconds", + "type": "uint256" + } + ], + "name": "setDeadline", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -12665,6 +12678,19 @@ const hfStrategyContract =[ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "treasuryFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "treasuryWallet", @@ -12707,815 +12733,13 @@ const hfStrategyContract =[ } ], "name": "withdraw", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "outputs": [], "stateMutability": "nonpayable", "type": "function" } ]; -const hfVaultContract = [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "fromStrategy", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "toStrategy", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "MigrateFunds", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldCommunityWallet", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newCommunityWallet", - "type": "address" - } - ], - "name": "SetCommunityWallet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldCustomNetworkFeePercentage", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newCustomNetworkFeePercentage", - "type": "uint256" - } - ], - "name": "SetCustomNetworkFeePercentage", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "oldCustomNetworkFeeTier", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "newCustomNetworkFeeTier", - "type": "uint256" - } - ], - "name": "SetCustomNetworkFeeTier", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256[]", - "name": "oldNetworkFeePercentage", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "newNetworkFeePercentage", - "type": "uint256[]" - } - ], - "name": "SetNetworkFeePercentage", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256[]", - "name": "oldNetworkFeeTier2", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "newNetworkFeeTier2", - "type": "uint256[]" - } - ], - "name": "SetNetworkFeeTier2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldTreasuryWallet", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newTreasuryWallet", - "type": "address" - } - ], - "name": "SetTreasuryWallet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "canSetPendingStrategy", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "communityWallet", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "customNetworkFeePercentage", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "customNetworkFeeTier", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_vaultName", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "_token", - "type": "address" - }, - { - "internalType": "address", - "name": "_strategy", - "type": "address" - }, - { - "internalType": "address", - "name": "_owner", - "type": "address" - } - ], - "name": "init", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "invest", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "migrateFunds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "networkFeePercentage", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "networkFeeTier2", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingStrategy", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "refund", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_communityWallet", - "type": "address" - } - ], - "name": "setCommunityWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_percentage", - "type": "uint256" - } - ], - "name": "setCustomNetworkFeePercentage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_customNetworkFeeTier", - "type": "uint256" - } - ], - "name": "setCustomNetworkFeeTier", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_networkFeePercentage", - "type": "uint256[]" - } - ], - "name": "setNetworkFeePercentage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_networkFeeTier2", - "type": "uint256[]" - } - ], - "name": "setNetworkFeeTier2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_pendingStrategy", - "type": "address" - } - ], - "name": "setPendingStrategy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_treasuryWallet", - "type": "address" - } - ], - "name": "setTreasuryWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "strategy", - "outputs": [ - { - "internalType": "contract IStrategy2", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "contract IERC20Upgradeable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "treasuryWallet", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unlockMigrateFunds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unlockTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "vaultName", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_shares", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -]; +const hfVault = [{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Invest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newStrategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"StrategyAnnounced","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newStrategy","type":"address"},{"indexed":false,"internalType":"address","name":"oldStrategy","type":"address"}],"name":"StrategyChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_strategy","type":"address"}],"name":"announceStrategyUpdate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"availableToInvestOut","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_strategy","type":"address"}],"name":"canUpdateStrategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"controller","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"holder","type":"address"}],"name":"depositFor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"doHardWork","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"finalizeStrategyUpdate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"finalizeUpgrade","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"futureStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getPricePerFullShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint8","name":"decimals","type":"uint8"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_underlying","type":"address"},{"internalType":"uint256","name":"_toInvestNumerator","type":"uint256"},{"internalType":"uint256","name":"_toInvestDenominator","type":"uint256"},{"internalType":"uint256","name":"_underlyingUnit","type":"uint256"},{"internalType":"uint256","name":"_implementationChangeDelay","type":"uint256"},{"internalType":"uint256","name":"_strategyChangeDelay","type":"uint256"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_storage","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_storage","type":"address"},{"internalType":"address","name":"_underlying","type":"address"},{"internalType":"uint256","name":"_toInvestNumerator","type":"uint256"},{"internalType":"uint256","name":"_toInvestDenominator","type":"uint256"}],"name":"initializeVault","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"nextImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"nextImplementationDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"nextImplementationTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"rebalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"impl","type":"address"}],"name":"scheduleUpgrade","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_store","type":"address"}],"name":"setStorage","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_strategy","type":"address"}],"name":"setStrategy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"numerator","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"setVaultFractionToInvest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"shouldUpgrade","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"strategy","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"strategyTimeLock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"strategyUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"underlying","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"underlyingBalanceInVault","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"underlyingBalanceWithInvestment","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"holder","type":"address"}],"name":"underlyingBalanceWithInvestmentForHolder","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"underlyingUnit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vaultFractionToInvestDenominator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vaultFractionToInvestNumerator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"numberOfShares","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}] module.exports = { earnUSDTABIContract, @@ -13541,5 +12765,5 @@ module.exports = { cUSDCContract, hfDAOContract, hfStrategyContract, - hfVaultContract, + hfVault, }; diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index 2de82ea..ebb0389 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -133,78 +133,16 @@ const getApyForVault = async (vault) => { apyLoanscan: 0, compoundApy, }; - } else if (vault.isHarvest) { - // Harvest Vault - const vaultContract = new archiveNodeWeb3.eth.Contract(vault.vaultContractABI, vault.vaultContractAddress); - const strategyContract = new archiveNodeWeb3.eth.Contract(vault.strategyABI, vault.strategyContractAddress); - - // Get current price per full share - const pool = strategyContract.methods.pool().call(); - const totalSupply = vaultContract.methods.totalSupply().call(); - const currentPricePerFullShare = pool / totalSupply; - - const dataRequiredForCalculation = { - vaultContract, - strategyContract, - currentPricePerFullShare, - lastMeasurement: vault.lastMeasurement - }; - - // APR based on one day sample - Object.assign(dataRequiredForCalculation, { blockNumber: oneDayAgoBlock }); - const aprOneDaySample = await getHarvestFarmerAPR( - vaultContract, - strategyContract, - oneDayAgoBlock, - currentPricePerFullShare); - - // APR based on three day sample - Object.assign(dataRequiredForCalculation, { blockNumber: threeDaysAgoBlock }); - const aprThreeDaySample = await getHarvestFarmerAPR( - vaultContract, - strategyContract, - threeDaysAgoBlock, - currentPricePerFullShare); - - // APR based on one week sample - Object.assign(dataRequiredForCalculation, { blockNumber: oneWeekAgoBlock }); - const aprOneWeekSample = await getHarvestFarmerAPR( - vaultContract, - strategyContract, - oneWeekAgoBlock, - currentPricePerFullShare); - - // APR based on one month sample - Object.assign(dataRequiredForCalculation, { blockNumber: oneMonthAgoBlock }); - const aprOneMonthSample = await getHarvestFarmerAPR( - vaultContract, - strategyContract, - oneMonthAgoBlock, - currentPricePerFullShare); - - const aprData = { - aprOneDaySample, - aprThreeDaySample, - aprOneWeekSample, - aprOneMonthSample - } - - return { - ...aprData, - compoundApy: 0, - }; - } else { // Yearn Vault const pool = _.find(pools, { symbol }); var vaultContract; - - // if (vault.isHarvest) { - // const envContracts = process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? mainContracts : testContracts; - // vaultContract = new archiveNodeWeb3.eth.Contract(envContracts.harvest[vault.id].abi, envContracts.harvest[vault.id].address); - // } else {} - - vaultContract = new archiveNodeWeb3.eth.Contract(abi, address); + if (vault.isHarvest) { + const envContracts = process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? mainContracts : testContracts; + vaultContract = new archiveNodeWeb3.eth.Contract(envContracts.harvest[vault.id].abi, envContracts.harvest[vault.id].address); + } else { + vaultContract = new archiveNodeWeb3.eth.Contract(abi, address); + } const pricePerFullShareInception = await getPricePerFullShare( vaultContract, @@ -350,14 +288,11 @@ const readVault = async (vault) => { vaultContractAddress: address, erc20address: tokenAddress, } = vault; - console.log(`Reading vault ${vault.name}`); - if (!abi || !address) { console.log(`Vault ABI not found: ${name}`); return null; } - // const contract = new infuraWeb3.eth.Contract(abi, address); const apy = await getApyForVault(vault); @@ -373,35 +308,10 @@ const readVault = async (vault) => { timestamp: Date.now(), ...apy, }; - await saveVaultWithApy(data); return data; }; -const getHarvestFarmerAPR = async (vaultData) => { - const { - vaultContract, - strategyContract, - currentPricePerFullShare, - lastMeasurement, - blockNumber, - } = vaultData; - - let apr = 0; - - // To ensure block number happens after contract creation - if(blockNumber >= lastMeasurement) { - const pool = await strategyContract.methods.pool().call(undefined, blockNumber); - const totalSupply = await vaultContract.methods.totalSupply().call(undefined, blockNumber); - - const pricePerFullShareOfBeforeDay = pool / totalSupply; - - // APR calculation - apr = (currentPricePerFullShare - pricePerFullShareOfBeforeDay) * 100 * 365; - } - return apr; -}; - module.exports.handler = async () => { try { const oneDayAgo = moment().subtract(1, "days").valueOf(); diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 08b4342..9ec5be8 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -151,11 +151,9 @@ module.exports = [ symbol: "DAI", description: "DAI Stablecoin", vaultSymbol: "hfDAI", - erc20address: "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa", - vaultContractAddress: "0x0f89EE5b95d1d5cfb10F29775d816fC6D8Adb9FC", - vaultContractABI: abi.hfVaultContract, - strategyContractAddress: "0xE5331cAF0B4E15C88E878551b93df0647738Af35", - strategyABI: abi.hfStrategyContract, + erc20address: "0x5592ec0cfb4dbc12d3ab100b257153436a1f0fea", + vaultContractAddress: "0xf6cd30117e16feacaebd2bd30a6d682af6fb9844", + vaultContractABI: config.daoVaultABI, balance: 0, vaultBalance: 0, decimals: 18, @@ -163,7 +161,7 @@ module.exports = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 24943134, + lastMeasurement: 10650116, measurement: 1e18, price_id: "dai", isHarvest: true @@ -174,11 +172,9 @@ module.exports = [ symbol: "USDC", description: "USD//C", vaultSymbol: "hfUSDC", - erc20address: "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", - vaultContractAddress: "0x54783464848b35d6fb9bba37C1dDd23aC3B1A11A", - vaultContractABI: abi.hfVaultContract, - strategyContractAddress: "0xE5331cAF0B4E15C88E878551b93df0647738Af35", - strategyABI: abi.hfStrategyContract, + erc20address: "0x4dbcdf9b62e891a7cec5a2568c3f4faf9e8abe2b", + vaultContractAddress: "0xefd426cee17809039c84da8e37951c634901e427", + vaultContractABI: config.daoVaultABI, balance: 0, vaultBalance: 0, decimals: 18, @@ -186,7 +182,7 @@ module.exports = [ depositAll: false, withdraw: true, withdrawAll: false, - lastMeasurement: 24943141, + lastMeasurement: 10532708, measurement: 1e18, price_id: "usd-coin", isHarvest: true @@ -197,11 +193,9 @@ module.exports = [ symbol: "USDT", description: "Tether USD", vaultSymbol: "hfUSDT", - erc20address: "0x07de306ff27a2b630b1141956844eb1552b956b5", - vaultContractAddress: "0xb41A49De82e95dc1E028839C3440Ac97f9A7832C", - vaultContractABI: abi.hfVaultContract, - strategyContractAddress: "0x0bFA86d10A383B435748E39Cedf8852CFD2B1A9d", - strategyABI: abi.hfStrategyContract, + erc20address: "0xd9ba894e0097f8cc2bbc9d24d308b98e36dc6d02", + vaultContractAddress: "0xb0f92a610e83602bf5df258265dbe1561ae33e85", + vaultContractABI: config.daoVaultABI, balance: 0, vaultBalance: 0, decimals: 18, @@ -209,7 +203,7 @@ module.exports = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 24943148, + lastMeasurement: 10651402, measurement: 1e18, price_id: "tether", isHarvest: true From ecb30cb0251092510fade4765eef17c41f8a7c76 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Sun, 30 May 2021 07:06:58 +0800 Subject: [PATCH 079/254] - Added Citadel Strategy (Pending confirmation for DAOmine for Citadel) --- config/abi.js | 6 ++ config/serverless/domain.js | 22 ++++++- models/historical-apy.model.js | 1 + models/price.model.js | 1 + models/tvl.model.js | 1 + scripts/initial.js | 9 +++ services/user/vaults/statistics/handler.js | 8 ++- services/vaults/apy/save/abis/vaultCitadel.js | 1 + services/vaults/apy/save/config.js | 2 + services/vaults/apy/save/handler.js | 51 +++++++++++++++++ services/vaults/apy/save/historical-handle.js | 57 ++++++++++++++++++- services/vaults/apy/save/vaults.js | 25 ++++++++ services/vaults/price/handler.js | 41 ++++++++++--- services/vaults/tvl/handler.js | 31 +++++++--- 14 files changed, 235 insertions(+), 21 deletions(-) create mode 100644 services/vaults/apy/save/abis/vaultCitadel.js diff --git a/config/abi.js b/config/abi.js index 5b1edbf..97701b4 100644 --- a/config/abi.js +++ b/config/abi.js @@ -16096,6 +16096,10 @@ const daoStakeContract = [ const uniswapPairABIContract = [{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount0Out","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1Out","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Swap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint112","name":"reserve0","type":"uint112"},{"indexed":false,"internalType":"uint112","name":"reserve1","type":"uint112"}],"name":"Sync","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MINIMUM_LIQUIDITY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"burn","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getReserves","outputs":[{"internalType":"uint112","name":"_reserve0","type":"uint112"},{"internalType":"uint112","name":"_reserve1","type":"uint112"},{"internalType":"uint32","name":"_blockTimestampLast","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token0","type":"address"},{"internalType":"address","name":"_token1","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"kLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"liquidity","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"price0CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"price1CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"skim","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount0Out","type":"uint256"},{"internalType":"uint256","name":"amount1Out","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"swap","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"sync","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"token0","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token1","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]; +const citadelABIContract = [{"inputs":[{"internalType":"address","name":"_strategy","type":"address"},{"internalType":"address","name":"_treasuryWallet","type":"address"},{"internalType":"address","name":"_communityWallet","type":"address"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_strategist","type":"address"},{"internalType":"address","name":"_biconomy","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenDeposit","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_balanceOfWETH","type":"uint256"}],"name":"ETHToInvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fromStrategy","type":"address"},{"indexed":true,"internalType":"address","name":"toStrategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MigrateFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldCustomNetworkFeePerc","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCustomNetworkFeePerc","type":"uint256"}],"name":"SetCustomNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldCustomNetworkFeeTier","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newCustomNetworkFeeTier","type":"uint256"}],"name":"SetCustomNetworkFeeTier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeePerc","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeePerc","type":"uint256[]"}],"name":"SetNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeeTier2","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeeTier2","type":"uint256[]"}],"name":"SetNetworkFeeTier2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldProfileSharingFeePerc","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newProfileSharingFeePerc","type":"uint256"}],"name":"SetProfitSharingFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fees","type":"uint256"}],"name":"TransferredOutFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenWithdraw","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"LOCKTIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"biconomy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canSetPendingStrategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeeTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllPoolInETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllPoolInUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"getReimburseTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"migrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeeTier2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"profitSharingFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reimburseTokenFromStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reinvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_biconomy","type":"address"}],"name":"setBiconomy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"}],"name":"setCommunityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setCustomNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_customNetworkFeeTier","type":"uint256"}],"name":"setCustomNetworkFeeTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeePerc","type":"uint256[]"}],"name":"setNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeeTier2","type":"uint256[]"}],"name":"setNetworkFeeTier2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pendingStrategy","type":"address"}],"name":"setPendingStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_percentages","type":"uint256[]"}],"name":"setPercTokenKeepInVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setProfitSharingFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"contract ICitadelStrategy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenFrom","type":"uint256"},{"internalType":"uint256","name":"_tokenTo","type":"uint256"}],"name":"swapTokenWithinVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trustedForwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockMigrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"versionRecipient","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}] + +const citadelStrategyABIContract = [{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"},{"internalType":"address","name":"_strategist","type":"address"},{"internalType":"address","name":"_admin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"AddLiquidity","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"CurrentComposition","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"ETHToInvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"LatestLPTokenPrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"TargetComposition","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"YieldAmount","type":"event"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"curveSplit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getTotalPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reimburse","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reinvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"contract ICitadelVault","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yieldFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]; + module.exports = { earnUSDTABIContract, earnUSDCABIContract, @@ -16122,4 +16126,6 @@ module.exports = { DVGABIContract, daoStakeContract, uniswapPairABIContract, + citadelABIContract, + citadelStrategyABIContract, }; diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 621d4a3..0fa4bab 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -136,6 +136,14 @@ const testContracts = { contractType: "compound", tokenId: "dai", }, + daoCDV: { + address: "0x00ba7142d3ea3f59a69cc37bfcea4cebf68c63aa", + abi: abi.citadelABIContract, + strategyAddress: "0x02281600cBf6E072850f8Aa77f03E1C722B3A216", + strategyABI: abi.citadelStrategyABIContract, + contractType: "citadel", + tokenId: ["tether", "usd-coin", "dai"], + } }, vipDVG: { address: "0x3aa8e8B6D3562a1E7aCB0dddD02b27896C00c424", @@ -255,6 +263,14 @@ const mainContracts = { contractType: "compound", tokenId: "dai", }, + daoCDV: { + address: "", // TODO Update on mainnet + abi: abi.citadelABIContract, + strategyAddress: "", // TODO Update on mainnet + strategyABI: abi.citadelStrategyABIContract, + contractType: "citadel", + tokenId: ["tether", "usd-coin", "dai"], + } }, compund: { cUSDT: { @@ -281,14 +297,14 @@ const mainContracts = { tokenId: "DVG", }, daoStake: { - address: "", // Update mainnet address + address: "", // TODO Update mainnet address abi: abi.daoStakeContract, - startBlock: 25055584, // Update mainnet block + startBlock: 25055584, // TODO Update mainnet block poolPercent: 0.51 }, uniswap: { ethDVG: { - address: "", // Update mainnet address + address: "", // TODO Update mainnet address abi: abi.uniswapPairABIContract, } } diff --git a/models/historical-apy.model.js b/models/historical-apy.model.js index 8c6180b..cb0b41f 100644 --- a/models/historical-apy.model.js +++ b/models/historical-apy.model.js @@ -34,4 +34,5 @@ module.exports = { cUsdtFarmer: 'cUSDT_historical-apy', cUsdcFarmer: 'cUSDC_historical-apy', cDaiFarmer: 'cDAI_historical-apy', + daoCDVFarmer: 'daoCDV_historical-apy', }; \ No newline at end of file diff --git a/models/price.model.js b/models/price.model.js index aed0668..c36dd06 100644 --- a/models/price.model.js +++ b/models/price.model.js @@ -34,4 +34,5 @@ module.exports = { cUsdtFarmer: 'cUSDT_price', cUsdcFarmer: 'cUSDC_price', cDaiFarmer: 'cDAI_price', + daoCDVFarmer: 'daoCDV_price', }; \ No newline at end of file diff --git a/models/tvl.model.js b/models/tvl.model.js index d5598d2..01f4130 100644 --- a/models/tvl.model.js +++ b/models/tvl.model.js @@ -61,4 +61,5 @@ module.exports = { cUsdtFarmer: "cUSDT_tvl", cUsdcFarmer: "cUSDC_tvl", cDaiFarmer: "cDAI_tvl", + daoCDVFarmer: "daoCDV_tvl", }; diff --git a/scripts/initial.js b/scripts/initial.js index 3db391e..b9f7162 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -18,6 +18,7 @@ db.vault_categories.insertMany([ { name: 'basic', contract_address: '0x5d102e0bdf2037899e1ff2e8cc50987108533c52', symbol: 'cUSDT' }, { name: 'basic', contract_address: '0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e', symbol: 'cUSDC', }, { name: 'basic', contract_address: '0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d', symbol: 'cDAI', }, + { name: 'degen', contract_address: '0x00ba7142d3ea3f59a69cc37bfcea4cebf68c63aa', symbol: 'daoCDV', }, ]); db.xdvg_token.insert({ @@ -97,5 +98,13 @@ db.stake_pool.insertMany([ pid: '7', category: 'basic', tokenId: 'ethDVG' + }, + { + name: 'daoCDV', + contract_address: '0x00ba7142D3ea3f59A69cC37BfCeA4CEbf68C63aA', + status: 'A', + pid: '8', + category: 'degen', + tokenId: 'ethereum' } ]); \ No newline at end of file diff --git a/services/user/vaults/statistics/handler.js b/services/user/vaults/statistics/handler.js index e094b36..9613d7d 100644 --- a/services/user/vaults/statistics/handler.js +++ b/services/user/vaults/statistics/handler.js @@ -85,6 +85,8 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => type = testContracts.farmer[symbol].contractType; } + const depositedShares = await getDepositedShares(vaultContract, userAddress); + let depositedAmount = new BigNumber(0); if (type === 'yearn') { const earnDepositAmount = await strategyContract.methods.getEarnDepositBalance(userAddress).call(); @@ -94,10 +96,12 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => } else if (type === 'compound') { depositedAmount = await strategyContract.methods.getCurrentBalance(userAddress).call(); depositedAmount = new BigNumber(depositedAmount); + } else if (type === 'citadel') { + const pool = await vaultContract.methods.getAllPoolInETH().call(); + const totalSupply = await vaultContract.methods.totalSupply().call(); + depositedAmount = new BigNumber(pool).times(depositedShares).div(totalSupply); } - const depositedShares = await getDepositedShares(vaultContract, userAddress); - const { deposits, withdrawals, diff --git a/services/vaults/apy/save/abis/vaultCitadel.js b/services/vaults/apy/save/abis/vaultCitadel.js new file mode 100644 index 0000000..ec0665d --- /dev/null +++ b/services/vaults/apy/save/abis/vaultCitadel.js @@ -0,0 +1 @@ +module.exports = [{"inputs":[{"internalType":"address","name":"_strategy","type":"address"},{"internalType":"address","name":"_treasuryWallet","type":"address"},{"internalType":"address","name":"_communityWallet","type":"address"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_strategist","type":"address"},{"internalType":"address","name":"_biconomy","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenDeposit","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_balanceOfWETH","type":"uint256"}],"name":"ETHToInvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fromStrategy","type":"address"},{"indexed":true,"internalType":"address","name":"toStrategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MigrateFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldCustomNetworkFeePerc","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCustomNetworkFeePerc","type":"uint256"}],"name":"SetCustomNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldCustomNetworkFeeTier","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newCustomNetworkFeeTier","type":"uint256"}],"name":"SetCustomNetworkFeeTier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeePerc","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeePerc","type":"uint256[]"}],"name":"SetNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeeTier2","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeeTier2","type":"uint256[]"}],"name":"SetNetworkFeeTier2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldProfileSharingFeePerc","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newProfileSharingFeePerc","type":"uint256"}],"name":"SetProfitSharingFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fees","type":"uint256"}],"name":"TransferredOutFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenWithdraw","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"LOCKTIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"biconomy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canSetPendingStrategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeeTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllPoolInETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllPoolInUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"getReimburseTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"migrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeeTier2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"profitSharingFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reimburseTokenFromStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reinvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_biconomy","type":"address"}],"name":"setBiconomy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"}],"name":"setCommunityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setCustomNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_customNetworkFeeTier","type":"uint256"}],"name":"setCustomNetworkFeeTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeePerc","type":"uint256[]"}],"name":"setNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeeTier2","type":"uint256[]"}],"name":"setNetworkFeeTier2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pendingStrategy","type":"address"}],"name":"setPendingStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_percentages","type":"uint256[]"}],"name":"setPercTokenKeepInVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setProfitSharingFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"contract ICitadelStrategy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenFrom","type":"uint256"},{"internalType":"uint256","name":"_tokenTo","type":"uint256"}],"name":"swapTokenWithinVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trustedForwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockMigrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"versionRecipient","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/services/vaults/apy/save/config.js b/services/vaults/apy/save/config.js index 883a27f..213885c 100644 --- a/services/vaults/apy/save/config.js +++ b/services/vaults/apy/save/config.js @@ -3,6 +3,7 @@ const vaultContractV2ABI = require("./abis/vaultV2"); const vaultContractV3ABI = require("./abis/vaultV3"); const vaultContractV4ABI = require("./abis/vaultV4"); const vaultContractV5ABI = require("./abis/vaultV5"); +const vaultCitadelABI = require("./abis/vaultCitadel"); module.exports = { delayTime: 1000, @@ -11,4 +12,5 @@ module.exports = { vaultContractV3ABI, vaultContractV4ABI, vaultContractV5ABI, + vaultCitadelABI, }; diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index 80a2a37..1949f49 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -70,6 +70,28 @@ const getCompoundSupplyApy = async (cToken) => { return supplyApy; }; +const getCitadelPricePerFullShare = async (contract, block, inceptionBlockNbr) => { + const contractDidntExist = block < inceptionBlockNbr; + const inceptionBlock = block === inceptionBlockNbr; + + if (inceptionBlock) { + return 1e18; + } + if (contractDidntExist) { + return 0; + } + + let pricePerFullShare = 0; + try { + const pool = await contract.methods.getAllPoolInETH().call(undefined, block); + const totalSupply = await contract.methods.totalSupply().call(undefined, block); + pricePerFullShare = pool / totalSupply; + } catch (ex) {} + + await delay(delayTime); + return pricePerFullShare; +} + const getVirtualPrice = async (address, block) => { const poolContract = new archiveNodeWeb3.eth.Contract(poolABI, address); const virtualPrice = await poolContract.methods @@ -132,7 +154,35 @@ const getApyForVault = async (vault) => { apyOneMonthSample: 0, apyLoanscan: 0, compoundApy, + citadelApy: 0, }; + } else if (vault.isCitadel) { + // Citadel Vault + let contract; + if (process.env.PRODUCTION != '') { + contract = new archiveNodeWeb3.eth.Contract(mainContracts.farmer['daoCDV'].abi, mainContracts.farmer['daoCDV'].address); + } else { + contract = new archiveNodeWeb3.eth.Contract(testContracts.farmer['daoCDV'].abi, testContracts.farmer['daoCDV'].address); + } + + const pricePerFullShareCurrent = await getCitadelPricePerFullShare(contract, currentBlockNbr, inceptionBlockNbr); + const pricePerFullShareOneDayAgo = await getCitadelPricePerFullShare(contract, oneDayAgoBlock, inceptionBlockNbr); + + // APY Calculation + const n = 365 / 2; // Assume 2 days to trigger invest function + const apr = (pricePerFullShareCurrent - pricePerFullShareOneDayAgo) * n; + const apy = Math.pow((1 + apr / n), n) - 1; + + return { + apyInceptionSample: 0, + apyOneDaySample: 0, + apyThreeDaySample: 0, + apyOneWeekSample: 0, + apyOneMonthSample: 0, + apyLoanscan: 0, + compoundApy: 0, + citadelApy: apy, + } } else { // Yearn Vault const pool = _.find(pools, { symbol }); @@ -252,6 +302,7 @@ const getApyForVault = async (vault) => { ...apyData, apyLoanscan, compoundApy: 0, + citadelApy: 0, }; } }; diff --git a/services/vaults/apy/save/historical-handle.js b/services/vaults/apy/save/historical-handle.js index f5f8417..bbd4caf 100644 --- a/services/vaults/apy/save/historical-handle.js +++ b/services/vaults/apy/save/historical-handle.js @@ -101,6 +101,28 @@ const getPricePerFullShare = async ( return pricePerFullShare; }; +const getCitadelPricePerFullShare = async (contract, block, inceptionBlockNbr) => { + const contractDidntExist = block < inceptionBlockNbr; + const inceptionBlock = block === inceptionBlockNbr; + + if (inceptionBlock) { + return 1e18; + } + if (contractDidntExist) { + return 0; + } + + let pricePerFullShare = 0; + try { + const pool = await contract.methods.getAllPoolInETH().call(undefined, block); + const totalSupply = await contract.methods.totalSupply().call(undefined, block); + pricePerFullShare = pool / totalSupply; + } catch (ex) {} + + await delay(delayTime); + return pricePerFullShare; +}; + const getApyForVault = async (vault) => { const { lastMeasurement: inceptionBlockNbr, @@ -129,7 +151,35 @@ const getApyForVault = async (vault) => { apyOneMonthSample: 0, apyLoanscan: 0, compoundApy, + citadelApy: 0, }; + } else if (vault.isCitadel) { + // Citadel Vault + let contract; + if (process.env.PRODUCTION != '') { + contract = new archiveNodeWeb3.eth.Contract(mainContracts.farmer['daoCDV'].abi, mainContracts.farmer['daoCDV'].address); + } else { + contract = new archiveNodeWeb3.eth.Contract(testContracts.farmer['daoCDV'].abi, testContracts.farmer['daoCDV'].address); + } + + const pricePerFullShareCurrent = await getCitadelPricePerFullShare(contract, currentBlockNbr, inceptionBlockNbr); + const pricePerFullShareOneDayAgo = await getCitadelPricePerFullShare(contract, oneDayAgoBlock, inceptionBlockNbr); + + // APY Calculation + const n = 365 / 2; // Assume 2 days to trigger invest function + const apr = (pricePerFullShareCurrent - pricePerFullShareOneDayAgo) * n; + const apy = Math.pow((1 + apr / n), n) - 1; + + return { + apyInceptionSample: 0, + apyOneDaySample: 0, + apyThreeDaySample: 0, + apyOneWeekSample: 0, + apyOneMonthSample: 0, + apyLoanscan: 0, + compoundApy: 0, + citadelApy: apy, + } } else { // Yearn Vault const pool = _.find(pools, { symbol }); @@ -249,6 +299,7 @@ const getApyForVault = async (vault) => { ...apyData, apyLoanscan, compoundApy: 0, + citadelApy: 0, }; } }; @@ -300,6 +351,10 @@ const getHistoricalAPY = async (startTime, contractAddress) => { case mainContracts.farmer['cUSDT'].address: result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.cUsdtFarmer); break; + case testContracts.farmer['daoCDV'].address: + case mainContracts.farmer['daoCDV'].address: + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.daoCDVFarmer); + break; } return result; @@ -322,7 +377,7 @@ const saveAndReadVault = async (vault) => { } const apy = await getApyForVault(vault); var aprs = 0; - if (!vault.isCompound && process.env.PRODUCTION != '') { + if (vault.isYearn && process.env.PRODUCTION != '') { const aprContract = new infuraWeb3.eth.Contract(aggregatedContractABI, aggregatedContractAddress); var call = 'getAPROptions';//+asset.symbol diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 6916ebd..d0f9808 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -84,6 +84,7 @@ module.exports = [ lastMeasurement: 24563615, measurement: 1e18, price_id: "dai", + isYearn: true, }, { id: "TUSD", @@ -104,6 +105,7 @@ module.exports = [ lastMeasurement: 24737399, measurement: 1e18, price_id: "true-usd", + isYearn: true, }, { id: "USDC", @@ -124,6 +126,7 @@ module.exports = [ lastMeasurement: 24563583, measurement: 1e18, price_id: "usd-coin", + isYearn: true, }, { id: "USDT", @@ -144,5 +147,27 @@ module.exports = [ lastMeasurement: 24547196, measurement: 1e18, price_id: "tether", + isYearn: true, + }, + { + id: "daoCDV", + name: "DAO Vault Citadel", + symbol: ["USDT","USDC","DAI"], + description: "DAO Vault Citadel for 3 stablecoins", + vaultSymbol: "daoCDV", + erc20address: ["0x07de306ff27a2b630b1141956844eb1552b956b5", "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa"], + vaultContractAddress: "0x00ba7142d3ea3f59a69cc37bfcea4cebf68c63aa", + vaultContractABI: config.vaultCitadelABI, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 25098423, + measurement: 1e18, + price_id: ["tether", "usd-coin", "dai"], + isCitadel: true, }, ]; diff --git a/services/vaults/price/handler.js b/services/vaults/price/handler.js index ccb77eb..2150eaf 100644 --- a/services/vaults/price/handler.js +++ b/services/vaults/price/handler.js @@ -1,19 +1,29 @@ "use strict" const { - devContract, - prodContract, testContracts, mainContracts, } = require('../../../config/serverless/domain'); -const earnABIContract = require('../../../config/abi').earnABIContract; -const vaultABIContract = require('../../../config/abi').vaultABIContract; const { getContract, getPricePerFullShare } = require('../../user/vaults/statistics/handler'); const db = require('../../../models/price.model'); const moment = require("moment"); +const delay = require("delay"); +const { delayTime } = require("../apy/save/config"); + +const getCitadelPricePerFullShare = async (contract) => { + let pricePerFullShare = 0; + try { + const pool = await contract.methods.getAllPoolInETH().call(); + const totalSupply = await contract.methods.totalSupply().call(); + pricePerFullShare = pool / totalSupply; + } catch (ex) {} + + await delay(delayTime); + return pricePerFullShare; +} const getCurrentPrice = async () => { let contracts = process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? mainContracts : testContracts; @@ -30,22 +40,34 @@ const getCurrentPrice = async () => { earnPrice: earnPricePerFullShare, vaultPrice: vaultPricePerFullShare, compoundExchangeRate: 0, + citadelPrice: 0, }).catch((err) => console.log('err', err)); } else if (contracts.farmer[key].contractType === 'compound') { const compoundContract = getContract(contracts.compund[key].abi, contracts.compund[key].address); - const getCash = await compoundContract.methods.getCash().call({ from: account.address }); - const totalBorrows = await compoundContract.methods.totalBorrows().call({ from: account.address }); - const totalReserves = await compoundContract.methods.totalReserves().call({ from: account.address }); - const totalSupply = await compoundContract.methods.totalSupply().call({ from: account.address }); + const getCash = await compoundContract.methods.getCash().call(); + const totalBorrows = await compoundContract.methods.totalBorrows().call(); + const totalReserves = await compoundContract.methods.totalReserves().call(); + const totalSupply = await compoundContract.methods.totalSupply().call(); const exchangeRate = (getCash + totalBorrows - totalReserves) / totalSupply; await db.add(key + '_price', { earnPrice: 0, vaultPrice: 0, compoundExchangeRate: exchangeRate, + citadelPrice: 0, + }).catch((err) => console.log('err', err)); + } else if (contracts.farmer[key].contractType === 'citadel') { + const contract = getContract(contracts.farmer[key].abi, contracts.farmer[key].address); + const pricePerFullShare = await getCitadelPricePerFullShare(contract); + await db.add(key + '_price', { + earnPrice: 0, + vaultPrice: 0, + compoundExchangeRate: 0, + citadelPrice: pricePerFullShare, }).catch((err) => console.log('err', err)); } } catch (err) { + console.log(err); await db.add(key + '_price', { earnPrice: "0", vaultPrice: "0", @@ -99,6 +121,9 @@ module.exports.handleHistoricialPrice = async (req, res) => { case db.cDaiFarmer: collection = db.cDaiFarmer; break; + case db.daoCDVFarmer: + collection = db.daoCDVFarmer; + break; default: res.status(200).json({ message: 'Invalid Farmer', diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index 72590c1..b842b22 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -1,4 +1,5 @@ const _ = require("lodash"); +const BigNumber = require("bignumber.js"); const db = require("../../../models/tvl.model"); const Web3 = require("web3"); @@ -120,12 +121,17 @@ const getxDVGPrice = async () => { const getTVL = async (vault) => { const { tokenId } = vault; let tvl; - const contract = await getContract(vault); - const poolAmount = await getPoolAmount(contract); - const decimals = await getDecimals(contract); - const tokenPrice = await getTokenPrice(tokenId); - - tvl = (poolAmount / 10 ** decimals) * tokenPrice; + if (vault.contractType === 'citadel') { + const contract = await getTokenContract(vault); + tvl = await contract.methods.getAllPoolInUSD().call(); + } else { + const contract = await getContract(vault); + const poolAmount = await getPoolAmount(contract); + const decimals = await getDecimals(contract); + const tokenPrice = await getTokenPrice(tokenId); + tvl = (poolAmount / 10 ** decimals) * tokenPrice; + } + return tvl; }; @@ -172,7 +178,15 @@ const getAllTVL = async () => { const getTotalTVL = async (tvls) => { let totalTVL; try { - totalTVL = _.sum(tvls); + const zero = new BigNumber(0); + totalTVL = tvls.reduce( + (a, b) => { + return new BigNumber(a).plus(new BigNumber(b)); + }, + zero, + tvls + ); + totalTVL = totalTVL.toFixed(); } catch (err) { // Catch error console.log(err); @@ -240,6 +254,9 @@ module.exports.tvlHandle = async (req, res) => { case db.cDaiFarmer: collection = db.cDaiFarmer; break; + case db.daoCDVFarmer: + collection = db.daoCDVFarmer; + break; default: res.status(200).json({ message: "Invalid Farmer", From e8038ed2c71b7ab7ea594b452085f266493243ce Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Sun, 30 May 2021 11:43:54 +0800 Subject: [PATCH 080/254] Update APY fixes --- docker-compose.yml | 2 +- services/vaults/apy/save/handler.js | 2 +- services/vaults/apy/save/historical-handle.js | 2 +- services/vaults/price/handler.js | 1 - swagger.json | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0873532..5227595 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ services: database: image: mongo container_name: "database" - command: [--auth] + # command: [--auth] restart: always ports: - "27017:27017" diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index 1949f49..44c05e6 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -171,7 +171,7 @@ const getApyForVault = async (vault) => { // APY Calculation const n = 365 / 2; // Assume 2 days to trigger invest function const apr = (pricePerFullShareCurrent - pricePerFullShareOneDayAgo) * n; - const apy = Math.pow((1 + apr / n), n) - 1; + const apy = (Math.pow((1 + (apr / 100) / n), n) - 1) * 100; return { apyInceptionSample: 0, diff --git a/services/vaults/apy/save/historical-handle.js b/services/vaults/apy/save/historical-handle.js index bbd4caf..d648918 100644 --- a/services/vaults/apy/save/historical-handle.js +++ b/services/vaults/apy/save/historical-handle.js @@ -168,7 +168,7 @@ const getApyForVault = async (vault) => { // APY Calculation const n = 365 / 2; // Assume 2 days to trigger invest function const apr = (pricePerFullShareCurrent - pricePerFullShareOneDayAgo) * n; - const apy = Math.pow((1 + apr / n), n) - 1; + const apy = (Math.pow((1 + (apr / 100) / n), n) - 1) * 100; return { apyInceptionSample: 0, diff --git a/services/vaults/price/handler.js b/services/vaults/price/handler.js index 2150eaf..7022476 100644 --- a/services/vaults/price/handler.js +++ b/services/vaults/price/handler.js @@ -67,7 +67,6 @@ const getCurrentPrice = async () => { }).catch((err) => console.log('err', err)); } } catch (err) { - console.log(err); await db.add(key + '_price', { earnPrice: "0", vaultPrice: "0", diff --git a/swagger.json b/swagger.json index 374c16f..0b2f0be 100644 --- a/swagger.json +++ b/swagger.json @@ -5,7 +5,7 @@ "title": "DAOventures API", "description": "DAOventures API documentation" }, - "basePath": "/api/", + "basePath": "/", "consumes": [ "application/json" ], From eaed3c9c8c0cdef6ba87b3cb89b12f9fe9b06792 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Sun, 30 May 2021 11:44:23 +0800 Subject: [PATCH 081/254] Updated --- docker-compose.yml | 2 +- swagger.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 5227595..0873532 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ services: database: image: mongo container_name: "database" - # command: [--auth] + command: [--auth] restart: always ports: - "27017:27017" diff --git a/swagger.json b/swagger.json index 0b2f0be..374c16f 100644 --- a/swagger.json +++ b/swagger.json @@ -5,7 +5,7 @@ "title": "DAOventures API", "description": "DAOventures API documentation" }, - "basePath": "/", + "basePath": "/api/", "consumes": [ "application/json" ], From acabbddad982d982b3840dbcb81e16bb6ce7f0ef Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Mon, 31 May 2021 11:51:04 +0800 Subject: [PATCH 082/254] Update deposited amount for harvest strategy --- services/user/vaults/statistics/handler.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/user/vaults/statistics/handler.js b/services/user/vaults/statistics/handler.js index 575eb33..5e596c0 100644 --- a/services/user/vaults/statistics/handler.js +++ b/services/user/vaults/statistics/handler.js @@ -95,9 +95,8 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => depositedAmount = await strategyContract.methods.getCurrentBalance(userAddress).call(); depositedAmount = new BigNumber(depositedAmount); } else if (type === 'harvest') { - depositedAmount = await vaultContract.methods.getCurrentBalance(userAddress).call(); + depositedAmount = await strategyContract.methods.getCurrentBalance(userAddress).call(); depositedAmount = new BigNumber(depositedAmount); - } const depositedShares = await getDepositedShares(vaultContract, userAddress); From f971cb2e67d20087c475f37cd9f61059ce92f22f Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Mon, 31 May 2021 16:20:48 +0800 Subject: [PATCH 083/254] Update Citadel address --- config/abi.js | 4 ++-- config/serverless/domain.js | 4 ++-- scripts/initial.js | 8 ++++---- services/vaults/apy/save/abis/vaultCitadel.js | 2 +- services/vaults/apy/save/vaults.js | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/config/abi.js b/config/abi.js index 97701b4..497f32c 100644 --- a/config/abi.js +++ b/config/abi.js @@ -16096,9 +16096,9 @@ const daoStakeContract = [ const uniswapPairABIContract = [{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount0Out","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1Out","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Swap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint112","name":"reserve0","type":"uint112"},{"indexed":false,"internalType":"uint112","name":"reserve1","type":"uint112"}],"name":"Sync","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MINIMUM_LIQUIDITY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"burn","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getReserves","outputs":[{"internalType":"uint112","name":"_reserve0","type":"uint112"},{"internalType":"uint112","name":"_reserve1","type":"uint112"},{"internalType":"uint32","name":"_blockTimestampLast","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token0","type":"address"},{"internalType":"address","name":"_token1","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"kLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"liquidity","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"price0CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"price1CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"skim","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount0Out","type":"uint256"},{"internalType":"uint256","name":"amount1Out","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"swap","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"sync","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"token0","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token1","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]; -const citadelABIContract = [{"inputs":[{"internalType":"address","name":"_strategy","type":"address"},{"internalType":"address","name":"_treasuryWallet","type":"address"},{"internalType":"address","name":"_communityWallet","type":"address"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_strategist","type":"address"},{"internalType":"address","name":"_biconomy","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenDeposit","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_balanceOfWETH","type":"uint256"}],"name":"ETHToInvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fromStrategy","type":"address"},{"indexed":true,"internalType":"address","name":"toStrategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MigrateFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldCustomNetworkFeePerc","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCustomNetworkFeePerc","type":"uint256"}],"name":"SetCustomNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldCustomNetworkFeeTier","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newCustomNetworkFeeTier","type":"uint256"}],"name":"SetCustomNetworkFeeTier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeePerc","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeePerc","type":"uint256[]"}],"name":"SetNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeeTier2","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeeTier2","type":"uint256[]"}],"name":"SetNetworkFeeTier2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldProfileSharingFeePerc","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newProfileSharingFeePerc","type":"uint256"}],"name":"SetProfitSharingFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fees","type":"uint256"}],"name":"TransferredOutFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenWithdraw","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"LOCKTIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"biconomy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canSetPendingStrategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeeTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllPoolInETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllPoolInUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"getReimburseTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"migrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeeTier2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"profitSharingFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reimburseTokenFromStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reinvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_biconomy","type":"address"}],"name":"setBiconomy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"}],"name":"setCommunityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setCustomNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_customNetworkFeeTier","type":"uint256"}],"name":"setCustomNetworkFeeTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeePerc","type":"uint256[]"}],"name":"setNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeeTier2","type":"uint256[]"}],"name":"setNetworkFeeTier2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pendingStrategy","type":"address"}],"name":"setPendingStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_percentages","type":"uint256[]"}],"name":"setPercTokenKeepInVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setProfitSharingFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"contract ICitadelStrategy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenFrom","type":"uint256"},{"internalType":"uint256","name":"_tokenTo","type":"uint256"}],"name":"swapTokenWithinVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trustedForwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockMigrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"versionRecipient","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}] +const citadelABIContract = [{"inputs":[{"internalType":"address","name":"_strategy","type":"address"},{"internalType":"address","name":"_treasuryWallet","type":"address"},{"internalType":"address","name":"_communityWallet","type":"address"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_strategist","type":"address"},{"internalType":"address","name":"_biconomy","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenDeposit","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amtDeposit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sharesMint","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_balanceOfWETH","type":"uint256"}],"name":"ETHToInvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fromStrategy","type":"address"},{"indexed":true,"internalType":"address","name":"toStrategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MigrateFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldCustomNetworkFeePerc","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCustomNetworkFeePerc","type":"uint256"}],"name":"SetCustomNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldCustomNetworkFeeTier","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newCustomNetworkFeeTier","type":"uint256"}],"name":"SetCustomNetworkFeeTier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeePerc","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeePerc","type":"uint256[]"}],"name":"SetNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeeTier2","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeeTier2","type":"uint256[]"}],"name":"SetNetworkFeeTier2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldProfileSharingFeePerc","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newProfileSharingFeePerc","type":"uint256"}],"name":"SetProfitSharingFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fees","type":"uint256"}],"name":"TransferredOutFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenWithdraw","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amtWithdraw","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sharesBurn","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"LOCKTIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"biconomy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canSetPendingStrategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeeTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllPoolInETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllPoolInUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"getReimburseTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"migrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeeTier2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"profitSharingFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reimburseTokenFromStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reinvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_biconomy","type":"address"}],"name":"setBiconomy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"}],"name":"setCommunityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setCustomNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_customNetworkFeeTier","type":"uint256"}],"name":"setCustomNetworkFeeTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeePerc","type":"uint256[]"}],"name":"setNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeeTier2","type":"uint256[]"}],"name":"setNetworkFeeTier2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pendingStrategy","type":"address"}],"name":"setPendingStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_percentages","type":"uint256[]"}],"name":"setPercTokenKeepInVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setProfitSharingFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"contract ICitadelStrategy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenFrom","type":"uint256"},{"internalType":"uint256","name":"_tokenTo","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"swapTokenWithinVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trustedForwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockMigrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"versionRecipient","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}] -const citadelStrategyABIContract = [{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"},{"internalType":"address","name":"_strategist","type":"address"},{"internalType":"address","name":"_admin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"AddLiquidity","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"CurrentComposition","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"ETHToInvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"LatestLPTokenPrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"TargetComposition","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"YieldAmount","type":"event"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"curveSplit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getTotalPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reimburse","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reinvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"contract ICitadelVault","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yieldFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]; +const citadelStrategyABIContract = [{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fromStrategy","type":"address"},{"indexed":true,"internalType":"address","name":"toStrategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MigrateFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldCommunityWallet","type":"address"},{"indexed":true,"internalType":"address","name":"newCommunityWallet","type":"address"}],"name":"SetCommunityWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldCustomNetworkFeePercentage","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCustomNetworkFeePercentage","type":"uint256"}],"name":"SetCustomNetworkFeePercentage","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldCustomNetworkFeeTier","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newCustomNetworkFeeTier","type":"uint256"}],"name":"SetCustomNetworkFeeTier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeePercentage","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeePercentage","type":"uint256[]"}],"name":"SetNetworkFeePercentage","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeeTier2","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeeTier2","type":"uint256[]"}],"name":"SetNetworkFeeTier2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldTreasuryWallet","type":"address"},{"indexed":true,"internalType":"address","name":"newTreasuryWallet","type":"address"}],"name":"SetTreasuryWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canSetPendingStrategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeeTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_vaultName","type":"bytes32"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_strategy","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"migrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeeTier2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"refund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"}],"name":"setCommunityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setCustomNetworkFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_customNetworkFeeTier","type":"uint256"}],"name":"setCustomNetworkFeeTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeePercentage","type":"uint256[]"}],"name":"setNetworkFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeeTier2","type":"uint256[]"}],"name":"setNetworkFeeTier2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pendingStrategy","type":"address"}],"name":"setPendingStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"contract IStrategy2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockMigrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultName","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]; module.exports = { earnUSDTABIContract, diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 0fa4bab..5078297 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -137,9 +137,9 @@ const testContracts = { tokenId: "dai", }, daoCDV: { - address: "0x00ba7142d3ea3f59a69cc37bfcea4cebf68c63aa", + address: "0x542a42496c96b946324f7dce2b030d5643d9ef8a", abi: abi.citadelABIContract, - strategyAddress: "0x02281600cBf6E072850f8Aa77f03E1C722B3A216", + strategyAddress: "0x4996b12560b9a4a85dd437a3e8ff489335dcffa7", strategyABI: abi.citadelStrategyABIContract, contractType: "citadel", tokenId: ["tether", "usd-coin", "dai"], diff --git a/scripts/initial.js b/scripts/initial.js index b9f7162..935cf98 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -18,7 +18,7 @@ db.vault_categories.insertMany([ { name: 'basic', contract_address: '0x5d102e0bdf2037899e1ff2e8cc50987108533c52', symbol: 'cUSDT' }, { name: 'basic', contract_address: '0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e', symbol: 'cUSDC', }, { name: 'basic', contract_address: '0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d', symbol: 'cDAI', }, - { name: 'degen', contract_address: '0x00ba7142d3ea3f59a69cc37bfcea4cebf68c63aa', symbol: 'daoCDV', }, + { name: 'degen', contract_address: '0x542a42496c96b946324f7dce2b030d5643d9ef8a', symbol: 'daoCDV', }, ]); db.xdvg_token.insert({ @@ -95,15 +95,15 @@ db.stake_pool.insertMany([ name: 'ETH<->DVG', contract_address: '0x0A15e37442e2a41A3A51A9Eff7fE1DCE0E96f0bB', status: 'A', - pid: '7', + pid: '8', category: 'basic', tokenId: 'ethDVG' }, { name: 'daoCDV', - contract_address: '0x00ba7142D3ea3f59A69cC37BfCeA4CEbf68C63aA', + contract_address: '0x542a42496c96b946324f7dce2b030d5643d9ef8a', status: 'A', - pid: '8', + pid: '9', category: 'degen', tokenId: 'ethereum' } diff --git a/services/vaults/apy/save/abis/vaultCitadel.js b/services/vaults/apy/save/abis/vaultCitadel.js index ec0665d..9744623 100644 --- a/services/vaults/apy/save/abis/vaultCitadel.js +++ b/services/vaults/apy/save/abis/vaultCitadel.js @@ -1 +1 @@ -module.exports = [{"inputs":[{"internalType":"address","name":"_strategy","type":"address"},{"internalType":"address","name":"_treasuryWallet","type":"address"},{"internalType":"address","name":"_communityWallet","type":"address"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_strategist","type":"address"},{"internalType":"address","name":"_biconomy","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenDeposit","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_balanceOfWETH","type":"uint256"}],"name":"ETHToInvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fromStrategy","type":"address"},{"indexed":true,"internalType":"address","name":"toStrategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MigrateFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldCustomNetworkFeePerc","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCustomNetworkFeePerc","type":"uint256"}],"name":"SetCustomNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldCustomNetworkFeeTier","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newCustomNetworkFeeTier","type":"uint256"}],"name":"SetCustomNetworkFeeTier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeePerc","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeePerc","type":"uint256[]"}],"name":"SetNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeeTier2","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeeTier2","type":"uint256[]"}],"name":"SetNetworkFeeTier2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldProfileSharingFeePerc","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newProfileSharingFeePerc","type":"uint256"}],"name":"SetProfitSharingFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fees","type":"uint256"}],"name":"TransferredOutFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenWithdraw","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"LOCKTIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"biconomy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canSetPendingStrategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeeTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllPoolInETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllPoolInUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"getReimburseTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"migrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeeTier2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"profitSharingFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reimburseTokenFromStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reinvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_biconomy","type":"address"}],"name":"setBiconomy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"}],"name":"setCommunityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setCustomNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_customNetworkFeeTier","type":"uint256"}],"name":"setCustomNetworkFeeTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeePerc","type":"uint256[]"}],"name":"setNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeeTier2","type":"uint256[]"}],"name":"setNetworkFeeTier2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pendingStrategy","type":"address"}],"name":"setPendingStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_percentages","type":"uint256[]"}],"name":"setPercTokenKeepInVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setProfitSharingFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"contract ICitadelStrategy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenFrom","type":"uint256"},{"internalType":"uint256","name":"_tokenTo","type":"uint256"}],"name":"swapTokenWithinVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trustedForwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockMigrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"versionRecipient","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file +module.exports = [{"inputs":[{"internalType":"address","name":"_strategy","type":"address"},{"internalType":"address","name":"_treasuryWallet","type":"address"},{"internalType":"address","name":"_communityWallet","type":"address"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_strategist","type":"address"},{"internalType":"address","name":"_biconomy","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenDeposit","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amtDeposit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sharesMint","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_balanceOfWETH","type":"uint256"}],"name":"ETHToInvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fromStrategy","type":"address"},{"indexed":true,"internalType":"address","name":"toStrategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MigrateFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldCustomNetworkFeePerc","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCustomNetworkFeePerc","type":"uint256"}],"name":"SetCustomNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldCustomNetworkFeeTier","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newCustomNetworkFeeTier","type":"uint256"}],"name":"SetCustomNetworkFeeTier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeePerc","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeePerc","type":"uint256[]"}],"name":"SetNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeeTier2","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeeTier2","type":"uint256[]"}],"name":"SetNetworkFeeTier2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldProfileSharingFeePerc","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newProfileSharingFeePerc","type":"uint256"}],"name":"SetProfitSharingFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fees","type":"uint256"}],"name":"TransferredOutFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenWithdraw","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amtWithdraw","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sharesBurn","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"LOCKTIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"biconomy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canSetPendingStrategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeeTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllPoolInETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllPoolInUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"getReimburseTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"migrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeeTier2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"profitSharingFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reimburseTokenFromStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reinvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_biconomy","type":"address"}],"name":"setBiconomy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"}],"name":"setCommunityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setCustomNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_customNetworkFeeTier","type":"uint256"}],"name":"setCustomNetworkFeeTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeePerc","type":"uint256[]"}],"name":"setNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeeTier2","type":"uint256[]"}],"name":"setNetworkFeeTier2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pendingStrategy","type":"address"}],"name":"setPendingStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_percentages","type":"uint256[]"}],"name":"setPercTokenKeepInVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setProfitSharingFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"contract ICitadelStrategy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenFrom","type":"uint256"},{"internalType":"uint256","name":"_tokenTo","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"swapTokenWithinVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trustedForwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockMigrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"versionRecipient","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index d0f9808..f06b84a 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -156,7 +156,7 @@ module.exports = [ description: "DAO Vault Citadel for 3 stablecoins", vaultSymbol: "daoCDV", erc20address: ["0x07de306ff27a2b630b1141956844eb1552b956b5", "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa"], - vaultContractAddress: "0x00ba7142d3ea3f59a69cc37bfcea4cebf68c63aa", + vaultContractAddress: "0x542a42496c96b946324f7dce2b030d5643d9ef8a", vaultContractABI: config.vaultCitadelABI, balance: 0, vaultBalance: 0, From 33558688a7aaaee62a52b44529af37986975c902 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Tue, 1 Jun 2021 02:17:36 +0800 Subject: [PATCH 084/254] - Bug fixes and enhancement for historical-apy --- config/serverless/domain.js | 8 ++++---- models/historical-apy.model.js | 2 +- models/price.model.js | 2 +- services/vaults/apy/save/historical-handle.js | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 5078297..9584d54 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -81,7 +81,7 @@ const testContracts = { }, farmer: { yUSDT: { - address: "0x6B150E9BD70E216775c8b73270E64e870a3110c1", + address: "0x6b150e9bd70e216775c8b73270e64e870a3110c1", abi: abi.vaultUSDTABIContract, strategyAddress: "0x31324c1c0bb6b4b6f8102acb8346b065307926fa", strategyABI: abi.yearnUSDTABIContract, @@ -89,7 +89,7 @@ const testContracts = { tokenId: "tether", }, yUSDC: { - address: "0x6E15e283dc430eca010Ade8b11b5B377902d6e56", + address: "0x6e15e283dc430eca010ade8b11b5b377902d6e56", abi: abi.vaultUSDCABIContract, strategyAddress: "0xe77ad5e2c4e7143fdbac6a4dde891727fc395c75", strategyABI: abi.yearnUSDCABIContract, @@ -97,7 +97,7 @@ const testContracts = { tokenId: "usd-coin", }, yDAI: { - address: "0x2428bFD238a3632552B343297c504F60283009eD", + address: "0x2428bfd238a3632552b343297c504f60283009ed", abi: abi.vaultDAIABIContract, strategyAddress: "0x8615dfb5b53e9ddb3751fbc3fc59512d4aba9a22", strategyABI: abi.yearnDAIABIContract, @@ -105,7 +105,7 @@ const testContracts = { tokenId: "dai", }, yTUSD: { - address: "0xEcCb98c36bfc8c49c6065d1cD90bcf1c6F02D4AD", + address: "0xeccb98c36bfc8c49c6065d1cd90bcf1c6f02d4ad", abi: abi.vaultTUSDABIContract, strategyAddress: "0xf64674cfc6597d597275144a1a746dad564b0fcd", strategyABI: abi.yearnTUSDABIContract, diff --git a/models/historical-apy.model.js b/models/historical-apy.model.js index cb0b41f..c67e087 100644 --- a/models/historical-apy.model.js +++ b/models/historical-apy.model.js @@ -9,7 +9,7 @@ const findWithTimePeriods = async (startTime, endTime, collection) => { const db = mongo.getDB(); return await db.collection(collection).find({ timestamp: { - $gte: startTime, + $gte: startTime * 1000, $lte: endTime } }).toArray(); diff --git a/models/price.model.js b/models/price.model.js index c36dd06..bd8f441 100644 --- a/models/price.model.js +++ b/models/price.model.js @@ -9,7 +9,7 @@ const findPriceWithTimePeriods = async (collection, startTime, endTime) => { const db = mongo.getDB(); return await db.collection(collection).find({ timestamp: { - $gte: startTime, + $gte: startTime * 1000, $lte: endTime } }).toArray(); diff --git a/services/vaults/apy/save/historical-handle.js b/services/vaults/apy/save/historical-handle.js index d648918..883b72c 100644 --- a/services/vaults/apy/save/historical-handle.js +++ b/services/vaults/apy/save/historical-handle.js @@ -235,7 +235,7 @@ const getApyForVault = async (vault) => { oneDayAgoBlock, currentBlockNbr )) || apyInceptionSample; - + const apyThreeDaySample = (getApy( pricePerFullShareThreeDaysAgo, @@ -243,7 +243,7 @@ const getApyForVault = async (vault) => { threeDaysAgoBlock, currentBlockNbr )) || apyInceptionSample; - + const apyOneWeekSample = (getApy( pricePerFullShareOneWeekAgo, From 89152bb5618ce4c7903459f1062d7f1836b8534c Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Tue, 1 Jun 2021 11:43:21 +0800 Subject: [PATCH 085/254] Add missing curly bracket. --- services/user/vaults/statistics/handler.js | 1 + 1 file changed, 1 insertion(+) diff --git a/services/user/vaults/statistics/handler.js b/services/user/vaults/statistics/handler.js index 5e596c0..16018e2 100644 --- a/services/user/vaults/statistics/handler.js +++ b/services/user/vaults/statistics/handler.js @@ -97,6 +97,7 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => } else if (type === 'harvest') { depositedAmount = await strategyContract.methods.getCurrentBalance(userAddress).call(); depositedAmount = new BigNumber(depositedAmount); + } const depositedShares = await getDepositedShares(vaultContract, userAddress); From 8c7dd75aac5188632b5404da60f24934d7fcc362 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Tue, 1 Jun 2021 13:40:20 +0800 Subject: [PATCH 086/254] Update --- app.js | 8 ++++---- services/vaults/apy/save/handler.js | 9 +-------- services/vaults/apy/save/historical-handle.js | 7 +------ 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/app.js b/app.js index ead64b0..7ef7889 100644 --- a/app.js +++ b/app.js @@ -25,10 +25,10 @@ async function init() { db.connectDB(async (err) => { if (err) throw err; - // jobs.saveVault(); - // jobs.saveVaultAPY(); - // jobs.savePricePerFullShare(); - // jobs.saveHistoricalAPY(); + jobs.saveVault(); + jobs.saveVaultAPY(); + jobs.savePricePerFullShare(); + jobs.saveHistoricalAPY(); jobs.saveHistoricalTVL(); }); diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index 2de82ea..99f41c3 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -197,14 +197,7 @@ const getApyForVault = async (vault) => { } else { // Yearn Vault const pool = _.find(pools, { symbol }); - var vaultContract; - - // if (vault.isHarvest) { - // const envContracts = process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? mainContracts : testContracts; - // vaultContract = new archiveNodeWeb3.eth.Contract(envContracts.harvest[vault.id].abi, envContracts.harvest[vault.id].address); - // } else {} - - vaultContract = new archiveNodeWeb3.eth.Contract(abi, address); + var vaultContract = new archiveNodeWeb3.eth.Contract(abi, address); const pricePerFullShareInception = await getPricePerFullShare( vaultContract, diff --git a/services/vaults/apy/save/historical-handle.js b/services/vaults/apy/save/historical-handle.js index 9b156aa..2fe37ff 100644 --- a/services/vaults/apy/save/historical-handle.js +++ b/services/vaults/apy/save/historical-handle.js @@ -195,12 +195,7 @@ const getApyForVault = async (vault) => { }else { // Yearn Vault const pool = _.find(pools, { symbol }); - var vaultContract; - // if (vault.isHarvest) { - // const envContracts = process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? mainContracts : testContracts; - // vaultContract = new archiveNodeWeb3.eth.Contract(envContracts.harvest[vault.id].abi, envContracts.harvest[vault.id].address); - // } else {} - vaultContract = new archiveNodeWeb3.eth.Contract(abi, address); + var vaultContract = new archiveNodeWeb3.eth.Contract(abi, address); const pricePerFullShareInception = await getPricePerFullShare( vaultContract, From 886154b564c60c64ae6eecdae77c13a89adbd08b Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Tue, 1 Jun 2021 16:02:16 +0800 Subject: [PATCH 087/254] Correction on decimals of TVL calculation, get decimal using vault contract. --- services/vaults/tvl/handler.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index 0a836ca..074e6cd 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -49,9 +49,8 @@ const getPoolAmount = async (contract) => { } }; -const getContract = (vault) => { - const { strategyABI, strategyAddress } = vault; - const contract = new archiveNodeWeb3.eth.Contract(strategyABI, strategyAddress); +const getContract = (contractAbi, contractAddress) => { + const contract = new archiveNodeWeb3.eth.Contract(contractAbi, contractAddress); return contract; }; @@ -80,15 +79,20 @@ const getTokenPrice = async (coingecko_token_id) => { */ const getTVL = async (vault) => { try { - const { tokenId } = vault; + const { + tokenId, + strategyABI, + strategyAddress, + abi, + address + } = vault; let tvl; - const contract = getContract(vault); - const poolAmount = await getPoolAmount(contract); - - let decimals = await getDecimals(contract); - decimals = decimals ? decimals : 18; + const strategyContract = getContract(strategyABI, strategyAddress); + const vaultContract = getContract(abi, address); + const poolAmount = await getPoolAmount(strategyContract); + const decimals = await getDecimals(vaultContract); const tokenPrice = await getTokenPrice(tokenId); tvl = (poolAmount / 10 ** decimals) * tokenPrice; From 309318dd10086dffe0c96d2d719750ac7a2c55cb Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Tue, 1 Jun 2021 17:48:36 +0800 Subject: [PATCH 088/254] API for special event handling. --- app.js | 3 ++- models/special-event.model.js | 30 +++++++++++++++++++++ scripts/initial.js | 8 ++++++ services/user/special-event/handler.js | 36 ++++++++++++++++++++++++++ swagger.json | 23 +++++++++++++++- 5 files changed, 98 insertions(+), 2 deletions(-) create mode 100644 models/special-event.model.js create mode 100644 services/user/special-event/handler.js diff --git a/app.js b/app.js index e97cae0..e8e66b0 100644 --- a/app.js +++ b/app.js @@ -11,6 +11,7 @@ const stakeVIP = require('./services/staking/xdvg/handler'); const stakePool = require('./services/staking/handler'); const stakeXDvg = require('./services/staking/vipdvg/handler'); const stakeDaoStakes = require('./services/staking/dao-stake/handler'); +const specialEvent = require("./services/user/special-event/handler"); const app = express(); const cors = require("cors"); const port = process.env.PORT || 8080; @@ -57,7 +58,6 @@ async function init() { app.get("/vaults/tvl/:farmer", (req, res) => vaultsTvl.tvlHandle(req, res) ); - app.get("/vaults/category", (req, res) => vaultCategory.getVaultCategory(req, res) ); @@ -68,6 +68,7 @@ async function init() { stakePool.getPools(req, res) ); app.get("/staking/get-xdvg-stake", (req, res) => stakeXDvg.getxDVGStake(req, res)); + app.get('/event/verify/:amount', (req, res) => specialEvent.handler(req, res)); app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument)); diff --git a/models/special-event.model.js b/models/special-event.model.js new file mode 100644 index 0000000..ebcaa76 --- /dev/null +++ b/models/special-event.model.js @@ -0,0 +1,30 @@ +const mongo = require("../config/db"); +const collection = "special_event"; + +// Get any event in which current datetime falls within data's start date and end date. +const getCurrentEvent = async() => { + const db = mongo.getDB(); + return await db + .collection(collection) + .find({ + startTime: { + $lte: new Date().getTime() + }, + endTime: { + $gte: new Date().getTime() + } + }) + .sort({ startTime : -1 }) + .limit(1) + .toArray(); +}; + +const findAll = async() => { + const db = mongo.getDB(); + return await db.collection(collection).find({}).toArray(); +} + +module.exports = { + getCurrentEvent, + findAll +} \ No newline at end of file diff --git a/scripts/initial.js b/scripts/initial.js index 935cf98..36e1e1d 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -107,4 +107,12 @@ db.stake_pool.insertMany([ category: 'degen', tokenId: 'ethereum' } +]); + +db.special_event.insertMany([ + { startTime: 1622390400000, endTime: 1622444400000, threshold: 3000 }, + { startTime: 1622538000000, endTime: 1622541600000, threshold: 5000 }, + { startTime: 1622538900000, endTime: 1622540400000, threshold: 7000 }, + { startTime: 1622542200000, endTime: 1622543400000, threshold: 6000 }, + { startTime: 1622606400000, endTime: 1622610000000, threshold: 3000 } ]); \ No newline at end of file diff --git a/services/user/special-event/handler.js b/services/user/special-event/handler.js new file mode 100644 index 0000000..09c6872 --- /dev/null +++ b/services/user/special-event/handler.js @@ -0,0 +1,36 @@ +const db = require("../../../models/special-event.model"); + +// Check user's eligibility for special event +const checkEligibilityForEvent = async(amount) => { + const eventList = await db.getCurrentEvent(); + + // Check any existing event + if(eventList.length <= 0) { + return "No ongoing event found."; + } + + const currentEvent = eventList[0]; + + // Check deposited amount + if(amount < currentEvent.threshold) { + return "Deposited amount is less than threshold. Threshold: " + currentEvent.threshold; + } + + return "Valid"; +} + +module.exports.handler = async(req, res) => { + if(req.params.amount === null || req.params.amount === "") { + res.status(200).json({ + message: "Amount is empty", + body: null + }); + } + + const result = await checkEligibilityForEvent(req.params.amount); + + res.status(200).json({ + message: "Successful response", + body: result + }) +} \ No newline at end of file diff --git a/swagger.json b/swagger.json index 374c16f..66db95b 100644 --- a/swagger.json +++ b/swagger.json @@ -203,6 +203,27 @@ ], "responses": {} } + }, + "/event/verify/{amount}" : { + "get": { + "tags": [ + "Vaults" + ], + "description": "Verify user eligible for special event deposit.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "amount", + "in": "path", + "description": "Amount to deposit", + "required": true, + "type": "string" + } + ], + "responses": {} + } } - } + } } \ No newline at end of file From 2c2ab42a2427df38846a62b956428270fd3207db Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Wed, 2 Jun 2021 09:41:59 +0800 Subject: [PATCH 089/254] Correction on TVL calculation, use decimal from vault contract for harvest farmer only. --- services/vaults/tvl/handler.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index 074e6cd..893da3d 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -89,12 +89,18 @@ const getTVL = async (vault) => { let tvl; const strategyContract = getContract(strategyABI, strategyAddress); - const vaultContract = getContract(abi, address); const poolAmount = await getPoolAmount(strategyContract); - const decimals = await getDecimals(vaultContract); const tokenPrice = await getTokenPrice(tokenId); - + + let decimals = 0; + if(vault.contractType === 'harvest') { + const vaultContract = getContract(abi, address); + decimals = await getDecimals(vaultContract); + } else { + decimals = await getDecimals(strategyContract); + } + tvl = (poolAmount / 10 ** decimals) * tokenPrice; return tvl === undefined ? 0 : tvl; From ee22bba08eb48b1ce0fa3b63142e10e89dfe929e Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Wed, 2 Jun 2021 14:57:09 +0800 Subject: [PATCH 090/254] Fixed TVL bugs --- services/vaults/tvl/handler.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index b842b22..72d24ef 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -123,7 +123,8 @@ const getTVL = async (vault) => { let tvl; if (vault.contractType === 'citadel') { const contract = await getTokenContract(vault); - tvl = await contract.methods.getAllPoolInUSD().call(); + const usdPool = await contract.methods.getAllPoolInUSD().call(); + tvl = usdPool / 10 ** 6; // All pool in USD (6 decimals follow USDT) } else { const contract = await getContract(vault); const poolAmount = await getPoolAmount(contract); From 50b9d2fac3bbcc246918f00c8b751a327c9d0f42 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Wed, 9 Jun 2021 19:58:40 +0800 Subject: [PATCH 091/254] - Updated Citadel and Harvest merged --- config/abi.js | 1319 +---------------- config/serverless/domain.js | 28 +- services/user/vaults/statistics/handler.js | 5 +- services/user/vaults/transactions/handler.js | 2 +- services/vaults/apy/save/abis/vaultCitadel.js | 2 +- services/vaults/apy/save/handler.js | 18 +- services/vaults/apy/save/historical-handle.js | 18 +- services/vaults/apy/save/vaults.js | 4 +- services/vaults/price/handler.js | 21 +- 9 files changed, 88 insertions(+), 1329 deletions(-) diff --git a/config/abi.js b/config/abi.js index 606f4e8..589d4f6 100644 --- a/config/abi.js +++ b/config/abi.js @@ -16096,9 +16096,9 @@ const daoStakeContract = [ const uniswapPairABIContract = [{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount0Out","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1Out","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Swap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint112","name":"reserve0","type":"uint112"},{"indexed":false,"internalType":"uint112","name":"reserve1","type":"uint112"}],"name":"Sync","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MINIMUM_LIQUIDITY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"burn","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getReserves","outputs":[{"internalType":"uint112","name":"_reserve0","type":"uint112"},{"internalType":"uint112","name":"_reserve1","type":"uint112"},{"internalType":"uint32","name":"_blockTimestampLast","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token0","type":"address"},{"internalType":"address","name":"_token1","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"kLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"liquidity","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"price0CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"price1CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"skim","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount0Out","type":"uint256"},{"internalType":"uint256","name":"amount1Out","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"swap","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"sync","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"token0","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token1","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]; -const citadelABIContract = [{"inputs":[{"internalType":"address","name":"_strategy","type":"address"},{"internalType":"address","name":"_treasuryWallet","type":"address"},{"internalType":"address","name":"_communityWallet","type":"address"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_strategist","type":"address"},{"internalType":"address","name":"_biconomy","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenDeposit","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amtDeposit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sharesMint","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_balanceOfWETH","type":"uint256"}],"name":"ETHToInvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fromStrategy","type":"address"},{"indexed":true,"internalType":"address","name":"toStrategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MigrateFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldCustomNetworkFeePerc","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCustomNetworkFeePerc","type":"uint256"}],"name":"SetCustomNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldCustomNetworkFeeTier","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newCustomNetworkFeeTier","type":"uint256"}],"name":"SetCustomNetworkFeeTier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeePerc","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeePerc","type":"uint256[]"}],"name":"SetNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeeTier2","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeeTier2","type":"uint256[]"}],"name":"SetNetworkFeeTier2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldProfileSharingFeePerc","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newProfileSharingFeePerc","type":"uint256"}],"name":"SetProfitSharingFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fees","type":"uint256"}],"name":"TransferredOutFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenWithdraw","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amtWithdraw","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sharesBurn","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"LOCKTIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"biconomy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canSetPendingStrategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeeTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllPoolInETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllPoolInUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"getReimburseTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"migrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeeTier2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"profitSharingFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reimburseTokenFromStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reinvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_biconomy","type":"address"}],"name":"setBiconomy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"}],"name":"setCommunityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setCustomNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_customNetworkFeeTier","type":"uint256"}],"name":"setCustomNetworkFeeTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeePerc","type":"uint256[]"}],"name":"setNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeeTier2","type":"uint256[]"}],"name":"setNetworkFeeTier2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pendingStrategy","type":"address"}],"name":"setPendingStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_percentages","type":"uint256[]"}],"name":"setPercTokenKeepInVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setProfitSharingFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"contract ICitadelStrategy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenFrom","type":"uint256"},{"internalType":"uint256","name":"_tokenTo","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"swapTokenWithinVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trustedForwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockMigrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"versionRecipient","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}] +const citadelABIContract = [{"inputs":[{"internalType":"address","name":"_strategy","type":"address"},{"internalType":"address","name":"_treasuryWallet","type":"address"},{"internalType":"address","name":"_communityWallet","type":"address"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_strategist","type":"address"},{"internalType":"address","name":"_biconomy","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenDeposit","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amtDeposit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sharesMint","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_balanceOfWETH","type":"uint256"}],"name":"ETHToInvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fromStrategy","type":"address"},{"indexed":true,"internalType":"address","name":"toStrategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MigrateFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldCustomNetworkFeePerc","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCustomNetworkFeePerc","type":"uint256"}],"name":"SetCustomNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldCustomNetworkFeeTier","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newCustomNetworkFeeTier","type":"uint256"}],"name":"SetCustomNetworkFeeTier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeePerc","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeePerc","type":"uint256[]"}],"name":"SetNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeeTier2","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeeTier2","type":"uint256[]"}],"name":"SetNetworkFeeTier2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldProfileSharingFeePerc","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newProfileSharingFeePerc","type":"uint256"}],"name":"SetProfitSharingFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fees","type":"uint256"}],"name":"TransferredOutFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenWithdraw","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amtWithdraw","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sharesBurn","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"LOCKTIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_balanceOfDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canSetPendingStrategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeeTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"getAllPoolInETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllPoolInUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"getReimburseTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"migrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeeTier2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"profitSharingFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reimburseTokenFromStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reinvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_biconomy","type":"address"}],"name":"setBiconomy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"}],"name":"setCommunityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setCustomNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_customNetworkFeeTier","type":"uint256"}],"name":"setCustomNetworkFeeTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeePerc","type":"uint256[]"}],"name":"setNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeeTier2","type":"uint256[]"}],"name":"setNetworkFeeTier2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pendingStrategy","type":"address"}],"name":"setPendingStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_percentages","type":"uint256[]"}],"name":"setPercTokenKeepInVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setProfitSharingFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"contract ICitadelStrategy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenFrom","type":"uint256"},{"internalType":"uint256","name":"_tokenTo","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"swapTokenWithinVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trustedForwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockMigrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"versionRecipient","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yield","outputs":[],"stateMutability":"nonpayable","type":"function"}] -const citadelStrategyABIContract = [{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fromStrategy","type":"address"},{"indexed":true,"internalType":"address","name":"toStrategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MigrateFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldCommunityWallet","type":"address"},{"indexed":true,"internalType":"address","name":"newCommunityWallet","type":"address"}],"name":"SetCommunityWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldCustomNetworkFeePercentage","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCustomNetworkFeePercentage","type":"uint256"}],"name":"SetCustomNetworkFeePercentage","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldCustomNetworkFeeTier","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newCustomNetworkFeeTier","type":"uint256"}],"name":"SetCustomNetworkFeeTier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeePercentage","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeePercentage","type":"uint256[]"}],"name":"SetNetworkFeePercentage","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeeTier2","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeeTier2","type":"uint256[]"}],"name":"SetNetworkFeeTier2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldTreasuryWallet","type":"address"},{"indexed":true,"internalType":"address","name":"newTreasuryWallet","type":"address"}],"name":"SetTreasuryWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canSetPendingStrategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeeTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_vaultName","type":"bytes32"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_strategy","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"migrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeeTier2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"refund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"}],"name":"setCommunityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setCustomNetworkFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_customNetworkFeeTier","type":"uint256"}],"name":"setCustomNetworkFeeTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeePercentage","type":"uint256[]"}],"name":"setNetworkFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeeTier2","type":"uint256[]"}],"name":"setNetworkFeeTier2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pendingStrategy","type":"address"}],"name":"setPendingStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"contract IStrategy2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockMigrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultName","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]; +const citadelStrategyABIContract = [{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"},{"internalType":"address","name":"_strategist","type":"address"},{"internalType":"address","name":"_admin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"pairs","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountA","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountB","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lpTokenMinted","type":"uint256"}],"name":"AddLiquidity","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"curveHBTC","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pickleWBTC","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sushiSwapDPI","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pickleDAI","type":"uint256"}],"name":"CurrentComposition","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ETHToInvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"curveHBTC","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pickleWBTC","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sushiSwapDPI","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pickleDAI","type":"uint256"}],"name":"LatestLPTokenPrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"curveHBTC","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pickleWBTC","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sushiSwapDPI","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pickleDAI","type":"uint256"}],"name":"TargetComposition","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"curveHBTC","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pickleWBTC","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sushiSwapDPI","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pickleDAI","type":"uint256"}],"name":"YieldAmount","type":"event"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"approveMigrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getCurrentPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isVesting","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reimburse","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reinvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"contract ICitadelVault","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yield","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yieldFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]; const hfDAOContract = [ { @@ -16962,1315 +16962,11 @@ const hfDAOContract = [ } ]; -const hfStrategyContract =[ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldCommunityWallet", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newCommunityWallet", - "type": "address" - } - ], - "name": "SetCommunityWallet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "oldProfileSharingFeePercentage", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "newProfileSharingFeePercentage", - "type": "uint256" - } - ], - "name": "SetProfileSharingFeePercentage", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldTreasuryWallet", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newTreasuryWallet", - "type": "address" - } - ], - "name": "SetTreasuryWallet", - "type": "event" - }, - { - "inputs": [], - "name": "FARM", - "outputs": [ - { - "internalType": "contract IFARM", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WETH", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "amountOutMinPerc", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "approveMigrate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "communityWallet", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "daoVault", - "outputs": [ - { - "internalType": "contract IDAOVault2", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "getCurrentBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "result", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPseudoPool", - "outputs": [ - { - "internalType": "uint256", - "name": "pseudoPool", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "hfStake", - "outputs": [ - { - "internalType": "contract IHFStake", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "hfVault", - "outputs": [ - { - "internalType": "contract IHFVault", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_strategyName", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "_token", - "type": "address" - }, - { - "internalType": "address", - "name": "_hfVault", - "type": "address" - }, - { - "internalType": "address", - "name": "_hfStake", - "type": "address" - }, - { - "internalType": "address", - "name": "_FARM", - "type": "address" - }, - { - "internalType": "address", - "name": "_uniswapRouter", - "type": "address" - }, - { - "internalType": "address", - "name": "_WETH", - "type": "address" - }, - { - "internalType": "address", - "name": "_owner", - "type": "address" - } - ], - "name": "init", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "invest", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "isVesting", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pool", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "profileSharingFeePercentage", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "refund", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "reuseContract", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "revertVesting", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_percentage", - "type": "uint256" - } - ], - "name": "setAmountOutMinPerc", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_communityWallet", - "type": "address" - } - ], - "name": "setCommunityWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_percentage", - "type": "uint256" - } - ], - "name": "setProfileSharingFeePercentage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_treasuryWallet", - "type": "address" - } - ], - "name": "setTreasuryWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "setVault", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "strategyName", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "contract IERC20Upgradeable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "treasuryWallet", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "uniswapRouter", - "outputs": [ - { - "internalType": "contract IUniswapV2Router02", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "vesting", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -]; - -const hfVaultContract = [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "fromStrategy", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "toStrategy", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "MigrateFunds", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldCommunityWallet", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newCommunityWallet", - "type": "address" - } - ], - "name": "SetCommunityWallet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldCustomNetworkFeePercentage", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newCustomNetworkFeePercentage", - "type": "uint256" - } - ], - "name": "SetCustomNetworkFeePercentage", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "oldCustomNetworkFeeTier", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "newCustomNetworkFeeTier", - "type": "uint256" - } - ], - "name": "SetCustomNetworkFeeTier", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256[]", - "name": "oldNetworkFeePercentage", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "newNetworkFeePercentage", - "type": "uint256[]" - } - ], - "name": "SetNetworkFeePercentage", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256[]", - "name": "oldNetworkFeeTier2", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "newNetworkFeeTier2", - "type": "uint256[]" - } - ], - "name": "SetNetworkFeeTier2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldTreasuryWallet", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newTreasuryWallet", - "type": "address" - } - ], - "name": "SetTreasuryWallet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "canSetPendingStrategy", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "communityWallet", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "customNetworkFeePercentage", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "customNetworkFeeTier", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_vaultName", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "_token", - "type": "address" - }, - { - "internalType": "address", - "name": "_strategy", - "type": "address" - }, - { - "internalType": "address", - "name": "_owner", - "type": "address" - } - ], - "name": "init", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "invest", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "migrateFunds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "networkFeePercentage", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "networkFeeTier2", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingStrategy", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "refund", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_communityWallet", - "type": "address" - } - ], - "name": "setCommunityWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_percentage", - "type": "uint256" - } - ], - "name": "setCustomNetworkFeePercentage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_customNetworkFeeTier", - "type": "uint256" - } - ], - "name": "setCustomNetworkFeeTier", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_networkFeePercentage", - "type": "uint256[]" - } - ], - "name": "setNetworkFeePercentage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_networkFeeTier2", - "type": "uint256[]" - } - ], - "name": "setNetworkFeeTier2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_pendingStrategy", - "type": "address" - } - ], - "name": "setPendingStrategy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_treasuryWallet", - "type": "address" - } - ], - "name": "setTreasuryWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "strategy", - "outputs": [ - { - "internalType": "contract IStrategy2", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "contract IERC20Upgradeable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "treasuryWallet", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unlockMigrateFunds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unlockTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "vaultName", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_shares", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -]; +const hfStrategyContract = [{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldCommunityWallet","type":"address"},{"indexed":true,"internalType":"address","name":"newCommunityWallet","type":"address"}],"name":"SetCommunityWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldProfileSharingFeePercentage","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newProfileSharingFeePercentage","type":"uint256"}],"name":"SetProfileSharingFeePercentage","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldTreasuryWallet","type":"address"},{"indexed":true,"internalType":"address","name":"newTreasuryWallet","type":"address"}],"name":"SetTreasuryWallet","type":"event"},{"inputs":[],"name":"FARM","outputs":[{"internalType":"contract IFARM","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"amountOutMinPerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"approveMigrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"daoVault","outputs":[{"internalType":"contract IDAOVault2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getCurrentBalance","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPseudoPool","outputs":[{"internalType":"uint256","name":"pseudoPool","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hfStake","outputs":[{"internalType":"contract IHFStake","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hfVault","outputs":[{"internalType":"contract IHFVault","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_strategyName","type":"bytes32"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_hfVault","type":"address"},{"internalType":"address","name":"_hfStake","type":"address"},{"internalType":"address","name":"_FARM","type":"address"},{"internalType":"address","name":"_uniswapRouter","type":"address"},{"internalType":"address","name":"_WETH","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_toInvest","type":"uint256"}],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isVesting","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"profileSharingFeePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"refund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reuseContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revertVesting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setAmountOutMinPerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"}],"name":"setCommunityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setProfileSharingFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategyName","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapRouter","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vesting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]; + +const hfVaultContract = [{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fromStrategy","type":"address"},{"indexed":true,"internalType":"address","name":"toStrategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MigrateFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldCommunityWallet","type":"address"},{"indexed":true,"internalType":"address","name":"newCommunityWallet","type":"address"}],"name":"SetCommunityWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldCustomNetworkFeePercentage","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCustomNetworkFeePercentage","type":"uint256"}],"name":"SetCustomNetworkFeePercentage","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldCustomNetworkFeeTier","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newCustomNetworkFeeTier","type":"uint256"}],"name":"SetCustomNetworkFeeTier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeePercentage","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeePercentage","type":"uint256[]"}],"name":"SetNetworkFeePercentage","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeeTier2","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeeTier2","type":"uint256[]"}],"name":"SetNetworkFeeTier2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldTreasuryWallet","type":"address"},{"indexed":true,"internalType":"address","name":"newTreasuryWallet","type":"address"}],"name":"SetTreasuryWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canSetPendingStrategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeeTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_vaultName","type":"bytes32"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_strategy","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"migrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeeTier2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"refund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"}],"name":"setCommunityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setCustomNetworkFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_customNetworkFeeTier","type":"uint256"}],"name":"setCustomNetworkFeeTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeePercentage","type":"uint256[]"}],"name":"setNetworkFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeeTier2","type":"uint256[]"}],"name":"setNetworkFeeTier2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pendingStrategy","type":"address"}],"name":"setPendingStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"contract IStrategy2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockMigrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultName","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]; + +const eacAggregatoorProxyContract = [{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"},{"internalType":"address","name":"_accessController","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"int256","name":"current","type":"int256"},{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"updatedAt","type":"uint256"}],"name":"AnswerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":true,"internalType":"address","name":"startedBy","type":"address"},{"indexed":false,"internalType":"uint256","name":"startedAt","type":"uint256"}],"name":"NewRound","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"accessController","outputs":[{"internalType":"contract AccessControllerInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"aggregator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"}],"name":"confirmAggregator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundId","type":"uint256"}],"name":"getAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"_roundId","type":"uint80"}],"name":"getRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundId","type":"uint256"}],"name":"getTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"phaseAggregators","outputs":[{"internalType":"contract AggregatorV2V3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"phaseId","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"}],"name":"proposeAggregator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"proposedAggregator","outputs":[{"internalType":"contract AggregatorV2V3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"_roundId","type":"uint80"}],"name":"proposedGetRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proposedLatestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_accessController","type":"address"}],"name":"setController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]; module.exports = { earnUSDTABIContract, @@ -18303,4 +16999,5 @@ module.exports = { hfDAOContract, hfStrategyContract, hfVaultContract, + eacAggregatoorProxyContract, }; diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 017e025..0dfa092 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -137,33 +137,33 @@ const testContracts = { tokenId: "dai", }, daoCDV: { - address: "0x542a42496c96b946324f7dce2b030d5643d9ef8a", + address: "0x626c25ca5b86277f395c0e40dbdf51f2a302ab43", abi: abi.citadelABIContract, - strategyAddress: "0x4996b12560b9a4a85dd437a3e8ff489335dcffa7", + strategyAddress: "0xc9939b0b2af53e8becba22ab153795e168140237", strategyABI: abi.citadelStrategyABIContract, contractType: "citadel", tokenId: ["tether", "usd-coin", "dai"], }, 'hfDAI': { - address: '0x0f89ee5b95d1d5cfb10f29775d816fc6d8adb9fc', + address: '0x6d7e8fa90c1ffdc019d691bafc18d6362fdeecd7', abi: abi.hfVaultContract, - strategyAddress: '0x1032e051bc71d36d82f2fde298cee1311852dd29', + strategyAddress: '0xdfeb689aea68f221eaafeeeb91767003265968d6', strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "dai", }, 'hfUSDC': { - address: '0x54783464848b35d6fb9bba37c1ddd23ac3b1a11a', + address: '0x68b1c860300c4f7d577f08d8b3c3aee23887b280', abi: abi.hfVaultContract, - strategyAddress: '0xe5331caf0b4e15c88e878551b93df0647738af35', + strategyAddress: '0x7da9e06545c4fe6556fc0990f5afd4955379e1d2', strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "usd-coin", }, 'hfUSDT': { - address: '0xb41a49de82e95dc1e028839c3440ac97f9a7832c', + address: '0x35880615bb18da592ff0feb0940ade2c02249715', abi: abi.hfVaultContract, - strategyAddress: '0x0bfa86d10a383b435748e39cedf8852cfd2b1a9d', + strategyAddress: '0xac783dc15d2cf08d1e1c34e18e531a9b182277b0', strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "tether", @@ -204,6 +204,12 @@ const testContracts = { address: '0x1298e9b9a2350ad91f2baf68ab4de8ecb9267621', abi: abi.hfVault, } + }, + chainLink: { + USDT_ETH: { + address: "0x0bF499444525a23E7Bb61997539725cA2e928138", + abi: abi.eacAggregatoorProxyContract, + } } }; @@ -383,6 +389,12 @@ const mainContracts = { address: '', // TODO Update mainnet address abi: abi.hfVault, } + }, + chainLink: { + USDT_ETH: { + address: "0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46", + abi: abi.eacAggregatoorProxyContract, + } } }; diff --git a/services/user/vaults/statistics/handler.js b/services/user/vaults/statistics/handler.js index 7282bd2..d6645dd 100644 --- a/services/user/vaults/statistics/handler.js +++ b/services/user/vaults/statistics/handler.js @@ -97,9 +97,8 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => depositedAmount = await strategyContract.methods.getCurrentBalance(userAddress).call(); depositedAmount = new BigNumber(depositedAmount); } else if (type === 'citadel') { - const pool = await vaultContract.methods.getAllPoolInETH().call(); - const totalSupply = await vaultContract.methods.totalSupply().call(); - depositedAmount = new BigNumber(pool).times(depositedShares).div(totalSupply); + depositedAmount = await vaultContract.methods._balanceOfDeposit(userAddress).call(); + depositedAmount = new BigNumber(depositedAmount); } else if (type === 'harvest') { depositedAmount = await strategyContract.methods.getCurrentBalance(userAddress).call(); depositedAmount = new BigNumber(depositedAmount); diff --git a/services/user/vaults/transactions/handler.js b/services/user/vaults/transactions/handler.js index 69f3125..3cb0322 100644 --- a/services/user/vaults/transactions/handler.js +++ b/services/user/vaults/transactions/handler.js @@ -205,7 +205,7 @@ const getTransactions = async (userAddress) => { //TODO Change dynamic address const vaultTransactions = { - vaultAddress: farmer.address, + vaultAddress: farmer == null ? "" : farmer.address, // vaultAddress: process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? prodContract.prodYfUSDTContract : devContract.devYfUSDTContract, deposits: depositsToVault.map(correctTransactionAddress), withdrawals: withdrawalsFromVault.map(correctTransactionAddress), diff --git a/services/vaults/apy/save/abis/vaultCitadel.js b/services/vaults/apy/save/abis/vaultCitadel.js index 9744623..c55dc35 100644 --- a/services/vaults/apy/save/abis/vaultCitadel.js +++ b/services/vaults/apy/save/abis/vaultCitadel.js @@ -1 +1 @@ -module.exports = [{"inputs":[{"internalType":"address","name":"_strategy","type":"address"},{"internalType":"address","name":"_treasuryWallet","type":"address"},{"internalType":"address","name":"_communityWallet","type":"address"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_strategist","type":"address"},{"internalType":"address","name":"_biconomy","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenDeposit","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amtDeposit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sharesMint","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_balanceOfWETH","type":"uint256"}],"name":"ETHToInvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fromStrategy","type":"address"},{"indexed":true,"internalType":"address","name":"toStrategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MigrateFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldCustomNetworkFeePerc","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCustomNetworkFeePerc","type":"uint256"}],"name":"SetCustomNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldCustomNetworkFeeTier","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newCustomNetworkFeeTier","type":"uint256"}],"name":"SetCustomNetworkFeeTier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeePerc","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeePerc","type":"uint256[]"}],"name":"SetNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeeTier2","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeeTier2","type":"uint256[]"}],"name":"SetNetworkFeeTier2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldProfileSharingFeePerc","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newProfileSharingFeePerc","type":"uint256"}],"name":"SetProfitSharingFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fees","type":"uint256"}],"name":"TransferredOutFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenWithdraw","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amtWithdraw","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sharesBurn","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"LOCKTIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"biconomy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canSetPendingStrategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeeTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllPoolInETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllPoolInUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"getReimburseTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"migrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeeTier2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"profitSharingFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reimburseTokenFromStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reinvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_biconomy","type":"address"}],"name":"setBiconomy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"}],"name":"setCommunityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setCustomNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_customNetworkFeeTier","type":"uint256"}],"name":"setCustomNetworkFeeTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeePerc","type":"uint256[]"}],"name":"setNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeeTier2","type":"uint256[]"}],"name":"setNetworkFeeTier2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pendingStrategy","type":"address"}],"name":"setPendingStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_percentages","type":"uint256[]"}],"name":"setPercTokenKeepInVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setProfitSharingFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"contract ICitadelStrategy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenFrom","type":"uint256"},{"internalType":"uint256","name":"_tokenTo","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"swapTokenWithinVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trustedForwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockMigrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"versionRecipient","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file +module.exports = [{"inputs":[{"internalType":"address","name":"_strategy","type":"address"},{"internalType":"address","name":"_treasuryWallet","type":"address"},{"internalType":"address","name":"_communityWallet","type":"address"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_strategist","type":"address"},{"internalType":"address","name":"_biconomy","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenDeposit","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amtDeposit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sharesMint","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_balanceOfWETH","type":"uint256"}],"name":"ETHToInvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fromStrategy","type":"address"},{"indexed":true,"internalType":"address","name":"toStrategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MigrateFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldCustomNetworkFeePerc","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCustomNetworkFeePerc","type":"uint256"}],"name":"SetCustomNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldCustomNetworkFeeTier","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newCustomNetworkFeeTier","type":"uint256"}],"name":"SetCustomNetworkFeeTier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeePerc","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeePerc","type":"uint256[]"}],"name":"SetNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeeTier2","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeeTier2","type":"uint256[]"}],"name":"SetNetworkFeeTier2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldProfileSharingFeePerc","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newProfileSharingFeePerc","type":"uint256"}],"name":"SetProfitSharingFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fees","type":"uint256"}],"name":"TransferredOutFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenWithdraw","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amtWithdraw","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sharesBurn","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"LOCKTIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_balanceOfDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canSetPendingStrategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeeTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"getAllPoolInETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllPoolInUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"getReimburseTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"migrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeeTier2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"profitSharingFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reimburseTokenFromStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reinvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_biconomy","type":"address"}],"name":"setBiconomy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"}],"name":"setCommunityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setCustomNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_customNetworkFeeTier","type":"uint256"}],"name":"setCustomNetworkFeeTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeePerc","type":"uint256[]"}],"name":"setNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeeTier2","type":"uint256[]"}],"name":"setNetworkFeeTier2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pendingStrategy","type":"address"}],"name":"setPendingStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_percentages","type":"uint256[]"}],"name":"setPercTokenKeepInVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setProfitSharingFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"contract ICitadelStrategy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenFrom","type":"uint256"},{"internalType":"uint256","name":"_tokenTo","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"swapTokenWithinVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trustedForwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockMigrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"versionRecipient","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yield","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index f3a874c..8217164 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -70,6 +70,21 @@ const getCompoundSupplyApy = async (cToken) => { return supplyApy; }; +const getPriceFromChainLink = async (block) => { + let contract, price = 0; + if (process.env.PRODUCTION != '') { + contract = new archiveNodeWeb3.eth.Contract(mainContracts.chainLink.USDT_ETH.abi, mainContracts.chainLink.USDT_ETH.address); + } else { + contract = new archiveNodeWeb3.eth.Contract(testContracts.chainLink.USDT_ETH.abi, testContracts.chainLink.USDT_ETH.address); + } + + try { + price = await contract.methods.latestAnswer().call(undefined, block); + } catch (ex) {} + await delay(delayTime); + return price; +}; + const getCitadelPricePerFullShare = async (contract, block, inceptionBlockNbr) => { const contractDidntExist = block < inceptionBlockNbr; const inceptionBlock = block === inceptionBlockNbr; @@ -83,7 +98,8 @@ const getCitadelPricePerFullShare = async (contract, block, inceptionBlockNbr) = let pricePerFullShare = 0; try { - const pool = await contract.methods.getAllPoolInETH().call(undefined, block); + const price = await getPriceFromChainLink(block); + const pool = await contract.methods.getAllPoolInETH(price).call(undefined, block); const totalSupply = await contract.methods.totalSupply().call(undefined, block); pricePerFullShare = pool / totalSupply; } catch (ex) {} diff --git a/services/vaults/apy/save/historical-handle.js b/services/vaults/apy/save/historical-handle.js index 81d3e7c..15dc760 100644 --- a/services/vaults/apy/save/historical-handle.js +++ b/services/vaults/apy/save/historical-handle.js @@ -101,6 +101,21 @@ const getPricePerFullShare = async ( return pricePerFullShare; }; +const getPriceFromChainLink = async (block) => { + let contract, price = 0; + if (process.env.PRODUCTION != '') { + contract = new archiveNodeWeb3.eth.Contract(mainContracts.chainLink.USDT_ETH.abi, mainContracts.chainLink.USDT_ETH.address); + } else { + contract = new archiveNodeWeb3.eth.Contract(testContracts.chainLink.USDT_ETH.abi, testContracts.chainLink.USDT_ETH.address); + } + + try { + price = await contract.methods.latestAnswer().call(undefined, block); + } catch (ex) {} + await delay(delayTime); + return price; +}; + const getCitadelPricePerFullShare = async (contract, block, inceptionBlockNbr) => { const contractDidntExist = block < inceptionBlockNbr; const inceptionBlock = block === inceptionBlockNbr; @@ -114,7 +129,8 @@ const getCitadelPricePerFullShare = async (contract, block, inceptionBlockNbr) = let pricePerFullShare = 0; try { - const pool = await contract.methods.getAllPoolInETH().call(undefined, block); + const price = await getPriceFromChainLink(block); + const pool = await contract.methods.getAllPoolInETH(price).call(undefined, block); const totalSupply = await contract.methods.totalSupply().call(undefined, block); pricePerFullShare = pool / totalSupply; } catch (ex) {} diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 89cb384..3c3077b 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -156,7 +156,7 @@ module.exports = [ description: "DAO Vault Citadel for 3 stablecoins", vaultSymbol: "daoCDV", erc20address: ["0x07de306ff27a2b630b1141956844eb1552b956b5", "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa"], - vaultContractAddress: "0x542a42496c96b946324f7dce2b030d5643d9ef8a", + vaultContractAddress: "0x626c25ca5b86277f395c0e40dbdf51f2a302ab43", vaultContractABI: config.vaultCitadelABI, balance: 0, vaultBalance: 0, @@ -165,7 +165,7 @@ module.exports = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 25098423, + lastMeasurement: 25336169, measurement: 1e18, price_id: ["tether", "usd-coin", "dai"], isCitadel: true, diff --git a/services/vaults/price/handler.js b/services/vaults/price/handler.js index 20257c5..73165fe 100644 --- a/services/vaults/price/handler.js +++ b/services/vaults/price/handler.js @@ -12,11 +12,30 @@ const db = require('../../../models/price.model'); const moment = require("moment"); const delay = require("delay"); const { delayTime } = require("../apy/save/config"); +const Web3 = require("web3"); +const archiveNodeUrl = process.env.ARCHIVENODE_ENDPOINT; +const archiveNodeWeb3 = new Web3(archiveNodeUrl); + +const getPriceFromChainLink = async () => { + let contract, price = 0; + if (process.env.PRODUCTION != '') { + contract = new archiveNodeWeb3.eth.Contract(mainContracts.chainLink.USDT_ETH.abi, mainContracts.chainLink.USDT_ETH.address); + } else { + contract = new archiveNodeWeb3.eth.Contract(testContracts.chainLink.USDT_ETH.abi, testContracts.chainLink.USDT_ETH.address); + } + + try { + price = await contract.methods.latestAnswer().call(); + } catch (ex) {} + await delay(delayTime); + return price; +}; const getCitadelPricePerFullShare = async (contract) => { let pricePerFullShare = 0; try { - const pool = await contract.methods.getAllPoolInETH().call(); + const price = await getPriceFromChainLink(); + const pool = await contract.methods.getAllPoolInETH(price).call(); const totalSupply = await contract.methods.totalSupply().call(); pricePerFullShare = pool / totalSupply; } catch (ex) {} From e7dea7c9851a01471b499138893e1bccc86e9c8d Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Thu, 10 Jun 2021 19:42:49 +0800 Subject: [PATCH 092/254] Merged to beta --- app.js | 18 ++--- config/serverless/domain.js | 52 +++++--------- scripts/initial.js | 10 +-- services/vaults/apy/save/handler.js | 2 +- services/vaults/apy/save/historical-handle.js | 2 +- services/vaults/apy/save/vaults.js | 72 +++++++++---------- services/vaults/price/handler.js | 2 +- services/vaults/tvl/handler.js | 10 +-- 8 files changed, 78 insertions(+), 90 deletions(-) diff --git a/app.js b/app.js index e97cae0..2e1f80b 100644 --- a/app.js +++ b/app.js @@ -32,8 +32,8 @@ async function init() { jobs.savePricePerFullShare(); jobs.saveHistoricalAPY(); jobs.saveHistoricalTVL(); - jobs.saveHistoricalPools(); - jobs.saveABIPools(); + // jobs.saveHistoricalPools(); + // jobs.saveABIPools(); }); app.use(cors()); @@ -61,13 +61,13 @@ async function init() { app.get("/vaults/category", (req, res) => vaultCategory.getVaultCategory(req, res) ); - app.get("/staking/get-vip-tokens", (req, res) => - stakeVIP.getVipDVGToken(req, res) - ); - app.get("/staking/get-pools", (req, res) => - stakePool.getPools(req, res) - ); - app.get("/staking/get-xdvg-stake", (req, res) => stakeXDvg.getxDVGStake(req, res)); + // app.get("/staking/get-vip-tokens", (req, res) => + // stakeVIP.getVipDVGToken(req, res) + // ); + // app.get("/staking/get-pools", (req, res) => + // stakePool.getPools(req, res) + // ); + // app.get("/staking/get-xdvg-stake", (req, res) => stakeXDvg.getxDVGStake(req, res)); app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument)); diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 0dfa092..4b7ac30 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -252,39 +252,39 @@ const mainContracts = { }, farmer: { yUSDT: { - address: "0x4F0C1c9bA6B9CCd0BEd6166e86b672ac8EE621F7", + address: "0x4f0c1c9ba6b9ccd0bed6166e86b672ac8ee621f7", abi: abi.vaultUSDTABIContract, - strategyAddress: "0x3DB93e95c9881BC7D9f2C845ce12e97130Ebf5f2", + strategyAddress: "0x3db93e95c9881bc7d9f2c845ce12e97130ebf5f2", strategyABI: abi.yearnUSDTABIContract, contractType: "yearn", tokenId: "tether", }, yUSDC: { - address: "0x9f0230FbDC0379E5FefAcca89bE03A42Fec5fb6E", + address: "0x9f0230fbdc0379e5fefacca89be03a42fec5fb6e", abi: abi.vaultUSDCABIContract, - strategyAddress: "0x4A9dE4dA5eC67E1dbc8e18F26E178B40D690A11D", + strategyAddress: "0x4a9de4da5ec67e1dbc8e18f26e178b40d690a11d", strategyABI: abi.yearnUSDCABIContract, contractType: "yearn", tokenId: "usd-coin", }, yDAI: { - address: "0x2bFc2Da293C911e5FfeC4D2A2946A599Bc4Ae770", + address: "0x2bfc2da293c911e5ffec4d2a2946a599bc4ae770", abi: abi.vaultDAIABIContract, - strategyAddress: "0x3685fB7CA1C555Cb5BD5A246422ee1f2c53DdB71", + strategyAddress: "0x3685fb7ca1c555cb5bd5a246422ee1f2c53ddb71", strategyABI: abi.yearnDAIABIContract, contractType: "yearn", tokenId: "dai", }, yTUSD: { - address: "0x2C8de02aD4312069355B94Fb936EFE6CFE0C8FF6", + address: "0x2c8de02ad4312069355b94fb936efe6cfe0c8ff6", abi: abi.vaultTUSDABIContract, - strategyAddress: "0xA6F1409a259B21a84c8346ED1B0826D656959a54", + strategyAddress: "0xa6f1409a259b21a84c8346ed1b0826d656959a54", strategyABI: abi.yearnTUSDABIContract, contractType: "yearn", tokenId: "true-usd", }, cUSDT: { - address: "0xEeCe6AD323a93d4B021BDAaC587DCC04b5cf0a78", + address: "0xeece6ad323a93d4b021bdaac587dcc04b5cf0a78", abi: abi.compoundVaultContract, strategyAddress: "0x11af10648ed5094f41753ccb69a2f74135697631", strategyABI: abi.compoundStrategyContract, @@ -292,7 +292,7 @@ const mainContracts = { tokenId: "tether", }, cUSDC: { - address: "0xd1D7f950899C0269a7F2aad5E854cdc3a1350ba9", + address: "0xd1d7f950899c0269a7f2aad5e854cdc3a1350ba9", abi: abi.compoundVaultContract, strategyAddress: "0x89be389b0529ca3187b6e81e689496cb3bad8557", strategyABI: abi.compoundStrategyContract, @@ -300,7 +300,7 @@ const mainContracts = { tokenId: "usd-coin", }, cDAI: { - address: "0x43C20638C3914Eca3c96e9cAc8ebE7d652Be45c6", + address: "0x43c20638c3914eca3c96e9cac8ebe7d652be45c6", abi: abi.compoundVaultContract, strategyAddress: "0x0c5cff1c9ec7ce8e28998503471b19c848c5a581", strategyABI: abi.compoundStrategyContract, @@ -308,33 +308,33 @@ const mainContracts = { tokenId: "dai", }, daoCDV: { - address: "", // TODO Update on mainnet + address: "0x8fe826cc1225b03aa06477ad5af745aed5fe7066", abi: abi.citadelABIContract, - strategyAddress: "", // TODO Update on mainnet + strategyAddress: "0x8a00046ab28051a952e64a886cd8961ca90a59bd", strategyABI: abi.citadelStrategyABIContract, contractType: "citadel", tokenId: ["tether", "usd-coin", "dai"], }, hfDAI: { - address: '', // TODO: Update that this to mainnet address + address: '0x2cc1507e6e3c844eeb77db90d193489f1ddfb299', abi: abi.hfVaultContract, - strategyAddress: '', + strategyAddress: '0x89541e3b8e8b73c108744909ea11d506b4a8e6c7', strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "dai", }, hfUSDC: { - address: '', // TODO: Update that this to mainnet address + address: '0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc', abi: abi.hfVaultContract, - strategyAddress: '', + strategyAddress: '0x0af9547974e056fca221f679dbbb7f8651407d7f', strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "usd-coin", }, hfUSDT: { - address: '', // TODO: Update that this to mainnet address + address: '0xe4e6ce7c1d9ff44db27f622accbb0753c2f48955', abi: abi.hfVaultContract, - strategyAddress: '', + strategyAddress: '0xef9a15025c2ed048a67c5c8019a1101172eeb51c', strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "tether", @@ -376,20 +376,6 @@ const mainContracts = { abi: abi.uniswapPairABIContract, } }, - harvest: { - 'hfDAI': { - address: '', // TODO Update mainnet address - abi: abi.hfVault, - }, - 'hfUSDC': { - address: '', // TODO Update mainnet address - abi: abi.hfVault, - }, - 'hfUSDT': { - address: '', // TODO Update mainnet address - abi: abi.hfVault, - } - }, chainLink: { USDT_ETH: { address: "0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46", diff --git a/scripts/initial.js b/scripts/initial.js index 9ec1674..63c9b83 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -7,10 +7,10 @@ db.vault_categories.insertMany([ { name: 'basic', contract_address: '0xEeCe6AD323a93d4B021BDAaC587DCC04b5cf0a78', symbol: 'cUSDT' }, { name: 'basic', contract_address: '0xd1D7f950899C0269a7F2aad5E854cdc3a1350ba9', symbol: 'cUSDC', }, { name: 'basic', contract_address: '0x43C20638C3914Eca3c96e9cAc8ebE7d652Be45c6', symbol: 'cDAI', }, - // TODO: add in mainnet contract addresss - // { name: 'basic', contract_address: '', symbol: 'hfUSDT'}, - // { name: 'basic', contract_address: '', symbol: 'hfUSDC'}, - // { name: 'basic', contract_address: '', symbol: 'hfDAI'}, + { name: 'expert', contract_address: '0x8fe826cc1225b03aa06477ad5af745aed5fe7066', symbol: 'daoCDV', }, + { name: 'basic', contract_address: '0xe4e6ce7c1d9ff44db27f622accbb0753c2f48955', symbol: 'hfUSDT'}, + { name: 'basic', contract_address: '0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc', symbol: 'hfUSDC'}, + { name: 'basic', contract_address: '0x2cc1507e6e3c844eeb77db90d193489f1ddfb299', symbol: 'hfDAI'}, ]); // Testnet Contracts @@ -22,7 +22,7 @@ db.vault_categories.insertMany([ { name: 'basic', contract_address: '0x5d102e0bdf2037899e1ff2e8cc50987108533c52', symbol: 'cUSDT' }, { name: 'basic', contract_address: '0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e', symbol: 'cUSDC', }, { name: 'basic', contract_address: '0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d', symbol: 'cDAI', }, - { name: 'degen', contract_address: '0x542a42496c96b946324f7dce2b030d5643d9ef8a', symbol: 'daoCDV', }, + { name: 'expert', contract_address: '0x542a42496c96b946324f7dce2b030d5643d9ef8a', symbol: 'daoCDV', }, { name: 'basic', contract_address: '0xb41a49de82e95dc1e028839c3440ac97f9a7832c', symbol: 'hfUSDT'}, { name: 'basic', contract_address: '0x54783464848b35d6fb9bba37c1ddd23ac3b1a11a', symbol: 'hfUSDC'}, { name: 'basic', contract_address: '0x0f89ee5b95d1d5cfb10f29775d816fc6d8adb9fc', symbol: 'hfDAI'}, diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index 8217164..50fd0d9 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -197,7 +197,7 @@ const getApyForVault = async (vault) => { apyOneMonthSample: 0, apyLoanscan: 0, compoundApy: 0, - citadelApy: apy, + citadelApy: isNaN(apy) ? 0 : apy, } } else if (vault.isHarvest) { // Harvest Vault diff --git a/services/vaults/apy/save/historical-handle.js b/services/vaults/apy/save/historical-handle.js index 15dc760..738bb3f 100644 --- a/services/vaults/apy/save/historical-handle.js +++ b/services/vaults/apy/save/historical-handle.js @@ -194,7 +194,7 @@ const getApyForVault = async (vault) => { apyOneMonthSample: 0, apyLoanscan: 0, compoundApy: 0, - citadelApy: apy, + citadelApy: isNaN(apy) ? 0 : apy, } } else if (vault.isHarvest) { // Harvest Vault diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 3c3077b..eacd29a 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -7,8 +7,8 @@ module.exports = [ name: "Compound DAI", symbol: "cDAI", description: "Compound DAI", - erc20address: "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa", - vaultContractAddress: "0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d", + erc20address: "0x6b175474e89094c44da98b954eedeac495271d0f", + vaultContractAddress: "0x43c20638c3914eca3c96e9cac8ebe7d652be45c6", vaultContractABI: abi.cDAIContract, balance: 0, vaultBalance: 0, @@ -17,7 +17,7 @@ module.exports = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 10650116, + lastMeasurement: 12125533, measurement: 1e18, price_id: "dai", vaultSymbol: 'cDAI', @@ -28,8 +28,8 @@ module.exports = [ name: "Compound USDC", symbol: "cUSDC", description: "Compound USDC", - erc20address: "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", - vaultContractAddress: "0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e", + erc20address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + vaultContractAddress: "0xd1d7f950899c0269a7f2aad5e854cdc3a1350ba9", vaultContractABI: abi.cUSDCContract, balance: 0, vaultBalance: 0, @@ -38,7 +38,7 @@ module.exports = [ depositAll: false, withdraw: true, withdrawAll: false, - lastMeasurement: 10532708, + lastMeasurement: 12125523, measurement: 1e18, price_id: "usd-coin", vaultSymbol: 'cUSDC', @@ -49,8 +49,8 @@ module.exports = [ name: "Compound USDT", symbol: "cUSDT", description: "Compound USDT", - erc20address: "0x07de306ff27a2b630b1141956844eb1552b956b5", - vaultContractAddress: "0x5d102e0bdf2037899e1ff2e8cc50987108533c52", + erc20address: "0xdac17f958d2ee523a2206206994597c13d831ec7", + vaultContractAddress: "0xeece6ad323a93d4b021bdaac587dcc04b5cf0a78", vaultContractABI: abi.cUSDTContract, balance: 0, vaultBalance: 0, @@ -59,7 +59,7 @@ module.exports = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 10651402, + lastMeasurement: 12125523, measurement: 1e18, price_id: "tether", vaultSymbol: 'cUSDT', @@ -71,8 +71,8 @@ module.exports = [ symbol: "DAI", description: "DAI Stablecoin", vaultSymbol: "yDAI", - erc20address: "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa", - vaultContractAddress: "0x5c2eea0a960cc1f604bf3c35a52ca2273f12e67e", + erc20address: "0x6b175474e89094c44da98b954eedeac495271d0f", + vaultContractAddress: "0xacd43e627e64355f1861cec6d3a6688b31a6f952", vaultContractABI: config.vaultContractV2ABI, balance: 0, vaultBalance: 0, @@ -81,7 +81,7 @@ module.exports = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 24563615, + lastMeasurement: 10650116, measurement: 1e18, price_id: "dai", isYearn: true, @@ -92,8 +92,8 @@ module.exports = [ symbol: "TUSD", description: "TrueUSD", vaultSymbol: "yTUSD", - erc20address: "0xf0a112a9da3cae4668270729c3d5917b6cb79564", - vaultContractAddress: "0xa8564f8d255c33175d4882e55f1a6d19e7a7d351", + erc20address: "0x0000000000085d4780b73119b644ae5ecd22b376", + vaultContractAddress: "0x37d19d1c4e1fa9dc47bd1ea12f742a0887eda74a", vaultContractABI: config.vaultContractV2ABI, balance: 0, vaultBalance: 0, @@ -102,7 +102,7 @@ module.exports = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 24737399, + lastMeasurement: 10603368, measurement: 1e18, price_id: "true-usd", isYearn: true, @@ -113,8 +113,8 @@ module.exports = [ symbol: "USDC", description: "USD//C", vaultSymbol: "yUSDC", - erc20address: "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", - vaultContractAddress: "0xabdb489ded91b6646fadc8eeb0ca82ea1d526182", + erc20address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + vaultContractAddress: "0x597ad1e0c13bfe8025993d9e79c69e1c0233522e", vaultContractABI: config.vaultContractABI, balance: 0, vaultBalance: 0, @@ -123,7 +123,7 @@ module.exports = [ depositAll: false, withdraw: true, withdrawAll: false, - lastMeasurement: 24563583, + lastMeasurement: 10532708, measurement: 1e18, price_id: "usd-coin", isYearn: true, @@ -134,8 +134,8 @@ module.exports = [ symbol: "USDT", description: "Tether USD", vaultSymbol: "yUSDT", - erc20address: "0x07de306ff27a2b630b1141956844eb1552b956b5", - vaultContractAddress: "0xa5c53c76729e92630a2a3c549215110a330c902d", + erc20address: "0xdac17f958d2ee523a2206206994597c13d831ec7", + vaultContractAddress: "0x2f08119c6f07c006695e079aafc638b8789faf18", vaultContractABI: config.vaultContractV2ABI, balance: 0, vaultBalance: 0, @@ -144,7 +144,7 @@ module.exports = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 24547196, + lastMeasurement: 10651402, measurement: 1e18, price_id: "tether", isYearn: true, @@ -155,8 +155,8 @@ module.exports = [ symbol: ["USDT","USDC","DAI"], description: "DAO Vault Citadel for 3 stablecoins", vaultSymbol: "daoCDV", - erc20address: ["0x07de306ff27a2b630b1141956844eb1552b956b5", "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa"], - vaultContractAddress: "0x626c25ca5b86277f395c0e40dbdf51f2a302ab43", + erc20address: ["0xdac17f958d2ee523a2206206994597c13d831ec7", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0x6b175474e89094c44da98b954eedeac495271d0f"], + vaultContractAddress: "0x8fe826cc1225b03aa06477ad5af745aed5fe7066", vaultContractABI: config.vaultCitadelABI, balance: 0, vaultBalance: 0, @@ -165,7 +165,7 @@ module.exports = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 25336169, + lastMeasurement: 12586420, measurement: 1e18, price_id: ["tether", "usd-coin", "dai"], isCitadel: true, @@ -176,10 +176,10 @@ module.exports = [ symbol: "DAI", description: "DAI Stablecoin", vaultSymbol: "hfDAI", - erc20address: "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa", - vaultContractAddress: "0x0f89EE5b95d1d5cfb10F29775d816fC6D8Adb9FC", + erc20address: "0x6b175474e89094c44da98b954eedeac495271d0f", + vaultContractAddress: "0xe4e6ce7c1d9ff44db27f622accbb0753c2f48955", vaultContractABI: abi.hfVaultContract, - strategyContractAddress: "0xE5331cAF0B4E15C88E878551b93df0647738Af35", + strategyContractAddress: "0xef9a15025c2ed048a67c5c8019a1101172eeb51c", strategyABI: abi.hfStrategyContract, balance: 0, vaultBalance: 0, @@ -188,7 +188,7 @@ module.exports = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 24943134, + lastMeasurement: 12593517, measurement: 1e18, price_id: "dai", isHarvest: true @@ -199,10 +199,10 @@ module.exports = [ symbol: "USDC", description: "USD//C", vaultSymbol: "hfUSDC", - erc20address: "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", - vaultContractAddress: "0x54783464848b35d6fb9bba37C1dDd23aC3B1A11A", + erc20address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + vaultContractAddress: "0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc", vaultContractABI: abi.hfVaultContract, - strategyContractAddress: "0xE5331cAF0B4E15C88E878551b93df0647738Af35", + strategyContractAddress: "0x0af9547974e056fca221f679dbbb7f8651407d7f", strategyABI: abi.hfStrategyContract, balance: 0, vaultBalance: 0, @@ -211,7 +211,7 @@ module.exports = [ depositAll: false, withdraw: true, withdrawAll: false, - lastMeasurement: 24943141, + lastMeasurement: 12593522, measurement: 1e18, price_id: "usd-coin", isHarvest: true @@ -222,10 +222,10 @@ module.exports = [ symbol: "USDT", description: "Tether USD", vaultSymbol: "hfUSDT", - erc20address: "0x07de306ff27a2b630b1141956844eb1552b956b5", - vaultContractAddress: "0xb41A49De82e95dc1E028839C3440Ac97f9A7832C", + erc20address: "0xdac17f958d2ee523a2206206994597c13d831ec7", + vaultContractAddress: "0x2cc1507e6e3c844eeb77db90d193489f1ddfb299", vaultContractABI: abi.hfVaultContract, - strategyContractAddress: "0x0bFA86d10A383B435748E39Cedf8852CFD2B1A9d", + strategyContractAddress: "0x89541e3b8e8b73c108744909ea11d506b4a8e6c7", strategyABI: abi.hfStrategyContract, balance: 0, vaultBalance: 0, @@ -234,7 +234,7 @@ module.exports = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 24943148, + lastMeasurement: 12593527, measurement: 1e18, price_id: "tether", isHarvest: true diff --git a/services/vaults/price/handler.js b/services/vaults/price/handler.js index 73165fe..4d57a4b 100644 --- a/services/vaults/price/handler.js +++ b/services/vaults/price/handler.js @@ -84,7 +84,7 @@ const getCurrentPrice = async () => { earnPrice: 0, vaultPrice: 0, compoundExchangeRate: 0, - citadelPrice: pricePerFullShare, + citadelPrice: isNaN(pricePerFullShare) ? 0 : pricePerFullShare, harvestPrice: 0, }).catch((err) => console.log('err', err)); } else if (contracts.farmer[key].contractType === 'harvest') { diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index 466be85..61b07cc 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -175,10 +175,12 @@ const getAllTVL = async () => { await saveTVL(vault, tvl); } - let _vault = vaults.vipDVG; - let tvl = await getTVLxDVG(_vault); - tvls.push(tvl); - await saveTVL("xDVG", tvl); + if (process.env.PRODUCTION == null || process.env.PRODUCTION == "") { + let _vault = vaults.vipDVG; + let tvl = await getTVLxDVG(_vault); + tvls.push(tvl); + await saveTVL("xDVG", tvl); + } return tvls; }; From 182bf2acb5a873479d3696d5b6787a103d4d5640 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Sun, 13 Jun 2021 14:50:10 +0800 Subject: [PATCH 093/254] - Enhanced TVL and xDVGPrice for DAOvip API --- services/staking/vipdvg/handler.js | 59 +++++++++++++++++++----------- 1 file changed, 38 insertions(+), 21 deletions(-) diff --git a/services/staking/vipdvg/handler.js b/services/staking/vipdvg/handler.js index e22d22f..be06d0e 100644 --- a/services/staking/vipdvg/handler.js +++ b/services/staking/vipdvg/handler.js @@ -36,15 +36,15 @@ const getTokenPrice = async (coingecko_token_id) => { return; } -// Get vipDVG's total supply -const getxDVGTotalSupply = async(xDVGContract) => { +const getDecimals = async (contract) => { try { - const xDVGTotalSupply = await xDVGContract.methods.totalSupply().call(); - return xDVGTotalSupply; - } catch(err) { - console.log("Error in getxDVGTotalSupply(): ", err); + let decimals = await contract.methods.decimals().call(); + return decimals; + } catch (err) { + // Catch error + console.log(err); } -} +}; // DVG's balance of vipDVG contract const getDVGBalanceOfxDVG = async(dvgContract, xDVGAddress) => { @@ -56,28 +56,45 @@ const getDVGBalanceOfxDVG = async(dvgContract, xDVGAddress) => { } } -// xDVGPrice Formula : xDVG price = ( DVG amount of xDVG SC * DVG price) / xDVG amount -const getxDVGPrice = async (xDVGAmount, dvgBalanceOfxDVG, dvgPrice) => { - return (dvgBalanceOfxDVG * dvgPrice) / xDVGAmount; +// xDVGPrice Formula : xDVG price = ( DVG amount of xDVG SC * DVG price) / xDVG totalSupply +const getxDVGPrice = async (xDVGTotalSupply, dvgBalanceOfxDVG, dvgPrice) => { + return (dvgBalanceOfxDVG * dvgPrice) / xDVGTotalSupply; } +const getTotalSupply = async (contract) => { + try { + let totalSupply = await contract.methods.totalSupply().call(); + return totalSupply; + } catch (err) { + // Catch error + console.log(err); + } +}; + +/** + * Get TVL of xDVG. + * TVL = totalSupply * xDVG Price + */ + const getTVLxDVG = async (vault, totalSupply, tokenPrice) => { + let tvl; + const contract = await getContract(vault); + const decimals = await getDecimals(contract); + + tvl = (totalSupply / 10 ** decimals) * tokenPrice; + return tvl; +}; + // APR calculation Formula : (xDVG's total supply * xDVG price) / (DVG.balanceOf(xDVG) * DVG price) -const getxDVGAPR = async (dvgContract, xDVGContract) => { - const xDVGTotalSupply = await getxDVGTotalSupply(xDVGContract); +const getxDVGAPR = async (dvgContract, xDVGContract, xDVGContractInfo) => { + const xDVGTotalSupply = await getTotalSupply(xDVGContract); const dvgBalOfxDVG = await getDVGBalanceOfxDVG(dvgContract, xDVGContract._address); const dvgPrice = await getTokenPrice("daoventures"); const xDVGPrice = await getxDVGPrice(xDVGTotalSupply, dvgBalOfxDVG, dvgPrice); - - console.log("total supply: ", xDVGTotalSupply); - console.log("balance: ", dvgBalOfxDVG); - console.log("dvg price: ", dvgPrice); - console.log("xDVG price", xDVGPrice); - + const tvl = await getTVLxDVG(xDVGContractInfo, xDVGTotalSupply, xDVGPrice); const apr = (xDVGTotalSupply * xDVGPrice) / (dvgBalOfxDVG * dvgPrice); - console.log("apr", apr); - return { apr, dvgPrice }; + return { apr, dvgPrice, tvl, xDVGPrice }; } module.exports.getxDVGStake = async(req, res) => { @@ -90,7 +107,7 @@ module.exports.getxDVGStake = async(req, res) => { const dvgContractInfo = getContractInfo("DVG"); const dvgContract = await getContract(dvgContractInfo); - let result = await getxDVGAPR(dvgContract, xDVGContract); + let result = await getxDVGAPR(dvgContract, xDVGContract, xDVGContractInfo); if(!result.apr || isNaN(result.apr)) { result.apr = 0.00; From 24dd51d0260ee53cc128dc8ed7e90ef787d4c3cd Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Tue, 15 Jun 2021 14:18:40 +0800 Subject: [PATCH 094/254] Update subgraph query for user transaction, return withdrawal and deposit in USD in API result.. --- services/user/vaults/statistics/handler.js | 21 ++++++++++++++++++-- services/user/vaults/transactions/handler.js | 4 ++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/services/user/vaults/statistics/handler.js b/services/user/vaults/statistics/handler.js index 9613d7d..7a5db8a 100644 --- a/services/user/vaults/statistics/handler.js +++ b/services/user/vaults/statistics/handler.js @@ -65,9 +65,9 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => if (vault.vaultAddress == null) return false; return vault.vaultAddress.toLowerCase() === contractAddress; } - - const transactionsForVault = _.find(transactions, findVault); + const transactionsForVault = _.find(transactions, findVault); + // Get User Deposit Amount let strategyContract; let vaultContract; @@ -80,6 +80,7 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => type = mainContracts.farmer[symbol].contractType; } else { const symbol = Object.keys(testContracts.farmer).find(key => testContracts.farmer[key].address.toLowerCase() === contractAddress.toLowerCase()); + strategyContract = getContract(testContracts.farmer[symbol].strategyABI, testContracts.farmer[symbol].strategyAddress); vaultContract = getContract(testContracts.farmer[symbol].abi, testContracts.farmer[symbol].address); type = testContracts.farmer[symbol].contractType; @@ -121,8 +122,22 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => return sum; }; + const getSumForUSD = (data) => { + const zero = new BigNumber(0); + const sum = data.reduce( + (dataItem, item) => { + return dataItem.plus(item.amountInUSD ? item.amountInUSD : 0); + }, + zero, + data + ); + return sum; + } + const totalDeposits = getSum(deposits); + const totalDepositsInUSD = getSumForUSD(deposits); const totalWithdrawals = getSum(withdrawals); + const totalWithdrawalsInUSD = getSumForUSD(withdrawals); const totalTransferredIn = getSum(transfersIn); const totalTransferredOut = getSum(transfersOut); @@ -135,7 +150,9 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => const statistics = { contractAddress, totalDeposits: totalDeposits.toFixed(), + totalDepositsInUSD: totalDepositsInUSD.toFixed(), totalWithdrawals: totalWithdrawals.toFixed(), + totalWithdrawalsInUSD: totalWithdrawalsInUSD.toFixed(), totalTransferredIn: totalTransferredIn.toFixed(), totalTransferredOut: totalTransferredOut.toFixed(), depositedShares, diff --git a/services/user/vaults/transactions/handler.js b/services/user/vaults/transactions/handler.js index 69f3125..bd14f44 100644 --- a/services/user/vaults/transactions/handler.js +++ b/services/user/vaults/transactions/handler.js @@ -55,6 +55,7 @@ const getGraphTransactions = async (userAddress) => { id } amount + amountInUSD transaction { timestamp } @@ -67,6 +68,7 @@ const getGraphTransactions = async (userAddress) => { id } amount + amountInUSD transaction { timestamp } @@ -121,6 +123,7 @@ const getVaultAddressesForUserWithGraphTransactions = ( transfersOut, } = graphTransactions; + const txMapping = (tx) => { tx.vaultAddress = tx.vaultAddress.id; tx.transactionAddress = tx. transactionAddress.id; @@ -142,6 +145,7 @@ const getVaultAddressesForUserWithGraphTransactions = ( ...pluck("vaultAddress", transfersIn), ...pluck("vaultAddress", transfersOut), ]); + return vaultAddressesForUser; }; From b01895591c78f33afce2027cf7784db59a606e78 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Tue, 15 Jun 2021 16:49:59 +0800 Subject: [PATCH 095/254] - Enhanced APR for daoVip --- app.js | 1 + config/serverless/domain.js | 2 + jobs/task.js | 17 +++++++ models/vip-apy.model.js | 33 +++++++++++++ services/staking/vipdvg/handler.js | 74 +++++++++++++++++++++++++++--- 5 files changed, 120 insertions(+), 7 deletions(-) create mode 100644 models/vip-apy.model.js diff --git a/app.js b/app.js index e97cae0..9854de7 100644 --- a/app.js +++ b/app.js @@ -34,6 +34,7 @@ async function init() { jobs.saveHistoricalTVL(); jobs.saveHistoricalPools(); jobs.saveABIPools(); + jobs.saveVipApr(); }); app.use(cors()); diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 0dfa092..5d3740e 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -173,6 +173,7 @@ const testContracts = { address: "0x3aa8e8B6D3562a1E7aCB0dddD02b27896C00c424", abi: abi.xDVGABIContract, tokenId: "xDVG", + lastMeasurement: 24819747, }, DVG: { address: "0xea9726eFc9831EF0499fD4Db4Ab143F15a797673", @@ -358,6 +359,7 @@ const mainContracts = { address: "", // TODO: Update mainnet address abi: abi.xDVGABIContract, tokenId: "xDVG", + lastMeasurement: 0, // TODO Update lastMeasurement }, DVG: { address: "", // TODO: Update mainnet address diff --git a/jobs/task.js b/jobs/task.js index 9301127..e70360d 100644 --- a/jobs/task.js +++ b/jobs/task.js @@ -6,6 +6,7 @@ const priceSave = require("../services/vaults/price/handler"); const tvlSave = require("../services/vaults/tvl/handler"); const stakeSave = require("../services/staking/dao-stake/handler"); const poolSave = require("../services/staking/handler"); +const vipDVG = require("../services/staking/vipdvg/handler"); /** Save Vault **/ const saveVault = async () => { @@ -114,6 +115,21 @@ const saveABIPools = async () => { ); }; +/** Store DAOVIP APR */ +const saveVipApr = async () => { + await vipDVG.getVipAPY(); + cron.schedule( + "*/5 * * * *", + async () => { + console.log("[saveVipApr]", new Date().getTime()); + await vipDVG.getVipAPY(); + }, + { + scheduled: true, + } + ); +}; + module.exports = { saveHistoricalTVL, saveVaultAPY, @@ -122,4 +138,5 @@ module.exports = { saveHistoricalAPY, saveHistoricalPools, saveABIPools, + saveVipApr, }; diff --git a/models/vip-apy.model.js b/models/vip-apy.model.js new file mode 100644 index 0000000..999d95f --- /dev/null +++ b/models/vip-apy.model.js @@ -0,0 +1,33 @@ +const mongo = require('../config/db'); +const collection = 'vip-apy'; + +const findOne = async (params) => { + const db = mongo.getDB(); + return await db.collection(collection).findOne({ + name: params.name + }); +}; + +const add = async (params) => { + const db = mongo.getDB(); + const result = await db.collection(collection).findOne({ + name: params.name + }); + if (result != null) { + return await db.collection(collection).updateOne({ + name: params.name + }, + { + $set: { + ...params + } + }); + } else { + return await db.collection(collection).insertOne(params); + } +} + +module.exports = { + findOne, + add +}; \ No newline at end of file diff --git a/services/staking/vipdvg/handler.js b/services/staking/vipdvg/handler.js index be06d0e..a421a81 100644 --- a/services/staking/vipdvg/handler.js +++ b/services/staking/vipdvg/handler.js @@ -2,10 +2,19 @@ const { testContracts, mainContracts } = require("../../../config/serverless/dom const Web3 = require("web3"); const CoinGecko = require("coingecko-api"); +const moment = require("moment"); +const delay = require("delay"); +const EthDater = require("../../vaults/apy/save/ethereum-block-by-date"); +const { delayTime } = require("../../vaults/apy/save/config"); +const db = require("../../../models/vip-apy.model"); const CoinGeckoClient = new CoinGecko(); +const infuraUrl = process.env.WEB3_ENDPOINT; const archiveNodeUrl = process.env.ARCHIVENODE_ENDPOINT; const archiveNodeWeb3 = new Web3(archiveNodeUrl); +const infuraWeb3 = new Web3(infuraUrl); +const blocks = new EthDater(archiveNodeWeb3, delayTime); +const DB_CONSTANT = 'daoVip'; // Get VIP DVG contract info from domain based on enviroment const getContractInfo = (name) => { @@ -84,17 +93,72 @@ const getTotalSupply = async (contract) => { return tvl; }; +const calculateAPR = async (apr, lastMeasurement) => { + const oneDayAgo = moment().subtract(1, "days").valueOf(); + await delay(delayTime); + const oneDayAgoBlock = (await blocks.getDate(oneDayAgo)).block; + const currentBlockNbr = await infuraWeb3.eth.getBlockNumber(); + const nbrBlocksInDay = currentBlockNbr - oneDayAgoBlock; + const days = (currentBlockNbr - lastMeasurement) / nbrBlocksInDay; + const aprPerDay = apr / days; + return { + aprOneDay: aprPerDay, + aprOneWeek: aprPerDay * 7, + aprOneMonth: aprPerDay * 30, + aprOneYear: aprPerDay * 365, + } +} + +const getAPR = async () => { + const apr = await db.findOne({ + name: DB_CONSTANT, + }); + + if (apr != null) { + delete apr._id; + delete apr.name; + } + return apr; +} + // APR calculation Formula : (xDVG's total supply * xDVG price) / (DVG.balanceOf(xDVG) * DVG price) const getxDVGAPR = async (dvgContract, xDVGContract, xDVGContractInfo) => { const xDVGTotalSupply = await getTotalSupply(xDVGContract); const dvgBalOfxDVG = await getDVGBalanceOfxDVG(dvgContract, xDVGContract._address); + const dvgPrice = await getTokenPrice("daoventures"); + const xDVGPrice = await getxDVGPrice(xDVGTotalSupply, dvgBalOfxDVG, dvgPrice); + const apr = await calculateAPR((xDVGTotalSupply * xDVGPrice) / (dvgBalOfxDVG * dvgPrice), xDVGContractInfo.lastMeasurement); + return { ...apr }; +} + +const getxDVGInfo = async (dvgContract, xDVGContract, xDVGContractInfo) => { + const xDVGTotalSupply = await getTotalSupply(xDVGContract); + const dvgBalOfxDVG = await getDVGBalanceOfxDVG(dvgContract, xDVGContract._address); + const dvgPrice = await getTokenPrice("daoventures"); const xDVGPrice = await getxDVGPrice(xDVGTotalSupply, dvgBalOfxDVG, dvgPrice); const tvl = await getTVLxDVG(xDVGContractInfo, xDVGTotalSupply, xDVGPrice); - const apr = (xDVGTotalSupply * xDVGPrice) / (dvgBalOfxDVG * dvgPrice); + const apr = await getAPR(); + return { ...apr, dvgPrice, tvl, xDVGPrice }; +} - return { apr, dvgPrice, tvl, xDVGPrice }; +module.exports.getVipAPY = async () => { + try { + // Get vipDVG contract + const xDVGContractInfo = getContractInfo("vipDVG"); + const xDVGContract = await getContract(xDVGContractInfo); + + // Get DVG contract + const dvgContractInfo = getContractInfo("DVG"); + const dvgContract = await getContract(dvgContractInfo); + + let result = await getxDVGAPR(dvgContract, xDVGContract, xDVGContractInfo); + await db.add({ + ...result, + name: DB_CONSTANT, + }) + } catch (err) {} } module.exports.getxDVGStake = async(req, res) => { @@ -107,11 +171,7 @@ module.exports.getxDVGStake = async(req, res) => { const dvgContractInfo = getContractInfo("DVG"); const dvgContract = await getContract(dvgContractInfo); - let result = await getxDVGAPR(dvgContract, xDVGContract, xDVGContractInfo); - - if(!result.apr || isNaN(result.apr)) { - result.apr = 0.00; - } + let result = await getxDVGInfo(dvgContract, xDVGContract, xDVGContractInfo); res.status(200).json({ message: 'Successful Response', From 364aed65b475ebd2cb99437adb55824316916c3f Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Tue, 15 Jun 2021 17:06:43 +0800 Subject: [PATCH 096/254] Added APR --- services/staking/vipdvg/handler.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/services/staking/vipdvg/handler.js b/services/staking/vipdvg/handler.js index a421a81..844ee11 100644 --- a/services/staking/vipdvg/handler.js +++ b/services/staking/vipdvg/handler.js @@ -128,8 +128,13 @@ const getxDVGAPR = async (dvgContract, xDVGContract, xDVGContractInfo) => { const dvgPrice = await getTokenPrice("daoventures"); const xDVGPrice = await getxDVGPrice(xDVGTotalSupply, dvgBalOfxDVG, dvgPrice); - const apr = await calculateAPR((xDVGTotalSupply * xDVGPrice) / (dvgBalOfxDVG * dvgPrice), xDVGContractInfo.lastMeasurement); - return { ...apr }; + let apr = (xDVGTotalSupply * xDVGPrice) / (dvgBalOfxDVG * dvgPrice); + + if (isNaN(apr)) { + apr = 0; + } + const aprInfo = await calculateAPR(apr, xDVGContractInfo.lastMeasurement); + return { ...aprInfo, apr }; } const getxDVGInfo = async (dvgContract, xDVGContract, xDVGContractInfo) => { From 52f6407b055be9e8e27689f309acce8a9ad5db01 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Tue, 15 Jun 2021 22:51:58 +0800 Subject: [PATCH 097/254] DAO-123: Incorrect "Total Earnings" under Statistic --- services/user/vaults/statistics/handler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/user/vaults/statistics/handler.js b/services/user/vaults/statistics/handler.js index 7a5db8a..27830d7 100644 --- a/services/user/vaults/statistics/handler.js +++ b/services/user/vaults/statistics/handler.js @@ -142,8 +142,8 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => const totalTransferredOut = getSum(transfersOut); const earnings = depositedAmount - .minus(totalDeposits) - .plus(totalWithdrawals) + .minus(totalDepositsInUSD) + .plus(totalWithdrawalsInUSD) .minus(totalTransferredIn) .plus(totalTransferredOut); From a590b0ee9dd715463a269b0f2fddbc246c460de5 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Wed, 16 Jun 2021 09:38:43 +0800 Subject: [PATCH 098/254] Citadel earning. --- services/user/vaults/statistics/handler.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/services/user/vaults/statistics/handler.js b/services/user/vaults/statistics/handler.js index 27830d7..1dd6c90 100644 --- a/services/user/vaults/statistics/handler.js +++ b/services/user/vaults/statistics/handler.js @@ -141,11 +141,22 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => const totalTransferredIn = getSum(transfersIn); const totalTransferredOut = getSum(transfersOut); - const earnings = depositedAmount - .minus(totalDepositsInUSD) - .plus(totalWithdrawalsInUSD) + let earnings = 0; + if(type === "citadel") { + let exactDepositedAmount = (depositedAmount / 10 ** 18); + exactDepositedAmount = BigNumber(exactDepositedAmount); + earnings = exactDepositedAmount + .minus(totalDepositsInUSD) + .plus(totalWithdrawalsInUSD) + .minus(totalTransferredIn) + .plus(totalTransferredOut) + } else { + earnings = depositedAmount + .minus(totalDeposits) + .plus(totalWithdrawals) .minus(totalTransferredIn) .plus(totalTransferredOut); + } const statistics = { contractAddress, From 5592c4dff14bdd9d3892a40da221219284df7061 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Wed, 16 Jun 2021 15:02:24 +0800 Subject: [PATCH 099/254] Use current asset value for deposited amount of citadel. --- services/user/vaults/statistics/handler.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/services/user/vaults/statistics/handler.js b/services/user/vaults/statistics/handler.js index 61a586c..b8bb97b 100644 --- a/services/user/vaults/statistics/handler.js +++ b/services/user/vaults/statistics/handler.js @@ -98,7 +98,11 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => depositedAmount = await strategyContract.methods.getCurrentBalance(userAddress).call(); depositedAmount = new BigNumber(depositedAmount); } else if (type === 'citadel') { - depositedAmount = await vaultContract.methods._balanceOfDeposit(userAddress).call(); + const pool = await vaultContract.methods.getAllPoolInUSD().call(); + const totalSupply = await vaultContract.methods.totalSupply().call(); + + // depositedAmount = await vaultContract.methods._balanceOfDeposit(userAddress).call(); + depositedAmount = (depositedShares * pool) / totalSupply; depositedAmount = new BigNumber(depositedAmount); } else if (type === 'harvest') { depositedAmount = await strategyContract.methods.getCurrentBalance(userAddress).call(); @@ -145,8 +149,8 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => let earnings = 0; if(type === "citadel") { - let exactDepositedAmount = (depositedAmount / 10 ** 18); - exactDepositedAmount = BigNumber(exactDepositedAmount); + let exactDepositedAmount = depositedAmount / 10 ** 6; + exactDepositedAmount = new BigNumber(exactDepositedAmount); earnings = exactDepositedAmount .minus(totalDepositsInUSD) .plus(totalWithdrawalsInUSD) From cfc8c67542c5134eeb4d268e562cdbff7862aa75 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Wed, 16 Jun 2021 15:02:24 +0800 Subject: [PATCH 100/254] Use current asset value for deposited amount (citadel). --- services/user/vaults/statistics/handler.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/services/user/vaults/statistics/handler.js b/services/user/vaults/statistics/handler.js index 1dd6c90..b8bb97b 100644 --- a/services/user/vaults/statistics/handler.js +++ b/services/user/vaults/statistics/handler.js @@ -98,9 +98,15 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => depositedAmount = await strategyContract.methods.getCurrentBalance(userAddress).call(); depositedAmount = new BigNumber(depositedAmount); } else if (type === 'citadel') { - const pool = await vaultContract.methods.getAllPoolInETH().call(); - const totalSupply = await vaultContract.methods.totalSupply().call(); - depositedAmount = new BigNumber(pool).times(depositedShares).div(totalSupply); + const pool = await vaultContract.methods.getAllPoolInUSD().call(); + const totalSupply = await vaultContract.methods.totalSupply().call(); + + // depositedAmount = await vaultContract.methods._balanceOfDeposit(userAddress).call(); + depositedAmount = (depositedShares * pool) / totalSupply; + depositedAmount = new BigNumber(depositedAmount); + } else if (type === 'harvest') { + depositedAmount = await strategyContract.methods.getCurrentBalance(userAddress).call(); + depositedAmount = new BigNumber(depositedAmount); } const { @@ -143,8 +149,8 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => let earnings = 0; if(type === "citadel") { - let exactDepositedAmount = (depositedAmount / 10 ** 18); - exactDepositedAmount = BigNumber(exactDepositedAmount); + let exactDepositedAmount = depositedAmount / 10 ** 6; + exactDepositedAmount = new BigNumber(exactDepositedAmount); earnings = exactDepositedAmount .minus(totalDepositsInUSD) .plus(totalWithdrawalsInUSD) From 43730236dc66d5946a30f38f31cb59447dade5e6 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Wed, 16 Jun 2021 18:04:36 +0800 Subject: [PATCH 101/254] Fixed for duplicated yearn and harvest strategies --- models/apy.model.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/models/apy.model.js b/models/apy.model.js index a142b56..c63487c 100644 --- a/models/apy.model.js +++ b/models/apy.model.js @@ -8,12 +8,13 @@ const findAll = async () => { const add = async (params) => { const db = mongo.getDB(); + const result = await db.collection(collection).findOne({ - name: params.name + vaultSymbol: params.vaultSymbol }); if (result != null) { return await db.collection(collection).updateOne({ - name: params.name + vaultSymbol: params.vaultSymbol }, { $set: { From c552e1433dddf3a635c659e2359f13ab77418a16 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Fri, 18 Jun 2021 18:20:05 +0800 Subject: [PATCH 102/254] Update pools info on db scripts/ --- scripts/initial.js | 165 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 144 insertions(+), 21 deletions(-) diff --git a/scripts/initial.js b/scripts/initial.js index 603a330..619f64c 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -13,6 +13,109 @@ db.vault_categories.insertMany([ // { name: 'basic', contract_address: '', symbol: 'hfDAI'}, ]); +db.stake_pool.insertMany([ + { + name: 'dvmUSDT', + label: 'Yearn Fighter USDT LP', + contract_address: '0x4f0c1c9ba6b9ccd0bed6166e86b672ac8ee621f7', + status: 'A', + pid: '0', + category: 'Advance', + tokenId: 'tether', + symbol: 'USDT' + }, + { + name: 'dvmUSDC', + label: 'Yearn Fighter USDC LP', + contract_address: '0x9f0230fbdc0379e5fefacca89be03a42fec5fb6e', + status: 'A', + pid: '1', + category: 'Advance', + tokenId: 'usd-coin', + symbol: 'USDC' + }, + { + name: 'dvmDAI', + label: 'Yearn Fighter DAI LP', + contract_address: '0x2bfc2da293c911e5ffec4d2a2946a599bc4ae770', + status: 'A', + pid: '2', + category: 'Advance', + tokenId: 'dai', + symbol: 'DAI' + }, + { + name: 'dvmTUSD', + label: 'Yearn Fighter TUSD LP', + contract_address: '0x2c8de02ad4312069355b94fb936efe6cfe0c8ff6', + status: 'A', + pid: '3', + category: 'Advance', + tokenId: 'true-usd', + symbol: 'TUSD' + }, + { + name: 'dvlUSDT', + label: 'Compound Fighter USDT LP', + contract_address: '0xeece6ad323a93d4b021bdaac587dcc04b5cf0a78', + status: 'A', + pid: '4', + category: 'Basic', + tokenId: 'tether', + symbol: 'USDT' + }, + { + name: 'dvlUSDC', + label: 'Compound Fighter USDC LP', + contract_address: '0xd1d7f950899c0269a7f2aad5e854cdc3a1350ba9', + status: 'A', + pid: '5', + category: 'Basic', + tokenId: 'usd-coin', + symbol: 'USDC' + }, + { + name: 'dvlDAI', + label: 'Compound Fighter DAI LP', + contract_address: '0x43c20638c3914eca3c96e9cac8ebe7d652be45c6', + status: 'A', + pid: '6', + category: 'Basic', + tokenId: 'dai', + symbol: 'DAI' + }, + { + name: 'vipDVG', + label: 'vipDVG LP', + contract_address: '', // TODO: Update to mainnet address + status: 'A', + pid: '7', + category: 'Basic', + tokenId: 'xDVG', + symbol: 'xDVG' + }, + { + name: 'ETH<->DVG', + label: 'Uniswap DVG-ETH LP', + contract_address: '', // TODO: Update to mainnet address + status: 'A', + pid: '8', + category: 'Basic', + tokenId: 'ethDVG', + symbol: 'ethDVG' + }, + { + name: 'daoCDV', + label: 'DAO Citadel LP', + contract_address: '0x8fe826cc1225b03aa06477ad5af745aed5fe7066', + status: 'A', + pid: '9', + category: 'Expert', + tokenId: 'ethereum', + symbol: 'daoCDV' + } +]); + // Testnet Contracts db.vault_categories.insertMany([ { name: 'advance', contract_address: '0x6B150E9BD70E216775c8b73270E64e870a3110c1', symbol: 'yUSDT' }, @@ -36,83 +139,103 @@ db.xdvg_token.insert({ db.stake_pool.insertMany([ { name: 'dvmUSDT', + label: 'Yearn Fighter USDT LP', contract_address: '0x6B150E9BD70E216775c8b73270E64e870a3110c1', status: 'A', pid: '0', - category: 'advance', - tokenId: 'tether' + category: 'Advance', + tokenId: 'tether', + symbol: 'USDT' }, { name: 'dvmUSDC', + label: 'Yearn Fighter USDC LP', contract_address: '0x6E15e283dc430eca010Ade8b11b5B377902d6e56', status: 'A', pid: '1', - category: 'advance', - tokenId: 'usd-coin' + category: 'Advance', + tokenId: 'usd-coin', + symbol: 'USDC' }, { name: 'dvmDAI', + label: 'Yearn Fighter DAI LP', contract_address: '0x2428bFD238a3632552B343297c504F60283009eD', status: 'A', pid: '2', - category: 'advance', - tokenId: 'dai' + category: 'Advance', + tokenId: 'dai', + symbol: 'DAI' }, { name: 'dvmTUSD', + label: 'Yearn Fighter TUSD LP', contract_address: '0xEcCb98c36bfc8c49c6065d1cD90bcf1c6F02D4AD', status: 'A', pid: '3', - category: 'advance', - tokenId: 'true-usd' + category: 'Advance', + tokenId: 'true-usd', + symbol: 'TUSD' }, { name: 'dvlUSDT', + label: 'Compound Fighter USDT LP', contract_address: '0x5d102e0bdf2037899e1ff2e8cc50987108533c52', status: 'A', pid: '4', - category: 'basic', - tokenId: 'tether' + category: 'Basic', + tokenId: 'tether', + symbol: 'USDT' }, { name: 'dvlUSDC', + label: 'Compound Fighter USDC LP', contract_address: '0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e', status: 'A', pid: '5', - category: 'basic', - tokenId: 'usd-coin' + category: 'Basic', + tokenId: 'usd-coin', + symbol: 'USDC' }, { name: 'dvlDAI', + label: 'Compound Fighter DAI LP', contract_address: '0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d', status: 'A', pid: '6', - category: 'basic', - tokenId: 'dai' + category: 'Basic', + tokenId: 'dai', + symbol: 'DAI' }, { - name: 'xDVG', + name: 'vipDVG', + label: 'vipDVG LP', contract_address: '0x3aa8e8B6D3562a1E7aCB0dddD02b27896C00c424', status: 'A', pid: '7', - category: 'basic', - tokenId: 'xDVG' + category: 'Basic', + tokenId: 'xDVG', + symbol: 'xDVG' }, { name: 'ETH<->DVG', + label: 'Uniswap DVG-ETH LP', contract_address: '0x0A15e37442e2a41A3A51A9Eff7fE1DCE0E96f0bB', status: 'A', pid: '8', - category: 'basic', - tokenId: 'ethDVG' + category: 'Basic', + tokenId: 'ethDVG', + symbol: 'ethDVG' }, { name: 'daoCDV', + label: 'DAO Citadel LP', contract_address: '0x542a42496c96b946324f7dce2b030d5643d9ef8a', status: 'A', pid: '9', - category: 'degen', - tokenId: 'ethereum' + category: 'Expert', + tokenId: 'ethereum', + symbol: 'daoCDV' } ]); From 5be676b211a0fe62c3ec062767f5f369d1074611 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Mon, 21 Jun 2021 14:27:19 +0800 Subject: [PATCH 103/254] Update happy hour event API. --- app.js | 1 + services/user/special-event/handler.js | 65 ++++++++++++++++++++++---- swagger.json | 12 +++++ 3 files changed, 70 insertions(+), 8 deletions(-) diff --git a/app.js b/app.js index e8e66b0..44d8405 100644 --- a/app.js +++ b/app.js @@ -68,6 +68,7 @@ async function init() { stakePool.getPools(req, res) ); app.get("/staking/get-xdvg-stake", (req, res) => stakeXDvg.getxDVGStake(req, res)); + app.get('/event/verify', (req,res) => specialEvent.handleVerifyEvent(req, res)); app.get('/event/verify/:amount', (req, res) => specialEvent.handler(req, res)); app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument)); diff --git a/services/user/special-event/handler.js b/services/user/special-event/handler.js index 09c6872..1ec7a03 100644 --- a/services/user/special-event/handler.js +++ b/services/user/special-event/handler.js @@ -2,21 +2,70 @@ const db = require("../../../models/special-event.model"); // Check user's eligibility for special event const checkEligibilityForEvent = async(amount) => { - const eventList = await db.getCurrentEvent(); + + const result = { + amountAboveThreshold: true, + happyHour: true, + happyHourInfo: null, + message: "", + }; + + const event = await getExistingEvent(); // Check any existing event - if(eventList.length <= 0) { - return "No ongoing event found."; + if(event.happyHour === false) { + result.amountAboveThreshold = false, + result.happyHour = false, + result.happyHourInfo = null; + result.message = "No ongoing event found." + return result; } - const currentEvent = eventList[0]; - // Check deposited amount - if(amount < currentEvent.threshold) { - return "Deposited amount is less than threshold. Threshold: " + currentEvent.threshold; + if(amount < event.threshold) { + result.amountAboveThreshold = false, + result.happyHour = true, + result.happyHourInfo = event; + result.message = "Deposited amount is less than threshold. Threshold: " + event.threshold + return result; } - return "Valid"; + result.happyHourInfo = event; + result.message = "Valid"; + return result; +} + +const getExistingEvent = async() => { + const eventList = await db.getCurrentEvent(); + + const result = { + happyHour: false, + startTime: null, + endTime: null, + threshold: null + } + + if(eventList.length > 0) { + const currentEvent = eventList[0]; + + result.happyHour = true; + result.startTime = currentEvent.startTime; + result.endTime = currentEvent.endTime; + result.threshold = currentEvent.threshold; + + return result; + } + + return result; +} + +module.exports.handleVerifyEvent = async(req, res) => { + const result = await getExistingEvent(); + + res.status(200).json({ + message: "Successful response", + body: result + }) } module.exports.handler = async(req, res) => { diff --git a/swagger.json b/swagger.json index 66db95b..3db0cb4 100644 --- a/swagger.json +++ b/swagger.json @@ -204,6 +204,18 @@ "responses": {} } }, + "/event/verify" : { + "get": { + "tags": [ + "Vaults" + ], + "description": "Check if any happy hour event at current time.", + "produces": [ + "application/json" + ], + "responses": {} + } + }, "/event/verify/{amount}" : { "get": { "tags": [ From 51c97a20dd9bf87565d4dc53be67126b6fc4eb1a Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Mon, 21 Jun 2021 17:20:20 +0800 Subject: [PATCH 104/254] Minor fix on SaveHistoricalPool() cronjob. --- services/staking/dao-stake/handler.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/staking/dao-stake/handler.js b/services/staking/dao-stake/handler.js index c07f8a5..0f9304d 100644 --- a/services/staking/dao-stake/handler.js +++ b/services/staking/dao-stake/handler.js @@ -270,11 +270,13 @@ module.exports.saveStakedPools = async () => { poolAbiContractMap.set(contracts.uniswap.ethDVG.address, contracts.uniswap.ethDVG.abi) for (index = 0 ; index < poolSize; index ++) { - if(poolAbiContractMap.has(pools[index].contract_address) && pools[index].status == 'A') { + const contractAddressToLowerCase = pools[index].contract_address.toLowerCase(); + + if(poolAbiContractMap.has(contractAddressToLowerCase) && pools[index].status == 'A') { // Fetch abi of pool contract const poolContractInfo = { address: pools[index].contract_address, - abi: poolAbiContractMap.get(pools[index].contract_address) + abi: poolAbiContractMap.get(contractAddressToLowerCase) }; // Get pool contract From 353fcef750174c1f81018f03cf46471bcf1bf2ea Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Mon, 21 Jun 2021 17:30:04 +0800 Subject: [PATCH 105/254] Add multiplier value to pool object in SaveHistoricalPools() cronjob. --- services/staking/dao-stake/handler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/staking/dao-stake/handler.js b/services/staking/dao-stake/handler.js index 0f9304d..d82924e 100644 --- a/services/staking/dao-stake/handler.js +++ b/services/staking/dao-stake/handler.js @@ -229,7 +229,7 @@ const poolCalculation = async(daoStake, poolInfo, tokensPrice) => { // TVL Calculation const tvl = tokenBalOfDAOStake * poolTokenPrice; - Object.assign(pool, { apr: apr === Infinity ? 0 : apr, tvl }); + Object.assign(pool, { apr: apr === Infinity ? 0 : apr, tvl , multiplier}); return pool; } From b5ba00414e2e0ed3e0f141d9a8d354dc75b2bb25 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Tue, 22 Jun 2021 19:20:48 +0800 Subject: [PATCH 106/254] Added DAOvip --- config/serverless/domain.js | 4 ++-- services/vaults/tvl/handler.js | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 4b7ac30..e7ed788 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -355,12 +355,12 @@ const mainContracts = { }, }, vipDVG: { - address: "", // TODO: Update mainnet address + address: "0xD6Ce913C3e81b5e67a6b94d705d9E7cDdf073A7e", abi: abi.xDVGABIContract, tokenId: "xDVG", }, DVG: { - address: "", // TODO: Update mainnet address + address: "0x51e00a95748DBd2a3F47bC5c3b3E7B3F0fea666c", abi: abi.xDVGABIContract, tokenId: "DVG", }, diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index 61b07cc..466be85 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -175,12 +175,10 @@ const getAllTVL = async () => { await saveTVL(vault, tvl); } - if (process.env.PRODUCTION == null || process.env.PRODUCTION == "") { - let _vault = vaults.vipDVG; - let tvl = await getTVLxDVG(_vault); - tvls.push(tvl); - await saveTVL("xDVG", tvl); - } + let _vault = vaults.vipDVG; + let tvl = await getTVLxDVG(_vault); + tvls.push(tvl); + await saveTVL("xDVG", tvl); return tvls; }; From 7c61c313890501601b13d3969bbcd36da85e4201 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Tue, 22 Jun 2021 19:49:27 +0800 Subject: [PATCH 107/254] Update DAOvip --- app.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app.js b/app.js index 2e1f80b..0ca487d 100644 --- a/app.js +++ b/app.js @@ -61,13 +61,13 @@ async function init() { app.get("/vaults/category", (req, res) => vaultCategory.getVaultCategory(req, res) ); - // app.get("/staking/get-vip-tokens", (req, res) => - // stakeVIP.getVipDVGToken(req, res) - // ); + app.get("/staking/get-vip-tokens", (req, res) => + stakeVIP.getVipDVGToken(req, res) + ); // app.get("/staking/get-pools", (req, res) => // stakePool.getPools(req, res) // ); - // app.get("/staking/get-xdvg-stake", (req, res) => stakeXDvg.getxDVGStake(req, res)); + app.get("/staking/get-xdvg-stake", (req, res) => stakeXDvg.getxDVGStake(req, res)); app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument)); From b0a63f595e1436e61bc07e060ea60f50cc2a7731 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Wed, 23 Jun 2021 15:39:39 +0800 Subject: [PATCH 108/254] Fixes TVL tokenId --- config/serverless/domain.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 5d3740e..65b28e1 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -178,7 +178,7 @@ const testContracts = { DVG: { address: "0xea9726eFc9831EF0499fD4Db4Ab143F15a797673", abi: abi.DVGABIContract, - tokenId: "DVG", + tokenId: "daoventures", }, daoStake: { address: "0x2d04c8A39fe41Dc94595Df81ABDaB1dD905B38B3", @@ -364,7 +364,7 @@ const mainContracts = { DVG: { address: "", // TODO: Update mainnet address abi: abi.xDVGABIContract, - tokenId: "DVG", + tokenId: "daoventures", }, daoStake: { address: "", // TODO Update mainnet address From 59d26a6c7a354f6a0af8ee0f6c5c624df8f951f0 Mon Sep 17 00:00:00 2001 From: coco50511 Date: Wed, 23 Jun 2021 16:04:59 +0800 Subject: [PATCH 109/254] Working on the ElonApe implementation --- app.js | 1 + config/abi.js | 1459 +++++++++++++++++ config/serverless/domain.js | 16 + models/historical-apy.model.js | 3 +- models/price.model.js | 3 +- models/tvl.model.js | 3 +- scripts/initial.js | 21 + services/user/vaults/statistics/handler.js | 9 +- services/vaults/apy/save/handler.js | 55 + services/vaults/apy/save/historical-handle.js | 59 + services/vaults/apy/save/vaults.js | 21 + services/vaults/price/handler.js | 32 + services/vaults/tvl/handler.js | 5 +- 13 files changed, 1682 insertions(+), 5 deletions(-) diff --git a/app.js b/app.js index 7f65ac9..0217d58 100644 --- a/app.js +++ b/app.js @@ -1,3 +1,4 @@ +require('dotenv').config(); const express = require("express"); const db = require("./config/db"); const vaultsApy = require("./services/vaults/apy/handler"); diff --git a/config/abi.js b/config/abi.js index 589d4f6..74a6a01 100644 --- a/config/abi.js +++ b/config/abi.js @@ -16968,6 +16968,1463 @@ const hfVaultContract = [{"anonymous":false,"inputs":[{"indexed":true,"internalT const eacAggregatoorProxyContract = [{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"},{"internalType":"address","name":"_accessController","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"int256","name":"current","type":"int256"},{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"updatedAt","type":"uint256"}],"name":"AnswerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":true,"internalType":"address","name":"startedBy","type":"address"},{"indexed":false,"internalType":"uint256","name":"startedAt","type":"uint256"}],"name":"NewRound","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"accessController","outputs":[{"internalType":"contract AccessControllerInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"aggregator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"}],"name":"confirmAggregator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundId","type":"uint256"}],"name":"getAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"_roundId","type":"uint80"}],"name":"getRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundId","type":"uint256"}],"name":"getTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"phaseAggregators","outputs":[{"internalType":"contract AggregatorV2V3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"phaseId","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"}],"name":"proposeAggregator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"proposedAggregator","outputs":[{"internalType":"contract AggregatorV2V3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"_roundId","type":"uint80"}],"name":"proposedGetRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proposedLatestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_accessController","type":"address"}],"name":"setController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]; +const elonApeVaultContract = [ + { + "inputs": [ + { + "internalType": "address", + "name": "_strategy", + "type": "address" + }, + { + "internalType": "address", + "name": "_treasuryWallet", + "type": "address" + }, + { + "internalType": "address", + "name": "_communityWallet", + "type": "address" + }, + { + "internalType": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_strategist", + "type": "address" + }, + { + "internalType": "address", + "name": "_biconomy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "tokenDeposit", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amtDeposit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sharesMint", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "fromStrategy", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toStrategy", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "MigrateFunds", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldCustomNetworkFeePerc", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newCustomNetworkFeePerc", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeePerc", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldCustomNetworkFeeTier", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newCustomNetworkFeeTier", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeeTier", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeePerc", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeePerc", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeePerc", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeeTier2", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeeTier2", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeeTier2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldProfileSharingFeePerc", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newProfileSharingFeePerc", + "type": "uint256" + } + ], + "name": "SetProfitSharingFeePerc", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "fees", + "type": "uint256" + } + ], + "name": "TransferredOutFees", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "tokenWithdraw", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amtWithdraw", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sharesBurn", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "LOCKTIME", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "canSetPendingStrategy", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeePerc", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeeTier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_tokenIndex", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getAllPoolInUSD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "invest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "forwarder", + "type": "address" + } + ], + "name": "isTrustedForwarder", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "migrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeePerc", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeeTier2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingStrategy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "profitSharingFeePerc", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reinvest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_farmIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "retrieveStablecoinsFromStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + } + ], + "name": "setAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_biconomy", + "type": "address" + } + ], + "name": "setBiconomy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_communityWallet", + "type": "address" + } + ], + "name": "setCommunityWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_percentage", + "type": "uint256" + } + ], + "name": "setCustomNetworkFeePerc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_customNetworkFeeTier", + "type": "uint256" + } + ], + "name": "setCustomNetworkFeeTier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeePerc", + "type": "uint256[]" + } + ], + "name": "setNetworkFeePerc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeeTier2", + "type": "uint256[]" + } + ], + "name": "setNetworkFeeTier2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pendingStrategy", + "type": "address" + } + ], + "name": "setPendingStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_percentages", + "type": "uint256[]" + } + ], + "name": "setPercTokenKeepInVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_percentage", + "type": "uint256" + } + ], + "name": "setProfitSharingFeePerc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_strategist", + "type": "address" + } + ], + "name": "setStrategist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_treasuryWallet", + "type": "address" + } + ], + "name": "setTreasuryWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_weights", + "type": "uint256[]" + } + ], + "name": "setWeights", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "strategist", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "strategy", + "outputs": [ + { + "internalType": "contract IStrategy", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenFrom", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_tokenTo", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "swapTokenWithinVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "tokens", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "decimals", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "percKeepInVault", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "transferOutNetworkFees", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "trustedForwarder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unlockMigrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unlockTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "versionRecipient", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_tokenIndex", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; + +elonApeStrategyContract = [ + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_weights", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "AmtToInvest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_poolSTSLA", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_poolWBTC", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_poolRenDOGE", + "type": "uint256" + } + ], + "name": "CurrentComposition", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_poolSTSLA", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_poolWBTC", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_poolRenDOGE", + "type": "uint256" + } + ], + "name": "TargetComposition", + "type": "event" + }, + { + "inputs": [], + "name": "approveMigrate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getFarmsPool", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTotalPool", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amountUSDT", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amountUSDC", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amountDAI", + "type": "uint256" + } + ], + "name": "invest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isVesting", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reinvest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_farmIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "releaseStablecoinsToVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_vault", + "type": "address" + } + ], + "name": "setVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_weights", + "type": "uint256[]" + } + ], + "name": "setWeights", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vault", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "weights", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_tokenIndex", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] + module.exports = { earnUSDTABIContract, earnUSDCABIContract, @@ -17000,4 +18457,6 @@ module.exports = { hfStrategyContract, hfVaultContract, eacAggregatoorProxyContract, + elonApeVaultContract, + elonApeStrategyContract, }; diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 5d3740e..b6543df 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -144,6 +144,14 @@ const testContracts = { contractType: "citadel", tokenId: ["tether", "usd-coin", "dai"], }, + daoELO: { + address: "0xf03fa8553379d872b4e2Bafbc679409Fb82604c2", + abi: abi.elonApeVaultContract, + strategyAddress: "0xa4F71f88bd522b33af3ae515Caafa956BD1bbFa1", + strategyABI: abi.elonApeStrategyContract, + contractType: "elon", + tokenId: ["tether", "usd-coin", "dai"], + }, 'hfDAI': { address: '0x6d7e8fa90c1ffdc019d691bafc18d6362fdeecd7', abi: abi.hfVaultContract, @@ -316,6 +324,14 @@ const mainContracts = { contractType: "citadel", tokenId: ["tether", "usd-coin", "dai"], }, + daoELO: { + address: "", // TODO Update on mainnet + abi: abi.elonApeVaultContract, + strategyAddress: "", // TODO Update on mainnet + strategyABI: abi.elonApeStrategyContract, + contractType: "elon", + tokenId: ["tether", "usd-coin", "dai"], + }, hfDAI: { address: '', // TODO: Update that this to mainnet address abi: abi.hfVaultContract, diff --git a/models/historical-apy.model.js b/models/historical-apy.model.js index 5be7408..8583241 100644 --- a/models/historical-apy.model.js +++ b/models/historical-apy.model.js @@ -35,7 +35,8 @@ module.exports = { cUsdcFarmer: 'cUSDC_historical-apy', cDaiFarmer: 'cDAI_historical-apy', daoCDVFarmer: 'daoCDV_historical-apy', + daoELOFarmer: 'daoELO_historical-apy', hfDaiFarmer: 'hfDAI_historical-apy', hfUsdcFarmer: 'hfUSDC_historical-apy', - hfUsdtFarmer: 'hfUSDT_historical-apy' + hfUsdtFarmer: 'hfUSDT_historical-apy', }; \ No newline at end of file diff --git a/models/price.model.js b/models/price.model.js index 723faea..68c9897 100644 --- a/models/price.model.js +++ b/models/price.model.js @@ -35,7 +35,8 @@ module.exports = { cUsdcFarmer: 'cUSDC_price', cDaiFarmer: 'cDAI_price', daoCDVFarmer: 'daoCDV_price', + daoELOFarmer: 'daoELO_price', hfDaiFarmer: 'hfDAI_price', hfUsdcFarmer: 'hfUSDC_price', - hfUsdtFarmer: 'hfUSDT_price', + hfUsdtFarmer: 'hfUSDT_price', }; \ No newline at end of file diff --git a/models/tvl.model.js b/models/tvl.model.js index 3e68d99..c88f94d 100644 --- a/models/tvl.model.js +++ b/models/tvl.model.js @@ -62,7 +62,8 @@ module.exports = { cUsdcFarmer: "cUSDC_tvl", cDaiFarmer: "cDAI_tvl", daoCDVFarmer: "daoCDV_tvl", + daoELOFarmer: "daoELO_tvl", hfDaiFarmer: "hfDAI_tvl", hfUsdtFarmer: "hfUSDT_tvl", - hfUsdcFarmer: "hfUSDC_tvl", + hfUsdcFarmer: "hfUSDC_tvl", }; diff --git a/scripts/initial.js b/scripts/initial.js index 619f64c..563d266 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -113,6 +113,16 @@ db.stake_pool.insertMany([ category: 'Expert', tokenId: 'ethereum', symbol: 'daoCDV' + }, + { + name: 'daoELO', + label: 'Elon\'s APE LP', + contract_address: '', // TODO: Update to mainnet address + status: 'A', + pid: '10', + category: 'Basic', + tokenId: 'ethereum', + symbol: 'daoELO' } ]); @@ -126,6 +136,7 @@ db.vault_categories.insertMany([ { name: 'basic', contract_address: '0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e', symbol: 'cUSDC', }, { name: 'basic', contract_address: '0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d', symbol: 'cDAI', }, { name: 'degen', contract_address: '0x542a42496c96b946324f7dce2b030d5643d9ef8a', symbol: 'daoCDV', }, + { name: 'basic', contract_address: '0xf03fa8553379d872b4e2Bafbc679409Fb82604c2', symbol: 'daoELO', }, { name: 'basic', contract_address: '0xb41a49de82e95dc1e028839c3440ac97f9a7832c', symbol: 'hfUSDT'}, { name: 'basic', contract_address: '0x54783464848b35d6fb9bba37c1ddd23ac3b1a11a', symbol: 'hfUSDC'}, { name: 'basic', contract_address: '0x0f89ee5b95d1d5cfb10f29775d816fc6d8adb9fc', symbol: 'hfDAI'}, @@ -236,6 +247,16 @@ db.stake_pool.insertMany([ category: 'Expert', tokenId: 'ethereum', symbol: 'daoCDV' + }, + { + name: 'daoELO', + label: 'Elon\'s APE LP', + contract_address: '0xf03fa8553379d872b4e2Bafbc679409Fb82604c2', + status: 'A', + pid: '10', + category: 'Basic', + tokenId: 'ethereum', + symbol: 'daoELO' } ]); diff --git a/services/user/vaults/statistics/handler.js b/services/user/vaults/statistics/handler.js index b8bb97b..faf3bec 100644 --- a/services/user/vaults/statistics/handler.js +++ b/services/user/vaults/statistics/handler.js @@ -101,6 +101,13 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => const pool = await vaultContract.methods.getAllPoolInUSD().call(); const totalSupply = await vaultContract.methods.totalSupply().call(); + // depositedAmount = await vaultContract.methods._balanceOfDeposit(userAddress).call(); + depositedAmount = (depositedShares * pool) / totalSupply; + depositedAmount = new BigNumber(depositedAmount); + } else if (type === 'elon') { + const pool = await vaultContract.methods.getAllPoolInUSD().call(); + const totalSupply = await vaultContract.methods.totalSupply().call(); + // depositedAmount = await vaultContract.methods._balanceOfDeposit(userAddress).call(); depositedAmount = (depositedShares * pool) / totalSupply; depositedAmount = new BigNumber(depositedAmount); @@ -148,7 +155,7 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => const totalTransferredOut = getSum(transfersOut); let earnings = 0; - if(type === "citadel") { + if(type === "citadel" || type === "elon") { let exactDepositedAmount = depositedAmount / 10 ** 6; exactDepositedAmount = new BigNumber(exactDepositedAmount); earnings = exactDepositedAmount diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index 8217164..9cdb39c 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -1,4 +1,5 @@ require("dotenv").config(); +const BigNumber = require("bignumber.js"); const AWS = require("aws-sdk"); // const db = new AWS.DynamoDB.DocumentClient({ apiVersion: "2012-08-10" }); const db = require('../../../../models/apy.model'); @@ -108,6 +109,28 @@ const getCitadelPricePerFullShare = async (contract, block, inceptionBlockNbr) = return pricePerFullShare; } +const getElonPricePerFullShare = async (contract, block, inceptionBlockNbr) => { + const contractDidntExist = block < inceptionBlockNbr; + const inceptionBlock = block === inceptionBlockNbr; + + if (inceptionBlock) { + return 1e18; + } + if (contractDidntExist) { + return 0; + } + + let pricePerFullShare = 0; + try { + const pool = await contract.methods.getAllPoolInUSD().call(undefined, block); // All pool in USD (6 decimals) + const totalSupply = await contract.methods.totalSupply().call(undefined, block); + pricePerFullShare = (new BigNumber(pool)).shiftedBy(12).dividedBy(totalSupply).toNumber(); + } catch (ex) {} + + await delay(delayTime); + return pricePerFullShare; +} + const getVirtualPrice = async (address, block) => { const poolContract = new archiveNodeWeb3.eth.Contract(poolABI, address); const virtualPrice = await poolContract.methods @@ -171,6 +194,7 @@ const getApyForVault = async (vault) => { apyLoanscan: 0, compoundApy, citadelApy: 0, + elonApy: 0, }; } else if (vault.isCitadel) { // Citadel Vault @@ -198,6 +222,35 @@ const getApyForVault = async (vault) => { apyLoanscan: 0, compoundApy: 0, citadelApy: apy, + elonApy: 0, + } + } else if (vault.isElon) { + // Elon's Ape Vault + let contract; + if (process.env.PRODUCTION != '') { + contract = new archiveNodeWeb3.eth.Contract(mainContracts.farmer['daoELO'].abi, mainContracts.farmer['daoELO'].address); + } else { + contract = new archiveNodeWeb3.eth.Contract(testContracts.farmer['daoELO'].abi, testContracts.farmer['daoELO'].address); + } + + const pricePerFullShareCurrent = await getElonPricePerFullShare(contract, currentBlockNbr, inceptionBlockNbr); + const pricePerFullShareOneDayAgo = await getElonPricePerFullShare(contract, oneDayAgoBlock, inceptionBlockNbr); + + // APY Calculation + const n = 365 / 2; // Assume 2 days to trigger invest function + const apr = (pricePerFullShareCurrent - pricePerFullShareOneDayAgo) * n; + const apy = (Math.pow((1 + (apr / 100) / n), n) - 1) * 100; + + return { + apyInceptionSample: 0, + apyOneDaySample: 0, + apyThreeDaySample: 0, + apyOneWeekSample: 0, + apyOneMonthSample: 0, + apyLoanscan: 0, + compoundApy: 0, + citadelApy: 0, + elonApy: apy, } } else if (vault.isHarvest) { // Harvest Vault @@ -260,6 +313,7 @@ const getApyForVault = async (vault) => { apyLoanscan: 0, compoundApy: 0, citadelApy: 0, + elonApy: 0, }; } else { @@ -382,6 +436,7 @@ const getApyForVault = async (vault) => { apyLoanscan, compoundApy: 0, citadelApy: 0, + elonApy: 0, }; } }; diff --git a/services/vaults/apy/save/historical-handle.js b/services/vaults/apy/save/historical-handle.js index 15dc760..51ad996 100644 --- a/services/vaults/apy/save/historical-handle.js +++ b/services/vaults/apy/save/historical-handle.js @@ -1,4 +1,5 @@ require("dotenv").config(); +const BigNumber = require("bignumber.js"); const historicalDb = require('../../../../models/historical-apy.model'); const Web3 = require("web3"); const moment = require("moment"); @@ -139,6 +140,28 @@ const getCitadelPricePerFullShare = async (contract, block, inceptionBlockNbr) = return pricePerFullShare; }; +const getElonPricePerFullShare = async (contract, block, inceptionBlockNbr) => { + const contractDidntExist = block < inceptionBlockNbr; + const inceptionBlock = block === inceptionBlockNbr; + + if (inceptionBlock) { + return 1e18; + } + if (contractDidntExist) { + return 0; + } + + let pricePerFullShare = 0; + try { + const pool = await contract.methods.getAllPoolInUSD().call(undefined, block); // All pool in USD (6 decimals) + const totalSupply = await contract.methods.totalSupply().call(undefined, block); + pricePerFullShare = (new BigNumber(pool)).shiftedBy(12).dividedBy(totalSupply).toNumber(); + } catch (ex) {} + + await delay(delayTime); + return pricePerFullShare; +}; + const getApyForVault = async (vault) => { const { lastMeasurement: inceptionBlockNbr, @@ -168,6 +191,7 @@ const getApyForVault = async (vault) => { apyLoanscan: 0, compoundApy, citadelApy: 0, + elonApy: 0, }; } else if (vault.isCitadel) { // Citadel Vault @@ -195,6 +219,35 @@ const getApyForVault = async (vault) => { apyLoanscan: 0, compoundApy: 0, citadelApy: apy, + elonApy: 0, + } + } else if (vault.isElon) { + // Elon's APE Vault + let contract; + if (process.env.PRODUCTION != '') { + contract = new archiveNodeWeb3.eth.Contract(mainContracts.farmer['daoELO'].abi, mainContracts.farmer['daoELO'].address); + } else { + contract = new archiveNodeWeb3.eth.Contract(testContracts.farmer['daoELO'].abi, testContracts.farmer['daoELO'].address); + } + + const pricePerFullShareCurrent = await getElonPricePerFullShare(contract, currentBlockNbr, inceptionBlockNbr); + const pricePerFullShareOneDayAgo = await getElonPricePerFullShare(contract, oneDayAgoBlock, inceptionBlockNbr); + + // APY Calculation + const n = 365 / 2; // Assume 2 days to trigger invest function + const apr = (pricePerFullShareCurrent - pricePerFullShareOneDayAgo) * n; + const apy = (Math.pow((1 + (apr / 100) / n), n) - 1) * 100; + + return { + apyInceptionSample: 0, + apyOneDaySample: 0, + apyThreeDaySample: 0, + apyOneWeekSample: 0, + apyOneMonthSample: 0, + apyLoanscan: 0, + compoundApy: 0, + citadelApy: 0, + elonApy: apy, } } else if (vault.isHarvest) { // Harvest Vault @@ -257,6 +310,7 @@ const getApyForVault = async (vault) => { apyLoanscan: 0, compoundApy: 0, citadelApy: 0, + elonApy: 0, }; }else { // Yearn Vault @@ -375,6 +429,7 @@ const getApyForVault = async (vault) => { apyLoanscan, compoundApy: 0, citadelApy: 0, + elonApy: 0, }; } }; @@ -430,6 +485,10 @@ const getHistoricalAPY = async (startTime, contractAddress) => { case mainContracts.farmer['daoCDV'].address: result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.daoCDVFarmer); break; + case testContracts.farmer['daoELO'].address: + case mainContracts.farmer['daoELO'].address: + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.daoELOFarmer); + break; case testContracts.farmer['hfDAI'].address: case mainContracts.farmer['hfDAI'].address: result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.hfDaiFarmer); diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 3c3077b..3cf6a3c 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -170,6 +170,27 @@ module.exports = [ price_id: ["tether", "usd-coin", "dai"], isCitadel: true, }, + { + id: "daoELO", + name: "DAO Vault Elon", + symbol: ["USDT","USDC","DAI"], + description: "DAO Vault Elon for 3 stablecoins", + vaultSymbol: "daoELO", + erc20address: ["0x07de306ff27a2b630b1141956844eb1552b956b5", "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa"], + vaultContractAddress: "0xf03fa8553379d872b4e2Bafbc679409Fb82604c2", + vaultContractABI: abi.elonApeVaultContract, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 25413059, + measurement: 1e18, + price_id: ["tether", "usd-coin", "dai"], + isElon: true, + }, { id: "hfDAI", name: "DAI", diff --git a/services/vaults/price/handler.js b/services/vaults/price/handler.js index 73165fe..9168751 100644 --- a/services/vaults/price/handler.js +++ b/services/vaults/price/handler.js @@ -9,6 +9,7 @@ const { getPricePerFullShare } = require('../../user/vaults/statistics/handler'); const db = require('../../../models/price.model'); +const BigNumber = require("bignumber.js"); const moment = require("moment"); const delay = require("delay"); const { delayTime } = require("../apy/save/config"); @@ -44,6 +45,18 @@ const getCitadelPricePerFullShare = async (contract) => { return pricePerFullShare; } +const getElonPricePerFullShare = async (contract) => { + let pricePerFullShare = 0; + try { + const pool = await contract.methods.getAllPoolInUSD().call(); // All pool in USD (6 decimals) + const totalSupply = await contract.methods.totalSupply().call(); + pricePerFullShare = (new BigNumber(pool)).shiftedBy(12).dividedBy(totalSupply).toNumber(); + } catch (ex) {} + + await delay(delayTime); + return pricePerFullShare; +} + const getCurrentPrice = async () => { let contracts = process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? mainContracts : testContracts; @@ -60,6 +73,7 @@ const getCurrentPrice = async () => { vaultPrice: vaultPricePerFullShare, compoundExchangeRate: 0, citadelPrice: 0, + elonPrice: 0, harvestPrice: 0 }).catch((err) => console.log('err', err)); } else if (contracts.farmer[key].contractType === 'compound') { @@ -75,6 +89,7 @@ const getCurrentPrice = async () => { vaultPrice: 0, compoundExchangeRate: exchangeRate, citadelPrice: 0, + elonPrice: 0, harvestPrice: 0, }).catch((err) => console.log('err', err)); } else if (contracts.farmer[key].contractType === 'citadel') { @@ -85,6 +100,18 @@ const getCurrentPrice = async () => { vaultPrice: 0, compoundExchangeRate: 0, citadelPrice: pricePerFullShare, + elonPrice: 0, + harvestPrice: 0, + }).catch((err) => console.log('err', err)); + } else if (contracts.farmer[key].contractType === 'elon') { + const contract = getContract(contracts.farmer[key].abi, contracts.farmer[key].address); + const pricePerFullShare = await getElonPricePerFullShare(contract); + await db.add(key + '_price', { + earnPrice: 0, + vaultPrice: 0, + compoundExchangeRate: 0, + citadelPrice: 0, + elonPrice: pricePerFullShare, harvestPrice: 0, }).catch((err) => console.log('err', err)); } else if (contracts.farmer[key].contractType === 'harvest') { @@ -106,6 +133,7 @@ const getCurrentPrice = async () => { vaultPrice: 0, compoundExchangeRate: 0, citadelPrice: 0, + elonPrice: 0, harvestPrice: pricePerFullShare, }) } @@ -115,6 +143,7 @@ const getCurrentPrice = async () => { vaultPrice: "0", compoundExchangeRate: 0, citadelPrice: 0, + elonPrice: 0, harvestPrice: "0" }).catch((err) => console.log('err', err)); } @@ -169,6 +198,9 @@ module.exports.handleHistoricialPrice = async (req, res) => { case db.daoCDVFarmer: collection = db.daoCDVFarmer; break; + case db.daoELOFarmer: + collection = db.daoELOFarmer; + break; case db.hfDaiFarmer: collection = db.hfDaiFarmer; break; diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index 466be85..76d4cc1 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -122,7 +122,7 @@ const getTVL = async (vault) => { address } = vault; let tvl; - if (vault.contractType === 'citadel') { + if (vault.contractType === 'citadel' || vault.contractType === 'elon') { const contract = await getTokenContract(vault); const usdPool = await contract.methods.getAllPoolInUSD().call(); tvl = usdPool / 10 ** 6; // All pool in USD (6 decimals follow USDT) @@ -266,6 +266,9 @@ module.exports.tvlHandle = async (req, res) => { case db.daoCDVFarmer: collection = db.daoCDVFarmer; break; + case db.daoELOFarmer: + collection = db.daoELOFarmer; + break; default: res.status(200).json({ message: "Invalid Farmer", From ba51da8dfdf0322dbfb3c3dac69bc4cc25bc4fa1 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Wed, 23 Jun 2021 16:24:28 +0800 Subject: [PATCH 110/254] Amended xDVG to DVG exchange rate --- services/staking/vipdvg/handler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/staking/vipdvg/handler.js b/services/staking/vipdvg/handler.js index 844ee11..31b6541 100644 --- a/services/staking/vipdvg/handler.js +++ b/services/staking/vipdvg/handler.js @@ -145,7 +145,7 @@ const getxDVGInfo = async (dvgContract, xDVGContract, xDVGContractInfo) => { const xDVGPrice = await getxDVGPrice(xDVGTotalSupply, dvgBalOfxDVG, dvgPrice); const tvl = await getTVLxDVG(xDVGContractInfo, xDVGTotalSupply, xDVGPrice); const apr = await getAPR(); - return { ...apr, dvgPrice, tvl, xDVGPrice }; + return { ...apr, dvgPrice, tvl, xDVGPrice: xDVGPrice/dvgPrice }; } module.exports.getVipAPY = async () => { From 85fe332f68ea1e4afc52e86fc0c15f822dbdaa46 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Wed, 23 Jun 2021 21:26:10 +0800 Subject: [PATCH 111/254] Append pool decimal while doing saveHistoricalPools() cronjob. --- scripts/initial.js | 14 +++++++------- services/staking/dao-stake/handler.js | 26 +++++++++++++++++++++----- 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/scripts/initial.js b/scripts/initial.js index 619f64c..3583085 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -140,7 +140,7 @@ db.stake_pool.insertMany([ { name: 'dvmUSDT', label: 'Yearn Fighter USDT LP', - contract_address: '0x6B150E9BD70E216775c8b73270E64e870a3110c1', + contract_address: '0x6b150e9bd70e216775c8b73270e64e870a3110c1', status: 'A', pid: '0', category: 'Advance', @@ -150,7 +150,7 @@ db.stake_pool.insertMany([ { name: 'dvmUSDC', label: 'Yearn Fighter USDC LP', - contract_address: '0x6E15e283dc430eca010Ade8b11b5B377902d6e56', + contract_address: '0x6e15e283dc430eca010ade8b11b5b377902d6e56', status: 'A', pid: '1', category: 'Advance', @@ -160,7 +160,7 @@ db.stake_pool.insertMany([ { name: 'dvmDAI', label: 'Yearn Fighter DAI LP', - contract_address: '0x2428bFD238a3632552B343297c504F60283009eD', + contract_address: '0x2428bfd238a3632552b343297c504f60283009ed', status: 'A', pid: '2', category: 'Advance', @@ -170,7 +170,7 @@ db.stake_pool.insertMany([ { name: 'dvmTUSD', label: 'Yearn Fighter TUSD LP', - contract_address: '0xEcCb98c36bfc8c49c6065d1cD90bcf1c6F02D4AD', + contract_address: '0xeccb98c36bfc8c49c6065d1cd90bcf1c6f02d4ad', status: 'A', pid: '3', category: 'Advance', @@ -210,7 +210,7 @@ db.stake_pool.insertMany([ { name: 'vipDVG', label: 'vipDVG LP', - contract_address: '0x3aa8e8B6D3562a1E7aCB0dddD02b27896C00c424', + contract_address: '0x3aa8e8b6d3562a1e7acb0dddd02b27896c00c424', status: 'A', pid: '7', category: 'Basic', @@ -220,7 +220,7 @@ db.stake_pool.insertMany([ { name: 'ETH<->DVG', label: 'Uniswap DVG-ETH LP', - contract_address: '0x0A15e37442e2a41A3A51A9Eff7fE1DCE0E96f0bB', + contract_address: '0x0a15e37442e2a41a3a51a9eff7fe1dce0e96f0bb', status: 'A', pid: '8', category: 'Basic', @@ -230,7 +230,7 @@ db.stake_pool.insertMany([ { name: 'daoCDV', label: 'DAO Citadel LP', - contract_address: '0x542a42496c96b946324f7dce2b030d5643d9ef8a', + contract_address: '0x626c25ca5b86277f395c0e40dbdf51f2a302ab43', status: 'A', pid: '9', category: 'Expert', diff --git a/services/staking/dao-stake/handler.js b/services/staking/dao-stake/handler.js index d82924e..ec7d88d 100644 --- a/services/staking/dao-stake/handler.js +++ b/services/staking/dao-stake/handler.js @@ -196,8 +196,19 @@ const getUniswapLPTokenPrice = async (poolContract, poolAddress, tokenPrices, to return price; } +const getDecimal = async (poolContract) => { + try { + const decimal = await poolContract.methods.decimals().call(); + return decimal; + } catch (err) { + console.log("Err in getDecimal()", err); + } + +} + // Calculate APR and TVL for pool const poolCalculation = async(daoStake, poolInfo, tokensPrice) => { + let apr = 0; // Extract data from daoStake param @@ -229,7 +240,9 @@ const poolCalculation = async(daoStake, poolInfo, tokensPrice) => { // TVL Calculation const tvl = tokenBalOfDAOStake * poolTokenPrice; - Object.assign(pool, { apr: apr === Infinity ? 0 : apr, tvl , multiplier}); + const decimal = await getDecimal(poolContract); + + Object.assign(pool, { apr: apr === Infinity ? 0 : apr, tvl , multiplier, decimal}); return pool; } @@ -260,18 +273,21 @@ module.exports.saveStakedPools = async () => { // Find pool contract and contract abi value pair const poolAbiContractMap = new Map(); Object.values(contracts.farmer).map(v => { - poolAbiContractMap.set(v.address, v.abi); + poolAbiContractMap.set(v.address.toLowerCase(), v.abi); }); // DAOvip - poolAbiContractMap.set(contracts.vipDVG.address, contracts.vipDVG.abi); + poolAbiContractMap.set(contracts.vipDVG.address.toLowerCase(), contracts.vipDVG.abi); // Uniswap ETH <-> DVG Pool - poolAbiContractMap.set(contracts.uniswap.ethDVG.address, contracts.uniswap.ethDVG.abi) + poolAbiContractMap.set(contracts.uniswap.ethDVG.address.toLowerCase(), contracts.uniswap.ethDVG.abi); + + // daoCDV + poolAbiContractMap.set(contracts.uniswap.ethDVG.address.toLowerCase(), contracts.uniswap.ethDVG.abi); for (index = 0 ; index < poolSize; index ++) { const contractAddressToLowerCase = pools[index].contract_address.toLowerCase(); - + if(poolAbiContractMap.has(contractAddressToLowerCase) && pools[index].status == 'A') { // Fetch abi of pool contract const poolContractInfo = { From 1675da183431476e534830b7e4b429fc3825ff77 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Thu, 24 Jun 2021 11:36:22 +0800 Subject: [PATCH 112/254] Add implementation of transfer amount in USD. --- config/serverless/domain.js | 2 +- services/user/vaults/statistics/handler.js | 20 +++++++++++++++----- services/user/vaults/transactions/handler.js | 3 ++- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 5078297..b66ee51 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -137,7 +137,7 @@ const testContracts = { tokenId: "dai", }, daoCDV: { - address: "0x542a42496c96b946324f7dce2b030d5643d9ef8a", + address: "0x626c25ca5b86277f395c0e40dbdf51f2a302ab43", abi: abi.citadelABIContract, strategyAddress: "0x4996b12560b9a4a85dd437a3e8ff489335dcffa7", strategyABI: abi.citadelStrategyABIContract, diff --git a/services/user/vaults/statistics/handler.js b/services/user/vaults/statistics/handler.js index b8bb97b..6ac554f 100644 --- a/services/user/vaults/statistics/handler.js +++ b/services/user/vaults/statistics/handler.js @@ -141,21 +141,29 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => } const totalDeposits = getSum(deposits); - const totalDepositsInUSD = getSumForUSD(deposits); const totalWithdrawals = getSum(withdrawals); - const totalWithdrawalsInUSD = getSumForUSD(withdrawals); const totalTransferredIn = getSum(transfersIn); const totalTransferredOut = getSum(transfersOut); - + let earnings = 0; + let totalDepositsInUSD = 0; + let totalWithdrawalsInUSD = 0; + let totalTransferredInUSD = 0; + let totalTransferredOutInUSD = 0; + if(type === "citadel") { + totalDepositsInUSD = getSumForUSD(deposits); + totalWithdrawalsInUSD = getSumForUSD(withdrawals); + totalTransferredInUSD = getSumForUSD(transfersIn); + totalTransferredOutInUSD = getSumForUSD(transfersOut); + let exactDepositedAmount = depositedAmount / 10 ** 6; exactDepositedAmount = new BigNumber(exactDepositedAmount); earnings = exactDepositedAmount .minus(totalDepositsInUSD) .plus(totalWithdrawalsInUSD) - .minus(totalTransferredIn) - .plus(totalTransferredOut) + .minus(totalTransferredInUSD) + .plus(totalTransferredOutInUSD) } else { earnings = depositedAmount .minus(totalDeposits) @@ -171,7 +179,9 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => totalWithdrawals: totalWithdrawals.toFixed(), totalWithdrawalsInUSD: totalWithdrawalsInUSD.toFixed(), totalTransferredIn: totalTransferredIn.toFixed(), + totalTransferredInUSD: totalTransferredInUSD.toFixed(), totalTransferredOut: totalTransferredOut.toFixed(), + totalTransferredOutInUSD: totalTransferredOutInUSD.toFixed(), depositedShares, depositedAmount: depositedAmount, earnings: earnings.toFixed(0), diff --git a/services/user/vaults/transactions/handler.js b/services/user/vaults/transactions/handler.js index bd14f44..82d7e99 100644 --- a/services/user/vaults/transactions/handler.js +++ b/services/user/vaults/transactions/handler.js @@ -84,6 +84,7 @@ const getGraphTransactions = async (userAddress) => { id } amount + amountInUSD shares: value } transfersOut: transfers(where: {from: "${userAddress}", to_not: "0x0000000000000000000000000000000000000000"}) { @@ -98,6 +99,7 @@ const getGraphTransactions = async (userAddress) => { id } amount + amountInUSD } } `; @@ -186,7 +188,6 @@ const getTransactions = async (userAddress) => { const getTransactionsByVaultAddress = (vaultAddress) => { const findItemByVaultAddress = (item) => item.vaultAddress === vaultAddress; - const findVault = (vault) => vault.address.toLowerCase() === vaultAddress.toLowerCase(); const depositsToVault = deposits From 88361afc1a4a9ad700d0da7058287ea943741d82 Mon Sep 17 00:00:00 2001 From: coco50511 Date: Fri, 25 Jun 2021 08:16:19 +0800 Subject: [PATCH 113/254] The lowercase address is used in backend --- config/serverless/domain.js | 4 ++-- scripts/initial.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/serverless/domain.js b/config/serverless/domain.js index b53c72f..1f5ca0d 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -145,9 +145,9 @@ const testContracts = { tokenId: ["tether", "usd-coin", "dai"], }, daoELO: { - address: "0xf03fa8553379d872b4e2Bafbc679409Fb82604c2", + address: "0xf03fa8553379d872b4e2bafbc679409fb82604c2", abi: abi.elonApeVaultContract, - strategyAddress: "0xa4F71f88bd522b33af3ae515Caafa956BD1bbFa1", + strategyAddress: "0xa4f71f88bd522b33af3ae515caafa956bd1bbfa1", strategyABI: abi.elonApeStrategyContract, contractType: "elon", tokenId: ["tether", "usd-coin", "dai"], diff --git a/scripts/initial.js b/scripts/initial.js index 8611f4f..f112394 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -136,7 +136,7 @@ db.vault_categories.insertMany([ { name: 'basic', contract_address: '0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e', symbol: 'cUSDC', }, { name: 'basic', contract_address: '0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d', symbol: 'cDAI', }, { name: 'degen', contract_address: '0x542a42496c96b946324f7dce2b030d5643d9ef8a', symbol: 'daoCDV', }, - { name: 'basic', contract_address: '0xf03fa8553379d872b4e2Bafbc679409Fb82604c2', symbol: 'daoELO', }, + { name: 'basic', contract_address: '0xf03fa8553379d872b4e2bafbc679409fb82604c2', symbol: 'daoELO', }, { name: 'basic', contract_address: '0xb41a49de82e95dc1e028839c3440ac97f9a7832c', symbol: 'hfUSDT'}, { name: 'basic', contract_address: '0x54783464848b35d6fb9bba37c1ddd23ac3b1a11a', symbol: 'hfUSDC'}, { name: 'basic', contract_address: '0x0f89ee5b95d1d5cfb10f29775d816fc6d8adb9fc', symbol: 'hfDAI'}, @@ -251,7 +251,7 @@ db.stake_pool.insertMany([ { name: 'daoELO', label: 'Elon\'s APE LP', - contract_address: '0xf03fa8553379d872b4e2Bafbc679409Fb82604c2', + contract_address: '0xf03fa8553379d872b4e2bafbc679409fb82604c2', status: 'A', pid: '10', category: 'Basic', From f2851de970e9a537e6b3d50485f6d3a49e50f9d2 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Fri, 25 Jun 2021 14:02:12 +0800 Subject: [PATCH 114/254] Change API returned message for condition where deposited amount less than threshold. --- services/user/special-event/handler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/user/special-event/handler.js b/services/user/special-event/handler.js index 1ec7a03..39920bf 100644 --- a/services/user/special-event/handler.js +++ b/services/user/special-event/handler.js @@ -26,8 +26,8 @@ const checkEligibilityForEvent = async(amount) => { result.amountAboveThreshold = false, result.happyHour = true, result.happyHourInfo = event; - result.message = "Deposited amount is less than threshold. Threshold: " + event.threshold - return result; + result.message = "Your Deposit amount is not eligible for Gas-free Deposit. Minimum Deposit amount for gas-free deposits is " + event.threshold + return result; } result.happyHourInfo = event; From 6783dd48e368f369d00bdc0df0728f37cb607af5 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Fri, 25 Jun 2021 14:21:23 +0800 Subject: [PATCH 115/254] Update message for API. --- services/user/special-event/handler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/user/special-event/handler.js b/services/user/special-event/handler.js index 39920bf..2816bf9 100644 --- a/services/user/special-event/handler.js +++ b/services/user/special-event/handler.js @@ -26,12 +26,12 @@ const checkEligibilityForEvent = async(amount) => { result.amountAboveThreshold = false, result.happyHour = true, result.happyHourInfo = event; - result.message = "Your Deposit amount is not eligible for Gas-free Deposit. Minimum Deposit amount for gas-free deposits is " + event.threshold + result.message = "Your Deposit amount is not eligible for Gas-free Deposit. Minimum Deposit amount for gas-free deposits is " + event.threshold + "." return result; } result.happyHourInfo = event; - result.message = "Valid"; + result.message = "Congratulations! You’re about to make a gas-free transaction! Proceed to Sign the transaction."; return result; } From ea9423fc811a02775a7ab6a1a56816c6df9e152a Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Fri, 25 Jun 2021 19:08:48 +0800 Subject: [PATCH 116/254] Add contract ABI for Faang stonk strategy and vault. --- config/abi.js | 1090 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1090 insertions(+) diff --git a/config/abi.js b/config/abi.js index 74a6a01..a660697 100644 --- a/config/abi.js +++ b/config/abi.js @@ -18425,6 +18425,1096 @@ elonApeStrategyContract = [ } ] +const daoFaangStonkVaultContract = [ + { + "inputs": [ + { + "internalType": "address", + "name": "_treasuryWallet", + "type": "address" + }, + { + "internalType": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_strategy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sharesMinted", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "SetAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newStrategy", + "type": "address" + } + ], + "name": "SetPendingStrategy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldTreasury", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newTreasury", + "type": "address" + } + ], + "name": "SetTreasuryWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sharesBurned", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newStrategy", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "migrateFunds", + "type": "event" + }, + { + "inputs": [], + "name": "DAI", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "LOCKTIME", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "USDC", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "USDT", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "canSetPendingStrategy", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "depositedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + } + ], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTotalValueInPool", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "invest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + } + ], + "name": "migrateFund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingStrategy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reInvest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newAdmin", + "type": "address" + } + ], + "name": "setAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_daiPercentage", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_usdcPercentage", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "usdtPercentage", + "type": "uint256" + } + ], + "name": "setAmountToKeepInVaultPerc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_strategy", + "type": "address" + } + ], + "name": "setPendingStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newTreasury", + "type": "address" + } + ], + "name": "setTreasuryWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_fee", + "type": "uint256" + } + ], + "name": "setWithdrawalFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "strategy", + "outputs": [ + { + "internalType": "contract IStrategy", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unlockMigrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unlockTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + }, + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; + +const daoFaangStonkStrategyContract =[ + { + "inputs": [ + { + "internalType": "address", + "name": "_treasuryWallet", + "type": "address" + }, + { + "internalType": "address", + "name": "_mirustPool", + "type": "address" + }, + { + "internalType": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "weights", + "type": "uint256[]" + }, + { + "internalType": "contract IERC20[]", + "name": "mAssetsTokens", + "type": "address[]" + }, + { + "internalType": "contract ILPPool[]", + "name": "lpPools", + "type": "address[]" + }, + { + "internalType": "contract IERC20[]", + "name": "lpTokens", + "type": "address[]" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "name": "amountInPool", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "curveFi", + "outputs": [ + { + "internalType": "contract ICurveFi", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "factory", + "outputs": [ + { + "internalType": "contract IUniswapV2Factory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTotalValueInPool", + "outputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "mAssets", + "outputs": [ + { + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "internalType": "contract IERC20", + "name": "mAssetToken", + "type": "address" + }, + { + "internalType": "contract ILPPool", + "name": "lpPool", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "lpToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountOfATotal", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOfBTotal", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ILPPool", + "name": "", + "type": "address" + } + ], + "name": "poolStakedMIRLPToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "weights", + "type": "uint256[]" + } + ], + "name": "reBalance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "reInvest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "router", + "outputs": [ + { + "internalType": "contract IUniswapV2Router02", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + } + ], + "name": "setAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_vault", + "type": "address" + } + ], + "name": "setVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "name": "userTotalLPToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vault", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_tokenToConvert", + "type": "address" + } + ], + "name": "withdrawAllFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; + module.exports = { earnUSDTABIContract, earnUSDCABIContract, From d0cfc6e311968a6898f421c3322bfcfdc0bb48bb Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Fri, 25 Jun 2021 19:15:13 +0800 Subject: [PATCH 117/254] Add Faang Stonk config. --- config/abi.js | 2 ++ config/serverless/domain.js | 16 ++++++++++++++++ scripts/initial.js | 27 +++++++++++++++++++++++++-- 3 files changed, 43 insertions(+), 2 deletions(-) diff --git a/config/abi.js b/config/abi.js index a660697..b2edeef 100644 --- a/config/abi.js +++ b/config/abi.js @@ -19549,4 +19549,6 @@ module.exports = { eacAggregatoorProxyContract, elonApeVaultContract, elonApeStrategyContract, + daoFaangStonkVaultContract, + daoFaangStonkStrategyContract }; diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 1f5ca0d..fb1acfa 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -152,6 +152,14 @@ const testContracts = { contractType: "elon", tokenId: ["tether", "usd-coin", "dai"], }, + daoSTO: { + address: "0xe97f5e5a755f8e633d23a2bae167b628dec22948", + abi: abi.daoFaangStonkVaultContract, + strategyAddress: "0xccced6278e9c6e68210f3bdc1bc3444e830cad33", + strategyABI: abi.daoFaangStonkStrategyContract, + contractType: "daoFaang", + tokenId: ["tether", "usd-coin", "dai"], + }, 'hfDAI': { address: '0x6d7e8fa90c1ffdc019d691bafc18d6362fdeecd7', abi: abi.hfVaultContract, @@ -332,6 +340,14 @@ const mainContracts = { contractType: "elon", tokenId: ["tether", "usd-coin", "dai"], }, + daoSTO: { + address: "0",// TODO Update on mainnet + abi: abi.daoFaangStonkVaultContract, + strategyAddress: "", // TODO Update on mainnet + strategyABI: abi.daoFaangStonkStrategyContract, + contractType: "daoFaang", + tokenId: ["tether", "usd-coin", "dai"], + }, hfDAI: { address: '', // TODO: Update that this to mainnet address abi: abi.hfVaultContract, diff --git a/scripts/initial.js b/scripts/initial.js index f112394..b906a34 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -11,6 +11,8 @@ db.vault_categories.insertMany([ // { name: 'basic', contract_address: '', symbol: 'hfUSDT'}, // { name: 'basic', contract_address: '', symbol: 'hfUSDC'}, // { name: 'basic', contract_address: '', symbol: 'hfDAI'}, + // { name: 'basic', contract_address: '', symbol: 'daoELO', }, + // { name: 'basic', contract_address: '', symbol: 'daoSTO', }, ]); db.stake_pool.insertMany([ @@ -123,7 +125,17 @@ db.stake_pool.insertMany([ category: 'Basic', tokenId: 'ethereum', symbol: 'daoELO' - } + }, + // { + // name: "daoSTO", + // label: "DAO Vault Stonks LP", + // contract_address: '', // TODO: Update to mainnet address + // status: 'A', + // pid: '11', + // category: 'Basic', + // tokenId: 'ethereum', + // symbol: 'daoSTO' + // } ]); // Testnet Contracts @@ -137,6 +149,7 @@ db.vault_categories.insertMany([ { name: 'basic', contract_address: '0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d', symbol: 'cDAI', }, { name: 'degen', contract_address: '0x542a42496c96b946324f7dce2b030d5643d9ef8a', symbol: 'daoCDV', }, { name: 'basic', contract_address: '0xf03fa8553379d872b4e2bafbc679409fb82604c2', symbol: 'daoELO', }, + { name: 'basic', contract_address: '0xe97f5e5a755f8e633d23a2bae167b628dec22948', symbol: 'daoSTO', }, { name: 'basic', contract_address: '0xb41a49de82e95dc1e028839c3440ac97f9a7832c', symbol: 'hfUSDT'}, { name: 'basic', contract_address: '0x54783464848b35d6fb9bba37c1ddd23ac3b1a11a', symbol: 'hfUSDC'}, { name: 'basic', contract_address: '0x0f89ee5b95d1d5cfb10f29775d816fc6d8adb9fc', symbol: 'hfDAI'}, @@ -257,7 +270,17 @@ db.stake_pool.insertMany([ category: 'Basic', tokenId: 'ethereum', symbol: 'daoELO' - } + }, + // { + // name: "daoSTO", + // label: "DAO Vault Stonks LP", + // contract_address: '', // TODO: Update to mainnet address + // status: 'A', + // pid: '11', + // category: 'Advance', + // tokenId: 'ethereum', + // symbol: 'daoSTO' + // } ]); db.special_event.insertMany([ From 1933fb3c4b184496531391118f85ee6601507779 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Sat, 26 Jun 2021 10:12:38 +0800 Subject: [PATCH 118/254] Add Faang Stonk Config. --- services/vaults/apy/save/vaults.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 3cf6a3c..7382e48 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -191,6 +191,27 @@ module.exports = [ price_id: ["tether", "usd-coin", "dai"], isElon: true, }, + { + id: "daoSTO", + name: "DAO Vault Stonks", + symbol: ["USDT","USDC","DAI"], + description: "DAO Vault Stonks for 3 stablecoins", + vaultSymbol: "daoSTO", + erc20address: ["0x07de306ff27a2b630b1141956844eb1552b956b5", "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa"], + vaultContractAddress: "0xf03fa8553379d872b4e2Bafbc679409Fb82604c2", + vaultContractABI: abi.daoFaangStonkVaultContract, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 25680643, + measurement: 1e18, + price_id: ["tether", "usd-coin", "dai"], + isFaang: true, + }, { id: "hfDAI", name: "DAI", From 9997d2b8f627f6d9f8065e9f0b84ad893acb92dc Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Sat, 26 Jun 2021 11:08:58 +0800 Subject: [PATCH 119/254] Update DAOstake kovan address. --- config/serverless/domain.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 5d3740e..36588f7 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -181,9 +181,9 @@ const testContracts = { tokenId: "DVG", }, daoStake: { - address: "0x2d04c8A39fe41Dc94595Df81ABDaB1dD905B38B3", + address: "0xd8f59a99acfc597feb84914fef3769def87e7553", abi: abi.daoStakeContract, - startBlock: 25055584, + startBlock: 25711879, poolPercent: 0.51 }, uniswap: { From 7b2cd440853f809ca80f8fd9c6dac72b281ee5db Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Sat, 26 Jun 2021 14:18:04 +0800 Subject: [PATCH 120/254] Add FAANG stonk into saveVaultApy() and savePricePerFullShare() cronjob --- models/price.model.js | 1 + services/vaults/apy/save/handler.js | 175 ++++++++++++++++++---------- services/vaults/price/handler.js | 33 +++++- 3 files changed, 146 insertions(+), 63 deletions(-) diff --git a/models/price.model.js b/models/price.model.js index 68c9897..0231258 100644 --- a/models/price.model.js +++ b/models/price.model.js @@ -36,6 +36,7 @@ module.exports = { cDaiFarmer: 'cDAI_price', daoCDVFarmer: 'daoCDV_price', daoELOFarmer: 'daoELO_price', + daoSTOFarmer: 'daoSTO_price', hfDaiFarmer: 'hfDAI_price', hfUsdcFarmer: 'hfUSDC_price', hfUsdtFarmer: 'hfUSDT_price', diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index 9cdb39c..1109ebf 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -17,6 +17,7 @@ const archiveNodeWeb3 = new Web3(archiveNodeUrl); const infuraWeb3 = new Web3(infuraUrl); const blocks = new EthDater(archiveNodeWeb3, delayTime); const { testContracts, mainContracts } = require('../../../../config/serverless/domain'); +const { validate } = require("node-cron"); let currentBlockNbr; let oneDayAgoBlock; @@ -81,7 +82,7 @@ const getPriceFromChainLink = async (block) => { try { price = await contract.methods.latestAnswer().call(undefined, block); - } catch (ex) {} + } catch (ex) { } await delay(delayTime); return price; }; @@ -103,8 +104,8 @@ const getCitadelPricePerFullShare = async (contract, block, inceptionBlockNbr) = const pool = await contract.methods.getAllPoolInETH(price).call(undefined, block); const totalSupply = await contract.methods.totalSupply().call(undefined, block); pricePerFullShare = pool / totalSupply; - } catch (ex) {} - + } catch (ex) { } + await delay(delayTime); return pricePerFullShare; } @@ -125,7 +126,29 @@ const getElonPricePerFullShare = async (contract, block, inceptionBlockNbr) => { const pool = await contract.methods.getAllPoolInUSD().call(undefined, block); // All pool in USD (6 decimals) const totalSupply = await contract.methods.totalSupply().call(undefined, block); pricePerFullShare = (new BigNumber(pool)).shiftedBy(12).dividedBy(totalSupply).toNumber(); - } catch (ex) {} + } catch (ex) { } + + await delay(delayTime); + return pricePerFullShare; +} + +const getFaangPricePerFullShare = async (contract, block, inceptionBlockNbr) => { + const contractDidntExist = block < inceptionBlockNbr; + const inceptionBlock = block === inceptionBlockNbr; + + if (inceptionBlock) { + return 1e18; + } + if (contractDidntExist) { + return 0; + } + + let pricePerFullShare = 0; + try { + const pool = await contract.methods.getTotalValueInPool(price).call(undefined, block); + const totalSupply = await contract.methods.totalSupply().call(undefined, block); + pricePerFullShare = pool / totalSupply; + } catch (ex) { } await delay(delayTime); return pricePerFullShare; @@ -158,10 +181,10 @@ const getPricePerFullShare = async ( let pricePerFullShare = 0; try { pricePerFullShare = await vaultContract.methods - .getPricePerFullShare() - .call(undefined, block); - } catch (ex) {} - + .getPricePerFullShare() + .call(undefined, block); + } catch (ex) { } + await delay(delayTime); return pricePerFullShare; }; @@ -179,10 +202,10 @@ const getApyForVault = async (vault) => { if (process.env.PRODUCTION != '') { const symbol = Object.keys(mainContracts.farmer).find((key) => mainContracts.farmer[key].address.toLowerCase() === vault.vaultContractAddress.toLowerCase()); - cToken = new archiveNodeWeb3.eth.Contract(mainContracts.compund[symbol].abi, mainContracts.compund[symbol].address); + cToken = new archiveNodeWeb3.eth.Contract(mainContracts.compund[symbol].abi, mainContracts.compund[symbol].address); } else { const symbol = Object.keys(testContracts.farmer).find((key) => testContracts.farmer[key].address.toLowerCase() === vault.vaultContractAddress.toLowerCase()); - cToken = new archiveNodeWeb3.eth.Contract(testContracts.compund[symbol].abi, testContracts.compund[symbol].address); + cToken = new archiveNodeWeb3.eth.Contract(testContracts.compund[symbol].abi, testContracts.compund[symbol].address); } const compoundApy = await getCompoundSupplyApy(cToken) return { @@ -252,6 +275,34 @@ const getApyForVault = async (vault) => { citadelApy: 0, elonApy: apy, } + } else if (vault.isFaang) { + // FAANG Stonk vault + let contract; + if (process.env.PRODUCTION != '') { + contract = new archiveNodeWeb3.eth.Contract(mainContracts.farmer['daoSTO'].abi, mainContracts.farmer['daoSTO'].address); + } else { + contract = new archiveNodeWeb3.eth.Contract(testContracts.farmer['daoSTO'].abi, testContracts.farmer['daoSTO'].address); + } + + const pricePerFullShareCurrent = await getElonPricePerFullShare(contract, currentBlockNbr, inceptionBlockNbr); + const pricePerFullShareOneDayAgo = await getElonPricePerFullShare(contract, oneDayAgoBlock, inceptionBlockNbr); + + // APY Calculation + const n = 365 / 2; // Assume 2 days to trigger invest function + const apr = (pricePerFullShareCurrent - pricePerFullShareOneDayAgo) * n; + const apy = (Math.pow((1 + (apr / 100) / n), n) - 1) * 100; + + return { + apyInceptionSample: 0, + apyOneDaySample: 0, + apyThreeDaySample: 0, + apyOneWeekSample: 0, + apyOneMonthSample: 0, + apyLoanscan: 0, + compoundApy: 0, + citadelApy: 0, + faangApy: apy, + } } else if (vault.isHarvest) { // Harvest Vault const vaultContract = new archiveNodeWeb3.eth.Contract(vault.vaultContractABI, vault.vaultContractAddress); @@ -261,50 +312,50 @@ const getApyForVault = async (vault) => { const pool = strategyContract.methods.pool().call(); const totalSupply = vaultContract.methods.totalSupply().call(); const currentPricePerFullShare = pool / totalSupply; - - const dataRequiredForCalculation = { - vaultContract, + + const dataRequiredForCalculation = { + vaultContract, strategyContract, - currentPricePerFullShare, + currentPricePerFullShare, lastMeasurement: vault.lastMeasurement }; - + // APR based on one day sample Object.assign(dataRequiredForCalculation, { blockNumber: oneDayAgoBlock }); const aprOneDaySample = await getHarvestFarmerAPR( - vaultContract, - strategyContract, - oneDayAgoBlock, - currentPricePerFullShare); - + vaultContract, + strategyContract, + oneDayAgoBlock, + currentPricePerFullShare); + // APR based on three day sample - Object.assign(dataRequiredForCalculation, { blockNumber: threeDaysAgoBlock }); + Object.assign(dataRequiredForCalculation, { blockNumber: threeDaysAgoBlock }); const aprThreeDaySample = await getHarvestFarmerAPR( - vaultContract, - strategyContract, - threeDaysAgoBlock, - currentPricePerFullShare); - + vaultContract, + strategyContract, + threeDaysAgoBlock, + currentPricePerFullShare); + // APR based on one week sample - Object.assign(dataRequiredForCalculation, { blockNumber: oneWeekAgoBlock }); + Object.assign(dataRequiredForCalculation, { blockNumber: oneWeekAgoBlock }); const aprOneWeekSample = await getHarvestFarmerAPR( - vaultContract, - strategyContract, - oneWeekAgoBlock, - currentPricePerFullShare); + vaultContract, + strategyContract, + oneWeekAgoBlock, + currentPricePerFullShare); // APR based on one month sample - Object.assign(dataRequiredForCalculation, { blockNumber: oneMonthAgoBlock }); + Object.assign(dataRequiredForCalculation, { blockNumber: oneMonthAgoBlock }); const aprOneMonthSample = await getHarvestFarmerAPR( - vaultContract, - strategyContract, - oneMonthAgoBlock, - currentPricePerFullShare); + vaultContract, + strategyContract, + oneMonthAgoBlock, + currentPricePerFullShare); const aprData = { aprOneDaySample, aprThreeDaySample, - aprOneWeekSample, + aprOneWeekSample, aprOneMonthSample } @@ -326,7 +377,7 @@ const getApyForVault = async (vault) => { inceptionBlockNbr, inceptionBlockNbr ); - + const pricePerFullShareCurrent = await getPricePerFullShare( vaultContract, currentBlockNbr, @@ -338,32 +389,32 @@ const getApyForVault = async (vault) => { oneDayAgoBlock, inceptionBlockNbr ); - + const pricePerFullShareThreeDaysAgo = await getPricePerFullShare( vaultContract, threeDaysAgoBlock, inceptionBlockNbr ); - + const pricePerFullShareOneWeekAgo = await getPricePerFullShare( vaultContract, oneWeekAgoBlock, inceptionBlockNbr ); - + const pricePerFullShareOneMonthAgo = await getPricePerFullShare( vaultContract, oneMonthAgoBlock, inceptionBlockNbr ); - + const apyInceptionSample = getApy( pricePerFullShareInception, pricePerFullShareCurrent, inceptionBlockNbr, currentBlockNbr ); - + const apyOneDaySample = (getApy( pricePerFullShareOneDayAgo, @@ -371,7 +422,7 @@ const getApyForVault = async (vault) => { oneDayAgoBlock, currentBlockNbr )) || apyInceptionSample; - + const apyThreeDaySample = (getApy( pricePerFullShareThreeDaysAgo, @@ -379,7 +430,7 @@ const getApyForVault = async (vault) => { threeDaysAgoBlock, currentBlockNbr )) || apyInceptionSample; - + const apyOneWeekSample = (getApy( pricePerFullShareOneWeekAgo, @@ -387,7 +438,7 @@ const getApyForVault = async (vault) => { oneWeekAgoBlock, currentBlockNbr )) || apyInceptionSample; - + const apyOneMonthSample = (getApy( pricePerFullShareOneMonthAgo, @@ -395,9 +446,9 @@ const getApyForVault = async (vault) => { oneMonthAgoBlock, currentBlockNbr )) || apyInceptionSample; - + let apyLoanscan = 0; - + const apyData = { apyInceptionSample, apyOneDaySample, @@ -405,7 +456,7 @@ const getApyForVault = async (vault) => { apyOneWeekSample, apyOneMonthSample, }; - + if (pool) { const poolAddress = pool.address; const virtualPriceCurrent = await getVirtualPrice( @@ -416,21 +467,21 @@ const getApyForVault = async (vault) => { poolAddress, oneDayAgoBlock ); - + const poolApy = await getApy( virtualPriceOneDayAgo, virtualPriceCurrent, oneDayAgoBlock, currentBlockNbr ); - + const poolPct = poolApy / 100; const vaultPct = apyOneDaySample / 100; apyLoanscan = ((1 + poolPct) * (1 + vaultPct) - 1) * 100; - + return { ...apyData, poolApy, apyLoanscan }; } - + return { ...apyData, apyLoanscan, @@ -469,7 +520,7 @@ const readVault = async (vault) => { } = vault; console.log(`Reading vault ${vault.name}`); - + if (!abi || !address) { console.log(`Vault ABI not found: ${name}`); return null; @@ -490,29 +541,29 @@ const readVault = async (vault) => { timestamp: Date.now(), ...apy, }; - + await saveVaultWithApy(data); return data; }; const getHarvestFarmerAPR = async (vaultData) => { - const { + const { vaultContract, - strategyContract, + strategyContract, currentPricePerFullShare, - lastMeasurement, - blockNumber, + lastMeasurement, + blockNumber, } = vaultData; let apr = 0; // To ensure block number happens after contract creation - if(blockNumber >= lastMeasurement) { + if (blockNumber >= lastMeasurement) { const pool = await strategyContract.methods.pool().call(undefined, blockNumber); const totalSupply = await vaultContract.methods.totalSupply().call(undefined, blockNumber); - const pricePerFullShareOfBeforeDay = pool / totalSupply; - + const pricePerFullShareOfBeforeDay = pool / totalSupply; + // APR calculation apr = (currentPricePerFullShare - pricePerFullShareOfBeforeDay) * 100 * 365; } diff --git a/services/vaults/price/handler.js b/services/vaults/price/handler.js index 9168751..6141a9b 100644 --- a/services/vaults/price/handler.js +++ b/services/vaults/price/handler.js @@ -57,9 +57,20 @@ const getElonPricePerFullShare = async (contract) => { return pricePerFullShare; } +const getFaangPricePerFullShare = async (contract) => { + let pricePerFullShare = 0; + try { + const pool = await contract.methods.getTotalValueInPool().call(); + const totalSupply = await contract.methods.totalSupply().call(); + pricePerFullShare = pool / totalSupply; + } catch (ex) {} + await delay(delayTime); + return pricePerFullShare; +} + const getCurrentPrice = async () => { let contracts = process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? mainContracts : testContracts; - + for (const key of Object.keys(contracts.farmer)) { try { if (contracts.farmer[key].contractType === 'yearn') { @@ -90,6 +101,7 @@ const getCurrentPrice = async () => { compoundExchangeRate: exchangeRate, citadelPrice: 0, elonPrice: 0, + faangPrice: 0, harvestPrice: 0, }).catch((err) => console.log('err', err)); } else if (contracts.farmer[key].contractType === 'citadel') { @@ -101,6 +113,7 @@ const getCurrentPrice = async () => { compoundExchangeRate: 0, citadelPrice: pricePerFullShare, elonPrice: 0, + faangPrice: 0, harvestPrice: 0, }).catch((err) => console.log('err', err)); } else if (contracts.farmer[key].contractType === 'elon') { @@ -112,6 +125,19 @@ const getCurrentPrice = async () => { compoundExchangeRate: 0, citadelPrice: 0, elonPrice: pricePerFullShare, + faangPrice: 0, + harvestPrice: 0, + }).catch((err) => console.log('err', err)); + } else if(contracts.farmer[key].contractType === 'daoFaang') { + const contract = getContract(contracts.farmer[key].abi, contracts.farmer[key].address); + const pricePerFullShare = await getFaangPricePerFullShare(contract); + await db.add(key + '_price', { + earnPrice: 0, + vaultPrice: 0, + compoundExchangeRate: 0, + citadelPrice: 0, + elonPrice: 0, + faangPrice: pricePerFullShare, harvestPrice: 0, }).catch((err) => console.log('err', err)); } else if (contracts.farmer[key].contractType === 'harvest') { @@ -134,6 +160,7 @@ const getCurrentPrice = async () => { compoundExchangeRate: 0, citadelPrice: 0, elonPrice: 0, + faangPrice: 0, harvestPrice: pricePerFullShare, }) } @@ -144,6 +171,7 @@ const getCurrentPrice = async () => { compoundExchangeRate: 0, citadelPrice: 0, elonPrice: 0, + faangPrice: 0, harvestPrice: "0" }).catch((err) => console.log('err', err)); } @@ -201,6 +229,9 @@ module.exports.handleHistoricialPrice = async (req, res) => { case db.daoELOFarmer: collection = db.daoELOFarmer; break; + case db.daoSTOFarmer: + collection = db.daoSTOFarmer; + break; case db.hfDaiFarmer: collection = db.hfDaiFarmer; break; From e63d61c70c75bd31cd6c067b56f0cb82a44f9ca3 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Sat, 26 Jun 2021 16:54:14 +0800 Subject: [PATCH 121/254] saveHistoricalAPY() cronjob for Faang Stonk. --- models/historical-apy.model.js | 1 + services/vaults/apy/save/historical-handle.js | 62 ++++++++++++++++++- 2 files changed, 62 insertions(+), 1 deletion(-) diff --git a/models/historical-apy.model.js b/models/historical-apy.model.js index 8583241..1157e07 100644 --- a/models/historical-apy.model.js +++ b/models/historical-apy.model.js @@ -36,6 +36,7 @@ module.exports = { cDaiFarmer: 'cDAI_historical-apy', daoCDVFarmer: 'daoCDV_historical-apy', daoELOFarmer: 'daoELO_historical-apy', + daoSTOFarmer: 'daoSTO_historical-apy', hfDaiFarmer: 'hfDAI_historical-apy', hfUsdcFarmer: 'hfUSDC_historical-apy', hfUsdtFarmer: 'hfUSDT_historical-apy', diff --git a/services/vaults/apy/save/historical-handle.js b/services/vaults/apy/save/historical-handle.js index 51ad996..1908918 100644 --- a/services/vaults/apy/save/historical-handle.js +++ b/services/vaults/apy/save/historical-handle.js @@ -162,6 +162,28 @@ const getElonPricePerFullShare = async (contract, block, inceptionBlockNbr) => { return pricePerFullShare; }; +const getFaangPricePerFullShare = async (contract, block, inceptionBlockNbr) => { + const contractDidntExist = block < inceptionBlockNbr; + const inceptionBlock = block === inceptionBlockNbr; + + if (inceptionBlock) { + return 1e18; + } + if (contractDidntExist) { + return 0; + } + + let pricePerFullShare = 0; + try { + const pool = await contract.methods.getTotalValueInPool().call(undefined, block); + const totalSupply = await contract.methods.totalSupply().call(undefined, block); + pricePerFullShare = pool / totalSupply; + } catch (ex) {} + + await delay(delayTime); + return pricePerFullShare; +}; + const getApyForVault = async (vault) => { const { lastMeasurement: inceptionBlockNbr, @@ -192,6 +214,7 @@ const getApyForVault = async (vault) => { compoundApy, citadelApy: 0, elonApy: 0, + faangApy: 0, }; } else if (vault.isCitadel) { // Citadel Vault @@ -220,6 +243,7 @@ const getApyForVault = async (vault) => { compoundApy: 0, citadelApy: apy, elonApy: 0, + faangApy: 0, } } else if (vault.isElon) { // Elon's APE Vault @@ -248,6 +272,36 @@ const getApyForVault = async (vault) => { compoundApy: 0, citadelApy: 0, elonApy: apy, + faangApy: 0, + } + } else if (vault.isFaang) { + // DAO Faang Stonk Vault + let contract; + if (process.env.PRODUCTION != '') { + contract = new archiveNodeWeb3.eth.Contract(mainContracts.farmer['daoSTO'].abi, mainContracts.farmer['daoSTO'].address); + } else { + contract = new archiveNodeWeb3.eth.Contract(testContracts.farmer['daoSTO'].abi, testContracts.farmer['daoSTO'].address); + } + + const pricePerFullShareCurrent = await getFaangPricePerFullShare(contract, currentBlockNbr, inceptionBlockNbr); + const pricePerFullShareOneDayAgo = await getFaangPricePerFullShare(contract, oneDayAgoBlock, inceptionBlockNbr); + + // APY Calculation + const n = 365 / 2; // Assume 2 days to trigger invest function + const apr = (pricePerFullShareCurrent - pricePerFullShareOneDayAgo) * n; + const apy = (Math.pow((1 + (apr / 100) / n), n) - 1) * 100; + + return { + apyInceptionSample: 0, + apyOneDaySample: 0, + apyThreeDaySample: 0, + apyOneWeekSample: 0, + apyOneMonthSample: 0, + apyLoanscan: 0, + compoundApy: 0, + citadelApy: 0, + elonApy: 0, + faangApy: apy } } else if (vault.isHarvest) { // Harvest Vault @@ -311,8 +365,9 @@ const getApyForVault = async (vault) => { compoundApy: 0, citadelApy: 0, elonApy: 0, + faangApy: 0, }; - }else { + } else { // Yearn Vault const pool = _.find(pools, { symbol }); var vaultContract = new archiveNodeWeb3.eth.Contract(abi, address); @@ -430,6 +485,7 @@ const getApyForVault = async (vault) => { compoundApy: 0, citadelApy: 0, elonApy: 0, + faangApy: 0, }; } }; @@ -489,6 +545,10 @@ const getHistoricalAPY = async (startTime, contractAddress) => { case mainContracts.farmer['daoELO'].address: result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.daoELOFarmer); break; + case testContracts.farmer['daoSTO'].address: + case mainContracts.farmer['daoSTO'].address: + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.daoSTOFarmer); + break; case testContracts.farmer['hfDAI'].address: case mainContracts.farmer['hfDAI'].address: result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.hfDaiFarmer); From 5920a83e61d089cd7906a727a4cf79b81458a81e Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Sat, 26 Jun 2021 17:20:12 +0800 Subject: [PATCH 122/254] saveHistoricalTVL() cronjob for Dao FAANG. --- models/tvl.model.js | 1 + services/vaults/tvl/handler.js | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/models/tvl.model.js b/models/tvl.model.js index c88f94d..1ecac49 100644 --- a/models/tvl.model.js +++ b/models/tvl.model.js @@ -63,6 +63,7 @@ module.exports = { cDaiFarmer: "cDAI_tvl", daoCDVFarmer: "daoCDV_tvl", daoELOFarmer: "daoELO_tvl", + daoSTOFarmer: "daoSTO_tvl", hfDaiFarmer: "hfDAI_tvl", hfUsdtFarmer: "hfUSDT_tvl", hfUsdcFarmer: "hfUSDC_tvl", diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index 76d4cc1..0c95c6e 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -126,6 +126,11 @@ const getTVL = async (vault) => { const contract = await getTokenContract(vault); const usdPool = await contract.methods.getAllPoolInUSD().call(); tvl = usdPool / 10 ** 6; // All pool in USD (6 decimals follow USDT) + } else if(vault.contractType === 'daoFaang'){ + const contract = await getTokenContract(vault); + const poolAmount = await contract.methods.getTotalValueInPool().call(); + const decimals = await contract.methods.decimals().call(); + tvl = poolAmount / 10 ** decimals; } else { const strategyContract = getContract(strategyABI, strategyAddress); const poolAmount = await getPoolAmount(strategyContract); @@ -269,6 +274,9 @@ module.exports.tvlHandle = async (req, res) => { case db.daoELOFarmer: collection = db.daoELOFarmer; break; + case db.daoSTOFarmer: + collection = db.daoSTOFarmer; + break; default: res.status(200).json({ message: "Invalid Farmer", From 4d306eb4636bb252ac14524725d919d96502c649 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Sat, 26 Jun 2021 17:45:48 +0800 Subject: [PATCH 123/254] update category for DAO Faang in db script. --- scripts/initial.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/initial.js b/scripts/initial.js index b906a34..5a4bddc 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -149,7 +149,7 @@ db.vault_categories.insertMany([ { name: 'basic', contract_address: '0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d', symbol: 'cDAI', }, { name: 'degen', contract_address: '0x542a42496c96b946324f7dce2b030d5643d9ef8a', symbol: 'daoCDV', }, { name: 'basic', contract_address: '0xf03fa8553379d872b4e2bafbc679409fb82604c2', symbol: 'daoELO', }, - { name: 'basic', contract_address: '0xe97f5e5a755f8e633d23a2bae167b628dec22948', symbol: 'daoSTO', }, + { name: 'advance', contract_address: '0xe97f5e5a755f8e633d23a2bae167b628dec22948', symbol: 'daoSTO', }, { name: 'basic', contract_address: '0xb41a49de82e95dc1e028839c3440ac97f9a7832c', symbol: 'hfUSDT'}, { name: 'basic', contract_address: '0x54783464848b35d6fb9bba37c1ddd23ac3b1a11a', symbol: 'hfUSDC'}, { name: 'basic', contract_address: '0x0f89ee5b95d1d5cfb10f29775d816fc6d8adb9fc', symbol: 'hfDAI'}, From 43b4481c9aa81ddd86d687dc85ef72bd54b1eda4 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Sat, 26 Jun 2021 18:10:53 +0800 Subject: [PATCH 124/254] Add Faang Stonk into user related API. --- services/user/vaults/statistics/handler.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/services/user/vaults/statistics/handler.js b/services/user/vaults/statistics/handler.js index 4df6694..e9acfe3 100644 --- a/services/user/vaults/statistics/handler.js +++ b/services/user/vaults/statistics/handler.js @@ -107,13 +107,14 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => } else if (type === 'elon') { const pool = await vaultContract.methods.getAllPoolInUSD().call(); const totalSupply = await vaultContract.methods.totalSupply().call(); - - // depositedAmount = await vaultContract.methods._balanceOfDeposit(userAddress).call(); depositedAmount = (depositedShares * pool) / totalSupply; depositedAmount = new BigNumber(depositedAmount); } else if (type === 'harvest') { depositedAmount = await strategyContract.methods.getCurrentBalance(userAddress).call(); depositedAmount = new BigNumber(depositedAmount); + } else if (type === 'daoFaang') { + depositedAmount = await vaultContract.methods.depositedAmount(userAddress).call(); + depositedAmount = new BigNumber(depositedAmount); } const { @@ -158,13 +159,15 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => let totalTransferredInUSD = 0; let totalTransferredOutInUSD = 0; - if(type === "citadel" || type === "elon") { + if(type === "citadel" || type === "elon" || type === "daoFaang") { totalDepositsInUSD = getSumForUSD(deposits); totalWithdrawalsInUSD = getSumForUSD(withdrawals); totalTransferredInUSD = getSumForUSD(transfersIn); totalTransferredOutInUSD = getSumForUSD(transfersOut); - let exactDepositedAmount = depositedAmount / 10 ** 6; + const decimals = (type === "daoFaang") ? 18 : 6; + + let exactDepositedAmount = depositedAmount / 10 ** decimals; exactDepositedAmount = new BigNumber(exactDepositedAmount); earnings = exactDepositedAmount .minus(totalDepositsInUSD) From 9dd39d133c6dcfdff4c247ddd7f55d18c8d8c17f Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Sat, 26 Jun 2021 18:14:34 +0800 Subject: [PATCH 125/254] Remove unused import. --- services/vaults/apy/save/handler.js | 1 - 1 file changed, 1 deletion(-) diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index 1109ebf..24ec9a3 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -17,7 +17,6 @@ const archiveNodeWeb3 = new Web3(archiveNodeUrl); const infuraWeb3 = new Web3(infuraUrl); const blocks = new EthDater(archiveNodeWeb3, delayTime); const { testContracts, mainContracts } = require('../../../../config/serverless/domain'); -const { validate } = require("node-cron"); let currentBlockNbr; let oneDayAgoBlock; From 492a2f38bc88504b8ac77add5906b94e6e48d186 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Sat, 26 Jun 2021 18:17:19 +0800 Subject: [PATCH 126/254] Fix in APY calculation. --- services/vaults/apy/save/handler.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index 24ec9a3..b699928 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -144,7 +144,7 @@ const getFaangPricePerFullShare = async (contract, block, inceptionBlockNbr) => let pricePerFullShare = 0; try { - const pool = await contract.methods.getTotalValueInPool(price).call(undefined, block); + const pool = await contract.methods.getTotalValueInPool().call(undefined, block); const totalSupply = await contract.methods.totalSupply().call(undefined, block); pricePerFullShare = pool / totalSupply; } catch (ex) { } @@ -283,8 +283,8 @@ const getApyForVault = async (vault) => { contract = new archiveNodeWeb3.eth.Contract(testContracts.farmer['daoSTO'].abi, testContracts.farmer['daoSTO'].address); } - const pricePerFullShareCurrent = await getElonPricePerFullShare(contract, currentBlockNbr, inceptionBlockNbr); - const pricePerFullShareOneDayAgo = await getElonPricePerFullShare(contract, oneDayAgoBlock, inceptionBlockNbr); + const pricePerFullShareCurrent = await getFaangPricePerFullShare(contract, currentBlockNbr, inceptionBlockNbr); + const pricePerFullShareOneDayAgo = await getFaangPricePerFullShare(contract, oneDayAgoBlock, inceptionBlockNbr); // APY Calculation const n = 365 / 2; // Assume 2 days to trigger invest function From 7b673ba233bfa485de26d33ed197bebde811e012 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Sun, 27 Jun 2021 12:39:33 +0800 Subject: [PATCH 127/254] Adding missing faangApy to other strategies. --- services/vaults/apy/save/handler.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index b699928..2365c07 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -217,6 +217,7 @@ const getApyForVault = async (vault) => { compoundApy, citadelApy: 0, elonApy: 0, + faangApy: 0, }; } else if (vault.isCitadel) { // Citadel Vault @@ -245,6 +246,7 @@ const getApyForVault = async (vault) => { compoundApy: 0, citadelApy: apy, elonApy: 0, + faangApy: 0, } } else if (vault.isElon) { // Elon's Ape Vault @@ -273,6 +275,7 @@ const getApyForVault = async (vault) => { compoundApy: 0, citadelApy: 0, elonApy: apy, + faangApy: 0, } } else if (vault.isFaang) { // FAANG Stonk vault @@ -300,6 +303,7 @@ const getApyForVault = async (vault) => { apyLoanscan: 0, compoundApy: 0, citadelApy: 0, + elonApy: 0, faangApy: apy, } } else if (vault.isHarvest) { @@ -364,6 +368,7 @@ const getApyForVault = async (vault) => { compoundApy: 0, citadelApy: 0, elonApy: 0, + faangApy: 0, }; } else { @@ -487,6 +492,7 @@ const getApyForVault = async (vault) => { compoundApy: 0, citadelApy: 0, elonApy: 0, + faangApy: 0, }; } }; From 38ffe2a45f5da736bf06a10cd3aaca318dfb1f34 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Mon, 28 Jun 2021 20:11:35 +0800 Subject: [PATCH 128/254] Update implementation for deposited amount FAANG. --- config/serverless/domain.js | 8 +++++ services/user/vaults/statistics/handler.js | 34 ++++++++++++++++++---- services/vaults/apy/save/vaults.js | 2 +- 3 files changed, 38 insertions(+), 6 deletions(-) diff --git a/config/serverless/domain.js b/config/serverless/domain.js index d37ba2f..8478124 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -226,6 +226,10 @@ const testContracts = { USDT_ETH: { address: "0x0bF499444525a23E7Bb61997539725cA2e928138", abi: abi.eacAggregatoorProxyContract, + }, + USDT_USD: { + address: "0x2ca5A90D34cA333661083F89D831f757A9A50148", + abi: abi.eacAggregatoorProxyContract, } } }; @@ -428,6 +432,10 @@ const mainContracts = { USDT_ETH: { address: "0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46", abi: abi.eacAggregatoorProxyContract, + }, + USDT_USD: { + address: "0x3E7d1eAB13ad0104d2750B8863b489D65364e32D", + abi: abi.eacAggregatoorProxyContract, } } }; diff --git a/services/user/vaults/statistics/handler.js b/services/user/vaults/statistics/handler.js index e9acfe3..c07a3a0 100644 --- a/services/user/vaults/statistics/handler.js +++ b/services/user/vaults/statistics/handler.js @@ -7,6 +7,9 @@ const BigNumber = require("bignumber.js"); const subgraphUrl = process.env.SUBGRAPH_ENDPOINT; const Web3 = require("web3"); const web3 = new Web3(process.env.WEB3_ENDPOINT); +const archiveNodeUrl = process.env.ARCHIVENODE_ENDPOINT; +const archiveNodeWeb3 = new Web3(archiveNodeUrl); +const delay = require("delay"); const earnABIContract = require('../../../../config/abi').earnABIContract; const vaultABIContract = require('../../../../config/abi').vaultABIContract; const yfUSDTABIContract = require('../../../../config/abi').yfUSDTABIContract; @@ -60,6 +63,16 @@ const getTotalSupply = async (contract) => { return totalSupply; }; +// Get USDT <-> USD Price +const getPriceFromChainLink = async (contract) => { + let price = 0; + try { + price = await contract.methods.latestAnswer().call(); + } catch (ex) { } + await delay(500); + return price; +}; + const getVaultStatistics = async (contractAddress, transactions, userAddress) => { const findVault = (vault) => { if (vault.vaultAddress == null) return false; @@ -113,7 +126,20 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => depositedAmount = await strategyContract.methods.getCurrentBalance(userAddress).call(); depositedAmount = new BigNumber(depositedAmount); } else if (type === 'daoFaang') { - depositedAmount = await vaultContract.methods.depositedAmount(userAddress).call(); + + let usdtToUsdPriceFeedContract; + if (process.env.PRODUCTION != '') { + usdtToUsdPriceFeedContract = new archiveNodeWeb3.eth.Contract(mainContracts.chainLink.USDT_USD.abi, mainContracts.chainLink.USDT_USD.address); + } else { + usdtToUsdPriceFeedContract = new archiveNodeWeb3.eth.Contract(testContracts.chainLink.USDT_USD.abi, testContracts.chainLink.USDT_USD.address); + } + + const usdtToUsdPrice = await getPriceFromChainLink(usdtToUsdPriceFeedContract); + const pool = await vaultContract.methods.getTotalValueInPool().call(); + const totalSupply = await vaultContract.methods.totalSupply().call(); + const poolInUSD = (pool * usdtToUsdPrice) / (10 ** 20); // The reason to divide 20: pool in 18 , price feed in 8 , ( 18 + 8 ) / 20 = 6 decimals + + depositedAmount = (depositedShares * poolInUSD) / totalSupply; depositedAmount = new BigNumber(depositedAmount); } @@ -164,10 +190,8 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => totalWithdrawalsInUSD = getSumForUSD(withdrawals); totalTransferredInUSD = getSumForUSD(transfersIn); totalTransferredOutInUSD = getSumForUSD(transfersOut); - - const decimals = (type === "daoFaang") ? 18 : 6; - - let exactDepositedAmount = depositedAmount / 10 ** decimals; + + let exactDepositedAmount = depositedAmount / 10 ** 6; exactDepositedAmount = new BigNumber(exactDepositedAmount); earnings = exactDepositedAmount .minus(totalDepositsInUSD) diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 7382e48..2915b31 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -198,7 +198,7 @@ module.exports = [ description: "DAO Vault Stonks for 3 stablecoins", vaultSymbol: "daoSTO", erc20address: ["0x07de306ff27a2b630b1141956844eb1552b956b5", "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa"], - vaultContractAddress: "0xf03fa8553379d872b4e2Bafbc679409Fb82604c2", + vaultContractAddress: "0xe97f5e5a755f8e633d23a2bae167b628dec22948", vaultContractABI: abi.daoFaangStonkVaultContract, balance: 0, vaultBalance: 0, From f4f87365f081597e438e9beb95b712833f14808d Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Mon, 28 Jun 2021 20:12:16 +0800 Subject: [PATCH 129/254] Revert "Update implementation for deposited amount FAANG." This reverts commit 38ffe2a45f5da736bf06a10cd3aaca318dfb1f34. --- config/serverless/domain.js | 8 ----- services/user/vaults/statistics/handler.js | 34 ++++------------------ services/vaults/apy/save/vaults.js | 2 +- 3 files changed, 6 insertions(+), 38 deletions(-) diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 8478124..d37ba2f 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -226,10 +226,6 @@ const testContracts = { USDT_ETH: { address: "0x0bF499444525a23E7Bb61997539725cA2e928138", abi: abi.eacAggregatoorProxyContract, - }, - USDT_USD: { - address: "0x2ca5A90D34cA333661083F89D831f757A9A50148", - abi: abi.eacAggregatoorProxyContract, } } }; @@ -432,10 +428,6 @@ const mainContracts = { USDT_ETH: { address: "0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46", abi: abi.eacAggregatoorProxyContract, - }, - USDT_USD: { - address: "0x3E7d1eAB13ad0104d2750B8863b489D65364e32D", - abi: abi.eacAggregatoorProxyContract, } } }; diff --git a/services/user/vaults/statistics/handler.js b/services/user/vaults/statistics/handler.js index c07a3a0..e9acfe3 100644 --- a/services/user/vaults/statistics/handler.js +++ b/services/user/vaults/statistics/handler.js @@ -7,9 +7,6 @@ const BigNumber = require("bignumber.js"); const subgraphUrl = process.env.SUBGRAPH_ENDPOINT; const Web3 = require("web3"); const web3 = new Web3(process.env.WEB3_ENDPOINT); -const archiveNodeUrl = process.env.ARCHIVENODE_ENDPOINT; -const archiveNodeWeb3 = new Web3(archiveNodeUrl); -const delay = require("delay"); const earnABIContract = require('../../../../config/abi').earnABIContract; const vaultABIContract = require('../../../../config/abi').vaultABIContract; const yfUSDTABIContract = require('../../../../config/abi').yfUSDTABIContract; @@ -63,16 +60,6 @@ const getTotalSupply = async (contract) => { return totalSupply; }; -// Get USDT <-> USD Price -const getPriceFromChainLink = async (contract) => { - let price = 0; - try { - price = await contract.methods.latestAnswer().call(); - } catch (ex) { } - await delay(500); - return price; -}; - const getVaultStatistics = async (contractAddress, transactions, userAddress) => { const findVault = (vault) => { if (vault.vaultAddress == null) return false; @@ -126,20 +113,7 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => depositedAmount = await strategyContract.methods.getCurrentBalance(userAddress).call(); depositedAmount = new BigNumber(depositedAmount); } else if (type === 'daoFaang') { - - let usdtToUsdPriceFeedContract; - if (process.env.PRODUCTION != '') { - usdtToUsdPriceFeedContract = new archiveNodeWeb3.eth.Contract(mainContracts.chainLink.USDT_USD.abi, mainContracts.chainLink.USDT_USD.address); - } else { - usdtToUsdPriceFeedContract = new archiveNodeWeb3.eth.Contract(testContracts.chainLink.USDT_USD.abi, testContracts.chainLink.USDT_USD.address); - } - - const usdtToUsdPrice = await getPriceFromChainLink(usdtToUsdPriceFeedContract); - const pool = await vaultContract.methods.getTotalValueInPool().call(); - const totalSupply = await vaultContract.methods.totalSupply().call(); - const poolInUSD = (pool * usdtToUsdPrice) / (10 ** 20); // The reason to divide 20: pool in 18 , price feed in 8 , ( 18 + 8 ) / 20 = 6 decimals - - depositedAmount = (depositedShares * poolInUSD) / totalSupply; + depositedAmount = await vaultContract.methods.depositedAmount(userAddress).call(); depositedAmount = new BigNumber(depositedAmount); } @@ -190,8 +164,10 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => totalWithdrawalsInUSD = getSumForUSD(withdrawals); totalTransferredInUSD = getSumForUSD(transfersIn); totalTransferredOutInUSD = getSumForUSD(transfersOut); - - let exactDepositedAmount = depositedAmount / 10 ** 6; + + const decimals = (type === "daoFaang") ? 18 : 6; + + let exactDepositedAmount = depositedAmount / 10 ** decimals; exactDepositedAmount = new BigNumber(exactDepositedAmount); earnings = exactDepositedAmount .minus(totalDepositsInUSD) diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 2915b31..7382e48 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -198,7 +198,7 @@ module.exports = [ description: "DAO Vault Stonks for 3 stablecoins", vaultSymbol: "daoSTO", erc20address: ["0x07de306ff27a2b630b1141956844eb1552b956b5", "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa"], - vaultContractAddress: "0xe97f5e5a755f8e633d23a2bae167b628dec22948", + vaultContractAddress: "0xf03fa8553379d872b4e2Bafbc679409Fb82604c2", vaultContractABI: abi.daoFaangStonkVaultContract, balance: 0, vaultBalance: 0, From 02122c02938da526c140fa62ee2d0021cbced9e1 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Mon, 28 Jun 2021 20:11:35 +0800 Subject: [PATCH 130/254] Update implementation for deposited amount FAANG. (cherry picked from commit 38ffe2a45f5da736bf06a10cd3aaca318dfb1f34) --- config/serverless/domain.js | 8 +++++ services/user/vaults/statistics/handler.js | 34 ++++++++++++++++++---- services/vaults/apy/save/vaults.js | 2 +- 3 files changed, 38 insertions(+), 6 deletions(-) diff --git a/config/serverless/domain.js b/config/serverless/domain.js index fb1acfa..f0c1e46 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -226,6 +226,10 @@ const testContracts = { USDT_ETH: { address: "0x0bF499444525a23E7Bb61997539725cA2e928138", abi: abi.eacAggregatoorProxyContract, + }, + USDT_USD: { + address: "0x2ca5A90D34cA333661083F89D831f757A9A50148", + abi: abi.eacAggregatoorProxyContract, } } }; @@ -428,6 +432,10 @@ const mainContracts = { USDT_ETH: { address: "0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46", abi: abi.eacAggregatoorProxyContract, + }, + USDT_USD: { + address: "0x3E7d1eAB13ad0104d2750B8863b489D65364e32D", + abi: abi.eacAggregatoorProxyContract, } } }; diff --git a/services/user/vaults/statistics/handler.js b/services/user/vaults/statistics/handler.js index e9acfe3..c07a3a0 100644 --- a/services/user/vaults/statistics/handler.js +++ b/services/user/vaults/statistics/handler.js @@ -7,6 +7,9 @@ const BigNumber = require("bignumber.js"); const subgraphUrl = process.env.SUBGRAPH_ENDPOINT; const Web3 = require("web3"); const web3 = new Web3(process.env.WEB3_ENDPOINT); +const archiveNodeUrl = process.env.ARCHIVENODE_ENDPOINT; +const archiveNodeWeb3 = new Web3(archiveNodeUrl); +const delay = require("delay"); const earnABIContract = require('../../../../config/abi').earnABIContract; const vaultABIContract = require('../../../../config/abi').vaultABIContract; const yfUSDTABIContract = require('../../../../config/abi').yfUSDTABIContract; @@ -60,6 +63,16 @@ const getTotalSupply = async (contract) => { return totalSupply; }; +// Get USDT <-> USD Price +const getPriceFromChainLink = async (contract) => { + let price = 0; + try { + price = await contract.methods.latestAnswer().call(); + } catch (ex) { } + await delay(500); + return price; +}; + const getVaultStatistics = async (contractAddress, transactions, userAddress) => { const findVault = (vault) => { if (vault.vaultAddress == null) return false; @@ -113,7 +126,20 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => depositedAmount = await strategyContract.methods.getCurrentBalance(userAddress).call(); depositedAmount = new BigNumber(depositedAmount); } else if (type === 'daoFaang') { - depositedAmount = await vaultContract.methods.depositedAmount(userAddress).call(); + + let usdtToUsdPriceFeedContract; + if (process.env.PRODUCTION != '') { + usdtToUsdPriceFeedContract = new archiveNodeWeb3.eth.Contract(mainContracts.chainLink.USDT_USD.abi, mainContracts.chainLink.USDT_USD.address); + } else { + usdtToUsdPriceFeedContract = new archiveNodeWeb3.eth.Contract(testContracts.chainLink.USDT_USD.abi, testContracts.chainLink.USDT_USD.address); + } + + const usdtToUsdPrice = await getPriceFromChainLink(usdtToUsdPriceFeedContract); + const pool = await vaultContract.methods.getTotalValueInPool().call(); + const totalSupply = await vaultContract.methods.totalSupply().call(); + const poolInUSD = (pool * usdtToUsdPrice) / (10 ** 20); // The reason to divide 20: pool in 18 , price feed in 8 , ( 18 + 8 ) / 20 = 6 decimals + + depositedAmount = (depositedShares * poolInUSD) / totalSupply; depositedAmount = new BigNumber(depositedAmount); } @@ -164,10 +190,8 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => totalWithdrawalsInUSD = getSumForUSD(withdrawals); totalTransferredInUSD = getSumForUSD(transfersIn); totalTransferredOutInUSD = getSumForUSD(transfersOut); - - const decimals = (type === "daoFaang") ? 18 : 6; - - let exactDepositedAmount = depositedAmount / 10 ** decimals; + + let exactDepositedAmount = depositedAmount / 10 ** 6; exactDepositedAmount = new BigNumber(exactDepositedAmount); earnings = exactDepositedAmount .minus(totalDepositsInUSD) diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 7382e48..2915b31 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -198,7 +198,7 @@ module.exports = [ description: "DAO Vault Stonks for 3 stablecoins", vaultSymbol: "daoSTO", erc20address: ["0x07de306ff27a2b630b1141956844eb1552b956b5", "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa"], - vaultContractAddress: "0xf03fa8553379d872b4e2Bafbc679409Fb82604c2", + vaultContractAddress: "0xe97f5e5a755f8e633d23a2bae167b628dec22948", vaultContractABI: abi.daoFaangStonkVaultContract, balance: 0, vaultBalance: 0, From c48bf38f96a1ace743a227caeea77ec0ffdf926d Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Mon, 28 Jun 2021 21:10:53 +0800 Subject: [PATCH 131/254] Update returned message for Happy Hour API. --- services/user/special-event/handler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/user/special-event/handler.js b/services/user/special-event/handler.js index 2816bf9..321cdd1 100644 --- a/services/user/special-event/handler.js +++ b/services/user/special-event/handler.js @@ -26,12 +26,12 @@ const checkEligibilityForEvent = async(amount) => { result.amountAboveThreshold = false, result.happyHour = true, result.happyHourInfo = event; - result.message = "Your Deposit amount is not eligible for Gas-free Deposit. Minimum Deposit amount for gas-free deposits is " + event.threshold + "." + result.message = "Below required deposit (" + event.threshold + ") for Happy Hour. Gas fee will be required." return result; } result.happyHourInfo = event; - result.message = "Congratulations! You’re about to make a gas-free transaction! Proceed to Sign the transaction."; + result.message = "Gas fee is on us!"; return result; } From 1aa06dd973cf943e7b36b044f3ae11a42be9eaef Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Mon, 28 Jun 2021 21:43:20 +0800 Subject: [PATCH 132/254] Updated daoElo --- config/serverless/domain.js | 4 ++-- services/vaults/apy/save/vaults.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/serverless/domain.js b/config/serverless/domain.js index f4302a2..ad81dc1 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -325,9 +325,9 @@ const mainContracts = { tokenId: ["tether", "usd-coin", "dai"], }, daoELO: { - address: "", // TODO Update on mainnet + address: "0x2d9a136cf87d599628bcbdfb6c4fe75acd2a0aa8", abi: abi.elonApeVaultContract, - strategyAddress: "", // TODO Update on mainnet + strategyAddress: "0x24d281dcc7d435500669459eaa393dc5200595b1", strategyABI: abi.elonApeStrategyContract, contractType: "elon", tokenId: ["tether", "usd-coin", "dai"], diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index d973cb2..c4c0770 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -176,8 +176,8 @@ module.exports = [ symbol: ["USDT","USDC","DAI"], description: "DAO Vault Elon for 3 stablecoins", vaultSymbol: "daoELO", - erc20address: ["0x07de306ff27a2b630b1141956844eb1552b956b5", "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa"], - vaultContractAddress: "0xf03fa8553379d872b4e2Bafbc679409Fb82604c2", + erc20address: ["0xdac17f958d2ee523a2206206994597c13d831ec7", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0x6b175474e89094c44da98b954eedeac495271d0f"], + vaultContractAddress: "0x2d9a136cf87d599628bcbdfb6c4fe75acd2a0aa8", vaultContractABI: abi.elonApeVaultContract, balance: 0, vaultBalance: 0, @@ -186,7 +186,7 @@ module.exports = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 25413059, + lastMeasurement: 12722655, measurement: 1e18, price_id: ["tether", "usd-coin", "dai"], isElon: true, From e32bad8bf71691783a778b035a9d5554dc39d1d1 Mon Sep 17 00:00:00 2001 From: coco50511 Date: Tue, 29 Jun 2021 18:01:28 +0800 Subject: [PATCH 133/254] Fixed the errors of Elon's APR and TVL --- config/serverless/domain.js | 6 +- package-lock.json | 4649 ----------------- scripts/initial.js | 4 +- services/vaults/apy/save/handler.js | 7 +- services/vaults/apy/save/historical-handle.js | 24 +- services/vaults/apy/save/vaults.js | 286 +- services/vaults/tvl/handler.js | 24 +- yarn.lock | 1046 +++- 8 files changed, 1132 insertions(+), 4914 deletions(-) delete mode 100644 package-lock.json diff --git a/config/serverless/domain.js b/config/serverless/domain.js index d37ba2f..b3ff6ed 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -325,7 +325,7 @@ const mainContracts = { tokenId: "dai", }, daoCDV: { - address: "", // TODO Update on mainnet + address: "0x8fe826cc1225b03aa06477ad5af745aed5fe7066", // TODO Update on mainnet abi: abi.citadelABIContract, strategyAddress: "", // TODO Update on mainnet strategyABI: abi.citadelStrategyABIContract, @@ -333,9 +333,9 @@ const mainContracts = { tokenId: ["tether", "usd-coin", "dai"], }, daoELO: { - address: "", // TODO Update on mainnet + address: "0x2d9a136cf87d599628bcbdfb6c4fe75acd2a0aa8", // TODO Update on mainnet abi: abi.elonApeVaultContract, - strategyAddress: "", // TODO Update on mainnet + strategyAddress: "0x8a00046ab28051a952e64a886cd8961ca90a59bd", // TODO Update on mainnet strategyABI: abi.elonApeStrategyContract, contractType: "elon", tokenId: ["tether", "usd-coin", "dai"], diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index bd996b2..0000000 --- a/package-lock.json +++ /dev/null @@ -1,4649 +0,0 @@ -{ - "name": "yearn-api", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@ethersproject/abi": { - "version": "5.0.0-beta.153", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.0-beta.153.tgz", - "integrity": "sha512-aXweZ1Z7vMNzJdLpR1CZUAIgnwjrZeUSvN9syCwlBaEBUFJmFY+HHnfuTI5vIhVs/mRkfJVrbEyl51JZQqyjAg==", - "requires": { - "@ethersproject/address": ">=5.0.0-beta.128", - "@ethersproject/bignumber": ">=5.0.0-beta.130", - "@ethersproject/bytes": ">=5.0.0-beta.129", - "@ethersproject/constants": ">=5.0.0-beta.128", - "@ethersproject/hash": ">=5.0.0-beta.128", - "@ethersproject/keccak256": ">=5.0.0-beta.127", - "@ethersproject/logger": ">=5.0.0-beta.129", - "@ethersproject/properties": ">=5.0.0-beta.131", - "@ethersproject/strings": ">=5.0.0-beta.130" - } - }, - "@ethersproject/address": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.4.tgz", - "integrity": "sha512-CIjAeG6zNehbpJTi0sgwUvaH2ZICiAV9XkCBaFy5tjuEVFpQNeqd6f+B7RowcNO7Eut+QbhcQ5CVLkmP5zhL9A==", - "requires": { - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/rlp": "^5.0.3", - "bn.js": "^4.4.0" - } - }, - "@ethersproject/bignumber": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.7.tgz", - "integrity": "sha512-wwKgDJ+KA7IpgJwc8Fc0AjKIRuDskKA2cque29/+SgII9/1K/38JpqVNPKIovkLwTC2DDofIyzHcxeaKpMFouQ==", - "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", - "bn.js": "^4.4.0" - } - }, - "@ethersproject/bytes": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.4.tgz", - "integrity": "sha512-9R6A6l9JN8x1U4s1dJCR+9h3MZTT3xQofr/Xx8wbDvj6NnY4CbBB0o8ZgHXvR74yV90pY2EzCekpkMBJnRzkSw==", - "requires": { - "@ethersproject/logger": "^5.0.5" - } - }, - "@ethersproject/constants": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.4.tgz", - "integrity": "sha512-Df32lcXDHPgZRPgp1dgmByNbNe4Ki1QoXR+wU61on5nggQGTqWR1Bb7pp9VtI5Go9kyE/JflFc4Te6o9MvYt8A==", - "requires": { - "@ethersproject/bignumber": "^5.0.7" - } - }, - "@ethersproject/hash": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.4.tgz", - "integrity": "sha512-VCs/bFBU8AQFhHcT1cQH6x7a4zjulR6fJmAOcPxUgrN7bxOQ7QkpBKF+YCDJhFtkLdaljIsr/r831TuWU4Ysfg==", - "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/strings": "^5.0.4" - } - }, - "@ethersproject/keccak256": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.3.tgz", - "integrity": "sha512-VhW3mgZMBZlETV6AyOmjNeNG+Pg68igiKkPpat8/FZl0CKnfgQ+KZQZ/ee1vT+X0IUM8/djqnei6btmtbA27Ug==", - "requires": { - "@ethersproject/bytes": "^5.0.4", - "js-sha3": "0.5.7" - }, - "dependencies": { - "js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" - } - } - }, - "@ethersproject/logger": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.5.tgz", - "integrity": "sha512-gJj72WGzQhUtCk6kfvI8elTaPOQyMvrMghp/nbz0ivTo39fZ7IjypFh/ySDeUSdBNplAwhzWKKejQhdpyefg/w==" - }, - "@ethersproject/properties": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.3.tgz", - "integrity": "sha512-wLCSrbywkQgTO6tIF9ZdKsH9AIxPEqAJF/z5xcPkz1DK4mMAZgAXRNw1MrKYhyb+7CqNHbj3vxenNKFavGY/IA==", - "requires": { - "@ethersproject/logger": "^5.0.5" - } - }, - "@ethersproject/rlp": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.3.tgz", - "integrity": "sha512-Hz4yyA/ilGafASAqtTlLWkA/YqwhQmhbDAq2LSIp1AJNx+wtbKWFAKSckpeZ+WG/xZmT+fw5OFKK7a5IZ4DR5g==", - "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5" - } - }, - "@ethersproject/signing-key": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.4.tgz", - "integrity": "sha512-I6pJoga1IvhtjYK5yXzCjs4ZpxrVbt9ZRAlpEw0SW9UuV020YfJH5EIVEGR2evdRceS3nAQIggqbsXSkP8Y1Dg==", - "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "elliptic": "6.5.3" - } - }, - "@ethersproject/strings": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.4.tgz", - "integrity": "sha512-azXFHaNkDXzefhr4LVVzzDMFwj3kH9EOKlATu51HjxabQafuUyVLPFgmxRFmCynnAi0Bmmp7nr+qK1pVDgRDLQ==", - "requires": { - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/logger": "^5.0.5" - } - }, - "@ethersproject/transactions": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.5.tgz", - "integrity": "sha512-1Ga/QmbcB74DItggP8/DK1tggu4ErEvwTkIwIlUXUcvIAuRNXXE7kgQhlp+w1xA/SAQFhv56SqCoyqPiiLCvVA==", - "requires": { - "@ethersproject/address": "^5.0.4", - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "@ethersproject/rlp": "^5.0.3", - "@ethersproject/signing-key": "^5.0.4" - } - }, - "@hapi/accept": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@hapi/accept/-/accept-3.2.4.tgz", - "integrity": "sha512-soThGB+QMgfxlh0Vzhzlf3ZOEOPk5biEwcOXhkF0Eedqx8VnhGiggL9UYHrIsOb1rUg3Be3K8kp0iDL2wbVSOQ==", - "dev": true, - "requires": { - "@hapi/boom": "7.x.x", - "@hapi/hoek": "8.x.x" - } - }, - "@hapi/address": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz", - "integrity": "sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ==", - "dev": true - }, - "@hapi/ammo": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@hapi/ammo/-/ammo-3.1.2.tgz", - "integrity": "sha512-ej9OtFmiZv1qr45g1bxEZNGyaR4jRpyMxU6VhbxjaYThymvOwsyIsUKMZnP5Qw2tfYFuwqCJuIBHGpeIbdX9gQ==", - "dev": true, - "requires": { - "@hapi/hoek": "8.x.x" - } - }, - "@hapi/b64": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@hapi/b64/-/b64-4.2.1.tgz", - "integrity": "sha512-zqHpQuH5CBMw6hADzKfU/IGNrxq1Q+/wTYV+OiZRQN9F3tMyk+9BUMeBvFRMamduuqL8iSp62QAnJ+7ATiYLWA==", - "dev": true, - "requires": { - "@hapi/hoek": "8.x.x" - } - }, - "@hapi/boom": { - "version": "7.4.11", - "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", - "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", - "dev": true, - "requires": { - "@hapi/hoek": "8.x.x" - } - }, - "@hapi/bounce": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@hapi/bounce/-/bounce-1.3.2.tgz", - "integrity": "sha512-3bnb1AlcEByFZnpDIidxQyw1Gds81z/1rSqlx4bIEE+wUN0ATj0D49B5cE1wGocy90Rp/de4tv7GjsKd5RQeew==", - "dev": true, - "requires": { - "@hapi/boom": "7.x.x", - "@hapi/hoek": "^8.3.1" - } - }, - "@hapi/bourne": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-1.3.2.tgz", - "integrity": "sha512-1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA==", - "dev": true - }, - "@hapi/call": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/@hapi/call/-/call-5.1.3.tgz", - "integrity": "sha512-5DfWpMk7qZiYhvBhM5oUiT4GQ/O8a2rFR121/PdwA/eZ2C1EsuD547ZggMKAR5bZ+FtxOf0fdM20zzcXzq2mZA==", - "dev": true, - "requires": { - "@hapi/boom": "7.x.x", - "@hapi/hoek": "8.x.x" - } - }, - "@hapi/catbox": { - "version": "10.2.3", - "resolved": "https://registry.npmjs.org/@hapi/catbox/-/catbox-10.2.3.tgz", - "integrity": "sha512-kN9hXO4NYyOHW09CXiuj5qW1syc/0XeVOBsNNk0Tz89wWNQE5h21WF+VsfAw3uFR8swn/Wj3YEVBnWqo82m/JQ==", - "dev": true, - "requires": { - "@hapi/boom": "7.x.x", - "@hapi/hoek": "8.x.x", - "@hapi/joi": "16.x.x", - "@hapi/podium": "3.x.x" - } - }, - "@hapi/catbox-memory": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@hapi/catbox-memory/-/catbox-memory-4.1.1.tgz", - "integrity": "sha512-T6Hdy8DExzG0jY7C8yYWZB4XHfc0v+p1EGkwxl2HoaPYAmW7I3E59M/IvmSVpis8RPcIoBp41ZpO2aZPBpM2Ww==", - "dev": true, - "requires": { - "@hapi/boom": "7.x.x", - "@hapi/hoek": "8.x.x" - } - }, - "@hapi/content": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@hapi/content/-/content-4.1.1.tgz", - "integrity": "sha512-3TWvmwpVPxFSF3KBjKZ8yDqIKKZZIm7VurDSweYpXYENZrJH3C1hd1+qEQW9wQaUaI76pPBLGrXl6I3B7i3ipA==", - "dev": true, - "requires": { - "@hapi/boom": "7.x.x" - } - }, - "@hapi/cryptiles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@hapi/cryptiles/-/cryptiles-4.2.1.tgz", - "integrity": "sha512-XoqgKsHK0l/VpqPs+tr6j6vE+VQ3+2bkF2stvttmc7xAOf1oSAwHcJ0tlp/6MxMysktt1IEY0Csy3khKaP9/uQ==", - "dev": true, - "requires": { - "@hapi/boom": "7.x.x" - } - }, - "@hapi/file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@hapi/file/-/file-1.0.0.tgz", - "integrity": "sha512-Bsfp/+1Gyf70eGtnIgmScvrH8sSypO3TcK3Zf0QdHnzn/ACnAkI6KLtGACmNRPEzzIy+W7aJX5E+1fc9GwIABQ==", - "dev": true - }, - "@hapi/formula": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@hapi/formula/-/formula-1.2.0.tgz", - "integrity": "sha512-UFbtbGPjstz0eWHb+ga/GM3Z9EzqKXFWIbSOFURU0A/Gku0Bky4bCk9/h//K2Xr3IrCfjFNhMm4jyZ5dbCewGA==", - "dev": true - }, - "@hapi/h2o2": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/@hapi/h2o2/-/h2o2-8.3.2.tgz", - "integrity": "sha512-2WkZq+QAkvYHWGqnUuG0stcVeGyv9T7bopBYnCJSUEuvBZlUf2BTX2JCVSKxsnTLOxCYwoC/aI4Rr0ZSRd2oVg==", - "dev": true, - "requires": { - "@hapi/boom": "7.x.x", - "@hapi/hoek": "8.x.x", - "@hapi/joi": "16.x.x", - "@hapi/wreck": "15.x.x" - } - }, - "@hapi/hapi": { - "version": "18.4.1", - "resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-18.4.1.tgz", - "integrity": "sha512-9HjVGa0Z4Qv9jk9AVoUdJMQLA+KuZ+liKWyEEkVBx3e3H1F0JM6aGbPkY9jRfwsITBWGBU2iXazn65SFKSi/tg==", - "dev": true, - "requires": { - "@hapi/accept": "^3.2.4", - "@hapi/ammo": "^3.1.2", - "@hapi/boom": "7.x.x", - "@hapi/bounce": "1.x.x", - "@hapi/call": "^5.1.3", - "@hapi/catbox": "10.x.x", - "@hapi/catbox-memory": "4.x.x", - "@hapi/heavy": "6.x.x", - "@hapi/hoek": "8.x.x", - "@hapi/joi": "15.x.x", - "@hapi/mimos": "4.x.x", - "@hapi/podium": "3.x.x", - "@hapi/shot": "4.x.x", - "@hapi/somever": "2.x.x", - "@hapi/statehood": "6.x.x", - "@hapi/subtext": "^6.1.3", - "@hapi/teamwork": "3.x.x", - "@hapi/topo": "3.x.x" - }, - "dependencies": { - "@hapi/joi": { - "version": "15.1.1", - "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-15.1.1.tgz", - "integrity": "sha512-entf8ZMOK8sc+8YfeOlM8pCfg3b5+WZIKBfUaaJT8UsjAAPjartzxIYm3TIbjvA4u+u++KbcXD38k682nVHDAQ==", - "dev": true, - "requires": { - "@hapi/address": "2.x.x", - "@hapi/bourne": "1.x.x", - "@hapi/hoek": "8.x.x", - "@hapi/topo": "3.x.x" - } - } - } - }, - "@hapi/heavy": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/@hapi/heavy/-/heavy-6.2.2.tgz", - "integrity": "sha512-PY1dCCO6dsze7RlafIRhTaGeyTgVe49A/lSkxbhKGjQ7x46o/OFf7hLiRqTCDh3atcEKf6362EaB3+kTUbCsVA==", - "dev": true, - "requires": { - "@hapi/boom": "7.x.x", - "@hapi/hoek": "8.x.x", - "@hapi/joi": "16.x.x" - } - }, - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==", - "dev": true - }, - "@hapi/iron": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/@hapi/iron/-/iron-5.1.4.tgz", - "integrity": "sha512-+ElC+OCiwWLjlJBmm8ZEWjlfzTMQTdgPnU/TsoU5QsktspIWmWi9IU4kU83nH+X/SSya8TP8h8P11Wr5L7dkQQ==", - "dev": true, - "requires": { - "@hapi/b64": "4.x.x", - "@hapi/boom": "7.x.x", - "@hapi/bourne": "1.x.x", - "@hapi/cryptiles": "4.x.x", - "@hapi/hoek": "8.x.x" - } - }, - "@hapi/joi": { - "version": "16.1.8", - "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-16.1.8.tgz", - "integrity": "sha512-wAsVvTPe+FwSrsAurNt5vkg3zo+TblvC5Bb1zMVK6SJzZqw9UrJnexxR+76cpePmtUZKHAPxcQ2Bf7oVHyahhg==", - "dev": true, - "requires": { - "@hapi/address": "^2.1.2", - "@hapi/formula": "^1.2.0", - "@hapi/hoek": "^8.2.4", - "@hapi/pinpoint": "^1.0.2", - "@hapi/topo": "^3.1.3" - } - }, - "@hapi/mimos": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@hapi/mimos/-/mimos-4.1.1.tgz", - "integrity": "sha512-CXoi/zfcTWfKYX756eEea8rXJRIb9sR4d7VwyAH9d3BkDyNgAesZxvqIdm55npQc6S9mU3FExinMAQVlIkz0eA==", - "dev": true, - "requires": { - "@hapi/hoek": "8.x.x", - "mime-db": "1.x.x" - } - }, - "@hapi/nigel": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@hapi/nigel/-/nigel-3.1.1.tgz", - "integrity": "sha512-R9YWx4S8yu0gcCBrMUDCiEFm1SQT895dMlYoeNBp8I6YhF1BFF1iYPueKA2Kkp9BvyHdjmvrxCOns7GMmpl+Fw==", - "dev": true, - "requires": { - "@hapi/hoek": "8.x.x", - "@hapi/vise": "3.x.x" - } - }, - "@hapi/pez": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@hapi/pez/-/pez-4.1.2.tgz", - "integrity": "sha512-8zSdJ8cZrJLFldTgwjU9Fb1JebID+aBCrCsycgqKYe0OZtM2r3Yv3aAwW5z97VsZWCROC1Vx6Mdn4rujh5Ktcg==", - "dev": true, - "requires": { - "@hapi/b64": "4.x.x", - "@hapi/boom": "7.x.x", - "@hapi/content": "^4.1.1", - "@hapi/hoek": "8.x.x", - "@hapi/nigel": "3.x.x" - } - }, - "@hapi/pinpoint": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@hapi/pinpoint/-/pinpoint-1.0.2.tgz", - "integrity": "sha512-dtXC/WkZBfC5vxscazuiJ6iq4j9oNx1SHknmIr8hofarpKUZKmlUVYVIhNVzIEgK5Wrc4GMHL5lZtt1uS2flmQ==", - "dev": true - }, - "@hapi/podium": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/@hapi/podium/-/podium-3.4.3.tgz", - "integrity": "sha512-QJlnYLEYZWlKQ9fSOtuUcpANyoVGwT68GA9P0iQQCAetBK0fI+nbRBt58+aMixoifczWZUthuGkNjqKxgPh/CQ==", - "dev": true, - "requires": { - "@hapi/hoek": "8.x.x", - "@hapi/joi": "16.x.x" - } - }, - "@hapi/shot": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@hapi/shot/-/shot-4.1.2.tgz", - "integrity": "sha512-6LeHLjvsq/bQ0R+fhEyr7mqExRGguNTrxFZf5DyKe3CK6pNabiGgYO4JVFaRrLZ3JyuhkS0fo8iiRE2Ql2oA/A==", - "dev": true, - "requires": { - "@hapi/hoek": "8.x.x", - "@hapi/joi": "16.x.x" - } - }, - "@hapi/somever": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@hapi/somever/-/somever-2.1.1.tgz", - "integrity": "sha512-cic5Sto4KGd9B0oQSdKTokju+rYhCbdpzbMb0EBnrH5Oc1z048hY8PaZ1lx2vBD7I/XIfTQVQetBH57fU51XRA==", - "dev": true, - "requires": { - "@hapi/bounce": "1.x.x", - "@hapi/hoek": "8.x.x" - } - }, - "@hapi/statehood": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@hapi/statehood/-/statehood-6.1.2.tgz", - "integrity": "sha512-pYXw1x6npz/UfmtcpUhuMvdK5kuOGTKcJNfLqdNptzietK2UZH5RzNJSlv5bDHeSmordFM3kGItcuQWX2lj2nQ==", - "dev": true, - "requires": { - "@hapi/boom": "7.x.x", - "@hapi/bounce": "1.x.x", - "@hapi/bourne": "1.x.x", - "@hapi/cryptiles": "4.x.x", - "@hapi/hoek": "8.x.x", - "@hapi/iron": "5.x.x", - "@hapi/joi": "16.x.x" - } - }, - "@hapi/subtext": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/@hapi/subtext/-/subtext-6.1.3.tgz", - "integrity": "sha512-qWN6NbiHNzohVcJMeAlpku/vzbyH4zIpnnMPMPioQMwIxbPFKeNViDCNI6fVBbMPBiw/xB4FjqiJkRG5P9eWWg==", - "dev": true, - "requires": { - "@hapi/boom": "7.x.x", - "@hapi/bourne": "1.x.x", - "@hapi/content": "^4.1.1", - "@hapi/file": "1.x.x", - "@hapi/hoek": "8.x.x", - "@hapi/pez": "^4.1.2", - "@hapi/wreck": "15.x.x" - } - }, - "@hapi/teamwork": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@hapi/teamwork/-/teamwork-3.3.1.tgz", - "integrity": "sha512-61tiqWCYvMKP7fCTXy0M4VE6uNIwA0qvgFoiDubgfj7uqJ0fdHJFQNnVPGrxhLWlwz0uBPWrQlBH7r8y9vFITQ==", - "dev": true - }, - "@hapi/topo": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.6.tgz", - "integrity": "sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ==", - "dev": true, - "requires": { - "@hapi/hoek": "^8.3.0" - } - }, - "@hapi/vise": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@hapi/vise/-/vise-3.1.1.tgz", - "integrity": "sha512-OXarbiCSadvtg+bSdVPqu31Z1JoBL+FwNYz3cYoBKQ5xq1/Cr4A3IkGpAZbAuxU5y4NL5pZFZG3d2a3ZGm/dOQ==", - "dev": true, - "requires": { - "@hapi/hoek": "8.x.x" - } - }, - "@hapi/wreck": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/@hapi/wreck/-/wreck-15.1.0.tgz", - "integrity": "sha512-tQczYRTTeYBmvhsek/D49En/5khcShaBEmzrAaDjMrFXKJRuF8xA8+tlq1ETLBFwGd6Do6g2OC74rt11kzawzg==", - "dev": true, - "requires": { - "@hapi/boom": "7.x.x", - "@hapi/bourne": "1.x.x", - "@hapi/hoek": "8.x.x" - } - }, - "@sindresorhus/is": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==" - }, - "@szmarczak/http-timer": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", - "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", - "requires": { - "defer-to-connect": "^1.0.1" - } - }, - "@types/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", - "requires": { - "@types/node": "*" - } - }, - "@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", - "dev": true - }, - "@types/node": { - "version": "12.12.62", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.62.tgz", - "integrity": "sha512-qAfo81CsD7yQIM9mVyh6B/U47li5g7cfpVQEDMfQeF8pSZVwzbhwU3crc0qG4DmpsebpJPR49AKOExQyJ05Cpg==" - }, - "@types/pbkdf2": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", - "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", - "requires": { - "@types/node": "*" - } - }, - "@types/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", - "dev": true - }, - "@types/secp256k1": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.1.tgz", - "integrity": "sha512-+ZjSA8ELlOp8SlKi0YLB2tz9d5iPNEmOBd+8Rz21wTMdaXQIa9b6TEnD6l5qKOCypE7FSyPyck12qZJxSDNoog==", - "requires": { - "@types/node": "*" - } - }, - "accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", - "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" - } - }, - "ajv": { - "version": "6.12.5", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.5.tgz", - "integrity": "sha512-lRF8RORchjpKG50/WFf8xmg7sgCLFiYNNnqdKflk63whMQcWR5ngGjiSXkL9bjxy6B2npOK2HSMN49jEBMSkag==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-align": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz", - "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==", - "dev": true, - "requires": { - "string-width": "^3.0.0" - }, - "dependencies": { - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - } - } - }, - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "dev": true, - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "asn1.js": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", - "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "safer-buffer": "^2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - }, - "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", - "dev": true, - "requires": { - "lodash": "^4.17.14" - } - }, - "async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "aws-sdk": { - "version": "2.751.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.751.0.tgz", - "integrity": "sha512-0lo7YKTfjEwoP+2vK7F7WGNigvwFxqiM96PzBaseOpOelfhFHPKEJpk2Poa12JI89c8dGoc1PhTQ1TSTJK3ZqQ==", - "dev": true, - "requires": { - "buffer": "4.9.2", - "events": "1.1.1", - "ieee754": "1.1.13", - "jmespath": "0.15.0", - "querystring": "0.2.0", - "sax": "1.2.1", - "url": "0.10.3", - "uuid": "3.3.2", - "xml2js": "0.4.19" - }, - "dependencies": { - "buffer": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", - "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", - "dev": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true - } - } - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" - }, - "aws4": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz", - "integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==" - }, - "axios": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.0.tgz", - "integrity": "sha512-fmkJBknJKoZwem3/IKSSLpkdNXZeBu5Q7GA/aRsr2btgrptmSCxi2oFjZHqGdK9DoTil9PIHlPIZw2EcRJXRvw==", - "requires": { - "follow-redirects": "^1.10.0" - } - }, - "base-x": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", - "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "bignumber": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/bignumber/-/bignumber-1.1.0.tgz", - "integrity": "sha1-5qsKdD2l8+oBjlwXWX0SH3howVk=" - }, - "bignumber.js": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", - "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==" - }, - "bl": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", - "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", - "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "blakejs": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.0.tgz", - "integrity": "sha1-ad+S75U6qIylGjLfarHFShVfx6U=" - }, - "bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" - }, - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" - }, - "body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", - "requires": { - "bytes": "3.1.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" - } - }, - "boxen": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz", - "integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==", - "dev": true, - "requires": { - "ansi-align": "^3.0.0", - "camelcase": "^5.3.1", - "chalk": "^3.0.0", - "cli-boxes": "^2.2.0", - "string-width": "^4.1.0", - "term-size": "^2.1.0", - "type-fest": "^0.8.1", - "widest-line": "^3.1.0" - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" - } - }, - "browserify-sign": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", - "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", - "requires": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "elliptic": "^6.5.3", - "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "dependencies": { - "bn.js": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz", - "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==" - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - } - } - }, - "bs58": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", - "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", - "requires": { - "base-x": "^3.0.2" - } - }, - "bs58check": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", - "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", - "requires": { - "bs58": "^4.0.0", - "create-hash": "^1.1.0", - "safe-buffer": "^5.1.2" - } - }, - "bson": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.5.tgz", - "integrity": "sha512-kDuEzldR21lHciPQAIulLs1LZlCXdLziXI6Mb/TDkwXhb//UORJNPXgcRs2CuO4H0DcMkpfT3/ySsP3unoZjBg==" - }, - "buffer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", - "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - }, - "buffer-equal-constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=", - "dev": true - }, - "buffer-to-arraybuffer": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", - "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=" - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" - }, - "bufferutil": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.1.tgz", - "integrity": "sha512-xowrxvpxojqkagPcWRQVXZl0YXhRhAtBEIq3VoER1NH5Mw1n1o0ojdspp+GS2J//2gCVyrzQDApQ4unGF+QOoA==", - "requires": { - "node-gyp-build": "~3.7.0" - } - }, - "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" - }, - "cacheable-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", - "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", - "requires": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^3.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", - "responselike": "^1.0.2" - }, - "dependencies": { - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "requires": { - "pump": "^3.0.0" - } - }, - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==" - } - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" - }, - "chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" - }, - "ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", - "dev": true - }, - "cids": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz", - "integrity": "sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==", - "requires": { - "buffer": "^5.5.0", - "class-is": "^1.1.0", - "multibase": "~0.6.0", - "multicodec": "^1.0.0", - "multihashes": "~0.4.15" - }, - "dependencies": { - "multicodec": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", - "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==", - "requires": { - "buffer": "^5.6.0", - "varint": "^5.0.0" - } - } - } - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "class-is": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", - "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==" - }, - "clear-module": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/clear-module/-/clear-module-4.1.1.tgz", - "integrity": "sha512-ng0E7LeODcT3QkazOckzZqbca+JByQy/Q2Z6qO24YsTp+pLxCfohGz2gJYJqZS0CWTX3LEUiHOqe5KlYeUbEMw==", - "dev": true, - "requires": { - "parent-module": "^2.0.0", - "resolve-from": "^5.0.0" - } - }, - "cli-boxes": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", - "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", - "dev": true - }, - "clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", - "requires": { - "mimic-response": "^1.0.0" - } - }, - "coingecko-api": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/coingecko-api/-/coingecko-api-1.0.10.tgz", - "integrity": "sha512-7YLLC85+daxAw5QlBWoHVBVpJRwoPr4HtwanCr8V/WRjoyHTa1Lb9DQAvv4MDJZHiz4no6HGnDQnddtjV35oRA==" - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "configstore": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", - "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", - "dev": true, - "requires": { - "dot-prop": "^5.2.0", - "graceful-fs": "^4.1.2", - "make-dir": "^3.0.0", - "unique-string": "^2.0.0", - "write-file-atomic": "^3.0.0", - "xdg-basedir": "^4.0.0" - } - }, - "content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", - "requires": { - "safe-buffer": "5.1.2" - } - }, - "content-hash": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/content-hash/-/content-hash-2.5.2.tgz", - "integrity": "sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==", - "requires": { - "cids": "^0.7.1", - "multicodec": "^0.5.5", - "multihashes": "^0.4.15" - } - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" - }, - "cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" - }, - "cookiejar": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", - "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "requires": { - "object-assign": "^4", - "vary": "^1" - } - }, - "create-ecdh": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", - "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.5.3" - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "cron-parser": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-2.16.3.tgz", - "integrity": "sha512-XNJBD1QLFeAMUkZtZQuncAAOgJFWNhBdIbwgD22hZxrcWOImBFMKgPC66GzaXpyoJs7UvYLLgPH/8BRk/7gbZg==", - "dev": true, - "requires": { - "is-nan": "^1.3.0", - "moment-timezone": "^0.5.31" - } - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, - "crypto-random-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", - "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", - "dev": true - }, - "cuid": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/cuid/-/cuid-2.1.8.tgz", - "integrity": "sha512-xiEMER6E7TlTPnDxrM4eRiC6TRgjNX9xzEZ5U/Se2YJKr7Mq4pJn/2XEHjl3STcSh96GmkHPcBXLES8M29wyyg==", - "dev": true - }, - "d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", - "requires": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" - }, - "decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "requires": { - "mimic-response": "^1.0.0" - } - }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true - }, - "defer-to-connect": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", - "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==" - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, - "delay": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/delay/-/delay-4.4.0.tgz", - "integrity": "sha512-txgOrJu3OdtOfTiEOT2e76dJVfG/1dz2NZ4F0Pyt4UGZJryssMRp5vdM5wQoLwSOBNdrJv3F9PAhp/heqd7vrA==" - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "denque": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/denque/-/denque-1.4.1.tgz", - "integrity": "sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ==" - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" - }, - "des.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", - "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" - }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "dom-walk": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", - "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==" - }, - "dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", - "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", - "dev": true, - "requires": { - "is-obj": "^2.0.0" - } - }, - "dotenv": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", - "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==" - }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "ecdsa-sig-formatter": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", - "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" - }, - "elliptic": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", - "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "requires": { - "once": "^1.4.0" - } - }, - "es-abstract": { - "version": "1.17.6", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", - "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-regex": "^1.1.0", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "es5-ext": { - "version": "0.10.53", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", - "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", - "requires": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.3", - "next-tick": "~1.0.0" - } - }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", - "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", - "requires": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, - "escape-goat": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", - "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", - "dev": true - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" - }, - "eth-ens-namehash": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", - "integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=", - "requires": { - "idna-uts46-hx": "^2.3.1", - "js-sha3": "^0.5.7" - }, - "dependencies": { - "js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" - } - } - }, - "eth-lib": { - "version": "0.1.29", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", - "integrity": "sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==", - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "nano-json-stream-parser": "^0.1.2", - "servify": "^0.1.12", - "ws": "^3.0.0", - "xhr-request-promise": "^0.1.2" - } - }, - "ethereum-bloom-filters": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.7.tgz", - "integrity": "sha512-cDcJJSJ9GMAcURiAWO3DxIEhTL/uWqlQnvgKpuYQzYPrt/izuGU+1ntQmHt0IRq6ADoSYHFnB+aCEFIldjhkMQ==", - "requires": { - "js-sha3": "^0.8.0" - } - }, - "ethereum-cryptography": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", - "requires": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" - } - }, - "ethereumjs-common": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz", - "integrity": "sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA==" - }, - "ethereumjs-tx": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", - "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", - "requires": { - "ethereumjs-common": "^1.5.0", - "ethereumjs-util": "^6.0.0" - } - }, - "ethereumjs-util": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", - "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", - "requires": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.3" - } - }, - "ethjs-unit": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", - "integrity": "sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk=", - "requires": { - "bn.js": "4.11.6", - "number-to-bn": "1.7.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" - } - } - }, - "ethjs-util": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", - "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", - "requires": { - "is-hex-prefixed": "1.0.0", - "strip-hex-prefix": "1.0.0" - } - }, - "eventemitter3": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", - "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==" - }, - "events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", - "dev": true - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "execa": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/execa/-/execa-4.0.3.tgz", - "integrity": "sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "human-signals": "^1.1.1", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.0", - "onetime": "^5.1.0", - "signal-exit": "^3.0.2", - "strip-final-newline": "^2.0.0" - }, - "dependencies": { - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", - "dev": true - } - } - }, - "express": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", - "requires": { - "accepts": "~1.3.7", - "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", - "content-type": "~1.0.4", - "cookie": "0.4.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.1.2", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - } - }, - "ext": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", - "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", - "requires": { - "type": "^2.0.0" - }, - "dependencies": { - "type": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/type/-/type-2.1.0.tgz", - "integrity": "sha512-G9absDWvhAWCV2gmF1zKud3OyC61nZDwWvBL2DApaVFogI07CprggiQAOOjvp2NRjYWFzPyu7vwtDrQFq8jeSA==" - } - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, - "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - } - }, - "follow-redirects": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz", - "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==" - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" - }, - "fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fs-minipass": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", - "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", - "requires": { - "minipass": "^2.6.0" - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "requires": { - "pump": "^3.0.0" - } - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "global": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", - "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", - "requires": { - "min-document": "^2.19.0", - "process": "~0.5.1" - } - }, - "global-dirs": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.0.1.tgz", - "integrity": "sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A==", - "dev": true, - "requires": { - "ini": "^1.3.5" - } - }, - "got": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", - "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", - "requires": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" - } - }, - "graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" - }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "has-symbol-support-x": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", - "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==" - }, - "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", - "dev": true - }, - "has-to-string-tag-x": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", - "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", - "requires": { - "has-symbol-support-x": "^1.4.1" - } - }, - "has-yarn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", - "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", - "dev": true - }, - "hash-base": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", - "requires": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - } - } - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" - }, - "http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - } - } - }, - "http-https": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", - "integrity": "sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs=" - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "human-signals": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", - "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", - "dev": true - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "idna-uts46-hx": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", - "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", - "requires": { - "punycode": "2.1.0" - }, - "dependencies": { - "punycode": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", - "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=" - } - } - }, - "ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" - }, - "immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=", - "dev": true - }, - "import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", - "dev": true - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true - }, - "ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" - }, - "is-callable": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.1.tgz", - "integrity": "sha512-wliAfSzx6V+6WfMOmus1xy0XvSgf/dlStkvTfq7F0g4bOIW0PSUbnyse3NhDwdyYS1ozfUtAAySqTws3z9Eqgg==", - "dev": true - }, - "is-ci": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", - "dev": true, - "requires": { - "ci-info": "^2.0.0" - } - }, - "is-date-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "is-function": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", - "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==" - }, - "is-hex-prefixed": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", - "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" - }, - "is-installed-globally": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz", - "integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==", - "dev": true, - "requires": { - "global-dirs": "^2.0.1", - "is-path-inside": "^3.0.1" - } - }, - "is-nan": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.0.tgz", - "integrity": "sha512-z7bbREymOqt2CCaZVly8aC4ML3Xhfi0ekuOnjO2L8vKdl+CttdVoGZQhd4adMFAsxQ5VeRVwORs4tU8RH+HFtQ==", - "dev": true, - "requires": { - "define-properties": "^1.1.3" - } - }, - "is-negative-zero": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.0.tgz", - "integrity": "sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE=", - "dev": true - }, - "is-npm": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz", - "integrity": "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==", - "dev": true - }, - "is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", - "dev": true - }, - "is-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", - "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=" - }, - "is-path-inside": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz", - "integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==", - "dev": true - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" - }, - "is-regex": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", - "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", - "dev": true, - "requires": { - "has-symbols": "^1.0.1" - } - }, - "is-retry-allowed": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", - "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==" - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - }, - "is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", - "dev": true, - "requires": { - "has-symbols": "^1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "is-yarn-global": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", - "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "isurl": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", - "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", - "requires": { - "has-to-string-tag-x": "^1.2.0", - "is-object": "^1.0.1" - } - }, - "java-invoke-local": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/java-invoke-local/-/java-invoke-local-0.0.6.tgz", - "integrity": "sha512-gZmQKe1QrfkkMjCn8Qv9cpyJFyogTYqkP5WCobX5RNaHsJzIV/6NvAnlnouOcwKr29QrxLGDGcqYuJ+ae98s1A==", - "dev": true - }, - "jmespath": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz", - "integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=", - "dev": true - }, - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" - }, - "js-string-escape": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz", - "integrity": "sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8=", - "dev": true - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" - }, - "json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=" - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsonpath-plus": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-3.0.0.tgz", - "integrity": "sha512-WQwgWEBgn+SJU1tlDa/GiY5/ngRpa9yrSj8n4BYPHcwoxTDaMEaYCHMOn42hIHHDd3CrUoRr3+HpsK0hCKoxzA==", - "dev": true - }, - "jsonschema": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.2.6.tgz", - "integrity": "sha512-SqhURKZG07JyKKeo/ir24QnS4/BV7a6gQy93bUSe4lUdNp0QNpIz2c9elWJQ9dpc5cQYY6cvCzgRwy0MQCLyqA==", - "dev": true - }, - "jsonwebtoken": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", - "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", - "dev": true, - "requires": { - "jws": "^3.2.2", - "lodash.includes": "^4.3.0", - "lodash.isboolean": "^3.0.3", - "lodash.isinteger": "^4.0.4", - "lodash.isnumber": "^3.0.3", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.once": "^4.0.0", - "ms": "^2.1.1", - "semver": "^5.6.0" - }, - "dependencies": { - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "jszip": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.5.0.tgz", - "integrity": "sha512-WRtu7TPCmYePR1nazfrtuF216cIVon/3GWOvHS9QR5bIwSbnxtdpma6un3jyGGNhHsKCSzn5Ypk+EkDRvTGiFA==", - "dev": true, - "requires": { - "lie": "~3.3.0", - "pako": "~1.0.2", - "readable-stream": "~2.3.6", - "set-immediate-shim": "~1.0.1" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "jwa": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", - "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", - "dev": true, - "requires": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "jws": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", - "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", - "dev": true, - "requires": { - "jwa": "^1.4.1", - "safe-buffer": "^5.0.1" - } - }, - "keccak": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz", - "integrity": "sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==", - "requires": { - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0" - }, - "dependencies": { - "node-gyp-build": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz", - "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==" - } - } - }, - "keyv": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", - "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", - "requires": { - "json-buffer": "3.0.0" - } - }, - "latest-version": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", - "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", - "dev": true, - "requires": { - "package-json": "^6.3.0" - } - }, - "lie": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", - "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", - "dev": true, - "requires": { - "immediate": "~3.0.5" - } - }, - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" - }, - "lodash.includes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", - "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=", - "dev": true - }, - "lodash.isboolean": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=", - "dev": true - }, - "lodash.isinteger": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", - "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=", - "dev": true - }, - "lodash.isnumber": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", - "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=", - "dev": true - }, - "lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", - "dev": true - }, - "lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=", - "dev": true - }, - "lodash.once": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=", - "dev": true - }, - "long-timeout": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/long-timeout/-/long-timeout-0.1.1.tgz", - "integrity": "sha1-lyHXiLR+C8taJMLivuGg2lXatRQ=", - "dev": true - }, - "lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" - }, - "luxon": { - "version": "1.25.0", - "resolved": "https://registry.npmjs.org/luxon/-/luxon-1.25.0.tgz", - "integrity": "sha512-hEgLurSH8kQRjY6i4YLey+mcKVAWXbDNlZRmM6AgWDJ1cY3atl8Ztf5wEY7VBReFbmGnwQPz7KYJblL8B2k0jQ==", - "dev": true - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", - "dev": true, - "requires": { - "p-defer": "^1.0.0" - } - }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" - }, - "mem": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/mem/-/mem-6.1.1.tgz", - "integrity": "sha512-Ci6bIfq/UgcxPTYa8dQQ5FY3BzKkT894bwXWXxC/zqs0XgMO2cT20CGkOqda7gZNkmK5VP4x89IGZ6K7hfbn3Q==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.3", - "mimic-fn": "^3.0.0" - }, - "dependencies": { - "mimic-fn": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-3.1.0.tgz", - "integrity": "sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ==", - "dev": true - } - } - }, - "memory-pager": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", - "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", - "optional": true - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" - }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" - }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" - }, - "mime-db": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" - }, - "mime-types": { - "version": "2.1.27", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", - "requires": { - "mime-db": "1.44.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" - }, - "min-document": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", - "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", - "requires": { - "dom-walk": "^0.1.0" - } - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "minipass": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", - "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", - "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", - "requires": { - "minipass": "^2.9.0" - } - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" - }, - "mkdirp-promise": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", - "integrity": "sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE=", - "requires": { - "mkdirp": "*" - } - }, - "mock-fs": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.13.0.tgz", - "integrity": "sha512-DD0vOdofJdoaRNtnWcrXe6RQbpHkPPmtqGq14uRX0F8ZKJ5nv89CVTYl/BZdppDxBDaV0hl75htg3abpEWlPZA==" - }, - "moment": { - "version": "2.28.0", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.28.0.tgz", - "integrity": "sha512-Z5KOjYmnHyd/ukynmFd/WwyXHd7L4J9vTI/nn5Ap9AVUgaAE15VvQ9MOGmJJygEUklupqIrFnor/tjTwRU+tQw==" - }, - "moment-timezone": { - "version": "0.5.31", - "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.31.tgz", - "integrity": "sha512-+GgHNg8xRhMXfEbv81iDtrVeTcWt0kWmTEY1XQK14dICTXnWJnT0dxdlPspwqF3keKMVPXwayEsk1DI0AA/jdA==", - "dev": true, - "requires": { - "moment": ">= 2.9.0" - } - }, - "mongodb": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.3.tgz", - "integrity": "sha512-rOZuR0QkodZiM+UbQE5kDsJykBqWi0CL4Ec2i1nrGrUI3KO11r6Fbxskqmq3JK2NH7aW4dcccBuUujAP0ERl5w==", - "requires": { - "bl": "^2.2.1", - "bson": "^1.1.4", - "denque": "^1.4.1", - "require_optional": "^1.0.1", - "safe-buffer": "^5.1.2", - "saslprep": "^1.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "multibase": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.6.1.tgz", - "integrity": "sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==", - "requires": { - "base-x": "^3.0.8", - "buffer": "^5.5.0" - } - }, - "multicodec": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.5.7.tgz", - "integrity": "sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==", - "requires": { - "varint": "^5.0.0" - } - }, - "multihashes": { - "version": "0.4.21", - "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.21.tgz", - "integrity": "sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==", - "requires": { - "buffer": "^5.5.0", - "multibase": "^0.7.0", - "varint": "^5.0.0" - }, - "dependencies": { - "multibase": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz", - "integrity": "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==", - "requires": { - "base-x": "^3.0.8", - "buffer": "^5.5.0" - } - } - } - }, - "nano-json-stream-parser": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz", - "integrity": "sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18=" - }, - "negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" - }, - "next-tick": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", - "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" - }, - "node-addon-api": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", - "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" - }, - "node-cron": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/node-cron/-/node-cron-2.0.3.tgz", - "integrity": "sha512-eJI+QitXlwcgiZwNNSRbqsjeZMp5shyajMR81RZCqeW0ZDEj4zU9tpd4nTh/1JsBiKbF8d08FCewiipDmVIYjg==", - "requires": { - "opencollective-postinstall": "^2.0.0", - "tz-offset": "0.0.1" - } - }, - "node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" - }, - "node-gyp-build": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-3.7.0.tgz", - "integrity": "sha512-L/Eg02Epx6Si2NXmedx+Okg+4UHqmaf3TNcxd50SF9NQGcJaON3AtU++kax69XV7YWz4tUspqZSAsVofhFKG2w==" - }, - "node-schedule": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/node-schedule/-/node-schedule-1.3.2.tgz", - "integrity": "sha512-GIND2pHMHiReSZSvS6dpZcDH7pGPGFfWBIEud6S00Q8zEIzAs9ommdyRK1ZbQt8y1LyZsJYZgPnyi7gpU2lcdw==", - "dev": true, - "requires": { - "cron-parser": "^2.7.3", - "long-timeout": "0.1.1", - "sorted-array-functions": "^1.0.0" - } - }, - "normalize-url": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", - "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==" - }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "requires": { - "path-key": "^3.0.0" - } - }, - "number-to-bn": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", - "integrity": "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=", - "requires": { - "bn.js": "4.11.6", - "strip-hex-prefix": "1.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" - } - } - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "object-hash": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz", - "integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==", - "dev": true - }, - "object-inspect": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", - "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", - "dev": true - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object.assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.1.tgz", - "integrity": "sha512-VT/cxmx5yaoHSOTSyrCygIDFco+RsibY2NM0a4RdEeY/4KgqezwFtK1yr3U67xYhqJSlASm2pKhLVzPj2lr4bA==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.0", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - }, - "dependencies": { - "es-abstract": { - "version": "1.18.0-next.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.0.tgz", - "integrity": "sha512-elZXTZXKn51hUBdJjSZGYRujuzilgXo8vSPQzjGYXLvSlGiCo8VO8ZGV3kjo9a0WNJJ57hENagwbtlRuHuzkcQ==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - } - } - }, - "object.fromentries": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.2.tgz", - "integrity": "sha512-r3ZiBH7MQppDJVLx6fhD618GKNG40CZYH9wgwdhKxBDDbQgjeWGGd4AtkZad84d291YxvWe7bJGuE65Anh0dxQ==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", - "has": "^1.0.3" - } - }, - "oboe": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.5.tgz", - "integrity": "sha1-VVQoTFQ6ImbXo48X4HOCH73jk80=", - "requires": { - "http-https": "^1.0.0" - } - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "requires": { - "ee-first": "1.1.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "opencollective-postinstall": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz", - "integrity": "sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==" - }, - "p-cancelable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==" - }, - "p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" - }, - "p-memoize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-memoize/-/p-memoize-4.0.0.tgz", - "integrity": "sha512-oMxCJKVS75Bf2RWtXJNQNaX2K1G0FYpllOh2iTsPXZqnf9dWMcis3BL+pRdLeQY8lIdwwL01k/UV5LBdcVhZzg==", - "dev": true, - "requires": { - "mem": "^6.0.1", - "mimic-fn": "^3.0.0" - }, - "dependencies": { - "mimic-fn": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-3.1.0.tgz", - "integrity": "sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ==", - "dev": true - } - } - }, - "p-queue": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-6.6.1.tgz", - "integrity": "sha512-miQiSxLYPYBxGkrldecZC18OTLjdUqnlRebGzPRiVxB8mco7usCmm7hFuxiTvp93K18JnLtE4KMMycjAu/cQQg==", - "dev": true, - "requires": { - "eventemitter3": "^4.0.4", - "p-timeout": "^3.1.0" - }, - "dependencies": { - "p-timeout": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", - "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", - "dev": true, - "requires": { - "p-finally": "^1.0.0" - } - } - } - }, - "p-retry": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.2.0.tgz", - "integrity": "sha512-jPH38/MRh263KKcq0wBNOGFJbm+U6784RilTmHjB/HM9kH9V8WlCpVUcdOmip9cjXOh6MxZ5yk1z2SjDUJfWmA==", - "dev": true, - "requires": { - "@types/retry": "^0.12.0", - "retry": "^0.12.0" - } - }, - "p-timeout": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", - "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", - "requires": { - "p-finally": "^1.0.0" - } - }, - "package-json": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", - "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", - "dev": true, - "requires": { - "got": "^9.6.0", - "registry-auth-token": "^4.0.0", - "registry-url": "^5.0.0", - "semver": "^6.2.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "dev": true - }, - "parent-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-2.0.0.tgz", - "integrity": "sha512-uo0Z9JJeWzv8BG+tRcapBKNJ0dro9cLyczGzulS6EfeyAdeC9sbojtW6XwvYxJkEne9En+J2XEl4zyglVeIwFg==", - "dev": true, - "requires": { - "callsites": "^3.1.0" - } - }, - "parse-asn1": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", - "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", - "requires": { - "asn1.js": "^5.2.0", - "browserify-aes": "^1.0.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" - } - }, - "parse-headers": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.3.tgz", - "integrity": "sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA==" - }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" - }, - "pbkdf2": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz", - "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" - }, - "please-upgrade-node": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", - "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", - "dev": true, - "requires": { - "semver-compare": "^1.0.0" - } - }, - "portfinder": { - "version": "1.0.28", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", - "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", - "dev": true, - "requires": { - "async": "^2.6.2", - "debug": "^3.1.1", - "mkdirp": "^0.5.5" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } - } - }, - "prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" - }, - "process": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", - "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=" - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" - }, - "proxy-addr": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", - "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", - "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.9.1" - } - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" - }, - "public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" - }, - "pupa": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.0.1.tgz", - "integrity": "sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA==", - "dev": true, - "requires": { - "escape-goat": "^2.0.0" - } - }, - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" - }, - "query-string": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", - "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", - "requires": { - "decode-uri-component": "^0.2.0", - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" - } - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "ramda": { - "version": "0.27.1", - "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.1.tgz", - "integrity": "sha512-PgIdVpn5y5Yns8vqb8FzBUEYn98V3xcPgawAkkgj0YJ0qDsnHCiNmZYfOGMgOvoB0eWFLpYbhxUR3mxfDIMvpw==" - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" - }, - "raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", - "requires": { - "bytes": "3.1.0", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - } - }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "registry-auth-token": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.0.tgz", - "integrity": "sha512-P+lWzPrsgfN+UEpDS3U8AQKg/UjZX6mQSJueZj3EK+vNESoqBSpBUD3gmu4sF9lOsjXWjF11dQKUqemf3veq1w==", - "dev": true, - "requires": { - "rc": "^1.2.8" - } - }, - "registry-url": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", - "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", - "dev": true, - "requires": { - "rc": "^1.2.8" - } - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "dependencies": { - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" - } - } - }, - "require_optional": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", - "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==", - "requires": { - "resolve-from": "^2.0.0", - "semver": "^5.1.0" - }, - "dependencies": { - "resolve-from": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", - "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - }, - "responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", - "requires": { - "lowercase-keys": "^1.0.0" - } - }, - "retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", - "dev": true - }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "rlp": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.6.tgz", - "integrity": "sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg==", - "requires": { - "bn.js": "^4.11.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "saslprep": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", - "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", - "optional": true, - "requires": { - "sparse-bitfield": "^3.0.3" - } - }, - "sax": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", - "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o=", - "dev": true - }, - "scrypt-js": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", - "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" - }, - "secp256k1": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz", - "integrity": "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==", - "requires": { - "elliptic": "^6.5.2", - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0" - }, - "dependencies": { - "node-gyp-build": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz", - "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==" - } - } - }, - "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", - "dev": true - }, - "semver-compare": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", - "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", - "dev": true - }, - "semver-diff": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", - "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", - "dev": true, - "requires": { - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", - "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.7.2", - "mime": "1.6.0", - "ms": "2.1.1", - "on-finished": "~2.3.0", - "range-parser": "~1.2.1", - "statuses": "~1.5.0" - }, - "dependencies": { - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" - } - } - }, - "serve-static": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", - "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.17.1" - } - }, - "serverless-aws-documentation": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/serverless-aws-documentation/-/serverless-aws-documentation-1.1.0.tgz", - "integrity": "sha512-b2iM1eZIWxQjAa6RNnARq+iXgiffbtSmKnZUh7l8KOkaD/BapqfOkKKi6MGxp3KxQFkW31sVsAiqJ0NQSSyXOw==", - "dev": true, - "requires": { - "object-hash": "^1.1.7" - } - }, - "serverless-domain-manager": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/serverless-domain-manager/-/serverless-domain-manager-4.2.0.tgz", - "integrity": "sha512-FdWZyDC2v/rC/PCfMHoEqcL2u0OdgHAPGLW8KIBeiS83xgMEtyP7A4+ispBtQvZ4nsfJNyPiz4Bv5eO1RdMpXw==", - "dev": true, - "requires": { - "aws-sdk": "^2.490.0", - "chalk": "^2.4.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "serverless-export-swagger": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/serverless-export-swagger/-/serverless-export-swagger-2.0.0.tgz", - "integrity": "sha512-X4Hi8tftfzyOF6nol122LyKwM4zWgrvdV9MP6gIuJ2XeMaQo5wkHgsi+rHnuWGjyVb4BpIL/BGOMWMpPK3j//A==", - "dev": true, - "requires": { - "aws-sdk": "^2.385.0" - } - }, - "serverless-offline": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/serverless-offline/-/serverless-offline-6.7.0.tgz", - "integrity": "sha512-N/5vUk8PzSzViwRjeLIM/o5LYk6NudaSEoZRlwQFSGeLuQSHZuFUvNZlCSK3e4N3gs1CLKMP0Ks1H0/jHD/8gQ==", - "dev": true, - "requires": { - "@hapi/boom": "^7.4.11", - "@hapi/h2o2": "^8.3.2", - "@hapi/hapi": "^18.4.1", - "aws-sdk": "^2.624.0", - "boxen": "^4.2.0", - "chalk": "^3.0.0", - "clear-module": "^4.1.1", - "cuid": "^2.1.8", - "execa": "^4.0.0", - "extend": "^3.0.2", - "fs-extra": "^8.1.0", - "java-invoke-local": "0.0.6", - "js-string-escape": "^1.0.1", - "jsonpath-plus": "^3.0.0", - "jsonschema": "^1.2.6", - "jsonwebtoken": "^8.5.1", - "jszip": "^3.2.2", - "luxon": "^1.22.0", - "node-fetch": "^2.6.0", - "node-schedule": "^1.3.2", - "object.fromentries": "^2.0.2", - "p-memoize": "^4.0.0", - "p-queue": "^6.3.0", - "p-retry": "^4.2.0", - "please-upgrade-node": "^3.2.0", - "portfinder": "^1.0.25", - "semver": "^7.1.3", - "update-notifier": "^4.1.0", - "velocityjs": "^2.0.0", - "ws": "^7.2.1" - }, - "dependencies": { - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "ws": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz", - "integrity": "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA==", - "dev": true - } - } - }, - "servify": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/servify/-/servify-0.1.12.tgz", - "integrity": "sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==", - "requires": { - "body-parser": "^1.16.0", - "cors": "^2.8.1", - "express": "^4.14.0", - "request": "^2.79.0", - "xhr": "^2.3.3" - } - }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "dev": true - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" - }, - "setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" - }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", - "dev": true - }, - "simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" - }, - "simple-get": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", - "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", - "requires": { - "decompress-response": "^3.3.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, - "sorted-array-functions": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/sorted-array-functions/-/sorted-array-functions-1.3.0.tgz", - "integrity": "sha512-2sqgzeFlid6N4Z2fUQ1cvFmTOLRi/sEDzSQ0OKYchqgoPmQBVyM3959qYx3fpS6Esef80KjmpgPeEr028dP3OA==", - "dev": true - }, - "sparse-bitfield": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", - "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", - "optional": true, - "requires": { - "memory-pager": "^1.0.2" - } - }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" - }, - "strict-uri-encode": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" - }, - "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - } - } - }, - "string.prototype.trimend": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", - "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "string.prototype.trimstart": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", - "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "requires": { - "safe-buffer": "~5.2.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - } - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true - }, - "strip-hex-prefix": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", - "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", - "requires": { - "is-hex-prefixed": "1.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "swagger-ui-dist": { - "version": "3.48.0", - "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-3.48.0.tgz", - "integrity": "sha512-UgpKIQW5RAb4nYRG8B615blmQzct0DNuvtX4904Fe2aMWAVfWeKHKl4kwzFXuBJgr2WYWTwM1PnhZ+qqkLrpPg==" - }, - "swagger-ui-express": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/swagger-ui-express/-/swagger-ui-express-4.1.6.tgz", - "integrity": "sha512-Xs2BGGudvDBtL7RXcYtNvHsFtP1DBFPMJFRxHe5ez/VG/rzVOEjazJOOSc/kSCyxreCTKfJrII6MJlL9a6t8vw==", - "requires": { - "swagger-ui-dist": "^3.18.1" - } - }, - "swarm-js": { - "version": "0.1.40", - "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.40.tgz", - "integrity": "sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA==", - "requires": { - "bluebird": "^3.5.0", - "buffer": "^5.0.5", - "eth-lib": "^0.1.26", - "fs-extra": "^4.0.2", - "got": "^7.1.0", - "mime-types": "^2.1.16", - "mkdirp-promise": "^5.0.1", - "mock-fs": "^4.1.0", - "setimmediate": "^1.0.5", - "tar": "^4.0.2", - "xhr-request": "^1.0.1" - }, - "dependencies": { - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" - }, - "got": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", - "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", - "requires": { - "decompress-response": "^3.2.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-plain-obj": "^1.1.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "p-cancelable": "^0.3.0", - "p-timeout": "^1.1.1", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "url-parse-lax": "^1.0.0", - "url-to-options": "^1.0.1" - } - }, - "p-cancelable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", - "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==" - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" - }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", - "requires": { - "prepend-http": "^1.0.1" - } - } - } - }, - "tar": { - "version": "4.4.13", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", - "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.8.6", - "minizlib": "^1.2.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.3" - }, - "dependencies": { - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "requires": { - "minimist": "^1.2.5" - } - } - } - }, - "term-size": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.0.tgz", - "integrity": "sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw==", - "dev": true - }, - "timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" - }, - "to-readable-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", - "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==" - }, - "toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" - }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" - }, - "type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" - }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true - }, - "type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - } - }, - "typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "requires": { - "is-typedarray": "^1.0.0" - } - }, - "tz-offset": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/tz-offset/-/tz-offset-0.0.1.tgz", - "integrity": "sha512-kMBmblijHJXyOpKzgDhKx9INYU4u4E1RPMB0HqmKSgWG8vEcf3exEfLh4FFfzd3xdQOw9EuIy/cP0akY6rHopQ==" - }, - "ultron": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", - "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" - }, - "underscore": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", - "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==" - }, - "unique-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", - "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", - "dev": true, - "requires": { - "crypto-random-string": "^2.0.0" - } - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" - }, - "update-notifier": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.1.tgz", - "integrity": "sha512-9y+Kds0+LoLG6yN802wVXoIfxYEwh3FlZwzMwpCZp62S2i1/Jzeqb9Eeeju3NSHccGGasfGlK5/vEHbAifYRDg==", - "dev": true, - "requires": { - "boxen": "^4.2.0", - "chalk": "^3.0.0", - "configstore": "^5.0.1", - "has-yarn": "^2.1.0", - "import-lazy": "^2.1.0", - "is-ci": "^2.0.0", - "is-installed-globally": "^0.3.1", - "is-npm": "^4.0.0", - "is-yarn-global": "^0.3.0", - "latest-version": "^5.0.0", - "pupa": "^2.0.1", - "semver-diff": "^3.1.1", - "xdg-basedir": "^4.0.0" - } - }, - "uri-js": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz", - "integrity": "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==", - "requires": { - "punycode": "^2.1.0" - } - }, - "url": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", - "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, - "url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", - "requires": { - "prepend-http": "^2.0.0" - } - }, - "url-set-query": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", - "integrity": "sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk=" - }, - "url-to-options": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", - "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=" - }, - "utf-8-validate": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.2.tgz", - "integrity": "sha512-SwV++i2gTD5qh2XqaPzBnNX88N6HdyhQrNNRykvcS0QKvItV9u3vPEJr+X5Hhfb1JC0r0e1alL0iB09rY8+nmw==", - "requires": { - "node-gyp-build": "~3.7.0" - } - }, - "utf8": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", - "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==" - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" - }, - "varint": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.0.tgz", - "integrity": "sha1-2Ca4n3SQcy+rwMDtaT7Uddyynr8=" - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" - }, - "velocityjs": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/velocityjs/-/velocityjs-2.0.1.tgz", - "integrity": "sha512-KXVGRAOPCm8DhMdrhHqXyELIZNs3CTe2Vz1Kg09zzSycEmE9VzjiSnG50n3rs3FuiL9ek7c36sYJg+R+8EO2Zg==", - "dev": true - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "web3": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.3.0.tgz", - "integrity": "sha512-4q9dna0RecnrlgD/bD1C5S+81Untbd6Z/TBD7rb+D5Bvvc0Wxjr4OP70x+LlnwuRDjDtzBwJbNUblh2grlVArw==", - "requires": { - "web3-bzz": "1.3.0", - "web3-core": "1.3.0", - "web3-eth": "1.3.0", - "web3-eth-personal": "1.3.0", - "web3-net": "1.3.0", - "web3-shh": "1.3.0", - "web3-utils": "1.3.0" - } - }, - "web3-bzz": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.3.0.tgz", - "integrity": "sha512-ibYAnKab+sgTo/UdfbrvYfWblXjjgSMgyy9/FHa6WXS14n/HVB+HfWqGz2EM3fok8Wy5XoKGMvdqvERQ/mzq1w==", - "requires": { - "@types/node": "^12.12.6", - "got": "9.6.0", - "swarm-js": "^0.1.40", - "underscore": "1.9.1" - } - }, - "web3-core": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.3.0.tgz", - "integrity": "sha512-BwWvAaKJf4KFG9QsKRi3MNoNgzjI6szyUlgme1qNPxUdCkaS3Rdpa0VKYNHP7M/YTk82/59kNE66mH5vmoaXjA==", - "requires": { - "@types/bn.js": "^4.11.5", - "@types/node": "^12.12.6", - "bignumber.js": "^9.0.0", - "web3-core-helpers": "1.3.0", - "web3-core-method": "1.3.0", - "web3-core-requestmanager": "1.3.0", - "web3-utils": "1.3.0" - } - }, - "web3-core-helpers": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.3.0.tgz", - "integrity": "sha512-+MFb1kZCrRctf7UYE7NCG4rGhSXaQJ/KF07di9GVK1pxy1K0+rFi61ZobuV1ky9uQp+uhhSPts4Zp55kRDB5sw==", - "requires": { - "underscore": "1.9.1", - "web3-eth-iban": "1.3.0", - "web3-utils": "1.3.0" - } - }, - "web3-core-method": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.3.0.tgz", - "integrity": "sha512-h0yFDrYVzy5WkLxC/C3q+hiMnzxdWm9p1T1rslnuHgOp6nYfqzu/6mUIXrsS4h/OWiGJt+BZ0xVZmtC31HDWtg==", - "requires": { - "@ethersproject/transactions": "^5.0.0-beta.135", - "underscore": "1.9.1", - "web3-core-helpers": "1.3.0", - "web3-core-promievent": "1.3.0", - "web3-core-subscriptions": "1.3.0", - "web3-utils": "1.3.0" - } - }, - "web3-core-promievent": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.3.0.tgz", - "integrity": "sha512-blv69wrXw447TP3iPvYJpllkhW6B18nfuEbrfcr3n2Y0v1Jx8VJacNZFDFsFIcgXcgUIVCtOpimU7w9v4+rtaw==", - "requires": { - "eventemitter3": "4.0.4" - } - }, - "web3-core-requestmanager": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.3.0.tgz", - "integrity": "sha512-3yMbuGcomtzlmvTVqNRydxsx7oPlw3ioRL6ReF9PeNYDkUsZaUib+6Dp5eBt7UXh5X+SIn/xa1smhDHz5/HpAw==", - "requires": { - "underscore": "1.9.1", - "web3-core-helpers": "1.3.0", - "web3-providers-http": "1.3.0", - "web3-providers-ipc": "1.3.0", - "web3-providers-ws": "1.3.0" - } - }, - "web3-core-subscriptions": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.3.0.tgz", - "integrity": "sha512-MUUQUAhJDb+Nz3S97ExVWveH4utoUnsbPWP+q1HJH437hEGb4vunIb9KvN3hFHLB+aHJfPeStM/4yYTz5PeuyQ==", - "requires": { - "eventemitter3": "4.0.4", - "underscore": "1.9.1", - "web3-core-helpers": "1.3.0" - } - }, - "web3-eth": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.3.0.tgz", - "integrity": "sha512-/bzJcxXPM9EM18JM5kO2JjZ3nEqVo3HxqU93aWAEgJNqaP/Lltmufl2GpvIB2Hvj+FXAjAXquxUdQ2/xP7BzHQ==", - "requires": { - "underscore": "1.9.1", - "web3-core": "1.3.0", - "web3-core-helpers": "1.3.0", - "web3-core-method": "1.3.0", - "web3-core-subscriptions": "1.3.0", - "web3-eth-abi": "1.3.0", - "web3-eth-accounts": "1.3.0", - "web3-eth-contract": "1.3.0", - "web3-eth-ens": "1.3.0", - "web3-eth-iban": "1.3.0", - "web3-eth-personal": "1.3.0", - "web3-net": "1.3.0", - "web3-utils": "1.3.0" - } - }, - "web3-eth-abi": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.3.0.tgz", - "integrity": "sha512-1OrZ9+KGrBeBRd3lO8upkpNua9+7cBsQAgor9wbA25UrcUYSyL8teV66JNRu9gFxaTbkpdrGqM7J/LXpraXWrg==", - "requires": { - "@ethersproject/abi": "5.0.0-beta.153", - "underscore": "1.9.1", - "web3-utils": "1.3.0" - } - }, - "web3-eth-accounts": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.3.0.tgz", - "integrity": "sha512-/Q7EVW4L2wWUbNRtOTwAIrYvJid/5UnKMw67x/JpvRMwYC+e+744P536Ja6SG4X3MnzFvd3E/jruV4qa6k+zIw==", - "requires": { - "crypto-browserify": "3.12.0", - "eth-lib": "0.2.8", - "ethereumjs-common": "^1.3.2", - "ethereumjs-tx": "^2.1.1", - "scrypt-js": "^3.0.1", - "underscore": "1.9.1", - "uuid": "3.3.2", - "web3-core": "1.3.0", - "web3-core-helpers": "1.3.0", - "web3-core-method": "1.3.0", - "web3-utils": "1.3.0" - }, - "dependencies": { - "eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" - } - } - }, - "web3-eth-contract": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.3.0.tgz", - "integrity": "sha512-3SCge4SRNCnzLxf0R+sXk6vyTOl05g80Z5+9/B5pERwtPpPWaQGw8w01vqYqsYBKC7zH+dxhMaUgVzU2Dgf7bQ==", - "requires": { - "@types/bn.js": "^4.11.5", - "underscore": "1.9.1", - "web3-core": "1.3.0", - "web3-core-helpers": "1.3.0", - "web3-core-method": "1.3.0", - "web3-core-promievent": "1.3.0", - "web3-core-subscriptions": "1.3.0", - "web3-eth-abi": "1.3.0", - "web3-utils": "1.3.0" - } - }, - "web3-eth-ens": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.3.0.tgz", - "integrity": "sha512-WnOru+EcuM5dteiVYJcHXo/I7Wq+ei8RrlS2nir49M0QpYvUPGbCGgTbifcjJQTWamgORtWdljSA1s2Asdb74w==", - "requires": { - "content-hash": "^2.5.2", - "eth-ens-namehash": "2.0.8", - "underscore": "1.9.1", - "web3-core": "1.3.0", - "web3-core-helpers": "1.3.0", - "web3-core-promievent": "1.3.0", - "web3-eth-abi": "1.3.0", - "web3-eth-contract": "1.3.0", - "web3-utils": "1.3.0" - } - }, - "web3-eth-iban": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.3.0.tgz", - "integrity": "sha512-v9mZWhR4fPF17/KhHLiWir4YHWLe09O3B/NTdhWqw3fdAMJNztzMHGzgHxA/4fU+rhrs/FhDzc4yt32zMEXBZw==", - "requires": { - "bn.js": "^4.11.9", - "web3-utils": "1.3.0" - } - }, - "web3-eth-personal": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.3.0.tgz", - "integrity": "sha512-2czUhElsJdLpuNfun9GeLiClo5O6Xw+bLSjl3f4bNG5X2V4wcIjX2ygep/nfstLLtkz8jSkgl/bV7esANJyeRA==", - "requires": { - "@types/node": "^12.12.6", - "web3-core": "1.3.0", - "web3-core-helpers": "1.3.0", - "web3-core-method": "1.3.0", - "web3-net": "1.3.0", - "web3-utils": "1.3.0" - } - }, - "web3-net": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.3.0.tgz", - "integrity": "sha512-Xz02KylOyrB2YZzCkysEDrY7RbKxb7LADzx3Zlovfvuby7HBwtXVexXKtoGqksa+ns1lvjQLLQGb+OeLi7Sr7w==", - "requires": { - "web3-core": "1.3.0", - "web3-core-method": "1.3.0", - "web3-utils": "1.3.0" - } - }, - "web3-providers-http": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.3.0.tgz", - "integrity": "sha512-cMKhUI6PqlY/EC+ZDacAxajySBu8AzW8jOjt1Pe/mbRQgS0rcZyvLePGTTuoyaA8C21F8UW+EE5jj7YsNgOuqA==", - "requires": { - "web3-core-helpers": "1.3.0", - "xhr2-cookies": "1.1.0" - } - }, - "web3-providers-ipc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.3.0.tgz", - "integrity": "sha512-0CrLuRofR+1J38nEj4WsId/oolwQEM6Yl1sOt41S/6bNI7htdkwgVhSloFIMJMDFHtRw229QIJ6wIaKQz0X1Og==", - "requires": { - "oboe": "2.1.5", - "underscore": "1.9.1", - "web3-core-helpers": "1.3.0" - } - }, - "web3-providers-ws": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.3.0.tgz", - "integrity": "sha512-Im5MthhJnJst8nSoq0TgbyOdaiFQFa5r6sHPOVllhgIgViDqzbnlAFW9sNzQ0Q8VXPNfPIQKi9cOrHlSRNPjRw==", - "requires": { - "eventemitter3": "4.0.4", - "underscore": "1.9.1", - "web3-core-helpers": "1.3.0", - "websocket": "^1.0.32" - } - }, - "web3-shh": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.3.0.tgz", - "integrity": "sha512-IZTojA4VCwVq+7eEIHuL1tJXtU+LJDhO8Y2QmuwetEWW1iBgWCGPHZasipWP+7kDpSm/5lo5GRxL72FF/Os/tA==", - "requires": { - "web3-core": "1.3.0", - "web3-core-method": "1.3.0", - "web3-core-subscriptions": "1.3.0", - "web3-net": "1.3.0" - } - }, - "web3-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.3.0.tgz", - "integrity": "sha512-2mS5axFCbkhicmoDRuJeuo0TVGQDgC2sPi/5dblfVC+PMtX0efrb8Xlttv/eGkq7X4E83Pds34FH98TP2WOUZA==", - "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", - "ethereum-bloom-filters": "^1.0.6", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "underscore": "1.9.1", - "utf8": "3.0.0" - }, - "dependencies": { - "eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - } - } - }, - "websocket": { - "version": "1.0.32", - "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.32.tgz", - "integrity": "sha512-i4yhcllSP4wrpoPMU2N0TQ/q0O94LRG/eUQjEAamRltjQ1oT1PFFKOG4i877OlJgCG8rw6LrrowJp+TYCEWF7Q==", - "requires": { - "bufferutil": "^4.0.1", - "debug": "^2.2.0", - "es5-ext": "^0.10.50", - "typedarray-to-buffer": "^3.1.5", - "utf-8-validate": "^5.0.2", - "yaeti": "^0.0.6" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "widest-line": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", - "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", - "dev": true, - "requires": { - "string-width": "^4.0.0" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "ws": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", - "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", - "requires": { - "async-limiter": "~1.0.0", - "safe-buffer": "~5.1.0", - "ultron": "~1.1.0" - } - }, - "xdg-basedir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", - "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", - "dev": true - }, - "xhr": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.5.0.tgz", - "integrity": "sha512-4nlO/14t3BNUZRXIXfXe+3N6w3s1KoxcJUUURctd64BLRe67E4gRwp4PjywtDY72fXpZ1y6Ch0VZQRY/gMPzzQ==", - "requires": { - "global": "~4.3.0", - "is-function": "^1.0.1", - "parse-headers": "^2.0.0", - "xtend": "^4.0.0" - } - }, - "xhr-request": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/xhr-request/-/xhr-request-1.1.0.tgz", - "integrity": "sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==", - "requires": { - "buffer-to-arraybuffer": "^0.0.5", - "object-assign": "^4.1.1", - "query-string": "^5.0.1", - "simple-get": "^2.7.0", - "timed-out": "^4.0.1", - "url-set-query": "^1.0.0", - "xhr": "^2.0.4" - } - }, - "xhr-request-promise": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz", - "integrity": "sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg==", - "requires": { - "xhr-request": "^1.1.0" - } - }, - "xhr2-cookies": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz", - "integrity": "sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg=", - "requires": { - "cookiejar": "^2.1.1" - } - }, - "xml2js": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", - "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", - "dev": true, - "requires": { - "sax": ">=0.6.0", - "xmlbuilder": "~9.0.1" - } - }, - "xmlbuilder": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", - "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", - "dev": true - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" - }, - "yaeti": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", - "integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=" - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" - } - } -} diff --git a/scripts/initial.js b/scripts/initial.js index 5a4bddc..345c734 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -119,10 +119,10 @@ db.stake_pool.insertMany([ { name: 'daoELO', label: 'Elon\'s APE LP', - contract_address: '', // TODO: Update to mainnet address + contract_address: '0x2d9a136cf87d599628bcbdfb6c4fe75acd2a0aa8', status: 'A', pid: '10', - category: 'Basic', + category: 'Degen', tokenId: 'ethereum', symbol: 'daoELO' }, diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index b699928..feccb99 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -255,8 +255,10 @@ const getApyForVault = async (vault) => { contract = new archiveNodeWeb3.eth.Contract(testContracts.farmer['daoELO'].abi, testContracts.farmer['daoELO'].address); } - const pricePerFullShareCurrent = await getElonPricePerFullShare(contract, currentBlockNbr, inceptionBlockNbr); - const pricePerFullShareOneDayAgo = await getElonPricePerFullShare(contract, oneDayAgoBlock, inceptionBlockNbr); + let pricePerFullShareCurrent = await getElonPricePerFullShare(contract, currentBlockNbr, inceptionBlockNbr); + let pricePerFullShareOneDayAgo = await getElonPricePerFullShare(contract, oneDayAgoBlock, inceptionBlockNbr); + pricePerFullShareCurrent = (0 < pricePerFullShareCurrent) ? pricePerFullShareCurrent : 1; // 0 can't be used as a reference for apy. + pricePerFullShareOneDayAgo = (0 < pricePerFullShareOneDayAgo) ? pricePerFullShareOneDayAgo : 1; // 0 can't be used as a reference for apy. // APY Calculation const n = 365 / 2; // Assume 2 days to trigger invest function @@ -300,6 +302,7 @@ const getApyForVault = async (vault) => { apyLoanscan: 0, compoundApy: 0, citadelApy: 0, + elonApy: 0, faangApy: apy, } } else if (vault.isHarvest) { diff --git a/services/vaults/apy/save/historical-handle.js b/services/vaults/apy/save/historical-handle.js index 1908918..b553721 100644 --- a/services/vaults/apy/save/historical-handle.js +++ b/services/vaults/apy/save/historical-handle.js @@ -254,8 +254,10 @@ const getApyForVault = async (vault) => { contract = new archiveNodeWeb3.eth.Contract(testContracts.farmer['daoELO'].abi, testContracts.farmer['daoELO'].address); } - const pricePerFullShareCurrent = await getElonPricePerFullShare(contract, currentBlockNbr, inceptionBlockNbr); - const pricePerFullShareOneDayAgo = await getElonPricePerFullShare(contract, oneDayAgoBlock, inceptionBlockNbr); + let pricePerFullShareCurrent = await getElonPricePerFullShare(contract, currentBlockNbr, inceptionBlockNbr); + let pricePerFullShareOneDayAgo = await getElonPricePerFullShare(contract, oneDayAgoBlock, inceptionBlockNbr); + pricePerFullShareCurrent = (0 < pricePerFullShareCurrent) ? pricePerFullShareCurrent : 1; // 0 can't be used as a reference for apy. + pricePerFullShareOneDayAgo = (0 < pricePerFullShareOneDayAgo) ? pricePerFullShareOneDayAgo : 1; // 0 can't be used as a reference for apy. // APY Calculation const n = 365 / 2; // Assume 2 days to trigger invest function @@ -657,18 +659,22 @@ module.exports.saveHandler = async () => { console.log("oneMonthAgoBlock", oneMonthAgoBlock); nbrBlocksInDay = currentBlockNbr - oneDayAgoBlock; console.log("Done fetching historical blocks"); + } catch (err) { + console.error(err); + } const vaultsWithApy = []; for (const vault of vaults) { - const vaultWithApy = await saveAndReadVault(vault); - if (vaultWithApy !== null) { - vaultsWithApy.push(vaultWithApy); + try { + const vaultWithApy = await saveAndReadVault(vault); + if (vaultWithApy !== null) { + vaultsWithApy.push(vaultWithApy); + } + await delay(delayTime); + } catch (err) { + console.error(err); } - await delay(delayTime); } - } catch (err) { - console.error(err); - } } module.exports.handleHistoricialAPY = async (req, res) => { diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 7382e48..1bc589a 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -1,7 +1,289 @@ const config = require("./config.js"); const abi = require('../../../../config/abi') -module.exports = [ +const mainVaults = [ + { + id: "cDAI", + name: "Compound DAI", + symbol: "cDAI", + description: "Compound DAI", + erc20address: "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa", + vaultContractAddress: "0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d", + vaultContractABI: abi.cDAIContract, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 10650116, + measurement: 1e18, + price_id: "dai", + vaultSymbol: 'cDAI', + isCompound: true, + }, + { + id: "cUSDC", + name: "Compound USDC", + symbol: "cUSDC", + description: "Compound USDC", + erc20address: "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", + vaultContractAddress: "0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e", + vaultContractABI: abi.cUSDCContract, + balance: 0, + vaultBalance: 0, + decimals: 6, + deposit: true, + depositAll: false, + withdraw: true, + withdrawAll: false, + lastMeasurement: 10532708, + measurement: 1e18, + price_id: "usd-coin", + vaultSymbol: 'cUSDC', + isCompound: true, + }, + { + id: "cUSDT", + name: "Compound USDT", + symbol: "cUSDT", + description: "Compound USDT", + erc20address: "0x07de306ff27a2b630b1141956844eb1552b956b5", + vaultContractAddress: "0x5d102e0bdf2037899e1ff2e8cc50987108533c52", + vaultContractABI: abi.cUSDTContract, + balance: 0, + vaultBalance: 0, + decimals: 6, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 10651402, + measurement: 1e18, + price_id: "tether", + vaultSymbol: 'cUSDT', + isCompound: true, + }, + { + id: "DAI", + name: "DAI", + symbol: "DAI", + description: "DAI Stablecoin", + vaultSymbol: "yDAI", + erc20address: "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa", + vaultContractAddress: "0x5c2eea0a960cc1f604bf3c35a52ca2273f12e67e", + vaultContractABI: config.vaultContractV2ABI, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 24563615, + measurement: 1e18, + price_id: "dai", + isYearn: true, + }, + { + id: "TUSD", + name: "TUSD", + symbol: "TUSD", + description: "TrueUSD", + vaultSymbol: "yTUSD", + erc20address: "0xf0a112a9da3cae4668270729c3d5917b6cb79564", + vaultContractAddress: "0xa8564f8d255c33175d4882e55f1a6d19e7a7d351", + vaultContractABI: config.vaultContractV2ABI, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 24737399, + measurement: 1e18, + price_id: "true-usd", + isYearn: true, + }, + { + id: "USDC", + name: "USD Coin", + symbol: "USDC", + description: "USD//C", + vaultSymbol: "yUSDC", + erc20address: "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", + vaultContractAddress: "0xabdb489ded91b6646fadc8eeb0ca82ea1d526182", + vaultContractABI: config.vaultContractABI, + balance: 0, + vaultBalance: 0, + decimals: 6, + deposit: true, + depositAll: false, + withdraw: true, + withdrawAll: false, + lastMeasurement: 24563583, + measurement: 1e18, + price_id: "usd-coin", + isYearn: true, + }, + { + id: "USDT", + name: "USDT", + symbol: "USDT", + description: "Tether USD", + vaultSymbol: "yUSDT", + erc20address: "0x07de306ff27a2b630b1141956844eb1552b956b5", + vaultContractAddress: "0xa5c53c76729e92630a2a3c549215110a330c902d", + vaultContractABI: config.vaultContractV2ABI, + balance: 0, + vaultBalance: 0, + decimals: 6, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 24547196, + measurement: 1e18, + price_id: "tether", + isYearn: true, + }, + { + id: "daoCDV", + name: "DAO Vault Citadel", + symbol: ["USDT","USDC","DAI"], + description: "DAO Vault Citadel for 3 stablecoins", + vaultSymbol: "daoCDV", + erc20address: ["0x07de306ff27a2b630b1141956844eb1552b956b5", "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa"], + vaultContractAddress: "0x626c25ca5b86277f395c0e40dbdf51f2a302ab43", + vaultContractABI: config.vaultCitadelABI, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 25336169, + measurement: 1e18, + price_id: ["tether", "usd-coin", "dai"], + isCitadel: true, + }, + { + id: "daoELO", + name: "DAO Vault Elon", + symbol: ["USDT","USDC","DAI"], + description: "DAO Vault Elon for 3 stablecoins", + vaultSymbol: "daoELO", + erc20address: ["0xdAC17F958D2ee523a2206206994597C13D831ec7", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0x6b175474e89094c44da98b954eedeac495271d0f"], + vaultContractAddress: "0x2d9a136cf87d599628bcbdfb6c4fe75acd2a0aa8", + vaultContractABI: abi.elonApeVaultContract, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 12722655, + measurement: 1e18, + price_id: ["tether", "usd-coin", "dai"], + isElon: true, + }, + { + id: "daoSTO", + name: "DAO Vault Stonks", + symbol: ["USDT","USDC","DAI"], + description: "DAO Vault Stonks for 3 stablecoins", + vaultSymbol: "daoSTO", + erc20address: ["0x07de306ff27a2b630b1141956844eb1552b956b5", "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa"], + vaultContractAddress: "0xf03fa8553379d872b4e2Bafbc679409Fb82604c2", + vaultContractABI: abi.daoFaangStonkVaultContract, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 25680643, + measurement: 1e18, + price_id: ["tether", "usd-coin", "dai"], + isFaang: true, + }, + { + id: "hfDAI", + name: "DAI", + symbol: "DAI", + description: "DAI Stablecoin", + vaultSymbol: "hfDAI", + erc20address: "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa", + vaultContractAddress: "0x0f89EE5b95d1d5cfb10F29775d816fC6D8Adb9FC", + vaultContractABI: abi.hfVaultContract, + strategyContractAddress: "0xE5331cAF0B4E15C88E878551b93df0647738Af35", + strategyABI: abi.hfStrategyContract, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 24943134, + measurement: 1e18, + price_id: "dai", + isHarvest: true + }, + { + id: "hfUSDC", + name: "USD Coin", + symbol: "USDC", + description: "USD//C", + vaultSymbol: "hfUSDC", + erc20address: "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", + vaultContractAddress: "0x54783464848b35d6fb9bba37C1dDd23aC3B1A11A", + vaultContractABI: abi.hfVaultContract, + strategyContractAddress: "0xE5331cAF0B4E15C88E878551b93df0647738Af35", + strategyABI: abi.hfStrategyContract, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: false, + withdraw: true, + withdrawAll: false, + lastMeasurement: 24943141, + measurement: 1e18, + price_id: "usd-coin", + isHarvest: true + }, + { + id: "hfUSDT", + name: "USDT", + symbol: "USDT", + description: "Tether USD", + vaultSymbol: "hfUSDT", + erc20address: "0x07de306ff27a2b630b1141956844eb1552b956b5", + vaultContractAddress: "0xb41A49De82e95dc1E028839C3440Ac97f9A7832C", + vaultContractABI: abi.hfVaultContract, + strategyContractAddress: "0x0bFA86d10A383B435748E39Cedf8852CFD2B1A9d", + strategyABI: abi.hfStrategyContract, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 24943148, + measurement: 1e18, + price_id: "tether", + isHarvest: true + }, +]; + +const testVaults = [ { id: "cDAI", name: "Compound DAI", @@ -282,3 +564,5 @@ module.exports = [ isHarvest: true }, ]; + +module.exports = (process.env.PRODUCTION != '') ? mainVaults : testVaults; \ No newline at end of file diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index 0c95c6e..35dc033 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -174,16 +174,24 @@ const getAllTVL = async () => { let tvls = Array(); for (vault in vaults.farmer) { - let _vault = vaults.farmer[vault]; - let tvl = await getTVL(_vault); - tvls.push(tvl); - await saveTVL(vault, tvl); + try { + let _vault = vaults.farmer[vault]; + let tvl = await getTVL(_vault); + tvls.push(tvl); + await saveTVL(vault, tvl); + } catch(err) { + console.error(err); + } } - let _vault = vaults.vipDVG; - let tvl = await getTVLxDVG(_vault); - tvls.push(tvl); - await saveTVL("xDVG", tvl); + try { + let _vault = vaults.vipDVG; + let tvl = await getTVLxDVG(_vault); + tvls.push(tvl); + await saveTVL("xDVG", tvl); + } catch (err) { + console.error(err); + } return tvls; }; diff --git a/yarn.lock b/yarn.lock index f556279..9b091e2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,22 +2,46 @@ # yarn lockfile v1 -"@ethersproject/abi@5.0.0-beta.153": - version "5.0.0-beta.153" - resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.0-beta.153.tgz#43a37172b33794e4562999f6e2d555b7599a8eee" - integrity sha512-aXweZ1Z7vMNzJdLpR1CZUAIgnwjrZeUSvN9syCwlBaEBUFJmFY+HHnfuTI5vIhVs/mRkfJVrbEyl51JZQqyjAg== - dependencies: - "@ethersproject/address" ">=5.0.0-beta.128" - "@ethersproject/bignumber" ">=5.0.0-beta.130" - "@ethersproject/bytes" ">=5.0.0-beta.129" - "@ethersproject/constants" ">=5.0.0-beta.128" - "@ethersproject/hash" ">=5.0.0-beta.128" - "@ethersproject/keccak256" ">=5.0.0-beta.127" - "@ethersproject/logger" ">=5.0.0-beta.129" - "@ethersproject/properties" ">=5.0.0-beta.131" - "@ethersproject/strings" ">=5.0.0-beta.130" - -"@ethersproject/address@>=5.0.0-beta.128", "@ethersproject/address@^5.0.3": +"@ethersproject/abi@5.0.7": + version "5.0.7" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.7.tgz#79e52452bd3ca2956d0e1c964207a58ad1a0ee7b" + integrity sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw== + dependencies: + "@ethersproject/address" "^5.0.4" + "@ethersproject/bignumber" "^5.0.7" + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/constants" "^5.0.4" + "@ethersproject/hash" "^5.0.4" + "@ethersproject/keccak256" "^5.0.3" + "@ethersproject/logger" "^5.0.5" + "@ethersproject/properties" "^5.0.3" + "@ethersproject/strings" "^5.0.4" + +"@ethersproject/abstract-provider@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.4.0.tgz#415331031b0f678388971e1987305244edc04e1d" + integrity sha512-vPBR7HKUBY0lpdllIn7tLIzNN7DrVnhCLKSzY0l8WAwxz686m/aL7ASDzrVxV93GJtIub6N2t4dfZ29CkPOxgA== + dependencies: + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/networks" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/transactions" "^5.4.0" + "@ethersproject/web" "^5.4.0" + +"@ethersproject/abstract-signer@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.4.0.tgz#cd5f50b93141ee9f9f49feb4075a0b3eafb57d65" + integrity sha512-AieQAzt05HJZS2bMofpuxMEp81AHufA5D6M4ScKwtolj041nrfIbIi8ciNW7+F59VYxXq+V4c3d568Q6l2m8ew== + dependencies: + "@ethersproject/abstract-provider" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + +"@ethersproject/address@^5.0.3": version "5.0.3" resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.0.3.tgz#86489f836d1656135fa6cae56d9fd1ab5b2c95af" integrity sha512-LMmLxL1wTNtvwgm/eegcaxtG/W7vHXKzHGUkK9KZEI9W+SfHrpT7cGX+hBcatcUXPANjS3TmOaQ+mq5JU5sGTw== @@ -29,7 +53,25 @@ "@ethersproject/rlp" "^5.0.3" bn.js "^4.4.0" -"@ethersproject/bignumber@>=5.0.0-beta.130", "@ethersproject/bignumber@^5.0.6": +"@ethersproject/address@^5.0.4", "@ethersproject/address@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.4.0.tgz#ba2d00a0f8c4c0854933b963b9a3a9f6eb4a37a3" + integrity sha512-SD0VgOEkcACEG/C6xavlU1Hy3m5DGSXW3CUHkaaEHbAPPsgi0coP5oNPsxau8eTlZOk/bpa/hKeCNoK5IzVI2Q== + dependencies: + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/keccak256" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/rlp" "^5.4.0" + +"@ethersproject/base64@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.4.0.tgz#7252bf65295954c9048c7ca5f43e5c86441b2a9a" + integrity sha512-CjQw6E17QDSSC5jiM9YpF7N1aSCHmYGMt9bWD8PWv6YPMxjsys2/Q8xLrROKI3IWJ7sFfZ8B3flKDTM5wlWuZQ== + dependencies: + "@ethersproject/bytes" "^5.4.0" + +"@ethersproject/bignumber@^5.0.6": version "5.0.6" resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.0.6.tgz#1b5494a640c64096538e622b6ba8a5b8439ebde4" integrity sha512-fLilYOSH3DJXBrimx7PwrJdY/zAI5MGp229Mvhtcur76Lgt4qNWu9HTiwMGHP01Tkm3YP5gweF83GrQrA2tYUA== @@ -38,31 +80,58 @@ "@ethersproject/logger" "^5.0.5" bn.js "^4.4.0" -"@ethersproject/bytes@>=5.0.0-beta.129", "@ethersproject/bytes@^5.0.4": +"@ethersproject/bignumber@^5.0.7", "@ethersproject/bignumber@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.4.0.tgz#be8dea298c0ec71208ee60f0b245be0761217ad9" + integrity sha512-OXUu9f9hO3vGRIPxU40cignXZVaYyfx6j9NNMjebKdnaCL3anCLSSy8/b8d03vY6dh7duCC0kW72GEC4tZer2w== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + bn.js "^4.11.9" + +"@ethersproject/bytes@^5.0.4": version "5.0.4" resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.0.4.tgz#328d9d929a3e970964ecf5d62e12568a187189f1" integrity sha512-9R6A6l9JN8x1U4s1dJCR+9h3MZTT3xQofr/Xx8wbDvj6NnY4CbBB0o8ZgHXvR74yV90pY2EzCekpkMBJnRzkSw== dependencies: "@ethersproject/logger" "^5.0.5" -"@ethersproject/constants@>=5.0.0-beta.128", "@ethersproject/constants@^5.0.3": +"@ethersproject/bytes@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.4.0.tgz#56fa32ce3bf67153756dbaefda921d1d4774404e" + integrity sha512-H60ceqgTHbhzOj4uRc/83SCN9d+BSUnOkrr2intevqdtEMO1JFVZ1XL84OEZV+QjV36OaZYxtnt4lGmxcGsPfA== + dependencies: + "@ethersproject/logger" "^5.4.0" + +"@ethersproject/constants@^5.0.3": version "5.0.3" resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.0.3.tgz#7ccb8e2e9f14fbcc2d52d0e1402a83a5613a2f65" integrity sha512-iN7KBrA0zNFybDyrkcAPOcyU3CHXYFMd+KM2Jr07Kjg+DVB5wPpEXsOdd/K1KWFsFtGfNdPZ7QP8siLtCePXrQ== dependencies: "@ethersproject/bignumber" "^5.0.6" -"@ethersproject/hash@>=5.0.0-beta.128": - version "5.0.3" - resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.0.3.tgz#41f17fd7972838831620338dad932bfe3d684209" - integrity sha512-KSnJyL0G9lxbOK0UPrUcaYTc/RidrX8c+kn7xnEpTmSGxqlndw4BzvQcRgYt31bOIwuFtwlWvOo6AN2tJgdQtA== +"@ethersproject/constants@^5.0.4", "@ethersproject/constants@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.4.0.tgz#ee0bdcb30bf1b532d2353c977bf2ef1ee117958a" + integrity sha512-tzjn6S7sj9+DIIeKTJLjK9WGN2Tj0P++Z8ONEIlZjyoTkBuODN+0VfhAyYksKi43l1Sx9tX2VlFfzjfmr5Wl3Q== dependencies: - "@ethersproject/bytes" "^5.0.4" - "@ethersproject/keccak256" "^5.0.3" - "@ethersproject/logger" "^5.0.5" - "@ethersproject/strings" "^5.0.3" + "@ethersproject/bignumber" "^5.4.0" -"@ethersproject/keccak256@>=5.0.0-beta.127", "@ethersproject/keccak256@^5.0.3": +"@ethersproject/hash@^5.0.4": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.4.0.tgz#d18a8e927e828e22860a011f39e429d388344ae0" + integrity sha512-xymAM9tmikKgbktOCjW60Z5sdouiIIurkZUr9oW5NOex5uwxrbsYG09kb5bMcNjlVeJD3yPivTNzViIs1GCbqA== + dependencies: + "@ethersproject/abstract-signer" "^5.4.0" + "@ethersproject/address" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/keccak256" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + +"@ethersproject/keccak256@^5.0.3": version "5.0.3" resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.0.3.tgz#f094a8fca3bb913c044593c4f382be424292e588" integrity sha512-VhW3mgZMBZlETV6AyOmjNeNG+Pg68igiKkPpat8/FZl0CKnfgQ+KZQZ/ee1vT+X0IUM8/djqnei6btmtbA27Ug== @@ -70,18 +139,45 @@ "@ethersproject/bytes" "^5.0.4" js-sha3 "0.5.7" -"@ethersproject/logger@>=5.0.0-beta.129", "@ethersproject/logger@^5.0.5": +"@ethersproject/keccak256@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.4.0.tgz#7143b8eea4976080241d2bd92e3b1f1bf7025318" + integrity sha512-FBI1plWet+dPUvAzPAeHzRKiPpETQzqSUWR1wXJGHVWi4i8bOSrpC3NwpkPjgeXG7MnugVc1B42VbfnQikyC/A== + dependencies: + "@ethersproject/bytes" "^5.4.0" + js-sha3 "0.5.7" + +"@ethersproject/logger@^5.0.5": version "5.0.5" resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.0.5.tgz#e3ba3d0bcf9f5be4da5f043b1e328eb98b80002f" integrity sha512-gJj72WGzQhUtCk6kfvI8elTaPOQyMvrMghp/nbz0ivTo39fZ7IjypFh/ySDeUSdBNplAwhzWKKejQhdpyefg/w== -"@ethersproject/properties@>=5.0.0-beta.131", "@ethersproject/properties@^5.0.3": +"@ethersproject/logger@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.4.0.tgz#f39adadf62ad610c420bcd156fd41270e91b3ca9" + integrity sha512-xYdWGGQ9P2cxBayt64d8LC8aPFJk6yWCawQi/4eJ4+oJdMMjEBMrIcIMZ9AxhwpPVmnBPrsB10PcXGmGAqgUEQ== + +"@ethersproject/networks@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.4.0.tgz#71eecd3ef3755118b42c1a5d2a44a7e07202e10a" + integrity sha512-5fywtKRDcnaVeA5SjxXH3DOQqe/IbeD/plwydi94SdPps1fbDUrnO6SzDExaruBZXxpxJcO9upG9UComsei4bg== + dependencies: + "@ethersproject/logger" "^5.4.0" + +"@ethersproject/properties@^5.0.3": version "5.0.3" resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.0.3.tgz#991aef39a5f87d4645cee76cec4df868bfb08be6" integrity sha512-wLCSrbywkQgTO6tIF9ZdKsH9AIxPEqAJF/z5xcPkz1DK4mMAZgAXRNw1MrKYhyb+7CqNHbj3vxenNKFavGY/IA== dependencies: "@ethersproject/logger" "^5.0.5" +"@ethersproject/properties@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.4.0.tgz#38ba20539b44dcc5d5f80c45ad902017dcdbefe7" + integrity sha512-7jczalGVRAJ+XSRvNA6D5sAwT4gavLq3OXPuV/74o3Rd2wuzSL035IMpIMgei4CYyBdialJMrTqkOnzccLHn4A== + dependencies: + "@ethersproject/logger" "^5.4.0" + "@ethersproject/rlp@^5.0.3": version "5.0.3" resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.0.3.tgz#841a5edfdf725f92155fe74424f5510c9043c13a" @@ -90,6 +186,14 @@ "@ethersproject/bytes" "^5.0.4" "@ethersproject/logger" "^5.0.5" +"@ethersproject/rlp@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.4.0.tgz#de61afda5ff979454e76d3b3310a6c32ad060931" + integrity sha512-0I7MZKfi+T5+G8atId9QaQKHRvvasM/kqLyAH4XxBCBchAooH2EX5rL9kYZWwcm3awYV+XC7VF6nLhfeQFKVPg== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/signing-key@^5.0.4": version "5.0.4" resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.0.4.tgz#a5334ce8a52d4e9736dc8fb6ecc384704ecf8783" @@ -100,14 +204,26 @@ "@ethersproject/properties" "^5.0.3" elliptic "6.5.3" -"@ethersproject/strings@>=5.0.0-beta.130", "@ethersproject/strings@^5.0.3": - version "5.0.3" - resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.0.3.tgz#756cc4b93203a091966d40824b0b28048e2d5d9b" - integrity sha512-8kEx3+Z6cMn581yh093qnaSa8H7XzmLn6g8YFDHUpzXM7+bvXvnL2ciHrJ+EbvaMQZpej6nNtl0nm7XF4PmQHA== +"@ethersproject/signing-key@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.4.0.tgz#2f05120984e81cf89a3d5f6dec5c68ee0894fbec" + integrity sha512-q8POUeywx6AKg2/jX9qBYZIAmKSB4ubGXdQ88l40hmATj29JnG5pp331nAWwwxPn2Qao4JpWHNZsQN+bPiSW9A== dependencies: - "@ethersproject/bytes" "^5.0.4" - "@ethersproject/constants" "^5.0.3" - "@ethersproject/logger" "^5.0.5" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + bn.js "^4.11.9" + elliptic "6.5.4" + hash.js "1.1.7" + +"@ethersproject/strings@^5.0.4", "@ethersproject/strings@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.4.0.tgz#fb12270132dd84b02906a8d895ae7e7fa3d07d9a" + integrity sha512-k/9DkH5UGDhv7aReXLluFG5ExurwtIpUfnDNhQA29w896Dw3i4uDTz01Quaptbks1Uj9kI8wo9tmW73wcIEaWA== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/constants" "^5.4.0" + "@ethersproject/logger" "^5.4.0" "@ethersproject/transactions@^5.0.0-beta.135": version "5.0.4" @@ -124,6 +240,32 @@ "@ethersproject/rlp" "^5.0.3" "@ethersproject/signing-key" "^5.0.4" +"@ethersproject/transactions@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.4.0.tgz#a159d035179334bd92f340ce0f77e83e9e1522e0" + integrity sha512-s3EjZZt7xa4BkLknJZ98QGoIza94rVjaEed0rzZ/jB9WrIuu/1+tjvYCWzVrystXtDswy7TPBeIepyXwSYa4WQ== + dependencies: + "@ethersproject/address" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/constants" "^5.4.0" + "@ethersproject/keccak256" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/rlp" "^5.4.0" + "@ethersproject/signing-key" "^5.4.0" + +"@ethersproject/web@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.4.0.tgz#49fac173b96992334ed36a175538ba07a7413d1f" + integrity sha512-1bUusGmcoRLYgMn6c1BLk1tOKUIFuTg8j+6N8lYlbMpDesnle+i3pGSagGNvwjaiLo4Y5gBibwctpPRmjrh4Og== + dependencies: + "@ethersproject/base64" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + "@hapi/accept@^3.2.4": version "3.2.4" resolved "https://registry.yarnpkg.com/@hapi/accept/-/accept-3.2.4.tgz#687510529493fe1d7d47954c31aff360d9364bd1" @@ -499,6 +641,13 @@ ansi-regex@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + ansi-styles@^4.1.0: version "4.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" @@ -551,6 +700,26 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= +available-typed-arrays@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.4.tgz#9e0ae84ecff20caae6a94a1c3bc39b955649b7a9" + integrity sha512-SA5mXJWrId1TaQjfxUYghbqQ/hYioKmLJvPJyDuYRtXXenFNMjj4hSSt1Cf1xsuXSXrtxrVC5Ot4eU6cOtBDdA== + +aws-sdk@^2.385.0, aws-sdk@^2.755.0: + version "2.936.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.936.0.tgz#b69f5db7c0c745f260b014415a8fbfb38c5e615d" + integrity sha512-X0kuyycck0fEPN5V0Vw1PmPIQ4BO0qupsL1El5jnXzXxNkf1cOmn5PMSxPXPsdcqua4w4h3sf143/yME0V9w8g== + dependencies: + buffer "4.9.2" + events "1.1.1" + ieee754 "1.1.13" + jmespath "0.15.0" + querystring "0.2.0" + sax "1.2.1" + url "0.10.3" + uuid "3.3.2" + xml2js "0.4.19" + aws-sdk@^2.624.0: version "2.747.0" resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.747.0.tgz#487776536a7f8e4e18d57ff22dd50d777f1d0fe8" @@ -576,6 +745,13 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.10.1.tgz#e1e82e4f3e999e2cfd61b161280d16a111f86428" integrity sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA== +axios@^0.21.0: + version "0.21.1" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" + integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA== + dependencies: + follow-redirects "^1.10.0" + base-x@^3.0.2, base-x@^3.0.8: version "3.0.8" resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.8.tgz#1e1106c2537f0162e8b52474a557ebb09000018d" @@ -605,6 +781,14 @@ bignumber@^1.1.0: resolved "https://registry.yarnpkg.com/bignumber/-/bignumber-1.1.0.tgz#e6ab0a743da5f3ea018e5c17597d121f7868c159" integrity sha1-5qsKdD2l8+oBjlwXWX0SH3howVk= +bl@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/bl/-/bl-2.2.1.tgz#8c11a7b730655c5d56898cdc871224f40fd901d5" + integrity sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g== + dependencies: + readable-stream "^2.3.5" + safe-buffer "^5.1.1" + blakejs@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.1.0.tgz#69df92ef953aa88ca51a32df6ab1c54a155fc7a5" @@ -660,7 +844,7 @@ boxen@^4.2.0: type-fest "^0.8.1" widest-line "^3.1.0" -brorand@^1.0.1: +brorand@^1.0.1, brorand@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= @@ -735,6 +919,11 @@ bs58check@^2.1.2: create-hash "^1.1.0" safe-buffer "^5.1.2" +bson@^1.1.4: + version "1.1.6" + resolved "https://registry.yarnpkg.com/bson/-/bson-1.1.6.tgz#fb819be9a60cd677e0853aee4ca712a785d6618a" + integrity sha512-EvVNVeGo4tHxwi8L6bPj3y3itEvStdwvvlojVxxbyYfoaxJ6keLgrTuKdyfEAszFK+H3olzBuafE0yoh0D1gdg== + buffer-equal-constant-time@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" @@ -792,6 +981,14 @@ cacheable-request@^6.0.0: normalize-url "^4.1.0" responselike "^1.0.2" +call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + callsites@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -807,6 +1004,15 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= +chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + chalk@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" @@ -869,6 +1075,18 @@ clone-response@^1.0.2: dependencies: mimic-response "^1.0.0" +coingecko-api@^1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/coingecko-api/-/coingecko-api-1.0.10.tgz#ac8694d5999f00727fe55f0078ce2917603076b2" + integrity sha512-7YLLC85+daxAw5QlBWoHVBVpJRwoPr4HtwanCr8V/WRjoyHTa1Lb9DQAvv4MDJZHiz4no6HGnDQnddtjV35oRA== + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + color-convert@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" @@ -876,6 +1094,11 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + color-name@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" @@ -941,7 +1164,7 @@ core-util-is@1.0.2, core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= -cors@^2.8.1: +cors@^2.8.1, cors@^2.8.5: version "2.8.5" resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== @@ -1082,11 +1305,21 @@ define-properties@^1.1.2, define-properties@^1.1.3: dependencies: object-keys "^1.0.12" +delay@^4.4.0: + version "4.4.1" + resolved "https://registry.yarnpkg.com/delay/-/delay-4.4.1.tgz#6e02d02946a1b6ab98b39262ced965acba2ac4d1" + integrity sha512-aL3AhqtfhOlT/3ai6sWXeqwnw63ATNpnUiN4HL7x9q+My5QtHlO3OIkasmug9LKzpheLdmUKGRKnYXYAS7FQkQ== + delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= +denque@^1.4.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/denque/-/denque-1.5.0.tgz#773de0686ff2d8ec2ff92914316a47b73b1c73de" + integrity sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ== + depd@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" @@ -1169,6 +1402,19 @@ elliptic@6.5.3, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.0" +elliptic@6.5.4: + version "6.5.4" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== + dependencies: + bn.js "^4.11.9" + brorand "^1.1.0" + hash.js "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" + emoji-regex@^7.0.1: version "7.0.3" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" @@ -1208,6 +1454,28 @@ es-abstract@^1.17.0-next.1, es-abstract@^1.17.5: string.prototype.trimend "^1.0.1" string.prototype.trimstart "^1.0.1" +es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2: + version "1.18.3" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.3.tgz#25c4c3380a27aa203c44b2b685bba94da31b63e0" + integrity sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw== + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + get-intrinsic "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.2" + is-callable "^1.2.3" + is-negative-zero "^2.0.1" + is-regex "^1.1.3" + is-string "^1.0.6" + object-inspect "^1.10.3" + object-keys "^1.1.1" + object.assign "^4.1.2" + string.prototype.trimend "^1.0.4" + string.prototype.trimstart "^1.0.4" + unbox-primitive "^1.0.1" + es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" @@ -1253,6 +1521,11 @@ escape-html@~1.0.3: resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + etag@~1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" @@ -1395,7 +1668,7 @@ execa@^4.0.0: signal-exit "^3.0.2" strip-final-newline "^2.0.0" -express@^4.14.0: +express@^4.14.0, express@^4.17.1: version "4.17.1" resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== @@ -1476,6 +1749,16 @@ finalhandler@~1.1.2: statuses "~1.5.0" unpipe "~1.0.0" +follow-redirects@^1.10.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.1.tgz#d9114ded0a1cfdd334e164e6662ad02bfd91ff43" + integrity sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg== + +foreach@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" + integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= + forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" @@ -1530,6 +1813,15 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" + integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" @@ -1626,6 +1918,16 @@ har-validator@~5.1.3: ajv "^6.12.3" har-schema "^2.0.0" +has-bigints@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" + integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + has-flag@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" @@ -1641,6 +1943,11 @@ has-symbols@^1.0.0, has-symbols@^1.0.1: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== +has-symbols@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" + integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== + has-to-string-tag-x@^1.2.0: version "1.4.1" resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" @@ -1669,7 +1976,7 @@ hash-base@^3.0.0: readable-stream "^3.6.0" safe-buffer "^5.2.0" -hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: +hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== @@ -1677,7 +1984,7 @@ hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: inherits "^2.0.3" minimalistic-assert "^1.0.1" -hmac-drbg@^1.0.0: +hmac-drbg@^1.0.0, hmac-drbg@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= @@ -1786,11 +2093,35 @@ ipaddr.js@1.9.1: resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== +is-arguments@^1.0.4: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.0.tgz#62353031dfbee07ceb34656a6bde59efecae8dd9" + integrity sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg== + dependencies: + call-bind "^1.0.0" + +is-bigint@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.2.tgz#ffb381442503235ad245ea89e45b3dbff040ee5a" + integrity sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA== + +is-boolean-object@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.1.tgz#3c0878f035cb821228d350d2e1e36719716a3de8" + integrity sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng== + dependencies: + call-bind "^1.0.2" + is-callable@^1.1.4, is-callable@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.0.tgz#83336560b54a38e35e3a2df7afd0454d691468bb" integrity sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw== +is-callable@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" + integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ== + is-ci@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" @@ -1818,6 +2149,11 @@ is-function@^1.0.1: resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz#4f097f30abf6efadac9833b17ca5dc03f8144e08" integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ== +is-generator-function@^1.0.7: + version "1.0.9" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.9.tgz#e5f82c2323673e7fcad3d12858c83c4039f6399c" + integrity sha512-ZJ34p1uvIfptHCN7sFTjGibB9/oBg17sHqzDLfuwhvmN/qLVvIQXRQ8licZQ35WJ8KuEQt/etnnzQFI9C9Ue/A== + is-hex-prefixed@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" @@ -1838,11 +2174,21 @@ is-nan@^1.3.0: dependencies: define-properties "^1.1.3" +is-negative-zero@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" + integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== + is-npm@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-4.0.0.tgz#c90dd8380696df87a7a6d823c20d0b12bbe3c84d" integrity sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig== +is-number-object@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.5.tgz#6edfaeed7950cff19afedce9fbfca9ee6dd289eb" + integrity sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw== + is-obj@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" @@ -1870,6 +2216,14 @@ is-regex@^1.1.0: dependencies: has-symbols "^1.0.1" +is-regex@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.3.tgz#d029f9aff6448b93ebbe3f33dac71511fdcbef9f" + integrity sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ== + dependencies: + call-bind "^1.0.2" + has-symbols "^1.0.2" + is-retry-allowed@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" @@ -1885,6 +2239,11 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== +is-string@^1.0.5, is-string@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.6.tgz#3fe5d5992fb0d93404f32584d4b0179a71b54a5f" + integrity sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w== + is-symbol@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" @@ -1892,6 +2251,24 @@ is-symbol@^1.0.2: dependencies: has-symbols "^1.0.1" +is-symbol@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== + dependencies: + has-symbols "^1.0.2" + +is-typed-array@^1.1.3: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.5.tgz#f32e6e096455e329eb7b423862456aa213f0eb4e" + integrity sha512-S+GRDgJlR3PyEbsX/Fobd9cqpZBuvUS+8asRqYDMLCb2qMzt1oz5m5oxQCxOgUDxiWsOVNi4yaF+/uvdlHlYug== + dependencies: + available-typed-arrays "^1.0.2" + call-bind "^1.0.2" + es-abstract "^1.18.0-next.2" + foreach "^2.0.5" + has-symbols "^1.0.1" + is-typedarray@^1.0.0, is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" @@ -2114,6 +2491,11 @@ lodash@^4.17.14: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== +lodash@^4.17.20: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + long-timeout@0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/long-timeout/-/long-timeout-0.1.1.tgz#9721d788b47e0bcb5a24c2e2bee1a0da55dab514" @@ -2170,6 +2552,11 @@ mem@^6.0.1: map-age-cleaner "^0.1.3" mimic-fn "^3.0.0" +memory-pager@^1.0.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/memory-pager/-/memory-pager-1.5.0.tgz#d8751655d22d384682741c972f2c3d6dfa3e66b5" + integrity sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg== + merge-descriptors@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" @@ -2298,6 +2685,24 @@ moment-timezone@^0.5.31: resolved "https://registry.yarnpkg.com/moment/-/moment-2.27.0.tgz#8bff4e3e26a236220dfe3e36de756b6ebaa0105d" integrity sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ== +moment@^2.28.0: + version "2.29.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3" + integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ== + +mongodb@^3.6.3: + version "3.6.9" + resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-3.6.9.tgz#4889cf529724267d393a18275d6cf19d71905b1d" + integrity sha512-1nSCKgSunzn/CXwgOWgbPHUWOO5OfERcuOWISmqd610jn0s8BU9K4879iJVabqgpPPbA6hO7rG48eq+fGED3Mg== + dependencies: + bl "^2.2.1" + bson "^1.1.4" + denque "^1.4.1" + optional-require "^1.0.3" + safe-buffer "^5.1.2" + optionalDependencies: + saslprep "^1.0.0" + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -2373,6 +2778,14 @@ node-addon-api@^2.0.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== +node-cron@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/node-cron/-/node-cron-2.0.3.tgz#b9649784d0d6c00758410eef22fa54a10e3f602d" + integrity sha512-eJI+QitXlwcgiZwNNSRbqsjeZMp5shyajMR81RZCqeW0ZDEj4zU9tpd4nTh/1JsBiKbF8d08FCewiipDmVIYjg== + dependencies: + opencollective-postinstall "^2.0.0" + tz-offset "0.0.1" + node-fetch@^2.6.0, node-fetch@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" @@ -2427,6 +2840,16 @@ object-assign@^4, object-assign@^4.1.0, object-assign@^4.1.1: resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= +object-hash@^1.1.7: + version "1.3.1" + resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-1.3.1.tgz#fde452098a951cb145f039bb7d455449ddc126df" + integrity sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA== + +object-inspect@^1.10.3: + version "1.10.3" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.10.3.tgz#c2aa7d2d09f50c99375704f7a0adf24c5782d369" + integrity sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw== + object-inspect@^1.7.0: version "1.8.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0" @@ -2447,6 +2870,16 @@ object.assign@^4.1.0: has-symbols "^1.0.0" object-keys "^1.0.11" +object.assign@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" + integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + has-symbols "^1.0.1" + object-keys "^1.1.1" + object.fromentries@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.2.tgz#4a09c9b9bb3843dd0f89acdb517a794d4f355ac9" @@ -2457,10 +2890,10 @@ object.fromentries@^2.0.2: function-bind "^1.1.1" has "^1.0.3" -oboe@2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.4.tgz#20c88cdb0c15371bb04119257d4fdd34b0aa49f6" - integrity sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY= +oboe@2.1.5: + version "2.1.5" + resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.5.tgz#5554284c543a2266d7a38f17e073821fbde393cd" + integrity sha1-VVQoTFQ6ImbXo48X4HOCH73jk80= dependencies: http-https "^1.0.0" @@ -2485,6 +2918,16 @@ onetime@^5.1.0: dependencies: mimic-fn "^2.1.0" +opencollective-postinstall@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259" + integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q== + +optional-require@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/optional-require/-/optional-require-1.0.3.tgz#275b8e9df1dc6a17ad155369c2422a440f89cb07" + integrity sha512-RV2Zp2MY2aeYK5G+B/Sps8lW5NHAzE5QClbFP15j+PWmP+T9PxlJXBOOLoSAdgwFvS4t0aMR4vpedMkbHfh0nA== + p-cancelable@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" @@ -2772,16 +3215,7 @@ rc@^1.2.8: minimist "^1.2.0" strip-json-comments "~2.0.1" -readable-stream@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readable-stream@~2.3.6: +readable-stream@^2.3.5, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -2794,6 +3228,15 @@ readable-stream@~2.3.6: string_decoder "~1.1.1" util-deprecate "~1.0.1" +readable-stream@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + registry-auth-token@^4.0.0: version "4.2.0" resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.2.0.tgz#1d37dffda72bbecd0f581e4715540213a65eb7da" @@ -2881,6 +3324,13 @@ safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== +saslprep@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/saslprep/-/saslprep-1.0.3.tgz#4c02f946b56cf54297e347ba1093e7acac4cf226" + integrity sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag== + dependencies: + sparse-bitfield "^3.0.3" + sax@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" @@ -2961,6 +3411,28 @@ serve-static@1.14.1: parseurl "~1.3.3" send "0.17.1" +serverless-aws-documentation@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/serverless-aws-documentation/-/serverless-aws-documentation-1.1.0.tgz#e41d08de84d651f3db84348d926db369292731ff" + integrity sha512-b2iM1eZIWxQjAa6RNnARq+iXgiffbtSmKnZUh7l8KOkaD/BapqfOkKKi6MGxp3KxQFkW31sVsAiqJ0NQSSyXOw== + dependencies: + object-hash "^1.1.7" + +serverless-domain-manager@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/serverless-domain-manager/-/serverless-domain-manager-4.2.3.tgz#634982b78e7ae3f49a3c0b1eefd720f73579297d" + integrity sha512-qZJwl98TQ6V0YtCnjywpdoruyFUdCprm55tUyF7Hecd5S3QJg5tovXCg2bTnmt0pieGHut4l9oqBdkcOPiGzjg== + dependencies: + aws-sdk "^2.755.0" + chalk "^2.4.2" + +serverless-export-swagger@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/serverless-export-swagger/-/serverless-export-swagger-2.0.0.tgz#3b4820384e8a4ed348370dcc260b8ab8cfb20dbe" + integrity sha512-X4Hi8tftfzyOF6nol122LyKwM4zWgrvdV9MP6gIuJ2XeMaQo5wkHgsi+rHnuWGjyVb4BpIL/BGOMWMpPK3j//A== + dependencies: + aws-sdk "^2.385.0" + serverless-offline@^6.7.0: version "6.7.0" resolved "https://registry.yarnpkg.com/serverless-offline/-/serverless-offline-6.7.0.tgz#8873630e400e8f4314e12bb339d49ddb0dc1bce4" @@ -3067,6 +3539,13 @@ sorted-array-functions@^1.0.0: resolved "https://registry.yarnpkg.com/sorted-array-functions/-/sorted-array-functions-1.3.0.tgz#8605695563294dffb2c9796d602bd8459f7a0dd5" integrity sha512-2sqgzeFlid6N4Z2fUQ1cvFmTOLRi/sEDzSQ0OKYchqgoPmQBVyM3959qYx3fpS6Esef80KjmpgPeEr028dP3OA== +sparse-bitfield@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz#ff4ae6e68656056ba4b3e792ab3334d38273ca11" + integrity sha1-/0rm5oZWBWuks+eSqzM004JzyhE= + dependencies: + memory-pager "^1.0.2" + sshpk@^1.7.0: version "1.16.1" resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" @@ -3118,6 +3597,14 @@ string.prototype.trimend@^1.0.1: define-properties "^1.1.3" es-abstract "^1.17.5" +string.prototype.trimend@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80" + integrity sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + string.prototype.trimstart@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" @@ -3126,6 +3613,14 @@ string.prototype.trimstart@^1.0.1: define-properties "^1.1.3" es-abstract "^1.17.5" +string.prototype.trimstart@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed" + integrity sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" @@ -3171,6 +3666,13 @@ strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" @@ -3178,6 +3680,18 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" +swagger-ui-dist@^3.18.1: + version "3.51.0" + resolved "https://registry.yarnpkg.com/swagger-ui-dist/-/swagger-ui-dist-3.51.0.tgz#69ac8dcf540d189601f479c6fb2d7d5462756867" + integrity sha512-DX8RuAyXBjd2J4mjCLLUaodbtZ2z6dF05l6IF3hO++erXM+CR3QVX9TqYX3374hW5BOeLrr7gujoSdY8jIvI2A== + +swagger-ui-express@^4.1.6: + version "4.1.6" + resolved "https://registry.yarnpkg.com/swagger-ui-express/-/swagger-ui-express-4.1.6.tgz#682294af3d5c70f74a1fa4d6a9b503a9ee55ea82" + integrity sha512-Xs2BGGudvDBtL7RXcYtNvHsFtP1DBFPMJFRxHe5ez/VG/rzVOEjazJOOSc/kSCyxreCTKfJrII6MJlL9a6t8vw== + dependencies: + swagger-ui-dist "^3.18.1" + swarm-js@^0.1.40: version "0.1.40" resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.40.tgz#b1bc7b6dcc76061f6c772203e004c11997e06b99" @@ -3278,15 +3792,30 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" +tz-offset@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/tz-offset/-/tz-offset-0.0.1.tgz#fef920257024d3583ed9072a767721a18bdb8a76" + integrity sha512-kMBmblijHJXyOpKzgDhKx9INYU4u4E1RPMB0HqmKSgWG8vEcf3exEfLh4FFfzd3xdQOw9EuIy/cP0akY6rHopQ== + ultron@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== -underscore@1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" - integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== +unbox-primitive@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471" + integrity sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw== + dependencies: + function-bind "^1.1.1" + has-bigints "^1.0.1" + has-symbols "^1.0.2" + which-boxed-primitive "^1.0.2" + +underscore@1.12.1: + version "1.12.1" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.12.1.tgz#7bb8cc9b3d397e201cf8553336d262544ead829e" + integrity sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw== unique-string@^2.0.0: version "2.0.0" @@ -3380,6 +3909,18 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= +util@^0.12.0: + version "0.12.4" + resolved "https://registry.yarnpkg.com/util/-/util-0.12.4.tgz#66121a31420df8f01ca0c464be15dfa1d1850253" + integrity sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw== + dependencies: + inherits "^2.0.3" + is-arguments "^1.0.4" + is-generator-function "^1.0.7" + is-typed-array "^1.1.3" + safe-buffer "^5.1.2" + which-typed-array "^1.1.2" + utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" @@ -3419,222 +3960,223 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -web3-bzz@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.11.tgz#41bc19a77444bd5365744596d778b811880f707f" - integrity sha512-XGpWUEElGypBjeFyUhTkiPXFbDVD6Nr/S5jznE3t8cWUA0FxRf1n3n/NuIZeb0H9RkN2Ctd/jNma/k8XGa3YKg== +web3-bzz@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.3.6.tgz#95f370aecc3ff6ad07f057e6c0c916ef09b04dde" + integrity sha512-ibHdx1wkseujFejrtY7ZyC0QxQ4ATXjzcNUpaLrvM6AEae8prUiyT/OloG9FWDgFD2CPLwzKwfSQezYQlANNlw== dependencies: "@types/node" "^12.12.6" got "9.6.0" swarm-js "^0.1.40" - underscore "1.9.1" + underscore "1.12.1" -web3-core-helpers@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.11.tgz#84c681ed0b942c0203f3b324a245a127e8c67a99" - integrity sha512-PEPoAoZd5ME7UfbnCZBdzIerpe74GEvlwT4AjOmHeCVZoIFk7EqvOZDejJHt+feJA6kMVTdd0xzRNN295UhC1A== +web3-core-helpers@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.3.6.tgz#c478246a9abe4e5456acf42657dac2f7c330be74" + integrity sha512-nhtjA2ZbkppjlxTSwG0Ttu6FcPkVu1rCN5IFAOVpF/L0SEt+jy+O5l90+cjDq0jAYvlBwUwnbh2mR9hwDEJCNA== dependencies: - underscore "1.9.1" - web3-eth-iban "1.2.11" - web3-utils "1.2.11" + underscore "1.12.1" + web3-eth-iban "1.3.6" + web3-utils "1.3.6" -web3-core-method@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.11.tgz#f880137d1507a0124912bf052534f168b8d8fbb6" - integrity sha512-ff0q76Cde94HAxLDZ6DbdmKniYCQVtvuaYh+rtOUMB6kssa5FX0q3vPmixi7NPooFnbKmmZCM6NvXg4IreTPIw== +web3-core-method@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.3.6.tgz#4b0334edd94b03dfec729d113c69a4eb6ebc68ae" + integrity sha512-RyegqVGxn0cyYW5yzAwkPlsSEynkdPiegd7RxgB4ak1eKk2Cv1q2x4C7D2sZjeeCEF+q6fOkVmo2OZNqS2iQxg== dependencies: "@ethersproject/transactions" "^5.0.0-beta.135" - underscore "1.9.1" - web3-core-helpers "1.2.11" - web3-core-promievent "1.2.11" - web3-core-subscriptions "1.2.11" - web3-utils "1.2.11" + underscore "1.12.1" + web3-core-helpers "1.3.6" + web3-core-promievent "1.3.6" + web3-core-subscriptions "1.3.6" + web3-utils "1.3.6" -web3-core-promievent@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.11.tgz#51fe97ca0ddec2f99bf8c3306a7a8e4b094ea3cf" - integrity sha512-il4McoDa/Ox9Agh4kyfQ8Ak/9ABYpnF8poBLL33R/EnxLsJOGQG2nZhkJa3I067hocrPSjEdlPt/0bHXsln4qA== +web3-core-promievent@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.3.6.tgz#6c27dc79de8f71b74f5d17acaf9aaf593d3cb0c9" + integrity sha512-Z+QzfyYDTXD5wJmZO5wwnRO8bAAHEItT1XNSPVb4J1CToV/I/SbF7CuF8Uzh2jns0Cm1109o666H7StFFvzVKw== dependencies: eventemitter3 "4.0.4" -web3-core-requestmanager@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.11.tgz#fe6eb603fbaee18530293a91f8cf26d8ae28c45a" - integrity sha512-oFhBtLfOiIbmfl6T6gYjjj9igOvtyxJ+fjS+byRxiwFJyJ5BQOz4/9/17gWR1Cq74paTlI7vDGxYfuvfE/mKvA== +web3-core-requestmanager@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.3.6.tgz#4fea269fe913fd4fca464b4f7c65cb94857b5b2a" + integrity sha512-2rIaeuqeo7QN1Eex7aXP0ZqeteJEPWXYFS/M3r3LXMiV8R4STQBKE+//dnHJXoo2ctzEB5cgd+7NaJM8S3gPyA== dependencies: - underscore "1.9.1" - web3-core-helpers "1.2.11" - web3-providers-http "1.2.11" - web3-providers-ipc "1.2.11" - web3-providers-ws "1.2.11" + underscore "1.12.1" + util "^0.12.0" + web3-core-helpers "1.3.6" + web3-providers-http "1.3.6" + web3-providers-ipc "1.3.6" + web3-providers-ws "1.3.6" -web3-core-subscriptions@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.11.tgz#beca908fbfcb050c16f45f3f0f4c205e8505accd" - integrity sha512-qEF/OVqkCvQ7MPs1JylIZCZkin0aKK9lDxpAtQ1F8niEDGFqn7DT8E/vzbIa0GsOjL2fZjDhWJsaW+BSoAW1gg== +web3-core-subscriptions@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.3.6.tgz#ee24e7974d1d72ff6c992c599deba4ef9b308415" + integrity sha512-wi9Z9X5X75OKvxAg42GGIf81ttbNR2TxzkAsp1g+nnp5K8mBwgZvXrIsDuj7Z7gx72Y45mWJADCWjk/2vqNu8g== dependencies: eventemitter3 "4.0.4" - underscore "1.9.1" - web3-core-helpers "1.2.11" + underscore "1.12.1" + web3-core-helpers "1.3.6" -web3-core@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.11.tgz#1043cacc1becb80638453cc5b2a14be9050288a7" - integrity sha512-CN7MEYOY5ryo5iVleIWRE3a3cZqVaLlIbIzDPsvQRUfzYnvzZQRZBm9Mq+ttDi2STOOzc1MKylspz/o3yq/LjQ== +web3-core@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.3.6.tgz#a6a761d1ff2f3ee462b8dab679229d2f8e267504" + integrity sha512-gkLDM4T1Sc0T+HZIwxrNrwPg0IfWI0oABSglP2X5ZbBAYVUeEATA0o92LWV8BeF+okvKXLK1Fek/p6axwM/h3Q== dependencies: "@types/bn.js" "^4.11.5" "@types/node" "^12.12.6" bignumber.js "^9.0.0" - web3-core-helpers "1.2.11" - web3-core-method "1.2.11" - web3-core-requestmanager "1.2.11" - web3-utils "1.2.11" + web3-core-helpers "1.3.6" + web3-core-method "1.3.6" + web3-core-requestmanager "1.3.6" + web3-utils "1.3.6" -web3-eth-abi@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.11.tgz#a887494e5d447c2926d557a3834edd66e17af9b0" - integrity sha512-PkRYc0+MjuLSgg03QVWqWlQivJqRwKItKtEpRUaxUAeLE7i/uU39gmzm2keHGcQXo3POXAbOnMqkDvOep89Crg== +web3-eth-abi@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.3.6.tgz#4272ca48d817aa651bbf97b269f5ff10abc2b8a9" + integrity sha512-Or5cRnZu6WzgScpmbkvC6bfNxR26hqiKK4i8sMPFeTUABQcb/FU3pBj7huBLYbp9dH+P5W79D2MqwbWwjj9DoQ== dependencies: - "@ethersproject/abi" "5.0.0-beta.153" - underscore "1.9.1" - web3-utils "1.2.11" + "@ethersproject/abi" "5.0.7" + underscore "1.12.1" + web3-utils "1.3.6" -web3-eth-accounts@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.11.tgz#a9e3044da442d31903a7ce035a86d8fa33f90520" - integrity sha512-6FwPqEpCfKIh3nSSGeo3uBm2iFSnFJDfwL3oS9pyegRBXNsGRVpgiW63yhNzL0796StsvjHWwQnQHsZNxWAkGw== +web3-eth-accounts@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.3.6.tgz#f9fcb50b28ee58090ab292a10d996155caa2b474" + integrity sha512-Ilr0hG6ONbCdSlVKffasCmNwftD5HsNpwyQASevocIQwHdTlvlwO0tb3oGYuajbKOaDzNTwXfz25bttAEoFCGA== dependencies: crypto-browserify "3.12.0" eth-lib "0.2.8" ethereumjs-common "^1.3.2" ethereumjs-tx "^2.1.1" scrypt-js "^3.0.1" - underscore "1.9.1" + underscore "1.12.1" uuid "3.3.2" - web3-core "1.2.11" - web3-core-helpers "1.2.11" - web3-core-method "1.2.11" - web3-utils "1.2.11" + web3-core "1.3.6" + web3-core-helpers "1.3.6" + web3-core-method "1.3.6" + web3-utils "1.3.6" -web3-eth-contract@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.11.tgz#917065902bc27ce89da9a1da26e62ef663663b90" - integrity sha512-MzYuI/Rq2o6gn7vCGcnQgco63isPNK5lMAan2E51AJLknjSLnOxwNY3gM8BcKoy4Z+v5Dv00a03Xuk78JowFow== +web3-eth-contract@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.3.6.tgz#cccf4d32dc56917fb6923e778498a9ba2a5ba866" + integrity sha512-8gDaRrLF2HCg+YEZN1ov0zN35vmtPnGf3h1DxmJQK5Wm2lRMLomz9rsWsuvig3UJMHqZAQKD7tOl3ocJocQsmA== dependencies: "@types/bn.js" "^4.11.5" - underscore "1.9.1" - web3-core "1.2.11" - web3-core-helpers "1.2.11" - web3-core-method "1.2.11" - web3-core-promievent "1.2.11" - web3-core-subscriptions "1.2.11" - web3-eth-abi "1.2.11" - web3-utils "1.2.11" - -web3-eth-ens@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.11.tgz#26d4d7f16d6cbcfff918e39832b939edc3162532" - integrity sha512-dbW7dXP6HqT1EAPvnniZVnmw6TmQEKF6/1KgAxbo8iBBYrVTMDGFQUUnZ+C4VETGrwwaqtX4L9d/FrQhZ6SUiA== + underscore "1.12.1" + web3-core "1.3.6" + web3-core-helpers "1.3.6" + web3-core-method "1.3.6" + web3-core-promievent "1.3.6" + web3-core-subscriptions "1.3.6" + web3-eth-abi "1.3.6" + web3-utils "1.3.6" + +web3-eth-ens@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.3.6.tgz#0d28c5d4ea7b4462ef6c077545a77956a6cdf175" + integrity sha512-n27HNj7lpSkRxTgSx+Zo7cmKAgyg2ElFilaFlUu/X2CNH23lXfcPm2bWssivH9z0ndhg0OyR4AYFZqPaqDHkJA== dependencies: content-hash "^2.5.2" eth-ens-namehash "2.0.8" - underscore "1.9.1" - web3-core "1.2.11" - web3-core-helpers "1.2.11" - web3-core-promievent "1.2.11" - web3-eth-abi "1.2.11" - web3-eth-contract "1.2.11" - web3-utils "1.2.11" - -web3-eth-iban@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.11.tgz#f5f73298305bc7392e2f188bf38a7362b42144ef" - integrity sha512-ozuVlZ5jwFC2hJY4+fH9pIcuH1xP0HEFhtWsR69u9uDIANHLPQQtWYmdj7xQ3p2YT4bQLq/axKhZi7EZVetmxQ== + underscore "1.12.1" + web3-core "1.3.6" + web3-core-helpers "1.3.6" + web3-core-promievent "1.3.6" + web3-eth-abi "1.3.6" + web3-eth-contract "1.3.6" + web3-utils "1.3.6" + +web3-eth-iban@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.3.6.tgz#0d6ba21fe78f190af8919e9cd5453882457209e0" + integrity sha512-nfMQaaLA/zsg5W4Oy/EJQbs8rSs1vBAX6b/35xzjYoutXlpHMQadujDx2RerTKhSHqFXSJeQAfE+2f6mdhYkRQ== dependencies: bn.js "^4.11.9" - web3-utils "1.2.11" + web3-utils "1.3.6" -web3-eth-personal@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.11.tgz#a38b3942a1d87a62070ce0622a941553c3d5aa70" - integrity sha512-42IzUtKq9iHZ8K9VN0vAI50iSU9tOA1V7XU2BhF/tb7We2iKBVdkley2fg26TxlOcKNEHm7o6HRtiiFsVK4Ifw== +web3-eth-personal@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.3.6.tgz#226137916754c498f0284f22c55924c87a2efcf0" + integrity sha512-pOHU0+/h1RFRYoh1ehYBehRbcKWP4OSzd4F7mDljhHngv6W8ewMHrAN8O1ol9uysN2MuCdRE19qkRg5eNgvzFQ== dependencies: "@types/node" "^12.12.6" - web3-core "1.2.11" - web3-core-helpers "1.2.11" - web3-core-method "1.2.11" - web3-net "1.2.11" - web3-utils "1.2.11" - -web3-eth@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.11.tgz#4c81fcb6285b8caf544058fba3ae802968fdc793" - integrity sha512-REvxW1wJ58AgHPcXPJOL49d1K/dPmuw4LjPLBPStOVkQjzDTVmJEIsiLwn2YeuNDd4pfakBwT8L3bz1G1/wVsQ== - dependencies: - underscore "1.9.1" - web3-core "1.2.11" - web3-core-helpers "1.2.11" - web3-core-method "1.2.11" - web3-core-subscriptions "1.2.11" - web3-eth-abi "1.2.11" - web3-eth-accounts "1.2.11" - web3-eth-contract "1.2.11" - web3-eth-ens "1.2.11" - web3-eth-iban "1.2.11" - web3-eth-personal "1.2.11" - web3-net "1.2.11" - web3-utils "1.2.11" - -web3-net@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.11.tgz#eda68ef25e5cdb64c96c39085cdb74669aabbe1b" - integrity sha512-sjrSDj0pTfZouR5BSTItCuZ5K/oZPVdVciPQ6981PPPIwJJkCMeVjD7I4zO3qDPCnBjBSbWvVnLdwqUBPtHxyg== - dependencies: - web3-core "1.2.11" - web3-core-method "1.2.11" - web3-utils "1.2.11" - -web3-providers-http@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.11.tgz#1cd03442c61670572d40e4dcdf1faff8bd91e7c6" - integrity sha512-psh4hYGb1+ijWywfwpB2cvvOIMISlR44F/rJtYkRmQ5jMvG4FOCPlQJPiHQZo+2cc3HbktvvSJzIhkWQJdmvrA== - dependencies: - web3-core-helpers "1.2.11" + web3-core "1.3.6" + web3-core-helpers "1.3.6" + web3-core-method "1.3.6" + web3-net "1.3.6" + web3-utils "1.3.6" + +web3-eth@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.3.6.tgz#2c650893d540a7a0eb1365dd5b2dca24ac919b7c" + integrity sha512-9+rnywRRpyX3C4hfsAQXPQh6vHh9XzQkgLxo3gyeXfbhbShUoq2gFVuy42vsRs//6JlsKdyZS7Z3hHPHz2wreA== + dependencies: + underscore "1.12.1" + web3-core "1.3.6" + web3-core-helpers "1.3.6" + web3-core-method "1.3.6" + web3-core-subscriptions "1.3.6" + web3-eth-abi "1.3.6" + web3-eth-accounts "1.3.6" + web3-eth-contract "1.3.6" + web3-eth-ens "1.3.6" + web3-eth-iban "1.3.6" + web3-eth-personal "1.3.6" + web3-net "1.3.6" + web3-utils "1.3.6" + +web3-net@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.3.6.tgz#a56492e2227475e38db29394f8bac305a2446e41" + integrity sha512-KhzU3wMQY/YYjyMiQzbaLPt2kut88Ncx2iqjy3nw28vRux3gVX0WOCk9EL/KVJBiAA/fK7VklTXvgy9dZnnipw== + dependencies: + web3-core "1.3.6" + web3-core-method "1.3.6" + web3-utils "1.3.6" + +web3-providers-http@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.3.6.tgz#36e8724a7424d52827819d53fd75dbf31f5422c2" + integrity sha512-OQkT32O1A06dISIdazpGLveZcOXhEo5cEX6QyiSQkiPk/cjzDrXMw4SKZOGQbbS1+0Vjizm1Hrp7O8Vp2D1M5Q== + dependencies: + web3-core-helpers "1.3.6" xhr2-cookies "1.1.0" -web3-providers-ipc@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.11.tgz#d16d6c9be1be6e0b4f4536c4acc16b0f4f27ef21" - integrity sha512-yhc7Y/k8hBV/KlELxynWjJDzmgDEDjIjBzXK+e0rHBsYEhdCNdIH5Psa456c+l0qTEU2YzycF8VAjYpWfPnBpQ== +web3-providers-ipc@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.3.6.tgz#cef8d12c1ebb47adce5ebf597f553c623362cb4a" + integrity sha512-+TVsSd2sSVvVgHG4s6FXwwYPPT91boKKcRuEFXqEfAbUC5t52XOgmyc2LNiD9LzPhed65FbV4LqICpeYGUvSwA== dependencies: - oboe "2.1.4" - underscore "1.9.1" - web3-core-helpers "1.2.11" + oboe "2.1.5" + underscore "1.12.1" + web3-core-helpers "1.3.6" -web3-providers-ws@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.11.tgz#a1dfd6d9778d840561d9ec13dd453046451a96bb" - integrity sha512-ZxnjIY1Er8Ty+cE4migzr43zA/+72AF1myzsLaU5eVgdsfV7Jqx7Dix1hbevNZDKFlSoEyq/3j/jYalh3So1Zg== +web3-providers-ws@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.3.6.tgz#e1df617bc89d66165abdf2191da0014c505bfaac" + integrity sha512-bk7MnJf5or0Re2zKyhR3L3CjGululLCHXx4vlbc/drnaTARUVvi559OI5uLytc/1k5HKUUyENAxLvetz2G1dnQ== dependencies: eventemitter3 "4.0.4" - underscore "1.9.1" - web3-core-helpers "1.2.11" - websocket "^1.0.31" + underscore "1.12.1" + web3-core-helpers "1.3.6" + websocket "^1.0.32" -web3-shh@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.11.tgz#f5d086f9621c9a47e98d438010385b5f059fd88f" - integrity sha512-B3OrO3oG1L+bv3E1sTwCx66injW1A8hhwpknDUbV+sw3fehFazA06z9SGXUefuFI1kVs4q2vRi0n4oCcI4dZDg== +web3-shh@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.3.6.tgz#4e3486c7eca5cbdb87f88910948223a5b7ea6c20" + integrity sha512-9zRo415O0iBslxBnmu9OzYjNErzLnzOsy+IOvSpIreLYbbAw0XkDWxv3SfcpKnTIWIACBR4AYMIxmmyi5iB3jw== dependencies: - web3-core "1.2.11" - web3-core-method "1.2.11" - web3-core-subscriptions "1.2.11" - web3-net "1.2.11" + web3-core "1.3.6" + web3-core-method "1.3.6" + web3-core-subscriptions "1.3.6" + web3-net "1.3.6" -web3-utils@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.11.tgz#af1942aead3fb166ae851a985bed8ef2c2d95a82" - integrity sha512-3Tq09izhD+ThqHEaWYX4VOT7dNPdZiO+c/1QMA0s5X2lDFKK/xHJb7cyTRRVzN2LvlHbR7baS1tmQhSua51TcQ== +web3-utils@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.3.6.tgz#390bc9fa3a7179746963cfaca55bb80ac4d8dc10" + integrity sha512-hHatFaQpkQgjGVER17gNx8u1qMyaXFZtM0y0XLGH1bzsjMPlkMPLRcYOrZ00rOPfTEuYFOdrpGOqZXVmGrMZRg== dependencies: bn.js "^4.11.9" eth-lib "0.2.8" @@ -3642,26 +4184,26 @@ web3-utils@1.2.11: ethjs-unit "0.1.6" number-to-bn "1.7.0" randombytes "^2.1.0" - underscore "1.9.1" + underscore "1.12.1" utf8 "3.0.0" -web3@^1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.11.tgz#50f458b2e8b11aa37302071c170ed61cff332975" - integrity sha512-mjQ8HeU41G6hgOYm1pmeH0mRAeNKJGnJEUzDMoerkpw7QUQT4exVREgF1MYPvL/z6vAshOXei25LE/t/Bxl8yQ== +web3@^1.3.0: + version "1.3.6" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.3.6.tgz#599425461c3f9a8cbbefa70616438995f4a064cc" + integrity sha512-jEpPhnL6GDteifdVh7ulzlPrtVQeA30V9vnki9liYlUvLV82ZM7BNOQJiuzlDePuE+jZETZSP/0G/JlUVt6pOA== dependencies: - web3-bzz "1.2.11" - web3-core "1.2.11" - web3-eth "1.2.11" - web3-eth-personal "1.2.11" - web3-net "1.2.11" - web3-shh "1.2.11" - web3-utils "1.2.11" + web3-bzz "1.3.6" + web3-core "1.3.6" + web3-eth "1.3.6" + web3-eth-personal "1.3.6" + web3-net "1.3.6" + web3-shh "1.3.6" + web3-utils "1.3.6" -websocket@^1.0.31: - version "1.0.32" - resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.32.tgz#1f16ddab3a21a2d929dec1687ab21cfdc6d3dbb1" - integrity sha512-i4yhcllSP4wrpoPMU2N0TQ/q0O94LRG/eUQjEAamRltjQ1oT1PFFKOG4i877OlJgCG8rw6LrrowJp+TYCEWF7Q== +websocket@^1.0.32: + version "1.0.34" + resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.34.tgz#2bdc2602c08bf2c82253b730655c0ef7dcab3111" + integrity sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ== dependencies: bufferutil "^4.0.1" debug "^2.2.0" @@ -3670,6 +4212,30 @@ websocket@^1.0.31: utf-8-validate "^5.0.2" yaeti "^0.0.6" +which-boxed-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + +which-typed-array@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.4.tgz#8fcb7d3ee5adf2d771066fba7cf37e32fe8711ff" + integrity sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA== + dependencies: + available-typed-arrays "^1.0.2" + call-bind "^1.0.0" + es-abstract "^1.18.0-next.1" + foreach "^2.0.5" + function-bind "^1.1.1" + has-symbols "^1.0.1" + is-typed-array "^1.1.3" + which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" From 56430e00dc8dfcd05bdf34053bc83cc3db22238c Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Wed, 30 Jun 2021 20:39:25 +0800 Subject: [PATCH 134/254] Update for price per full share checking. --- services/vaults/apy/save/handler.js | 6 ++++-- services/vaults/apy/save/historical-handle.js | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index 2365c07..09e277a 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -286,8 +286,10 @@ const getApyForVault = async (vault) => { contract = new archiveNodeWeb3.eth.Contract(testContracts.farmer['daoSTO'].abi, testContracts.farmer['daoSTO'].address); } - const pricePerFullShareCurrent = await getFaangPricePerFullShare(contract, currentBlockNbr, inceptionBlockNbr); - const pricePerFullShareOneDayAgo = await getFaangPricePerFullShare(contract, oneDayAgoBlock, inceptionBlockNbr); + let pricePerFullShareCurrent = await getFaangPricePerFullShare(contract, currentBlockNbr, inceptionBlockNbr); + let pricePerFullShareOneDayAgo = await getFaangPricePerFullShare(contract, oneDayAgoBlock, inceptionBlockNbr); + pricePerFullShareCurrent = (0 < pricePerFullShareCurrent) ? pricePerFullShareCurrent : 1; + pricePerFullShareOneDayAgo = (0 < pricePerFullShareOneDayAgo) ? pricePerFullShareOneDayAgo : 1; // APY Calculation const n = 365 / 2; // Assume 2 days to trigger invest function diff --git a/services/vaults/apy/save/historical-handle.js b/services/vaults/apy/save/historical-handle.js index 1908918..d4a6c8f 100644 --- a/services/vaults/apy/save/historical-handle.js +++ b/services/vaults/apy/save/historical-handle.js @@ -283,8 +283,10 @@ const getApyForVault = async (vault) => { contract = new archiveNodeWeb3.eth.Contract(testContracts.farmer['daoSTO'].abi, testContracts.farmer['daoSTO'].address); } - const pricePerFullShareCurrent = await getFaangPricePerFullShare(contract, currentBlockNbr, inceptionBlockNbr); - const pricePerFullShareOneDayAgo = await getFaangPricePerFullShare(contract, oneDayAgoBlock, inceptionBlockNbr); + let pricePerFullShareCurrent = await getFaangPricePerFullShare(contract, currentBlockNbr, inceptionBlockNbr); + let pricePerFullShareOneDayAgo = await getFaangPricePerFullShare(contract, oneDayAgoBlock, inceptionBlockNbr); + pricePerFullShareCurrent = (0 < pricePerFullShareCurrent) ? pricePerFullShareCurrent : 1; + pricePerFullShareOneDayAgo = (0 < pricePerFullShareOneDayAgo) ? pricePerFullShareOneDayAgo : 1; // APY Calculation const n = 365 / 2; // Assume 2 days to trigger invest function From c2fdbd5ff06ac92044e0b09fbc177b9cd08352d3 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Wed, 30 Jun 2021 20:49:12 +0800 Subject: [PATCH 135/254] Update DAOmine mainnet address. --- config/serverless/domain.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 36588f7..2e290f0 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -309,9 +309,9 @@ const mainContracts = { tokenId: "dai", }, daoCDV: { - address: "", // TODO Update on mainnet + address: "0x8fe826cc1225b03aa06477ad5af745aed5fe7066", abi: abi.citadelABIContract, - strategyAddress: "", // TODO Update on mainnet + strategyAddress: "0x8a00046ab28051a952e64a886cd8961ca90a59bd", strategyABI: abi.citadelStrategyABIContract, contractType: "citadel", tokenId: ["tether", "usd-coin", "dai"], @@ -356,20 +356,20 @@ const mainContracts = { }, }, vipDVG: { - address: "", // TODO: Update mainnet address + address: "0xd6ce913c3e81b5e67a6b94d705d9e7cddf073a7e", abi: abi.xDVGABIContract, tokenId: "xDVG", - lastMeasurement: 0, // TODO Update lastMeasurement + lastMeasurement: 12670237, }, DVG: { - address: "", // TODO: Update mainnet address + address: "0x51e00a95748dbd2a3f47bc5c3b3e7b3f0fea666c", abi: abi.xDVGABIContract, tokenId: "DVG", }, daoStake: { - address: "", // TODO Update mainnet address + address: "0x8437a6bf9235fd003d50cd4024fa7ec6979208d5", abi: abi.daoStakeContract, - startBlock: 25055584, // TODO Update mainnet block + startBlock: 12734615, poolPercent: 0.51 }, uniswap: { From d892cf4bbef6a437334c977ee136e8cda8f9aac2 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Wed, 30 Jun 2021 21:36:58 +0800 Subject: [PATCH 136/254] Added mainnet uniswapp dvg eth --- config/serverless/domain.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/serverless/domain.js b/config/serverless/domain.js index d1d913a..fb24b66 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -406,7 +406,7 @@ const mainContracts = { }, uniswap: { ethDVG: { - address: "", // TODO Update mainnet address + address: "0xd11aD84D720A5e7fA11c8412Af6C1cAA815a436d", abi: abi.uniswapPairABIContract, } }, From 5a3ee26442ce812acbfbc094bc891cd59a5a9aff Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Wed, 30 Jun 2021 23:12:54 +0800 Subject: [PATCH 137/254] Fixed the adddresss --- services/vaults/apy/save/vaults.js | 105 ++++++++++++----------------- 1 file changed, 42 insertions(+), 63 deletions(-) diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 1bc589a..00f6dec 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -1,7 +1,7 @@ const config = require("./config.js"); const abi = require('../../../../config/abi') -const mainVaults = [ +const testVaults = [ { id: "cDAI", name: "Compound DAI", @@ -176,7 +176,7 @@ const mainVaults = [ symbol: ["USDT","USDC","DAI"], description: "DAO Vault Elon for 3 stablecoins", vaultSymbol: "daoELO", - erc20address: ["0xdAC17F958D2ee523a2206206994597C13D831ec7", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0x6b175474e89094c44da98b954eedeac495271d0f"], + erc20address: ["0xdac17f958d2ee523a2206206994597c13d831ec7", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0x6b175474e89094c44da98b954eedeac495271d0f"], vaultContractAddress: "0x2d9a136cf87d599628bcbdfb6c4fe75acd2a0aa8", vaultContractABI: abi.elonApeVaultContract, balance: 0, @@ -283,14 +283,14 @@ const mainVaults = [ }, ]; -const testVaults = [ +const mainVaults = [ { id: "cDAI", name: "Compound DAI", symbol: "cDAI", description: "Compound DAI", - erc20address: "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa", - vaultContractAddress: "0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d", + erc20address: "0x6b175474e89094c44da98b954eedeac495271d0f", + vaultContractAddress: "0x43c20638c3914eca3c96e9cac8ebe7d652be45c6", vaultContractABI: abi.cDAIContract, balance: 0, vaultBalance: 0, @@ -299,7 +299,7 @@ const testVaults = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 10650116, + lastMeasurement: 12125533, measurement: 1e18, price_id: "dai", vaultSymbol: 'cDAI', @@ -310,8 +310,8 @@ const testVaults = [ name: "Compound USDC", symbol: "cUSDC", description: "Compound USDC", - erc20address: "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", - vaultContractAddress: "0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e", + erc20address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + vaultContractAddress: "0xd1d7f950899c0269a7f2aad5e854cdc3a1350ba9", vaultContractABI: abi.cUSDCContract, balance: 0, vaultBalance: 0, @@ -320,7 +320,7 @@ const testVaults = [ depositAll: false, withdraw: true, withdrawAll: false, - lastMeasurement: 10532708, + lastMeasurement: 12125523, measurement: 1e18, price_id: "usd-coin", vaultSymbol: 'cUSDC', @@ -331,8 +331,8 @@ const testVaults = [ name: "Compound USDT", symbol: "cUSDT", description: "Compound USDT", - erc20address: "0x07de306ff27a2b630b1141956844eb1552b956b5", - vaultContractAddress: "0x5d102e0bdf2037899e1ff2e8cc50987108533c52", + erc20address: "0xdac17f958d2ee523a2206206994597c13d831ec7", + vaultContractAddress: "0xeece6ad323a93d4b021bdaac587dcc04b5cf0a78", vaultContractABI: abi.cUSDTContract, balance: 0, vaultBalance: 0, @@ -341,7 +341,7 @@ const testVaults = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 10651402, + lastMeasurement: 12125523, measurement: 1e18, price_id: "tether", vaultSymbol: 'cUSDT', @@ -353,8 +353,8 @@ const testVaults = [ symbol: "DAI", description: "DAI Stablecoin", vaultSymbol: "yDAI", - erc20address: "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa", - vaultContractAddress: "0x5c2eea0a960cc1f604bf3c35a52ca2273f12e67e", + erc20address: "0x6b175474e89094c44da98b954eedeac495271d0f", + vaultContractAddress: "0xacd43e627e64355f1861cec6d3a6688b31a6f952", vaultContractABI: config.vaultContractV2ABI, balance: 0, vaultBalance: 0, @@ -363,7 +363,7 @@ const testVaults = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 24563615, + lastMeasurement: 10650116, measurement: 1e18, price_id: "dai", isYearn: true, @@ -374,8 +374,8 @@ const testVaults = [ symbol: "TUSD", description: "TrueUSD", vaultSymbol: "yTUSD", - erc20address: "0xf0a112a9da3cae4668270729c3d5917b6cb79564", - vaultContractAddress: "0xa8564f8d255c33175d4882e55f1a6d19e7a7d351", + erc20address: "0x0000000000085d4780b73119b644ae5ecd22b376", + vaultContractAddress: "0x37d19d1c4e1fa9dc47bd1ea12f742a0887eda74a", vaultContractABI: config.vaultContractV2ABI, balance: 0, vaultBalance: 0, @@ -384,7 +384,7 @@ const testVaults = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 24737399, + lastMeasurement: 10603368, measurement: 1e18, price_id: "true-usd", isYearn: true, @@ -395,8 +395,8 @@ const testVaults = [ symbol: "USDC", description: "USD//C", vaultSymbol: "yUSDC", - erc20address: "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", - vaultContractAddress: "0xabdb489ded91b6646fadc8eeb0ca82ea1d526182", + erc20address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + vaultContractAddress: "0x597ad1e0c13bfe8025993d9e79c69e1c0233522e", vaultContractABI: config.vaultContractABI, balance: 0, vaultBalance: 0, @@ -405,7 +405,7 @@ const testVaults = [ depositAll: false, withdraw: true, withdrawAll: false, - lastMeasurement: 24563583, + lastMeasurement: 10532708, measurement: 1e18, price_id: "usd-coin", isYearn: true, @@ -416,8 +416,8 @@ const testVaults = [ symbol: "USDT", description: "Tether USD", vaultSymbol: "yUSDT", - erc20address: "0x07de306ff27a2b630b1141956844eb1552b956b5", - vaultContractAddress: "0xa5c53c76729e92630a2a3c549215110a330c902d", + erc20address: "0xdac17f958d2ee523a2206206994597c13d831ec7", + vaultContractAddress: "0x2f08119c6f07c006695e079aafc638b8789faf18", vaultContractABI: config.vaultContractV2ABI, balance: 0, vaultBalance: 0, @@ -426,7 +426,7 @@ const testVaults = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 24547196, + lastMeasurement: 10651402, measurement: 1e18, price_id: "tether", isYearn: true, @@ -437,8 +437,8 @@ const testVaults = [ symbol: ["USDT","USDC","DAI"], description: "DAO Vault Citadel for 3 stablecoins", vaultSymbol: "daoCDV", - erc20address: ["0x07de306ff27a2b630b1141956844eb1552b956b5", "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa"], - vaultContractAddress: "0x626c25ca5b86277f395c0e40dbdf51f2a302ab43", + erc20address: ["0xdac17f958d2ee523a2206206994597c13d831ec7", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0x6b175474e89094c44da98b954eedeac495271d0f"], + vaultContractAddress: "0x8fe826cc1225b03aa06477ad5af745aed5fe7066", vaultContractABI: config.vaultCitadelABI, balance: 0, vaultBalance: 0, @@ -447,7 +447,7 @@ const testVaults = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 25336169, + lastMeasurement: 12586420, measurement: 1e18, price_id: ["tether", "usd-coin", "dai"], isCitadel: true, @@ -458,8 +458,8 @@ const testVaults = [ symbol: ["USDT","USDC","DAI"], description: "DAO Vault Elon for 3 stablecoins", vaultSymbol: "daoELO", - erc20address: ["0x07de306ff27a2b630b1141956844eb1552b956b5", "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa"], - vaultContractAddress: "0xf03fa8553379d872b4e2Bafbc679409Fb82604c2", + erc20address: ["0xdAC17F958D2ee523a2206206994597C13D831ec7", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0x6b175474e89094c44da98b954eedeac495271d0f"], + vaultContractAddress: "0x2d9a136cf87d599628bcbdfb6c4fe75acd2a0aa8", vaultContractABI: abi.elonApeVaultContract, balance: 0, vaultBalance: 0, @@ -468,42 +468,21 @@ const testVaults = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 25413059, + lastMeasurement: 12722655, measurement: 1e18, price_id: ["tether", "usd-coin", "dai"], isElon: true, }, - { - id: "daoSTO", - name: "DAO Vault Stonks", - symbol: ["USDT","USDC","DAI"], - description: "DAO Vault Stonks for 3 stablecoins", - vaultSymbol: "daoSTO", - erc20address: ["0x07de306ff27a2b630b1141956844eb1552b956b5", "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa"], - vaultContractAddress: "0xf03fa8553379d872b4e2Bafbc679409Fb82604c2", - vaultContractABI: abi.daoFaangStonkVaultContract, - balance: 0, - vaultBalance: 0, - decimals: 18, - deposit: true, - depositAll: true, - withdraw: true, - withdrawAll: true, - lastMeasurement: 25680643, - measurement: 1e18, - price_id: ["tether", "usd-coin", "dai"], - isFaang: true, - }, { id: "hfDAI", name: "DAI", symbol: "DAI", description: "DAI Stablecoin", vaultSymbol: "hfDAI", - erc20address: "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa", - vaultContractAddress: "0x0f89EE5b95d1d5cfb10F29775d816fC6D8Adb9FC", + erc20address: "0x6b175474e89094c44da98b954eedeac495271d0f", + vaultContractAddress: "0xe4e6ce7c1d9ff44db27f622accbb0753c2f48955", vaultContractABI: abi.hfVaultContract, - strategyContractAddress: "0xE5331cAF0B4E15C88E878551b93df0647738Af35", + strategyContractAddress: "0xef9a15025c2ed048a67c5c8019a1101172eeb51c", strategyABI: abi.hfStrategyContract, balance: 0, vaultBalance: 0, @@ -512,7 +491,7 @@ const testVaults = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 24943134, + lastMeasurement: 12593517, measurement: 1e18, price_id: "dai", isHarvest: true @@ -523,10 +502,10 @@ const testVaults = [ symbol: "USDC", description: "USD//C", vaultSymbol: "hfUSDC", - erc20address: "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", - vaultContractAddress: "0x54783464848b35d6fb9bba37C1dDd23aC3B1A11A", + erc20address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + vaultContractAddress: "0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc", vaultContractABI: abi.hfVaultContract, - strategyContractAddress: "0xE5331cAF0B4E15C88E878551b93df0647738Af35", + strategyContractAddress: "0x0af9547974e056fca221f679dbbb7f8651407d7f", strategyABI: abi.hfStrategyContract, balance: 0, vaultBalance: 0, @@ -535,7 +514,7 @@ const testVaults = [ depositAll: false, withdraw: true, withdrawAll: false, - lastMeasurement: 24943141, + lastMeasurement: 12593522, measurement: 1e18, price_id: "usd-coin", isHarvest: true @@ -546,10 +525,10 @@ const testVaults = [ symbol: "USDT", description: "Tether USD", vaultSymbol: "hfUSDT", - erc20address: "0x07de306ff27a2b630b1141956844eb1552b956b5", - vaultContractAddress: "0xb41A49De82e95dc1E028839C3440Ac97f9A7832C", + erc20address: "0xdac17f958d2ee523a2206206994597c13d831ec7", + vaultContractAddress: "0x2cc1507e6e3c844eeb77db90d193489f1ddfb299", vaultContractABI: abi.hfVaultContract, - strategyContractAddress: "0x0bFA86d10A383B435748E39Cedf8852CFD2B1A9d", + strategyContractAddress: "0x89541e3b8e8b73c108744909ea11d506b4a8e6c7", strategyABI: abi.hfStrategyContract, balance: 0, vaultBalance: 0, @@ -558,7 +537,7 @@ const testVaults = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 24943148, + lastMeasurement: 12593527, measurement: 1e18, price_id: "tether", isHarvest: true From bd6df588b5fff53c3f06b114d87ad3f8de1ace55 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Thu, 1 Jul 2021 10:59:12 +0800 Subject: [PATCH 138/254] Update FAANG Stonk kovan address. --- services/vaults/apy/save/vaults.js | 291 ++++++++++++++++++++++++++++- 1 file changed, 288 insertions(+), 3 deletions(-) diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 2915b31..bf0e2eb 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -1,7 +1,7 @@ const config = require("./config.js"); const abi = require('../../../../config/abi') -module.exports = [ +const testVaults = [ { id: "cDAI", name: "Compound DAI", @@ -176,8 +176,8 @@ module.exports = [ symbol: ["USDT","USDC","DAI"], description: "DAO Vault Elon for 3 stablecoins", vaultSymbol: "daoELO", - erc20address: ["0x07de306ff27a2b630b1141956844eb1552b956b5", "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa"], - vaultContractAddress: "0xf03fa8553379d872b4e2Bafbc679409Fb82604c2", + erc20address: ["0xdac17f958d2ee523a2206206994597c13d831ec7", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0x6b175474e89094c44da98b954eedeac495271d0f"], + vaultContractAddress: "0x2d9a136cf87d599628bcbdfb6c4fe75acd2a0aa8", vaultContractABI: abi.elonApeVaultContract, balance: 0, vaultBalance: 0, @@ -282,3 +282,288 @@ module.exports = [ isHarvest: true }, ]; + +const mainVaults = [ + { + id: "cDAI", + name: "Compound DAI", + symbol: "cDAI", + description: "Compound DAI", + erc20address: "0x6b175474e89094c44da98b954eedeac495271d0f", + vaultContractAddress: "0x43c20638c3914eca3c96e9cac8ebe7d652be45c6", + vaultContractABI: abi.cDAIContract, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 12125533, + measurement: 1e18, + price_id: "dai", + vaultSymbol: 'cDAI', + isCompound: true, + }, + { + id: "cUSDC", + name: "Compound USDC", + symbol: "cUSDC", + description: "Compound USDC", + erc20address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + vaultContractAddress: "0xd1d7f950899c0269a7f2aad5e854cdc3a1350ba9", + vaultContractABI: abi.cUSDCContract, + balance: 0, + vaultBalance: 0, + decimals: 6, + deposit: true, + depositAll: false, + withdraw: true, + withdrawAll: false, + lastMeasurement: 12125523, + measurement: 1e18, + price_id: "usd-coin", + vaultSymbol: 'cUSDC', + isCompound: true, + }, + { + id: "cUSDT", + name: "Compound USDT", + symbol: "cUSDT", + description: "Compound USDT", + erc20address: "0xdac17f958d2ee523a2206206994597c13d831ec7", + vaultContractAddress: "0xeece6ad323a93d4b021bdaac587dcc04b5cf0a78", + vaultContractABI: abi.cUSDTContract, + balance: 0, + vaultBalance: 0, + decimals: 6, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 12125523, + measurement: 1e18, + price_id: "tether", + vaultSymbol: 'cUSDT', + isCompound: true, + }, + { + id: "DAI", + name: "DAI", + symbol: "DAI", + description: "DAI Stablecoin", + vaultSymbol: "yDAI", + erc20address: "0x6b175474e89094c44da98b954eedeac495271d0f", + vaultContractAddress: "0xacd43e627e64355f1861cec6d3a6688b31a6f952", + vaultContractABI: config.vaultContractV2ABI, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 10650116, + measurement: 1e18, + price_id: "dai", + isYearn: true, + }, + { + id: "TUSD", + name: "TUSD", + symbol: "TUSD", + description: "TrueUSD", + vaultSymbol: "yTUSD", + erc20address: "0x0000000000085d4780b73119b644ae5ecd22b376", + vaultContractAddress: "0x37d19d1c4e1fa9dc47bd1ea12f742a0887eda74a", + vaultContractABI: config.vaultContractV2ABI, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 10603368, + measurement: 1e18, + price_id: "true-usd", + isYearn: true, + }, + { + id: "USDC", + name: "USD Coin", + symbol: "USDC", + description: "USD//C", + vaultSymbol: "yUSDC", + erc20address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + vaultContractAddress: "0x597ad1e0c13bfe8025993d9e79c69e1c0233522e", + vaultContractABI: config.vaultContractABI, + balance: 0, + vaultBalance: 0, + decimals: 6, + deposit: true, + depositAll: false, + withdraw: true, + withdrawAll: false, + lastMeasurement: 10532708, + measurement: 1e18, + price_id: "usd-coin", + isYearn: true, + }, + { + id: "USDT", + name: "USDT", + symbol: "USDT", + description: "Tether USD", + vaultSymbol: "yUSDT", + erc20address: "0xdac17f958d2ee523a2206206994597c13d831ec7", + vaultContractAddress: "0x2f08119c6f07c006695e079aafc638b8789faf18", + vaultContractABI: config.vaultContractV2ABI, + balance: 0, + vaultBalance: 0, + decimals: 6, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 10651402, + measurement: 1e18, + price_id: "tether", + isYearn: true, + }, + { + id: "daoCDV", + name: "DAO Vault Citadel", + symbol: ["USDT","USDC","DAI"], + description: "DAO Vault Citadel for 3 stablecoins", + vaultSymbol: "daoCDV", + erc20address: ["0xdac17f958d2ee523a2206206994597c13d831ec7", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0x6b175474e89094c44da98b954eedeac495271d0f"], + vaultContractAddress: "0x8fe826cc1225b03aa06477ad5af745aed5fe7066", + vaultContractABI: config.vaultCitadelABI, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 12586420, + measurement: 1e18, + price_id: ["tether", "usd-coin", "dai"], + isCitadel: true, + }, + { + id: "daoELO", + name: "DAO Vault Elon", + symbol: ["USDT","USDC","DAI"], + description: "DAO Vault Elon for 3 stablecoins", + vaultSymbol: "daoELO", + erc20address: ["0xdAC17F958D2ee523a2206206994597C13D831ec7", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0x6b175474e89094c44da98b954eedeac495271d0f"], + vaultContractAddress: "0x2d9a136cf87d599628bcbdfb6c4fe75acd2a0aa8", + vaultContractABI: abi.elonApeVaultContract, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 12722655, + measurement: 1e18, + price_id: ["tether", "usd-coin", "dai"], + isElon: true, + }, + // TODO: Update to mainnet addresss + // { + // id: "daoSTO", + // name: "DAO Vault Stonks", + // symbol: ["USDT","USDC","DAI"], + // description: "DAO Vault Stonks for 3 stablecoins", + // vaultSymbol: "daoSTO", + // erc20address: ["0xdAC17F958D2ee523a2206206994597C13D831ec7", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0x6b175474e89094c44da98b954eedeac495271d0f"], + // vaultContractAddress: "", + // vaultContractABI: abi.daoFaangStonkVaultContract, + // balance: 0, + // vaultBalance: 0, + // decimals: 18, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // lastMeasurement: "", + // measurement: 1e18, + // price_id: ["tether", "usd-coin", "dai"], + // isFaang: true, + // }, + { + id: "hfDAI", + name: "DAI", + symbol: "DAI", + description: "DAI Stablecoin", + vaultSymbol: "hfDAI", + erc20address: "0x6b175474e89094c44da98b954eedeac495271d0f", + vaultContractAddress: "0xe4e6ce7c1d9ff44db27f622accbb0753c2f48955", + vaultContractABI: abi.hfVaultContract, + strategyContractAddress: "0xef9a15025c2ed048a67c5c8019a1101172eeb51c", + strategyABI: abi.hfStrategyContract, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 12593517, + measurement: 1e18, + price_id: "dai", + isHarvest: true + }, + { + id: "hfUSDC", + name: "USD Coin", + symbol: "USDC", + description: "USD//C", + vaultSymbol: "hfUSDC", + erc20address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + vaultContractAddress: "0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc", + vaultContractABI: abi.hfVaultContract, + strategyContractAddress: "0x0af9547974e056fca221f679dbbb7f8651407d7f", + strategyABI: abi.hfStrategyContract, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: false, + withdraw: true, + withdrawAll: false, + lastMeasurement: 12593522, + measurement: 1e18, + price_id: "usd-coin", + isHarvest: true + }, + { + id: "hfUSDT", + name: "USDT", + symbol: "USDT", + description: "Tether USD", + vaultSymbol: "hfUSDT", + erc20address: "0xdac17f958d2ee523a2206206994597c13d831ec7", + vaultContractAddress: "0x2cc1507e6e3c844eeb77db90d193489f1ddfb299", + vaultContractABI: abi.hfVaultContract, + strategyContractAddress: "0x89541e3b8e8b73c108744909ea11d506b4a8e6c7", + strategyABI: abi.hfStrategyContract, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 12593527, + measurement: 1e18, + price_id: "tether", + isHarvest: true + }, +]; + +module.exports = (process.env.PRODUCTION != '') ? mainVaults : testVaults; \ No newline at end of file From 1ddd1e192e801710ba42ad4180e4805340c7b5f3 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Thu, 1 Jul 2021 11:40:39 +0800 Subject: [PATCH 139/254] Update Elon Ape and FAANG kovan address. --- services/vaults/apy/save/vaults.js | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 00f6dec..65c9641 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -176,8 +176,8 @@ const testVaults = [ symbol: ["USDT","USDC","DAI"], description: "DAO Vault Elon for 3 stablecoins", vaultSymbol: "daoELO", - erc20address: ["0xdac17f958d2ee523a2206206994597c13d831ec7", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0x6b175474e89094c44da98b954eedeac495271d0f"], - vaultContractAddress: "0x2d9a136cf87d599628bcbdfb6c4fe75acd2a0aa8", + erc20address: ["0x07de306ff27a2b630b1141956844eb1552b956b5", "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa"], + vaultContractAddress: "0xf03fa8553379d872b4e2bafbc679409fb82604c2", vaultContractABI: abi.elonApeVaultContract, balance: 0, vaultBalance: 0, @@ -186,7 +186,7 @@ const testVaults = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 12722655, + lastMeasurement: 25413059, measurement: 1e18, price_id: ["tether", "usd-coin", "dai"], isElon: true, @@ -198,7 +198,7 @@ const testVaults = [ description: "DAO Vault Stonks for 3 stablecoins", vaultSymbol: "daoSTO", erc20address: ["0x07de306ff27a2b630b1141956844eb1552b956b5", "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa"], - vaultContractAddress: "0xf03fa8553379d872b4e2Bafbc679409Fb82604c2", + vaultContractAddress: "0xe97f5e5a755f8e633d23a2bae167b628dec22948", vaultContractABI: abi.daoFaangStonkVaultContract, balance: 0, vaultBalance: 0, @@ -473,6 +473,28 @@ const mainVaults = [ price_id: ["tether", "usd-coin", "dai"], isElon: true, }, + // TODO: Update this to mainnet address + // { + // id: "daoSTO", + // name: "DAO Vault Stonks", + // symbol: ["USDT","USDC","DAI"], + // description: "DAO Vault Stonks for 3 stablecoins", + // vaultSymbol: "daoSTO", + // erc20address: ["0xdAC17F958D2ee523a2206206994597C13D831ec7", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0x6b175474e89094c44da98b954eedeac495271d0f"], + // vaultContractAddress: "", + // vaultContractABI: abi.daoFaangStonkVaultContract, + // balance: 0, + // vaultBalance: 0, + // decimals: 18, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // lastMeasurement: "", + // measurement: 1e18, + // price_id: ["tether", "usd-coin", "dai"], + // isFaang: true, + // }, { id: "hfDAI", name: "DAI", From f536060f3dec73c8eb1a638203ecbf132e72e2bb Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Fri, 2 Jul 2021 12:18:56 +0800 Subject: [PATCH 140/254] added DAOSto for DAOmine --- scripts/initial.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/initial.js b/scripts/initial.js index 5a4bddc..2c3abac 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -271,16 +271,16 @@ db.stake_pool.insertMany([ tokenId: 'ethereum', symbol: 'daoELO' }, - // { - // name: "daoSTO", - // label: "DAO Vault Stonks LP", - // contract_address: '', // TODO: Update to mainnet address - // status: 'A', - // pid: '11', - // category: 'Advance', - // tokenId: 'ethereum', - // symbol: 'daoSTO' - // } + { + name: "daoSTO", + label: "DAO Vault Stonks LP", + contract_address: '0xe97F5e5A755F8e633d23A2bae167b628deC22948', + status: 'A', + pid: '11', + category: 'Advance', + tokenId: 'ethereum', + symbol: 'daoSTO' + } ]); db.special_event.insertMany([ From 6b08fedab60bbddbb1ffb02102d43303005b342a Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Sat, 3 Jul 2021 16:25:35 +0800 Subject: [PATCH 141/254] Update FAANG Stonk Kovan Address. --- config/abi.js | 430 +++++++++++++++++++++++++++-- config/serverless/domain.js | 4 +- scripts/initial.js | 2 +- services/vaults/apy/save/vaults.js | 2 +- 4 files changed, 418 insertions(+), 20 deletions(-) diff --git a/config/abi.js b/config/abi.js index b2edeef..ae323a7 100644 --- a/config/abi.js +++ b/config/abi.js @@ -18442,6 +18442,21 @@ const daoFaangStonkVaultContract = [ "internalType": "address", "name": "_strategy", "type": "address" + }, + { + "internalType": "address", + "name": "_biconomy", + "type": "address" + }, + { + "internalType": "address", + "name": "_communityWallet", + "type": "address" + }, + { + "internalType": "address", + "name": "_strategist", + "type": "address" } ], "stateMutability": "nonpayable", @@ -18503,6 +18518,38 @@ const daoFaangStonkVaultContract = [ "name": "Deposit", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "admin", + "type": "address" + } + ], + "name": "EmergencyWithdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -18522,6 +18569,38 @@ const daoFaangStonkVaultContract = [ "name": "SetAdmin", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "biconomy", + "type": "address" + } + ], + "name": "SetBiconomy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldCommunityWallet", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newcommunityWallet", + "type": "address" + } + ], + "name": "SetCommunityWallet", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -18535,6 +18614,25 @@ const daoFaangStonkVaultContract = [ "name": "SetPendingStrategy", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldStrategistWallet", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newStrategistWallet", + "type": "address" + } + ], + "name": "SetStrategistWallet", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -18554,6 +18652,19 @@ const daoFaangStonkVaultContract = [ "name": "SetTreasuryWallet", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "fee", + "type": "uint256" + } + ], + "name": "SetWithdrawlFee", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -18579,6 +18690,19 @@ const daoFaangStonkVaultContract = [ "name": "Transfer", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "unlockTime", + "type": "uint256" + } + ], + "name": "UnlockMigrateFunds", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -18655,6 +18779,19 @@ const daoFaangStonkVaultContract = [ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "Router", + "outputs": [ + { + "internalType": "contract IUniswapV2Router02", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "USDC", @@ -18774,6 +18911,45 @@ const daoFaangStonkVaultContract = [ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "communityWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeePerc", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeeTier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "decimals", @@ -18918,6 +19094,38 @@ const daoFaangStonkVaultContract = [ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "isEmergency", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "forwarder", + "type": "address" + } + ], + "name": "isTrustedForwarder", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -18944,6 +19152,57 @@ const daoFaangStonkVaultContract = [ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeePerc", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeeTier2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "pendingStrategy", @@ -18957,6 +19216,19 @@ const daoFaangStonkVaultContract = [ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "profitSharingFeePerc", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "reInvest", @@ -18964,6 +19236,13 @@ const daoFaangStonkVaultContract = [ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -19000,6 +19279,32 @@ const daoFaangStonkVaultContract = [ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "_biconomy", + "type": "address" + } + ], + "name": "setBiconomy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newCommunityWallet", + "type": "address" + } + ], + "name": "setCommunityWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -19013,6 +19318,19 @@ const daoFaangStonkVaultContract = [ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "_strategist", + "type": "address" + } + ], + "name": "setStrategistWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -19039,6 +19357,19 @@ const daoFaangStonkVaultContract = [ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "strategist", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "strategy", @@ -19131,6 +19462,19 @@ const daoFaangStonkVaultContract = [ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "treasuryWallet", @@ -19144,6 +19488,19 @@ const daoFaangStonkVaultContract = [ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "trustedForwarder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "unlockMigrateFunds", @@ -19164,6 +19521,19 @@ const daoFaangStonkVaultContract = [ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "versionRecipient", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, { "inputs": [ { @@ -19181,6 +19551,13 @@ const daoFaangStonkVaultContract = [ "outputs": [], "stateMutability": "nonpayable", "type": "function" + }, + { + "inputs": [], + "name": "yield", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" } ]; @@ -19197,11 +19574,6 @@ const daoFaangStonkStrategyContract =[ "name": "_mirustPool", "type": "address" }, - { - "internalType": "address", - "name": "_admin", - "type": "address" - }, { "internalType": "uint256[]", "name": "weights", @@ -19227,17 +19599,23 @@ const daoFaangStonkStrategyContract =[ "type": "constructor" }, { - "inputs": [], - "name": "admin", - "outputs": [ + "anonymous": false, + "inputs": [ { + "indexed": true, "internalType": "address", - "name": "", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "OwnershipTransferred", + "type": "event" }, { "inputs": [ @@ -19359,6 +19737,19 @@ const daoFaangStonkStrategyContract =[ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -19393,7 +19784,7 @@ const daoFaangStonkStrategyContract =[ }, { "inputs": [], - "name": "reInvest", + "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -19415,11 +19806,11 @@ const daoFaangStonkStrategyContract =[ "inputs": [ { "internalType": "address", - "name": "_admin", + "name": "_vault", "type": "address" } ], - "name": "setAdmin", + "name": "setVault", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -19428,11 +19819,11 @@ const daoFaangStonkStrategyContract =[ "inputs": [ { "internalType": "address", - "name": "_vault", + "name": "newOwner", "type": "address" } ], - "name": "setVault", + "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -19512,6 +19903,13 @@ const daoFaangStonkStrategyContract =[ "outputs": [], "stateMutability": "nonpayable", "type": "function" + }, + { + "inputs": [], + "name": "yield", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" } ]; diff --git a/config/serverless/domain.js b/config/serverless/domain.js index f0c1e46..ba64653 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -153,9 +153,9 @@ const testContracts = { tokenId: ["tether", "usd-coin", "dai"], }, daoSTO: { - address: "0xe97f5e5a755f8e633d23a2bae167b628dec22948", + address: "0xd6af81e5288be43137debf969d7f2c03482c8cc1", abi: abi.daoFaangStonkVaultContract, - strategyAddress: "0xccced6278e9c6e68210f3bdc1bc3444e830cad33", + strategyAddress: "0xc0f43b6db13e5988c92aa8c7c286a51f493620d4", strategyABI: abi.daoFaangStonkStrategyContract, contractType: "daoFaang", tokenId: ["tether", "usd-coin", "dai"], diff --git a/scripts/initial.js b/scripts/initial.js index 5a4bddc..a28c7d3 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -149,7 +149,7 @@ db.vault_categories.insertMany([ { name: 'basic', contract_address: '0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d', symbol: 'cDAI', }, { name: 'degen', contract_address: '0x542a42496c96b946324f7dce2b030d5643d9ef8a', symbol: 'daoCDV', }, { name: 'basic', contract_address: '0xf03fa8553379d872b4e2bafbc679409fb82604c2', symbol: 'daoELO', }, - { name: 'advance', contract_address: '0xe97f5e5a755f8e633d23a2bae167b628dec22948', symbol: 'daoSTO', }, + { name: 'advance', contract_address: '0xd6af81e5288be43137debf969d7f2c03482c8cc1', symbol: 'daoSTO', }, { name: 'basic', contract_address: '0xb41a49de82e95dc1e028839c3440ac97f9a7832c', symbol: 'hfUSDT'}, { name: 'basic', contract_address: '0x54783464848b35d6fb9bba37c1ddd23ac3b1a11a', symbol: 'hfUSDC'}, { name: 'basic', contract_address: '0x0f89ee5b95d1d5cfb10f29775d816fc6d8adb9fc', symbol: 'hfDAI'}, diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index bf0e2eb..3a70473 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -198,7 +198,7 @@ const testVaults = [ description: "DAO Vault Stonks for 3 stablecoins", vaultSymbol: "daoSTO", erc20address: ["0x07de306ff27a2b630b1141956844eb1552b956b5", "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa"], - vaultContractAddress: "0xe97f5e5a755f8e633d23a2bae167b628dec22948", + vaultContractAddress: "0xd6af81e5288be43137debf969d7f2c03482c8cc1", vaultContractABI: abi.daoFaangStonkVaultContract, balance: 0, vaultBalance: 0, From f6502a8b07cc6d6013cb9e64c98a5c15dae3d869 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Mon, 5 Jul 2021 17:17:04 +0800 Subject: [PATCH 142/254] Update FAANG mainnet address. --- config/serverless/domain.js | 60 +++++++++++++++--------------- scripts/initial.js | 33 ++++++++-------- services/vaults/apy/save/vaults.js | 43 +++++++++++---------- 3 files changed, 68 insertions(+), 68 deletions(-) diff --git a/config/serverless/domain.js b/config/serverless/domain.js index ba64653..5aae864 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -329,53 +329,53 @@ const mainContracts = { tokenId: "dai", }, daoCDV: { - address: "", // TODO Update on mainnet + address: "0x8fe826cc1225b03aa06477ad5af745aed5fe7066", abi: abi.citadelABIContract, - strategyAddress: "", // TODO Update on mainnet + strategyAddress: "0x8a00046ab28051a952e64a886cd8961ca90a59bd", strategyABI: abi.citadelStrategyABIContract, contractType: "citadel", tokenId: ["tether", "usd-coin", "dai"], }, daoELO: { - address: "", // TODO Update on mainnet + address: "0x2d9a136cf87d599628bcbdfb6c4fe75acd2a0aa8", abi: abi.elonApeVaultContract, - strategyAddress: "", // TODO Update on mainnet + strategyAddress: "0x24d281dcc7d435500669459eaa393dc5200595b1", strategyABI: abi.elonApeStrategyContract, contractType: "elon", tokenId: ["tether", "usd-coin", "dai"], }, daoSTO: { - address: "0",// TODO Update on mainnet + address: "0x742a85daf742ca0213b06fdae449434e0448691e", abi: abi.daoFaangStonkVaultContract, - strategyAddress: "", // TODO Update on mainnet + strategyAddress: "0x7f1cffb0e0a7351a72ef53cb51796221e2bac3a5", strategyABI: abi.daoFaangStonkStrategyContract, contractType: "daoFaang", tokenId: ["tether", "usd-coin", "dai"], }, - hfDAI: { - address: '', // TODO: Update that this to mainnet address - abi: abi.hfVaultContract, - strategyAddress: '', - strategyABI: abi.hfStrategyContract, - contractType: 'harvest', - tokenId: "dai", - }, - hfUSDC: { - address: '', // TODO: Update that this to mainnet address - abi: abi.hfVaultContract, - strategyAddress: '', - strategyABI: abi.hfStrategyContract, - contractType: 'harvest', - tokenId: "usd-coin", - }, - hfUSDT: { - address: '', // TODO: Update that this to mainnet address - abi: abi.hfVaultContract, - strategyAddress: '', - strategyABI: abi.hfStrategyContract, - contractType: 'harvest', - tokenId: "tether", - }, + // hfDAI: { + // address: '', // TODO: Update that this to mainnet address + // abi: abi.hfVaultContract, + // strategyAddress: '', + // strategyABI: abi.hfStrategyContract, + // contractType: 'harvest', + // tokenId: "dai", + // }, + // hfUSDC: { + // address: '', // TODO: Update that this to mainnet address + // abi: abi.hfVaultContract, + // strategyAddress: '', + // strategyABI: abi.hfStrategyContract, + // contractType: 'harvest', + // tokenId: "usd-coin", + // }, + // hfUSDT: { + // address: '', // TODO: Update that this to mainnet address + // abi: abi.hfVaultContract, + // strategyAddress: '', + // strategyABI: abi.hfStrategyContract, + // contractType: 'harvest', + // tokenId: "tether", + // }, }, compund: { cUSDT: { diff --git a/scripts/initial.js b/scripts/initial.js index e7ba13c..b5abcd4 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -7,12 +7,13 @@ db.vault_categories.insertMany([ { name: 'basic', contract_address: '0xEeCe6AD323a93d4B021BDAaC587DCC04b5cf0a78', symbol: 'cUSDT' }, { name: 'basic', contract_address: '0xd1D7f950899C0269a7F2aad5E854cdc3a1350ba9', symbol: 'cUSDC', }, { name: 'basic', contract_address: '0x43C20638C3914Eca3c96e9cAc8ebE7d652Be45c6', symbol: 'cDAI', }, + { name: 'expert', contract_address: '0x8fe826cc1225b03aa06477ad5af745aed5fe7066', symbol: 'daoCDV', }, + { name: 'degen', contract_address: '0x2d9a136cf87d599628bcbdfb6c4fe75acd2a0aa8', symbol: 'daoELO', }, + { name: 'advance', contract_address: '0x742a85daf742ca0213b06fdae449434e0448691e', symbol: 'daoSTO', }, // TODO: add in mainnet contract addresss // { name: 'basic', contract_address: '', symbol: 'hfUSDT'}, // { name: 'basic', contract_address: '', symbol: 'hfUSDC'}, // { name: 'basic', contract_address: '', symbol: 'hfDAI'}, - // { name: 'basic', contract_address: '', symbol: 'daoELO', }, - // { name: 'basic', contract_address: '', symbol: 'daoSTO', }, ]); db.stake_pool.insertMany([ @@ -119,23 +120,23 @@ db.stake_pool.insertMany([ { name: 'daoELO', label: 'Elon\'s APE LP', - contract_address: '', // TODO: Update to mainnet address + contract_address: '0x2d9a136cf87d599628bcbdfb6c4fe75acd2a0aa8', status: 'A', pid: '10', category: 'Basic', tokenId: 'ethereum', symbol: 'daoELO' }, - // { - // name: "daoSTO", - // label: "DAO Vault Stonks LP", - // contract_address: '', // TODO: Update to mainnet address - // status: 'A', - // pid: '11', - // category: 'Basic', - // tokenId: 'ethereum', - // symbol: 'daoSTO' - // } + { + name: "daoSTO", + label: "DAO Vault Stonks LP", + contract_address: '0x742a85daf742ca0213b06fdae449434e0448691e', + status: 'A', + pid: '11', + category: 'Basic', + tokenId: 'ethereum', + symbol: 'daoSTO' + } ]); // Testnet Contracts @@ -147,8 +148,8 @@ db.vault_categories.insertMany([ { name: 'basic', contract_address: '0x5d102e0bdf2037899e1ff2e8cc50987108533c52', symbol: 'cUSDT' }, { name: 'basic', contract_address: '0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e', symbol: 'cUSDC', }, { name: 'basic', contract_address: '0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d', symbol: 'cDAI', }, - { name: 'degen', contract_address: '0x542a42496c96b946324f7dce2b030d5643d9ef8a', symbol: 'daoCDV', }, - { name: 'basic', contract_address: '0xf03fa8553379d872b4e2bafbc679409fb82604c2', symbol: 'daoELO', }, + { name: 'expert', contract_address: '0x626c25ca5b86277f395c0e40dbdf51f2a302ab43', symbol: 'daoCDV', }, + { name: 'degen', contract_address: '0xf03fa8553379d872b4e2bafbc679409fb82604c2', symbol: 'daoELO', }, { name: 'advance', contract_address: '0xd6af81e5288be43137debf969d7f2c03482c8cc1', symbol: 'daoSTO', }, { name: 'basic', contract_address: '0xb41a49de82e95dc1e028839c3440ac97f9a7832c', symbol: 'hfUSDT'}, { name: 'basic', contract_address: '0x54783464848b35d6fb9bba37c1ddd23ac3b1a11a', symbol: 'hfUSDC'}, @@ -274,7 +275,7 @@ db.stake_pool.insertMany([ { name: "daoSTO", label: "DAO Vault Stonks LP", - contract_address: '0xe97F5e5A755F8e633d23A2bae167b628deC22948', + contract_address: '0xd6af81e5288be43137debf969d7f2c03482c8cc1', status: 'A', pid: '11', category: 'Advance', diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 3a70473..8ea520e 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -473,28 +473,27 @@ const mainVaults = [ price_id: ["tether", "usd-coin", "dai"], isElon: true, }, - // TODO: Update to mainnet addresss - // { - // id: "daoSTO", - // name: "DAO Vault Stonks", - // symbol: ["USDT","USDC","DAI"], - // description: "DAO Vault Stonks for 3 stablecoins", - // vaultSymbol: "daoSTO", - // erc20address: ["0xdAC17F958D2ee523a2206206994597C13D831ec7", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0x6b175474e89094c44da98b954eedeac495271d0f"], - // vaultContractAddress: "", - // vaultContractABI: abi.daoFaangStonkVaultContract, - // balance: 0, - // vaultBalance: 0, - // decimals: 18, - // deposit: true, - // depositAll: true, - // withdraw: true, - // withdrawAll: true, - // lastMeasurement: "", - // measurement: 1e18, - // price_id: ["tether", "usd-coin", "dai"], - // isFaang: true, - // }, + { + id: "daoSTO", + name: "DAO Vault Stonks", + symbol: ["USDT","USDC","DAI"], + description: "DAO Vault Stonks for 3 stablecoins", + vaultSymbol: "daoSTO", + erc20address: ["0xdAC17F958D2ee523a2206206994597C13D831ec7", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0x6b175474e89094c44da98b954eedeac495271d0f"], + vaultContractAddress: "0x742a85daf742ca0213b06fdae449434e0448691e", + vaultContractABI: abi.daoFaangStonkVaultContract, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 12766399, + measurement: 1e18, + price_id: ["tether", "usd-coin", "dai"], + isFaang: true, + }, { id: "hfDAI", name: "DAI", From b2bdf676ea8ee18a487528b7a453552e45171f6a Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Mon, 5 Jul 2021 17:21:09 +0800 Subject: [PATCH 143/254] updated --- app.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app.js b/app.js index 4ce9447..0217d58 100644 --- a/app.js +++ b/app.js @@ -34,8 +34,8 @@ async function init() { jobs.savePricePerFullShare(); jobs.saveHistoricalAPY(); jobs.saveHistoricalTVL(); - // jobs.saveHistoricalPools(); - // jobs.saveABIPools(); + jobs.saveHistoricalPools(); + jobs.saveABIPools(); jobs.saveVipApr(); }); @@ -66,9 +66,9 @@ async function init() { app.get("/staking/get-vip-tokens", (req, res) => stakeVIP.getVipDVGToken(req, res) ); - // app.get("/staking/get-pools", (req, res) => - // stakePool.getPools(req, res) - // ); + app.get("/staking/get-pools", (req, res) => + stakePool.getPools(req, res) + ); app.get("/staking/get-xdvg-stake", (req, res) => stakeXDvg.getxDVGStake(req, res)); app.get('/event/verify', (req,res) => specialEvent.handleVerifyEvent(req, res)); app.get('/event/verify/:amount', (req, res) => specialEvent.handler(req, res)); From de931a5e8fb3184c161bbea30a921d0619f302cf Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Mon, 5 Jul 2021 17:40:04 +0800 Subject: [PATCH 144/254] Update Kovan address of Elon Ape. --- services/vaults/apy/save/vaults.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 8ea520e..909b54f 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -176,8 +176,8 @@ const testVaults = [ symbol: ["USDT","USDC","DAI"], description: "DAO Vault Elon for 3 stablecoins", vaultSymbol: "daoELO", - erc20address: ["0xdac17f958d2ee523a2206206994597c13d831ec7", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0x6b175474e89094c44da98b954eedeac495271d0f"], - vaultContractAddress: "0x2d9a136cf87d599628bcbdfb6c4fe75acd2a0aa8", + erc20address: ["0x07de306ff27a2b630b1141956844eb1552b956b5", "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa"], + vaultContractAddress: "0xf03fa8553379d872b4e2bafbc679409fb82604c2", vaultContractABI: abi.elonApeVaultContract, balance: 0, vaultBalance: 0, From 0d94a296629b9f9a53ed58644e88c819bf20c0bd Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Mon, 5 Jul 2021 22:49:48 +0800 Subject: [PATCH 145/254] Update the name of DAO FAANG Stonk in DAOmine pool --- scripts/initial.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/initial.js b/scripts/initial.js index b5abcd4..c50efb4 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -129,7 +129,7 @@ db.stake_pool.insertMany([ }, { name: "daoSTO", - label: "DAO Vault Stonks LP", + label: "DAO FAANG Stonk", contract_address: '0x742a85daf742ca0213b06fdae449434e0448691e', status: 'A', pid: '11', @@ -274,7 +274,7 @@ db.stake_pool.insertMany([ }, { name: "daoSTO", - label: "DAO Vault Stonks LP", + label: "DAO FAANG Stonk", contract_address: '0xd6af81e5288be43137debf969d7f2c03482c8cc1', status: 'A', pid: '11', From bfb0a1e1648e653444cde7456a957a95a357f018 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Tue, 6 Jul 2021 11:32:18 +0800 Subject: [PATCH 146/254] getMultiplier() from current block number. --- services/staking/dao-stake/handler.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/staking/dao-stake/handler.js b/services/staking/dao-stake/handler.js index ec7d88d..3e8e3d0 100644 --- a/services/staking/dao-stake/handler.js +++ b/services/staking/dao-stake/handler.js @@ -12,6 +12,9 @@ const Web3 = require("web3"); const archiveNodeUrl = process.env.ARCHIVENODE_ENDPOINT; const archiveNodeWeb3 = new Web3(archiveNodeUrl); +const infuraUrl = process.env.WEB3_ENDPOINT; +const infuraWeb3 = new Web3(infuraUrl); + const delayTime = 500; let contracts = []; @@ -138,7 +141,8 @@ const getLPTokenBalanceOfDAOStake = async (contract, daoStakeAddress) => { // getMultiplier() from DAOstake contract const getMultiplier = async(start, current, daoStakeContract) => { try { - let multiplier = await daoStakeContract.methods.getMultiplier(start, current).call(); + const currentBlockNbr = await infuraWeb3.eth.getBlockNumber(); + let multiplier = await daoStakeContract.methods.getMultiplier(start, currentBlockNbr).call(); multiplier = multiplier / (10 ** 18); return multiplier; } catch (err) { From b0b3e2a8d1cecaab37c57fe418dcc165dc274125 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Tue, 6 Jul 2021 13:03:21 +0800 Subject: [PATCH 147/254] Update DAOmine start block. --- config/serverless/domain.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 2e290f0..64fbc55 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -183,7 +183,7 @@ const testContracts = { daoStake: { address: "0xd8f59a99acfc597feb84914fef3769def87e7553", abi: abi.daoStakeContract, - startBlock: 25711879, + startBlock: 25721857, // Start block from contract's START_BLOCK poolPercent: 0.51 }, uniswap: { @@ -369,7 +369,7 @@ const mainContracts = { daoStake: { address: "0x8437a6bf9235fd003d50cd4024fa7ec6979208d5", abi: abi.daoStakeContract, - startBlock: 12734615, + startBlock: 12770000, // Start block from contract's START_BLOCK poolPercent: 0.51 }, uniswap: { From 9cb19dd42c2f042b3f6fd21edacc1d8124893eec Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Tue, 6 Jul 2021 17:10:35 +0800 Subject: [PATCH 148/254] Fix for APR. --- services/staking/dao-stake/handler.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/services/staking/dao-stake/handler.js b/services/staking/dao-stake/handler.js index 3e8e3d0..48b1974 100644 --- a/services/staking/dao-stake/handler.js +++ b/services/staking/dao-stake/handler.js @@ -141,8 +141,10 @@ const getLPTokenBalanceOfDAOStake = async (contract, daoStakeAddress) => { // getMultiplier() from DAOstake contract const getMultiplier = async(start, current, daoStakeContract) => { try { - const currentBlockNbr = await infuraWeb3.eth.getBlockNumber(); - let multiplier = await daoStakeContract.methods.getMultiplier(start, currentBlockNbr).call(); + //const currentBlockNbr = await infuraWeb3.eth.getBlockNumber(); + // let multiplier = await daoStakeContract.methods.getMultiplier(start, currentBlockNbr).call(); + const endBlockNumber = start + (4 * 60 * 24 * 365); // Temporaly fix + let multiplier = await daoStakeContract.methods.getMultiplier(start, endBlockNumber).call(); multiplier = multiplier / (10 ** 18); return multiplier; } catch (err) { @@ -232,7 +234,7 @@ const poolCalculation = async(daoStake, poolInfo, tokensPrice) => { const tokenBalOfDAOStake = await getLPTokenBalanceOfDAOStake(poolContract, daoStakeContract._address); // Pass in start block, last reward block to invoke getMultiplier() in DAOstake contract - const multiplier = await getMultiplier(startBlock,lastRewardBlock, daoStakeContract); + const multiplier = await getMultiplier(startBlock, lastRewardBlock, daoStakeContract); // Find pool token price const poolTokenPrice = tokens.find(t => t.tokenId === pool.tokenId).price; From 60b4e94f102c486c729d247931bcbdc0a7c2a922 Mon Sep 17 00:00:00 2001 From: lucky83149028 Date: Tue, 6 Jul 2021 17:17:30 +0800 Subject: [PATCH 149/254] Working to add cuban --- config/abi.js | 1487 ++++++++++++++++- config/serverless/domain.js | 16 + models/historical-apy.model.js | 1 + models/price.model.js | 1 + models/tvl.model.js | 1 + scripts/initial.js | 28 +- services/user/vaults/statistics/handler.js | 11 +- services/vaults/apy/save/handler.js | 66 +- services/vaults/apy/save/historical-handle.js | 70 +- services/vaults/apy/save/vaults.js | 42 + services/vaults/price/handler.js | 35 + services/vaults/tvl/handler.js | 5 +- 12 files changed, 1738 insertions(+), 25 deletions(-) diff --git a/config/abi.js b/config/abi.js index ae323a7..b03de17 100644 --- a/config/abi.js +++ b/config/abi.js @@ -18098,7 +18098,7 @@ const elonApeVaultContract = [ } ]; -elonApeStrategyContract = [ +const elonApeStrategyContract = [ { "inputs": [ { @@ -19913,6 +19913,1487 @@ const daoFaangStonkStrategyContract =[ } ]; +const cubanApeVaultContract = [ + { + "inputs": [ + { + "internalType": "address", + "name": "_strategy", + "type": "address" + }, + { + "internalType": "address", + "name": "_treasuryWallet", + "type": "address" + }, + { + "internalType": "address", + "name": "_communityWallet", + "type": "address" + }, + { + "internalType": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_strategist", + "type": "address" + }, + { + "internalType": "address", + "name": "_biconomy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "tokenDeposit", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amtDeposit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sharesMint", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "fromStrategy", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toStrategy", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "MigrateFunds", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldCustomNetworkFeePerc", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newCustomNetworkFeePerc", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeePerc", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldCustomNetworkFeeTier", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newCustomNetworkFeeTier", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeeTier", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeePerc", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeePerc", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeePerc", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeeTier2", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeeTier2", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeeTier2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldProfileSharingFeePerc", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newProfileSharingFeePerc", + "type": "uint256" + } + ], + "name": "SetProfitSharingFeePerc", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "fees", + "type": "uint256" + } + ], + "name": "TransferredOutFees", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "tokenWithdraw", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amtWithdraw", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sharesBurn", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "LOCKTIME", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "canSetPendingStrategy", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeePerc", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeeTier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_tokenIndex", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getAllPoolInUSD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "invest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "forwarder", + "type": "address" + } + ], + "name": "isTrustedForwarder", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "migrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeePerc", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeeTier2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingStrategy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "profitSharingFeePerc", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reinvest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_farmIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "retrieveStablecoinsFromStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + } + ], + "name": "setAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_biconomy", + "type": "address" + } + ], + "name": "setBiconomy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_communityWallet", + "type": "address" + } + ], + "name": "setCommunityWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_percentage", + "type": "uint256" + } + ], + "name": "setCustomNetworkFeePerc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_customNetworkFeeTier", + "type": "uint256" + } + ], + "name": "setCustomNetworkFeeTier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeePerc", + "type": "uint256[]" + } + ], + "name": "setNetworkFeePerc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeeTier2", + "type": "uint256[]" + } + ], + "name": "setNetworkFeeTier2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pendingStrategy", + "type": "address" + } + ], + "name": "setPendingStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_percentages", + "type": "uint256[]" + } + ], + "name": "setPercTokenKeepInVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_percentage", + "type": "uint256" + } + ], + "name": "setProfitSharingFeePerc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_strategist", + "type": "address" + } + ], + "name": "setStrategist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_treasuryWallet", + "type": "address" + } + ], + "name": "setTreasuryWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_weights", + "type": "uint256[]" + } + ], + "name": "setWeights", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "strategist", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "strategy", + "outputs": [ + { + "internalType": "contract IStrategy", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenFrom", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_tokenTo", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "swapTokenWithinVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "tokens", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "decimals", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "percKeepInVault", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "transferOutNetworkFees", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "trustedForwarder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unlockMigrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unlockTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "versionRecipient", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_tokenIndex", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; + +const cubanApeStrategyContract = [ + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_weights", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "AmtToInvest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "CurrentComposition", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "TargetComposition", + "type": "event" + }, + { + "inputs": [], + "name": "approveMigrate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getFarmsPool", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTotalPoolInUSD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "invest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isVesting", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reinvest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_farmIndex", + "type": "uint256" + } + ], + "name": "releaseETHToVault", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_vault", + "type": "address" + } + ], + "name": "setVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_weights", + "type": "uint256[]" + } + ], + "name": "setWeights", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vault", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "weights", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +]; + module.exports = { earnUSDTABIContract, earnUSDCABIContract, @@ -19948,5 +21429,7 @@ module.exports = { elonApeVaultContract, elonApeStrategyContract, daoFaangStonkVaultContract, - daoFaangStonkStrategyContract + daoFaangStonkStrategyContract, + cubanApeVaultContract, + cubanApeStrategyContract, }; diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 7b2ab25..5beb55c 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -152,6 +152,14 @@ const testContracts = { contractType: "elon", tokenId: ["tether", "usd-coin", "dai"], }, + daoCUB: { + address: "0x5c304a6cb105e1bff9805ca5cf072f1d2c3beac5", + abi: abi.cubanApeVaultContract, + strategyAddress: "0x998372c8dc70833a7dc687020257302582fa5838", + strategyABI: abi.cubanApeStrategyContract, + contractType: "cuban", + tokenId: ["tether", "usd-coin", "dai"], + }, daoSTO: { address: "0xd6af81e5288be43137debf969d7f2c03482c8cc1", abi: abi.daoFaangStonkVaultContract, @@ -344,6 +352,14 @@ const mainContracts = { contractType: "elon", tokenId: ["tether", "usd-coin", "dai"], }, + daoCUB: { + address: "", // TODO: Update that this to mainnet address + abi: abi.cubanApeVaultContract, + strategyAddress: "", // TODO: Update that this to mainnet address + strategyABI: abi.cubanApeStrategyContract, + contractType: "cuban", + tokenId: ["tether", "usd-coin", "dai"], + }, daoSTO: { address: "0x742a85daf742ca0213b06fdae449434e0448691e", abi: abi.daoFaangStonkVaultContract, diff --git a/models/historical-apy.model.js b/models/historical-apy.model.js index 1157e07..b0b8f63 100644 --- a/models/historical-apy.model.js +++ b/models/historical-apy.model.js @@ -36,6 +36,7 @@ module.exports = { cDaiFarmer: 'cDAI_historical-apy', daoCDVFarmer: 'daoCDV_historical-apy', daoELOFarmer: 'daoELO_historical-apy', + daoCUBFarmer: 'daoCUB_historical-apy', daoSTOFarmer: 'daoSTO_historical-apy', hfDaiFarmer: 'hfDAI_historical-apy', hfUsdcFarmer: 'hfUSDC_historical-apy', diff --git a/models/price.model.js b/models/price.model.js index 0231258..5421653 100644 --- a/models/price.model.js +++ b/models/price.model.js @@ -36,6 +36,7 @@ module.exports = { cDaiFarmer: 'cDAI_price', daoCDVFarmer: 'daoCDV_price', daoELOFarmer: 'daoELO_price', + daoCUBFarmer: 'daoCUB_price', daoSTOFarmer: 'daoSTO_price', hfDaiFarmer: 'hfDAI_price', hfUsdcFarmer: 'hfUSDC_price', diff --git a/models/tvl.model.js b/models/tvl.model.js index 1ecac49..efdec42 100644 --- a/models/tvl.model.js +++ b/models/tvl.model.js @@ -63,6 +63,7 @@ module.exports = { cDaiFarmer: "cDAI_tvl", daoCDVFarmer: "daoCDV_tvl", daoELOFarmer: "daoELO_tvl", + daoCUBFarmer: "daoCUB_tvl", daoSTOFarmer: "daoSTO_tvl", hfDaiFarmer: "hfDAI_tvl", hfUsdtFarmer: "hfUSDT_tvl", diff --git a/scripts/initial.js b/scripts/initial.js index 8a17b56..a17a58f 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -9,6 +9,7 @@ db.vault_categories.insertMany([ { name: 'basic', contract_address: '0x43C20638C3914Eca3c96e9cAc8ebE7d652Be45c6', symbol: 'cDAI', }, { name: 'expert', contract_address: '0x8fe826cc1225b03aa06477ad5af745aed5fe7066', symbol: 'daoCDV', }, { name: 'degen', contract_address: '0x2d9a136cf87d599628bcbdfb6c4fe75acd2a0aa8', symbol: 'daoELO', }, + // { name: 'degen', contract_address: '', symbol: 'daoCUB', }, // TODO: Update to the mainnet address { name: 'advance', contract_address: '0x742a85daf742ca0213b06fdae449434e0448691e', symbol: 'daoSTO', }, // TODO: add in mainnet contract addresss // { name: 'basic', contract_address: '', symbol: 'hfUSDT'}, @@ -136,7 +137,17 @@ db.stake_pool.insertMany([ category: 'Basic', tokenId: 'ethereum', symbol: 'daoSTO' - } + }, + { + name: 'daoCUB', + label: 'Cuban\'s APE LP', + contract_address: '', // TODO: Update to mainnet address + status: 'A', + pid: '12', + category: 'Degen', + tokenId: 'ethereum', + symbol: 'daoCUB' + }, ]); // Testnet Contracts @@ -150,6 +161,7 @@ db.vault_categories.insertMany([ { name: 'basic', contract_address: '0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d', symbol: 'cDAI', }, { name: 'expert', contract_address: '0x626c25ca5b86277f395c0e40dbdf51f2a302ab43', symbol: 'daoCDV', }, { name: 'degen', contract_address: '0xf03fa8553379d872b4e2bafbc679409fb82604c2', symbol: 'daoELO', }, + { name: 'degen', contract_address: '0x5c304a6cb105e1bff9805ca5cf072f1d2c3beac5', symbol: 'daoCUB', }, { name: 'advance', contract_address: '0xd6af81e5288be43137debf969d7f2c03482c8cc1', symbol: 'daoSTO', }, { name: 'basic', contract_address: '0xb41a49de82e95dc1e028839c3440ac97f9a7832c', symbol: 'hfUSDT'}, { name: 'basic', contract_address: '0x54783464848b35d6fb9bba37c1ddd23ac3b1a11a', symbol: 'hfUSDC'}, @@ -268,7 +280,7 @@ db.stake_pool.insertMany([ contract_address: '0xf03fa8553379d872b4e2bafbc679409fb82604c2', status: 'A', pid: '10', - category: 'Basic', + category: 'Degen', tokenId: 'ethereum', symbol: 'daoELO' }, @@ -281,7 +293,17 @@ db.stake_pool.insertMany([ category: 'Advance', tokenId: 'ethereum', symbol: 'daoSTO' - } + }, + { + name: 'daoCUB', + label: 'Cuban\'s APE LP', + contract_address: '0x5c304a6cb105e1bff9805ca5cf072f1d2c3beac5', + status: 'A', + pid: '12', + category: 'Degen', + tokenId: 'ethereum', + symbol: 'daoCUB' + }, ]); db.special_event.insertMany([ diff --git a/services/user/vaults/statistics/handler.js b/services/user/vaults/statistics/handler.js index c07a3a0..ada7964 100644 --- a/services/user/vaults/statistics/handler.js +++ b/services/user/vaults/statistics/handler.js @@ -110,14 +110,7 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => } else if (type === 'compound') { depositedAmount = await strategyContract.methods.getCurrentBalance(userAddress).call(); depositedAmount = new BigNumber(depositedAmount); - } else if (type === 'citadel') { - const pool = await vaultContract.methods.getAllPoolInUSD().call(); - const totalSupply = await vaultContract.methods.totalSupply().call(); - - // depositedAmount = await vaultContract.methods._balanceOfDeposit(userAddress).call(); - depositedAmount = (depositedShares * pool) / totalSupply; - depositedAmount = new BigNumber(depositedAmount); - } else if (type === 'elon') { + } else if (type === 'citadel' || type === 'elon' || type === 'cuban') { const pool = await vaultContract.methods.getAllPoolInUSD().call(); const totalSupply = await vaultContract.methods.totalSupply().call(); depositedAmount = (depositedShares * pool) / totalSupply; @@ -185,7 +178,7 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => let totalTransferredInUSD = 0; let totalTransferredOutInUSD = 0; - if(type === "citadel" || type === "elon" || type === "daoFaang") { + if(type === "citadel" || type === "elon" || type === "cuban" || type === "daoFaang") { totalDepositsInUSD = getSumForUSD(deposits); totalWithdrawalsInUSD = getSumForUSD(withdrawals); totalTransferredInUSD = getSumForUSD(transfersIn); diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index 448a2c1..1043d42 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -131,6 +131,28 @@ const getElonPricePerFullShare = async (contract, block, inceptionBlockNbr) => { return pricePerFullShare; } +const getCubanPricePerFullShare = async (contract, block, inceptionBlockNbr) => { + const contractDidntExist = block < inceptionBlockNbr; + const inceptionBlock = block === inceptionBlockNbr; + + if (inceptionBlock) { + return 1e18; + } + if (contractDidntExist) { + return 0; + } + + let pricePerFullShare = 0; + try { + const pool = await contract.methods.getAllPoolInUSD().call(undefined, block); // All pool in USD (6 decimals) + const totalSupply = await contract.methods.totalSupply().call(undefined, block); + pricePerFullShare = (new BigNumber(pool)).shiftedBy(12).dividedBy(totalSupply).toNumber(); + } catch (ex) { } + + await delay(delayTime); + return pricePerFullShare; +} + const getFaangPricePerFullShare = async (contract, block, inceptionBlockNbr) => { const contractDidntExist = block < inceptionBlockNbr; const inceptionBlock = block === inceptionBlockNbr; @@ -217,6 +239,7 @@ const getApyForVault = async (vault) => { compoundApy, citadelApy: 0, elonApy: 0, + cubanApy: 0, faangApy: 0, }; } else if (vault.isCitadel) { @@ -246,6 +269,7 @@ const getApyForVault = async (vault) => { compoundApy: 0, citadelApy: apy, elonApy: 0, + cubanApy: 0, faangApy: 0, } } else if (vault.isElon) { @@ -257,14 +281,12 @@ const getApyForVault = async (vault) => { contract = new archiveNodeWeb3.eth.Contract(testContracts.farmer['daoELO'].abi, testContracts.farmer['daoELO'].address); } - let pricePerFullShareCurrent = await getElonPricePerFullShare(contract, currentBlockNbr, inceptionBlockNbr); - let pricePerFullShareOneDayAgo = await getElonPricePerFullShare(contract, oneDayAgoBlock, inceptionBlockNbr); - pricePerFullShareCurrent = (0 < pricePerFullShareCurrent) ? pricePerFullShareCurrent : 1; // 0 can't be used as a reference for apy. - pricePerFullShareOneDayAgo = (0 < pricePerFullShareOneDayAgo) ? pricePerFullShareOneDayAgo : 1; // 0 can't be used as a reference for apy. + const pricePerFullShareCurrent = await getElonPricePerFullShare(contract, currentBlockNbr, inceptionBlockNbr); + const pricePerFullShareOneDayAgo = await getElonPricePerFullShare(contract, oneDayAgoBlock, inceptionBlockNbr); // APY Calculation const n = 365 / 2; // Assume 2 days to trigger invest function - const apr = (pricePerFullShareCurrent - pricePerFullShareOneDayAgo) * n; + const apr = (0 < pricePerFullShareCurrent && 0 < pricePerFullShareOneDayAgo) ? (pricePerFullShareCurrent - pricePerFullShareOneDayAgo) * n : 0; const apy = (Math.pow((1 + (apr / 100) / n), n) - 1) * 100; return { @@ -277,6 +299,37 @@ const getApyForVault = async (vault) => { compoundApy: 0, citadelApy: 0, elonApy: apy, + cubanApy: 0, + faangApy: 0, + } + } else if (vault.isCuban) { + // Cuban's Ape Vault + let contract; + if (process.env.PRODUCTION != '') { + contract = new archiveNodeWeb3.eth.Contract(mainContracts.farmer['daoCUB'].abi, mainContracts.farmer['daoCUB'].address); + } else { + contract = new archiveNodeWeb3.eth.Contract(testContracts.farmer['daoCUB'].abi, testContracts.farmer['daoCUB'].address); + } + + const pricePerFullShareCurrent = await getCubanPricePerFullShare(contract, currentBlockNbr, inceptionBlockNbr); + const pricePerFullShareOneDayAgo = await getCubanPricePerFullShare(contract, oneDayAgoBlock, inceptionBlockNbr); + + // APY Calculation + const n = 365 / 2; // Assume 2 days to trigger invest function + const apr = (0 < pricePerFullShareCurrent && 0 < pricePerFullShareOneDayAgo) ? (pricePerFullShareCurrent - pricePerFullShareOneDayAgo) * n : 0; + const apy = (Math.pow((1 + (apr / 100) / n), n) - 1) * 100; + + return { + apyInceptionSample: 0, + apyOneDaySample: 0, + apyThreeDaySample: 0, + apyOneWeekSample: 0, + apyOneMonthSample: 0, + apyLoanscan: 0, + compoundApy: 0, + citadelApy: 0, + elonApy: 0, + cubanApy: apy, faangApy: 0, } } else if (vault.isFaang) { @@ -308,6 +361,7 @@ const getApyForVault = async (vault) => { compoundApy: 0, citadelApy: 0, elonApy: 0, + cubanApy: 0, faangApy: apy, } } else if (vault.isHarvest) { @@ -372,6 +426,7 @@ const getApyForVault = async (vault) => { compoundApy: 0, citadelApy: 0, elonApy: 0, + cubanApy: 0, faangApy: 0, }; @@ -496,6 +551,7 @@ const getApyForVault = async (vault) => { compoundApy: 0, citadelApy: 0, elonApy: 0, + cubanApy: 0, faangApy: 0, }; } diff --git a/services/vaults/apy/save/historical-handle.js b/services/vaults/apy/save/historical-handle.js index 9a9a54e..d66285e 100644 --- a/services/vaults/apy/save/historical-handle.js +++ b/services/vaults/apy/save/historical-handle.js @@ -162,6 +162,28 @@ const getElonPricePerFullShare = async (contract, block, inceptionBlockNbr) => { return pricePerFullShare; }; +const getCubanPricePerFullShare = async (contract, block, inceptionBlockNbr) => { + const contractDidntExist = block < inceptionBlockNbr; + const inceptionBlock = block === inceptionBlockNbr; + + if (inceptionBlock) { + return 1e18; + } + if (contractDidntExist) { + return 0; + } + + let pricePerFullShare = 0; + try { + const pool = await contract.methods.getAllPoolInUSD().call(undefined, block); // All pool in USD (6 decimals) + const totalSupply = await contract.methods.totalSupply().call(undefined, block); + pricePerFullShare = (new BigNumber(pool)).shiftedBy(12).dividedBy(totalSupply).toNumber(); + } catch (ex) {} + + await delay(delayTime); + return pricePerFullShare; +}; + const getFaangPricePerFullShare = async (contract, block, inceptionBlockNbr) => { const contractDidntExist = block < inceptionBlockNbr; const inceptionBlock = block === inceptionBlockNbr; @@ -214,6 +236,7 @@ const getApyForVault = async (vault) => { compoundApy, citadelApy: 0, elonApy: 0, + cubanApy: 0, faangApy: 0, }; } else if (vault.isCitadel) { @@ -243,6 +266,7 @@ const getApyForVault = async (vault) => { compoundApy: 0, citadelApy: apy, elonApy: 0, + cubanApy: 0, faangApy: 0, } } else if (vault.isElon) { @@ -254,14 +278,12 @@ const getApyForVault = async (vault) => { contract = new archiveNodeWeb3.eth.Contract(testContracts.farmer['daoELO'].abi, testContracts.farmer['daoELO'].address); } - let pricePerFullShareCurrent = await getElonPricePerFullShare(contract, currentBlockNbr, inceptionBlockNbr); - let pricePerFullShareOneDayAgo = await getElonPricePerFullShare(contract, oneDayAgoBlock, inceptionBlockNbr); - pricePerFullShareCurrent = (0 < pricePerFullShareCurrent) ? pricePerFullShareCurrent : 1; // 0 can't be used as a reference for apy. - pricePerFullShareOneDayAgo = (0 < pricePerFullShareOneDayAgo) ? pricePerFullShareOneDayAgo : 1; // 0 can't be used as a reference for apy. + const pricePerFullShareCurrent = await getElonPricePerFullShare(contract, currentBlockNbr, inceptionBlockNbr); + const pricePerFullShareOneDayAgo = await getElonPricePerFullShare(contract, oneDayAgoBlock, inceptionBlockNbr); // APY Calculation const n = 365 / 2; // Assume 2 days to trigger invest function - const apr = (pricePerFullShareCurrent - pricePerFullShareOneDayAgo) * n; + const apr = (0 < pricePerFullShareCurrent && 0 < pricePerFullShareOneDayAgo) ? (pricePerFullShareCurrent - pricePerFullShareOneDayAgo) * n : 0; const apy = (Math.pow((1 + (apr / 100) / n), n) - 1) * 100; return { @@ -274,6 +296,37 @@ const getApyForVault = async (vault) => { compoundApy: 0, citadelApy: 0, elonApy: apy, + cubanApy: 0, + faangApy: 0, + } + } else if (vault.isCuban) { + // Cuban's APE Vault + let contract; + if (process.env.PRODUCTION != '') { + contract = new archiveNodeWeb3.eth.Contract(mainContracts.farmer['daoCUB'].abi, mainContracts.farmer['daoCUB'].address); + } else { + contract = new archiveNodeWeb3.eth.Contract(testContracts.farmer['daoCUB'].abi, testContracts.farmer['daoCUB'].address); + } + + const pricePerFullShareCurrent = await getCubanPricePerFullShare(contract, currentBlockNbr, inceptionBlockNbr); + const pricePerFullShareOneDayAgo = await getCubanPricePerFullShare(contract, oneDayAgoBlock, inceptionBlockNbr); + + // APY Calculation + const n = 365 / 2; // Assume 2 days to trigger invest function + const apr = (0 < pricePerFullShareCurrent && 0 < pricePerFullShareOneDayAgo) ? (pricePerFullShareCurrent - pricePerFullShareOneDayAgo) * n : 0; + const apy = (Math.pow((1 + (apr / 100) / n), n) - 1) * 100; + + return { + apyInceptionSample: 0, + apyOneDaySample: 0, + apyThreeDaySample: 0, + apyOneWeekSample: 0, + apyOneMonthSample: 0, + apyLoanscan: 0, + compoundApy: 0, + citadelApy: 0, + elonApy: 0, + cubanApy: apy, faangApy: 0, } } else if (vault.isFaang) { @@ -305,6 +358,7 @@ const getApyForVault = async (vault) => { compoundApy: 0, citadelApy: 0, elonApy: 0, + cubanApy: 0, faangApy: apy } } else if (vault.isHarvest) { @@ -369,6 +423,7 @@ const getApyForVault = async (vault) => { compoundApy: 0, citadelApy: 0, elonApy: 0, + cubanApy: 0, faangApy: 0, }; } else { @@ -489,6 +544,7 @@ const getApyForVault = async (vault) => { compoundApy: 0, citadelApy: 0, elonApy: 0, + cubanApy: 0, faangApy: 0, }; } @@ -549,6 +605,10 @@ const getHistoricalAPY = async (startTime, contractAddress) => { case mainContracts.farmer['daoELO'].address: result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.daoELOFarmer); break; + case testContracts.farmer['daoCUB'].address: + case mainContracts.farmer['daoCUB'].address: + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.daoCUBFarmer); + break; case testContracts.farmer['daoSTO'].address: case mainContracts.farmer['daoSTO'].address: result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.daoSTOFarmer); diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 909b54f..8eaecb7 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -191,6 +191,27 @@ const testVaults = [ price_id: ["tether", "usd-coin", "dai"], isElon: true, }, + { + id: "daoCUB", + name: "DAO Vault Cuban", + symbol: ["USDT","USDC","DAI"], + description: "DAO Vault Cuban for 3 stablecoins", + vaultSymbol: "daoCUB", + erc20address: ["0x07de306ff27a2b630b1141956844eb1552b956b5", "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa"], + vaultContractAddress: "0x5c304a6cb105e1bff9805ca5cf072f1d2c3beac5", + vaultContractABI: abi.cubanApeVaultContract, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 25536976, + measurement: 1e18, + price_id: ["tether", "usd-coin", "dai"], + isCuban: true, + }, { id: "daoSTO", name: "DAO Vault Stonks", @@ -473,6 +494,27 @@ const mainVaults = [ price_id: ["tether", "usd-coin", "dai"], isElon: true, }, + { + id: "daoCUB", + name: "DAO Vault Cuban", + symbol: ["USDT","USDC","DAI"], + description: "DAO Vault Cuban for 3 stablecoins", + vaultSymbol: "daoCUB", + erc20address: ["0xdAC17F958D2ee523a2206206994597C13D831ec7", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0x6b175474e89094c44da98b954eedeac495271d0f"], + vaultContractAddress: "", // TODO: Update to the mainnet address + vaultContractABI: abi.cubanApeVaultContract, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 12722655, // TODO: Update to the mainnet block number + measurement: 1e18, + price_id: ["tether", "usd-coin", "dai"], + isCuban: true, + }, { id: "daoSTO", name: "DAO Vault Stonks", diff --git a/services/vaults/price/handler.js b/services/vaults/price/handler.js index 6141a9b..ee18f3e 100644 --- a/services/vaults/price/handler.js +++ b/services/vaults/price/handler.js @@ -57,6 +57,18 @@ const getElonPricePerFullShare = async (contract) => { return pricePerFullShare; } +const getCubanPricePerFullShare = async (contract) => { + let pricePerFullShare = 0; + try { + const pool = await contract.methods.getAllPoolInUSD().call(); // All pool in USD (6 decimals) + const totalSupply = await contract.methods.totalSupply().call(); + pricePerFullShare = (new BigNumber(pool)).shiftedBy(12).dividedBy(totalSupply).toNumber(); + } catch (ex) {} + + await delay(delayTime); + return pricePerFullShare; +} + const getFaangPricePerFullShare = async (contract) => { let pricePerFullShare = 0; try { @@ -85,6 +97,7 @@ const getCurrentPrice = async () => { compoundExchangeRate: 0, citadelPrice: 0, elonPrice: 0, + cubanPrice: 0, harvestPrice: 0 }).catch((err) => console.log('err', err)); } else if (contracts.farmer[key].contractType === 'compound') { @@ -101,6 +114,7 @@ const getCurrentPrice = async () => { compoundExchangeRate: exchangeRate, citadelPrice: 0, elonPrice: 0, + cubanPrice: 0, faangPrice: 0, harvestPrice: 0, }).catch((err) => console.log('err', err)); @@ -113,6 +127,7 @@ const getCurrentPrice = async () => { compoundExchangeRate: 0, citadelPrice: pricePerFullShare, elonPrice: 0, + cubanPrice: 0, faangPrice: 0, harvestPrice: 0, }).catch((err) => console.log('err', err)); @@ -125,6 +140,20 @@ const getCurrentPrice = async () => { compoundExchangeRate: 0, citadelPrice: 0, elonPrice: pricePerFullShare, + cubanPrice: 0, + faangPrice: 0, + harvestPrice: 0, + }).catch((err) => console.log('err', err)); + } else if (contracts.farmer[key].contractType === 'cuban') { + const contract = getContract(contracts.farmer[key].abi, contracts.farmer[key].address); + const pricePerFullShare = await getCubanPricePerFullShare(contract); + await db.add(key + '_price', { + earnPrice: 0, + vaultPrice: 0, + compoundExchangeRate: 0, + citadelPrice: 0, + elonPrice: 0, + cubanPrice: pricePerFullShare, faangPrice: 0, harvestPrice: 0, }).catch((err) => console.log('err', err)); @@ -137,6 +166,7 @@ const getCurrentPrice = async () => { compoundExchangeRate: 0, citadelPrice: 0, elonPrice: 0, + cubanPrice: 0, faangPrice: pricePerFullShare, harvestPrice: 0, }).catch((err) => console.log('err', err)); @@ -160,6 +190,7 @@ const getCurrentPrice = async () => { compoundExchangeRate: 0, citadelPrice: 0, elonPrice: 0, + cubanPrice: 0, faangPrice: 0, harvestPrice: pricePerFullShare, }) @@ -171,6 +202,7 @@ const getCurrentPrice = async () => { compoundExchangeRate: 0, citadelPrice: 0, elonPrice: 0, + cubanPrice: 0, faangPrice: 0, harvestPrice: "0" }).catch((err) => console.log('err', err)); @@ -229,6 +261,9 @@ module.exports.handleHistoricialPrice = async (req, res) => { case db.daoELOFarmer: collection = db.daoELOFarmer; break; + case db.daoCUBFarmer: + collection = db.daoCUBFarmer; + break; case db.daoSTOFarmer: collection = db.daoSTOFarmer; break; diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index 35dc033..0b07420 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -122,7 +122,7 @@ const getTVL = async (vault) => { address } = vault; let tvl; - if (vault.contractType === 'citadel' || vault.contractType === 'elon') { + if (vault.contractType === 'citadel' || vault.contractType === 'elon' || vault.contractType === 'cuban') { const contract = await getTokenContract(vault); const usdPool = await contract.methods.getAllPoolInUSD().call(); tvl = usdPool / 10 ** 6; // All pool in USD (6 decimals follow USDT) @@ -282,6 +282,9 @@ module.exports.tvlHandle = async (req, res) => { case db.daoELOFarmer: collection = db.daoELOFarmer; break; + case db.daoCUBFarmer: + collection = db.daoCUBFarmer; + break; case db.daoSTOFarmer: collection = db.daoSTOFarmer; break; From e51002dd77cd153a0ae9e9aed165f2d977d46aa0 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Tue, 6 Jul 2021 17:17:38 +0800 Subject: [PATCH 150/254] Multiply apr by 100 for frontend display. --- services/staking/dao-stake/handler.js | 1 + 1 file changed, 1 insertion(+) diff --git a/services/staking/dao-stake/handler.js b/services/staking/dao-stake/handler.js index 48b1974..5099a12 100644 --- a/services/staking/dao-stake/handler.js +++ b/services/staking/dao-stake/handler.js @@ -242,6 +242,7 @@ const poolCalculation = async(daoStake, poolInfo, tokensPrice) => { // APR Calculation apr = (multiplier * poolPercent * dvgPrice * (poolWeight / 100)) / ((totalPoolWeight / 100) * tokenBalOfDAOStake * poolTokenPrice); + apr = apr * 100; // For percent display on frontend. // TVL Calculation const tvl = tokenBalOfDAOStake * poolTokenPrice; From 0962be20c963ec20a067677b3c926dc699ff0fc9 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Tue, 6 Jul 2021 19:04:25 +0800 Subject: [PATCH 151/254] Update tokenId for daoSTO. --- scripts/initial.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/initial.js b/scripts/initial.js index c50efb4..9ddb3e2 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -134,7 +134,7 @@ db.stake_pool.insertMany([ status: 'A', pid: '11', category: 'Basic', - tokenId: 'ethereum', + tokenId: 'tether', symbol: 'daoSTO' } ]); @@ -279,7 +279,7 @@ db.stake_pool.insertMany([ status: 'A', pid: '11', category: 'Advance', - tokenId: 'ethereum', + tokenId: 'tether', symbol: 'daoSTO' } ]); From 8dba862f79bf44baf9a812aed82daec9a5f02246 Mon Sep 17 00:00:00 2001 From: muhdmud Date: Tue, 6 Jul 2021 19:06:44 +0800 Subject: [PATCH 152/254] update address according to dao-docs --- scripts/initial.js | 13 ++++++------- services/vaults/tvl/handler.js | 10 ++++++++++ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/scripts/initial.js b/scripts/initial.js index 8a17b56..fba66d7 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -10,10 +10,9 @@ db.vault_categories.insertMany([ { name: 'expert', contract_address: '0x8fe826cc1225b03aa06477ad5af745aed5fe7066', symbol: 'daoCDV', }, { name: 'degen', contract_address: '0x2d9a136cf87d599628bcbdfb6c4fe75acd2a0aa8', symbol: 'daoELO', }, { name: 'advance', contract_address: '0x742a85daf742ca0213b06fdae449434e0448691e', symbol: 'daoSTO', }, - // TODO: add in mainnet contract addresss - // { name: 'basic', contract_address: '', symbol: 'hfUSDT'}, - // { name: 'basic', contract_address: '', symbol: 'hfUSDC'}, - // { name: 'basic', contract_address: '', symbol: 'hfDAI'}, + { name: 'basic', contract_address: '0x2Cc1507E6E3C844EEb77Db90d193489f1Ddfb299', symbol: 'hfUSDT'}, + { name: 'basic', contract_address: '0xd0f0858578C7780f2D65f6d81BC7DdBe166367cC', symbol: 'hfUSDC'}, + { name: 'basic', contract_address: '0xE4E6Ce7c1D9Ff44Db27f622aCcbB0753C2f48955', symbol: 'hfDAI'}, ]); db.stake_pool.insertMany([ @@ -151,9 +150,9 @@ db.vault_categories.insertMany([ { name: 'expert', contract_address: '0x626c25ca5b86277f395c0e40dbdf51f2a302ab43', symbol: 'daoCDV', }, { name: 'degen', contract_address: '0xf03fa8553379d872b4e2bafbc679409fb82604c2', symbol: 'daoELO', }, { name: 'advance', contract_address: '0xd6af81e5288be43137debf969d7f2c03482c8cc1', symbol: 'daoSTO', }, - { name: 'basic', contract_address: '0xb41a49de82e95dc1e028839c3440ac97f9a7832c', symbol: 'hfUSDT'}, - { name: 'basic', contract_address: '0x54783464848b35d6fb9bba37c1ddd23ac3b1a11a', symbol: 'hfUSDC'}, - { name: 'basic', contract_address: '0x0f89ee5b95d1d5cfb10f29775d816fc6d8adb9fc', symbol: 'hfDAI'}, + { name: 'basic', contract_address: '0x35880615bb18DA592FF0fEb0940ADE2c02249715', symbol: 'hfUSDT'}, + { name: 'basic', contract_address: '0x68b1C860300c4f7d577f08D8B3c3AEe23887b280', symbol: 'hfUSDC'}, + { name: 'basic', contract_address: '0x6D7e8fA90C1ffdC019d691BAFC18D6362FdEeCd7', symbol: 'hfDAI'}, ]); db.xdvg_token.insert({ diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index 35dc033..f05d9e5 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -285,6 +285,15 @@ module.exports.tvlHandle = async (req, res) => { case db.daoSTOFarmer: collection = db.daoSTOFarmer; break; + case db.hfDaiFarmer: + collection = db.hfDaiFarmer; + break; + case db.hfUsdtFarmer: + collection = db.hfUsdtFarmer; + break; + case db.hfUsdcFarmer: + collection = db.hfUsdcFarmer; + break; default: res.status(200).json({ message: "Invalid Farmer", @@ -293,6 +302,7 @@ module.exports.tvlHandle = async (req, res) => { return; } + const result = await db.getTVL(collection, { limit: 1 }); if (result) { res.status(200).json({ From 278df436d4540bbebf627588556c37495810486b Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Tue, 6 Jul 2021 19:38:09 +0800 Subject: [PATCH 153/254] Fixed Uniswap price token --- services/staking/dao-stake/handler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/staking/dao-stake/handler.js b/services/staking/dao-stake/handler.js index 5099a12..e496a5e 100644 --- a/services/staking/dao-stake/handler.js +++ b/services/staking/dao-stake/handler.js @@ -91,7 +91,7 @@ const getTokenPrice = async () => { /** Uniswap ETH<->DVG LP **/ const ethDVGPoolInfo = getContractInfo("uniswap").ethDVG; const ethDVGPoolContract = await getContract(ethDVGPoolInfo); - const ethDVGPoolPrice = await getUniswapLPTokenPrice(ethDVGPoolContract, ethDVGPoolInfo.address, tokens, 'ethereum', 'daoventures'); + const ethDVGPoolPrice = await getUniswapLPTokenPrice(ethDVGPoolContract, ethDVGPoolInfo.address, tokens, 'daoventures', 'ethereum'); tokens.push({ tokenId: 'ethDVG', price: ethDVGPoolPrice, From bfe8b943b619dd9a4974150c48d180d0aa6aa17c Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Tue, 6 Jul 2021 21:32:49 +0800 Subject: [PATCH 154/254] Add implementation of start block checking in DAOmine. --- scripts/initial.js | 105 +++++++++++++++++++++----- services/staking/dao-stake/handler.js | 40 +++++++--- 2 files changed, 114 insertions(+), 31 deletions(-) diff --git a/scripts/initial.js b/scripts/initial.js index 3583085..3593374 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -22,7 +22,8 @@ db.stake_pool.insertMany([ pid: '0', category: 'Advance', tokenId: 'tether', - symbol: 'USDT' + symbol: 'USDT', + startBlock: 12770000, }, { name: 'dvmUSDC', @@ -32,7 +33,8 @@ db.stake_pool.insertMany([ pid: '1', category: 'Advance', tokenId: 'usd-coin', - symbol: 'USDC' + symbol: 'USDC', + startBlock: 12770000, }, { name: 'dvmDAI', @@ -42,7 +44,8 @@ db.stake_pool.insertMany([ pid: '2', category: 'Advance', tokenId: 'dai', - symbol: 'DAI' + symbol: 'DAI', + startBlock: 12770000, }, { name: 'dvmTUSD', @@ -52,7 +55,8 @@ db.stake_pool.insertMany([ pid: '3', category: 'Advance', tokenId: 'true-usd', - symbol: 'TUSD' + symbol: 'TUSD', + startBlock: 12770000, }, { name: 'dvlUSDT', @@ -62,7 +66,8 @@ db.stake_pool.insertMany([ pid: '4', category: 'Basic', tokenId: 'tether', - symbol: 'USDT' + symbol: 'USDT', + startBlock: 12770000, }, { name: 'dvlUSDC', @@ -72,7 +77,8 @@ db.stake_pool.insertMany([ pid: '5', category: 'Basic', tokenId: 'usd-coin', - symbol: 'USDC' + symbol: 'USDC', + startBlock: 12770000, }, { name: 'dvlDAI', @@ -82,7 +88,8 @@ db.stake_pool.insertMany([ pid: '6', category: 'Basic', tokenId: 'dai', - symbol: 'DAI' + symbol: 'DAI', + startBlock: 12770000, }, { name: 'vipDVG', @@ -92,7 +99,8 @@ db.stake_pool.insertMany([ pid: '7', category: 'Basic', tokenId: 'xDVG', - symbol: 'xDVG' + symbol: 'xDVG', + startBlock: 12770000, }, { name: 'ETH<->DVG', @@ -102,7 +110,8 @@ db.stake_pool.insertMany([ pid: '8', category: 'Basic', tokenId: 'ethDVG', - symbol: 'ethDVG' + symbol: 'ethDVG', + startBlock: 12770000, }, { name: 'daoCDV', @@ -112,7 +121,30 @@ db.stake_pool.insertMany([ pid: '9', category: 'Expert', tokenId: 'ethereum', - symbol: 'daoCDV' + symbol: 'daoCDV', + startBlock: 12770000, + }, + { + name: 'daoELO', + label: 'Elon\'s APE LP', + contract_address: '0x2d9a136cf87d599628bcbdfb6c4fe75acd2a0aa8', + status: 'A', + pid: '10', + category: 'Degen', + tokenId: 'ethereum', + symbol: 'daoELO', + startBlock: 12770000, + }, + { + name: "daoSTO", + label: "DAO FAANG Stonk", + contract_address: '0x742a85daf742ca0213b06fdae449434e0448691e', + status: 'A', + pid: '3', + category: 'Advance', + tokenId: 'tether', + symbol: 'daoSTO', + startBlock: 12770000, } ]); @@ -145,7 +177,8 @@ db.stake_pool.insertMany([ pid: '0', category: 'Advance', tokenId: 'tether', - symbol: 'USDT' + symbol: 'USDT', + startBlock: 25721857, }, { name: 'dvmUSDC', @@ -155,7 +188,8 @@ db.stake_pool.insertMany([ pid: '1', category: 'Advance', tokenId: 'usd-coin', - symbol: 'USDC' + symbol: 'USDC', + startBlock: 25721857, }, { name: 'dvmDAI', @@ -165,7 +199,8 @@ db.stake_pool.insertMany([ pid: '2', category: 'Advance', tokenId: 'dai', - symbol: 'DAI' + symbol: 'DAI', + startBlock: 25721857, }, { name: 'dvmTUSD', @@ -175,7 +210,8 @@ db.stake_pool.insertMany([ pid: '3', category: 'Advance', tokenId: 'true-usd', - symbol: 'TUSD' + symbol: 'TUSD', + startBlock: 25721857, }, { name: 'dvlUSDT', @@ -185,7 +221,8 @@ db.stake_pool.insertMany([ pid: '4', category: 'Basic', tokenId: 'tether', - symbol: 'USDT' + symbol: 'USDT', + startBlock: 25721857, }, { name: 'dvlUSDC', @@ -195,7 +232,8 @@ db.stake_pool.insertMany([ pid: '5', category: 'Basic', tokenId: 'usd-coin', - symbol: 'USDC' + symbol: 'USDC', + startBlock: 25721857, }, { name: 'dvlDAI', @@ -205,7 +243,8 @@ db.stake_pool.insertMany([ pid: '6', category: 'Basic', tokenId: 'dai', - symbol: 'DAI' + symbol: 'DAI', + startBlock: 25721857, }, { name: 'vipDVG', @@ -215,7 +254,8 @@ db.stake_pool.insertMany([ pid: '7', category: 'Basic', tokenId: 'xDVG', - symbol: 'xDVG' + symbol: 'xDVG', + startBlock: 25721857, }, { name: 'ETH<->DVG', @@ -225,7 +265,8 @@ db.stake_pool.insertMany([ pid: '8', category: 'Basic', tokenId: 'ethDVG', - symbol: 'ethDVG' + symbol: 'ethDVG', + startBlock: 25721857, }, { name: 'daoCDV', @@ -235,10 +276,34 @@ db.stake_pool.insertMany([ pid: '9', category: 'Expert', tokenId: 'ethereum', - symbol: 'daoCDV' + symbol: 'daoCDV', + startBlock: 25721857, + }, + { + name: 'daoELO', + label: 'Elon\'s APE LP', + contract_address: '0xf03fa8553379d872b4e2bafbc679409fb82604c2', + status: 'A', + pid: '10', + category: 'Basic', + tokenId: 'ethereum', + symbol: 'daoELO', + startBlock: 25721857, + }, + { + name: "daoSTO", + label: "DAO FAANG Stonk LP", + contract_address: '0xd6af81e5288be43137debf969d7f2c03482c8cc1', + status: 'A', + pid: '11', + category: 'Advance', + tokenId: 'tether', + symbol: 'daoSTO', + startBlock: 25721857, } ]); + db.special_event.insertMany([ { startTime: 1622390400000, endTime: 1622444400000, threshold: 3000 }, { startTime: 1622538000000, endTime: 1622541600000, threshold: 5000 }, diff --git a/services/staking/dao-stake/handler.js b/services/staking/dao-stake/handler.js index 5099a12..8a0dc68 100644 --- a/services/staking/dao-stake/handler.js +++ b/services/staking/dao-stake/handler.js @@ -139,12 +139,10 @@ const getLPTokenBalanceOfDAOStake = async (contract, daoStakeAddress) => { } // getMultiplier() from DAOstake contract -const getMultiplier = async(start, current, daoStakeContract) => { +const getMultiplier = async(startBlock, endBlock, daoStakeContract) => { try { - //const currentBlockNbr = await infuraWeb3.eth.getBlockNumber(); - // let multiplier = await daoStakeContract.methods.getMultiplier(start, currentBlockNbr).call(); - const endBlockNumber = start + (4 * 60 * 24 * 365); // Temporaly fix - let multiplier = await daoStakeContract.methods.getMultiplier(start, endBlockNumber).call(); + console.log(`Start block ${startBlock}, End Block ${endBlock}`); + let multiplier = await daoStakeContract.methods.getMultiplier(startBlock, endBlock).call(); multiplier = multiplier / (10 ** 18); return multiplier; } catch (err) { @@ -218,7 +216,7 @@ const poolCalculation = async(daoStake, poolInfo, tokensPrice) => { let apr = 0; // Extract data from daoStake param - const { startBlock, poolPercent, totalPoolWeight , daoStakeContract } = daoStake; + const { poolPercent, totalPoolWeight , daoStakeContract } = daoStake; // Extract data from poolInfo param const { poolContract, pool } = poolInfo; @@ -228,13 +226,13 @@ const poolCalculation = async(daoStake, poolInfo, tokensPrice) => { // Pass in DAOstake contract, pool's pid to invoke pool() in DAOstake contract const getPool = await getPoolFromDaoStake(pool.pid, daoStakeContract); - const { lastRewardBlock, poolWeight } = getPool; + const { poolWeight } = getPool; // Pass in pool's contract, DAOstake address get balanceOf() in pool's contract const tokenBalOfDAOStake = await getLPTokenBalanceOfDAOStake(poolContract, daoStakeContract._address); // Pass in start block, last reward block to invoke getMultiplier() in DAOstake contract - const multiplier = await getMultiplier(startBlock, lastRewardBlock, daoStakeContract); + const multiplier = await getMultiplier(pool.startBlock, pool.endBlock, daoStakeContract); // Find pool token price const poolTokenPrice = tokens.find(t => t.tokenId === pool.tokenId).price; @@ -250,7 +248,7 @@ const poolCalculation = async(daoStake, poolInfo, tokensPrice) => { const decimal = await getDecimal(poolContract); Object.assign(pool, { apr: apr === Infinity ? 0 : apr, tvl , multiplier, decimal}); - + return pool; } @@ -289,8 +287,11 @@ module.exports.saveStakedPools = async () => { // Uniswap ETH <-> DVG Pool poolAbiContractMap.set(contracts.uniswap.ethDVG.address.toLowerCase(), contracts.uniswap.ethDVG.abi); - // daoCDV - poolAbiContractMap.set(contracts.uniswap.ethDVG.address.toLowerCase(), contracts.uniswap.ethDVG.abi); + // Current Block Number + const currentBlockNumber = await infuraWeb3.eth.getBlockNumber(); + + // Block number generated per year, 4 block per minute + const blockNumberPerYear = (4 * 60 * 24 * 365); for (index = 0 ; index < poolSize; index ++) { const contractAddressToLowerCase = pools[index].contract_address.toLowerCase(); @@ -302,6 +303,23 @@ module.exports.saveStakedPools = async () => { abi: poolAbiContractMap.get(contractAddressToLowerCase) }; + // Checking on pool's start block number + if(pools[index].startBlock) { + let startBlock = pools[index].startBlock; + let endBlock = startBlock + blockNumberPerYear; + + // Update new start block and end block + if(currentBlockNumber >= endBlock) { + startBlock = endBlock; + endBlock = startBlock + blockNumberPerYear; + } + + pools[index].startBlock = startBlock; + pools[index].endBlock = endBlock; + } else { + console.log(`Pool ${pools[index].label} is missing its startBlock.`); + } + // Get pool contract const poolContract = await getContract(poolContractInfo); let poolInfo = { From 3d76990f7760b7a537da5ca927037f6a34141fad Mon Sep 17 00:00:00 2001 From: muhdmud Date: Wed, 7 Jul 2021 08:40:59 +0800 Subject: [PATCH 155/254] updated testnet addresses to dao-docs --- config/serverless/domain.js | 48 ++++++++++---------- scripts/initial.js | 72 +++++++++++++++++++++++++++--- services/vaults/apy/save/vaults.js | 12 ++--- 3 files changed, 96 insertions(+), 36 deletions(-) diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 7b2ab25..6668a72 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -352,30 +352,30 @@ const mainContracts = { contractType: "daoFaang", tokenId: ["tether", "usd-coin", "dai"], }, - // hfDAI: { - // address: '', // TODO: Update that this to mainnet address - // abi: abi.hfVaultContract, - // strategyAddress: '', - // strategyABI: abi.hfStrategyContract, - // contractType: 'harvest', - // tokenId: "dai", - // }, - // hfUSDC: { - // address: '', // TODO: Update that this to mainnet address - // abi: abi.hfVaultContract, - // strategyAddress: '', - // strategyABI: abi.hfStrategyContract, - // contractType: 'harvest', - // tokenId: "usd-coin", - // }, - // hfUSDT: { - // address: '', // TODO: Update that this to mainnet address - // abi: abi.hfVaultContract, - // strategyAddress: '', - // strategyABI: abi.hfStrategyContract, - // contractType: 'harvest', - // tokenId: "tether", - // }, + hfDAI: { + address: '0x2cc1507e6e3c844eeb77db90d193489f1ddfb299', + abi: abi.hfVaultContract, + strategyAddress: '0x89541e3b8e8b73c108744909ea11d506b4a8e6c7', + strategyABI: abi.hfStrategyContract, + contractType: 'harvest', + tokenId: "dai", + }, + hfUSDC: { + address: '0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc', + abi: abi.hfVaultContract, + strategyAddress: '0x0af9547974e056fca221f679dbbb7f8651407d7f', + strategyABI: abi.hfStrategyContract, + contractType: 'harvest', + tokenId: "usd-coin", + }, + hfUSDT: { + address: '0xe4e6ce7c1d9ff44db27f622accbb0753c2f48955', + abi: abi.hfVaultContract, + strategyAddress: '0xef9a15025c2ed048a67c5c8019a1101172eeb51c', + strategyABI: abi.hfStrategyContract, + contractType: 'harvest', + tokenId: "tether", + }, }, compund: { cUSDT: { diff --git a/scripts/initial.js b/scripts/initial.js index fba66d7..5046c10 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -10,9 +10,9 @@ db.vault_categories.insertMany([ { name: 'expert', contract_address: '0x8fe826cc1225b03aa06477ad5af745aed5fe7066', symbol: 'daoCDV', }, { name: 'degen', contract_address: '0x2d9a136cf87d599628bcbdfb6c4fe75acd2a0aa8', symbol: 'daoELO', }, { name: 'advance', contract_address: '0x742a85daf742ca0213b06fdae449434e0448691e', symbol: 'daoSTO', }, - { name: 'basic', contract_address: '0x2Cc1507E6E3C844EEb77Db90d193489f1Ddfb299', symbol: 'hfUSDT'}, - { name: 'basic', contract_address: '0xd0f0858578C7780f2D65f6d81BC7DdBe166367cC', symbol: 'hfUSDC'}, - { name: 'basic', contract_address: '0xE4E6Ce7c1D9Ff44Db27f622aCcbB0753C2f48955', symbol: 'hfDAI'}, + { name: 'advance', contract_address: '0x2Cc1507E6E3C844EEb77Db90d193489f1Ddfb299', symbol: 'hfUSDT'}, + { name: 'advance', contract_address: '0xd0f0858578C7780f2D65f6d81BC7DdBe166367cC', symbol: 'hfUSDC'}, + { name: 'advance', contract_address: '0xE4E6Ce7c1D9Ff44Db27f622aCcbB0753C2f48955', symbol: 'hfDAI'}, ]); db.stake_pool.insertMany([ @@ -135,6 +135,36 @@ db.stake_pool.insertMany([ category: 'Basic', tokenId: 'ethereum', symbol: 'daoSTO' + }, + { + name: "hfUSDT", + label: "Harvest Fighter USDT LP", + contract_address: '0x2Cc1507E6E3C844EEb77Db90d193489f1Ddfb299', + status: 'A', + pid: '12', + category: 'Advance', + tokenId: 'USDT', + symbol: 'hfUSDT' + }, + { + name: "hfUSDC", + label: "Harvest Fighter USDC LP", + contract_address: '0xd0f0858578C7780f2D65f6d81BC7DdBe166367cC', + status: 'A', + pid: '13', + category: 'Advance', + tokenId: 'USDC', + symbol: 'hfUSDC' + }, + { + name: "hfDAI", + label: "Harvest Fighter DAI LP", + contract_address: '0xE4E6Ce7c1D9Ff44Db27f622aCcbB0753C2f48955', + status: 'A', + pid: '14', + category: 'Advance', + tokenId: 'DAI', + symbol: 'hfDAI' } ]); @@ -150,9 +180,9 @@ db.vault_categories.insertMany([ { name: 'expert', contract_address: '0x626c25ca5b86277f395c0e40dbdf51f2a302ab43', symbol: 'daoCDV', }, { name: 'degen', contract_address: '0xf03fa8553379d872b4e2bafbc679409fb82604c2', symbol: 'daoELO', }, { name: 'advance', contract_address: '0xd6af81e5288be43137debf969d7f2c03482c8cc1', symbol: 'daoSTO', }, - { name: 'basic', contract_address: '0x35880615bb18DA592FF0fEb0940ADE2c02249715', symbol: 'hfUSDT'}, - { name: 'basic', contract_address: '0x68b1C860300c4f7d577f08D8B3c3AEe23887b280', symbol: 'hfUSDC'}, - { name: 'basic', contract_address: '0x6D7e8fA90C1ffdC019d691BAFC18D6362FdEeCd7', symbol: 'hfDAI'}, + { name: 'advance', contract_address: '0x35880615bb18DA592FF0fEb0940ADE2c02249715', symbol: 'hfUSDT'}, + { name: 'advance', contract_address: '0x68b1C860300c4f7d577f08D8B3c3AEe23887b280', symbol: 'hfUSDC'}, + { name: 'advance', contract_address: '0x6D7e8fA90C1ffdC019d691BAFC18D6362FdEeCd7', symbol: 'hfDAI'}, ]); db.xdvg_token.insert({ @@ -280,6 +310,36 @@ db.stake_pool.insertMany([ category: 'Advance', tokenId: 'ethereum', symbol: 'daoSTO' + }, + { + name: "hfUSDT", + label: "Harvest Fighter USDT LP", + contract_address: '0x35880615bb18DA592FF0fEb0940ADE2c02249715', + status: 'A', + pid: '12', + category: 'Advance', + tokenId: 'USDT', + symbol: 'hfUSDT' + }, + { + name: "hfUSDC", + label: "Harvest Fighter USDC LP", + contract_address: '0x68b1C860300c4f7d577f08D8B3c3AEe23887b280', + status: 'A', + pid: '13', + category: 'Advance', + tokenId: 'USDC', + symbol: 'hfUSDC' + }, + { + name: "hfDAI", + label: "Harvest Fighter DAI LP", + contract_address: '0x6D7e8fA90C1ffdC019d691BAFC18D6362FdEeCd7', + status: 'A', + pid: '14', + category: 'Advance', + tokenId: 'DAI', + symbol: 'hfDAI' } ]); diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 909b54f..d9e85a4 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -219,9 +219,9 @@ const testVaults = [ description: "DAI Stablecoin", vaultSymbol: "hfDAI", erc20address: "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa", - vaultContractAddress: "0x0f89EE5b95d1d5cfb10F29775d816fC6D8Adb9FC", + vaultContractAddress: "0x6d7e8fa90c1ffdc019d691bafc18d6362fdeecd7", vaultContractABI: abi.hfVaultContract, - strategyContractAddress: "0xE5331cAF0B4E15C88E878551b93df0647738Af35", + strategyContractAddress: "0xdfeb689aea68f221eaafeeeb91767003265968d6", strategyABI: abi.hfStrategyContract, balance: 0, vaultBalance: 0, @@ -242,9 +242,9 @@ const testVaults = [ description: "USD//C", vaultSymbol: "hfUSDC", erc20address: "0xb7a4f3e9097c08da09517b5ab877f7a917224ede", - vaultContractAddress: "0x54783464848b35d6fb9bba37C1dDd23aC3B1A11A", + vaultContractAddress: "0x68b1c860300c4f7d577f08d8b3c3aee23887b280", vaultContractABI: abi.hfVaultContract, - strategyContractAddress: "0xE5331cAF0B4E15C88E878551b93df0647738Af35", + strategyContractAddress: "0x7da9e06545c4fe6556fc0990f5afd4955379e1d2", strategyABI: abi.hfStrategyContract, balance: 0, vaultBalance: 0, @@ -265,9 +265,9 @@ const testVaults = [ description: "Tether USD", vaultSymbol: "hfUSDT", erc20address: "0x07de306ff27a2b630b1141956844eb1552b956b5", - vaultContractAddress: "0xb41A49De82e95dc1E028839C3440Ac97f9A7832C", + vaultContractAddress: "0x35880615bb18da592ff0feb0940ade2c02249715", vaultContractABI: abi.hfVaultContract, - strategyContractAddress: "0x0bFA86d10A383B435748E39Cedf8852CFD2B1A9d", + strategyContractAddress: "0xac783dc15d2cf08d1e1c34e18e531a9b182277b0", strategyABI: abi.hfStrategyContract, balance: 0, vaultBalance: 0, From f0a726e362e395a7ba9f75159500a33810c36801 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Thu, 8 Jul 2021 15:33:07 +0800 Subject: [PATCH 156/254] Add Money Printer Vault and Strategy Contract ABI. --- config/abi.js | 1448 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1448 insertions(+) diff --git a/config/abi.js b/config/abi.js index ae323a7..648992b 100644 --- a/config/abi.js +++ b/config/abi.js @@ -19913,6 +19913,1454 @@ const daoFaangStonkStrategyContract =[ } ]; +const moneyPrinterVaultContract = [ + { + "inputs": [ + { + "internalType": "address", + "name": "_strategy", + "type": "address" + }, + { + "internalType": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_treasuryWallet", + "type": "address" + }, + { + "internalType": "address", + "name": "_communityWallet", + "type": "address" + }, + { + "internalType": "address", + "name": "_strategist", + "type": "address" + }, + { + "internalType": "address", + "name": "_biconomy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sharesMinted", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "fromStrategy", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newStrategy", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "MigrateFunds", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "SetAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldCommunityWallet", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newCommunityWallet", + "type": "address" + } + ], + "name": "SetCommunityWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldStrategy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newStrategy", + "type": "address" + } + ], + "name": "SetPendingStrategy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldStrategist", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newStrategist", + "type": "address" + } + ], + "name": "SetStrategistWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldTreasury", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newTreasury", + "type": "address" + } + ], + "name": "SetTreasuryWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "unlockTime", + "type": "uint256" + } + ], + "name": "UnlockMigrateFunds", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sharesBurned", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "Yield", + "type": "event" + }, + { + "inputs": [], + "name": "DAI", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "LOCKTIME", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "QuickSwapRouter", + "outputs": [ + { + "internalType": "contract IUniswapV2Router02", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "USDC", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "USDT", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "canSetPendingStrategy", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeePerc", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeeTier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "depositedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + } + ], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getValueInPool", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isEmergency", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "forwarder", + "type": "address" + } + ], + "name": "isTrustedForwarder", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + } + ], + "name": "migrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeePerc", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeeTier2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingStrategy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "profitSharingFeePerc", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reInvest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newAdmin", + "type": "address" + } + ], + "name": "setAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_communityWallet", + "type": "address" + } + ], + "name": "setCommunityWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pendingStrategy", + "type": "address" + } + ], + "name": "setPendingStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_strategist", + "type": "address" + } + ], + "name": "setStrategist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_treasuryWallet", + "type": "address" + } + ], + "name": "setTreasuryWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "strategist", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "strategy", + "outputs": [ + { + "internalType": "contract IStrategy", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "trustedForwarder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unlockMigrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unlockTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "versionRecipient", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + }, + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "yield", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; + +const moneyPrinterStrategyContract = [ + { + "inputs": [ + { + "internalType": "address", + "name": "_treasury", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "CRV", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DAI", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DAIUSDTQuickswapPool", + "outputs": [ + { + "internalType": "contract ILPPool", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MATIC", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "QUICK", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "QuickDAI_USDTPair", + "outputs": [ + { + "internalType": "contract IUniswapV2Pair", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "USDC", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "USDT", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WexPolyRouter", + "outputs": [ + { + "internalType": "contract IUniswapV2Router02", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WexUSDT_USDCPair", + "outputs": [ + { + "internalType": "contract IUniswapV2Pair", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "Wexpoly", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "curveFi", + "outputs": [ + { + "internalType": "contract ICurveFi", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "curveLpToken", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getValueInPool", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "harvest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + } + ], + "name": "migrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quickSwapRouter", + "outputs": [ + { + "internalType": "contract IUniswapV2Router02", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rewardGauge", + "outputs": [ + { + "internalType": "contract IGauge", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_treasury", + "type": "address" + } + ], + "name": "setTreasuryWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_vault", + "type": "address" + } + ], + "name": "setVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vault", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "wexStakingContract", + "outputs": [ + { + "internalType": "contract WexPolyMaster", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; + module.exports = { earnUSDTABIContract, earnUSDCABIContract, From dc8540727ab7f37f9676f4616b6615f216952ea6 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Thu, 8 Jul 2021 17:43:57 +0800 Subject: [PATCH 157/254] TVL Implementation. --- .env.example | 1 + config/abi.js | 4 ++- config/serverless/domain.js | 54 ++++++++++++++++++++++++++++++-- models/tvl.model.js | 1 + services/vaults/tvl/handler.js | 56 +++++++++++++++++++--------------- utils/constant.js | 5 +++ utils/contract.js | 43 ++++++++++++++++++++++++++ 7 files changed, 135 insertions(+), 29 deletions(-) create mode 100644 utils/constant.js create mode 100644 utils/contract.js diff --git a/.env.example b/.env.example index 54bf18c..73d97b9 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,7 @@ SUBGRAPH_ENDPOINT = https://api.thegraph.com/subgraphs/name/rrridges-crypto/yearn-vault-roi-dev WEB3_ENDPOINT = https://mainnet.infura.io/v3/4f8bf400ab354820998e6dfdea0a1b78 ARCHIVENODE_ENDPOINT = https://api.archivenode.io/93mwpmy684fb0dc3c0q93mwpmwlssf6a +POLYGON_ARCHIVENODE_ENDPOINT = https://speedy-nodes-nyc.moralis.io/e783af49d36dc9636abd198b/polygon/mumbai/archive ETHERSCAN_API_KEY = GEQXZDY67RZ4QHNU1A57QVPNDV3RP1RYH4 SLACK_HOOK_URL = diff --git a/config/abi.js b/config/abi.js index 648992b..15320d4 100644 --- a/config/abi.js +++ b/config/abi.js @@ -21396,5 +21396,7 @@ module.exports = { elonApeVaultContract, elonApeStrategyContract, daoFaangStonkVaultContract, - daoFaangStonkStrategyContract + daoFaangStonkStrategyContract, + moneyPrinterVaultContract, + moneyPrinterStrategyContract, }; diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 84a7845..b87cb5e 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -1,6 +1,7 @@ const _ = require("lodash"); const abi = require("../abi"); const config = require("../../services/vaults/apy/save/config"); +const constant = require("../../utils/constant"); const DEFAULT = { domainName: "api.yearn.tools", @@ -87,6 +88,7 @@ const testContracts = { strategyABI: abi.yearnUSDTABIContract, contractType: "yearn", tokenId: "tether", + network: constant.ETHEREUM }, yUSDC: { address: "0x6e15e283dc430eca010ade8b11b5b377902d6e56", @@ -95,6 +97,7 @@ const testContracts = { strategyABI: abi.yearnUSDCABIContract, contractType: "yearn", tokenId: "usd-coin", + network: constant.ETHEREUM }, yDAI: { address: "0x2428bfd238a3632552b343297c504f60283009ed", @@ -103,6 +106,7 @@ const testContracts = { strategyABI: abi.yearnDAIABIContract, contractType: "yearn", tokenId: "dai", + network: constant.ETHEREUM }, yTUSD: { address: "0xeccb98c36bfc8c49c6065d1cd90bcf1c6f02d4ad", @@ -111,6 +115,7 @@ const testContracts = { strategyABI: abi.yearnTUSDABIContract, contractType: "yearn", tokenId: "true-usd", + network: constant.ETHEREUM }, cUSDT: { address: "0x5d102e0bdf2037899e1ff2e8cc50987108533c52", @@ -119,6 +124,7 @@ const testContracts = { strategyABI: abi.compoundStrategyContract, contractType: "compound", tokenId: "tether", + network: constant.ETHEREUM }, cUSDC: { address: "0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e", @@ -127,6 +133,7 @@ const testContracts = { strategyABI: abi.compoundStrategyContract, contractType: "compound", tokenId: "usd-coin", + network: constant.ETHEREUM }, cDAI: { address: "0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d", @@ -135,6 +142,7 @@ const testContracts = { strategyABI: abi.compoundStrategyContract, contractType: "compound", tokenId: "dai", + network: constant.ETHEREUM }, daoCDV: { address: "0x626c25ca5b86277f395c0e40dbdf51f2a302ab43", @@ -143,6 +151,7 @@ const testContracts = { strategyABI: abi.citadelStrategyABIContract, contractType: "citadel", tokenId: ["tether", "usd-coin", "dai"], + network: constant.ETHEREUM }, daoELO: { address: "0xf03fa8553379d872b4e2bafbc679409fb82604c2", @@ -151,6 +160,7 @@ const testContracts = { strategyABI: abi.elonApeStrategyContract, contractType: "elon", tokenId: ["tether", "usd-coin", "dai"], + network: constant.ETHEREUM }, daoSTO: { address: "0xd6af81e5288be43137debf969d7f2c03482c8cc1", @@ -159,6 +169,7 @@ const testContracts = { strategyABI: abi.daoFaangStonkStrategyContract, contractType: "daoFaang", tokenId: ["tether", "usd-coin", "dai"], + network: constant.ETHEREUM }, 'hfDAI': { address: '0x6d7e8fa90c1ffdc019d691bafc18d6362fdeecd7', @@ -167,6 +178,7 @@ const testContracts = { strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "dai", + network: constant.ETHEREUM }, 'hfUSDC': { address: '0x68b1c860300c4f7d577f08d8b3c3aee23887b280', @@ -175,6 +187,7 @@ const testContracts = { strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "usd-coin", + network: constant.ETHEREUM }, 'hfUSDT': { address: '0x35880615bb18da592ff0feb0940ade2c02249715', @@ -183,29 +196,43 @@ const testContracts = { strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "tether", - }, + network: constant.ETHEREUM + }, + daoMPT : { + address: '0x529163109fFa7899D603074f7289E2fcf52D8bB8', + abi: abi.moneyPrinterVaultContract, + strategyAddress: '0x7c7Ce69f20A48f7c8809cf3da66D19e9680B2552', + strategyABI: abi.moneyPrinterStrategyContract, + contractType: 'moneyPrinter', + tokenId: ["tether", "usd-coin", "dai"], + network: constant.POLYGON + } }, vipDVG: { address: "0x3aa8e8B6D3562a1E7aCB0dddD02b27896C00c424", abi: abi.xDVGABIContract, tokenId: "xDVG", lastMeasurement: 24819747, + network: constant.ETHEREUM, }, DVG: { address: "0xea9726eFc9831EF0499fD4Db4Ab143F15a797673", abi: abi.DVGABIContract, tokenId: "daoventures", + network: constant.ETHEREUM, }, daoStake: { address: "0xd8f59a99acfc597feb84914fef3769def87e7553", abi: abi.daoStakeContract, startBlock: 25721857, // Start block from contract's START_BLOCK - poolPercent: 0.51 + poolPercent: 0.51, + network: constant.ETHEREUM, }, uniswap: { ethDVG: { address: "0x0A15e37442e2a41A3A51A9Eff7fE1DCE0E96f0bB", abi: abi.uniswapPairABIContract, + network: constant.ETHEREUM, } }, harvest: { @@ -226,10 +253,12 @@ const testContracts = { USDT_ETH: { address: "0x0bF499444525a23E7Bb61997539725cA2e928138", abi: abi.eacAggregatoorProxyContract, + network: constant.ETHEREUM, }, USDT_USD: { address: "0x2ca5A90D34cA333661083F89D831f757A9A50148", abi: abi.eacAggregatoorProxyContract, + network: constant.ETHEREUM, } } }; @@ -279,6 +308,7 @@ const mainContracts = { strategyABI: abi.yearnUSDTABIContract, contractType: "yearn", tokenId: "tether", + network: constant.ETHEREUM, }, yUSDC: { address: "0x9f0230FbDC0379E5FefAcca89bE03A42Fec5fb6E", @@ -287,6 +317,7 @@ const mainContracts = { strategyABI: abi.yearnUSDCABIContract, contractType: "yearn", tokenId: "usd-coin", + network: constant.ETHEREUM, }, yDAI: { address: "0x2bFc2Da293C911e5FfeC4D2A2946A599Bc4Ae770", @@ -295,6 +326,7 @@ const mainContracts = { strategyABI: abi.yearnDAIABIContract, contractType: "yearn", tokenId: "dai", + network: constant.ETHEREUM, }, yTUSD: { address: "0x2C8de02aD4312069355B94Fb936EFE6CFE0C8FF6", @@ -303,6 +335,7 @@ const mainContracts = { strategyABI: abi.yearnTUSDABIContract, contractType: "yearn", tokenId: "true-usd", + network: constant.ETHEREUM, }, cUSDT: { address: "0xEeCe6AD323a93d4B021BDAaC587DCC04b5cf0a78", @@ -311,6 +344,7 @@ const mainContracts = { strategyABI: abi.compoundStrategyContract, contractType: "compound", tokenId: "tether", + network: constant.ETHEREUM, }, cUSDC: { address: "0xd1D7f950899C0269a7F2aad5E854cdc3a1350ba9", @@ -319,6 +353,7 @@ const mainContracts = { strategyABI: abi.compoundStrategyContract, contractType: "compound", tokenId: "usd-coin", + network: constant.ETHEREUM, }, cDAI: { address: "0x43C20638C3914Eca3c96e9cAc8ebE7d652Be45c6", @@ -327,6 +362,7 @@ const mainContracts = { strategyABI: abi.compoundStrategyContract, contractType: "compound", tokenId: "dai", + network: constant.ETHEREUM, }, daoCDV: { address: "0x8fe826cc1225b03aa06477ad5af745aed5fe7066", @@ -335,6 +371,7 @@ const mainContracts = { strategyABI: abi.citadelStrategyABIContract, contractType: "citadel", tokenId: ["tether", "usd-coin", "dai"], + network: constant.ETHEREUM, }, daoELO: { address: "0x2d9a136cf87d599628bcbdfb6c4fe75acd2a0aa8", @@ -343,6 +380,7 @@ const mainContracts = { strategyABI: abi.elonApeStrategyContract, contractType: "elon", tokenId: ["tether", "usd-coin", "dai"], + network: constant.ETHEREUM, }, daoSTO: { address: "0x742a85daf742ca0213b06fdae449434e0448691e", @@ -351,7 +389,17 @@ const mainContracts = { strategyABI: abi.daoFaangStonkStrategyContract, contractType: "daoFaang", tokenId: ["tether", "usd-coin", "dai"], - }, + network: constant.ETHEREUM, + }, + daoMPT : { + address: '0x529163109fFa7899D603074f7289E2fcf52D8bB8', + abi: abi.moneyPrinterVaultContract, + strategyAddress: '0x7c7Ce69f20A48f7c8809cf3da66D19e9680B2552', + strategyABI: abi.moneyPrinterStrategyContract, + contractType: 'moneyPrinter', + tokenId: ["tether", "usd-coin", "dai"], + network: constant.POLYGON + } // hfDAI: { // address: '', // TODO: Update that this to mainnet address // abi: abi.hfVaultContract, diff --git a/models/tvl.model.js b/models/tvl.model.js index 1ecac49..d373dd9 100644 --- a/models/tvl.model.js +++ b/models/tvl.model.js @@ -67,4 +67,5 @@ module.exports = { hfDaiFarmer: "hfDAI_tvl", hfUsdtFarmer: "hfUSDT_tvl", hfUsdcFarmer: "hfUSDC_tvl", + daoMPTFarmer: "daoMPT_tvl", }; diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index 35dc033..02c7d1f 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -1,12 +1,10 @@ -const _ = require("lodash"); const BigNumber = require("bignumber.js"); const db = require("../../../models/tvl.model"); -const Web3 = require("web3"); const CoinGecko = require("coingecko-api"); const CoinGeckoClient = new CoinGecko(); -const archiveNodeUrl = process.env.ARCHIVENODE_ENDPOINT; -const archiveNodeWeb3 = new Web3(archiveNodeUrl); + +const contractHelper = require('../../../utils/contract'); const { testContracts, @@ -56,16 +54,15 @@ const getTotalSupply = async (contract) => { } }; -const getContract = (contractAbi, contractAddress) => { - const contract = new archiveNodeWeb3.eth.Contract(contractAbi, contractAddress); - return contract; -}; - -const getTokenContract = async (vault) => { - const { abi, address } = vault; - const contract = new archiveNodeWeb3.eth.Contract(abi, address); - return contract; -}; +const getContract = async (vault) => { + try { + const { abi, address, network } = vault; + const contract = await contractHelper.getContract(abi, address, network); + return contract + } catch(err) { + console.log("getContract", err); + } +} /** * Get Token price from coingecko @@ -96,8 +93,8 @@ const getxDVGPrice = async () => { ? mainContracts : testContracts; - const DVGcontract = await getTokenContract(contracts.DVG); - const xDVGcontract = await getTokenContract(contracts.vipDVG); + const DVGcontract = await getContract(contracts.DVG); + const xDVGcontract = await getContract(contracts.vipDVG); const amountDVG = await getBalance( DVGcontract, contracts.vipDVG.address @@ -117,28 +114,34 @@ const getTVL = async (vault) => { const { tokenId, strategyABI, - strategyAddress, - abi, - address + strategyAddress } = vault; let tvl; + if (vault.contractType === 'citadel' || vault.contractType === 'elon') { - const contract = await getTokenContract(vault); + const contract = await getContract(vault); const usdPool = await contract.methods.getAllPoolInUSD().call(); tvl = usdPool / 10 ** 6; // All pool in USD (6 decimals follow USDT) } else if(vault.contractType === 'daoFaang'){ - const contract = await getTokenContract(vault); + const contract = await getContract(vault); const poolAmount = await contract.methods.getTotalValueInPool().call(); const decimals = await contract.methods.decimals().call(); tvl = poolAmount / 10 ** decimals; + } else if (vault.contractType === "moneyPrinter") { + const contract = await getContract(vault); + const poolAmount = await contract.methods.getValueInPool().call(); + const decimals = await contract.methods.decimals().call(); + tvl = poolAmount / 10 ** decimals; } else { - const strategyContract = getContract(strategyABI, strategyAddress); + const strategy = { abi: strategyABI, address: strategyAddress, network: vault.network} + const strategyContract = await getContract(strategy); + const poolAmount = await getPoolAmount(strategyContract); const tokenPrice = await getTokenPrice(tokenId); - let decimals = 0; + let decimals = 0; if(vault.contractType === 'harvest') { - const vaultContract = getContract(abi, address); + const vaultContract = await getContract(vault); decimals = await getDecimals(vaultContract); } else { decimals = await getDecimals(strategyContract); @@ -156,7 +159,7 @@ const getTVL = async (vault) => { const getTVLxDVG = async (vault) => { const { tokenId } = vault; let tvl; - const contract = await getTokenContract(vault); + const contract = await getContract(vault); const totalSupply = await getTotalSupply(contract); const decimals = await getDecimals(contract); const tokenPrice = await getxDVGPrice(tokenId); // Not implemented yet @@ -285,6 +288,9 @@ module.exports.tvlHandle = async (req, res) => { case db.daoSTOFarmer: collection = db.daoSTOFarmer; break; + case db.daoMPTFarmer: + collection = db.daoMPTFarmer; + break; default: res.status(200).json({ message: "Invalid Farmer", diff --git a/utils/constant.js b/utils/constant.js new file mode 100644 index 0000000..d7807e2 --- /dev/null +++ b/utils/constant.js @@ -0,0 +1,5 @@ +module.exports = { + // Network Category + ETHEREUM: "ethereum", + POLYGON: "polygon", +} \ No newline at end of file diff --git a/utils/contract.js b/utils/contract.js new file mode 100644 index 0000000..8e9770f --- /dev/null +++ b/utils/contract.js @@ -0,0 +1,43 @@ +const Web3 = require("web3"); +const constant = require("./constant"); + +const archiveNodeUrl = process.env.ARCHIVENODE_ENDPOINT; // Ethereum +const archiveNodePolygonUrl = process.env.POLYGON_ARCHIVENODE_ENDPOINT; // Polygon + +const web3 = new Web3(archiveNodeUrl); +const polygonWeb3 = new Web3(archiveNodePolygonUrl); + +// Create Ethereum network contract +module.exports.getEthereumContract = async (abi, address) => { + try { + const contract = new web3.eth.Contract(abi, address); + return contract; + } catch (err) { + console.log("err in getEthereumContract", err); + } +} + +// Create Polygon network contract +module.exports.getPolygonContract = async (abi, address) => { + try { + const contract = new polygonWeb3.eth.Contract(abi, address); + return contract; + } catch (err) { + console.log("err in getPolygonContract", err); + } +} + +module.exports.getContract = async (abi, address, network) => { + try { + switch(network) { + case constant.ETHEREUM: + return this.getEthereumContract(abi, address); + case constant.POLYGON: + return this.getPolygonContract(abi, address); + default: + break; + } + } catch (err) { + console.log(err); + } +} \ No newline at end of file From b322a98c5b76b0f8ca70f0f062abe3d0254e4a82 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Thu, 8 Jul 2021 18:26:45 +0800 Subject: [PATCH 158/254] Add utility function to get block number based on timeline. --- utils/contract.js | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/utils/contract.js b/utils/contract.js index 8e9770f..4940e45 100644 --- a/utils/contract.js +++ b/utils/contract.js @@ -7,6 +7,10 @@ const archiveNodePolygonUrl = process.env.POLYGON_ARCHIVENODE_ENDPOINT; // Polyg const web3 = new Web3(archiveNodeUrl); const polygonWeb3 = new Web3(archiveNodePolygonUrl); +const EthDater = require("../services/vaults/apy/save/ethereum-block-by-date"); +const ethereumBlocks = new EthDater(web3, 1000); +const polygonBlocks = new EthDater(polygonWeb3, 1000); + // Create Ethereum network contract module.exports.getEthereumContract = async (abi, address) => { try { @@ -40,4 +44,43 @@ module.exports.getContract = async (abi, address, network) => { } catch (err) { console.log(err); } -} \ No newline at end of file +} + +// Get current block number for Ethereum +module.exports.getEthereumCurrentBlockNumber = async() => { + try { + const currentBlockNumber = await web3.eth.getBlockNumber(); + return currentBlockNumber; + } catch (err) { + console.log('Error in getEthereumCurrentBlockNumber()', err); + } +} + +// Get current block number for Polygon +module.exports.getPolygonCurrentBlockNumber = async() => { + try { + const currentBlockNumber = await polygonWeb3.eth.getBlockNumber(); + return currentBlockNumber; + } catch (err) { + console.log('Error in getEthereumCurrentBlockNumber()', err); + } +} + +// Get ethereum block number by timeline +module.exports.getEthereumBlockNumberByTimeline = async(timeline) => { + try { + return (await ethereumBlocks.getDate(timeline)).block; + } catch (err) { + console.log('Error in getEthereumCurrentBlockNumber()', err); + } +} + +// Get Polygon block number by timeline +module.exports.getPolygonBlockNumberByTimeline = async(timeline) => { + try { + return (await polygonBlocks.getDate(timeline)).block; + } catch (err) { + console.log('Error in getPolygonBlockNumberByTimeline()', err); + } +} + From 1c6283c0aab7f6a28fc1e5613c6899795e202848 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Fri, 9 Jul 2021 14:52:40 +0800 Subject: [PATCH 159/254] Historical APY cronjob for Polygon contract. Integrate daoMPT into historical-apy API handling. --- app.js | 1 + config/serverless/domain.js | 58 ++++---- jobs/task.js | 17 +++ models/historical-apy.model.js | 1 + .../apy/save/historical-handle-polygon.js | 135 ++++++++++++++++++ services/vaults/apy/save/historical-handle.js | 12 +- services/vaults/apy/save/polygon-vault.js | 59 ++++++++ 7 files changed, 253 insertions(+), 30 deletions(-) create mode 100644 services/vaults/apy/save/historical-handle-polygon.js create mode 100644 services/vaults/apy/save/polygon-vault.js diff --git a/app.js b/app.js index 0217d58..4b43ed5 100644 --- a/app.js +++ b/app.js @@ -33,6 +33,7 @@ async function init() { jobs.saveVaultAPY(); jobs.savePricePerFullShare(); jobs.saveHistoricalAPY(); + jobs.savePolygonHistoricalAPY(); jobs.saveHistoricalTVL(); jobs.saveHistoricalPools(); jobs.saveABIPools(); diff --git a/config/serverless/domain.js b/config/serverless/domain.js index b87cb5e..9b9409d 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -198,8 +198,8 @@ const testContracts = { tokenId: "tether", network: constant.ETHEREUM }, - daoMPT : { - address: '0x529163109fFa7899D603074f7289E2fcf52D8bB8', + daoMPT: { + address: '0x529163109ffa7899d603074f7289e2fcf52d8bb8', abi: abi.moneyPrinterVaultContract, strategyAddress: '0x7c7Ce69f20A48f7c8809cf3da66D19e9680B2552', strategyABI: abi.moneyPrinterStrategyContract, @@ -391,39 +391,39 @@ const mainContracts = { tokenId: ["tether", "usd-coin", "dai"], network: constant.ETHEREUM, }, - daoMPT : { - address: '0x529163109fFa7899D603074f7289E2fcf52D8bB8', + daoMPT: { + address: '0x529163109ffa7899d603074f7289e2fcf52d8bb8', abi: abi.moneyPrinterVaultContract, strategyAddress: '0x7c7Ce69f20A48f7c8809cf3da66D19e9680B2552', strategyABI: abi.moneyPrinterStrategyContract, contractType: 'moneyPrinter', tokenId: ["tether", "usd-coin", "dai"], network: constant.POLYGON - } - // hfDAI: { - // address: '', // TODO: Update that this to mainnet address - // abi: abi.hfVaultContract, - // strategyAddress: '', - // strategyABI: abi.hfStrategyContract, - // contractType: 'harvest', - // tokenId: "dai", - // }, - // hfUSDC: { - // address: '', // TODO: Update that this to mainnet address - // abi: abi.hfVaultContract, - // strategyAddress: '', - // strategyABI: abi.hfStrategyContract, - // contractType: 'harvest', - // tokenId: "usd-coin", - // }, - // hfUSDT: { - // address: '', // TODO: Update that this to mainnet address - // abi: abi.hfVaultContract, - // strategyAddress: '', - // strategyABI: abi.hfStrategyContract, - // contractType: 'harvest', - // tokenId: "tether", - // }, + }, + hfDAI: { + address: '', // TODO: Update that this to mainnet address + abi: abi.hfVaultContract, + strategyAddress: '', + strategyABI: abi.hfStrategyContract, + contractType: 'harvest', + tokenId: "dai", + }, + hfUSDC: { + address: '', // TODO: Update that this to mainnet address + abi: abi.hfVaultContract, + strategyAddress: '', + strategyABI: abi.hfStrategyContract, + contractType: 'harvest', + tokenId: "usd-coin", + }, + hfUSDT: { + address: '', // TODO: Update that this to mainnet address + abi: abi.hfVaultContract, + strategyAddress: '', + strategyABI: abi.hfStrategyContract, + contractType: 'harvest', + tokenId: "tether", + }, }, compund: { cUSDT: { diff --git a/jobs/task.js b/jobs/task.js index e70360d..89209e6 100644 --- a/jobs/task.js +++ b/jobs/task.js @@ -1,5 +1,6 @@ const cron = require("node-cron"); const vaultApySave = require("../services/vaults/apy/save/historical-handle"); +const vaultPolygonApySave = require("../services/vaults/apy/save/historical-handle-polygon"); const vaultHandlerSave = require("../services/vaults/apy/save/handler"); const vaultSave = require("../services/vaults/save/handler"); const priceSave = require("../services/vaults/price/handler"); @@ -70,6 +71,21 @@ const saveHistoricalAPY = async () => { ); }; +/** Store Historical APY For Polygon */ +const savePolygonHistoricalAPY = async () => { + await vaultPolygonApySave.saveHandler(); + cron.schedule( + "*/5 * * * *", + async () => { + console.log("[savePolygonAPY]", new Date().getTime()); + await vaultPolygonApySave.saveHandler(); + }, + { + scheduled: true, + } + ); +} + /** Store Historical TVL */ const saveHistoricalTVL = async () => { await tvlSave.saveAllTVLhandler(); @@ -136,6 +152,7 @@ module.exports = { saveVault, savePricePerFullShare, saveHistoricalAPY, + savePolygonHistoricalAPY, saveHistoricalPools, saveABIPools, saveVipApr, diff --git a/models/historical-apy.model.js b/models/historical-apy.model.js index 1157e07..61014f5 100644 --- a/models/historical-apy.model.js +++ b/models/historical-apy.model.js @@ -37,6 +37,7 @@ module.exports = { daoCDVFarmer: 'daoCDV_historical-apy', daoELOFarmer: 'daoELO_historical-apy', daoSTOFarmer: 'daoSTO_historical-apy', + daoMPTFarmer: 'daoMPT_historical-apy', hfDaiFarmer: 'hfDAI_historical-apy', hfUsdcFarmer: 'hfUSDC_historical-apy', hfUsdtFarmer: 'hfUSDT_historical-apy', diff --git a/services/vaults/apy/save/historical-handle-polygon.js b/services/vaults/apy/save/historical-handle-polygon.js new file mode 100644 index 0000000..1118f15 --- /dev/null +++ b/services/vaults/apy/save/historical-handle-polygon.js @@ -0,0 +1,135 @@ +const vaults = require("./polygon-vault"); +const { delayTime } = require("./config"); +const delay = require("delay"); +const moment = require("moment"); +const contractHelper = require("../../../../utils/contract"); +const historicalDb = require('../../../../models/historical-apy.model'); +const { + testContracts, + mainContracts +} = require('../../../../config/serverless/domain'); + +let polygonBlockNumber = { + current: 0, + oneDay: 0, + threeDay: 0, + oneWeek: 0, + oneMonth: 0, +} + +const getMoneyPrinterPricePerFullShare = async (contract, blockNumber, inceptionBlockNumber) => { + if(blockNumber === inceptionBlockNumber) { + return 1e18; + } + if(blockNumber < inceptionBlockNumber) { + return 0; + } + + let pricePerFullShare = 0; + try { + const pool = await contract.methods.getValueInPool().call(undefined, blockNumber); + const totalSupply = await contract.methods.totalSupply().call(undefined, blockNumber); + pricePerFullShare = pool / totalSupply; + } catch (err) { + console.log(`Error in getMoneyPrinterPricePerFullShare()`,err); + } + + await delay(delayTime); + return pricePerFullShare; +} + +const getApyForVault = async (vault) => { + const { lastMeasurement: inceptionBlockNumber } = vault + + // Money Printer vault + if(vault.isMoneyPrinter) { + const contractInfo = (process.env.PRODUCTION != '') + ? mainContracts.farmer['daoMPT'] + : testContracts.farmer['daoMPT']; + const contract = await contractHelper.getPolygonContract(contractInfo.abi, contractInfo.address); + + let pricePerFullShareCurrent = await getMoneyPrinterPricePerFullShare(contract, polygonBlockNumber.current, inceptionBlockNumber); + let pricePerFullShareOneDayAgo = await getMoneyPrinterPricePerFullShare(contract, polygonBlockNumber.oneDay, inceptionBlockNumber); + + pricePerFullShareCurrent = (0 < pricePerFullShareCurrent) ? pricePerFullShareCurrent : 1; + pricePerFullShareOneDayAgo = (0 < pricePerFullShareOneDayAgo) ? pricePerFullShareOneDayAgo : 1; + + const n = 365 / 2; // Assume 2 days to trigger invest function + const apr = (pricePerFullShareCurrent - pricePerFullShareOneDayAgo) * n; + const apy = (Math.pow((1 + (apr / 100) / n), n) - 1) * 100; + + return { + apyInceptionSample: 0, + apyOneDaySample: 0, + apyThreeDaySample: 0, + apyOneWeekSample: 0, + apyOneMonthSample: 0, + apyLoanscan: 0, + compoundApy: 0, + citadelApy: 0, + elonApy: 0, + faangApy: 0, + moneyPrinterApy: apy, + } + } +} + +const saveAndReadVault = async (vault) => { + if(!vault.vaultContractABI || !vault.vaultContractAddress) { + console.log(`Vault missing abi or address: ${vault.name}`); + return; + } + + const apy = await getApyForVault(vault); + const data = { + ...apy, + aprs: 0, + symbol: vault.symbol, + } + await saveHistoricalAPY(data, vault.vaultSymbol + '_historical-apy'); + return data; +} + +// DB +const saveHistoricalAPY = async (data, collection) => { + await historicalDb.add(data, collection).catch((err) => console.log('err', err)); +} + +module.exports.saveHandler = async() => { + try { + const oneDayAgo = moment().subtract(1, "days").valueOf(); + const threeDaysAgo = moment().subtract(3, "days").valueOf(); + const oneWeekAgo = moment().subtract(1, "weeks").valueOf(); + const oneMonthAgo = moment().subtract(1, "months").valueOf(); + + console.log("Fetching Polygon historical blocks"); + current = await contractHelper.getPolygonCurrentBlockNumber(); + console.log(`(Polygon) Current Block Number: ${current}`); + oneDay = await contractHelper.getPolygonBlockNumberByTimeline(oneDayAgo); + console.log(`(Polygon) 1d ago Block Number: ${oneDay}`); + threeDay = await contractHelper.getPolygonBlockNumberByTimeline(threeDaysAgo); + console.log(`(Polygon) 3d ago Block Number: ${threeDay}`); + oneWeek = await contractHelper.getPolygonBlockNumberByTimeline(oneWeekAgo); + console.log(`(Polygon) 1w ago Block Number: ${oneWeek}`); + oneMonth = await contractHelper.getPolygonBlockNumberByTimeline(oneMonthAgo); + console.log(`(Polygon) 1m ago Block Number: ${oneMonth}`); + polygonBlockNumber = {current, oneDay, threeDay, oneWeek, oneMonth }; + + console.log("Done fetching Polygon historical blocks"); + } catch (err){ + console.log("Error in fetching polygon historical block", err); + } + + const vaultsWithApy = []; + for(const vault of vaults) { + try { + const vaultWithApy = await saveAndReadVault(vault); + if(vaultWithApy !== null) { + vaultsWithApy.push(vaultWithApy); + await delay(delayTime); + } + } catch (err) { + console.log("Something wrong in save vault APY", err) + } + } +} \ No newline at end of file diff --git a/services/vaults/apy/save/historical-handle.js b/services/vaults/apy/save/historical-handle.js index 9a9a54e..c0b8bb6 100644 --- a/services/vaults/apy/save/historical-handle.js +++ b/services/vaults/apy/save/historical-handle.js @@ -215,6 +215,7 @@ const getApyForVault = async (vault) => { citadelApy: 0, elonApy: 0, faangApy: 0, + moneyPrinterApy: 0, }; } else if (vault.isCitadel) { // Citadel Vault @@ -244,6 +245,7 @@ const getApyForVault = async (vault) => { citadelApy: apy, elonApy: 0, faangApy: 0, + moneyPrinterApy: 0, } } else if (vault.isElon) { // Elon's APE Vault @@ -275,6 +277,7 @@ const getApyForVault = async (vault) => { citadelApy: 0, elonApy: apy, faangApy: 0, + moneyPrinterApy: 0, } } else if (vault.isFaang) { // DAO Faang Stonk Vault @@ -305,7 +308,8 @@ const getApyForVault = async (vault) => { compoundApy: 0, citadelApy: 0, elonApy: 0, - faangApy: apy + faangApy: apy, + moneyPrinterApy: 0, } } else if (vault.isHarvest) { // Harvest Vault @@ -370,6 +374,7 @@ const getApyForVault = async (vault) => { citadelApy: 0, elonApy: 0, faangApy: 0, + moneyPrinterApy: 0, }; } else { // Yearn Vault @@ -490,6 +495,7 @@ const getApyForVault = async (vault) => { citadelApy: 0, elonApy: 0, faangApy: 0, + moneyPrinterApy: 0, }; } }; @@ -549,6 +555,10 @@ const getHistoricalAPY = async (startTime, contractAddress) => { case mainContracts.farmer['daoELO'].address: result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.daoELOFarmer); break; + case testContracts.farmer['daoMPT'].address: + case mainContracts.farmer['daoMPT'].address: + result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.daoMPTFarmer); + break; case testContracts.farmer['daoSTO'].address: case mainContracts.farmer['daoSTO'].address: result = await historicalDb.findWithTimePeriods(startTime, new Date().getTime(), historicalDb.daoSTOFarmer); diff --git a/services/vaults/apy/save/polygon-vault.js b/services/vaults/apy/save/polygon-vault.js new file mode 100644 index 0000000..d6f6fcc --- /dev/null +++ b/services/vaults/apy/save/polygon-vault.js @@ -0,0 +1,59 @@ +const config = require("./config.js"); +const abi = require('../../../../config/abi') +const constant = require('../../../../utils/constant.js') + +const testVaults = [ + { + id: "daoMPT", + name: "DAO Vault Money Printer", + symbol: ["USDT","USDC","DAI"], + description: "DAO Vault Money Printer for 3 stablecoins", + vaultSymbol: "daoMPT", + erc20address: "0xbd21a10f619be90d6066c941b04e340841f1f989", + vaultContractAddress: "0x529163109fFa7899D603074f7289E2fcf52D8bB8", + vaultContractABI: abi.moneyPrinterVaultContract, + strategyContractAddress: "0x7c7Ce69f20A48f7c8809cf3da66D19e9680B2552", + strategyABI: abi.moneyPrinterStrategyContract, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 15970970, + measurement: 1e18, + price_id: ["tether", "usd-coin", "dai"], + isMoneyPrinter: true, + network: constant.POLYGON, + }, +]; + +const mainVaults = [ + { + id: "daoMPT", + name: "DAO Vault Money Printer", + symbol: ["USDT","USDC","DAI"], + description: "DAO Vault Money Printer for 3 stablecoins", + vaultSymbol: "daoMPT", + erc20address: "0xbd21a10f619be90d6066c941b04e340841f1f989", + vaultContractAddress: "0x529163109fFa7899D603074f7289E2fcf52D8bB8", + vaultContractABI: abi.moneyPrinterVaultContract, + strategyContractAddress: "0x7c7Ce69f20A48f7c8809cf3da66D19e9680B2552", + strategyABI: abi.moneyPrinterStrategyContract, + balance: 0, + vaultBalance: 0, + decimals: 18, + deposit: true, + depositAll: true, + withdraw: true, + withdrawAll: true, + lastMeasurement: 15970970, + measurement: 1e18, + price_id: ["tether", "usd-coin", "dai"], + isMoneyPrinter: true, + network: constant.POLYGON, + }, +]; + +module.exports = (process.env.PRODUCTION != '') ? mainVaults : testVaults; \ No newline at end of file From 8d642b02795ca14cbe17205bc3a8ddf45fce7f62 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Fri, 9 Jul 2021 15:37:59 +0800 Subject: [PATCH 160/254] APY cronjob for Polygon contract. --- app.js | 1 + jobs/task.js | 18 +++ .../apy/save/historical-handle-polygon.js | 10 +- services/vaults/apy/save/polygon-handler.js | 109 ++++++++++++++++++ 4 files changed, 136 insertions(+), 2 deletions(-) create mode 100644 services/vaults/apy/save/polygon-handler.js diff --git a/app.js b/app.js index 4b43ed5..0c88e57 100644 --- a/app.js +++ b/app.js @@ -31,6 +31,7 @@ async function init() { jobs.saveVault(); jobs.saveVaultAPY(); + jobs.savePolygonVaultAPY(); jobs.savePricePerFullShare(); jobs.saveHistoricalAPY(); jobs.savePolygonHistoricalAPY(); diff --git a/jobs/task.js b/jobs/task.js index 89209e6..da78d19 100644 --- a/jobs/task.js +++ b/jobs/task.js @@ -2,6 +2,7 @@ const cron = require("node-cron"); const vaultApySave = require("../services/vaults/apy/save/historical-handle"); const vaultPolygonApySave = require("../services/vaults/apy/save/historical-handle-polygon"); const vaultHandlerSave = require("../services/vaults/apy/save/handler"); +const vaultPolygonHandlerSave = require("../services/vaults/apy/save/polygon-handler"); const vaultSave = require("../services/vaults/save/handler"); const priceSave = require("../services/vaults/price/handler"); const tvlSave = require("../services/vaults/tvl/handler"); @@ -41,6 +42,22 @@ const saveVaultAPY = async () => { ); }; +/** Save Vault APY */ +const savePolygonVaultAPY = async() => { + await vaultPolygonHandlerSave.saveHandler(); + cron.schedule( + "0 0 0 * * *", + async () => { + console.log("[saveVaultAPY Polygon]"); + await vaultPolygonHandlerSave.saveHandler(); + }, + { + scheduled: true, + timezone: "Etc/UTC", // UTC +0 + } + ); +} + /** Store getPricePerFullShare */ const savePricePerFullShare = async () => { await priceSave.handler(); @@ -150,6 +167,7 @@ module.exports = { saveHistoricalTVL, saveVaultAPY, saveVault, + savePolygonVaultAPY, savePricePerFullShare, saveHistoricalAPY, savePolygonHistoricalAPY, diff --git a/services/vaults/apy/save/historical-handle-polygon.js b/services/vaults/apy/save/historical-handle-polygon.js index 1118f15..f68a262 100644 --- a/services/vaults/apy/save/historical-handle-polygon.js +++ b/services/vaults/apy/save/historical-handle-polygon.js @@ -95,7 +95,8 @@ const saveHistoricalAPY = async (data, collection) => { await historicalDb.add(data, collection).catch((err) => console.log('err', err)); } -module.exports.saveHandler = async() => { +// Cronjob handler +const saveHandler = async() => { try { const oneDayAgo = moment().subtract(1, "days").valueOf(); const threeDaysAgo = moment().subtract(3, "days").valueOf(); @@ -132,4 +133,9 @@ module.exports.saveHandler = async() => { console.log("Something wrong in save vault APY", err) } } -} \ No newline at end of file +} + +module.exports = { + getMoneyPrinterPricePerFullShare, + saveHandler +}; \ No newline at end of file diff --git a/services/vaults/apy/save/polygon-handler.js b/services/vaults/apy/save/polygon-handler.js new file mode 100644 index 0000000..d3e734a --- /dev/null +++ b/services/vaults/apy/save/polygon-handler.js @@ -0,0 +1,109 @@ +// Function same as handler.js, this is for Polygon network +const vaults = require("./polygon-vault"); +const { delayTime } = require("./config"); +const delay = require("delay"); +const moment = require("moment"); +const contractHelper = require("../../../../utils/contract"); +const apyDb = require('../../../../models/apy.model'); +const { getMoneyPrinterPricePerFullShare } = require("./historical-handle-polygon"); +const { + testContracts, + mainContracts +} = require('../../../../config/serverless/domain'); + +let polygonBlockNumber = { + current: 0, + oneDay: 0, +} + + +const getApyForVault = async (vault) => { + const { lastMeasurement: inceptionBlockNumber } = vault; + + // Money Printer vault + if(vault.isMoneyPrinter) { + const contractInfo = (process.env.PRODUCTION != '') + ? mainContracts.farmer['daoMPT'] + : testContracts.farmer['daoMPT']; + const contract = await contractHelper.getPolygonContract(contractInfo.abi, contractInfo.address); + + let pricePerFullShareCurrent = await getMoneyPrinterPricePerFullShare(contract, polygonBlockNumber.current, inceptionBlockNumber); + let pricePerFullShareOneDayAgo = await getMoneyPrinterPricePerFullShare(contract, polygonBlockNumber.oneDay, inceptionBlockNumber); + pricePerFullShareCurrent = (0 < pricePerFullShareCurrent) ? pricePerFullShareCurrent : 1; + pricePerFullShareOneDayAgo = (0 < pricePerFullShareOneDayAgo) ? pricePerFullShareOneDayAgo : 1; + + const n = 365 / 2; // Assume 2 days to trigger invest function + const apr = (pricePerFullShareCurrent - pricePerFullShareOneDayAgo) * n; + const apy = (Math.pow((1 + (apr / 100) / n), n) - 1) * 100; + + return { + apyInceptionSample: 0, + apyOneDaySample: 0, + apyThreeDaySample: 0, + apyOneWeekSample: 0, + apyOneMonthSample: 0, + apyLoanscan: 0, + compoundApy: 0, + citadelApy: 0, + elonApy: 0, + faangApy: 0, + moneyPrinterApy: apy, + } + } +} + +const saveAndReadVault = async (vault) => { + if(!vault.vaultContractABI || !vault.vaultContractAddress) { + console.log(`Vault missing abi or address: ${vault.name}`); + return; + } + + const apy = await getApyForVault(vault); + const data = { + address: vault.vaultContractAddress, + name: vault.name, + symbol: vault.symbol, + description: vault.description, + vaultSymbol: vault.vaultSymbol, + tokenAddress: vault.erc20address, + timestamp: Date.now(), + ...apy, + }; + await saveVaultWithApy(data); + return data; +} + +const saveVaultWithApy = async (data) => { + await apyDb.add(data).catch((err) => console.log('err', err)); + console.log(`Saved ${data.name}`); +}; + +module.exports.saveHandler = async() => { + try { + const oneDayAgo = moment().subtract(1, "days").valueOf(); + + console.log("Fetching Polygon historical blocks"); + current = await contractHelper.getPolygonCurrentBlockNumber(); + console.log(`(Polygon) Current Block Number: ${current}`); + oneDay = await contractHelper.getPolygonBlockNumberByTimeline(oneDayAgo); + console.log(`(Polygon) 1d ago Block Number: ${oneDay}`); + + polygonBlockNumber = {current, oneDay}; + console.log("Done fetching Polygon historical blocks"); + } catch (err){ + console.log("Error in fetching polygon historical block", err); + } + + const vaultsWithApy = []; + for(const vault of vaults) { + try { + const vaultWithApy = await saveAndReadVault(vault); + if(vaultWithApy !== null) { + vaultsWithApy.push(vaultWithApy); + await delay(delayTime); + } + } catch (err) { + console.log("Something wrong in save vault APY", err) + } + } +} \ No newline at end of file From 589ad782daa5fdb60bb23dc0274a5cf4c160be5f Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Fri, 9 Jul 2021 15:50:02 +0800 Subject: [PATCH 161/254] Integrate daoMPT into saveHistoricalPrice() cronjob and get historical price API handling. --- models/price.model.js | 1 + services/vaults/price/handler.js | 37 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/models/price.model.js b/models/price.model.js index 0231258..568cb91 100644 --- a/models/price.model.js +++ b/models/price.model.js @@ -37,6 +37,7 @@ module.exports = { daoCDVFarmer: 'daoCDV_price', daoELOFarmer: 'daoELO_price', daoSTOFarmer: 'daoSTO_price', + daoMPTFarmer: 'daoMPT_price', hfDaiFarmer: 'hfDAI_price', hfUsdcFarmer: 'hfUSDC_price', hfUsdtFarmer: 'hfUSDT_price', diff --git a/services/vaults/price/handler.js b/services/vaults/price/handler.js index 6141a9b..1144a6e 100644 --- a/services/vaults/price/handler.js +++ b/services/vaults/price/handler.js @@ -17,6 +17,8 @@ const Web3 = require("web3"); const archiveNodeUrl = process.env.ARCHIVENODE_ENDPOINT; const archiveNodeWeb3 = new Web3(archiveNodeUrl); +const contractHelper = require("../../../utils/contract"); + const getPriceFromChainLink = async () => { let contract, price = 0; if (process.env.PRODUCTION != '') { @@ -68,6 +70,17 @@ const getFaangPricePerFullShare = async (contract) => { return pricePerFullShare; } +const getMoneyPrinterPricePerFullShare = async (contract) => { + let pricePerFullShare = 0; + try { + const pool = await contract.methods.getValueInPool().call(); + const totalSupply = await contract.methods.totalSupply().call(); + pricePerFullShare = pool / totalSupply; + } catch (ex) {} + await delay(delayTime); + return pricePerFullShare; +} + const getCurrentPrice = async () => { let contracts = process.env.PRODUCTION != null && process.env.PRODUCTION != '' ? mainContracts : testContracts; @@ -85,6 +98,8 @@ const getCurrentPrice = async () => { compoundExchangeRate: 0, citadelPrice: 0, elonPrice: 0, + faangPrice: 0, + moneyPrinterPrice: 0, harvestPrice: 0 }).catch((err) => console.log('err', err)); } else if (contracts.farmer[key].contractType === 'compound') { @@ -102,6 +117,7 @@ const getCurrentPrice = async () => { citadelPrice: 0, elonPrice: 0, faangPrice: 0, + moneyPrinterPrice: 0, harvestPrice: 0, }).catch((err) => console.log('err', err)); } else if (contracts.farmer[key].contractType === 'citadel') { @@ -114,6 +130,7 @@ const getCurrentPrice = async () => { citadelPrice: pricePerFullShare, elonPrice: 0, faangPrice: 0, + moneyPrinterPrice: 0, harvestPrice: 0, }).catch((err) => console.log('err', err)); } else if (contracts.farmer[key].contractType === 'elon') { @@ -126,6 +143,7 @@ const getCurrentPrice = async () => { citadelPrice: 0, elonPrice: pricePerFullShare, faangPrice: 0, + moneyPrinterPrice: 0, harvestPrice: 0, }).catch((err) => console.log('err', err)); } else if(contracts.farmer[key].contractType === 'daoFaang') { @@ -138,6 +156,20 @@ const getCurrentPrice = async () => { citadelPrice: 0, elonPrice: 0, faangPrice: pricePerFullShare, + moneyPrinterPrice: 0, + harvestPrice: 0, + }).catch((err) => console.log('err', err)); + } else if(contracts.farmer[key].contractType === 'moneyPrinter') { + const contract = contractHelper.getPolygonContract(contracts.farmer[key].abi, contracts.farmer[key].address); + const pricePerFullShare = await getMoneyPrinterPricePerFullShare(contract); + await db.add(key + '_price', { + earnPrice: 0, + vaultPrice: 0, + compoundExchangeRate: 0, + citadelPrice: 0, + elonPrice: 0, + faangPrice: 0, + moneyPrinterPrice: pricePerFullShare, harvestPrice: 0, }).catch((err) => console.log('err', err)); } else if (contracts.farmer[key].contractType === 'harvest') { @@ -161,6 +193,7 @@ const getCurrentPrice = async () => { citadelPrice: 0, elonPrice: 0, faangPrice: 0, + moneyPrinterPrice: 0, harvestPrice: pricePerFullShare, }) } @@ -172,6 +205,7 @@ const getCurrentPrice = async () => { citadelPrice: 0, elonPrice: 0, faangPrice: 0, + moneyPrinterPrice:0, harvestPrice: "0" }).catch((err) => console.log('err', err)); } @@ -232,6 +266,9 @@ module.exports.handleHistoricialPrice = async (req, res) => { case db.daoSTOFarmer: collection = db.daoSTOFarmer; break; + case db.daoMPTFarmer: + collection = db.daoMPTFarmer; + break; case db.hfDaiFarmer: collection = db.hfDaiFarmer; break; From 7d599ac24e4826552d6cf611678fb1eb880ed390 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Fri, 9 Jul 2021 18:19:33 +0800 Subject: [PATCH 162/254] Integrate Polygon contract into user's transaction API. --- .env.example | 1 + services/user/vaults/transactions/handler.js | 57 ++++++++++++++++---- 2 files changed, 49 insertions(+), 9 deletions(-) diff --git a/.env.example b/.env.example index 73d97b9..747f7dc 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,5 @@ SUBGRAPH_ENDPOINT = https://api.thegraph.com/subgraphs/name/rrridges-crypto/yearn-vault-roi-dev +POLYGON_SUBGRAPH_ENDPOINT = WEB3_ENDPOINT = https://mainnet.infura.io/v3/4f8bf400ab354820998e6dfdea0a1b78 ARCHIVENODE_ENDPOINT = https://api.archivenode.io/93mwpmy684fb0dc3c0q93mwpmwlssf6a POLYGON_ARCHIVENODE_ENDPOINT = https://speedy-nodes-nyc.moralis.io/e783af49d36dc9636abd198b/polygon/mumbai/archive diff --git a/services/user/vaults/transactions/handler.js b/services/user/vaults/transactions/handler.js index e244b9a..080cc22 100644 --- a/services/user/vaults/transactions/handler.js +++ b/services/user/vaults/transactions/handler.js @@ -4,6 +4,8 @@ require("dotenv").config(); const fetch = require("node-fetch"); const { pluck, uniq } = require("ramda/dist/ramda"); const subgraphUrl = process.env.SUBGRAPH_ENDPOINT; +const polygonSubgraphUrl = process.env.POLYGON_SUBGRAPH_ENDPOINT; +const constant = require("../../../../utils/constant"); const _ = require("lodash"); const { testContracts, @@ -44,7 +46,7 @@ module.exports.handler = async (req, res) => { } }; -const getGraphTransactions = async (userAddress) => { +const getGraphTransactions = async (userAddress, network) => { const query = ` { deposits: deposits (where: {account: "${userAddress}"}) { @@ -104,7 +106,18 @@ const getGraphTransactions = async (userAddress) => { } `; - const response = await fetch(subgraphUrl, { + let url = ""; + switch(network){ + case constant.ETHEREUM: + url = subgraphUrl; + break; + case constant.POLYGON: + url = polygonSubgraphUrl; + break; + default: + break; + } + const response = await fetch(url , { method: "POST", body: JSON.stringify({ query }), }); @@ -152,7 +165,8 @@ const getVaultAddressesForUserWithGraphTransactions = ( }; const getVaultAddressesForUser = async (userAddress) => { - const graphTransactions = await getGraphTransactions(userAddress.toLowerCase()); + const ethereumTransactions = await getGraphTransactions(userAddress.toLowerCase(), constant.ETHEREUM); + const polygonTransactions = await getGraphTransactions(userAddress.toLowerCase(), constant.POLYGON); const vaultAddressesForUser = getVaultAddressesForUserWithGraphTransactions( userAddress, graphTransactions @@ -161,9 +175,28 @@ const getVaultAddressesForUser = async (userAddress) => { }; const getTransactions = async (userAddress) => { - const graphTransactions = await getGraphTransactions(userAddress); - let { deposits, withdrawals, transfersIn, transfersOut } = graphTransactions; + let deposits = []; + let withdrawals = []; + let transfersIn = []; + let transfersOut = []; + + const ethereumTransactions = await getGraphTransactions(userAddress, constant.ETHEREUM); + if(ethereumTransactions) { + deposits = deposits.concat(ethereumTransactions.deposits); + withdrawals = withdrawals.concat(ethereumTransactions.withdrawals); + transfersIn = transfersIn.concat(ethereumTransactions.transfersIn); + transfersOut = transfersOut.concat(ethereumTransactions.transfersOut); + } + + const polygonTransactions = await getGraphTransactions(userAddress, constant.POLYGON); + if(polygonTransactions) { + deposits = deposits.concat(polygonTransactions.deposits); + withdrawals = withdrawals.concat(polygonTransactions.withdrawals); + transfersIn = transfersIn.concat(polygonTransactions.transfersIn); + transfersOut = transfersOut.concat(polygonTransactions.transfersOut); + } + // let { deposits, withdrawals, transfersIn, transfersOut } = graphTransactions; // const injectAmountIntoTransfer = (transfer) => { // const amount = (transfer.balance * transfer.shares) / transfer.totalSupply; // const newTransfer = { @@ -172,16 +205,22 @@ const getTransactions = async (userAddress) => { // }; // return newTransfer; // }; - // transfersIn = transfersIn.map(injectAmountIntoTransfer); // transfersOut = transfersOut.map(injectAmountIntoTransfer); // Get all the vaults the address has interacted with. - const vaultAddresses = getVaultAddressesForUserWithGraphTransactions( + let vaultAddresses = []; + const ethereumAddresses = getVaultAddressesForUserWithGraphTransactions( userAddress, - graphTransactions + ethereumTransactions ); - + vaultAddresses = vaultAddresses.concat(ethereumAddresses); + const polygonAddresses = getVaultAddressesForUserWithGraphTransactions( + userAddress, + polygonTransactions + ) + vaultAddresses = vaultAddresses.concat(polygonAddresses); + const farmers = process.env.PRODUCTION == '' ? Object.values(testContracts.farmer) : Object.values(mainContracts.farmer); const removeVaultAddressField = (deposit) => _.omit(deposit, "vaultAddress"); From 0912029741dfda7cbf9b5807d6d07fe9a5d969b4 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Fri, 9 Jul 2021 19:36:17 +0800 Subject: [PATCH 163/254] Integrate daoMPT into user statistics API. --- config/abi.js | 3 ++ config/serverless/domain.js | 12 +++++ services/user/vaults/statistics/handler.js | 51 ++++++++++++-------- services/user/vaults/transactions/handler.js | 14 +++++- 4 files changed, 58 insertions(+), 22 deletions(-) diff --git a/config/abi.js b/config/abi.js index 15320d4..07a217f 100644 --- a/config/abi.js +++ b/config/abi.js @@ -16968,6 +16968,8 @@ const hfVaultContract = [{"anonymous":false,"inputs":[{"indexed":true,"internalT const eacAggregatoorProxyContract = [{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"},{"internalType":"address","name":"_accessController","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"int256","name":"current","type":"int256"},{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"updatedAt","type":"uint256"}],"name":"AnswerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":true,"internalType":"address","name":"startedBy","type":"address"},{"indexed":false,"internalType":"uint256","name":"startedAt","type":"uint256"}],"name":"NewRound","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"accessController","outputs":[{"internalType":"contract AccessControllerInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"aggregator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"}],"name":"confirmAggregator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundId","type":"uint256"}],"name":"getAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"_roundId","type":"uint80"}],"name":"getRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundId","type":"uint256"}],"name":"getTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"phaseAggregators","outputs":[{"internalType":"contract AggregatorV2V3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"phaseId","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"}],"name":"proposeAggregator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"proposedAggregator","outputs":[{"internalType":"contract AggregatorV2V3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"_roundId","type":"uint80"}],"name":"proposedGetRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proposedLatestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_accessController","type":"address"}],"name":"setController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]; +const polygonEacAggregatoorProxyContract = [{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"},{"internalType":"address","name":"_accessController","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"int256","name":"current","type":"int256"},{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"updatedAt","type":"uint256"}],"name":"AnswerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":true,"internalType":"address","name":"startedBy","type":"address"},{"indexed":false,"internalType":"uint256","name":"startedAt","type":"uint256"}],"name":"NewRound","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"accessController","outputs":[{"internalType":"contract AccessControllerInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"aggregator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"}],"name":"confirmAggregator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundId","type":"uint256"}],"name":"getAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"_roundId","type":"uint80"}],"name":"getRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundId","type":"uint256"}],"name":"getTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"phaseAggregators","outputs":[{"internalType":"contract AggregatorV2V3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"phaseId","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"}],"name":"proposeAggregator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"proposedAggregator","outputs":[{"internalType":"contract AggregatorV2V3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"_roundId","type":"uint80"}],"name":"proposedGetRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proposedLatestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_accessController","type":"address"}],"name":"setController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]; + const elonApeVaultContract = [ { "inputs": [ @@ -21393,6 +21395,7 @@ module.exports = { hfStrategyContract, hfVaultContract, eacAggregatoorProxyContract, + polygonEacAggregatoorProxyContract, elonApeVaultContract, elonApeStrategyContract, daoFaangStonkVaultContract, diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 9b9409d..6925a3a 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -260,6 +260,12 @@ const testContracts = { abi: abi.eacAggregatoorProxyContract, network: constant.ETHEREUM, } + }, + polygonChainLink: { + USDT_USD: { + address:"0x92c09849638959196e976289418e5973cc96d645", + abi: abi.polygonEacAggregatoorProxyContract, + } } }; @@ -485,6 +491,12 @@ const mainContracts = { address: "0x3E7d1eAB13ad0104d2750B8863b489D65364e32D", abi: abi.eacAggregatoorProxyContract, } + }, + polygonChainLink: { + USDT_USD: { + address:"0x0a6513e40db6eb1b165753ad52e80663aea50545", + abi: abi.polygonEacAggregatoorProxyContract, + } } }; diff --git a/services/user/vaults/statistics/handler.js b/services/user/vaults/statistics/handler.js index c07a3a0..80b6975 100644 --- a/services/user/vaults/statistics/handler.js +++ b/services/user/vaults/statistics/handler.js @@ -25,6 +25,8 @@ const { getVaultAddressesForUser, } = require("../transactions/handler"); const _ = require("lodash"); +const contractHelper = require("../../../../utils/contract"); +const constant = require("../../../../utils/constant"); const getVaultContract = (vaultAddress) => { const abi = getMinimalVaultABI(); @@ -84,19 +86,20 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => // Get User Deposit Amount let strategyContract; let vaultContract; - let type = ''; - if (process.env.PRODUCTION != null && process.env.PRODUCTION != '') { - const symbol = Object.keys(mainContracts.farmer).find(key => mainContracts.farmer[key].address.toLowerCase() === contractAddress.toLowerCase()); - strategyContract = getContract(mainContracts.farmer[symbol].strategyABI, mainContracts.farmer[symbol].strategyAddress); - vaultContract = getContract(mainContracts.farmer[symbol].abi, mainContracts.farmer[symbol].address); - type = mainContracts.farmer[symbol].contractType; - } else { - const symbol = Object.keys(testContracts.farmer).find(key => testContracts.farmer[key].address.toLowerCase() === contractAddress.toLowerCase()); - - strategyContract = getContract(testContracts.farmer[symbol].strategyABI, testContracts.farmer[symbol].strategyAddress); - vaultContract = getContract(testContracts.farmer[symbol].abi, testContracts.farmer[symbol].address); - type = testContracts.farmer[symbol].contractType; + const contracts = (process.env.PRODUCTION != null && process.env.PRODUCTION != '') + ? mainContracts + : testContracts; + + const vault = Object.values(contracts.farmer).find(contract => contract.address.toLowerCase() === contractAddress.toLowerCase()); + const type = vault.contractType; + + if(vault.network === constant.ETHEREUM) { + vaultContract = await contractHelper.getEthereumContract(vault.abi, vault.address); + strategyContract = await contractHelper.getEthereumContract(vault.strategyABI, vault.strategyAddress); + } else if (vault.network === constant.POLYGON) { + vaultContract = await contractHelper.getPolygonContract(vault.abi, vault.address); + strategyContract = await contractHelper.getPolygonContract(vault.strategyABI, vault.strategyAddress); } const depositedShares = await getDepositedShares(vaultContract, userAddress); @@ -113,7 +116,6 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => } else if (type === 'citadel') { const pool = await vaultContract.methods.getAllPoolInUSD().call(); const totalSupply = await vaultContract.methods.totalSupply().call(); - // depositedAmount = await vaultContract.methods._balanceOfDeposit(userAddress).call(); depositedAmount = (depositedShares * pool) / totalSupply; depositedAmount = new BigNumber(depositedAmount); @@ -126,19 +128,28 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => depositedAmount = await strategyContract.methods.getCurrentBalance(userAddress).call(); depositedAmount = new BigNumber(depositedAmount); } else if (type === 'daoFaang') { - let usdtToUsdPriceFeedContract; - if (process.env.PRODUCTION != '') { - usdtToUsdPriceFeedContract = new archiveNodeWeb3.eth.Contract(mainContracts.chainLink.USDT_USD.abi, mainContracts.chainLink.USDT_USD.address); - } else { - usdtToUsdPriceFeedContract = new archiveNodeWeb3.eth.Contract(testContracts.chainLink.USDT_USD.abi, testContracts.chainLink.USDT_USD.address); - } + const contractInfo = (process.env.PRODUCTION != '') ? mainContracts.chainLink.USDT_USD : testContracts.chainLink.USDT_USD; + usdtToUsdPriceFeedContract = new archiveNodeWeb3.eth.Contract(contractInfo.abi, contractInfo.address); const usdtToUsdPrice = await getPriceFromChainLink(usdtToUsdPriceFeedContract); const pool = await vaultContract.methods.getTotalValueInPool().call(); const totalSupply = await vaultContract.methods.totalSupply().call(); const poolInUSD = (pool * usdtToUsdPrice) / (10 ** 20); // The reason to divide 20: pool in 18 , price feed in 8 , ( 18 + 8 ) / 20 = 6 decimals + depositedAmount = (depositedShares * poolInUSD) / totalSupply; + depositedAmount = new BigNumber(depositedAmount); + } else if (type === 'moneyPrinter') { + let usdtToUsdPriceFeedContract; + const contractInfo = (process.env.PRODUCTION != '') ? mainContracts.polygonChainLink.USDT_USD : testContracts.polygonChainLink.USDT_USD; + usdtToUsdPriceFeedContract = await contractHelper.getPolygonContract(contractInfo.abi, contractInfo.address); + + const usdtToUsdPrice = await getPriceFromChainLink(usdtToUsdPriceFeedContract); + const pool = await vaultContract.methods.getValueInPool().call(); + const totalSupply = await vaultContract.methods.totalSupply().call(); + + const poolInUSD = (pool * usdtToUsdPrice) / (10 ** 20); // The reason to divide 20: pool in 18 , price feed in 8 , ( 18 + 8 ) / 20 = 6 decimals + depositedAmount = (depositedShares * poolInUSD) / totalSupply; depositedAmount = new BigNumber(depositedAmount); } @@ -185,7 +196,7 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => let totalTransferredInUSD = 0; let totalTransferredOutInUSD = 0; - if(type === "citadel" || type === "elon" || type === "daoFaang") { + if(type === "citadel" || type === "elon" || type === "daoFaang" || type === "moneyPrinter") { totalDepositsInUSD = getSumForUSD(deposits); totalWithdrawalsInUSD = getSumForUSD(withdrawals); totalTransferredInUSD = getSumForUSD(transfersIn); diff --git a/services/user/vaults/transactions/handler.js b/services/user/vaults/transactions/handler.js index 080cc22..7ca1192 100644 --- a/services/user/vaults/transactions/handler.js +++ b/services/user/vaults/transactions/handler.js @@ -167,10 +167,20 @@ const getVaultAddressesForUserWithGraphTransactions = ( const getVaultAddressesForUser = async (userAddress) => { const ethereumTransactions = await getGraphTransactions(userAddress.toLowerCase(), constant.ETHEREUM); const polygonTransactions = await getGraphTransactions(userAddress.toLowerCase(), constant.POLYGON); - const vaultAddressesForUser = getVaultAddressesForUserWithGraphTransactions( + + let vaultAddressesForUser = []; + const ethereumAddresses = getVaultAddressesForUserWithGraphTransactions( userAddress, - graphTransactions + ethereumTransactions ); + vaultAddressesForUser = vaultAddressesForUser.concat(ethereumAddresses); + + const polygonAddresses = getVaultAddressesForUserWithGraphTransactions( + userAddress, + polygonTransactions + ); + vaultAddressesForUser = vaultAddressesForUser.concat(polygonAddresses); + return vaultAddressesForUser; }; From 4aab85876e71ffe78c5ffc6690f8de0a051dcfc6 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Sat, 10 Jul 2021 16:04:57 +0800 Subject: [PATCH 164/254] Update vault and strategy address. --- config/abi.js | 20 +++++++++++++++++++- config/serverless/domain.js | 8 ++++---- services/vaults/apy/save/polygon-vault.js | 8 ++++---- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/config/abi.js b/config/abi.js index 07a217f..d7f4fbf 100644 --- a/config/abi.js +++ b/config/abi.js @@ -19915,7 +19915,7 @@ const daoFaangStonkStrategyContract =[ } ]; -const moneyPrinterVaultContract = [ +const moneyPrinterVaultContract =[ { "inputs": [ { @@ -21360,6 +21360,24 @@ const moneyPrinterStrategyContract = [ "outputs": [], "stateMutability": "nonpayable", "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + } + ], + "name": "withdrawTestnet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" } ]; diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 6925a3a..9fa7e75 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -199,9 +199,9 @@ const testContracts = { network: constant.ETHEREUM }, daoMPT: { - address: '0x529163109ffa7899d603074f7289e2fcf52d8bb8', + address: '0xdc2f0e17702f9083adc057893b2b1e273c11e09a', abi: abi.moneyPrinterVaultContract, - strategyAddress: '0x7c7Ce69f20A48f7c8809cf3da66D19e9680B2552', + strategyAddress: '0x9fbbfc353772672b58a9ee1ad55265a5a09640a1', strategyABI: abi.moneyPrinterStrategyContract, contractType: 'moneyPrinter', tokenId: ["tether", "usd-coin", "dai"], @@ -398,9 +398,9 @@ const mainContracts = { network: constant.ETHEREUM, }, daoMPT: { - address: '0x529163109ffa7899d603074f7289e2fcf52d8bb8', + address: '0xdc2f0e17702f9083adc057893b2b1e273c11e09a', abi: abi.moneyPrinterVaultContract, - strategyAddress: '0x7c7Ce69f20A48f7c8809cf3da66D19e9680B2552', + strategyAddress: '0x9fbbfc353772672b58a9ee1ad55265a5a09640a1', strategyABI: abi.moneyPrinterStrategyContract, contractType: 'moneyPrinter', tokenId: ["tether", "usd-coin", "dai"], diff --git a/services/vaults/apy/save/polygon-vault.js b/services/vaults/apy/save/polygon-vault.js index d6f6fcc..f911588 100644 --- a/services/vaults/apy/save/polygon-vault.js +++ b/services/vaults/apy/save/polygon-vault.js @@ -10,9 +10,9 @@ const testVaults = [ description: "DAO Vault Money Printer for 3 stablecoins", vaultSymbol: "daoMPT", erc20address: "0xbd21a10f619be90d6066c941b04e340841f1f989", - vaultContractAddress: "0x529163109fFa7899D603074f7289E2fcf52D8bB8", + vaultContractAddress: "0xdc2f0e17702f9083adc057893b2b1e273c11e09a", vaultContractABI: abi.moneyPrinterVaultContract, - strategyContractAddress: "0x7c7Ce69f20A48f7c8809cf3da66D19e9680B2552", + strategyContractAddress: "0x9fbbfc353772672b58a9ee1ad55265a5a09640a1", strategyABI: abi.moneyPrinterStrategyContract, balance: 0, vaultBalance: 0, @@ -37,9 +37,9 @@ const mainVaults = [ description: "DAO Vault Money Printer for 3 stablecoins", vaultSymbol: "daoMPT", erc20address: "0xbd21a10f619be90d6066c941b04e340841f1f989", - vaultContractAddress: "0x529163109fFa7899D603074f7289E2fcf52D8bB8", + vaultContractAddress: "0xdc2f0e17702f9083adc057893b2b1e273c11e09a", vaultContractABI: abi.moneyPrinterVaultContract, - strategyContractAddress: "0x7c7Ce69f20A48f7c8809cf3da66D19e9680B2552", + strategyContractAddress: "0x9fbbfc353772672b58a9ee1ad55265a5a09640a1", strategyABI: abi.moneyPrinterStrategyContract, balance: 0, vaultBalance: 0, From 91a57dba3203eff832ddd2b3f29d2c8f47a28a35 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Sat, 10 Jul 2021 16:23:51 +0800 Subject: [PATCH 165/254] Update new last measurement. --- services/vaults/apy/save/polygon-vault.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/vaults/apy/save/polygon-vault.js b/services/vaults/apy/save/polygon-vault.js index f911588..584fe9c 100644 --- a/services/vaults/apy/save/polygon-vault.js +++ b/services/vaults/apy/save/polygon-vault.js @@ -21,7 +21,7 @@ const testVaults = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 15970970, + lastMeasurement: 16133926, measurement: 1e18, price_id: ["tether", "usd-coin", "dai"], isMoneyPrinter: true, @@ -37,7 +37,7 @@ const mainVaults = [ description: "DAO Vault Money Printer for 3 stablecoins", vaultSymbol: "daoMPT", erc20address: "0xbd21a10f619be90d6066c941b04e340841f1f989", - vaultContractAddress: "0xdc2f0e17702f9083adc057893b2b1e273c11e09a", + vaultContractAddress: "0xdc2f0e17702f9083adc057893b2b1e273c11e09a", vaultContractABI: abi.moneyPrinterVaultContract, strategyContractAddress: "0x9fbbfc353772672b58a9ee1ad55265a5a09640a1", strategyABI: abi.moneyPrinterStrategyContract, From dec757657344194fdd9bfc3ba7c0cf11958fff0d Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Sat, 10 Jul 2021 19:53:10 +0800 Subject: [PATCH 166/254] feat(DAO-162): :sparkles: Citadel Vault Performance --- app.js | 46 ++++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/app.js b/app.js index 0217d58..437552c 100644 --- a/app.js +++ b/app.js @@ -1,4 +1,4 @@ -require('dotenv').config(); +require("dotenv").config(); const express = require("express"); const db = require("./config/db"); const vaultsApy = require("./services/vaults/apy/handler"); @@ -7,18 +7,19 @@ const userTransactions = require("./services/user/vaults/transactions/handler"); const vaultsPrice = require("./services/vaults/price/handler"); const vaultsTvl = require("./services/vaults/tvl/handler"); const vaultHistoricalAPYSave = require("./services/vaults/apy/save/historical-handle"); -const vaultCategory = require('./services/vaults/category/handler'); -const stakeVIP = require('./services/staking/xdvg/handler'); -const stakePool = require('./services/staking/handler'); -const stakeXDvg = require('./services/staking/vipdvg/handler'); -const stakeDaoStakes = require('./services/staking/dao-stake/handler'); +const vaultCategory = require("./services/vaults/category/handler"); +const vaultPerformance = require("./services/vaults/performance/handler"); +const stakeVIP = require("./services/staking/xdvg/handler"); +const stakePool = require("./services/staking/handler"); +const stakeXDvg = require("./services/staking/vipdvg/handler"); +const stakeDaoStakes = require("./services/staking/dao-stake/handler"); const specialEvent = require("./services/user/special-event/handler"); const app = express(); const cors = require("cors"); const port = process.env.PORT || 8080; const jobs = require("./jobs/task"); -const swaggerUi = require('swagger-ui-express'); -const swaggerDocument = require('./swagger.json'); +const swaggerUi = require("swagger-ui-express"); +const swaggerDocument = require("./swagger.json"); async function init() { // Improve debugging @@ -37,6 +38,7 @@ async function init() { jobs.saveHistoricalPools(); jobs.saveABIPools(); jobs.saveVipApr(); + jobs.savePerformance(); }); app.use(cors()); @@ -54,26 +56,30 @@ async function init() { app.get("/vaults/historical-apy/:contractAddress/:days", (req, res) => vaultHistoricalAPYSave.handleHistoricialAPY(req, res) ); - app.get("/vaults/tvl/total", (req, res) => - vaultsTvl.totalHandle(req, res) - ); - app.get("/vaults/tvl/:farmer", (req, res) => - vaultsTvl.tvlHandle(req, res) - ); + app.get("/vaults/tvl/total", (req, res) => vaultsTvl.totalHandle(req, res)); + app.get("/vaults/tvl/:farmer", (req, res) => vaultsTvl.tvlHandle(req, res)); app.get("/vaults/category", (req, res) => vaultCategory.getVaultCategory(req, res) ); app.get("/staking/get-vip-tokens", (req, res) => stakeVIP.getVipDVGToken(req, res) ); - app.get("/staking/get-pools", (req, res) => - stakePool.getPools(req, res) + app.get("/staking/get-pools", (req, res) => stakePool.getPools(req, res)); + app.get("/staking/get-xdvg-stake", (req, res) => + stakeXDvg.getxDVGStake(req, res) + ); + app.get("/event/verify", (req, res) => + specialEvent.handleVerifyEvent(req, res) + ); + app.get("/event/verify/:amount", (req, res) => + specialEvent.handler(req, res) + ); + + app.get("/vaults/performance/:farmer/:days", (req, res) => + vaultPerformance.performanceHandle(req, res) ); - app.get("/staking/get-xdvg-stake", (req, res) => stakeXDvg.getxDVGStake(req, res)); - app.get('/event/verify', (req,res) => specialEvent.handleVerifyEvent(req, res)); - app.get('/event/verify/:amount', (req, res) => specialEvent.handler(req, res)); - app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument)); + app.use("/api-docs", swaggerUi.serve, swaggerUi.setup(swaggerDocument)); app.listen(port, () => console.log(`Listening on ${port}`)); } From d1b80153016494f4cb969d890d2d1206b395af4f Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Sat, 10 Jul 2021 19:54:53 +0800 Subject: [PATCH 167/254] feat(DAO-162): :sparkles: Citadel Vault Performance --- jobs/task.js | 18 + models/performance.model.js | 52 ++ package-lock.json | 511 ++++++++++++++++++ package.json | 2 + .../vaults/performance/AggregatorABI.json | 51 ++ services/vaults/performance/handler.js | 302 +++++++++++ 6 files changed, 936 insertions(+) create mode 100644 models/performance.model.js create mode 100644 package-lock.json create mode 100644 services/vaults/performance/AggregatorABI.json create mode 100644 services/vaults/performance/handler.js diff --git a/jobs/task.js b/jobs/task.js index e70360d..6baaabb 100644 --- a/jobs/task.js +++ b/jobs/task.js @@ -7,6 +7,7 @@ const tvlSave = require("../services/vaults/tvl/handler"); const stakeSave = require("../services/staking/dao-stake/handler"); const poolSave = require("../services/staking/handler"); const vipDVG = require("../services/staking/vipdvg/handler"); +const performanceSave = require("../services/vaults/performance/handler"); /** Save Vault **/ const saveVault = async () => { @@ -130,6 +131,22 @@ const saveVipApr = async () => { ); }; +/** Store DAOVIP APR */ +const savePerformance = async () => { + await performanceSave.savePerformance(); + cron.schedule( + "0 0 * * *", + async () => { + console.log("[savePerformance]", new Date().getTime()); + await performanceSave.savePerformance(); + }, + { + scheduled: true, + timezone: "Etc/UTC", // UTC +0 + } + ); +}; + module.exports = { saveHistoricalTVL, saveVaultAPY, @@ -139,4 +156,5 @@ module.exports = { saveHistoricalPools, saveABIPools, saveVipApr, + savePerformance, }; diff --git a/models/performance.model.js b/models/performance.model.js new file mode 100644 index 0000000..c5055b4 --- /dev/null +++ b/models/performance.model.js @@ -0,0 +1,52 @@ +const mongo = require("../config/db"); + +const findAll = async (collection) => { + const db = mongo.getDB(); + return await db + .collection(collection + "_performance") + .find({}) + .project({ _id: 0 }) + .toArray(); +}; + +const findLatest = async (collection) => { + const db = mongo.getDB(); + return await db + .collection(collection + "_performance") + .find() + .project({ _id: 0 }) + .sort({ $natural: -1 }) + .limit(1) + .toArray(); +}; + +const findPerformanceWithTimePeriods = async (collection, startTime) => { + const db = mongo.getDB(); + return await db + .collection(collection + "_performance") + .find({ + time_stamp: { + $gte: startTime, + }, + }) + .project({ _id: 0 }) + .toArray(); +}; + +const add = async (collection, params) => { + const db = mongo.getDB(); + if (!params.time_stamp) { + Object.assign(params, { + time_stamp: new Date().getTime(), + }); + } + return await db.collection(collection + "_performance").insertOne(params); +}; + +module.exports = { + findAll, + findLatest, + findPerformanceWithTimePeriods, + add, + daoCDVFarmer: "daoCDV", +}; diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..31c9edd --- /dev/null +++ b/package-lock.json @@ -0,0 +1,511 @@ +{ + "name": "yearn-api", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@ethersproject/abi": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.4.0.tgz", + "integrity": "sha512-9gU2H+/yK1j2eVMdzm6xvHSnMxk8waIHQGYCZg5uvAyH0rsAzxkModzBSpbAkAuhKFEovC2S9hM4nPuLym8IZw==", + "requires": { + "@ethersproject/address": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/constants": "^5.4.0", + "@ethersproject/hash": "^5.4.0", + "@ethersproject/keccak256": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/strings": "^5.4.0" + } + }, + "@ethersproject/abstract-provider": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.4.0.tgz", + "integrity": "sha512-vPBR7HKUBY0lpdllIn7tLIzNN7DrVnhCLKSzY0l8WAwxz686m/aL7ASDzrVxV93GJtIub6N2t4dfZ29CkPOxgA==", + "requires": { + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/networks": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/transactions": "^5.4.0", + "@ethersproject/web": "^5.4.0" + } + }, + "@ethersproject/abstract-signer": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.4.0.tgz", + "integrity": "sha512-AieQAzt05HJZS2bMofpuxMEp81AHufA5D6M4ScKwtolj041nrfIbIi8ciNW7+F59VYxXq+V4c3d568Q6l2m8ew==", + "requires": { + "@ethersproject/abstract-provider": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0" + } + }, + "@ethersproject/address": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.4.0.tgz", + "integrity": "sha512-SD0VgOEkcACEG/C6xavlU1Hy3m5DGSXW3CUHkaaEHbAPPsgi0coP5oNPsxau8eTlZOk/bpa/hKeCNoK5IzVI2Q==", + "requires": { + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/keccak256": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/rlp": "^5.4.0" + } + }, + "@ethersproject/base64": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.4.0.tgz", + "integrity": "sha512-CjQw6E17QDSSC5jiM9YpF7N1aSCHmYGMt9bWD8PWv6YPMxjsys2/Q8xLrROKI3IWJ7sFfZ8B3flKDTM5wlWuZQ==", + "requires": { + "@ethersproject/bytes": "^5.4.0" + } + }, + "@ethersproject/basex": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.4.0.tgz", + "integrity": "sha512-J07+QCVJ7np2bcpxydFVf/CuYo9mZ7T73Pe7KQY4c1lRlrixMeblauMxHXD0MPwFmUHZIILDNViVkykFBZylbg==", + "requires": { + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/properties": "^5.4.0" + } + }, + "@ethersproject/bignumber": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.4.0.tgz", + "integrity": "sha512-OXUu9f9hO3vGRIPxU40cignXZVaYyfx6j9NNMjebKdnaCL3anCLSSy8/b8d03vY6dh7duCC0kW72GEC4tZer2w==", + "requires": { + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "bn.js": "^4.11.9" + } + }, + "@ethersproject/bytes": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.4.0.tgz", + "integrity": "sha512-H60ceqgTHbhzOj4uRc/83SCN9d+BSUnOkrr2intevqdtEMO1JFVZ1XL84OEZV+QjV36OaZYxtnt4lGmxcGsPfA==", + "requires": { + "@ethersproject/logger": "^5.4.0" + } + }, + "@ethersproject/constants": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.4.0.tgz", + "integrity": "sha512-tzjn6S7sj9+DIIeKTJLjK9WGN2Tj0P++Z8ONEIlZjyoTkBuODN+0VfhAyYksKi43l1Sx9tX2VlFfzjfmr5Wl3Q==", + "requires": { + "@ethersproject/bignumber": "^5.4.0" + } + }, + "@ethersproject/contracts": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.4.0.tgz", + "integrity": "sha512-hkO3L3IhS1Z3ZtHtaAG/T87nQ7KiPV+/qnvutag35I0IkiQ8G3ZpCQ9NNOpSCzn4pWSW4CfzmtE02FcqnLI+hw==", + "requires": { + "@ethersproject/abi": "^5.4.0", + "@ethersproject/abstract-provider": "^5.4.0", + "@ethersproject/abstract-signer": "^5.4.0", + "@ethersproject/address": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/constants": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/transactions": "^5.4.0" + } + }, + "@ethersproject/hash": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.4.0.tgz", + "integrity": "sha512-xymAM9tmikKgbktOCjW60Z5sdouiIIurkZUr9oW5NOex5uwxrbsYG09kb5bMcNjlVeJD3yPivTNzViIs1GCbqA==", + "requires": { + "@ethersproject/abstract-signer": "^5.4.0", + "@ethersproject/address": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/keccak256": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/strings": "^5.4.0" + } + }, + "@ethersproject/hdnode": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.4.0.tgz", + "integrity": "sha512-pKxdS0KAaeVGfZPp1KOiDLB0jba11tG6OP1u11QnYfb7pXn6IZx0xceqWRr6ygke8+Kw74IpOoSi7/DwANhy8Q==", + "requires": { + "@ethersproject/abstract-signer": "^5.4.0", + "@ethersproject/basex": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/pbkdf2": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/sha2": "^5.4.0", + "@ethersproject/signing-key": "^5.4.0", + "@ethersproject/strings": "^5.4.0", + "@ethersproject/transactions": "^5.4.0", + "@ethersproject/wordlists": "^5.4.0" + } + }, + "@ethersproject/json-wallets": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.4.0.tgz", + "integrity": "sha512-igWcu3fx4aiczrzEHwG1xJZo9l1cFfQOWzTqwRw/xcvxTk58q4f9M7cjh51EKphMHvrJtcezJ1gf1q1AUOfEQQ==", + "requires": { + "@ethersproject/abstract-signer": "^5.4.0", + "@ethersproject/address": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/hdnode": "^5.4.0", + "@ethersproject/keccak256": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/pbkdf2": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/random": "^5.4.0", + "@ethersproject/strings": "^5.4.0", + "@ethersproject/transactions": "^5.4.0", + "aes-js": "3.0.0", + "scrypt-js": "3.0.1" + } + }, + "@ethersproject/keccak256": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.4.0.tgz", + "integrity": "sha512-FBI1plWet+dPUvAzPAeHzRKiPpETQzqSUWR1wXJGHVWi4i8bOSrpC3NwpkPjgeXG7MnugVc1B42VbfnQikyC/A==", + "requires": { + "@ethersproject/bytes": "^5.4.0", + "js-sha3": "0.5.7" + } + }, + "@ethersproject/logger": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.4.0.tgz", + "integrity": "sha512-xYdWGGQ9P2cxBayt64d8LC8aPFJk6yWCawQi/4eJ4+oJdMMjEBMrIcIMZ9AxhwpPVmnBPrsB10PcXGmGAqgUEQ==" + }, + "@ethersproject/networks": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.4.1.tgz", + "integrity": "sha512-8SvowCKz9Uf4xC5DTKI8+il8lWqOr78kmiqAVLYT9lzB8aSmJHQMD1GSuJI0CW4hMAnzocpGpZLgiMdzsNSPig==", + "requires": { + "@ethersproject/logger": "^5.4.0" + } + }, + "@ethersproject/pbkdf2": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.4.0.tgz", + "integrity": "sha512-x94aIv6tiA04g6BnazZSLoRXqyusawRyZWlUhKip2jvoLpzJuLb//KtMM6PEovE47pMbW+Qe1uw+68ameJjB7g==", + "requires": { + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/sha2": "^5.4.0" + } + }, + "@ethersproject/properties": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.4.0.tgz", + "integrity": "sha512-7jczalGVRAJ+XSRvNA6D5sAwT4gavLq3OXPuV/74o3Rd2wuzSL035IMpIMgei4CYyBdialJMrTqkOnzccLHn4A==", + "requires": { + "@ethersproject/logger": "^5.4.0" + } + }, + "@ethersproject/providers": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.4.1.tgz", + "integrity": "sha512-p06eiFKz8nu/5Ju0kIX024gzEQIgE5pvvGrBCngpyVjpuLtUIWT3097Agw4mTn9/dEA0FMcfByzFqacBMSgCVg==", + "requires": { + "@ethersproject/abstract-provider": "^5.4.0", + "@ethersproject/abstract-signer": "^5.4.0", + "@ethersproject/address": "^5.4.0", + "@ethersproject/basex": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/constants": "^5.4.0", + "@ethersproject/hash": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/networks": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/random": "^5.4.0", + "@ethersproject/rlp": "^5.4.0", + "@ethersproject/sha2": "^5.4.0", + "@ethersproject/strings": "^5.4.0", + "@ethersproject/transactions": "^5.4.0", + "@ethersproject/web": "^5.4.0", + "bech32": "1.1.4", + "ws": "7.4.6" + } + }, + "@ethersproject/random": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.4.0.tgz", + "integrity": "sha512-pnpWNQlf0VAZDEOVp1rsYQosmv2o0ITS/PecNw+mS2/btF8eYdspkN0vIXrCMtkX09EAh9bdk8GoXmFXM1eAKw==", + "requires": { + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0" + } + }, + "@ethersproject/rlp": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.4.0.tgz", + "integrity": "sha512-0I7MZKfi+T5+G8atId9QaQKHRvvasM/kqLyAH4XxBCBchAooH2EX5rL9kYZWwcm3awYV+XC7VF6nLhfeQFKVPg==", + "requires": { + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0" + } + }, + "@ethersproject/sha2": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.4.0.tgz", + "integrity": "sha512-siheo36r1WD7Cy+bDdE1BJ8y0bDtqXCOxRMzPa4bV1TGt/eTUUt03BHoJNB6reWJD8A30E/pdJ8WFkq+/uz4Gg==", + "requires": { + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "hash.js": "1.1.7" + } + }, + "@ethersproject/signing-key": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.4.0.tgz", + "integrity": "sha512-q8POUeywx6AKg2/jX9qBYZIAmKSB4ubGXdQ88l40hmATj29JnG5pp331nAWwwxPn2Qao4JpWHNZsQN+bPiSW9A==", + "requires": { + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "bn.js": "^4.11.9", + "elliptic": "6.5.4", + "hash.js": "1.1.7" + } + }, + "@ethersproject/solidity": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.4.0.tgz", + "integrity": "sha512-XFQTZ7wFSHOhHcV1DpcWj7VXECEiSrBuv7JErJvB9Uo+KfCdc3QtUZV+Vjh/AAaYgezUEKbCtE6Khjm44seevQ==", + "requires": { + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/keccak256": "^5.4.0", + "@ethersproject/sha2": "^5.4.0", + "@ethersproject/strings": "^5.4.0" + } + }, + "@ethersproject/strings": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.4.0.tgz", + "integrity": "sha512-k/9DkH5UGDhv7aReXLluFG5ExurwtIpUfnDNhQA29w896Dw3i4uDTz01Quaptbks1Uj9kI8wo9tmW73wcIEaWA==", + "requires": { + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/constants": "^5.4.0", + "@ethersproject/logger": "^5.4.0" + } + }, + "@ethersproject/transactions": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.4.0.tgz", + "integrity": "sha512-s3EjZZt7xa4BkLknJZ98QGoIza94rVjaEed0rzZ/jB9WrIuu/1+tjvYCWzVrystXtDswy7TPBeIepyXwSYa4WQ==", + "requires": { + "@ethersproject/address": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/constants": "^5.4.0", + "@ethersproject/keccak256": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/rlp": "^5.4.0", + "@ethersproject/signing-key": "^5.4.0" + } + }, + "@ethersproject/units": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.4.0.tgz", + "integrity": "sha512-Z88krX40KCp+JqPCP5oPv5p750g+uU6gopDYRTBGcDvOASh6qhiEYCRatuM/suC4S2XW9Zz90QI35MfSrTIaFg==", + "requires": { + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/constants": "^5.4.0", + "@ethersproject/logger": "^5.4.0" + } + }, + "@ethersproject/wallet": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.4.0.tgz", + "integrity": "sha512-wU29majLjM6AjCjpat21mPPviG+EpK7wY1+jzKD0fg3ui5fgedf2zEu1RDgpfIMsfn8fJHJuzM4zXZ2+hSHaSQ==", + "requires": { + "@ethersproject/abstract-provider": "^5.4.0", + "@ethersproject/abstract-signer": "^5.4.0", + "@ethersproject/address": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/hash": "^5.4.0", + "@ethersproject/hdnode": "^5.4.0", + "@ethersproject/json-wallets": "^5.4.0", + "@ethersproject/keccak256": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/random": "^5.4.0", + "@ethersproject/signing-key": "^5.4.0", + "@ethersproject/transactions": "^5.4.0", + "@ethersproject/wordlists": "^5.4.0" + } + }, + "@ethersproject/web": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.4.0.tgz", + "integrity": "sha512-1bUusGmcoRLYgMn6c1BLk1tOKUIFuTg8j+6N8lYlbMpDesnle+i3pGSagGNvwjaiLo4Y5gBibwctpPRmjrh4Og==", + "requires": { + "@ethersproject/base64": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/strings": "^5.4.0" + } + }, + "@ethersproject/wordlists": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.4.0.tgz", + "integrity": "sha512-FemEkf6a+EBKEPxlzeVgUaVSodU7G0Na89jqKjmWMlDB0tomoU8RlEMgUvXyqtrg8N4cwpLh8nyRnm1Nay1isA==", + "requires": { + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/hash": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/strings": "^5.4.0" + } + }, + "aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" + }, + "bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" + }, + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "requires": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "ethereum-block-by-date": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ethereum-block-by-date/-/ethereum-block-by-date-1.4.0.tgz", + "integrity": "sha512-3D+6esxU9bQDyFev9/9C6+Wqpb+HdSyeKnAhktIZXOQjgPdGRc4zwr/FdrgMfrJlB9Ee4cG9psu7eCgYQ3szaA==", + "requires": { + "moment": "^2.29.1" + }, + "dependencies": { + "moment": { + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", + "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==" + } + } + }, + "ethers": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.4.1.tgz", + "integrity": "sha512-SrcddMdCgP1hukDvCPd87Aipbf4NWjQvdfAbZ65XSZGbfyuYPtIrUJPDH5B1SBRsdlfiEgX3eoz28DdBDzMNFg==", + "requires": { + "@ethersproject/abi": "5.4.0", + "@ethersproject/abstract-provider": "5.4.0", + "@ethersproject/abstract-signer": "5.4.0", + "@ethersproject/address": "5.4.0", + "@ethersproject/base64": "5.4.0", + "@ethersproject/basex": "5.4.0", + "@ethersproject/bignumber": "5.4.0", + "@ethersproject/bytes": "5.4.0", + "@ethersproject/constants": "5.4.0", + "@ethersproject/contracts": "5.4.0", + "@ethersproject/hash": "5.4.0", + "@ethersproject/hdnode": "5.4.0", + "@ethersproject/json-wallets": "5.4.0", + "@ethersproject/keccak256": "5.4.0", + "@ethersproject/logger": "5.4.0", + "@ethersproject/networks": "5.4.1", + "@ethersproject/pbkdf2": "5.4.0", + "@ethersproject/properties": "5.4.0", + "@ethersproject/providers": "5.4.1", + "@ethersproject/random": "5.4.0", + "@ethersproject/rlp": "5.4.0", + "@ethersproject/sha2": "5.4.0", + "@ethersproject/signing-key": "5.4.0", + "@ethersproject/solidity": "5.4.0", + "@ethersproject/strings": "5.4.0", + "@ethersproject/transactions": "5.4.0", + "@ethersproject/units": "5.4.0", + "@ethersproject/wallet": "5.4.0", + "@ethersproject/web": "5.4.0", + "@ethersproject/wordlists": "5.4.0" + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" + }, + "ws": { + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==" + } + } +} diff --git a/package.json b/package.json index 0592181..32a1ca6 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,8 @@ "cors": "^2.8.5", "delay": "^4.4.0", "dotenv": "^8.2.0", + "ethereum-block-by-date": "^1.4.0", + "ethers": "^5.4.1", "express": "^4.17.1", "lodash": "^4.17.20", "moment": "^2.28.0", diff --git a/services/vaults/performance/AggregatorABI.json b/services/vaults/performance/AggregatorABI.json new file mode 100644 index 0000000..4a83418 --- /dev/null +++ b/services/vaults/performance/AggregatorABI.json @@ -0,0 +1,51 @@ +[ + { + "inputs": [], + "name": "decimals", + "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "description", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint80", "name": "_roundId", "type": "uint80" } + ], + "name": "getRoundData", + "outputs": [ + { "internalType": "uint80", "name": "roundId", "type": "uint80" }, + { "internalType": "int256", "name": "answer", "type": "int256" }, + { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, + { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, + { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "latestRoundData", + "outputs": [ + { "internalType": "uint80", "name": "roundId", "type": "uint80" }, + { "internalType": "int256", "name": "answer", "type": "int256" }, + { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, + { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, + { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + } +] diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js new file mode 100644 index 0000000..8285eae --- /dev/null +++ b/services/vaults/performance/handler.js @@ -0,0 +1,302 @@ +"use strict"; + +require("dotenv").config(); +const _ = require("lodash"); +const historicalDb = require("../../../models/performance.model"); +const moment = require("moment"); +const ethers = require("ethers"); +const EthDater = require("ethereum-block-by-date"); +const { + aggregatedContractAddress, + testContracts, + mainContracts, +} = require("../../../config/serverless/domain"); + +const url = process.env.ARCHIVENODE_ENDPOINT; + +// Using ethers.js +const provider = new ethers.providers.JsonRpcProvider(url); + +const dater = new EthDater( + provider // Web3 object, required. +); + +let days; +let contracts; +let BTC_AGGREGATOR_ADDR; +let ETH_AGGREGATOR_ADDR; +let INCEPTION_BLOCK; + +if (process.env.PRODUCTION != "") { + contracts = mainContracts; + BTC_AGGREGATOR_ADDR = "0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c"; + ETH_AGGREGATOR_ADDR = "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419"; + INCEPTION_BLOCK = 12586420; +} else { + contracts = testContracts; + BTC_AGGREGATOR_ADDR = "0x6135b13325bfc4b00278b4abc5e20bbce2d6580e"; + ETH_AGGREGATOR_ADDR = "0x9326bfa02add2366b30bacb125260af641031331"; + INCEPTION_BLOCK = 25336169; +} + +const citadelAddress = contracts.farmer.daoCDV.address; +const citadelABI = contracts.farmer.daoCDV.abi; +const aggregatorV3InterfaceABI = require("./AggregatorABI.json"); + +const BTCpriceFeed = new ethers.Contract( + BTC_AGGREGATOR_ADDR, + aggregatorV3InterfaceABI, + provider +); // 8 DEcimals +const ETHpriceFeed = new ethers.Contract( + ETH_AGGREGATOR_ADDR, + aggregatorV3InterfaceABI, + provider +); // 8 DEcimals + +const citadelVault = new ethers.Contract(citadelAddress, citadelABI, provider); + +async function getTotalSupply(block) { + const totalSupply = await citadelVault.totalSupply({ blockTag: block }); + return totalSupply; +} + +async function getTotalPool(block) { + const totalPool = await citadelVault.getAllPoolInUSD({ blockTag: block }); + return totalPool; +} + +async function getBTCPrice(block) { + const price = (await BTCpriceFeed.latestRoundData({ blockTag: block })) + .answer; + return price; +} + +async function getETHPrice(block) { + const price = (await ETHpriceFeed.latestRoundData({ blockTag: block })) + .answer; + return price; +} + +function calcLPTokenPriceUSD(totalPoolUSD, totalSupply) { + if (totalSupply != 0) { + return totalPoolUSD + .mul(ethers.BigNumber.from("1000000000000")) + .div(totalSupply); + } else { + return 0; + } +} + +function calculatePerformance(initial, current) { + if (initial == 0) { + return 0; + } else { + let performance = current / initial - 1; + return performance; + } +} + +async function getSearchRange(firstBlock, lastBlock) { + let firstTimestamp = await getUnixTime(firstBlock); + + firstTimestamp = firstTimestamp + (86400 - (firstTimestamp % 86400)); + firstTimestamp *= 1000; + let lastTimestamp = await getUnixTime(lastBlock); + lastTimestamp = lastTimestamp - (lastTimestamp % 86400); + lastTimestamp *= 1000; + + let days = await dater.getEvery( + "days", // Period, required. Valid value: years, quarters, months, weeks, days, hours, minutes + firstTimestamp, // Start date, required. Any valid moment.js value: string, milliseconds, Date() object, moment() object. + lastTimestamp, // End date, required. Any valid moment.js value: string, milliseconds, Date() object, moment() object. + 1, // Duration, optional, integer. By default 1. + true // Block after, optional. Search for the nearest block before or after the given date. By default true. + ); + + return days; +} + +async function getUnixTime(block) { + return (await provider.getBlock(block)).timestamp; +} + +async function syncHistoricalPerformance() { + // let results = []; + + // Get latest entry in database, // TODO: remove hardcode for other vaults in the future + const latestEntry = await historicalDb.findLatest("daoCDV"); + let startBlock; + let totalSupply; + let totalPool; + let btcPrice; + let ethPrice; + let lpTokenPriceUSD; + let lpPerformance; + let ethPerformance; + let btcPerformance; + let data; + let basePrice = 0; + let ethBasePrice = 0; + let btcBasePrice = 0; + let lpPriceInception = 0; + let ethPriceInception = 0; + let btcPriceInception = 0; + + if (latestEntry.length != 0) { + startBlock = latestEntry[0].block; + basePrice = latestEntry[0]["lp_inception_price"]; + btcBasePrice = latestEntry[0]["btc_inception_price"]; + ethBasePrice = latestEntry[0]["eth_inception_price"]; + } else { + startBlock = INCEPTION_BLOCK; + } + + const latestBlock = await provider.getBlockNumber(); + + const dates = await getSearchRange(startBlock, latestBlock); + + for (const date of dates) { + try { + totalSupply = await getTotalSupply(date.block); + totalPool = await getTotalPool(date.block); + btcPrice = await getBTCPrice(date.block); + ethPrice = await getETHPrice(date.block); + lpTokenPriceUSD = calcLPTokenPriceUSD(totalPool, totalSupply); + if (lpTokenPriceUSD > 0 && basePrice == 0) { + basePrice = lpTokenPriceUSD; + lpPriceInception = basePrice; + } + if (btcPrice > 0 && btcBasePrice == 0) { + btcBasePrice = btcPrice; + btcPriceInception = btcBasePrice; + } + if (ethPrice > 0 && ethBasePrice == 0) { + ethBasePrice = ethPrice; + ethPriceInception = ethBasePrice; + } + lpPerformance = calculatePerformance(basePrice, lpTokenPriceUSD); + btcPerformance = calculatePerformance(btcBasePrice, btcPrice); + ethPerformance = calculatePerformance(ethBasePrice, ethPrice); + + data = { + date: date.date, + time_stamp: date.timestamp, + block: date.block, + total_supply: totalSupply.toString(), + total_pool_usd: totalPool.toString(), + btc_price: btcPrice.toString(), + eth_price: ethPrice.toString(), + lp_token_price_usd: lpTokenPriceUSD.toString(), + lp_performance: lpPerformance, + btc_performance: btcPerformance, + eth_performance: ethPerformance, + lp_inception_price: lpPriceInception.toString(), + btc_inception_price: btcPriceInception.toString(), + eth_inception_price: ethPriceInception.toString(), + }; + + // console.log(data); + historicalDb.add("daoCDV", data); + } catch (e) { + console.log(e); + } + } +} + +module.exports.savePerformance = async (event) => { + await syncHistoricalPerformance(); +}; + +module.exports.handler = async (event) => { + const performanceData = await syncHistoricalPerformance(); + + return { + statusCode: 200, + headers: { + "Access-Control-Allow-Origin": "*", + "Access-Control-Allow-Credentials": true, + }, + body: JSON.stringify(performanceData), + }; +}; + +module.exports.performanceHandle = async (req, res) => { + if (req.params.days == null || req.params.days == "") { + res.status(200).json({ + message: "Days is empty.", + body: null, + }); + return; + } + // check if vault param is input + if (req.params.farmer === null || req.params.farmer === "") { + res.status(200).json({ + message: "Vault input is empty", + body: null, + }); + return; + } + + let startTime = -1; + let collection = ""; + let result; + + switch (req.params.farmer) { + case historicalDb.daoCDVFarmer: + collection = historicalDb.daoCDVFarmer; + break; + default: + res.status(200).json({ + message: "Invalid Farmer", + body: null, + }); + return; + } + + switch (req.params.days) { + case "30d": + startTime = moment().subtract(30, "days").unix(); + break; + case "7d": + startTime = moment().subtract(7, "days").unix(); + break; + case "1d": + startTime = moment().subtract(1, "days").unix(); + break; + } + + if (startTime == -1) { + result = await historicalDb.findAll(collection); + } else { + result = await historicalDb.findPerformanceWithTimePeriods( + collection, + startTime + ); + + const basePrice = result[0]["lp_token_price_usd"]; + const btcBasePrice = result[0]["btc_price"]; + const ethBasePrice = result[0]["eth_price"]; + result.forEach((data) => { + data["lp_performance"] = calculatePerformance( + basePrice, + data["lp_token_price_usd"] + ); + data["btc_performance"] = calculatePerformance( + btcBasePrice, + data["btc_price"] + ); + data["eth_performance"] = calculatePerformance( + ethBasePrice, + data["eth_price"] + ); + }); + } + if (result) { + res.status(200).json({ + message: `Performance Data for ${req.params.farmer}`, + body: result, + }); + } + return; +}; From d882fe93a9374e41d6d8e830909631c4e3cad4bf Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Sun, 11 Jul 2021 09:28:56 +0800 Subject: [PATCH 168/254] Update for other farmers --- models/performance.model.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/models/performance.model.js b/models/performance.model.js index c5055b4..99c8bdd 100644 --- a/models/performance.model.js +++ b/models/performance.model.js @@ -49,4 +49,6 @@ module.exports = { findPerformanceWithTimePeriods, add, daoCDVFarmer: "daoCDV", + daoELOFarmer: "daoELO", + daoSTOFarmer: "daoSTO", }; From cea2131a9c37f5ce80be1fe78833bb9342c12a78 Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Sun, 11 Jul 2021 09:30:23 +0800 Subject: [PATCH 169/254] Update to handle all etf type vaults --- services/vaults/performance/handler.js | 192 ++++++++++++++----------- 1 file changed, 112 insertions(+), 80 deletions(-) diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js index 8285eae..7c646ce 100644 --- a/services/vaults/performance/handler.js +++ b/services/vaults/performance/handler.js @@ -23,6 +23,7 @@ const dater = new EthDater( let days; let contracts; +let vault; let BTC_AGGREGATOR_ADDR; let ETH_AGGREGATOR_ADDR; let INCEPTION_BLOCK; @@ -39,8 +40,6 @@ if (process.env.PRODUCTION != "") { INCEPTION_BLOCK = 25336169; } -const citadelAddress = contracts.farmer.daoCDV.address; -const citadelABI = contracts.farmer.daoCDV.abi; const aggregatorV3InterfaceABI = require("./AggregatorABI.json"); const BTCpriceFeed = new ethers.Contract( @@ -54,15 +53,33 @@ const ETHpriceFeed = new ethers.Contract( provider ); // 8 DEcimals -const citadelVault = new ethers.Contract(citadelAddress, citadelABI, provider); +function getInceptionBlock(farmer) { + if (process.env.PRODUCTION != "") { + const farmers = { + daoCDV: 12586420, + daoSTO: 12766399, + daoELO: 12722655, + daoCUB: 12799447, + }; + return farmers[farmers]; + } else { + const farmers = { + daoCDV: 25336169, + daoSTO: 25867824, + daoELO: 25413059, + daoCUB: 25536976, + }; + return farmers[farmers]; + } +} async function getTotalSupply(block) { - const totalSupply = await citadelVault.totalSupply({ blockTag: block }); + const totalSupply = await vault.totalSupply({ blockTag: block }); return totalSupply; } async function getTotalPool(block) { - const totalPool = await citadelVault.getAllPoolInUSD({ blockTag: block }); + const totalPool = await vault.getAllPoolInUSD({ blockTag: block }); return totalPool; } @@ -124,84 +141,93 @@ async function getUnixTime(block) { async function syncHistoricalPerformance() { // let results = []; - // Get latest entry in database, // TODO: remove hardcode for other vaults in the future - const latestEntry = await historicalDb.findLatest("daoCDV"); - let startBlock; - let totalSupply; - let totalPool; - let btcPrice; - let ethPrice; - let lpTokenPriceUSD; - let lpPerformance; - let ethPerformance; - let btcPerformance; - let data; - let basePrice = 0; - let ethBasePrice = 0; - let btcBasePrice = 0; - let lpPriceInception = 0; - let ethPriceInception = 0; - let btcPriceInception = 0; - - if (latestEntry.length != 0) { - startBlock = latestEntry[0].block; - basePrice = latestEntry[0]["lp_inception_price"]; - btcBasePrice = latestEntry[0]["btc_inception_price"]; - ethBasePrice = latestEntry[0]["eth_inception_price"]; - } else { - startBlock = INCEPTION_BLOCK; - } - - const latestBlock = await provider.getBlockNumber(); - - const dates = await getSearchRange(startBlock, latestBlock); + const ETF_STRATEGIES = ["daoCDV", "daoSTO", "daoELO"]; + + // Get latest entry in database + + ETF_STRATEGIES.forEach(async (etf) => { + console.log("🚀 | syncHistoricalPerformance | etf", etf); + let vaultAddress = contracts["farmer"][etf]["address"]; + let vaultABI = contracts["farmer"][etf]["abi"]; + vault = new ethers.Contract(vaultAddress, vaultABI, provider); + const latestEntry = await historicalDb.findLatest(etf); + let startBlock; + let totalSupply; + let totalPool; + let btcPrice; + let ethPrice; + let lpTokenPriceUSD; + let lpPerformance; + let ethPerformance; + let btcPerformance; + let data; + let basePrice = 0; + let ethBasePrice = 0; + let btcBasePrice = 0; + let lpPriceInception = 0; + let ethPriceInception = 0; + let btcPriceInception = 0; + + if (latestEntry.length != 0) { + startBlock = latestEntry[0].block; + basePrice = latestEntry[0]["lp_inception_price"]; + btcBasePrice = latestEntry[0]["btc_inception_price"]; + ethBasePrice = latestEntry[0]["eth_inception_price"]; + } else { + startBlock = getInceptionBlock(etf); + } - for (const date of dates) { - try { - totalSupply = await getTotalSupply(date.block); - totalPool = await getTotalPool(date.block); - btcPrice = await getBTCPrice(date.block); - ethPrice = await getETHPrice(date.block); - lpTokenPriceUSD = calcLPTokenPriceUSD(totalPool, totalSupply); - if (lpTokenPriceUSD > 0 && basePrice == 0) { - basePrice = lpTokenPriceUSD; - lpPriceInception = basePrice; - } - if (btcPrice > 0 && btcBasePrice == 0) { - btcBasePrice = btcPrice; - btcPriceInception = btcBasePrice; - } - if (ethPrice > 0 && ethBasePrice == 0) { - ethBasePrice = ethPrice; - ethPriceInception = ethBasePrice; + const latestBlock = await provider.getBlockNumber(); + + const dates = await getSearchRange(startBlock, latestBlock); + + for (const date of dates) { + try { + totalSupply = await getTotalSupply(date.block); + totalPool = await getTotalPool(date.block); + btcPrice = await getBTCPrice(date.block); + ethPrice = await getETHPrice(date.block); + lpTokenPriceUSD = calcLPTokenPriceUSD(totalPool, totalSupply); + if (lpTokenPriceUSD > 0 && basePrice == 0) { + basePrice = lpTokenPriceUSD; + lpPriceInception = basePrice; + } + if (btcPrice > 0 && btcBasePrice == 0) { + btcBasePrice = btcPrice; + btcPriceInception = btcBasePrice; + } + if (ethPrice > 0 && ethBasePrice == 0) { + ethBasePrice = ethPrice; + ethPriceInception = ethBasePrice; + } + lpPerformance = calculatePerformance(basePrice, lpTokenPriceUSD); + btcPerformance = calculatePerformance(btcBasePrice, btcPrice); + ethPerformance = calculatePerformance(ethBasePrice, ethPrice); + + data = { + date: date.date, + time_stamp: date.timestamp, + block: date.block, + total_supply: totalSupply.toString(), + total_pool_usd: totalPool.toString(), + btc_price: btcPrice.toString(), + eth_price: ethPrice.toString(), + lp_token_price_usd: lpTokenPriceUSD.toString(), + lp_performance: lpPerformance, + btc_performance: btcPerformance, + eth_performance: ethPerformance, + lp_inception_price: lpPriceInception.toString(), + btc_inception_price: btcPriceInception.toString(), + eth_inception_price: ethPriceInception.toString(), + }; + + // console.log(data); + historicalDb.add(etf, data); + } catch (e) { + console.log(e); } - lpPerformance = calculatePerformance(basePrice, lpTokenPriceUSD); - btcPerformance = calculatePerformance(btcBasePrice, btcPrice); - ethPerformance = calculatePerformance(ethBasePrice, ethPrice); - - data = { - date: date.date, - time_stamp: date.timestamp, - block: date.block, - total_supply: totalSupply.toString(), - total_pool_usd: totalPool.toString(), - btc_price: btcPrice.toString(), - eth_price: ethPrice.toString(), - lp_token_price_usd: lpTokenPriceUSD.toString(), - lp_performance: lpPerformance, - btc_performance: btcPerformance, - eth_performance: ethPerformance, - lp_inception_price: lpPriceInception.toString(), - btc_inception_price: btcPriceInception.toString(), - eth_inception_price: ethPriceInception.toString(), - }; - - // console.log(data); - historicalDb.add("daoCDV", data); - } catch (e) { - console.log(e); } - } + }); } module.exports.savePerformance = async (event) => { @@ -246,6 +272,12 @@ module.exports.performanceHandle = async (req, res) => { case historicalDb.daoCDVFarmer: collection = historicalDb.daoCDVFarmer; break; + case historicalDb.daoELOFarmer: + collection = historicalDb.daoELOFarmer; + break; + case historicalDb.daoSTOFarmer: + collection = historicalDb.daoSTOFarmer; + break; default: res.status(200).json({ message: "Invalid Farmer", From ac883e2cde564db73c70af3507650e790137ce88 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Sun, 11 Jul 2021 16:41:08 +0800 Subject: [PATCH 170/254] Add deposit and withdraw property to stake_pools. --- scripts/initial.js | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/scripts/initial.js b/scripts/initial.js index 3593374..2a683a9 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -24,6 +24,8 @@ db.stake_pool.insertMany([ tokenId: 'tether', symbol: 'USDT', startBlock: 12770000, + deposit: false, + withdraw: true, }, { name: 'dvmUSDC', @@ -35,6 +37,8 @@ db.stake_pool.insertMany([ tokenId: 'usd-coin', symbol: 'USDC', startBlock: 12770000, + deposit: false, + withdraw: true, }, { name: 'dvmDAI', @@ -46,6 +50,8 @@ db.stake_pool.insertMany([ tokenId: 'dai', symbol: 'DAI', startBlock: 12770000, + deposit: false, + withdraw: true, }, { name: 'dvmTUSD', @@ -57,6 +63,8 @@ db.stake_pool.insertMany([ tokenId: 'true-usd', symbol: 'TUSD', startBlock: 12770000, + deposit: false, + withdraw: true, }, { name: 'dvlUSDT', @@ -68,6 +76,8 @@ db.stake_pool.insertMany([ tokenId: 'tether', symbol: 'USDT', startBlock: 12770000, + deposit: false, + withdraw: true, }, { name: 'dvlUSDC', @@ -79,6 +89,8 @@ db.stake_pool.insertMany([ tokenId: 'usd-coin', symbol: 'USDC', startBlock: 12770000, + deposit: false, + withdraw: true, }, { name: 'dvlDAI', @@ -90,6 +102,8 @@ db.stake_pool.insertMany([ tokenId: 'dai', symbol: 'DAI', startBlock: 12770000, + deposit: false, + withdraw: true, }, { name: 'vipDVG', @@ -101,6 +115,8 @@ db.stake_pool.insertMany([ tokenId: 'xDVG', symbol: 'xDVG', startBlock: 12770000, + deposit: false, + withdraw: true, }, { name: 'ETH<->DVG', @@ -112,6 +128,8 @@ db.stake_pool.insertMany([ tokenId: 'ethDVG', symbol: 'ethDVG', startBlock: 12770000, + deposit: false, + withdraw: true, }, { name: 'daoCDV', @@ -123,6 +141,8 @@ db.stake_pool.insertMany([ tokenId: 'ethereum', symbol: 'daoCDV', startBlock: 12770000, + deposit: false, + withdraw: true, }, { name: 'daoELO', @@ -134,6 +154,8 @@ db.stake_pool.insertMany([ tokenId: 'ethereum', symbol: 'daoELO', startBlock: 12770000, + deposit: false, + withdraw: true, }, { name: "daoSTO", @@ -145,6 +167,8 @@ db.stake_pool.insertMany([ tokenId: 'tether', symbol: 'daoSTO', startBlock: 12770000, + deposit: false, + withdraw: true, } ]); @@ -179,6 +203,8 @@ db.stake_pool.insertMany([ tokenId: 'tether', symbol: 'USDT', startBlock: 25721857, + deposit: false, + withdraw: true, }, { name: 'dvmUSDC', @@ -190,6 +216,8 @@ db.stake_pool.insertMany([ tokenId: 'usd-coin', symbol: 'USDC', startBlock: 25721857, + deposit: false, + withdraw: true, }, { name: 'dvmDAI', @@ -201,6 +229,8 @@ db.stake_pool.insertMany([ tokenId: 'dai', symbol: 'DAI', startBlock: 25721857, + deposit: false, + withdraw: true, }, { name: 'dvmTUSD', @@ -212,6 +242,8 @@ db.stake_pool.insertMany([ tokenId: 'true-usd', symbol: 'TUSD', startBlock: 25721857, + deposit: false, + withdraw: true, }, { name: 'dvlUSDT', @@ -223,6 +255,8 @@ db.stake_pool.insertMany([ tokenId: 'tether', symbol: 'USDT', startBlock: 25721857, + deposit: false, + withdraw: true, }, { name: 'dvlUSDC', @@ -234,6 +268,8 @@ db.stake_pool.insertMany([ tokenId: 'usd-coin', symbol: 'USDC', startBlock: 25721857, + deposit: false, + withdraw: true, }, { name: 'dvlDAI', @@ -245,6 +281,8 @@ db.stake_pool.insertMany([ tokenId: 'dai', symbol: 'DAI', startBlock: 25721857, + deposit: false, + withdraw: true, }, { name: 'vipDVG', @@ -256,6 +294,8 @@ db.stake_pool.insertMany([ tokenId: 'xDVG', symbol: 'xDVG', startBlock: 25721857, + deposit: false, + withdraw: true, }, { name: 'ETH<->DVG', @@ -267,6 +307,8 @@ db.stake_pool.insertMany([ tokenId: 'ethDVG', symbol: 'ethDVG', startBlock: 25721857, + deposit: false, + withdraw: true, }, { name: 'daoCDV', @@ -278,6 +320,8 @@ db.stake_pool.insertMany([ tokenId: 'ethereum', symbol: 'daoCDV', startBlock: 25721857, + deposit: false, + withdraw: true, }, { name: 'daoELO', @@ -289,6 +333,8 @@ db.stake_pool.insertMany([ tokenId: 'ethereum', symbol: 'daoELO', startBlock: 25721857, + deposit: false, + withdraw: true, }, { name: "daoSTO", @@ -300,6 +346,8 @@ db.stake_pool.insertMany([ tokenId: 'tether', symbol: 'daoSTO', startBlock: 25721857, + deposit: false, + withdraw: true, } ]); From 7b731dca275b0f2bc1ae5c9da143281f186ac539 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Sun, 11 Jul 2021 23:35:31 +0800 Subject: [PATCH 171/254] Added emergency withdraw snapshot for DAOmine --- app.js | 7 + models/emergency-withdraw.model.js | 43 + package.json | 1 + scripts/initial.js | 12 + services/staking/handler.js | 44 + swagger.json | 39 + yarn.lock | 7675 +++++++++++++--------------- 7 files changed, 3766 insertions(+), 4055 deletions(-) create mode 100644 models/emergency-withdraw.model.js diff --git a/app.js b/app.js index 0217d58..ac174bc 100644 --- a/app.js +++ b/app.js @@ -19,6 +19,7 @@ const port = process.env.PORT || 8080; const jobs = require("./jobs/task"); const swaggerUi = require('swagger-ui-express'); const swaggerDocument = require('./swagger.json'); +const bodyParser = require('body-parser'); async function init() { // Improve debugging @@ -40,6 +41,10 @@ async function init() { }); app.use(cors()); + app.use(bodyParser.urlencoded({ + extended: true, + })); + app.use(bodyParser.json()); app.get("/vaults/apy", (req, res) => vaultsApy.handler(res)); app.get("/user/:userAddress/vaults/statistics", (req, res) => @@ -73,6 +78,8 @@ async function init() { app.get('/event/verify', (req,res) => specialEvent.handleVerifyEvent(req, res)); app.get('/event/verify/:amount', (req, res) => specialEvent.handler(req, res)); + app.post('/staking/emergency-withdraw-snapshot', (req, res) => stakePool.snapshotEmergency(req, res)); + app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument)); app.listen(port, () => console.log(`Listening on ${port}`)); diff --git a/models/emergency-withdraw.model.js b/models/emergency-withdraw.model.js new file mode 100644 index 0000000..a755990 --- /dev/null +++ b/models/emergency-withdraw.model.js @@ -0,0 +1,43 @@ +const mongo = require('../config/db'); +const collection = 'emergency-withdraw'; + +const findAll = async () => { + const db = mongo.getDB(); + return await db.collection(collection).find({}).toArray(); +}; + +const add = async (params) => { + const db = mongo.getDB(); + + const result = await db.collection(collection).findOne({ + pid: params.pid, + userAddress: params.userAddress, + }); + if (result != null) { + return await db.collection(collection).updateOne({ + pid: params.pid, + userAddress: params.userAddress, + }, + { + $set: { + ...params + } + }); + } else { + return await db.collection(collection).insertOne(params); + } +} + +const findOne = async (params) => { + const db = mongo.getDB(); + return await db.collection(collection).findOne({ + pid: params.pid, + userAddress: params.userAddress, + }); +} + +module.exports = { + findAll, + add, + findOne, +}; \ No newline at end of file diff --git a/package.json b/package.json index 0592181..2fa5eeb 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "dependencies": { "axios": "^0.21.0", "bignumber": "^1.1.0", + "body-parser": "^1.19.0", "coingecko-api": "^1.0.10", "cors": "^2.8.5", "delay": "^4.4.0", diff --git a/scripts/initial.js b/scripts/initial.js index 1127ec8..8b21def 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -28,6 +28,7 @@ db.stake_pool.insertMany([ startBlock: 12770000, deposit: false, withdraw: true, + emergencyWithdraw: true, }, { name: 'dvmUSDC', @@ -41,6 +42,7 @@ db.stake_pool.insertMany([ startBlock: 12770000, deposit: false, withdraw: true, + emergencyWithdraw: true, }, { name: 'dvmDAI', @@ -54,6 +56,7 @@ db.stake_pool.insertMany([ startBlock: 12770000, deposit: false, withdraw: true, + emergencyWithdraw: true, }, { name: 'dvmTUSD', @@ -67,6 +70,7 @@ db.stake_pool.insertMany([ startBlock: 12770000, deposit: false, withdraw: true, + emergencyWithdraw: true, }, { name: 'dvlUSDT', @@ -80,6 +84,7 @@ db.stake_pool.insertMany([ startBlock: 12770000, deposit: false, withdraw: true, + emergencyWithdraw: true, }, { name: 'dvlUSDC', @@ -93,6 +98,7 @@ db.stake_pool.insertMany([ startBlock: 12770000, deposit: false, withdraw: true, + emergencyWithdraw: true, }, { name: 'dvlDAI', @@ -106,6 +112,7 @@ db.stake_pool.insertMany([ startBlock: 12770000, deposit: false, withdraw: true, + emergencyWithdraw: true, }, { name: 'vipDVG', @@ -119,6 +126,7 @@ db.stake_pool.insertMany([ startBlock: 12770000, deposit: false, withdraw: true, + emergencyWithdraw: true, }, { name: 'ETH<->DVG', @@ -132,6 +140,7 @@ db.stake_pool.insertMany([ startBlock: 12770000, deposit: false, withdraw: true, + emergencyWithdraw: true, }, { name: 'daoCDV', @@ -145,6 +154,7 @@ db.stake_pool.insertMany([ startBlock: 12770000, deposit: false, withdraw: true, + emergencyWithdraw: true, }, { name: 'daoELO', @@ -158,6 +168,7 @@ db.stake_pool.insertMany([ startBlock: 12770000, deposit: false, withdraw: true, + emergencyWithdraw: true, }, { name: "daoSTO", @@ -171,6 +182,7 @@ db.stake_pool.insertMany([ startBlock: 12770000, deposit: false, withdraw: true, + emergencyWithdraw: true, } ]); diff --git a/services/staking/handler.js b/services/staking/handler.js index f970bca..f28c9b3 100644 --- a/services/staking/handler.js +++ b/services/staking/handler.js @@ -1,4 +1,5 @@ const db = require("../../models/stake-pool.model"); +const snapshot = require("../../models/emergency-withdraw.model"); const fetch = require("node-fetch"); const delay = require("delay"); const _ = require("lodash"); @@ -66,5 +67,48 @@ module.exports.getPools = async (req, res) => { }); } + return; +} + +module.exports.snapshotEmergency = async (req, res) => { + try { + const pools = await db.findAll(); + const poolSize = _.size(pools); + let exist = false; + for (idx = 0; idx < poolSize; idx++) { + if (pools[idx].pid === req.body.pid) { + exist = true; + } + } + + if (exist) { + const prev = await snapshot.findOne({ + pid: req.body.pid, + userAddress: req.body.userAddress.toLowerCase(), + }); + + let pendingDVG = req.body.pendingDVG; + if (prev != null) { + pendingDVG += prev.pendingDVG; + } + + await snapshot.add({ + pid: req.body.pid, + userAddress: req.body.userAddress.toLowerCase(), + pendingDVG, + }); + + res.status(200).json({ + message: 'Successful Response', + body: {} + }); + } + } catch (err) { + res.status(200).json({ + message: err.message, + body: null + }) + } + return; } \ No newline at end of file diff --git a/swagger.json b/swagger.json index 3db0cb4..d713884 100644 --- a/swagger.json +++ b/swagger.json @@ -236,6 +236,45 @@ ], "responses": {} } + }, + "/staking/emergency-withdraw-snapshot": { + "post": { + "tags": [ + "Stake" + ], + "description": "Stake Pools Emergency Withdrawal Snapshot", + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "Snap Shot", + "description": "Emergency Withdrawal SnapShot", + "schema": { + "type": "object", + "properties": { + "pid": { + "type": "string", + "description": "Pool ID" + }, + "userAddress": { + "type": "string", + "description": "User Wallet Address" + }, + "pendingDVG": { + "type": "integer", + "description": "Pending DVG Amount" + } + } + } + } + ], + "responses": {} + } } } } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 9b091e2..3a6e6a0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,337 +2,181 @@ # yarn lockfile v1 -"@ethersproject/abi@5.0.7": - version "5.0.7" - resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.7.tgz#79e52452bd3ca2956d0e1c964207a58ad1a0ee7b" - integrity sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw== +"@ethersproject/abi@5.0.0-beta.153": + "version" "5.0.0-beta.153" + dependencies: + "@ethersproject/address" ">=5.0.0-beta.128" + "@ethersproject/bignumber" ">=5.0.0-beta.130" + "@ethersproject/bytes" ">=5.0.0-beta.129" + "@ethersproject/constants" ">=5.0.0-beta.128" + "@ethersproject/hash" ">=5.0.0-beta.128" + "@ethersproject/keccak256" ">=5.0.0-beta.127" + "@ethersproject/logger" ">=5.0.0-beta.129" + "@ethersproject/properties" ">=5.0.0-beta.131" + "@ethersproject/strings" ">=5.0.0-beta.130" + +"@ethersproject/address@^5.0.4", "@ethersproject/address@>=5.0.0-beta.128": + "version" "5.0.4" dependencies: - "@ethersproject/address" "^5.0.4" "@ethersproject/bignumber" "^5.0.7" "@ethersproject/bytes" "^5.0.4" - "@ethersproject/constants" "^5.0.4" - "@ethersproject/hash" "^5.0.4" - "@ethersproject/keccak256" "^5.0.3" - "@ethersproject/logger" "^5.0.5" - "@ethersproject/properties" "^5.0.3" - "@ethersproject/strings" "^5.0.4" - -"@ethersproject/abstract-provider@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.4.0.tgz#415331031b0f678388971e1987305244edc04e1d" - integrity sha512-vPBR7HKUBY0lpdllIn7tLIzNN7DrVnhCLKSzY0l8WAwxz686m/aL7ASDzrVxV93GJtIub6N2t4dfZ29CkPOxgA== - dependencies: - "@ethersproject/bignumber" "^5.4.0" - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - "@ethersproject/networks" "^5.4.0" - "@ethersproject/properties" "^5.4.0" - "@ethersproject/transactions" "^5.4.0" - "@ethersproject/web" "^5.4.0" - -"@ethersproject/abstract-signer@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.4.0.tgz#cd5f50b93141ee9f9f49feb4075a0b3eafb57d65" - integrity sha512-AieQAzt05HJZS2bMofpuxMEp81AHufA5D6M4ScKwtolj041nrfIbIi8ciNW7+F59VYxXq+V4c3d568Q6l2m8ew== - dependencies: - "@ethersproject/abstract-provider" "^5.4.0" - "@ethersproject/bignumber" "^5.4.0" - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - "@ethersproject/properties" "^5.4.0" - -"@ethersproject/address@^5.0.3": - version "5.0.3" - resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.0.3.tgz#86489f836d1656135fa6cae56d9fd1ab5b2c95af" - integrity sha512-LMmLxL1wTNtvwgm/eegcaxtG/W7vHXKzHGUkK9KZEI9W+SfHrpT7cGX+hBcatcUXPANjS3TmOaQ+mq5JU5sGTw== - dependencies: - "@ethersproject/bignumber" "^5.0.6" - "@ethersproject/bytes" "^5.0.4" "@ethersproject/keccak256" "^5.0.3" "@ethersproject/logger" "^5.0.5" "@ethersproject/rlp" "^5.0.3" - bn.js "^4.4.0" - -"@ethersproject/address@^5.0.4", "@ethersproject/address@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.4.0.tgz#ba2d00a0f8c4c0854933b963b9a3a9f6eb4a37a3" - integrity sha512-SD0VgOEkcACEG/C6xavlU1Hy3m5DGSXW3CUHkaaEHbAPPsgi0coP5oNPsxau8eTlZOk/bpa/hKeCNoK5IzVI2Q== - dependencies: - "@ethersproject/bignumber" "^5.4.0" - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/keccak256" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - "@ethersproject/rlp" "^5.4.0" + "bn.js" "^4.4.0" -"@ethersproject/base64@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.4.0.tgz#7252bf65295954c9048c7ca5f43e5c86441b2a9a" - integrity sha512-CjQw6E17QDSSC5jiM9YpF7N1aSCHmYGMt9bWD8PWv6YPMxjsys2/Q8xLrROKI3IWJ7sFfZ8B3flKDTM5wlWuZQ== - dependencies: - "@ethersproject/bytes" "^5.4.0" - -"@ethersproject/bignumber@^5.0.6": - version "5.0.6" - resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.0.6.tgz#1b5494a640c64096538e622b6ba8a5b8439ebde4" - integrity sha512-fLilYOSH3DJXBrimx7PwrJdY/zAI5MGp229Mvhtcur76Lgt4qNWu9HTiwMGHP01Tkm3YP5gweF83GrQrA2tYUA== +"@ethersproject/bignumber@^5.0.7", "@ethersproject/bignumber@>=5.0.0-beta.130": + "version" "5.0.7" dependencies: "@ethersproject/bytes" "^5.0.4" "@ethersproject/logger" "^5.0.5" - bn.js "^4.4.0" - -"@ethersproject/bignumber@^5.0.7", "@ethersproject/bignumber@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.4.0.tgz#be8dea298c0ec71208ee60f0b245be0761217ad9" - integrity sha512-OXUu9f9hO3vGRIPxU40cignXZVaYyfx6j9NNMjebKdnaCL3anCLSSy8/b8d03vY6dh7duCC0kW72GEC4tZer2w== - dependencies: - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - bn.js "^4.11.9" + "bn.js" "^4.4.0" -"@ethersproject/bytes@^5.0.4": - version "5.0.4" - resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.0.4.tgz#328d9d929a3e970964ecf5d62e12568a187189f1" - integrity sha512-9R6A6l9JN8x1U4s1dJCR+9h3MZTT3xQofr/Xx8wbDvj6NnY4CbBB0o8ZgHXvR74yV90pY2EzCekpkMBJnRzkSw== +"@ethersproject/bytes@^5.0.4", "@ethersproject/bytes@>=5.0.0-beta.129": + "integrity" "sha512-9R6A6l9JN8x1U4s1dJCR+9h3MZTT3xQofr/Xx8wbDvj6NnY4CbBB0o8ZgHXvR74yV90pY2EzCekpkMBJnRzkSw==" + "resolved" "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.4.tgz" + "version" "5.0.4" dependencies: "@ethersproject/logger" "^5.0.5" -"@ethersproject/bytes@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.4.0.tgz#56fa32ce3bf67153756dbaefda921d1d4774404e" - integrity sha512-H60ceqgTHbhzOj4uRc/83SCN9d+BSUnOkrr2intevqdtEMO1JFVZ1XL84OEZV+QjV36OaZYxtnt4lGmxcGsPfA== +"@ethersproject/constants@^5.0.4", "@ethersproject/constants@>=5.0.0-beta.128": + "version" "5.0.4" dependencies: - "@ethersproject/logger" "^5.4.0" - -"@ethersproject/constants@^5.0.3": - version "5.0.3" - resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.0.3.tgz#7ccb8e2e9f14fbcc2d52d0e1402a83a5613a2f65" - integrity sha512-iN7KBrA0zNFybDyrkcAPOcyU3CHXYFMd+KM2Jr07Kjg+DVB5wPpEXsOdd/K1KWFsFtGfNdPZ7QP8siLtCePXrQ== - dependencies: - "@ethersproject/bignumber" "^5.0.6" - -"@ethersproject/constants@^5.0.4", "@ethersproject/constants@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.4.0.tgz#ee0bdcb30bf1b532d2353c977bf2ef1ee117958a" - integrity sha512-tzjn6S7sj9+DIIeKTJLjK9WGN2Tj0P++Z8ONEIlZjyoTkBuODN+0VfhAyYksKi43l1Sx9tX2VlFfzjfmr5Wl3Q== - dependencies: - "@ethersproject/bignumber" "^5.4.0" - -"@ethersproject/hash@^5.0.4": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.4.0.tgz#d18a8e927e828e22860a011f39e429d388344ae0" - integrity sha512-xymAM9tmikKgbktOCjW60Z5sdouiIIurkZUr9oW5NOex5uwxrbsYG09kb5bMcNjlVeJD3yPivTNzViIs1GCbqA== - dependencies: - "@ethersproject/abstract-signer" "^5.4.0" - "@ethersproject/address" "^5.4.0" - "@ethersproject/bignumber" "^5.4.0" - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/keccak256" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - "@ethersproject/properties" "^5.4.0" - "@ethersproject/strings" "^5.4.0" + "@ethersproject/bignumber" "^5.0.7" -"@ethersproject/keccak256@^5.0.3": - version "5.0.3" - resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.0.3.tgz#f094a8fca3bb913c044593c4f382be424292e588" - integrity sha512-VhW3mgZMBZlETV6AyOmjNeNG+Pg68igiKkPpat8/FZl0CKnfgQ+KZQZ/ee1vT+X0IUM8/djqnei6btmtbA27Ug== +"@ethersproject/hash@>=5.0.0-beta.128": + "version" "5.0.4" dependencies: "@ethersproject/bytes" "^5.0.4" - js-sha3 "0.5.7" + "@ethersproject/keccak256" "^5.0.3" + "@ethersproject/logger" "^5.0.5" + "@ethersproject/strings" "^5.0.4" -"@ethersproject/keccak256@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.4.0.tgz#7143b8eea4976080241d2bd92e3b1f1bf7025318" - integrity sha512-FBI1plWet+dPUvAzPAeHzRKiPpETQzqSUWR1wXJGHVWi4i8bOSrpC3NwpkPjgeXG7MnugVc1B42VbfnQikyC/A== +"@ethersproject/keccak256@^5.0.3", "@ethersproject/keccak256@>=5.0.0-beta.127": + "integrity" "sha512-VhW3mgZMBZlETV6AyOmjNeNG+Pg68igiKkPpat8/FZl0CKnfgQ+KZQZ/ee1vT+X0IUM8/djqnei6btmtbA27Ug==" + "resolved" "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.3.tgz" + "version" "5.0.3" dependencies: - "@ethersproject/bytes" "^5.4.0" - js-sha3 "0.5.7" - -"@ethersproject/logger@^5.0.5": - version "5.0.5" - resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.0.5.tgz#e3ba3d0bcf9f5be4da5f043b1e328eb98b80002f" - integrity sha512-gJj72WGzQhUtCk6kfvI8elTaPOQyMvrMghp/nbz0ivTo39fZ7IjypFh/ySDeUSdBNplAwhzWKKejQhdpyefg/w== + "@ethersproject/bytes" "^5.0.4" + "js-sha3" "0.5.7" -"@ethersproject/logger@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.4.0.tgz#f39adadf62ad610c420bcd156fd41270e91b3ca9" - integrity sha512-xYdWGGQ9P2cxBayt64d8LC8aPFJk6yWCawQi/4eJ4+oJdMMjEBMrIcIMZ9AxhwpPVmnBPrsB10PcXGmGAqgUEQ== +"@ethersproject/logger@^5.0.5", "@ethersproject/logger@>=5.0.0-beta.129": + "integrity" "sha512-gJj72WGzQhUtCk6kfvI8elTaPOQyMvrMghp/nbz0ivTo39fZ7IjypFh/ySDeUSdBNplAwhzWKKejQhdpyefg/w==" + "resolved" "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.5.tgz" + "version" "5.0.5" -"@ethersproject/networks@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.4.0.tgz#71eecd3ef3755118b42c1a5d2a44a7e07202e10a" - integrity sha512-5fywtKRDcnaVeA5SjxXH3DOQqe/IbeD/plwydi94SdPps1fbDUrnO6SzDExaruBZXxpxJcO9upG9UComsei4bg== - dependencies: - "@ethersproject/logger" "^5.4.0" - -"@ethersproject/properties@^5.0.3": - version "5.0.3" - resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.0.3.tgz#991aef39a5f87d4645cee76cec4df868bfb08be6" - integrity sha512-wLCSrbywkQgTO6tIF9ZdKsH9AIxPEqAJF/z5xcPkz1DK4mMAZgAXRNw1MrKYhyb+7CqNHbj3vxenNKFavGY/IA== +"@ethersproject/properties@^5.0.3", "@ethersproject/properties@>=5.0.0-beta.131": + "integrity" "sha512-wLCSrbywkQgTO6tIF9ZdKsH9AIxPEqAJF/z5xcPkz1DK4mMAZgAXRNw1MrKYhyb+7CqNHbj3vxenNKFavGY/IA==" + "resolved" "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.3.tgz" + "version" "5.0.3" dependencies: "@ethersproject/logger" "^5.0.5" -"@ethersproject/properties@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.4.0.tgz#38ba20539b44dcc5d5f80c45ad902017dcdbefe7" - integrity sha512-7jczalGVRAJ+XSRvNA6D5sAwT4gavLq3OXPuV/74o3Rd2wuzSL035IMpIMgei4CYyBdialJMrTqkOnzccLHn4A== - dependencies: - "@ethersproject/logger" "^5.4.0" - "@ethersproject/rlp@^5.0.3": - version "5.0.3" - resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.0.3.tgz#841a5edfdf725f92155fe74424f5510c9043c13a" - integrity sha512-Hz4yyA/ilGafASAqtTlLWkA/YqwhQmhbDAq2LSIp1AJNx+wtbKWFAKSckpeZ+WG/xZmT+fw5OFKK7a5IZ4DR5g== + "integrity" "sha512-Hz4yyA/ilGafASAqtTlLWkA/YqwhQmhbDAq2LSIp1AJNx+wtbKWFAKSckpeZ+WG/xZmT+fw5OFKK7a5IZ4DR5g==" + "resolved" "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.3.tgz" + "version" "5.0.3" dependencies: "@ethersproject/bytes" "^5.0.4" "@ethersproject/logger" "^5.0.5" -"@ethersproject/rlp@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.4.0.tgz#de61afda5ff979454e76d3b3310a6c32ad060931" - integrity sha512-0I7MZKfi+T5+G8atId9QaQKHRvvasM/kqLyAH4XxBCBchAooH2EX5rL9kYZWwcm3awYV+XC7VF6nLhfeQFKVPg== - dependencies: - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - "@ethersproject/signing-key@^5.0.4": - version "5.0.4" - resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.0.4.tgz#a5334ce8a52d4e9736dc8fb6ecc384704ecf8783" - integrity sha512-I6pJoga1IvhtjYK5yXzCjs4ZpxrVbt9ZRAlpEw0SW9UuV020YfJH5EIVEGR2evdRceS3nAQIggqbsXSkP8Y1Dg== + "integrity" "sha512-I6pJoga1IvhtjYK5yXzCjs4ZpxrVbt9ZRAlpEw0SW9UuV020YfJH5EIVEGR2evdRceS3nAQIggqbsXSkP8Y1Dg==" + "resolved" "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.4.tgz" + "version" "5.0.4" dependencies: "@ethersproject/bytes" "^5.0.4" "@ethersproject/logger" "^5.0.5" "@ethersproject/properties" "^5.0.3" - elliptic "6.5.3" - -"@ethersproject/signing-key@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.4.0.tgz#2f05120984e81cf89a3d5f6dec5c68ee0894fbec" - integrity sha512-q8POUeywx6AKg2/jX9qBYZIAmKSB4ubGXdQ88l40hmATj29JnG5pp331nAWwwxPn2Qao4JpWHNZsQN+bPiSW9A== - dependencies: - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - "@ethersproject/properties" "^5.4.0" - bn.js "^4.11.9" - elliptic "6.5.4" - hash.js "1.1.7" + "elliptic" "6.5.3" -"@ethersproject/strings@^5.0.4", "@ethersproject/strings@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.4.0.tgz#fb12270132dd84b02906a8d895ae7e7fa3d07d9a" - integrity sha512-k/9DkH5UGDhv7aReXLluFG5ExurwtIpUfnDNhQA29w896Dw3i4uDTz01Quaptbks1Uj9kI8wo9tmW73wcIEaWA== +"@ethersproject/strings@^5.0.4", "@ethersproject/strings@>=5.0.0-beta.130": + "version" "5.0.4" dependencies: - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/constants" "^5.4.0" - "@ethersproject/logger" "^5.4.0" + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/constants" "^5.0.4" + "@ethersproject/logger" "^5.0.5" "@ethersproject/transactions@^5.0.0-beta.135": - version "5.0.4" - resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.0.4.tgz#76d7afdb0667efde22b054de3a8dc5b440eb6cd2" - integrity sha512-QvS5CzxmL46D9Y3OlddurYgEIi5mb0eAgrKm5pM074Uz/1qxCYr+Ah12I4hpaciZtCq4Fe12YWZqUFb1vGcH6Q== + "version" "5.0.5" dependencies: - "@ethersproject/address" "^5.0.3" - "@ethersproject/bignumber" "^5.0.6" + "@ethersproject/address" "^5.0.4" + "@ethersproject/bignumber" "^5.0.7" "@ethersproject/bytes" "^5.0.4" - "@ethersproject/constants" "^5.0.3" + "@ethersproject/constants" "^5.0.4" "@ethersproject/keccak256" "^5.0.3" "@ethersproject/logger" "^5.0.5" "@ethersproject/properties" "^5.0.3" "@ethersproject/rlp" "^5.0.3" "@ethersproject/signing-key" "^5.0.4" -"@ethersproject/transactions@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.4.0.tgz#a159d035179334bd92f340ce0f77e83e9e1522e0" - integrity sha512-s3EjZZt7xa4BkLknJZ98QGoIza94rVjaEed0rzZ/jB9WrIuu/1+tjvYCWzVrystXtDswy7TPBeIepyXwSYa4WQ== - dependencies: - "@ethersproject/address" "^5.4.0" - "@ethersproject/bignumber" "^5.4.0" - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/constants" "^5.4.0" - "@ethersproject/keccak256" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - "@ethersproject/properties" "^5.4.0" - "@ethersproject/rlp" "^5.4.0" - "@ethersproject/signing-key" "^5.4.0" - -"@ethersproject/web@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.4.0.tgz#49fac173b96992334ed36a175538ba07a7413d1f" - integrity sha512-1bUusGmcoRLYgMn6c1BLk1tOKUIFuTg8j+6N8lYlbMpDesnle+i3pGSagGNvwjaiLo4Y5gBibwctpPRmjrh4Og== - dependencies: - "@ethersproject/base64" "^5.4.0" - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - "@ethersproject/properties" "^5.4.0" - "@ethersproject/strings" "^5.4.0" - "@hapi/accept@^3.2.4": - version "3.2.4" - resolved "https://registry.yarnpkg.com/@hapi/accept/-/accept-3.2.4.tgz#687510529493fe1d7d47954c31aff360d9364bd1" - integrity sha512-soThGB+QMgfxlh0Vzhzlf3ZOEOPk5biEwcOXhkF0Eedqx8VnhGiggL9UYHrIsOb1rUg3Be3K8kp0iDL2wbVSOQ== + "integrity" "sha512-soThGB+QMgfxlh0Vzhzlf3ZOEOPk5biEwcOXhkF0Eedqx8VnhGiggL9UYHrIsOb1rUg3Be3K8kp0iDL2wbVSOQ==" + "resolved" "https://registry.npmjs.org/@hapi/accept/-/accept-3.2.4.tgz" + "version" "3.2.4" dependencies: "@hapi/boom" "7.x.x" "@hapi/hoek" "8.x.x" -"@hapi/address@2.x.x", "@hapi/address@^2.1.2": - version "2.1.4" - resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5" - integrity sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ== +"@hapi/address@^2.1.2", "@hapi/address@2.x.x": + "integrity" "sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ==" + "resolved" "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz" + "version" "2.1.4" "@hapi/ammo@^3.1.2": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@hapi/ammo/-/ammo-3.1.2.tgz#a9edf5d48d99b75fdcd7ab3dabf9059942a06961" - integrity sha512-ej9OtFmiZv1qr45g1bxEZNGyaR4jRpyMxU6VhbxjaYThymvOwsyIsUKMZnP5Qw2tfYFuwqCJuIBHGpeIbdX9gQ== + "integrity" "sha512-ej9OtFmiZv1qr45g1bxEZNGyaR4jRpyMxU6VhbxjaYThymvOwsyIsUKMZnP5Qw2tfYFuwqCJuIBHGpeIbdX9gQ==" + "resolved" "https://registry.npmjs.org/@hapi/ammo/-/ammo-3.1.2.tgz" + "version" "3.1.2" dependencies: "@hapi/hoek" "8.x.x" "@hapi/b64@4.x.x": - version "4.2.1" - resolved "https://registry.yarnpkg.com/@hapi/b64/-/b64-4.2.1.tgz#bf8418d7907c5e73463f2e3b5c6fca7e9f2a1357" - integrity sha512-zqHpQuH5CBMw6hADzKfU/IGNrxq1Q+/wTYV+OiZRQN9F3tMyk+9BUMeBvFRMamduuqL8iSp62QAnJ+7ATiYLWA== + "integrity" "sha512-zqHpQuH5CBMw6hADzKfU/IGNrxq1Q+/wTYV+OiZRQN9F3tMyk+9BUMeBvFRMamduuqL8iSp62QAnJ+7ATiYLWA==" + "resolved" "https://registry.npmjs.org/@hapi/b64/-/b64-4.2.1.tgz" + "version" "4.2.1" dependencies: "@hapi/hoek" "8.x.x" -"@hapi/boom@7.x.x", "@hapi/boom@^7.4.11": - version "7.4.11" - resolved "https://registry.yarnpkg.com/@hapi/boom/-/boom-7.4.11.tgz#37af8417eb9416aef3367aa60fa04a1a9f1fc262" - integrity sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A== +"@hapi/boom@^7.4.11", "@hapi/boom@7.x.x": + "integrity" "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==" + "resolved" "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz" + "version" "7.4.11" dependencies: "@hapi/hoek" "8.x.x" "@hapi/bounce@1.x.x": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@hapi/bounce/-/bounce-1.3.2.tgz#3b096bb02f67de6115e6e4f0debc390be5a86bad" - integrity sha512-3bnb1AlcEByFZnpDIidxQyw1Gds81z/1rSqlx4bIEE+wUN0ATj0D49B5cE1wGocy90Rp/de4tv7GjsKd5RQeew== + "integrity" "sha512-3bnb1AlcEByFZnpDIidxQyw1Gds81z/1rSqlx4bIEE+wUN0ATj0D49B5cE1wGocy90Rp/de4tv7GjsKd5RQeew==" + "resolved" "https://registry.npmjs.org/@hapi/bounce/-/bounce-1.3.2.tgz" + "version" "1.3.2" dependencies: "@hapi/boom" "7.x.x" "@hapi/hoek" "^8.3.1" "@hapi/bourne@1.x.x": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@hapi/bourne/-/bourne-1.3.2.tgz#0a7095adea067243ce3283e1b56b8a8f453b242a" - integrity sha512-1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA== + "integrity" "sha512-1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA==" + "resolved" "https://registry.npmjs.org/@hapi/bourne/-/bourne-1.3.2.tgz" + "version" "1.3.2" "@hapi/call@^5.1.3": - version "5.1.3" - resolved "https://registry.yarnpkg.com/@hapi/call/-/call-5.1.3.tgz#217af45e3bc3d38b03aa5c9edfe1be939eee3741" - integrity sha512-5DfWpMk7qZiYhvBhM5oUiT4GQ/O8a2rFR121/PdwA/eZ2C1EsuD547ZggMKAR5bZ+FtxOf0fdM20zzcXzq2mZA== + "integrity" "sha512-5DfWpMk7qZiYhvBhM5oUiT4GQ/O8a2rFR121/PdwA/eZ2C1EsuD547ZggMKAR5bZ+FtxOf0fdM20zzcXzq2mZA==" + "resolved" "https://registry.npmjs.org/@hapi/call/-/call-5.1.3.tgz" + "version" "5.1.3" dependencies: "@hapi/boom" "7.x.x" "@hapi/hoek" "8.x.x" "@hapi/catbox-memory@4.x.x": - version "4.1.1" - resolved "https://registry.yarnpkg.com/@hapi/catbox-memory/-/catbox-memory-4.1.1.tgz#263a6f3361f7a200552c5772c98a8e80a1da712f" - integrity sha512-T6Hdy8DExzG0jY7C8yYWZB4XHfc0v+p1EGkwxl2HoaPYAmW7I3E59M/IvmSVpis8RPcIoBp41ZpO2aZPBpM2Ww== + "integrity" "sha512-T6Hdy8DExzG0jY7C8yYWZB4XHfc0v+p1EGkwxl2HoaPYAmW7I3E59M/IvmSVpis8RPcIoBp41ZpO2aZPBpM2Ww==" + "resolved" "https://registry.npmjs.org/@hapi/catbox-memory/-/catbox-memory-4.1.1.tgz" + "version" "4.1.1" dependencies: "@hapi/boom" "7.x.x" "@hapi/hoek" "8.x.x" "@hapi/catbox@10.x.x": - version "10.2.3" - resolved "https://registry.yarnpkg.com/@hapi/catbox/-/catbox-10.2.3.tgz#2df51ab943d7613df3718fa2bfd981dd9558cec5" - integrity sha512-kN9hXO4NYyOHW09CXiuj5qW1syc/0XeVOBsNNk0Tz89wWNQE5h21WF+VsfAw3uFR8swn/Wj3YEVBnWqo82m/JQ== + "integrity" "sha512-kN9hXO4NYyOHW09CXiuj5qW1syc/0XeVOBsNNk0Tz89wWNQE5h21WF+VsfAw3uFR8swn/Wj3YEVBnWqo82m/JQ==" + "resolved" "https://registry.npmjs.org/@hapi/catbox/-/catbox-10.2.3.tgz" + "version" "10.2.3" dependencies: "@hapi/boom" "7.x.x" "@hapi/hoek" "8.x.x" @@ -340,33 +184,33 @@ "@hapi/podium" "3.x.x" "@hapi/content@^4.1.1": - version "4.1.1" - resolved "https://registry.yarnpkg.com/@hapi/content/-/content-4.1.1.tgz#179673d1e2b7eb36c564d8f9605d019bd2252cbf" - integrity sha512-3TWvmwpVPxFSF3KBjKZ8yDqIKKZZIm7VurDSweYpXYENZrJH3C1hd1+qEQW9wQaUaI76pPBLGrXl6I3B7i3ipA== + "integrity" "sha512-3TWvmwpVPxFSF3KBjKZ8yDqIKKZZIm7VurDSweYpXYENZrJH3C1hd1+qEQW9wQaUaI76pPBLGrXl6I3B7i3ipA==" + "resolved" "https://registry.npmjs.org/@hapi/content/-/content-4.1.1.tgz" + "version" "4.1.1" dependencies: "@hapi/boom" "7.x.x" "@hapi/cryptiles@4.x.x": - version "4.2.1" - resolved "https://registry.yarnpkg.com/@hapi/cryptiles/-/cryptiles-4.2.1.tgz#ff0f18d79074659838caedbb911851313ad1ffbc" - integrity sha512-XoqgKsHK0l/VpqPs+tr6j6vE+VQ3+2bkF2stvttmc7xAOf1oSAwHcJ0tlp/6MxMysktt1IEY0Csy3khKaP9/uQ== + "integrity" "sha512-XoqgKsHK0l/VpqPs+tr6j6vE+VQ3+2bkF2stvttmc7xAOf1oSAwHcJ0tlp/6MxMysktt1IEY0Csy3khKaP9/uQ==" + "resolved" "https://registry.npmjs.org/@hapi/cryptiles/-/cryptiles-4.2.1.tgz" + "version" "4.2.1" dependencies: "@hapi/boom" "7.x.x" "@hapi/file@1.x.x": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@hapi/file/-/file-1.0.0.tgz#c91c39fd04db8bed5af82d2e032e7a4e65555b38" - integrity sha512-Bsfp/+1Gyf70eGtnIgmScvrH8sSypO3TcK3Zf0QdHnzn/ACnAkI6KLtGACmNRPEzzIy+W7aJX5E+1fc9GwIABQ== + "integrity" "sha512-Bsfp/+1Gyf70eGtnIgmScvrH8sSypO3TcK3Zf0QdHnzn/ACnAkI6KLtGACmNRPEzzIy+W7aJX5E+1fc9GwIABQ==" + "resolved" "https://registry.npmjs.org/@hapi/file/-/file-1.0.0.tgz" + "version" "1.0.0" "@hapi/formula@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@hapi/formula/-/formula-1.2.0.tgz#994649c7fea1a90b91a0a1e6d983523f680e10cd" - integrity sha512-UFbtbGPjstz0eWHb+ga/GM3Z9EzqKXFWIbSOFURU0A/Gku0Bky4bCk9/h//K2Xr3IrCfjFNhMm4jyZ5dbCewGA== + "integrity" "sha512-UFbtbGPjstz0eWHb+ga/GM3Z9EzqKXFWIbSOFURU0A/Gku0Bky4bCk9/h//K2Xr3IrCfjFNhMm4jyZ5dbCewGA==" + "resolved" "https://registry.npmjs.org/@hapi/formula/-/formula-1.2.0.tgz" + "version" "1.2.0" "@hapi/h2o2@^8.3.2": - version "8.3.2" - resolved "https://registry.yarnpkg.com/@hapi/h2o2/-/h2o2-8.3.2.tgz#008a8f9ec3d9bba29077691aa9ec0ace93d4de80" - integrity sha512-2WkZq+QAkvYHWGqnUuG0stcVeGyv9T7bopBYnCJSUEuvBZlUf2BTX2JCVSKxsnTLOxCYwoC/aI4Rr0ZSRd2oVg== + "integrity" "sha512-2WkZq+QAkvYHWGqnUuG0stcVeGyv9T7bopBYnCJSUEuvBZlUf2BTX2JCVSKxsnTLOxCYwoC/aI4Rr0ZSRd2oVg==" + "resolved" "https://registry.npmjs.org/@hapi/h2o2/-/h2o2-8.3.2.tgz" + "version" "8.3.2" dependencies: "@hapi/boom" "7.x.x" "@hapi/hoek" "8.x.x" @@ -374,9 +218,9 @@ "@hapi/wreck" "15.x.x" "@hapi/hapi@^18.4.1": - version "18.4.1" - resolved "https://registry.yarnpkg.com/@hapi/hapi/-/hapi-18.4.1.tgz#023fbc131074b1cb2cd7f6766d65f4b0e92df788" - integrity sha512-9HjVGa0Z4Qv9jk9AVoUdJMQLA+KuZ+liKWyEEkVBx3e3H1F0JM6aGbPkY9jRfwsITBWGBU2iXazn65SFKSi/tg== + "integrity" "sha512-9HjVGa0Z4Qv9jk9AVoUdJMQLA+KuZ+liKWyEEkVBx3e3H1F0JM6aGbPkY9jRfwsITBWGBU2iXazn65SFKSi/tg==" + "resolved" "https://registry.npmjs.org/@hapi/hapi/-/hapi-18.4.1.tgz" + "version" "18.4.1" dependencies: "@hapi/accept" "^3.2.4" "@hapi/ammo" "^3.1.2" @@ -398,23 +242,23 @@ "@hapi/topo" "3.x.x" "@hapi/heavy@6.x.x": - version "6.2.2" - resolved "https://registry.yarnpkg.com/@hapi/heavy/-/heavy-6.2.2.tgz#d42a282c62d5bb6332e497d8ce9ba52f1609f3e6" - integrity sha512-PY1dCCO6dsze7RlafIRhTaGeyTgVe49A/lSkxbhKGjQ7x46o/OFf7hLiRqTCDh3atcEKf6362EaB3+kTUbCsVA== + "integrity" "sha512-PY1dCCO6dsze7RlafIRhTaGeyTgVe49A/lSkxbhKGjQ7x46o/OFf7hLiRqTCDh3atcEKf6362EaB3+kTUbCsVA==" + "resolved" "https://registry.npmjs.org/@hapi/heavy/-/heavy-6.2.2.tgz" + "version" "6.2.2" dependencies: "@hapi/boom" "7.x.x" "@hapi/hoek" "8.x.x" "@hapi/joi" "16.x.x" -"@hapi/hoek@8.x.x", "@hapi/hoek@^8.2.4", "@hapi/hoek@^8.3.0", "@hapi/hoek@^8.3.1": - version "8.5.1" - resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-8.5.1.tgz#fde96064ca446dec8c55a8c2f130957b070c6e06" - integrity sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow== +"@hapi/hoek@^8.2.4", "@hapi/hoek@^8.3.0", "@hapi/hoek@^8.3.1", "@hapi/hoek@8.x.x": + "integrity" "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" + "resolved" "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz" + "version" "8.5.1" "@hapi/iron@5.x.x": - version "5.1.4" - resolved "https://registry.yarnpkg.com/@hapi/iron/-/iron-5.1.4.tgz#7406f36847f798f52b92d1d97f855e27973832b7" - integrity sha512-+ElC+OCiwWLjlJBmm8ZEWjlfzTMQTdgPnU/TsoU5QsktspIWmWi9IU4kU83nH+X/SSya8TP8h8P11Wr5L7dkQQ== + "integrity" "sha512-+ElC+OCiwWLjlJBmm8ZEWjlfzTMQTdgPnU/TsoU5QsktspIWmWi9IU4kU83nH+X/SSya8TP8h8P11Wr5L7dkQQ==" + "resolved" "https://registry.npmjs.org/@hapi/iron/-/iron-5.1.4.tgz" + "version" "5.1.4" dependencies: "@hapi/b64" "4.x.x" "@hapi/boom" "7.x.x" @@ -423,9 +267,9 @@ "@hapi/hoek" "8.x.x" "@hapi/joi@15.x.x": - version "15.1.1" - resolved "https://registry.yarnpkg.com/@hapi/joi/-/joi-15.1.1.tgz#c675b8a71296f02833f8d6d243b34c57b8ce19d7" - integrity sha512-entf8ZMOK8sc+8YfeOlM8pCfg3b5+WZIKBfUaaJT8UsjAAPjartzxIYm3TIbjvA4u+u++KbcXD38k682nVHDAQ== + "integrity" "sha512-entf8ZMOK8sc+8YfeOlM8pCfg3b5+WZIKBfUaaJT8UsjAAPjartzxIYm3TIbjvA4u+u++KbcXD38k682nVHDAQ==" + "resolved" "https://registry.npmjs.org/@hapi/joi/-/joi-15.1.1.tgz" + "version" "15.1.1" dependencies: "@hapi/address" "2.x.x" "@hapi/bourne" "1.x.x" @@ -433,9 +277,9 @@ "@hapi/topo" "3.x.x" "@hapi/joi@16.x.x": - version "16.1.8" - resolved "https://registry.yarnpkg.com/@hapi/joi/-/joi-16.1.8.tgz#84c1f126269489871ad4e2decc786e0adef06839" - integrity sha512-wAsVvTPe+FwSrsAurNt5vkg3zo+TblvC5Bb1zMVK6SJzZqw9UrJnexxR+76cpePmtUZKHAPxcQ2Bf7oVHyahhg== + "integrity" "sha512-wAsVvTPe+FwSrsAurNt5vkg3zo+TblvC5Bb1zMVK6SJzZqw9UrJnexxR+76cpePmtUZKHAPxcQ2Bf7oVHyahhg==" + "resolved" "https://registry.npmjs.org/@hapi/joi/-/joi-16.1.8.tgz" + "version" "16.1.8" dependencies: "@hapi/address" "^2.1.2" "@hapi/formula" "^1.2.0" @@ -444,25 +288,25 @@ "@hapi/topo" "^3.1.3" "@hapi/mimos@4.x.x": - version "4.1.1" - resolved "https://registry.yarnpkg.com/@hapi/mimos/-/mimos-4.1.1.tgz#4dab8ed5c64df0603c204c725963a5faa4687e8a" - integrity sha512-CXoi/zfcTWfKYX756eEea8rXJRIb9sR4d7VwyAH9d3BkDyNgAesZxvqIdm55npQc6S9mU3FExinMAQVlIkz0eA== + "integrity" "sha512-CXoi/zfcTWfKYX756eEea8rXJRIb9sR4d7VwyAH9d3BkDyNgAesZxvqIdm55npQc6S9mU3FExinMAQVlIkz0eA==" + "resolved" "https://registry.npmjs.org/@hapi/mimos/-/mimos-4.1.1.tgz" + "version" "4.1.1" dependencies: "@hapi/hoek" "8.x.x" - mime-db "1.x.x" + "mime-db" "1.x.x" "@hapi/nigel@3.x.x": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@hapi/nigel/-/nigel-3.1.1.tgz#84794021c9ee6e48e854fea9fb76e9f7e78c99ad" - integrity sha512-R9YWx4S8yu0gcCBrMUDCiEFm1SQT895dMlYoeNBp8I6YhF1BFF1iYPueKA2Kkp9BvyHdjmvrxCOns7GMmpl+Fw== + "integrity" "sha512-R9YWx4S8yu0gcCBrMUDCiEFm1SQT895dMlYoeNBp8I6YhF1BFF1iYPueKA2Kkp9BvyHdjmvrxCOns7GMmpl+Fw==" + "resolved" "https://registry.npmjs.org/@hapi/nigel/-/nigel-3.1.1.tgz" + "version" "3.1.1" dependencies: "@hapi/hoek" "8.x.x" "@hapi/vise" "3.x.x" "@hapi/pez@^4.1.2": - version "4.1.2" - resolved "https://registry.yarnpkg.com/@hapi/pez/-/pez-4.1.2.tgz#14984d0c31fed348f10c962968a21d9761f55503" - integrity sha512-8zSdJ8cZrJLFldTgwjU9Fb1JebID+aBCrCsycgqKYe0OZtM2r3Yv3aAwW5z97VsZWCROC1Vx6Mdn4rujh5Ktcg== + "integrity" "sha512-8zSdJ8cZrJLFldTgwjU9Fb1JebID+aBCrCsycgqKYe0OZtM2r3Yv3aAwW5z97VsZWCROC1Vx6Mdn4rujh5Ktcg==" + "resolved" "https://registry.npmjs.org/@hapi/pez/-/pez-4.1.2.tgz" + "version" "4.1.2" dependencies: "@hapi/b64" "4.x.x" "@hapi/boom" "7.x.x" @@ -471,38 +315,38 @@ "@hapi/nigel" "3.x.x" "@hapi/pinpoint@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@hapi/pinpoint/-/pinpoint-1.0.2.tgz#025b7a36dbbf4d35bf1acd071c26b20ef41e0d13" - integrity sha512-dtXC/WkZBfC5vxscazuiJ6iq4j9oNx1SHknmIr8hofarpKUZKmlUVYVIhNVzIEgK5Wrc4GMHL5lZtt1uS2flmQ== + "integrity" "sha512-dtXC/WkZBfC5vxscazuiJ6iq4j9oNx1SHknmIr8hofarpKUZKmlUVYVIhNVzIEgK5Wrc4GMHL5lZtt1uS2flmQ==" + "resolved" "https://registry.npmjs.org/@hapi/pinpoint/-/pinpoint-1.0.2.tgz" + "version" "1.0.2" "@hapi/podium@3.x.x": - version "3.4.3" - resolved "https://registry.yarnpkg.com/@hapi/podium/-/podium-3.4.3.tgz#d28935870ae1372e2f983a7161e710c968a60de1" - integrity sha512-QJlnYLEYZWlKQ9fSOtuUcpANyoVGwT68GA9P0iQQCAetBK0fI+nbRBt58+aMixoifczWZUthuGkNjqKxgPh/CQ== + "integrity" "sha512-QJlnYLEYZWlKQ9fSOtuUcpANyoVGwT68GA9P0iQQCAetBK0fI+nbRBt58+aMixoifczWZUthuGkNjqKxgPh/CQ==" + "resolved" "https://registry.npmjs.org/@hapi/podium/-/podium-3.4.3.tgz" + "version" "3.4.3" dependencies: "@hapi/hoek" "8.x.x" "@hapi/joi" "16.x.x" "@hapi/shot@4.x.x": - version "4.1.2" - resolved "https://registry.yarnpkg.com/@hapi/shot/-/shot-4.1.2.tgz#69f999956041fe468701a89a413175a521dabed5" - integrity sha512-6LeHLjvsq/bQ0R+fhEyr7mqExRGguNTrxFZf5DyKe3CK6pNabiGgYO4JVFaRrLZ3JyuhkS0fo8iiRE2Ql2oA/A== + "integrity" "sha512-6LeHLjvsq/bQ0R+fhEyr7mqExRGguNTrxFZf5DyKe3CK6pNabiGgYO4JVFaRrLZ3JyuhkS0fo8iiRE2Ql2oA/A==" + "resolved" "https://registry.npmjs.org/@hapi/shot/-/shot-4.1.2.tgz" + "version" "4.1.2" dependencies: "@hapi/hoek" "8.x.x" "@hapi/joi" "16.x.x" "@hapi/somever@2.x.x": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@hapi/somever/-/somever-2.1.1.tgz#142bddf7cc4d829f678ed4e60618630a9a7ae845" - integrity sha512-cic5Sto4KGd9B0oQSdKTokju+rYhCbdpzbMb0EBnrH5Oc1z048hY8PaZ1lx2vBD7I/XIfTQVQetBH57fU51XRA== + "integrity" "sha512-cic5Sto4KGd9B0oQSdKTokju+rYhCbdpzbMb0EBnrH5Oc1z048hY8PaZ1lx2vBD7I/XIfTQVQetBH57fU51XRA==" + "resolved" "https://registry.npmjs.org/@hapi/somever/-/somever-2.1.1.tgz" + "version" "2.1.1" dependencies: "@hapi/bounce" "1.x.x" "@hapi/hoek" "8.x.x" "@hapi/statehood@6.x.x": - version "6.1.2" - resolved "https://registry.yarnpkg.com/@hapi/statehood/-/statehood-6.1.2.tgz#6dda508b5da99a28a3ed295c3cac795cf6c12a02" - integrity sha512-pYXw1x6npz/UfmtcpUhuMvdK5kuOGTKcJNfLqdNptzietK2UZH5RzNJSlv5bDHeSmordFM3kGItcuQWX2lj2nQ== + "integrity" "sha512-pYXw1x6npz/UfmtcpUhuMvdK5kuOGTKcJNfLqdNptzietK2UZH5RzNJSlv5bDHeSmordFM3kGItcuQWX2lj2nQ==" + "resolved" "https://registry.npmjs.org/@hapi/statehood/-/statehood-6.1.2.tgz" + "version" "6.1.2" dependencies: "@hapi/boom" "7.x.x" "@hapi/bounce" "1.x.x" @@ -513,9 +357,9 @@ "@hapi/joi" "16.x.x" "@hapi/subtext@^6.1.3": - version "6.1.3" - resolved "https://registry.yarnpkg.com/@hapi/subtext/-/subtext-6.1.3.tgz#bbd07771ae2a4e73ac360c93ed74ac641718b9c6" - integrity sha512-qWN6NbiHNzohVcJMeAlpku/vzbyH4zIpnnMPMPioQMwIxbPFKeNViDCNI6fVBbMPBiw/xB4FjqiJkRG5P9eWWg== + "integrity" "sha512-qWN6NbiHNzohVcJMeAlpku/vzbyH4zIpnnMPMPioQMwIxbPFKeNViDCNI6fVBbMPBiw/xB4FjqiJkRG5P9eWWg==" + "resolved" "https://registry.npmjs.org/@hapi/subtext/-/subtext-6.1.3.tgz" + "version" "6.1.3" dependencies: "@hapi/boom" "7.x.x" "@hapi/bourne" "1.x.x" @@ -526,3825 +370,3546 @@ "@hapi/wreck" "15.x.x" "@hapi/teamwork@3.x.x": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@hapi/teamwork/-/teamwork-3.3.1.tgz#b52d0ec48682dc793926bd432e22ceb19c915d3f" - integrity sha512-61tiqWCYvMKP7fCTXy0M4VE6uNIwA0qvgFoiDubgfj7uqJ0fdHJFQNnVPGrxhLWlwz0uBPWrQlBH7r8y9vFITQ== + "integrity" "sha512-61tiqWCYvMKP7fCTXy0M4VE6uNIwA0qvgFoiDubgfj7uqJ0fdHJFQNnVPGrxhLWlwz0uBPWrQlBH7r8y9vFITQ==" + "resolved" "https://registry.npmjs.org/@hapi/teamwork/-/teamwork-3.3.1.tgz" + "version" "3.3.1" -"@hapi/topo@3.x.x", "@hapi/topo@^3.1.3": - version "3.1.6" - resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-3.1.6.tgz#68d935fa3eae7fdd5ab0d7f953f3205d8b2bfc29" - integrity sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ== +"@hapi/topo@^3.1.3", "@hapi/topo@3.x.x": + "integrity" "sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ==" + "resolved" "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.6.tgz" + "version" "3.1.6" dependencies: "@hapi/hoek" "^8.3.0" "@hapi/vise@3.x.x": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@hapi/vise/-/vise-3.1.1.tgz#dfc88f2ac90682f48bdc1b3f9b8f1eab4eabe0c8" - integrity sha512-OXarbiCSadvtg+bSdVPqu31Z1JoBL+FwNYz3cYoBKQ5xq1/Cr4A3IkGpAZbAuxU5y4NL5pZFZG3d2a3ZGm/dOQ== + "integrity" "sha512-OXarbiCSadvtg+bSdVPqu31Z1JoBL+FwNYz3cYoBKQ5xq1/Cr4A3IkGpAZbAuxU5y4NL5pZFZG3d2a3ZGm/dOQ==" + "resolved" "https://registry.npmjs.org/@hapi/vise/-/vise-3.1.1.tgz" + "version" "3.1.1" dependencies: "@hapi/hoek" "8.x.x" "@hapi/wreck@15.x.x": - version "15.1.0" - resolved "https://registry.yarnpkg.com/@hapi/wreck/-/wreck-15.1.0.tgz#7917cd25950ce9b023f7fd2bea6e2ef72c71e59d" - integrity sha512-tQczYRTTeYBmvhsek/D49En/5khcShaBEmzrAaDjMrFXKJRuF8xA8+tlq1ETLBFwGd6Do6g2OC74rt11kzawzg== + "integrity" "sha512-tQczYRTTeYBmvhsek/D49En/5khcShaBEmzrAaDjMrFXKJRuF8xA8+tlq1ETLBFwGd6Do6g2OC74rt11kzawzg==" + "resolved" "https://registry.npmjs.org/@hapi/wreck/-/wreck-15.1.0.tgz" + "version" "15.1.0" dependencies: "@hapi/boom" "7.x.x" "@hapi/bourne" "1.x.x" "@hapi/hoek" "8.x.x" "@sindresorhus/is@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" - integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== + "integrity" "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==" + "resolved" "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz" + "version" "0.14.0" "@szmarczak/http-timer@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" - integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== + "integrity" "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==" + "resolved" "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz" + "version" "1.1.2" dependencies: - defer-to-connect "^1.0.1" + "defer-to-connect" "^1.0.1" "@types/bn.js@^4.11.3", "@types/bn.js@^4.11.5": - version "4.11.6" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" - integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== + "integrity" "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==" + "resolved" "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz" + "version" "4.11.6" dependencies: "@types/node" "*" "@types/color-name@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" - integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== - -"@types/node@*": - version "14.6.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.6.4.tgz#a145cc0bb14ef9c4777361b7bbafa5cf8e3acb5a" - integrity sha512-Wk7nG1JSaMfMpoMJDKUsWYugliB2Vy55pdjLpmLixeyMi7HizW2I/9QoxsPCkXl3dO+ZOVqPumKaDUv5zJu2uQ== + "integrity" "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" + "resolved" "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz" + "version" "1.1.1" -"@types/node@^12.12.6": - version "12.12.56" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.56.tgz#83591a89723d8ec3eaf722137e1784a7351edb6c" - integrity sha512-8OdIupOIZtmObR13fvGyTvpcuzKmMugkATeVcfNwCjGtHxhjEKmOvLqXwR8U9VOtNnZ4EXaSfNiLVsPinaCXkQ== +"@types/node@*", "@types/node@^12.12.6": + "version" "12.12.62" "@types/pbkdf2@^3.0.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.1.0.tgz#039a0e9b67da0cdc4ee5dab865caa6b267bb66b1" - integrity sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ== + "integrity" "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==" + "resolved" "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz" + "version" "3.1.0" dependencies: "@types/node" "*" "@types/retry@^0.12.0": - version "0.12.0" - resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d" - integrity sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA== + "integrity" "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==" + "resolved" "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz" + "version" "0.12.0" "@types/secp256k1@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.1.tgz#fb3aa61a1848ad97d7425ff9dcba784549fca5a4" - integrity sha512-+ZjSA8ELlOp8SlKi0YLB2tz9d5iPNEmOBd+8Rz21wTMdaXQIa9b6TEnD6l5qKOCypE7FSyPyck12qZJxSDNoog== + "integrity" "sha512-+ZjSA8ELlOp8SlKi0YLB2tz9d5iPNEmOBd+8Rz21wTMdaXQIa9b6TEnD6l5qKOCypE7FSyPyck12qZJxSDNoog==" + "resolved" "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.1.tgz" + "version" "4.0.1" dependencies: "@types/node" "*" -accepts@~1.3.7: - version "1.3.7" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" - integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== +"accepts@~1.3.7": + "integrity" "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==" + "resolved" "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz" + "version" "1.3.7" dependencies: - mime-types "~2.1.24" - negotiator "0.6.2" + "mime-types" "~2.1.24" + "negotiator" "0.6.2" -ajv@^6.12.3: - version "6.12.4" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.4.tgz#0614facc4522127fa713445c6bfd3ebd376e2234" - integrity sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ== +"ajv@^6.12.3": + "version" "6.12.5" dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" + "fast-deep-equal" "^3.1.1" + "fast-json-stable-stringify" "^2.0.0" + "json-schema-traverse" "^0.4.1" + "uri-js" "^4.2.2" -ansi-align@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.0.tgz#b536b371cf687caaef236c18d3e21fe3797467cb" - integrity sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw== +"ansi-align@^3.0.0": + "integrity" "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==" + "resolved" "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz" + "version" "3.0.0" dependencies: - string-width "^3.0.0" + "string-width" "^3.0.0" -ansi-regex@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" - integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== +"ansi-regex@^4.1.0": + "integrity" "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + "resolved" "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz" + "version" "4.1.0" -ansi-regex@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" - integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== +"ansi-regex@^5.0.0": + "integrity" "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + "resolved" "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz" + "version" "5.0.0" -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== +"ansi-styles@^3.2.1": + "integrity" "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==" + "resolved" "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz" + "version" "3.2.1" dependencies: - color-convert "^1.9.0" + "color-convert" "^1.9.0" -ansi-styles@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" - integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== +"ansi-styles@^4.1.0": + "integrity" "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==" + "resolved" "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz" + "version" "4.2.1" dependencies: "@types/color-name" "^1.1.1" - color-convert "^2.0.1" - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= - -asn1.js@^5.2.0: - version "5.4.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" - integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== - dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - safer-buffer "^2.1.0" - -asn1@~0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" - integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= - -async-limiter@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" - integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== - -async@^2.6.2: - version "2.6.3" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" - integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== - dependencies: - lodash "^4.17.14" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= - -available-typed-arrays@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.4.tgz#9e0ae84ecff20caae6a94a1c3bc39b955649b7a9" - integrity sha512-SA5mXJWrId1TaQjfxUYghbqQ/hYioKmLJvPJyDuYRtXXenFNMjj4hSSt1Cf1xsuXSXrtxrVC5Ot4eU6cOtBDdA== - -aws-sdk@^2.385.0, aws-sdk@^2.755.0: - version "2.936.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.936.0.tgz#b69f5db7c0c745f260b014415a8fbfb38c5e615d" - integrity sha512-X0kuyycck0fEPN5V0Vw1PmPIQ4BO0qupsL1El5jnXzXxNkf1cOmn5PMSxPXPsdcqua4w4h3sf143/yME0V9w8g== - dependencies: - buffer "4.9.2" - events "1.1.1" - ieee754 "1.1.13" - jmespath "0.15.0" - querystring "0.2.0" - sax "1.2.1" - url "0.10.3" - uuid "3.3.2" - xml2js "0.4.19" - -aws-sdk@^2.624.0: - version "2.747.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.747.0.tgz#487776536a7f8e4e18d57ff22dd50d777f1d0fe8" - integrity sha512-JA2ygLXFw0tLjc6nlauH3wnc6haoPU023fJCZN01xrw22l+s4rRjVGxJmG83VrfCmq+lrqCv0kVwlzyxbixGhA== - dependencies: - buffer "4.9.2" - events "1.1.1" - ieee754 "1.1.13" - jmespath "0.15.0" - querystring "0.2.0" - sax "1.2.1" - url "0.10.3" - uuid "3.3.2" - xml2js "0.4.19" - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= - -aws4@^1.8.0: - version "1.10.1" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.10.1.tgz#e1e82e4f3e999e2cfd61b161280d16a111f86428" - integrity sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA== - -axios@^0.21.0: - version "0.21.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" - integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA== - dependencies: - follow-redirects "^1.10.0" - -base-x@^3.0.2, base-x@^3.0.8: - version "3.0.8" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.8.tgz#1e1106c2537f0162e8b52474a557ebb09000018d" - integrity sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA== - dependencies: - safe-buffer "^5.0.1" - -base64-js@^1.0.2: - version "1.3.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" - integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== - -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= - dependencies: - tweetnacl "^0.14.3" - -bignumber.js@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.0.tgz#805880f84a329b5eac6e7cb6f8274b6d82bdf075" - integrity sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A== - -bignumber@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/bignumber/-/bignumber-1.1.0.tgz#e6ab0a743da5f3ea018e5c17597d121f7868c159" - integrity sha1-5qsKdD2l8+oBjlwXWX0SH3howVk= - -bl@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/bl/-/bl-2.2.1.tgz#8c11a7b730655c5d56898cdc871224f40fd901d5" - integrity sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g== - dependencies: - readable-stream "^2.3.5" - safe-buffer "^5.1.1" - -blakejs@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.1.0.tgz#69df92ef953aa88ca51a32df6ab1c54a155fc7a5" - integrity sha1-ad+S75U6qIylGjLfarHFShVfx6U= - -bluebird@^3.5.0: - version "3.7.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - -bn.js@4.11.6: - version "4.11.6" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" - integrity sha1-UzRK2xRhehP26N0s4okF0cC6MhU= - -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.11.9, bn.js@^4.4.0: - version "4.11.9" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" - integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== - -bn.js@^5.1.1: - version "5.1.3" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.3.tgz#beca005408f642ebebea80b042b4d18d2ac0ee6b" - integrity sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ== - -body-parser@1.19.0, body-parser@^1.16.0: - version "1.19.0" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" - integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== - dependencies: - bytes "3.1.0" - content-type "~1.0.4" - debug "2.6.9" - depd "~1.1.2" - http-errors "1.7.2" - iconv-lite "0.4.24" - on-finished "~2.3.0" - qs "6.7.0" - raw-body "2.4.0" - type-is "~1.6.17" - -boxen@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/boxen/-/boxen-4.2.0.tgz#e411b62357d6d6d36587c8ac3d5d974daa070e64" - integrity sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ== - dependencies: - ansi-align "^3.0.0" - camelcase "^5.3.1" - chalk "^3.0.0" - cli-boxes "^2.2.0" - string-width "^4.1.0" - term-size "^2.1.0" - type-fest "^0.8.1" - widest-line "^3.1.0" - -brorand@^1.0.1, brorand@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= - -browserify-aes@^1.0.0, browserify-aes@^1.0.4, browserify-aes@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -browserify-cipher@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" - integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" - integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" - integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= - dependencies: - bn.js "^4.1.0" - randombytes "^2.0.1" - -browserify-sign@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.1.tgz#eaf4add46dd54be3bb3b36c0cf15abbeba7956c3" - integrity sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg== - dependencies: - bn.js "^5.1.1" - browserify-rsa "^4.0.1" - create-hash "^1.2.0" - create-hmac "^1.1.7" - elliptic "^6.5.3" - inherits "^2.0.4" - parse-asn1 "^5.1.5" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -bs58@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" - integrity sha1-vhYedsNU9veIrkBx9j806MTwpCo= - dependencies: - base-x "^3.0.2" - -bs58check@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" - integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== - dependencies: - bs58 "^4.0.0" - create-hash "^1.1.0" - safe-buffer "^5.1.2" - -bson@^1.1.4: - version "1.1.6" - resolved "https://registry.yarnpkg.com/bson/-/bson-1.1.6.tgz#fb819be9a60cd677e0853aee4ca712a785d6618a" - integrity sha512-EvVNVeGo4tHxwi8L6bPj3y3itEvStdwvvlojVxxbyYfoaxJ6keLgrTuKdyfEAszFK+H3olzBuafE0yoh0D1gdg== - -buffer-equal-constant-time@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" - integrity sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk= - -buffer-to-arraybuffer@^0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz#6064a40fa76eb43c723aba9ef8f6e1216d10511a" - integrity sha1-YGSkD6dutDxyOrqe+PbhIW0QURo= - -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= - -buffer@4.9.2: - version "4.9.2" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.2.tgz#230ead344002988644841ab0244af8c44bbe3ef8" - integrity sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg== - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - isarray "^1.0.0" - -buffer@^5.0.5, buffer@^5.5.0, buffer@^5.6.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786" - integrity sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw== - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - -bufferutil@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.1.tgz#3a177e8e5819a1243fe16b63a199951a7ad8d4a7" - integrity sha512-xowrxvpxojqkagPcWRQVXZl0YXhRhAtBEIq3VoER1NH5Mw1n1o0ojdspp+GS2J//2gCVyrzQDApQ4unGF+QOoA== - dependencies: - node-gyp-build "~3.7.0" - -bytes@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" - integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== - -cacheable-request@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" - integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg== - dependencies: - clone-response "^1.0.2" - get-stream "^5.1.0" - http-cache-semantics "^4.0.0" - keyv "^3.0.0" - lowercase-keys "^2.0.0" - normalize-url "^4.1.0" - responselike "^1.0.2" - -call-bind@^1.0.0, call-bind@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== - dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" - -callsites@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= - -chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" - integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chownr@^1.1.1: - version "1.1.4" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" - integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== - -ci-info@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" - integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== - -cids@^0.7.1: - version "0.7.5" - resolved "https://registry.yarnpkg.com/cids/-/cids-0.7.5.tgz#60a08138a99bfb69b6be4ceb63bfef7a396b28b2" - integrity sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA== - dependencies: - buffer "^5.5.0" - class-is "^1.1.0" - multibase "~0.6.0" - multicodec "^1.0.0" - multihashes "~0.4.15" - -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -class-is@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/class-is/-/class-is-1.1.0.tgz#9d3c0fba0440d211d843cec3dedfa48055005825" - integrity sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw== - -clear-module@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/clear-module/-/clear-module-4.1.1.tgz#bf8ba3b62eb70ee1e0adec90589741425cf32db8" - integrity sha512-ng0E7LeODcT3QkazOckzZqbca+JByQy/Q2Z6qO24YsTp+pLxCfohGz2gJYJqZS0CWTX3LEUiHOqe5KlYeUbEMw== - dependencies: - parent-module "^2.0.0" - resolve-from "^5.0.0" - -cli-boxes@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.1.tgz#ddd5035d25094fce220e9cab40a45840a440318f" - integrity sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw== - -clone-response@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" - integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= - dependencies: - mimic-response "^1.0.0" - -coingecko-api@^1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/coingecko-api/-/coingecko-api-1.0.10.tgz#ac8694d5999f00727fe55f0078ce2917603076b2" - integrity sha512-7YLLC85+daxAw5QlBWoHVBVpJRwoPr4HtwanCr8V/WRjoyHTa1Lb9DQAvv4MDJZHiz4no6HGnDQnddtjV35oRA== - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -combined-stream@^1.0.6, combined-stream@~1.0.6: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -configstore@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/configstore/-/configstore-5.0.1.tgz#d365021b5df4b98cdd187d6a3b0e3f6a7cc5ed96" - integrity sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA== - dependencies: - dot-prop "^5.2.0" - graceful-fs "^4.1.2" - make-dir "^3.0.0" - unique-string "^2.0.0" - write-file-atomic "^3.0.0" - xdg-basedir "^4.0.0" - -content-disposition@0.5.3: - version "0.5.3" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" - integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== - dependencies: - safe-buffer "5.1.2" - -content-hash@^2.5.2: - version "2.5.2" - resolved "https://registry.yarnpkg.com/content-hash/-/content-hash-2.5.2.tgz#bbc2655e7c21f14fd3bfc7b7d4bfe6e454c9e211" - integrity sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw== - dependencies: - cids "^0.7.1" - multicodec "^0.5.5" - multihashes "^0.4.15" - -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= - -cookie@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" - integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== - -cookiejar@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.2.tgz#dd8a235530752f988f9a0844f3fc589e3111125c" - integrity sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA== - -core-util-is@1.0.2, core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - -cors@^2.8.1, cors@^2.8.5: - version "2.8.5" - resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" - integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== - dependencies: - object-assign "^4" - vary "^1" - -create-ecdh@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" - integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== - dependencies: - bn.js "^4.1.0" - elliptic "^6.5.3" - -create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -cron-parser@^2.7.3: - version "2.16.3" - resolved "https://registry.yarnpkg.com/cron-parser/-/cron-parser-2.16.3.tgz#acb8e405eed1733aac542fdf604cb7c1daf0204a" - integrity sha512-XNJBD1QLFeAMUkZtZQuncAAOgJFWNhBdIbwgD22hZxrcWOImBFMKgPC66GzaXpyoJs7UvYLLgPH/8BRk/7gbZg== - dependencies: - is-nan "^1.3.0" - moment-timezone "^0.5.31" - -cross-spawn@^7.0.0: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -crypto-browserify@3.12.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" - integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" - -crypto-random-string@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" - integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== - -cuid@^2.1.8: - version "2.1.8" - resolved "https://registry.yarnpkg.com/cuid/-/cuid-2.1.8.tgz#cbb88f954171e0d5747606c0139fb65c5101eac0" - integrity sha512-xiEMER6E7TlTPnDxrM4eRiC6TRgjNX9xzEZ5U/Se2YJKr7Mq4pJn/2XEHjl3STcSh96GmkHPcBXLES8M29wyyg== - -d@1, d@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" - integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== - dependencies: - es5-ext "^0.10.50" - type "^1.0.1" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= - dependencies: - assert-plus "^1.0.0" - -debug@2.6.9, debug@^2.2.0: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@^3.1.1: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - -decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= - -decompress-response@^3.2.0, decompress-response@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" - integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= - dependencies: - mimic-response "^1.0.0" - -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - -defer-to-connect@^1.0.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" - integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== - -define-properties@^1.1.2, define-properties@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" - integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== - dependencies: - object-keys "^1.0.12" - -delay@^4.4.0: - version "4.4.1" - resolved "https://registry.yarnpkg.com/delay/-/delay-4.4.1.tgz#6e02d02946a1b6ab98b39262ced965acba2ac4d1" - integrity sha512-aL3AhqtfhOlT/3ai6sWXeqwnw63ATNpnUiN4HL7x9q+My5QtHlO3OIkasmug9LKzpheLdmUKGRKnYXYAS7FQkQ== - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= - -denque@^1.4.1: - version "1.5.0" - resolved "https://registry.yarnpkg.com/denque/-/denque-1.5.0.tgz#773de0686ff2d8ec2ff92914316a47b73b1c73de" - integrity sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ== - -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= - -des.js@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" - integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= - -diffie-hellman@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" - integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - -dom-walk@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" - integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== - -dot-prop@^5.2.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" - integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q== - dependencies: - is-obj "^2.0.0" - -dotenv@^8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" - integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== - -duplexer3@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" - integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= - -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -ecdsa-sig-formatter@1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf" - integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== - dependencies: - safe-buffer "^5.0.1" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - -elliptic@6.5.3, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3: - version "6.5.3" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" - integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== - dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" - hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" - -elliptic@6.5.4: - version "6.5.4" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" - integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== - dependencies: - bn.js "^4.11.9" - brorand "^1.1.0" - hash.js "^1.0.0" - hmac-drbg "^1.0.1" - inherits "^2.0.4" - minimalistic-assert "^1.0.1" - minimalistic-crypto-utils "^1.0.1" - -emoji-regex@^7.0.1: - version "7.0.3" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" - integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= - -end-of-stream@^1.1.0: - version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - -es-abstract@^1.17.0-next.1, es-abstract@^1.17.5: - version "1.17.6" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.6.tgz#9142071707857b2cacc7b89ecb670316c3e2d52a" - integrity sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw== - dependencies: - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.2.0" - is-regex "^1.1.0" - object-inspect "^1.7.0" - object-keys "^1.1.1" - object.assign "^4.1.0" - string.prototype.trimend "^1.0.1" - string.prototype.trimstart "^1.0.1" - -es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2: - version "1.18.3" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.3.tgz#25c4c3380a27aa203c44b2b685bba94da31b63e0" - integrity sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw== - dependencies: - call-bind "^1.0.2" - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - get-intrinsic "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.2" - is-callable "^1.2.3" - is-negative-zero "^2.0.1" - is-regex "^1.1.3" - is-string "^1.0.6" - object-inspect "^1.10.3" - object-keys "^1.1.1" - object.assign "^4.1.2" - string.prototype.trimend "^1.0.4" - string.prototype.trimstart "^1.0.4" - unbox-primitive "^1.0.1" - -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -es5-ext@^0.10.35, es5-ext@^0.10.50: - version "0.10.53" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.53.tgz#93c5a3acfdbef275220ad72644ad02ee18368de1" - integrity sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q== - dependencies: - es6-iterator "~2.0.3" - es6-symbol "~3.1.3" - next-tick "~1.0.0" - -es6-iterator@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" - integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= - dependencies: - d "1" - es5-ext "^0.10.35" - es6-symbol "^3.1.1" - -es6-symbol@^3.1.1, es6-symbol@~3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" - integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== - dependencies: - d "^1.0.1" - ext "^1.1.2" - -escape-goat@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/escape-goat/-/escape-goat-2.1.1.tgz#1b2dc77003676c457ec760b2dc68edb648188675" - integrity sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q== - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= - -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= - -eth-ens-namehash@2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf" - integrity sha1-IprEbsqG1S4MmR58sq74P/D2i88= - dependencies: - idna-uts46-hx "^2.3.1" - js-sha3 "^0.5.7" - -eth-lib@0.2.8: - version "0.2.8" - resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.8.tgz#b194058bef4b220ad12ea497431d6cb6aa0623c8" - integrity sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw== - dependencies: - bn.js "^4.11.6" - elliptic "^6.4.0" - xhr-request-promise "^0.1.2" - -eth-lib@^0.1.26: - version "0.1.29" - resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.1.29.tgz#0c11f5060d42da9f931eab6199084734f4dbd1d9" - integrity sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ== - dependencies: - bn.js "^4.11.6" - elliptic "^6.4.0" - nano-json-stream-parser "^0.1.2" - servify "^0.1.12" - ws "^3.0.0" - xhr-request-promise "^0.1.2" - -ethereum-bloom-filters@^1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.7.tgz#b7b80735e385dbb7f944ce6b4533e24511306060" - integrity sha512-cDcJJSJ9GMAcURiAWO3DxIEhTL/uWqlQnvgKpuYQzYPrt/izuGU+1ntQmHt0IRq6ADoSYHFnB+aCEFIldjhkMQ== - dependencies: - js-sha3 "^0.8.0" - -ethereum-cryptography@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" - integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== + "color-convert" "^2.0.1" + +"array-flatten@1.1.1": + "integrity" "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + "resolved" "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz" + "version" "1.1.1" + +"asn1.js@^5.2.0": + "integrity" "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==" + "resolved" "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz" + "version" "5.4.1" + dependencies: + "bn.js" "^4.0.0" + "inherits" "^2.0.1" + "minimalistic-assert" "^1.0.0" + "safer-buffer" "^2.1.0" + +"asn1@~0.2.3": + "integrity" "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==" + "resolved" "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz" + "version" "0.2.4" + dependencies: + "safer-buffer" "~2.1.0" + +"assert-plus@^1.0.0", "assert-plus@1.0.0": + "integrity" "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + "resolved" "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" + "version" "1.0.0" + +"async-limiter@~1.0.0": + "integrity" "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" + "resolved" "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz" + "version" "1.0.1" + +"async@^2.6.2": + "integrity" "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==" + "resolved" "https://registry.npmjs.org/async/-/async-2.6.3.tgz" + "version" "2.6.3" + dependencies: + "lodash" "^4.17.14" + +"asynckit@^0.4.0": + "integrity" "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + "resolved" "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" + "version" "0.4.0" + +"aws-sdk@^2.385.0", "aws-sdk@^2.490.0", "aws-sdk@^2.624.0": + "version" "2.751.0" + dependencies: + "buffer" "4.9.2" + "events" "1.1.1" + "ieee754" "1.1.13" + "jmespath" "0.15.0" + "querystring" "0.2.0" + "sax" "1.2.1" + "url" "0.10.3" + "uuid" "3.3.2" + "xml2js" "0.4.19" + +"aws-sign2@~0.7.0": + "integrity" "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + "resolved" "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz" + "version" "0.7.0" + +"aws4@^1.8.0": + "integrity" "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==" + "resolved" "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz" + "version" "1.10.1" + +"axios@^0.21.0": + "version" "0.21.0" + dependencies: + "follow-redirects" "^1.10.0" + +"base-x@^3.0.2", "base-x@^3.0.8": + "integrity" "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==" + "resolved" "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz" + "version" "3.0.8" + dependencies: + "safe-buffer" "^5.0.1" + +"base64-js@^1.0.2": + "integrity" "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" + "resolved" "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz" + "version" "1.3.1" + +"bcrypt-pbkdf@^1.0.0": + "integrity" "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=" + "resolved" "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz" + "version" "1.0.2" + dependencies: + "tweetnacl" "^0.14.3" + +"bignumber.js@^9.0.0": + "integrity" "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==" + "resolved" "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz" + "version" "9.0.0" + +"bignumber@^1.1.0": + "integrity" "sha1-5qsKdD2l8+oBjlwXWX0SH3howVk=" + "resolved" "https://registry.npmjs.org/bignumber/-/bignumber-1.1.0.tgz" + "version" "1.1.0" + +"bl@^2.2.1": + "integrity" "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==" + "resolved" "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz" + "version" "2.2.1" + dependencies: + "readable-stream" "^2.3.5" + "safe-buffer" "^5.1.1" + +"blakejs@^1.1.0": + "integrity" "sha1-ad+S75U6qIylGjLfarHFShVfx6U=" + "resolved" "https://registry.npmjs.org/blakejs/-/blakejs-1.1.0.tgz" + "version" "1.1.0" + +"bluebird@^3.5.0": + "integrity" "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" + "resolved" "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz" + "version" "3.7.2" + +"bn.js@^4.0.0", "bn.js@^4.1.0", "bn.js@^4.11.0", "bn.js@^4.11.1", "bn.js@^4.11.6", "bn.js@^4.11.9", "bn.js@^4.4.0": + "integrity" "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "resolved" "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz" + "version" "4.11.9" + +"bn.js@^5.1.1": + "integrity" "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==" + "resolved" "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz" + "version" "5.1.3" + +"bn.js@4.11.6": + "integrity" "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + "resolved" "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz" + "version" "4.11.6" + +"body-parser@^1.16.0", "body-parser@^1.19.0", "body-parser@1.19.0": + "integrity" "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==" + "resolved" "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz" + "version" "1.19.0" + dependencies: + "bytes" "3.1.0" + "content-type" "~1.0.4" + "debug" "2.6.9" + "depd" "~1.1.2" + "http-errors" "1.7.2" + "iconv-lite" "0.4.24" + "on-finished" "~2.3.0" + "qs" "6.7.0" + "raw-body" "2.4.0" + "type-is" "~1.6.17" + +"boxen@^4.2.0": + "integrity" "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==" + "resolved" "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz" + "version" "4.2.0" + dependencies: + "ansi-align" "^3.0.0" + "camelcase" "^5.3.1" + "chalk" "^3.0.0" + "cli-boxes" "^2.2.0" + "string-width" "^4.1.0" + "term-size" "^2.1.0" + "type-fest" "^0.8.1" + "widest-line" "^3.1.0" + +"brorand@^1.0.1": + "integrity" "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + "resolved" "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz" + "version" "1.1.0" + +"browserify-aes@^1.0.0", "browserify-aes@^1.0.4", "browserify-aes@^1.2.0": + "integrity" "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==" + "resolved" "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz" + "version" "1.2.0" + dependencies: + "buffer-xor" "^1.0.3" + "cipher-base" "^1.0.0" + "create-hash" "^1.1.0" + "evp_bytestokey" "^1.0.3" + "inherits" "^2.0.1" + "safe-buffer" "^5.0.1" + +"browserify-cipher@^1.0.0": + "integrity" "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==" + "resolved" "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "browserify-aes" "^1.0.4" + "browserify-des" "^1.0.0" + "evp_bytestokey" "^1.0.0" + +"browserify-des@^1.0.0": + "integrity" "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==" + "resolved" "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz" + "version" "1.0.2" + dependencies: + "cipher-base" "^1.0.1" + "des.js" "^1.0.0" + "inherits" "^2.0.1" + "safe-buffer" "^5.1.2" + +"browserify-rsa@^4.0.0", "browserify-rsa@^4.0.1": + "integrity" "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=" + "resolved" "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz" + "version" "4.0.1" + dependencies: + "bn.js" "^4.1.0" + "randombytes" "^2.0.1" + +"browserify-sign@^4.0.0": + "integrity" "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==" + "resolved" "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz" + "version" "4.2.1" + dependencies: + "bn.js" "^5.1.1" + "browserify-rsa" "^4.0.1" + "create-hash" "^1.2.0" + "create-hmac" "^1.1.7" + "elliptic" "^6.5.3" + "inherits" "^2.0.4" + "parse-asn1" "^5.1.5" + "readable-stream" "^3.6.0" + "safe-buffer" "^5.2.0" + +"bs58@^4.0.0": + "integrity" "sha1-vhYedsNU9veIrkBx9j806MTwpCo=" + "resolved" "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz" + "version" "4.0.1" + dependencies: + "base-x" "^3.0.2" + +"bs58check@^2.1.2": + "integrity" "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==" + "resolved" "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz" + "version" "2.1.2" + dependencies: + "bs58" "^4.0.0" + "create-hash" "^1.1.0" + "safe-buffer" "^5.1.2" + +"bson@^1.1.4": + "version" "1.1.5" + +"buffer-equal-constant-time@1.0.1": + "integrity" "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" + "resolved" "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz" + "version" "1.0.1" + +"buffer-to-arraybuffer@^0.0.5": + "integrity" "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=" + "resolved" "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz" + "version" "0.0.5" + +"buffer-xor@^1.0.3": + "integrity" "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + "resolved" "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz" + "version" "1.0.3" + +"buffer@^5.0.5", "buffer@^5.5.0", "buffer@^5.6.0": + "integrity" "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==" + "resolved" "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz" + "version" "5.6.0" + dependencies: + "base64-js" "^1.0.2" + "ieee754" "^1.1.4" + +"buffer@4.9.2": + "integrity" "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==" + "resolved" "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz" + "version" "4.9.2" + dependencies: + "base64-js" "^1.0.2" + "ieee754" "^1.1.4" + "isarray" "^1.0.0" + +"bufferutil@^4.0.1": + "integrity" "sha512-xowrxvpxojqkagPcWRQVXZl0YXhRhAtBEIq3VoER1NH5Mw1n1o0ojdspp+GS2J//2gCVyrzQDApQ4unGF+QOoA==" + "resolved" "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.1.tgz" + "version" "4.0.1" + dependencies: + "node-gyp-build" "~3.7.0" + +"bytes@3.1.0": + "integrity" "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" + "resolved" "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz" + "version" "3.1.0" + +"cacheable-request@^6.0.0": + "integrity" "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==" + "resolved" "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz" + "version" "6.1.0" + dependencies: + "clone-response" "^1.0.2" + "get-stream" "^5.1.0" + "http-cache-semantics" "^4.0.0" + "keyv" "^3.0.0" + "lowercase-keys" "^2.0.0" + "normalize-url" "^4.1.0" + "responselike" "^1.0.2" + +"callsites@^3.1.0": + "integrity" "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" + "resolved" "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" + "version" "3.1.0" + +"camelcase@^5.3.1": + "integrity" "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + "resolved" "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz" + "version" "5.3.1" + +"caseless@~0.12.0": + "integrity" "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + "resolved" "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz" + "version" "0.12.0" + +"chalk@^2.4.1": + "version" "2.4.2" + dependencies: + "ansi-styles" "^3.2.1" + "escape-string-regexp" "^1.0.5" + "supports-color" "^5.3.0" + +"chalk@^3.0.0": + "integrity" "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==" + "resolved" "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz" + "version" "3.0.0" + dependencies: + "ansi-styles" "^4.1.0" + "supports-color" "^7.1.0" + +"chownr@^1.1.1": + "integrity" "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + "resolved" "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz" + "version" "1.1.4" + +"ci-info@^2.0.0": + "integrity" "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==" + "resolved" "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz" + "version" "2.0.0" + +"cids@^0.7.1": + "integrity" "sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==" + "resolved" "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz" + "version" "0.7.5" + dependencies: + "buffer" "^5.5.0" + "class-is" "^1.1.0" + "multibase" "~0.6.0" + "multicodec" "^1.0.0" + "multihashes" "~0.4.15" + +"cipher-base@^1.0.0", "cipher-base@^1.0.1", "cipher-base@^1.0.3": + "integrity" "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==" + "resolved" "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz" + "version" "1.0.4" + dependencies: + "inherits" "^2.0.1" + "safe-buffer" "^5.0.1" + +"class-is@^1.1.0": + "integrity" "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==" + "resolved" "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz" + "version" "1.1.0" + +"clear-module@^4.1.1": + "integrity" "sha512-ng0E7LeODcT3QkazOckzZqbca+JByQy/Q2Z6qO24YsTp+pLxCfohGz2gJYJqZS0CWTX3LEUiHOqe5KlYeUbEMw==" + "resolved" "https://registry.npmjs.org/clear-module/-/clear-module-4.1.1.tgz" + "version" "4.1.1" + dependencies: + "parent-module" "^2.0.0" + "resolve-from" "^5.0.0" + +"cli-boxes@^2.2.0": + "integrity" "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==" + "resolved" "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz" + "version" "2.2.1" + +"clone-response@^1.0.2": + "integrity" "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=" + "resolved" "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz" + "version" "1.0.2" + dependencies: + "mimic-response" "^1.0.0" + +"coingecko-api@^1.0.10": + "integrity" "sha512-7YLLC85+daxAw5QlBWoHVBVpJRwoPr4HtwanCr8V/WRjoyHTa1Lb9DQAvv4MDJZHiz4no6HGnDQnddtjV35oRA==" + "resolved" "https://registry.npmjs.org/coingecko-api/-/coingecko-api-1.0.10.tgz" + "version" "1.0.10" + +"color-convert@^1.9.0": + "integrity" "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==" + "resolved" "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" + "version" "1.9.3" + dependencies: + "color-name" "1.1.3" + +"color-convert@^2.0.1": + "integrity" "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==" + "resolved" "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" + "version" "2.0.1" + dependencies: + "color-name" "~1.1.4" + +"color-name@~1.1.4": + "integrity" "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "resolved" "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" + "version" "1.1.4" + +"color-name@1.1.3": + "integrity" "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + "resolved" "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" + "version" "1.1.3" + +"combined-stream@^1.0.6", "combined-stream@~1.0.6": + "integrity" "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==" + "resolved" "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" + "version" "1.0.8" + dependencies: + "delayed-stream" "~1.0.0" + +"configstore@^5.0.1": + "integrity" "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==" + "resolved" "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz" + "version" "5.0.1" + dependencies: + "dot-prop" "^5.2.0" + "graceful-fs" "^4.1.2" + "make-dir" "^3.0.0" + "unique-string" "^2.0.0" + "write-file-atomic" "^3.0.0" + "xdg-basedir" "^4.0.0" + +"content-disposition@0.5.3": + "integrity" "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==" + "resolved" "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz" + "version" "0.5.3" + dependencies: + "safe-buffer" "5.1.2" + +"content-hash@^2.5.2": + "integrity" "sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==" + "resolved" "https://registry.npmjs.org/content-hash/-/content-hash-2.5.2.tgz" + "version" "2.5.2" + dependencies: + "cids" "^0.7.1" + "multicodec" "^0.5.5" + "multihashes" "^0.4.15" + +"content-type@~1.0.4": + "integrity" "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + "resolved" "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz" + "version" "1.0.4" + +"cookie-signature@1.0.6": + "integrity" "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + "resolved" "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz" + "version" "1.0.6" + +"cookie@0.4.0": + "integrity" "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + "resolved" "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz" + "version" "0.4.0" + +"cookiejar@^2.1.1": + "integrity" "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==" + "resolved" "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz" + "version" "2.1.2" + +"core-util-is@~1.0.0", "core-util-is@1.0.2": + "integrity" "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + "resolved" "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + "version" "1.0.2" + +"cors@^2.8.1", "cors@^2.8.5": + "integrity" "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==" + "resolved" "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz" + "version" "2.8.5" + dependencies: + "object-assign" "^4" + "vary" "^1" + +"create-ecdh@^4.0.0": + "integrity" "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==" + "resolved" "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz" + "version" "4.0.4" + dependencies: + "bn.js" "^4.1.0" + "elliptic" "^6.5.3" + +"create-hash@^1.1.0", "create-hash@^1.1.2", "create-hash@^1.2.0": + "integrity" "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==" + "resolved" "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz" + "version" "1.2.0" + dependencies: + "cipher-base" "^1.0.1" + "inherits" "^2.0.1" + "md5.js" "^1.3.4" + "ripemd160" "^2.0.1" + "sha.js" "^2.4.0" + +"create-hmac@^1.1.0", "create-hmac@^1.1.4", "create-hmac@^1.1.7": + "integrity" "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==" + "resolved" "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz" + "version" "1.1.7" + dependencies: + "cipher-base" "^1.0.3" + "create-hash" "^1.1.0" + "inherits" "^2.0.1" + "ripemd160" "^2.0.0" + "safe-buffer" "^5.0.1" + "sha.js" "^2.4.8" + +"cron-parser@^2.7.3": + "integrity" "sha512-XNJBD1QLFeAMUkZtZQuncAAOgJFWNhBdIbwgD22hZxrcWOImBFMKgPC66GzaXpyoJs7UvYLLgPH/8BRk/7gbZg==" + "resolved" "https://registry.npmjs.org/cron-parser/-/cron-parser-2.16.3.tgz" + "version" "2.16.3" + dependencies: + "is-nan" "^1.3.0" + "moment-timezone" "^0.5.31" + +"cross-spawn@^7.0.0": + "integrity" "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==" + "resolved" "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" + "version" "7.0.3" + dependencies: + "path-key" "^3.1.0" + "shebang-command" "^2.0.0" + "which" "^2.0.1" + +"crypto-browserify@3.12.0": + "integrity" "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==" + "resolved" "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz" + "version" "3.12.0" + dependencies: + "browserify-cipher" "^1.0.0" + "browserify-sign" "^4.0.0" + "create-ecdh" "^4.0.0" + "create-hash" "^1.1.0" + "create-hmac" "^1.1.0" + "diffie-hellman" "^5.0.0" + "inherits" "^2.0.1" + "pbkdf2" "^3.0.3" + "public-encrypt" "^4.0.0" + "randombytes" "^2.0.0" + "randomfill" "^1.0.3" + +"crypto-random-string@^2.0.0": + "integrity" "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==" + "resolved" "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz" + "version" "2.0.0" + +"cuid@^2.1.8": + "integrity" "sha512-xiEMER6E7TlTPnDxrM4eRiC6TRgjNX9xzEZ5U/Se2YJKr7Mq4pJn/2XEHjl3STcSh96GmkHPcBXLES8M29wyyg==" + "resolved" "https://registry.npmjs.org/cuid/-/cuid-2.1.8.tgz" + "version" "2.1.8" + +"d@^1.0.1", "d@1": + "integrity" "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==" + "resolved" "https://registry.npmjs.org/d/-/d-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "es5-ext" "^0.10.50" + "type" "^1.0.1" + +"dashdash@^1.12.0": + "integrity" "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=" + "resolved" "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz" + "version" "1.14.1" + dependencies: + "assert-plus" "^1.0.0" + +"debug@^2.2.0", "debug@2.6.9": + "integrity" "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==" + "resolved" "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" + "version" "2.6.9" + dependencies: + "ms" "2.0.0" + +"debug@^3.1.1": + "integrity" "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==" + "resolved" "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz" + "version" "3.2.6" + dependencies: + "ms" "^2.1.1" + +"decode-uri-component@^0.2.0": + "integrity" "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + "resolved" "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz" + "version" "0.2.0" + +"decompress-response@^3.2.0", "decompress-response@^3.3.0": + "integrity" "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=" + "resolved" "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz" + "version" "3.3.0" + dependencies: + "mimic-response" "^1.0.0" + +"deep-extend@^0.6.0": + "integrity" "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" + "resolved" "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz" + "version" "0.6.0" + +"defer-to-connect@^1.0.1": + "integrity" "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==" + "resolved" "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz" + "version" "1.1.3" + +"define-properties@^1.1.3": + "integrity" "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==" + "resolved" "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz" + "version" "1.1.3" + dependencies: + "object-keys" "^1.0.12" + +"delay@^4.4.0": + "version" "4.4.0" + +"delayed-stream@~1.0.0": + "integrity" "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + "resolved" "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" + "version" "1.0.0" + +"denque@^1.4.1": + "version" "1.4.1" + +"depd@~1.1.2": + "integrity" "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + "resolved" "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz" + "version" "1.1.2" + +"des.js@^1.0.0": + "integrity" "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==" + "resolved" "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "inherits" "^2.0.1" + "minimalistic-assert" "^1.0.0" + +"destroy@~1.0.4": + "integrity" "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + "resolved" "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz" + "version" "1.0.4" + +"diffie-hellman@^5.0.0": + "integrity" "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==" + "resolved" "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz" + "version" "5.0.3" + dependencies: + "bn.js" "^4.1.0" + "miller-rabin" "^4.0.0" + "randombytes" "^2.0.0" + +"dom-walk@^0.1.0": + "integrity" "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==" + "resolved" "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz" + "version" "0.1.2" + +"dot-prop@^5.2.0": + "integrity" "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==" + "resolved" "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz" + "version" "5.3.0" + dependencies: + "is-obj" "^2.0.0" + +"dotenv@^8.2.0": + "integrity" "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==" + "resolved" "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz" + "version" "8.2.0" + +"duplexer3@^0.1.4": + "integrity" "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" + "resolved" "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz" + "version" "0.1.4" + +"ecc-jsbn@~0.1.1": + "integrity" "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=" + "resolved" "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz" + "version" "0.1.2" + dependencies: + "jsbn" "~0.1.0" + "safer-buffer" "^2.1.0" + +"ecdsa-sig-formatter@1.0.11": + "integrity" "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==" + "resolved" "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz" + "version" "1.0.11" + dependencies: + "safe-buffer" "^5.0.1" + +"ee-first@1.1.1": + "integrity" "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + "resolved" "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz" + "version" "1.1.1" + +"elliptic@^6.4.0", "elliptic@^6.5.2", "elliptic@^6.5.3", "elliptic@6.5.3": + "integrity" "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==" + "resolved" "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz" + "version" "6.5.3" + dependencies: + "bn.js" "^4.4.0" + "brorand" "^1.0.1" + "hash.js" "^1.0.0" + "hmac-drbg" "^1.0.0" + "inherits" "^2.0.1" + "minimalistic-assert" "^1.0.0" + "minimalistic-crypto-utils" "^1.0.0" + +"emoji-regex@^7.0.1": + "integrity" "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + "resolved" "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz" + "version" "7.0.3" + +"emoji-regex@^8.0.0": + "integrity" "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + "resolved" "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" + "version" "8.0.0" + +"encodeurl@~1.0.2": + "integrity" "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + "resolved" "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz" + "version" "1.0.2" + +"end-of-stream@^1.1.0": + "integrity" "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==" + "resolved" "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz" + "version" "1.4.4" + dependencies: + "once" "^1.4.0" + +"es-abstract@^1.17.0-next.1", "es-abstract@^1.17.5": + "integrity" "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==" + "resolved" "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz" + "version" "1.17.6" + dependencies: + "es-to-primitive" "^1.2.1" + "function-bind" "^1.1.1" + "has" "^1.0.3" + "has-symbols" "^1.0.1" + "is-callable" "^1.2.0" + "is-regex" "^1.1.0" + "object-inspect" "^1.7.0" + "object-keys" "^1.1.1" + "object.assign" "^4.1.0" + "string.prototype.trimend" "^1.0.1" + "string.prototype.trimstart" "^1.0.1" + +"es-abstract@^1.18.0-next.0": + "version" "1.18.0-next.0" + dependencies: + "es-to-primitive" "^1.2.1" + "function-bind" "^1.1.1" + "has" "^1.0.3" + "has-symbols" "^1.0.1" + "is-callable" "^1.2.0" + "is-negative-zero" "^2.0.0" + "is-regex" "^1.1.1" + "object-inspect" "^1.8.0" + "object-keys" "^1.1.1" + "object.assign" "^4.1.0" + "string.prototype.trimend" "^1.0.1" + "string.prototype.trimstart" "^1.0.1" + +"es-to-primitive@^1.2.1": + "integrity" "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==" + "resolved" "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz" + "version" "1.2.1" + dependencies: + "is-callable" "^1.1.4" + "is-date-object" "^1.0.1" + "is-symbol" "^1.0.2" + +"es5-ext@^0.10.35", "es5-ext@^0.10.50": + "integrity" "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==" + "resolved" "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz" + "version" "0.10.53" + dependencies: + "es6-iterator" "~2.0.3" + "es6-symbol" "~3.1.3" + "next-tick" "~1.0.0" + +"es6-iterator@~2.0.3": + "integrity" "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=" + "resolved" "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz" + "version" "2.0.3" + dependencies: + "d" "1" + "es5-ext" "^0.10.35" + "es6-symbol" "^3.1.1" + +"es6-symbol@^3.1.1", "es6-symbol@~3.1.3": + "integrity" "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==" + "resolved" "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz" + "version" "3.1.3" + dependencies: + "d" "^1.0.1" + "ext" "^1.1.2" + +"escape-goat@^2.0.0": + "integrity" "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==" + "resolved" "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz" + "version" "2.1.1" + +"escape-html@~1.0.3": + "integrity" "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + "resolved" "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz" + "version" "1.0.3" + +"escape-string-regexp@^1.0.5": + "integrity" "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + "resolved" "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" + "version" "1.0.5" + +"etag@~1.8.1": + "integrity" "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + "resolved" "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz" + "version" "1.8.1" + +"eth-ens-namehash@2.0.8": + "integrity" "sha1-IprEbsqG1S4MmR58sq74P/D2i88=" + "resolved" "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz" + "version" "2.0.8" + dependencies: + "idna-uts46-hx" "^2.3.1" + "js-sha3" "^0.5.7" + +"eth-lib@^0.1.26": + "integrity" "sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==" + "resolved" "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz" + "version" "0.1.29" + dependencies: + "bn.js" "^4.11.6" + "elliptic" "^6.4.0" + "nano-json-stream-parser" "^0.1.2" + "servify" "^0.1.12" + "ws" "^3.0.0" + "xhr-request-promise" "^0.1.2" + +"eth-lib@0.2.8": + "integrity" "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==" + "resolved" "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz" + "version" "0.2.8" + dependencies: + "bn.js" "^4.11.6" + "elliptic" "^6.4.0" + "xhr-request-promise" "^0.1.2" + +"ethereum-bloom-filters@^1.0.6": + "integrity" "sha512-cDcJJSJ9GMAcURiAWO3DxIEhTL/uWqlQnvgKpuYQzYPrt/izuGU+1ntQmHt0IRq6ADoSYHFnB+aCEFIldjhkMQ==" + "resolved" "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.7.tgz" + "version" "1.0.7" + dependencies: + "js-sha3" "^0.8.0" + +"ethereum-cryptography@^0.1.3": + "integrity" "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==" + "resolved" "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz" + "version" "0.1.3" dependencies: "@types/pbkdf2" "^3.0.0" "@types/secp256k1" "^4.0.1" - blakejs "^1.1.0" - browserify-aes "^1.2.0" - bs58check "^2.1.2" - create-hash "^1.2.0" - create-hmac "^1.1.7" - hash.js "^1.1.7" - keccak "^3.0.0" - pbkdf2 "^3.0.17" - randombytes "^2.1.0" - safe-buffer "^5.1.2" - scrypt-js "^3.0.0" - secp256k1 "^4.0.1" - setimmediate "^1.0.5" - -ethereumjs-common@^1.3.2, ethereumjs-common@^1.5.0: - version "1.5.2" - resolved "https://registry.yarnpkg.com/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz#2065dbe9214e850f2e955a80e650cb6999066979" - integrity sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA== - -ethereumjs-tx@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz#5dfe7688bf177b45c9a23f86cf9104d47ea35fed" - integrity sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw== - dependencies: - ethereumjs-common "^1.5.0" - ethereumjs-util "^6.0.0" - -ethereumjs-util@^6.0.0: - version "6.2.1" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz#fcb4e4dd5ceacb9d2305426ab1a5cd93e3163b69" - integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== + "blakejs" "^1.1.0" + "browserify-aes" "^1.2.0" + "bs58check" "^2.1.2" + "create-hash" "^1.2.0" + "create-hmac" "^1.1.7" + "hash.js" "^1.1.7" + "keccak" "^3.0.0" + "pbkdf2" "^3.0.17" + "randombytes" "^2.1.0" + "safe-buffer" "^5.1.2" + "scrypt-js" "^3.0.0" + "secp256k1" "^4.0.1" + "setimmediate" "^1.0.5" + +"ethereumjs-common@^1.3.2", "ethereumjs-common@^1.5.0": + "integrity" "sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA==" + "resolved" "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz" + "version" "1.5.2" + +"ethereumjs-tx@^2.1.1": + "integrity" "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==" + "resolved" "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz" + "version" "2.1.2" + dependencies: + "ethereumjs-common" "^1.5.0" + "ethereumjs-util" "^6.0.0" + +"ethereumjs-util@^6.0.0": + "integrity" "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==" + "resolved" "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz" + "version" "6.2.1" dependencies: "@types/bn.js" "^4.11.3" - bn.js "^4.11.0" - create-hash "^1.1.2" - elliptic "^6.5.2" - ethereum-cryptography "^0.1.3" - ethjs-util "0.1.6" - rlp "^2.2.3" - -ethjs-unit@0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" - integrity sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk= - dependencies: - bn.js "4.11.6" - number-to-bn "1.7.0" - -ethjs-util@0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" - integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== - dependencies: - is-hex-prefixed "1.0.0" - strip-hex-prefix "1.0.0" - -eventemitter3@4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" - integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== - -eventemitter3@^4.0.4: - version "4.0.7" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" - integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== - -events@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" - integrity sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ= - -evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - -execa@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/execa/-/execa-4.0.3.tgz#0a34dabbad6d66100bd6f2c576c8669403f317f2" - integrity sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A== - dependencies: - cross-spawn "^7.0.0" - get-stream "^5.0.0" - human-signals "^1.1.1" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.0" - onetime "^5.1.0" - signal-exit "^3.0.2" - strip-final-newline "^2.0.0" - -express@^4.14.0, express@^4.17.1: - version "4.17.1" - resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" - integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== - dependencies: - accepts "~1.3.7" - array-flatten "1.1.1" - body-parser "1.19.0" - content-disposition "0.5.3" - content-type "~1.0.4" - cookie "0.4.0" - cookie-signature "1.0.6" - debug "2.6.9" - depd "~1.1.2" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "~1.1.2" - fresh "0.5.2" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "~2.3.0" - parseurl "~1.3.3" - path-to-regexp "0.1.7" - proxy-addr "~2.0.5" - qs "6.7.0" - range-parser "~1.2.1" - safe-buffer "5.1.2" - send "0.17.1" - serve-static "1.14.1" - setprototypeof "1.1.1" - statuses "~1.5.0" - type-is "~1.6.18" - utils-merge "1.0.1" - vary "~1.1.2" - -ext@^1.1.2: - version "1.4.0" - resolved "https://registry.yarnpkg.com/ext/-/ext-1.4.0.tgz#89ae7a07158f79d35517882904324077e4379244" - integrity sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A== - dependencies: - type "^2.0.0" - -extend@^3.0.2, extend@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= - -extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= - -fast-deep-equal@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -finalhandler@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" - integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.3" - statuses "~1.5.0" - unpipe "~1.0.0" - -follow-redirects@^1.10.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.1.tgz#d9114ded0a1cfdd334e164e6662ad02bfd91ff43" - integrity sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg== - -foreach@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" - integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= - -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -forwarded@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" - integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= - -fs-extra@^4.0.2: - version "4.0.3" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" - integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs-extra@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" - integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs-minipass@^1.2.5: - version "1.2.7" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" - integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== - dependencies: - minipass "^2.6.0" - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" - integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - -get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= - -get-stream@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" - integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== - dependencies: - pump "^3.0.0" - -get-stream@^5.0.0, get-stream@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" - integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== - dependencies: - pump "^3.0.0" - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= - dependencies: - assert-plus "^1.0.0" - -global-dirs@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-2.0.1.tgz#acdf3bb6685bcd55cb35e8a052266569e9469201" - integrity sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A== - dependencies: - ini "^1.3.5" - -global@~4.3.0: - version "4.3.2" - resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f" - integrity sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8= - dependencies: - min-document "^2.19.0" - process "~0.5.1" - -got@9.6.0, got@^9.6.0: - version "9.6.0" - resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" - integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== + "bn.js" "^4.11.0" + "create-hash" "^1.1.2" + "elliptic" "^6.5.2" + "ethereum-cryptography" "^0.1.3" + "ethjs-util" "0.1.6" + "rlp" "^2.2.3" + +"ethjs-unit@0.1.6": + "integrity" "sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk=" + "resolved" "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz" + "version" "0.1.6" + dependencies: + "bn.js" "4.11.6" + "number-to-bn" "1.7.0" + +"ethjs-util@0.1.6": + "integrity" "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==" + "resolved" "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz" + "version" "0.1.6" + dependencies: + "is-hex-prefixed" "1.0.0" + "strip-hex-prefix" "1.0.0" + +"eventemitter3@^4.0.4", "eventemitter3@4.0.4": + "integrity" "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==" + "resolved" "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz" + "version" "4.0.4" + +"events@1.1.1": + "integrity" "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" + "resolved" "https://registry.npmjs.org/events/-/events-1.1.1.tgz" + "version" "1.1.1" + +"evp_bytestokey@^1.0.0", "evp_bytestokey@^1.0.3": + "integrity" "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==" + "resolved" "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz" + "version" "1.0.3" + dependencies: + "md5.js" "^1.3.4" + "safe-buffer" "^5.1.1" + +"execa@^4.0.0": + "integrity" "sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A==" + "resolved" "https://registry.npmjs.org/execa/-/execa-4.0.3.tgz" + "version" "4.0.3" + dependencies: + "cross-spawn" "^7.0.0" + "get-stream" "^5.0.0" + "human-signals" "^1.1.1" + "is-stream" "^2.0.0" + "merge-stream" "^2.0.0" + "npm-run-path" "^4.0.0" + "onetime" "^5.1.0" + "signal-exit" "^3.0.2" + "strip-final-newline" "^2.0.0" + +"express@^4.14.0", "express@^4.17.1", "express@>=4.0.0": + "integrity" "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==" + "resolved" "https://registry.npmjs.org/express/-/express-4.17.1.tgz" + "version" "4.17.1" + dependencies: + "accepts" "~1.3.7" + "array-flatten" "1.1.1" + "body-parser" "1.19.0" + "content-disposition" "0.5.3" + "content-type" "~1.0.4" + "cookie" "0.4.0" + "cookie-signature" "1.0.6" + "debug" "2.6.9" + "depd" "~1.1.2" + "encodeurl" "~1.0.2" + "escape-html" "~1.0.3" + "etag" "~1.8.1" + "finalhandler" "~1.1.2" + "fresh" "0.5.2" + "merge-descriptors" "1.0.1" + "methods" "~1.1.2" + "on-finished" "~2.3.0" + "parseurl" "~1.3.3" + "path-to-regexp" "0.1.7" + "proxy-addr" "~2.0.5" + "qs" "6.7.0" + "range-parser" "~1.2.1" + "safe-buffer" "5.1.2" + "send" "0.17.1" + "serve-static" "1.14.1" + "setprototypeof" "1.1.1" + "statuses" "~1.5.0" + "type-is" "~1.6.18" + "utils-merge" "1.0.1" + "vary" "~1.1.2" + +"ext@^1.1.2": + "integrity" "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==" + "resolved" "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz" + "version" "1.4.0" + dependencies: + "type" "^2.0.0" + +"extend@^3.0.2", "extend@~3.0.2": + "integrity" "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + "resolved" "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz" + "version" "3.0.2" + +"extsprintf@^1.2.0", "extsprintf@1.3.0": + "integrity" "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + "resolved" "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz" + "version" "1.3.0" + +"fast-deep-equal@^3.1.1": + "integrity" "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + "resolved" "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" + "version" "3.1.3" + +"fast-json-stable-stringify@^2.0.0": + "integrity" "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + "resolved" "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" + "version" "2.1.0" + +"finalhandler@~1.1.2": + "integrity" "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==" + "resolved" "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz" + "version" "1.1.2" + dependencies: + "debug" "2.6.9" + "encodeurl" "~1.0.2" + "escape-html" "~1.0.3" + "on-finished" "~2.3.0" + "parseurl" "~1.3.3" + "statuses" "~1.5.0" + "unpipe" "~1.0.0" + +"follow-redirects@^1.10.0": + "version" "1.13.0" + +"forever-agent@~0.6.1": + "integrity" "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + "resolved" "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz" + "version" "0.6.1" + +"form-data@~2.3.2": + "integrity" "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==" + "resolved" "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz" + "version" "2.3.3" + dependencies: + "asynckit" "^0.4.0" + "combined-stream" "^1.0.6" + "mime-types" "^2.1.12" + +"forwarded@~0.1.2": + "integrity" "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + "resolved" "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz" + "version" "0.1.2" + +"fresh@0.5.2": + "integrity" "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + "resolved" "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz" + "version" "0.5.2" + +"fs-extra@^4.0.2": + "integrity" "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==" + "resolved" "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz" + "version" "4.0.3" + dependencies: + "graceful-fs" "^4.1.2" + "jsonfile" "^4.0.0" + "universalify" "^0.1.0" + +"fs-extra@^8.1.0": + "integrity" "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==" + "resolved" "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz" + "version" "8.1.0" + dependencies: + "graceful-fs" "^4.2.0" + "jsonfile" "^4.0.0" + "universalify" "^0.1.0" + +"fs-minipass@^1.2.5": + "integrity" "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==" + "resolved" "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz" + "version" "1.2.7" + dependencies: + "minipass" "^2.6.0" + +"function-bind@^1.1.1": + "integrity" "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + "resolved" "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" + "version" "1.1.1" + +"get-stream@^3.0.0": + "integrity" "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + "resolved" "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz" + "version" "3.0.0" + +"get-stream@^4.1.0": + "integrity" "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==" + "resolved" "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz" + "version" "4.1.0" + dependencies: + "pump" "^3.0.0" + +"get-stream@^5.0.0": + "integrity" "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==" + "resolved" "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz" + "version" "5.2.0" + dependencies: + "pump" "^3.0.0" + +"get-stream@^5.1.0": + "integrity" "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==" + "resolved" "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz" + "version" "5.2.0" + dependencies: + "pump" "^3.0.0" + +"getpass@^0.1.1": + "integrity" "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=" + "resolved" "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz" + "version" "0.1.7" + dependencies: + "assert-plus" "^1.0.0" + +"global-dirs@^2.0.1": + "integrity" "sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A==" + "resolved" "https://registry.npmjs.org/global-dirs/-/global-dirs-2.0.1.tgz" + "version" "2.0.1" + dependencies: + "ini" "^1.3.5" + +"global@~4.3.0": + "integrity" "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=" + "resolved" "https://registry.npmjs.org/global/-/global-4.3.2.tgz" + "version" "4.3.2" + dependencies: + "min-document" "^2.19.0" + "process" "~0.5.1" + +"got@^7.1.0": + "integrity" "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==" + "resolved" "https://registry.npmjs.org/got/-/got-7.1.0.tgz" + "version" "7.1.0" + dependencies: + "decompress-response" "^3.2.0" + "duplexer3" "^0.1.4" + "get-stream" "^3.0.0" + "is-plain-obj" "^1.1.0" + "is-retry-allowed" "^1.0.0" + "is-stream" "^1.0.0" + "isurl" "^1.0.0-alpha5" + "lowercase-keys" "^1.0.0" + "p-cancelable" "^0.3.0" + "p-timeout" "^1.1.1" + "safe-buffer" "^5.0.1" + "timed-out" "^4.0.0" + "url-parse-lax" "^1.0.0" + "url-to-options" "^1.0.1" + +"got@^9.6.0", "got@9.6.0": + "integrity" "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==" + "resolved" "https://registry.npmjs.org/got/-/got-9.6.0.tgz" + "version" "9.6.0" dependencies: "@sindresorhus/is" "^0.14.0" "@szmarczak/http-timer" "^1.1.2" - cacheable-request "^6.0.0" - decompress-response "^3.3.0" - duplexer3 "^0.1.4" - get-stream "^4.1.0" - lowercase-keys "^1.0.1" - mimic-response "^1.0.1" - p-cancelable "^1.0.0" - to-readable-stream "^1.0.0" - url-parse-lax "^3.0.0" - -got@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz#05450fd84094e6bbea56f451a43a9c289166385a" - integrity sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw== - dependencies: - decompress-response "^3.2.0" - duplexer3 "^0.1.4" - get-stream "^3.0.0" - is-plain-obj "^1.1.0" - is-retry-allowed "^1.0.0" - is-stream "^1.0.0" - isurl "^1.0.0-alpha5" - lowercase-keys "^1.0.0" - p-cancelable "^0.3.0" - p-timeout "^1.1.1" - safe-buffer "^5.0.1" - timed-out "^4.0.0" - url-parse-lax "^1.0.0" - url-to-options "^1.0.1" - -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0: - version "4.2.4" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" - integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= - -har-validator@~5.1.3: - version "5.1.5" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" - integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== - dependencies: - ajv "^6.12.3" - har-schema "^2.0.0" - -has-bigints@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" - integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-symbol-support-x@^1.4.1: - version "1.4.2" - resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" - integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== - -has-symbols@^1.0.0, has-symbols@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" - integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== - -has-symbols@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" - integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== - -has-to-string-tag-x@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" - integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw== - dependencies: - has-symbol-support-x "^1.4.1" - -has-yarn@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77" - integrity sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw== - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hash-base@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" - integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== - dependencies: - inherits "^2.0.4" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - -hmac-drbg@^1.0.0, hmac-drbg@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - -http-cache-semantics@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" - integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== - -http-errors@1.7.2: - version "1.7.2" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" - integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.1" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" - -http-errors@~1.7.2: - version "1.7.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" - integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== - dependencies: - depd "~1.1.2" - inherits "2.0.4" - setprototypeof "1.1.1" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" - -http-https@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/http-https/-/http-https-1.0.0.tgz#2f908dd5f1db4068c058cd6e6d4ce392c913389b" - integrity sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs= - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -human-signals@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" - integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== - -iconv-lite@0.4.24: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -idna-uts46-hx@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz#a1dc5c4df37eee522bf66d969cc980e00e8711f9" - integrity sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA== - dependencies: - punycode "2.1.0" - -ieee754@1.1.13, ieee754@^1.1.4: - version "1.1.13" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" - integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== - -immediate@~3.0.5: - version "3.0.6" - resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" - integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps= - -import-lazy@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" - integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM= - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= - -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - -inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -ini@^1.3.5, ini@~1.3.0: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== - -ipaddr.js@1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" - integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== - -is-arguments@^1.0.4: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.0.tgz#62353031dfbee07ceb34656a6bde59efecae8dd9" - integrity sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg== - dependencies: - call-bind "^1.0.0" - -is-bigint@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.2.tgz#ffb381442503235ad245ea89e45b3dbff040ee5a" - integrity sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA== - -is-boolean-object@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.1.tgz#3c0878f035cb821228d350d2e1e36719716a3de8" - integrity sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng== - dependencies: - call-bind "^1.0.2" - -is-callable@^1.1.4, is-callable@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.0.tgz#83336560b54a38e35e3a2df7afd0454d691468bb" - integrity sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw== - -is-callable@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" - integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ== - -is-ci@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" - integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== - dependencies: - ci-info "^2.0.0" - -is-date-object@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" - integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-function@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz#4f097f30abf6efadac9833b17ca5dc03f8144e08" - integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ== - -is-generator-function@^1.0.7: - version "1.0.9" - resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.9.tgz#e5f82c2323673e7fcad3d12858c83c4039f6399c" - integrity sha512-ZJ34p1uvIfptHCN7sFTjGibB9/oBg17sHqzDLfuwhvmN/qLVvIQXRQ8licZQ35WJ8KuEQt/etnnzQFI9C9Ue/A== - -is-hex-prefixed@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" - integrity sha1-fY035q135dEnFIkTxXPggtd39VQ= - -is-installed-globally@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.3.2.tgz#fd3efa79ee670d1187233182d5b0a1dd00313141" - integrity sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g== - dependencies: - global-dirs "^2.0.1" - is-path-inside "^3.0.1" - -is-nan@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.3.0.tgz#85d1f5482f7051c2019f5673ccebdb06f3b0db03" - integrity sha512-z7bbREymOqt2CCaZVly8aC4ML3Xhfi0ekuOnjO2L8vKdl+CttdVoGZQhd4adMFAsxQ5VeRVwORs4tU8RH+HFtQ== - dependencies: - define-properties "^1.1.3" - -is-negative-zero@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" - integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== - -is-npm@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-4.0.0.tgz#c90dd8380696df87a7a6d823c20d0b12bbe3c84d" - integrity sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig== - -is-number-object@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.5.tgz#6edfaeed7950cff19afedce9fbfca9ee6dd289eb" - integrity sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw== - -is-obj@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" - integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== - -is-object@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470" - integrity sha1-iVJojF7C/9awPsyF52ngKQMINHA= - -is-path-inside@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.2.tgz#f5220fc82a3e233757291dddc9c5877f2a1f3017" - integrity sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg== - -is-plain-obj@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" - integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= - -is-regex@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9" - integrity sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg== - dependencies: - has-symbols "^1.0.1" - -is-regex@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.3.tgz#d029f9aff6448b93ebbe3f33dac71511fdcbef9f" - integrity sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ== - dependencies: - call-bind "^1.0.2" - has-symbols "^1.0.2" - -is-retry-allowed@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" - integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== - -is-stream@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= - -is-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" - integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== - -is-string@^1.0.5, is-string@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.6.tgz#3fe5d5992fb0d93404f32584d4b0179a71b54a5f" - integrity sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w== - -is-symbol@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" - integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== - dependencies: - has-symbols "^1.0.1" - -is-symbol@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" - integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== - dependencies: - has-symbols "^1.0.2" - -is-typed-array@^1.1.3: - version "1.1.5" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.5.tgz#f32e6e096455e329eb7b423862456aa213f0eb4e" - integrity sha512-S+GRDgJlR3PyEbsX/Fobd9cqpZBuvUS+8asRqYDMLCb2qMzt1oz5m5oxQCxOgUDxiWsOVNi4yaF+/uvdlHlYug== - dependencies: - available-typed-arrays "^1.0.2" - call-bind "^1.0.2" - es-abstract "^1.18.0-next.2" - foreach "^2.0.5" - has-symbols "^1.0.1" - -is-typedarray@^1.0.0, is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= - -is-yarn-global@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/is-yarn-global/-/is-yarn-global-0.3.0.tgz#d502d3382590ea3004893746754c89139973e232" - integrity sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw== - -isarray@^1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= - -isurl@^1.0.0-alpha5: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" - integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w== - dependencies: - has-to-string-tag-x "^1.2.0" - is-object "^1.0.1" - -java-invoke-local@0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/java-invoke-local/-/java-invoke-local-0.0.6.tgz#0e04b20b5e306a1e8384846a9ac286790ee6d868" - integrity sha512-gZmQKe1QrfkkMjCn8Qv9cpyJFyogTYqkP5WCobX5RNaHsJzIV/6NvAnlnouOcwKr29QrxLGDGcqYuJ+ae98s1A== - -jmespath@0.15.0: - version "0.15.0" - resolved "https://registry.yarnpkg.com/jmespath/-/jmespath-0.15.0.tgz#a3f222a9aae9f966f5d27c796510e28091764217" - integrity sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc= - -js-sha3@0.5.7, js-sha3@^0.5.7: - version "0.5.7" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" - integrity sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc= - -js-sha3@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" - integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== - -js-string-escape@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/js-string-escape/-/js-string-escape-1.0.1.tgz#e2625badbc0d67c7533e9edc1068c587ae4137ef" - integrity sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8= - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= - -json-buffer@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" - integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= + "cacheable-request" "^6.0.0" + "decompress-response" "^3.3.0" + "duplexer3" "^0.1.4" + "get-stream" "^4.1.0" + "lowercase-keys" "^1.0.1" + "mimic-response" "^1.0.1" + "p-cancelable" "^1.0.0" + "to-readable-stream" "^1.0.0" + "url-parse-lax" "^3.0.0" + +"graceful-fs@^4.1.2", "graceful-fs@^4.1.6", "graceful-fs@^4.2.0": + "integrity" "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" + "resolved" "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz" + "version" "4.2.4" + +"har-schema@^2.0.0": + "integrity" "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + "resolved" "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz" + "version" "2.0.0" + +"har-validator@~5.1.3": + "integrity" "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==" + "resolved" "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz" + "version" "5.1.5" + dependencies: + "ajv" "^6.12.3" + "har-schema" "^2.0.0" + +"has-flag@^3.0.0": + "integrity" "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + "resolved" "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" + "version" "3.0.0" + +"has-flag@^4.0.0": + "integrity" "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + "resolved" "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" + "version" "4.0.0" + +"has-symbol-support-x@^1.4.1": + "integrity" "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==" + "resolved" "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz" + "version" "1.4.2" + +"has-symbols@^1.0.1": + "integrity" "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" + "resolved" "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz" + "version" "1.0.1" + +"has-to-string-tag-x@^1.2.0": + "integrity" "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==" + "resolved" "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz" + "version" "1.4.1" + dependencies: + "has-symbol-support-x" "^1.4.1" + +"has-yarn@^2.1.0": + "integrity" "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==" + "resolved" "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz" + "version" "2.1.0" + +"has@^1.0.3": + "integrity" "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==" + "resolved" "https://registry.npmjs.org/has/-/has-1.0.3.tgz" + "version" "1.0.3" + dependencies: + "function-bind" "^1.1.1" + +"hash-base@^3.0.0": + "integrity" "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==" + "resolved" "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz" + "version" "3.1.0" + dependencies: + "inherits" "^2.0.4" + "readable-stream" "^3.6.0" + "safe-buffer" "^5.2.0" + +"hash.js@^1.0.0", "hash.js@^1.0.3", "hash.js@^1.1.7": + "integrity" "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==" + "resolved" "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz" + "version" "1.1.7" + dependencies: + "inherits" "^2.0.3" + "minimalistic-assert" "^1.0.1" + +"hmac-drbg@^1.0.0": + "integrity" "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=" + "resolved" "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "hash.js" "^1.0.3" + "minimalistic-assert" "^1.0.0" + "minimalistic-crypto-utils" "^1.0.1" + +"http-cache-semantics@^4.0.0": + "integrity" "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" + "resolved" "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz" + "version" "4.1.0" + +"http-errors@~1.7.2", "http-errors@1.7.2": + "integrity" "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==" + "resolved" "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz" + "version" "1.7.2" + dependencies: + "depd" "~1.1.2" + "inherits" "2.0.3" + "setprototypeof" "1.1.1" + "statuses" ">= 1.5.0 < 2" + "toidentifier" "1.0.0" + +"http-https@^1.0.0": + "integrity" "sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs=" + "resolved" "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz" + "version" "1.0.0" + +"http-signature@~1.2.0": + "integrity" "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=" + "resolved" "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz" + "version" "1.2.0" + dependencies: + "assert-plus" "^1.0.0" + "jsprim" "^1.2.2" + "sshpk" "^1.7.0" + +"human-signals@^1.1.1": + "integrity" "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==" + "resolved" "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz" + "version" "1.1.1" + +"iconv-lite@0.4.24": + "integrity" "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==" + "resolved" "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz" + "version" "0.4.24" + dependencies: + "safer-buffer" ">= 2.1.2 < 3" + +"idna-uts46-hx@^2.3.1": + "integrity" "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==" + "resolved" "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz" + "version" "2.3.1" + dependencies: + "punycode" "2.1.0" + +"ieee754@^1.1.4", "ieee754@1.1.13": + "integrity" "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" + "resolved" "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz" + "version" "1.1.13" + +"immediate@~3.0.5": + "integrity" "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" + "resolved" "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz" + "version" "3.0.6" + +"import-lazy@^2.1.0": + "integrity" "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=" + "resolved" "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz" + "version" "2.1.0" + +"imurmurhash@^0.1.4": + "integrity" "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + "resolved" "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" + "version" "0.1.4" + +"inherits@^2.0.1", "inherits@^2.0.3", "inherits@^2.0.4", "inherits@~2.0.3": + "integrity" "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "resolved" "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" + "version" "2.0.4" + +"inherits@2.0.3": + "integrity" "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "resolved" "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + "version" "2.0.3" + +"ini@^1.3.5", "ini@~1.3.0": + "integrity" "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" + "resolved" "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz" + "version" "1.3.5" + +"ipaddr.js@1.9.1": + "integrity" "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" + "resolved" "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz" + "version" "1.9.1" + +"is-callable@^1.1.4", "is-callable@^1.2.0": + "version" "1.2.1" + +"is-ci@^2.0.0": + "integrity" "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==" + "resolved" "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz" + "version" "2.0.0" + dependencies: + "ci-info" "^2.0.0" + +"is-date-object@^1.0.1": + "integrity" "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==" + "resolved" "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz" + "version" "1.0.2" + +"is-fullwidth-code-point@^2.0.0": + "integrity" "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + "resolved" "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz" + "version" "2.0.0" + +"is-fullwidth-code-point@^3.0.0": + "integrity" "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + "resolved" "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" + "version" "3.0.0" + +"is-function@^1.0.1": + "integrity" "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==" + "resolved" "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz" + "version" "1.0.2" + +"is-hex-prefixed@1.0.0": + "integrity" "sha1-fY035q135dEnFIkTxXPggtd39VQ=" + "resolved" "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz" + "version" "1.0.0" + +"is-installed-globally@^0.3.1": + "integrity" "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==" + "resolved" "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz" + "version" "0.3.2" + dependencies: + "global-dirs" "^2.0.1" + "is-path-inside" "^3.0.1" + +"is-nan@^1.3.0": + "integrity" "sha512-z7bbREymOqt2CCaZVly8aC4ML3Xhfi0ekuOnjO2L8vKdl+CttdVoGZQhd4adMFAsxQ5VeRVwORs4tU8RH+HFtQ==" + "resolved" "https://registry.npmjs.org/is-nan/-/is-nan-1.3.0.tgz" + "version" "1.3.0" + dependencies: + "define-properties" "^1.1.3" + +"is-negative-zero@^2.0.0": + "version" "2.0.0" + +"is-npm@^4.0.0": + "integrity" "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==" + "resolved" "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz" + "version" "4.0.0" + +"is-obj@^2.0.0": + "integrity" "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==" + "resolved" "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz" + "version" "2.0.0" + +"is-object@^1.0.1": + "integrity" "sha1-iVJojF7C/9awPsyF52ngKQMINHA=" + "resolved" "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz" + "version" "1.0.1" + +"is-path-inside@^3.0.1": + "integrity" "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==" + "resolved" "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz" + "version" "3.0.2" + +"is-plain-obj@^1.1.0": + "integrity" "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" + "resolved" "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz" + "version" "1.1.0" + +"is-regex@^1.1.0", "is-regex@^1.1.1": + "integrity" "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==" + "resolved" "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz" + "version" "1.1.1" + dependencies: + "has-symbols" "^1.0.1" + +"is-retry-allowed@^1.0.0": + "integrity" "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==" + "resolved" "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz" + "version" "1.2.0" + +"is-stream@^1.0.0": + "integrity" "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + "resolved" "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz" + "version" "1.1.0" + +"is-stream@^2.0.0": + "integrity" "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" + "resolved" "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz" + "version" "2.0.0" + +"is-symbol@^1.0.2": + "integrity" "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==" + "resolved" "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz" + "version" "1.0.3" + dependencies: + "has-symbols" "^1.0.1" + +"is-typedarray@^1.0.0", "is-typedarray@~1.0.0": + "integrity" "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + "resolved" "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz" + "version" "1.0.0" + +"is-yarn-global@^0.3.0": + "integrity" "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==" + "resolved" "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz" + "version" "0.3.0" + +"isarray@^1.0.0", "isarray@~1.0.0": + "integrity" "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + "resolved" "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + "version" "1.0.0" + +"isexe@^2.0.0": + "integrity" "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + "resolved" "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" + "version" "2.0.0" + +"isstream@~0.1.2": + "integrity" "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + "resolved" "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" + "version" "0.1.2" + +"isurl@^1.0.0-alpha5": + "integrity" "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==" + "resolved" "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz" + "version" "1.0.0" + dependencies: + "has-to-string-tag-x" "^1.2.0" + "is-object" "^1.0.1" + +"java-invoke-local@0.0.6": + "integrity" "sha512-gZmQKe1QrfkkMjCn8Qv9cpyJFyogTYqkP5WCobX5RNaHsJzIV/6NvAnlnouOcwKr29QrxLGDGcqYuJ+ae98s1A==" + "resolved" "https://registry.npmjs.org/java-invoke-local/-/java-invoke-local-0.0.6.tgz" + "version" "0.0.6" + +"jmespath@0.15.0": + "integrity" "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=" + "resolved" "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz" + "version" "0.15.0" + +"js-sha3@^0.5.7": + "integrity" "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + "resolved" "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz" + "version" "0.5.7" + +"js-sha3@^0.8.0": + "integrity" "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + "resolved" "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz" + "version" "0.8.0" + +"js-sha3@0.5.7": + "integrity" "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + "resolved" "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz" + "version" "0.5.7" + +"js-string-escape@^1.0.1": + "integrity" "sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8=" + "resolved" "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz" + "version" "1.0.1" + +"jsbn@~0.1.0": + "integrity" "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + "resolved" "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz" + "version" "0.1.1" + +"json-buffer@3.0.0": + "integrity" "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=" + "resolved" "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz" + "version" "3.0.0" + +"json-schema-traverse@^0.4.1": + "integrity" "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "resolved" "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" + "version" "0.4.1" + +"json-schema@0.2.3": + "integrity" "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + "resolved" "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz" + "version" "0.2.3" + +"json-stringify-safe@~5.0.1": + "integrity" "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + "resolved" "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" + "version" "5.0.1" + +"jsonfile@^4.0.0": + "integrity" "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=" + "resolved" "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz" + "version" "4.0.0" optionalDependencies: - graceful-fs "^4.1.6" - -jsonpath-plus@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/jsonpath-plus/-/jsonpath-plus-3.0.0.tgz#194ab4792a5e9b4ed27bf442188c8eb7e697a04b" - integrity sha512-WQwgWEBgn+SJU1tlDa/GiY5/ngRpa9yrSj8n4BYPHcwoxTDaMEaYCHMOn42hIHHDd3CrUoRr3+HpsK0hCKoxzA== - -jsonschema@^1.2.6: - version "1.2.6" - resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.2.6.tgz#52b0a8e9dc06bbae7295249d03e4b9faee8a0c0b" - integrity sha512-SqhURKZG07JyKKeo/ir24QnS4/BV7a6gQy93bUSe4lUdNp0QNpIz2c9elWJQ9dpc5cQYY6cvCzgRwy0MQCLyqA== - -jsonwebtoken@^8.5.1: - version "8.5.1" - resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz#00e71e0b8df54c2121a1f26137df2280673bcc0d" - integrity sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w== - dependencies: - jws "^3.2.2" - lodash.includes "^4.3.0" - lodash.isboolean "^3.0.3" - lodash.isinteger "^4.0.4" - lodash.isnumber "^3.0.3" - lodash.isplainobject "^4.0.6" - lodash.isstring "^4.0.1" - lodash.once "^4.0.0" - ms "^2.1.1" - semver "^5.6.0" - -jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - -jszip@^3.2.2: - version "3.5.0" - resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.5.0.tgz#b4fd1f368245346658e781fec9675802489e15f6" - integrity sha512-WRtu7TPCmYePR1nazfrtuF216cIVon/3GWOvHS9QR5bIwSbnxtdpma6un3jyGGNhHsKCSzn5Ypk+EkDRvTGiFA== - dependencies: - lie "~3.3.0" - pako "~1.0.2" - readable-stream "~2.3.6" - set-immediate-shim "~1.0.1" - -jwa@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" - integrity sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA== - dependencies: - buffer-equal-constant-time "1.0.1" - ecdsa-sig-formatter "1.0.11" - safe-buffer "^5.0.1" - -jws@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" - integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== - dependencies: - jwa "^1.4.1" - safe-buffer "^5.0.1" - -keccak@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.1.tgz#ae30a0e94dbe43414f741375cff6d64c8bea0bff" - integrity sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA== - dependencies: - node-addon-api "^2.0.0" - node-gyp-build "^4.2.0" - -keyv@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9" - integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== - dependencies: - json-buffer "3.0.0" - -latest-version@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-5.1.0.tgz#119dfe908fe38d15dfa43ecd13fa12ec8832face" - integrity sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA== - dependencies: - package-json "^6.3.0" - -lie@~3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/lie/-/lie-3.3.0.tgz#dcf82dee545f46074daf200c7c1c5a08e0f40f6a" - integrity sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ== - dependencies: - immediate "~3.0.5" - -lodash.includes@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" - integrity sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8= - -lodash.isboolean@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6" - integrity sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY= - -lodash.isinteger@^4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343" - integrity sha1-YZwK89A/iwTDH1iChAt3sRzWg0M= - -lodash.isnumber@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz#3ce76810c5928d03352301ac287317f11c0b1ffc" - integrity sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w= - -lodash.isplainobject@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" - integrity sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs= - -lodash.isstring@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" - integrity sha1-1SfftUVuynzJu5XV2ur4i6VKVFE= - -lodash.once@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" - integrity sha1-DdOXEhPHxW34gJd9UEyI+0cal6w= - -lodash@^4.17.14: - version "4.17.20" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" - integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== - -lodash@^4.17.20: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -long-timeout@0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/long-timeout/-/long-timeout-0.1.1.tgz#9721d788b47e0bcb5a24c2e2bee1a0da55dab514" - integrity sha1-lyHXiLR+C8taJMLivuGg2lXatRQ= - -lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" - integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== - -lowercase-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" - integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== - -luxon@^1.22.0: - version "1.25.0" - resolved "https://registry.yarnpkg.com/luxon/-/luxon-1.25.0.tgz#d86219e90bc0102c0eb299d65b2f5e95efe1fe72" - integrity sha512-hEgLurSH8kQRjY6i4YLey+mcKVAWXbDNlZRmM6AgWDJ1cY3atl8Ztf5wEY7VBReFbmGnwQPz7KYJblL8B2k0jQ== - -make-dir@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== - dependencies: - semver "^6.0.0" - -map-age-cleaner@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" - integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== - dependencies: - p-defer "^1.0.0" - -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= - -mem@^6.0.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/mem/-/mem-6.1.1.tgz#ea110c2ebc079eca3022e6b08c85a795e77f6318" - integrity sha512-Ci6bIfq/UgcxPTYa8dQQ5FY3BzKkT894bwXWXxC/zqs0XgMO2cT20CGkOqda7gZNkmK5VP4x89IGZ6K7hfbn3Q== - dependencies: - map-age-cleaner "^0.1.3" - mimic-fn "^3.0.0" - -memory-pager@^1.0.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/memory-pager/-/memory-pager-1.5.0.tgz#d8751655d22d384682741c972f2c3d6dfa3e66b5" - integrity sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg== - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= - -miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" - integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - -mime-db@1.44.0, mime-db@1.x.x: - version "1.44.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" - integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== - -mime-types@^2.1.12, mime-types@^2.1.16, mime-types@~2.1.19, mime-types@~2.1.24: - version "2.1.27" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" - integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== - dependencies: - mime-db "1.44.0" - -mime@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -mimic-fn@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-3.1.0.tgz#65755145bbf3e36954b949c16450427451d5ca74" - integrity sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ== - -mimic-response@^1.0.0, mimic-response@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" - integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== - -min-document@^2.19.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" - integrity sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU= - dependencies: - dom-walk "^0.1.0" - -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= - -minimist@^1.2.0, minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== - -minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" - integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - -minizlib@^1.2.1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" - integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== - dependencies: - minipass "^2.9.0" - -mkdirp-promise@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz#e9b8f68e552c68a9c1713b84883f7a1dd039b8a1" - integrity sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE= - dependencies: - mkdirp "*" - -mkdirp@*: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - -mkdirp@^0.5.0, mkdirp@^0.5.5: - version "0.5.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - dependencies: - minimist "^1.2.5" - -mock-fs@^4.1.0: - version "4.13.0" - resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.13.0.tgz#31c02263673ec3789f90eb7b6963676aa407a598" - integrity sha512-DD0vOdofJdoaRNtnWcrXe6RQbpHkPPmtqGq14uRX0F8ZKJ5nv89CVTYl/BZdppDxBDaV0hl75htg3abpEWlPZA== - -moment-timezone@^0.5.31: - version "0.5.31" - resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.31.tgz#9c40d8c5026f0c7ab46eda3d63e49c155148de05" - integrity sha512-+GgHNg8xRhMXfEbv81iDtrVeTcWt0kWmTEY1XQK14dICTXnWJnT0dxdlPspwqF3keKMVPXwayEsk1DI0AA/jdA== - dependencies: - moment ">= 2.9.0" - -"moment@>= 2.9.0": - version "2.27.0" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.27.0.tgz#8bff4e3e26a236220dfe3e36de756b6ebaa0105d" - integrity sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ== - -moment@^2.28.0: - version "2.29.1" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3" - integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ== - -mongodb@^3.6.3: - version "3.6.9" - resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-3.6.9.tgz#4889cf529724267d393a18275d6cf19d71905b1d" - integrity sha512-1nSCKgSunzn/CXwgOWgbPHUWOO5OfERcuOWISmqd610jn0s8BU9K4879iJVabqgpPPbA6hO7rG48eq+fGED3Mg== - dependencies: - bl "^2.2.1" - bson "^1.1.4" - denque "^1.4.1" - optional-require "^1.0.3" - safe-buffer "^5.1.2" + "graceful-fs" "^4.1.6" + +"jsonpath-plus@^3.0.0": + "integrity" "sha512-WQwgWEBgn+SJU1tlDa/GiY5/ngRpa9yrSj8n4BYPHcwoxTDaMEaYCHMOn42hIHHDd3CrUoRr3+HpsK0hCKoxzA==" + "resolved" "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-3.0.0.tgz" + "version" "3.0.0" + +"jsonschema@^1.2.6": + "integrity" "sha512-SqhURKZG07JyKKeo/ir24QnS4/BV7a6gQy93bUSe4lUdNp0QNpIz2c9elWJQ9dpc5cQYY6cvCzgRwy0MQCLyqA==" + "resolved" "https://registry.npmjs.org/jsonschema/-/jsonschema-1.2.6.tgz" + "version" "1.2.6" + +"jsonwebtoken@^8.5.1": + "integrity" "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==" + "resolved" "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz" + "version" "8.5.1" + dependencies: + "jws" "^3.2.2" + "lodash.includes" "^4.3.0" + "lodash.isboolean" "^3.0.3" + "lodash.isinteger" "^4.0.4" + "lodash.isnumber" "^3.0.3" + "lodash.isplainobject" "^4.0.6" + "lodash.isstring" "^4.0.1" + "lodash.once" "^4.0.0" + "ms" "^2.1.1" + "semver" "^5.6.0" + +"jsprim@^1.2.2": + "integrity" "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=" + "resolved" "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz" + "version" "1.4.1" + dependencies: + "assert-plus" "1.0.0" + "extsprintf" "1.3.0" + "json-schema" "0.2.3" + "verror" "1.10.0" + +"jszip@^3.2.2": + "integrity" "sha512-WRtu7TPCmYePR1nazfrtuF216cIVon/3GWOvHS9QR5bIwSbnxtdpma6un3jyGGNhHsKCSzn5Ypk+EkDRvTGiFA==" + "resolved" "https://registry.npmjs.org/jszip/-/jszip-3.5.0.tgz" + "version" "3.5.0" + dependencies: + "lie" "~3.3.0" + "pako" "~1.0.2" + "readable-stream" "~2.3.6" + "set-immediate-shim" "~1.0.1" + +"jwa@^1.4.1": + "integrity" "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==" + "resolved" "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz" + "version" "1.4.1" + dependencies: + "buffer-equal-constant-time" "1.0.1" + "ecdsa-sig-formatter" "1.0.11" + "safe-buffer" "^5.0.1" + +"jws@^3.2.2": + "integrity" "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==" + "resolved" "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz" + "version" "3.2.2" + dependencies: + "jwa" "^1.4.1" + "safe-buffer" "^5.0.1" + +"keccak@^3.0.0": + "integrity" "sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==" + "resolved" "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz" + "version" "3.0.1" + dependencies: + "node-addon-api" "^2.0.0" + "node-gyp-build" "^4.2.0" + +"keyv@^3.0.0": + "integrity" "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==" + "resolved" "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz" + "version" "3.1.0" + dependencies: + "json-buffer" "3.0.0" + +"latest-version@^5.0.0": + "integrity" "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==" + "resolved" "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz" + "version" "5.1.0" + dependencies: + "package-json" "^6.3.0" + +"lie@~3.3.0": + "integrity" "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==" + "resolved" "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz" + "version" "3.3.0" + dependencies: + "immediate" "~3.0.5" + +"lodash.includes@^4.3.0": + "integrity" "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=" + "resolved" "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz" + "version" "4.3.0" + +"lodash.isboolean@^3.0.3": + "integrity" "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" + "resolved" "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz" + "version" "3.0.3" + +"lodash.isinteger@^4.0.4": + "integrity" "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=" + "resolved" "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz" + "version" "4.0.4" + +"lodash.isnumber@^3.0.3": + "integrity" "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=" + "resolved" "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz" + "version" "3.0.3" + +"lodash.isplainobject@^4.0.6": + "integrity" "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" + "resolved" "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz" + "version" "4.0.6" + +"lodash.isstring@^4.0.1": + "integrity" "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" + "resolved" "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz" + "version" "4.0.1" + +"lodash.once@^4.0.0": + "integrity" "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" + "resolved" "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz" + "version" "4.1.1" + +"lodash@^4.17.14", "lodash@^4.17.20": + "integrity" "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + "resolved" "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz" + "version" "4.17.20" + +"long-timeout@0.1.1": + "integrity" "sha1-lyHXiLR+C8taJMLivuGg2lXatRQ=" + "resolved" "https://registry.npmjs.org/long-timeout/-/long-timeout-0.1.1.tgz" + "version" "0.1.1" + +"lowercase-keys@^1.0.0", "lowercase-keys@^1.0.1": + "integrity" "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" + "resolved" "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz" + "version" "1.0.1" + +"lowercase-keys@^2.0.0": + "integrity" "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==" + "resolved" "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz" + "version" "2.0.0" + +"luxon@^1.22.0": + "integrity" "sha512-hEgLurSH8kQRjY6i4YLey+mcKVAWXbDNlZRmM6AgWDJ1cY3atl8Ztf5wEY7VBReFbmGnwQPz7KYJblL8B2k0jQ==" + "resolved" "https://registry.npmjs.org/luxon/-/luxon-1.25.0.tgz" + "version" "1.25.0" + +"make-dir@^3.0.0": + "integrity" "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==" + "resolved" "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz" + "version" "3.1.0" + dependencies: + "semver" "^6.0.0" + +"map-age-cleaner@^0.1.3": + "integrity" "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==" + "resolved" "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz" + "version" "0.1.3" + dependencies: + "p-defer" "^1.0.0" + +"md5.js@^1.3.4": + "integrity" "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==" + "resolved" "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz" + "version" "1.3.5" + dependencies: + "hash-base" "^3.0.0" + "inherits" "^2.0.1" + "safe-buffer" "^5.1.2" + +"media-typer@0.3.0": + "integrity" "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + "resolved" "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz" + "version" "0.3.0" + +"mem@^6.0.1": + "integrity" "sha512-Ci6bIfq/UgcxPTYa8dQQ5FY3BzKkT894bwXWXxC/zqs0XgMO2cT20CGkOqda7gZNkmK5VP4x89IGZ6K7hfbn3Q==" + "resolved" "https://registry.npmjs.org/mem/-/mem-6.1.1.tgz" + "version" "6.1.1" + dependencies: + "map-age-cleaner" "^0.1.3" + "mimic-fn" "^3.0.0" + +"memory-pager@^1.0.2": + "integrity" "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==" + "resolved" "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz" + "version" "1.5.0" + +"merge-descriptors@1.0.1": + "integrity" "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + "resolved" "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz" + "version" "1.0.1" + +"merge-stream@^2.0.0": + "integrity" "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + "resolved" "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" + "version" "2.0.0" + +"methods@~1.1.2": + "integrity" "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + "resolved" "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz" + "version" "1.1.2" + +"miller-rabin@^4.0.0": + "integrity" "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==" + "resolved" "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz" + "version" "4.0.1" + dependencies: + "bn.js" "^4.0.0" + "brorand" "^1.0.1" + +"mime-db@1.44.0", "mime-db@1.x.x": + "integrity" "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" + "resolved" "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz" + "version" "1.44.0" + +"mime-types@^2.1.12", "mime-types@^2.1.16", "mime-types@~2.1.19", "mime-types@~2.1.24": + "integrity" "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==" + "resolved" "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz" + "version" "2.1.27" + dependencies: + "mime-db" "1.44.0" + +"mime@1.6.0": + "integrity" "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + "resolved" "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz" + "version" "1.6.0" + +"mimic-fn@^2.1.0": + "integrity" "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + "resolved" "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz" + "version" "2.1.0" + +"mimic-fn@^3.0.0": + "integrity" "sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ==" + "resolved" "https://registry.npmjs.org/mimic-fn/-/mimic-fn-3.1.0.tgz" + "version" "3.1.0" + +"mimic-response@^1.0.0", "mimic-response@^1.0.1": + "integrity" "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" + "resolved" "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz" + "version" "1.0.1" + +"min-document@^2.19.0": + "integrity" "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=" + "resolved" "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz" + "version" "2.19.0" + dependencies: + "dom-walk" "^0.1.0" + +"minimalistic-assert@^1.0.0", "minimalistic-assert@^1.0.1": + "integrity" "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + "resolved" "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz" + "version" "1.0.1" + +"minimalistic-crypto-utils@^1.0.0", "minimalistic-crypto-utils@^1.0.1": + "integrity" "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + "resolved" "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz" + "version" "1.0.1" + +"minimist@^1.2.0", "minimist@^1.2.5": + "integrity" "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + "resolved" "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz" + "version" "1.2.5" + +"minipass@^2.6.0", "minipass@^2.8.6", "minipass@^2.9.0": + "integrity" "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==" + "resolved" "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz" + "version" "2.9.0" + dependencies: + "safe-buffer" "^5.1.2" + "yallist" "^3.0.0" + +"minizlib@^1.2.1": + "integrity" "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==" + "resolved" "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz" + "version" "1.3.3" + dependencies: + "minipass" "^2.9.0" + +"mkdirp-promise@^5.0.1": + "integrity" "sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE=" + "resolved" "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz" + "version" "5.0.1" + dependencies: + "mkdirp" "*" + +"mkdirp@*": + "integrity" "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + "resolved" "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz" + "version" "1.0.4" + +"mkdirp@^0.5.0": + "integrity" "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==" + "resolved" "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz" + "version" "0.5.5" + dependencies: + "minimist" "^1.2.5" + +"mkdirp@^0.5.5": + "integrity" "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==" + "resolved" "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz" + "version" "0.5.5" + dependencies: + "minimist" "^1.2.5" + +"mock-fs@^4.1.0": + "integrity" "sha512-DD0vOdofJdoaRNtnWcrXe6RQbpHkPPmtqGq14uRX0F8ZKJ5nv89CVTYl/BZdppDxBDaV0hl75htg3abpEWlPZA==" + "resolved" "https://registry.npmjs.org/mock-fs/-/mock-fs-4.13.0.tgz" + "version" "4.13.0" + +"moment-timezone@^0.5.31": + "integrity" "sha512-+GgHNg8xRhMXfEbv81iDtrVeTcWt0kWmTEY1XQK14dICTXnWJnT0dxdlPspwqF3keKMVPXwayEsk1DI0AA/jdA==" + "resolved" "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.31.tgz" + "version" "0.5.31" + dependencies: + "moment" ">= 2.9.0" + +"moment@^2.28.0", "moment@>= 2.9.0": + "version" "2.28.0" + +"mongodb@^3.6.3": + "version" "3.6.3" + dependencies: + "bl" "^2.2.1" + "bson" "^1.1.4" + "denque" "^1.4.1" + "require_optional" "^1.0.1" + "safe-buffer" "^5.1.2" optionalDependencies: - saslprep "^1.0.0" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -ms@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" - integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== - -ms@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -multibase@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.7.0.tgz#1adfc1c50abe05eefeb5091ac0c2728d6b84581b" - integrity sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg== - dependencies: - base-x "^3.0.8" - buffer "^5.5.0" - -multibase@~0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.6.1.tgz#b76df6298536cc17b9f6a6db53ec88f85f8cc12b" - integrity sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw== - dependencies: - base-x "^3.0.8" - buffer "^5.5.0" - -multicodec@^0.5.5: - version "0.5.7" - resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-0.5.7.tgz#1fb3f9dd866a10a55d226e194abba2dcc1ee9ffd" - integrity sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA== - dependencies: - varint "^5.0.0" - -multicodec@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-1.0.4.tgz#46ac064657c40380c28367c90304d8ed175a714f" - integrity sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg== - dependencies: - buffer "^5.6.0" - varint "^5.0.0" - -multihashes@^0.4.15, multihashes@~0.4.15: - version "0.4.21" - resolved "https://registry.yarnpkg.com/multihashes/-/multihashes-0.4.21.tgz#dc02d525579f334a7909ade8a122dabb58ccfcb5" - integrity sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw== - dependencies: - buffer "^5.5.0" - multibase "^0.7.0" - varint "^5.0.0" - -nano-json-stream-parser@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz#0cc8f6d0e2b622b479c40d499c46d64b755c6f5f" - integrity sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18= - -negotiator@0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" - integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== - -next-tick@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" - integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= - -node-addon-api@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" - integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== - -node-cron@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/node-cron/-/node-cron-2.0.3.tgz#b9649784d0d6c00758410eef22fa54a10e3f602d" - integrity sha512-eJI+QitXlwcgiZwNNSRbqsjeZMp5shyajMR81RZCqeW0ZDEj4zU9tpd4nTh/1JsBiKbF8d08FCewiipDmVIYjg== - dependencies: - opencollective-postinstall "^2.0.0" - tz-offset "0.0.1" - -node-fetch@^2.6.0, node-fetch@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" - integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== - -node-gyp-build@^4.2.0: - version "4.2.3" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.2.3.tgz#ce6277f853835f718829efb47db20f3e4d9c4739" - integrity sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg== - -node-gyp-build@~3.7.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-3.7.0.tgz#daa77a4f547b9aed3e2aac779eaf151afd60ec8d" - integrity sha512-L/Eg02Epx6Si2NXmedx+Okg+4UHqmaf3TNcxd50SF9NQGcJaON3AtU++kax69XV7YWz4tUspqZSAsVofhFKG2w== - -node-schedule@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/node-schedule/-/node-schedule-1.3.2.tgz#d774b383e2a6f6ade59eecc62254aea07cd758cb" - integrity sha512-GIND2pHMHiReSZSvS6dpZcDH7pGPGFfWBIEud6S00Q8zEIzAs9ommdyRK1ZbQt8y1LyZsJYZgPnyi7gpU2lcdw== - dependencies: - cron-parser "^2.7.3" - long-timeout "0.1.1" - sorted-array-functions "^1.0.0" - -normalize-url@^4.1.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129" - integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== - -npm-run-path@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - -number-to-bn@1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/number-to-bn/-/number-to-bn-1.7.0.tgz#bb3623592f7e5f9e0030b1977bd41a0c53fe1ea0" - integrity sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA= - dependencies: - bn.js "4.11.6" - strip-hex-prefix "1.0.0" - -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - -object-assign@^4, object-assign@^4.1.0, object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - -object-hash@^1.1.7: - version "1.3.1" - resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-1.3.1.tgz#fde452098a951cb145f039bb7d455449ddc126df" - integrity sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA== - -object-inspect@^1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.10.3.tgz#c2aa7d2d09f50c99375704f7a0adf24c5782d369" - integrity sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw== - -object-inspect@^1.7.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0" - integrity sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA== - -object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" - integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - -object.assign@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" - integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== - dependencies: - define-properties "^1.1.2" - function-bind "^1.1.1" - has-symbols "^1.0.0" - object-keys "^1.0.11" - -object.assign@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" - integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - has-symbols "^1.0.1" - object-keys "^1.1.1" - -object.fromentries@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.2.tgz#4a09c9b9bb3843dd0f89acdb517a794d4f355ac9" - integrity sha512-r3ZiBH7MQppDJVLx6fhD618GKNG40CZYH9wgwdhKxBDDbQgjeWGGd4AtkZad84d291YxvWe7bJGuE65Anh0dxQ== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" - function-bind "^1.1.1" - has "^1.0.3" - -oboe@2.1.5: - version "2.1.5" - resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.5.tgz#5554284c543a2266d7a38f17e073821fbde393cd" - integrity sha1-VVQoTFQ6ImbXo48X4HOCH73jk80= - dependencies: - http-https "^1.0.0" - -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= - dependencies: - ee-first "1.1.1" - -once@^1.3.1, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -onetime@^5.1.0: - version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - -opencollective-postinstall@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259" - integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q== - -optional-require@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/optional-require/-/optional-require-1.0.3.tgz#275b8e9df1dc6a17ad155369c2422a440f89cb07" - integrity sha512-RV2Zp2MY2aeYK5G+B/Sps8lW5NHAzE5QClbFP15j+PWmP+T9PxlJXBOOLoSAdgwFvS4t0aMR4vpedMkbHfh0nA== - -p-cancelable@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" - integrity sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw== - -p-cancelable@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" - integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== - -p-defer@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" - integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= - -p-memoize@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/p-memoize/-/p-memoize-4.0.0.tgz#1f955b6c38aaa4b74d243e354eae51a7ecb48e94" - integrity sha512-oMxCJKVS75Bf2RWtXJNQNaX2K1G0FYpllOh2iTsPXZqnf9dWMcis3BL+pRdLeQY8lIdwwL01k/UV5LBdcVhZzg== - dependencies: - mem "^6.0.1" - mimic-fn "^3.0.0" - -p-queue@^6.3.0: - version "6.6.1" - resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-6.6.1.tgz#578891ada028a61371ec2692b26614d1b7d2b10a" - integrity sha512-miQiSxLYPYBxGkrldecZC18OTLjdUqnlRebGzPRiVxB8mco7usCmm7hFuxiTvp93K18JnLtE4KMMycjAu/cQQg== - dependencies: - eventemitter3 "^4.0.4" - p-timeout "^3.1.0" - -p-retry@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-4.2.0.tgz#ea9066c6b44f23cab4cd42f6147cdbbc6604da5d" - integrity sha512-jPH38/MRh263KKcq0wBNOGFJbm+U6784RilTmHjB/HM9kH9V8WlCpVUcdOmip9cjXOh6MxZ5yk1z2SjDUJfWmA== + "saslprep" "^1.0.0" + +"ms@^2.1.1": + "integrity" "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "resolved" "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" + "version" "2.1.2" + +"ms@2.0.0": + "integrity" "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "resolved" "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" + "version" "2.0.0" + +"ms@2.1.1": + "integrity" "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + "resolved" "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz" + "version" "2.1.1" + +"multibase@^0.7.0": + "integrity" "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==" + "resolved" "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz" + "version" "0.7.0" + dependencies: + "base-x" "^3.0.8" + "buffer" "^5.5.0" + +"multibase@~0.6.0": + "integrity" "sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==" + "resolved" "https://registry.npmjs.org/multibase/-/multibase-0.6.1.tgz" + "version" "0.6.1" + dependencies: + "base-x" "^3.0.8" + "buffer" "^5.5.0" + +"multicodec@^0.5.5": + "integrity" "sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==" + "resolved" "https://registry.npmjs.org/multicodec/-/multicodec-0.5.7.tgz" + "version" "0.5.7" + dependencies: + "varint" "^5.0.0" + +"multicodec@^1.0.0": + "integrity" "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==" + "resolved" "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz" + "version" "1.0.4" + dependencies: + "buffer" "^5.6.0" + "varint" "^5.0.0" + +"multihashes@^0.4.15", "multihashes@~0.4.15": + "integrity" "sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==" + "resolved" "https://registry.npmjs.org/multihashes/-/multihashes-0.4.21.tgz" + "version" "0.4.21" + dependencies: + "buffer" "^5.5.0" + "multibase" "^0.7.0" + "varint" "^5.0.0" + +"nano-json-stream-parser@^0.1.2": + "integrity" "sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18=" + "resolved" "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz" + "version" "0.1.2" + +"negotiator@0.6.2": + "integrity" "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + "resolved" "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz" + "version" "0.6.2" + +"next-tick@~1.0.0": + "integrity" "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + "resolved" "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz" + "version" "1.0.0" + +"node-addon-api@^2.0.0": + "integrity" "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" + "resolved" "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz" + "version" "2.0.2" + +"node-cron@^2.0.3": + "integrity" "sha512-eJI+QitXlwcgiZwNNSRbqsjeZMp5shyajMR81RZCqeW0ZDEj4zU9tpd4nTh/1JsBiKbF8d08FCewiipDmVIYjg==" + "resolved" "https://registry.npmjs.org/node-cron/-/node-cron-2.0.3.tgz" + "version" "2.0.3" + dependencies: + "opencollective-postinstall" "^2.0.0" + "tz-offset" "0.0.1" + +"node-fetch@^2.6.0", "node-fetch@^2.6.1": + "integrity" "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" + "resolved" "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz" + "version" "2.6.1" + +"node-gyp-build@^4.2.0": + "integrity" "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==" + "resolved" "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz" + "version" "4.2.3" + +"node-gyp-build@~3.7.0": + "integrity" "sha512-L/Eg02Epx6Si2NXmedx+Okg+4UHqmaf3TNcxd50SF9NQGcJaON3AtU++kax69XV7YWz4tUspqZSAsVofhFKG2w==" + "resolved" "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-3.7.0.tgz" + "version" "3.7.0" + +"node-schedule@^1.3.2": + "integrity" "sha512-GIND2pHMHiReSZSvS6dpZcDH7pGPGFfWBIEud6S00Q8zEIzAs9ommdyRK1ZbQt8y1LyZsJYZgPnyi7gpU2lcdw==" + "resolved" "https://registry.npmjs.org/node-schedule/-/node-schedule-1.3.2.tgz" + "version" "1.3.2" + dependencies: + "cron-parser" "^2.7.3" + "long-timeout" "0.1.1" + "sorted-array-functions" "^1.0.0" + +"normalize-url@^4.1.0": + "integrity" "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==" + "resolved" "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz" + "version" "4.5.0" + +"npm-run-path@^4.0.0": + "integrity" "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==" + "resolved" "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz" + "version" "4.0.1" + dependencies: + "path-key" "^3.0.0" + +"number-to-bn@1.7.0": + "integrity" "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=" + "resolved" "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz" + "version" "1.7.0" + dependencies: + "bn.js" "4.11.6" + "strip-hex-prefix" "1.0.0" + +"oauth-sign@~0.9.0": + "integrity" "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + "resolved" "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz" + "version" "0.9.0" + +"object-assign@^4", "object-assign@^4.1.0", "object-assign@^4.1.1": + "integrity" "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + "resolved" "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" + "version" "4.1.1" + +"object-hash@^1.1.7": + "integrity" "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==" + "resolved" "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz" + "version" "1.3.1" + +"object-inspect@^1.7.0", "object-inspect@^1.8.0": + "integrity" "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==" + "resolved" "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz" + "version" "1.8.0" + +"object-keys@^1.0.12", "object-keys@^1.1.1": + "integrity" "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + "resolved" "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz" + "version" "1.1.1" + +"object.assign@^4.1.0": + "version" "4.1.1" + dependencies: + "define-properties" "^1.1.3" + "es-abstract" "^1.18.0-next.0" + "has-symbols" "^1.0.1" + "object-keys" "^1.1.1" + +"object.fromentries@^2.0.2": + "integrity" "sha512-r3ZiBH7MQppDJVLx6fhD618GKNG40CZYH9wgwdhKxBDDbQgjeWGGd4AtkZad84d291YxvWe7bJGuE65Anh0dxQ==" + "resolved" "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.2.tgz" + "version" "2.0.2" + dependencies: + "define-properties" "^1.1.3" + "es-abstract" "^1.17.0-next.1" + "function-bind" "^1.1.1" + "has" "^1.0.3" + +"oboe@2.1.5": + "integrity" "sha1-VVQoTFQ6ImbXo48X4HOCH73jk80=" + "resolved" "https://registry.npmjs.org/oboe/-/oboe-2.1.5.tgz" + "version" "2.1.5" + dependencies: + "http-https" "^1.0.0" + +"on-finished@~2.3.0": + "integrity" "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=" + "resolved" "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz" + "version" "2.3.0" + dependencies: + "ee-first" "1.1.1" + +"once@^1.3.1", "once@^1.4.0": + "integrity" "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=" + "resolved" "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + "version" "1.4.0" + dependencies: + "wrappy" "1" + +"onetime@^5.1.0": + "integrity" "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==" + "resolved" "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz" + "version" "5.1.2" + dependencies: + "mimic-fn" "^2.1.0" + +"opencollective-postinstall@^2.0.0": + "integrity" "sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==" + "resolved" "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz" + "version" "2.0.3" + +"p-cancelable@^0.3.0": + "integrity" "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==" + "resolved" "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz" + "version" "0.3.0" + +"p-cancelable@^1.0.0": + "integrity" "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==" + "resolved" "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz" + "version" "1.1.0" + +"p-defer@^1.0.0": + "integrity" "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=" + "resolved" "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz" + "version" "1.0.0" + +"p-finally@^1.0.0": + "integrity" "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + "resolved" "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz" + "version" "1.0.0" + +"p-memoize@^4.0.0": + "integrity" "sha512-oMxCJKVS75Bf2RWtXJNQNaX2K1G0FYpllOh2iTsPXZqnf9dWMcis3BL+pRdLeQY8lIdwwL01k/UV5LBdcVhZzg==" + "resolved" "https://registry.npmjs.org/p-memoize/-/p-memoize-4.0.0.tgz" + "version" "4.0.0" + dependencies: + "mem" "^6.0.1" + "mimic-fn" "^3.0.0" + +"p-queue@^6.3.0": + "integrity" "sha512-miQiSxLYPYBxGkrldecZC18OTLjdUqnlRebGzPRiVxB8mco7usCmm7hFuxiTvp93K18JnLtE4KMMycjAu/cQQg==" + "resolved" "https://registry.npmjs.org/p-queue/-/p-queue-6.6.1.tgz" + "version" "6.6.1" + dependencies: + "eventemitter3" "^4.0.4" + "p-timeout" "^3.1.0" + +"p-retry@^4.2.0": + "integrity" "sha512-jPH38/MRh263KKcq0wBNOGFJbm+U6784RilTmHjB/HM9kH9V8WlCpVUcdOmip9cjXOh6MxZ5yk1z2SjDUJfWmA==" + "resolved" "https://registry.npmjs.org/p-retry/-/p-retry-4.2.0.tgz" + "version" "4.2.0" dependencies: "@types/retry" "^0.12.0" - retry "^0.12.0" - -p-timeout@^1.1.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386" - integrity sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y= - dependencies: - p-finally "^1.0.0" - -p-timeout@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe" - integrity sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg== - dependencies: - p-finally "^1.0.0" - -package-json@^6.3.0: - version "6.5.0" - resolved "https://registry.yarnpkg.com/package-json/-/package-json-6.5.0.tgz#6feedaca35e75725876d0b0e64974697fed145b0" - integrity sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ== - dependencies: - got "^9.6.0" - registry-auth-token "^4.0.0" - registry-url "^5.0.0" - semver "^6.2.0" - -pako@~1.0.2: - version "1.0.11" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" - integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== - -parent-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-2.0.0.tgz#fa71f88ff1a50c27e15d8ff74e0e3a9523bf8708" - integrity sha512-uo0Z9JJeWzv8BG+tRcapBKNJ0dro9cLyczGzulS6EfeyAdeC9sbojtW6XwvYxJkEne9En+J2XEl4zyglVeIwFg== - dependencies: - callsites "^3.1.0" - -parse-asn1@^5.0.0, parse-asn1@^5.1.5: - version "5.1.6" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.6.tgz#385080a3ec13cb62a62d39409cb3e88844cdaed4" - integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== - dependencies: - asn1.js "^5.2.0" - browserify-aes "^1.0.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - safe-buffer "^5.1.1" - -parse-headers@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.3.tgz#5e8e7512383d140ba02f0c7aa9f49b4399c92515" - integrity sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA== - -parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - -path-key@^3.0.0, path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= - -pbkdf2@^3.0.17, pbkdf2@^3.0.3: - version "3.1.1" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.1.tgz#cb8724b0fada984596856d1a6ebafd3584654b94" - integrity sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg== - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= - -please-upgrade-node@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942" - integrity sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg== - dependencies: - semver-compare "^1.0.0" - -portfinder@^1.0.25: - version "1.0.28" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.28.tgz#67c4622852bd5374dd1dd900f779f53462fac778" - integrity sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA== - dependencies: - async "^2.6.2" - debug "^3.1.1" - mkdirp "^0.5.5" - -prepend-http@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" - integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= - -prepend-http@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" - integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= - -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -process@~0.5.1: - version "0.5.2" - resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" - integrity sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8= - -proxy-addr@~2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf" - integrity sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw== - dependencies: - forwarded "~0.1.2" - ipaddr.js "1.9.1" - -psl@^1.1.28: - version "1.8.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" - integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== - -public-encrypt@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" - integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - safe-buffer "^5.1.2" - -pump@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= - -punycode@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" - integrity sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0= - -punycode@^2.1.0, punycode@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -pupa@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pupa/-/pupa-2.0.1.tgz#dbdc9ff48ffbea4a26a069b6f9f7abb051008726" - integrity sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA== - dependencies: - escape-goat "^2.0.0" - -qs@6.7.0: - version "6.7.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" - integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== - -qs@~6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== - -query-string@^5.0.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" - integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== - dependencies: - decode-uri-component "^0.2.0" - object-assign "^4.1.0" - strict-uri-encode "^1.0.0" - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= - -ramda@^0.27.1: - version "0.27.1" - resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.27.1.tgz#66fc2df3ef873874ffc2da6aa8984658abacf5c9" - integrity sha512-PgIdVpn5y5Yns8vqb8FzBUEYn98V3xcPgawAkkgj0YJ0qDsnHCiNmZYfOGMgOvoB0eWFLpYbhxUR3mxfDIMvpw== - -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -randomfill@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" - integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - -range-parser@~1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - -raw-body@2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" - integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== - dependencies: - bytes "3.1.0" - http-errors "1.7.2" - iconv-lite "0.4.24" - unpipe "1.0.0" - -rc@^1.2.8: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - -readable-stream@^2.3.5, readable-stream@~2.3.6: - version "2.3.7" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" - integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readable-stream@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -registry-auth-token@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.2.0.tgz#1d37dffda72bbecd0f581e4715540213a65eb7da" - integrity sha512-P+lWzPrsgfN+UEpDS3U8AQKg/UjZX6mQSJueZj3EK+vNESoqBSpBUD3gmu4sF9lOsjXWjF11dQKUqemf3veq1w== - dependencies: - rc "^1.2.8" - -registry-url@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-5.1.0.tgz#e98334b50d5434b81136b44ec638d9c2009c5009" - integrity sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw== - dependencies: - rc "^1.2.8" - -request@^2.79.0: - version "2.88.2" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" - integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.5.0" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -responselike@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" - integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= - dependencies: - lowercase-keys "^1.0.0" - -retry@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" - integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= - -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - -rlp@^2.2.3: - version "2.2.6" - resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.6.tgz#c80ba6266ac7a483ef1e69e8e2f056656de2fb2c" - integrity sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg== - dependencies: - bn.js "^4.11.1" - -safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -saslprep@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/saslprep/-/saslprep-1.0.3.tgz#4c02f946b56cf54297e347ba1093e7acac4cf226" - integrity sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag== - dependencies: - sparse-bitfield "^3.0.3" - -sax@1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" - integrity sha1-e45lYZCyKOgaZq6nSEgNgozS03o= - -sax@>=0.6.0: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== - -scrypt-js@^3.0.0, scrypt-js@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" - integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== - -secp256k1@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.2.tgz#15dd57d0f0b9fdb54ac1fa1694f40e5e9a54f4a1" - integrity sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg== - dependencies: - elliptic "^6.5.2" - node-addon-api "^2.0.0" - node-gyp-build "^4.2.0" - -semver-compare@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" - integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= - -semver-diff@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-3.1.1.tgz#05f77ce59f325e00e2706afd67bb506ddb1ca32b" - integrity sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg== - dependencies: - semver "^6.3.0" - -semver@^5.6.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -semver@^7.1.3: - version "7.3.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" - integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== - -send@0.17.1: - version "0.17.1" - resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" - integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "~1.7.2" - mime "1.6.0" - ms "2.1.1" - on-finished "~2.3.0" - range-parser "~1.2.1" - statuses "~1.5.0" - -serve-static@1.14.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" - integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.17.1" - -serverless-aws-documentation@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/serverless-aws-documentation/-/serverless-aws-documentation-1.1.0.tgz#e41d08de84d651f3db84348d926db369292731ff" - integrity sha512-b2iM1eZIWxQjAa6RNnARq+iXgiffbtSmKnZUh7l8KOkaD/BapqfOkKKi6MGxp3KxQFkW31sVsAiqJ0NQSSyXOw== - dependencies: - object-hash "^1.1.7" - -serverless-domain-manager@^4.2.0: - version "4.2.3" - resolved "https://registry.yarnpkg.com/serverless-domain-manager/-/serverless-domain-manager-4.2.3.tgz#634982b78e7ae3f49a3c0b1eefd720f73579297d" - integrity sha512-qZJwl98TQ6V0YtCnjywpdoruyFUdCprm55tUyF7Hecd5S3QJg5tovXCg2bTnmt0pieGHut4l9oqBdkcOPiGzjg== - dependencies: - aws-sdk "^2.755.0" - chalk "^2.4.2" - -serverless-export-swagger@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/serverless-export-swagger/-/serverless-export-swagger-2.0.0.tgz#3b4820384e8a4ed348370dcc260b8ab8cfb20dbe" - integrity sha512-X4Hi8tftfzyOF6nol122LyKwM4zWgrvdV9MP6gIuJ2XeMaQo5wkHgsi+rHnuWGjyVb4BpIL/BGOMWMpPK3j//A== - dependencies: - aws-sdk "^2.385.0" - -serverless-offline@^6.7.0: - version "6.7.0" - resolved "https://registry.yarnpkg.com/serverless-offline/-/serverless-offline-6.7.0.tgz#8873630e400e8f4314e12bb339d49ddb0dc1bce4" - integrity sha512-N/5vUk8PzSzViwRjeLIM/o5LYk6NudaSEoZRlwQFSGeLuQSHZuFUvNZlCSK3e4N3gs1CLKMP0Ks1H0/jHD/8gQ== + "retry" "^0.12.0" + +"p-timeout@^1.1.1": + "integrity" "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=" + "resolved" "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz" + "version" "1.2.1" + dependencies: + "p-finally" "^1.0.0" + +"p-timeout@^3.1.0": + "integrity" "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==" + "resolved" "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz" + "version" "3.2.0" + dependencies: + "p-finally" "^1.0.0" + +"package-json@^6.3.0": + "integrity" "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==" + "resolved" "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz" + "version" "6.5.0" + dependencies: + "got" "^9.6.0" + "registry-auth-token" "^4.0.0" + "registry-url" "^5.0.0" + "semver" "^6.2.0" + +"pako@~1.0.2": + "integrity" "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" + "resolved" "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz" + "version" "1.0.11" + +"parent-module@^2.0.0": + "integrity" "sha512-uo0Z9JJeWzv8BG+tRcapBKNJ0dro9cLyczGzulS6EfeyAdeC9sbojtW6XwvYxJkEne9En+J2XEl4zyglVeIwFg==" + "resolved" "https://registry.npmjs.org/parent-module/-/parent-module-2.0.0.tgz" + "version" "2.0.0" + dependencies: + "callsites" "^3.1.0" + +"parse-asn1@^5.0.0", "parse-asn1@^5.1.5": + "integrity" "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==" + "resolved" "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz" + "version" "5.1.6" + dependencies: + "asn1.js" "^5.2.0" + "browserify-aes" "^1.0.0" + "evp_bytestokey" "^1.0.0" + "pbkdf2" "^3.0.3" + "safe-buffer" "^5.1.1" + +"parse-headers@^2.0.0": + "integrity" "sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA==" + "resolved" "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.3.tgz" + "version" "2.0.3" + +"parseurl@~1.3.3": + "integrity" "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + "resolved" "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz" + "version" "1.3.3" + +"path-key@^3.0.0", "path-key@^3.1.0": + "integrity" "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + "resolved" "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" + "version" "3.1.1" + +"path-to-regexp@0.1.7": + "integrity" "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + "resolved" "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz" + "version" "0.1.7" + +"pbkdf2@^3.0.17", "pbkdf2@^3.0.3": + "integrity" "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==" + "resolved" "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz" + "version" "3.1.1" + dependencies: + "create-hash" "^1.1.2" + "create-hmac" "^1.1.4" + "ripemd160" "^2.0.1" + "safe-buffer" "^5.0.1" + "sha.js" "^2.4.8" + +"performance-now@^2.1.0": + "integrity" "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + "resolved" "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz" + "version" "2.1.0" + +"please-upgrade-node@^3.2.0": + "integrity" "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==" + "resolved" "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz" + "version" "3.2.0" + dependencies: + "semver-compare" "^1.0.0" + +"portfinder@^1.0.25": + "integrity" "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==" + "resolved" "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz" + "version" "1.0.28" + dependencies: + "async" "^2.6.2" + "debug" "^3.1.1" + "mkdirp" "^0.5.5" + +"prepend-http@^1.0.1": + "integrity" "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" + "resolved" "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz" + "version" "1.0.4" + +"prepend-http@^2.0.0": + "integrity" "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" + "resolved" "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz" + "version" "2.0.0" + +"process-nextick-args@~2.0.0": + "integrity" "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + "resolved" "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz" + "version" "2.0.1" + +"process@~0.5.1": + "integrity" "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=" + "resolved" "https://registry.npmjs.org/process/-/process-0.5.2.tgz" + "version" "0.5.2" + +"proxy-addr@~2.0.5": + "integrity" "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==" + "resolved" "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz" + "version" "2.0.6" + dependencies: + "forwarded" "~0.1.2" + "ipaddr.js" "1.9.1" + +"psl@^1.1.28": + "integrity" "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + "resolved" "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz" + "version" "1.8.0" + +"public-encrypt@^4.0.0": + "integrity" "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==" + "resolved" "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz" + "version" "4.0.3" + dependencies: + "bn.js" "^4.1.0" + "browserify-rsa" "^4.0.0" + "create-hash" "^1.1.0" + "parse-asn1" "^5.0.0" + "randombytes" "^2.0.1" + "safe-buffer" "^5.1.2" + +"pump@^3.0.0": + "integrity" "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==" + "resolved" "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz" + "version" "3.0.0" + dependencies: + "end-of-stream" "^1.1.0" + "once" "^1.3.1" + +"punycode@^2.1.0", "punycode@^2.1.1": + "integrity" "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + "resolved" "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz" + "version" "2.1.1" + +"punycode@1.3.2": + "integrity" "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + "resolved" "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz" + "version" "1.3.2" + +"punycode@2.1.0": + "integrity" "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=" + "resolved" "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz" + "version" "2.1.0" + +"pupa@^2.0.1": + "integrity" "sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA==" + "resolved" "https://registry.npmjs.org/pupa/-/pupa-2.0.1.tgz" + "version" "2.0.1" + dependencies: + "escape-goat" "^2.0.0" + +"qs@~6.5.2": + "integrity" "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + "resolved" "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz" + "version" "6.5.2" + +"qs@6.7.0": + "integrity" "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + "resolved" "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz" + "version" "6.7.0" + +"query-string@^5.0.1": + "integrity" "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==" + "resolved" "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz" + "version" "5.1.1" + dependencies: + "decode-uri-component" "^0.2.0" + "object-assign" "^4.1.0" + "strict-uri-encode" "^1.0.0" + +"querystring@0.2.0": + "integrity" "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + "resolved" "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz" + "version" "0.2.0" + +"ramda@^0.27.1": + "integrity" "sha512-PgIdVpn5y5Yns8vqb8FzBUEYn98V3xcPgawAkkgj0YJ0qDsnHCiNmZYfOGMgOvoB0eWFLpYbhxUR3mxfDIMvpw==" + "resolved" "https://registry.npmjs.org/ramda/-/ramda-0.27.1.tgz" + "version" "0.27.1" + +"randombytes@^2.0.0", "randombytes@^2.0.1", "randombytes@^2.0.5", "randombytes@^2.1.0": + "integrity" "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==" + "resolved" "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz" + "version" "2.1.0" + dependencies: + "safe-buffer" "^5.1.0" + +"randomfill@^1.0.3": + "integrity" "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==" + "resolved" "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz" + "version" "1.0.4" + dependencies: + "randombytes" "^2.0.5" + "safe-buffer" "^5.1.0" + +"range-parser@~1.2.1": + "integrity" "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + "resolved" "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz" + "version" "1.2.1" + +"raw-body@2.4.0": + "integrity" "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==" + "resolved" "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz" + "version" "2.4.0" + dependencies: + "bytes" "3.1.0" + "http-errors" "1.7.2" + "iconv-lite" "0.4.24" + "unpipe" "1.0.0" + +"rc@^1.2.8": + "integrity" "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==" + "resolved" "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz" + "version" "1.2.8" + dependencies: + "deep-extend" "^0.6.0" + "ini" "~1.3.0" + "minimist" "^1.2.0" + "strip-json-comments" "~2.0.1" + +"readable-stream@^2.3.5": + "integrity" "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==" + "resolved" "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz" + "version" "2.3.7" + dependencies: + "core-util-is" "~1.0.0" + "inherits" "~2.0.3" + "isarray" "~1.0.0" + "process-nextick-args" "~2.0.0" + "safe-buffer" "~5.1.1" + "string_decoder" "~1.1.1" + "util-deprecate" "~1.0.1" + +"readable-stream@^3.6.0": + "integrity" "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==" + "resolved" "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz" + "version" "3.6.0" + dependencies: + "inherits" "^2.0.3" + "string_decoder" "^1.1.1" + "util-deprecate" "^1.0.1" + +"readable-stream@~2.3.6": + "integrity" "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==" + "resolved" "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz" + "version" "2.3.7" + dependencies: + "core-util-is" "~1.0.0" + "inherits" "~2.0.3" + "isarray" "~1.0.0" + "process-nextick-args" "~2.0.0" + "safe-buffer" "~5.1.1" + "string_decoder" "~1.1.1" + "util-deprecate" "~1.0.1" + +"registry-auth-token@^4.0.0": + "integrity" "sha512-P+lWzPrsgfN+UEpDS3U8AQKg/UjZX6mQSJueZj3EK+vNESoqBSpBUD3gmu4sF9lOsjXWjF11dQKUqemf3veq1w==" + "resolved" "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.0.tgz" + "version" "4.2.0" + dependencies: + "rc" "^1.2.8" + +"registry-url@^5.0.0": + "integrity" "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==" + "resolved" "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz" + "version" "5.1.0" + dependencies: + "rc" "^1.2.8" + +"request@^2.79.0": + "integrity" "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==" + "resolved" "https://registry.npmjs.org/request/-/request-2.88.2.tgz" + "version" "2.88.2" + dependencies: + "aws-sign2" "~0.7.0" + "aws4" "^1.8.0" + "caseless" "~0.12.0" + "combined-stream" "~1.0.6" + "extend" "~3.0.2" + "forever-agent" "~0.6.1" + "form-data" "~2.3.2" + "har-validator" "~5.1.3" + "http-signature" "~1.2.0" + "is-typedarray" "~1.0.0" + "isstream" "~0.1.2" + "json-stringify-safe" "~5.0.1" + "mime-types" "~2.1.19" + "oauth-sign" "~0.9.0" + "performance-now" "^2.1.0" + "qs" "~6.5.2" + "safe-buffer" "^5.1.2" + "tough-cookie" "~2.5.0" + "tunnel-agent" "^0.6.0" + "uuid" "^3.3.2" + +"require_optional@^1.0.1": + "version" "1.0.1" + dependencies: + "resolve-from" "^2.0.0" + "semver" "^5.1.0" + +"resolve-from@^2.0.0": + "version" "2.0.0" + +"resolve-from@^5.0.0": + "integrity" "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==" + "resolved" "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz" + "version" "5.0.0" + +"responselike@^1.0.2": + "integrity" "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=" + "resolved" "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz" + "version" "1.0.2" + dependencies: + "lowercase-keys" "^1.0.0" + +"retry@^0.12.0": + "integrity" "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=" + "resolved" "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz" + "version" "0.12.0" + +"ripemd160@^2.0.0", "ripemd160@^2.0.1": + "integrity" "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==" + "resolved" "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz" + "version" "2.0.2" + dependencies: + "hash-base" "^3.0.0" + "inherits" "^2.0.1" + +"rlp@^2.2.3": + "integrity" "sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg==" + "resolved" "https://registry.npmjs.org/rlp/-/rlp-2.2.6.tgz" + "version" "2.2.6" + dependencies: + "bn.js" "^4.11.1" + +"safe-buffer@^5.0.1", "safe-buffer@^5.1.0", "safe-buffer@^5.1.1", "safe-buffer@^5.1.2", "safe-buffer@~5.1.0", "safe-buffer@~5.1.1", "safe-buffer@5.1.2": + "integrity" "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "resolved" "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" + "version" "5.1.2" + +"safe-buffer@^5.2.0": + "integrity" "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + "resolved" "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" + "version" "5.2.1" + +"safe-buffer@~5.2.0": + "integrity" "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + "resolved" "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" + "version" "5.2.1" + +"safer-buffer@^2.0.2", "safer-buffer@^2.1.0", "safer-buffer@>= 2.1.2 < 3", "safer-buffer@~2.1.0": + "integrity" "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "resolved" "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" + "version" "2.1.2" + +"saslprep@^1.0.0": + "integrity" "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==" + "resolved" "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz" + "version" "1.0.3" + dependencies: + "sparse-bitfield" "^3.0.3" + +"sax@>=0.6.0", "sax@1.2.1": + "integrity" "sha1-e45lYZCyKOgaZq6nSEgNgozS03o=" + "resolved" "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz" + "version" "1.2.1" + +"scrypt-js@^3.0.0", "scrypt-js@^3.0.1": + "integrity" "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" + "resolved" "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz" + "version" "3.0.1" + +"secp256k1@^4.0.1": + "integrity" "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==" + "resolved" "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz" + "version" "4.0.2" + dependencies: + "elliptic" "^6.5.2" + "node-addon-api" "^2.0.0" + "node-gyp-build" "^4.2.0" + +"semver-compare@^1.0.0": + "integrity" "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=" + "resolved" "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz" + "version" "1.0.0" + +"semver-diff@^3.1.1": + "integrity" "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==" + "resolved" "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz" + "version" "3.1.1" + dependencies: + "semver" "^6.3.0" + +"semver@^5.1.0": + "version" "5.7.1" + +"semver@^5.6.0": + "integrity" "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "resolved" "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz" + "version" "5.7.1" + +"semver@^6.0.0": + "integrity" "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "resolved" "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" + "version" "6.3.0" + +"semver@^6.2.0": + "integrity" "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "resolved" "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" + "version" "6.3.0" + +"semver@^6.3.0": + "integrity" "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "resolved" "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" + "version" "6.3.0" + +"semver@^7.1.3": + "integrity" "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==" + "resolved" "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz" + "version" "7.3.2" + +"send@0.17.1": + "integrity" "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==" + "resolved" "https://registry.npmjs.org/send/-/send-0.17.1.tgz" + "version" "0.17.1" + dependencies: + "debug" "2.6.9" + "depd" "~1.1.2" + "destroy" "~1.0.4" + "encodeurl" "~1.0.2" + "escape-html" "~1.0.3" + "etag" "~1.8.1" + "fresh" "0.5.2" + "http-errors" "~1.7.2" + "mime" "1.6.0" + "ms" "2.1.1" + "on-finished" "~2.3.0" + "range-parser" "~1.2.1" + "statuses" "~1.5.0" + +"serve-static@1.14.1": + "integrity" "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==" + "resolved" "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz" + "version" "1.14.1" + dependencies: + "encodeurl" "~1.0.2" + "escape-html" "~1.0.3" + "parseurl" "~1.3.3" + "send" "0.17.1" + +"serverless-aws-documentation@^1.1.0": + "integrity" "sha512-b2iM1eZIWxQjAa6RNnARq+iXgiffbtSmKnZUh7l8KOkaD/BapqfOkKKi6MGxp3KxQFkW31sVsAiqJ0NQSSyXOw==" + "resolved" "https://registry.npmjs.org/serverless-aws-documentation/-/serverless-aws-documentation-1.1.0.tgz" + "version" "1.1.0" + dependencies: + "object-hash" "^1.1.7" + +"serverless-domain-manager@^4.2.0": + "version" "4.2.0" + dependencies: + "aws-sdk" "^2.490.0" + "chalk" "^2.4.1" + +"serverless-export-swagger@^2.0.0": + "integrity" "sha512-X4Hi8tftfzyOF6nol122LyKwM4zWgrvdV9MP6gIuJ2XeMaQo5wkHgsi+rHnuWGjyVb4BpIL/BGOMWMpPK3j//A==" + "resolved" "https://registry.npmjs.org/serverless-export-swagger/-/serverless-export-swagger-2.0.0.tgz" + "version" "2.0.0" + dependencies: + "aws-sdk" "^2.385.0" + +"serverless-offline@^6.7.0": + "integrity" "sha512-N/5vUk8PzSzViwRjeLIM/o5LYk6NudaSEoZRlwQFSGeLuQSHZuFUvNZlCSK3e4N3gs1CLKMP0Ks1H0/jHD/8gQ==" + "resolved" "https://registry.npmjs.org/serverless-offline/-/serverless-offline-6.7.0.tgz" + "version" "6.7.0" dependencies: "@hapi/boom" "^7.4.11" "@hapi/h2o2" "^8.3.2" "@hapi/hapi" "^18.4.1" - aws-sdk "^2.624.0" - boxen "^4.2.0" - chalk "^3.0.0" - clear-module "^4.1.1" - cuid "^2.1.8" - execa "^4.0.0" - extend "^3.0.2" - fs-extra "^8.1.0" - java-invoke-local "0.0.6" - js-string-escape "^1.0.1" - jsonpath-plus "^3.0.0" - jsonschema "^1.2.6" - jsonwebtoken "^8.5.1" - jszip "^3.2.2" - luxon "^1.22.0" - node-fetch "^2.6.0" - node-schedule "^1.3.2" - object.fromentries "^2.0.2" - p-memoize "^4.0.0" - p-queue "^6.3.0" - p-retry "^4.2.0" - please-upgrade-node "^3.2.0" - portfinder "^1.0.25" - semver "^7.1.3" - update-notifier "^4.1.0" - velocityjs "^2.0.0" - ws "^7.2.1" - -servify@^0.1.12: - version "0.1.12" - resolved "https://registry.yarnpkg.com/servify/-/servify-0.1.12.tgz#142ab7bee1f1d033b66d0707086085b17c06db95" - integrity sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw== - dependencies: - body-parser "^1.16.0" - cors "^2.8.1" - express "^4.14.0" - request "^2.79.0" - xhr "^2.3.3" - -set-immediate-shim@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" - integrity sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E= - -setimmediate@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= - -setprototypeof@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" - integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== - -sha.js@^2.4.0, sha.js@^2.4.8: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -signal-exit@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" - integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== - -simple-concat@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" - integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== - -simple-get@^2.7.0: - version "2.8.1" - resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-2.8.1.tgz#0e22e91d4575d87620620bc91308d57a77f44b5d" - integrity sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw== - dependencies: - decompress-response "^3.3.0" - once "^1.3.1" - simple-concat "^1.0.0" - -sorted-array-functions@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/sorted-array-functions/-/sorted-array-functions-1.3.0.tgz#8605695563294dffb2c9796d602bd8459f7a0dd5" - integrity sha512-2sqgzeFlid6N4Z2fUQ1cvFmTOLRi/sEDzSQ0OKYchqgoPmQBVyM3959qYx3fpS6Esef80KjmpgPeEr028dP3OA== - -sparse-bitfield@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz#ff4ae6e68656056ba4b3e792ab3334d38273ca11" - integrity sha1-/0rm5oZWBWuks+eSqzM004JzyhE= - dependencies: - memory-pager "^1.0.2" - -sshpk@^1.7.0: - version "1.16.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" - integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - -"statuses@>= 1.5.0 < 2", statuses@~1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= - -strict-uri-encode@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" - integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= - -string-width@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" - integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== - dependencies: - emoji-regex "^7.0.1" - is-fullwidth-code-point "^2.0.0" - strip-ansi "^5.1.0" - -string-width@^4.0.0, string-width@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" - integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.0" - -string.prototype.trimend@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913" - integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" - -string.prototype.trimend@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80" - integrity sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - -string.prototype.trimstart@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" - integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" - -string.prototype.trimstart@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed" - integrity sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== - dependencies: - ansi-regex "^4.1.0" - -strip-ansi@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" - integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== - dependencies: - ansi-regex "^5.0.0" - -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - -strip-hex-prefix@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" - integrity sha1-DF8VX+8RUTczd96du1iNoFUA428= - dependencies: - is-hex-prefixed "1.0.0" - -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -swagger-ui-dist@^3.18.1: - version "3.51.0" - resolved "https://registry.yarnpkg.com/swagger-ui-dist/-/swagger-ui-dist-3.51.0.tgz#69ac8dcf540d189601f479c6fb2d7d5462756867" - integrity sha512-DX8RuAyXBjd2J4mjCLLUaodbtZ2z6dF05l6IF3hO++erXM+CR3QVX9TqYX3374hW5BOeLrr7gujoSdY8jIvI2A== - -swagger-ui-express@^4.1.6: - version "4.1.6" - resolved "https://registry.yarnpkg.com/swagger-ui-express/-/swagger-ui-express-4.1.6.tgz#682294af3d5c70f74a1fa4d6a9b503a9ee55ea82" - integrity sha512-Xs2BGGudvDBtL7RXcYtNvHsFtP1DBFPMJFRxHe5ez/VG/rzVOEjazJOOSc/kSCyxreCTKfJrII6MJlL9a6t8vw== - dependencies: - swagger-ui-dist "^3.18.1" - -swarm-js@^0.1.40: - version "0.1.40" - resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.40.tgz#b1bc7b6dcc76061f6c772203e004c11997e06b99" - integrity sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA== - dependencies: - bluebird "^3.5.0" - buffer "^5.0.5" - eth-lib "^0.1.26" - fs-extra "^4.0.2" - got "^7.1.0" - mime-types "^2.1.16" - mkdirp-promise "^5.0.1" - mock-fs "^4.1.0" - setimmediate "^1.0.5" - tar "^4.0.2" - xhr-request "^1.0.1" - -tar@^4.0.2: - version "4.4.13" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" - integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== - dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.8.6" - minizlib "^1.2.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.3" - -term-size@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/term-size/-/term-size-2.2.0.tgz#1f16adedfe9bdc18800e1776821734086fcc6753" - integrity sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw== - -timed-out@^4.0.0, timed-out@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" - integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= - -to-readable-stream@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771" - integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== - -toidentifier@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" - integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== - -tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= - dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= - -type-fest@^0.8.1: - version "0.8.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" - integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== - -type-is@~1.6.17, type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - -type@^1.0.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" - integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== - -type@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/type/-/type-2.1.0.tgz#9bdc22c648cf8cf86dd23d32336a41cfb6475e3f" - integrity sha512-G9absDWvhAWCV2gmF1zKud3OyC61nZDwWvBL2DApaVFogI07CprggiQAOOjvp2NRjYWFzPyu7vwtDrQFq8jeSA== - -typedarray-to-buffer@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" - integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== - dependencies: - is-typedarray "^1.0.0" - -tz-offset@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/tz-offset/-/tz-offset-0.0.1.tgz#fef920257024d3583ed9072a767721a18bdb8a76" - integrity sha512-kMBmblijHJXyOpKzgDhKx9INYU4u4E1RPMB0HqmKSgWG8vEcf3exEfLh4FFfzd3xdQOw9EuIy/cP0akY6rHopQ== - -ultron@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" - integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== - -unbox-primitive@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471" - integrity sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw== - dependencies: - function-bind "^1.1.1" - has-bigints "^1.0.1" - has-symbols "^1.0.2" - which-boxed-primitive "^1.0.2" - -underscore@1.12.1: - version "1.12.1" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.12.1.tgz#7bb8cc9b3d397e201cf8553336d262544ead829e" - integrity sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw== - -unique-string@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d" - integrity sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg== - dependencies: - crypto-random-string "^2.0.0" - -universalify@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= - -update-notifier@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-4.1.1.tgz#895fc8562bbe666179500f9f2cebac4f26323746" - integrity sha512-9y+Kds0+LoLG6yN802wVXoIfxYEwh3FlZwzMwpCZp62S2i1/Jzeqb9Eeeju3NSHccGGasfGlK5/vEHbAifYRDg== - dependencies: - boxen "^4.2.0" - chalk "^3.0.0" - configstore "^5.0.1" - has-yarn "^2.1.0" - import-lazy "^2.1.0" - is-ci "^2.0.0" - is-installed-globally "^0.3.1" - is-npm "^4.0.0" - is-yarn-global "^0.3.0" - latest-version "^5.0.0" - pupa "^2.0.1" - semver-diff "^3.1.1" - xdg-basedir "^4.0.0" - -uri-js@^4.2.2: - version "4.4.0" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.0.tgz#aa714261de793e8a82347a7bcc9ce74e86f28602" - integrity sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g== - dependencies: - punycode "^2.1.0" - -url-parse-lax@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" - integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM= - dependencies: - prepend-http "^1.0.1" - -url-parse-lax@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" - integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= - dependencies: - prepend-http "^2.0.0" - -url-set-query@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/url-set-query/-/url-set-query-1.0.0.tgz#016e8cfd7c20ee05cafe7795e892bd0702faa339" - integrity sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk= - -url-to-options@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" - integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= - -url@0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/url/-/url-0.10.3.tgz#021e4d9c7705f21bbf37d03ceb58767402774c64" - integrity sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ= - dependencies: - punycode "1.3.2" - querystring "0.2.0" - -utf-8-validate@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.2.tgz#63cfbccd85dc1f2b66cf7a1d0eebc08ed056bfb3" - integrity sha512-SwV++i2gTD5qh2XqaPzBnNX88N6HdyhQrNNRykvcS0QKvItV9u3vPEJr+X5Hhfb1JC0r0e1alL0iB09rY8+nmw== - dependencies: - node-gyp-build "~3.7.0" - -utf8@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" - integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== - -util-deprecate@^1.0.1, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - -util@^0.12.0: - version "0.12.4" - resolved "https://registry.yarnpkg.com/util/-/util-0.12.4.tgz#66121a31420df8f01ca0c464be15dfa1d1850253" - integrity sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw== - dependencies: - inherits "^2.0.3" - is-arguments "^1.0.4" - is-generator-function "^1.0.7" - is-typed-array "^1.1.3" - safe-buffer "^5.1.2" - which-typed-array "^1.1.2" - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= - -uuid@3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" - integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== - -uuid@^3.3.2: - version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - -varint@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.0.tgz#d826b89f7490732fabc0c0ed693ed475dcb29ebf" - integrity sha1-2Ca4n3SQcy+rwMDtaT7Uddyynr8= - -vary@^1, vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= - -velocityjs@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/velocityjs/-/velocityjs-2.0.1.tgz#078c73d22a53f085cf3a52a56a8271c820ac23dd" - integrity sha512-KXVGRAOPCm8DhMdrhHqXyELIZNs3CTe2Vz1Kg09zzSycEmE9VzjiSnG50n3rs3FuiL9ek7c36sYJg+R+8EO2Zg== - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -web3-bzz@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.3.6.tgz#95f370aecc3ff6ad07f057e6c0c916ef09b04dde" - integrity sha512-ibHdx1wkseujFejrtY7ZyC0QxQ4ATXjzcNUpaLrvM6AEae8prUiyT/OloG9FWDgFD2CPLwzKwfSQezYQlANNlw== + "aws-sdk" "^2.624.0" + "boxen" "^4.2.0" + "chalk" "^3.0.0" + "clear-module" "^4.1.1" + "cuid" "^2.1.8" + "execa" "^4.0.0" + "extend" "^3.0.2" + "fs-extra" "^8.1.0" + "java-invoke-local" "0.0.6" + "js-string-escape" "^1.0.1" + "jsonpath-plus" "^3.0.0" + "jsonschema" "^1.2.6" + "jsonwebtoken" "^8.5.1" + "jszip" "^3.2.2" + "luxon" "^1.22.0" + "node-fetch" "^2.6.0" + "node-schedule" "^1.3.2" + "object.fromentries" "^2.0.2" + "p-memoize" "^4.0.0" + "p-queue" "^6.3.0" + "p-retry" "^4.2.0" + "please-upgrade-node" "^3.2.0" + "portfinder" "^1.0.25" + "semver" "^7.1.3" + "update-notifier" "^4.1.0" + "velocityjs" "^2.0.0" + "ws" "^7.2.1" + +"servify@^0.1.12": + "integrity" "sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==" + "resolved" "https://registry.npmjs.org/servify/-/servify-0.1.12.tgz" + "version" "0.1.12" + dependencies: + "body-parser" "^1.16.0" + "cors" "^2.8.1" + "express" "^4.14.0" + "request" "^2.79.0" + "xhr" "^2.3.3" + +"set-immediate-shim@~1.0.1": + "integrity" "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" + "resolved" "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz" + "version" "1.0.1" + +"setimmediate@^1.0.5": + "integrity" "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + "resolved" "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz" + "version" "1.0.5" + +"setprototypeof@1.1.1": + "integrity" "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + "resolved" "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz" + "version" "1.1.1" + +"sha.js@^2.4.0", "sha.js@^2.4.8": + "integrity" "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==" + "resolved" "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz" + "version" "2.4.11" + dependencies: + "inherits" "^2.0.1" + "safe-buffer" "^5.0.1" + +"shebang-command@^2.0.0": + "integrity" "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==" + "resolved" "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" + "version" "2.0.0" + dependencies: + "shebang-regex" "^3.0.0" + +"shebang-regex@^3.0.0": + "integrity" "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + "resolved" "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" + "version" "3.0.0" + +"signal-exit@^3.0.2": + "integrity" "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" + "resolved" "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz" + "version" "3.0.3" + +"simple-concat@^1.0.0": + "integrity" "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" + "resolved" "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz" + "version" "1.0.1" + +"simple-get@^2.7.0": + "integrity" "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==" + "resolved" "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz" + "version" "2.8.1" + dependencies: + "decompress-response" "^3.3.0" + "once" "^1.3.1" + "simple-concat" "^1.0.0" + +"sorted-array-functions@^1.0.0": + "integrity" "sha512-2sqgzeFlid6N4Z2fUQ1cvFmTOLRi/sEDzSQ0OKYchqgoPmQBVyM3959qYx3fpS6Esef80KjmpgPeEr028dP3OA==" + "resolved" "https://registry.npmjs.org/sorted-array-functions/-/sorted-array-functions-1.3.0.tgz" + "version" "1.3.0" + +"sparse-bitfield@^3.0.3": + "integrity" "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=" + "resolved" "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz" + "version" "3.0.3" + dependencies: + "memory-pager" "^1.0.2" + +"sshpk@^1.7.0": + "integrity" "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==" + "resolved" "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz" + "version" "1.16.1" + dependencies: + "asn1" "~0.2.3" + "assert-plus" "^1.0.0" + "bcrypt-pbkdf" "^1.0.0" + "dashdash" "^1.12.0" + "ecc-jsbn" "~0.1.1" + "getpass" "^0.1.1" + "jsbn" "~0.1.0" + "safer-buffer" "^2.0.2" + "tweetnacl" "~0.14.0" + +"statuses@>= 1.5.0 < 2", "statuses@~1.5.0": + "integrity" "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + "resolved" "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz" + "version" "1.5.0" + +"strict-uri-encode@^1.0.0": + "integrity" "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" + "resolved" "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz" + "version" "1.1.0" + +"string_decoder@^1.1.1": + "integrity" "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==" + "resolved" "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" + "version" "1.3.0" + dependencies: + "safe-buffer" "~5.2.0" + +"string_decoder@~1.1.1": + "integrity" "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==" + "resolved" "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" + "version" "1.1.1" + dependencies: + "safe-buffer" "~5.1.0" + +"string-width@^3.0.0": + "integrity" "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==" + "resolved" "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz" + "version" "3.1.0" + dependencies: + "emoji-regex" "^7.0.1" + "is-fullwidth-code-point" "^2.0.0" + "strip-ansi" "^5.1.0" + +"string-width@^4.0.0", "string-width@^4.1.0": + "integrity" "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==" + "resolved" "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz" + "version" "4.2.0" + dependencies: + "emoji-regex" "^8.0.0" + "is-fullwidth-code-point" "^3.0.0" + "strip-ansi" "^6.0.0" + +"string.prototype.trimend@^1.0.1": + "integrity" "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==" + "resolved" "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "define-properties" "^1.1.3" + "es-abstract" "^1.17.5" + +"string.prototype.trimstart@^1.0.1": + "integrity" "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==" + "resolved" "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz" + "version" "1.0.1" + dependencies: + "define-properties" "^1.1.3" + "es-abstract" "^1.17.5" + +"strip-ansi@^5.1.0": + "integrity" "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==" + "resolved" "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz" + "version" "5.2.0" + dependencies: + "ansi-regex" "^4.1.0" + +"strip-ansi@^6.0.0": + "integrity" "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==" + "resolved" "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz" + "version" "6.0.0" + dependencies: + "ansi-regex" "^5.0.0" + +"strip-final-newline@^2.0.0": + "integrity" "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==" + "resolved" "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz" + "version" "2.0.0" + +"strip-hex-prefix@1.0.0": + "integrity" "sha1-DF8VX+8RUTczd96du1iNoFUA428=" + "resolved" "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz" + "version" "1.0.0" + dependencies: + "is-hex-prefixed" "1.0.0" + +"strip-json-comments@~2.0.1": + "integrity" "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + "resolved" "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz" + "version" "2.0.1" + +"supports-color@^5.3.0": + "integrity" "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==" + "resolved" "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" + "version" "5.5.0" + dependencies: + "has-flag" "^3.0.0" + +"supports-color@^7.1.0": + "integrity" "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==" + "resolved" "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" + "version" "7.2.0" + dependencies: + "has-flag" "^4.0.0" + +"swagger-ui-dist@^3.18.1": + "version" "3.48.0" + +"swagger-ui-express@^4.1.6": + "integrity" "sha512-Xs2BGGudvDBtL7RXcYtNvHsFtP1DBFPMJFRxHe5ez/VG/rzVOEjazJOOSc/kSCyxreCTKfJrII6MJlL9a6t8vw==" + "resolved" "https://registry.npmjs.org/swagger-ui-express/-/swagger-ui-express-4.1.6.tgz" + "version" "4.1.6" + dependencies: + "swagger-ui-dist" "^3.18.1" + +"swarm-js@^0.1.40": + "integrity" "sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA==" + "resolved" "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.40.tgz" + "version" "0.1.40" + dependencies: + "bluebird" "^3.5.0" + "buffer" "^5.0.5" + "eth-lib" "^0.1.26" + "fs-extra" "^4.0.2" + "got" "^7.1.0" + "mime-types" "^2.1.16" + "mkdirp-promise" "^5.0.1" + "mock-fs" "^4.1.0" + "setimmediate" "^1.0.5" + "tar" "^4.0.2" + "xhr-request" "^1.0.1" + +"tar@^4.0.2": + "integrity" "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==" + "resolved" "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz" + "version" "4.4.13" + dependencies: + "chownr" "^1.1.1" + "fs-minipass" "^1.2.5" + "minipass" "^2.8.6" + "minizlib" "^1.2.1" + "mkdirp" "^0.5.0" + "safe-buffer" "^5.1.2" + "yallist" "^3.0.3" + +"term-size@^2.1.0": + "integrity" "sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw==" + "resolved" "https://registry.npmjs.org/term-size/-/term-size-2.2.0.tgz" + "version" "2.2.0" + +"timed-out@^4.0.0", "timed-out@^4.0.1": + "integrity" "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" + "resolved" "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz" + "version" "4.0.1" + +"to-readable-stream@^1.0.0": + "integrity" "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==" + "resolved" "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz" + "version" "1.0.0" + +"toidentifier@1.0.0": + "integrity" "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + "resolved" "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz" + "version" "1.0.0" + +"tough-cookie@~2.5.0": + "integrity" "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==" + "resolved" "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz" + "version" "2.5.0" + dependencies: + "psl" "^1.1.28" + "punycode" "^2.1.1" + +"tunnel-agent@^0.6.0": + "integrity" "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=" + "resolved" "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz" + "version" "0.6.0" + dependencies: + "safe-buffer" "^5.0.1" + +"tweetnacl@^0.14.3", "tweetnacl@~0.14.0": + "integrity" "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + "resolved" "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz" + "version" "0.14.5" + +"type-fest@^0.8.1": + "integrity" "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" + "resolved" "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz" + "version" "0.8.1" + +"type-is@~1.6.17", "type-is@~1.6.18": + "integrity" "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==" + "resolved" "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz" + "version" "1.6.18" + dependencies: + "media-typer" "0.3.0" + "mime-types" "~2.1.24" + +"type@^1.0.1": + "integrity" "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + "resolved" "https://registry.npmjs.org/type/-/type-1.2.0.tgz" + "version" "1.2.0" + +"type@^2.0.0": + "integrity" "sha512-G9absDWvhAWCV2gmF1zKud3OyC61nZDwWvBL2DApaVFogI07CprggiQAOOjvp2NRjYWFzPyu7vwtDrQFq8jeSA==" + "resolved" "https://registry.npmjs.org/type/-/type-2.1.0.tgz" + "version" "2.1.0" + +"typedarray-to-buffer@^3.1.5": + "integrity" "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==" + "resolved" "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz" + "version" "3.1.5" + dependencies: + "is-typedarray" "^1.0.0" + +"tz-offset@0.0.1": + "integrity" "sha512-kMBmblijHJXyOpKzgDhKx9INYU4u4E1RPMB0HqmKSgWG8vEcf3exEfLh4FFfzd3xdQOw9EuIy/cP0akY6rHopQ==" + "resolved" "https://registry.npmjs.org/tz-offset/-/tz-offset-0.0.1.tgz" + "version" "0.0.1" + +"ultron@~1.1.0": + "integrity" "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" + "resolved" "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz" + "version" "1.1.1" + +"underscore@1.9.1": + "version" "1.9.1" + +"unique-string@^2.0.0": + "integrity" "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==" + "resolved" "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz" + "version" "2.0.0" + dependencies: + "crypto-random-string" "^2.0.0" + +"universalify@^0.1.0": + "integrity" "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + "resolved" "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz" + "version" "0.1.2" + +"unpipe@~1.0.0", "unpipe@1.0.0": + "integrity" "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + "resolved" "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" + "version" "1.0.0" + +"update-notifier@^4.1.0": + "integrity" "sha512-9y+Kds0+LoLG6yN802wVXoIfxYEwh3FlZwzMwpCZp62S2i1/Jzeqb9Eeeju3NSHccGGasfGlK5/vEHbAifYRDg==" + "resolved" "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.1.tgz" + "version" "4.1.1" + dependencies: + "boxen" "^4.2.0" + "chalk" "^3.0.0" + "configstore" "^5.0.1" + "has-yarn" "^2.1.0" + "import-lazy" "^2.1.0" + "is-ci" "^2.0.0" + "is-installed-globally" "^0.3.1" + "is-npm" "^4.0.0" + "is-yarn-global" "^0.3.0" + "latest-version" "^5.0.0" + "pupa" "^2.0.1" + "semver-diff" "^3.1.1" + "xdg-basedir" "^4.0.0" + +"uri-js@^4.2.2": + "integrity" "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==" + "resolved" "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz" + "version" "4.4.0" + dependencies: + "punycode" "^2.1.0" + +"url-parse-lax@^1.0.0": + "integrity" "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=" + "resolved" "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz" + "version" "1.0.0" + dependencies: + "prepend-http" "^1.0.1" + +"url-parse-lax@^3.0.0": + "integrity" "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=" + "resolved" "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz" + "version" "3.0.0" + dependencies: + "prepend-http" "^2.0.0" + +"url-set-query@^1.0.0": + "integrity" "sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk=" + "resolved" "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz" + "version" "1.0.0" + +"url-to-options@^1.0.1": + "integrity" "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=" + "resolved" "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz" + "version" "1.0.1" + +"url@0.10.3": + "integrity" "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=" + "resolved" "https://registry.npmjs.org/url/-/url-0.10.3.tgz" + "version" "0.10.3" + dependencies: + "punycode" "1.3.2" + "querystring" "0.2.0" + +"utf-8-validate@^5.0.2": + "integrity" "sha512-SwV++i2gTD5qh2XqaPzBnNX88N6HdyhQrNNRykvcS0QKvItV9u3vPEJr+X5Hhfb1JC0r0e1alL0iB09rY8+nmw==" + "resolved" "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.2.tgz" + "version" "5.0.2" + dependencies: + "node-gyp-build" "~3.7.0" + +"utf8@3.0.0": + "integrity" "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==" + "resolved" "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz" + "version" "3.0.0" + +"util-deprecate@^1.0.1", "util-deprecate@~1.0.1": + "integrity" "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "resolved" "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + "version" "1.0.2" + +"utils-merge@1.0.1": + "integrity" "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + "resolved" "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz" + "version" "1.0.1" + +"uuid@^3.3.2": + "integrity" "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + "resolved" "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz" + "version" "3.4.0" + +"uuid@3.3.2": + "integrity" "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + "resolved" "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz" + "version" "3.3.2" + +"varint@^5.0.0": + "integrity" "sha1-2Ca4n3SQcy+rwMDtaT7Uddyynr8=" + "resolved" "https://registry.npmjs.org/varint/-/varint-5.0.0.tgz" + "version" "5.0.0" + +"vary@^1", "vary@~1.1.2": + "integrity" "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + "resolved" "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz" + "version" "1.1.2" + +"velocityjs@^2.0.0": + "integrity" "sha512-KXVGRAOPCm8DhMdrhHqXyELIZNs3CTe2Vz1Kg09zzSycEmE9VzjiSnG50n3rs3FuiL9ek7c36sYJg+R+8EO2Zg==" + "resolved" "https://registry.npmjs.org/velocityjs/-/velocityjs-2.0.1.tgz" + "version" "2.0.1" + +"verror@1.10.0": + "integrity" "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=" + "resolved" "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz" + "version" "1.10.0" + dependencies: + "assert-plus" "^1.0.0" + "core-util-is" "1.0.2" + "extsprintf" "^1.2.0" + +"web3-bzz@1.3.0": + "version" "1.3.0" dependencies: "@types/node" "^12.12.6" - got "9.6.0" - swarm-js "^0.1.40" - underscore "1.12.1" + "got" "9.6.0" + "swarm-js" "^0.1.40" + "underscore" "1.9.1" -web3-core-helpers@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.3.6.tgz#c478246a9abe4e5456acf42657dac2f7c330be74" - integrity sha512-nhtjA2ZbkppjlxTSwG0Ttu6FcPkVu1rCN5IFAOVpF/L0SEt+jy+O5l90+cjDq0jAYvlBwUwnbh2mR9hwDEJCNA== +"web3-core-helpers@1.3.0": + "version" "1.3.0" dependencies: - underscore "1.12.1" - web3-eth-iban "1.3.6" - web3-utils "1.3.6" + "underscore" "1.9.1" + "web3-eth-iban" "1.3.0" + "web3-utils" "1.3.0" -web3-core-method@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.3.6.tgz#4b0334edd94b03dfec729d113c69a4eb6ebc68ae" - integrity sha512-RyegqVGxn0cyYW5yzAwkPlsSEynkdPiegd7RxgB4ak1eKk2Cv1q2x4C7D2sZjeeCEF+q6fOkVmo2OZNqS2iQxg== +"web3-core-method@1.3.0": + "version" "1.3.0" dependencies: "@ethersproject/transactions" "^5.0.0-beta.135" - underscore "1.12.1" - web3-core-helpers "1.3.6" - web3-core-promievent "1.3.6" - web3-core-subscriptions "1.3.6" - web3-utils "1.3.6" - -web3-core-promievent@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.3.6.tgz#6c27dc79de8f71b74f5d17acaf9aaf593d3cb0c9" - integrity sha512-Z+QzfyYDTXD5wJmZO5wwnRO8bAAHEItT1XNSPVb4J1CToV/I/SbF7CuF8Uzh2jns0Cm1109o666H7StFFvzVKw== - dependencies: - eventemitter3 "4.0.4" - -web3-core-requestmanager@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.3.6.tgz#4fea269fe913fd4fca464b4f7c65cb94857b5b2a" - integrity sha512-2rIaeuqeo7QN1Eex7aXP0ZqeteJEPWXYFS/M3r3LXMiV8R4STQBKE+//dnHJXoo2ctzEB5cgd+7NaJM8S3gPyA== - dependencies: - underscore "1.12.1" - util "^0.12.0" - web3-core-helpers "1.3.6" - web3-providers-http "1.3.6" - web3-providers-ipc "1.3.6" - web3-providers-ws "1.3.6" - -web3-core-subscriptions@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.3.6.tgz#ee24e7974d1d72ff6c992c599deba4ef9b308415" - integrity sha512-wi9Z9X5X75OKvxAg42GGIf81ttbNR2TxzkAsp1g+nnp5K8mBwgZvXrIsDuj7Z7gx72Y45mWJADCWjk/2vqNu8g== - dependencies: - eventemitter3 "4.0.4" - underscore "1.12.1" - web3-core-helpers "1.3.6" - -web3-core@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.3.6.tgz#a6a761d1ff2f3ee462b8dab679229d2f8e267504" - integrity sha512-gkLDM4T1Sc0T+HZIwxrNrwPg0IfWI0oABSglP2X5ZbBAYVUeEATA0o92LWV8BeF+okvKXLK1Fek/p6axwM/h3Q== + "underscore" "1.9.1" + "web3-core-helpers" "1.3.0" + "web3-core-promievent" "1.3.0" + "web3-core-subscriptions" "1.3.0" + "web3-utils" "1.3.0" + +"web3-core-promievent@1.3.0": + "version" "1.3.0" + dependencies: + "eventemitter3" "4.0.4" + +"web3-core-requestmanager@1.3.0": + "version" "1.3.0" + dependencies: + "underscore" "1.9.1" + "web3-core-helpers" "1.3.0" + "web3-providers-http" "1.3.0" + "web3-providers-ipc" "1.3.0" + "web3-providers-ws" "1.3.0" + +"web3-core-subscriptions@1.3.0": + "version" "1.3.0" + dependencies: + "eventemitter3" "4.0.4" + "underscore" "1.9.1" + "web3-core-helpers" "1.3.0" + +"web3-core@1.3.0": + "version" "1.3.0" dependencies: "@types/bn.js" "^4.11.5" "@types/node" "^12.12.6" - bignumber.js "^9.0.0" - web3-core-helpers "1.3.6" - web3-core-method "1.3.6" - web3-core-requestmanager "1.3.6" - web3-utils "1.3.6" - -web3-eth-abi@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.3.6.tgz#4272ca48d817aa651bbf97b269f5ff10abc2b8a9" - integrity sha512-Or5cRnZu6WzgScpmbkvC6bfNxR26hqiKK4i8sMPFeTUABQcb/FU3pBj7huBLYbp9dH+P5W79D2MqwbWwjj9DoQ== - dependencies: - "@ethersproject/abi" "5.0.7" - underscore "1.12.1" - web3-utils "1.3.6" - -web3-eth-accounts@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.3.6.tgz#f9fcb50b28ee58090ab292a10d996155caa2b474" - integrity sha512-Ilr0hG6ONbCdSlVKffasCmNwftD5HsNpwyQASevocIQwHdTlvlwO0tb3oGYuajbKOaDzNTwXfz25bttAEoFCGA== - dependencies: - crypto-browserify "3.12.0" - eth-lib "0.2.8" - ethereumjs-common "^1.3.2" - ethereumjs-tx "^2.1.1" - scrypt-js "^3.0.1" - underscore "1.12.1" - uuid "3.3.2" - web3-core "1.3.6" - web3-core-helpers "1.3.6" - web3-core-method "1.3.6" - web3-utils "1.3.6" - -web3-eth-contract@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.3.6.tgz#cccf4d32dc56917fb6923e778498a9ba2a5ba866" - integrity sha512-8gDaRrLF2HCg+YEZN1ov0zN35vmtPnGf3h1DxmJQK5Wm2lRMLomz9rsWsuvig3UJMHqZAQKD7tOl3ocJocQsmA== + "bignumber.js" "^9.0.0" + "web3-core-helpers" "1.3.0" + "web3-core-method" "1.3.0" + "web3-core-requestmanager" "1.3.0" + "web3-utils" "1.3.0" + +"web3-eth-abi@1.3.0": + "version" "1.3.0" + dependencies: + "@ethersproject/abi" "5.0.0-beta.153" + "underscore" "1.9.1" + "web3-utils" "1.3.0" + +"web3-eth-accounts@1.3.0": + "version" "1.3.0" + dependencies: + "crypto-browserify" "3.12.0" + "eth-lib" "0.2.8" + "ethereumjs-common" "^1.3.2" + "ethereumjs-tx" "^2.1.1" + "scrypt-js" "^3.0.1" + "underscore" "1.9.1" + "uuid" "3.3.2" + "web3-core" "1.3.0" + "web3-core-helpers" "1.3.0" + "web3-core-method" "1.3.0" + "web3-utils" "1.3.0" + +"web3-eth-contract@1.3.0": + "version" "1.3.0" dependencies: "@types/bn.js" "^4.11.5" - underscore "1.12.1" - web3-core "1.3.6" - web3-core-helpers "1.3.6" - web3-core-method "1.3.6" - web3-core-promievent "1.3.6" - web3-core-subscriptions "1.3.6" - web3-eth-abi "1.3.6" - web3-utils "1.3.6" - -web3-eth-ens@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.3.6.tgz#0d28c5d4ea7b4462ef6c077545a77956a6cdf175" - integrity sha512-n27HNj7lpSkRxTgSx+Zo7cmKAgyg2ElFilaFlUu/X2CNH23lXfcPm2bWssivH9z0ndhg0OyR4AYFZqPaqDHkJA== - dependencies: - content-hash "^2.5.2" - eth-ens-namehash "2.0.8" - underscore "1.12.1" - web3-core "1.3.6" - web3-core-helpers "1.3.6" - web3-core-promievent "1.3.6" - web3-eth-abi "1.3.6" - web3-eth-contract "1.3.6" - web3-utils "1.3.6" - -web3-eth-iban@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.3.6.tgz#0d6ba21fe78f190af8919e9cd5453882457209e0" - integrity sha512-nfMQaaLA/zsg5W4Oy/EJQbs8rSs1vBAX6b/35xzjYoutXlpHMQadujDx2RerTKhSHqFXSJeQAfE+2f6mdhYkRQ== - dependencies: - bn.js "^4.11.9" - web3-utils "1.3.6" - -web3-eth-personal@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.3.6.tgz#226137916754c498f0284f22c55924c87a2efcf0" - integrity sha512-pOHU0+/h1RFRYoh1ehYBehRbcKWP4OSzd4F7mDljhHngv6W8ewMHrAN8O1ol9uysN2MuCdRE19qkRg5eNgvzFQ== + "underscore" "1.9.1" + "web3-core" "1.3.0" + "web3-core-helpers" "1.3.0" + "web3-core-method" "1.3.0" + "web3-core-promievent" "1.3.0" + "web3-core-subscriptions" "1.3.0" + "web3-eth-abi" "1.3.0" + "web3-utils" "1.3.0" + +"web3-eth-ens@1.3.0": + "version" "1.3.0" + dependencies: + "content-hash" "^2.5.2" + "eth-ens-namehash" "2.0.8" + "underscore" "1.9.1" + "web3-core" "1.3.0" + "web3-core-helpers" "1.3.0" + "web3-core-promievent" "1.3.0" + "web3-eth-abi" "1.3.0" + "web3-eth-contract" "1.3.0" + "web3-utils" "1.3.0" + +"web3-eth-iban@1.3.0": + "version" "1.3.0" + dependencies: + "bn.js" "^4.11.9" + "web3-utils" "1.3.0" + +"web3-eth-personal@1.3.0": + "version" "1.3.0" dependencies: "@types/node" "^12.12.6" - web3-core "1.3.6" - web3-core-helpers "1.3.6" - web3-core-method "1.3.6" - web3-net "1.3.6" - web3-utils "1.3.6" - -web3-eth@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.3.6.tgz#2c650893d540a7a0eb1365dd5b2dca24ac919b7c" - integrity sha512-9+rnywRRpyX3C4hfsAQXPQh6vHh9XzQkgLxo3gyeXfbhbShUoq2gFVuy42vsRs//6JlsKdyZS7Z3hHPHz2wreA== - dependencies: - underscore "1.12.1" - web3-core "1.3.6" - web3-core-helpers "1.3.6" - web3-core-method "1.3.6" - web3-core-subscriptions "1.3.6" - web3-eth-abi "1.3.6" - web3-eth-accounts "1.3.6" - web3-eth-contract "1.3.6" - web3-eth-ens "1.3.6" - web3-eth-iban "1.3.6" - web3-eth-personal "1.3.6" - web3-net "1.3.6" - web3-utils "1.3.6" - -web3-net@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.3.6.tgz#a56492e2227475e38db29394f8bac305a2446e41" - integrity sha512-KhzU3wMQY/YYjyMiQzbaLPt2kut88Ncx2iqjy3nw28vRux3gVX0WOCk9EL/KVJBiAA/fK7VklTXvgy9dZnnipw== - dependencies: - web3-core "1.3.6" - web3-core-method "1.3.6" - web3-utils "1.3.6" - -web3-providers-http@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.3.6.tgz#36e8724a7424d52827819d53fd75dbf31f5422c2" - integrity sha512-OQkT32O1A06dISIdazpGLveZcOXhEo5cEX6QyiSQkiPk/cjzDrXMw4SKZOGQbbS1+0Vjizm1Hrp7O8Vp2D1M5Q== - dependencies: - web3-core-helpers "1.3.6" - xhr2-cookies "1.1.0" - -web3-providers-ipc@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.3.6.tgz#cef8d12c1ebb47adce5ebf597f553c623362cb4a" - integrity sha512-+TVsSd2sSVvVgHG4s6FXwwYPPT91boKKcRuEFXqEfAbUC5t52XOgmyc2LNiD9LzPhed65FbV4LqICpeYGUvSwA== - dependencies: - oboe "2.1.5" - underscore "1.12.1" - web3-core-helpers "1.3.6" - -web3-providers-ws@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.3.6.tgz#e1df617bc89d66165abdf2191da0014c505bfaac" - integrity sha512-bk7MnJf5or0Re2zKyhR3L3CjGululLCHXx4vlbc/drnaTARUVvi559OI5uLytc/1k5HKUUyENAxLvetz2G1dnQ== - dependencies: - eventemitter3 "4.0.4" - underscore "1.12.1" - web3-core-helpers "1.3.6" - websocket "^1.0.32" - -web3-shh@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.3.6.tgz#4e3486c7eca5cbdb87f88910948223a5b7ea6c20" - integrity sha512-9zRo415O0iBslxBnmu9OzYjNErzLnzOsy+IOvSpIreLYbbAw0XkDWxv3SfcpKnTIWIACBR4AYMIxmmyi5iB3jw== - dependencies: - web3-core "1.3.6" - web3-core-method "1.3.6" - web3-core-subscriptions "1.3.6" - web3-net "1.3.6" - -web3-utils@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.3.6.tgz#390bc9fa3a7179746963cfaca55bb80ac4d8dc10" - integrity sha512-hHatFaQpkQgjGVER17gNx8u1qMyaXFZtM0y0XLGH1bzsjMPlkMPLRcYOrZ00rOPfTEuYFOdrpGOqZXVmGrMZRg== - dependencies: - bn.js "^4.11.9" - eth-lib "0.2.8" - ethereum-bloom-filters "^1.0.6" - ethjs-unit "0.1.6" - number-to-bn "1.7.0" - randombytes "^2.1.0" - underscore "1.12.1" - utf8 "3.0.0" - -web3@^1.3.0: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3/-/web3-1.3.6.tgz#599425461c3f9a8cbbefa70616438995f4a064cc" - integrity sha512-jEpPhnL6GDteifdVh7ulzlPrtVQeA30V9vnki9liYlUvLV82ZM7BNOQJiuzlDePuE+jZETZSP/0G/JlUVt6pOA== - dependencies: - web3-bzz "1.3.6" - web3-core "1.3.6" - web3-eth "1.3.6" - web3-eth-personal "1.3.6" - web3-net "1.3.6" - web3-shh "1.3.6" - web3-utils "1.3.6" - -websocket@^1.0.32: - version "1.0.34" - resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.34.tgz#2bdc2602c08bf2c82253b730655c0ef7dcab3111" - integrity sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ== - dependencies: - bufferutil "^4.0.1" - debug "^2.2.0" - es5-ext "^0.10.50" - typedarray-to-buffer "^3.1.5" - utf-8-validate "^5.0.2" - yaeti "^0.0.6" - -which-boxed-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" - integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== - dependencies: - is-bigint "^1.0.1" - is-boolean-object "^1.1.0" - is-number-object "^1.0.4" - is-string "^1.0.5" - is-symbol "^1.0.3" - -which-typed-array@^1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.4.tgz#8fcb7d3ee5adf2d771066fba7cf37e32fe8711ff" - integrity sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA== - dependencies: - available-typed-arrays "^1.0.2" - call-bind "^1.0.0" - es-abstract "^1.18.0-next.1" - foreach "^2.0.5" - function-bind "^1.1.1" - has-symbols "^1.0.1" - is-typed-array "^1.1.3" - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -widest-line@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-3.1.0.tgz#8292333bbf66cb45ff0de1603b136b7ae1496eca" - integrity sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg== - dependencies: - string-width "^4.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -write-file-atomic@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8" - integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== - dependencies: - imurmurhash "^0.1.4" - is-typedarray "^1.0.0" - signal-exit "^3.0.2" - typedarray-to-buffer "^3.1.5" - -ws@^3.0.0: - version "3.3.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" - integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== - dependencies: - async-limiter "~1.0.0" - safe-buffer "~5.1.0" - ultron "~1.1.0" - -ws@^7.2.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.3.1.tgz#d0547bf67f7ce4f12a72dfe31262c68d7dc551c8" - integrity sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA== - -xdg-basedir@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13" - integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q== - -xhr-request-promise@^0.1.2: - version "0.1.3" - resolved "https://registry.yarnpkg.com/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz#2d5f4b16d8c6c893be97f1a62b0ed4cf3ca5f96c" - integrity sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg== - dependencies: - xhr-request "^1.1.0" - -xhr-request@^1.0.1, xhr-request@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/xhr-request/-/xhr-request-1.1.0.tgz#f4a7c1868b9f198723444d82dcae317643f2e2ed" - integrity sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA== - dependencies: - buffer-to-arraybuffer "^0.0.5" - object-assign "^4.1.1" - query-string "^5.0.1" - simple-get "^2.7.0" - timed-out "^4.0.1" - url-set-query "^1.0.0" - xhr "^2.0.4" - -xhr2-cookies@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz#7d77449d0999197f155cb73b23df72505ed89d48" - integrity sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg= - dependencies: - cookiejar "^2.1.1" - -xhr@^2.0.4, xhr@^2.3.3: - version "2.5.0" - resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.5.0.tgz#bed8d1676d5ca36108667692b74b316c496e49dd" - integrity sha512-4nlO/14t3BNUZRXIXfXe+3N6w3s1KoxcJUUURctd64BLRe67E4gRwp4PjywtDY72fXpZ1y6Ch0VZQRY/gMPzzQ== - dependencies: - global "~4.3.0" - is-function "^1.0.1" - parse-headers "^2.0.0" - xtend "^4.0.0" - -xml2js@0.4.19: - version "0.4.19" - resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.19.tgz#686c20f213209e94abf0d1bcf1efaa291c7827a7" - integrity sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q== - dependencies: - sax ">=0.6.0" - xmlbuilder "~9.0.1" - -xmlbuilder@~9.0.1: - version "9.0.7" - resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" - integrity sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0= - -xtend@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" - integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== - -yaeti@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" - integrity sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc= - -yallist@^3.0.0, yallist@^3.0.3: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + "web3-core" "1.3.0" + "web3-core-helpers" "1.3.0" + "web3-core-method" "1.3.0" + "web3-net" "1.3.0" + "web3-utils" "1.3.0" + +"web3-eth@1.3.0": + "version" "1.3.0" + dependencies: + "underscore" "1.9.1" + "web3-core" "1.3.0" + "web3-core-helpers" "1.3.0" + "web3-core-method" "1.3.0" + "web3-core-subscriptions" "1.3.0" + "web3-eth-abi" "1.3.0" + "web3-eth-accounts" "1.3.0" + "web3-eth-contract" "1.3.0" + "web3-eth-ens" "1.3.0" + "web3-eth-iban" "1.3.0" + "web3-eth-personal" "1.3.0" + "web3-net" "1.3.0" + "web3-utils" "1.3.0" + +"web3-net@1.3.0": + "version" "1.3.0" + dependencies: + "web3-core" "1.3.0" + "web3-core-method" "1.3.0" + "web3-utils" "1.3.0" + +"web3-providers-http@1.3.0": + "version" "1.3.0" + dependencies: + "web3-core-helpers" "1.3.0" + "xhr2-cookies" "1.1.0" + +"web3-providers-ipc@1.3.0": + "version" "1.3.0" + dependencies: + "oboe" "2.1.5" + "underscore" "1.9.1" + "web3-core-helpers" "1.3.0" + +"web3-providers-ws@1.3.0": + "version" "1.3.0" + dependencies: + "eventemitter3" "4.0.4" + "underscore" "1.9.1" + "web3-core-helpers" "1.3.0" + "websocket" "^1.0.32" + +"web3-shh@1.3.0": + "version" "1.3.0" + dependencies: + "web3-core" "1.3.0" + "web3-core-method" "1.3.0" + "web3-core-subscriptions" "1.3.0" + "web3-net" "1.3.0" + +"web3-utils@1.3.0": + "version" "1.3.0" + dependencies: + "bn.js" "^4.11.9" + "eth-lib" "0.2.8" + "ethereum-bloom-filters" "^1.0.6" + "ethjs-unit" "0.1.6" + "number-to-bn" "1.7.0" + "randombytes" "^2.1.0" + "underscore" "1.9.1" + "utf8" "3.0.0" + +"web3@^1.3.0": + "version" "1.3.0" + dependencies: + "web3-bzz" "1.3.0" + "web3-core" "1.3.0" + "web3-eth" "1.3.0" + "web3-eth-personal" "1.3.0" + "web3-net" "1.3.0" + "web3-shh" "1.3.0" + "web3-utils" "1.3.0" + +"websocket@^1.0.32": + "version" "1.0.32" + dependencies: + "bufferutil" "^4.0.1" + "debug" "^2.2.0" + "es5-ext" "^0.10.50" + "typedarray-to-buffer" "^3.1.5" + "utf-8-validate" "^5.0.2" + "yaeti" "^0.0.6" + +"which@^2.0.1": + "integrity" "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==" + "resolved" "https://registry.npmjs.org/which/-/which-2.0.2.tgz" + "version" "2.0.2" + dependencies: + "isexe" "^2.0.0" + +"widest-line@^3.1.0": + "integrity" "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==" + "resolved" "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz" + "version" "3.1.0" + dependencies: + "string-width" "^4.0.0" + +"wrappy@1": + "integrity" "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "resolved" "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + "version" "1.0.2" + +"write-file-atomic@^3.0.0": + "integrity" "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==" + "resolved" "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz" + "version" "3.0.3" + dependencies: + "imurmurhash" "^0.1.4" + "is-typedarray" "^1.0.0" + "signal-exit" "^3.0.2" + "typedarray-to-buffer" "^3.1.5" + +"ws@^3.0.0": + "integrity" "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==" + "resolved" "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz" + "version" "3.3.3" + dependencies: + "async-limiter" "~1.0.0" + "safe-buffer" "~5.1.0" + "ultron" "~1.1.0" + +"ws@^7.2.1": + "integrity" "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA==" + "resolved" "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz" + "version" "7.3.1" + +"xdg-basedir@^4.0.0": + "integrity" "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==" + "resolved" "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz" + "version" "4.0.0" + +"xhr-request-promise@^0.1.2": + "integrity" "sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg==" + "resolved" "https://registry.npmjs.org/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz" + "version" "0.1.3" + dependencies: + "xhr-request" "^1.1.0" + +"xhr-request@^1.0.1", "xhr-request@^1.1.0": + "integrity" "sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==" + "resolved" "https://registry.npmjs.org/xhr-request/-/xhr-request-1.1.0.tgz" + "version" "1.1.0" + dependencies: + "buffer-to-arraybuffer" "^0.0.5" + "object-assign" "^4.1.1" + "query-string" "^5.0.1" + "simple-get" "^2.7.0" + "timed-out" "^4.0.1" + "url-set-query" "^1.0.0" + "xhr" "^2.0.4" + +"xhr@^2.0.4", "xhr@^2.3.3": + "integrity" "sha512-4nlO/14t3BNUZRXIXfXe+3N6w3s1KoxcJUUURctd64BLRe67E4gRwp4PjywtDY72fXpZ1y6Ch0VZQRY/gMPzzQ==" + "resolved" "https://registry.npmjs.org/xhr/-/xhr-2.5.0.tgz" + "version" "2.5.0" + dependencies: + "global" "~4.3.0" + "is-function" "^1.0.1" + "parse-headers" "^2.0.0" + "xtend" "^4.0.0" + +"xhr2-cookies@1.1.0": + "integrity" "sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg=" + "resolved" "https://registry.npmjs.org/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz" + "version" "1.1.0" + dependencies: + "cookiejar" "^2.1.1" + +"xml2js@0.4.19": + "integrity" "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==" + "resolved" "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz" + "version" "0.4.19" + dependencies: + "sax" ">=0.6.0" + "xmlbuilder" "~9.0.1" + +"xmlbuilder@~9.0.1": + "integrity" "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" + "resolved" "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz" + "version" "9.0.7" + +"xtend@^4.0.0": + "integrity" "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + "resolved" "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz" + "version" "4.0.2" + +"yaeti@^0.0.6": + "integrity" "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=" + "resolved" "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz" + "version" "0.0.6" + +"yallist@^3.0.0", "yallist@^3.0.3": + "integrity" "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + "resolved" "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz" + "version" "3.1.1" From c1018bec8e936fad855f66b7c3445ee4c3e13682 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Sun, 11 Jul 2021 23:59:14 +0800 Subject: [PATCH 172/254] Updated emergency withdrawal --- services/staking/handler.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/services/staking/handler.js b/services/staking/handler.js index f28c9b3..a14667d 100644 --- a/services/staking/handler.js +++ b/services/staking/handler.js @@ -87,17 +87,14 @@ module.exports.snapshotEmergency = async (req, res) => { userAddress: req.body.userAddress.toLowerCase(), }); - let pendingDVG = req.body.pendingDVG; - if (prev != null) { - pendingDVG += prev.pendingDVG; + if (prev == null) { + await snapshot.add({ + pid: req.body.pid, + userAddress: req.body.userAddress.toLowerCase(), + pendingDVG: req.body.pendingDVG, + }); } - await snapshot.add({ - pid: req.body.pid, - userAddress: req.body.userAddress.toLowerCase(), - pendingDVG, - }); - res.status(200).json({ message: 'Successful Response', body: {} From 65205bc7ff2def0fd9c8c610dae3fbeefb8dca18 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Mon, 12 Jul 2021 11:14:25 +0800 Subject: [PATCH 173/254] update --- services/staking/handler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/staking/handler.js b/services/staking/handler.js index a14667d..40166e7 100644 --- a/services/staking/handler.js +++ b/services/staking/handler.js @@ -87,7 +87,7 @@ module.exports.snapshotEmergency = async (req, res) => { userAddress: req.body.userAddress.toLowerCase(), }); - if (prev == null) { + if (prev == null && req.body.pendingDVG > 0) { await snapshot.add({ pid: req.body.pid, userAddress: req.body.userAddress.toLowerCase(), From 3b74af15ea08d80f8fe4981f6d2625bfcf3fd96b Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Mon, 12 Jul 2021 15:12:41 +0800 Subject: [PATCH 174/254] feat(DAO-162): :sparkles: Citadel Vault Performance --- services/vaults/performance/handler.js | 59 +++++++++++++------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js index 7c646ce..0095abf 100644 --- a/services/vaults/performance/handler.js +++ b/services/vaults/performance/handler.js @@ -40,6 +40,9 @@ if (process.env.PRODUCTION != "") { INCEPTION_BLOCK = 25336169; } +// const ETF_STRATEGIES = ["daoCDV", "daoSTO", "daoELO"]; +const ETF_STRATEGIES = ["daoCDV"]; + const aggregatorV3InterfaceABI = require("./AggregatorABI.json"); const BTCpriceFeed = new ethers.Contract( @@ -61,7 +64,7 @@ function getInceptionBlock(farmer) { daoELO: 12722655, daoCUB: 12799447, }; - return farmers[farmers]; + return farmers[farmer]; } else { const farmers = { daoCDV: 25336169, @@ -69,7 +72,7 @@ function getInceptionBlock(farmer) { daoELO: 25413059, daoCUB: 25536976, }; - return farmers[farmers]; + return farmers[farmer]; } } @@ -141,16 +144,14 @@ async function getUnixTime(block) { async function syncHistoricalPerformance() { // let results = []; - const ETF_STRATEGIES = ["daoCDV", "daoSTO", "daoELO"]; - // Get latest entry in database - ETF_STRATEGIES.forEach(async (etf) => { - console.log("🚀 | syncHistoricalPerformance | etf", etf); + for (const etf of ETF_STRATEGIES) { + console.log(">", etf); let vaultAddress = contracts["farmer"][etf]["address"]; let vaultABI = contracts["farmer"][etf]["abi"]; vault = new ethers.Contract(vaultAddress, vaultABI, provider); - const latestEntry = await historicalDb.findLatest(etf); + let latestEntry = await historicalDb.findLatest(etf); let startBlock; let totalSupply; let totalPool; @@ -177,9 +178,9 @@ async function syncHistoricalPerformance() { startBlock = getInceptionBlock(etf); } - const latestBlock = await provider.getBlockNumber(); + let latestBlock = await provider.getBlockNumber(); - const dates = await getSearchRange(startBlock, latestBlock); + let dates = await getSearchRange(startBlock, latestBlock); for (const date of dates) { try { @@ -227,25 +228,25 @@ async function syncHistoricalPerformance() { console.log(e); } } - }); + } } module.exports.savePerformance = async (event) => { await syncHistoricalPerformance(); }; -module.exports.handler = async (event) => { - const performanceData = await syncHistoricalPerformance(); - - return { - statusCode: 200, - headers: { - "Access-Control-Allow-Origin": "*", - "Access-Control-Allow-Credentials": true, - }, - body: JSON.stringify(performanceData), - }; -}; +// module.exports.handler = async (event) => { +// const performanceData = await syncHistoricalPerformance(); + +// return { +// statusCode: 200, +// headers: { +// "Access-Control-Allow-Origin": "*", +// "Access-Control-Allow-Credentials": true, +// }, +// body: JSON.stringify(performanceData), +// }; +// }; module.exports.performanceHandle = async (req, res) => { if (req.params.days == null || req.params.days == "") { @@ -272,12 +273,12 @@ module.exports.performanceHandle = async (req, res) => { case historicalDb.daoCDVFarmer: collection = historicalDb.daoCDVFarmer; break; - case historicalDb.daoELOFarmer: - collection = historicalDb.daoELOFarmer; - break; - case historicalDb.daoSTOFarmer: - collection = historicalDb.daoSTOFarmer; - break; + // case historicalDb.daoELOFarmer: + // collection = historicalDb.daoELOFarmer; + // break; + // case historicalDb.daoSTOFarmer: + // collection = historicalDb.daoSTOFarmer; + // break; default: res.status(200).json({ message: "Invalid Farmer", @@ -324,11 +325,11 @@ module.exports.performanceHandle = async (req, res) => { ); }); } + if (result) { res.status(200).json({ message: `Performance Data for ${req.params.farmer}`, body: result, }); } - return; }; From fc653c161864756e19c837028a81596ed3cb38b1 Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Mon, 12 Jul 2021 15:27:39 +0800 Subject: [PATCH 175/254] feat(DAO-162): :sparkles: Fixed CORS issue --- app.js | 23 +++++++++++++++-------- services/vaults/performance/handler.js | 9 +++++++-- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/app.js b/app.js index 64407f8..3bb611b 100644 --- a/app.js +++ b/app.js @@ -18,9 +18,9 @@ const app = express(); const cors = require("cors"); const port = process.env.PORT || 8080; const jobs = require("./jobs/task"); -const swaggerUi = require('swagger-ui-express'); -const swaggerDocument = require('./swagger.json'); -const bodyParser = require('body-parser'); +const swaggerUi = require("swagger-ui-express"); +const swaggerDocument = require("./swagger.json"); +const bodyParser = require("body-parser"); async function init() { // Improve debugging @@ -43,9 +43,11 @@ async function init() { }); app.use(cors()); - app.use(bodyParser.urlencoded({ - extended: true, - })); + app.use( + bodyParser.urlencoded({ + extended: true, + }) + ); app.use(bodyParser.json()); app.get("/vaults/apy", (req, res) => vaultsApy.handler(res)); @@ -83,10 +85,15 @@ async function init() { app.get("/vaults/performance/:farmer/:days", (req, res) => vaultPerformance.performanceHandle(req, res) ); + app.get("/vaults/performance/:farmer", (req, res) => + vaultPerformance.performanceHandle(req, res) + ); - app.post('/staking/emergency-withdraw-snapshot', (req, res) => stakePool.snapshotEmergency(req, res)); + app.post("/staking/emergency-withdraw-snapshot", (req, res) => + stakePool.snapshotEmergency(req, res) + ); - app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument)); + app.use("/api-docs", swaggerUi.serve, swaggerUi.setup(swaggerDocument)); app.listen(port, () => console.log(`Listening on ${port}`)); } diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js index 0095abf..baaa24a 100644 --- a/services/vaults/performance/handler.js +++ b/services/vaults/performance/handler.js @@ -249,9 +249,14 @@ module.exports.savePerformance = async (event) => { // }; module.exports.performanceHandle = async (req, res) => { - if (req.params.days == null || req.params.days == "") { + if ( + req.params.days !== "30d" && + req.params.days !== "7d" && + req.params.days !== "1d" && + req.params.days !== undefined + ) { res.status(200).json({ - message: "Days is empty.", + message: "Days should be 30d, 7d, 1d or empty (all).", body: null, }); return; From 5b5a8d4d66ebce662ac0224f44a4346d5bd9fa57 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Mon, 12 Jul 2021 22:50:06 +0800 Subject: [PATCH 176/254] Added mainnet addresses --- config/serverless/domain.js | 4 ++-- scripts/initial.js | 2 +- services/vaults/apy/save/vaults.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/serverless/domain.js b/config/serverless/domain.js index b6f58e0..13e680d 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -353,9 +353,9 @@ const mainContracts = { tokenId: ["tether", "usd-coin", "dai"], }, daoCUB: { - address: "", // TODO: Update that this to mainnet address + address: "0x2ad9f8d4c24652ea9f8a954f7e1fdb50a3be1dfd", abi: abi.cubanApeVaultContract, - strategyAddress: "", // TODO: Update that this to mainnet address + strategyAddress: "0x7c0f84e9dc6f721de21d51a490de6e370fa01cd6", strategyABI: abi.cubanApeStrategyContract, contractType: "cuban", tokenId: ["tether", "usd-coin", "dai"], diff --git a/scripts/initial.js b/scripts/initial.js index 02c6905..25f2d7f 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -9,7 +9,7 @@ db.vault_categories.insertMany([ { name: 'basic', contract_address: '0x43C20638C3914Eca3c96e9cAc8ebE7d652Be45c6', symbol: 'cDAI', }, { name: 'expert', contract_address: '0x8fe826cc1225b03aa06477ad5af745aed5fe7066', symbol: 'daoCDV', }, { name: 'degen', contract_address: '0x2d9a136cf87d599628bcbdfb6c4fe75acd2a0aa8', symbol: 'daoELO', }, - // { name: 'degen', contract_address: '', symbol: 'daoCUB', }, // TODO: Update to the mainnet address + { name: 'degen', contract_address: '0x2ad9f8d4c24652ea9f8a954f7e1fdb50a3be1dfd', symbol: 'daoCUB', }, { name: 'advance', contract_address: '0x742a85daf742ca0213b06fdae449434e0448691e', symbol: 'daoSTO', }, { name: 'advance', contract_address: '0x2Cc1507E6E3C844EEb77Db90d193489f1Ddfb299', symbol: 'hfUSDT'}, { name: 'advance', contract_address: '0xd0f0858578C7780f2D65f6d81BC7DdBe166367cC', symbol: 'hfUSDC'}, diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 3a5ce8c..9c4d734 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -501,7 +501,7 @@ const mainVaults = [ description: "DAO Vault Cuban for 3 stablecoins", vaultSymbol: "daoCUB", erc20address: ["0xdAC17F958D2ee523a2206206994597C13D831ec7", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0x6b175474e89094c44da98b954eedeac495271d0f"], - vaultContractAddress: "", // TODO: Update to the mainnet address + vaultContractAddress: "0x2ad9f8d4c24652ea9f8a954f7e1fdb50a3be1dfd", vaultContractABI: abi.cubanApeVaultContract, balance: 0, vaultBalance: 0, @@ -510,7 +510,7 @@ const mainVaults = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 12722655, // TODO: Update to the mainnet block number + lastMeasurement: 12799447, measurement: 1e18, price_id: ["tether", "usd-coin", "dai"], isCuban: true, From 67bf5468022b9c4927efabc2206abe2a99cf5bb7 Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Tue, 13 Jul 2021 15:13:09 +0800 Subject: [PATCH 177/254] feat(DAO-162): :sparkles: Update btc/eth price source to coingecko --- package-lock.json | 5 ++ services/vaults/performance/handler.js | 64 ++++++++++++++++++++++---- 2 files changed, 60 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 31c9edd..293ce03 100644 --- a/package-lock.json +++ b/package-lock.json @@ -392,6 +392,11 @@ "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" }, + "coingecko-api": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/coingecko-api/-/coingecko-api-1.0.10.tgz", + "integrity": "sha512-7YLLC85+daxAw5QlBWoHVBVpJRwoPr4HtwanCr8V/WRjoyHTa1Lb9DQAvv4MDJZHiz4no6HGnDQnddtjV35oRA==" + }, "elliptic": { "version": "6.5.4", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js index baaa24a..19cf300 100644 --- a/services/vaults/performance/handler.js +++ b/services/vaults/performance/handler.js @@ -12,6 +12,9 @@ const { mainContracts, } = require("../../../config/serverless/domain"); +const CoinGecko = require("coingecko-api"); +const CoinGeckoClient = new CoinGecko(); + const url = process.env.ARCHIVENODE_ENDPOINT; // Using ethers.js @@ -56,6 +59,24 @@ const ETHpriceFeed = new ethers.Contract( provider ); // 8 DEcimals +async function getTokenPrice(coingecko_token_id, date) { + // console.log(coingecko_token_id); + let data; + try { + data = await CoinGeckoClient.coins.fetchHistory(coingecko_token_id, { + date: date, + }); + if (Object.keys(data.data).length != 0) { + return data.data["market_data"]["current_price"]["usd"]; + } else { + return 1; + } + } catch (err) { + // Catch error, Default Value = 1 + console.log(err); + } +} + function getInceptionBlock(farmer) { if (process.env.PRODUCTION != "") { const farmers = { @@ -86,15 +107,40 @@ async function getTotalPool(block) { return totalPool; } -async function getBTCPrice(block) { - const price = (await BTCpriceFeed.latestRoundData({ blockTag: block })) - .answer; +// async function getBTCPriceChainlink(block) { +// const price = (await BTCpriceFeed.latestRoundData({ blockTag: block })) +// .answer; +// return price; +// } + +async function getBTCPriceCoinGecko(date) { + date = new Date(date); + + let dd = String(date.getDate()).padStart(2, "0"); + let mm = String(date.getMonth() + 1).padStart(2, "0"); //January is 0! + let yyyy = date.getFullYear(); + + let _date = dd + "-" + mm + "-" + yyyy; + const price = await getTokenPrice("bitcoin", _date); + return price; } -async function getETHPrice(block) { - const price = (await ETHpriceFeed.latestRoundData({ blockTag: block })) - .answer; +// async function getETHPrice(block) { +// const price = (await ETHpriceFeed.latestRoundData({ blockTag: block })) +// .answer; +// return price; +// } + +async function getETHPriceCoinGecko(date) { + date = new Date(date); + let dd = String(date.getDate()).padStart(2, "0"); + let mm = String(date.getMonth() + 1).padStart(2, "0"); //January is 0! + let yyyy = date.getFullYear(); + let _date = dd + "-" + mm + "-" + yyyy; + + const price = await getTokenPrice("ethereum", _date); + return price; } @@ -147,7 +193,7 @@ async function syncHistoricalPerformance() { // Get latest entry in database for (const etf of ETF_STRATEGIES) { - console.log(">", etf); + // console.log(">", etf); let vaultAddress = contracts["farmer"][etf]["address"]; let vaultABI = contracts["farmer"][etf]["abi"]; vault = new ethers.Contract(vaultAddress, vaultABI, provider); @@ -186,8 +232,8 @@ async function syncHistoricalPerformance() { try { totalSupply = await getTotalSupply(date.block); totalPool = await getTotalPool(date.block); - btcPrice = await getBTCPrice(date.block); - ethPrice = await getETHPrice(date.block); + btcPrice = await getBTCPriceCoinGecko(date.date); + ethPrice = await getETHPriceCoinGecko(date.date); lpTokenPriceUSD = calcLPTokenPriceUSD(totalPool, totalSupply); if (lpTokenPriceUSD > 0 && basePrice == 0) { basePrice = lpTokenPriceUSD; From e0ad86944ef6473c98878475c220a1b8f831a8d6 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Wed, 14 Jul 2021 10:23:31 +0800 Subject: [PATCH 178/254] Update Money Printer vault and strategy address. --- config/abi.js | 876 +++++++++++++++++++--- config/serverless/domain.js | 8 +- services/vaults/apy/save/polygon-vault.js | 8 +- 3 files changed, 766 insertions(+), 126 deletions(-) diff --git a/config/abi.js b/config/abi.js index d7f4fbf..3efc24f 100644 --- a/config/abi.js +++ b/config/abi.js @@ -19915,7 +19915,7 @@ const daoFaangStonkStrategyContract =[ } ]; -const moneyPrinterVaultContract =[ +const moneyPrinterVaultContract = [ { "inputs": [ { @@ -20973,13 +20973,119 @@ const moneyPrinterStrategyContract = [ "inputs": [ { "internalType": "address", - "name": "_treasury", + "name": "_strategy", + "type": "address" + }, + { + "internalType": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_treasuryWallet", + "type": "address" + }, + { + "internalType": "address", + "name": "_communityWallet", + "type": "address" + }, + { + "internalType": "address", + "name": "_strategist", + "type": "address" + }, + { + "internalType": "address", + "name": "_biconomy", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sharesMinted", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "fromStrategy", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newStrategy", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "MigrateFunds", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -20996,121 +21102,598 @@ const moneyPrinterStrategyContract = [ "type": "address" } ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "inputs": [], - "name": "CRV", + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "SetAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldCommunityWallet", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newCommunityWallet", + "type": "address" + } + ], + "name": "SetCommunityWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldStrategy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newStrategy", + "type": "address" + } + ], + "name": "SetPendingStrategy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldStrategist", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newStrategist", + "type": "address" + } + ], + "name": "SetStrategistWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldTreasury", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newTreasury", + "type": "address" + } + ], + "name": "SetTreasuryWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "unlockTime", + "type": "uint256" + } + ], + "name": "UnlockMigrateFunds", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sharesBurned", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "Yield", + "type": "event" + }, + { + "inputs": [], + "name": "DAI", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "LOCKTIME", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "QuickSwapRouter", + "outputs": [ + { + "internalType": "contract IUniswapV2Router02", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "USDC", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "USDT", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "canSetPendingStrategy", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeePerc", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeeTier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "depositedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + } + ], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getValueInPool", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", "outputs": [ { - "internalType": "contract IERC20", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "DAI", + "name": "isEmergency", "outputs": [ { - "internalType": "contract IERC20", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "DAIUSDTQuickswapPool", - "outputs": [ + "inputs": [ { - "internalType": "contract ILPPool", - "name": "", + "internalType": "address", + "name": "forwarder", "type": "address" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MATIC", + "name": "isTrustedForwarder", "outputs": [ { - "internalType": "contract IERC20", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "QUICK", - "outputs": [ + "inputs": [ { "internalType": "contract IERC20", - "name": "", + "name": "_token", "type": "address" } ], - "stateMutability": "view", + "name": "migrateFunds", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "QuickDAI_USDTPair", + "name": "name", "outputs": [ { - "internalType": "contract IUniswapV2Pair", + "internalType": "string", "name": "", - "type": "address" + "type": "string" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "USDC", - "outputs": [ + "inputs": [ { - "internalType": "contract IERC20", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "USDT", + "name": "networkFeePerc", "outputs": [ { - "internalType": "contract IERC20", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "WexPolyRouter", + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeeTier2", "outputs": [ { - "internalType": "contract IUniswapV2Router02", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", @@ -21118,10 +21701,10 @@ const moneyPrinterStrategyContract = [ }, { "inputs": [], - "name": "WexUSDT_USDCPair", + "name": "owner", "outputs": [ { - "internalType": "contract IUniswapV2Pair", + "internalType": "address", "name": "", "type": "address" } @@ -21131,10 +21714,10 @@ const moneyPrinterStrategyContract = [ }, { "inputs": [], - "name": "Wexpoly", + "name": "pendingStrategy", "outputs": [ { - "internalType": "contract IERC20", + "internalType": "address", "name": "", "type": "address" } @@ -21144,12 +21727,12 @@ const moneyPrinterStrategyContract = [ }, { "inputs": [], - "name": "curveFi", + "name": "profitSharingFeePerc", "outputs": [ { - "internalType": "contract ICurveFi", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", @@ -21157,51 +21740,66 @@ const moneyPrinterStrategyContract = [ }, { "inputs": [], - "name": "curveLpToken", - "outputs": [ + "name": "reInvest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "internalType": "contract IERC20", - "name": "", + "internalType": "address", + "name": "_newAdmin", "type": "address" } ], - "stateMutability": "view", + "name": "setAdmin", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "_token", + "internalType": "address", + "name": "_communityWallet", "type": "address" } ], - "name": "deposit", + "name": "setCommunityWallet", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "getValueInPool", - "outputs": [ + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "_pendingStrategy", + "type": "address" } ], - "stateMutability": "view", + "name": "setPendingStrategy", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "harvest", + "inputs": [ + { + "internalType": "address", + "name": "_strategist", + "type": "address" + } + ], + "name": "setStrategist", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -21209,19 +21807,19 @@ const moneyPrinterStrategyContract = [ { "inputs": [ { - "internalType": "contract IERC20", - "name": "_token", + "internalType": "address", + "name": "_treasuryWallet", "type": "address" } ], - "name": "migrateFunds", + "name": "setTreasuryWallet", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "owner", + "name": "strategist", "outputs": [ { "internalType": "address", @@ -21234,10 +21832,10 @@ const moneyPrinterStrategyContract = [ }, { "inputs": [], - "name": "quickSwapRouter", + "name": "strategy", "outputs": [ { - "internalType": "contract IUniswapV2Router02", + "internalType": "contract IStrategy", "name": "", "type": "address" } @@ -21247,19 +21845,25 @@ const moneyPrinterStrategyContract = [ }, { "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "rewardGauge", + "name": "totalSupply", "outputs": [ { - "internalType": "contract IGauge", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", @@ -21269,12 +21873,23 @@ const moneyPrinterStrategyContract = [ "inputs": [ { "internalType": "address", - "name": "_treasury", + "name": "recipient", "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "setTreasuryWallet", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -21282,12 +21897,28 @@ const moneyPrinterStrategyContract = [ "inputs": [ { "internalType": "address", - "name": "_vault", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "setVault", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -21306,7 +21937,7 @@ const moneyPrinterStrategyContract = [ }, { "inputs": [], - "name": "treasury", + "name": "treasuryWallet", "outputs": [ { "internalType": "address", @@ -21319,7 +21950,7 @@ const moneyPrinterStrategyContract = [ }, { "inputs": [], - "name": "vault", + "name": "trustedForwarder", "outputs": [ { "internalType": "address", @@ -21332,40 +21963,42 @@ const moneyPrinterStrategyContract = [ }, { "inputs": [], - "name": "wexStakingContract", + "name": "unlockMigrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unlockTime", "outputs": [ { - "internalType": "contract WexPolyMaster", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, + "inputs": [], + "name": "versionRecipient", + "outputs": [ { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" + "internalType": "string", + "name": "", + "type": "string" } ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "uint256", - "name": "_amount", + "name": "_shares", "type": "uint256" }, { @@ -21374,7 +22007,14 @@ const moneyPrinterStrategyContract = [ "type": "address" } ], - "name": "withdrawTestnet", + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "yield", "outputs": [], "stateMutability": "nonpayable", "type": "function" diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 9fa7e75..d35cdb8 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -199,9 +199,9 @@ const testContracts = { network: constant.ETHEREUM }, daoMPT: { - address: '0xdc2f0e17702f9083adc057893b2b1e273c11e09a', + address: '0x4f0bc6bd6beb231087781336bacd5613527ac63c', abi: abi.moneyPrinterVaultContract, - strategyAddress: '0x9fbbfc353772672b58a9ee1ad55265a5a09640a1', + strategyAddress: '0x8894da48bb8b7f7751ac4e2c37ed31b68d0c587f', strategyABI: abi.moneyPrinterStrategyContract, contractType: 'moneyPrinter', tokenId: ["tether", "usd-coin", "dai"], @@ -398,9 +398,9 @@ const mainContracts = { network: constant.ETHEREUM, }, daoMPT: { - address: '0xdc2f0e17702f9083adc057893b2b1e273c11e09a', + address: '', // Update to mainnet abi: abi.moneyPrinterVaultContract, - strategyAddress: '0x9fbbfc353772672b58a9ee1ad55265a5a09640a1', + strategyAddress: '', // Update to mainnet strategyABI: abi.moneyPrinterStrategyContract, contractType: 'moneyPrinter', tokenId: ["tether", "usd-coin", "dai"], diff --git a/services/vaults/apy/save/polygon-vault.js b/services/vaults/apy/save/polygon-vault.js index 584fe9c..5b91fd9 100644 --- a/services/vaults/apy/save/polygon-vault.js +++ b/services/vaults/apy/save/polygon-vault.js @@ -10,9 +10,9 @@ const testVaults = [ description: "DAO Vault Money Printer for 3 stablecoins", vaultSymbol: "daoMPT", erc20address: "0xbd21a10f619be90d6066c941b04e340841f1f989", - vaultContractAddress: "0xdc2f0e17702f9083adc057893b2b1e273c11e09a", + vaultContractAddress: "0x4f0bc6bd6beb231087781336bacd5613527ac63c", vaultContractABI: abi.moneyPrinterVaultContract, - strategyContractAddress: "0x9fbbfc353772672b58a9ee1ad55265a5a09640a1", + strategyContractAddress: "0x8894da48bb8b7f7751ac4e2c37ed31b68d0c587f", strategyABI: abi.moneyPrinterStrategyContract, balance: 0, vaultBalance: 0, @@ -37,9 +37,9 @@ const mainVaults = [ description: "DAO Vault Money Printer for 3 stablecoins", vaultSymbol: "daoMPT", erc20address: "0xbd21a10f619be90d6066c941b04e340841f1f989", - vaultContractAddress: "0xdc2f0e17702f9083adc057893b2b1e273c11e09a", + vaultContractAddress: "", // TODO: Mainnet Address vaultContractABI: abi.moneyPrinterVaultContract, - strategyContractAddress: "0x9fbbfc353772672b58a9ee1ad55265a5a09640a1", + strategyContractAddress: "", // TODO: Mainnet Address strategyABI: abi.moneyPrinterStrategyContract, balance: 0, vaultBalance: 0, From 31aa4c4b70a0e5026e5d7b5be26b562e92e3d954 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Fri, 16 Jul 2021 11:20:40 +0800 Subject: [PATCH 179/254] Update DVD contract address and abi (Kovan) --- config/abi.js | 933 ++++++++++++++++++++++++++---------- config/serverless/domain.js | 14 +- 2 files changed, 690 insertions(+), 257 deletions(-) diff --git a/config/abi.js b/config/abi.js index b03de17..f0903c4 100644 --- a/config/abi.js +++ b/config/abi.js @@ -15031,351 +15031,784 @@ const xDVGABIContract = [ }, ]; -const DVGABIContract = [ +const DVDABIContract = [ { - inputs: [ - { internalType: "address", name: "_treasuryWalletAddr", type: "address" }, - { internalType: "uint256", name: "_dvgInAdvance", type: "uint256" }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "owner", - type: "address", + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "spender", - type: "address", + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" }, { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } ], - name: "Approval", - type: "event", + "name": "Approval", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "delegator", - type: "address", + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "fromDelegate", - type: "address", + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "toDelegate", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } ], - name: "DelegateChanged", - type: "event", + "name": "DelegateChanged", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "delegate", - type: "address", + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" }, { - indexed: false, - internalType: "uint256", - name: "previousBalance", - type: "uint256", + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" }, { - indexed: false, - internalType: "uint256", - name: "newBalance", - type: "uint256", - }, + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } ], - name: "DelegateVotesChanged", - type: "event", + "name": "DelegateVotesChanged", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } ], - name: "OwnershipTransferred", - type: "event", + "name": "OwnershipTransferred", + "type": "event" }, { - anonymous: false, - inputs: [ - { indexed: true, internalType: "address", name: "from", type: "address" }, - { indexed: true, internalType: "address", name: "to", type: "address" }, + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } ], - name: "Transfer", - type: "event", + "name": "Paused", + "type": "event" }, { - inputs: [], - name: "DELEGATION_TYPEHASH", - outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], - stateMutability: "view", - type: "function", + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "Snapshot", + "type": "event" }, { - inputs: [], - name: "DOMAIN_TYPEHASH", - outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], - stateMutability: "view", - type: "function", + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" }, { - inputs: [ - { internalType: "address", name: "owner", type: "address" }, - { internalType: "address", name: "spender", type: "address" }, + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } ], - name: "allowance", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", + "name": "Unpaused", + "type": "event" }, { - inputs: [ - { internalType: "address", name: "spender", type: "address" }, - { internalType: "uint256", name: "amount", type: "uint256" }, + "inputs": [], + "name": "DELEGATION_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } ], - name: "approve", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [{ internalType: "address", name: "account", type: "address" }], - name: "balanceOf", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", + "inputs": [], + "name": "DOMAIN_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { internalType: "address", name: "", type: "address" }, - { internalType: "uint32", name: "", type: "uint32" }, + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } ], - name: "checkpoints", - outputs: [ - { internalType: "uint32", name: "fromBlock", type: "uint32" }, - { internalType: "uint256", name: "votes", type: "uint256" }, + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [{ internalType: "uint8", name: "", type: "uint8" }], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { internalType: "address", name: "spender", type: "address" }, - { internalType: "uint256", name: "subtractedValue", type: "uint256" }, + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } ], - name: "decreaseAllowance", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "nonpayable", - type: "function", + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [{ internalType: "address", name: "delegatee", type: "address" }], - name: "delegate", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { internalType: "address", name: "delegatee", type: "address" }, - { internalType: "uint256", name: "nonce", type: "uint256" }, - { internalType: "uint256", name: "expiry", type: "uint256" }, - { internalType: "uint8", name: "v", type: "uint8" }, - { internalType: "bytes32", name: "r", type: "bytes32" }, - { internalType: "bytes32", name: "s", type: "bytes32" }, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } ], - name: "delegateBySig", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "balanceOfAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [{ internalType: "address", name: "delegator", type: "address" }], - name: "delegates", - outputs: [{ internalType: "address", name: "", type: "address" }], - stateMutability: "view", - type: "function", + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: "dvgInAdvance", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "checkpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "fromBlock", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegator", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPriorVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_addr", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_initialSupply", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [{ internalType: "address", name: "account", type: "address" }], - name: "getCurrentVotes", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { internalType: "address", name: "account", type: "address" }, - { internalType: "uint256", name: "blockNumber", type: "uint256" }, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } ], - name: "getPriorVotes", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { internalType: "address", name: "spender", type: "address" }, - { internalType: "uint256", name: "addedValue", type: "uint256" }, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } ], - name: "increaseAllowance", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "nonpayable", - type: "function", + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { internalType: "address", name: "_to", type: "address" }, - { internalType: "uint256", name: "_amount", type: "uint256" }, + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } ], - name: "mint", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "name", - outputs: [{ internalType: "string", name: "", type: "string" }], - stateMutability: "view", - type: "function", + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [{ internalType: "address", name: "", type: "address" }], - name: "nonces", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [{ internalType: "address", name: "", type: "address" }], - name: "numCheckpoints", - outputs: [{ internalType: "uint32", name: "", type: "uint32" }], - stateMutability: "view", - type: "function", + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: "owner", - outputs: [{ internalType: "address", name: "", type: "address" }], - stateMutability: "view", - type: "function", + "inputs": [], + "name": "snapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: "renounceOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "symbol", - outputs: [{ internalType: "string", name: "", type: "string" }], - stateMutability: "view", - type: "function", + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "totalSupply", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", + "inputs": [ + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "totalSupplyAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { internalType: "address", name: "recipient", type: "address" }, - { internalType: "uint256", name: "amount", type: "uint256" }, + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } ], - name: "transfer", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "nonpayable", - type: "function", + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ - { internalType: "address", name: "sender", type: "address" }, - { internalType: "address", name: "recipient", type: "address" }, - { internalType: "uint256", name: "amount", type: "uint256" }, + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } ], - name: "transferFrom", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "nonpayable", - type: "function", + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [{ internalType: "address", name: "newOwner", type: "address" }], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: "treasuryWalletAddr", - outputs: [{ internalType: "address", name: "", type: "address" }], - stateMutability: "view", - type: "function", - }, + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } ]; const daoStakeContract = [ @@ -21417,7 +21850,7 @@ module.exports = { cDAIContract, cUSDCContract, xDVGABIContract, - DVGABIContract, + DVDABIContract, daoStakeContract, uniswapPairABIContract, citadelABIContract, diff --git a/config/serverless/domain.js b/config/serverless/domain.js index a0386cc..d180a0b 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -197,12 +197,12 @@ const testContracts = { address: "0x3aa8e8B6D3562a1E7aCB0dddD02b27896C00c424", abi: abi.xDVGABIContract, tokenId: "xDVG", - lastMeasurement: 24819747, + lastMeasurement: 24819747, // Previously known as vipDVG or xDVG }, DVG: { - address: "0xea9726eFc9831EF0499fD4Db4Ab143F15a797673", - abi: abi.DVGABIContract, - tokenId: "daoventures", + address: "0x6639c554a299d58284e36663f609a7d94526fec0", + abi: abi.DVDABIContract, + tokenId: "daoventures", // Previously known as DVD }, daoStake: { address: "0xd8f59a99acfc597feb84914fef3769def87e7553", @@ -414,9 +414,9 @@ const mainContracts = { lastMeasurement: 0, // TODO Update lastMeasurement }, DVG: { - address: "0x51e00a95748DBd2a3F47bC5c3b3E7B3F0fea666c", - abi: abi.xDVGABIContract, - tokenId: "daoventures", + address: "0x51e00a95748dbd2a3f47bc5c3b3e7b3f0fea666c", + abi: abi.DVDABIContract, + tokenId: "daoventures", // Previously known as DVG }, daoStake: { address: "", // TODO Update mainnet address From 23f21a0cb30793c12f162ab587847802805fd022 Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Fri, 16 Jul 2021 14:24:47 +0800 Subject: [PATCH 180/254] feat(DAO-162): :sparkles: Add PNL endpoint --- app.js | 7 +++ services/vaults/performance/handler.js | 82 ++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) diff --git a/app.js b/app.js index 3bb611b..03d80ff 100644 --- a/app.js +++ b/app.js @@ -89,6 +89,13 @@ async function init() { vaultPerformance.performanceHandle(req, res) ); + app.get("/vaults/pnl/:farmer/:days", (req, res) => + vaultPerformance.pnlHandle(req, res) + ); + app.get("/vaults/pnl/:farmer", (req, res) => + vaultPerformance.pnlHandle(req, res) + ); + app.post("/staking/emergency-withdraw-snapshot", (req, res) => stakePool.snapshotEmergency(req, res) ); diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js index 19cf300..3e12952 100644 --- a/services/vaults/performance/handler.js +++ b/services/vaults/performance/handler.js @@ -294,6 +294,88 @@ module.exports.savePerformance = async (event) => { // }; // }; +// Return just PNL of timeframe +module.exports.pnlHandle = async (req, res) => { + if ( + req.params.days !== "30d" && + req.params.days !== "7d" && + req.params.days !== "1d" && + req.params.days !== undefined + ) { + res.status(200).json({ + message: "Days should be 30d, 7d, 1d or empty (all).", + body: null, + }); + return; + } + // check if vault param is input + if (req.params.farmer === null || req.params.farmer === "") { + res.status(200).json({ + message: "Vault input is empty", + body: null, + }); + return; + } + + let startTime = -1; + let collection = ""; + let result; + let pnl; + + switch (req.params.farmer) { + case historicalDb.daoCDVFarmer: + collection = historicalDb.daoCDVFarmer; + break; + // case historicalDb.daoELOFarmer: + // collection = historicalDb.daoELOFarmer; + // break; + // case historicalDb.daoSTOFarmer: + // collection = historicalDb.daoSTOFarmer; + // break; + default: + res.status(200).json({ + message: "Invalid Farmer", + body: null, + }); + return; + } + + switch (req.params.days) { + case "30d": + startTime = moment().subtract(30, "days").unix(); + break; + case "7d": + startTime = moment().subtract(7, "days").unix(); + break; + case "1d": + startTime = moment().subtract(1, "days").unix(); + break; + } + + if (startTime == -1) { + result = await historicalDb.findAll(collection); + } else { + result = await historicalDb.findPerformanceWithTimePeriods( + collection, + startTime + ); + } + + if (result) { + const basePrice = result[0]["lp_token_price_usd"]; + const lastDataIndex = result.length - 1; + pnl = calculatePerformance( + basePrice, + result[lastDataIndex]["lp_token_price_usd"] + ); + console.log("🚀 | module.exports.pnlHandle= | pnl", pnl); + res.status(200).json({ + message: `Performance Data for ${req.params.farmer}`, + body: pnl, + }); + } +}; + module.exports.performanceHandle = async (req, res) => { if ( req.params.days !== "30d" && From 7d07889007b7b673fd11604de22f386b1b94a879 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Fri, 16 Jul 2021 15:18:29 +0800 Subject: [PATCH 181/254] added API for upgrade token (findOne) --- app.js | 5 +++++ models/reimburse-address.model.js | 19 +++++++++++++++++++ services/staking/handler.js | 3 ++- services/user/reimburse/handler.js | 25 +++++++++++++++++++++++++ services/vaults/apy/save/handler.js | 3 +++ swagger.json | 21 +++++++++++++++++++++ 6 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 models/reimburse-address.model.js create mode 100644 services/user/reimburse/handler.js diff --git a/app.js b/app.js index 3bb611b..99fd3ed 100644 --- a/app.js +++ b/app.js @@ -14,6 +14,7 @@ const stakePool = require("./services/staking/handler"); const stakeXDvg = require("./services/staking/vipdvg/handler"); const stakeDaoStakes = require("./services/staking/dao-stake/handler"); const specialEvent = require("./services/user/special-event/handler"); +const reimburse = require("./services/user/reimburse/handler"); const app = express(); const cors = require("cors"); const port = process.env.PORT || 8080; @@ -93,6 +94,10 @@ async function init() { stakePool.snapshotEmergency(req, res) ); + app.get('/user/reimburse-address/:address', (req, res) => + reimburse.getReimburseAddress(req, res) + ); + app.use("/api-docs", swaggerUi.serve, swaggerUi.setup(swaggerDocument)); app.listen(port, () => console.log(`Listening on ${port}`)); diff --git a/models/reimburse-address.model.js b/models/reimburse-address.model.js new file mode 100644 index 0000000..33613af --- /dev/null +++ b/models/reimburse-address.model.js @@ -0,0 +1,19 @@ +const mongo = require('../config/db'); +const collection = 'reimburse-address'; + +const findAll = async () => { + const db = mongo.getDB(); + return await db.collection(collection).find({}).toArray(); +}; + +const findOne = async (params) => { + const db = mongo.getDB(); + return await db.collection(collection).findOne({ + address: params, + }); +} + +module.exports = { + findAll, + findOne, +}; \ No newline at end of file diff --git a/services/staking/handler.js b/services/staking/handler.js index 40166e7..7593e17 100644 --- a/services/staking/handler.js +++ b/services/staking/handler.js @@ -108,4 +108,5 @@ module.exports.snapshotEmergency = async (req, res) => { } return; -} \ No newline at end of file +} + diff --git a/services/user/reimburse/handler.js b/services/user/reimburse/handler.js new file mode 100644 index 0000000..7aec97a --- /dev/null +++ b/services/user/reimburse/handler.js @@ -0,0 +1,25 @@ +const db = require("../../../models/reimburse-address.model"); + +module.exports.getReimburseAddress = async (req, res) => { + try { + const addressInfo = await db.findOne( + req.params.address.toLowerCase() + ); + + if (addressInfo != null) { + delete addressInfo._id; + } + + res.status(200).json({ + message: 'Successful Response', + body: addressInfo, + }); + } catch (err) { + res.status(200).json({ + message: err.message, + body: null + }); + } + + return; +} \ No newline at end of file diff --git a/services/vaults/apy/save/handler.js b/services/vaults/apy/save/handler.js index b7df0aa..e9a333b 100644 --- a/services/vaults/apy/save/handler.js +++ b/services/vaults/apy/save/handler.js @@ -217,6 +217,7 @@ const getApyForVault = async (vault) => { vaultContractAddress: address, symbol, } = vault; + console.log(symbol); // Compound Vault if (vault.isCompound) { let cToken; @@ -420,6 +421,8 @@ const getApyForVault = async (vault) => { aprOneMonthSample } + console.log(aprData); + return { ...aprData, apyLoanscan: 0, diff --git a/swagger.json b/swagger.json index d713884..cab35a7 100644 --- a/swagger.json +++ b/swagger.json @@ -275,6 +275,27 @@ ], "responses": {} } + }, + "/user/reimburse-address/{address}": { + "get": { + "tags": [ + "Users" + ], + "description": "User Reimburse Info", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "address", + "in": "path", + "description": "User Wallet Address (Lower Case)", + "required": true, + "type": "string" + } + ], + "responses": {} + } } } } \ No newline at end of file From 7764a8291da929005df0d54cf029ff3f7498706e Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Fri, 16 Jul 2021 15:27:44 +0800 Subject: [PATCH 182/254] Create endpoint for reimbursement --- app.js | 13 + models/reimbursement-addresses.model.js | 29 + services/reimbursement/handler.js | 69 + services/reimbursement/whitelist.js | 2878 +++++++++++++++++++++++ 4 files changed, 2989 insertions(+) create mode 100644 models/reimbursement-addresses.model.js create mode 100644 services/reimbursement/handler.js create mode 100644 services/reimbursement/whitelist.js diff --git a/app.js b/app.js index 3bb611b..45fb464 100644 --- a/app.js +++ b/app.js @@ -12,6 +12,7 @@ const vaultPerformance = require("./services/vaults/performance/handler"); const stakeVIP = require("./services/staking/xdvg/handler"); const stakePool = require("./services/staking/handler"); const stakeXDvg = require("./services/staking/vipdvg/handler"); +const reimbursementAddresses = require("./services/reimbursement/handler") const stakeDaoStakes = require("./services/staking/dao-stake/handler"); const specialEvent = require("./services/user/special-event/handler"); const app = express(); @@ -89,6 +90,18 @@ async function init() { vaultPerformance.performanceHandle(req, res) ); + app.get("/reimbursement-addresses/dvg", (req, res) => + reimbursementAddresses.handler(req, res) + ); + + app.get("/reimbursement-addresses/save", (req, res) => + reimbursementAddresses.saveAddresses(req, res) + ); + + app.get("/reimbursement-addresses/dvg/:address", (req, res) => + reimbursementAddresses.handler(req, res) + ); + app.post("/staking/emergency-withdraw-snapshot", (req, res) => stakePool.snapshotEmergency(req, res) ); diff --git a/models/reimbursement-addresses.model.js b/models/reimbursement-addresses.model.js new file mode 100644 index 0000000..ef4d569 --- /dev/null +++ b/models/reimbursement-addresses.model.js @@ -0,0 +1,29 @@ +const mongo = require('../config/db'); + +const findAll = async () => { + const db = mongo.getDB(); + return await db.collection("reimburse-address").find({}).project({ _id: 0 }).toArray(); +}; + +const find = async (address) => { + const db = mongo.getDB(); + const _address = address.toLowerCase(); + return await db.collection("reimburse-address").find({ address: _address }).project({ _id: 0 }).toArray(); +}; + +const add = async (params) => { + const db = mongo.getDB(); + return await db.collection("reimburse-address").insertOne(params); +} + +const drop = async () => { + const db = mongo.getDB(); + return await db.collection("reimburse-address").drop(); +} + +module.exports = { + findAll, + find, + add, + drop, +}; \ No newline at end of file diff --git a/services/reimbursement/handler.js b/services/reimbursement/handler.js new file mode 100644 index 0000000..0529e01 --- /dev/null +++ b/services/reimbursement/handler.js @@ -0,0 +1,69 @@ +"use strict"; + +require("dotenv").config(); +const _ = require("lodash"); +const db = require("../../models/reimbursement-addresses.model"); +const whiteList = require("./whitelist.js"); +const ethers = require("ethers"); + +module.exports.saveAddresses = async () => { + + try { + await db.drop(); + } catch { + console.log("collection not created yet") + } + + const signerWallet = new ethers.Wallet(process.env.SIGNER_PRIVATE_KEY); + + console.log(`Signer address: ${signerWallet.address}`); + + const totalCount = whiteList.length; + let data; + let user; + let allowedAmount; + let signature; + let message; + for (var i = 0; i < totalCount; i++) { + user = whiteList[i][0]; + allowedAmount = whiteList[i][1]; + + message = ethers.utils.solidityKeccak256( + ["address", "uint256"], + [user, allowedAmount] + ); + signature = await signerWallet.signMessage(ethers.utils.arrayify(message)); + + data = { + address: user.toLowerCase(), + amount: allowedAmount, + signatureMessage: signature, + } + await db.add(data); + } + console.log("done") +} + +module.exports.handler = async (req, res) => { + const address = req.params.address; + let result; + + // await saveAddresses(); + if (address) { + result = await db.find(address); + } else { + result = await db.findAll(); + } + + if (result) { + res.status(200).json({ + message: `Reimbursement Addresses Data with signatures`, + body: result, + }); + } else { + res.status(200).json({ + message: `Address not in whitelist`, + body: result, + }); + } +}; \ No newline at end of file diff --git a/services/reimbursement/whitelist.js b/services/reimbursement/whitelist.js new file mode 100644 index 0000000..c8867fa --- /dev/null +++ b/services/reimbursement/whitelist.js @@ -0,0 +1,2878 @@ +const whiteList = [ + ["0xb41e620f88c54d91d8945c91cc31bd467c012696", "845845210716180000000000"], + ["0xc6c97d38ce7589c0881f6f845ac035042f088650", "467968000000000000"], + ["0x5c0dc504be827714b81ce99ed287a0428eb397a6", "1329000000000000000000"], + ["0xd11ad84d720a5e7fa11c8412af6c1caa815a436d", "146048390410314000000000"], + ["0x0b0a23ef72341b7a3dc67595f523975fe66aa904", "56741283698451200000"], + ["0xb9de6af66902305e14a81a113986efac1f40dd09", "133052936471097000000"], + ["0x23f7c4667a0d1faa42105b991816fb84fa3037dc", "1547551203236420000000"], + ["0x557cde75c38b2962be3ca94dced614da774c95b0", "3859957819733920"], + ["0xc6e6dd6a0c61651d1bc055dc1c22418a729d41bb", "1"], + ["0x00000000f515b28e81a0e98ea3f4f816ef7e62b2", "1"], + ["0x388411e858cb11414b7eeccf26c8c6a2c23ec52f", "2815870203403800000000"], + ["0x41fd4781f2de2d76cb9f38472c58eaf2b5444942", "787943995753043"], + ["0x059dc2eae98465f97c57c392543fec3e5575bac3", "16834448384914300000"], + ["0x5fdeda0f94c664b94dba921889664c4dba7056de", "257618136876276000000"], + ["0x2b7aad8a12f4845f91d8047dd763d26432976264", "75621465516147600000"], + ["0x2b92d12d8cc0b9af862451393925092c6c21a611", "184522606506787000000"], + ["0x15d8fd2653c10faa953df207a66bfb58aee9c95e", "42628050369212000000"], + ["0x717083565594b88ecf6e064411134c178230426d", "424607573811"], + ["0x5f30a2bb114091b07499d0d6aca58a392f385069", "8792551617195670000"], + ["0xb2044676525ce37ecc9cf859861a27fd4652c04f", "83041753245865700000"], + ["0xade9086630754563619908bead432de161a1f558", "1461723364565810000"], + ["0x4f9d7a99270e6cd73ee18125b02494f19f0bce81", "115593770437245000000"], + ["0x98d0e5a9063c05bc36a14c01f99f41b354d53bf3", "944308175061135000000"], + ["0xc9daa2ffee04fa05c9d7199d2faba14ee712a9ae", "462357906895986000"], + ["0xa5601046293a9f1229eb97084c6d4c4de99737c7", "17448598030295"], + ["0x9539b32640aaa0015c1a02524c33a10ed510fc86", "30000000000000000000"], + ["0x000000000000084e91743124a982076c59f10084", "1"], + ["0x786bb6363c66d0530cd62c50322e5d11904da80f", "800393969695164"], + ["0xfc3d9bec2e0874ac5ff540692b7a28941b9bbb47", "148116734824222000000"], + ["0xc1da60cdf769938e5d2b7f17c673286d79aa6755", "599267355215724000000"], + ["0x2ae02587a2b86fbd4502c5322154e97908d7279f", "59485026890868300000"], + ["0x784e120f8e7b9b1d47ceb0af01bd688ff4a5e8c9", "11413952684329300000"], + ["0x787fa9a8c6cc1aa8f11197b703d39a17a2e4842b", "84821723339748"], + ["0x403c2d4099179e178a0b9860139f0284a63c8690", "49347376498359200000000"], + ["0xf7ead947ffbfefbecd0963d9c547d470b37439c9", "85803170815317400000"], + ["0x197d269a73c35f87d280f94bdb99e6d1641c9163", "3103"], + ["0xd83c2dbc1fd89ce9247b129a3582a4a159fa6e2c", "523454837966706000000"], + ["0x971ef1f39352abd927f900750ee2231c47d65e88", "227836911492201000000"], + ["0x20ef5f3d39ae3230cf720b215b6f010f4c757345", "80000000000000000000"], + ["0xac2f0ae87a45cccc52de8e0f6d00d9e9b477f745", "365163330517676000000"], + ["0x31dce26a1cb7001cce3b7488431c3521d10c010b", "125136573509276000000"], + ["0x0c142f334643be2eb555e28ac1365d27a0872849", "180702286144100000000"], + ["0xe1cb0ddb050889f7c99a2859c81729ff5ca6d29a", "9906449898591270000000"], + ["0x193ac8ecb86c04292ed3f2afa04faa4f384a0dae", "499633580345948000000"], + ["0x6ec66509f82a6a4c83a7b80717bea75533d20e05", "592068684256911000"], + ["0x49531aecfcd467f728bf951556bbe0299486840d", "131693921706734000000"], + ["0x1b46c0a989a2cde9046e654682a80b355de65f10", "38818"], + ["0x35b5676573c398fcf59a90bc2ff817b27ad14e97", "1302664806902590000000"], + ["0x3c6c0e87e42cbe52f040eca9dde982c46ab5efbe", "98123716980241500000"], + ["0xd1a122e10e270582844d3d9f1153835f8aae5054", "221075641941416000000"], + ["0x194a6e092392449f567cc86500363811e36ecf52", "337453655653719000000"], + ["0xe25373181da11fa4e586bb4c982d866b0bbed661", "30827129395695000000"], + ["0x450fffcdcca801488ac805f2bbb30e0447aef746", "6071967141892500000000"], + ["0xd8e1aa74ef85f17f2ea8301b42f17eebc3879269", "134963950838159000000"], + ["0xde88f422fb0e857babab99b805f0fe994db1f624", "16426889441913"], + ["0x497885000af6a089e97f892898d46b603f241c43", "454180756682"], + ["0xc1663f28ce0aa93391a150743119a55d1ac1f470", "6355727866425650"], + ["0x88748a7dafce7d4783d060d1f497b586cfddab84", "784875356858424000000"], + ["0xf78a9d0437bfb01f48d32bd52cec1b1ffc8d7143", "510090369764472000000"], + ["0x55e4536c228323fe22837b0821a26dc35e3d77a9", "987405304823077000000"], + ["0x599bfb1fde32960c81b29ed2e99b1ffe4f9deb12", "110000000000000000000"], + ["0x5ce259aedcd14038ad2c35ecaa7b6b2974d339ac", "810358116749"], + ["0xcd3550bf2ca177ff4cf5b2452e6e908564c21ed6", "1353288578765680000000"], + ["0xfba19a5411e602d40be8eda3fdb479258f1b4699", "31225744510793600000"], + ["0xf7d5d1e3074331bd6d7de5519107f8ac187aed90", "404557099335816000000"], + ["0x12715ba002688b3dea97433530f18b0904b9b956", "253677164690884000000"], + ["0xc6c9d802bc16d8746aafcac4781f9a8d442d585d", "105965603343087000000"], + ["0x65bf3d0acad5b5feeb916666d56cda2bb2837e58", "251417377272235000"], + ["0x910336910d9202999bc17161b95ab9ca14187f0d", "162262714565977000000"], + ["0x96eacc68caa66ce13988c7a05599f83c4440ac9b", "128866279976963000000"], + ["0x4c409e10e85b43e80be5b14696f4a7b20626d02b", "38414565023568100000"], + ["0xd820c6c96260a7737f9d3602fad4f1df2d311761", "61508373220478300000"], + ["0xa72a8686e5561ccbcc1142b091f43b30f8084626", "12478502771669700000"], + ["0x12e721ca67c70f9e83d51d6b5139376cddc618d9", "29760854471995200000"], + ["0x3a0c3ad39673cce83bf9735fbe3b4889e832326e", "764072675681348000000"], + ["0xaea4565a717e4ba257035829ca6055a2c6e151c5", "3000000000000000000000"], + ["0x4e14171a451884c44edbe412b03a128d7e473e55", "45000000000000000000"], + ["0xfd8924b0eeaf34ab663e57cc7bbadf0830ff6fe9", "7860468845990460"], + ["0xe5f5380ed6088e97e29488d327385c86ba91d8f6", "45061231803087200000"], + ["0x0c16d08cdd114f9830d3cbb1045df4e8da6bae8c", "763123252987490000000"], + ["0xa845dfaca6b3494d6be4a851100a2cd44ef0a4e7", "52704544441392600000"], + ["0x789ef5f417efeb7ab14faa0a36eba98a5ee17273", "159947819616268000000"], + ["0x6c0363c075a82fcd439d3127abee6622228934e6", "42059018030020000000"], + ["0x1882142b506101f35ce157eb61ffb6ea2545e05d", "111942241647119000000"], + ["0x773dcadc1b5c57068987ca19de84a7fbb74330f2", "75384443609253000000"], + ["0x82cb410279688d98dbe0a523fc47cebe5833f1d5", "41702547739310800000"], + ["0xbd76c6487dabef207470afdb6f332c0432482f45", "13891168608084000000"], + ["0xb26cbde240a343e46005cc016e39ce4386ae97ed", "55516418373781400000"], + ["0xd87bbf3ad63007664d2a59ef71be2b5fb48ec293", "22996148096863100000"], + ["0xccc339cd783d4836b031c3fc43b9a49ae699ec25", "1000000000000000000"], + ["0x186bc37c98daaed5b95bf3eb41141b32c250864b", "251922092462669000000"], + ["0x359a76db7afdad46f0e2c6699ec768c1064c86ca", "45747650763831200000"], + ["0xaf1890305fcff4bf485d09efafe08bb07fa2a74f", "25000000000000000000"], + ["0x3db6c3cbfe1ec01f81c1acbcfb3cc8338c8f958e", "179945285722280000000"], + ["0x360a8c16f60acaa92b7ba3512ef0350a96628cc8", "138000000000000000000"], + ["0xb5b083bbf813f314263f42bc3fb25b1c139fc96e", "400000000000000000000"], + ["0x9925e32016a44a579abefbd191cf8862c75365ec", "79925319769268200000"], + ["0x8b84ea014a4cda04e9b57aeb4ea10296eef66d70", "70962562835775600000"], + ["0xb4ae4070a56624a7c99b438664853d0f454be116", "1766742038809550000000"], + ["0x5dbfc31c252397cb6cafcd0efffe56d89087919a", "400008550577708000000"], + ["0x97d4afb35f95bda7a3fd39263ad7bda18bc85690", "323345281909031000000"], + ["0xd6ceef56d1e877b26261305dec1094264d830f72", "13185920060594200000"], + ["0xae8df6c6f0a18ac42f8636f6876c47ce6f56e071", "14079594472330500000"], + ["0x37e7e09a5c4f2d3e4d9d54cf995f20aa74cf6d56", "58606973479054000000"], + ["0xbd7f9fb39e0f1346b45380088e901ce2916cfd39", "48023781249004800000"], + ["0xcfb63b65d3ab019fb412472e43cffb396ecbbeae", "18257871404353800000"], + ["0xa4f23e9a9eae680e5ff48ea972a31cc1a787500e", "50000000000000000000"], + ["0x09711a9e501e03769f32a0f8fc09aa517337b388", "19685291724749600000"], + ["0xeb30d65dbf0ea8d52c6fdc624317bf4908ede319", "187151740757175000000"], + ["0x2b86e171ea99d2466814762436734a3823fcc8ce", "143665267687217000000"], + ["0x7c9f379ba78273aca5428a5aee1a2d7932016d92", "11628728510938500000"], + ["0xabbf8d6b5ff051c4d424a0fc35b2a295437d93f2", "34864024061565300000"], + ["0x200b12b7ad06ab04495f33e22a9a60786870354f", "69628454853265300000"], + ["0x614572f25a619926d52b94af861608d9605119b9", "258056112586330000000"], + ["0xef03048081a9a883a33c7f1052d5e5a0804bb7d0", "57189141771257700000"], + ["0xaccda574311ddf0d9262ce7aefba7a6743f6eb7e", "30595526998310800000"], + ["0x76a95d549ca36d955df2c72f693690d8e51a94d0", "234503264806917000000"], + ["0x8a23f18e8a9d2d017e21857610fa7fb3438bfc89", "156282155167236000000"], + ["0xacbb228856f194aa5f7001525211c22f097c75cc", "100597426897790000000"], + ["0x7bf1ce6d06b20f506f8940860cd05bf1224c12df", "209965306918381000000"], + ["0xfbbe7ffba0ce6bd2c34360d925f61834838d79aa", "11662770320528600000"], + ["0xc2f78a64a3bc2dc3a362ffee5f3dba031b4a674a", "168875983174"], + ["0x67d3e94a845a1cbb3c1154d3ef429479fd80ca39", "35051564004810400000"], + ["0x47bb57496ae8c10b3b714bc7f064f3ac049b28e0", "356139282598064000000"], + ["0x81e6884a4dfb51079f7898e5d6a682ea78ffd1e1", "264954509700283000000"], + ["0x08bba49acda81fbdf2ea7f1903860ac83988c75e", "40520735705777300000"], + ["0x4ea6f231e53a4a60f0e3af775180e329df9c6cdc", "15185699017021400000"], + ["0x0c81bdb2e8aab74423d6a1da2d1d3961b465c579", "950379239802204000000"], + ["0x4952f5dde00a0677365e42d33bcc5a8abd4e2b43", "319660281908640000"], + ["0x3d1c7dcbf883c0717bbec30aed5a616bd9002b01", "230230454689183000000"], + ["0x8a5c34dfca39f4f8316f387718fbb1108a923059", "215842032147929000000"], + ["0x54b86d3f7bca92952b38cf1073407e302a12ec33", "386894159992253000"], + ["0xa51add0a3ad07fd3f69a06082765b0d112914c8d", "37268396666691"], + ["0xb39975588e364b02d70964c1b06e6e2716c09721", "14512856773581200000"], + ["0x7a68e3af98c5b101e45a9a9d0862c811189fb58a", "23741549713607300000"], + ["0xe6bf6a74c6d48645e2a305e0ce79a87993861d79", "252708452387373000000"], + ["0xf7f4c15fa1981fd5088b297bda5783f873fd8d55", "125000000000000000"], + ["0x346d2b27737d0fb24a5dc9c3cda345da8b727446", "1328906250000000000000"], + ["0x0ecc162a07168aaa3c5ff027a2cd555e01abc8a0", "125000000000000000"], + ["0xb7facb4f9aab1507a8512eea3393dce126445939", "973185813079451000000"], + ["0xecd7c8f64e2ea8e3f8e912ea58504eba324b2b66", "44801508817233200000"], + ["0x8c2365fe0b0a9aa879b4114eb2b9b6565e431153", "1329000000000000000000"], + ["0x68662163a2e664f8f81a751463db74864eea7522", "450000000000000000000"], + ["0x2d62f955a3a18a4852143fe3aa019366964fef2e", "170000000000000000"], + ["0xcc3ce701840f6d689ae93ba6f211a5e897691710", "1538770990478520000000"], + ["0x4d9b15cc8a5a46d9fc167302c3af73800aa68c67", "64198962221125700000"], + ["0x215792fc17032988abeb64bdaec23487ac384694", "213784965237434000000"], + ["0x5a39b59a1361a8cbb5e6d7208adbb0b076a5a218", "2000000000000000000000"], + ["0x8cc1547f2aebbbaa9466310355110427449a937f", "1286236918775570000000"], + ["0x4468b3584979063722a160257b31642c1e9d9a57", "43722664578349"], + ["0x55f69d209705aa8d5a518561a2dc9664ee98e68b", "1251263628363160000000"], + ["0xb65ab25a3d86034b555a347bc176c3d41682e1e5", "16000000000000000000"], + ["0xb2953b2d2f41ef54b293557be1fd2afa19ef9340", "327278218716609000"], + ["0xb9ae5efea0d548e29a9afd8e32f31a440d9e8588", "88000000000000"], + ["0x8e1304d4ec77c17f85362494662154eef7a1a865", "130715844366464000000"], + ["0x898a45d45640c011764184719d8e00927f179ab0", "1328125000000000000000"], + ["0x67851af7920206006ae0eef3bbb445c91c39938c", "710626722037129000000"], + ["0xd1fa45d2f1b2ce7de6fd4f4b5898adce9c95734b", "1018890652168200000000"], + ["0xef7400c0e93717f52fd8e7f632d44b4d2856eaaf", "125000000000000000"], + ["0xddaaf2c3305dd1feddd005f7273fb07b9cdfa7cf", "328718450445081000000"], + ["0xc4ff72a7d98222aee8c5a327e19362fd9550ba82", "4569531653520510000"], + ["0x7c0eed74d4e818dddf82bbbc378cc3283502d87e", "1078032242477530000000"], + ["0xc45317b15633bbc021af594890e21e630b85727e", "1529270512381880000000"], + ["0x7fce987f2f034e58e5d3be47cc2ae92e8b473492", "428992188000000000000"], + ["0x7e1269f51541a46b30ac02905ee8d453ec96485e", "1808427496707090000000"], + ["0xd4dc1899c3308024631de81e29efe15ff2a823b9", "130809"], + ["0xc165a1b4188eb0eb10275f31a11f07902abbbebd", "80110786407295500000"], + ["0x10fbbbcbe4ad8d981685e5570e2f5339556308ea", "65000016847797400000"], + ["0xc8f6a989e73c42361fcbda3ca1a5559e7326206e", "989003019975755000"], + ["0xf760069bb5119e6028cd9bc1bb2ea655e4203d77", "325715999981133000000"], + ["0xc4e4149cc6e6cd63f44735824632fc17c9cb79e8", "177990642367587000000"], + ["0x173740c91c5015bab10b3830676c9c4d4168d8b4", "92917163891318000000"], + ["0x8bc0fc5b31fa30266a3dd81753be66ee4b62a7f9", "761466686825474000000"], + ["0x3c72abf6f7c7490736b1d623e459fbd7a91a8743", "173743230800934000000"], + ["0x4624a7e23594287df1be7a4bcf5055fc86a397e0", "184840870343622000000"], + ["0xf8745c33c1588a7bd55dc498b96d9481f885c243", "108070283318718000000"], + ["0x58784a1bdbd55427ee6d2dc581d6ff5b3717c13c", "4106180162985"], + ["0xe3077c57c0ebcd5db24a0bee0da528738842d425", "20535362162405600000"], + ["0x2e8b559b47b288ce8cfb4952f9e0bb9a5e0c2fb1", "40000000000000000000"], + ["0x73d9a622f40f03c3207f49352736faf47b2e1028", "61515704915184400000"], + ["0x553c6a57a1436fa9d7275d77cd3d3ea62c75ca17", "8626361804133950000000"], + ["0xb140a7d96974166fa1f10b98c604c1be6c1488cf", "1913562692136060000000"], + ["0x0607af01bce45d29f9c784e2754045d609a921a6", "633855163091725000000"], + ["0x5159d30a3f42b65ac459618b2aebfe757a81736a", "2343608476827830000000"], + ["0x0867f05c2490e9ccf5620a67514857d388b1f436", "37809542564023500000"], + ["0xa0164e6590885be7d67b0d17608fe95b259b0209", "251220783362516000000"], + ["0xf3ce237bdf667be3b0e6da23daba5380294b6b07", "78206602833442400000"], + ["0x1437033c44d4e4f3abbf79c06e5222e7f41cffd4", "81361227227365100000"], + ["0xf9be5c224ccf6224b42ac431deb73bd697fb6499", "639804609447730000000"], + ["0x35f382d9daa602a23ad988d5bf837b8e6a01d002", "910969773585679000"], + ["0x71ec5abfc49075e158b0f85575d400d0f5d7d3be", "1945132021353980000000"], + ["0xa3b5063da84a887b71f7c047a2cadb84042aaa3b", "283939261735207000000"], + ["0x1c3dfca199f7ec87eb5ff29e33e90b7a0b2e2ad8", "1279062500000000000000"], + ["0xf7be02dd8c88683c2c3e288c2bd3ca0919f13448", "1702822993240230"], + ["0x67bbd261fa3a2f73e07f44ec15726cf363f2546c", "40000000000000000000"], + ["0xa02234c3b3060553ddafee3afbf66ba94aafba8b", "73438125809292700000"], + ["0x88eed781abbbb20b8f47cd9614187af817706170", "34424532364756300000"], + ["0x1b4ef3e3ae9c60f8e8b0b6a080773d274126294c", "616179575572555000000"], + ["0x9e291fd9095d3662fa3917927403f193912c0766", "83024708631425900000"], + ["0x315e5d590354e103412169a485ad4c496195c78e", "35258757049859400000"], + ["0x54cc7c5281e0ad8158a48c5d2d308e33989e7b48", "85264985253593600000"], + ["0x81cb8102b18045d698c184a199de742f0efc99ce", "172727117788563000000"], + ["0x00d9947f78df8abb265207538d496b25c89b5f72", "49672487744053"], + ["0x468ecc9ce37e2e6348c3a1901ba84cb13dca42e1", "10772601058638500000"], + ["0xfdae0e73be9d4bb5439ed1724af6435fe91c1c69", "8355605194760270000000"], + ["0x0fcf62edec5e1de0572dd10c2e6ca17a5037f6db", "740928217986396"], + ["0xc86b85ee39c37f7226abed3fd7deb045034e4fba", "2615764705686620000"], + ["0x933e7205089c1f14a913bea6f1e1424540cb83a3", "80000000000000000000"], + ["0x050f788d09395724777a67dd08be127cf70dd238", "37707995792548300000"], + ["0x5bf004761b8c7d08c0eff3a031cf85b5a51815c4", "37250317376397100000"], + ["0x45144345ce401d4dd2414e874f67f75c098623b3", "211000000000000000000"], + ["0xad0de39a552a8e05139c7d806a977231bd23a2d4", "1392846673999380000000"], + ["0xd6cbe50054c9a9e3eed385dd2ba094f7e8018f34", "327683586233337000000"], + ["0xf0ea58b65c82c48ce69f0abd68d178e7764c4ba2", "1328992188000000000000"], + ["0xd452af0d9bd437e8a67f15ebaca06e1c015fc528", "61134858449145500000"], + ["0x5b68f82525c3688d9da8603ce018fe2110692a49", "133554968939253000000"], + ["0x4f23986c549cee05e7f33c848a7bf33987c4777c", "190125000000000000000"], + ["0x8c270f234cdcbd30d281799b584db3d0789e1317", "145924012653944000000"], + ["0xc79bd3a1cf2e6935136a4a9833f1aa67ae67d9aa", "65655984375000000000000"], + ["0xdc31df63ca0b6de64bc62d81844e8956d2476541", "41668000000000000000000"], + ["0x042b312cfd664e6f954e3e03099ee983ff45ec3e", "1576036428626540000000"], + ["0x4a5bb1c9347a0d4f7e06a29239162f03647d9232", "32302039659156400000000"], + ["0xd4ce1744799b189c7a19a3d3ce0aac8de60f781b", "90556000000000000000000"], + ["0x1dbe623157f7cdf98771020e688f7bc25a2e9a21", "5048311050209300000000"], + ["0x4553ed5d8d3731e629f67bd86abd021175f31848", "19320701381851600000000"], + ["0x60f13d97e7342b046396705952afaf9b9f9a442d", "20834000000000000000000"], + ["0x5f6a4215fe729870a437f29d3b3278e27c8789b0", "22959940937622400000000"], + ["0x78ffe1e4ada70afaccd803355d2241e2e1bcb5f3", "13890000000000000000000"], + ["0x9bf7b27182e988d302ca1ec1f64a6ae59dbce3fe", "13890000000000000000000"], + ["0x3fc46fa504a40830cb5a0416b9625b88e1eb41af", "13890000000000000000000"], + ["0x9fb1c52126c34fc0a0e4b37bedd2e65fe5617654", "20834000000000000000000"], + ["0x778c029675d3e2435cf4c207e981d37c2174bec8", "14771847970287300000000"], + ["0x3374c353f4bcd5772a0d4def26e3857e2a45cab2", "70000000000000000000000"], + ["0x87d67301a24d7b94224cdefcf943417162ae7007", "46678044878187800000000"], + ["0x468e7f6f6438864dd31ef61961dfd3e01b69180f", "44170414429512300000000"], + ["0x752663015b9bb32d0ffb575967a833176b793f1e", "16171000000000000000000"], + ["0x254265d8f5d988426f2297e9b68997815737ad0b", "13339000000000000000000"], + ["0xa59b5f2d362ce789671212bd8e18b2d928ca60e3", "14883000000000000000000"], + ["0x95d43258483ade54f7a2c53dc985031f0f619286", "3807000000000000000000"], + ["0x7767319acedbbd5192ac06150424909a27138544", "8303000000000000000000"], + ["0xdd8fe8805751ef039795f998cbee33aa861018f8", "13166000000000000000000"], + ["0x3b54a04374a884cb70f45abcc0539037bcfb9da2", "26388000000000000000000"], + ["0xbeeaae250ca286a7b861c8b0fcb1d5bbdee44394", "23612000000000000000000"], + ["0x6d17a1d100ba0732a72c309834c8cb7aa3690e4a", "25000000000000000000000"], + ["0xc599c65767d1527bda5064676aa6de96c65a2ad4", "26388000000000000000000"], + ["0xa9c7caa7029c886ed5463155217110c25d8ee393", "23612000000000000000000"], + ["0xcee520071a03f70f5839f915e43989a59bdb8b1c", "25000000000000000000000"], + ["0x73c52612f72075361bd707934dbc2b4358c58f32", "26388000000000000000000"], + ["0x9467f85edba87ede9c42e6dee079aab29879ce79", "23612000000000000000000"], + ["0x05534d1785113ff3b24b7402971bd2efb395f699", "25000000000000000000000"], + ["0x22431dff508f62be49108848141b28bdcf3a3d4a", "25000000000000000000000"], + ["0x5f60ad4ed6777500005b4179deff0eec362b5c25", "27778000000000000000000"], + ["0x54b44041b79021a10e38dcbaea0afdcef1803ffe", "549358053493413000000"], + ["0x56652031d1c38d176e627a12e40eaf0357d0f453", "299163510935833000000"], + ["0x9629378dd9adbf50d572d31b5925e8f973b2b36e", "100000000000000000000"], + ["0x4c4f137e4bbbc8ded7c708ed230400db580448e7", "32377562021816400000"], + ["0x6fba1aac65478fa7f269c668b82977612ea9cb95", "31844746223064500000"], + ["0x13d9b821efd055ffd7efb25aa43e0f754111d612", "32995190586835300000"], + ["0xabe8a7ad2f597c077794f5f74149f69ef4356c13", "38227456511067600000"], + ["0xec0e5588df094efe79d8b0ab045831bc454cff4c", "53545958572438000000"], + ["0xeff06e7953a4d97f4dbdb7060ada79f338a5ca60", "322094753364565000000"], + ["0x3dde282df518df4edbba9d9a55a5ab4383c216e9", "1858734295666290000000"], + ["0x0df1eeb03d08bad482cb6de5fc4a8d009e57c9eb", "840946702795608000"], + ["0x59e62fee4888039c5edf467a7c210b5cc1d449da", "2182761078056530000000"], + ["0x606e7af1c5c8c5cd29f2115e517b9d7b89e6c653", "58242072101751800000"], + ["0x3b60bfb78f3fe84ff2bc75dee2b14b2ea13805e2", "393109037483962000000"], + ["0xcd55923c253c0177172911f2f7ba9e5f7073f4bf", "104718406172420000000"], + ["0x68cccc13f4e0655536b2396c1444f8fadf0f77f4", "111939611195665000000"], + ["0x22b90bfcde85f75d8de08b552b837aacb561e968", "100000000000000000000"], + ["0x80e8c108a9a057efb7d38f0a362a8da47cdfaf27", "27345240705333"], + ["0x74102bc480a41681e66add3ec9378ae6f3a79652", "4747270532181360000000"], + ["0x34483a3fa760900b660a5e64fed9248cbe5cbe62", "148538206900"], + ["0x7e73a94993f9652802c016b7a3ef808cdc5c74a9", "30719175695670300000"], + ["0x527422122bc5508d68dda6903bca53740a1a3248", "3000780167252920000000"], + ["0x1ae86593387e4fdd53b9ff960a684793cf515292", "474597609036170000000"], + ["0x2ec8c099ce47358695097d8ae9bd8554619d4d6f", "1328125000000000000000"], + ["0xc313cfce5eac941604d6f10bd6afd0a562bce37a", "982408907042051000"], + ["0x74d3ee195f9c1e062fc3ced2946800eecdaf249f", "10651704830792500000"], + ["0x4e9ce0f37ad40d302fd3af2909ee7101b17c9c37", "8500000000000000000000"], + ["0xfbf4836627698d038ed947b62fdf407c9ccaba62", "442500000000000000000"], + ["0x472c8e03d9972e1ae1774346b18f091462eb24f0", "14062500000000000000000"], + ["0x04c860013028fcad8762518cff977516f5a21662", "7204108511581940000000"], + ["0x390009b6400888a869b790ba8add3e588dce992f", "166262852955614000000"], + ["0xcd09ff5da28fee209f92fcd58fbd87a9bf6d196c", "1388712090289030000000"], + ["0x0f924c28480ff77ad01ddb9dfcd2d558dee56f05", "83133172690733200000"], + ["0xf400bdcb260f26e2a4141f270ac7a519a00d1fd4", "186911152348724000000"], + ["0x38c1649b72fd245e434b9db29f6148a90aa7ca12", "1547593063453900000000"], + ["0x19dffa0e609a16ba8b74dc3e0c2ac359d59239d3", "418560298943209"], + ["0xd5381da8a8b0f22ddd335292ac6203348f617b1d", "13386130259643100000"], + ["0x54ca1ebd499d694f94c0f0e75b851c5e154f519c", "136994665651736000000"], + ["0xe26211851e76370091004bf543121e967a56a0e2", "81756786473609300000"], + ["0xacc3df87b9d1758a407d352f7c5f2460021703be", "50000000000000000000"], + ["0xcd6622b78b16ab217809f6089c410442a84869e6", "805784278130920000"], + ["0x30d2c399b94c2b4e4e27b43adbcbc35b1e8e10d7", "23160280885814600000"], + ["0xf11ce14bbbb90ca3feea63f5599119888c07f941", "50000000000000000000"], + ["0xdd21941e0d2a8a0ce7fc5f186c1d1c12f913a33d", "106627563622348000000"], + ["0xde9a570afeca6f1fefc7edc7c41c8aebc5eb5b65", "85717537180943900000"], + ["0x40984ccaed62be93e9d773075defc0cebfc1474b", "550819300039837000"], + ["0xbc8ec6306f447a9768da5f91ccf79a0cfe76f0bb", "193646477494883000000"], + ["0x3b58b97485cbfa5ddabb9852ccc612edd97afd8f", "96440706218456800000"], + ["0xa625ad18697d202c71bcaa8fcd91c4d3aa77e821", "186287695073299000000"], + ["0x4c39ada0340c1eb3cee343f44819323dd29081a9", "6645702478579"], + ["0x3397523a9e446b7018d9bd0e924aa85debadc6f1", "7469331555864510000"], + ["0xc3d835ec0a336fd2f97e2ac9a6226e8e331dee76", "41744663240271000000"], + ["0x54ec0f31378c8fef5abd9ff0be137f5a1fe765ae", "99366560171059000000"], + ["0xbffac4187d7bbdfbd3ec8e4c5e706e77ff847523", "165119356730415000000"], + ["0x30c88b12098224b13a4c697d15ec8b4c9f3262ee", "31897638019069100000"], + ["0x7162c6a7f4e58f4d3dd53181d7c7581dec566734", "178206871236680000"], + ["0x38ea78de44c7a0e56ecc172284a41773cebc260b", "100000000000000000000"], + ["0x72fc958886e2d0b94d6b3bb67d0fd0654a2a8606", "317739268029967000000"], + ["0x11ededebf63bef0ea2d2d071bdf88f71543ec6fb", "1772396558895590000000"], + ["0x56ba69414a3d0d22c1dc7bd8f0f9cdae348ea178", "560419029517723000000"], + ["0xda6caefcb34ece4860f52c30552605e6bf86694f", "10966067506824600000"], + ["0x8bc85e6ce33a0fdac6b295c52a1c97cb1b122ea5", "127785992006022000000"], + ["0x13b5ea12da65161e2289de15b2f9cd323f44db3e", "810023082332803000000"], + ["0x5d5c54fe70839286395afc1f08e8c62515bdf371", "3422479908415740000"], + ["0x700965eb67dc62d2a3eafce9ede4b2ec15217874", "1019848494200650000000"], + ["0xbef1fefe4bb6dda516e9af3a3f793d182cf053bc", "50000000000000000000"], + ["0x9933e62bcada6efb795d77a914a311a49503658e", "77624767943931200000"], + ["0x099d35e0160269460cf979fb33ff5c59abee8b7e", "28902997654911200000"], + ["0x88815cee9d678b6e288fb48da3abbd4514ff06c3", "172367905913"], + ["0x5330170b9cdceb4694f7278f6418346b21832474", "1718046294724550000000"], + ["0x2aa0136e55157cf1dcf8fb3b5d316e068638f9c8", "1142175532549620000000"], + ["0x8fe0cf1b42d12be68058944105ea1d956d2f848b", "88963348898940000000"], + ["0x2b407a49c00079bfb92401282dac2fa5bc534069", "197465148190422000000"], + ["0x1ae5c2103b87adaa4873f2404fa8207c2eb39855", "488992188000000000000"], + ["0x93f5af632ce523286e033f0510e9b3c9710f4489", "1379167636515080000000"], + ["0x8f82c1e59fb6e7f49792b7b8e661b01b541bdbce", "916959326603752000000"], + ["0xa7a68209dc4ba12a8a055ae9135e1339c057ef91", "7804252871148650000"], + ["0xa111fbd8bce6b05c21c5007fcb1c41b92885a80c", "66764925551726500000"], + ["0x0bdb3e3479313e0a970fad4a12bf9175f2acf5eb", "13891178359474"], + ["0x1942cdda93ae1b56de2fbdbcca200f0d5ec5ef4d", "114089140967021000000"], + ["0x0000000000007f150bd6f54c40a34d7c3d5e9f56", "89643927369280700000"], + ["0xd11e3e8815ab3bc592a032bd1b56b01a89d83a66", "267631602694257000000"], + ["0x3ae86cfa52b197ce73468a5e5861fe77ff1a6d19", "1743296279154410000000"], + ["0x3eeca6cf2a180b3a13c241d5472cd46fd66ee938", "3488105042339250000"], + ["0xfd2efec8be64be9bd4bad3e3dd3912406ca52ae6", "55416613640001"], + ["0x3014a97f7b1f904aee0f1a76bded484448a1133f", "7661748292910170000"], + ["0x40ea5001129509c4cb3ac25c30e3d318bc7388fc", "97825571529289200000"], + ["0x8c09f9dd2289e88acf387601873da8a4b766fd33", "7600000000000000000000"], + ["0x20f542e36ccb48129524c4592c7f040300336b92", "7600000000000000000000"], + ["0x6fa98a4254c7e9ec681cceb3cb8d64a70dbea256", "493472930790258000000"], + ["0x01a6890ebe9cb8910c21c3a0f4a74575f602d3b0", "16500456462170800000"], + ["0x54e10526b3bbb5e51cd26d3db374e4332d8fee8e", "15006300000000000000000"], + ["0x93c3fd1f1f4b736a6cfce3d54b1d21394e5efada", "343758774482755000000"], + ["0x19afe6e49a488e225acbcdd7edef99330dcf4855", "68013287865632800000"], + ["0xfb044636b92629aa38ee94aa397e09cb7f3ae6cb", "314801744645438000000"], + ["0xef3f09025bbfaf8bc0673cd539d40f2ad98f5416", "165735183337503000000"], + ["0xca712fc7ffe3a7cb8e44dcfec968f3daac91b4bd", "50150991430443500000"], + ["0x4a378971a462477657cfa6cd90e26ee02603c5db", "51392155454139300000"], + ["0xbad51b52f6169a6b784fb18981d6d7b72c2b2a9c", "32131801681485700000"], + ["0x3e40634d50c2382923e85c877050e2d1f1841348", "165274392544973000000"], + ["0x52ebe7c7b4009560209622232b60c3e113e66944", "24679978690450000000"], + ["0x8adc75f410c8a5a91369228b48c76fd1488b4ef4", "9343120027517680"], + ["0xbdf88809e65329aba22531ba68901edbd060517c", "189088086166578000000"], + ["0x7e132fd2322fc120632dad83790d3f343d81dd33", "149286114199988000000"], + ["0xeace932fa48018c7cfc9bcc8e5399a77c4b73c7b", "426619263801679000000"], + ["0xf8b317264429a80a7246ac9b5e2326e7bde760ae", "1516868452686160000000"], + ["0x4ed9c6193ede88a5d41b2e833e46508800420780", "1222000000000000000000"], + ["0x48c8786c66c95f14745156e9613eb76778cb3055", "523639648039"], + ["0x22a2f3588dc91a871ea600c528a702019ed04991", "6791072939971940000"], + ["0x79e421c024485ed3e23e264bba8f2b295950b20a", "329869499891877000000"], + ["0x198788c6464a543fa0bb0e7938f790ccbce8522f", "98522505894504400000"], + ["0x08bae5aca5d2347c2fa95f70ca1c4ebae0e5aadb", "6560633805163020000"], + ["0xec9e489936f60497898b40f3fe44bc22c56b62b9", "1328125000000000000000"], + ["0xeedc67aee2e487ea332b45d2a0e7289f955bbdc8", "63560974736170400000"], + ["0x649427f141e8f9dbe9be80983b4ba71dc3bebe8b", "668255662839329000000"], + ["0x5ef0ccd9e730d832e01aa859894cf8feef148cf5", "1806880648471780000000"], + ["0x5d782508ce956d9c75116dad7f54bcdd87829a01", "17340361942892500000"], + ["0xf09ec2813777ef277034865649096e1e215e777a", "343145325673693000000"], + ["0xfe6acc4399146045a2c9c5459fd49954897114f4", "704250100431853000000"], + ["0x461abb509f2d017d4a2091a7c91b583282fd148d", "153619407541374000000"], + ["0x200d426c684d730d40827e10c8ff8d90cd45eb1e", "561017477694571000"], + ["0x9f6bc999298a31973b343726f1c84a8c1f7e8c91", "100000000000000000000"], + ["0x54ee4d0f0b7037ba0a2705a97cbdd5487bfebd22", "2141845304338010000000"], + ["0x4f4317748fb27ea53d770282d1de357d3b0e20a7", "133552834059881000000"], + ["0x3a1ba4c78f6277f51ba365a532812d1703c2c7ec", "192848043271882000000"], + ["0x0f4b0ae3b27f404d6aedc3dd08320179070a38fd", "63378367185258"], + ["0xde0ccee1cf05a0f5b0f0c2b8ba5e4fa52b181f10", "1001010"], + ["0x90ac914ae057050395484459181eb916f0e50f71", "90000000000000000000"], + ["0x14d86d4c84e583b90a65b872cecc6ef56451f645", "25000000000000000000"], + ["0x8ab2ae2c445b8d88311979caa46bab47037dc9b5", "880119629504765000000"], + ["0xb88f002634cd733fa51eecf4905bcdd83c5b2adf", "832839657242919000000"], + ["0x2cf48f3be45d1786e74b88b7d33b0f6418df9ee2", "6574243341120250000"], + ["0x4ed05ae3fdd40136ac74b15bde5949ce50f7614a", "44000000000000000000"], + ["0xc3fd21806cff1b370e864967db4ff14c82277aaa", "335742032985747000000"], + ["0xd6ae2aad9406c7d429418ccf941a129970ded3de", "53510477775921200000"], + ["0x92a413d33ed4b28405f1c785824480e616dd6f38", "246437775373944000000"], + ["0x8d3c0495a3bbfa0940840064cf30a0d2c0b75b2d", "132189919472268000000"], + ["0x7a2121e0b92ae39ca9fdca303e73753c21e35f25", "7534000000000000000000"], + ["0xe32f576578f9aea942226b6a280fbce93da45638", "3396897255140950000000"], + ["0x0b3d6e6ebf95f38290b527c3dab253d94dd10b03", "50085153447107800000"], + ["0x82c0edfc49ed7d0ce5e84ab6b4ce4fdaa018c6fd", "189010994278536000000"], + ["0xfcd538bc55328adaf45121f307f76f5589f060ce", "50000000000000000000"], + ["0xaea564e201c9eafca02bb8a586509908c68f94b3", "30346382611694600000"], + ["0x957b17da5ff2ad20b123bf11ada5105465ecd09b", "176681581984355000000"], + ["0xf60d5f136d093024502b91af48f7a42a0cff9527", "14068147084916100000"], + ["0x9588d1ad3d3f5757d90f9a7b791ad6edc48862a7", "1051084258046960000000"], + ["0xc144ccb02b3901bc93783663e760123f510c3cfb", "52931159333663500000"], + ["0x91c4809243add1848b86e362192d80cd0304211b", "236551344179645000000"], + ["0xf79e3832d138fbec9052652607554b1929a98655", "439823881519522000"], + ["0x6d5bec7a483962bed9eb4014d415abdc52bed240", "712877727819602000000"], + ["0xe9ff7e5c69bd53638c4d04568f29ab575417d102", "322646528198505000000"], + ["0xb22311477095b537c3fc475a32f6b1d781bf9f2c", "70462280489755900000"], + ["0x70eb0915474806164a0fe4bf0d9f29a5f50dfebb", "50000000000000000000"], + ["0xbabf8fc6592c7b9da8c66baa5d3f0c98a94558ab", "66941044455862600000"], + ["0x8eab20ff3378dd0c0a46246fa74a7a14424710de", "197663734789735000000"], + ["0xfee2aa256b65efa5a78892ab14d206200ef5d7ae", "142745525264952000000"], + ["0xf1479af81176cead86a155940bb7c8d5366ed31d", "2587471128110930000000"], + ["0x96edea2c6c23c40185c3adfd8805c236d091c21f", "125000000000000000000"], + ["0xaa904493622a146fa04799626eb8b27f5e6d9f0e", "151738715178784000000"], + ["0x556cf3e831778860a132442fb6834482f6d91bab", "15000000000000000000"], + ["0xa2bee999df19254bf98aab7ad2e99249ca8f58ab", "274867941042491000000"], + ["0x141fae74850982116eb69534060277640db3eeb7", "1328906250000000000000"], + ["0x99a056ae0bc9e1a1f819d531eea1c0af8ad13c40", "547096632556636000000"], + ["0xef0505cf1ec565f3bae09a1e982dda7d9876c07e", "1328906250000000000000"], + ["0xd31b1b35ec8b89d648d4b1f7f96689a2d5b0d2fc", "435188405682228000000"], + ["0x5e8ed66f58c41657b05545e6a32ab4d32024372c", "712454113748172000000"], + ["0xcd51129761b394b447bd0f5f43834d36f1f90563", "60000000000000000000"], + ["0x15bbd5ecd13d4c3db5fe2902b154bea8a2192c97", "1328125000000000000000"], + ["0xb5a8f3381408cecfcf602301c78ceed92d23ff23", "679532808502611000000"], + ["0x76811ec47ab59d83b57c40c2778f5a355b3bb2e5", "48563035655869300000"], + ["0x7069839f10fa2df4c1683395800264ad8b3f5560", "98623018804476800000"], + ["0x2b6501b74149cbe243bf5897ed780253791ee009", "146484061198930000000"], + ["0x46b9ffe94a7b9b8db830b058834978be31d4e414", "100000000000000000000"], + ["0x2e457454ea91f413b743ded4d1a19be20d74aa60", "292680980267618000000"], + ["0x6ae66ab87dad05e9d49c49455631fe285d2e4ee3", "50760886418503100000"], + ["0x3dfdbca41d2f229d380f002ecb1da6ab6de09e7a", "1756768670653900"], + ["0x229a690b16b748f047d4206087c27b735d9d231b", "12540971181422200000"], + ["0xffda8e1961d9e55ece7dde23deb06ef7a5b53e4c", "257830564712115000000"], + ["0xbb9727a4f0133577d1893268725474dd00beb8ce", "1179299097743480000000"], + ["0xcec6ba8aa1fc9423b5a480dcc7f9352f26894aac", "30451087950418600000"], + ["0x0ed49c6d8b6e0a2342287707b857d58c94763481", "50709685112451800000"], + ["0xd9ca2b65b8a90589a16354ea178a14427b10ad32", "35867901722554600000"], + ["0x86b7bb6da273d926f24c03dcadb000edcd6fdcde", "98896185409449"], + ["0xddf7b2b23a0f5d44f0badc4a4062214df8b7a6e1", "32465864583493400000"], + ["0xb50c13ac04ad1e1b074d76eb64356a08cfeeb449", "9033998172822950000000"], + ["0x2c81cce3f18f25f77c2763c6940e53bbe3257415", "125774311501482000000"], + ["0xef3fdc051bac5ccb7aa1de3a0c2b3a463cb6c677", "45300330000000000000000"], + ["0xcf3dc6107a41911d39104bc06f62b5835511d6e8", "27945461713344"], + ["0x320ff44039bf3b6237337d08ab57048cf86817d3", "1268408416836630000000"], + ["0x11520b356dada61585f63104ce2899760696f35a", "17200643187454"], + ["0xfde49c2d5e0c4099c46bc61f1ffe45c6dd2f3945", "3969701987652930000"], + ["0x6f1e02f7853a7614f11c1909ed00310713d2e5cf", "1261597536696730000000"], + ["0x8798e67ab2c439ce9de938bb7557cacd940f5119", "500000000000000000000"], + ["0x08e412c1780b9decfd612d9946d9fb4284d4d8af", "23671670813647000000"], + ["0x5367d9bd6996b32b65a062618f7d0e00be27b107", "613532722964707000000"], + ["0x0a2eea8df5198e26357e6742b17023587056316e", "266231315674530000000"], + ["0xd7a3bc9af6a4e6653ceb0842b0d3a914232bc4ac", "174830212475945000000"], + ["0xd350a04d2566b5356afc7b6ec93db428084d7392", "2968045040735890000000"], + ["0x7ece5fc7290e8df49f8f1ca2f838dc1c8b0712f1", "734906355357612000000"], + ["0x14cf589818c2b04b454d36ce8c4225ec04649406", "156336000381831000000"], + ["0x6bf4b6f7286573997e9ab54795a46a8d9d91b086", "452748749629795000000"], + ["0x57c65938c659b4da2ef05d7064ae883140916af3", "15037804583119400000"], + ["0xf6d41073c8c5091bc8e62236d5c1ae13617af599", "800000000000000000000"], + ["0xa8add4c7d338cf06478a5a297ab17ebe518afe46", "480275055951962"], + ["0xeffe60ec0bd219760eb40e8b810c54dd2eddc351", "2504004249047150000000"], + ["0x44f4129e10976e20745cbf5cf6023a284eeee8f2", "20000000000000000000"], + ["0x36774a983fc9e2e11a5a4a9b540297a846bb4a01", "883650154648140000000"], + ["0x26661bc4fc9d2d51e8369cfe088bb127423771df", "50000000000000000000"], + ["0x8fe6662b70b93bbcda26e98c37dc325608704d09", "21034242967241100000"], + ["0x82a99eec2fc2ea9d7ce68a5b48e893fbd135ac31", "176919948237793000000"], + ["0x965211f826b66a35df7508194dae12beb8ccbaf9", "16995617494268300000"], + ["0xc54be037e6112716a507c0bdc0487785f3d3b118", "16680873225146400000"], + ["0x652022b1f234aa39f5dd7a5ff1162574fd4a9646", "73174927006732900000"], + ["0xb4628e64079398379aed2485e3fb05424cf57dcd", "155000000000000000000"], + ["0xa420d800f680e853c9b59a94b7c497e474ebf109", "125000000000000000"], + ["0x448bb8f15b115cf267ef7a46ff689117537abade", "30000000000000000000"], + ["0x409fbd2cd0a755ef2d005af5b72ebf24d68a1e50", "124129353016243000000"], + ["0xbaf658faa46bc1e4985cf5d0a2ba21a511f5db5c", "1378575825137150000000"], + ["0x292d9fc110a111c5b431e9758d34964b61f1fd92", "798623415811005000000"], + ["0xefb5ef346997390c2280e414a438b38b0615549b", "79254902837996700000"], + ["0x052390813b25ece17f855c65f4dacb094f23eeba", "100000000000000000000"], + ["0x40213401b9bc76bda3cee270418056062c47c702", "340956749868718000000"], + ["0x7a4c092a03d9f962a67d7822afa652366dac9b9c", "1343957380858450000"], + ["0xf22e471064efbd031a9dd864b543ca17b21b57e8", "500128214303373000000"], + ["0x7e9206591571b2166cd42baa92f2e69f683a979d", "693013289444763000000"], + ["0x7332cc520576cb233fa71e66eae0dd76e50fd60d", "69791465983730700000"], + ["0xe47a14edd56510a77f8fc753cdf1353302d75211", "1638001347045990000000"], + ["0x77fe724e8ae0a96051253e54e2140bc7fc8f4472", "47416297099"], + ["0x80b759f0a9391e64351e6b94e32c384a40d96b7d", "150000000000000000000"], + ["0xed4899b2a8da2f6e30cb2b4f593f83969d27da37", "56688610058477100000"], + ["0x9b37996b36c4cc37bac28017c22c1c9c7d91b807", "422934891037743000000"], + ["0xcec63c49a3ac904d20f74dc44e49e2abbf9ca4b8", "86840870607748500000"], + ["0xd081c10773d09a70d8b7db328d596337a70fa220", "238415412191864000000"], + ["0x53ea75d108fa644718e447a12e4c7a18b0ef0dc0", "5919516649704370"], + ["0x8ff2effe2caf7738a7f84c7fe1c3a07695707abf", "201299830483528000000"], + ["0x915ad5d773d25c1e1afacebbf687ff54c1470381", "120279108621787000000"], + ["0x777abe19a2cd375451bf7a307eed869df57542f4", "40100000000000000000"], + ["0xa2db796f0b89db0d4c1a0b94213e4878b2e9b36b", "93081350840427700000"], + ["0x9915f9204997b77184d8335c4a66986c2a3e124e", "119033532009059000000"], + ["0x55a141727c373c20a546f87c5c0ccb193e99cc92", "218066216197970000000"], + ["0x8b0176be32b4cd028d52755b99250202e1d4118b", "150000000000000000000"], + ["0x6e049bac106fb1a1dd43a25fc6e707385aa61776", "59892504171952600000"], + ["0x31110fadb4401fad566606905c03d9daf3c87ce2", "1001777923134800000000"], + ["0x00d14d2bffa3363114793f8f5df05b6d82f14ba1", "36184213790239500000"], + ["0x57971ad4b95f8a7c6f7e62e56fce0fc2b76460c1", "673772569931096000"], + ["0x69c3541fd1eaa0da10cb8a40c5d45f2c9cb591f4", "33773252008862"], + ["0x164a85f1f708a82930b3afe3c395de6faef28496", "6136233046874840000"], + ["0x64f2ebde230da818000d545e820aca110abe7d51", "107256247108748000000"], + ["0xf93c380ee224063334c2ef1a3af4eae7d74b70ed", "90000000000000000000"], + ["0xdda55b79afab326de5da404d3e7ea9cef0773f07", "1289062500000000000000"], + ["0xce185d79ce13b33a103219a55d88a0bdf9cd3946", "70752899220174500"], + ["0x3e3d2a8f9f116621234c91aae1e52331c9ab3ec9", "145047605923945000000"], + ["0xc40037dbe19d0e208904a5cfbd8edaa34a87958a", "1"], + ["0x73e29e5bd01f9dd9c92536461a0433a64242d9fc", "9721008005716760"], + ["0x48e151f572170c5c48b0fd52ec5d98d07514c542", "51419623386175"], + ["0x98b45938641f2bbd0a1f5c946840fb73d45fda6f", "1000553149229140000000"], + ["0x9a160699730d8aa4efb9bbbf454c54b4e08c0bcc", "66395722008244200000"], + ["0xed7115544b9dd9e997441c4236d17e495ff3280c", "86460042123331200000"], + ["0x75b25a519dfedfb1c47b611ba2d186c67a5dd751", "61660895531046700000"], + ["0x65db087fa02d0d0b591b4a30bced11647a863890", "188587250381901000000"], + ["0xb2238198fd969e597b0cf636ccbc4de707123489", "142749694534045000000"], + ["0xd668ee736188bafeb82bc118a05c5ab4524fd051", "29723248564762900000"], + ["0xe5b6d2bf24afa66add82ab0d5cc729ea48358644", "521400542245451000000"], + ["0xbcf840e1e4ca28e7a50982d2c60b9acaa158d0a0", "1000826435157840000000"], + ["0x3af08e71d0fae7c1293516d74035b050d58df024", "60355373075460300000"], + ["0x233b17fba461159d4d6987713eae82bc03bf1dc9", "11000280980246300000"], + ["0x4e079f7ae28120d5b95cc2f7efb5b1f150552ee0", "23245833738271800000"], + ["0xec3c118bab9e5131dbd3e1ecfbb7122926116dc4", "121520569416591000000"], + ["0xbc5b6246fd1e1f50185df9ec8d14354ceb8f8917", "7152864479889140000000"], + ["0xd5644cedd75150061552ab7c8414042f7cb95c6e", "29050428055489500000"], + ["0xb1d58b06fccd1aaab557d895f494d8457fd488a2", "4055496166112400000000"], + ["0xb4bdd9b1404ac20e4c0556ed0f23510af89e0ee9", "42547212982540900000"], + ["0x6eb7907e49187d231cf8e3849b24183a3ed7a9d0", "100000000000000000000"], + ["0x55e0d5d452eafc98dd4e60200e8865a1f09a51d0", "400717281361734000000"], + ["0x5c18260c85efe5a4a26efae933588d80e727bebe", "3304509709435760000000"], + ["0xe5348acca3061a742af08be6b6d102879e06b8c9", "6996994589541450000000"], + ["0x1f276d48171bc17e12ecbf076e8b5867aae8f98e", "507661406399733000000"], + ["0x254c96fc5e760e4cd159bd63b3ce84dc785b75b0", "560804030917667000000"], + ["0x1554927346e8f92465ec693e6ee46d9cb8cd6941", "1515117696237670000"], + ["0xd574466cbf972bd07f99f57c885a86bde04a5c57", "115856633470449000000"], + ["0x66f18019715410c94d8882cb57ed0f2ba432fb39", "828495066759029000"], + ["0xbd7d947f4c68b9dcf5292ddabb6e533c3625257a", "100000000000000000000"], + ["0xd5d810066689a08d45d03d0aa4e63cc8480b37f8", "50573864511656500000"], + ["0xd4f43a6b58ad6ed8e078b34f029bc24255fce120", "21140751834322600000"], + ["0x94b1243a186ee0e92dfa0a1d7d2d38b6935d1146", "87378064063322500000"], + ["0x24bd8002343ce7502059c3397767a4c44f8b81af", "63363743998652800000"], + ["0x14f683329a73e977cf2fb6cbec2094ca516b61f5", "42071958721645600000"], + ["0x9cc62dbb138093e72291ea20bbea62b8b0cbfe42", "134986149220626000000"], + ["0x5cfa454b330a9166b377aa51b8d030b3ea5910b7", "5816894271125030000000"], + ["0x08dda4b3d2daa6f32bbad7afc6bbddb27f6bc685", "29660996455815800000"], + ["0x8e67207da081b391d646c1483de673ae76c6b293", "49930975205357600000"], + ["0x0a892e051157de5ecdc8d1b166f732a543a0ff6d", "114860137382316000000"], + ["0x61bfce6fe4fe2901e1255702e7388c24fbf84c25", "183046862323571000000"], + ["0x7f1b27c621fe7e2a02a55c65a14e696c437b4470", "980486497683230000000"], + ["0xac1bd1c6dc224d7538507d5a8f8d1e517d385d89", "132693856003297000000"], + ["0xab6c7040b9c1bc2133081bbe008a740a5ba063d2", "39949689218380400000"], + ["0xbb681e2efda1fe3cbf8222579507f296e9493f0c", "1898610485936870000000"], + ["0x74c8f1f3a5b9f684c393a30ecb7dbeacd00273ef", "111654919224996000000"], + ["0x98152e3044fb79a6ba7fcffd2205ba52ebc7eb4d", "1599292821129770000"], + ["0x4295093af90ac152fcd37f683b033f0a16b0d51b", "29702853647823900000"], + ["0xeb2375b164c734081cf76cab1eec0949d9e0cfc1", "85809700050681200000"], + ["0x636f0ee8a1479eddc9defda6fda6afcb655bdc7f", "104"], + ["0x547f00cffa5688f3a364e37c57a24e00fbd9491a", "350000000000000000000"], + ["0xc459d9101d939335c9c60ffdc445f4e678b37269", "62707303551108900000"], + ["0x5828ea3ce544ece493a44894d94c3b824bccbe31", "70000000000000000000"], + ["0x0f56ed6f7c71aef4e67028882ad5567db63f7925", "34627459127682300000"], + ["0x2401270543d683c1c428426e6a40e0f1d3168bef", "292534464272484000000"], + ["0x3701ecf85eae013842224c9e0649f97ed2bbfd72", "100000000000000000000"], + ["0x51f0277abb28a731f5a52ce57a45daacfe9ebfb8", "119288447312920000000"], + ["0xc8b8f52fe929731ab4a66c0ee3606293d2a63467", "150392153596914000000"], + ["0x2f7fbb348059f2aa899c2d0838fe4824d25ae65f", "100506342839245000000"], + ["0x8fb1b269474bb69db9f5190b33c0d3751d1bef46", "848842598433130000"], + ["0x7067bce753801201b94fae26a344b7d16f6ae039", "37214230355088200000"], + ["0x4de216fb73e84c5b980eaf76d1d97b1c9a8456b0", "50000000000000000000"], + ["0x6b44bc885a03a6f89465ab19c2204f0cef862810", "114187234577341000000"], + ["0xd3fbda6a3a49adf3cf6b2a3501b5c8cf270a07ac", "313621851295099000000"], + ["0x51aa5d0e7796f433234515321255bf15c8f25f07", "14253734536286300000000"], + ["0x0146ef4fc66ec0902818221f98549a2b9b13bf59", "102003491711271000000"], + ["0x0f4ef857e05aed6e3cad417a244c117997d0e83f", "30069042713635600000"], + ["0x1d7b13d2c5c130e698dffaa11d76adabc787f269", "6324364128268130000"], + ["0x3d93dbbb6d17a93735d0a845ca0da846567eefc7", "51112538154117800000"], + ["0x2049fc7430c483c807a99afab92778b633070bf0", "29691019543452700000"], + ["0x90785a2bfc4ac26f310000171ae7d8dc74e04774", "59328367373621600000"], + ["0x757ab63222b3cc04f9df32a33ab5e0b15f4fefca", "102722253483204000000"], + ["0x386cf921c3c64859d4892588aa02778807627709", "300000000000000000000"], + ["0x99496a4c0426e3dc0eeda7f28298774dbecf815a", "149171555135737000000"], + ["0x522bd2c3ca9c6a697083c4e62d8e883a1b519176", "1100357062448960000000"], + ["0x4a612d69eed0b8827ec9a212664ccdc9cb2ee67e", "70189340087026900000"], + ["0x4071147abf0ad7646e7a3d8590b7357a7a57eb1f", "11968731019549800000"], + ["0x6f1d13763c581dbef3842595a2aa5b7b9e7ae4ab", "720677024908861000000"], + ["0x9aeddd3e58d79841e79a3570069fac84de21fb0f", "83695677471675300000"], + ["0x4761bf691bb4346a7e3790ed1fc0581052a86d34", "119293388011458000000"], + ["0xfeb2549f293f54a96e780ae8a81b03129d539136", "15548256306984500000"], + ["0x925e1eafd3c97e863e1ca734c32eebd2614a6639", "505549514774791000000"], + ["0xaefcc8992d7d42dc40b8a88c2b30a5c808d2b58c", "301307783644941000000"], + ["0x2e0a9d5ec769f4d9cc4c2455f2eacc9c3de043ce", "88516763571043900000"], + ["0x053960de1dd789f2279b9c4b8a941b6437af3802", "8257548537653730000"], + ["0x1cbafefd21ca100f0282fb909399d29f9fca17e8", "20000000000000000000"], + ["0xd47bdd78c4eca4b5ac941a4b4cf62b34be730c42", "1549990396663000000000"], + ["0x676c34516117107fd380940c62d5ef9cf08a7fe8", "53253418287396800000"], + ["0xaec0ccc91de830b0e9ff5c99ff6c347ce70c4a36", "51678866813938600000"], + ["0x45e3b3a5dbf5f698117e72ea65126121d13d7337", "40676085855386600000"], + ["0x6c472e04f34a7ae8bd74ffcefe4d5026b02410a0", "80000000000000000000"], + ["0x050bc4d2797d43ed0068fc9a60b83a064fd8a91c", "910705482843165000000"], + ["0xcfdbafa49461855157b2dc8c9abbffc7327d4197", "136103875737254000"], + ["0x72c31f6cf2f22396c42ec33e51f76b6e6c9fcfdb", "613924874538117000000"], + ["0xf0efe8f6028425e9ba49d251baa7b29875443bdd", "184602357185992000000"], + ["0xc3b424d84c3ae1c04a5e2c33860be8a1b89b72fb", "142482579427989000000"], + ["0xb0dbfa6e34adf8cbca0332a155f0fd9b93abf35c", "12840000000000000000000"], + ["0x3bcf25e8da05c55e236d6caa0ddc7d17482ab178", "1046867624093970000000"], + ["0x7bb7a6ef0d9807b28cab6f75cb0e6b847d04b7a0", "67650886420909900000"], + ["0xcc2bc0aaa77c5f1527235882194780a61ce0dd34", "502527558341513000000"], + ["0x1946102fa977780a0c265b6073f206c2d6d3bfa3", "7936499476786770000000"], + ["0xf467c7b8f063b46a0e633d28dd9b0f9f3a1dffea", "300000000000000000000"], + ["0x64c4c46731d2fe68672ffb08274491485eb26dd8", "10000000000000000000"], + ["0xf5556f61810e6c8c0741fd03f20032af4276ccdb", "85689543572624900000"], + ["0x37679d8f112e2fdc0d3180d19961b977c45760e5", "41067788017805100000"], + ["0x2d953f2d7cb77fe2d28eb804f5e5a4a379f91871", "50000000000000000000"], + ["0xe335b972e0c5237bdae8bc55bb7b40fc8b927fc1", "87373167438683400000"], + ["0xf29d3c5fd33f4769c92095c7801091688e2ccc37", "1180771154426710000000"], + ["0x60ca37f5ccd976c99c0ed51beb95f02e41f258f2", "50000000000000000000"], + ["0xa5e8c5b3add6c49265ac558dbe756952ee7ec439", "760041475801999000000"], + ["0x2479737205df8bb6523878b4c881470e80c46d48", "327118043310967000000"], + ["0xbcb2a27048dbcb983ab00829679a1c4b004505a5", "182831627111200000000"], + ["0x402dec3f9fb0d2fdb4ca22f3800738bfe7082765", "317710008442584000000"], + ["0xbd9205acb643095de74002d1b14ca7e5e7b56bd2", "2066989301846460000000"], + ["0x53345a9fd3098d3b0e2ebea2d0845b302ebc3471", "21111563411455800000"], + ["0x1233dd90d5334c8d7d0a7e14fd0b9638235402cb", "335629129425740000000"], + ["0xb5758b77607d8af9d7e83282186209d5258e52fc", "1000000000000000000000"], + ["0x0f6362f799434041070bb8bdba02984e85fa8ad8", "333558263901408000000"], + ["0x8e360daa57ab3ccc99a8af77fc2de8ae1cb99e87", "323640986993197000000"], + ["0xa49c1e4ee9ebc48ba8fb8166f79d9b628ef64ae6", "1248938796718990000000"], + ["0x613080b74a75eb7d649330d7279f548916a36eb0", "112546720566192000000"], + ["0x4167247acd955124fff268ab657693c2a9a9d00c", "129000000000000000000"], + ["0x220c9e5808b754cb6274dae00252cf164e435b25", "5000000000000000000"], + ["0x48e2eeb4a2eebf02da24b11df1ec8bb0efeaf6b6", "531948375074966000000"], + ["0xb9461e4f092bad1d6bc3a549ad87ebf6ef7e4925", "820000000000000000000"], + ["0x22d514195ed0d7a7c34973dcd597741e197c932a", "268714908744505000000"], + ["0xf63c7f01c7951c805c0fa4497494d9c6ee451553", "51395965017994"], + ["0x2060970cbb9681ed667ae0624abf73bd5fa99a28", "100000000000000000000"], + ["0x24c3cf19e12dd05feafbe47cea4aea8211f0626f", "13705109867769400000"], + ["0x3bb5401d7266dfffafeaa041b7c2df13fe4e1d8b", "1854309504727240000000"], + ["0xa095ddff8597e1ff75e43fd95fe37e36aec4c689", "1478884256628720000000"], + ["0x4d157701701e2555c6e6b546422a8ff2b85adc97", "339737104601114000000"], + ["0x8b0971ffa41adad2530f78e54fb7a260ca491bf2", "8000000000000000000"], + ["0x3e5111973cc681e36b8fe8a41b38699139b42bdc", "157188184046030000000"], + ["0x33cefb235c6d1328eb5486d154a6ee5d57652f8e", "332984965854479000000"], + ["0x388fa28e670f0dfd15833e3a1ab71a728acd1b50", "851868222288278000"], + ["0x9d03d1b962d87cc20e3c28cea67c7c78b58de400", "3751833770974"], + ["0x3136540ebe9c2703412b387dcd993ae0c1232a18", "173694335387589000000"], + ["0x66ea49e53039a3befecad444220033313c7109e2", "43419070940808700000"], + ["0xa6b59d4419bae35d09432f2e35176a576e02f8ee", "54131191211272"], + ["0x5f9840c4d45a91b600b9e41dfa7a6920bba649c3", "437981869850042000000"], + ["0x2066c825f210f38bde12e9613399ebc042ac3700", "1"], + ["0xe760d2fcff38783761361518e8cf79b589d4de8a", "111911911599388000000"], + ["0xb1b763f855d5f81be4c93193f6f096c6a051585c", "600000000000000000000"], + ["0x33d288c6f473cfc32a837e6717d276891dd5c9fc", "179637374140115000000"], + ["0xd073a914e6feea850c46143eebaa681373b65f67", "71700120909194400000"], + ["0x0042614e5deea4709fac6584d1560e3222daf963", "990164267114480000000"], + ["0xf2817674f7a8361b918aea9d4fb9c6900ddd70ff", "4029302373429120000"], + ["0x9f34b0bfde60935d5456be706c888ed79801f5c4", "31375524868443000"], + ["0x06f5d2a078e42e33718d5f0bdd55c76f17bd67fc", "769030533833300000000"], + ["0x505ee2c414c50cda40a13a1c9b9c5af106d6a3aa", "53976311777650900000"], + ["0x86a41524cb61edd8b115a72ad9735f8068996688", "3580190613108830000"], + ["0xdc5ac9650b4296b1d62943873f5222359bfa92c0", "300000000000000000000"], + ["0xb3956cf916d72b56b36577c13f2acba868d26c5d", "183000000000000000000"], + ["0x8159ae23624200b2929739f628a5472182f2b979", "388651070366050000000"], + ["0xc4b2d4c8c7fe747c40050f238fd09e5c5cbb5869", "181834031907375000000"], + ["0xc69182d1ab70e268228382383d6886965c5d07a1", "65665"], + ["0xe725a14c6f6164bbd49438b22c82cc8b08ccf584", "553605806688051000000"], + ["0x9386be091ef974611c103f95d6ee8805767b2020", "100000000000000000000"], + ["0x963dca698ade8fe3ac61e5a4410ebd15c0a42d77", "49571951719983300000"], + ["0x0e11a192d574b342c51be9e306694c41547185dd", "46315986191279"], + ["0xdc09d500230169cf53c1a5b9ddb6f412be95f64c", "193893974761822000000"], + ["0x64bc2504519948633f639ec35d955f738cd70b43", "408125000000000000000"], + ["0x4763aedd619f18799121a86b3805f7772b4c7e8c", "18360264274250400000"], + ["0x55569242acb5e5ad26dda8f68683d661ecf6fb25", "30000000000000000000"], + ["0xf1fe0a34e66d684f182a0886f795e5f22d0e64b6", "16152770729906100000"], + ["0xf7977e5e81d9caef2d2e80bc73c0ea28cc49c75a", "131924713811163000000"], + ["0xfafb0aba94438e20fc73c518c0737823f36ca39a", "171812183005924000000"], + ["0x3e50030e520c629b9facba589f5ee50656204da9", "72008320402041800000"], + ["0xf60f587d07e52ba306a9c4a75d35a752bfa3a922", "1818000000000000000000"], + ["0xc83876d3909c5d7c6a6ab4cc59518da83ed09bc7", "212387222173592000000"], + ["0x715c13b331b20bbbf6e23d318ccecd29602185aa", "191480059116877000000"], + ["0x320ac2c6fc3eb2ccb8861ecbd0c06d7c7dad0295", "77000000000000000000"], + ["0xae5a42c292a9bf774e0dd92779110b8f0a355e0d", "346451564987064000000"], + ["0x7d1e7b12cf218677a43bf30524e05dfa46582a2f", "440592162684201000000"], + ["0xbdb5d9d61d11c106d649dd21e4749a80884641a8", "18306556908404300000"], + ["0xf1e6a831ceb1ad01128fc2b10a066a67d3654640", "35911123368503200000"], + ["0x3bff29408eac8569d0dc8c936e6b55f71a5f3397", "456623298707336"], + ["0x10c5f89cb714d908e4cc3db31c4d551d6ee15061", "100000000000000000000"], + ["0x2a183e310e56cd262e4b3024ef9dc490fd108f8d", "339459703193599000000"], + ["0x838db4c8150d90276634c1c8df5b9ffa967ae658", "40000000000000000000"], + ["0x68e17ad361a8749847f62e6fa8b6a7d6a1a90b4e", "42818223610833"], + ["0x9b985bce86c5af3e6071222c8cfd6012522b07c3", "100793865225819000000"], + ["0xe12986de407031a7b59260faa2b28571f0757854", "353315196533453000000"], + ["0x88745deb49104d0b1bec79dba933e3022b3e3483", "463538606311293000000"], + ["0xfad857ea48dfab915ac34ee3a1a73195bf21a222", "970668141534006000000"], + ["0xebc7e58735280478eadb480f7584c79ab955b094", "399291026006488000000"], + ["0x36143d6ab3ebad1977abf30676e77f27e5ad4d6f", "40000000000000000000"], + ["0x2be2fa0c5a0ba2c046ede2255e4bd08854347de1", "387955158864278000000"], + ["0x5ea98b98ce29cc5d333bc1ba294bc08bc618f294", "9796015587961480000"], + ["0xb4a2843676821bf9f8b324b2ab31a78f2a14db62", "1294022568142020000000"], + ["0xdb5019b8dfbccef8906c39b16a4870082eabbc4c", "61210032615508200000"], + ["0x3624c808b025fa95402b13860de4d43b39999bbd", "593154533409954000000"], + ["0xd70cf5cfa19eca9af10ef3b62bae57458058d2dd", "94104881051184800000"], + ["0x53cbf587156d4970e452967794962f67dd3ba110", "4929000000000000000000"], + ["0xe95dc5d3fa1b75ab6ce0a8775eaa1735bbbbf382", "1500000000000000000000"], + ["0x13c67db97fe5677d6d8555ce1722e52005864975", "96547158433651300"], + ["0x8ec4ac695ee355e544e024b0500247321c922dc5", "181000000000000000000"], + ["0x2c6a30120aef59a4cac0ea21de8a2d2411df6b51", "64980266783942400000"], + ["0x5b409dc153c2c93957cb0ca6b3a92e99d590c976", "189781749893467000000"], + ["0x21606ee18fc1c9b398c25f56e98e6035ab434299", "884447307993"], + ["0xedac0b6db8a835a8664fd51fb96361ac707f8ff3", "301610328747186000000"], + ["0x5754ac025e57b961faf6f7fbea1c1cdb586e9a14", "20000000000000000000"], + ["0xd4e1f6e0d6b121253bb08b3246d9458b13c5d92a", "426712768913402000000"], + ["0x83401c971ae7c1ec19646c99cfe6c6e2b9115781", "628062481529110000000"], + ["0x295f6052269e4097d6dc18d36c48de2b390b38bf", "170492305966448000000"], + ["0xa5f0c698ca7858b7cee31613ff2c133e6e968485", "720488598164264000000"], + ["0xc1cf75ddc9e07a2cef8b87b89e5170fd7351a602", "83373378948876"], + ["0x75d076f0a9d560654fcadcf6a78c212c38e60bf5", "72612159845592700000"], + ["0xd3fb0f853b67e1a3d03cf2664819e32b2478b253", "10000000000000000000"], + ["0x60f79525ed412211ff056bb8837fcff41db3785a", "93883961919938"], + ["0x0a289dee4c9fc3143b8a1a06e059a1dc4b6cb5bd", "187093286497283000000"], + ["0x12a7872c328b5d6c7703137ebb6c7186da6affcf", "38453492224485800000"], + ["0x5c925057733caab7f4236a87026a91efe240e43a", "6915028581883"], + ["0xeb53cf261ca1b740986d2df7d55701e68a7ef5dc", "190311256502808000000"], + ["0x6a2995e6da98f65c7c1548e6a2b681f1352addff", "406359830751826000000"], + ["0xed159585fc50f449b1b2b8bfcb6460b19b69d5fa", "20578343133485"], + ["0xfa497b907904ddc735f5059a4ed97275295148c5", "300000000000000000000"], + ["0x886a3033fa4bebe2bf687d982e9350e249fbb2d9", "100000000000000000000"], + ["0xae131090ac41fc9d3187fddde226ece281eb3c12", "476442651578335000000"], + ["0x8092de26142e0287a2b6ee4e0c622f43b353e29f", "481939057740289000000"], + ["0xfedde14ac70ed6aec56f955d204355196427e09f", "57193119657880700000"], + ["0x9dfb83c79e4b6f23ac5e2b9a6d084b0c7b8036e1", "696999906259075"], + ["0x6f15aa54a9370fb5a64291499b77650d5f3882fc", "46481218145030"], + ["0x42959b3392c528bd2a54e06e4fb185a6e1376610", "205000000000000000000"], + ["0x795f7fac23ffbe668619cd2d4036b177cb388983", "33406614940124000000"], + ["0x37b66ad48c6bf20596ac215354fd5e047011d0a3", "300000000000000000000"], + ["0xcf46e636a925b5cf1f5ae06001b26b25e98faac6", "394118469182846000000"], + ["0xa2c967b2590f73b5d9f641a84513e1bab92ba301", "173401512005443000000"], + ["0x74472d9aa647cc2d7e58e121b3b0a28a3f3c846b", "200008975400922000000"], + ["0x39889ebae2bcc641f9fea9646ec668e4987534bf", "85045047810276300000"], + ["0x88e6c5b96710c0c7fa63e593d9675a424f4346a1", "34000000000000000000"], + ["0x1eceda8cae8cd1d2c26ff4a09db5f16d9213a891", "1000000000000000000000"], + ["0x473f9715ee5434523e4dfc4d8ba6a2dc2ec4dafa", "394498022999821000000"], + ["0xa1cf8209979ee8da52b2b0f1335cbb9b3065ab20", "124373462292645000000"], + ["0xcdec76c3aeb712619a7921ce668c3deed1c375f4", "16345"], + ["0x3ce90db75670e28fc9bb3fde67c1d6e005012d2b", "48364108196793200000"], + ["0xe384c6124e0da68155563aeafb5adf8d0af00bcf", "81080683740338400000"], + ["0x79aed628ed7faa2e7f9f69cdd53e32a92261a009", "30000000000000000000"], + ["0x0136c6fe0796a373e9ac5bbac2576e94ba0b81ba", "773740420647873000000"], + ["0xfcf44a92ab1be1e3aa882fb26ba5d6da6ee51955", "24425417321004800000"], + ["0x6e66f477e0bc825137ee18434ea2af9b862c6191", "169987302099511000000"], + ["0xd6a113f95a860036f1dcb6e6c0bd2d6fd43ed6ae", "123526994786040000000"], + ["0x09a4e26d69821edeffa5eb29f134d0d8cad8efc4", "21638041863621800000"], + ["0xb786074078d2cd10146521b500cfd8a154c13b2d", "375547087036081000000"], + ["0xb66b58e836568543f45d86dab458df7a71ee35db", "398647781095234000000"], + ["0xc3f7a43e07fdd31ff207e14d51f01a625f47092c", "926261388293568000"], + ["0x2574a67bdff7a08169d91f4d57a0116b15cf710e", "2610652291684580000000"], + ["0xdbee05be47ef76a1b7e1c49685f9fc2befe7de0a", "217848270779"], + ["0xd68f3344741a1b4214155c3aeb8cfebbebef7274", "31280289989851000000"], + ["0x685b5d49f4a9ef3b1e36c81c6237c62024b487aa", "389700948136852000000"], + ["0xae4b2db117e0b599433b9457fb15eea4e97eaeb4", "25469960304311300000"], + ["0x5815b5e4f0945370d305310d0faae21ba0e118a8", "1000000000000000000000"], + ["0x2cef4d551ac656d617676c6d59471b63ad45cc13", "4706"], + ["0x9c9131873ccce172cd636474ff255ebb1c692c80", "54015930201288500000"], + ["0x7932c752b122b746255cbc92dccf1e4da33104d3", "3189693711"], + ["0xa627db0a15f3a763190d69c72522ff70715b9289", "20232148133893200000"], + ["0x1b59237d0cff7b879f3a7c5045d30ba3e9518d3f", "50000000000000000000"], + ["0xa4c759bd2084645b93596a827571893a51001a83", "26779088969"], + ["0x0c1eb4da74daf337bacaddb2850b3b93d8f646cc", "124111934516357000000"], + ["0x0959ba0cabd2ab398c2c2fa7d398c2310eb4cfaa", "181300000000000000000"], + ["0x1da318b980bd5577f2cb21777635cad9a292fc64", "104073354869446000000"], + ["0xc25798a86da18c56aa19ea11aab217ce53bfbb2e", "179961766362848000000"], + ["0x9ed4f3754a81c283c514a6baa8f9ba78e2ee6e98", "45980371491607700"], + ["0x9fa4f4fa0664dac15f15eccd448136b2bfdd20c8", "6247750429210"], + ["0x3710f6a6af356bfcf86fba06f4e862e1d4283f27", "80000000000000000000"], + ["0x8328e993824843a5348e1c1a9194925f468d7dee", "170865528724330000000"], + ["0xb0fa64bc476b69e13579715c9036b0ae7cf3575d", "484596487256856000000"], + ["0x82d5cf59bd09225f39b5c4925f738079f2a9ae69", "19670099640366400000"], + ["0x0664fdd5d83ae8fce72e703e1e26834abcc2e202", "285386359010570000000"], + ["0xdfab1639e5ee371805484f572422e2fdf9b1398b", "110223441040504000000"], + ["0x2c28ce41d2df4b64a9c6509a4dcf5a3ff04952f8", "1100000000000000000000"], + ["0xc9badc2b35e5143b74443a990cac1ae820d2508f", "634864074673091000000"], + ["0xf056177a8d906a32fd0e08e16bc594cd41203dc9", "60000000000000000000"], + ["0x392141c7742a8794fd06a06bf72e4a0665cf4699", "10241566873293300000"], + ["0xe679cd0aed39a1c1e91b4fb5c6dd1fba9d2c6173", "36988350193435700000"], + ["0xd263b093076130d5c2db662e2237532b6eb8cc87", "125000000000000000000"], + ["0xb4ef9a2a020c14337e7e0ef9ebad8b1c2d50eec8", "101503929398029000000"], + ["0x23b660111d92492af9845319d1af62384caaa32f", "246459188329233000000"], + ["0x980c8d51202532d34647aab766993a6ecc9d0a59", "190975353510891000000"], + ["0x01bbb770e02b811a656ac3e9b650d8d3296b1561", "240450301381447000000"], + ["0x6acce4cc780847e681a269a821557e4c32ad9cb7", "371283381678075000000"], + ["0x174d8441977f4492bfc7c7be26bcac2056cbcb10", "144414863545094000000"], + ["0xf0df80645a4daf7c20a48abc09d0a13a1b55e895", "21681432005701"], + ["0x56ffb56a11417dc5126eb9ce0fde1c7058daf541", "10000000000000000000"], + ["0xa7b95d2a2d10028cc4450e453151181cbcac74fc", "82824406813224"], + ["0xc6273dbc610fe3f032a509beb32830d40018182f", "21160958328267600000"], + ["0xd382570c8c16fa6bd31302e5cb2bfa4f58ba1004", "2996121793430250000000"], + ["0xe4765356396d280de0690cd763a4612a44778bba", "693217314234232000"], + ["0x70fedc4a7c06b055c2f39f3e9d7f78c173c438c5", "95962319865977200000"], + ["0x8181dd76e1ad2362407973aa2f63159288932e0b", "3256630992458030000000"], + ["0x8fb2a5d8736776291388827e9787f221a1d3633a", "657121097816296000000"], + ["0x1e9baf5c20a7a3cc3e55b89ed4e30579e0f072d4", "67458153356774900000"], + ["0xc564de8c526f74e0b2f106d06a2929a0b5146fac", "404469509423181000000"], + ["0xa5038c7717d2b082c6301cd68093e8ad3b5dc466", "137297990897783000000"], + ["0x9aa2329798818b32a6a16e9883a72b0b7c4710d7", "15243116065915000000"], + ["0xb57cae748c618ab8685a8143890c61c62fcd0f8b", "20000000000000000000"], + ["0xe12ebb51f6a712bc323f7fe1ed36c9cdacb47d15", "810643606019914000000"], + ["0x41e524a757e83c51535bf8bdbf3a9bb992a5dfca", "85000000000000000000"], + ["0xb20a18cb4b22759eec8dce76736a0c2fefbc09dc", "2053712433578040000000"], + ["0xaa507c45a3b7f8e302c4699e7acc606bf6ca9d4d", "1000000000000000000"], + ["0x5895b7467afdd8cae2d9dbdac6de5522234f2e1a", "435672132208417000000"], + ["0xd3811712e3fa3e03388868a62b1067513741c4d5", "1752377069343490000000"], + ["0xf3bcf408ce0dacb9bd9f65405cbaeb6d242089cb", "62623157772995700000"], + ["0xdbee3104f8790208e2980e4acdbba3d8f0c44848", "110000000000000000000"], + ["0x1c626fa2c802f8bc8019066cadecfe3787a412d2", "30000000000000000000"], + ["0x2eacd09e92273d5fb86cf40504917f664ee15da8", "100000000000000000000"], + ["0xd1fca26b21d9b795f63dfbbff8a8a9c7e591243e", "79801210169145400000"], + ["0xa66bf5d22d48b69a08746d28c711f6d56d44480e", "70001833092133400000000"], + ["0xc71af083b580fa0b697ad8b163006e4b2ec1072a", "15440741361075500000"], + ["0xdf0ae251dd439d49ba136d4cb63a7f75b9159cdd", "247597985016225000000"], + ["0xa5cc85c6424d74675b28feb9d62fac9100e7b89b", "213944768543708000000"], + ["0xfda9622805b436bfed46381ebddcc043eb2ff789", "150000000000000000000"], + ["0x2b404f693fab1a348cc202f2bf0d30b61ef845d0", "687587566563"], + ["0xe5b218700e71f05acea6a0eac74f5d2a221839da", "111242555217706000000"], + ["0x51a23f481037ca208086f42fe83d28b71c1ebc2c", "125477008318998000000"], + ["0x1a95d0c59131212c06cbd824fe1cf258b184a74d", "29200000000000000000"], + ["0x1688888ebdab05737cf752acf7d11d82f21ac5f2", "34721000000000000000000"], + ["0x168881a4eea012a46eed7f3f2ab3fda2ff4bdd47", "16130500000000000000"], + ["0x88168d089f75f5cd93f777ec16bbb178a7c7b512", "37811000000000000000000"], + ["0xd0a6c4ab167e2e1538badc7259f6c6c68b6d3690", "70000000000000000000"], + ["0x2053a99675b0d2070b7503ff4767567f91073de1", "405204203242470000000"], + ["0x2eb4cabd4422c6b8a340f4a56a1ed884f297018f", "452400155469150000000"], + ["0xa0c559760de28dde7d87087b4db69aea05c24f18", "80222689532234200000"], + ["0x8b8e3da80e159eff2535b23e8b68f7ea45f930e1", "18249843448983700000"], + ["0x34cab12b13fd5bb41567a73e04907b861a743198", "919243332490012000000"], + ["0x3aa80f86314fc45e380e14f06865d62e746b267e", "75101245569405700000"], + ["0xb2614714470fdff6ada5717d97c736b1bbc0c1db", "448871093975189000000"], + ["0x0ee72348a52c1543351b4382d943ab4a2d1848d3", "103970460781336000000"], + ["0x788df054a2b4d0deca1d08fb2e91d64073f66229", "3909389070391070000"], + ["0xe439a91227a0db9824434db9c607a55af0bf20a2", "29786854"], + ["0x40ebf96e428b4920a7c4c57a34f99e71367a240c", "8248860684193"], + ["0x1d9c4b844030d7a275a9f65e243870900fe763fb", "71128693450570"], + ["0x0be6dd5712a57913893f33422b1fb63c076cef0c", "126451475041898000000"], + ["0x62e9cccd6f5547119c5ae3837414db5c9fafb8e7", "207643568700366000000"], + ["0xbadf5f1375e407943e45ced6286ff95412f27948", "57578443848266700000"], + ["0x030f21b61d520bda2792d81cb461cc9a72b91950", "33702714219864800000"], + ["0xc3da4c7a75cb02b6c90e57f62aa6f749cfba254e", "179798475661788000000"], + ["0x3b09fa07b38a8ea1673219fd3c2b586312d6a0b7", "30924865215080300000"], + ["0x6d759273795a2d3f23c5887aa694fb21f2ff0901", "385275048424688000000"], + ["0x2159cd8abc5b09ec9ce6b89160e3d9720d244926", "337118722210270000"], + ["0x604bf919d887c6d7ef48f0f2f50e39cbcb2154b9", "200182429751586000000"], + ["0xbb2a74fead35c15cfce7000e583893820bc9a237", "11366214865950000000"], + ["0xb6dd90bdb43c76793080e2a8065f084763602245", "369781128593656000000"], + ["0x912d85c7c08cad46cc88366c29853686707514bc", "67762047224468000000"], + ["0x466b23bf30d7bc4541b5470b62a0fddcfcaa33d6", "267752010198552000000"], + ["0xfd4e0c671415328fb647f6f5b6adbde72da154fe", "937909847486419"], + ["0xb9c6801ab14077b3ad443105f67979c841587dbf", "45000000000000000000"], + ["0x0000000000000eb4ec62758aae93400b3e5f7f18", "15788474510575300000"], + ["0xb5f622c8c7696ea5f4ec7c1049ecca38f987df4c", "404628039031583000000"], + ["0x5e7ecdd6752d53588a111636a7217c9677fc08df", "20000000000000000000"], + ["0x6e83856ca658cab80b38a840d8631c55768a8679", "477152388249400000000"], + ["0xc163197a9d80f04dfaa550da9aeb826d81ea33ae", "634003448276561000000"], + ["0x401918351b997816f802db30de7b4a21518a79b9", "119214622277622000000"], + ["0x775155fba93dd2c6911cb11e48cb766d520884ce", "222202314691091000000"], + ["0x9b1e37be2659fcf010cadf27cc0592daf60f2b86", "71688042224926300000"], + ["0xb2f5b7009a21a6af46582f31325ad9aaea0c0bd2", "800000000000000000000"], + ["0xc3c47a883dba39254f7af7c655566791bd404085", "410042770104445000000"], + ["0x7dd6426d14c25e47f13b4f0cb1f2fb695c5a0e2b", "88000000000000000000"], + ["0x41bf28dcacaa6de53eb9771799b6fca5aaa57758", "420826744734103000000"], + ["0x525c8ee9be82b647218aea01c2e914b70469d966", "129857783034182000000"], + ["0x4e3cfa54f8cd3ab91a8ad2340cdcd183b5dc7440", "349581833531466000000"], + ["0xf3f83f6a5830e55b45b3c44010be0481baa1b9be", "479595017448411000000"], + ["0x08508310276b879190a6f787c404ce8eef8d5432", "1000000000000000000000"], + ["0x92272428764257be4e09355858691a7c751af36a", "250000000000000000000"], + ["0xc74c6cb5cf777a303478805f0797ad7cb818b115", "1"], + ["0x97b9a3cd5425974558a3b8a8315284f06d9451bb", "811432298543834000000"], + ["0x1438096913309fccbc17529398752aebffd52c0e", "425164152165935000000"], + ["0x50ff7a51dc4e531a4be71a92a6c032c1f67efadd", "1276188458384470000000"], + ["0xf1b1ac4cc89b151de017e06ed7d82436505a6056", "517417602560584000000"], + ["0xff5eb7340f17b6308400a4692efc16e7969c9663", "81347328652975300000"], + ["0x930bfc8d93c71d4412b9e5532e3c91b822b8de51", "1050424292493360000"], + ["0x791bdf53cc4afefa841506035e474c3c1e7126dd", "823223003469699000000"], + ["0xebc627aac94297e8ebcaa3bd1dcc0ef69ce44ae9", "10000000000000000000"], + ["0xa79521ad05ce767047048eda8a37dcfcd26a2a18", "161434261094274000000"], + ["0xef782b830c609149d3e8210e6a186f86c8b9a1e8", "148460268988967000000"], + ["0x8181f49f1ae41d5801bb9239d2bec888e60f83df", "100000000000000000000"], + ["0xe809492c3e85cf52dcd4fb284cd0f2e629f3eba6", "1554845026013760000000"], + ["0x7002c4c3a0c5dd007cd323ce1b43d128d04bd63e", "3080049706556390000000"], + ["0x86f991c173663d554540cd655ce0dc10944899db", "20706959691411200000"], + ["0x102dbc29586f8e4b12b0e11c95176a32249cf80f", "812284903861664000000"], + ["0x1ca20d63ff66314b82bfc3c4af942e919fdf2fd0", "144396005586351000000"], + ["0xc0e745a82eeadee784e7ba56fad17e7b5adcb76b", "692463346780626000000"], + ["0x9e06af6bdd23d2b3920107f82247ab7ca18bc03e", "80000000000000000000"], + ["0x02a97b8ebc1f3baff3755f0ad7d2dc64e03cdb7c", "20000000000000000000"], + ["0x76a46f85d48837ba8c73d8e4134361c6d9f6e660", "5516"], + ["0xa2f696958a5e023014620687f1d34755c707e5d1", "1454876618602970000000"], + ["0x183df5d009ea828e9d748666c1041b42a92cc7f6", "218974986521231000000"], + ["0x5b4cad9a8774696c4a1d31c5082338491138bae9", "82378658447027800000"], + ["0x90c353978402085de3f363085e833a676fc6bfa5", "27330341247335000000"], + ["0x212114a050a94560ed9376eb15c0fd3c1b6cae45", "123330780739540000000"], + ["0xf4ffc4abb09a569218816e33db7259335f028876", "212056540259800000000"], + ["0xa39938007c9d48714b2a039ff6197f7329ec6fdc", "106227115818539000000"], + ["0x3da7bcaa038e2fa4f18571d8f16c991fb7e6696c", "9611609161872"], + ["0xf02d24acff9893df026c0f80d4fa41e2ecc73b74", "92733613994051200000"], + ["0x2198ffea0be9e5d666cd1f57d2680839891dda3a", "173947563272875000000"], + ["0xb3f702af57fd6409bee50f43d1024b5aa500410b", "135326620301346000000"], + ["0xb488796afcbd542ef14edde6e2dd14211fa6c9e2", "44055765217533300000"], + ["0x420df34795f8c583f0edc2c618d4fc7e612bc202", "2700004908849590000000"], + ["0x4f7946655b920890c6ec9cc53c6b851ea96d8f98", "371844528677282000000"], + ["0x6c3a4ce1995e69b4b1851477055c8756984c4b1e", "169055511438593000000"], + ["0x7316df9dc6a6f0b0e4476b577117349bc6232448", "265738854634075000000"], + ["0xb468590c2f22608890b82121c0f0d73126f8ed99", "150000000000000000000"], + ["0x089b147ebe5cee7b844f6aad2e3d129a4506b16e", "100000000000000000000"], + ["0xa8ddba3c1e0cf1eb3a06c8bedaf25f9fc7e297c4", "308149821681107000000"], + ["0x56b0d4debfa7ebcdccf1c726d2e20d335c6b4db0", "100000000000000000000"], + ["0xf8a3b68661e928c1d755feaa1e0c611b8fe061bd", "50000000000000000000"], + ["0x4bbd1d4542d315447c715cbf107834ef15ce9d44", "87531324267296400000"], + ["0xe3803f7010b5581bbed1dc50ce09b7e14a05bed9", "101390573422322000000"], + ["0x3cb5461986b962850131020fe7972a218aa42294", "692742897821880"], + ["0x3a547d56ea5a9a316803f9c7c978837845625b38", "828519493546175000000"], + ["0xcd520946df75ec47ff56521ff1e9bca07dba21e8", "311729585109351000000"], + ["0x02bc4b5f1b91780e462b90aa0deef6dff9481d64", "132387459587174000000"], + ["0xf29b5584aca8e1bee609336d4660373ab42f6d91", "500000000000000000000"], + ["0x3c6d73475d8a64cec5b5170853ab38ccf51eb130", "100000000000000000000"], + ["0xcce8d59affdd93be338fc77fa0a298c2cb65da59", "10698628429962900000000"], + ["0x64268a5531cd895a7c0e84be4c7ed9cf96fc6c12", "112414720000000000000"], + ["0x605d993dabcd1422f0e626ab508ce89facabb372", "64392678864026400000"], + ["0xfa066dc042d979e585aeef94ef20af736581cece", "348077852577650000000"], + ["0x49ef15fcb17a1d73abfeb1c847ad6348144367d5", "711232359588505000000"], + ["0xa312d1fb7cca1cb687c613897c4fd074a06fda2c", "287350537843713"], + ["0x136ca87687d9386a594ac32882c24a18c9e15268", "526330193458536000000"], + ["0x6e6d814ddb9ab9056bd58de9eea3621f01ee69fa", "114134287233661000000"], + ["0x6363f1a75640552d5a372156617753187b9981fa", "238370004199324000000"], + ["0xa0ecffbb906e6628d2a398f2b8f7c92f5aecd8ba", "157934524558607000000"], + ["0x50d934a02c47688ab45376d9754e2629484873b1", "30000000000000000000"], + ["0x9c95df27387e63c94bb0d76ccce4ed22ed97af47", "30000000000000000000"], + ["0xa1acc88b50248b6556e65d5d5ecd51a997e370db", "107218409000000000000"], + ["0xe11a457888140c78fe0d4bf613fd49b91177deea", "59572973750849800000"], + ["0xc537fee3bcdab2a6ba3ae0a4856e41d196709bfb", "1650351926812060000000"], + ["0xbee4077a7edf58e1ee76b390af64f377bc58191e", "12332496391964800000"], + ["0xe406c00cfa26c3980f2e1a7e0ea9928d0970e81a", "3816780631189710000"], + ["0xf8132ede85c4a4626f0e3fce678378b90fc6bbfe", "559962239019687000000"], + ["0xb228437cbe74d0e1b92aeb126339609d091c8bee", "202371422561444000000"], + ["0x82720619b4b6cf8a19c29888f9b081e2d8645867", "1568551621302980000000"], + ["0x74724aac94be7524ea71e1efa796a49bb26d1743", "450000000000000000000"], + ["0x6713db93c0a7580fe0e81dfb1b6d121030120b33", "1208838652317510000000"], + ["0xc1a0c65a031374ab3e6692ca32320bc04e546419", "3366990004016720000000"], + ["0xdda77c99d0873084e082c20192532d461e47391e", "205681"], + ["0x2c4b803574bb89267112f4392636aa8ee830fb0f", "244524523785311000000"], + ["0x0f40d04bc330f708e809c10831e5c8203047a63a", "60000000000000000000"], + ["0xbd8a025a422c6d18cbb6a4fdbef003a5b92baa05", "7457084795250"], + ["0xbb15089724c2797ad7ca7c9b210e2cb6fdbc30d1", "50000000000000000000"], + ["0x91611f17375142f46999fe2b7c32c31782841efe", "107218408700000000000"], + ["0x250a7b43dc0a2a0ef12245466095404ab09ff885", "648434643574808000"], + ["0xcfad78f8e2de8eee753d8b40ee8833ce169188d6", "160093790257678000000"], + ["0x1bfe762bd9c3b96e50f7a166ca25eddfc2b3178f", "525000000000000000000"], + ["0x544fe5703ef129a3a72fffe44e49ee8d333a2a38", "990730148095033000000"], + ["0xd8ad5c375b7ec4088ac091aad2fb1b9acf0bdc6d", "355180688483211000000"], + ["0x1d15395f781e9e13bf77fc34f1663d6d3543c7fe", "44575814852272800000"], + ["0x2ce990adc9e3310bc68240119fbfbc2c889fab1e", "135565634052157000000"], + ["0x17443f321a2ec804661fa41c873e0fe75c7f56a0", "121773675352509000000"], + ["0x5f02dc0afbec8316ec273a21fe22858fbbdba143", "24128907686070400000"], + ["0x44b2fc812df9b5945a88a1d2f70f217c2afa292c", "4195541346429590000000"], + ["0x1b33cac177206f04b5137d0068c82e454a28e2d1", "228397261006594000000"], + ["0x742e4a93ea3f3d91b408c738bf17b75b77f4e9ad", "164689711321899000000"], + ["0x4d0665a2829db89e8cb5f2f50fb12d0459f0a125", "979983000707590000000"], + ["0x86526f570ca6c2c9ffb4a535ffe50fa56fd9dd87", "95466564992575000000"], + ["0x6da7b7f64c73ff7985f2bf55c71c2b46c9e41a5a", "117537986538637000000"], + ["0x91911e488791fb4629edd8d1a5b4a685d44ce46a", "1031529586692780000000"], + ["0x180699fbf0862ffb1fa1f352814f1a2ad74fb818", "269896394338088000000"], + ["0x790b3a034da88ac00ea323beb1240a5273d5be32", "694484711773240000"], + ["0x1715a7a493053e67731116f03d25a333498afa42", "67021436879537600000"], + ["0x7fa9600c78710e8c1f712f274294b301dc27d86a", "23588984613764800000"], + ["0x81ed41dea967a8d5c8272b4f41eeb20952a18771", "2000000000000000000000"], + ["0xab19019fcc47c350018d709040376e648465e83c", "250000000000000000000"], + ["0xb2e7c3ef8d3a76012ae89f2be0a93d7809dd9f10", "588094653047537000000"], + ["0x3f4abb63d3f0c16956d7d0d3c29ad6d4c283b5c9", "252259103683341000000"], + ["0x83799c180b161b3a52eecbdcaa1750881aa65426", "103171371012340000000"], + ["0xd7fcd7c92d184c2c3d84721df201f9bc95b32f4e", "108346167654329000000"], + ["0x660f5420e6d0347bdce568e4f9abd3748f471f3a", "142138215234298000000"], + ["0x7db4c6c773668c58f714c9152543552834fb0dc2", "94015885651895300"], + ["0xb0823fffac86c709c658db3f8765e9da8c7d9647", "37194423084314900000000"], + ["0xe48b30a67b61132c47c0dfb0855ae1171c320fd3", "467592854411777000000"], + ["0xe564148fbe1cf67c5dc041e8a99f1b309d277058", "50000000000000000000"], + ["0xbfd55f6bd156168dc4c9213e63fa539954fe4110", "160000000000000000000"], + ["0xce8fee93efae505980413f345f7f530f4d1a9dee", "171000000000000000000"], + ["0xa92288c98bb57b0030645735e33b28bd50b619f3", "120000000000000000000"], + ["0x55fd246cbbbbe28de49ae6a415bedfbf9e2b8dc9", "38863711528939100000"], + ["0x9cbc1a8334cf32fa596f40133e071efa30cde3e2", "102169326952421000000"], + ["0xe2e584319f57671638cb28321b830e4a79d47218", "520655147514003000000"], + ["0xacab186f90f8507b5f4f0ecead16665dd7c40452", "500000000000000000000"], + ["0xd259d6f4314ca6ba596451b6a5782ec2763bba5a", "110309444169648000000"], + ["0x06be50385115b75926f7ab496f0c11adc5c74bfe", "365519113051179000000"], + ["0x21543a89d39730bc239623fd9a41bf379dc3f6f1", "50000000000000000000"], + ["0x41902410177bdc600e51f4bdc88b957e70c8d1da", "2730000000000000000"], + ["0xcf99631fb6f758a133f17933cc60f053a8d33a94", "200000000000000000000"], + ["0x79f57e53618d51eeef5baddea0cb2fb2a0b836fb", "177491910451040000000"], + ["0xe612941e974e818ed8679fd385c19e188da66968", "300000000000000000000"], + ["0x0d66fc519f0a4616603aeebe4ccb52c8246ebc96", "100000000000000000000"], + ["0xd79a3323119dfe910c6ac7c506036be6ebd44417", "4834865917566330000000"], + ["0xfa59f5b8a1894c97418c0cdb6bd17705d1f6cb37", "407728625822637000000"], + ["0x43f824adfac29a2bd611545540965efc8ec2e4ac", "1616290012770660000000"], + ["0x30558138c3a58834a9e1ca67527147b3ae4cdd9d", "455866971592427000000"], + ["0x03b0a411e6329f446154b119209b1d385aa816e0", "1567298625238510000000"], + ["0xc417e40fa2f1da0c275028f899408e89a7610318", "98876347881548500000"], + ["0xd4d8c6a21f71de026e68c160d75cfd1d720d22bb", "568536362303320000000"], + ["0x8821b354c6e7bdc13a1155b8815d696675f2ca0d", "1329148837805310000000"], + ["0x3854fe3b8c0e5fb25d919c5f439083e9377c9a68", "604562322249750000000"], + ["0xbf816189f827777a11ec129bb062456fcce09cea", "164034098497164000000"], + ["0xdda2dd3bca56ea616111c0f6b8aeb5a7b6845d82", "161246602494504000000"], + ["0x0541bb465a19a6490450d3b808a7fcc7f08bd5d7", "237231823775734000000"], + ["0xdb31938f36ea69ba720da05d83a53d23d235fb51", "250000000000000000000"], + ["0x1a9fa4d87f76cce6dfc143d28e73f69638096895", "140000000000000000000"], + ["0x99b0fc050b69b6638986328b5cad5f59e65aeed2", "900000000000000000000"], + ["0x1345dbe1a6fcd48be3074294bbe12d5e078c1c98", "84557591769665300000"], + ["0x9afef5badf5725bd13b4c938df3c62f66f1aafbb", "47235789780604700000"], + ["0x4dbd4948bee81dedec4a6555b7eebc8d6de95ba1", "261385115687269"], + ["0x479652b9a3d08664154ec1a0847ff9243c4ab913", "57013"], + ["0xd78e1cbd27f40a9039131eccaebd0a6da510ee96", "37145110775985600000"], + ["0xae58cf5deb81b849cbdad6e462b7c8c831813f17", "139627497352701000000"], + ["0x7fb7e6e71ac334bdcc5882bdf19e7f87191dfd8e", "73159888744040300000"], + ["0x97ea1ffb9d02efcdc22ad6b2a235da72c4e7d949", "22639829902776000000"], + ["0x50e505a74bc525c0410c6df6d2c723a91289d440", "102337422817268000000"], + ["0x5e35fd90ae2978334b6672536e751f30aff2f4d9", "2141691562045810000000"], + ["0x8106f06a53396d174b0edbdfd17660f67e71adb6", "50000000000000000000"], + ["0x711a71e1873988f8da861e57b01a7838b8068b93", "53043489853719"], + ["0xcc3a1216e370358b54e5a40f687bc17cdb59367c", "44374429055243"], + ["0xc9b0de883e2749229b1e8349f30f88e061d0505a", "115679858189564000000"], + ["0x49e3d6a14e18fe7c631420533f4cabafea240b2a", "76000000000000000000"], + ["0xf3977e92eca92700f097f9c51a0736b775af69c1", "197294844384232000000"], + ["0x003155a1565b4233a5027f43062c2395eb114073", "1126728942755160000000"], + ["0x47a0a7653a39643240d7b11854e68b2daea9002b", "270300416063974000000"], + ["0x335a5f686a1e87915d586d6348cecace4fd1f289", "100000000000000000000"], + ["0xaa5c3e9ba78b4b9fc7a87424332f66bfad1700ab", "203529811401309000000"], + ["0x19cbf8aafe9f7fd950567c53915d6c348bf3fa8b", "419650907176327000000"], + ["0x8237f4daa90abc0a4e2097a8b423dbc6c0d0d614", "6249817284894950000000"], + ["0x0538d2c341c8da8087f4ad59b31c36fac6378c99", "6182076989451080000"], + ["0x84c6de104b03af18ed72e472de1869dd0757bf7a", "302904239767500000000"], + ["0x8afcd932c015955eb3177f865b0f91e3f122b3ca", "199176792694219000000"], + ["0x05f3de310fe37a798cbd5039e4a9272baaba9c14", "79904455680827900000"], + ["0x8922aa8921de71e66824b0665e7fbe0488a0fcca", "30000000000000000000"], + ["0x8cc848d8d1eb77fc1518a91111c428c28035e0fa", "1519440072964370000000"], + ["0x672e226dbf55787c23a3f5105f662ff42ebb391f", "407236547044363000000"], + ["0xec253779e6bb668b82786dcce8603548421937b9", "31835817237743000000"], + ["0x30a9925705190e5b298f94b3f3bad4589e241a4e", "277236475792789000000"], + ["0x86542a9ebbfe8447ba02e28c5f31f04c7340a1ff", "1512061335785320000000"], + ["0x2f41c5e58fd2869fc9ad58e185894ceec9753ccc", "200000000000000000000"], + ["0x0482e93db464af4c9d1346a097b6a048aeca38fa", "1101356811265880000000"], + ["0x631648a072ef63216eda1e23395fd155ec35ed4f", "420278813717552000000"], + ["0x23b1a319fe5bdccb924d9a1f73058a3942620bc9", "200000000000000000000"], + ["0xe011cc1d3281619876e98996270bc08c0719d7c0", "416497770977209000000"], + ["0xcc6cf3c5e02b51e9f45d5170ab640bd743c4ffb5", "125000000000000000000"], + ["0x590b01699be980e92b38326904f19b19214cbfd5", "1704048418754540000000"], + ["0x06f57d59f857d9b3fe110524727b339547c3f5bf", "427603158670895000000"], + ["0x28af95d7a16ab63b5d816b5f12b605b7c2b268c9", "143020416093237000000"], + ["0x7e3df6203b66cd77f724e3d52f7fc9597ebf5640", "2487122726422480000000"], + ["0xeda057376704bfbe71971aa21b249449dc7bae3c", "5184027769753870000000"], + ["0x557fef30faeb0acd5e7c733704e56a7107879d4c", "1650749425704740000000"], + ["0x9a75887dfd550b1096d9893a2ab3b28a960e36bc", "5141958390"], + ["0x0ac0240f4656dc80684d0df1208bb91c0220725d", "700000000000000000000"], + ["0x53cb5265ec16ccbc89aee4f924388009dd5d048a", "104751896912054000000"], + ["0xb91ce51ad82855a8c3269d175803cbf197331db0", "145698837699004000000"], + ["0x3458d62703f72a123a029648f08ab2ea4ca918dd", "75000000000000000000"], + ["0x8e9fadd4dabb560c6366339fbf241d10d8ba33a2", "160000000000000000000"], + ["0x77f88e4bc35c794a1fd3bc8c6a7971ce3c4b9e17", "66204181522750200000"], + ["0x258e4db433a16e22826db7e91d8178e60cefc57e", "28000000000000000000"], + ["0xc1f008835c2ed5fecceec1275bfa258633e5f639", "24206127332943100000"], + ["0x60fb9bf2d2150efa7d8d23cec63907e5711fe42a", "84981816895052300000"], + ["0x79d8972843837a22d6c92c2ba0816badbc30ecb9", "281776207391889000000"], + ["0x2c9394f92fd4a275f534041b0d85c0bce540e2de", "255825135225831000000"], + ["0x47a541ca68800b3353f89653e5d77e4a7cae4ebb", "23042065604429400000"], + ["0x8b46924a0d6d610a46caf0a5d13dabdd25b68645", "1424373437753680000000"], + ["0xf3c51aaa4fe7c62e762dfadf52499e62c5408010", "197613531563902000"], + ["0xf43c75b8af6cbe076918069ba5d5fc9d1afac954", "4519657086765000000000"], + ["0xedae54ded7e6b721b7c233be911d7a5822d7b436", "15425780542064300000000"], + ["0xe3f4e9fc5ece5e42366dbe7c7d0f50ce348986d8", "646390923787532000000"], + ["0x1dcf38d6b6691a53b52b86cc70c3e8b1f7df04eb", "210000000000000000000"], + ["0xc32d531decd5376fcf1ddf18bc62b30765139f84", "235395966582914000000"], + ["0x20e0e86d92cc1a6ab6aa3c1b7b28760477a8d29b", "82178640777439"], + ["0xb3d69de03151c786d05a6c470dcc8d7f1f109c8d", "1630325039206300000000"], + ["0x69a9e74a795173e2bbb8c70113048edb234bbc40", "2212663031239900000000"], + ["0xc680f93701d5055fdd67830427d248bbfdba794d", "11000000000000000000"], + ["0xb53f0a18bcc0eea66d5ee75e0ab949ef4d8a132e", "691627532563217000000"], + ["0xac841f0da675dbdc6e988f4fe78208a68315c3b7", "1205186888775360000000"], + ["0x2a5cf78c321b33f47d8726ea87a6014467318fc6", "190000000000000000000"], + ["0xb0a9de2479f5cd97669b0fbd4d1ee1ef70c99b22", "128263366425727000000"], + ["0xf0c6f42ed9a560c0301f87cd81768f3d015b7788", "150000000000000000000"], + ["0x589444ad1b6b6cfff04ae5a7bed9b5b00ec09c3a", "2500000000000000000000"], + ["0xa33ff5adaa402c130f6568855cfc9a65a17c8e4a", "22551955869048000000"], + ["0xa81597bd911cc633a58f4362b0b333d4c7398d4f", "48542245632990400000"], + ["0x73c27b2542a3e7481b796a47c95759b4216a4bd2", "1420863876076610000000"], + ["0x47135dccdda3f0d0da891fed7aee21c0a546409c", "70241457481756600000"], + ["0xf1f12493b2cd11414f4661f5dcba9f912304d374", "99024104814855400000"], + ["0x7b5e82a13bbec350d81374d99eb4c30140cf09e2", "174438436577163000000"], + ["0xfadb7070dce46b232f28aef0785d27c9d5e3eb1e", "507698003347066000000"], + ["0xbcf6f519b022927f7160f940d7646decf75f68aa", "4651178742319940000000"], + ["0x27cf4ad867cdaaeb431d0ef07864a974976c8ee1", "200298457590476000000"], + ["0x3d8648ddcf10f0dede9ac8d49857abd564cd56f8", "816879268941904000000"], + ["0x5ced069213dac826e1848a5b6c84a071c271f16d", "250000000000000000000"], + ["0xd9f0ac8ef79960766ad83d46279dca8cc115697f", "503621187723908000000"], + ["0x48cc8217b84aca0c7c966dc4f7dae6b2c675e7fe", "233787881095435000000"], + ["0x5907f6596de3235d9a1ddcf4e23535257e88d592", "860000000000000000000"], + ["0x30270a4e14002409a769548636fe1b73d1250788", "913788797915999000000"], + ["0x24fe29cdb9ff152d93183f62d53604d8f3502485", "110389061464471000000"], + ["0x27f364a96cc92793263ee07214b38e68acad220f", "88993658984432300000"], + ["0x5370e4db012e3492508ea2eb6f93985ed44fc61a", "1007504994989790000000"], + ["0x9d823c122dd2dbe42e0b93e441a72b351f3edd41", "85639982520755"], + ["0xffae4c3d0a479702090080039d5c6b87647fa4a1", "428602408543104000000"], + ["0x9fc8c18036a79e89969f404e45ac6dfbf7fa2cf8", "262603438099102000000"], + ["0x47ae66defec3d37ff6c7e85327eec907170c2cd3", "438605954062021000000"], + ["0x3e9692ac50af0083aa224a57cc329235d872be4a", "136104968520411000000"], + ["0x55d65e9a4b47196c4f6d252a6440e1eb5d29c0f7", "41975620583210100000"], + ["0x7a3e3233ad71e71f66ee1ccf034a6240fc447a47", "27085811548093200000"], + ["0xb83e57d57bd60e315a248d2021388cc94a8e2f52", "111000000000000000000"], + ["0xaf114921e8d91c1bb01b5f416e12a552d7473602", "1000000000000000000000"], + ["0xbd26a9c29ca9dc2c195094300e467d98ca67afcc", "237081730444738000000"], + ["0x956f1ce3ff2ea59a8b41df83ce9f85ed59d73f92", "20000000000000000000"], + ["0xf7b28eb110feadbef0af896b82045676bd329714", "3190611847562920000000"], + ["0x3e37cb2e3d904b8455f4446db67dcc8577ada0e5", "53757744099074800000"], + ["0xfcb3b7cc281c65d723dcb0e3d7322badd1eedce1", "52053415745532200000"], + ["0x8e3294acf8c96e446d96ade898150798101bcea3", "50277613034129500000"], + ["0x1786a4d979138c58a0a966cfb0b028020b165d0d", "150000000000000000000"], + ["0xce124b52f0559266b041b020ff1c246ca88538d6", "345114661577702000000"], + ["0x5c93d34e5e18d25fed99df0771ecf7de322bed4e", "231039471752317000000"], + ["0xad3eac819288fcdafaf486afbd54d05b54ccaadc", "232363304256315000000"], + ["0x045d21bb1807d4f96b17479b619aa8376c16e696", "133685548131400000000"], + ["0x0fecd7e7b6627bc9a87660522e11997bad75d8aa", "3392177007884820"], + ["0xb9c9c621eff2f103600615fb9bedb3e00c7be1aa", "701386591341157000000"], + ["0xcac68fffdb3ce264e23543343d75a01b8c29c1ab", "117315366708757000000"], + ["0x7a560871f6d14d846cee90f98a51485ab0ca332a", "215879984597822000000"], + ["0xbede8d0c47f5db71032cae544f5dd72293bee962", "100000000000000000"], + ["0xcd0a2de6fc3a2409b0a7cc0161797da8e8c128e0", "123433436774482000000"], + ["0xb63cf382fd5805f8a377cfc6eb75fdd46b9ec847", "137149464842440000000"], + ["0xe55e8128f38f098024afddac1f49db2cff78824a", "450000000000000000000"], + ["0x653d8bfa24a06a1edef740057d35ea89807e8170", "154324724506378000000"], + ["0x7b96526a9b6b8a895dee2f805b053bc3c8c2499f", "212164866892312000000"], + ["0x48a92c198545c4b0bcffa45b523cd783f125a226", "547241738869249000000"], + ["0x4a26b856e9eb9db65ec5acb93214eabbcbe3a749", "386153110799169000000"], + ["0x4964d39f28551e8a2d703144ec7add1fb97f9f6c", "154276391331613000000"], + ["0x0ce730fac3a07820fdc9e17bb68e3574f6fdfc0e", "84480675181826300000"], + ["0x57aabccd6f5e465f6359fa9d5c11aefa34925cb5", "4722563121341020000000"], + ["0xdfbb2a7eacffae06638eb0e35cbf2fabcab79f44", "250428931595690000000"], + ["0x0621c518df390245282e945400a84f48e2dbd215", "678589024255049000000"], + ["0xd82ca6827a0f2c43883788fb8a2dcd44ed29159c", "115430183842110000000"], + ["0x35c81e79e1c49718db71b95179600e8c2472571d", "1016919483743200000000"], + ["0xf03abdc9039400ed2434218415895ee2b7da8b7b", "11083221438994600000000"], + ["0x3296474f536bdf252eddee60e1580f0cbc72e286", "4714849717494070000000"], + ["0x3bc1b9ce24f0fa636a8ed446a0172c15fda230d0", "1494521381680490000000"], + ["0x0efe3b099c8281a26a3aeea43b2749645ec75210", "394353927257292000000"], + ["0x57701abe35763f60cbeabbf4cd352a1052b775bc", "57932853555660800000"], + ["0x6f7bf13e057305d04abd72e637e491cc30569f43", "9915449996618840000000"], + ["0x6f3169d904fc580b24e5f541758834b07aab63eb", "1214673194652840000000"], + ["0xac06a4d2b15566c2e827fc827e214098a8bd7411", "119273580285526000000"], + ["0xb98c90b964bbcafcb6cf1648d7247d2040986af3", "23011275164925600000"], + ["0xf6f5ae9fa4565078974d7eee7eb520df987fab80", "62642015438869000000"], + ["0xdeccd02d72ba5304a885264be43b604990939189", "92375014754359400000"], + ["0x0a3db74dc8ae7eed8e4edb3e92e7b929eed8c6e5", "121546417582821000000"], + ["0xeabd36088d8a02304e3f8d33ebdbf2bc85cf465d", "464705710551837000000"], + ["0xa22e89636b2e8fe30221fb2657114ad4fa15588c", "49561587471057"], + ["0x51e373e9716fbf01c266568f51f426640279d7d9", "4352495451099410000"], + ["0xf9c5edf27dfc90ed25ffd3d3beaa8523fbbe51e5", "236765373389132000000"], + ["0xdac60a975597741d10aee740c044aec22a0f9f44", "130000000000000000000"], + ["0x40e4668add6c20b214c04aaf34ecdb3073864af7", "24477265565766600000"], + ["0xc106905443d60547546e9913055c297b7bb9c481", "15665769556316400000000"], + ["0x60303dae1c3bded0bae1d070271eff3a2d7de08d", "238086357209502000000"], + ["0x69c167b99a780de252eb818a6029209ad3788fe5", "116866896991070000000"], + ["0x59feeb4084ce28b698abe6a2a2a6394784b752d1", "493153121"], + ["0x31c04f3f6619cbb564e5f68f028d676d3ad8bfa8", "73631643274240300000"], + ["0x07787a63f09e23043570735711373beb6dd857e6", "238238513428165000000"], + ["0xb1c18ede2ebb33ed5cf6909edad6ef1abc8d3708", "34706200999247700000"], + ["0x61f932a755e2e489839ae7853a69fca855b118ac", "145268822582991000000"], + ["0x7502a1cce098394d71da3b77678254c657f62152", "144958062796173000000"], + ["0x8eadad4a88dc4ee218529b4e9517c80c72f35fab", "100596160795774000000"], + ["0xc02132ff17c01bb0a36fb9d622d3bc3dc9df0adb", "2684484994421180000000"], + ["0x116ea26956311f83785920602d3ce636f6f2dbea", "95121180565767"], + ["0x6a76747342f55b67cdc1571df445744afb93c2ea", "324309155007051000000"], + ["0x1b83218bac7e4857d98e0eba0f2f263abde2421d", "100000000000000000000"], + ["0x2321aa516ccc4e25f08f40e6ab40e21c94f594e9", "48891869872397"], + ["0x01c3a0aa472a156af8c2edb04d4459d8d2fe7c5b", "125240130870717000000"], + ["0xb65445a82a98db85dccd9f8e4318fe1eb4ae505b", "224289852214431000000"], + ["0xcd7365ecf7227896d23b75e150ca10821923b811", "330134696981744000000"], + ["0xe8869dfe6492c4f6f078ba74c651b4808bfb784b", "3122795002917230000000"], + ["0xa6e4cf15c8a582cc2d4a175847f52586e326bde7", "300000000000000000000"], + ["0xb585814c924440cebd8954ded5b97b59f65aaf50", "5629812913774790000000"], + ["0xa270e949a50202a6bc243ab4e70f8339d2261de5", "54029228156660"], + ["0xfd1192199e9084b39cfba0b5f41f7158505dfa10", "1085180970848550000000"], + ["0x1ec74fe81ddbe843c41277c00c6e508dc92e6419", "477840059038931000000"], + ["0x6bd00b0d08c0245d07893b4873e4021a7c92b2fb", "431063823042202000000"], + ["0xf340b41f31552968b4600cd2566d4af0a40d7fc2", "32000000000000000000"], + ["0x0d945a3d4c123da6085d5a07f8c0c8493afb0678", "831673670699389"], + ["0xdc80092ea3610835da05f66b489f06dffc77bff5", "143462000603664000000"], + ["0x9037398f5c6e14a8654c59539c16f84123dd425c", "10869238351396200000000"], + ["0xfd7e62106cac2289eb8066caf2ca5dcc08f12eaf", "200000020857060000000"], + ["0xc0a61b303c08f020f5f0ff5edeac877bd6adcd6a", "113788951949863000"], + ["0x81fb9677ec41e7f4c57cbe7fe6d7c67ab63765ac", "245080438526532000000"], + ["0x07c2da589e4bce54ca13c4a0c34cdf6981d3c598", "157419"], + ["0x470bab7c3e3e4fadba43afafc843149c6cbc3cfa", "12336037354268"], + ["0xeaf8c4e0e502923f1a627cbbae36ef6339df2688", "44943519833285100000"], + ["0x90a92d256a27b67b4c4f3c5382e2fe826ce8fbe9", "2149953377633520000000"], + ["0x92db74bdacb0b60be8fdc95ced85703bdde8432e", "29333025153638700000"], + ["0x7827b605b08db3f80a24da6e725e98191b7185db", "14625928560303900000"], + ["0x8cab89fa802710d92ea99fceb67566a6457080cf", "150000000000000000000"], + ["0xf4b151977024678823489a72ccc6f53f5d496104", "326419449350820000000"], + ["0xe8f4c5afc8582f381d2cf5b4ffc652b04177d982", "57183445775639300000"], + ["0xa73e5baee3eda185b4f844c3615ec2c8efcc9241", "3283080304943990000000"], + ["0xb293641a9d1e5129c9a9d4f701b6c47f28a4f26f", "884176966559692000000"], + ["0x673423876ce8b3450c2cb52e4845510e4b26e366", "248501406032405000000"], + ["0x583105cfb4f7aad30770f338efd06e1affc4fe88", "305294670194731000000"], + ["0x8c73db2227cf141ee1e0c2fc6b8d791ec0ff8a00", "58689102093287100"], + ["0xaf0a6cff1f39efe7a364316aa4b586b5c15d749a", "1958593777627220000000"], + ["0x3938f63158de24fdedb8f8953db13bd581118f89", "22058053350542500000000"], + ["0xa9f0dca0bb105f61856d1c177c0873b93773034a", "118142356145444000000"], + ["0x92cfd9472b012561a9de9907d8c5dd19d911797e", "31529381210891600000"], + ["0x87ae5401789a49c8b9103b4139bdbdb5e4309172", "62736944684666600000"], + ["0xd99a1022d51573c6d0c2b186673d3de7c5ca5e2c", "63383522722826900000"], + ["0x5829937b446cd5806e6a350f6297023d0dbe98be", "630155996630314000"], + ["0x8e49b61be4f02d68eb620954730b5cc74ef53b92", "125286931568369000000"], + ["0xf5da0a103d57eaaad5c1bae57f128f3763a9f639", "94579321031726"], + ["0xf5b2e66c3569932fd42c38d0d91bdb97612c347a", "2059910821566270000000"], + ["0x9e10d3d0fba59b30caefd0f026f764f96f80322e", "1299642293534480000000"], + ["0x5835a02d0f46b3474305b2612ca9c6d61a973822", "124902384054287000000"], + ["0x97fa11bd06452f6c39d5bd9a64777dcaf42d10b5", "585611881770475000000"], + ["0x9c95d63792127f63a1021d8856a3d62b8079d009", "201210835703903000000"], + ["0x6a316f344bda31e6687173c97c839c7160dd2cd1", "236026352238796"], + ["0x5d38594a188ee4cd60371a33fea4da82ef9b342d", "52572050094628100000"], + ["0x62eecd8f1e3ddabcd63937c268ca3659b88a198d", "424568741477707000000"], + ["0x408e0f2a3e2f32ca67145b3a8955464f36e9a65a", "501000000000000000000"], + ["0xceb7d31d0406e5bb6b3277edb8f2961f66a64d18", "95412111268517"], + ["0xc871ca05c704e0031208789555ef1f3f1a3ce0a5", "77350752969954900000"], + ["0x8cf0f4f9e131c0fd8996c723fd2920da7debf5b2", "161621007107576000"], + ["0xc25cb20ae7569da8d0557a125b1050f21948603f", "46047205792615000000"], + ["0x9b97380c223f85b410add0ed75675a6513ecb771", "334139087776361000000"], + ["0x40f350d109c0f9f71e79f3001b14f419a8e75741", "111042047225640000000"], + ["0xa18b495f1bd998541eaf890aeea4e16558ee355f", "50000000000000000000"], + ["0xcff1fc75f7abd546d8a948660f46f0da9deea622", "7084956988292"], + ["0xe5a4679ca13d857c6bcca949c441c74e58580928", "558392877679039000000"], + ["0xc593a1668d9bc0f319a15a43ef21c1befe3d7d57", "80441021058552700000"], + ["0x42e53bb7698b0ebca963abf668c6b441ed0c57e2", "2091430834217370000000"], + ["0xf5a28d905b6829fb17e6ab9e749698fb30130672", "350022229434618000000"], + ["0x16857503dcfa74da125a1aa421ff9b266af281cc", "14000000000000000000"], + ["0x910bf2d50fa5e014fd06666f456182d4ab7c8bd2", "38084245257422900000"], + ["0x31e3a2e7107171823ec242445f3b8f32ec2f08d9", "575482827180643000000"], + ["0x95c46e088c32ca001f050f2f3a090d147316f1e0", "220083401077063000000"], + ["0xa84f64c30638d73ad32dadffa9d2098bc7defcfd", "222886282624535000000"], + ["0xedc8d1681766c4ba8ce2ebb52072be3b4fb6cf6a", "1300000000000000000000"], + ["0x32371b624fad61fcc122813ac42ec6f8639f7fb4", "300000000000000000000"], + ["0x3086e62472801e47c99316b695d2d9733212b981", "171214100163781000000"], + ["0x7dd2bf18c61136286f6476f104fca5d3b85c86f9", "284119768799141000000"], + ["0x085ea1d2fc525884484646718a508905037497ed", "326992550101271000000"], + ["0x77370579286515d09e4dbe68bf634980f3ce6f97", "622501905911043000000"], + ["0xd9b4342749b93504138eab8bac8e9279a0a3e91c", "893082081866634000000"], + ["0x62eb62372c1c489fa83fb23a12b62093257da734", "122881846846380000000"], + ["0x8539c8e63490595caba6b8351e8f1fa8127cb748", "20000000000000000000"], + ["0x5d58b3644982ea249878c53248f9c90563f16834", "445775846330970000000"], + ["0xd2bbaeec62ab17cbd3d35dcbc1d60cc513bfe816", "407891242566"], + ["0xf665fa4163412f3ec094578f31e5e90dfa9fb412", "125589952540360000000"], + ["0x95727815db52cd0e09bad68ab92213935c32c937", "150000000000000000000"], + ["0xb968f274598f081cecd9404d033936754c7f93f9", "236488333116568000000"], + ["0xdc3ce2f704e78ac0933b8bd60a1ec42f746cd207", "250000000000000000000"], + ["0xa2bab972d07cd5dc079845bc8880c06439c2f244", "109256306133900000000"], + ["0x01c0bd4dbc178c9f2e84c545603e0f0392d1a553", "162447789792559000000"], + ["0x2abb000c0544152ab12e39549c9457410f206790", "322288962510586000000"], + ["0xd1a59dccb20ee4750b4840eaaa2b8a3796581dcd", "3753524966425750000000"], + ["0x544c8fb835aa4c5a26129b20baa418a8154c0aab", "158720300621151000000"], + ["0x874fcf122bb816b4bb1770a3aceb03b9b39cca9c", "329149269251139000000"], + ["0x10370734e1791ce74456dedda3b724a44f664eea", "1406547955267300000000"], + ["0x3794c26c6b9acf4cd062e9f0261dd5eeaf45055e", "200000000000000000000"], + ["0xaaf323c9fea7e6d81ce36d7ad40e67d3599069c4", "1509028750000000000000"], + ["0x2b025b429dfdc92e513e4ab5cfccc23a3d804f3e", "2000000000000000000000"], + ["0x6635ecb26290fc4bba9517314d32ba8e0758aae1", "339169609554279000000"], + ["0x8f5ef950d786877f86fa150989f6d1e68af9e97d", "333000000000000000000"], + ["0x21375871597130eb0a7b825658da464f86ad4f48", "104461910048168000000"], + ["0x50f1d47b777a8ddbe3c4db75de1ffd895e62e91d", "477501118694469000000"], + ["0x36db16e254c1d37795e1a6b38efc07b91d7ec910", "72958388704430600000"], + ["0x63f1a84816bd167f6af35eeff56aad37a37e4474", "16597579341960000000"], + ["0xa562ca817c23b6590c3d32398f723fd759242cbb", "31870762032374600000"], + ["0x2b637215b3e02cb965e6f7cc1fef1977d9f62908", "36225894326995"], + ["0xcd50f59edd184bcc4e44d7cc33f12cd469519dcf", "384729261938699000000"], + ["0x90b7f8eb3e7690ad5b093ef92ad4055f2b61e693", "298772717082137000000"], + ["0x4aff2cec6a054b61d10bb1c43ebd89a6864fc2d4", "46491026343046"], + ["0xab8c6f6fbeb6494bc0584ad31275b40d5a43170b", "7508554000847460"], + ["0x2fea4f7c1e2452368cb661b83d34eed82450d110", "300000000000000000000"], + ["0xfa00d11080656f95e8687688b433aa034f6486e1", "25672775656483500"], + ["0x0ce77f9ec6a65b0b3ef1756d633751ca182f4eaf", "816276834503483000000"], + ["0x8842c59ecabd372bf247652217802edb27ea3420", "24479720829421000000"], + ["0x468f05137394f349f37c5e7d9b35661b6f68c0b5", "361470393854724000000"], + ["0x00000000e8b06d9bf77ba40fc89e4eaa4f225e5c", "1"], + ["0xecf14d987a0663e83dfc22e089e96c6dc159f1bc", "291307170197136000000"], + ["0xc4ea0e92c4978c04e82e904e81c70ed959615a32", "50000000000000000000"], + ["0xf5eaf84b6b0f0ec9b081abe854fbc7d09ad61a26", "197316896554947000000"], + ["0xfd68e3ef807230c2b7859a47c8a33e81a439bbc6", "5976642063483600000000"], + ["0x49c608827ac70fe7a258e0a95aa3fe0e262a4768", "1000000000000000000"], + ["0xaed19ec110d850b0d34609927c43970750c42494", "173911128183218000000"], + ["0x345fa4f148bfdca72ad3590f7986c537e8067ea3", "591419971761544000000"], + ["0xe40b491ff78b9be4e89ed0d24b6da44fdcbe354f", "52380487205142700000"], + ["0x436623c74020882a04f779b903194df02d8b0cf1", "467026829367806000000"], + ["0x836b748c46024b464898d7a2da6d8ecabf1c812d", "690394885409303000000"], + ["0x67c255734b182336bed8a31bc2a8ef3cffa8354c", "500000000000000000000"], + ["0xc03c4476fbe25138bf724fa1b95551c6e6b8fd2c", "9053184029726100000000"], + ["0xf3d29ead96ff578a9b6806cee495c33371a2857d", "99999999998720"], + ["0x07d22cd5d483b1242518d5cd26b21b552f0cfcdb", "96168921878489800000000"], + ["0x042fefe3cecc860c615dab8575da8d4ace2a3ce9", "1322389530721750000000"], + ["0x581f967fabe549fb85ee7a851a432ee27eb2861c", "644719921986487000000"], + ["0x7907b64bb4fac25c535b16d43c263f459c3c21ff", "404585947313466000000"], + ["0xd3ba5a299c45c3a6e1b5739964d68dff822fa658", "3335475755883020000000"], + ["0x16385c9b02dcddc25816634c82e6a249b21723fc", "1912223632473240000000"], + ["0x82aca016315d8f4ad124f2fe40517ce0e16939a4", "28523"], + ["0xd5a9666fad55f6f0884e7665d52b70cf129313f8", "230121736316784000000"], + ["0xc38f9eac4df539c1e611021c062863e3286e6806", "64781229955931"], + ["0xb2780b37a3197f2ff03733ac84a8b3fdf7fcf10d", "4095831033339130000000"], + ["0x959398fe03b1b7dc43231b90d73a33d798353a79", "400000000000000000000"], + ["0xb04554688766ee869cb1fbce8d98a4e8969aaf7d", "467998242475436000000"], + ["0x554781b03b403bf628b6174a86ba84b3c6f1454a", "115935390035131000000"], + ["0xf5ca017c3db54d0f380a3da12521d5ca40ef3981", "100000000000000000000"], + ["0xe9d1b2be36cd8f868183bccf553c4e893ce64b28", "2613268684810640000000"], + ["0xd46c61ec25a6a568a51afb4248ed42ff6f70f181", "146032304301945000000"], + ["0xd9464b951523d6ff53cf9519983c250e7b4742e0", "224433167613573000000"], + ["0xbb3d31ba1bf2d400d884c0a9d0af071ecbbfa653", "488915937155005000000"], + ["0x131ec80833ec5866abbedd96464a55303c69c998", "486968568120552000000"], + ["0xec57360e63202c637800b3ae545ae33b40f3dd8c", "533709194724925000000"], + ["0x48ba945370f6de589f45307233bee6772a1abc4b", "296315938396015000"], + ["0x30b9d1ae88a63cfbfb446858f612f7f18e7bbf36", "187809142062339000000"], + ["0x40f293766af55e2ced9d2bee7ef1d584bcee41d3", "3826124527209880000000"], + ["0x5d9fdfaacf5bc2e759fa210f6de3d7de5457b385", "237000000000000000000"], + ["0x7a26f2a0b0bfe00e9c6f5e7cf1206eeeb40245d0", "274631268488906000000"], + ["0xf00ebb53edfbee12f7bb1d120c203aab4882c373", "44371550694492"], + ["0x924fc4d6c2fd3a91fbc2a28760b6e6c01c168bc8", "84523644995234800000"], + ["0x9fad047281a61db481ebed86f0fe1eb660f5b633", "333619420669540000000"], + ["0x00c1f06ad4b8b930864f5a3fc0c63d5cf228655e", "254113103968662000000"], + ["0x56a41dd21f2e65ca5342697b6c9b8675ad781bde", "47480979915543400000"], + ["0x1d9ee73419dd37821a1a01d5fed6b5f7d51f2375", "240035292145454000000"], + ["0x69a10364a3051ae0665a05e6573b6ca92a79516e", "421059087676315000000"], + ["0xe3e3128698063e388f65fb6cdd4b86e43e8e86ae", "261090000052271000000"], + ["0x1ed6fcaab87bee0ca9cd08100268f00ae2a68052", "239302904258066000000"], + ["0x0077b5f1a8ba00cdef762ce1ebaf3e3fa03e35f1", "52472217367661"], + ["0x1bfb3b57522eefd75957e5763399b9a4f4a61d2a", "34239005907369300000"], + ["0x24b920280b73f550cebc0bd002b82d8b573dd6f2", "123565066602239000000"], + ["0x94d727b34eff4dd5814a3bb4921cbe457f90fbfa", "199729494457673000000"], + ["0x5bd1fad41798914f3c3e2dd1b1a78f738cde262d", "343413824368941000000"], + ["0x9578797f81cca95c7f1f17b84a43bc58f1218270", "10000000000000000000"], + ["0x8f622c74f05494638992d1fff99b8403fc29bae7", "342971598542520000000"], + ["0xb3859c02a325320703097329b9b7a0e0e775a39f", "163611006058668000"], + ["0x54c6619a52a679e9c4532becf8c9cc8a4d30383c", "270257405611040000000"], + ["0xdeb5e8abe33af81011431d0203cc180a6e78c2ad", "799977887666084000000"], + ["0xc23ba4c48040b9fbddaa3e8277a14d861222c154", "515823126934477000000"], + ["0xbbb7b32a5e384829fa67e200041d64e4dd8a6105", "555599875936751000000"], + ["0xf470d2371810803eea3a6364fcb0ec116e65d7d8", "41500934195804700000"], + ["0xb3a14719e1da663e7f48fbaf97ef872990551243", "8856807668394820000000"], + ["0x9ed9f90362a7b2509d753bef8af3a164804e1761", "151969207967948000000"], + ["0x2c047714d4486f67754e8172c97f45e92be87054", "306550637376546000000"], + ["0xf94e7b042241e71a2c1f1fcc171c5d876dc47f0c", "170516426715695000000"], + ["0xa0f0ab619aec09ed753748adc8c258f2c89285e3", "1412572546360940000000"], + ["0x6e41a7a0b1f889edda008da94f2802f45e2ed6b4", "223530488404885000000"], + ["0xecf3d64e92b9d684c715a32347985e1501aaf329", "236446564949643000000"], + ["0x69045868bfa5a07b112fc0b34b6fb0cd60cbc36e", "2013015575100400000000"], + ["0xe95a30e3795b85db37b1c9b082869e4f7615420c", "48018544727262100000"], + ["0xeea7a36d41d739ab8c3fe94309f677e87a4146d0", "950370767291165000000"], + ["0xce42353fd66097a9a87885fa1e66c70c20a0ee60", "612890516861819000000"], + ["0x260e528f015f03889da48bfe1a15efb191546b44", "53092745656543400000"], + ["0x3341c91212595f8d9bb6c36e63c86fa2cda636d0", "10564552240897400000"], + ["0x2e148e78a11e2c6fcbd11c98fda2e79aedb537a5", "147905946402143000000"], + ["0xd8e74f85cffa74ea3a277b438549f468d87d704d", "9328933835734970000"], + ["0x7923d1ba6e7776d5e096bdab45223eb4dae0c114", "270015838346109000000"], + ["0x8f4e6be0925af97e9412e78fd185b84e80575a88", "935578226492459000000"], + ["0xb80c12c95fb15b0779ea0119e7813a1879f9802d", "54279567315186700000"], + ["0x7bf6830ae2dd299316294e824ef98aa2732dc411", "207749434463788000000"], + ["0x28bc33c61382a9e5895b4d1a892333ca7cbdc3d3", "405426429006728000000"], + ["0x00ee28821f5c355d6dbfd3c7dd38acc60165294a", "57644083005321200000"], + ["0x72147caa9fb9832dcd7700ba5a9ec1e3fc6f5ab2", "610025229556668000000"], + ["0x78700077174de0fdd7b848c21361490262e809c0", "595564292762018000000"], + ["0x8195a3cc2cc8b11002ee5ea9804e780c9b8f9daa", "286926972980071000000"], + ["0x9519a4c81b5f3281e6baae3496c0fe70b97b36fc", "100000000000000000000"], + ["0xb2e8379220ab36c38da6adbc974f5bbac2989db5", "149272456440838000000"], + ["0x952e430c56301eb302e25b6073b042dea5bc32b0", "1000000000000000000000"], + ["0x2e32c7815a96dc1a2a1787f9013b0169a242d714", "1479956324777700000000"], + ["0x0a6e37ceea837299f160b63ccb71a0a1587e3c47", "1347655856082380000000"], + ["0x887406bdf59d5978717a83657fc95e7d156ec2b2", "5266451439234220000"], + ["0x6f3013ef8589af4f024b4f926edf538c3321456c", "377601331045575000000"], + ["0xd524b4d4f2046f2a3f908787c311251d1c75cd63", "530383131927031000000"], + ["0x3fa0defc19395903ce0b187f75bb05c4011b1fb0", "2969378122"], + ["0x1b33838ecca98a302bb10d7de6eb8ea25120239b", "21417764179802400000000"], + ["0xc7c61e6884b14933f61c4af0f62de65ee04e812d", "22000000000000000000"], + ["0x8be64b7d3261390bda4b908fe62a2586a04871f9", "12142387192644900000"], + ["0xe84995bcbf58606d919acc03d21da5abc1ceac6a", "30342987045289500000"], + ["0x8685141579a4d62b198301063a4b59270c2d1fcc", "136445962069109000000"], + ["0x161408732fe88c487d06e78bef86b0a49c2641a4", "87059284132022200000"], + ["0xfc31d661994a6f68d72c05960bbc7bf5bc99e8bd", "186459584119670000000"], + ["0xf249e7b44c5ae0f3e216f79d9925a47a23438c6e", "3259572846356960000000"], + ["0xa53e72eed7daf63f920e510b3d43339f5433413a", "204072269890822000000"], + ["0x9374616e569445ef0a4c2eb51094be31a18ce77b", "323777824895572000000"], + ["0x3e19f7d73f807f4e7b99431b8d9676d8553894b6", "334324032656184000000"], + ["0x6032f5ba871404c425a04b6f0800fefc386ddd15", "112820828503225000000"], + ["0xdb963ed159f34ce8f552f8ba26d19790c3c072d6", "279233660132922000000"], + ["0x5e8f22a920aa0461f2a32792238b1d84f2f46d9c", "223133909917199000000"], + ["0xffe026112ff700f2c3d1e47423c22288cf85ac16", "574459216345006000000"], + ["0xb81d98a6d3dc6fe6ec2109df86a5eca92fe4aa41", "200000000000000000000"], + ["0x517047f615a07450ab32e4fee13c56c2f9e7d961", "435619134092574000000"], + ["0xd866cf56768daf406afbe50f612689cc466c6f1f", "40510060611685200000"], + ["0x2f6f02ced513858d95f3687a6ff18cb38ddbaabb", "350000000000000000000"], + ["0x2c826f6d49d58ebfc5e45906be9eae3fc7ca71dc", "874729049844080000000"], + ["0x72271ca27878ad1219f1fa5113ec260260a7e651", "531391221765662000000"], + ["0x3c3fe2b5159fe58d83041472bdf6fe6a4ca1e3f7", "850819773213839000000"], + ["0x04cc796ea4f9b9682c3f7a31c81d947530b72f70", "1094010625956220000000"], + ["0xb8308ba70e18419dd2cf27b225800595a07813bc", "278891533559361000000"], + ["0x6d5de6cb1e6ae08986dab1407333e3c3f8e7cb94", "2406309185573050000000"], + ["0x8e62319a474f50a26e3ec913148dbc620a6e667c", "608514199405661"], + ["0xd012e4961de1d7138305bda73d37587916cbc68c", "3838872377746840000000"], + ["0x5f2922c51b7db86f680268bef147a7626e43f450", "525161398505951000000"], + ["0x989103e7aea05fc16454811b9d969f1496f88526", "789018013444"], + ["0x89e8c756efa594116409929ecbde979a8ea1de14", "5120523073952930000000"], + ["0x96d1ee9fb9a841dbfe8605857871e568935586fa", "105381999842048000000"], + ["0x0e2c7260327e3609d65690779ad077b9b967612a", "1000000000000000000000"], + ["0xb9c44530e22720c748257cf9df48ad2b14fda09a", "440000000000000000000"], + ["0xd59656fa517bd5c3dc3588ff6b1dcdb4228139f5", "300000000000000000000"], + ["0x78fe6ad273917853d1586d667df3e1913556471d", "64191346"], + ["0x7cc1c8e53063623708e9c67affd463e9c55e5a98", "1137330960344240000000"], + ["0x0ca3a47840cd9a4156f1268dae0f7c65cdf0dc25", "136580940073542000000"], + ["0x829bc14065efe75860aa947854ff0986063017b3", "481081114370929000000"], + ["0xe53c0315004bcd22b3b598c04a09b0c8c3fb7f34", "140406000000000000000"], + ["0x0c6665a2bd065dff1b01aed1d91627534cd49a3d", "117235488311660000000"], + ["0x304ab52346bf71d7ba0e9fe87039b25445b2a5fb", "5071676110729450"], + ["0xc04c10834f669237282dce7ee4c3e4ac9ed490c6", "2471345488500500000000"], + ["0x7d6d05856a972312b1554297529a7c0747567988", "248451322136343000"], + ["0x7afd45db76ef7f2181802d3c340b1b3b98a64328", "2644095416"], + ["0x6431616a013198a7015ee181ec5bd88db65f6e8f", "89534258646375"], + ["0xda569dfdb06d72526246de8b0c44b0d9934cdcb5", "210903291580519000000"], + ["0xb19eb4d14fd9cec25c5a99220a5bcbd4ffbdf948", "1400635469218790000000"], + ["0x4ecdad670f6864239d442f4c213e861b48e58211", "78337960620009400000"], + ["0x66f002e2772eb92714a9902548166c60a485e648", "795867381140409"], + ["0xc7efca477afa3c8fe231614b9dc0c78988baeb1d", "377165524472719000000"], + ["0xb362074efb3f8f294162a9692c2d834b31833e23", "27415"], + ["0x88f3a3b63a8daae5b3a7fb482302a4668d18a3c2", "452634315214496000"], + ["0x03783617290732be0c02166a4a5641f59bce8be3", "2283614976542680000000"], + ["0x39a38050190f980e1ed3e259084ff315e244f037", "1550903872537920000000"], + ["0xa3a34071340178709dd920f7738a19763e75c13e", "939256451769967"], + ["0x307c2908e197ab2a61adbd40b7301afdfe881e2d", "79551863203144300000"], + ["0x50af859cc14971cadbed8b5159eae7def0284468", "39749558024976500000"], + ["0x5df451ad02e8d91cb8b767d9082ee559b9a191b9", "92180577138292"], + ["0x151b2b565011f7b93400990abe73429494c2f2c9", "59995238684867"], + ["0x5dce3cf1bbdd8fee714cf7ec1f00b817cbcf2160", "98109816243975200000000"], + ["0xdf90663d8cdfbc463efa6c8ef85a05671c8b2e73", "30153281440903"], + ["0x72a40e1681bec3811a7d91a0966cce618fadee42", "63774374383533600000000"], + ["0x3238934316238ebbda1ffb229ec9a37bf66c5564", "217033733924684000000"], + ["0x4345d9ae4f4c6e6793e1605d74352a98669138ff", "55000000000000000000"], + ["0x360676e09deb4daf9c159837d9bcb21f0f07227e", "915767791142008000"], + ["0x7d81510ef626292f361e97708b6a618cae3ceead", "12160142046056400"], + ["0xcc9047cd36cef35a88bfb434350a3bd778fa347e", "18000000000000000000"], + ["0x3d5f99c5d6c3b012f4731815118f897c14e4e07b", "363674594853281000000"], + ["0x644aaa204d299941c58f757774e2c2bd522cda98", "679701410247112000000"], + ["0x8fc770715ac29266d155960c940204518e26e586", "137033586422864000000"], + ["0x3beb972102bb45920b152fa68463bdd4c17da5f5", "255000000000000000000"], + ["0xa0806b99df2d8c220221f8b6b7b2c57fcdfbb546", "40000000000000000000"], + ["0xc87f715096e770422e4f19c4b49a158eafbbe90d", "1500000000000000000000"], + ["0x007f2a96cbdf08bf1a58f1de3599cb67571a40ac", "100000000000000000000"], + ["0x223a35433f3f87ef302fdfccd77777dd0cd51f80", "1710016136399990000000"], + ["0x7cd85732476281e0daca758e652d413f197c94cc", "500000000000000000000"], + ["0x03fbc3640e447f59e9540034f6cac2731b729701", "50000000000000000000"], + ["0x0521c7212c72e7fb2fbeb9be54bc19c5004bee47", "50000000000000000000"], + ["0x07a6d58cac8d98af26508635815ce1e56458c5a2", "50000000000000000000"], + ["0x0f0c832a009802ff4119d10154c247c459763754", "50000000000000000000"], + ["0x13483c88a35c27e0a893b7196ead0903d08a84a2", "50000000000000000000"], + ["0x150be62edddd543452545e502bcaf6800bcaf2d6", "50000000000000000000"], + ["0x1b927f5f8680b660be3f545a36bffca62628d762", "50000000000000000000"], + ["0x208b82b04449cd51803fae4b1561450ba13d9510", "50000000000000000000"], + ["0x290789aed2d6fae51191bce9cce498d0c336dd89", "50000000000000000000"], + ["0x29eceeafdfff73e125c2fb93cde3e6bb6f1b602c", "50000000000000000000"], + ["0x31099ac2e8b4530ba82f4fed6b489a85569912c7", "50000000000000000000"], + ["0x337ac9e753c374553626ba5bac8593713ad0ed20", "50000000000000000000"], + ["0x3b0a5f022d0e0b43d0b74f961dc7bd236b919205", "50000000000000000000"], + ["0x461b4b406d7a366a965bfd455c013de70aa12a6b", "50000000000000000000"], + ["0x5922233a62ed0ac08eb3d7d2ca3bd2f1080a81fe", "50000000000000000000"], + ["0x5c53bee9f713d427fd930f8910cb9442422b98e4", "50000000000000000000"], + ["0x74f0ef88878bad5c38ee76144ebb723c94e25a86", "50000000000000000000"], + ["0x75c98e92eac409963e27efc75d2bf556d8a7878f", "50000000000000000000"], + ["0x8a0454b05a952c572619935ed46b6d8d0aa97a76", "50000000000000000000"], + ["0x8dd0eb4ac9b49e2193a73d0f77f431acc0af1b37", "50000000000000000000"], + ["0x8fc87c199203332c1cc43430b9fad2b1868e44d0", "50000000000000000000"], + ["0x9403bc5bf2c9a4ca001eacc9b6fc4a70aca3ccfc", "50000000000000000000"], + ["0x98e7131c1d9da1977f96345c85e00f10846f61c7", "50000000000000000000"], + ["0x997202adee11ebeb3d5b6b3c0b3b2b3f3002bc31", "50000000000000000000"], + ["0xa91b82084b37b01a7b5fd60160eef7b04302517f", "50000000000000000000"], + ["0xad3ff004a4897047032c8aba65795916bd9f23cc", "50000000000000000000"], + ["0xb699684651ff748a6357892e006a0bdaa1707d1a", "50000000000000000000"], + ["0xb6d827ad79d3c036fd7a73d294255441ced7bc60", "50000000000000000000"], + ["0xc474fcf2666d8885bd0d48f942f760448b2f9f34", "50000000000000000000"], + ["0xc61716975e0212fa98419b6960bfbc6d8fc8d74b", "50000000000000000000"], + ["0xc8d46eb7881975f9ae15216feeba2ff58e55803c", "50000000000000000000"], + ["0xd7148f95e0fe82036e389ed8d58c92508dcdfffc", "50000000000000000000"], + ["0xd819e3705425dfa164e395d79256cdd9ee4871cb", "50000000000000000000"], + ["0xd89cdcba2a2f85fb3b185253ca29c6127eb7cef5", "50000000000000000000"], + ["0xde48537ce6df7f50daf3989e3202636b09b55f5b", "50000000000000000000"], + ["0xe153ba6e7c8d5ff6ce6d5968044ce72cd4ba38fe", "50000000000000000000"], + ["0xe1e3e3b6cdf387279ef26beabbf08185bf334f72", "50000000000000000000"], + ["0xe47a8c0d429d75745578e2b7108b7b3cbfe07b86", "50000000000000000000"], + ["0xf2c95079e35a27c296b01759431e05c38e392a21", "50000000000000000000"], + ["0xf478792755a5581809ae4116395c32ceba827acf", "50000000000000000000"], + ["0xf54176ec9bd05eb83b94926e74f09960b685fbe6", "50000000000000000000"], + ["0xf5859a2f9e22e67c1e4fb1d2e538a586b1dfe454", "1353890784266900000000"], + ["0xaf98b60342e94244e0732a0bd04b4fba06c30854", "1000000000000000000000"], + ["0xfb8ebce78b02b8d0a7038f7ef373a23cf818239d", "195497388770185000000"], + ["0xbaf3f8e7797003be711b86a871fa70603601d9d8", "339103066405258000000"], + ["0xa1a945b2325ed4cf93cdbe28ea96e5f85c8b81d1", "30000000000000000000"], + ["0xedf470bd925d0c64bc96962d3bdd717eac84006f", "328189954400000000000"], + ["0x87195fef2b399b91d0e7ecc249bf857d69a8eb45", "529175922981106000000"], + ["0xbe2615b571502afa5a5dfdb0361e7f2f62627606", "157305531011533000000"], + ["0x000000917de6037d52b1f0a306eecd208405f7cd", "1"], + ["0x1d6e8bac6ea3730825bde4b005ed7b2b39a2932d", "1"], + ["0x2bdfcc9d73992a8da349c63734ff5a50fa678677", "82401435105408000000"], + ["0xcbf7d1c2012629e4689f6c2ca10c4e3a7ce1a75c", "667780489903204000000"], + ["0xafeb9a39177ea632434217a5f90ca129cdb557da", "36533894582050100000"], + ["0x232ed6686e163cd9de640b0635d1ad0b30e986a8", "300900218734212000000"], + ["0xf53f20ab50e744973d8b3c23e2afe5e4f7e20c47", "605123563475091000000"], + ["0x81bd75c315bd8d5af172e578224865d98aa80da8", "257405262067697000000"], + ["0x8c31de2dba1f084fdb6d58959d873c68e2e762b8", "78379770378440700000"], + ["0xd4d81e2a2ea21c7aa782f55d2a5dafe2da1bc36d", "15583821740462600000"], + ["0xaf19c892a551ceda4356b7977d4cbd5334587763", "507995525972922000000"], + ["0x30db929782c3d15d0424cfb1173a424f183278d1", "274410900637666000000"], + ["0x225482adc95a9f23ff5c448419b2803fab9780d5", "73447481851881000000"], + ["0x177917f1dab18c0d5f9c25844194ef8ae9492b46", "217899622769351000000"], + ["0xb3de73d12866e4b68bea36d02519d7d565c005f9", "281477920821991000000"], + ["0x5e97f49b3e97299ee0ce1fc62a983b42c6ac0541", "536625678930403000000"], + ["0x908851863ce45223c9d16892a2bf1553b5659be3", "634904309611947000"], + ["0xfe325c57946f1dc280af5fe510ec83d1da16997d", "32488249917098300000"], + ["0xec9afbb62de1df0e4c183885e7e96da7e8b72732", "259435243639500000000"], + ["0x4b36c4b9c7c92e2a643cc42f0d9859519d5591dc", "644946060158858000000"], + ["0x2764f88fe0cf47fbd481f5f1166eb8da0ed7feb6", "10262977276067700000000"], + ["0x2ace839c452e0e5666328b638cc36337f1c37c2e", "363597051853141000000"], + ["0x93560aa4084dec59695c1a9dfdc24d5f4b55483a", "400000000000000000000"], + ["0x69b2283c42647ddea1d9689d39679072112c9c0f", "70000000000000000000"], + ["0x1f7ebb2c573eeed2d967a706f0fcd66953fc9e9e", "50000000000000000000"], + ["0x40fd33f8006434f758ecddd42cf6feb0a8ca1d0f", "994093932704046000"], + ["0xb41707d73b2056882f0ed732893202f018855cfe", "237888864505644000000"], + ["0x52831fc8d8344000f92734db70cd4a01a1383eaf", "1035214189763510000000"], + ["0x93a0ad0bdf6194d66e29fb3e5a16314989da319e", "451980305519453000000"], + ["0x82d1c34793ea874a6f3b3ef51356adec8cf7c303", "192955821585629000000"], + ["0xd81e2cb9394b399d6f08c69637adfea1e3634103", "340805250426070000000"], + ["0x187f949e8ad62b845d061aa91358c2f475ad3123", "47246226654"], + ["0x434d871309194367082397ad72f2682195090bba", "1129000000000000000000"], + ["0x432cbdce8596e8d5eae91e0a744909672c587681", "19501057251084"], + ["0xe44b88dadbac54ba75beaa07aae99b243b0b9f87", "150000000000000000000"], + ["0x5d35c351e4c718200ff04cf609a9d2c5d37dd930", "82835458544262500000"], + ["0xf07329a1c26e23fec8b174caff1f832099ffd0b9", "60032668644108"], + ["0xbedbb0cb2938f906a847203c2641c1403b75b9e8", "2116046811657470000000"], + ["0x3039c33d5aedff5a2086b985034912b3abefa970", "200000000000000000000"], + ["0x3cc7f73f5a3a687c7ffa6234863d10c33b51aee6", "250000000000000000000"], + ["0x699d021dc88fa7a071bebdb93e9f905bc983de9e", "1519483165921590000000"], + ["0xf246edfff01dbcbb5d78e821a3368444d9728083", "216692292255627000000"], + ["0x3411a1279135403b885d9524166244da7676c54c", "40339819154586"], + ["0x58937d451bf8baa298d568a6fd69a2daac326e4d", "31276006353917300000"], + ["0xc1d88eb17c2574192fddd016e4d201928244eb5d", "20547128879067200000"], + ["0xde8147deaf08e5d4d345fded89e96bba39ba0a8d", "174394531355747000000"], + ["0xa48f0361a682c26d88ed23b591236d8c1b823c49", "587802954492729000000"], + ["0x96a36ae11d9245b96db466de82c72dfa58f8ecfa", "492580331806068000000"], + ["0x9f404425f7cd1559076663faa284659ed6ff7c91", "1500000000000000000000"], + ["0x9f7ae94f69d27bc1e8f895f21d8c13cdcbe3bdf0", "25370162374747200000000"], + ["0x1d12ef0edc253a3744352cb2518a5dc2a1b0f928", "179133467405324000000"], + ["0x35d918542153109253d5b7d8d4935a6890f9cc80", "163488642189173000000"], + ["0x11ad865b9dbe0de2234460c4bf809033b1724e66", "64000000000000000000"], + ["0x00000000e8080db3ed60313725643d38bec42071", "1"], + ["0x4d94667b1003393828cc885f0dfccaa7dca4ab7c", "419760578675431000000"], + ["0xa8b5eacc8b5c10cc8b68b315cb9781b311a7ac3f", "7725340718195110000000"], + ["0xd13e4780ae2e4df44d4195a169ed1be557e8762b", "915897510886498"], + ["0xedf3fb162d80d36d47bf1ae10b9476cfd54478fd", "449744002023808000000"], + ["0x49307d775728daf1d4736ab762de0cefd035e323", "1"], + ["0x9a583afe399c74176ed6df0ff5609311731524ee", "886768195377986000"], + ["0xed1f74b2a93eec66042b17dedd20127058c1413e", "270467079625181000000"], + ["0x5fa8bf3d389f425cd6bdca59d08b92645e236b2f", "1300000000000000000000"], + ["0x1cdf4798fc3d0812fd57e39ee83fd503e01fe4f2", "66691447940647300000"], + ["0xd7d7d68e4bdcf85c073485ab7bfd151b0c019f1f", "3281735391898180000000"], + ["0x86e6f18c836882e7429592d9d5261bdd4f3eae29", "10005022015716600000000"], + ["0x61fc898bd97ab50c72780266f2d4ab251db07458", "124725725547667000000"], + ["0x9da13a3a1fe5c7dae732bf3a75635c5e7f4f2070", "1000000000000000000000"], + ["0x566280a89dd72c8d60bb4db62ce24b08be82cfa9", "300000352286255000000"], + ["0x754c3c591dd4f3922cbdca43f0735f2efaf41541", "7059542826034460000000"], + ["0xafac8df7f27be423c590cb64c4cf1b359d6308d7", "276016000000000000000"], + ["0x6ad35ad9ad9a1b6c0d02c10918b1e31419e03512", "22860"], + ["0x092e6fef0f3c8289d257b651d50f673241aa2a0c", "132714632803204000000"], + ["0x1d308e78f558e78271ac88dd3d5c7ed9f76f40ae", "195042878113112000000"], + ["0x79f7b7c0270a519c7bc46091b3038f36c78549e5", "1650112286050710000000"], + ["0x5c616a8601360577283c6d509718416d70ad6430", "282461595665994000000"], + ["0xcde2984ee2b18dbd33d7fb18d25202c13cb2e2d8", "25323090478355300000000"], + ["0x7ba6b0221fb436d0519bc11a4484b96b9a656e19", "6726"], + ["0x2a204bf9aed5c00e86a0dcfc1c24d2dd49acafe7", "79593239294746"], + ["0xe3232b4e03cfea16e1dfa908b52cad3a4ae2592f", "10407520790404600000000"], + ["0x6a79c1749229179b4f16e6957597fd8f4d2fae7d", "47583823484615600000"], + ["0xae73fa22d38346412bc76fdb9c3d519eca92bd55", "536168835345341000000"], + ["0xab21d8ab61a99e75641466a6bd0a480fee3e4696", "1260657271165380000000"], + ["0x0a7a4e9bd0d88ae882fc823a85cbf50683f60e4c", "109000000000000000000"], + ["0x90eaf9830209b53336415a08c8f1cf195a8729d9", "8872372625560"], + ["0x52db50d39f1182054ad03c61d714032a46c6993a", "347502414771916000000"], + ["0x4248a61811a096802bc8bfd4f8cd11c6c0e6c30f", "504176746732978000000"], + ["0xa14c28d19007da81bc0de5be416cba0ca5961e0c", "5000083364070370000000"], + ["0x85330b3a8ac3209c9b16791470f9a69c5cb44970", "167466381363099000000"], + ["0x08b3f7dd2e443fb03487538f8f31e6411b589d09", "2208525569804480000000"], + ["0x4831b73ee8feca6c8e5d196c070044cc1d63e249", "235331239577585000000"], + ["0x9fcc69ec7bf760fb169827e42356d87f2f151cdb", "202703096506438000000"], + ["0x5233d3460ecf216ad5de886b2d9a4bf0698219d8", "94234544922437600000"], + ["0x09f33ad2bb8a1850f03fdb1437d1a01193403345", "14336"], + ["0x74fc66cc35b90cf3f8ffa0b08ab7b00acd419a48", "3037007478197350000000"], + ["0x2cc7bfe4e11687d0f5c28cbaa48073458dddefa7", "642408784516210000000"], + ["0x164d909ea9986f95a8ecf9ae141de56dd0c2d86b", "4353120931787290000000"], + ["0xf7ab5f9db3b621877c123d4f7f9ec61997cca0a4", "673758063477585000000"], + ["0x57f1dd3e391b25011faf40dde74c54c7098cc5ff", "2499024616858320000000"], + ["0xaf914aa608b13ae7cf94cb38a99bbad15387e28d", "3736090774118360000000"], + ["0x9d8c12ec795ffd1d49d239c756b7d6a9834328ce", "533474261019736000000"], + ["0xc20c41877a9af9c59360a4c66f70ed63d30bc661", "428318437367709000000"], + ["0xfd57270723f8849c751d456e0dfd39629a7b0455", "113746813391594000"], + ["0x0032eec8d52138ff880e0f8c1a3afc6393965b6b", "438443193673579000000"], + ["0x914c7e671a046b7b216895553d0db7cfa72463e7", "80597031436663200000"], + ["0x9531647f5ffaf86ccc95307a2841d44864f50d2f", "1450000000000000000000"], + ["0xbcb34dd9351dac05d061a60dc4c07b522613995e", "100000000000000000000"], + ["0xa5b55e9277f39ed77a09319a36acf4961a1a67e3", "4146394070383980000000"], + ["0xa4146769c7cee0787777e5a7c4459c45c336912b", "43657955366174400000"], + ["0xf7cbcf9afc2c1a818aa7b1ee3e954e65b0b9e0f4", "331940133355396000000"], + ["0x02155e928739e4298b2f60158ead9e27821ddb4b", "500000000000000000000"], + ["0xd7ea8b22a99a309126508cda9cc62c8b1ae85fa4", "9244111104510"], + ["0x820457ec3fc535017026c44a757babfaf5a7d6a2", "69896527587356000000"], + ["0x8c523eeb4aa347423983298af4eeea05d4d6e2c5", "100000000000000000000"], + ["0x17f9e3d726488794a03c32edf55ffbc4bf1ec916", "1320140491879210000000"], + ["0x4bd4e0997a66392c0aacef006e012c2f0677b0cc", "194243830143134000000"], + ["0xb424a3cda7bca285a363f9a98b1d133b995172bc", "47646398691422100000"], + ["0xffa46639ef45b5da3033c3c394b4a46c90ed9790", "431600586396806000"], + ["0xae1312033facd19bab61a6736aeeed07b3cf499e", "16637508156574500000"], + ["0x203f3eb497c504061e0aceea749103296b0b91bb", "55241515003567400000"], + ["0xd33efc182c87de58d5bf8d38bce446ba2bf138b3", "963130306713480000000"], + ["0x30fda24649eb8346d933837a9d4c1c9d76852d01", "2361864087312340000000"], + ["0x0b6c146abbbf45b2566f8442ac4269e6124abb83", "331896880230870000000"], + ["0x4cbcaa88834411b2dafb78abede1314796a70b39", "1262352580788280000000"], + ["0x4ede13d0fcc2ec79094f7204a16b5247e27e05a4", "500000000000000000000"], + ["0x677e76d0a54d67276a72007e41cb7d366b8ddd08", "190214827136804000000"], + ["0x01716a7211e33de598d15f599e80d6694df3a17c", "289185977764858000000"], + ["0x80fdcdd692c0a586723a8cfb940f4739917182da", "6422888484479200000000"], + ["0xca9dc9e4afaa33f39a42cb2044c3f0745ccfbcd6", "67554131810968200000"], + ["0x0f430a50595ba595a82836695f2ef60a24ae327a", "762611362715371000000"], + ["0xdbc57a1dc6bf9080c10b2d66be3afef7ba2a4f19", "5000000000000000000000"], + ["0x09dcf911a4b1d72cc97db56617b57b92fce326b6", "50000000000000000000"], + ["0xf999493a9785ddac946b9f1f516a79511f0014c3", "163000000000000000000"], + ["0x7d2098ea80cb929e9fcf79ed18092ef3034239d2", "4353022888328880000000"], + ["0x4b9b7dda7c64046776b0166f4f71a2cf058c3e56", "4265927787558200000000"], + ["0x4cb453ae03113deb75d7a8267fb20621e8c996fe", "290099250668112000000"], + ["0xf14fe2d917f5b59e90a199a401bf1ad7f3a59265", "4457726407035320000000"], + ["0x13d8ea39567bcb8b49d86bb786ff421505cf59f0", "103435806754039000000"], + ["0x27132b1c44ed20bf54ed53d13557485dee422a66", "151534307473305000000"], + ["0xf3bfb88affacbecefc1a570a848a79cde46291a4", "4825964314020930000000"], + ["0x6339e9b65dae5f990cebd40bd171cc16a74f9d26", "165826394712383000000"], + ["0xb32a672d21b1b8c033d0a195aca2eec16117ba7b", "655253659341991000000"], + ["0xb000132aad9d8dc5a8c37bd2750b1fcd211d4716", "322967296740614000000"], + ["0xf31b7a7df2faf975e9c7efb75849658750ce0468", "68741799496833900000"], + ["0xae6988feec1f9c285eff897377bd6e24a4705f50", "552094480902764000000"], + ["0x7cae6729198d7013c7c87e11ae0796a727665d6d", "37000000000000000000"], + ["0x790bd34732b6c820f9ae9fa3837546045133095a", "498064944061684000000"], + ["0x11223fd41ec1003408855cf97d4ec7faf9d7e719", "1942926028746230000000"], + ["0xf0b3ed341884f2383d76badf024f314e12c9a745", "96291789974397"], + ["0x7e2314a522164a79996ebd9ac8891ea7a4876e98", "454000000000000000000"], + ["0x53672f9be477d5829fcdde348f35caf15b2e3255", "1770371125371710000000"], + ["0xe4efd1be565690bae9d9bd52762ceb7c5155749e", "461747422434380000000"], + ["0x3abcb5d5fb4044620c319bb63c5540a04e024aa1", "2658030111559510000000"], + ["0x8680e7a26b01ae0cc4922c648fa38182d2e0896d", "470377680290778000000"], + ["0x13d8e76e2674d4457ad3cf3ffa7ac068f5c91f83", "150247502591881000000"], + ["0x8426e2d7abbb6025b1c9947ba2e4918b839b14d1", "207733677456443000000"], + ["0xc49b15298c1ba9920caa36e4abe2ef080ffca692", "138279924764467000000"], + ["0x194e9c9d49798596cc9bc76781f992fb83c232c6", "831022242291915000000"], + ["0x113e21c37cab951c281476dc7ee8951d3ec6d6be", "10000000000000000000000"], + ["0x15fda64fcdbca27a60aa8c6ca882aa3e1de4ea41", "1428487089070540000000"], + ["0x8b71fd7dcf80db1d6d8f0cd40b85fa620305685b", "295785591468054000000"], + ["0xac3b7e023df1035c6971cc9a9871eaa8d1f4ee5f", "163116545489788000000"], + ["0xf431834917c01f82ee5aca04c41b845b79aef6da", "1969478059244880000000"], + ["0xd9b4047ef0c3407e3a3ef3a22beb9f7993f1f346", "913002027187641000000"], + ["0x9a6e6cd88351cc484c1be29689fe2b4413e90f4e", "98193053317722700000"], + ["0xf5ca52c53db1ba4d196a73ea893665bbf9ed2693", "538122903441655000000"], + ["0xfeb0ed524ab18cb82038422671b82fa8ef6d073a", "397532526725841000000"], + ["0xf26db1ab6a6b3e6544cef663f8a8b7496844d410", "1410731061269670000000"], + ["0x3df551bb6b29eb05fc709a25f8f05e07119d99a9", "837966972382422000000"], + ["0x92743bdf2346c0117dbdd8a707a4b0929d66ee26", "342836321456781000000"], + ["0x105badbbd9fe1ea1039dcaf217b5537c7bd53c20", "150000000000000000000"], + ["0xe95c69de2c03a7152fd334a7790ed86d0f7ff85f", "100000000000000000000"], + ["0x778e4aadb3da1e922c7ee817b0c9362043beed96", "340029968574283000000"], + ["0xfe8f5e90b236302c9db977e2ef9ae260d4842cbc", "144645269685444000000"], + ["0xf14c056414f8a6f75f6eef7dcaa94cf12d9a5403", "83432569602871200000"], + ["0x89c7de79549fa5ef5785d7a7cbaff0c241bb0714", "800000000000000000000"], + ["0x3c9c41789f90825a61760c0b6419e8a0b312e810", "120963783617130000000"], + ["0xb22091c028270c0c772c7ae16948778365fdbd14", "323565099084965000000"], + ["0x706267573810dc5b3143977478d3c8bbf79aef0f", "130000000000000000000"], + ["0xe61cfbd09e6cccc6507ba8e7539f9a74f6278318", "39276187002241600000"], + ["0x9881565cd25dac0174f3f5706842d7041999bf08", "150000000000000000000"], + ["0xc33f2de83c9d3d1fad2de073ba83f40e55440ea9", "22000000000000000000"], + ["0x87011327ccf35ab7e88f36deddcebf0a1ef049d7", "231388210458549000000"], + ["0xc676ead43c7f45d8d50e975acd3abaa8a2b1d3fe", "800000000000000000000"], + ["0x4a8bfa165ba851b078d9d4c5423735ee1eb79699", "270000000000000000000"], + ["0x3e2a56e784e654781bad62c9ea8a9bcb60403b93", "2000000000000000000000"], + ["0x88c66d3d576ba03b7561c6330c07e49f2cf8a412", "1692028691136880000000"], + ["0x3cd5496a6e4d789e40961259e257ba1fe4ec32f2", "2829744469266170000000"], + ["0x002011d68c8c3747ec2e90d39f61abb84609a6aa", "960079815441437000000"], + ["0xc147deebfe852b23c7c58434c435d9f6b0cb90ed", "358177688282100000000"], + ["0x94e08736426948c5f463ac243416f0473f680b2b", "657346373556130000000"], + ["0x1fd18f2f75cae7caff305391be2f18432ba562e9", "687765068613774000000"], + ["0x7bd74690dd2dba6e408825e3938697a311cebb2c", "729979973952289000000"], + ["0x0c797ae93211d918ba59938788170ef17f812ef6", "172242565896158000000"], + ["0xbac42c9b32e574f41b86e20fba0cf479a5a1ca58", "705191943283841000000"], + ["0x666df143bf8c00e91d6e43a303f2e99d57e1679d", "36702841520569400000"], + ["0x5baa9a8ce0b1afeedcb015634d6f91163dc84374", "69138855190484500000"], + ["0x982e0bcda3abb6404a6568ac27b9aa4c397212c2", "253136294846817000000"], + ["0x10551f53e2971dfd1393001f8c293785f763aa82", "1227183670329340000000"], + ["0xf1ddcd748203362ec65cfeff36f24d58cc5a1a66", "420113976181933000000"], + ["0xbe8572dbc32db091715e3f55dc913fd3b05173d2", "50000000000000000000"], + ["0xdc8bddc41008a38ae53ab5edd2b5cc954784d888", "150000000000000000000"], + ["0xd668e0161fcbc6f1bf6d1f051c9c0d8f00253c2c", "73590643785899800000"], + ["0xbf1d60655d83665bb5119196cd322df1633e50e3", "5503966464250550000"], + ["0xfdfb87d1ee9e369c67755e3adb1736b26067b05d", "129243286615024000000"], + ["0x738b9aeea3d5e37f67ebe540b9d5a2ab2248634b", "839493356094179000000"], + ["0x21cbbc3639d35bf216c8ecc111876a96177e465c", "44031320663721200000000"], + ["0xe8676497f39e31ef373ca2af659c34aee93db732", "1368325920495460000000"], + ["0x00000000acd5ca17eee6d92d9ca121543126cce1", "1"], + ["0x1e8b0ffd7189512e0f0897ddc1749760389b456d", "147993975257159000000"], + ["0x2e465ddca6d2c6c81ce6f260ab13148d43e93371", "1043463424570720000000"], + ["0xac68d99a9aa398d2362406f8f9eab4a302b99a32", "561528349761194000000"], + ["0x839b3b71448af0a5d3c28e154f265e7045528132", "2436160398379600000000"], + ["0xe9fdd1f4d127fe79327ca9793684d31a4d138fb5", "250708104335646000000"], + ["0xe3970902d748181e04bf81919d5ff8ed30cf005e", "385235706628816000000"], + ["0x7f98bd1dc02b5421336fdff34b0ad3fdcfd33950", "1925750576221470000000"], + ["0x981fc8b9146143dc5cb3e59ef8ad0cb1ae5bdccf", "187865399993263000000"], + ["0x6ba9d0c502127fa27964ecc61f9021f4e2066abd", "70000000000000000000"], + ["0x576c1cc8c9067b25846989f58d834b23ce9e75d0", "187330305949727000000"], + ["0xea793efe12f6d9297741199e5a57e3918f2a0fca", "162552152616666000000"], + ["0x5c78a5ab51b28694a167a2db07710b67a2ccce25", "198098668206757000000"], + ["0x094a540bd61318318ed8898dbc834374142c46ba", "232391553278063000"], + ["0xd3a58b0268b9b249661726bce7d498b3622ad1c7", "103136913444929000000"], + ["0x49248e9dc8a4ae03789ed9c54cd0e0c1ab0a5d0d", "655732066448934000000"], + ["0x833b8eb15e8c4f42765400c86c095c5d7493fa77", "247362930283623000000"], + ["0xf53b53af7530aa0c7db54b4d028157af60daeac1", "302394475396800000000"], + ["0x1df6601979d1d6ff460e761393701719aa756824", "47303272757654"], + ["0x43f0f04b4740c49331c4cffc8392def59572aef7", "1150466113833700000000"], + ["0xac3c33fa8e06cef9a396042392a90734a90c4bda", "1117992278"], + ["0x7206834fc91111cd6cec6ead968d6bd33c5e434d", "11232438088826600000"], + ["0x4614bd31c121e8c8d6c73db7dc06645dbde670dc", "151049354101826000000"], + ["0x0420dd486f8905fb7c408d315870d579d2ff2507", "314436220351605000000"], + ["0xb5c50f7def6859451b6d82a38a32ae9eb94c8017", "500601533357657000000"], + ["0xa861f8bd749b19a698a6d36a248462cdb7b1195c", "186692403537925000000"], + ["0x4cdf78724f6f80670bebcd03a69fab9a6778556c", "1207000000000000000000"], + ["0x5c114501cab9f379b6aab10e78b4f50eae7a0d6e", "304101838817391000000"], + ["0xa89a8db746cbea73add4b5a3bf4bb1e176c0cf11", "213603957408272000000"], + ["0xc8a51f193c35edc394616ca00a782377017ab675", "1212012498861230000000"], + ["0xa79aa90437290d45d0fa653b6502bb905a1f62b3", "2063913111321670000000"], + ["0xc0cb43a119c1c6a9ea50399161ff1b620c6bc1ed", "1721000000000000000000"], + ["0xe002fa6d0ecc0809a836f62c54a5c9ee228375f3", "149678878489657000000"], + ["0xf7858ffe1810a5ba72b843b9c2322fd1779276a2", "333008057606465000000"], + ["0x5f06ad06f44e0c5e9fdc8efe471a9ca8ed5c9a94", "476281443041822000000"], + ["0x8c16c8fe98a50b515cf8268090bcb8886b241908", "852092607189165000000"], + ["0x91e6b73b4270832829a9ba986d3beab57bfff4f9", "935987345851963000000"], + ["0x8edaf22542cc324ad48aad9b04fab79c1e70ae61", "37927661661547500000"], + ["0x59810804476105b545d4fbbe561f9ba0778b59fc", "19684800575331500000"], + ["0xb565ea05aba01ea9015ff65432fdc775cd2fef0f", "51539910736946"], + ["0xa8dbc1ee88a30efeef9692e7476620279e8f95db", "3600000000000000000000"], + ["0x8a8d30e81c1c2f08fb775232e204f564b73adfe4", "285106021539243000000"], + ["0xda1df669ad144edea25f4c22daf16354a3be9df6", "353814779558999000000"], + ["0x626159c3420a0c3ad5f5dd153a94425961becf11", "235622707829334000000"], + ["0xc1e308014cad4cfae79759caf740c98ef57f4783", "89272800000000000000"], + ["0x91a73acb271c3ebb3ea5467f9ef9b29d5a080d04", "347000000000000000000"], + ["0xe25ef55fcff7956941fb2ca00929e9891f027b6f", "347670544194355000000"], + ["0xb70881a906c060e5a16af343806ac5cbf71881f4", "87908608477876"], + ["0x56b824a505646a483f0464914a30c7c5ea1b43f4", "64634141722590000000"], + ["0x1c04432207aaa34da9ec3c6549b5e4996d847dc9", "121036749679709000000"], + ["0xda68e21acd377f1be13340ee4b588bd2a6a66b29", "70000000000000000000"], + ["0x23a4eaa46e520937f286e4d8c6cc79b129f2ef56", "245456846212347000000"], + ["0x7219179fd4740ed1bc76689b25f590a840f2f049", "15407567876165000000"], + ["0x6247bf5f0037a090dc33b74d5357ec46547a9ba8", "5059370022728530000000"], + ["0x78a9e315c6d6fe8ea0ee1cc40ead04477f02bed1", "101397289082072000000"], + ["0x5653e1c2d1c1a0f3b0b67b91d4c718c000e68f9c", "164340728600520000000"], + ["0xf6bb44ad0878049eda05e168f670560f182a689c", "724678558624060000000"], + ["0x659da58f1eaf1bea47542fecf2fef36ec9f1eac2", "104659219165165000000"], + ["0x45b5853e83aa71c81c1bbdeeed8487aad35c8f85", "99472786094386200000"], + ["0x596a9866d288e6c0ff98e756608169f9bf64be0a", "20000000000000000000"], + ["0xba14977adcfc73f1552c5c510b9bff83d95f346b", "1000000000000000000000"], + ["0x39427de5d859576c849f4ac0e4601a2504697bed", "2792829401883680000000"], + ["0x2197606e51dd4b6aac8317533dab492aa53edad3", "1007458360478750000000"], + ["0x3b8b4cb8d4ff25537d4a4869a3ca56f1a076a2f4", "456051043594787000000"], + ["0x4f062d55a46eb724e0b1a95bdcfe715c778471ff", "97840657214307900000"], + ["0x291f728ba2800d9cf0bb8af7f1ce33d0e78f313f", "654017729359463000000"], + ["0x491dd4a1b070c22c0b287d675e9f5fd75b55ff56", "248894889820287000000"], + ["0xa42d894c50a245da71b3f7a4e7b8f228ba1e2a85", "496629140541198000000"], + ["0xc302237c0955cbe71e0db3e40f71445790dd17a6", "539917421711835000000"], + ["0x91a34c4b48510fc1262e092c044cbe1220a7099b", "948548304576057000000"], + ["0x000000005be1b41f8ed12d32409c8475e83f2ee3", "1"], + ["0x15cc94ab6414cafa6b0f37c365421708b8bdf017", "741426737692512000000"], + ["0x2da668c1b6d281181cc717306fcc7c9c463fa17f", "1000000000000000000000"], + ["0xad7878b5cf4da8c84dd62eb55c827fda3f9a7033", "307417666135253000000"], + ["0x6db4efba09349084ef2073748551ced6db403c35", "326000000000000000000"], + ["0xe5c67c31c22ac9d1c4a11f687ed2185f12fbbb5b", "1081729856378040000000"], + ["0xcce0dca48636e823ace24ec16cb242c2312c589f", "319011361173990000000"], + ["0x2c9e1bf8c530a1c7f01e251536101876a73018cd", "250816064810217000000"], + ["0xc5ab97ee3048ae3b3430ae8e7ce2c0cc09fe44de", "300000000000000000000"], + ["0x525a39ffdf2a0c085c64b6774bd1a231fb0614d2", "1812224707673310"], + ["0x7eb3892dfc4529b81a9b10d07f46d9278bbcb35c", "250950400739564000000"], + ["0x5b758931dcb89f07dd23c2bedf10004071d6b467", "108721714444693000000"], + ["0x11651b7f8e2d6a0ac84cdcef4c4732426e0af4a5", "58474962537519300000"], + ["0x0000000033431f236e97fa549b367827360effd7", "1"], + ["0x7b183fc2a253b76a504d3dcee83aaf7a879e32c1", "192781392142657000000"], + ["0x965830bd972f3641cbb793eaaa3452cb438cdaf7", "511450814602205000000"], + ["0xe708acf4264610f0fe7064f498666cfefb9648c6", "8017416307577080000000"], + ["0x990e5e85387f04354c90845c82a448478c166d17", "167119322106359000000"], + ["0xe0aef1db9cb60708202caaf9a505dfb8aa9bac16", "141882041950269000000"], + ["0xf9e2f244537f1c01628a51226bae34d1583af045", "365780081613569000000"], + ["0x4680e5ca03bf2021581b73d28e5434e81a47e23c", "431898237264632000000"], + ["0x0c48ebfa89d87ca96fc1d427997c794653354c36", "290130285618288000000"], + ["0xb9961b0c58a49f6ea80317ff8f302124ac47ffcf", "198135355095835000000"], + ["0xb6237775a4b5adfd81ee09a5417bc15406fcddd2", "34649032614047000000"], + ["0x9155a74a0243dff3c8a502477681791dfb07a18c", "217673859522338000000"], + ["0x88cc3e896c4c178ab98333dcd29c33d2cc2102a8", "146920338722917000000"], + ["0x32326fb83189fd32f6412c30dbda1d110858ece8", "129998347482145000000"], + ["0xe2fbb2d735beb5c98641d5233c64cf48b72e97a9", "429549149477537000000"], + ["0x04307c5c7878d8d3374a73a2d08f9a9b7dfc5cc6", "2519257562143180000000"], + ["0x136c613c400e5fd1ef4b6c1d47d9f8fb8803c946", "100097542291208000000"], + ["0x6786b7e5022cd6e3e6b6a1018953f1d15dd442aa", "15007914516540800000"], + ["0x7e89f45bf62510b134db6b46e957470b9c2a95e0", "233893912808939000000"], + ["0x393c5ccd623945aa64aec6455bda10e471a0046c", "31144509105381400000"], + ["0x6628d0731ac8e564e16d60da68c8200064b47f56", "616077771886012000000"], + ["0x090d267c596e937ffe1b06ff18ae444aa93ea9f9", "771496976068888000"], + ["0x053f5911ea9acc9dc80a4c4c636629bd9a5a270c", "557715882076879000000"], + ["0x6d98309340fb8dab4b2cd46eab754929aef3c313", "110594350653651000000"], + ["0x736972f10bbfe6de66d8112ff77af5d328a255a1", "450000000000000000000"], + ["0x7774aa89740fba372ccbf0a40f30846376c12eff", "56929852664902900000"], + ["0x8b7a2884437c544848c4a187d3f8278f54834c68", "51243301328298900000"], + ["0xd00ffe05fb3abc421c74379917cf640ddbbd8487", "19008168019079100000"], + ["0xf7a4c6dc2fa63b3d3e227a5fd29ef9087b824290", "1909661329897270000000"], + ["0xf0b4d51d517ab5fbdadf63d4057592d0e93bcb83", "23582518509524500000"], + ["0xf8a226e0925c741aee460bfedae206780ab16c83", "8454197956593"], + ["0x6aeeeb90be7a4a8871ca7015172b278a98781446", "406302304415"], + ["0x02966fd54b31a7ec842a323bd5049b0378699c4c", "312498259224328000000"], + ["0x3aaf55fb6a5a695c7a5445175521bc7c8f639b32", "675448202036673"], + ["0x549ad1e2cf017172fd8ec8d00b3daf18b9ac4a44", "462635038241416000000"], + ["0x82735147c800a786166d7cc0e076fd056f773dd1", "345641073063019000000"], + ["0xee218f8f3b9c10972703d615e5e5cb5d2f847a86", "83355167809191900"], + ["0x5423ed3bc1eafd37a84d4f445eae2662ec8ee475", "10000000000000000000"], + ["0x9ca38f4045af20ecc509a63f4f482ee4166f3a03", "187120777547997000000"], + ["0x5fb42f57eca503e305027774be412453ab005792", "400000000000000000000"], + ["0x193dad0127f564d973aba50b373db51fd2f2588a", "3460894613967450000000"], + ["0xe3b3fd1927d55827257892642e71d4c14dc3aeff", "13393262814364600000"], + ["0x97649619b88d94b08f0b54ab9ccac75e87b29e47", "228874919692284000000"], + ["0xf2c471943666deae814c787a5c834e8fc599c70b", "295737050415694000000"], + ["0x91c214c3b6e6a8a5bdd52154e64dbf0d74e0e2a7", "200000000000000000000"], + ["0x79dfdfa0c384b0fbf49854eb491a9fa7d197f93e", "1524558261645060000000"], + ["0xa1c03903041346aac74960d8c4fa4a3953a8cac4", "246093528429065000000"], + ["0x320bfde66e78d741d739e8852699bb9364dd46ea", "172349564735383000000"], + ["0x4fbee6850965c8f6eb5eb56627c4a805acd9d11d", "295000000000000000000"], + ["0x20b5c8288b313c6ae31fc563a9d40dd1142cdff2", "372100007990980000000"], + ["0x37050a10fcd3b1c485c33f5d4aef3d0e33750792", "1785946806563520000000"], + ["0xd685f9a87f5cbd534824bf1dea581a8de083f2da", "309063181937734000000"], + ["0x35dd8ae8e3ef1ffd223d77371badd6f7393a0817", "16859482611839900000"], + ["0x3c38fdf35c4b267893c9c9eac77a8b5a57c92b5e", "786432"], + ["0xdcbee0643b7d920da6c64f60ad31fb5be473e781", "30000000000000000000"], + ["0x65d6e0beaae01021d6471ec87e60a3d1ff32e132", "30000000000000000000"], + ["0x79160a6530fac0853c9826dd7ce08c87c0641295", "30000000000000000000"], + ["0x68fde178c8ec681db7bbf8db344998e4966d26d7", "3994888661775"], + ["0x1baac833f371b962939cf556a9295cbb6c95ceb8", "64230365726139500000"], + ["0x41c97ffd1b0427d6961c7a3a4325ad8ff5213d7a", "181671347290983000000"], + ["0xdb59117e9c20c7f79fb1ecfb4497c38aeefa7919", "6000000000000000000000"], + ["0xa095d9f9e49cde356bd1a0428edd88bcd5b46c59", "89267994256116800000"], + ["0x04158ab32847369010045e922e8d24c03d6aa7f5", "1424675292731930000000"], + ["0x729f805cebc72ef06c7e6cf229868034fda5776b", "84520205439287900000"], + ["0x868110e3db5357b77986421e0adeaebe3d3a04fc", "111591158091193000000"], + ["0xb97176276b93980a659bb54b3243364e2a8c4d21", "345241980402572000000"], + ["0xcc8eae5fc7ddbe66af930e8c4abf52262c3bc452", "194158318967313000000"], + ["0xa001d2981383b739fbb80297f94316b8073b0ce9", "341000000000000000000"], + ["0xdac609510f9e7d89eda0740628c3efdbbe2774b6", "202929724351463000000"], + ["0xff7265d56cd209fcb73d2a8d24ee881d50dbec0f", "552769026470209000000"], + ["0x4219ff8cf85ef15fb75c350a3e848b58832ae167", "787741401641080000000"], + ["0xc4477d22eb18932331e86eeb6da26d1711e43997", "177133528681272000000"], + ["0x2e26eea6e806fc6331fdc5d1d11aab3dc3bd60b2", "100000000000000000000"], + ["0x85d535d22249f02ebd3e30fe314c4aa2a7fbf363", "1164478105599960000000"], + ["0x9e7247776be9d408eb0eb5b379e37095f039d1a9", "207144509627014000000"], + ["0x46419f392a12611ed82dc7d4e8c6642de0e75c5a", "1853719584691"], + ["0xa0ec47ca9b159d870daffe8af630d57e758930e3", "22604"], + ["0xc6676c09fb04ae2a7039cb35dd58094ce3b2753b", "1170809577387000000000"], + ["0xf1f4ca7fa63f93b473c0e0b567643c50c2876f93", "5000000000000000000000"], + ["0x2c1fc63865e0122e8d977424bdcd595792da127e", "69699097054138"], + ["0x20795012a635b8d0c4f2d9824f68419b36bb5564", "811846226633748000000"], + ["0xfd370d9ab0baefb11851a229e51aef162cd68358", "116058215585379000000"], + ["0x3b66a6271ff878afe7bf4cfcd7215bcc1225566c", "87306150478930800"], + ["0x23408fa8f9acbd66ab4f9b2dcbb9e85ebe989993", "1009572011035400000000"], + ["0x9d64f2cd1e442b379ade1f8c2a6bd7db84681e85", "284807249764418000000"], + ["0xd0de011f8e252c71b6d4d60b7a6dcd7940d9470b", "744454304310354000000"], + ["0x03616be5b794cdb242340b97b93eabc855244376", "100000000000000000000"], + ["0x11741c6f2b6c1fb224cc57a19ce3982442d5c50b", "211460184551300000000"], + ["0xd84c30afbdc2332c4eb0680d848b9c2e7b01de73", "33110233433454700000"], + ["0x822245daa39ab32206fb343b1ed653ac8e5d7338", "322044137780864000000"], + ["0x6c358adb31f0110d2880c9351615c8627ac84177", "1592725858988000000000"], + ["0x1d29298b4de8f7a56e85a7d7c08fd5d78c391cc7", "1086565315098730000000"], + ["0x547ed88d8bca88033428c9b300b7808d2e404e7e", "95804174652659"], + ["0x440b2690daf461acb09c469509f8af45d411c383", "290350015137555000000"], + ["0xbaea24e991f0723f845a08d3e299dd6f739285ef", "186344438533748000000"], + ["0x296ac1ff52b9ff97b404b93da139443b4d81843f", "5742747450504600000000"], + ["0xf8fb053bef2209712c85dbfb90302d92cce274bb", "32281618910422700000"], + ["0x75e89d5979e4f6fba9f97c104c2f0afb3f1dcb88", "5144261808051030000000"], + ["0x31201c0451bc8293799b0efd462dc810bc08cf40", "1045140000000000000000"], + ["0x91d92b00d14098c933b1f0bb8a881a2ee65be4c4", "77121700000000000000"], + ["0x3977497f572b16a01e2da7193e301340dbfb3bde", "30000000000000000000"], + ["0x34b07db14f4db3bc9c528caa8c696f97cd3d621f", "574500000000000000000"], + ["0xd22fa7a71e896d5ba8ed87522d0af5c0ef7b5fce", "627201879367376000000"], + ["0xee9b161a24c293a17221cbdefb5b0c874ecf9b0f", "258400000000000000000"], + ["0x100e45613e1ea5c16b2b2338e2f1bad3785068f6", "1000000000000000000000"], + ["0x0f063704c19e56b071ec471864642aa445218422", "1313000000000000000000"], + ["0x58fc252d4a7393b9e4cbfaa619f97dcc97b42631", "160946461450114000000"], + ["0x89ec8c7699dff36dee9b1f79b00ad12b5a0a0195", "120012100000000000000"], + ["0x1afde41a98a9960a5dc785090149bb1740c8478f", "812650824678936000000"], + ["0x79b1c825ae50936a117ffba117d537cb0fd1c2ed", "447833489268368000000"], + ["0xd6f82c5b7af5a6ba2a60421d304c93abd2a98bb6", "4182087886664520000000"], + ["0x4b70fa020654a4b52a0a5e2b44db0f05f2378764", "173226780000000000000"], + ["0x7e6b47cf352ca5e3713af88dc4fdc23b60ad67f6", "3689541286910500000000"], + ["0x28bb4fd62dd3b29b46884ea7bf8113d4b0cab828", "255627681234445000000"], + ["0x9e6224de8973bc4f9ba9da4a4322f9db6c5ef413", "120000000000000000000"], + ["0x7e6bbe3544a1a61941e8e218286b23e7cba78212", "223417730000000000000"], + ["0xaa06323c05e3ffc542a0aec88c091f1b2027fce5", "265769630000000000000"], + ["0x1ac5c740373702ebec1f049158a00cbe20178933", "189269680957108000000"], + ["0x6d478145a63ff539f1406220a018792f9b51fad0", "104668038558022000000"], + ["0xa649bd1a0b8e35ef782b7cfd7cce929a8fd1b04d", "585212819769343000000"], + ["0xe92093bc16a36f7878c8325303daec1ab84697c7", "57746244921622"], + ["0x12371c045ad7ef4469b8628f2ffd6104ea776a03", "540960481349177000000"], + ["0x74e6da362d247aa5c0b24a5f836c46eb04058777", "35900214538613400"], + ["0x806259e10f7f420b73c2050451c7cebd24a7898f", "205921649949129000000"], + ["0xb8de71574b454b3df97aa42fd8433e52a97a8526", "223914373578548000000"], + ["0x7ec228399810f6960fa04ae2818a835d79d3f8bd", "1075092843515030000000"], + ["0xef779d79e7027044ef3b8167a0b785282926d018", "430491239121847000000"], + ["0x2a8ac196905afff02550b547af6110c87f504b8e", "42555621359056100000000"], + ["0x636fab28bee42a98bf04f428d27974d35d7be603", "540000000000000000"], + ["0xe4637ed4e4e07a31657b9b9c8cb97950be499ae4", "1000000000000000000000"], + ["0x5ca910b699dc0e1dada4b6f25ba5a871d1fde8eb", "344317298988189000000"], + ["0x4cf2c25bf1708bb82d3cc557ffb40a3eb830a974", "37732407645283"], + ["0x24a5040f0190d86841c4ea6f5a6de8ced5f0b334", "681758846446918000000"], + ["0xca002ca0ce3b4d0568f450dc9ef0c3637e6a13a0", "1084707728613760000000"], + ["0x7c414c06dc87fdf876db9b27b03f31081c6d9093", "449337262682"], + ["0x5e510bdd3c1aa904c70acfc6e1c110a12fe24a1b", "171180000000000000000"], + ["0x6f5c2cdb3411481b5d8c1a2f17f211c41fb22698", "88938927169685000000"], + ["0x462898ad742c7d5a02ded65eb78964e035f6e448", "89007081154906400000"], + ["0xbf77f58fa7bb4086c47349a5dc16d78b38c0e94c", "127116447463741000000"], + ["0x186fed4e49ae0fb6f312ac81d5af0397d31feb8a", "10273594567911"], + ["0x551896eaa887a25fcb250c7e3f2c4c90412f2883", "219902331590512000000"], + ["0x19c2e63c34aa7c15cb6e508e2fc89e69af2cdd2f", "200000000000000000000"], + ["0xd0529b53bae79ebf00e429dc74c897fc372f61de", "229091488201121000000"], + ["0x0b34f1e072214721d7e591beacdab1098466493a", "417689881439756000000"], + ["0xc1586c071516c2b7caf9ae65194449ae3c670c04", "90905195769238100000"], + ["0x00000000c9fdd743c60055c0e4ea30d266272c1f", "1"], + ["0x8bfff78edbfa534fe52dd87d945dac9a671957ae", "100000000000000000000"], + ["0xfd1b1773ecaaf48cb92a9d3a5c6166ff0e6e9235", "1307342619883500000000"], + ["0x1f834184b11a4adadc4e8c9b408168b95d50dd10", "669667826346396000000"], + ["0x806b96c4d283e0cd183683356e9cfeb800305633", "681429222068"], + ["0x17ba3a6f59d4287ddc5120f5df42611d9c76cf4c", "139569793263875000000"], + ["0xd1d513c5c0c200fcfc21dbcd24ea81437a821b0f", "157074062553990000000"], + ["0x7c98feef3918f066bc0440713610fd76891e21be", "222287551061291000000"], + ["0xd2a67a1b56d9e2a60548960359bf525a252c1780", "324946229415457000000"], + ["0x836c59b17f87e3eae5a3291a96d1c046f5b1a164", "228482825811409000000"], + ["0xee9cbd996f33efae4b53329c9f9efa500ca6e365", "5586513237370390000000"], + ["0xff3cee0891d5b50b7c6a6f148a9c922c37b94626", "370732065984049000000"], + ["0x4cfee29694aacf4648b30d7a4816234c0b88602c", "2014563796099600000000"], + ["0x1fa85889e388802cefd30b3104e8cc6f9a6eccd2", "137379587454754000000"], + ["0xc324720784121f19dfc31919d183576732492a3e", "21475416544448800000"], + ["0xccb3d8e0efb5f9688f8cff5505a34aba21fdc233", "1790048039830890000000"], + ["0xd8b6ffa4a11238b8642cc71e4909373822f59455", "179489492545719"], + ["0x87a5f68bf6af01519982f3846cc408d027dfe174", "89726182378685200000"], + ["0x1d4c9a9b253cdd3c24565b9ff354f6987af7b659", "260580249943669000000"], + ["0x88a0e3db6c1f9680e51b51187f8076c57b05557c", "19770926590966600000"], + ["0xad6b6793a66c99cccd368567ad16652be4603717", "314072386749083000000"], + ["0x33708692c5b03b031efd133f71e9c310ff2ad0b9", "2334534934471150000000"], + ["0xb12ebdb490249abd58e2ff15acfaab4431093cb9", "221135036297940000000"], + ["0xa2cefc3ea05baef04e1b360da7d5de70b8338fb0", "328983301023041000000"], + ["0x0d6f394a1ba9f80c7984a90784fd46c12adefb81", "154076931519419000000"], + ["0x1fca88225c0234588563dba78592dc926b2c3eb3", "479536769672852000000"], + ["0xea46a28e5e2bd27432437bb54e1796b102c6a47e", "127780587085051000000"], + ["0x20ccc519e34462a0744d1b064611e9982f6b6fe6", "694811687147730000000"], + ["0x7d1e9050f02044cbf200bc2b75d443d8e464a0d9", "652101903057593000000"], + ["0xaee415e3bd3931a9d8fd06f28c83546333d8338f", "484225917990249000000"], + ["0xa2498ab7bb955e5fc8464330b3035e2395837524", "4204161033022410000"], + ["0x46d0bcf7f8ef33d12948deb4f8583191a0103e60", "756975047006334000000"], + ["0x732737614ad17dc6ca2e43581f8271afb2e4a9fa", "300000000000000000000"], + ["0x2dda4f1e44ab1173d81099aa725a551093f7ecc6", "109047276235502000000"], + ["0xa5c7a7d03f6b6b2c3ba97054563f6e0a9e27eae0", "368608670562174000000"], + ["0x7e1acf51a5d14a7d4d7f3651e5e58f35e8f3da34", "478139850882328000000"], + ["0x78edb806eeb8480162d3cb3acc32fb0f11c308bf", "17512506734195100000"], + ["0x99412ff8554137bed8a0d248fce93869baecdb4e", "77869947276685900000"], + ["0x89a38dd6d08f3a87a31c292c51d0f18d2677c825", "1526059363592600000000"], + ["0xba41a3b71560ef120498f6f1b87ab273f6f737be", "109686431292512000000"], + ["0x3c3ab2b2cd6f088ee929872f8d9ae8fc39608ab1", "1304814735745160000000"], + ["0x641954c0ef957bb20068c061a4233e04fbe3db46", "320823758565125000000"], + ["0xb4db68d75fdb55ed204b086ff6205c70e446fbb3", "51920211817712100000"], + ["0x5c8b9c86c219a8ffd7bd6a82367b5560d8c29dd3", "603451187964688000000"], + ["0xce0f30a8633bf0a8b528c73535cdc79aee8220bd", "300000000000000000000"], + ["0x2e55c161ff59635777d5e6bd5324041b80ae8034", "144446363926939000000"], + ["0x1a5be5472c6c80b1b71d93f5eb550b6b1c3405ab", "577409761831429000000"], + ["0x992f8e145c5404e944aeb8f53660985daf9dc827", "851612337597302000000"], + ["0xf4a2c26e538e27ae54ad946907fcc0a68a7681cc", "72848778522314100000"], + ["0xfc795960c9f785a2cb599c1e0d949dc5c19f6258", "5000000000000000000000"], + ["0x14290920ddf69e07a3b8e5b6a40b51dc75a802c2", "6774352496511620000000"], + ["0xb79b013c49db009541c5eac78a0bca11038845a1", "58943151949331700000"], + ["0xbb4e989f6f57ef2bf6e307fe89aee29b7509b762", "135018377800875000000"], + ["0x78aee528cfc9bfc11f56798c56e1fd3fbfc26774", "30000000000000000000"], + ["0x2d62f7f7227e00769d3136882d1224bbce96714d", "420905158216139000000"], + ["0x7bd2e4d34e07749e33833046539b662d0258da93", "1834669335796700000000"], + ["0x3fcec81357e2cedd46941c867889ed0f66a0f6a7", "277000000000000000000"], + ["0xa6355adb4e10156bcde1c2d57684d42628d8fdda", "2121117612783520000000"], + ["0x1d39f439028bea81670c417eedadb56608a1c5bb", "87112378089021600"], + ["0xaddd614c47aa8788305a2bdff4c17f6407729b4e", "338311803679550000000"], + ["0xa8ce9d6c62ffa6e4cec0d215624f9a1419d78ed2", "20576680309858200000000"], + ["0xca99ed9d714494406a1a8c3f9cd0e218c095258b", "934749835824063"], + ["0x503c4ab4899be94dbe935f3c40bd63ba37ea59b4", "655102530777542000000"], + ["0x6e908eda91209f91df15e045f4eeb04276fda62c", "1921537909978890000000"], + ["0x0205b7d3566b036a8f1d0dd4ee726c22eee16bd1", "694000000000000000000"], + ["0xc67f26b0542853955c49577dea366b732697d692", "544306771638045000000"], + ["0x7a0b2faa1c8b54ccaa026c293d78e80a7c11424f", "261160000000000000000"], + ["0xf63a7079b193ee1437ff41ae40b7f705f59d5e34", "350000000000000000000"], + ["0x2c77374cd22630a86834e74149eca868e4b1a1b6", "337345366263284000000"], + ["0x7d6fbc9a46cc83d74fc6712f83e2e1b49ed934fb", "2538664425211220000000"], + ["0xaef76cd08844019385b3148799114bdc8cb75cb0", "868873707742623000000"], + ["0xd4e87705a4d3af0cd892333a70f70d0646967fc7", "216004840801922000000"], + ["0x1774fae209dc31011daa5e5e11ef7d8f016a8ad5", "50288368116636400000"], + ["0x3163bc6537b81a8e54d850081d700c14ae30510d", "329101648260830000000"], + ["0x812f1f434fae0346764687e6069e8176c8601991", "314737455878592000000"], + ["0x693419bb4fd60c53da83af223b347288b8a352df", "92590000000000000000"], + ["0x41e48af7bd19ebc2fe19fa0d8e0b721bedf10573", "146261415052489000000"], + ["0xaa62d6dc492e917ee9fa3ba971cbf82480b6c77e", "1102129260000000000000"], + ["0x3184533b4cdd8984468df86f147363cc575b8483", "69383773210777700000"], + ["0xd6b2095e913695dd10c071cc2f20247e921efb8e", "55561207448150500000"], + ["0x9d7db4635fcf4f8eeb93ba3fa1f6f149181efd21", "43212846784327000000"], + ["0xac8ab519cbcd8379f94aa8c8061c325369930e2b", "206588499640976000000"], + ["0x6df3b8c8d4981ec6deed2fdafafae95888f670c0", "2551458485355700000000"], + ["0xe3bdda386209ca1a1d615e917e1284b995a832a9", "206938770473822000000"], + ["0xfc0739f29e140f2f932bdb995fcee1edd0a2235b", "390799322036391000000"], + ["0x65f322c51b633341bd5d0ba377444602d12fee86", "23011817939164400000"], + ["0x5e7fed05ed07ac9ab6c9da0fe6f1ab0db399ffd1", "510944724353929000000"], + ["0xfdba76029046e9385569fb13cfd8e1f5aa0ea953", "275000000000000000000"], + ["0x56da79d3a5c205c6fc87ad269b702c59ff1c76af", "2115073730249760000000"], + ["0xfae2169ebe7d52bdaa4bc91c59a6f53f17a00d9d", "1000038298790760000000"], + ["0xbacaf4d8effc10fb3979914d4a93b9bbfd292061", "473159151428842000000"], + ["0x2e516e5b2919b866f88f62884a5262e034c48201", "1787702465610480000000"], + ["0x152254c00a481e75b392db07538a8a35aa83b971", "2443951306129950000000"], + ["0xed5957c426d46b979455cde5178352660232c4de", "533474085855288000000"], + ["0xc4784bb8ee943f408a876fac881ce4ef1100409a", "833494546887686000000"], + ["0x3f5165d28fa84a8ad165b2897f9a9a6eb1de5bf8", "845843535707396000000"], + ["0x82480356b5df6db351182e831e63476b640fe82d", "45022485646543500000"], + ["0x65e57eb1a37ccbe3409c1b7323912b0587fe659e", "566499251788985000000"], + ["0x0dc290114023af5614868a6ef0147be261a4baa7", "3171103323606310000000"], + ["0x2e811568b0fb4b6e9077c4cd2d57c34f554b835d", "138889000000000000000000"], + ["0xe38fd1c83bb7883adc4b5b910c6f6e8311da3b6f", "87763819929418000000000"], + ["0x5214a7293e165c1e1f36c14d0e16724ba13e14fe", "12780000000000000000000"], + ["0x9cdb1804156f362aa5900478e1465c917a5f6a3a", "27778000000000000000000"], + ["0x8b58f7c312406d7c6a5d01898f0c5aef31ee51a7", "6945000000000000000000"], + ["0x9455fd942ca87446fd914e07c403c785bdcde84e", "10417000000000000000000"], + ["0xa23cff7a4f319445e4584897941bf478b4931abc", "148013000000000000000000"], + ["0x0df3cea37ea6146657ef5f393cb51edc579bc552", "13889000000000000000000"], + ["0x2901131b2e1acfaf29b3363b72e523ab668511d5", "800000000000000000000"], + ["0x8c78b28b6bea4ffc557b32a643e576572067515d", "43174095391429700000"], + ["0x03df3eb492ab6e50ba15d6ca5daf6fa177519797", "200000000000000000000"], + ["0x5e6bb4c1e776d9c7f440e1c8b0edae547a3f6932", "24734532933450100000"], + ["0x90e0d37f59b4d3202880d2fb17f3e50b7056f762", "185290645910790000000"], + ["0x3f17cf5336d1a0efe6b2b447dfd3b1f23e26c6ca", "100000000000000000"], + ["0xc0d3a8d939d8653f0fd8fe7a0646dd3884293466", "1520000000000000000000"], + ["0x44ea6f4805b92b14951c109fed1ef55d6fa6d084", "200000000000000000000"], + ["0xc25e850f6cede52809014d4eecca402eb47bdc28", "3800000000000000000000"], + ["0x21e3545aa43f043df8aa2604275613dbf3dd52b4", "618033815288532000000"], + ["0x56b93a4717e47829520b5f0da10c5fee04b3ace2", "330000000000000000000"], + ["0x6bce1ea16205869fa7f28f12e217993304019e7e", "3418533977038290000000"], + ["0x563400e04295c1f28b4ac4872b91a0e52cb520a8", "5291691764177190000000"], + ["0x000000005804b22091aa9830e50459a15e7c9241", "1"], + ["0xf6da21e95d74767009accb145b96897ac3630bad", "8814072319312840000"], + ["0xc556aa79252afb2acb6701b7fb9bccf82777ae66", "733234458856153000"], + ["0x15bfea76e25159beaf0abd96ac734d46a752a233", "532049349924881000000"], + ["0xe78b5888142a873d075e2cdf5293402b117090a8", "937500000000000000000"], + ["0x003f7293e7282b4c8ca4a807f3f621a0659f1c09", "8750000000000000000000"], + ["0x9beda91892c5c7c9debd4f33d6170b71ff34b7e9", "1875000000000000000000"], + ["0x4ca1fac10635f822aea0d0cdfacb958ba029f56e", "3468000000000000000000"], + ["0x300da4b03cceacb0a19417f76d515ce3a126ea86", "72288314"], + ["0xcd5485a4875e4d5fdc8710cb5e55185d3da7f925", "118753640846081000000"], + ["0xac145add2e42e6bc5ce81dc35268420b0672c431", "100000000000000000000"], + ["0xf10aefcf3e275977e2fb00051893532cfa35c33b", "1758686588900130000000"], + ["0xaabf7f957d86bd546023f2511d2e69cd1224999f", "490000000000000000000"], + ["0x42c5d633ac3486115db8f5a23f7dbd4b0d259cc4", "323049046012283000000"], + ["0x8d81209f5619ef5f35878a8c459b8680a54ef057", "2786025707896540000000"], + ["0xb582bc62e53c9e08b37385c1afb5a9586537d985", "219029705608013000000"], + ["0x166a17b55733c9b66ee0ec2dd2c9ae0d7c88638a", "499084860949657000000"], + ["0xabcdfcefe14a8737dd366de6f485a2831564789b", "412313788645642000000"], + ["0x1a77abd08956b73ab2fd7d9a2c25fac53495bef5", "4985517586343510000000"], + ["0x382ffce2287252f930e1c8dc9328dac5bf282ba1", "29567815532379200000"], + ["0xfc67581e8c5f8be15459274e5cab03501adcef94", "1876799446201780000000"], + ["0xebf78b93e96aefe3c2c9bc8568513f8288436a4a", "1473041843793760000000"], + ["0x7a4c60bf1c98d690262f054543e6ad72530935fc", "256147884753950000000"], + ["0xa0cd7cab17c5fc68b86b19bbf4f8f46ff24dd6b3", "1010662304976730000000"], + ["0x324566f5fc41f93b40053cc1267a9b3503675b67", "12420446613153"], + ["0x38d73354ac5c5d6f8db3e36285f1a2f5784d1372", "1389000000000000000000"], + ["0x4217309cab4803fb455b0d6d33678dca3555cf01", "7215854441802870000000"], + ["0x1227b6bce1b40ea3d2edd33c5107454acb9d5fe2", "3495819462331660000000"], + ["0x8ee79cf84cc62b05b1febb22062b87f7418852a9", "620647369589939000000"], + ["0x41f1dcc467c912e9752b9905cb6cccade7f85f27", "132000000000000000000"], + ["0xd8f01abaa9afafbffc4039e79410dcd938cd64b1", "3086512501446840000000"], + ["0xd506b99e2c57beec32678ad7d5b838ae703ead57", "974488718650869000000"], + ["0x4995c93767eeb943a0707efc6a6b3bddbbe6622f", "1730557522021300000000"], + ["0x4c0f593c2f601b3aa10fc0cfbdb91f61fc5f3bba", "469344052710353000000"], + ["0x2b06ae2df3f81fe505a142f05af98525bf51a1b8", "1361757587221530000000"], + ["0xdcd134aec7a9bdd1a051d17b2e29454dcd375b56", "676518686183210000000"], + ["0x1bc09946b7c42a61617f64c2e1e0dc7ed9cf6167", "1805380913276210000000"], + ["0xcb821fddc56ee75d87bf64c7d43128f0e4618b5f", "2775901353725970"], + ["0x5b19d76e11dc68064777b12ff57a223dcd8f929f", "694000000000000000000"], + ["0x207659e7014a0823021c101d80b029c234588e84", "1126558661457620000000"], + ["0x330ae361002ec0cc7b68dbc5ec57073d52e8cfd1", "1334388103027260000000"], + ["0xd784ae16a4734d978f124579d759aeab454597a4", "430000000000000000000"], + ["0x30367d0323be56e9bf2c19231f9ada204a47ff7a", "723233955661074000000"], + ["0xd76be4ab3b5a12a604ca81cc34b8a83e9331156d", "1400000000000000000000"], + ["0x45477092f0d8cf6156b37905985e6f2d00e2ac83", "28787086909500500000"], + ["0x00e6bdc5caaf6236d08744beab010936ef7d6153", "256215898124313000000"], + ["0x56fefd61bb9b10d8555f970de09ae1359c931035", "3177464166276"], + ["0x5ef0e07037006deb64ed3dae93a3ec1126c7ecb8", "104504509019037000"], + ["0x898f75b220d5ae0cc483fee74abecbb3c0bea92b", "191003590281856000000"], + ["0xbdb925f7e474fc9aa6b1d9b7997401c05883fd24", "558427204267542000000"], + ["0x083e31eb571d4a2dac8faedd77fe9bf3359d4b1d", "414386686401687000000"], + ["0x0833a0ac904cc2883e7a07a5ba4c37b492599f2c", "575616378132243000000"], + ["0x0820ca934e4ead413f5181fed24a57382f37d915", "937500000000000000000"], + ["0x60f84a94673d3802588ebcaf494da34e1a636067", "10398439359684800000000"], + ["0xd5c534c0a39865bc0d11835659ea8440ede7d29e", "373950612324774000000"], + ["0x45c540ca6b7ba3179624b362a1726efdc5a7f5e9", "212754232457536000000"], + ["0x039dd827ddc52c0d8f0a8c7a8052dd6868963de2", "351050000000000000000"], + ["0x3436cf1ca9ad63c4ae9035f6260032ec2e7efd9b", "190341646839575000000"], + ["0x5ec1dab31f07762aefe439aee7e12f061c325b2a", "735793972104950000000"], + ["0x58a4b71db382a108171e2cc9b6dd490aa5514fb4", "5317342792423050000000"], + ["0x10367c5335f5a1567598fd4ac3838943e0b8774b", "949928852426400000000"], + ["0xe21d93aed5c47a9f5c17f3abe07100de250b9a4c", "258989279384550000000"], + ["0xa097c495bf481fbb1609177527a9efa5373131f5", "491929257822588000000"], + ["0x3308e8cc698c4903af3571c8147f0ce3874f0a0a", "627829903009862000000"], + ["0x6d760e87cc0a7d1421b686b8f0faad65416f15f7", "113210000000000000000"], + ["0xd9ea22f48d8ada55048e8495e04862eb5b7d11a1", "904884760303409000000"], + ["0x25eefb6d114645368e7129fb20ad17ca83924f0a", "4340000000000000000"], + ["0x94733331a3a5514c0b02a977aa8d1d4071988827", "4340000000000000000"], + ["0x2848af56c7d3277bbcd1fcaeea5b83ae467759bd", "4340000000000000000"], + ["0x121ee23cd51145c03be1e6ac0eb7471447da103c", "4340000000000000000"], + ["0xf737a4232135ddf22cb271a34b1af82917067116", "4340000000000000000"], + ["0x0630c749b8d1d4b62970e415c1ad691efda50d3e", "4340000000000000000"], + ["0x652101ea9b4e50964660bed75ec0da120691b9c5", "4340000000000000000"], + ["0x794184d4b97b1e072780d1d6f1972c4b3e0f32ca", "4340000000000000000"], + ["0x075234dcb3cf808c139be17b1103eca5a3f84aea", "4340000000000000000"], + ["0x5dd44f5067d0c3d8a4a68add4eb9a3dd0779947b", "4340000000000000000"], + ["0xa89c05932276acdfd1eca3dda6a7d350f77b34ef", "4340000000000000000"], + ["0xb65eeeaa9e6f8c8227c13718c23834f09aafa857", "4340000000000000000"], + ["0xff3ae71cdfe3a0e3e8b3f548859536bdd2a87eb5", "4340000000000000000"], + ["0x486dd6cf9a85d983c3ea9e16255d9b3a5220c0f8", "4340000000000000000"], + ["0xfc27a4d5ba1985ccd2363530097b91444b9936a1", "4340000000000000000"], + ["0xb60fcd4d2ac48985fcb2ea4d457595d48426a1c2", "4340000000000000000"], + ["0x7351c5848af4c683dfd6945699a77d566938dd91", "4340000000000000000"], + ["0x20268e4060521f49476ecdaddf19ab9945d731e7", "4340000000000000000"], + ["0x8b861c583f176a6755a0354278e6f1c1e14a3f13", "4340000000000000000"], + ["0x94d33ba21a27c96fc8748e76d4e5853bdc0aed69", "4340000000000000000"], + ["0xfdf8e4c6c7cad7d7ab71acce915d0607422452bd", "4340000000000000000"], + ["0x3a8f208eac2420bd7814900c7cb7d1424d26f53b", "4340000000000000000"], + ["0x062820dd79da169d7d26f319739b8d67e0b0b1d5", "4340000000000000000"], + ["0xa110e9c0e636fec57f941cc9b572ceda14f2948a", "4340000000000000000"], + ["0x5b61219a5a1a1669b7277261e7fa8a2e7a9d3727", "4340000000000000000"], + ["0x530617ae022c952fdbf8d46bde299b3383b10921", "4340000000000000000"], + ["0xf00a5c176de6de15fe3b4968f8a16485e874b73d", "4340000000000000000"], + ["0xeb220ca18bbc9b7df57e5f64dc006ff6b678cbc1", "4340000000000000000"], + ["0xd5ac1d9ed0f380a4248944e775b1b4d8e9a85ed4", "4340000000000000000"], + ["0xd7d59e74f960824336b1925c1bb2f2b6040a6b3c", "1040304353044940000000"], + ["0xa9967dda196305eeb3ffe475b5a9b016c55f0be8", "3900000000000000000"], + ["0x01adb4f8299dffb1d81bf5c5c597ca3a82455d45", "4340000000000000000"], + ["0xc70628f0931abeeb9864b5a632439f30118e384c", "7377901536983610000000"], + ["0x45cec176179747402c2868605eb65ac2a1913e14", "4340000000000000000"], + ["0xda1e161ad96dc191a7a6011ab39e15506b22f332", "4340000000000000000"], + ["0xaea4a3c2cfb75059f63390e801d1e6200c51fba2", "4340000000000000000"], + ["0x5a799288c1571c2c9fe756d6baca1ab323877ad7", "4340000000000000000"], + ["0x0d24c2bc717732b0006c076d0dda4ee724c749c9", "4340000000000000000"], + ["0xc780077a65f33d9d88b59bbf421d4d89b1fc12a0", "4340000000000000000"], + ["0x665f3f318fa753a22452251bc8123e907e2cb95b", "4340000000000000000"], + ["0x795dc1e52d5409d2b39612435617c52c5cc80905", "4340000000000000000"], + ["0x614c837b1bf1c60c6484da77eeba9a3b8ca49c08", "4340000000000000000"], + ["0xd63eae19084c4fe9fb0c4f15c6712558ca20ade3", "4340000000000000000"], + ["0x6871287bd87405c936d36c95554fa81bee7a4edc", "4340000000000000000"], + ["0xee18f898727016f82fe1a6f91e3b9dd0bc2a2fe3", "4340000000000000000"], + ["0x35510f09df280c26452911d8b8ccaf36154ea529", "4340000000000000000"], + ["0x173f23fae21ec04b28ba944c798cd947597347c7", "4340000000000000000"], + ["0x2bcea9e4ed4e5ddfd65f4dd15b5f1bab406c9b71", "4340000000000000000"], + ["0x8baf2d1b82fb4039e6cf1e205daf0aed9b060616", "4340000000000000000"], + ["0xb40ee46d5f2a2312af3ba9aeb4be770ae7055219", "4340000000000000000"], + ["0x5f3c788ebbd4b45d1340a803b9fc736f6d6aaf9c", "4340000000000000000"], + ["0x5e2f9711b11a87c8b938dbd2a199d38d9be5b067", "4340000000000000000"], + ["0xf2e466ab2661a2d16ee80a94e804c4090a666e86", "4340000000000000000"], + ["0x862e250f2f88e5513a1fdae4fd9455193a470aa6", "4340000000000000000"], + ["0x0cfd83dd7e512b332da95b48fe11f572890282f5", "4340000000000000000"], + ["0xde7f739efec6c96aa041670bd656b86ca08f8785", "4340000000000000000"], + ["0xb657043d58048e2338788483eaf6f4d1c8b02c2c", "4340000000000000000"], + ["0x09d1687c93ecf81cdae0c85d5a98f9645df67e30", "4340000000000000000"], + ["0xe66edf95e1c24dcae334541f0ec9df5adeb54096", "4340000000000000000"], + ["0xa92704f53f5e1b6c2ce559a885cd3c1eeec918fd", "4340000000000000000"], + ["0x57e627425c631815bb0d5d2edc05e6259fd535c3", "4340000000000000000"], + ["0xa38e787ec7184ff316b1efe2722bbcef6de09b35", "4340000000000000000"], + ["0x139cb882a255c0ae0dcbd3890221a9c07500c24a", "4340000000000000000"], + ["0xe89d2384f2df1fa771081a61c430ec67876c74cd", "4340000000000000000"], + ["0x7161f402ffdae5c4d63a750139ad714a3233ca9a", "2767565416964680000000"], + ["0x62e15cf071d3833e12e7b5c97110a4610a2e1d37", "4340000000000000000"], + ["0xddb956235a4f84365d69bb9d563bd6ee34552bc7", "4340000000000000000"], + ["0xf4be466db056e73991407ede81af9a02de0aa7d9", "4340000000000000000"], + ["0xe6d70d56193215d35f324a930c8ba2f24b466588", "4340000000000000000"], + ["0xf735c24cd1e0f05c8f367385b8c624784e97dcae", "4340000000000000000"], + ["0x2299e24d282a4aa40cbe927234bed1f2c1bdd884", "4340000000000000000"], + ["0xd5810d8aa0ae56ae180b38c0818d0f3ca1c16774", "4340000000000000000"], + ["0x912dd31f6a07ece098df4350682c2090a19b2fcf", "5005197715564270000000"], + ["0x58e777e71cd05138b1216e26cf50a02546655ddb", "1615818016784370000000"], + ["0xd37fb986c6436db1fb303c6261363338a1b8c1b5", "4340000000000000000"], + ["0xc59de18ecd31f5e9c5a12c69ab8b175e28c96d04", "71698259887426"], + ["0x874d021ca047a114b9833290490a6f16a68f7a72", "90149689349924600000"], + ["0xa407c2237fce82bf9f1f121df70d787af329a74e", "404738460570753000"], + ["0x9b0fc8c04a0c872477c278ffdb6e9a0b3b4d7849", "931130006247539000000"], + ["0xcba9e488850be09d9cd0d60556c2848d5ec3457b", "355808914430748000000"], + ["0xbdf2c86f988f4b1b367e4b2e7dc8da5f99f2593a", "1635054754366480000000"], + ["0x48926666d0a6e3919507c1828b5b30229bfeafc6", "722636583470958000000"], + ["0x95d8d95e92b9478aff767adbf188b3f7a9a59e81", "237016502514654000000"], + ["0xa1ecb46c0be223dff23efda8bd553d17b938af47", "10000000000000000000000"], + ["0x5088439f51728d47b603ef557cdf739e17a28922", "1638657464800470000000"], + ["0x4df86dcd6f836e8974a49d14fd7f4cabba78c012", "140000000000000000000"], + ["0xd52d09b041a9ed634053300e6484aff73290626f", "562000000000000000000"], + ["0x543ca251cd58c577de8b8b7ccaf3b3f8a89ffc46", "242591295606934000000"], + ["0xf11149d79bf2601166b9fc295d04203d268b507c", "200000000000000000000"], + ["0xd9369e74ffae45412fd2c75cb055fdd7876fb2b7", "109537924811488000000"], + ["0x792d61e0788cae8dc3e7a97196bcb805a0550306", "463372670019537000000"], + ["0x8db168da90a531dee5149d0f9c6d20862cee1737", "216097376938317000000"], + ["0x95d7e264eaa821c313134dd72ca678dfeaa4067e", "145053988332204000000"], + ["0x7a4ba3489ca5b28f33800e1f95780686495c99cd", "937500000000000000000"], + ["0xcbae1c624daac0002cfaed5c40e9c6ac755d9c05", "115874443402908000000"], + ["0x76a746079946279aaf1c7fd9a94ca7fd48c555b7", "1344546230896940000000"], + ["0xb2fc53f237cf2d72a8b7a6589bb72b9711552c90", "5672055987967040000000"], + ["0xab8410bb53ce7e27bd45b86ec7b3688159c512ec", "3659924425017770000000"], + ["0x78101af8fe6f833ac524852def611ab369adfa73", "2255091423293210000000"], + ["0x2b7933f62e7bc307ef1f33d8b82dde6ed57aa273", "282028002840240000000"], + ["0xc4c0ed8bab66f995bd6a98e8b1261534ebcb5867", "835425242156111000000"], + ["0x58a19d5dadd2f465ba16e1358a9cd113ef279cef", "3768466493420770000000"], + ["0x3ee20f990c3bb65ac6a3adb57b4ff66f592dc2a4", "1680143736743290000000"], + ["0x45106970960b93267fcdbcd7c6a743b499b83241", "500760943973391000000"], + ["0xe8489f4013f7136b78fb773562ba8418377869ac", "38916095890398400"], + ["0x7a274bdbdae4af10406502bf742f8cfb77069a06", "155526643912035000000"], + ["0x2d6f91803e8d713ea47d03a74ebdcaca2b7d92b9", "344833500847627000000"], + ["0x8006a2b383f107039fa8b5e898c3309add480a60", "496113625526912000"], + ["0x961dfb44c895a2b94f96c1d1513e7bcd75a5e454", "1620018947160510000000"], + ["0xca76c23278495e3a0bc534b074f0accc98b6a759", "906179962761224000000"], + ["0xa09c039ff0d13880ada68ffc7a0d79267420a983", "585703674274519000000"], + ["0x54520d193057ccb8f6ba6980bf95dcf7d48c816e", "280520679233789000000"], + ["0x275863f0e0e99d1cf85d8bd2bcfdc3ae05722881", "561380576182149000000"], + ["0x8cd332bb8f734e0db6d5ccc4b9486b4e40de4322", "331730527038720000000"], + ["0x6938b98336121bde01dd82136d9e820b7da9003a", "3764000000000000000"], + ["0xe3e16960d48b6073fef0fcb2dc7ed5782ee013d8", "2858588681478"], + ["0x006cbf936f193ce6359256c6a5380f8f49d5066a", "1207469639537060000000"], + ["0xf05b881e060a0eeed476945e7aa475b5f195f488", "2084032713839480000000"], + ["0xba3fbc2885144e9a352cca0fa5f39f9753e23323", "406518347651161000000"], + ["0x36bc8c1e846556b8f29191f5d68941d37e62754c", "958095974017930000000"], + ["0x037a936c8af287798f6563df168a2d371bbfe635", "842492046858895000000"], + ["0xbc94a1fc41c82c65ae6f48e93856840d2530344d", "99185929240286200000"], + ["0xb0ed71a81cc64a0e81a900b74bd8814141a62cfa", "2575333885995980000000"], + ["0x2f14f93c092983cf96e17f5e8a4719ddae4c82dc", "815855252706105000000"], + ["0x4f2cb8a64665abae49b9ac7e9962230d29aefe3c", "1111850000000000000000"], + ["0x2285b2ef91844e8443ceec8aa8a32524b5a65389", "1151558818489500000000"], + ["0xa50d73d6b1ebb47b633a093884b72331f1df2903", "2674965715555200000000"], + ["0xca64187550c803e8c998e522dfa4e04172efc5fd", "500000000000000000000"], + ["0xd57e5adb72156cfba34d6e2f62edf2b6a11eb55e", "233125341036132000000"], + ["0xcf47f2443708c5bc515db19b5c433359cde25cfe", "543347385389389000000"], + ["0x7a170000240e38137e5f34f429af03b2b71c98f7", "699247924845206000000"], + ["0xc46828ae2e8229efb80ea6c832dd598d26d7d968", "2127685763641490000000"], + ["0xec992491159d31e3764f5e8be3fd3fdf6b805fd1", "414984065042034000000"], + ["0x11ef3c94c6ff96615116a2b9423405bd0715b3ff", "10661641265913600000"], + ["0x7b2af7a96ae32d71eec4d58708c046c588136683", "2343997312042910000000"], + ["0x5a68fa86f34e3c4a9f49dcaa6b5c4da816aba829", "3037450923326350000000"], + ["0xa0be587b81f5f829f70c3329b3ca3868871a9024", "69647444574495"], + ["0x3c57a865faac92f76c5f0808d6ebdd6c720c8b6a", "530897700229213000000"], + ["0xbf9d36e48125a856e5ebf4eaba8e314cace90663", "3031539987886200000000"], + ["0x492059918a8d8c9435768b56ec848062e6a27bc9", "9537136270795530000000"], + ["0x8e044b15ea6bd5b4d6b1aa7196eec81bcb33dfd8", "8377145577293200000000"], + ["0xd70a9dcd0753dd7ad9cc49d434b91659a6165512", "4556461300000000000000"], + ["0x2966e925cc8c2e0c4b39adbf22194265c0584858", "8177145577293200000000"], + ["0xbaed499414cc63472d770c0b329b6720f271cece", "11396803441975400000000"], + ["0xc65c48fb1f2ac66b106e7bfbf703e57536808c63", "34171428571429"], + ["0xc0b374f27abccd5f34e30ba437adf10f084a66c4", "15111381738342800000000"], + ["0x33e7a6c9800998c5e66b67bdf6113b7562112d45", "4615384615385"], + ["0x49e28333b9ea6b584cbb92314162b2f955380c7b", "257836737056732000000"], + ["0x3c495a69ff82e36a6479f4af470f6389676d0b9f", "16540421233117700000000"], + ["0x47064935e90c060ffdad7a748c37e62c4f03b8cc", "1454151657592740000000"], + ["0x4fcec7642200dabaab8c303c6d4efac4decc8859", "1083968533423240000000"], + ["0xcd91b9b8e1ca71e0a5c9ecc6bda33f8d26a532a1", "121392144453186000000"], + ["0xd6aabdb37616ec782844d4005207a7aab43a08ee", "925204571000000000000"], + ["0x2211a920dcc05a44131dc0933bfa921d9280c7e7", "584028705005035000000"], + ["0x092ba7ce6e49f71877c39e9c65fa9edb84373c3d", "532233361252038000000"], + ["0x18017c2790b6e24e6de3109e87b8077504ce83e1", "2000000000000000000000"], + ["0x8a20ecc5dcf7cfdcadd9969c66366ec958317fb5", "10277044265630700000000"], + ["0xf39b74d3f90a032d0ea671868783be073fd51161", "1083335431749650000000"], + ["0x71d3336f95ec829a4e6f96b6bc3f9da14cc03b22", "114868705287054000000"], + ["0x42b86a1f912d8aa0174cd46f63ebbc846421a500", "695525298897898000000"], + ["0xca15c29018ac0e5ec0ea9970fa4543b8d4921c6d", "288652503214448000000"], + ["0xf8608049ea0ba52622c3e96924bff2144aaa38df", "158000000000000000000"], + ["0xbaa40eb03893a081c2b1a56427b8ecf9e29dc2f7", "270778000000000000000"], + ["0x22c1f58b36969daae6df38d67b43ad694bba5147", "1237660698565630000000"], + ["0x88434368aa860a58879e7afa4fe19801fe833eb9", "730417887509562000000"], + ["0xf2d7eebea898f42b4bd4ba37e91a263b238cce78", "3809466322199240000"], + ["0xf7e61d497fad7f63e00555f3217f82a1249a20ae", "858168809386"], + ["0x080f23321f1b0b9ec1653ab5730c627d455cc04d", "1000000000000000000"], + ["0x0c2283e4a76eccb11784ad4e7dd049bd31c6753c", "152890674788423000000"], + ["0xd12defb3279003a6656023135edc975ed4d918b4", "10000000000000000000"], + ["0x74f3c1948df41f8102f92d9d8776cea7fd1c511f", "200564453810177000000"], + ["0xf3f6a7b59414338f072e2aa3beaa76ab6991b8d9", "2016794033641980000000"], + ["0xac9ea7537e24c736918c33ce30e16d57e3efebed", "3005237472695260000000"], + ["0x15a0e86ec1a099dfe20a2d9e2e9deebc9a90986f", "1070900520669770000000"], + ["0xc76245b8209aebb92399525fd75d8d72531f1648", "285238660941789000000"], + ["0xee848eaed71719b93482a4f998aa78cff8b132cd", "690000000000000000000"], + ["0xce18b30c8e4d287f5ec429f053b8274cfd2aabb4", "650000000000000000000"], + ["0x9ab4d84f9882b1ef8e33259ea8010fb62a895139", "631196021676868000000"], + ["0x16e16af66e019c4eb514db27d6033de083e7dbc9", "612303133908251000000"], + ["0x9b5fb7a2c9b82b834dfa027d5b5f9600a5d70418", "256483592429561000000"], + ["0x098fb583a27052ad8533d8dc0767f648f464db13", "3000000000000000000000"], + ["0x0427b2d09abb942c3b30e7063a19588d777a28d4", "610000000000000000000"], + ["0x5abb2333de084ab4eb31f48341b1ef8d115a329b", "2200000000000000000000"], + ["0x13e42ee586d7277b3ffe0ac42d1bf1ecb3632b34", "2207536899525300000000"], + ["0x6ff58125397af2f78127178d8e9d0514e9529086", "1722774441911930000000"], + ["0x41a9406d3443cdcc105c95b6e4efb4a7e7b3c188", "21926406309175000000"], + ["0xd7eb0bdbec9f3ef66472e0933310a212781977ec", "1035409060042480000000"], + ["0x6f92c928d005729656791f78637dfabb19c4fe49", "371676920574226000"], + ["0x2d8e09501fe9a3116dbc76613bc10c8942612bdb", "47296908977060300000"], + ["0x7b5928b2894ad3ce37af7cf1f842b81ab8932ea9", "310000000000000000000"], + ["0xd4ada92d41687b960856cd16755f4dbd4a82d70f", "4244179501421040000000"], + ["0xd3841da932756b1f76608f790dd91d06ae30fc11", "608716716101894000000"], + ["0xeb090b315b21b4e46f9e789c314da9c2fb974e23", "2787811622661260000000"], + ["0x6e6f1bdf898eebc6a95c9a82350f609327d8eb9c", "1500043831677760000000"], + ["0x3aef750ad04585a023321d507c83c903fa121529", "875499888531247000000"], + ["0xf8cf675d7b41c7e039ed0602325099443ed701f6", "989313486418848000000"], + ["0xd46808f9c39b9bfea1cd817f2e8c2ecb3184a5bd", "16704193733770300000000"], + ["0x0d889d4f642ec877407fc0d32b8620b92981738e", "2010981670938750000000"], + ["0xafbd8a1ac79c5ef7ad396a06c8f3ed7fea4c5dd6", "148909295714653000000"], + ["0xf7e11cf5a04c3cf0061928d8c0b417464e08eff7", "103360081247467000000"], + ["0xfd7e37b3e50759e8cd304663986d70c17632dff6", "412872203815163000000"], + ["0x705bccde47c509bbe5c5722859a33bfc879f4281", "500000000000000000000"], + ["0xa663590cb3071c5161d243a72caf16feda584993", "135580691549657000000"], + ["0xd57ad2f27702eebd5094669c5616f66f4b2d7215", "249924050870128000000"], + ["0x4f2e9989fd3f035796c08a8f8b386fb658ffc096", "512425012946129000000"], + ["0xb75f87261a1fac3a86f8a48d55597a622ba3cc48", "6281644921309040000000"], + ["0x7d2e02a9faef2a4a1b5dfe83a530d3571979d240", "956574409853276000000"], + ["0xad615f88d4483b80dd415a0cf533c027d6ecde01", "2000000000000000000"], + ["0xee4136764f71345acb0b83ade6dd58f1044b00e3", "1261991536549500000000"], + ["0x479b80a249614752fd5a15e132669e47c49d75c3", "347486777593907000000"], + ["0xe223b9adc2fc7a1ebb09ad1298ebc408c4c51e99", "517885843945757000000"], + ["0x0f8030f8766ec4ae52e8c9f018cb157507187f54", "61787073680000000000"], + ["0x52567a674bc0060120508e9b1026b712ac475132", "596189218924478000000"], + ["0xa42ee67222e8756b1fa987aa359ed2f59932283e", "100000000000000000000"], + ["0xf3c9b446d6dc3e435fd10571d6da12184648f3df", "500000000000000000000"], + ["0x23c51a184ad7e7095e40b5b394d6566ec9f01eb5", "374269678283101000000"], + ["0x8a2b108bee6fd05af78828682fa4dbb6aca4bf3b", "138631867704001000000"], + ["0x670b60b8d9f47ad4b325a69527c4f876e7b498e1", "730688079076047000000"], + ["0x6f9ca333b957bc02217ea9ecfa5ba674c09c7431", "1353722971993560000000"], + ["0x328ba899bc165dc0b2e1f78999b6ac499a48e2b4", "124882302582588000000"], + ["0xd287ce3a79eab4574e7d7dcea80dcf74374e461d", "6115813068296000000000"], + ["0x273ce084c4a7631d2495883e75cced66e02537b7", "225000000000000000000"], + ["0xd89869a28d7da90d1c8416d172ab6566f7e4d5dc", "2060855036950010000000"], + ["0x8414a2afc2944c0c2c9669f32f622fd237d807ab", "186143815206424000000"], + ["0x1f56b9d1b9e1745f69510ac87a5f7686bc014876", "2602025242531720000000"], + ["0xbc5fdc52eae854bb43b6ad24d95bbbcba3af38f4", "267841990604512000000"], + ["0xd5e77669d038afd6ce06fb032ec756220b39dab4", "101990794146300000000"], + ["0x981b175c75ff25016b987d96ec15a13ab1237e96", "1466432639312800000000"], + ["0x51b9704c7f271a557e74778725f1cb83135497fc", "320404785922762000000"], + ["0x5a32ff1ffc4b4587b6d9e587be787b10ebef17ef", "129098672684186000000"], + ["0x8f22dfbc78545c5c96c21187773dd70e7a95b2d6", "256957695329389000000"], + ["0x0c60ec8c9f4aecc22c838a5c35137465660cea55", "2507112351412210000000"], + ["0xe290050f9556f76c7371cc3fd0b09eb34a869d7f", "141000000000000000000"], + ["0x6b6c4a2a94c78d42c767bbc378ffcac3c530c8f4", "33725438917803"], + ["0x00ec52d4bbdaa3d6dc6d06064fd48bc6793d5071", "34756927885056700000"], + ["0xd7469590c1a809c859caa77598d87b8dd0144391", "419366818874734000000"], + ["0x4d82322f62a0186dcfd16051b42e8ba019e6daea", "1010064234139920000000"], + ["0x3122123d411f4d8feb72c96480c07dc62c5d2c51", "235144680525889000000"], + ["0x44c6c0bdf106c2248174577c5342dc785a981bf3", "2921637359826040000000"], + ["0xc2c2220cdb0b5b72f60cf0beefaeb559b64938c4", "260000000000000000000"], + ["0x3b1d75ad5170136f41ba923139ff6f45932ba546", "8333409545804880000000"], + ["0xe61d358a5dc43f3cb96c84ea21ae9ab45a57a8af", "14667585714285700000000"], + ["0x3dad8cf200799f82fd8eb68f608220d8f3ebf8de", "243329348439012000"], + ["0xdf607813e808063dcd68d4c12cb39a964d21d329", "155000000000000000000"], + ["0x066369d37121ad4b0565ae86af6afc7f92cda522", "2675000000000000000000"], + ["0xb99f63fda30bd3afbc73c0c4afeb728b3a451ea3", "2882901699195210000000"], + ["0xc4d9019fcc3b2ce94c6c3a8cec495e904bd81576", "991915969419231000000"], + ["0xa0a822070b4df32e1e68232200a11e7f564d10b6", "321649581543086000000"], + ["0xae5752aa09e3402cf2bada1f0997cb5f6aa0a122", "458611368567650000000"], + ["0xcb1703717e125d4db28f6e95afec2d8d3c2d9ff2", "1004053652920720000000"], + ["0x1543a0b0a7000426afd8caed7dfed9ce5477d418", "1132527311373540000000"], + ["0xecf6692c7952cdcb34b52b2ce5f0008d2714ef7a", "362648091172871000000"], + ["0x8e677d99c9c679af13820748efbafc3c42e31f2e", "705335637181982000000"], + ["0x0a81f577d8a4776bb7389ff0ae9be97a96c280c2", "35407518965599700000"], + ["0x07c83d42c835ac1b56a02fec4788a456116e5453", "5429000000000000000000"], + ["0xf9f2cf0bfbe63b89f141244a6522f5d9dfe4039d", "169740000000000000000"], + ["0x5053a1354cb45eebdd2d8342ceee71d41efa75ca", "926734345426053000000"], + ["0x903217c7d31d6a36106f76df578e4b0366318cc4", "610000000000000000000"], + ["0x032578c5c63820f91024523df6e0ebc13edcbca2", "1000000000000000000000"], + ["0x8671d45621c481cfd397f2655b9764932d20bb8d", "599815086223156000000"], + ["0xb10d1e24ea7b92fc7eb305813c5197b373c364fd", "247426689113993000000"], + ["0xc30c8930a8fa7a5ecbb8df9d3a19febfbbcd897e", "893631080832192000000"], + ["0x5b7a7db5d98a212979837a563c24c067b0f81012", "474247694336498000"], + ["0x3092c89b545e38b47d36ff7bd298ebae735ed637", "2439435983602950000000"], + ["0xeea4ed6121ec6115fae1211623d2d6e316a1975b", "500000000000000000000"], + ["0x7f2ab459a66e3d043a2f1380e0056f2734b714b4", "1818116002657630000000"], + ["0xe4ad4e411c64e94e327d66d1a6515c4988186451", "1407315975288430000000"], + ["0x21e05694383dd7582c0e5bae41f780fb46a4d09c", "10458617394965100000000"], + ["0xd8d333750d5c9567b1b080759439dcc8e7546a5f", "252818592984060000000"], + ["0x6c388f50a0b0edfc6da6d58d75d19d70a2fece44", "99000000003667600000"], + ["0x6c1485ca7219d57874daa56a8924a348ae3891f0", "569589116951370000000"], + ["0xaf145fc3d9b1bd97802763b65efe3ad7294b9bdb", "208885009034665000000"], + ["0x3c2e4b3040d1aab686d34fe5f111530a21f8be74", "791259959768552000000"], + ["0xe00fa26712d743ec5f89af454f0424b17470fa2a", "87926921798993"], + ["0xc13cce21ab71432ffefa56758794586615a38d17", "685669903598702000000"], + ["0x2c7a998197b51dd7f1981aa9e75a23b059f5a59c", "80000000000000000000"], + ["0x9943cc678fbecb68304f8d93ba03f3e3d7a48ea9", "489692550501984000000"], + ["0xce7631d978c4cdb1184435bb6581a5b76aa10ce6", "157194200769328000000"], + ["0x1dd597aaa91f66ee90de7cbed5494bc921877cc6", "545412462482371000000"], + ["0x7901792223f235d68d8c02b56d0067476e26c092", "271940215421520000000"], + ["0x6362b26e3d0adfee14a917535632343a8349c46e", "190000000000000000000"], + ["0xc7e070b317588e04ad189144668da4e7160f0b2a", "2085644568505720000000"], + ["0xfa38df65face3ffba188f0bd2814c2266c3c23d5", "1516198650000000000000"], + ["0x2748cbe2f1440b3557f20eef103b59098c29582f", "1014012108707110000000"], + ["0xfee724806ef43fe223fc77bf92554b1d8caf772d", "5000926885675500000000"], + ["0x5ddcd7c84f101d7aabb2bfa73184316394bd662c", "1900000000000000000000"], + ["0xb753087bc71d5ca6f7336567b4dcb9d8577f806e", "635837733953007000000"], + ["0x60a6853b39d3b37e1436c1e281e28cd91f09fcd6", "394400786398107000000"], + ["0xad25daf8b180d846c78fe7b4aabd83f881d6b733", "25751755387029800000000"], + ["0xbd11206f52ebc48db4252f72ea2508c2b1aee495", "116933996233976000000"], + ["0x5e0ff987fd553b8c814fddeb201ebed1a73e9751", "148000000000000000000"], + ["0x14fe1322209eaccafe3f7545195bd163359cdf0d", "4989099173140690000000"], + ["0xa58d8b96e665e54a9b45df09b42f17ead20f361d", "403911615332784000000"], + ["0x904741012d539bef640ce16a8364d1c3c2c773a5", "91124171095975200000"], + ["0x518199a207a142ee06610e3baff187de184d6dd6", "182514657067174000000"], + ["0x990fe30cabb0567512609caacd882e5c2998b224", "325015371970344000000"], + ["0x357b04177c70faab80d567154666f36f91356906", "131076875594472000000"], + ["0x8598770dd49c6c867d2019336ce66c04278c9a8a", "2990000000000000000000"], + ["0x60ef9085391291e674802975fdf53cccccf8b70f", "3045742244295910000000"], + ["0xe121443d78019ab37cda3d3e868fd2c487ec2a42", "1433762889232120000000"], + ["0xc3dc996ae0db7d9217c63fcd28dd44883c0f2b70", "60250000000000000000"], + ["0x0b43ff85c3cc38e1f08ae6235bdc6e4d645dcf29", "781734481041157000000"], + ["0x1a48f70a2ef3be51a941ff475594bd1c4cf34e24", "411537969448997000000"], + ["0xd0f6cb50266f433db5e5b1f079c804011185b4d3", "563948136076350000000"], + ["0xba516997513bf9046d7fa4cc1442144d4fcc3bdf", "745912428504999000000"], + ["0x9acd3e502dc33ddf6675b40783ff05d89b1e2f25", "1185939955869510000000"], + ["0x5463fc9c971189816d71891315dc7c60782b28bf", "1175496135256380000000"], + ["0xa4fc358455febe425536fd1878be67ffdbdec59a", "3380463910651750000000000"], + ["0x4c3e5d6c762c3ff116b07cfb5f488b43ef4e4d45", "1485420000000000000000"], + ["0xaa7cde714d11d663de2a560aaa956c7046b4352f", "65000000000000000000"], + ["0x3b565678521787151a5a66d1f51d73b6b7a0643c", "2945288072849100000"], + ["0xfea76ea25c285587ce75c86d46558606cc382f35", "771320030935006000000"], + ["0x0980e08622091456d60a6d0b04c45521f719add3", "300000000000000000000"], + ["0x032c1a94b8039773aa839e38d4d76e0e991dd7bf", "4353888826739120000000"], + ["0x63c33d37e0523f1a99e6c7abd211a72ad4e58f85", "613998737817284000000"], + ["0xd2ac7e9d8ad98e9c5e57b935d6bdd2e7ecc9e1c1", "573139988861809000000"], + ["0xe4aeddfc1adb70c0c639592c9c423b27a38f2ab7", "1509210000000000000000"], + ["0xfc7a28b3332801a8e5405e65b3be67c8680742e8", "817100674030790000000"], + ["0xa0798fdd595c12b5de930687d5857e9e277b22e0", "417000000000000000000"], + ["0x0975c2e82af9eb16c68f682fe50e864ae557de72", "20095623687221000000000"], + ["0xfb27c8582976f1a29d58e89bcc89da1e54d78076", "30875885320879"], + ["0x8552af06727a69240a6ff9764d84a1fd9f240ec8", "709138022237509000000"], + ["0xc1141fe5f58929529a1a3057c80b54d6b03a4d29", "120902280349565000000"], + ["0xdd37d8a39bc7efd33e7e20826c5edb518370d8c7", "90000000000000000000"], + ["0x2c88a02bdf1294a4b222803cade35d241dde0c36", "23461703597463300000"], + ["0x94d2f2c38b5a198df362dae026c72d3cf27725dd", "4478763757053580000000"], + ["0x000000005736775feb0c8568e7dee77222a26880", "4"], + ["0x11db895a439d0dd024270a32b1113979f72a3b26", "1694209816895560000000"], + ["0xb90a8bd55502aaa916d5a3f40800b49ea05e51ee", "209152613674543000000"], + ["0xbe2ef7d04af3e9851099a5d4c27ab42389e0425d", "865080864253438000000"], + ["0xe4c3ae3235e0a8f267e27d27fc56e46bfdd62525", "385619939812616000000"], + ["0x2f34a5e4016bd0efb1150e3e77a0842b20a85b90", "525140000000000000000"], + ["0x3d96b71e0c13f1ffcfa4bace75b92715370d2f5e", "178859899294044000000"], + ["0x481dec5c5f7a9bb4cfebf2ceceaf9fb9e99aab92", "300080105727118000000"], + ["0xfed72822d95672779df44f81c05441e6c3bd06d9", "41373855"], + ["0xb7a0738523de5e8c2f40e5ea1009c68c25004aa7", "578171535906325000000"], + ["0x6e3e80d88fd4e3417831b8686db83fc36dbe5fee", "602976340000000000"], + ["0x9170f03f451896ce80e7678a4c95ff845d3b431a", "132892927768844000000"], + ["0xba1d6621e6934d2a55054d97dc850d22c71bb176", "5000000000000000000"], + ["0xbc82f9d8b083a763240891b1ee026f35848e09ce", "85121752812386"], + ["0x2c9ef3aee79a6ce5041b37f4564ef7e88d1ce2c6", "577305415289568000000"], + ["0x2db78ad46c3684fec3058af917228c5b6e4a2a61", "1066380000000000000000"], + ["0x8cc5046ad0ebaadd59d81913ee8aa5cd0a93ee99", "488908182383"], + ["0xea76d930de7a153c97d0c98e1fcd02a69a5a4659", "30000000000000000000"], + ["0xc8f59d3b127436cf6fc24170e42106518b6ea085", "1315415450078370000"], + ["0x3197d9458abf3a1c66cedbbd285624d40b9f156d", "10000000000000000000"], + ["0xf02a62c2f98b0d2dadc1a234f0d1b2b2937a5f62", "44689134110710"], + ["0xc0f420c1b0a7abe2f629d5d403007840470959b3", "53582135738637600000"], + ["0x46138b3b33f8a716d68f39c57c98b56ac0a8f85f", "4015334429155680000"], + ["0xf23a9799fe0011acb4326306a539b88644ac19a2", "6763656833283560000"], + ["0x31124bb5d59369d2fcceedecda1340d5d065a7a3", "762557069891"], + ["0xc06fdb17e63c3f58e959b4cdbd0d0ce49a4fe5e2", "163081469345367000000"], + ["0xa2e623425160fb596b58a95485a2505baaeaf9a8", "100000000000000000000"], + ["0x4f8716018ccb54ac64b68cd1d5f205d6e9818ac1", "140080000000000000000"], + ["0xf3b08a2e2747a0638ad91e163be3a251f26b6c38", "4314967617157320000000"], + ["0xec578146b22d7ef5f6e5c69fdde00bdaa5f0b33b", "26459117023519500000000"], + ["0x565f8f7be1abb8667d0c3d4507e16c3744cb3f90", "194741"], + ["0xa79cd80e47ceafcbf8583405a04dcaa8f1823396", "150000000000000000000"], + ["0xcbe61630f59baae65f49f08e59fee3b7352515e6", "219509012604313000000"], + ["0x8d040102f998508a65c2e6f44ef035eafad2bfc5", "919122327557454000000"], + ["0xd9efea29ea8cb6cb23dfabb088531d749fcb502d", "129000000000000000000"], + ["0xbf2293d6467c1938d5989dc3959a044b48cf9bee", "355260000000000000000"], + ["0xb1c0d822e2cd6d564d71b50aa02fdee9d198943e", "357763659648"], + ["0x71c5def06e754eaec18e1f39112fa139f3252ffe", "929265229824"], + ["0x81864360d166e53446390454422a3d0e904005f5", "9521360007635450000000"], + ["0x683c6cb00dde8605d44dd038f341528a16666666", "736911969219"], + ["0xeadb2be9a7123966214f3fef1ae19a9f38b0220b", "202345770181307000000"], + ["0x0528f7d2489e615be7f83689d261d0532b5956d7", "199336447774191000000"], + ["0xc9e9326c738378cab73c63accbcdc3fdf23d835a", "63296699095825300000"], + ["0xcfc9d1af462061551d0804c2248632f07a0357ea", "194616543306066000000"], + ["0x5bcdf5d8870cc21c8d33259c252cab428f74e8fb", "1000000000000000000000"], + ["0xc3903bb04ad89160891f5dce66a01a6535a24994", "890936960789610000000"], + ["0xe3896ec9d6d056939844007d503b95ca3b1c05ad", "125231503294668000000"], + ["0x608cf4dc98ac76eaf04d63e73f6524e9ce72d1b3", "894059269246774000000"], + ["0x1861608fb90cfa01c1b348915497c658e22fc8bd", "356447576973887000000"], + ["0x69449f50f833185dd09b5cd0afa6872d4f92d1e1", "125000000000000000000"], + ["0xf0320a025904029713cba832376cddc0119a952c", "100000000000000000000"], + ["0x697ec55dc3fac5bda4b296a1b7c098899b828a7f", "1172608912"], + ["0x97546af83caef687a36539c839dff70608970db9", "2046379747577200000000"], + ["0x2adba2d00c7716f5b218b4df61fbfe30fb52d191", "3976818924390570000000"], + ["0xddca23c6ba5155936c8c05c198e452a0674f4bbd", "280006277282310000000"], + ["0x914c5633990af2e1636377bf4c7e6e059ea1e436", "676289951782997000000"], + ["0x95ff03009c97dfc85675e3540441f278cd3491a9", "2967722487443970000000"], + ["0x22f278deba92ce1861d1b6f4f0cab72ebd745662", "2146150507740250000000"], + ["0x5b4183b0d1eb25bff61e28421afbdba3b7eb1f73", "565968066001373000000"], + ["0x561c7f1fd5c2e369ce5922945985181c7aa411d3", "1124365427119390000000"], + ["0x2bd6453653efb934a642a383fe8ace4d3e3a4a79", "2200000000000000000000"], + ["0x4d23a692c2d37285fa6beb9637caac449891718f", "1086695209937970000000"], + ["0x4495e211f9e46b97c75d95fa0863243e7d74b9fc", "2932886810326300000000"], + ["0x8424860cb889f787024ac78bf0667d55ea4afb1e", "950126905640324000000"], + ["0x9fa36d7f704890969255ef680ae5f45f74c45614", "133468305851911000000"], + ["0x8a4b25ac9651992c73aae3e51f3923d806feeffe", "1399000000000000000000"], + ["0x632889c2536b12fa1cd80309144c73559d89d405", "864181188829004000000"], + ["0x80750964836f9527e18417467a5b7f79bf2a6a21", "14412588623449400000"], + ["0x89dec99a09b0030000c5508d9b7110e594af142e", "348517646568247000000"], + ["0x44bdb19db1cd29d546597af7dc0549e7f6f9e480", "165013534823534000000000"], + ["0xf60c5173df0fa450be932f82c25b4b4e2a9566a0", "258500253234321000000"], + ["0xb6b6362fe7f912d557afe0e8b4f68068d4018731", "2229446397615340000000"], + ["0xaa1ca78662fddd0f399a7526fd5eae5903097858", "1885648137038640000000"], + ["0x61c98f7110ddce29680cd7eb6e1cd77a81d7587a", "66540000000000000000"], + ["0x9ed41df5327b01b0b8bb11c46ade11eb0f37c200", "202172276357092000000"], + ["0x3a30d21670b7080ee19bafef23db9a40a104e769", "368814125413909000000"], + ["0x092c741651725063aaebf422f2ba775875ca4dc3", "7537465396582250000000"], + ["0x21d4c58c8aae74f33c96f9b62308a413f39cdd27", "5630011487790720000000"], + ["0x9b362014da9e2d24e7d744de791faa00e6a8f9a1", "943379015403011000000"], + ["0x1461bfdc10cabb981f4eb9d64a3cfc174f7cc56c", "6267990350693060000000"], + ["0xf13b95ec56ffb77a2090a36d2b0fa6f9e5ef058d", "187834817954131000000"], + ["0xfa019bc786013802890118a76a6f97c70edbc418", "654199184488234000000"], + ["0xcb77c3033c1629f1d8f261c5e506e007041fd642", "361624100819728000000"], + ["0x7360675ed884c1038e22d602fb9ce219977ab11d", "248130000000000000000"], + ["0x3af3c36cd8ad782290600d655640db0d88258068", "130350000000000000000"], + ["0x98c0b3b7ef21e8103e8171699adf32c677d68650", "239070000000000000000"], + ["0x013cc5f05bbc8c11a4c5fbb42ed6005e00bbf187", "243290000000000000000"], + ["0x7717a9ec35c24a20faaa38760c6f29133aeb8874", "369121259773639000000"], + ["0x8f41fd9319b0f3dd7c1afb69c36ffb467fb324de", "369840000000000000000"], + ["0xca7b7554cbb2c611844a8b552628276496de5a98", "461570000000000000000"], + ["0x2b2434b24c58486a16953952acef2c4adcf7033a", "4021690000000000000000"], + ["0x262157b8359a51c23b532a97486ec517ee2ae9ad", "290680000000000000000"], + ["0x649be78b71f1cf10ce4af486af8bda1737ad54c1", "1829390000000000000000"], + ["0x3d258c7e14957fa02a001ee4177d3af2d52b1d53", "978280000000000000000"], + ["0xf49b270e500c6179a83cd22cb7bf820befa11412", "225870000000000000000"], + ["0xbaf3299a7d05f339193e61239525cbcae444fa68", "1070030000000000000000"], + ["0x67a0c887b9bc702f0d881806b629852caed97e98", "110890000000000000000"], + ["0x0382c934bf6ccc1ec63dc455874f883770ba73fe", "291700000000000000000"], + ["0xf3f1d44125447ba5085d38474142edf973c4041a", "144290000000000000000"], + ["0x92f1190086a287d48667aafd40aed165a35044ba", "83814590334313300000"], + ["0xf0e6829f09337cffd3275a098a572ca7cbe309fc", "786940000000000000000"], + ["0x4d3ca31daa91366c6ada0223c002c0d927878445", "774420000000000000000"], + ["0x01c395b85526e69d91db50900aa4a0ea19062009", "445320000000000000000"], + ["0x9b61b1bf5ec4df21e685dd46ce58280734ad20a3", "75540000000000000000"], + ["0xf873ad9135088add364c7a96575482c53233d9b5", "900164746028764000000"], + ["0x11f37eda87206bdc200222855328e5dd5809613f", "44772500000000000000"], + ["0x269e54cc50ed9502003d92664acf1f6cb91999c0", "790380000000000000000"], + ["0xa946b262eb3041fde8335c05a282ccc77b7c2918", "518210000000000000000"], + ["0xc4e3ed12796972cccbf328f9ed6b260605628e46", "339580000000000000000"], + ["0xbaacf4656a2b60c54445db7211988edfc3cd98cc", "4150755376184400000000"], + ["0x68aee219d75fda4e508f70454628acb9bdf413f1", "665990000000000000000"], + ["0x8c0680efc3404eafdc7a506e221f60b70a88a43b", "124720000000000000000"], + ["0xdc0f63f1a38e55fdf54117e743c3f6338efb829a", "211872453315038000000"], + ["0x1c5642daf636c837aecb77cea739f34a8d7e014d", "185830000000000000000"], + ["0x46a15045f68feb474938e2c7155c05bce5f104cc", "3417556562320270000000"], + ["0xb4027525352031ac6eaf4d78d88605d344073985", "1201040000000000000000"], + ["0xb1c296ee076a0a934cc2172d07ab958a5ee9553e", "491000000000000000000"], + ["0x7288933308a14c55a3cf6add0deb00b5dbca8951", "177465659255320000000"], + ["0x0f038a4a26ca3cb90dbec66d772853af3fcdf733", "1067216338898560000000"], + ["0x3c8bd33e51cd82abb6e9c59ef7b9a6d61682e690", "938810000000000000000"], + ["0xe3f1ca0e4234d5c586379818e9c47acbe4ad6d73", "130220245465457000000"], + ["0x8351b3bbefd26f05aa286380c57b27d722738110", "1442189218529930000000"], + ["0x649ec2d17f9370695eca94c418f4efdaed114520", "548455316602046000000"], + ["0xa3f19470d3fc0c0f69bd82876bd573b592ca9597", "400000000000000000000"], + ["0xa56402fb07ece948941a04ca2ac8c3b28d28877e", "245248128959944000000"], + ["0x0831344188d04d1610be3e260ccbc35c2afc42b4", "792561018731"], + ["0x4ba2ed434abceab019415e7b4770beca368f8db5", "1604060000000000000000"], + ["0x38a21985b77f1658bed383ebae079bec6c5f3a07", "987991527939883000000"], + ["0x9a214bd8eb5dfac880df184640e6a5b73be59ccb", "95000000000000000000"], + ["0x809676df9f7ef012b1201e767575bc9b5aebd108", "41150417629594900000000"], + ["0x9f2b668726dfbeb7a976d78513a602170fd5b270", "250520000000000000000"], + ["0xbcc22f7d6a49df2b081df31924a668959adea52e", "710475695760764000000"], + ["0xdfbda378cdcb7e9b385e1a907b5c0f3507703ba4", "600893710692453000000"], + ["0xe03d7d4d41c403d65505c29e4717a06ffc10da00", "4610951390634750000000"], + ["0x4bcdeb1dca8a2407e2801ea4d9b18850eb61dbb3", "112260000000000000000"], + ["0xfbde6d57645b6b9c259e84ee0071b71e0572683e", "3771958801725730000000"], + ["0xe5241e2dcaff3ef070fd161b37f93480bd81d6aa", "1"], + ["0x917527ee6a9624cafcc0ffce2db566d465e36fb1", "1870024000000000000000"], + ["0x3b704c981d82726d439179302bddf6abf990a9fc", "639413788336551000000"], + ["0xa3e3505d679ae18f89efcb24ea8f16c010efc42c", "452503285000000000000"], + ["0xa08c19ade8180c14d05efa461df4768d4281e3d6", "1642189218529930000000"], + ["0xc6d947c08ba8a703c15dcc8692ddd105ca43ff27", "560000000000000000"], + ["0x37557ec9c02fb6636c7321d5ccf273bea051dd06", "323601702796823000000"], + ["0x10b9924602f31b716821eccb7b81ba0c3f9b34e0", "11658730202897200000000"], + ["0xf0f75571e01ba8610b91a583ef18a330c14bbe7e", "400544422035814000000"], + ["0x6c8f55a65aaf01eb78b348d6e683e77eff8f57f0", "668593036529650000"], + ["0x6bd39ecd7fb71d37866146618d781492e5568dd2", "2523673504083830000000"], + ["0xd6f14a1cc837a728f22fd53adc3a3c1d20350326", "894029099162085000000"], + ["0xa856a47eee22fef15c855613e66912d2deeaf135", "178520750827002000000"], + ["0xd00f8d6cef430cf533296949cf0f38b8b0f743b5", "29150000000000000000"], + ["0xb3d3fea5ca6b60f6b3d305edc55fa941a4dbf678", "622102163551602000000"], + ["0x7d0d0e6c6b57a116429ab14d08303e8f71b452f4", "3798090492742490000000"], + ["0x0efa20d60fde441cbe6f245f2d2201e732820ab2", "936000000000000000000"], + ["0xf0025d7f196d8d5d5a944c311896bf94dd3efafb", "3520972324384370000000"], + ["0x361347da8d154ee26683f279b5b4744212b7993b", "294393961015546000000"], + ["0x8322f06cf86436714f1cc322c652f526db6b400f", "1723899593447540000000"], + ["0x482c7f6217292d40452b68897c8265d49f20a511", "2000000000000000000000"], + ["0xa44f346aa65d88bc2cf51ce1f2651187f005be0a", "4127047451822010000000"], + ["0x8dd20fd51a88b088cef02662f816a431cc4d689c", "403917000000000000000"], + ["0xed2d0e6b843188c87cd75217e6a343d30d49f107", "1014730605446690000000"], + ["0x8e61c5cafb9b6e44a9495f364a538aab068dc164", "43469636032280300"], + ["0xb44bf7c8b81c85f6fbaf3f7d03de45106c793b5b", "110800000000000000000"], + ["0xb3fa7b97f809ae5d006937c3db8c28f15edc7ee6", "200000000076729000000"], + ["0x720d330816afd75a72e012f8d669a19918483375", "1580611306266260000000"], + ["0xbec118e18379f10ddd4c57c708f4e43a41afbcbd", "12570809677904900000000"], + ["0x98bc894eaf9af129dcfd53eb8b6c1af3d860ec7f", "2261637090057400000000"], + ["0x3c0d9d0e15a4422ff8c27a496b9c786ae1b7a5bb", "13152503586587900000000"], + ["0x2c12f81506c3bbd3a5250f742a877fd30f6460aa", "12500000000000000000000"], + ["0x8f045416a994751f1e106297149d6f743b993556", "2591931655114510000000"], + ["0x214a2e26a097295603ed2913e018c53944189613", "339384868536774000000"], + ["0x701a24d812e4d9827ec8dd2b3eed726ffd9b4065", "652882004541524000000"], + ["0x00f4e673cbaa5bdd1551d5d9b5c442fa3cb6f510", "149000000000000000000"], + ["0x3b24a7c97815d9f18eeb02f15e6b1b89064b6f9c", "12825481698302500000000"], + ["0x598c2fe8ceea012153f2fd9cd77cb1b5befdca39", "4398000000000000000000"], + ["0xa90800d5ab123cbd3ec96b89178b3955bdcca2dc", "1500000000000000000000"], + ["0x306db8baa49080658b86f93b8f79adfb062ef9ec", "640437713948330000000"], + ["0x3410afba6587ae91909d5c5d020c8dcae4048188", "3332600837759380000000"], + ["0x405227400e15b125609acfcecfca5008c175ddba", "6596151686635290000000"], + ["0x3c13912c7fcca5d247f1b72a00fa9c6fc6c8b38e", "1890482370545130000000"], + ["0xc4565748161db315a1da5c7301c6553227a2a196", "235000000000000000000"], + ["0xbcc3cdc81b8243acf58cd96f43f99a3b9c393ea2", "818339900000000000000"], + ["0x51e00a95748dbd2a3f47bc5c3b3e7b3f0fea666c", "6862000000000000000000"], + ["0x62c323e6a3e702706e889a58974f2f84ccc53f7d", "1442189218529930000000"], + ["0xd895ffe25d7627fb29fc48df4af20bf377c57266", "906196120118669000000"], + ["0x43fce290181eb60bdd2ea8b2a7695387da3416bd", "3924464293386650000000"], + ["0xd830ac316e0c84a01d5c12eca802e9a45ec7b75b", "74961678"], + ["0xc1440f6c952862e39c84e901bf032ffaa9ec2fc4", "372714174113284000000"], + ["0x838eeb65281e211eb8ebddd29270947f95444808", "1349663593002230000000"], + ["0xd80e214d86399d966b5d0a0f647e48eb8e73a24b", "1753367325093370000000"], + ["0x8f423720584b0eff220c8ff0b62700917089be22", "60454326692912"], + ["0xa022b5dcbc0d5f416a75949eb77c991bcde99464", "1283418231426230000000"], + ["0x764592f9c0ec019e29ee67d7b2032e6e989881ef", "259000000000000000000"], + ["0x9ec6c8972f54e0d1c44d289f1dbe5fb6d71ad0cf", "226229612311010000000"], + ["0xb0e24f33249c4f85ef1df3e2773ac94b0e637a00", "4375000000000000000000"], + ["0xb0f3901d5b8aeefd290f66275abbb24160776e38", "23344158958752800"], + ["0x0000000057a888b5dc0a81f02c6f5c3b7d16b183", "1"], + ["0x703960bd917478f9f41cca901f3da41bf96d31d6", "1545638232607800000000"], + ["0xb965d68052b849b29fe25497c51659bf9678bc9b", "959618098548498000000"], + ["0xcd003b9ce7b1c64b57857710beccdda8d982a740", "10010652474805300000000"], + ["0x2281db2f9c78f6a0afc70e2dbbec2472b24a2bd0", "1705079562940980000000"], + ["0xf4484efb942029b1535eb55d3858145bd6c2a2bc", "260285538384"], + ["0x8ba6fb982cb4b6a240065376b944100bce31b9d6", "560882298435840000000"], + ["0xafe019f6f74880e4ab83211b39d8b278744f6e9f", "71532325023827300000000"], + ["0x4b1c40ec0452e28a885aabe08e2f2b32cca85ff5", "7068974546908970000000"], + ["0x1f4a913d0916883dd32090aed70f9119767eaa45", "7782958759801610000"], + ["0x000000c52b33fa71614810224771dc8f3255b220", "2"], + ["0x48f88a8d8e4a9dff33c0a4d857a81a189c2d6e07", "400000000000000000000"], + ["0xdea3e18aa866f46da789f0b908e90bf55a0dca90", "1717753600000000000000"], + ["0x25d0cff8c47f33b32192b3ea9824ac1bc550bd43", "1431461300000000000000"], + ["0x4e6180f2eca3f9bbba840f324502a95cf38cb468", "2704553995600000000000"], + ["0xf6c23bffe946dbaa9ae6964b298cb058f3ef6635", "1431461300000000000000"], + ["0x573267a8c5d5b3965fa778fa4de1b5f676073f92", "1431461300000000000000"], + ["0xeb6b51d158a5fdf67ba74d66dfe44b396e4e227d", "858876800000000000000"], + ["0xcdc700863f9a90c9f02c81aee546f8dd069d6a91", "556380400000000000000"], + ["0x594ba954d7da509ace74ea9e185a7dfe81fa8f2a", "3314217124192470000000"], + ["0x323f3ad4dc84ed90315d155fe1977de93840a9a0", "2020858210917280000000"], + ["0xb03e52e5b8ae0a203212662a6a0e3cfece59630d", "5730605700000000000000"], + ["0x5cf8a362e7b801d555d3155919dcbb6253d4d0fc", "1574607400000000000000"], + ["0x500e5eb0cf12736f237604bb90ee996a24def620", "22541930379322600000"], + ["0xeb41fe1090bb7a7fe6162de8fea3c16051544cf4", "107375262635238000000"], + ["0x385d94de0be5f6d958b8340a8be6f51c4d53bd87", "270004324185512000000"], + ["0x93de650c5758322449ba8990a5e072ab37cfcc0e", "204680351450023000000"], + ["0x5ea85d36eb9c9960724b6d1f912d52d4856805f1", "400000000000000000000"], + ["0x3b4b0d8853db68f290757e8d5de2e5c7893ddab0", "384836394528966000000"], + ["0x77e75656e262534b7c6ea6236ae97f2f60fd8d9f", "547890000000000000000"], + ["0x8193a6d86f1f93639a9aeef18a24d5f92fc10285", "81387653415910500000"], + ["0x9bb4ba47e280674fdd60be04e70af293a80dc99e", "3205743493087370000000"], + ["0xf3e4d991a20043b6bd025058cf4d96fd7501070b", "2602613297067900000000"], + ["0xd73db7bef50aa4302f13c16b07ad0919b955dca2", "1559620522060570000000"], + ["0x9c4ab5727c76563f8c386c3e78672b4f9cdbde5b", "374194128388520000000"], + ["0x85aca057c1b5a8b31ab251162b43f8438746844e", "1018527694602170000000"], + ["0x682f7c9514d66436afd7e16bdc33290d1e122852", "474129007145315000000"], + ["0x93dc859e6ab49134a0763b9594384e211ffe987e", "2077820000000000000000"], + ["0xb0606b5e86efd0900ba7fc28f37b3f3f0d217172", "548863273087"], + ["0x4bfe442562f52780265dcd542a8a512d577fdb34", "184123017046466000000"], + ["0x6b5b79aed614d65eb253ecc2bd312bb24c7ccc68", "2079806050637300000000"], + ["0x7061e70b88268765072520a44d0a1e326121959e", "177000000000000000000"], + ["0xce62ec58396d56c18e6ee35c885025539ff3ca0b", "937500000000000000000"], + ["0x94800c39f3a793c3a67f901b71e397d28d89b7a1", "3010773710917280000000"], + ["0x40db8365d1252bcb06598927698238a99d39228e", "937500000000000000000"], + ["0x986fd6f03e337e18174e1ed694f81b81668fd3ea", "625000000000000000000"], + ["0xc7ac35c412cb902f1c90d1498d04758f3d23d8a0", "312500000000000000000"], + ["0x046a5a1fa5986767ec460b998cc78f59c6ee03ef", "1250000000000000000000"], + ["0x8aabe1d0a229399a49b77dc29c75a951e520f1c2", "1250000000000000000000"], + ["0x4a4d58adb25180f2e36c7429ba17bc4a79a21eb1", "3298610000000000000000"], + ["0xe903349a368acaf2833c30d1ebd1f09f6a0b6830", "625000000000000000000"], + ["0x28a13140fd796a0cd5a79bb464841e6c3ad7b2cc", "1875000000000000000000"], + ["0x1ebc680bbf8ea1aceb9113389cf4ec839ff6b198", "937500000000000000000"], + ["0x9dc49081cae215ac1c5a5744630b4fcc23cb960d", "625000000000000000000"], + ["0xdb94bf07317d263b2f7d771c0652bff5dba0de2f", "3125000000000000000000"], + ["0x06ecd417f5cb845752afcad1f4c85139e8eca5da", "187500000000000000000"], + ["0x93aab40dd6888569598dd97463373db270b47977", "3125000000000000000000"], + ["0x084466b7f2eba52ed37c63c7fa25b0148e707497", "312500000000000000000"], + ["0x1075df73e8532bfb64164e94924c6898ebcf7635", "3125000000000000000000"], + ["0x2999cfbf7bec652ac7c72f555d4489c5fdce46cb", "312500000000000000000"], + ["0xeb2adc57bfb86ca79c8f106db8ea3f3364c09330", "625000000000000000000"], + ["0xc87d678c7fefa7c4eb3ce069cc89bb87d0831c8e", "2262970677918940000000"], + ["0xc679d468c692a91a15e4ce5d3beaf39788b7194b", "1250000000000000000000"], + ["0xdf8a1c4cbb74a7a06e5c4a724ad34c9561ab358e", "120259974860880000000"], + ["0x13991cc1ffae4cf57c5caefb951826ffa54a88af", "26528622959874400000000"], + ["0x6f58c1472dbdaab0b305e7d0dc00c8505e29b029", "1000000000000000000000"], + ["0x460501463ddadf0b28e1b396f20e01df83a68274", "20086998764418"], + ["0x9b181cbcc5bf35cad0da18af4558a70190cb41ef", "248070328906471000000"], + ["0xcb824df92feedb354c0d1cb5097e8bf2ca478290", "644477882769069000000"], + ["0xd1a863da4c548fb5bf6915292e635b58ef38b77b", "3508915564117900000000"], + ["0xde4d9f976ea868147df16e829e13c3f5565c2760", "5541388219667120000000"], + ["0xd9f72143b4105402c1f254ccd47e1853e80a4df4", "2535138321526180000000"], + ["0x944d7001b40e101b740932260c931df0cb716042", "71335524615199"], + ["0x25779abc102dee9beee26c0de20e595ea790d44b", "105291554569234000000"], + ["0x9e61230a7f37add321f82b7a546d99678dc3cc41", "154311926794027000000"], + ["0xcb00edeadd800b172a6fffd12116cd2bbf24afc1", "79020792750223000000"], + ["0x326ea036c2bf0021f3909ab08cf8c230c7bfc4d5", "1473567533169340000000"], + ["0x14c4cb6077c8929386428c853a65d5c2be033945", "6478023452065040000000"], + ["0xa78d2c69b34cab96cace31967afe52013dfcb604", "976148126819"], + ["0xbc147973709a9f8f25b5f45021cab1ea030d3885", "4925351713628110000"], + ["0x2897958f27ef55067e39afd882f2f5695d266e98", "12715823636421800000000"], + ["0x47602a969b3b978147e25a23dcf87565831e8a7c", "2526078833733440000000"], + ["0xc7c1de06b394f956a2cf9d1e34360772eedede87", "1106127898954890000000"], + ["0x7310e939c0a814f15065ce27afa8d493e30c899b", "2379048527907020000000"], + ["0x2c5651d9c4d9a9031ff789845f2d44c82f194033", "27321727924126300000000"], + ["0xa58262270521d7732fccbbdcdf9fcd1fc70d47e5", "1"], + ["0xacf98af36845ec9aeda29feed2907ea287388cf3", "25183023146733900000"], + ["0x00000000b7ca7e12dcc72290d1fe47b2ef14c607", "10"], + ["0x0211f3cedbef3143223d3acf0e589747933e8527", "266803872558772000000000"], + ["0xb1d308241b2627bc1f575ddc3b381e98d8a69e5f", "1758742291524780000000"], + ["0x592231aa7459d22dc9674f726e14ed80f0d65bf0", "21674991600856200000"], + ["0xc10a4691f0c675d026a8191d70c231b78f65d969", "1511165368811280000000"], + ["0x44e4e1976312f9d1e80d88197f280c6163460859", "68899141741340700000"], + ["0x000000000035b5e5ad9019092c665357240f594e", "9"], + ["0x73088662ae671e419375ce82788b0e5a6f55e3e6", "439730712473954000000"], + ["0x6e5b935ac926e11dec812eb0a5425ec5e4c96355", "1200000000000000000000"], + ["0xd2854b0300723d0cc0a06640968c4c497ed67230", "340537524632317000000"], + ["0xc40fc1c553737b2aa8572fdb036986510219f233", "2023102326781410000000"], + ["0x6c60b3fd031eca32ecfbb98ed9d64bbf74a0a4b3", "1818046183699750000000"], + ["0x56633bbb3c6572f8013a1174219812532d6cecbd", "1329000000000000000000"], + ["0x7558d0ed461e0fd323556a049167d90d25a78a0a", "4144598562740210000000"], + ["0xa64333ed5ef49bb2ba34530563b39e0a2b9e0586", "6514726555114290000000"], + ["0x57abd7868f043e17d33e37c6cbd86e1e189bef0e", "631040000000000000000"], + ["0xcc23eb4ce2f2ad4f5407da66295f39d450c5b2d4", "804609447253777000"], + ["0xaa3f7b8257054252575c07679cbcdc85d7c83802", "526890000000000000000"], + ["0x5e154121e1b9279a26f9f477310acafbe11bd91b", "2823348799716100000000"], + ["0x91d720f45c53d897d39d61d2f88c6f8d56ba6125", "1538790817849610000000"], + ["0xc6036c93d956c4ac1b84bf4984f2eb4730731f7c", "2376658294487830000000"], + ["0x3992eaf6f696781a7bcfd073e72fc4e10adf5ad6", "30714861324757000000"], + ["0xa9867c46e2fbc004d04da3b8ebcae8d5db171fe2", "56585000000000000000"], + ["0x0000000099cb7fc48a935bceb9f05bbae54e8987", "2"], + ["0x49c6f828acaf25e548d77e4487d14c385a19370a", "2632061322519860000000"], + ["0x187c77e1c74057b5ae98f90b45e4303cb7361c76", "26601445377057600000000"], + ["0x605cdb5968e47fd867783b60f8390479f699eab9", "6387518238452130000000"], + ["0x70022ffe7f412cfc638725cd33b1a3a2aa5edd0f", "854608972882282000000"], + ["0x0605e76bb3bf5cd33e38287a020a7129687a1a7d", "428108152762920000000"], + ["0x2f094e189859e20ceb97a911b90e1471accbca27", "30093668343011800000"], + ["0xc36cca68158af642ee2d83982ae42c7cf196d1bd", "100126994595323000000"], + ["0xeaea5e20ba7d72164244b13a4435f12730e2c8a6", "321423639315184000000"], + ["0x2bc8d75939444db20669df1c0d1ba7980b25ed72", "90643309557720"], + ["0xafdebb99329df4d002919aae3d8b055bc9053e20", "3298658261951430000000"], + ["0xa10671808455d6f8cb663459c9f334a873f4c81f", "1635912900000000000000"], + ["0x66f322df0f7c9876b504b7e4ea1a564d895e88e5", "225932779234640000000"], + ["0x9acb7a770a8a6a3dcb381e492cc5793f6ba40f70", "132033128646355000000"], + ["0xd03e1b93424a5bab90f2f88a75a0336b46b516e9", "1590007837339620000000"], + ["0xd6ce913c3e81b5e67a6b94d705d9e7cddf073a7e", "4354795517357540000000000"], + ["0xe5296e767d4be445e2d89c2e15fdc9c9ac130d00", "237940000000000000000"], + ["0x51c0ac97fe85b5bfccb7f631b49a90b0cb75de24", "200000000000000000000"], + ["0xc1ea53874efd8e6374931a83aeccdf66d24f70fc", "200000000000000000000"], + ["0x41239bf909cd4f138990575cd1a34c8efddfab68", "200000000000000000000"], + ["0xdaae758a8a60e97f1ccb14ccaffe487acd31d0b9", "200000000000000000000"], + ["0xf011b0c84502cde1be42fd14532c7a0a5e734196", "61800191549145"], + ["0x6e93a65f1688c69ea36c59579f0d25c9a1f010dc", "200000000000000000000"], + ["0x47294092daeafc531860a357346502fc3bc70f58", "808407247031"], + ["0xa65a4aefdddddd8c8614d820177ff52c2076d70a", "6014000000000000000000"], + ["0x97100df19cf2ae7992ba35d91e861d6f925417f6", "108131108800465000000"], + ["0x0000000000d1d773661e4b2102bbe07d4dcde777", "5001"], + ["0x9d43b4dec57280f4d8923d0404ebb8416bcbcf84", "12903149091819900000000"], + ["0x0ed67daaacf97acf041cc65f04a632a8811347ff", "2482932028935180000000"], + ["0x2463cc40480903c003d53e97133609745edecd0a", "546082237807549000000"], + ["0x1359669ddc1b3e23275c4542ce82680527c02f71", "634479423866374000"], + ["0x0e9dbfa14f88c866f3a7ef8f5534090e11eaddcb", "1953317898743940000000"], + ["0x12e468a4ee35da7d5e5128b222c008b6a5453dc5", "2744616073598240000000"], + ["0x83ec0d66b71817de7c927e9db3ea4e993466af26", "1757428935805150000000"], + ["0x788719cbae9a9bd3622e549765edb61e29098457", "155608740252025000000"], + ["0xf52e6269393144b636b17c73eeb00057106af6e9", "1000072661724330000000"], + ["0x43db77a27790a91ecbe9bb8e974d5fadd17d53c5", "2769499200000000000000"], + ["0x972929432e1c220860491f91a1096d69548aabb5", "49751496356947"], + ["0x7b57db50f91356abe299605095775a6246742538", "22038972924696400000000"], + ["0xcb6b8f372ddcb907a356b4050f12d6ebfc100dfb", "215582053009085000000"], + ["0xca1e9f0ef2f5cc54d3fa14d3bfde1675a168bad5", "2199000000000000000000"], + ["0x20c75587792bd5bfbe96abb680e9faea5b3edd9f", "2199000000000000000000"], + ["0xcc03e33fc298f2d627c62ac42cca953a4e01bd4c", "2199000000000000000000"], + ["0x8046bc2af3556c8657995d5c268195286925c67c", "1099000000000000000000"], + ["0x0d4ddea3849c54e16c85cb4354943dc876e05552", "1100000000000000000000"], + ["0xcc531ee4b12c23b654a0fa4b99420d6e964f016c", "2075000000000000000000"], + ["0x7e243c07afceafe22c05ff1415db8effad5fc100", "1049000000000000000000"], + ["0xc5958a9c4f7169cc95969849a6065beadd5322d6", "810000000000000000000"], + ["0x647c7da221168fe5086cf8556fbaf1343c77b657", "810000000000000000000"], + ["0xd1dadf4a440afb322d1b8fc3aa2e6f4f5ed6c68a", "25000403395087500000000"], + ["0x21712e1a233d5a90da82e1c61fa6183e81e878f9", "326323909945541000000"], + ["0x728b322a876d515fb9773acbe0b744973fc8b4a6", "55965894510341"], + ["0xa1b0176b24cfb9db3aee2edf7a6df129b69ed376", "185205907524007000000"], + ["0x496aa49830137bfb023a4cf93009905182adba9b", "211908173212616000000"], + ["0x868e486f3a00cf0ae17b1c55032e80504c67d708", "2257216602723660000000"], + ["0xadf6bc0ea95fcd2114404fd7e23ae541f9e2f7f0", "2014550000000000000000"], + ["0xdcf8d6905ed8e2c8e2194a99c22f1232398ef3b0", "7287350605332710000000"], + ["0xf8e7e3d15f4b46eeaac1143ac1391a4f82a750a8", "160916726587430000000000"], + ["0xfda276dd36f4db76b7ba7a533b65d477e798f2bd", "899816821144"], + ["0x41b9ba8b989ba0a1d73168278522550350df9e3b", "1563954429331710000000"], + ["0x34152becdf70e9894ce16462408bde73d285b452", "219487307629858000000"], + ["0x19868b43cc7e16f8a928c500400d24f1b5f2dcff", "2194690071282380000"], + ["0xe1176052966f14802bb3755bbdfcaa712b4708e8", "783258873456526000"], + ["0x911edbe1f92cc67f7baba6d38381ba16e76ff7df", "177681060579"], + ["0x66b891721b0f6694e59bdf7301cfe53f656ef1f1", "200000000000000000000"], + ["0x360b254c868064168d9dd8dd7d7e103fdc5c7f8d", "3445464644649210000000"], + ["0xb67dfcf4dec5944101d363ef4ec8bfb1996eff82", "30000000000000000000000"], + ["0x9a188cc4fc5e7d6b1ffc2e0d185d59195fd160e4", "1482092751897980000000"], + ["0x5b4275ba1251b4692ec8b76bdc78111031d2a7cd", "15000000000000000000000"], + ["0xf3a894b565d15e03ab537525275e87d1c929644a", "1"], + ["0x59e83877bd248cbfe392dbb5a8a29959bcb48592", "261931950000000000000000"], + ["0xdd6c35aff646b2fb7d8a8955ccbe0994409348d0", "265968964285714000000000"], + ["0x8437a6bf9235fd003d50cd4024fa7ec6979208d5", "314412490793188000000000"], + ["0x802a26952a2095a5986674937c9c43f37807b380", "68722899874438"], + ["0xe8a90314d1e705246b3c425bc806334d2e7f3565", "1059401923919070000"], + ["0x411d5a0d80c79f041195d08241687e500fc0e52c", "192293166361607000000"], + ["0xdee169c8e26a252b5b606daf2344555570982114", "42800000000000000000"], + ["0x860be57d3951c3dadc7a21156b82949596a18de7", "4573593072418000000000"], + ["0x2b5b309e6c233c06e766178ec02864d15fc49195", "369049710584056000000"], + ["0x63c4f08599d91ec68bbfb118f087f7e56c3dac71", "2682598482124700000000"], + ["0xa9b3e4e7667d96cc5bc44bbf17e80fa39f1e5006", "20000000000000000000000"], + ["0xaf689e1b270d2c1e3a109a19cf19973bb3d4b66d", "816708830686"], + ["0x4b5e481607533914c016ac21bcc0b8913e2ba052", "3331390909694800"], + ["0xc725c9c374006989c5878c80989d70b6bd275c0e", "2199000000000000000000"], + ["0xca63cd425d0e78ffe05a84c330bfee691242113d", "6252520227237650000000"], + ["0x9820f75afd5a15d62c3004874f0beee7408b472d", "800000000000000000"], + ["0xd255391dece0185504219f96e6b2a7465bcd24e0", "5052800000000000000000"], + ["0x1cb41360375dfe8ac94a6e10a9027e364966cfd1", "2526400000000000000000"], + ["0x88f10161eeb86a7f87ca62363f291d58b207621a", "50176250152744"], + ["0x5b40794812deb51dd95aaadbafd1a33fe125757c", "1598938991710300000000"], + ["0x8c055e84ed56a1f87b5e901babd799b154cd5c78", "1560662424526990000000"], + ["0x8bd42ceba1ac37fe6e1fe8ef545d94fabe4f1fab", "168534309900652000000"], + ["0x6ffbca4259dfcec4b72bed5008704468208e7635", "7282522948352720000000"], + ["0x6dd8afd0338510eef17db0fb4f76b0cfab9002d3", "3138713896793900000000"], + ["0x59427cd74811cd0528fa8169ef553c5cf4960ef3", "92059612754538100000"], + ["0x4d883824258f7253101f266a23207dcb2dd45768", "1220199560570990000000"], + ["0x00a7e14d75a339c080da5295fd0176d02bf9a74c", "429009322389925000000"], + ["0x00000000003b3cc22af3ae1eac0440bcee416b40", "1"], + ["0x190c6fc3121706b5d600de5de94c1a6c8055660b", "224739333781845000000"], + ["0x0000000000003f5e74c1ba8a66b48e6f3d71ae82", "1"], + ["0xa47dcc127bd2487b01477d8e381dced5de5e5033", "762064704195096000000"], + ["0x666666a0200c2b78eddd1ef279488c6a714f010d", "756302420000000000"], + ["0x7dd17c10f9dfe26f335360dfc00f85fa7323d5b4", "5000000000000000000000"], + ["0x2c6de6e4c2b419c7d68b7ede3ac4030586c7b83e", "378173"], + ["0x83e8ff54a46f1a3ec12407d75f810b1c31a8f669", "5000000000000000000000"], + ["0x47642347c9731e9fc2470cc393373b95e8c0d730", "2554959874712730000000"], + ["0x29bbf77899bf371b9ce9bb9d2fb7f1325fe198f6", "355499447694852000000"], + ["0x42d17def388c0435073eff221a121c04002c485f", "90000000000000000000"], + ["0xb2e7d71432001a0eb0fcbd4d32ba66439d413bd1", "1454138356717570000000"], + ["0x14786310da605118e09b20079b1bacf3e6bc499a", "438469116589965000000"], + ["0x4ec9f32f58605663c6aef2865f3d6c446638579f", "50000000000000000000000"], + ["0xbd87efbd4b883a969b646045dd9a3661468ecc23", "1000000000000000000000"], + ["0xbf5ae133b9a0fc1a07952a7df2afa21f7f69ef58", "152159999999607000"], + ["0x97963d547b010ee36faab9cb4c16305a9e0974a5", "55330986783918400000000"], + ["0xfddf771d043d60f17a9841eb8e955c40d8be592f", "755229700479864000000"], + ["0x0f8dfda2cc073a6160c03ca856bec0f376e54440", "1328125000000130000000"], + ["0x9b6ca74030bdb7f2be2d4109def9e5c4ea316eb0", "800000000000000000000"], + ["0x7cf70b2a18436074c518cd27d3f66615ffd73948", "179432132521118000000"], + ["0x21ff5b95839790bb88a033a543e7077e67f9e7a4", "888000000000000000000"], + ["0x4b0ddf4513d807553695d13c195170cac50da9ce", "51321899228862800000000"], + ["0xdd4696b24ab450c2aceff4778bd94687007734a7", "12709219661640000000000"], + ["0x34f0c3c7614f134c4101ea78f318c311c0291435", "21397585592245500000000"] +]; + +module.exports = whiteList \ No newline at end of file From b87f058df65bf858c7c8fd51987ac2c353714e1c Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Fri, 16 Jul 2021 16:03:20 +0800 Subject: [PATCH 183/254] Update vipDVD contract address and ABI. --- config/abi.js | 207 +----------------------------------- config/serverless/domain.js | 6 +- 2 files changed, 4 insertions(+), 209 deletions(-) diff --git a/config/abi.js b/config/abi.js index f0903c4..d222f64 100644 --- a/config/abi.js +++ b/config/abi.js @@ -14824,212 +14824,7 @@ const cUSDCContract = [ }, ]; -const xDVGABIContract = [ - { - inputs: [ - { internalType: "contract IERC20", name: "_dvg", type: "address" }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { indexed: true, internalType: "address", name: "user", type: "address" }, - { - indexed: false, - internalType: "uint256", - name: "dvgAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "xDVGAmount", - type: "uint256", - }, - ], - name: "Deposit", - type: "event", - }, - { - anonymous: false, - inputs: [ - { indexed: true, internalType: "address", name: "from", type: "address" }, - { indexed: true, internalType: "address", name: "to", type: "address" }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - anonymous: false, - inputs: [ - { indexed: true, internalType: "address", name: "user", type: "address" }, - { - indexed: false, - internalType: "uint256", - name: "dvgAmount", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "xDVGAmount", - type: "uint256", - }, - ], - name: "Withdraw", - type: "event", - }, - { - inputs: [ - { internalType: "address", name: "owner", type: "address" }, - { internalType: "address", name: "spender", type: "address" }, - ], - name: "allowance", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "spender", type: "address" }, - { internalType: "uint256", name: "amount", type: "uint256" }, - ], - name: "approve", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [{ internalType: "address", name: "account", type: "address" }], - name: "balanceOf", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [{ internalType: "uint8", name: "", type: "uint8" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "spender", type: "address" }, - { internalType: "uint256", name: "subtractedValue", type: "uint256" }, - ], - name: "decreaseAllowance", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [{ internalType: "uint256", name: "_amount", type: "uint256" }], - name: "deposit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "dvg", - outputs: [{ internalType: "contract IERC20", name: "", type: "address" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "spender", type: "address" }, - { internalType: "uint256", name: "addedValue", type: "uint256" }, - ], - name: "increaseAllowance", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [{ internalType: "string", name: "", type: "string" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [{ internalType: "string", name: "", type: "string" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalSupply", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "recipient", type: "address" }, - { internalType: "uint256", name: "amount", type: "uint256" }, - ], - name: "transfer", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "sender", type: "address" }, - { internalType: "address", name: "recipient", type: "address" }, - { internalType: "uint256", name: "amount", type: "uint256" }, - ], - name: "transferFrom", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [{ internalType: "uint256", name: "_share", type: "uint256" }], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; +const xDVGABIContract = [{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"DVDAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"xDVDAmount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"DVDAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"xDVDAmount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dvd","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"getTier","outputs":[{"internalType":"uint256","name":"_tier","type":"uint256"},{"internalType":"uint256","name":"_depositedAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_dvd","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_share","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]; const DVDABIContract = [ { diff --git a/config/serverless/domain.js b/config/serverless/domain.js index d180a0b..9caf78f 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -194,10 +194,10 @@ const testContracts = { }, }, vipDVG: { - address: "0x3aa8e8B6D3562a1E7aCB0dddD02b27896C00c424", + address: "0x4bb18f377a9d2dd62a6af7d78f6e7673e0e0f648", abi: abi.xDVGABIContract, - tokenId: "xDVG", - lastMeasurement: 24819747, // Previously known as vipDVG or xDVG + tokenId: "xDVD", + lastMeasurement: 26158560, // Previously known as vipDVG or xDVG }, DVG: { address: "0x6639c554a299d58284e36663f609a7d94526fec0", From 9fcef73980637eb9bfbee3062d177c3c353450e4 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Fri, 16 Jul 2021 16:03:40 +0800 Subject: [PATCH 184/254] Hardcode DVD price --- services/staking/vipdvg/handler.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/staking/vipdvg/handler.js b/services/staking/vipdvg/handler.js index 31b6541..8ff34a1 100644 --- a/services/staking/vipdvg/handler.js +++ b/services/staking/vipdvg/handler.js @@ -141,7 +141,8 @@ const getxDVGInfo = async (dvgContract, xDVGContract, xDVGContractInfo) => { const xDVGTotalSupply = await getTotalSupply(xDVGContract); const dvgBalOfxDVG = await getDVGBalanceOfxDVG(dvgContract, xDVGContract._address); - const dvgPrice = await getTokenPrice("daoventures"); + // const dvgPrice = await getTokenPrice("daoventures"); + const dvgPrice = 0.225; const xDVGPrice = await getxDVGPrice(xDVGTotalSupply, dvgBalOfxDVG, dvgPrice); const tvl = await getTVLxDVG(xDVGContractInfo, xDVGTotalSupply, xDVGPrice); const apr = await getAPR(); From 2c4bb4acd0b080d68119a9a793e9d1bbbd16b9ef Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Fri, 16 Jul 2021 16:47:06 +0800 Subject: [PATCH 185/254] Hardcode DVD price --- services/staking/vipdvg/handler.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/staking/vipdvg/handler.js b/services/staking/vipdvg/handler.js index 8ff34a1..1420397 100644 --- a/services/staking/vipdvg/handler.js +++ b/services/staking/vipdvg/handler.js @@ -126,7 +126,8 @@ const getxDVGAPR = async (dvgContract, xDVGContract, xDVGContractInfo) => { const xDVGTotalSupply = await getTotalSupply(xDVGContract); const dvgBalOfxDVG = await getDVGBalanceOfxDVG(dvgContract, xDVGContract._address); - const dvgPrice = await getTokenPrice("daoventures"); + // const dvgPrice = await getTokenPrice("daoventures"); + const dvgPrice = 0.225; const xDVGPrice = await getxDVGPrice(xDVGTotalSupply, dvgBalOfxDVG, dvgPrice); let apr = (xDVGTotalSupply * xDVGPrice) / (dvgBalOfxDVG * dvgPrice); @@ -144,6 +145,7 @@ const getxDVGInfo = async (dvgContract, xDVGContract, xDVGContractInfo) => { // const dvgPrice = await getTokenPrice("daoventures"); const dvgPrice = 0.225; const xDVGPrice = await getxDVGPrice(xDVGTotalSupply, dvgBalOfxDVG, dvgPrice); + const tvl = await getTVLxDVG(xDVGContractInfo, xDVGTotalSupply, xDVGPrice); const apr = await getAPR(); return { ...apr, dvgPrice, tvl, xDVGPrice: xDVGPrice/dvgPrice }; From f5b146c1018b3ebbd5ab986d8d9052b19381401b Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Fri, 16 Jul 2021 21:55:06 +0800 Subject: [PATCH 186/254] Update contract address of DVD (mainnet). --- config/serverless/domain.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 9caf78f..e936925 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -414,7 +414,7 @@ const mainContracts = { lastMeasurement: 0, // TODO Update lastMeasurement }, DVG: { - address: "0x51e00a95748dbd2a3f47bc5c3b3e7b3f0fea666c", + address: "0x77dce26c03a9b833fc2d7c31c22da4f42e9d9582", abi: abi.DVDABIContract, tokenId: "daoventures", // Previously known as DVG }, From e2b781dff379a989ad376fbfe22a962a6675fe23 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Fri, 16 Jul 2021 23:06:52 +0800 Subject: [PATCH 187/254] Update vipDVD address and last measurement (mainnet) --- config/serverless/domain.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/serverless/domain.js b/config/serverless/domain.js index e936925..739eab4 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -408,10 +408,10 @@ const mainContracts = { }, }, vipDVG: { - address: "0xD6Ce913C3e81b5e67a6b94d705d9E7cDdf073A7e", + address: "0x1193c036833b0010ff80a3617bbc94400a284338", abi: abi.xDVGABIContract, - tokenId: "xDVG", - lastMeasurement: 0, // TODO Update lastMeasurement + tokenId: "xDVD", + lastMeasurement: 12838468, // TODO Update lastMeasurement }, DVG: { address: "0x77dce26c03a9b833fc2d7c31c22da4f42e9d9582", From a2254038234dc1a09ef31fb1f5b979998c42af39 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Fri, 16 Jul 2021 23:12:20 +0800 Subject: [PATCH 188/254] remove save functions --- app.js | 4 ---- services/reimbursement/handler.js | 38 ------------------------------- 2 files changed, 42 deletions(-) diff --git a/app.js b/app.js index 45fb464..68b14c3 100644 --- a/app.js +++ b/app.js @@ -94,10 +94,6 @@ async function init() { reimbursementAddresses.handler(req, res) ); - app.get("/reimbursement-addresses/save", (req, res) => - reimbursementAddresses.saveAddresses(req, res) - ); - app.get("/reimbursement-addresses/dvg/:address", (req, res) => reimbursementAddresses.handler(req, res) ); diff --git a/services/reimbursement/handler.js b/services/reimbursement/handler.js index 0529e01..2802fef 100644 --- a/services/reimbursement/handler.js +++ b/services/reimbursement/handler.js @@ -6,44 +6,6 @@ const db = require("../../models/reimbursement-addresses.model"); const whiteList = require("./whitelist.js"); const ethers = require("ethers"); -module.exports.saveAddresses = async () => { - - try { - await db.drop(); - } catch { - console.log("collection not created yet") - } - - const signerWallet = new ethers.Wallet(process.env.SIGNER_PRIVATE_KEY); - - console.log(`Signer address: ${signerWallet.address}`); - - const totalCount = whiteList.length; - let data; - let user; - let allowedAmount; - let signature; - let message; - for (var i = 0; i < totalCount; i++) { - user = whiteList[i][0]; - allowedAmount = whiteList[i][1]; - - message = ethers.utils.solidityKeccak256( - ["address", "uint256"], - [user, allowedAmount] - ); - signature = await signerWallet.signMessage(ethers.utils.arrayify(message)); - - data = { - address: user.toLowerCase(), - amount: allowedAmount, - signatureMessage: signature, - } - await db.add(data); - } - console.log("done") -} - module.exports.handler = async (req, res) => { const address = req.params.address; let result; From 3c185dfe5e29b3c59782b67310b18498fd44720d Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Sat, 17 Jul 2021 16:14:09 +0800 Subject: [PATCH 189/254] Update API to support both vipDVG and vipDVD. --- app.js | 3 + config/abi.js | 790 +---------------------------- config/serverless/domain.js | 54 +- services/staking/vipdvg/handler.js | 214 ++++---- 4 files changed, 181 insertions(+), 880 deletions(-) diff --git a/app.js b/app.js index 3bb611b..9acc831 100644 --- a/app.js +++ b/app.js @@ -75,6 +75,9 @@ async function init() { app.get("/staking/get-xdvg-stake", (req, res) => stakeXDvg.getxDVGStake(req, res) ); + app.get("/staking/get-xdvd-stake", (req, res) => { + stakeXDvg.getxDVDStake(req, res) + }); app.get("/event/verify", (req, res) => specialEvent.handleVerifyEvent(req, res) ); diff --git a/config/abi.js b/config/abi.js index d222f64..a33205f 100644 --- a/config/abi.js +++ b/config/abi.js @@ -14824,787 +14824,13 @@ const cUSDCContract = [ }, ]; -const xDVGABIContract = [{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"DVDAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"xDVDAmount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"DVDAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"xDVDAmount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dvd","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"getTier","outputs":[{"internalType":"uint256","name":"_tier","type":"uint256"},{"internalType":"uint256","name":"_depositedAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_dvd","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_share","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]; +const xDVGABIContract = [{"inputs":[{"internalType":"contract IERC20","name":"_dvg","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"dvgAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"xDVGAmount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"dvgAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"xDVGAmount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dvg","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_share","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]; -const DVDABIContract = [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fromDelegate", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "toDelegate", - "type": "address" - } - ], - "name": "DelegateChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" - } - ], - "name": "DelegateVotesChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "Snapshot", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DELEGATION_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DOMAIN_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "snapshotId", - "type": "uint256" - } - ], - "name": "balanceOfAt", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burnFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "name": "checkpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "fromBlock", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "votes", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - } - ], - "name": "delegate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "delegateBySig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegator", - "type": "address" - } - ], - "name": "delegates", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getCurrentVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "getPriorVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_name", - "type": "string" - }, - { - "internalType": "string", - "name": "_symbol", - "type": "string" - }, - { - "internalType": "address", - "name": "_addr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_initialSupply", - "type": "uint256" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "numCheckpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "snapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "snapshotId", - "type": "uint256" - } - ], - "name": "totalSupplyAt", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -]; +const DVGABIContract = [{"inputs":[{"internalType":"address","name":"_treasuryWalletAddr","type":"address"},{"internalType":"uint256","name":"_dvgInAdvance","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegator","type":"address"},{"indexed":true,"internalType":"address","name":"fromDelegate","type":"address"},{"indexed":true,"internalType":"address","name":"toDelegate","type":"address"}],"name":"DelegateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"DelegateVotesChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DELEGATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint32","name":"","type":"uint32"}],"name":"checkpoints","outputs":[{"internalType":"uint32","name":"fromBlock","type":"uint32"},{"internalType":"uint256","name":"votes","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"}],"name":"delegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"delegateBySig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegator","type":"address"}],"name":"delegates","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dvgInAdvance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getCurrentVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getPriorVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"numCheckpoints","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWalletAddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]; + +const xDVDABIContract = [{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"DVDAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"xDVDAmount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"DVDAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"xDVDAmount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dvd","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"getTier","outputs":[{"internalType":"uint256","name":"_tier","type":"uint256"},{"internalType":"uint256","name":"_depositedAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_dvd","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint256[]","name":"_tierAmounts","type":"uint256[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tierAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_share","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]; + +const DVDABIContract = [{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegator","type":"address"},{"indexed":true,"internalType":"address","name":"fromDelegate","type":"address"},{"indexed":true,"internalType":"address","name":"toDelegate","type":"address"}],"name":"DelegateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"DelegateVotesChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Snapshot","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DELEGATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"snapshotId","type":"uint256"}],"name":"balanceOfAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint32","name":"","type":"uint32"}],"name":"checkpoints","outputs":[{"internalType":"uint32","name":"fromBlock","type":"uint32"},{"internalType":"uint256","name":"votes","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"}],"name":"delegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"delegateBySig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegator","type":"address"}],"name":"delegates","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getCurrentVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getPriorVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"address","name":"_addr","type":"address"},{"internalType":"uint256","name":"_initialSupply","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"numCheckpoints","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"snapshot","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"snapshotId","type":"uint256"}],"name":"totalSupplyAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]; const daoStakeContract = [ { @@ -21644,8 +20870,10 @@ module.exports = { cUSDTContract, cDAIContract, cUSDCContract, - xDVGABIContract, + xDVDABIContract, DVDABIContract, + xDVGABIContract, + DVGABIContract, daoStakeContract, uniswapPairABIContract, citadelABIContract, diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 739eab4..d519a86 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -193,16 +193,31 @@ const testContracts = { tokenId: "tether", }, }, - vipDVG: { + DVD: { + address: "0x6639c554a299d58284e36663f609a7d94526fec0", + abi: abi.DVDABIContract, + tokenId: "", + }, + vipDVD: { + name: "vipDVD", address: "0x4bb18f377a9d2dd62a6af7d78f6e7673e0e0f648", - abi: abi.xDVGABIContract, + abi: abi.xDVDABIContract, tokenId: "xDVD", - lastMeasurement: 26158560, // Previously known as vipDVG or xDVG + decimals: 18, + lastMeasurement: 26158560, }, DVG: { - address: "0x6639c554a299d58284e36663f609a7d94526fec0", - abi: abi.DVDABIContract, - tokenId: "daoventures", // Previously known as DVD + address: "0xea9726efc9831ef0499fd4db4ab143f15a797673", + abi: abi.DVGABIContract, + tokenId: "daoventures", + }, + vipDVG: { + name: "vipDVG", + address: "0x3aa8e8B6D3562a1E7aCB0dddD02b27896C00c424", + abi: abi.xDVGABIContract, + tokenId: "xDVG", + decimals: 18, + lastMeasurement: 24819747, }, daoStake: { address: "0xd8f59a99acfc597feb84914fef3769def87e7553", @@ -407,16 +422,29 @@ const mainContracts = { abi: abi.cDAIContract, }, }, - vipDVG: { - address: "0x1193c036833b0010ff80a3617bbc94400a284338", - abi: abi.xDVGABIContract, + DVD: { + address: "0x77dcE26c03a9B833fc2D7C31C22Da4f42e9d9582", + abi: abi.DVDABIContract, + tokenId: "", + }, + vipDVD: { + name: "vipDVD", + address: "0x1193c036833B0010fF80a3617BBC94400A284338", + abi: abi.xDVDABIContract, tokenId: "xDVD", - lastMeasurement: 12838468, // TODO Update lastMeasurement + lastMeasurement: 12838468, }, DVG: { - address: "0x77dce26c03a9b833fc2d7c31c22da4f42e9d9582", - abi: abi.DVDABIContract, - tokenId: "daoventures", // Previously known as DVG + address: "0x51e00a95748dbd2a3f47bc5c3b3e7b3f0fea666c", + abi: abi.DVGABIContract, + tokenId: "daoventures", + }, + vipDVG: { + name: "vipDVG", + address: "0xD6Ce913C3e81b5e67a6b94d705d9E7cDdf073A7e", + abi: abi.xDVGABIContract, + tokenId: "xDVG", + lastMeasurement: 12670237, }, daoStake: { address: "", // TODO Update mainnet address diff --git a/services/staking/vipdvg/handler.js b/services/staking/vipdvg/handler.js index 1420397..65d06be 100644 --- a/services/staking/vipdvg/handler.js +++ b/services/staking/vipdvg/handler.js @@ -16,12 +16,11 @@ const infuraWeb3 = new Web3(infuraUrl); const blocks = new EthDater(archiveNodeWeb3, delayTime); const DB_CONSTANT = 'daoVip'; -// Get VIP DVG contract info from domain based on enviroment -const getContractInfo = (name) => { - const contracts = process.env.PRODUCTION != null && process.env.PRODUCTION != "" - ? mainContracts : testContracts; - return contracts[name]; -} +const getContracts = () => { + return (process.env.PRODUCTION != null && process.env.PRODUCTION != "") + ? mainContracts + : testContracts; +} // Get contract const getContract = async (contractInfo) => { @@ -45,29 +44,17 @@ const getTokenPrice = async (coingecko_token_id) => { return; } -const getDecimals = async (contract) => { - try { - let decimals = await contract.methods.decimals().call(); - return decimals; - } catch (err) { - // Catch error - console.log(err); - } -}; - -// DVG's balance of vipDVG contract -const getDVGBalanceOfxDVG = async(dvgContract, xDVGAddress) => { +const getTokenBalanceOfVipToken = async(tokenContract, vipTokenAddress) => { try { - const dvgBalanceOfVipDVG = await dvgContract.methods.balanceOf(xDVGAddress).call(); - return dvgBalanceOfVipDVG; + const tokenBalanceOfVipToken = await tokenContract.methods.balanceOf(vipTokenAddress).call(); + return tokenBalanceOfVipToken; } catch (err) { - console.log("Error in getDVGBalanceOfxDVG(): ", err) + console.log("Error in getTokenBalanceOfVipToken(): ", err) } } -// xDVGPrice Formula : xDVG price = ( DVG amount of xDVG SC * DVG price) / xDVG totalSupply -const getxDVGPrice = async (xDVGTotalSupply, dvgBalanceOfxDVG, dvgPrice) => { - return (dvgBalanceOfxDVG * dvgPrice) / xDVGTotalSupply; +const getVipTokenPrice = async (vipTotalSupply, tokenBalOfVipToken, tokenPrice) => { + return (tokenBalOfVipToken * tokenPrice) / vipTotalSupply; } const getTotalSupply = async (contract) => { @@ -80,26 +67,11 @@ const getTotalSupply = async (contract) => { } }; -/** - * Get TVL of xDVG. - * TVL = totalSupply * xDVG Price - */ - const getTVLxDVG = async (vault, totalSupply, tokenPrice) => { - let tvl; - const contract = await getContract(vault); - const decimals = await getDecimals(contract); - - tvl = (totalSupply / 10 ** decimals) * tokenPrice; - return tvl; +const getVipTokenTVL = async (vipTokenDecimals, vipTotalSupply, vipTokenPrice) => { + return (vipTotalSupply / (10 ** vipTokenDecimals)) * vipTokenPrice; }; -const calculateAPR = async (apr, lastMeasurement) => { - const oneDayAgo = moment().subtract(1, "days").valueOf(); - await delay(delayTime); - const oneDayAgoBlock = (await blocks.getDate(oneDayAgo)).block; - const currentBlockNbr = await infuraWeb3.eth.getBlockNumber(); - const nbrBlocksInDay = currentBlockNbr - oneDayAgoBlock; - const days = (currentBlockNbr - lastMeasurement) / nbrBlocksInDay; +const calculateAPR = async (apr, days) => { const aprPerDay = apr / days; return { aprOneDay: aprPerDay, @@ -109,9 +81,9 @@ const calculateAPR = async (apr, lastMeasurement) => { } } -const getAPR = async () => { +const getAPR = async (vipName) => { const apr = await db.findOne({ - name: DB_CONSTANT, + name: vipName, }); if (apr != null) { @@ -121,71 +93,141 @@ const getAPR = async () => { return apr; } -// APR calculation Formula : (xDVG's total supply * xDVG price) / (DVG.balanceOf(xDVG) * DVG price) -const getxDVGAPR = async (dvgContract, xDVGContract, xDVGContractInfo) => { - const xDVGTotalSupply = await getTotalSupply(xDVGContract); - const dvgBalOfxDVG = await getDVGBalanceOfxDVG(dvgContract, xDVGContract._address); +const getVipTokenAPR = async (tokenContract, vipTokenContract, days, tokenPriceId) => { + const tokenBalOfVipToken = await getTokenBalanceOfVipToken(tokenContract, vipTokenContract._address); + const vipTotalSupply = await getTotalSupply(vipTokenContract); - // const dvgPrice = await getTokenPrice("daoventures"); - const dvgPrice = 0.225; - const xDVGPrice = await getxDVGPrice(xDVGTotalSupply, dvgBalOfxDVG, dvgPrice); - let apr = (xDVGTotalSupply * xDVGPrice) / (dvgBalOfxDVG * dvgPrice); + // const tokenPrice = await getTokenPrice(tokenPriceId); + // Get token usd price from Coingecko + const tokenPrice = (tokenPriceId === "daoventures") + ? await getTokenPrice(tokenPriceId) + : 0.225 ; + + const vipTokenPrice = await getVipTokenPrice(vipTotalSupply, tokenBalOfVipToken, tokenPrice); + + let apr = (vipTotalSupply * vipTokenPrice) / (tokenBalOfVipToken * tokenPrice); + console.log(`APR: (${vipTotalSupply} * ${vipTokenPrice}) / (${tokenBalOfVipToken} * ${tokenPrice})`); if (isNaN(apr)) { apr = 0; } - const aprInfo = await calculateAPR(apr, xDVGContractInfo.lastMeasurement); + + const aprInfo = await calculateAPR(apr, days); return { ...aprInfo, apr }; } -const getxDVGInfo = async (dvgContract, xDVGContract, xDVGContractInfo) => { - const xDVGTotalSupply = await getTotalSupply(xDVGContract); - const dvgBalOfxDVG = await getDVGBalanceOfxDVG(dvgContract, xDVGContract._address); +const getVipTokenInfo = async (tokenContract, vipTokenContract, vipContractInfo, tokenPriceId) => { + const vipTotalSupply = await getTotalSupply(vipTokenContract); + const tokenBalOfVipToken = await getTokenBalanceOfVipToken(tokenContract, vipTokenContract._address); + + // const tokenPrice = await getTokenPrice(tokenPriceId); + // Get token usd price from Coingecko + const tokenPrice = (tokenPriceId === "daoventures") + ? await getTokenPrice(tokenPriceId) + : 0.225 ; - // const dvgPrice = await getTokenPrice("daoventures"); - const dvgPrice = 0.225; - const xDVGPrice = await getxDVGPrice(xDVGTotalSupply, dvgBalOfxDVG, dvgPrice); + let vipTokenPrice = await getVipTokenPrice(vipTotalSupply, tokenBalOfVipToken, tokenPrice); - const tvl = await getTVLxDVG(xDVGContractInfo, xDVGTotalSupply, xDVGPrice); - const apr = await getAPR(); - return { ...apr, dvgPrice, tvl, xDVGPrice: xDVGPrice/dvgPrice }; + const tvl = await getVipTokenTVL(vipContractInfo.decimals, vipTotalSupply, vipTokenPrice); + const apr = await getAPR(vipContractInfo.name); + return { ...apr, tokenPrice, tvl, vipTokenPrice: vipTokenPrice / tokenPrice}; } module.exports.getVipAPY = async () => { try { - // Get vipDVG contract - const xDVGContractInfo = getContractInfo("vipDVG"); - const xDVGContract = await getContract(xDVGContractInfo); - - // Get DVG contract - const dvgContractInfo = getContractInfo("DVG"); - const dvgContract = await getContract(dvgContractInfo); - - let result = await getxDVGAPR(dvgContract, xDVGContract, xDVGContractInfo); - await db.add({ - ...result, - name: DB_CONSTANT, - }) + const contracts = getContracts(); + + const tokenPairs = [ + { token: "DVG", vipToken: "vipDVG" }, + { token: "DVD", vipToken: "vipDVD" }, + ]; + + const oneDayAgo = moment().subtract(1, "days").valueOf(); + await delay(delayTime); + const oneDayAgoBlock = (await blocks.getDate(oneDayAgo)).block; + const currentBlockNbr = await infuraWeb3.eth.getBlockNumber(); + const nbrBlocksInDay = currentBlockNbr - oneDayAgoBlock; + + for(let i = 0 ; i < tokenPairs.length; i++) { + const tokenInfo = contracts[tokenPairs[i].token]; + const vipTokenInfo = contracts[tokenPairs[i].vipToken]; + + const tokenContract = await getContract(tokenInfo); + const vipTokenContract = await getContract(vipTokenInfo); + + const days = (currentBlockNbr - vipTokenInfo.lastMeasurement) / nbrBlocksInDay; + let result = await getVipTokenAPR(tokenContract, vipTokenContract, days, tokenInfo.tokenId); + await db.add({ + ...result, + name: tokenPairs[i].vipToken, + }); + } } catch (err) {} } module.exports.getxDVGStake = async(req, res) => { try { - // Get vipDVG contract - const xDVGContractInfo = getContractInfo("vipDVG"); - const xDVGContract = await getContract(xDVGContractInfo); + const contracts = getContracts(); + + const xDVGInfo = contracts["vipDVG"]; + const dvgInfo = contracts["DVG"]; + + // Create contract object + const xDVGContract = await getContract(xDVGInfo); + const dvgContract = await getContract(dvgInfo); + + const result = await getVipTokenInfo(dvgContract, xDVGContract, xDVGInfo, dvgInfo.tokenId); + const finalResult = { + aprOneDay: result.aprOneDay, + aprOneWeek: result.aprOneWeek, + aprOneMonth: result.aprOneMonth, + aprOneYear: result.aprOneYear, + apr: result.apr, + dvgPrice: result.tokenPrice, + xDVGPrice: result.vipTokenPrice, + tvl: result.tvl, + }; + + res.status(200).json({ + message: 'Successful Response', + body: finalResult + }); + + } catch (err) { + res.status(200).json({ + message: err.message, + body: null + }); + } + return; +}; + +module.exports.getxDVDStake = async (req, res) => { + try { + const contracts = getContracts(); + + const xDVDInfo = contracts["vipDVD"]; + const dvdInfo = contracts["DVD"]; - // Get DVG contract - const dvgContractInfo = getContractInfo("DVG"); - const dvgContract = await getContract(dvgContractInfo); + // Create contract object + const xDVDContract = await getContract(xDVDInfo); + const dvdContract = await getContract(dvdInfo); - let result = await getxDVGInfo(dvgContract, xDVGContract, xDVGContractInfo); + const result = await getVipTokenInfo(dvdContract, xDVDContract, xDVDInfo, dvdInfo.tokenId); + const finalResult = { + aprOneDay: result.aprOneDay, + aprOneWeek: result.aprOneWeek, + aprOneMonth: result.aprOneMonth, + aprOneYear: result.aprOneYear, + apr: result.apr, + dvdPrice: result.tokenPrice, + xDVDPrice: result.vipTokenPrice, + tvl: result.tvl, + }; res.status(200).json({ message: 'Successful Response', - body: { - xdvg: result - } + body: finalResult }); } catch (err) { @@ -195,4 +237,4 @@ module.exports.getxDVGStake = async(req, res) => { }); } return; -}; \ No newline at end of file +} \ No newline at end of file From aefa1d76119965ead35acb55b17a79be1c035196 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Mon, 19 Jul 2021 15:22:19 +0800 Subject: [PATCH 190/254] Update user's claim amount API. --- app.js | 4 ++++ models/reimburse-address.model.js | 18 +++++++++++++++ services/user/reimburse/handler.js | 37 ++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+) diff --git a/app.js b/app.js index 99fd3ed..d634fea 100644 --- a/app.js +++ b/app.js @@ -98,6 +98,10 @@ async function init() { reimburse.getReimburseAddress(req, res) ); + app.post('/user/reimburse-address/update', (req, res) => { + reimburse.updateReimburseAddressClaimAmount(req, res) + }); + app.use("/api-docs", swaggerUi.serve, swaggerUi.setup(swaggerDocument)); app.listen(port, () => console.log(`Listening on ${port}`)); diff --git a/models/reimburse-address.model.js b/models/reimburse-address.model.js index 33613af..e131047 100644 --- a/models/reimburse-address.model.js +++ b/models/reimburse-address.model.js @@ -13,7 +13,25 @@ const findOne = async (params) => { }); } +const updateClaimAmount = async(params) => { + const db = mongo.getDB(); + const result = await db.collection(collection).findOne({ + address: params.address + }); + if (result != null) { + return await db.collection(collection).updateOne({ + address: params.address + }, + { + $set: { + "claimAmount": params.amount, + } + }); + } +} + module.exports = { findAll, findOne, + updateClaimAmount, }; \ No newline at end of file diff --git a/services/user/reimburse/handler.js b/services/user/reimburse/handler.js index 7aec97a..a51a963 100644 --- a/services/user/reimburse/handler.js +++ b/services/user/reimburse/handler.js @@ -22,4 +22,41 @@ module.exports.getReimburseAddress = async (req, res) => { } return; +} + +module.exports.updateReimburseAddressClaimAmount = async (req, res) => { + try { + if(!req.body || !req.body.address || !req.body.amount) { + if(!req.body.address) { + res.status(200).json({ + message: "Missing user address.", + body: null, + }); + } + if(!req.body.amount) { + res.status(200).json({ + message: "Missing claimed amount.", + body: null, + }); + } + } + + await db.updateClaimAmount({ + amount: req.body.amount, + address: req.body.address, + }); + + res.status(200).json({ + message: "Update Success!", + body: null, + }); + + return; + } catch (err) { + res.status(200).json({ + message: err.message, + body: null + }); + return; + } } \ No newline at end of file From d188adb5b3356e038f6c3f05aec9652de2159b78 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Mon, 19 Jul 2021 17:10:04 +0800 Subject: [PATCH 191/254] Update Swagger. --- swagger.json | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/swagger.json b/swagger.json index cab35a7..e2453d4 100644 --- a/swagger.json +++ b/swagger.json @@ -204,6 +204,18 @@ "responses": {} } }, + "/staking/get-xdvd-stake" :{ + "get": { + "tags": [ + "Stake" + ], + "description": "Get xDVD stake", + "produces": [ + "application/json" + ], + "responses": {} + } + }, "/event/verify" : { "get": { "tags": [ @@ -296,6 +308,41 @@ ], "responses": {} } + }, + "/user/reimburse-address/update": { + "post": { + "tags": [ + "Users" + ], + "description": "Update user's claimed amount", + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "User claimed amount", + "description": "Update user claimed amount", + "schema": { + "type": "object", + "properties": { + "userAddress": { + "type": "string", + "description": "User account address" + }, + "amount": { + "type": "string", + "description": "Claimed amount" + } + } + } + } + ], + "responses": {} + } } } } \ No newline at end of file From a3bee4fa8019319226ae035c26878bc1953950c6 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Mon, 19 Jul 2021 19:23:43 +0800 Subject: [PATCH 192/254] Sum up previous claimed amount. --- models/reimburse-address.model.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/models/reimburse-address.model.js b/models/reimburse-address.model.js index e131047..8fa0588 100644 --- a/models/reimburse-address.model.js +++ b/models/reimburse-address.model.js @@ -19,12 +19,15 @@ const updateClaimAmount = async(params) => { address: params.address }); if (result != null) { + const previousAmount = (result.claimAmount ? parseFloat(result.claimAmount) : 0); + const claimedAmount = previousAmount + parseFloat(params.amount); + return await db.collection(collection).updateOne({ address: params.address }, { $set: { - "claimAmount": params.amount, + "claimAmount": claimedAmount, } }); } From f179c36ccf3926ab57f244808ca15119365175e4 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Tue, 20 Jul 2021 16:18:40 +0800 Subject: [PATCH 193/254] Update contract ABI, add decimals to mainnet vipDVG and vipDVD. --- config/abi.js | 2227 ++++++++++++++++++++++++++++++++++- config/serverless/domain.js | 2 + 2 files changed, 2225 insertions(+), 4 deletions(-) diff --git a/config/abi.js b/config/abi.js index a33205f..2f73ae6 100644 --- a/config/abi.js +++ b/config/abi.js @@ -14824,13 +14824,2232 @@ const cUSDCContract = [ }, ]; -const xDVGABIContract = [{"inputs":[{"internalType":"contract IERC20","name":"_dvg","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"dvgAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"xDVGAmount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"dvgAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"xDVGAmount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dvg","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_share","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]; +const xDVGABIContract = [ + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_dvg", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "dvgAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "xDVGAmount", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "dvgAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "xDVGAmount", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "dvg", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_share", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; -const DVGABIContract = [{"inputs":[{"internalType":"address","name":"_treasuryWalletAddr","type":"address"},{"internalType":"uint256","name":"_dvgInAdvance","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegator","type":"address"},{"indexed":true,"internalType":"address","name":"fromDelegate","type":"address"},{"indexed":true,"internalType":"address","name":"toDelegate","type":"address"}],"name":"DelegateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"DelegateVotesChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DELEGATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint32","name":"","type":"uint32"}],"name":"checkpoints","outputs":[{"internalType":"uint32","name":"fromBlock","type":"uint32"},{"internalType":"uint256","name":"votes","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"}],"name":"delegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"delegateBySig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegator","type":"address"}],"name":"delegates","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dvgInAdvance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getCurrentVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getPriorVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"numCheckpoints","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWalletAddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]; +const DVGABIContract = [ + { + "inputs": [ + { + "internalType": "address", + "name": "_treasuryWalletAddr", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_dvgInAdvance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DELEGATION_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "checkpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "fromBlock", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegator", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "dvgInAdvance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPriorVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryWalletAddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } +]; -const xDVDABIContract = [{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"DVDAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"xDVDAmount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"DVDAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"xDVDAmount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dvd","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"getTier","outputs":[{"internalType":"uint256","name":"_tier","type":"uint256"},{"internalType":"uint256","name":"_depositedAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_dvd","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint256[]","name":"_tierAmounts","type":"uint256[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tierAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_share","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]; +const xDVDABIContract = [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "DVDAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "xDVDAmount", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "DVDAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "xDVDAmount", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "dvd", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_addr", + "type": "address" + } + ], + "name": "getTier", + "outputs": [ + { + "internalType": "uint256", + "name": "_tier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_depositedAmount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_dvd", + "type": "address" + }, + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint256[]", + "name": "_tierAmounts", + "type": "uint256[]" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "tierAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_share", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; -const DVDABIContract = [{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegator","type":"address"},{"indexed":true,"internalType":"address","name":"fromDelegate","type":"address"},{"indexed":true,"internalType":"address","name":"toDelegate","type":"address"}],"name":"DelegateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"DelegateVotesChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Snapshot","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DELEGATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"snapshotId","type":"uint256"}],"name":"balanceOfAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint32","name":"","type":"uint32"}],"name":"checkpoints","outputs":[{"internalType":"uint32","name":"fromBlock","type":"uint32"},{"internalType":"uint256","name":"votes","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"}],"name":"delegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"delegateBySig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegator","type":"address"}],"name":"delegates","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getCurrentVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getPriorVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"address","name":"_addr","type":"address"},{"internalType":"uint256","name":"_initialSupply","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"numCheckpoints","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"snapshot","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"snapshotId","type":"uint256"}],"name":"totalSupplyAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]; +const DVDABIContract = [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "Snapshot", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DELEGATION_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "balanceOfAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "checkpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "fromBlock", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegator", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPriorVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_addr", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_initialSupply", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "snapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "totalSupplyAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; const daoStakeContract = [ { diff --git a/config/serverless/domain.js b/config/serverless/domain.js index d519a86..9996b29 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -432,6 +432,7 @@ const mainContracts = { address: "0x1193c036833B0010fF80a3617BBC94400A284338", abi: abi.xDVDABIContract, tokenId: "xDVD", + decimals: 18, lastMeasurement: 12838468, }, DVG: { @@ -444,6 +445,7 @@ const mainContracts = { address: "0xD6Ce913C3e81b5e67a6b94d705d9E7cDdf073A7e", abi: abi.xDVGABIContract, tokenId: "xDVG", + decimals: 18, lastMeasurement: 12670237, }, daoStake: { From f963fd29ca1c981d944f3238f9a30efae408854a Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Tue, 20 Jul 2021 17:19:01 +0800 Subject: [PATCH 194/254] Bug fixes decimals issues and scientific notation --- models/reimburse-address.model.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/models/reimburse-address.model.js b/models/reimburse-address.model.js index 8fa0588..492cab7 100644 --- a/models/reimburse-address.model.js +++ b/models/reimburse-address.model.js @@ -1,5 +1,6 @@ const mongo = require('../config/db'); const collection = 'reimburse-address'; +const BigNumber = require("bignumber.js"); const findAll = async () => { const db = mongo.getDB(); @@ -19,8 +20,8 @@ const updateClaimAmount = async(params) => { address: params.address }); if (result != null) { - const previousAmount = (result.claimAmount ? parseFloat(result.claimAmount) : 0); - const claimedAmount = previousAmount + parseFloat(params.amount); + const previousAmount = (result.claimAmount ? new BigNumber(result.claimAmount) : new BigNumber(0)); + const claimedAmount = previousAmount.plus(params.amount).toFixed(); return await db.collection(collection).updateOne({ address: params.address From 84f7eb768347662b86c4cf3a2434269001bf726a Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Tue, 20 Jul 2021 20:05:28 +0800 Subject: [PATCH 195/254] Update for daoSTO --- services/vaults/performance/handler.js | 74 +++++++++++++++++--------- 1 file changed, 48 insertions(+), 26 deletions(-) diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js index 3e12952..aebf03a 100644 --- a/services/vaults/performance/handler.js +++ b/services/vaults/performance/handler.js @@ -29,22 +29,19 @@ let contracts; let vault; let BTC_AGGREGATOR_ADDR; let ETH_AGGREGATOR_ADDR; -let INCEPTION_BLOCK; if (process.env.PRODUCTION != "") { contracts = mainContracts; BTC_AGGREGATOR_ADDR = "0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c"; ETH_AGGREGATOR_ADDR = "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419"; - INCEPTION_BLOCK = 12586420; } else { contracts = testContracts; BTC_AGGREGATOR_ADDR = "0x6135b13325bfc4b00278b4abc5e20bbce2d6580e"; ETH_AGGREGATOR_ADDR = "0x9326bfa02add2366b30bacb125260af641031331"; - INCEPTION_BLOCK = 25336169; } // const ETF_STRATEGIES = ["daoCDV", "daoSTO", "daoELO"]; -const ETF_STRATEGIES = ["daoCDV"]; +const ETF_STRATEGIES = ["daoCDV", "daoSTO"]; const aggregatorV3InterfaceABI = require("./AggregatorABI.json"); @@ -97,14 +94,21 @@ function getInceptionBlock(farmer) { } } -async function getTotalSupply(block) { - const totalSupply = await vault.totalSupply({ blockTag: block }); - return totalSupply; +async function getTotalSupply(etf, vault, block) { + if (etf === "daoCDV" || etf === "daoSTO") { + const totalSupply = await vault.totalSupply({ blockTag: block }); + return totalSupply; + } } -async function getTotalPool(block) { - const totalPool = await vault.getAllPoolInUSD({ blockTag: block }); - return totalPool; +async function getTotalPool(etf, vault, block) { + if (etf === "daoCDV") { + const totalPool = await vault.getAllPoolInUSD({ blockTag: block }); + return totalPool; + } else if (etf === "daoSTO") { + const totalPool = await vault.getTotalValueInPool({ blockTag: block }); + return totalPool; + } } // async function getBTCPriceChainlink(block) { @@ -144,13 +148,27 @@ async function getETHPriceCoinGecko(date) { return price; } -function calcLPTokenPriceUSD(totalPoolUSD, totalSupply) { - if (totalSupply != 0) { - return totalPoolUSD - .mul(ethers.BigNumber.from("1000000000000")) - .div(totalSupply); - } else { - return 0; +function calcLPTokenPriceUSD(etf, totalSupply, totalPool) { + if (etf === "daoCDV") { + // totalSupply = await getTotalSupply(vault, date.block); + // totalPool = await getTotalPool(vault, date.block); + if (totalSupply != 0) { + return totalPool + .mul(ethers.BigNumber.from("1000000000000")) + .div(totalSupply); + } else { + return 0; + } + } else if (etf === "daoSTO") { + // totalSupply = await getTotalSupply(vault, date.block); + // totalPool = await getTotalPool(vault, date.block); + if (totalSupply != 0) { + return totalPool + .mul(ethers.BigNumber.from("1000000000000")) + .div(totalSupply); + } else { + return 0; + } } } @@ -230,11 +248,15 @@ async function syncHistoricalPerformance() { for (const date of dates) { try { - totalSupply = await getTotalSupply(date.block); - totalPool = await getTotalPool(date.block); + totalSupply = await getTotalSupply(etf, vault, date.block); + totalPool = await getTotalPool(etf, vault, date.block); btcPrice = await getBTCPriceCoinGecko(date.date); ethPrice = await getETHPriceCoinGecko(date.date); - lpTokenPriceUSD = calcLPTokenPriceUSD(totalPool, totalSupply); + lpTokenPriceUSD = calcLPTokenPriceUSD(etf, totalSupply, totalPool); + console.log( + "🚀 | syncHistoricalPerformance | lpTokenPriceUSD", + lpTokenPriceUSD + ); if (lpTokenPriceUSD > 0 && basePrice == 0) { basePrice = lpTokenPriceUSD; lpPriceInception = basePrice; @@ -329,9 +351,9 @@ module.exports.pnlHandle = async (req, res) => { // case historicalDb.daoELOFarmer: // collection = historicalDb.daoELOFarmer; // break; - // case historicalDb.daoSTOFarmer: - // collection = historicalDb.daoSTOFarmer; - // break; + case historicalDb.daoSTOFarmer: + collection = historicalDb.daoSTOFarmer; + break; default: res.status(200).json({ message: "Invalid Farmer", @@ -409,9 +431,9 @@ module.exports.performanceHandle = async (req, res) => { // case historicalDb.daoELOFarmer: // collection = historicalDb.daoELOFarmer; // break; - // case historicalDb.daoSTOFarmer: - // collection = historicalDb.daoSTOFarmer; - // break; + case historicalDb.daoSTOFarmer: + collection = historicalDb.daoSTOFarmer; + break; default: res.status(200).json({ message: "Invalid Farmer", From d12e8615f211a393f878f19837bcafd0cd491a60 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Wed, 21 Jul 2021 11:35:30 +0800 Subject: [PATCH 196/254] Remove polygon archivenode endpoint from .env.example. --- .env.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 747f7dc..0d0c2f4 100644 --- a/.env.example +++ b/.env.example @@ -2,7 +2,7 @@ SUBGRAPH_ENDPOINT = https://api.thegraph.com/subgraphs/name/rrridges-crypto/year POLYGON_SUBGRAPH_ENDPOINT = WEB3_ENDPOINT = https://mainnet.infura.io/v3/4f8bf400ab354820998e6dfdea0a1b78 ARCHIVENODE_ENDPOINT = https://api.archivenode.io/93mwpmy684fb0dc3c0q93mwpmwlssf6a -POLYGON_ARCHIVENODE_ENDPOINT = https://speedy-nodes-nyc.moralis.io/e783af49d36dc9636abd198b/polygon/mumbai/archive +POLYGON_ARCHIVENODE_ENDPOINT = ETHERSCAN_API_KEY = GEQXZDY67RZ4QHNU1A57QVPNDV3RP1RYH4 SLACK_HOOK_URL = From 837a337bf418dde492cd3fbbfb1ab72c7ec39178 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Wed, 21 Jul 2021 14:09:39 +0800 Subject: [PATCH 197/254] merged bug fixed --- config/abi.js | 1136 ------------------------------------------------- 1 file changed, 1136 deletions(-) diff --git a/config/abi.js b/config/abi.js index 855c75e..1a4888d 100644 --- a/config/abi.js +++ b/config/abi.js @@ -20098,1142 +20098,6 @@ const elonApeStrategyContract = [ } ]; -const elonApeVaultContract = [ - { - "inputs": [ - { - "internalType": "address", - "name": "_treasuryWallet", - "type": "address" - }, - { - "internalType": "address", - "name": "_admin", - "type": "address" - }, - { - "internalType": "address", - "name": "_strategy", - "type": "address" - }, - { - "internalType": "address", - "name": "_biconomy", - "type": "address" - }, - { - "internalType": "address", - "name": "_communityWallet", - "type": "address" - }, - { - "internalType": "address", - "name": "_strategist", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "sharesMinted", - "type": "uint256" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - } - ], - "name": "EmergencyWithdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "SetAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "biconomy", - "type": "address" - } - ], - "name": "SetBiconomy", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldCommunityWallet", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newcommunityWallet", - "type": "address" - } - ], - "name": "SetCommunityWallet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "newStrategy", - "type": "address" - } - ], - "name": "SetPendingStrategy", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldStrategistWallet", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newStrategistWallet", - "type": "address" - } - ], - "name": "SetStrategistWallet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldTreasury", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newTreasury", - "type": "address" - } - ], - "name": "SetTreasuryWallet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - } - ], - "name": "SetWithdrawlFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "unlockTime", - "type": "uint256" - } - ], - "name": "UnlockMigrateFunds", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "sharesBurned", - "type": "uint256" - } - ], - "name": "Withdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newStrategy", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "migrateFunds", - "type": "event" - }, - { - "inputs": [], - "name": "DAI", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOCKTIME", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "Router", - "outputs": [ - { - "internalType": "contract IUniswapV2Router02", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "USDC", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "USDT", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "canSetPendingStrategy", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "communityWallet", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "customNetworkFeePerc", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "customNetworkFeeTier", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "depositedAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - } - ], - "name": "emergencyWithdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "fee", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalValueInPool", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "invest", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "isEmergency", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "forwarder", - "type": "address" - } - ], - "name": "isTrustedForwarder", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - } - ], - "name": "migrateFund", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "networkFeePerc", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "networkFeeTier2", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingStrategy", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "profitSharingFeePerc", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "reInvest", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newAdmin", - "type": "address" - } - ], - "name": "setAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_daiPercentage", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_usdcPercentage", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "usdtPercentage", - "type": "uint256" - } - ], - "name": "setAmountToKeepInVaultPerc", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_biconomy", - "type": "address" - } - ], - "name": "setBiconomy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newCommunityWallet", - "type": "address" - } - ], - "name": "setCommunityWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_strategy", - "type": "address" - } - ], - "name": "setPendingStrategy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_strategist", - "type": "address" - } - ], - "name": "setStrategistWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newTreasury", - "type": "address" - } - ], - "name": "setTreasuryWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_fee", - "type": "uint256" - } - ], - "name": "setWithdrawalFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "strategist", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "strategy", - "outputs": [ - { - "internalType": "contract IStrategy", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "treasuryWallet", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "trustedForwarder", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unlockMigrateFunds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unlockTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "versionRecipient", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_shares", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "yield", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -]; - const polygonEacAggregatoorProxyContract = [{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"},{"internalType":"address","name":"_accessController","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"int256","name":"current","type":"int256"},{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"updatedAt","type":"uint256"}],"name":"AnswerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":true,"internalType":"address","name":"startedBy","type":"address"},{"indexed":false,"internalType":"uint256","name":"startedAt","type":"uint256"}],"name":"NewRound","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"accessController","outputs":[{"internalType":"contract AccessControllerInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"aggregator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"}],"name":"confirmAggregator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundId","type":"uint256"}],"name":"getAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"_roundId","type":"uint80"}],"name":"getRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundId","type":"uint256"}],"name":"getTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"phaseAggregators","outputs":[{"internalType":"contract AggregatorV2V3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"phaseId","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"}],"name":"proposeAggregator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"proposedAggregator","outputs":[{"internalType":"contract AggregatorV2V3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"_roundId","type":"uint80"}],"name":"proposedGetRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proposedLatestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_accessController","type":"address"}],"name":"setController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]; const daoFaangStonkVaultContract = [ From c72fd708a6ca543456e9389cfa69b4123036dd3b Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Wed, 21 Jul 2021 16:02:45 +0800 Subject: [PATCH 198/254] Add network property to each of vault. --- config/serverless/domain.js | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/config/serverless/domain.js b/config/serverless/domain.js index ad5533a..b823ac2 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -169,6 +169,7 @@ const testContracts = { strategyABI: abi.cubanApeStrategyContract, contractType: "cuban", tokenId: ["tether", "usd-coin", "dai"], + network: constant.ETHEREUM }, daoSTO: { address: "0xd6af81e5288be43137debf969d7f2c03482c8cc1", @@ -220,6 +221,7 @@ const testContracts = { address: "0x6639c554a299d58284e36663f609a7d94526fec0", abi: abi.DVDABIContract, tokenId: "", + network: constant.ETHEREUM, }, vipDVD: { name: "vipDVD", @@ -228,6 +230,7 @@ const testContracts = { tokenId: "xDVD", decimals: 18, lastMeasurement: 26158560, + network: constant.ETHEREUM, }, DVG: { address: "0xea9726efc9831ef0499fd4db4ab143f15a797673", @@ -242,6 +245,7 @@ const testContracts = { tokenId: "xDVG", decimals: 18, lastMeasurement: 24819747, + network: constant.ETHEREUM, }, daoStake: { address: "0xd8f59a99acfc597feb84914fef3769def87e7553", @@ -287,6 +291,7 @@ const testContracts = { USDT_USD: { address:"0x92c09849638959196e976289418e5973cc96d645", abi: abi.polygonEacAggregatoorProxyContract, + network: constant.POLYGON } } }; @@ -417,6 +422,7 @@ const mainContracts = { strategyABI: abi.cubanApeStrategyContract, contractType: "cuban", tokenId: ["tether", "usd-coin", "dai"], + network: constant.ETHEREUM, }, daoSTO: { address: "0x742a85daf742ca0213b06fdae449434e0448691e", @@ -443,6 +449,7 @@ const mainContracts = { strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "dai", + network: constant.ETHEREUM }, hfUSDC: { address: '', // TODO: Update that this to mainnet address @@ -451,6 +458,7 @@ const mainContracts = { strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "usd-coin", + network: constant.ETHEREUM }, hfUSDT: { address: '', // TODO: Update that this to mainnet address @@ -459,6 +467,7 @@ const mainContracts = { strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "tether", + network: constant.ETHEREUM }, hfDAI: { address: '0x2cc1507e6e3c844eeb77db90d193489f1ddfb299', @@ -467,6 +476,7 @@ const mainContracts = { strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "dai", + network: constant.ETHEREUM }, hfUSDC: { address: '0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc', @@ -475,6 +485,7 @@ const mainContracts = { strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "usd-coin", + network: constant.ETHEREUM }, hfUSDT: { address: '0xe4e6ce7c1d9ff44db27f622accbb0753c2f48955', @@ -483,6 +494,7 @@ const mainContracts = { strategyABI: abi.hfStrategyContract, contractType: 'harvest', tokenId: "tether", + network: constant.ETHEREUM }, }, compund: { @@ -503,6 +515,7 @@ const mainContracts = { address: "0x77dcE26c03a9B833fc2D7C31C22Da4f42e9d9582", abi: abi.DVDABIContract, tokenId: "", + network: constant.ETHEREUM }, vipDVD: { name: "vipDVD", @@ -511,11 +524,13 @@ const mainContracts = { tokenId: "xDVD", decimals: 18, lastMeasurement: 12838468, + network: constant.ETHEREUM }, DVG: { address: "0x51e00a95748dbd2a3f47bc5c3b3e7b3f0fea666c", abi: abi.DVGABIContract, tokenId: "daoventures", + network: constant.ETHEREUM }, vipDVG: { name: "vipDVG", @@ -524,33 +539,39 @@ const mainContracts = { tokenId: "xDVG", decimals: 18, lastMeasurement: 12670237, + network: constant.ETHEREUM }, daoStake: { address: "", // TODO Update mainnet address abi: abi.daoStakeContract, startBlock: 12770000, // Start block from contract's START_BLOCK - poolPercent: 0.51 + poolPercent: 0.51, + network: constant.ETHEREUM }, uniswap: { ethDVG: { address: "0xd11aD84D720A5e7fA11c8412Af6C1cAA815a436d", abi: abi.uniswapPairABIContract, + network: constant.ETHEREUM } }, chainLink: { USDT_ETH: { address: "0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46", abi: abi.eacAggregatoorProxyContract, + network: constant.ETHEREUM }, USDT_USD: { address: "0x3E7d1eAB13ad0104d2750B8863b489D65364e32D", abi: abi.eacAggregatoorProxyContract, + network: constant.ETHEREUM } }, polygonChainLink: { USDT_USD: { address:"0x0a6513e40db6eb1b165753ad52e80663aea50545", abi: abi.polygonEacAggregatoorProxyContract, + network: constant.POLYGON } } }; From 79368780f2c5c67797ffde12e6830ae4b3980762 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Wed, 21 Jul 2021 16:03:43 +0800 Subject: [PATCH 199/254] Set getEthereumContract() for default option. --- utils/contract.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/contract.js b/utils/contract.js index 4940e45..0277e05 100644 --- a/utils/contract.js +++ b/utils/contract.js @@ -39,7 +39,7 @@ module.exports.getContract = async (abi, address, network) => { case constant.POLYGON: return this.getPolygonContract(abi, address); default: - break; + return this.getEthereumContract(abi, address); } } catch (err) { console.log(err); From 9cee94c85ea1e941705a151db80fb503b7e2e7df Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Wed, 21 Jul 2021 17:33:24 +0800 Subject: [PATCH 200/254] Add xDVD into historical tvl implementation. --- services/vaults/tvl/handler.js | 57 +++++++++++++++------------------- 1 file changed, 25 insertions(+), 32 deletions(-) diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index e2c9bbf..39de16a 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -89,25 +89,9 @@ const getTokenPrice = async (coingecko_token_id) => { } }; -const getxDVGPrice = async () => { - // xDVG price = DVG amount of xDVG SC * DVG price / xDVG amount - const contracts = - process.env.PRODUCTION != null && process.env.PRODUCTION != "" - ? mainContracts - : testContracts; - - const DVGcontract = await getTokenContract(contracts.DVG); - const xDVGcontract = await getTokenContract(contracts.vipDVG); - const amountDVG = await getBalance( - DVGcontract, - contracts.vipDVG.address - ); - const amountxDVG = await getTotalSupply(xDVGcontract); - const priceDVG = await getTokenPrice(contracts.DVG.tokenId); - - const pricexDVG = amountxDVG == 0 ? 1 : (amountDVG * priceDVG) / amountxDVG; - return pricexDVG; -}; +const getVipTokenPrice = async (vipTotalSupply, tokenBalOfVipToken, tokenPrice) => { + return (tokenBalOfVipToken * tokenPrice) / vipTotalSupply; +} /** * Get TVL of specified vault. @@ -149,19 +133,25 @@ const getTVL = async (vault) => { return tvl; }; -/** - * Get TVL of xDVG. - * TVL = totalSupply * xDVG Price - */ -const getTVLxDVG = async (vault) => { - const { tokenId } = vault; + +const getVipTokenTVL = async (vipTokenVault, tokenVault) => { + const { decimals } = vipTokenVault; + const { tokenId } = tokenVault; let tvl; - const contract = await getTokenContract(vault); - const totalSupply = await getTotalSupply(contract); - const decimals = await getDecimals(contract); - const tokenPrice = await getxDVGPrice(tokenId); // Not implemented yet + + const vipTokenContract = await getTokenContract(vipTokenVault); + const tokenContract = await getTokenContract(tokenVault); + + const vipTotalSupply = await getTotalSupply(vipTokenContract); + const tokenBalOfVipToken = await getBalance(tokenContract, vipTokenContract._address); + + const tokenPrice = (tokenId === "daoventures") + ? await getTokenPrice(tokenId) + : 0.225 ; + + const vipTokenPrice = await getVipTokenPrice(vipTotalSupply, tokenBalOfVipToken, tokenPrice); + tvl = (vipTotalSupply / 10 ** decimals) * vipTokenPrice; - tvl = (totalSupply / 10 ** decimals) * tokenPrice; return tvl; }; @@ -185,10 +175,13 @@ const getAllTVL = async () => { } try { - let _vault = vaults.vipDVG; - let tvl = await getTVLxDVG(_vault); + let tvl = await getVipTokenTVL(vaults.vipDVG, vaults.DVG); tvls.push(tvl); await saveTVL("xDVG", tvl); + + const vipDVDTVL = await getVipTokenTVL(vaults.vipDVD, vaults.DVD); + tvls.push(vipDVDTVL); + await saveTVL("xDVD", vipDVDTVL); } catch (err) { console.error(err); } From 988c326ff30a1d2450af44bc1c3aea806de87a72 Mon Sep 17 00:00:00 2001 From: Soon Lai <43904148+soonlai814@users.noreply.github.com> Date: Thu, 22 Jul 2021 17:56:12 +0800 Subject: [PATCH 201/254] Update whitelist.js --- services/reimbursement/whitelist.js | 5100 ++++++++++++++------------- 1 file changed, 2726 insertions(+), 2374 deletions(-) diff --git a/services/reimbursement/whitelist.js b/services/reimbursement/whitelist.js index 5f9e81f..2d60caa 100644 --- a/services/reimbursement/whitelist.js +++ b/services/reimbursement/whitelist.js @@ -1,2375 +1,2727 @@ const whiteList = [ - ["0xa23cff7a4f319445e4584897941bf478b4931abc", "461040000000000000000000"], - ["0x2e811568b0fb4b6e9077c4cd2d57c34f554b835d", "425791000000000000000000"], - ["0x5dce3cf1bbdd8fee714cf7ec1f00b817cbcf2160", "138889000000000000000000"], - ["0xd4ce1744799b189c7a19a3d3ce0aac8de60f781b", "209221500000000000000000"], - ["0xe38fd1c83bb7883adc4b5b910c6f6e8311da3b6f", "173889500000000000000000"], - ["0xa66bf5d22d48b69a08746d28c711f6d56d44480e", "87764000000000000000000"], - ["0x3374c353f4bcd5772a0d4def26e3857e2a45cab2", "70002000000000000000000"], - ["0x87d67301a24d7b94224cdefcf943417162ae7007", "65656000000000000000000"], - ["0xef3fdc051bac5ccb7aa1de3a0c2b3a463cb6c677", "46679000000000000000000"], - ["0x468e7f6f6438864dd31ef61961dfd3e01b69180f", "45301000000000000000000"], - ["0x21cbbc3639d35bf216c8ecc111876a96177e465c", "44171000000000000000000"], - ["0x2a8ac196905afff02550b547af6110c87f504b8e", "44032000000000000000000"], - ["0xdc31df63ca0b6de64bc62d81844e8956d2476541", "84223000000000000000000"], - ["0x809676df9f7ef012b1201e767575bc9b5aebd108", "41668000000000000000000"], - ["0x88168d089f75f5cd93f777ec16bbb178a7c7b512", "41151000000000000000000"], - ["0xb0823fffac86c709c658db3f8765e9da8c7d9647", "37811000000000000000000"], - ["0x1688888ebdab05737cf752acf7d11d82f21ac5f2", "37195000000000000000000"], - ["0xb67dfcf4dec5944101d363ef4ec8bfb1996eff82", "32303000000000000000000"], - ["0x5f60ad4ed6777500005b4179deff0eec362b5c25", "30000000000000000000000"], - ["0x2c5651d9c4d9a9031ff789845f2d44c82f194033", "27778000000000000000000"], - ["0x13991cc1ffae4cf57c5caefb951826ffa54a88af", "26602000000000000000000"], - ["0xec578146b22d7ef5f6e5c69fdde00bdaa5f0b33b", "26529000000000000000000"], - ["0x3b54a04374a884cb70f45abcc0539037bcfb9da2", "26460000000000000000000"], - ["0x73c52612f72075361bd707934dbc2b4358c58f32", "26388000000000000000000"], - ["0xc599c65767d1527bda5064676aa6de96c65a2ad4", "26388000000000000000000"], - ["0xad25daf8b180d846c78fe7b4aabd83f881d6b733", "26388000000000000000000"], - ["0x9f7ae94f69d27bc1e8f895f21d8c13cdcbe3bdf0", "25752000000000000000000"], - ["0xd1dadf4a440afb322d1b8fc3aa2e6f4f5ed6c68a", "25371000000000000000000"], - ["0x05534d1785113ff3b24b7402971bd2efb395f699", "25001000000000000000000"], - ["0x22431dff508f62be49108848141b28bdcf3a3d4a", "25000000000000000000000"], - ["0xcee520071a03f70f5839f915e43989a59bdb8b1c", "25000000000000000000000"], - ["0x6d17a1d100ba0732a72c309834c8cb7aa3690e4a", "25000000000000000000000"], - ["0xa9c7caa7029c886ed5463155217110c25d8ee393", "25000000000000000000000"], - ["0x9467f85edba87ede9c42e6dee079aab29879ce79", "23612000000000000000000"], - ["0xbeeaae250ca286a7b861c8b0fcb1d5bbdee44394", "23612000000000000000000"], - ["0x3938f63158de24fdedb8f8953db13bd581118f89", "22960000000000000000000"], - ["0x1b33838ecca98a302bb10d7de6eb8ea25120239b", "22059000000000000000000"], - ["0x9fb1c52126c34fc0a0e4b37bedd2e65fe5617654", "42251500000000000000000"], - ["0x60f13d97e7342b046396705952afaf9b9f9a442d", "41667500000000000000000"], - ["0xa8ce9d6c62ffa6e4cec0d215624f9a1419d78ed2", "20834000000000000000000"], - ["0x0975c2e82af9eb16c68f682fe50e864ae557de72", "20577000000000000000000"], - ["0xa9b3e4e7667d96cc5bc44bbf17e80fa39f1e5006", "20096000000000000000000"], - ["0xd46808f9c39b9bfea1cd817f2e8c2ecb3184a5bd", "20000000000000000000000"], - ["0x3c495a69ff82e36a6479f4af470f6389676d0b9f", "16705000000000000000000"], - ["0x752663015b9bb32d0ffb575967a833176b793f1e", "16541000000000000000000"], - ["0xc106905443d60547546e9913055c297b7bb9c481", "16171000000000000000000"], - ["0xc0b374f27abccd5f34e30ba437adf10f084a66c4", "15666000000000000000000"], - ["0x54e10526b3bbb5e51cd26d3db374e4332d8fee8e", "15112000000000000000000"], - ["0x5b4275ba1251b4692ec8b76bdc78111031d2a7cd", "15007000000000000000000"], - ["0xa59b5f2d362ce789671212bd8e18b2d928ca60e3", "15000000000000000000000"], - ["0x472c8e03d9972e1ae1774346b18f091462eb24f0", "14772000000000000000000"], - ["0x78ffe1e4ada70afaccd803355d2241e2e1bcb5f3", "27952000000000000000000"], - ["0x3fc46fa504a40830cb5a0416b9625b88e1eb41af", "27779000000000000000000"], - ["0x9bf7b27182e988d302ca1ec1f64a6ae59dbce3fe", "27779000000000000000000"], - ["0x0df3cea37ea6146657ef5f393cb51edc579bc552", "13890000000000000000000"], - ["0x254265d8f5d988426f2297e9b68997815737ad0b", "13889000000000000000000"], - ["0xdd8fe8805751ef039795f998cbee33aa861018f8", "13339000000000000000000"], - ["0x3c0d9d0e15a4422ff8c27a496b9c786ae1b7a5bb", "13166000000000000000000"], - ["0x9d43b4dec57280f4d8923d0404ebb8416bcbcf84", "13153000000000000000000"], - ["0xb0dbfa6e34adf8cbca0332a155f0fd9b93abf35c", "12904000000000000000000"], - ["0x2897958f27ef55067e39afd882f2f5695d266e98", "12780000000000000000000"], - ["0xbec118e18379f10ddd4c57c708f4e43a41afbcbd", "12716000000000000000000"], - ["0x2c12f81506c3bbd3a5250f742a877fd30f6460aa", "12571000000000000000000"], - ["0x10b9924602f31b716821eccb7b81ba0c3f9b34e0", "12500000000000000000000"], - ["0xbaed499414cc63472d770c0b329b6720f271cece", "11659000000000000000000"], - ["0xf03abdc9039400ed2434218415895ee2b7da8b7b", "11397000000000000000000"], - ["0x9037398f5c6e14a8654c59539c16f84123dd425c", "11084000000000000000000"], - ["0xcce8d59affdd93be338fc77fa0a298c2cb65da59", "10870000000000000000000"], - ["0xe3232b4e03cfea16e1dfa908b52cad3a4ae2592f", "10417000000000000000000"], - ["0x60f84a94673d3802588ebcaf494da34e1a636067", "10408000000000000000000"], - ["0x8a20ecc5dcf7cfdcadd9969c66366ec958317fb5", "10399000000000000000000"], - ["0x2764f88fe0cf47fbd481f5f1166eb8da0ed7feb6", "10278000000000000000000"], - ["0xcd003b9ce7b1c64b57857710beccdda8d982a740", "10263000000000000000000"], - ["0x86e6f18c836882e7429592d9d5261bdd4f3eae29", "10011000000000000000000"], - ["0xa1ecb46c0be223dff23efda8bd553d17b938af47", "10006000000000000000000"], - ["0x113e21c37cab951c281476dc7ee8951d3ec6d6be", "10000000000000000000000"], - ["0xe1cb0ddb050889f7c99a2859c81729ff5ca6d29a", "10000000000000000000000"], - ["0x492059918a8d8c9435768b56ec848062e6a27bc9", "9907000000000000000000"], - ["0x81864360d166e53446390454422a3d0e904005f5", "9538000000000000000000"], - ["0xc03c4476fbe25138bf724fa1b95551c6e6b8fd2c", "9522000000000000000000"], - ["0xb50c13ac04ad1e1b074d76eb64356a08cfeeb449", "9054000000000000000000"], - ["0xb3a14719e1da663e7f48fbaf97ef872990551243", "9034000000000000000000"], - ["0x003f7293e7282b4c8ca4a807f3f621a0659f1c09", "8857000000000000000000"], - ["0x553c6a57a1436fa9d7275d77cd3d3ea62c75ca17", "8750000000000000000000"], - ["0x4e9ce0f37ad40d302fd3af2909ee7101b17c9c37", "8627000000000000000000"], - ["0x8e044b15ea6bd5b4d6b1aa7196eec81bcb33dfd8", "8500000000000000000000"], - ["0xfdae0e73be9d4bb5439ed1724af6435fe91c1c69", "8378000000000000000000"], - ["0x3b1d75ad5170136f41ba923139ff6f45932ba546", "8356000000000000000000"], - ["0x7767319acedbbd5192ac06150424909a27138544", "8334000000000000000000"], - ["0x2966e925cc8c2e0c4b39adbf22194265c0584858", "8303000000000000000000"], - ["0xe708acf4264610f0fe7064f498666cfefb9648c6", "8178000000000000000000"], - ["0x1946102fa977780a0c265b6073f206c2d6d3bfa3", "8018000000000000000000"], - ["0xa8b5eacc8b5c10cc8b68b315cb9781b311a7ac3f", "7937000000000000000000"], - ["0x20f542e36ccb48129524c4592c7f040300336b92", "7726000000000000000000"], - ["0x8c09f9dd2289e88acf387601873da8a4b766fd33", "7600000000000000000000"], - ["0x092c741651725063aaebf422f2ba775875ca4dc3", "7600000000000000000000"], - ["0x7a2121e0b92ae39ca9fdca303e73753c21e35f25", "7538000000000000000000"], - ["0xc70628f0931abeeb9864b5a632439f30118e384c", "7534000000000000000000"], - ["0xdcf8d6905ed8e2c8e2194a99c22f1232398ef3b0", "7378000000000000000000"], - ["0x6ffbca4259dfcec4b72bed5008704468208e7635", "7288000000000000000000"], - ["0x4217309cab4803fb455b0d6d33678dca3555cf01", "7283000000000000000000"], - ["0x04c860013028fcad8762518cff977516f5a21662", "7216000000000000000000"], - ["0xbc5b6246fd1e1f50185df9ec8d14354ceb8f8917", "7205000000000000000000"], - ["0x4b1c40ec0452e28a885aabe08e2f2b32cca85ff5", "7153000000000000000000"], - ["0x754c3c591dd4f3922cbdca43f0735f2efaf41541", "7069000000000000000000"], - ["0xe5348acca3061a742af08be6b6d102879e06b8c9", "7060000000000000000000"], - ["0x51e00a95748dbd2a3f47bc5c3b3e7b3f0fea666c", "6945000000000000000000"], - ["0x14290920ddf69e07a3b8e5b6a40b51dc75a802c2", "6862000000000000000000"], - ["0x405227400e15b125609acfcecfca5008c175ddba", "6775000000000000000000"], - ["0xa64333ed5ef49bb2ba34530563b39e0a2b9e0586", "6597000000000000000000"], - ["0x14c4cb6077c8929386428c853a65d5c2be033945", "6515000000000000000000"], - ["0x80fdcdd692c0a586723a8cfb940f4739917182da", "6479000000000000000000"], - ["0x605cdb5968e47fd867783b60f8390479f699eab9", "6423000000000000000000"], - ["0xb75f87261a1fac3a86f8a48d55597a622ba3cc48", "6388000000000000000000"], - ["0x1461bfdc10cabb981f4eb9d64a3cfc174f7cc56c", "6282000000000000000000"], - ["0x8237f4daa90abc0a4e2097a8b423dbc6c0d0d614", "6253000000000000000000"], - ["0x450fffcdcca801488ac805f2bbb30e0447aef746", "6250000000000000000000"], - ["0xa65a4aefdddddd8c8614d820177ff52c2076d70a", "6072000000000000000000"], - ["0xdb59117e9c20c7f79fb1ecfb4497c38aeefa7919", "6014000000000000000000"], - ["0xfd68e3ef807230c2b7859a47c8a33e81a439bbc6", "6000000000000000000000"], - ["0x5cfa454b330a9166b377aa51b8d030b3ea5910b7", "5977000000000000000000"], - ["0x296ac1ff52b9ff97b404b93da139443b4d81843f", "5817000000000000000000"], - ["0xb03e52e5b8ae0a203212662a6a0e3cfece59630d", "5743000000000000000000"], - ["0xb2fc53f237cf2d72a8b7a6589bb72b9711552c90", "5731000000000000000000"], - ["0x21d4c58c8aae74f33c96f9b62308a413f39cdd27", "5673000000000000000000"], - ["0xb585814c924440cebd8954ded5b97b59f65aaf50", "5631000000000000000000"], - ["0xee9cbd996f33efae4b53329c9f9efa500ca6e365", "5630000000000000000000"], - ["0x07c83d42c835ac1b56a02fec4788a456116e5453", "5587000000000000000000"], - ["0x58a4b71db382a108171e2cc9b6dd490aa5514fb4", "5429000000000000000000"], - ["0x563400e04295c1f28b4ac4872b91a0e52cb520a8", "5318000000000000000000"], - ["0xeda057376704bfbe71971aa21b249449dc7bae3c", "5292000000000000000000"], - ["0x89e8c756efa594116409929ecbde979a8ea1de14", "5185000000000000000000"], - ["0x6247bf5f0037a090dc33b74d5357ec46547a9ba8", "5121000000000000000000"], - ["0x912dd31f6a07ece098df4350682c2090a19b2fcf", "5049000000000000000000"], - ["0xfee724806ef43fe223fc77bf92554b1d8caf772d", "5006000000000000000000"], - ["0xf1f4ca7fa63f93b473c0e0b567643c50c2876f93", "5001000000000000000000"], - ["0xdbc57a1dc6bf9080c10b2d66be3afef7ba2a4f19", "5000000000000000000000"], - ["0xfc795960c9f785a2cb599c1e0d949dc5c19f6258", "5000000000000000000000"], - ["0x14fe1322209eaccafe3f7545195bd163359cdf0d", "5000000000000000000000"], - ["0x1a77abd08956b73ab2fd7d9a2c25fac53495bef5", "4990000000000000000000"], - ["0x53cbf587156d4970e452967794962f67dd3ba110", "4986000000000000000000"], - ["0xd79a3323119dfe910c6ac7c506036be6ebd44417", "4929000000000000000000"], - ["0xf3bfb88affacbecefc1a570a848a79cde46291a4", "4835000000000000000000"], - ["0x74102bc480a41681e66add3ec9378ae6f3a79652", "4826000000000000000000"], - ["0x57aabccd6f5e465f6359fa9d5c11aefa34925cb5", "4748000000000000000000"], - ["0x3296474f536bdf252eddee60e1580f0cbc72e286", "4723000000000000000000"], - ["0xbcf6f519b022927f7160f940d7646decf75f68aa", "4715000000000000000000"], - ["0xe03d7d4d41c403d65505c29e4717a06ffc10da00", "4652000000000000000000"], - ["0x860be57d3951c3dadc7a21156b82949596a18de7", "4611000000000000000000"], - ["0xd70a9dcd0753dd7ad9cc49d434b91659a6165512", "4574000000000000000000"], - ["0xf43c75b8af6cbe076918069ba5d5fc9d1afac954", "4557000000000000000000"], - ["0x94d2f2c38b5a198df362dae026c72d3cf27725dd", "4520000000000000000000"], - ["0xf14fe2d917f5b59e90a199a401bf1ad7f3a59265", "4479000000000000000000"], - ["0x598c2fe8ceea012153f2fd9cd77cb1b5befdca39", "4458000000000000000000"], - ["0xb0e24f33249c4f85ef1df3e2773ac94b0e637a00", "4398000000000000000000"], - ["0x032c1a94b8039773aa839e38d4d76e0e991dd7bf", "4375000000000000000000"], - ["0x164d909ea9986f95a8ecf9ae141de56dd0c2d86b", "4354000000000000000000"], - ["0x7d2098ea80cb929e9fcf79ed18092ef3034239d2", "4354000000000000000000"], - ["0xf3b08a2e2747a0638ad91e163be3a251f26b6c38", "4354000000000000000000"], - ["0x4b9b7dda7c64046776b0166f4f71a2cf058c3e56", "4315000000000000000000"], - ["0xd4ada92d41687b960856cd16755f4dbd4a82d70f", "4266000000000000000000"], - ["0x44b2fc812df9b5945a88a1d2f70f217c2afa292c", "4245000000000000000000"], - ["0xd6f82c5b7af5a6ba2a60421d304c93abd2a98bb6", "4196000000000000000000"], - ["0xbaacf4656a2b60c54445db7211988edfc3cd98cc", "4183000000000000000000"], - ["0xa5b55e9277f39ed77a09319a36acf4961a1a67e3", "4151000000000000000000"], - ["0x7558d0ed461e0fd323556a049167d90d25a78a0a", "4147000000000000000000"], - ["0xa44f346aa65d88bc2cf51ce1f2651187f005be0a", "4145000000000000000000"], - ["0xb2780b37a3197f2ff03733ac84a8b3fdf7fcf10d", "4128000000000000000000"], - ["0xb1d58b06fccd1aaab557d895f494d8457fd488a2", "4096000000000000000000"], - ["0x2b2434b24c58486a16953952acef2c4adcf7033a", "4056000000000000000000"], - ["0x2adba2d00c7716f5b218b4df61fbfe30fb52d191", "4022000000000000000000"], - ["0x43fce290181eb60bdd2ea8b2a7695387da3416bd", "3977000000000000000000"], - ["0xd012e4961de1d7138305bda73d37587916cbc68c", "3925000000000000000000"], - ["0x40f293766af55e2ced9d2bee7ef1d584bcee41d3", "3839000000000000000000"], - ["0x95d43258483ade54f7a2c53dc985031f0f619286", "3827000000000000000000"], - ["0xc25e850f6cede52809014d4eecca402eb47bdc28", "3807000000000000000000"], - ["0x7d0d0e6c6b57a116429ab14d08303e8f71b452f4", "3800000000000000000000"], - ["0xfbde6d57645b6b9c259e84ee0071b71e0572683e", "3799000000000000000000"], - ["0x58a19d5dadd2f465ba16e1358a9cd113ef279cef", "3772000000000000000000"], - ["0xd1a59dccb20ee4750b4840eaaa2b8a3796581dcd", "3769000000000000000000"], - ["0xaf914aa608b13ae7cf94cb38a99bbad15387e28d", "3754000000000000000000"], - ["0x7e6b47cf352ca5e3713af88dc4fdc23b60ad67f6", "3737000000000000000000"], - ["0xab8410bb53ce7e27bd45b86ec7b3688159c512ec", "3690000000000000000000"], - ["0xa8dbc1ee88a30efeef9692e7476620279e8f95db", "3660000000000000000000"], - ["0xf0025d7f196d8d5d5a944c311896bf94dd3efafb", "3600000000000000000000"], - ["0xd1a863da4c548fb5bf6915292e635b58ef38b77b", "3521000000000000000000"], - ["0x1227b6bce1b40ea3d2edd33c5107454acb9d5fe2", "3509000000000000000000"], - ["0x4ca1fac10635f822aea0d0cdfacb958ba029f56e", "3496000000000000000000"], - ["0x193dad0127f564d973aba50b373db51fd2f2588a", "3468000000000000000000"], - ["0x360b254c868064168d9dd8dd7d7e103fdc5c7f8d", "3461000000000000000000"], - ["0x6bce1ea16205869fa7f28f12e217993304019e7e", "3446000000000000000000"], - ["0x46a15045f68feb474938e2c7155c05bce5f104cc", "3419000000000000000000"], - ["0xe32f576578f9aea942226b6a280fbce93da45638", "3418000000000000000000"], - ["0xc1a0c65a031374ab3e6692ca32320bc04e546419", "3397000000000000000000"], - ["0xd3ba5a299c45c3a6e1b5739964d68dff822fa658", "3367000000000000000000"], - ["0x3410afba6587ae91909d5c5d020c8dcae4048188", "3336000000000000000000"], - ["0x594ba954d7da509ace74ea9e185a7dfe81fa8f2a", "3333000000000000000000"], - ["0x5c18260c85efe5a4a26efae933588d80e727bebe", "3315000000000000000000"], - ["0xafdebb99329df4d002919aae3d8b055bc9053e20", "3305000000000000000000"], - ["0x4a4d58adb25180f2e36c7429ba17bc4a79a21eb1", "3299000000000000000000"], - ["0xa73e5baee3eda185b4f844c3615ec2c8efcc9241", "3299000000000000000000"], - ["0xd7d7d68e4bdcf85c073485ab7bfd151b0c019f1f", "3284000000000000000000"], - ["0xf249e7b44c5ae0f3e216f79d9925a47a23438c6e", "3282000000000000000000"], - ["0x8181dd76e1ad2362407973aa2f63159288932e0b", "3260000000000000000000"], - ["0x9bb4ba47e280674fdd60be04e70af293a80dc99e", "3257000000000000000000"], - ["0xf7b28eb110feadbef0af896b82045676bd329714", "3206000000000000000000"], - ["0x0dc290114023af5614868a6ef0147be261a4baa7", "3191000000000000000000"], - ["0x6dd8afd0338510eef17db0fb4f76b0cfab9002d3", "3172000000000000000000"], - ["0xdb94bf07317d263b2f7d771c0652bff5dba0de2f", "3139000000000000000000"], - ["0x93aab40dd6888569598dd97463373db270b47977", "3125000000000000000000"], - ["0x1075df73e8532bfb64164e94924c6898ebcf7635", "3125000000000000000000"], - ["0xe8869dfe6492c4f6f078ba74c651b4808bfb784b", "3125000000000000000000"], - ["0xd8f01abaa9afafbffc4039e79410dcd938cd64b1", "3123000000000000000000"], - ["0x7002c4c3a0c5dd007cd323ce1b43d128d04bd63e", "3087000000000000000000"], - ["0x60ef9085391291e674802975fdf53cccccf8b70f", "3081000000000000000000"], - ["0x5a68fa86f34e3c4a9f49dcaa6b5c4da816aba829", "3046000000000000000000"], - ["0x74fc66cc35b90cf3f8ffa0b08ab7b00acd419a48", "3038000000000000000000"], - ["0xbf9d36e48125a856e5ebf4eaba8e314cace90663", "3038000000000000000000"], - ["0xac9ea7537e24c736918c33ce30e16d57e3efebed", "3032000000000000000000"], - ["0x527422122bc5508d68dda6903bca53740a1a3248", "3006000000000000000000"], - ["0x098fb583a27052ad8533d8dc0767f648f464db13", "3001000000000000000000"], - ["0xaea4565a717e4ba257035829ca6055a2c6e151c5", "3000000000000000000000"], - ["0xd382570c8c16fa6bd31302e5cb2bfa4f58ba1004", "3000000000000000000000"], - ["0x8598770dd49c6c867d2019336ce66c04278c9a8a", "2997000000000000000000"], - ["0xd350a04d2566b5356afc7b6ec93db428084d7392", "2990000000000000000000"], - ["0x95ff03009c97dfc85675e3540441f278cd3491a9", "2969000000000000000000"], - ["0x4495e211f9e46b97c75d95fa0863243e7d74b9fc", "2968000000000000000000"], - ["0x44c6c0bdf106c2248174577c5342dc785a981bf3", "2933000000000000000000"], - ["0xb99f63fda30bd3afbc73c0c4afeb728b3a451ea3", "2922000000000000000000"], - ["0x3cd5496a6e4d789e40961259e257ba1fe4ec32f2", "2883000000000000000000"], - ["0x5e154121e1b9279a26f9f477310acafbe11bd91b", "2830000000000000000000"], - ["0x388411e858cb11414b7eeccf26c8c6a2c23ec52f", "2824000000000000000000"], - ["0x39427de5d859576c849f4ac0e4601a2504697bed", "2816000000000000000000"], - ["0xeb090b315b21b4e46f9e789c314da9c2fb974e23", "2793000000000000000000"], - ["0x8d81209f5619ef5f35878a8c459b8680a54ef057", "2788000000000000000000"], - ["0x43db77a27790a91ecbe9bb8e974d5fadd17d53c5", "2787000000000000000000"], - ["0x7161f402ffdae5c4d63a750139ad714a3233ca9a", "2770000000000000000000"], - ["0x12e468a4ee35da7d5e5128b222c008b6a5453dc5", "2768000000000000000000"], - ["0x4e6180f2eca3f9bbba840f324502a95cf38cb468", "2745000000000000000000"], - ["0xc02132ff17c01bb0a36fb9d622d3bc3dc9df0adb", "2705000000000000000000"], - ["0x63c4f08599d91ec68bbfb118f087f7e56c3dac71", "2685000000000000000000"], - ["0x066369d37121ad4b0565ae86af6afc7f92cda522", "2683000000000000000000"], - ["0xa50d73d6b1ebb47b633a093884b72331f1df2903", "2675000000000000000000"], - ["0x3abcb5d5fb4044620c319bb63c5540a04e024aa1", "2675000000000000000000"], - ["0x49c6f828acaf25e548d77e4487d14c385a19370a", "2659000000000000000000"], - ["0xe9d1b2be36cd8f868183bccf553c4e893ce64b28", "2633000000000000000000"], - ["0x2574a67bdff7a08169d91f4d57a0116b15cf710e", "2614000000000000000000"], - ["0xf3e4d991a20043b6bd025058cf4d96fd7501070b", "2611000000000000000000"], - ["0x1f56b9d1b9e1745f69510ac87a5f7686bc014876", "2603000000000000000000"], - ["0x8f045416a994751f1e106297149d6f743b993556", "2603000000000000000000"], - ["0xf1479af81176cead86a155940bb7c8d5366ed31d", "2592000000000000000000"], - ["0xb0ed71a81cc64a0e81a900b74bd8814141a62cfa", "2588000000000000000000"], - ["0x6df3b8c8d4981ec6deed2fdafafae95888f670c0", "2576000000000000000000"], - ["0x7d6fbc9a46cc83d74fc6712f83e2e1b49ed934fb", "2552000000000000000000"], - ["0xd9f72143b4105402c1f254ccd47e1853e80a4df4", "2539000000000000000000"], - ["0x1cb41360375dfe8ac94a6e10a9027e364966cfd1", "2536000000000000000000"], - ["0x47602a969b3b978147e25a23dcf87565831e8a7c", "2527000000000000000000"], - ["0x6bd39ecd7fb71d37866146618d781492e5568dd2", "2527000000000000000000"], - ["0x04307c5c7878d8d3374a73a2d08f9a9b7dfc5cc6", "2524000000000000000000"], - ["0x0c60ec8c9f4aecc22c838a5c35137465660cea55", "2520000000000000000000"], - ["0xeffe60ec0bd219760eb40e8b810c54dd2eddc351", "2508000000000000000000"], - ["0x589444ad1b6b6cfff04ae5a7bed9b5b00ec09c3a", "2505000000000000000000"], - ["0x57f1dd3e391b25011faf40dde74c54c7098cc5ff", "2500000000000000000000"], - ["0x7e3df6203b66cd77f724e3d52f7fc9597ebf5640", "2500000000000000000000"], - ["0xc04c10834f669237282dce7ee4c3e4ac9ed490c6", "2483000000000000000000"], - ["0x152254c00a481e75b392db07538a8a35aa83b971", "2472000000000000000000"], - ["0x3092c89b545e38b47d36ff7bd298ebae735ed637", "2444000000000000000000"], - ["0x839b3b71448af0a5d3c28e154f265e7045528132", "2440000000000000000000"], - ["0x7310e939c0a814f15065ce27afa8d493e30c899b", "2437000000000000000000"], - ["0xc6036c93d956c4ac1b84bf4984f2eb4730731f7c", "2380000000000000000000"], - ["0x30fda24649eb8346d933837a9d4c1c9d76852d01", "2377000000000000000000"], - ["0x7b2af7a96ae32d71eec4d58708c046c588136683", "2362000000000000000000"], - ["0x5159d30a3f42b65ac459618b2aebfe757a81736a", "2344000000000000000000"], - ["0x33708692c5b03b031efd133f71e9c310ff2ad0b9", "2344000000000000000000"], - ["0x03783617290732be0c02166a4a5641f59bce8be3", "2335000000000000000000"], - ["0xc87d678c7fefa7c4eb3ce069cc89bb87d0831c8e", "2284000000000000000000"], - ["0x98bc894eaf9af129dcfd53eb8b6c1af3d860ec7f", "2263000000000000000000"], - ["0x868e486f3a00cf0ae17b1c55032e80504c67d708", "2262000000000000000000"], - ["0x78101af8fe6f833ac524852def611ab369adfa73", "2258000000000000000000"], - ["0xb6b6362fe7f912d557afe0e8b4f68068d4018731", "2256000000000000000000"], - ["0x69a9e74a795173e2bbb8c70113048edb234bbc40", "2230000000000000000000"], - ["0x08b3f7dd2e443fb03487538f8f31e6411b589d09", "2213000000000000000000"], - ["0x13e42ee586d7277b3ffe0ac42d1bf1ecb3632b34", "2209000000000000000000"], - ["0x2bd6453653efb934a642a383fe8ace4d3e3a4a79", "2208000000000000000000"], - ["0x5abb2333de084ab4eb31f48341b1ef8d115a329b", "2200000000000000000000"], - ["0x20c75587792bd5bfbe96abb680e9faea5b3edd9f", "2200000000000000000000"], - ["0xca1e9f0ef2f5cc54d3fa14d3bfde1675a168bad5", "2199000000000000000000"], - ["0xcc03e33fc298f2d627c62ac42cca953a4e01bd4c", "2199000000000000000000"], - ["0xc725c9c374006989c5878c80989d70b6bd275c0e", "2199000000000000000000"], - ["0x59e62fee4888039c5edf467a7c210b5cc1d449da", "2199000000000000000000"], - ["0x90a92d256a27b67b4c4f3c5382e2fe826ce8fbe9", "2183000000000000000000"], - ["0x22f278deba92ce1861d1b6f4f0cab72ebd745662", "2150000000000000000000"], - ["0x54ee4d0f0b7037ba0a2705a97cbdd5487bfebd22", "2147000000000000000000"], - ["0x5e35fd90ae2978334b6672536e751f30aff2f4d9", "2142000000000000000000"], - ["0xc46828ae2e8229efb80ea6c832dd598d26d7d968", "2142000000000000000000"], - ["0xa6355adb4e10156bcde1c2d57684d42628d8fdda", "2128000000000000000000"], - ["0xbedbb0cb2938f906a847203c2641c1403b75b9e8", "2122000000000000000000"], - ["0x56da79d3a5c205c6fc87ad269b702c59ff1c76af", "2117000000000000000000"], - ["0x42e53bb7698b0ebca963abf668c6b441ed0c57e2", "2116000000000000000000"], - ["0xc7e070b317588e04ad189144668da4e7160f0b2a", "2092000000000000000000"], - ["0xf05b881e060a0eeed476945e7aa475b5f195f488", "2086000000000000000000"], - ["0x6b5b79aed614d65eb253ecc2bd312bb24c7ccc68", "2085000000000000000000"], - ["0x93dc859e6ab49134a0763b9594384e211ffe987e", "2080000000000000000000"], - ["0xcc531ee4b12c23b654a0fa4b99420d6e964f016c", "2078000000000000000000"], - ["0xbd9205acb643095de74002d1b14ca7e5e7b56bd2", "2075000000000000000000"], - ["0xa79aa90437290d45d0fa653b6502bb905a1f62b3", "2067000000000000000000"], - ["0xd89869a28d7da90d1c8416d172ab6566f7e4d5dc", "2064000000000000000000"], - ["0xf5b2e66c3569932fd42c38d0d91bdb97612c347a", "2061000000000000000000"], - ["0xb20a18cb4b22759eec8dce76736a0c2fefbc09dc", "2060000000000000000000"], - ["0x97546af83caef687a36539c839dff70608970db9", "2054000000000000000000"], - ["0xc40fc1c553737b2aa8572fdb036986510219f233", "2047000000000000000000"], - ["0x323f3ad4dc84ed90315d155fe1977de93840a9a0", "2024000000000000000000"], - ["0xf3f6a7b59414338f072e2aa3beaa76ab6991b8d9", "2021000000000000000000"], - ["0x4cfee29694aacf4648b30d7a4816234c0b88602c", "2017000000000000000000"], - ["0xadf6bc0ea95fcd2114404fd7e23ae541f9e2f7f0", "2015000000000000000000"], - ["0x69045868bfa5a07b112fc0b34b6fb0cd60cbc36e", "2015000000000000000000"], - ["0x0d889d4f642ec877407fc0d32b8620b92981738e", "2014000000000000000000"], - ["0x81ed41dea967a8d5c8272b4f41eeb20952a18771", "2011000000000000000000"], - ["0x3e2a56e784e654781bad62c9ea8a9bcb60403b93", "2000000000000000000000"], - ["0x5a39b59a1361a8cbb5e6d7208adbb0b076a5a218", "2000000000000000000000"], - ["0x2b025b429dfdc92e513e4ab5cfccc23a3d804f3e", "2000000000000000000000"], - ["0x18017c2790b6e24e6de3109e87b8077504ce83e1", "2000000000000000000000"], - ["0xf431834917c01f82ee5aca04c41b845b79aef6da", "2000000000000000000000"], - ["0xaf0a6cff1f39efe7a364316aa4b586b5c15d749a", "1970000000000000000000"], - ["0x0e9dbfa14f88c866f3a7ef8f5534090e11eaddcb", "1959000000000000000000"], - ["0x71ec5abfc49075e158b0f85575d400d0f5d7d3be", "1954000000000000000000"], - ["0x11223fd41ec1003408855cf97d4ec7faf9d7e719", "1946000000000000000000"], - ["0x7f98bd1dc02b5421336fdff34b0ad3fdcfd33950", "1943000000000000000000"], - ["0x6e908eda91209f91df15e045f4eeb04276fda62c", "1926000000000000000000"], - ["0xb140a7d96974166fa1f10b98c604c1be6c1488cf", "1922000000000000000000"], - ["0x16385c9b02dcddc25816634c82e6a249b21723fc", "1914000000000000000000"], - ["0xf7a4c6dc2fa63b3d3e227a5fd29ef9087b824290", "1913000000000000000000"], - ["0x5ddcd7c84f101d7aabb2bfa73184316394bd662c", "1910000000000000000000"], - ["0xbb681e2efda1fe3cbf8222579507f296e9493f0c", "1900000000000000000000"], - ["0x3c13912c7fcca5d247f1b72a00fa9c6fc6c8b38e", "1899000000000000000000"], - ["0xaa1ca78662fddd0f399a7526fd5eae5903097858", "1891000000000000000000"], - ["0xfc67581e8c5f8be15459274e5cab03501adcef94", "1886000000000000000000"], - ["0x9beda91892c5c7c9debd4f33d6170b71ff34b7e9", "1877000000000000000000"], - ["0x28a13140fd796a0cd5a79bb464841e6c3ad7b2cc", "1875000000000000000000"], - ["0x917527ee6a9624cafcc0ffce2db566d465e36fb1", "1875000000000000000000"], - ["0x3dde282df518df4edbba9d9a55a5ab4383c216e9", "1871000000000000000000"], - ["0x3bb5401d7266dfffafeaa041b7c2df13fe4e1d8b", "1859000000000000000000"], - ["0x7bd2e4d34e07749e33833046539b662d0258da93", "1855000000000000000000"], - ["0x649be78b71f1cf10ce4af486af8bda1737ad54c1", "1835000000000000000000"], - ["0x7f2ab459a66e3d043a2f1380e0056f2734b714b4", "1830000000000000000000"], - ["0x6c60b3fd031eca32ecfbb98ed9d64bbf74a0a4b3", "1819000000000000000000"], - ["0xf60f587d07e52ba306a9c4a75d35a752bfa3a922", "1819000000000000000000"], - ["0x7e1269f51541a46b30ac02905ee8d453ec96485e", "1818000000000000000000"], - ["0x5ef0ccd9e730d832e01aa859894cf8feef148cf5", "1809000000000000000000"], - ["0x1bc09946b7c42a61617f64c2e1e0dc7ed9cf6167", "1807000000000000000000"], - ["0xccb3d8e0efb5f9688f8cff5505a34aba21fdc233", "1806000000000000000000"], - ["0x2e516e5b2919b866f88f62884a5262e034c48201", "1791000000000000000000"], - ["0x37050a10fcd3b1c485c33f5d4aef3d0e33750792", "1788000000000000000000"], - ["0x11ededebf63bef0ea2d2d071bdf88f71543ec6fb", "1786000000000000000000"], - ["0x53672f9be477d5829fcdde348f35caf15b2e3255", "1773000000000000000000"], - ["0xb4ae4070a56624a7c99b438664853d0f454be116", "1771000000000000000000"], - ["0xb1d308241b2627bc1f575ddc3b381e98d8a69e5f", "1767000000000000000000"], - ["0xf10aefcf3e275977e2fb00051893532cfa35c33b", "1759000000000000000000"], - ["0xd80e214d86399d966b5d0a0f647e48eb8e73a24b", "1759000000000000000000"], - ["0xd3811712e3fa3e03388868a62b1067513741c4d5", "1754000000000000000000"], - ["0x3ae86cfa52b197ce73468a5e5861fe77ff1a6d19", "1753000000000000000000"], - ["0x4995c93767eeb943a0707efc6a6b3bddbbe6622f", "1744000000000000000000"], - ["0x8322f06cf86436714f1cc322c652f526db6b400f", "1731000000000000000000"], - ["0x6ff58125397af2f78127178d8e9d0514e9529086", "1724000000000000000000"], - ["0xc0cb43a119c1c6a9ea50399161ff1b620c6bc1ed", "1723000000000000000000"], - ["0x5330170b9cdceb4694f7278f6418346b21832474", "1721000000000000000000"], - ["0xdea3e18aa866f46da789f0b908e90bf55a0dca90", "1719000000000000000000"], - ["0x223a35433f3f87ef302fdfccd77777dd0cd51f80", "1718000000000000000000"], - ["0x2281db2f9c78f6a0afc70e2dbbec2472b24a2bd0", "1711000000000000000000"], - ["0x590b01699be980e92b38326904f19b19214cbfd5", "1706000000000000000000"], - ["0x11db895a439d0dd024270a32b1113979f72a3b26", "1705000000000000000000"], - ["0x88c66d3d576ba03b7561c6330c07e49f2cf8a412", "1695000000000000000000"], - ["0x3ee20f990c3bb65ac6a3adb57b4ff66f592dc2a4", "1693000000000000000000"], - ["0x557fef30faeb0acd5e7c733704e56a7107879d4c", "1681000000000000000000"], - ["0xc537fee3bcdab2a6ba3ae0a4856e41d196709bfb", "1651000000000000000000"], - ["0x79f7b7c0270a519c7bc46091b3038f36c78549e5", "1651000000000000000000"], - ["0xa08c19ade8180c14d05efa461df4768d4281e3d6", "1651000000000000000000"], - ["0x5088439f51728d47b603ef557cdf739e17a28922", "1643000000000000000000"], - ["0xe47a14edd56510a77f8fc753cdf1353302d75211", "1639000000000000000000"], - ["0xa10671808455d6f8cb663459c9f334a873f4c81f", "1639000000000000000000"], - ["0xbdf2c86f988f4b1b367e4b2e7dc8da5f99f2593a", "1636000000000000000000"], - ["0xb3d69de03151c786d05a6c470dcc8d7f1f109c8d", "1636000000000000000000"], - ["0x961dfb44c895a2b94f96c1d1513e7bcd75a5e454", "1631000000000000000000"], - ["0x43f824adfac29a2bd611545540965efc8ec2e4ac", "1621000000000000000000"], - ["0x58e777e71cd05138b1216e26cf50a02546655ddb", "1617000000000000000000"], - ["0x4ba2ed434abceab019415e7b4770beca368f8db5", "1616000000000000000000"], - ["0x5b40794812deb51dd95aaadbafd1a33fe125757c", "1605000000000000000000"], - ["0x6c358adb31f0110d2880c9351615c8627ac84177", "1599000000000000000000"], - ["0xd03e1b93424a5bab90f2f88a75a0336b46b516e9", "1593000000000000000000"], - ["0x720d330816afd75a72e012f8d669a19918483375", "1591000000000000000000"], - ["0x5cf8a362e7b801d555d3155919dcbb6253d4d0fc", "1577000000000000000000"], - ["0x82720619b4b6cf8a19c29888f9b081e2d8645867", "1575000000000000000000"], - ["0x03b0a411e6329f446154b119209b1d385aa816e0", "1569000000000000000000"], - ["0x8c055e84ed56a1f87b5e901babd799b154cd5c78", "1568000000000000000000"], - ["0xd73db7bef50aa4302f13c16b07ad0919b955dca2", "1561000000000000000000"], - ["0xe809492c3e85cf52dcd4fb284cd0f2e629f3eba6", "1560000000000000000000"], - ["0x39a38050190f980e1ed3e259084ff315e244f037", "1555000000000000000000"], - ["0xd47bdd78c4eca4b5ac941a4b4cf62b34be730c42", "1551000000000000000000"], - ["0x38c1649b72fd245e434b9db29f6148a90aa7ca12", "1550000000000000000000"], - ["0x23f7c4667a0d1faa42105b991816fb84fa3037dc", "1548000000000000000000"], - ["0x703960bd917478f9f41cca901f3da41bf96d31d6", "1548000000000000000000"], - ["0x91d720f45c53d897d39d61d2f88c6f8d56ba6125", "1546000000000000000000"], - ["0xcc3ce701840f6d689ae93ba6f211a5e897691710", "1539000000000000000000"], - ["0xc45317b15633bbc021af594890e21e630b85727e", "1539000000000000000000"], - ["0x89a38dd6d08f3a87a31c292c51d0f18d2677c825", "1530000000000000000000"], - ["0x79dfdfa0c384b0fbf49854eb491a9fa7d197f93e", "1527000000000000000000"], - ["0xc0d3a8d939d8653f0fd8fe7a0646dd3884293466", "1525000000000000000000"], - ["0x699d021dc88fa7a071bebdb93e9f905bc983de9e", "1520000000000000000000"], - ["0x8cc848d8d1eb77fc1518a91111c428c28035e0fa", "1520000000000000000000"], - ["0xf8b317264429a80a7246ac9b5e2326e7bde760ae", "1520000000000000000000"], - ["0xfa38df65face3ffba188f0bd2814c2266c3c23d5", "1517000000000000000000"], - ["0x86542a9ebbfe8447ba02e28c5f31f04c7340a1ff", "1517000000000000000000"], - ["0xc10a4691f0c675d026a8191d70c231b78f65d969", "1513000000000000000000"], - ["0xe4aeddfc1adb70c0c639592c9c423b27a38f2ab7", "1512000000000000000000"], - ["0xaaf323c9fea7e6d81ce36d7ad40e67d3599069c4", "1510000000000000000000"], - ["0x6e6f1bdf898eebc6a95c9a82350f609327d8eb9c", "1510000000000000000000"], - ["0xe95dc5d3fa1b75ab6ce0a8775eaa1735bbbbf382", "1501000000000000000000"], - ["0x9f404425f7cd1559076663faa284659ed6ff7c91", "1500000000000000000000"], - ["0xa90800d5ab123cbd3ec96b89178b3955bdcca2dc", "1500000000000000000000"], - ["0xc87f715096e770422e4f19c4b49a158eafbbe90d", "1500000000000000000000"], - ["0x3bc1b9ce24f0fa636a8ed446a0172c15fda230d0", "1500000000000000000000"], - ["0x4c3e5d6c762c3ff116b07cfb5f488b43ef4e4d45", "1495000000000000000000"], - ["0x9a188cc4fc5e7d6b1ffc2e0d185d59195fd160e4", "1486000000000000000000"], - ["0x2e32c7815a96dc1a2a1787f9013b0169a242d714", "1483000000000000000000"], - ["0xa095ddff8597e1ff75e43fd95fe37e36aec4c689", "1480000000000000000000"], - ["0x326ea036c2bf0021f3909ab08cf8c230c7bfc4d5", "1479000000000000000000"], - ["0xebf78b93e96aefe3c2c9bc8568513f8288436a4a", "1474000000000000000000"], - ["0x981b175c75ff25016b987d96ec15a13ab1237e96", "1474000000000000000000"], - ["0xa2f696958a5e023014620687f1d34755c707e5d1", "1467000000000000000000"], - ["0x47064935e90c060ffdad7a748c37e62c4f03b8cc", "1455000000000000000000"], - ["0x9531647f5ffaf86ccc95307a2841d44864f50d2f", "1455000000000000000000"], - ["0x62c323e6a3e702706e889a58974f2f84ccc53f7d", "1450000000000000000000"], - ["0x8351b3bbefd26f05aa286380c57b27d722738110", "1443000000000000000000"], - ["0xe121443d78019ab37cda3d3e868fd2c487ec2a42", "1443000000000000000000"], - ["0x25d0cff8c47f33b32192b3ea9824ac1bc550bd43", "1434000000000000000000"], - ["0x573267a8c5d5b3965fa778fa4de1b5f676073f92", "1432000000000000000000"], - ["0xf6c23bffe946dbaa9ae6964b298cb058f3ef6635", "1432000000000000000000"], - ["0x15fda64fcdbca27a60aa8c6ca882aa3e1de4ea41", "1432000000000000000000"], - ["0x04158ab32847369010045e922e8d24c03d6aa7f5", "1429000000000000000000"], - ["0x8b46924a0d6d610a46caf0a5d13dabdd25b68645", "1425000000000000000000"], - ["0x73c27b2542a3e7481b796a47c95759b4216a4bd2", "1425000000000000000000"], - ["0xa0f0ab619aec09ed753748adc8c258f2c89285e3", "1421000000000000000000"], - ["0xf26db1ab6a6b3e6544cef663f8a8b7496844d410", "1413000000000000000000"], - ["0xe4ad4e411c64e94e327d66d1a6515c4988186451", "1411000000000000000000"], - ["0x10370734e1791ce74456dedda3b724a44f664eea", "1408000000000000000000"], - ["0xb19eb4d14fd9cec25c5a99220a5bcbd4ffbdf948", "1407000000000000000000"], - ["0xd76be4ab3b5a12a604ca81cc34b8a83e9331156d", "1401000000000000000000"], - ["0x8a4b25ac9651992c73aae3e51f3923d806feeffe", "1400000000000000000000"], - ["0xad0de39a552a8e05139c7d806a977231bd23a2d4", "1399000000000000000000"], - ["0x38d73354ac5c5d6f8db3e36285f1a2f5784d1372", "1393000000000000000000"], - ["0xcd09ff5da28fee209f92fcd58fbd87a9bf6d196c", "1389000000000000000000"], - ["0x93f5af632ce523286e033f0510e9b3c9710f4489", "1389000000000000000000"], - ["0xbaf658faa46bc1e4985cf5d0a2ba21a511f5db5c", "1380000000000000000000"], - ["0xe8676497f39e31ef373ca2af659c34aee93db732", "1379000000000000000000"], - ["0x2b06ae2df3f81fe505a142f05af98525bf51a1b8", "2698000000000000000000"], - ["0xf5859a2f9e22e67c1e4fb1d2e538a586b1dfe454", "1362000000000000000000"], - ["0x6f9ca333b957bc02217ea9ecfa5ba674c09c7431", "1354000000000000000000"], - ["0xcd3550bf2ca177ff4cf5b2452e6e908564c21ed6", "1354000000000000000000"], - ["0x838eeb65281e211eb8ebddd29270947f95444808", "1354000000000000000000"], - ["0x0a6e37ceea837299f160b63ccb71a0a1587e3c47", "1350000000000000000000"], - ["0x76a746079946279aaf1c7fd9a94ca7fd48c555b7", "1348000000000000000000"], - ["0x330ae361002ec0cc7b68dbc5ec57073d52e8cfd1", "1345000000000000000000"], - ["0x8821b354c6e7bdc13a1155b8815d696675f2ca0d", "1335000000000000000000"], - ["0x5c0dc504be827714b81ce99ed287a0428eb397a6", "1330000000000000000000"], - ["0x8c2365fe0b0a9aa879b4114eb2b9b6565e431153", "1329000000000000000000"], - ["0x56633bbb3c6572f8013a1174219812532d6cecbd", "1329000000000000000000"], - ["0xf0ea58b65c82c48ce69f0abd68d178e7764c4ba2", "1329000000000000000000"], - ["0xef0505cf1ec565f3bae09a1e982dda7d9876c07e", "1329000000000000000000"], - ["0x346d2b27737d0fb24a5dc9c3cda345da8b727446", "1329000000000000000000"], - ["0x141fae74850982116eb69534060277640db3eeb7", "1329000000000000000000"], - ["0x6f3169d904fc580b24e5f541758834b07aab63eb", "1329000000000000000000"], - ["0xc8a51f193c35edc394616ca00a782377017ab675", "1215000000000000000000"], - ["0x6713db93c0a7580fe0e81dfb1b6d121030120b33", "1213000000000000000000"], - ["0x006cbf936f193ce6359256c6a5380f8f49d5066a", "1209000000000000000000"], - ["0x4cdf78724f6f80670bebcd03a69fab9a6778556c", "1208000000000000000000"], - ["0xac841f0da675dbdc6e988f4fe78208a68315c3b7", "1207000000000000000000"], - ["0xb4027525352031ac6eaf4d78d88605d344073985", "1206000000000000000000"], - ["0x6e5b935ac926e11dec812eb0a5425ec5e4c96355", "1202000000000000000000"], - ["0x9acd3e502dc33ddf6675b40783ff05d89b1e2f25", "1200000000000000000000"], - ["0xf29d3c5fd33f4769c92095c7801091688e2ccc37", "1186000000000000000000"], - ["0xbb9727a4f0133577d1893268725474dd00beb8ce", "1181000000000000000000"], - ["0x5463fc9c971189816d71891315dc7c60782b28bf", "1180000000000000000000"], - ["0xc6676c09fb04ae2a7039cb35dd58094ce3b2753b", "1176000000000000000000"], - ["0x85d535d22249f02ebd3e30fe314c4aa2a7fbf363", "1171000000000000000000"], - ["0x2285b2ef91844e8443ceec8aa8a32524b5a65389", "1165000000000000000000"], - ["0x43f0f04b4740c49331c4cffc8392def59572aef7", "1152000000000000000000"], - ["0x2aa0136e55157cf1dcf8fb3b5d316e068638f9c8", "1151000000000000000000"], - ["0x7cc1c8e53063623708e9c67affd463e9c55e5a98", "1143000000000000000000"], - ["0x1543a0b0a7000426afd8caed7dfed9ce5477d418", "1138000000000000000000"], - ["0x434d871309194367082397ad72f2682195090bba", "1133000000000000000000"], - ["0x003155a1565b4233a5027f43062c2395eb114073", "1129000000000000000000"], - ["0x207659e7014a0823021c101d80b029c234588e84", "1127000000000000000000"], - ["0x561c7f1fd5c2e369ce5922945985181c7aa411d3", "1127000000000000000000"], - ["0x4f2cb8a64665abae49b9ac7e9962230d29aefe3c", "1125000000000000000000"], - ["0xc7c1de06b394f956a2cf9d1e34360772eedede87", "1112000000000000000000"], - ["0xaa62d6dc492e917ee9fa3ba971cbf82480b6c77e", "1107000000000000000000"], - ["0x0482e93db464af4c9d1346a097b6a048aeca38fa", "1103000000000000000000"], - ["0x522bd2c3ca9c6a697083c4e62d8e883a1b519176", "1102000000000000000000"], - ["0x2c28ce41d2df4b64a9c6509a4dcf5a3ff04952f8", "1101000000000000000000"], - ["0x0d4ddea3849c54e16c85cb4354943dc876e05552", "1100000000000000000000"], - ["0x8046bc2af3556c8657995d5c268195286925c67c", "1100000000000000000000"], - ["0x04cc796ea4f9b9682c3f7a31c81d947530b72f70", "1099000000000000000000"], - ["0x4d23a692c2d37285fa6beb9637caac449891718f", "1095000000000000000000"], - ["0x1d29298b4de8f7a56e85a7d7c08fd5d78c391cc7", "1087000000000000000000"], - ["0xfd1192199e9084b39cfba0b5f41f7158505dfa10", "1087000000000000000000"], - ["0xca002ca0ce3b4d0568f450dc9ef0c3637e6a13a0", "1086000000000000000000"], - ["0x4fcec7642200dabaab8c303c6d4efac4decc8859", "1085000000000000000000"], - ["0xf39b74d3f90a032d0ea671868783be073fd51161", "1084000000000000000000"], - ["0xe5c67c31c22ac9d1c4a11f687ed2185f12fbbb5b", "1084000000000000000000"], - ["0x7c0eed74d4e818dddf82bbbc378cc3283502d87e", "1082000000000000000000"], - ["0x7ec228399810f6960fa04ae2818a835d79d3f8bd", "1079000000000000000000"], - ["0x15a0e86ec1a099dfe20a2d9e2e9deebc9a90986f", "1076000000000000000000"], - ["0xbaf3299a7d05f339193e61239525cbcae444fa68", "1071000000000000000000"], - ["0x0f038a4a26ca3cb90dbec66d772853af3fcdf733", "1071000000000000000000"], - ["0x2db78ad46c3684fec3058af917228c5b6e4a2a61", "1068000000000000000000"], - ["0x9588d1ad3d3f5757d90f9a7b791ad6edc48862a7", "1067000000000000000000"], - ["0x7e243c07afceafe22c05ff1415db8effad5fc100", "1052000000000000000000"], - ["0x3bcf25e8da05c55e236d6caa0ddc7d17482ab178", "1049000000000000000000"], - ["0x2e465ddca6d2c6c81ce6f260ab13148d43e93371", "1047000000000000000000"], - ["0xd7d59e74f960824336b1925c1bb2f2b6040a6b3c", "1044000000000000000000"], - ["0xd7eb0bdbec9f3ef66472e0933310a212781977ec", "1041000000000000000000"], - ["0x52831fc8d8344000f92734db70cd4a01a1383eaf", "1036000000000000000000"], - ["0x91911e488791fb4629edd8d1a5b4a685d44ce46a", "1036000000000000000000"], - ["0x700965eb67dc62d2a3eafce9ede4b2ec15217874", "1032000000000000000000"], - ["0xd1fa45d2f1b2ce7de6fd4f4b5898adce9c95734b", "1020000000000000000000"], - ["0x85aca057c1b5a8b31ab251162b43f8438746844e", "1019000000000000000000"], - ["0x35c81e79e1c49718db71b95179600e8c2472571d", "1019000000000000000000"], - ["0xed2d0e6b843188c87cd75217e6a343d30d49f107", "1017000000000000000000"], - ["0x2748cbe2f1440b3557f20eef103b59098c29582f", "1015000000000000000000"], - ["0xa0cd7cab17c5fc68b86b19bbf4f8f46ff24dd6b3", "1015000000000000000000"], - ["0x4d82322f62a0186dcfd16051b42e8ba019e6daea", "1011000000000000000000"], - ["0x23408fa8f9acbd66ab4f9b2dcbb9e85ebe989993", "1011000000000000000000"], - ["0x5370e4db012e3492508ea2eb6f93985ed44fc61a", "1010000000000000000000"], - ["0x2197606e51dd4b6aac8317533dab492aa53edad3", "1008000000000000000000"], - ["0xcb1703717e125d4db28f6e95afec2d8d3c2d9ff2", "1008000000000000000000"], - ["0x31110fadb4401fad566606905c03d9daf3c87ce2", "1005000000000000000000"], - ["0xbcf840e1e4ca28e7a50982d2c60b9acaa158d0a0", "1002000000000000000000"], - ["0x98b45938641f2bbd0a1f5c946840fb73d45fda6f", "1001000000000000000000"], - ["0xfae2169ebe7d52bdaa4bc91c59a6f53f17a00d9d", "1001000000000000000000"], - ["0x100e45613e1ea5c16b2b2338e2f1bad3785068f6", "1001000000000000000000"], - ["0x1eceda8cae8cd1d2c26ff4a09db5f16d9213a891", "1000000000000000000000"], - ["0x2da668c1b6d281181cc717306fcc7c9c463fa17f", "1000000000000000000000"], - ["0xba14977adcfc73f1552c5c510b9bff83d95f346b", "1000000000000000000000"], - ["0xb5758b77607d8af9d7e83282186209d5258e52fc", "1000000000000000000000"], - ["0x5815b5e4f0945370d305310d0faae21ba0e118a8", "1000000000000000000000"], - ["0x0e2c7260327e3609d65690779ad077b9b967612a", "1000000000000000000000"], - ["0x9da13a3a1fe5c7dae732bf3a75635c5e7f4f2070", "1000000000000000000000"], - ["0xe4637ed4e4e07a31657b9b9c8cb97950be499ae4", "1000000000000000000000"], - ["0x032578c5c63820f91024523df6e0ebc13edcbca2", "1000000000000000000000"], - ["0x5bcdf5d8870cc21c8d33259c252cab428f74e8fb", "1000000000000000000000"], - ["0x952e430c56301eb302e25b6073b042dea5bc32b0", "1000000000000000000000"], - ["0x08508310276b879190a6f787c404ce8eef8d5432", "1000000000000000000000"], - ["0xaf98b60342e94244e0732a0bd04b4fba06c30854", "1000000000000000000000"], - ["0x6f58c1472dbdaab0b305e7d0dc00c8505e29b029", "1000000000000000000000"], - ["0xaf114921e8d91c1bb01b5f416e12a552d7473602", "1000000000000000000000"], - ["0xc4d9019fcc3b2ce94c6c3a8cec495e904bd81576", "1000000000000000000000"], - ["0x544fe5703ef129a3a72fffe44e49ee8d333a2a38", "992000000000000000000"], - ["0x0042614e5deea4709fac6584d1560e3222daf963", "991000000000000000000"], - ["0xf8cf675d7b41c7e039ed0602325099443ed701f6", "991000000000000000000"], - ["0x38a21985b77f1658bed383ebae079bec6c5f3a07", "990000000000000000000"], - ["0x55e4536c228323fe22837b0821a26dc35e3d77a9", "988000000000000000000"], - ["0x7f1b27c621fe7e2a02a55c65a14e696c437b4470", "988000000000000000000"], - ["0x4d0665a2829db89e8cb5f2f50fb12d0459f0a125", "981000000000000000000"], - ["0x3d258c7e14957fa02a001ee4177d3af2d52b1d53", "980000000000000000000"], - ["0xd506b99e2c57beec32678ad7d5b838ae703ead57", "979000000000000000000"], - ["0xb7facb4f9aab1507a8512eea3393dce126445939", "975000000000000000000"], - ["0xfad857ea48dfab915ac34ee3a1a73195bf21a222", "974000000000000000000"], - ["0xd33efc182c87de58d5bf8d38bce446ba2bf138b3", "971000000000000000000"], - ["0x002011d68c8c3747ec2e90d39f61abb84609a6aa", "964000000000000000000"], - ["0xb965d68052b849b29fe25497c51659bf9678bc9b", "961000000000000000000"], - ["0x36bc8c1e846556b8f29191f5d68941d37e62754c", "960000000000000000000"], - ["0x7d2e02a9faef2a4a1b5dfe83a530d3571979d240", "959000000000000000000"], - ["0x0c81bdb2e8aab74423d6a1da2d1d3961b465c579", "957000000000000000000"], - ["0xeea7a36d41d739ab8c3fe94309f677e87a4146d0", "951000000000000000000"], - ["0x8424860cb889f787024ac78bf0667d55ea4afb1e", "951000000000000000000"], - ["0x10367c5335f5a1567598fd4ac3838943e0b8774b", "951000000000000000000"], - ["0x91a34c4b48510fc1262e092c044cbe1220a7099b", "950000000000000000000"], - ["0x98d0e5a9063c05bc36a14c01f99f41b354d53bf3", "949000000000000000000"], - ["0x9b362014da9e2d24e7d744de791faa00e6a8f9a1", "945000000000000000000"], - ["0x3c8bd33e51cd82abb6e9c59ef7b9a6d61682e690", "944000000000000000000"], - ["0x0820ca934e4ead413f5181fed24a57382f37d915", "939000000000000000000"], - ["0xe78b5888142a873d075e2cdf5293402b117090a8", "938000000000000000000"], - ["0x7a4ba3489ca5b28f33800e1f95780686495c99cd", "938000000000000000000"], - ["0x40db8365d1252bcb06598927698238a99d39228e", "938000000000000000000"], - ["0x1ebc680bbf8ea1aceb9113389cf4ec839ff6b198", "938000000000000000000"], - ["0xce62ec58396d56c18e6ee35c885025539ff3ca0b", "938000000000000000000"], - ["0x0efa20d60fde441cbe6f245f2d2201e732820ab2", "938000000000000000000"], - ["0x8f4e6be0925af97e9412e78fd185b84e80575a88", "936000000000000000000"], - ["0x9b0fc8c04a0c872477c278ffdb6e9a0b3b4d7849", "936000000000000000000"], - ["0x5053a1354cb45eebdd2d8342ceee71d41efa75ca", "932000000000000000000"], - ["0xd6aabdb37616ec782844d4005207a7aab43a08ee", "927000000000000000000"], - ["0x34cab12b13fd5bb41567a73e04907b861a743198", "926000000000000000000"], - ["0x8d040102f998508a65c2e6f44ef035eafad2bfc5", "920000000000000000000"], - ["0x8f82c1e59fb6e7f49792b7b8e661b01b541bdbce", "920000000000000000000"], - ["0x30270a4e14002409a769548636fe1b73d1250788", "917000000000000000000"], - ["0xd9b4047ef0c3407e3a3ef3a22beb9f7993f1f346", "914000000000000000000"], - ["0x050bc4d2797d43ed0068fc9a60b83a064fd8a91c", "914000000000000000000"], - ["0xd895ffe25d7627fb29fc48df4af20bf377c57266", "911000000000000000000"], - ["0xca76c23278495e3a0bc534b074f0accc98b6a759", "907000000000000000000"], - ["0xd9ea22f48d8ada55048e8495e04862eb5b7d11a1", "907000000000000000000"], - ["0xf873ad9135088add364c7a96575482c53233d9b5", "905000000000000000000"], - ["0x99b0fc050b69b6638986328b5cad5f59e65aeed2", "901000000000000000000"], - ["0x608cf4dc98ac76eaf04d63e73f6524e9ce72d1b3", "900000000000000000000"], - ["0xd6f14a1cc837a728f22fd53adc3a3c1d20350326", "895000000000000000000"], - ["0xc30c8930a8fa7a5ecbb8df9d3a19febfbbcd897e", "895000000000000000000"], - ["0xd9b4342749b93504138eab8bac8e9279a0a3e91c", "894000000000000000000"], - ["0xc3903bb04ad89160891f5dce66a01a6535a24994", "894000000000000000000"], - ["0xb293641a9d1e5129c9a9d4f701b6c47f28a4f26f", "891000000000000000000"], - ["0x36774a983fc9e2e11a5a4a9b540297a846bb4a01", "885000000000000000000"], - ["0x8ab2ae2c445b8d88311979caa46bab47037dc9b5", "884000000000000000000"], - ["0x3aef750ad04585a023321d507c83c903fa121529", "881000000000000000000"], - ["0x2c826f6d49d58ebfc5e45906be9eae3fc7ca71dc", "876000000000000000000"], - ["0xaef76cd08844019385b3148799114bdc8cb75cb0", "875000000000000000000"], - ["0xbe2ef7d04af3e9851099a5d4c27ab42389e0425d", "869000000000000000000"], - ["0x632889c2536b12fa1cd80309144c73559d89d405", "866000000000000000000"], - ["0x5907f6596de3235d9a1ddcf4e23535257e88d592", "865000000000000000000"], - ["0xeb6b51d158a5fdf67ba74d66dfe44b396e4e227d", "860000000000000000000"], - ["0x70022ffe7f412cfc638725cd33b1a3a2aa5edd0f", "859000000000000000000"], - ["0x8c16c8fe98a50b515cf8268090bcb8886b241908", "855000000000000000000"], - ["0x992f8e145c5404e944aeb8f53660985daf9dc827", "853000000000000000000"], - ["0x3c3fe2b5159fe58d83041472bdf6fe6a4ca1e3f7", "852000000000000000000"], - ["0x3f5165d28fa84a8ad165b2897f9a9a6eb1de5bf8", "851000000000000000000"], - ["0x037a936c8af287798f6563df168a2d371bbfe635", "846000000000000000000"], - ["0x738b9aeea3d5e37f67ebe540b9d5a2ab2248634b", "843000000000000000000"], - ["0x3df551bb6b29eb05fc709a25f8f05e07119d99a9", "840000000000000000000"], - ["0xc4c0ed8bab66f995bd6a98e8b1261534ebcb5867", "838000000000000000000"], - ["0xc4784bb8ee943f408a876fac881ce4ef1100409a", "836000000000000000000"], - ["0xb88f002634cd733fa51eecf4905bcdd83c5b2adf", "834000000000000000000"], - ["0x194e9c9d49798596cc9bc76781f992fb83c232c6", "833000000000000000000"], - ["0x3a547d56ea5a9a316803f9c7c978837845625b38", "832000000000000000000"], - ["0x791bdf53cc4afefa841506035e474c3c1e7126dd", "829000000000000000000"], - ["0xb9461e4f092bad1d6bc3a549ad87ebf6ef7e4925", "824000000000000000000"], - ["0xbcc3cdc81b8243acf58cd96f43f99a3b9c393ea2", "820000000000000000000"], - ["0xfc7a28b3332801a8e5405e65b3be67c8680742e8", "819000000000000000000"], - ["0x0ce77f9ec6a65b0b3ef1756d633751ca182f4eaf", "818000000000000000000"], - ["0x2f14f93c092983cf96e17f5e8a4719ddae4c82dc", "817000000000000000000"], - ["0x1afde41a98a9960a5dc785090149bb1740c8478f", "816000000000000000000"], - ["0x102dbc29586f8e4b12b0e11c95176a32249cf80f", "813000000000000000000"], - ["0x20795012a635b8d0c4f2d9824f68419b36bb5564", "813000000000000000000"], - ["0x97b9a3cd5425974558a3b8a8315284f06d9451bb", "812000000000000000000"], - ["0xe12ebb51f6a712bc323f7fe1ed36c9cdacb47d15", "812000000000000000000"], - ["0x13b5ea12da65161e2289de15b2f9cd323f44db3e", "811000000000000000000"], - ["0x647c7da221168fe5086cf8556fbaf1343c77b657", "811000000000000000000"], - ["0xc5958a9c4f7169cc95969849a6065beadd5322d6", "810000000000000000000"], - ["0xf6d41073c8c5091bc8e62236d5c1ae13617af599", "810000000000000000000"], - ["0x89c7de79549fa5ef5785d7a7cbaff0c241bb0714", "566000000000000000000"], - ["0x2901131b2e1acfaf29b3363b72e523ab668511d5", "800000000000000000000"], - ["0xc676ead43c7f45d8d50e975acd3abaa8a2b1d3fe", "800000000000000000000"], - ["0xb2f5b7009a21a6af46582f31325ad9aaea0c0bd2", "800000000000000000000"], - ["0xdeb5e8abe33af81011431d0203cc180a6e78c2ad", "800000000000000000000"], - ["0x292d9fc110a111c5b431e9758d34964b61f1fd92", "800000000000000000000"], - ["0x3c2e4b3040d1aab686d34fe5f111530a21f8be74", "799000000000000000000"], - ["0x269e54cc50ed9502003d92664acf1f6cb91999c0", "792000000000000000000"], - ["0x4219ff8cf85ef15fb75c350a3e848b58832ae167", "791000000000000000000"], - ["0xf0e6829f09337cffd3275a098a572ca7cbe309fc", "788000000000000000000"], - ["0x88748a7dafce7d4783d060d1f497b586cfddab84", "787000000000000000000"], - ["0x0b43ff85c3cc38e1f08ae6235bdc6e4d645dcf29", "785000000000000000000"], - ["0x4d3ca31daa91366c6ada0223c002c0d927878445", "782000000000000000000"], - ["0x0136c6fe0796a373e9ac5bbac2576e94ba0b81ba", "775000000000000000000"], - ["0xfea76ea25c285587ce75c86d46558606cc382f35", "774000000000000000000"], - ["0x06f5d2a078e42e33718d5f0bdd55c76f17bd67fc", "772000000000000000000"], - ["0x3a0c3ad39673cce83bf9735fbe3b4889e832326e", "770000000000000000000"], - ["0x0c16d08cdd114f9830d3cbb1045df4e8da6bae8c", "765000000000000000000"], - ["0x0f430a50595ba595a82836695f2ef60a24ae327a", "764000000000000000000"], - ["0x8bc0fc5b31fa30266a3dd81753be66ee4b62a7f9", "763000000000000000000"], - ["0xa5e8c5b3add6c49265ac558dbe756952ee7ec439", "762000000000000000000"], - ["0x46d0bcf7f8ef33d12948deb4f8583191a0103e60", "761000000000000000000"], - ["0xba516997513bf9046d7fa4cc1442144d4fcc3bdf", "757000000000000000000"], - ["0xd0de011f8e252c71b6d4d60b7a6dcd7940d9470b", "746000000000000000000"], - ["0x15cc94ab6414cafa6b0f37c365421708b8bdf017", "745000000000000000000"], - ["0x5ec1dab31f07762aefe439aee7e12f061c325b2a", "742000000000000000000"], - ["0x7ece5fc7290e8df49f8f1ca2f838dc1c8b0712f1", "736000000000000000000"], - ["0x670b60b8d9f47ad4b325a69527c4f876e7b498e1", "735000000000000000000"], - ["0x88434368aa860a58879e7afa4fe19801fe833eb9", "731000000000000000000"], - ["0x7bd74690dd2dba6e408825e3938697a311cebb2c", "731000000000000000000"], - ["0xf6bb44ad0878049eda05e168f670560f182a689c", "730000000000000000000"], - ["0x30367d0323be56e9bf2c19231f9ada204a47ff7a", "725000000000000000000"], - ["0x48926666d0a6e3919507c1828b5b30229bfeafc6", "724000000000000000000"], - ["0x6f1d13763c581dbef3842595a2aa5b7b9e7ae4ab", "723000000000000000000"], - ["0xa5f0c698ca7858b7cee31613ff2c133e6e968485", "721000000000000000000"], - ["0x6d5bec7a483962bed9eb4014d415abdc52bed240", "721000000000000000000"], - ["0x5e8ed66f58c41657b05545e6a32ab4d32024372c", "713000000000000000000"], - ["0x49ef15fcb17a1d73abfeb1c847ad6348144367d5", "713000000000000000000"], - ["0x67851af7920206006ae0eef3bbb445c91c39938c", "712000000000000000000"], - ["0xbcc22f7d6a49df2b081df31924a668959adea52e", "711000000000000000000"], - ["0x8552af06727a69240a6ff9764d84a1fd9f240ec8", "711000000000000000000"], - ["0x8e677d99c9c679af13820748efbafc3c42e31f2e", "710000000000000000000"], - ["0xbac42c9b32e574f41b86e20fba0cf479a5a1ca58", "706000000000000000000"], - ["0xfe6acc4399146045a2c9c5459fd49954897114f4", "706000000000000000000"], - ["0xb9c9c621eff2f103600615fb9bedb3e00c7be1aa", "705000000000000000000"], - ["0x0ac0240f4656dc80684d0df1208bb91c0220725d", "702000000000000000000"], - ["0x7a170000240e38137e5f34f429af03b2b71c98f7", "700000000000000000000"], - ["0x42b86a1f912d8aa0174cd46f63ebbc846421a500", "700000000000000000000"], - ["0x20ccc519e34462a0744d1b064611e9982f6b6fe6", "696000000000000000000"], - ["0x5b19d76e11dc68064777b12ff57a223dcd8f929f", "695000000000000000000"], - ["0x0205b7d3566b036a8f1d0dd4ee726c22eee16bd1", "694000000000000000000"], - ["0x7e9206591571b2166cd42baa92f2e69f683a979d", "694000000000000000000"], - ["0xc0e745a82eeadee784e7ba56fad17e7b5adcb76b", "694000000000000000000"], - ["0xb53f0a18bcc0eea66d5ee75e0ab949ef4d8a132e", "693000000000000000000"], - ["0x836b748c46024b464898d7a2da6d8ecabf1c812d", "692000000000000000000"], - ["0xee848eaed71719b93482a4f998aa78cff8b132cd", "691000000000000000000"], - ["0x1fd18f2f75cae7caff305391be2f18432ba562e9", "690000000000000000000"], - ["0xc13cce21ab71432ffefa56758794586615a38d17", "688000000000000000000"], - ["0x24a5040f0190d86841c4ea6f5a6de8ced5f0b334", "686000000000000000000"], - ["0x644aaa204d299941c58f757774e2c2bd522cda98", "682000000000000000000"], - ["0xb5a8f3381408cecfcf602301c78ceed92d23ff23", "680000000000000000000"], - ["0x0621c518df390245282e945400a84f48e2dbd215", "680000000000000000000"], - ["0xdcd134aec7a9bdd1a051d17b2e29454dcd375b56", "679000000000000000000"], - ["0x914c5633990af2e1636377bf4c7e6e059ea1e436", "677000000000000000000"], - ["0xf7ab5f9db3b621877c123d4f7f9ec61997cca0a4", "677000000000000000000"], - ["0x1f834184b11a4adadc4e8c9b408168b95d50dd10", "674000000000000000000"], - ["0x649427f141e8f9dbe9be80983b4ba71dc3bebe8b", "670000000000000000000"], - ["0xcbf7d1c2012629e4689f6c2ca10c4e3a7ce1a75c", "669000000000000000000"], - ["0x68aee219d75fda4e508f70454628acb9bdf413f1", "668000000000000000000"], - ["0x94e08736426948c5f463ac243416f0473f680b2b", "666000000000000000000"], - ["0x8fb2a5d8736776291388827e9787f221a1d3633a", "658000000000000000000"], - ["0x49248e9dc8a4ae03789ed9c54cd0e0c1ab0a5d0d", "658000000000000000000"], - ["0xb32a672d21b1b8c033d0a195aca2eec16117ba7b", "656000000000000000000"], - ["0x503c4ab4899be94dbe935f3c40bd63ba37ea59b4", "656000000000000000000"], - ["0xfa019bc786013802890118a76a6f97c70edbc418", "656000000000000000000"], - ["0x291f728ba2800d9cf0bb8af7f1ce33d0e78f313f", "655000000000000000000"], - ["0x701a24d812e4d9827ec8dd2b3eed726ffd9b4065", "655000000000000000000"], - ["0x7d1e9050f02044cbf200bc2b75d443d8e464a0d9", "653000000000000000000"], - ["0xce18b30c8e4d287f5ec429f053b8274cfd2aabb4", "653000000000000000000"], - ["0xe3f4e9fc5ece5e42366dbe7c7d0f50ce348986d8", "650000000000000000000"], - ["0x4b36c4b9c7c92e2a643cc42f0d9859519d5591dc", "647000000000000000000"], - ["0x581f967fabe549fb85ee7a851a432ee27eb2861c", "645000000000000000000"], - ["0xcb824df92feedb354c0d1cb5097e8bf2ca478290", "645000000000000000000"], - ["0x2cc7bfe4e11687d0f5c28cbaa48073458dddefa7", "645000000000000000000"], - ["0x306db8baa49080658b86f93b8f79adfb062ef9ec", "643000000000000000000"], - ["0xf9be5c224ccf6224b42ac431deb73bd697fb6499", "641000000000000000000"], - ["0x3b704c981d82726d439179302bddf6abf990a9fc", "640000000000000000000"], - ["0xb753087bc71d5ca6f7336567b4dcb9d8577f806e", "640000000000000000000"], - ["0xc9badc2b35e5143b74443a990cac1ae820d2508f", "636000000000000000000"], - ["0xc163197a9d80f04dfaa550da9aeb826d81ea33ae", "635000000000000000000"], - ["0x0607af01bce45d29f9c784e2754045d609a921a6", "635000000000000000000"], - ["0x9ab4d84f9882b1ef8e33259ea8010fb62a895139", "634000000000000000000"], - ["0x57abd7868f043e17d33e37c6cbd86e1e189bef0e", "632000000000000000000"], - ["0x83401c971ae7c1ec19646c99cfe6c6e2b9115781", "632000000000000000000"], - ["0x3308e8cc698c4903af3571c8147f0ce3874f0a0a", "629000000000000000000"], - ["0xd22fa7a71e896d5ba8ed87522d0af5c0ef7b5fce", "628000000000000000000"], - ["0x986fd6f03e337e18174e1ed694f81b81668fd3ea", "628000000000000000000"], - ["0xe903349a368acaf2833c30d1ebd1f09f6a0b6830", "625000000000000000000"], - ["0x9dc49081cae215ac1c5a5744630b4fcc23cb960d", "625000000000000000000"], - ["0xeb2adc57bfb86ca79c8f106db8ea3f3364c09330", "625000000000000000000"], - ["0x77370579286515d09e4dbe68bf634980f3ce6f97", "625000000000000000000"], - ["0xb3d3fea5ca6b60f6b3d305edc55fa941a4dbf678", "623000000000000000000"], - ["0x8ee79cf84cc62b05b1febb22062b87f7418852a9", "623000000000000000000"], - ["0x21e3545aa43f043df8aa2604275613dbf3dd52b4", "621000000000000000000"], - ["0x1b4ef3e3ae9c60f8e8b0b6a080773d274126294c", "619000000000000000000"], - ["0x6628d0731ac8e564e16d60da68c8200064b47f56", "617000000000000000000"], - ["0x63c33d37e0523f1a99e6c7abd211a72ad4e58f85", "617000000000000000000"], - ["0x72c31f6cf2f22396c42ec33e51f76b6e6c9fcfdb", "614000000000000000000"], - ["0x5367d9bd6996b32b65a062618f7d0e00be27b107", "614000000000000000000"], - ["0xce42353fd66097a9a87885fa1e66c70c20a0ee60", "614000000000000000000"], - ["0x16e16af66e019c4eb514db27d6033de083e7dbc9", "613000000000000000000"], - ["0x72147caa9fb9832dcd7700ba5a9ec1e3fc6f5ab2", "613000000000000000000"], - ["0x0427b2d09abb942c3b30e7063a19588d777a28d4", "611000000000000000000"], - ["0x903217c7d31d6a36106f76df578e4b0366318cc4", "610000000000000000000"], - ["0xd3841da932756b1f76608f790dd91d06ae30fc11", "610000000000000000000"], - ["0xf53f20ab50e744973d8b3c23e2afe5e4f7e20c47", "609000000000000000000"], - ["0x3854fe3b8c0e5fb25d919c5f439083e9377c9a68", "606000000000000000000"], - ["0x5c8b9c86c219a8ffd7bd6a82367b5560d8c29dd3", "605000000000000000000"], - ["0xdfbda378cdcb7e9b385e1a907b5c0f3507703ba4", "604000000000000000000"], - ["0xb1b763f855d5f81be4c93193f6f096c6a051585c", "601000000000000000000"], - ["0x8671d45621c481cfd397f2655b9764932d20bb8d", "600000000000000000000"], - ["0xc1da60cdf769938e5d2b7f17c673286d79aa6755", "600000000000000000000"], - ["0x52567a674bc0060120508e9b1026b712ac475132", "600000000000000000000"], - ["0x78700077174de0fdd7b848c21361490262e809c0", "597000000000000000000"], - ["0x3624c808b025fa95402b13860de4d43b39999bbd", "596000000000000000000"], - ["0x345fa4f148bfdca72ad3590f7986c537e8067ea3", "594000000000000000000"], - ["0xb2e7c3ef8d3a76012ae89f2be0a93d7809dd9f10", "592000000000000000000"], - ["0xa48f0361a682c26d88ed23b591236d8c1b823c49", "589000000000000000000"], - ["0xa09c039ff0d13880ada68ffc7a0d79267420a983", "588000000000000000000"], - ["0x97fa11bd06452f6c39d5bd9a64777dcaf42d10b5", "586000000000000000000"], - ["0xa649bd1a0b8e35ef782b7cfd7cce929a8fd1b04d", "586000000000000000000"], - ["0x2211a920dcc05a44131dc0933bfa921d9280c7e7", "586000000000000000000"], - ["0xb7a0738523de5e8c2f40e5ea1009c68c25004aa7", "585000000000000000000"], - ["0x1a5be5472c6c80b1b71d93f5eb550b6b1c3405ab", "579000000000000000000"], - ["0x2c9ef3aee79a6ce5041b37f4564ef7e88d1ce2c6", "578000000000000000000"], - ["0x0833a0ac904cc2883e7a07a5ba4c37b492599f2c", "578000000000000000000"], - ["0x31e3a2e7107171823ec242445f3b8f32ec2f08d9", "576000000000000000000"], - ["0x34b07db14f4db3bc9c528caa8c696f97cd3d621f", "576000000000000000000"], - ["0xffe026112ff700f2c3d1e47423c22288cf85ac16", "575000000000000000000"], - ["0xd2ac7e9d8ad98e9c5e57b935d6bdd2e7ecc9e1c1", "575000000000000000000"], - ["0x6c1485ca7219d57874daa56a8924a348ae3891f0", "574000000000000000000"], - ["0xd4d8c6a21f71de026e68c160d75cfd1d720d22bb", "570000000000000000000"], - ["0x65e57eb1a37ccbe3409c1b7323912b0587fe659e", "569000000000000000000"], - ["0x5b4183b0d1eb25bff61e28421afbdba3b7eb1f73", "567000000000000000000"], - ["0x0032eec8d52138ff880e0f8c1a3afc6393965b6b", "566000000000000000000"], - ["0x5f9840c4d45a91b600b9e41dfa7a6920bba649c3", "439000000000000000000"], - ["0x5895b7467afdd8cae2d9dbdac6de5522234f2e1a", "438000000000000000000"], - ["0x517047f615a07450ab32e4fee13c56c2f9e7d961", "436000000000000000000"], - ["0xd31b1b35ec8b89d648d4b1f7f96689a2d5b0d2fc", "436000000000000000000"], - ["0x4680e5ca03bf2021581b73d28e5434e81a47e23c", "436000000000000000000"], - ["0x6bd00b0d08c0245d07893b4873e4021a7c92b2fb", "432000000000000000000"], - ["0xef779d79e7027044ef3b8167a0b785282926d018", "432000000000000000000"], - ["0xd784ae16a4734d978f124579d759aeab454597a4", "431000000000000000000"], - ["0xe2fbb2d735beb5c98641d5233c64cf48b72e97a9", "430000000000000000000"], - ["0x7fce987f2f034e58e5d3be47cc2ae92e8b473492", "430000000000000000000"], - ["0xffae4c3d0a479702090080039d5c6b87647fa4a1", "429000000000000000000"], - ["0xc20c41877a9af9c59360a4c66f70ed63d30bc661", "429000000000000000000"], - ["0x0605e76bb3bf5cd33e38287a020a7129687a1a7d", "429000000000000000000"], - ["0x06f57d59f857d9b3fe110524727b339547c3f5bf", "429000000000000000000"], - ["0xd4e1f6e0d6b121253bb08b3246d9458b13c5d92a", "428000000000000000000"], - ["0xeace932fa48018c7cfc9bcc8e5399a77c4b73c7b", "427000000000000000000"], - ["0x1438096913309fccbc17529398752aebffd52c0e", "427000000000000000000"], - ["0x62eecd8f1e3ddabcd63937c268ca3659b88a198d", "426000000000000000000"], - ["0x9b37996b36c4cc37bac28017c22c1c9c7d91b807", "425000000000000000000"], - ["0x69a10364a3051ae0665a05e6573b6ca92a79516e", "423000000000000000000"], - ["0x2d62f7f7227e00769d3136882d1224bbce96714d", "422000000000000000000"], - ["0x41bf28dcacaa6de53eb9771799b6fca5aaa57758", "421000000000000000000"], - ["0x631648a072ef63216eda1e23395fd155ec35ed4f", "421000000000000000000"], - ["0xf1ddcd748203362ec65cfeff36f24d58cc5a1a66", "421000000000000000000"], - ["0x4d94667b1003393828cc885f0dfccaa7dca4ab7c", "421000000000000000000"], - ["0x19cbf8aafe9f7fd950567c53915d6c348bf3fa8b", "420000000000000000000"], - ["0xd7469590c1a809c859caa77598d87b8dd0144391", "420000000000000000000"], - ["0x0b34f1e072214721d7e591beacdab1098466493a", "420000000000000000000"], - ["0xa0798fdd595c12b5de930687d5857e9e277b22e0", "418000000000000000000"], - ["0xe011cc1d3281619876e98996270bc08c0719d7c0", "417000000000000000000"], - ["0xec992491159d31e3764f5e8be3fd3fdf6b805fd1", "417000000000000000000"], - ["0x083e31eb571d4a2dac8faedd77fe9bf3359d4b1d", "415000000000000000000"], - ["0xfd7e37b3e50759e8cd304663986d70c17632dff6", "415000000000000000000"], - ["0xabcdfcefe14a8737dd366de6f485a2831564789b", "413000000000000000000"], - ["0x1a48f70a2ef3be51a941ff475594bd1c4cf34e24", "413000000000000000000"], - ["0xc3c47a883dba39254f7af7c655566791bd404085", "412000000000000000000"], - ["0x64bc2504519948633f639ec35d955f738cd70b43", "411000000000000000000"], - ["0xfa59f5b8a1894c97418c0cdb6bd17705d1f6cb37", "409000000000000000000"], - ["0x672e226dbf55787c23a3f5105f662ff42ebb391f", "408000000000000000000"], - ["0xba3fbc2885144e9a352cca0fa5f39f9753e23323", "408000000000000000000"], - ["0x6a2995e6da98f65c7c1548e6a2b681f1352addff", "407000000000000000000"], - ["0x28bc33c61382a9e5895b4d1a892333ca7cbdc3d3", "407000000000000000000"], - ["0x2053a99675b0d2070b7503ff4767567f91073de1", "406000000000000000000"], - ["0xb5f622c8c7696ea5f4ec7c1049ecca38f987df4c", "406000000000000000000"], - ["0x7907b64bb4fac25c535b16d43c263f459c3c21ff", "405000000000000000000"], - ["0xf7d5d1e3074331bd6d7de5519107f8ac187aed90", "405000000000000000000"], - ["0xc564de8c526f74e0b2f106d06a2929a0b5146fac", "405000000000000000000"], - ["0x8dd20fd51a88b088cef02662f816a431cc4d689c", "405000000000000000000"], - ["0xa58d8b96e665e54a9b45df09b42f17ead20f361d", "404000000000000000000"], - ["0x55e0d5d452eafc98dd4e60200e8865a1f09a51d0", "404000000000000000000"], - ["0xf0f75571e01ba8610b91a583ef18a330c14bbe7e", "401000000000000000000"], - ["0x5dbfc31c252397cb6cafcd0efffe56d89087919a", "401000000000000000000"], - ["0x959398fe03b1b7dc43231b90d73a33d798353a79", "401000000000000000000"], - ["0x5fb42f57eca503e305027774be412453ab005792", "400000000000000000000"], - ["0xa3f19470d3fc0c0f69bd82876bd573b592ca9597", "400000000000000000000"], - ["0x48f88a8d8e4a9dff33c0a4d857a81a189c2d6e07", "400000000000000000000"], - ["0x5ea85d36eb9c9960724b6d1f912d52d4856805f1", "400000000000000000000"], - ["0xb5b083bbf813f314263f42bc3fb25b1c139fc96e", "400000000000000000000"], - ["0x93560aa4084dec59695c1a9dfdc24d5f4b55483a", "400000000000000000000"], - ["0xebc7e58735280478eadb480f7584c79ab955b094", "400000000000000000000"], - ["0xb66b58e836568543f45d86dab458df7a71ee35db", "400000000000000000000"], - ["0xfeb0ed524ab18cb82038422671b82fa8ef6d073a", "399000000000000000000"], - ["0x473f9715ee5434523e4dfc4d8ba6a2dc2ec4dafa", "398000000000000000000"], - ["0x60a6853b39d3b37e1436c1e281e28cd91f09fcd6", "395000000000000000000"], - ["0x0efe3b099c8281a26a3aeea43b2749645ec75210", "395000000000000000000"], - ["0xcf46e636a925b5cf1f5ae06001b26b25e98faac6", "395000000000000000000"], - ["0x3b60bfb78f3fe84ff2bc75dee2b14b2ea13805e2", "395000000000000000000"], - ["0xfc0739f29e140f2f932bdb995fcee1edd0a2235b", "394000000000000000000"], - ["0x685b5d49f4a9ef3b1e36c81c6237c62024b487aa", "391000000000000000000"], - ["0x8159ae23624200b2929739f628a5472182f2b979", "390000000000000000000"], - ["0x2be2fa0c5a0ba2c046ede2255e4bd08854347de1", "389000000000000000000"], - ["0x4a26b856e9eb9db65ec5acb93214eabbcbe3a749", "388000000000000000000"], - ["0xe4c3ae3235e0a8f267e27d27fc56e46bfdd62525", "387000000000000000000"], - ["0x6d759273795a2d3f23c5887aa694fb21f2ff0901", "386000000000000000000"], - ["0xe3970902d748181e04bf81919d5ff8ed30cf005e", "386000000000000000000"], - ["0x3b4b0d8853db68f290757e8d5de2e5c7893ddab0", "386000000000000000000"], - ["0xcd50f59edd184bcc4e44d7cc33f12cd469519dcf", "385000000000000000000"], - ["0x6f3013ef8589af4f024b4f926edf538c3321456c", "385000000000000000000"], - ["0xc7efca477afa3c8fe231614b9dc0c78988baeb1d", "378000000000000000000"], - ["0xb786074078d2cd10146521b500cfd8a154c13b2d", "378000000000000000000"], - ["0x23c51a184ad7e7095e40b5b394d6566ec9f01eb5", "376000000000000000000"], - ["0x9c4ab5727c76563f8c386c3e78672b4f9cdbde5b", "375000000000000000000"], - ["0xd5c534c0a39865bc0d11835659ea8440ede7d29e", "375000000000000000000"], - ["0xc1440f6c952862e39c84e901bf032ffaa9ec2fc4", "374000000000000000000"], - ["0x20b5c8288b313c6ae31fc563a9d40dd1142cdff2", "373000000000000000000"], - ["0x4f7946655b920890c6ec9cc53c6b851ea96d8f98", "373000000000000000000"], - ["0x6acce4cc780847e681a269a821557e4c32ad9cb7", "372000000000000000000"], - ["0xff3cee0891d5b50b7c6a6f148a9c922c37b94626", "372000000000000000000"], - ["0x8f41fd9319b0f3dd7c1afb69c36ffb467fb324de", "371000000000000000000"], - ["0xb6dd90bdb43c76793080e2a8065f084763602245", "370000000000000000000"], - ["0x7717a9ec35c24a20faaa38760c6f29133aeb8874", "370000000000000000000"], - ["0x2b5b309e6c233c06e766178ec02864d15fc49195", "370000000000000000000"], - ["0x3a30d21670b7080ee19bafef23db9a40a104e769", "370000000000000000000"], - ["0xa5c7a7d03f6b6b2c3ba97054563f6e0a9e27eae0", "369000000000000000000"], - ["0xf9e2f244537f1c01628a51226bae34d1583af045", "369000000000000000000"], - ["0x06be50385115b75926f7ab496f0c11adc5c74bfe", "366000000000000000000"], - ["0xac2f0ae87a45cccc52de8e0f6d00d9e9b477f745", "366000000000000000000"], - ["0x3d5f99c5d6c3b012f4731815118f897c14e4e07b", "366000000000000000000"], - ["0x2ace839c452e0e5666328b638cc36337f1c37c2e", "364000000000000000000"], - ["0xecf6692c7952cdcb34b52b2ce5f0008d2714ef7a", "364000000000000000000"], - ["0xcb77c3033c1629f1d8f261c5e506e007041fd642", "363000000000000000000"], - ["0x468f05137394f349f37c5e7d9b35661b6f68c0b5", "362000000000000000000"], - ["0xc147deebfe852b23c7c58434c435d9f6b0cb90ed", "362000000000000000000"], - ["0x1861608fb90cfa01c1b348915497c658e22fc8bd", "359000000000000000000"], - ["0x47bb57496ae8c10b3b714bc7f064f3ac049b28e0", "357000000000000000000"], - ["0xcba9e488850be09d9cd0d60556c2848d5ec3457b", "357000000000000000000"], - ["0xbf2293d6467c1938d5989dc3959a044b48cf9bee", "356000000000000000000"], - ["0xd8ad5c375b7ec4088ac091aad2fb1b9acf0bdc6d", "356000000000000000000"], - ["0xda1df669ad144edea25f4c22daf16354a3be9df6", "356000000000000000000"], - ["0xe12986de407031a7b59260faa2b28571f0757854", "354000000000000000000"], - ["0x039dd827ddc52c0d8f0a8c7a8052dd6868963de2", "354000000000000000000"], - ["0xf5a28d905b6829fb17e6ab9e749698fb30130672", "352000000000000000000"], - ["0x547f00cffa5688f3a364e37c57a24e00fbd9491a", "351000000000000000000"], - ["0x2f6f02ced513858d95f3687a6ff18cb38ddbaabb", "350000000000000000000"], - ["0xf63a7079b193ee1437ff41ae40b7f705f59d5e34", "350000000000000000000"], - ["0x4e3cfa54f8cd3ab91a8ad2340cdcd183b5dc7440", "350000000000000000000"], - ["0x89dec99a09b0030000c5508d9b7110e594af142e", "350000000000000000000"], - ["0xfa066dc042d979e585aeef94ef20af736581cece", "349000000000000000000"], - ["0xe25ef55fcff7956941fb2ca00929e9891f027b6f", "349000000000000000000"], - ["0x52db50d39f1182054ad03c61d714032a46c6993a", "348000000000000000000"], - ["0x479b80a249614752fd5a15e132669e47c49d75c3", "348000000000000000000"], - ["0x91a73acb271c3ebb3ea5467f9ef9b29d5a080d04", "348000000000000000000"], - ["0xae5a42c292a9bf774e0dd92779110b8f0a355e0d", "347000000000000000000"], - ["0x82735147c800a786166d7cc0e076fd056f773dd1", "347000000000000000000"], - ["0xb97176276b93980a659bb54b3243364e2a8c4d21", "346000000000000000000"], - ["0xce124b52f0559266b041b020ff1c246ca88538d6", "346000000000000000000"], - ["0x2d6f91803e8d713ea47d03a74ebdcaca2b7d92b9", "346000000000000000000"], - ["0x5ca910b699dc0e1dada4b6f25ba5a871d1fde8eb", "345000000000000000000"], - ["0x93c3fd1f1f4b736a6cfce3d54b1d21394e5efada", "345000000000000000000"], - ["0x5bd1fad41798914f3c3e2dd1b1a78f738cde262d", "344000000000000000000"], - ["0xf09ec2813777ef277034865649096e1e215e777a", "344000000000000000000"], - ["0x8f622c74f05494638992d1fff99b8403fc29bae7", "344000000000000000000"], - ["0x92743bdf2346c0117dbdd8a707a4b0929d66ee26", "343000000000000000000"], - ["0xa001d2981383b739fbb80297f94316b8073b0ce9", "343000000000000000000"], - ["0x40213401b9bc76bda3cee270418056062c47c702", "341000000000000000000"], - ["0xd81e2cb9394b399d6f08c69637adfea1e3634103", "341000000000000000000"], - ["0xd2854b0300723d0cc0a06640968c4c497ed67230", "341000000000000000000"], - ["0x778e4aadb3da1e922c7ee817b0c9362043beed96", "341000000000000000000"], - ["0x4d157701701e2555c6e6b546422a8ff2b85adc97", "341000000000000000000"], - ["0xc4e3ed12796972cccbf328f9ed6b260605628e46", "340000000000000000000"], - ["0x2a183e310e56cd262e4b3024ef9dc490fd108f8d", "340000000000000000000"], - ["0x214a2e26a097295603ed2913e018c53944189613", "340000000000000000000"], - ["0x6635ecb26290fc4bba9517314d32ba8e0758aae1", "340000000000000000000"], - ["0xbaf3f8e7797003be711b86a871fa70603601d9d8", "340000000000000000000"], - ["0xaddd614c47aa8788305a2bdff4c17f6407729b4e", "340000000000000000000"], - ["0x194a6e092392449f567cc86500363811e36ecf52", "339000000000000000000"], - ["0x2c77374cd22630a86834e74149eca868e4b1a1b6", "338000000000000000000"], - ["0xc3fd21806cff1b370e864967db4ff14c82277aaa", "338000000000000000000"], - ["0x1233dd90d5334c8d7d0a7e14fd0b9638235402cb", "336000000000000000000"], - ["0x3e19f7d73f807f4e7b99431b8d9676d8553894b6", "336000000000000000000"], - ["0x9b97380c223f85b410add0ed75675a6513ecb771", "335000000000000000000"], - ["0x9fad047281a61db481ebed86f0fe1eb660f5b633", "335000000000000000000"], - ["0x0f6362f799434041070bb8bdba02984e85fa8ad8", "334000000000000000000"], - ["0xf7858ffe1810a5ba72b843b9c2322fd1779276a2", "334000000000000000000"], - ["0x8f5ef950d786877f86fa150989f6d1e68af9e97d", "334000000000000000000"], - ["0x33cefb235c6d1328eb5486d154a6ee5d57652f8e", "333000000000000000000"], - ["0xf7cbcf9afc2c1a818aa7b1ee3e954e65b0b9e0f4", "333000000000000000000"], - ["0x0b6c146abbbf45b2566f8442ac4269e6124abb83", "332000000000000000000"], - ["0x8cd332bb8f734e0db6d5ccc4b9486b4e40de4322", "332000000000000000000"], - ["0xcd7365ecf7227896d23b75e150ca10821923b811", "332000000000000000000"], - ["0x56b93a4717e47829520b5f0da10c5fee04b3ace2", "331000000000000000000"], - ["0x79e421c024485ed3e23e264bba8f2b295950b20a", "330000000000000000000"], - ["0x874fcf122bb816b4bb1770a3aceb03b9b39cca9c", "330000000000000000000"], - ["0x3163bc6537b81a8e54d850081d700c14ae30510d", "330000000000000000000"], - ["0xa2cefc3ea05baef04e1b360da7d5de70b8338fb0", "330000000000000000000"], - ["0xddaaf2c3305dd1feddd005f7273fb07b9cdfa7cf", "329000000000000000000"], - ["0xedf470bd925d0c64bc96962d3bdd717eac84006f", "329000000000000000000"], - ["0xd6cbe50054c9a9e3eed385dd2ba094f7e8018f34", "329000000000000000000"], - ["0x2479737205df8bb6523878b4c881470e80c46d48", "328000000000000000000"], - ["0x085ea1d2fc525884484646718a508905037497ed", "328000000000000000000"], - ["0xf4b151977024678823489a72ccc6f53f5d496104", "327000000000000000000"], - ["0x21712e1a233d5a90da82e1c61fa6183e81e878f9", "327000000000000000000"], - ["0x6db4efba09349084ef2073748551ced6db403c35", "327000000000000000000"], - ["0xf760069bb5119e6028cd9bc1bb2ea655e4203d77", "326000000000000000000"], - ["0x990fe30cabb0567512609caacd882e5c2998b224", "326000000000000000000"], - ["0xd2a67a1b56d9e2a60548960359bf525a252c1780", "326000000000000000000"], - ["0x6a76747342f55b67cdc1571df445744afb93c2ea", "325000000000000000000"], - ["0x9374616e569445ef0a4c2eb51094be31a18ce77b", "325000000000000000000"], - ["0x8e360daa57ab3ccc99a8af77fc2de8ae1cb99e87", "324000000000000000000"], - ["0x37557ec9c02fb6636c7321d5ccf273bea051dd06", "324000000000000000000"], - ["0xb22091c028270c0c772c7ae16948778365fdbd14", "324000000000000000000"], - ["0x97d4afb35f95bda7a3fd39263ad7bda18bc85690", "324000000000000000000"], - ["0x42c5d633ac3486115db8f5a23f7dbd4b0d259cc4", "324000000000000000000"], - ["0xb000132aad9d8dc5a8c37bd2750b1fcd211d4716", "324000000000000000000"], - ["0xe9ff7e5c69bd53638c4d04568f29ab575417d102", "323000000000000000000"], - ["0x2abb000c0544152ab12e39549c9457410f206790", "323000000000000000000"], - ["0xeff06e7953a4d97f4dbdb7060ada79f338a5ca60", "323000000000000000000"], - ["0x822245daa39ab32206fb343b1ed653ac8e5d7338", "323000000000000000000"], - ["0xa0a822070b4df32e1e68232200a11e7f564d10b6", "323000000000000000000"], - ["0xeaea5e20ba7d72164244b13a4435f12730e2c8a6", "322000000000000000000"], - ["0x641954c0ef957bb20068c061a4233e04fbe3db46", "322000000000000000000"], - ["0x51b9704c7f271a557e74778725f1cb83135497fc", "321000000000000000000"], - ["0xcce0dca48636e823ace24ec16cb242c2312c589f", "321000000000000000000"], - ["0x72fc958886e2d0b94d6b3bb67d0fd0654a2a8606", "320000000000000000000"], - ["0x402dec3f9fb0d2fdb4ca22f3800738bfe7082765", "318000000000000000000"], - ["0xfb044636b92629aa38ee94aa397e09cb7f3ae6cb", "318000000000000000000"], - ["0x812f1f434fae0346764687e6069e8176c8601991", "315000000000000000000"], - ["0x0420dd486f8905fb7c408d315870d579d2ff2507", "315000000000000000000"], - ["0xad6b6793a66c99cccd368567ad16652be4603717", "315000000000000000000"], - ["0xd3fbda6a3a49adf3cf6b2a3501b5c8cf270a07ac", "315000000000000000000"], - ["0x084466b7f2eba52ed37c63c7fa25b0148e707497", "314000000000000000000"], - ["0xc7ac35c412cb902f1c90d1498d04758f3d23d8a0", "313000000000000000000"], - ["0x2999cfbf7bec652ac7c72f555d4489c5fdce46cb", "313000000000000000000"], - ["0x02966fd54b31a7ec842a323bd5049b0378699c4c", "313000000000000000000"], - ["0xcd520946df75ec47ff56521ff1e9bca07dba21e8", "313000000000000000000"], - ["0x7b5928b2894ad3ce37af7cf1f842b81ab8932ea9", "312000000000000000000"], - ["0xd685f9a87f5cbd534824bf1dea581a8de083f2da", "310000000000000000000"], - ["0xa8ddba3c1e0cf1eb3a06c8bedaf25f9fc7e297c4", "310000000000000000000"], - ["0xad7878b5cf4da8c84dd62eb55c827fda3f9a7033", "309000000000000000000"], - ["0x2c047714d4486f67754e8172c97f45e92be87054", "308000000000000000000"], - ["0x583105cfb4f7aad30770f338efd06e1affc4fe88", "307000000000000000000"], - ["0x5c114501cab9f379b6aab10e78b4f50eae7a0d6e", "306000000000000000000"], - ["0x84c6de104b03af18ed72e472de1869dd0757bf7a", "305000000000000000000"], - ["0xf53b53af7530aa0c7db54b4d028157af60daeac1", "303000000000000000000"], - ["0xedac0b6db8a835a8664fd51fb96361ac707f8ff3", "303000000000000000000"], - ["0xaefcc8992d7d42dc40b8a88c2b30a5c808d2b58c", "302000000000000000000"], - ["0x232ed6686e163cd9de640b0635d1ad0b30e986a8", "302000000000000000000"], - ["0x481dec5c5f7a9bb4cfebf2ceceaf9fb9e99aab92", "301000000000000000000"], - ["0x566280a89dd72c8d60bb4db62ce24b08be82cfa9", "301000000000000000000"], - ["0xfa497b907904ddc735f5059a4ed97275295148c5", "301000000000000000000"], - ["0x386cf921c3c64859d4892588aa02778807627709", "300000000000000000000"], - ["0xdc5ac9650b4296b1d62943873f5222359bfa92c0", "300000000000000000000"], - ["0xa6e4cf15c8a582cc2d4a175847f52586e326bde7", "300000000000000000000"], - ["0x32371b624fad61fcc122813ac42ec6f8639f7fb4", "300000000000000000000"], - ["0xce0f30a8633bf0a8b528c73535cdc79aee8220bd", "300000000000000000000"], - ["0xd59656fa517bd5c3dc3588ff6b1dcdb4228139f5", "300000000000000000000"], - ["0x2fea4f7c1e2452368cb661b83d34eed82450d110", "300000000000000000000"], - ["0x0980e08622091456d60a6d0b04c45521f719add3", "300000000000000000000"], - ["0xc5ab97ee3048ae3b3430ae8e7ce2c0cc09fe44de", "300000000000000000000"], - ["0xe612941e974e818ed8679fd385c19e188da66968", "300000000000000000000"], - ["0x732737614ad17dc6ca2e43581f8271afb2e4a9fa", "300000000000000000000"], - ["0x37b66ad48c6bf20596ac215354fd5e047011d0a3", "300000000000000000000"], - ["0xf467c7b8f063b46a0e633d28dd9b0f9f3a1dffea", "300000000000000000000"], - ["0x56652031d1c38d176e627a12e40eaf0357d0f453", "300000000000000000000"], - ["0x90b7f8eb3e7690ad5b093ef92ad4055f2b61e693", "300000000000000000000"], - ["0x8b71fd7dcf80db1d6d8f0cd40b85fa620305685b", "299000000000000000000"], - ["0xf2c471943666deae814c787a5c834e8fc599c70b", "296000000000000000000"], - ["0x4fbee6850965c8f6eb5eb56627c4a805acd9d11d", "296000000000000000000"], - ["0x361347da8d154ee26683f279b5b4744212b7993b", "295000000000000000000"], - ["0x2e457454ea91f413b743ded4d1a19be20d74aa60", "295000000000000000000"], - ["0x2401270543d683c1c428426e6a40e0f1d3168bef", "293000000000000000000"], - ["0x0382c934bf6ccc1ec63dc455874f883770ba73fe", "293000000000000000000"], - ["0xecf14d987a0663e83dfc22e089e96c6dc159f1bc", "292000000000000000000"], - ["0x262157b8359a51c23b532a97486ec517ee2ae9ad", "292000000000000000000"], - ["0x440b2690daf461acb09c469509f8af45d411c383", "291000000000000000000"], - ["0x0c48ebfa89d87ca96fc1d427997c794653354c36", "291000000000000000000"], - ["0x4cb453ae03113deb75d7a8267fb20621e8c996fe", "291000000000000000000"], - ["0x01716a7211e33de598d15f599e80d6694df3a17c", "291000000000000000000"], - ["0xca15c29018ac0e5ec0ea9970fa4543b8d4921c6d", "290000000000000000000"], - ["0x8195a3cc2cc8b11002ee5ea9804e780c9b8f9daa", "289000000000000000000"], - ["0x0664fdd5d83ae8fce72e703e1e26834abcc2e202", "287000000000000000000"], - ["0xc76245b8209aebb92399525fd75d8d72531f1648", "286000000000000000000"], - ["0x8a8d30e81c1c2f08fb775232e204f564b73adfe4", "286000000000000000000"], - ["0x9d64f2cd1e442b379ade1f8c2a6bd7db84681e85", "286000000000000000000"], - ["0x7dd2bf18c61136286f6476f104fca5d3b85c86f9", "285000000000000000000"], - ["0xa3b5063da84a887b71f7c047a2cadb84042aaa3b", "285000000000000000000"], - ["0x5c616a8601360577283c6d509718416d70ad6430", "284000000000000000000"], - ["0x2b7933f62e7bc307ef1f33d8b82dde6ed57aa273", "283000000000000000000"], - ["0x79d8972843837a22d6c92c2ba0816badbc30ecb9", "283000000000000000000"], - ["0x54520d193057ccb8f6ba6980bf95dcf7d48c816e", "225000000000000000000"], - ["0xddca23c6ba5155936c8c05c198e452a0674f4bbd", "281000000000000000000"], - ["0xdb963ed159f34ce8f552f8ba26d19790c3c072d6", "281000000000000000000"], - ["0xb8308ba70e18419dd2cf27b225800595a07813bc", "280000000000000000000"], - ["0x30a9925705190e5b298f94b3f3bad4589e241a4e", "279000000000000000000"], - ["0x3fcec81357e2cedd46941c867889ed0f66a0f6a7", "278000000000000000000"], - ["0xafac8df7f27be423c590cb64c4cf1b359d6308d7", "277000000000000000000"], - ["0xfdba76029046e9385569fb13cfd8e1f5aa0ea953", "277000000000000000000"], - ["0xa2bee999df19254bf98aab7ad2e99249ca8f58ab", "275000000000000000000"], - ["0x7a26f2a0b0bfe00e9c6f5e7cf1206eeeb40245d0", "275000000000000000000"], - ["0x30db929782c3d15d0424cfb1173a424f183278d1", "275000000000000000000"], - ["0x7901792223f235d68d8c02b56d0067476e26c092", "275000000000000000000"], - ["0xbaa40eb03893a081c2b1a56427b8ecf9e29dc2f7", "272000000000000000000"], - ["0xed1f74b2a93eec66042b17dedd20127058c1413e", "271000000000000000000"], - ["0x47a0a7653a39643240d7b11854e68b2daea9002b", "271000000000000000000"], - ["0x54c6619a52a679e9c4532becf8c9cc8a4d30383c", "271000000000000000000"], - ["0x7923d1ba6e7776d5e096bdab45223eb4dae0c114", "271000000000000000000"], - ["0x385d94de0be5f6d958b8340a8be6f51c4d53bd87", "271000000000000000000"], - ["0x4a8bfa165ba851b078d9d4c5423735ee1eb79699", "271000000000000000000"], - ["0x180699fbf0862ffb1fa1f352814f1a2ad74fb818", "270000000000000000000"], - ["0x22d514195ed0d7a7c34973dcd597741e197c932a", "270000000000000000000"], - ["0xbc5fdc52eae854bb43b6ad24d95bbbcba3af38f4", "269000000000000000000"], - ["0x466b23bf30d7bc4541b5470b62a0fddcfcaa33d6", "268000000000000000000"], - ["0xd11e3e8815ab3bc592a032bd1b56b01a89d83a66", "268000000000000000000"], - ["0x0a2eea8df5198e26357e6742b17023587056316e", "268000000000000000000"], - ["0xaa06323c05e3ffc542a0aec88c091f1b2027fce5", "267000000000000000000"], - ["0x7316df9dc6a6f0b0e4476b577117349bc6232448", "266000000000000000000"], - ["0x81e6884a4dfb51079f7898e5d6a682ea78ffd1e1", "266000000000000000000"], - ["0x9fc8c18036a79e89969f404e45ac6dfbf7fa2cf8", "265000000000000000000"], - ["0x7a0b2faa1c8b54ccaa026c293d78e80a7c11424f", "263000000000000000000"], - ["0xe3e3128698063e388f65fb6cdd4b86e43e8e86ae", "262000000000000000000"], - ["0x1d4c9a9b253cdd3c24565b9ff354f6987af7b659", "262000000000000000000"], - ["0xc2c2220cdb0b5b72f60cf0beefaeb559b64938c4", "261000000000000000000"], - ["0xec9afbb62de1df0e4c183885e7e96da7e8b72732", "260000000000000000000"], - ["0x764592f9c0ec019e29ee67d7b2032e6e989881ef", "260000000000000000000"], - ["0xe21d93aed5c47a9f5c17f3abe07100de250b9a4c", "259000000000000000000"], - ["0xf60c5173df0fa450be932f82c25b4b4e2a9566a0", "259000000000000000000"], - ["0xee9b161a24c293a17221cbdefb5b0c874ecf9b0f", "259000000000000000000"], - ["0x614572f25a619926d52b94af861608d9605119b9", "259000000000000000000"], - ["0x49e28333b9ea6b584cbb92314162b2f955380c7b", "259000000000000000000"], - ["0xffda8e1961d9e55ece7dde23deb06ef7a5b53e4c", "258000000000000000000"], - ["0x5fdeda0f94c664b94dba921889664c4dba7056de", "258000000000000000000"], - ["0x81bd75c315bd8d5af172e578224865d98aa80da8", "258000000000000000000"], - ["0x8f22dfbc78545c5c96c21187773dd70e7a95b2d6", "258000000000000000000"], - ["0x9b5fb7a2c9b82b834dfa027d5b5f9600a5d70418", "257000000000000000000"], - ["0x00e6bdc5caaf6236d08744beab010936ef7d6153", "257000000000000000000"], - ["0x7a4c60bf1c98d690262f054543e6ad72530935fc", "257000000000000000000"], - ["0x2c9394f92fd4a275f534041b0d85c0bce540e2de", "257000000000000000000"], - ["0x28bb4fd62dd3b29b46884ea7bf8113d4b0cab828", "256000000000000000000"], - ["0x3beb972102bb45920b152fa68463bdd4c17da5f5", "256000000000000000000"], - ["0x00c1f06ad4b8b930864f5a3fc0c63d5cf228655e", "255000000000000000000"], - ["0x12715ba002688b3dea97433530f18b0904b9b956", "255000000000000000000"], - ["0x982e0bcda3abb6404a6568ac27b9aa4c397212c2", "254000000000000000000"], - ["0xd8d333750d5c9567b1b080759439dcc8e7546a5f", "254000000000000000000"], - ["0xe6bf6a74c6d48645e2a305e0ce79a87993861d79", "253000000000000000000"], - ["0x3f4abb63d3f0c16956d7d0d3c29ad6d4c283b5c9", "253000000000000000000"], - ["0x186bc37c98daaed5b95bf3eb41141b32c250864b", "253000000000000000000"], - ["0xa0164e6590885be7d67b0d17608fe95b259b0209", "252000000000000000000"], - ["0x7eb3892dfc4529b81a9b10d07f46d9278bbcb35c", "252000000000000000000"], - ["0x2c9e1bf8c530a1c7f01e251536101876a73018cd", "251000000000000000000"], - ["0xe9fdd1f4d127fe79327ca9793684d31a4d138fb5", "251000000000000000000"], - ["0x9f2b668726dfbeb7a976d78513a602170fd5b270", "251000000000000000000"], - ["0xdfbb2a7eacffae06638eb0e35cbf2fabcab79f44", "251000000000000000000"], - ["0xab19019fcc47c350018d709040376e648465e83c", "251000000000000000000"], - ["0xdc3ce2f704e78ac0933b8bd60a1ec42f746cd207", "250000000000000000000"], - ["0x92272428764257be4e09355858691a7c751af36a", "250000000000000000000"], - ["0x3cc7f73f5a3a687c7ffa6234863d10c33b51aee6", "250000000000000000000"], - ["0x5ced069213dac826e1848a5b6c84a071c271f16d", "250000000000000000000"], - ["0xdb31938f36ea69ba720da05d83a53d23d235fb51", "250000000000000000000"], - ["0xd57ad2f27702eebd5094669c5616f66f4b2d7215", "250000000000000000000"], - ["0x673423876ce8b3450c2cb52e4845510e4b26e366", "249000000000000000000"], - ["0x7360675ed884c1038e22d602fb9ce219977ab11d", "249000000000000000000"], - ["0x9b181cbcc5bf35cad0da18af4558a70190cb41ef", "249000000000000000000"], - ["0xdf0ae251dd439d49ba136d4cb63a7f75b9159cdd", "249000000000000000000"], - ["0xb10d1e24ea7b92fc7eb305813c5197b373c364fd", "248000000000000000000"], - ["0x833b8eb15e8c4f42765400c86c095c5d7493fa77", "248000000000000000000"], - ["0x23b660111d92492af9845319d1af62384caaa32f", "248000000000000000000"], - ["0x92a413d33ed4b28405f1c785824480e616dd6f38", "247000000000000000000"], - ["0xa1c03903041346aac74960d8c4fa4a3953a8cac4", "247000000000000000000"], - ["0x23a4eaa46e520937f286e4d8c6cc79b129f2ef56", "247000000000000000000"], - ["0xa56402fb07ece948941a04ca2ac8c3b28d28877e", "246000000000000000000"], - ["0x81fb9677ec41e7f4c57cbe7fe6d7c67ab63765ac", "246000000000000000000"], - ["0x2c4b803574bb89267112f4392636aa8ee830fb0f", "246000000000000000000"], - ["0x013cc5f05bbc8c11a4c5fbb42ed6005e00bbf187", "245000000000000000000"], - ["0x543ca251cd58c577de8b8b7ccaf3b3f8a89ffc46", "244000000000000000000"], - ["0x01bbb770e02b811a656ac3e9b650d8d3296b1561", "243000000000000000000"], - ["0x1d9ee73419dd37821a1a01d5fed6b5f7d51f2375", "241000000000000000000"], - ["0x1ed6fcaab87bee0ca9cd08100268f00ae2a68052", "241000000000000000000"], - ["0x98c0b3b7ef21e8103e8171699adf32c677d68650", "240000000000000000000"], - ["0xd081c10773d09a70d8b7db328d596337a70fa220", "240000000000000000000"], - ["0x6363f1a75640552d5a372156617753187b9981fa", "239000000000000000000"], - ["0x07787a63f09e23043570735711373beb6dd857e6", "239000000000000000000"], - ["0x60303dae1c3bded0bae1d070271eff3a2d7de08d", "239000000000000000000"], - ["0xe5296e767d4be445e2d89c2e15fdc9c9ac130d00", "239000000000000000000"], - ["0xb41707d73b2056882f0ed732893202f018855cfe", "238000000000000000000"], - ["0x0541bb465a19a6490450d3b808a7fcc7f08bd5d7", "238000000000000000000"], - ["0xbd26a9c29ca9dc2c195094300e467d98ca67afcc", "238000000000000000000"], - ["0x95d8d95e92b9478aff767adbf188b3f7a9a59e81", "238000000000000000000"], - ["0x5d9fdfaacf5bc2e759fa210f6de3d7de5457b385", "238000000000000000000"], - ["0xf9c5edf27dfc90ed25ffd3d3beaa8523fbbe51e5", "237000000000000000000"], - ["0x91c4809243add1848b86e362192d80cd0304211b", "237000000000000000000"], - ["0xb968f274598f081cecd9404d033936754c7f93f9", "237000000000000000000"], - ["0xecf3d64e92b9d684c715a32347985e1501aaf329", "237000000000000000000"], - ["0x626159c3420a0c3ad5f5dd153a94425961becf11", "237000000000000000000"], - ["0xc32d531decd5376fcf1ddf18bc62b30765139f84", "236000000000000000000"], - ["0x4831b73ee8feca6c8e5d196c070044cc1d63e249", "236000000000000000000"], - ["0x3122123d411f4d8feb72c96480c07dc62c5d2c51", "236000000000000000000"], - ["0xc4565748161db315a1da5c7301c6553227a2a196", "236000000000000000000"], - ["0x76a95d549ca36d955df2c72f693690d8e51a94d0", "235000000000000000000"], - ["0x7e89f45bf62510b134db6b46e957470b9c2a95e0", "235000000000000000000"], - ["0x48cc8217b84aca0c7c966dc4f7dae6b2c675e7fe", "234000000000000000000"], - ["0xd57e5adb72156cfba34d6e2f62edf2b6a11eb55e", "234000000000000000000"], - ["0xad3eac819288fcdafaf486afbd54d05b54ccaadc", "234000000000000000000"], - ["0x87011327ccf35ab7e88f36deddcebf0a1ef049d7", "233000000000000000000"], - ["0x5c93d34e5e18d25fed99df0771ecf7de322bed4e", "232000000000000000000"], - ["0x3d1c7dcbf883c0717bbec30aed5a616bd9002b01", "232000000000000000000"], - ["0xd5a9666fad55f6f0884e7665d52b70cf129313f8", "231000000000000000000"], - ["0xd0529b53bae79ebf00e429dc74c897fc372f61de", "231000000000000000000"], - ["0x97649619b88d94b08f0b54ab9ccac75e87b29e47", "230000000000000000000"], - ["0x836c59b17f87e3eae5a3291a96d1c046f5b1a164", "229000000000000000000"], - ["0x1b33cac177206f04b5137d0068c82e454a28e2d1", "229000000000000000000"], - ["0x971ef1f39352abd927f900750ee2231c47d65e88", "229000000000000000000"], - ["0x9ec6c8972f54e0d1c44d289f1dbe5fb6d71ad0cf", "228000000000000000000"], - ["0x66f322df0f7c9876b504b7e4ea1a564d895e88e5", "227000000000000000000"], - ["0xf49b270e500c6179a83cd22cb7bf820befa11412", "226000000000000000000"], - ["0x273ce084c4a7631d2495883e75cced66e02537b7", "226000000000000000000"], - ["0x4624a7e23594287df1be7a4bcf5055fc86a397e0", "225000000000000000000"], - ["0xf0efe8f6028425e9ba49d251baa7b29875443bdd", "185000000000000000000"], - ["0x2b92d12d8cc0b9af862451393925092c6c21a611", "185000000000000000000"], - ["0x4bfe442562f52780265dcd542a8a512d577fdb34", "185000000000000000000"], - ["0x61bfce6fe4fe2901e1255702e7388c24fbf84c25", "185000000000000000000"], - ["0xb3956cf916d72b56b36577c13f2acba868d26c5d", "184000000000000000000"], - ["0xbcb2a27048dbcb983ab00829679a1c4b004505a5", "183000000000000000000"], - ["0x518199a207a142ee06610e3baff187de184d6dd6", "183000000000000000000"], - ["0xc4b2d4c8c7fe747c40050f238fd09e5c5cbb5869", "183000000000000000000"], - ["0x41c97ffd1b0427d6961c7a3a4325ad8ff5213d7a", "182000000000000000000"], - ["0x0959ba0cabd2ab398c2c2fa7d398c2310eb4cfaa", "182000000000000000000"], - ["0x8ec4ac695ee355e544e024b0500247321c922dc5", "182000000000000000000"], - ["0x0c142f334643be2eb555e28ac1365d27a0872849", "181000000000000000000"], - ["0xc25798a86da18c56aa19ea11aab217ce53bfbb2e", "181000000000000000000"], - ["0x3db6c3cbfe1ec01f81c1acbcfb3cc8338c8f958e", "180000000000000000000"], - ["0xc3da4c7a75cb02b6c90e57f62aa6f749cfba254e", "180000000000000000000"], - ["0x33d288c6f473cfc32a837e6717d276891dd5c9fc", "180000000000000000000"], - ["0x1d12ef0edc253a3744352cb2518a5dc2a1b0f928", "180000000000000000000"], - ["0x3d96b71e0c13f1ffcfa4bace75b92715370d2f5e", "180000000000000000000"], - ["0xa856a47eee22fef15c855613e66912d2deeaf135", "179000000000000000000"], - ["0xc4e4149cc6e6cd63f44735824632fc17c9cb79e8", "179000000000000000000"], - ["0x79f57e53618d51eeef5baddea0cb2fb2a0b836fb", "178000000000000000000"], - ["0x7288933308a14c55a3cf6add0deb00b5dbca8951", "178000000000000000000"], - ["0xc4477d22eb18932331e86eeb6da26d1711e43997", "178000000000000000000"], - ["0x7061e70b88268765072520a44d0a1e326121959e", "178000000000000000000"], - ["0x82a99eec2fc2ea9d7ce68a5b48e893fbd135ac31", "177000000000000000000"], - ["0x957b17da5ff2ad20b123bf11ada5105465ecd09b", "177000000000000000000"], - ["0xd7a3bc9af6a4e6653ceb0842b0d3a914232bc4ac", "177000000000000000000"], - ["0x7b5e82a13bbec350d81374d99eb4c30140cf09e2", "175000000000000000000"], - ["0xde8147deaf08e5d4d345fded89e96bba39ba0a8d", "175000000000000000000"], - ["0x2198ffea0be9e5d666cd1f57d2680839891dda3a", "175000000000000000000"], - ["0xaed19ec110d850b0d34609927c43970750c42494", "174000000000000000000"], - ["0x3c72abf6f7c7490736b1d623e459fbd7a91a8743", "174000000000000000000"], - ["0x3136540ebe9c2703412b387dcd993ae0c1232a18", "174000000000000000000"], - ["0xa2c967b2590f73b5d9f641a84513e1bab92ba301", "174000000000000000000"], - ["0x4b70fa020654a4b52a0a5e2b44db0f05f2378764", "174000000000000000000"], - ["0x81cb8102b18045d698c184a199de742f0efc99ce", "174000000000000000000"], - ["0x320bfde66e78d741d739e8852699bb9364dd46ea", "173000000000000000000"], - ["0x0c797ae93211d918ba59938788170ef17f812ef6", "173000000000000000000"], - ["0xfafb0aba94438e20fc73c518c0737823f36ca39a", "173000000000000000000"], - ["0x3086e62472801e47c99316b695d2d9733212b981", "172000000000000000000"], - ["0x5e510bdd3c1aa904c70acfc6e1c110a12fe24a1b", "172000000000000000000"], - ["0xce8fee93efae505980413f345f7f530f4d1a9dee", "172000000000000000000"], - ["0x8328e993824843a5348e1c1a9194925f468d7dee", "171000000000000000000"], - ["0xf94e7b042241e71a2c1f1fcc171c5d876dc47f0c", "171000000000000000000"], - ["0x295f6052269e4097d6dc18d36c48de2b390b38bf", "171000000000000000000"], - ["0x6e66f477e0bc825137ee18434ea2af9b862c6191", "171000000000000000000"], - ["0xf9f2cf0bfbe63b89f141244a6522f5d9dfe4039d", "170000000000000000000"], - ["0x6c3a4ce1995e69b4b1851477055c8756984c4b1e", "170000000000000000000"], - ["0x8bd42ceba1ac37fe6e1fe8ef545d94fabe4f1fab", "170000000000000000000"], - ["0x85330b3a8ac3209c9b16791470f9a69c5cb44970", "169000000000000000000"], - ["0x990e5e85387f04354c90845c82a448478c166d17", "168000000000000000000"], - ["0x390009b6400888a869b790ba8add3e588dce992f", "168000000000000000000"], - ["0x6339e9b65dae5f990cebd40bd171cc16a74f9d26", "167000000000000000000"], - ["0xef3f09025bbfaf8bc0673cd539d40f2ad98f5416", "166000000000000000000"], - ["0x3e40634d50c2382923e85c877050e2d1f1841348", "166000000000000000000"], - ["0xbffac4187d7bbdfbd3ec8e4c5e706e77ff847523", "166000000000000000000"], - ["0x742e4a93ea3f3d91b408c738bf17b75b77f4e9ad", "166000000000000000000"], - ["0x5653e1c2d1c1a0f3b0b67b91d4c718c000e68f9c", "165000000000000000000"], - ["0xbf816189f827777a11ec129bb062456fcce09cea", "165000000000000000000"], - ["0x35d918542153109253d5b7d8d4935a6890f9cc80", "165000000000000000000"], - ["0xac3b7e023df1035c6971cc9a9871eaa8d1f4ee5f", "164000000000000000000"], - ["0xc06fdb17e63c3f58e959b4cdbd0d0ce49a4fe5e2", "164000000000000000000"], - ["0xf999493a9785ddac946b9f1f516a79511f0014c3", "164000000000000000000"], - ["0xea793efe12f6d9297741199e5a57e3918f2a0fca", "163000000000000000000"], - ["0x01c0bd4dbc178c9f2e84c545603e0f0392d1a553", "163000000000000000000"], - ["0x910336910d9202999bc17161b95ab9ca14187f0d", "163000000000000000000"], - ["0xa79521ad05ce767047048eda8a37dcfcd26a2a18", "163000000000000000000"], - ["0xdda2dd3bca56ea616111c0f6b8aeb5a7b6845d82", "162000000000000000000"], - ["0x58fc252d4a7393b9e4cbfaa619f97dcc97b42631", "162000000000000000000"], - ["0xcfad78f8e2de8eee753d8b40ee8833ce169188d6", "161000000000000000000"], - ["0x8e9fadd4dabb560c6366339fbf241d10d8ba33a2", "161000000000000000000"], - ["0xbfd55f6bd156168dc4c9213e63fa539954fe4110", "160000000000000000000"], - ["0x789ef5f417efeb7ab14faa0a36eba98a5ee17273", "160000000000000000000"], - ["0x544c8fb835aa4c5a26129b20baa418a8154c0aab", "160000000000000000000"], - ["0xf8608049ea0ba52622c3e96924bff2144aaa38df", "159000000000000000000"], - ["0xa0ecffbb906e6628d2a398f2b8f7c92f5aecd8ba", "158000000000000000000"], - ["0xbe2615b571502afa5a5dfdb0361e7f2f62627606", "158000000000000000000"], - ["0xce7631d978c4cdb1184435bb6581a5b76aa10ce6", "158000000000000000000"], - ["0x3e5111973cc681e36b8fe8a41b38699139b42bdc", "158000000000000000000"], - ["0xd1d513c5c0c200fcfc21dbcd24ea81437a821b0f", "158000000000000000000"], - ["0x14cf589818c2b04b454d36ce8c4225ec04649406", "158000000000000000000"], - ["0x8a23f18e8a9d2d017e21857610fa7fb3438bfc89", "157000000000000000000"], - ["0x788719cbae9a9bd3622e549765edb61e29098457", "157000000000000000000"], - ["0x7a274bdbdae4af10406502bf742f8cfb77069a06", "156000000000000000000"], - ["0xb4628e64079398379aed2485e3fb05424cf57dcd", "156000000000000000000"], - ["0xdf607813e808063dcd68d4c12cb39a964d21d329", "155000000000000000000"], - ["0x653d8bfa24a06a1edef740057d35ea89807e8170", "155000000000000000000"], - ["0x9e61230a7f37add321f82b7a546d99678dc3cc41", "155000000000000000000"], - ["0x4964d39f28551e8a2d703144ec7add1fb97f9f6c", "155000000000000000000"], - ["0x0d6f394a1ba9f80c7984a90784fd46c12adefb81", "155000000000000000000"], - ["0x461abb509f2d017d4a2091a7c91b583282fd148d", "155000000000000000000"], - ["0x0c2283e4a76eccb11784ad4e7dd049bd31c6753c", "154000000000000000000"], - ["0x9ed9f90362a7b2509d753bef8af3a164804e1761", "153000000000000000000"], - ["0xaa904493622a146fa04799626eb8b27f5e6d9f0e", "152000000000000000000"], - ["0x27132b1c44ed20bf54ed53d13557485dee422a66", "152000000000000000000"], - ["0x4614bd31c121e8c8d6c73db7dc06645dbde670dc", "152000000000000000000"], - ["0xc8b8f52fe929731ab4a66c0ee3606293d2a63467", "152000000000000000000"], - ["0x13d8e76e2674d4457ad3cf3ffa7ac068f5c91f83", "151000000000000000000"], - ["0x1786a4d979138c58a0a966cfb0b028020b165d0d", "151000000000000000000"], - ["0xe44b88dadbac54ba75beaa07aae99b243b0b9f87", "150000000000000000000"], - ["0xf0c6f42ed9a560c0301f87cd81768f3d015b7788", "150000000000000000000"], - ["0xfda9622805b436bfed46381ebddcc043eb2ff789", "150000000000000000000"], - ["0x95727815db52cd0e09bad68ab92213935c32c937", "150000000000000000000"], - ["0x80b759f0a9391e64351e6b94e32c384a40d96b7d", "150000000000000000000"], - ["0x105badbbd9fe1ea1039dcaf217b5537c7bd53c20", "150000000000000000000"], - ["0xb468590c2f22608890b82121c0f0d73126f8ed99", "150000000000000000000"], - ["0xa79cd80e47ceafcbf8583405a04dcaa8f1823396", "150000000000000000000"], - ["0x8b0176be32b4cd028d52755b99250202e1d4118b", "150000000000000000000"], - ["0x8cab89fa802710d92ea99fceb67566a6457080cf", "150000000000000000000"], - ["0x9881565cd25dac0174f3f5706842d7041999bf08", "150000000000000000000"], - ["0xdc8bddc41008a38ae53ab5edd2b5cc954784d888", "150000000000000000000"], - ["0xe002fa6d0ecc0809a836f62c54a5c9ee228375f3", "150000000000000000000"], - ["0x7e132fd2322fc120632dad83790d3f343d81dd33", "150000000000000000000"], - ["0xb2e8379220ab36c38da6adbc974f5bbac2989db5", "150000000000000000000"], - ["0x99496a4c0426e3dc0eeda7f28298774dbecf815a", "150000000000000000000"], - ["0x00f4e673cbaa5bdd1551d5d9b5c442fa3cb6f510", "150000000000000000000"], - ["0xafbd8a1ac79c5ef7ad396a06c8f3ed7fea4c5dd6", "149000000000000000000"], - ["0xef782b830c609149d3e8210e6a186f86c8b9a1e8", "149000000000000000000"], - ["0xfc3d9bec2e0874ac5ff540692b7a28941b9bbb47", "149000000000000000000"], - ["0x5e0ff987fd553b8c814fddeb201ebed1a73e9751", "149000000000000000000"], - ["0x1e8b0ffd7189512e0f0897ddc1749760389b456d", "148000000000000000000"], - ["0x2e148e78a11e2c6fcbd11c98fda2e79aedb537a5", "148000000000000000000"], - ["0x88cc3e896c4c178ab98333dcd29c33d2cc2102a8", "148000000000000000000"], - ["0x2b6501b74149cbe243bf5897ed780253791ee009", "147000000000000000000"], - ["0x41e48af7bd19ebc2fe19fa0d8e0b721bedf10573", "147000000000000000000"], - ["0xd46c61ec25a6a568a51afb4248ed42ff6f70f181", "147000000000000000000"], - ["0x8c270f234cdcbd30d281799b584db3d0789e1317", "147000000000000000000"], - ["0xb91ce51ad82855a8c3269d175803cbf197331db0", "146000000000000000000"], - ["0x61f932a755e2e489839ae7853a69fca855b118ac", "146000000000000000000"], - ["0x95d7e264eaa821c313134dd72ca678dfeaa4067e", "146000000000000000000"], - ["0x3e3d2a8f9f116621234c91aae1e52331c9ab3ec9", "146000000000000000000"], - ["0x7502a1cce098394d71da3b77678254c657f62152", "146000000000000000000"], - ["0xfe8f5e90b236302c9db977e2ef9ae260d4842cbc", "145000000000000000000"], - ["0x2e55c161ff59635777d5e6bd5324041b80ae8034", "145000000000000000000"], - ["0x174d8441977f4492bfc7c7be26bcac2056cbcb10", "145000000000000000000"], - ["0x1ca20d63ff66314b82bfc3c4af942e919fdf2fd0", "145000000000000000000"], - ["0xf3f1d44125447ba5085d38474142edf973c4041a", "145000000000000000000"], - ["0x2b86e171ea99d2466814762436734a3823fcc8ce", "145000000000000000000"], - ["0xdc80092ea3610835da05f66b489f06dffc77bff5", "144000000000000000000"], - ["0x28af95d7a16ab63b5d816b5f12b605b7c2b268c9", "144000000000000000000"], - ["0xb2238198fd969e597b0cf636ccbc4de707123489", "144000000000000000000"], - ["0xfee2aa256b65efa5a78892ab14d206200ef5d7ae", "143000000000000000000"], - ["0xc3b424d84c3ae1c04a5e2c33860be8a1b89b72fb", "143000000000000000000"], - ["0x660f5420e6d0347bdce568e4f9abd3748f471f3a", "143000000000000000000"], - ["0xe0aef1db9cb60708202caaf9a505dfb8aa9bac16", "143000000000000000000"], - ["0xe290050f9556f76c7371cc3fd0b09eb34a869d7f", "142000000000000000000"], - ["0xe53c0315004bcd22b3b598c04a09b0c8c3fb7f34", "141000000000000000000"], - ["0x4f8716018ccb54ac64b68cd1d5f205d6e9818ac1", "141000000000000000000"], - ["0x1a9fa4d87f76cce6dfc143d28e73f69638096895", "141000000000000000000"], - ["0x4df86dcd6f836e8974a49d14fd7f4cabba78c012", "140000000000000000000"], - ["0xae58cf5deb81b849cbdad6e462b7c8c831813f17", "140000000000000000000"], - ["0x17ba3a6f59d4287ddc5120f5df42611d9c76cf4c", "140000000000000000000"], - ["0x8a2b108bee6fd05af78828682fa4dbb6aca4bf3b", "140000000000000000000"], - ["0xc49b15298c1ba9920caa36e4abe2ef080ffca692", "139000000000000000000"], - ["0x360a8c16f60acaa92b7ba3512ef0350a96628cc8", "139000000000000000000"], - ["0x1fa85889e388802cefd30b3104e8cc6f9a6eccd2", "138000000000000000000"], - ["0xa5038c7717d2b082c6301cd68093e8ad3b5dc466", "138000000000000000000"], - ["0xb63cf382fd5805f8a377cfc6eb75fdd46b9ec847", "138000000000000000000"], - ["0x8fc770715ac29266d155960c940204518e26e586", "138000000000000000000"], - ["0x54ca1ebd499d694f94c0f0e75b851c5e154f519c", "138000000000000000000"], - ["0x0ca3a47840cd9a4156f1268dae0f7c65cdf0dc25", "137000000000000000000"], - ["0x8685141579a4d62b198301063a4b59270c2d1fcc", "137000000000000000000"], - ["0x3e9692ac50af0083aa224a57cc329235d872be4a", "137000000000000000000"], - ["0xa663590cb3071c5161d243a72caf16feda584993", "137000000000000000000"], - ["0x2ce990adc9e3310bc68240119fbfbc2c889fab1e", "136000000000000000000"], - ["0xb3f702af57fd6409bee50f43d1024b5aa500410b", "136000000000000000000"], - ["0xbb4e989f6f57ef2bf6e307fe89aee29b7509b762", "136000000000000000000"], - ["0x9cc62dbb138093e72291ea20bbea62b8b0cbfe42", "136000000000000000000"], - ["0xd8e1aa74ef85f17f2ea8301b42f17eebc3879269", "135000000000000000000"], - ["0x045d21bb1807d4f96b17479b619aa8376c16e696", "135000000000000000000"], - ["0x5b68f82525c3688d9da8603ce018fe2110692a49", "134000000000000000000"], - ["0x4f4317748fb27ea53d770282d1de357d3b0e20a7", "134000000000000000000"], - ["0x9fa36d7f704890969255ef680ae5f45f74c45614", "134000000000000000000"], - ["0xb9de6af66902305e14a81a113986efac1f40dd09", "134000000000000000000"], - ["0x9170f03f451896ce80e7678a4c95ff845d3b431a", "134000000000000000000"], - ["0x092e6fef0f3c8289d257b651d50f673241aa2a0c", "133000000000000000000"], - ["0xac1bd1c6dc224d7538507d5a8f8d1e517d385d89", "133000000000000000000"], - ["0x02bc4b5f1b91780e462b90aa0deef6dff9481d64", "133000000000000000000"], - ["0x8d3c0495a3bbfa0940840064cf30a0d2c0b75b2d", "133000000000000000000"], - ["0x9acb7a770a8a6a3dcb381e492cc5793f6ba40f70", "133000000000000000000"], - ["0x41f1dcc467c912e9752b9905cb6cccade7f85f27", "133000000000000000000"], - ["0xf7977e5e81d9caef2d2e80bc73c0ea28cc49c75a", "132000000000000000000"], - ["0x49531aecfcd467f728bf951556bbe0299486840d", "132000000000000000000"], - ["0x357b04177c70faab80d567154666f36f91356906", "132000000000000000000"], - ["0x8e1304d4ec77c17f85362494662154eef7a1a865", "132000000000000000000"], - ["0x3af3c36cd8ad782290600d655640db0d88258068", "131000000000000000000"], - ["0xe3f1ca0e4234d5c586379818e9c47acbe4ad6d73", "131000000000000000000"], - ["0xdac60a975597741d10aee740c044aec22a0f9f44", "131000000000000000000"], - ["0x706267573810dc5b3143977478d3c8bbf79aef0f", "130000000000000000000"], - ["0x32326fb83189fd32f6412c30dbda1d110858ece8", "130000000000000000000"], - ["0x525c8ee9be82b647218aea01c2e914b70469d966", "130000000000000000000"], - ["0xfdfb87d1ee9e369c67755e3adb1736b26067b05d", "130000000000000000000"], - ["0x5a32ff1ffc4b4587b6d9e587be787b10ebef17ef", "130000000000000000000"], - ["0x4167247acd955124fff268ab657693c2a9a9d00c", "2730000000000000000000"], - ["0xd9efea29ea8cb6cb23dfabb088531d749fcb502d", "129000000000000000000"], - ["0x96eacc68caa66ce13988c7a05599f83c4440ac9b", "129000000000000000000"], - ["0xb0a9de2479f5cd97669b0fbd4d1ee1ef70c99b22", "129000000000000000000"], - ["0x8bc85e6ce33a0fdac6b295c52a1c97cb1b122ea5", "129000000000000000000"], - ["0xea46a28e5e2bd27432437bb54e1796b102c6a47e", "128000000000000000000"], - ["0xbf77f58fa7bb4086c47349a5dc16d78b38c0e94c", "128000000000000000000"], - ["0x0be6dd5712a57913893f33422b1fb63c076cef0c", "128000000000000000000"], - ["0x2c81cce3f18f25f77c2763c6940e53bbe3257415", "127000000000000000000"], - ["0xf665fa4163412f3ec094578f31e5e90dfa9fb412", "126000000000000000000"], - ["0x51a23f481037ca208086f42fe83d28b71c1ebc2c", "126000000000000000000"], - ["0x8e49b61be4f02d68eb620954730b5cc74ef53b92", "126000000000000000000"], - ["0x01c3a0aa472a156af8c2edb04d4459d8d2fe7c5b", "126000000000000000000"], - ["0xe3896ec9d6d056939844007d503b95ca3b1c05ad", "126000000000000000000"], - ["0x31dce26a1cb7001cce3b7488431c3521d10c010b", "126000000000000000000"], - ["0xcc6cf3c5e02b51e9f45d5170ab640bd743c4ffb5", "126000000000000000000"], - ["0xd263b093076130d5c2db662e2237532b6eb8cc87", "125000000000000000000"], - ["0x96edea2c6c23c40185c3adfd8805c236d091c21f", "125000000000000000000"], - ["0x69449f50f833185dd09b5cd0afa6872d4f92d1e1", "125000000000000000000"], - ["0x5835a02d0f46b3474305b2612ca9c6d61a973822", "125000000000000000000"], - ["0x328ba899bc165dc0b2e1f78999b6ac499a48e2b4", "125000000000000000000"], - ["0x61fc898bd97ab50c72780266f2d4ab251db07458", "125000000000000000000"], - ["0x8c0680efc3404eafdc7a506e221f60b70a88a43b", "125000000000000000000"], - ["0xa1cf8209979ee8da52b2b0f1335cbb9b3065ab20", "125000000000000000000"], - ["0x409fbd2cd0a755ef2d005af5b72ebf24d68a1e50", "125000000000000000000"], - ["0x0c1eb4da74daf337bacaddb2850b3b93d8f646cc", "125000000000000000000"], - ["0x24b920280b73f550cebc0bd002b82d8b573dd6f2", "125000000000000000000"], - ["0xd6a113f95a860036f1dcb6e6c0bd2d6fd43ed6ae", "124000000000000000000"], - ["0xcd0a2de6fc3a2409b0a7cc0161797da8e8c128e0", "124000000000000000000"], - ["0x212114a050a94560ed9376eb15c0fd3c1b6cae45", "124000000000000000000"], - ["0x62eb62372c1c489fa83fb23a12b62093257da734", "124000000000000000000"], - ["0x17443f321a2ec804661fa41c873e0fe75c7f56a0", "123000000000000000000"], - ["0x0a3db74dc8ae7eed8e4edb3e92e7b929eed8c6e5", "122000000000000000000"], - ["0xec3c118bab9e5131dbd3e1ecfbb7122926116dc4", "122000000000000000000"], - ["0xcd91b9b8e1ca71e0a5c9ecc6bda33f8d26a532a1", "122000000000000000000"], - ["0x1c04432207aaa34da9ec3c6549b5e4996d847dc9", "122000000000000000000"], - ["0x3c9c41789f90825a61760c0b6419e8a0b312e810", "122000000000000000000"], - ["0xc1141fe5f58929529a1a3057c80b54d6b03a4d29", "121000000000000000000"], - ["0x915ad5d773d25c1e1afacebbf687ff54c1470381", "121000000000000000000"], - ["0xdf8a1c4cbb74a7a06e5c4a724ad34c9561ab358e", "121000000000000000000"], - ["0x89ec8c7699dff36dee9b1f79b00ad12b5a0a0195", "121000000000000000000"], - ["0xa92288c98bb57b0030645735e33b28bd50b619f3", "121000000000000000000"], - ["0x9e6224de8973bc4f9ba9da4a4322f9db6c5ef413", "120000000000000000000"], - ["0x4761bf691bb4346a7e3790ed1fc0581052a86d34", "120000000000000000000"], - ["0x51f0277abb28a731f5a52ce57a45daacfe9ebfb8", "120000000000000000000"], - ["0xac06a4d2b15566c2e827fc827e214098a8bd7411", "120000000000000000000"], - ["0x401918351b997816f802db30de7b4a21518a79b9", "120000000000000000000"], - ["0x9915f9204997b77184d8335c4a66986c2a3e124e", "120000000000000000000"], - ["0xcd5485a4875e4d5fdc8710cb5e55185d3da7f925", "120000000000000000000"], - ["0xa9f0dca0bb105f61856d1c177c0873b93773034a", "119000000000000000000"], - ["0x6da7b7f64c73ff7985f2bf55c71c2b46c9e41a5a", "119000000000000000000"], - ["0xcac68fffdb3ce264e23543343d75a01b8c29c1ab", "118000000000000000000"], - ["0x0c6665a2bd065dff1b01aed1d91627534cd49a3d", "118000000000000000000"], - ["0xbd11206f52ebc48db4252f72ea2508c2b1aee495", "118000000000000000000"], - ["0x69c167b99a780de252eb818a6029209ad3788fe5", "117000000000000000000"], - ["0xfd370d9ab0baefb11851a229e51aef162cd68358", "117000000000000000000"], - ["0x554781b03b403bf628b6174a86ba84b3c6f1454a", "117000000000000000000"], - ["0xcbae1c624daac0002cfaed5c40e9c6ac755d9c05", "116000000000000000000"], - ["0xd574466cbf972bd07f99f57c885a86bde04a5c57", "116000000000000000000"], - ["0xc9b0de883e2749229b1e8349f30f88e061d0505a", "116000000000000000000"], - ["0x4f9d7a99270e6cd73ee18125b02494f19f0bce81", "116000000000000000000"], - ["0xd82ca6827a0f2c43883788fb8a2dcd44ed29159c", "116000000000000000000"], - ["0x71d3336f95ec829a4e6f96b6bc3f9da14cc03b22", "116000000000000000000"], - ["0x0a892e051157de5ecdc8d1b166f732a543a0ff6d", "115000000000000000000"], - ["0x6b44bc885a03a6f89465ab19c2204f0cef862810", "115000000000000000000"], - ["0x6e6d814ddb9ab9056bd58de9eea3621f01ee69fa", "115000000000000000000"], - ["0x1942cdda93ae1b56de2fbdbcca200f0d5ec5ef4d", "115000000000000000000"], - ["0x6d760e87cc0a7d1421b686b8f0faad65416f15f7", "115000000000000000000"], - ["0x6032f5ba871404c425a04b6f0800fefc386ddd15", "114000000000000000000"], - ["0x613080b74a75eb7d649330d7279f548916a36eb0", "113000000000000000000"], - ["0x64268a5531cd895a7c0e84be4c7ed9cf96fc6c12", "113000000000000000000"], - ["0x4bcdeb1dca8a2407e2801ea4d9b18850eb61dbb3", "113000000000000000000"], - ["0x1882142b506101f35ce157eb61ffb6ea2545e05d", "113000000000000000000"], - ["0x68cccc13f4e0655536b2396c1444f8fadf0f77f4", "112000000000000000000"], - ["0xe760d2fcff38783761361518e8cf79b589d4de8a", "112000000000000000000"], - ["0x74c8f1f3a5b9f684c393a30ecb7dbeacd00273ef", "112000000000000000000"], - ["0x868110e3db5357b77986421e0adeaebe3d3a04fc", "112000000000000000000"], - ["0xe5b218700e71f05acea6a0eac74f5d2a221839da", "112000000000000000000"], - ["0x40f350d109c0f9f71e79f3001b14f419a8e75741", "112000000000000000000"], - ["0xb83e57d57bd60e315a248d2021388cc94a8e2f52", "112000000000000000000"], - ["0x67a0c887b9bc702f0d881806b629852caed97e98", "111000000000000000000"], - ["0xb44bf7c8b81c85f6fbaf3f7d03de45106c793b5b", "111000000000000000000"], - ["0x6d98309340fb8dab4b2cd46eab754929aef3c313", "111000000000000000000"], - ["0x24fe29cdb9ff152d93183f62d53604d8f3502485", "111000000000000000000"], - ["0xd259d6f4314ca6ba596451b6a5782ec2763bba5a", "111000000000000000000"], - ["0xdfab1639e5ee371805484f572422e2fdf9b1398b", "111000000000000000000"], - ["0xdbee3104f8790208e2980e4acdbba3d8f0c44848", "111000000000000000000"], - ["0x599bfb1fde32960c81b29ed2e99b1ffe4f9deb12", "110000000000000000000"], - ["0xba41a3b71560ef120498f6f1b87ab273f6f737be", "110000000000000000000"], - ["0xd9369e74ffae45412fd2c75cb055fdd7876fb2b7", "110000000000000000000"], - ["0xa2bab972d07cd5dc079845bc8880c06439c2f244", "110000000000000000000"], - ["0x2dda4f1e44ab1173d81099aa725a551093f7ecc6", "110000000000000000000"], - ["0x5b758931dcb89f07dd23c2bedf10004071d6b467", "110000000000000000000"], - ["0xd7fcd7c92d184c2c3d84721df201f9bc95b32f4e", "109000000000000000000"], - ["0x97100df19cf2ae7992ba35d91e861d6f925417f6", "109000000000000000000"], - ["0xf8745c33c1588a7bd55dc498b96d9481f885c243", "109000000000000000000"], - ["0xeb41fe1090bb7a7fe6162de8fea3c16051544cf4", "109000000000000000000"], - ["0x64f2ebde230da818000d545e820aca110abe7d51", "108000000000000000000"], - ["0xa1acc88b50248b6556e65d5d5ecd51a997e370db", "108000000000000000000"], - ["0x91611f17375142f46999fe2b7c32c31782841efe", "108000000000000000000"], - ["0xdd21941e0d2a8a0ce7fc5f186c1d1c12f913a33d", "108000000000000000000"], - ["0xa39938007c9d48714b2a039ff6197f7329ec6fdc", "107000000000000000000"], - ["0xc6c9d802bc16d8746aafcac4781f9a8d442d585d", "107000000000000000000"], - ["0x96d1ee9fb9a841dbfe8605857871e568935586fa", "106000000000000000000"], - ["0x53cb5265ec16ccbc89aee4f924388009dd5d048a", "106000000000000000000"], - ["0xcd55923c253c0177172911f2f7ba9e5f7073f4bf", "105000000000000000000"], - ["0x6d478145a63ff539f1406220a018792f9b51fad0", "105000000000000000000"], - ["0x659da58f1eaf1bea47542fecf2fef36ec9f1eac2", "105000000000000000000"], - ["0x21375871597130eb0a7b825658da464f86ad4f48", "105000000000000000000"], - ["0x1da318b980bd5577f2cb21777635cad9a292fc64", "105000000000000000000"], - ["0x0ee72348a52c1543351b4382d943ab4a2d1848d3", "105000000000000000000"], - ["0x13d8ea39567bcb8b49d86bb786ff421505cf59f0", "104000000000000000000"], - ["0xf7e11cf5a04c3cf0061928d8c0b417464e08eff7", "104000000000000000000"], - ["0x83799c180b161b3a52eecbdcaa1750881aa65426", "104000000000000000000"], - ["0xd3a58b0268b9b249661726bce7d498b3622ad1c7", "104000000000000000000"], - ["0x757ab63222b3cc04f9df32a33ab5e0b15f4fefca", "104000000000000000000"], - ["0x50e505a74bc525c0410c6df6d2c723a91289d440", "103000000000000000000"], - ["0x9cbc1a8334cf32fa596f40133e071efa30cde3e2", "103000000000000000000"], - ["0x0146ef4fc66ec0902818221f98549a2b9b13bf59", "103000000000000000000"], - ["0xd5e77669d038afd6ce06fb032ec756220b39dab4", "103000000000000000000"], - ["0xb4ef9a2a020c14337e7e0ef9ebad8b1c2d50eec8", "102000000000000000000"], - ["0x78a9e315c6d6fe8ea0ee1cc40ead04477f02bed1", "102000000000000000000"], - ["0xe3803f7010b5581bbed1dc50ce09b7e14a05bed9", "102000000000000000000"], - ["0x9b985bce86c5af3e6071222c8cfd6012522b07c3", "102000000000000000000"], - ["0xacbb228856f194aa5f7001525211c22f097c75cc", "101000000000000000000"], - ["0x8eadad4a88dc4ee218529b4e9517c80c72f35fab", "101000000000000000000"], - ["0x2f7fbb348059f2aa899c2d0838fe4824d25ae65f", "101000000000000000000"], - ["0xc36cca68158af642ee2d83982ae42c7cf196d1bd", "101000000000000000000"], - ["0x136c613c400e5fd1ef4b6c1d47d9f8fb8803c946", "101000000000000000000"], - ["0x2e26eea6e806fc6331fdc5d1d11aab3dc3bd60b2", "101000000000000000000"], - ["0x38ea78de44c7a0e56ecc172284a41773cebc260b", "100000000000000000000"], - ["0x2eacd09e92273d5fb86cf40504917f664ee15da8", "100000000000000000000"], - ["0x9519a4c81b5f3281e6baae3496c0fe70b97b36fc", "100000000000000000000"], - ["0x2060970cbb9681ed667ae0624abf73bd5fa99a28", "100000000000000000000"], - ["0x03616be5b794cdb242340b97b93eabc855244376", "100000000000000000000"], - ["0xbcb34dd9351dac05d061a60dc4c07b522613995e", "100000000000000000000"], - ["0xf5ca017c3db54d0f380a3da12521d5ca40ef3981", "100000000000000000000"], - ["0x10c5f89cb714d908e4cc3db31c4d551d6ee15061", "100000000000000000000"], - ["0xa42ee67222e8756b1fa987aa359ed2f59932283e", "100000000000000000000"], - ["0xac145add2e42e6bc5ce81dc35268420b0672c431", "100000000000000000000"], - ["0xa2e623425160fb596b58a95485a2505baaeaf9a8", "100000000000000000000"], - ["0x46b9ffe94a7b9b8db830b058834978be31d4e414", "100000000000000000000"], - ["0x8c523eeb4aa347423983298af4eeea05d4d6e2c5", "100000000000000000000"], - ["0x6eb7907e49187d231cf8e3849b24183a3ed7a9d0", "100000000000000000000"], - ["0x052390813b25ece17f855c65f4dacb094f23eeba", "100000000000000000000"], - ["0xe95c69de2c03a7152fd334a7790ed86d0f7ff85f", "100000000000000000000"], - ["0x007f2a96cbdf08bf1a58f1de3599cb67571a40ac", "100000000000000000000"], - ["0x8181f49f1ae41d5801bb9239d2bec888e60f83df", "100000000000000000000"], - ["0xf0320a025904029713cba832376cddc0119a952c", "100000000000000000000"], - ["0x089b147ebe5cee7b844f6aad2e3d129a4506b16e", "100000000000000000000"], - ["0x886a3033fa4bebe2bf687d982e9350e249fbb2d9", "100000000000000000000"], - ["0x335a5f686a1e87915d586d6348cecace4fd1f289", "100000000000000000000"], - ["0x9386be091ef974611c103f95d6ee8805767b2020", "100000000000000000000"], - ["0x22b90bfcde85f75d8de08b552b837aacb561e968", "100000000000000000000"], - ["0x8bfff78edbfa534fe52dd87d945dac9a671957ae", "100000000000000000000"], - ["0x1b83218bac7e4857d98e0eba0f2f263abde2421d", "100000000000000000000"], - ["0x9f6bc999298a31973b343726f1c84a8c1f7e8c91", "100000000000000000000"], - ["0x3c6d73475d8a64cec5b5170853ab38ccf51eb130", "100000000000000000000"], - ["0x0d66fc519f0a4616603aeebe4ccb52c8246ebc96", "100000000000000000000"], - ["0x3701ecf85eae013842224c9e0649f97ed2bbfd72", "100000000000000000000"], - ["0x56b0d4debfa7ebcdccf1c726d2e20d335c6b4db0", "100000000000000000000"], - ["0xbd7d947f4c68b9dcf5292ddabb6e533c3625257a", "100000000000000000000"], - ["0x9629378dd9adbf50d572d31b5925e8f973b2b36e", "100000000000000000000"], - ["0x45b5853e83aa71c81c1bbdeeed8487aad35c8f85", "100000000000000000000"], - ["0x54ec0f31378c8fef5abd9ff0be137f5a1fe765ae", "100000000000000000000"], - ["0xbc94a1fc41c82c65ae6f48e93856840d2530344d", "100000000000000000000"], - ["0xf1f12493b2cd11414f4661f5dcba9f912304d374", "100000000000000000000"], - ["0xc417e40fa2f1da0c275028f899408e89a7610318", "100000000000000000000"], - ["0x7069839f10fa2df4c1683395800264ad8b3f5560", "99000000000000000000"], - ["0x198788c6464a543fa0bb0e7938f790ccbce8522f", "99000000000000000000"], - ["0x9a6e6cd88351cc484c1be29689fe2b4413e90f4e", "99000000000000000000"], - ["0x3c6c0e87e42cbe52f040eca9dde982c46ab5efbe", "99000000000000000000"], - ["0x4f062d55a46eb724e0b1a95bdcfe715c778471ff", "99000000000000000000"], - ["0x40ea5001129509c4cb3ac25c30e3d318bc7388fc", "98000000000000000000"], - ["0x3b58b97485cbfa5ddabb9852ccc612edd97afd8f", "98000000000000000000"], - ["0x70fedc4a7c06b055c2f39f3e9d7f78c173c438c5", "97000000000000000000"], - ["0x86526f570ca6c2c9ffb4a535ffe50fa56fd9dd87", "96000000000000000000"], - ["0x9a214bd8eb5dfac880df184640e6a5b73be59ccb", "96000000000000000000"], - ["0x5233d3460ecf216ad5de886b2d9a4bf0698219d8", "95000000000000000000"], - ["0xd70cf5cfa19eca9af10ef3b62bae57458058d2dd", "95000000000000000000"], - ["0xa2db796f0b89db0d4c1a0b94213e4878b2e9b36b", "95000000000000000000"], - ["0x173740c91c5015bab10b3830676c9c4d4168d8b4", "94000000000000000000"], - ["0xf02d24acff9893df026c0f80d4fa41e2ecc73b74", "93000000000000000000"], - ["0x693419bb4fd60c53da83af223b347288b8a352df", "93000000000000000000"], - ["0xdeccd02d72ba5304a885264be43b604990939189", "93000000000000000000"], - ["0x59427cd74811cd0528fa8169ef553c5cf4960ef3", "93000000000000000000"], - ["0x904741012d539bef640ce16a8364d1c3c2c773a5", "93000000000000000000"], - ["0xc1586c071516c2b7caf9ae65194449ae3c670c04", "92000000000000000000"], - ["0x874d021ca047a114b9833290490a6f16a68f7a72", "91000000000000000000"], - ["0x90ac914ae057050395484459181eb916f0e50f71", "91000000000000000000"], - ["0xf93c380ee224063334c2ef1a3af4eae7d74b70ed", "90000000000000000000"], - ["0xdd37d8a39bc7efd33e7e20826c5edb518370d8c7", "90000000000000000000"], - ["0x87a5f68bf6af01519982f3846cc408d027dfe174", "90000000000000000000"], - ["0x0000000000007f150bd6f54c40a34d7c3d5e9f56", "90000000000000000000"], - ["0xc1e308014cad4cfae79759caf740c98ef57f4783", "90000000000000000000"], - ["0xa095d9f9e49cde356bd1a0428edd88bcd5b46c59", "90000000000000000000"], - ["0x462898ad742c7d5a02ded65eb78964e035f6e448", "90000000000000000000"], - ["0x27f364a96cc92793263ee07214b38e68acad220f", "90000000000000000000"], - ["0x8fe0cf1b42d12be68058944105ea1d956d2f848b", "89000000000000000000"], - ["0x6f5c2cdb3411481b5d8c1a2f17f211c41fb22698", "89000000000000000000"], - ["0x2e0a9d5ec769f4d9cc4c2455f2eacc9c3de043ce", "89000000000000000000"], - ["0x7dd6426d14c25e47f13b4f0cb1f2fb695c5a0e2b", "89000000000000000000"], - ["0x4bbd1d4542d315447c715cbf107834ef15ce9d44", "88000000000000000000"], - ["0x94b1243a186ee0e92dfa0a1d7d2d38b6935d1146", "88000000000000000000"], - ["0xe335b972e0c5237bdae8bc55bb7b40fc8b927fc1", "88000000000000000000"], - ["0x161408732fe88c487d06e78bef86b0a49c2641a4", "88000000000000000000"], - ["0xcec63c49a3ac904d20f74dc44e49e2abbf9ca4b8", "88000000000000000000"], - ["0xed7115544b9dd9e997441c4236d17e495ff3280c", "87000000000000000000"], - ["0xeb2375b164c734081cf76cab1eec0949d9e0cfc1", "87000000000000000000"], - ["0xf7ead947ffbfefbecd0963d9c547d470b37439c9", "86000000000000000000"], - ["0xde9a570afeca6f1fefc7edc7c41c8aebc5eb5b65", "86000000000000000000"], - ["0xf5556f61810e6c8c0741fd03f20032af4276ccdb", "86000000000000000000"], - ["0x54cc7c5281e0ad8158a48c5d2d308e33989e7b48", "86000000000000000000"], - ["0x39889ebae2bcc641f9fea9646ec668e4987534bf", "86000000000000000000"], - ["0x41e524a757e83c51535bf8bdbf3a9bb992a5dfca", "86000000000000000000"], - ["0x60fb9bf2d2150efa7d8d23cec63907e5711fe42a", "85000000000000000000"], - ["0x1345dbe1a6fcd48be3074294bbe12d5e078c1c98", "85000000000000000000"], - ["0x924fc4d6c2fd3a91fbc2a28760b6e6c01c168bc8", "85000000000000000000"], - ["0x729f805cebc72ef06c7e6cf229868034fda5776b", "85000000000000000000"], - ["0x0ce730fac3a07820fdc9e17bb68e3574f6fdfc0e", "85000000000000000000"], - ["0x92f1190086a287d48667aafd40aed165a35044ba", "85000000000000000000"], - ["0x9aeddd3e58d79841e79a3570069fac84de21fb0f", "84000000000000000000"], - ["0xf14c056414f8a6f75f6eef7dcaa94cf12d9a5403", "84000000000000000000"], - ["0x0f924c28480ff77ad01ddb9dfcd2d558dee56f05", "84000000000000000000"], - ["0xb2044676525ce37ecc9cf859861a27fd4652c04f", "84000000000000000000"], - ["0x9e291fd9095d3662fa3917927403f193912c0766", "84000000000000000000"], - ["0x5d35c351e4c718200ff04cf609a9d2c5d37dd930", "84000000000000000000"], - ["0x2bdfcc9d73992a8da349c63734ff5a50fa678677", "83000000000000000000"], - ["0x5b4cad9a8774696c4a1d31c5082338491138bae9", "83000000000000000000"], - ["0xe26211851e76370091004bf543121e967a56a0e2", "83000000000000000000"], - ["0x8193a6d86f1f93639a9aeef18a24d5f92fc10285", "82000000000000000000"], - ["0x1437033c44d4e4f3abbf79c06e5222e7f41cffd4", "82000000000000000000"], - ["0xff5eb7340f17b6308400a4692efc16e7969c9663", "82000000000000000000"], - ["0xe384c6124e0da68155563aeafb5adf8d0af00bcf", "82000000000000000000"], - ["0x914c7e671a046b7b216895553d0db7cfa72463e7", "82000000000000000000"], - ["0xc593a1668d9bc0f319a15a43ef21c1befe3d7d57", "81000000000000000000"], - ["0xa0c559760de28dde7d87087b4db69aea05c24f18", "81000000000000000000"], - ["0xc165a1b4188eb0eb10275f31a11f07902abbbebd", "81000000000000000000"], - ["0x6c472e04f34a7ae8bd74ffcefe4d5026b02410a0", "81000000000000000000"], - ["0x9e06af6bdd23d2b3920107f82247ab7ca18bc03e", "80000000000000000000"], - ["0x933e7205089c1f14a913bea6f1e1424540cb83a3", "80000000000000000000"], - ["0x3710f6a6af356bfcf86fba06f4e862e1d4283f27", "80000000000000000000"], - ["0x2c7a998197b51dd7f1981aa9e75a23b059f5a59c", "80000000000000000000"], - ["0x20ef5f3d39ae3230cf720b215b6f010f4c757345", "80000000000000000000"], - ["0x9925e32016a44a579abefbd191cf8862c75365ec", "80000000000000000000"], - ["0x05f3de310fe37a798cbd5039e4a9272baaba9c14", "80000000000000000000"], - ["0xd1fca26b21d9b795f63dfbbff8a8a9c7e591243e", "80000000000000000000"], - ["0x307c2908e197ab2a61adbd40b7301afdfe881e2d", "80000000000000000000"], - ["0xefb5ef346997390c2280e414a438b38b0615549b", "80000000000000000000"], - ["0xcb00edeadd800b172a6fffd12116cd2bbf24afc1", "80000000000000000000"], - ["0x8c31de2dba1f084fdb6d58959d873c68e2e762b8", "80000000000000000000"], - ["0x4ecdad670f6864239d442f4c213e861b48e58211", "79000000000000000000"], - ["0xf3ce237bdf667be3b0e6da23daba5380294b6b07", "79000000000000000000"], - ["0x99412ff8554137bed8a0d248fce93869baecdb4e", "79000000000000000000"], - ["0x9933e62bcada6efb795d77a914a311a49503658e", "78000000000000000000"], - ["0xc871ca05c704e0031208789555ef1f3f1a3ce0a5", "78000000000000000000"], - ["0x91d92b00d14098c933b1f0bb8a881a2ee65be4c4", "78000000000000000000"], - ["0x320ac2c6fc3eb2ccb8861ecbd0c06d7c7dad0295", "78000000000000000000"], - ["0x49e3d6a14e18fe7c631420533f4cabafea240b2a", "77000000000000000000"], - ["0x2b7aad8a12f4845f91d8047dd763d26432976264", "76000000000000000000"], - ["0x9b61b1bf5ec4df21e685dd46ce58280734ad20a3", "76000000000000000000"], - ["0x773dcadc1b5c57068987ca19de84a7fbb74330f2", "76000000000000000000"], - ["0x3aa80f86314fc45e380e14f06865d62e746b267e", "76000000000000000000"], - ["0x3458d62703f72a123a029648f08ab2ea4ca918dd", "76000000000000000000"], - ["0x31c04f3f6619cbb564e5f68f028d676d3ad8bfa8", "75000000000000000000"], - ["0xd668e0161fcbc6f1bf6d1f051c9c0d8f00253c2c", "74000000000000000000"], - ["0x225482adc95a9f23ff5c448419b2803fab9780d5", "74000000000000000000"], - ["0xa02234c3b3060553ddafee3afbf66ba94aafba8b", "74000000000000000000"], - ["0x652022b1f234aa39f5dd7a5ff1162574fd4a9646", "74000000000000000000"], - ["0x7fb7e6e71ac334bdcc5882bdf19e7f87191dfd8e", "74000000000000000000"], - ["0x36db16e254c1d37795e1a6b38efc07b91d7ec910", "74000000000000000000"], - ["0xf4a2c26e538e27ae54ad946907fcc0a68a7681cc", "73000000000000000000"], - ["0x75d076f0a9d560654fcadcf6a78c212c38e60bf5", "73000000000000000000"], - ["0x3e50030e520c629b9facba589f5ee50656204da9", "73000000000000000000"], - ["0xd073a914e6feea850c46143eebaa681373b65f67", "73000000000000000000"], - ["0x9b1e37be2659fcf010cadf27cc0592daf60f2b86", "72000000000000000000"], - ["0x8b84ea014a4cda04e9b57aeb4ea10296eef66d70", "72000000000000000000"], - ["0xb22311477095b537c3fc475a32f6b1d781bf9f2c", "71000000000000000000"], - ["0x47135dccdda3f0d0da891fed7aee21c0a546409c", "71000000000000000000"], - ["0x4a612d69eed0b8827ec9a212664ccdc9cb2ee67e", "71000000000000000000"], - ["0x69b2283c42647ddea1d9689d39679072112c9c0f", "71000000000000000000"], - ["0x5828ea3ce544ece493a44894d94c3b824bccbe31", "70000000000000000000"], - ["0xd0a6c4ab167e2e1538badc7259f6c6c68b6d3690", "70000000000000000000"], - ["0x6ba9d0c502127fa27964ecc61f9021f4e2066abd", "70000000000000000000"], - ["0xda68e21acd377f1be13340ee4b588bd2a6a66b29", "70000000000000000000"], - ["0x820457ec3fc535017026c44a757babfaf5a7d6a2", "70000000000000000000"], - ["0x7332cc520576cb233fa71e66eae0dd76e50fd60d", "70000000000000000000"], - ["0x200b12b7ad06ab04495f33e22a9a60786870354f", "70000000000000000000"], - ["0x3184533b4cdd8984468df86f147363cc575b8483", "70000000000000000000"], - ["0x5baa9a8ce0b1afeedcb015634d6f91163dc84374", "70000000000000000000"], - ["0x44e4e1976312f9d1e80d88197f280c6163460859", "70000000000000000000"], - ["0xf31b7a7df2faf975e9c7efb75849658750ce0468", "69000000000000000000"], - ["0x19afe6e49a488e225acbcdd7edef99330dcf4855", "69000000000000000000"], - ["0x912d85c7c08cad46cc88366c29853686707514bc", "69000000000000000000"], - ["0x7bb7a6ef0d9807b28cab6f75cb0e6b847d04b7a0", "68000000000000000000"], - ["0xca9dc9e4afaa33f39a42cb2044c3f0745ccfbcd6", "68000000000000000000"], - ["0x1e9baf5c20a7a3cc3e55b89ed4e30579e0f072d4", "68000000000000000000"], - ["0x1715a7a493053e67731116f03d25a333498afa42", "68000000000000000000"], - ["0xbabf8fc6592c7b9da8c66baa5d3f0c98a94558ab", "68000000000000000000"], - ["0xa111fbd8bce6b05c21c5007fcb1c41b92885a80c", "67000000000000000000"], - ["0x1cdf4798fc3d0812fd57e39ee83fd503e01fe4f2", "67000000000000000000"], - ["0x61c98f7110ddce29680cd7eb6e1cd77a81d7587a", "67000000000000000000"], - ["0x9a160699730d8aa4efb9bbbf454c54b4e08c0bcc", "67000000000000000000"], - ["0x77f88e4bc35c794a1fd3bc8c6a7971ce3c4b9e17", "67000000000000000000"], - ["0x10fbbbcbe4ad8d981685e5570e2f5339556308ea", "67000000000000000000"], - ["0xaa7cde714d11d663de2a560aaa956c7046b4352f", "66000000000000000000"], - ["0x2c6a30120aef59a4cac0ea21de8a2d2411df6b51", "65000000000000000000"], - ["0x56b824a505646a483f0464914a30c7c5ea1b43f4", "65000000000000000000"], - ["0x605d993dabcd1422f0e626ab508ce89facabb372", "65000000000000000000"], - ["0x1baac833f371b962939cf556a9295cbb6c95ceb8", "65000000000000000000"], - ["0x4d9b15cc8a5a46d9fc167302c3af73800aa68c67", "65000000000000000000"], - ["0x11ad865b9dbe0de2234460c4bf809033b1724e66", "65000000000000000000"], - ["0xeedc67aee2e487ea332b45d2a0e7289f955bbdc8", "64000000000000000000"], - ["0xd99a1022d51573c6d0c2b186673d3de7c5ca5e2c", "64000000000000000000"], - ["0x24bd8002343ce7502059c3397767a4c44f8b81af", "64000000000000000000"], - ["0xc9e9326c738378cab73c63accbcdc3fdf23d835a", "64000000000000000000"], - ["0x87ae5401789a49c8b9103b4139bdbdb5e4309172", "64000000000000000000"], - ["0xc459d9101d939335c9c60ffdc445f4e678b37269", "63000000000000000000"], - ["0xf6f5ae9fa4565078974d7eee7eb520df987fab80", "63000000000000000000"], - ["0xf3bcf408ce0dacb9bd9f65405cbaeb6d242089cb", "63000000000000000000"], - ["0x0f8030f8766ec4ae52e8c9f018cb157507187f54", "63000000000000000000"], - ["0x75b25a519dfedfb1c47b611ba2d186c67a5dd751", "62000000000000000000"], - ["0x73d9a622f40f03c3207f49352736faf47b2e1028", "62000000000000000000"], - ["0xd820c6c96260a7737f9d3602fad4f1df2d311761", "62000000000000000000"], - ["0xdb5019b8dfbccef8906c39b16a4870082eabbc4c", "62000000000000000000"], - ["0xd452af0d9bd437e8a67f15ebaca06e1c015fc528", "62000000000000000000"], - ["0x3af08e71d0fae7c1293516d74035b050d58df024", "62000000000000000000"], - ["0xc3dc996ae0db7d9217c63fcd28dd44883c0f2b70", "61000000000000000000"], - ["0xcd51129761b394b447bd0f5f43834d36f1f90563", "61000000000000000000"], - ["0x0f40d04bc330f708e809c10831e5c8203047a63a", "60000000000000000000"], - ["0xf056177a8d906a32fd0e08e16bc594cd41203dc9", "60000000000000000000"], - ["0x6e049bac106fb1a1dd43a25fc6e707385aa61776", "60000000000000000000"], - ["0xe11a457888140c78fe0d4bf613fd49b91177deea", "60000000000000000000"], - ["0x2ae02587a2b86fbd4502c5322154e97908d7279f", "60000000000000000000"], - ["0x90785a2bfc4ac26f310000171ae7d8dc74e04774", "60000000000000000000"], - ["0xb79b013c49db009541c5eac78a0bca11038845a1", "60000000000000000000"], - ["0x37e7e09a5c4f2d3e4d9d54cf995f20aa74cf6d56", "59000000000000000000"], - ["0x11651b7f8e2d6a0ac84cdcef4c4732426e0af4a5", "59000000000000000000"], - ["0x606e7af1c5c8c5cd29f2115e517b9d7b89e6c653", "59000000000000000000"], - ["0x57701abe35763f60cbeabbf4cd352a1052b775bc", "59000000000000000000"], - ["0x00ee28821f5c355d6dbfd3c7dd38acc60165294a", "58000000000000000000"], - ["0xbadf5f1375e407943e45ced6286ff95412f27948", "58000000000000000000"], - ["0xfedde14ac70ed6aec56f955d204355196427e09f", "58000000000000000000"], - ["0xef03048081a9a883a33c7f1052d5e5a0804bb7d0", "58000000000000000000"], - ["0xe8f4c5afc8582f381d2cf5b4ffc652b04177d982", "58000000000000000000"], - ["0x7774aa89740fba372ccbf0a40f30846376c12eff", "58000000000000000000"], - ["0x0b0a23ef72341b7a3dc67595f523975fe66aa904", "57000000000000000000"], - ["0xed4899b2a8da2f6e30cb2b4f593f83969d27da37", "57000000000000000000"], - ["0xa9867c46e2fbc004d04da3b8ebcae8d5db171fe2", "57000000000000000000"], - ["0xd6b2095e913695dd10c071cc2f20247e921efb8e", "57000000000000000000"], - ["0xb26cbde240a343e46005cc016e39ce4386ae97ed", "56000000000000000000"], - ["0x203f3eb497c504061e0aceea749103296b0b91bb", "56000000000000000000"], - ["0x4345d9ae4f4c6e6793e1605d74352a98669138ff", "56000000000000000000"], - ["0xb80c12c95fb15b0779ea0119e7813a1879f9802d", "55000000000000000000"], - ["0x9c9131873ccce172cd636474ff255ebb1c692c80", "55000000000000000000"], - ["0x505ee2c414c50cda40a13a1c9b9c5af106d6a3aa", "55000000000000000000"], - ["0x3e37cb2e3d904b8455f4446db67dcc8577ada0e5", "54000000000000000000"], - ["0xc0f420c1b0a7abe2f629d5d403007840470959b3", "54000000000000000000"], - ["0xec0e5588df094efe79d8b0ab045831bc454cff4c", "54000000000000000000"], - ["0xd6ae2aad9406c7d429418ccf941a129970ded3de", "54000000000000000000"], - ["0x676c34516117107fd380940c62d5ef9cf08a7fe8", "54000000000000000000"], - ["0x260e528f015f03889da48bfe1a15efb191546b44", "54000000000000000000"], - ["0xc144ccb02b3901bc93783663e760123f510c3cfb", "54000000000000000000"], - ["0xa845dfaca6b3494d6be4a851100a2cd44ef0a4e7", "53000000000000000000"], - ["0x5d38594a188ee4cd60371a33fea4da82ef9b342d", "53000000000000000000"], - ["0xe40b491ff78b9be4e89ed0d24b6da44fdcbe354f", "53000000000000000000"], - ["0xfcb3b7cc281c65d723dcb0e3d7322badd1eedce1", "53000000000000000000"], - ["0xb4db68d75fdb55ed204b086ff6205c70e446fbb3", "53000000000000000000"], - ["0xaec0ccc91de830b0e9ff5c99ff6c347ce70c4a36", "52000000000000000000"], - ["0x4a378971a462477657cfa6cd90e26ee02603c5db", "52000000000000000000"], - ["0x8b7a2884437c544848c4a187d3f8278f54834c68", "52000000000000000000"], - ["0x3d93dbbb6d17a93735d0a845ca0da846567eefc7", "52000000000000000000"], - ["0x6ae66ab87dad05e9d49c49455631fe285d2e4ee3", "52000000000000000000"], - ["0x0ed49c6d8b6e0a2342287707b857d58c94763481", "51000000000000000000"], - ["0xd5d810066689a08d45d03d0aa4e63cc8480b37f8", "51000000000000000000"], - ["0x1774fae209dc31011daa5e5e11ef7d8f016a8ad5", "51000000000000000000"], - ["0x8e3294acf8c96e446d96ade898150798101bcea3", "51000000000000000000"], - ["0xca712fc7ffe3a7cb8e44dcfec968f3daac91b4bd", "51000000000000000000"], - ["0x0b3d6e6ebf95f38290b527c3dab253d94dd10b03", "51000000000000000000"], - ["0xb6d827ad79d3c036fd7a73d294255441ced7bc60", "51000000000000000000"], - ["0xc61716975e0212fa98419b6960bfbc6d8fc8d74b", "50000000000000000000"], - ["0xf478792755a5581809ae4116395c32ceba827acf", "50000000000000000000"], - ["0x8fc87c199203332c1cc43430b9fad2b1868e44d0", "50000000000000000000"], - ["0x1b59237d0cff7b879f3a7c5045d30ba3e9518d3f", "50000000000000000000"], - ["0x208b82b04449cd51803fae4b1561450ba13d9510", "50000000000000000000"], - ["0xad3ff004a4897047032c8aba65795916bd9f23cc", "50000000000000000000"], - ["0xd819e3705425dfa164e395d79256cdd9ee4871cb", "50000000000000000000"], - ["0x5c53bee9f713d427fd930f8910cb9442422b98e4", "50000000000000000000"], - ["0x03fbc3640e447f59e9540034f6cac2731b729701", "50000000000000000000"], - ["0xb699684651ff748a6357892e006a0bdaa1707d1a", "50000000000000000000"], - ["0x31099ac2e8b4530ba82f4fed6b489a85569912c7", "50000000000000000000"], - ["0x09dcf911a4b1d72cc97db56617b57b92fce326b6", "50000000000000000000"], - ["0x29eceeafdfff73e125c2fb93cde3e6bb6f1b602c", "50000000000000000000"], - ["0x70eb0915474806164a0fe4bf0d9f29a5f50dfebb", "50000000000000000000"], - ["0xe1e3e3b6cdf387279ef26beabbf08185bf334f72", "50000000000000000000"], - ["0x9403bc5bf2c9a4ca001eacc9b6fc4a70aca3ccfc", "50000000000000000000"], - ["0xde48537ce6df7f50daf3989e3202636b09b55f5b", "50000000000000000000"], - ["0x2d953f2d7cb77fe2d28eb804f5e5a4a379f91871", "50000000000000000000"], - ["0xa4f23e9a9eae680e5ff48ea972a31cc1a787500e", "50000000000000000000"], - ["0x1b927f5f8680b660be3f545a36bffca62628d762", "50000000000000000000"], - ["0x8dd0eb4ac9b49e2193a73d0f77f431acc0af1b37", "50000000000000000000"], - ["0x0521c7212c72e7fb2fbeb9be54bc19c5004bee47", "50000000000000000000"], - ["0xbe8572dbc32db091715e3f55dc913fd3b05173d2", "50000000000000000000"], - ["0x98e7131c1d9da1977f96345c85e00f10846f61c7", "50000000000000000000"], - ["0xe47a8c0d429d75745578e2b7108b7b3cbfe07b86", "50000000000000000000"], - ["0x74f0ef88878bad5c38ee76144ebb723c94e25a86", "50000000000000000000"], - ["0x150be62edddd543452545e502bcaf6800bcaf2d6", "50000000000000000000"], - ["0xacc3df87b9d1758a407d352f7c5f2460021703be", "50000000000000000000"], - ["0x26661bc4fc9d2d51e8369cfe088bb127423771df", "50000000000000000000"], - ["0x290789aed2d6fae51191bce9cce498d0c336dd89", "50000000000000000000"], - ["0x13483c88a35c27e0a893b7196ead0903d08a84a2", "50000000000000000000"], - ["0x60ca37f5ccd976c99c0ed51beb95f02e41f258f2", "50000000000000000000"], - ["0xd7148f95e0fe82036e389ed8d58c92508dcdfffc", "50000000000000000000"], - ["0xe153ba6e7c8d5ff6ce6d5968044ce72cd4ba38fe", "50000000000000000000"], - ["0x21543a89d39730bc239623fd9a41bf379dc3f6f1", "50000000000000000000"], - ["0xbef1fefe4bb6dda516e9af3a3f793d182cf053bc", "50000000000000000000"], - ["0xf11ce14bbbb90ca3feea63f5599119888c07f941", "50000000000000000000"], - ["0x8106f06a53396d174b0edbdfd17660f67e71adb6", "50000000000000000000"], - ["0xa91b82084b37b01a7b5fd60160eef7b04302517f", "50000000000000000000"], - ["0xc4ea0e92c4978c04e82e904e81c70ed959615a32", "50000000000000000000"], - ["0xf8a3b68661e928c1d755feaa1e0c611b8fe061bd", "50000000000000000000"], - ["0x8a0454b05a952c572619935ed46b6d8d0aa97a76", "50000000000000000000"], - ["0x0f0c832a009802ff4119d10154c247c459763754", "50000000000000000000"], - ["0x4de216fb73e84c5b980eaf76d1d97b1c9a8456b0", "50000000000000000000"], - ["0x1f7ebb2c573eeed2d967a706f0fcd66953fc9e9e", "50000000000000000000"], - ["0xc474fcf2666d8885bd0d48f942f760448b2f9f34", "50000000000000000000"], - ["0x5922233a62ed0ac08eb3d7d2ca3bd2f1080a81fe", "50000000000000000000"], - ["0xfcd538bc55328adaf45121f307f76f5589f060ce", "50000000000000000000"], - ["0xe564148fbe1cf67c5dc041e8a99f1b309d277058", "50000000000000000000"], - ["0x461b4b406d7a366a965bfd455c013de70aa12a6b", "50000000000000000000"], - ["0x3b0a5f022d0e0b43d0b74f961dc7bd236b919205", "50000000000000000000"], - ["0xa18b495f1bd998541eaf890aeea4e16558ee355f", "50000000000000000000"], - ["0x997202adee11ebeb3d5b6b3c0b3b2b3f3002bc31", "50000000000000000000"], - ["0x337ac9e753c374553626ba5bac8593713ad0ed20", "50000000000000000000"], - ["0x07a6d58cac8d98af26508635815ce1e56458c5a2", "50000000000000000000"], - ["0xbb15089724c2797ad7ca7c9b210e2cb6fdbc30d1", "50000000000000000000"], - ["0xf54176ec9bd05eb83b94926e74f09960b685fbe6", "50000000000000000000"], - ["0xd89cdcba2a2f85fb3b185253ca29c6127eb7cef5", "50000000000000000000"], - ["0xf2c95079e35a27c296b01759431e05c38e392a21", "50000000000000000000"], - ["0xc8d46eb7881975f9ae15216feeba2ff58e55803c", "50000000000000000000"], - ["0x75c98e92eac409963e27efc75d2bf556d8a7878f", "50000000000000000000"], - ["0x8e67207da081b391d646c1483de673ae76c6b293", "50000000000000000000"], - ["0x963dca698ade8fe3ac61e5a4410ebd15c0a42d77", "50000000000000000000"], - ["0x76811ec47ab59d83b57c40c2778f5a355b3bb2e5", "50000000000000000000"], - ["0xa81597bd911cc633a58f4362b0b333d4c7398d4f", "49000000000000000000"], - ["0x3ce90db75670e28fc9bb3fde67c1d6e005012d2b", "49000000000000000000"], - ["0xbd7f9fb39e0f1346b45380088e901ce2916cfd39", "49000000000000000000"], - ["0xe95a30e3795b85db37b1c9b082869e4f7615420c", "49000000000000000000"], - ["0xb424a3cda7bca285a363f9a98b1d133b995172bc", "49000000000000000000"], - ["0x6a79c1749229179b4f16e6957597fd8f4d2fae7d", "48000000000000000000"], - ["0x56a41dd21f2e65ca5342697b6c9b8675ad781bde", "48000000000000000000"], - ["0x2d8e09501fe9a3116dbc76613bc10c8942612bdb", "48000000000000000000"], - ["0x9afef5badf5725bd13b4c938df3c62f66f1aafbb", "48000000000000000000"], - ["0xc25cb20ae7569da8d0557a125b1050f21948603f", "48000000000000000000"], - ["0x359a76db7afdad46f0e2c6699ec768c1064c86ca", "47000000000000000000"], - ["0xe5f5380ed6088e97e29488d327385c86ba91d8f6", "46000000000000000000"], - ["0x82480356b5df6db351182e831e63476b640fe82d", "46000000000000000000"], - ["0x4e14171a451884c44edbe412b03a128d7e473e55", "46000000000000000000"], - ["0xb9c6801ab14077b3ad443105f67979c841587dbf", "45000000000000000000"], - ["0xeaf8c4e0e502923f1a627cbbae36ef6339df2688", "45000000000000000000"], - ["0xecd7c8f64e2ea8e3f8e912ea58504eba324b2b66", "45000000000000000000"], - ["0x11f37eda87206bdc200222855328e5dd5809613f", "45000000000000000000"], - ["0x1d15395f781e9e13bf77fc34f1663d6d3543c7fe", "45000000000000000000"], - ["0xb488796afcbd542ef14edde6e2dd14211fa6c9e2", "45000000000000000000"], - ["0x4ed05ae3fdd40136ac74b15bde5949ce50f7614a", "45000000000000000000"], - ["0xa4146769c7cee0787777e5a7c4459c45c336912b", "44000000000000000000"], - ["0x66ea49e53039a3befecad444220033313c7109e2", "44000000000000000000"], - ["0x9d7db4635fcf4f8eeb93ba3fa1f6f149181efd21", "44000000000000000000"], - ["0x8c78b28b6bea4ffc557b32a643e576572067515d", "44000000000000000000"], - ["0xdee169c8e26a252b5b606daf2344555570982114", "44000000000000000000"], - ["0x15d8fd2653c10faa953df207a66bfb58aee9c95e", "43000000000000000000"], - ["0xb4bdd9b1404ac20e4c0556ed0f23510af89e0ee9", "43000000000000000000"], - ["0x14f683329a73e977cf2fb6cbec2094ca516b61f5", "43000000000000000000"], - ["0x6c0363c075a82fcd439d3127abee6622228934e6", "43000000000000000000"], - ["0x55d65e9a4b47196c4f6d252a6440e1eb5d29c0f7", "43000000000000000000"], - ["0xc3d835ec0a336fd2f97e2ac9a6226e8e331dee76", "42000000000000000000"], - ["0x82cb410279688d98dbe0a523fc47cebe5833f1d5", "42000000000000000000"], - ["0xf470d2371810803eea3a6364fcb0ec116e65d7d8", "42000000000000000000"], - ["0x37679d8f112e2fdc0d3180d19961b977c45760e5", "42000000000000000000"], - ["0x45e3b3a5dbf5f698117e72ea65126121d13d7337", "42000000000000000000"], - ["0x08bba49acda81fbdf2ea7f1903860ac83988c75e", "41000000000000000000"], - ["0xd866cf56768daf406afbe50f612689cc466c6f1f", "41000000000000000000"], - ["0x777abe19a2cd375451bf7a307eed869df57542f4", "41000000000000000000"], - ["0xa0806b99df2d8c220221f8b6b7b2c57fcdfbb546", "41000000000000000000"], - ["0x838db4c8150d90276634c1c8df5b9ffa967ae658", "40000000000000000000"], - ["0x67bbd261fa3a2f73e07f44ec15726cf363f2546c", "40000000000000000000"], - ["0x36143d6ab3ebad1977abf30676e77f27e5ad4d6f", "40000000000000000000"], - ["0x2e8b559b47b288ce8cfb4952f9e0bb9a5e0c2fb1", "40000000000000000000"], - ["0xab6c7040b9c1bc2133081bbe008a740a5ba063d2", "40000000000000000000"], - ["0x50af859cc14971cadbed8b5159eae7def0284468", "40000000000000000000"], - ["0xe61cfbd09e6cccc6507ba8e7539f9a74f6278318", "40000000000000000000"], - ["0x55fd246cbbbbe28de49ae6a415bedfbf9e2b8dc9", "40000000000000000000"], - ["0x12a7872c328b5d6c7703137ebb6c7186da6affcf", "39000000000000000000"], - ["0x4c409e10e85b43e80be5b14696f4a7b20626d02b", "39000000000000000000"], - ["0xabe8a7ad2f597c077794f5f74149f69ef4356c13", "39000000000000000000"], - ["0x910bf2d50fa5e014fd06666f456182d4ab7c8bd2", "39000000000000000000"], - ["0x8edaf22542cc324ad48aad9b04fab79c1e70ae61", "39000000000000000000"], - ["0x0867f05c2490e9ccf5620a67514857d388b1f436", "38000000000000000000"], - ["0x050f788d09395724777a67dd08be127cf70dd238", "38000000000000000000"], - ["0x5bf004761b8c7d08c0eff3a031cf85b5a51815c4", "38000000000000000000"], - ["0x7067bce753801201b94fae26a344b7d16f6ae039", "38000000000000000000"], - ["0xd78e1cbd27f40a9039131eccaebd0a6da510ee96", "38000000000000000000"], - ["0x7cae6729198d7013c7c87e11ae0796a727665d6d", "38000000000000000000"], - ["0xe679cd0aed39a1c1e91b4fb5c6dd1fba9d2c6173", "37000000000000000000"], - ["0x666df143bf8c00e91d6e43a303f2e99d57e1679d", "37000000000000000000"], - ["0xafeb9a39177ea632434217a5f90ca129cdb557da", "37000000000000000000"], - ["0x00d14d2bffa3363114793f8f5df05b6d82f14ba1", "37000000000000000000"], - ["0xf1e6a831ceb1ad01128fc2b10a066a67d3654640", "37000000000000000000"], - ["0xd9ca2b65b8a90589a16354ea178a14427b10ad32", "36000000000000000000"], - ["0x0a81f577d8a4776bb7389ff0ae9be97a96c280c2", "36000000000000000000"], - ["0x315e5d590354e103412169a485ad4c496195c78e", "36000000000000000000"], - ["0x67d3e94a845a1cbb3c1154d3ef429479fd80ca39", "36000000000000000000"], - ["0xabbf8d6b5ff051c4d424a0fc35b2a295437d93f2", "36000000000000000000"], - ["0x00ec52d4bbdaa3d6dc6d06064fd48bc6793d5071", "35000000000000000000"], - ["0xb1c18ede2ebb33ed5cf6909edad6ef1abc8d3708", "35000000000000000000"], - ["0xb6237775a4b5adfd81ee09a5417bc15406fcddd2", "35000000000000000000"], - ["0x0f56ed6f7c71aef4e67028882ad5567db63f7925", "35000000000000000000"], - ["0x88eed781abbbb20b8f47cd9614187af817706170", "35000000000000000000"], - ["0x1bfb3b57522eefd75957e5763399b9a4f4a61d2a", "35000000000000000000"], - ["0x88e6c5b96710c0c7fa63e593d9675a424f4346a1", "35000000000000000000"], - ["0x030f21b61d520bda2792d81cb461cc9a72b91950", "34000000000000000000"], - ["0x795f7fac23ffbe668619cd2d4036b177cb388983", "34000000000000000000"], - ["0xd84c30afbdc2332c4eb0680d848b9c2e7b01de73", "34000000000000000000"], - ["0x13d9b821efd055ffd7efb25aa43e0f754111d612", "34000000000000000000"], - ["0xfe325c57946f1dc280af5fe510ec83d1da16997d", "33000000000000000000"], - ["0xddf7b2b23a0f5d44f0badc4a4062214df8b7a6e1", "33000000000000000000"], - ["0x4c4f137e4bbbc8ded7c708ed230400db580448e7", "33000000000000000000"], - ["0xf8fb053bef2209712c85dbfb90302d92cce274bb", "33000000000000000000"], - ["0xbad51b52f6169a6b784fb18981d6d7b72c2b2a9c", "33000000000000000000"], - ["0xf340b41f31552968b4600cd2566d4af0a40d7fc2", "33000000000000000000"], - ["0x30c88b12098224b13a4c697d15ec8b4c9f3262ee", "32000000000000000000"], - ["0xa562ca817c23b6590c3d32398f723fd759242cbb", "32000000000000000000"], - ["0x6fba1aac65478fa7f269c668b82977612ea9cb95", "32000000000000000000"], - ["0xec253779e6bb668b82786dcce8603548421937b9", "32000000000000000000"], - ["0x92cfd9472b012561a9de9907d8c5dd19d911797e", "32000000000000000000"], - ["0xd68f3344741a1b4214155c3aeb8cfebbebef7274", "32000000000000000000"], - ["0x58937d451bf8baa298d568a6fd69a2daac326e4d", "32000000000000000000"], - ["0xfba19a5411e602d40be8eda3fdb479258f1b4699", "32000000000000000000"], - ["0x393c5ccd623945aa64aec6455bda10e471a0046c", "32000000000000000000"], - ["0x3b09fa07b38a8ea1673219fd3c2b586312d6a0b7", "32000000000000000000"], - ["0xe25373181da11fa4e586bb4c982d866b0bbed661", "31000000000000000000"], - ["0x7e73a94993f9652802c016b7a3ef808cdc5c74a9", "31000000000000000000"], - ["0x3992eaf6f696781a7bcfd073e72fc4e10adf5ad6", "31000000000000000000"], - ["0xaccda574311ddf0d9262ce7aefba7a6743f6eb7e", "31000000000000000000"], - ["0xcec6ba8aa1fc9423b5a480dcc7f9352f26894aac", "31000000000000000000"], - ["0xaea564e201c9eafca02bb8a586509908c68f94b3", "31000000000000000000"], - ["0xe84995bcbf58606d919acc03d21da5abc1ceac6a", "31000000000000000000"], - ["0x2f094e189859e20ceb97a911b90e1471accbca27", "31000000000000000000"], - ["0x0f4ef857e05aed6e3cad417a244c117997d0e83f", "31000000000000000000"], - ["0x50d934a02c47688ab45376d9754e2629484873b1", "31000000000000000000"], - ["0x55569242acb5e5ad26dda8f68683d661ecf6fb25", "30000000000000000000"], - ["0x8922aa8921de71e66824b0665e7fbe0488a0fcca", "30000000000000000000"], - ["0x79aed628ed7faa2e7f9f69cdd53e32a92261a009", "30000000000000000000"], - ["0xa1a945b2325ed4cf93cdbe28ea96e5f85c8b81d1", "30000000000000000000"], - ["0x1c626fa2c802f8bc8019066cadecfe3787a412d2", "30000000000000000000"], - ["0x3977497f572b16a01e2da7193e301340dbfb3bde", "30000000000000000000"], - ["0xea76d930de7a153c97d0c98e1fcd02a69a5a4659", "30000000000000000000"], - ["0x9539b32640aaa0015c1a02524c33a10ed510fc86", "30000000000000000000"], - ["0x448bb8f15b115cf267ef7a46ff689117537abade", "30000000000000000000"], - ["0x65d6e0beaae01021d6471ec87e60a3d1ff32e132", "30000000000000000000"], - ["0x9c95df27387e63c94bb0d76ccce4ed22ed97af47", "30000000000000000000"], - ["0x78aee528cfc9bfc11f56798c56e1fd3fbfc26774", "30000000000000000000"], - ["0x79160a6530fac0853c9826dd7ce08c87c0641295", "30000000000000000000"], - ["0xdcbee0643b7d920da6c64f60ad31fb5be473e781", "30000000000000000000"], - ["0x12e721ca67c70f9e83d51d6b5139376cddc618d9", "30000000000000000000"], - ["0xd668ee736188bafeb82bc118a05c5ab4524fd051", "30000000000000000000"], - ["0x4295093af90ac152fcd37f683b033f0a16b0d51b", "30000000000000000000"], - ["0x2049fc7430c483c807a99afab92778b633070bf0", "30000000000000000000"], - ["0x08dda4b3d2daa6f32bbad7afc6bbddb27f6bc685", "30000000000000000000"], - ["0x382ffce2287252f930e1c8dc9328dac5bf282ba1", "30000000000000000000"], - ["0x92db74bdacb0b60be8fdc95ced85703bdde8432e", "30000000000000000000"], - ["0x1a95d0c59131212c06cbd824fe1cf258b184a74d", "30000000000000000000"], - ["0xd00f8d6cef430cf533296949cf0f38b8b0f743b5", "30000000000000000000"], - ["0xd5644cedd75150061552ab7c8414042f7cb95c6e", "30000000000000000000"], - ["0x099d35e0160269460cf979fb33ff5c59abee8b7e", "30000000000000000000"], - ["0x45477092f0d8cf6156b37905985e6f2d00e2ac83", "29000000000000000000"], - ["0x258e4db433a16e22826db7e91d8178e60cefc57e", "29000000000000000000"], - ["0x90c353978402085de3f363085e833a676fc6bfa5", "28000000000000000000"], - ["0x7a3e3233ad71e71f66ee1ccf034a6240fc447a47", "28000000000000000000"], - ["0xae4b2db117e0b599433b9457fb15eea4e97eaeb4", "28000000000000000000"], - ["0xacf98af36845ec9aeda29feed2907ea287388cf3", "26000000000000000000"], - ["0xaf1890305fcff4bf485d09efafe08bb07fa2a74f", "26000000000000000000"], - ["0x14d86d4c84e583b90a65b872cecc6ef56451f645", "25000000000000000000"], - ["0x5e6bb4c1e776d9c7f440e1c8b0edae547a3f6932", "25000000000000000000"], - ["0x52ebe7c7b4009560209622232b60c3e113e66944", "25000000000000000000"], - ["0x8842c59ecabd372bf247652217802edb27ea3420", "25000000000000000000"], - ["0x40e4668add6c20b214c04aaf34ecdb3073864af7", "25000000000000000000"], - ["0xfcf44a92ab1be1e3aa882fb26ba5d6da6ee51955", "25000000000000000000"], - ["0xc1f008835c2ed5fecceec1275bfa258633e5f639", "25000000000000000000"], - ["0x5f02dc0afbec8316ec273a21fe22858fbbdba143", "25000000000000000000"], - ["0x7a68e3af98c5b101e45a9a9d0862c811189fb58a", "25000000000000000000"], - ["0x08e412c1780b9decfd612d9946d9fb4284d4d8af", "24000000000000000000"], - ["0x7fa9600c78710e8c1f712f274294b301dc27d86a", "24000000000000000000"], - ["0xf0b4d51d517ab5fbdadf63d4057592d0e93bcb83", "24000000000000000000"], - ["0x2c88a02bdf1294a4b222803cade35d241dde0c36", "24000000000000000000"], - ["0x4e079f7ae28120d5b95cc2f7efb5b1f150552ee0", "24000000000000000000"], - ["0x30d2c399b94c2b4e4e27b43adbcbc35b1e8e10d7", "24000000000000000000"], - ["0x47a541ca68800b3353f89653e5d77e4a7cae4ebb", "24000000000000000000"], - ["0x65f322c51b633341bd5d0ba377444602d12fee86", "24000000000000000000"], - ["0xb98c90b964bbcafcb6cf1648d7247d2040986af3", "24000000000000000000"], - ["0xd87bbf3ad63007664d2a59ef71be2b5fb48ec293", "24000000000000000000"], - ["0x97ea1ffb9d02efcdc22ad6b2a235da72c4e7d949", "23000000000000000000"], - ["0xa33ff5adaa402c130f6568855cfc9a65a17c8e4a", "23000000000000000000"], - ["0x500e5eb0cf12736f237604bb90ee996a24def620", "23000000000000000000"], - ["0xc7c61e6884b14933f61c4af0f62de65ee04e812d", "23000000000000000000"], - ["0xc33f2de83c9d3d1fad2de073ba83f40e55440ea9", "22000000000000000000"], - ["0x41a9406d3443cdcc105c95b6e4efb4a7e7b3c188", "22000000000000000000"], - ["0x592231aa7459d22dc9674f726e14ed80f0d65bf0", "22000000000000000000"], - ["0x09a4e26d69821edeffa5eb29f134d0d8cad8efc4", "22000000000000000000"], - ["0xc324720784121f19dfc31919d183576732492a3e", "22000000000000000000"], - ["0xc6273dbc610fe3f032a509beb32830d40018182f", "22000000000000000000"], - ["0xd4f43a6b58ad6ed8e078b34f029bc24255fce120", "22000000000000000000"], - ["0x53345a9fd3098d3b0e2ebea2d0845b302ebc3471", "22000000000000000000"], - ["0x8fe6662b70b93bbcda26e98c37dc325608704d09", "22000000000000000000"], - ["0x86f991c173663d554540cd655ce0dc10944899db", "22000000000000000000"], - ["0xc1d88eb17c2574192fddd016e4d201928244eb5d", "21000000000000000000"], - ["0xe3077c57c0ebcd5db24a0bee0da528738842d425", "21000000000000000000"], - ["0xa627db0a15f3a763190d69c72522ff70715b9289", "21000000000000000000"], - ["0x44f4129e10976e20745cbf5cf6023a284eeee8f2", "21000000000000000000"], - ["0x956f1ce3ff2ea59a8b41df83ce9f85ed59d73f92", "20000000000000000000"], - ["0x02a97b8ebc1f3baff3755f0ad7d2dc64e03cdb7c", "20000000000000000000"], - ["0x596a9866d288e6c0ff98e756608169f9bf64be0a", "20000000000000000000"], - ["0x5754ac025e57b961faf6f7fbea1c1cdb586e9a14", "20000000000000000000"], - ["0xb57cae748c618ab8685a8143890c61c62fcd0f8b", "20000000000000000000"], - ["0x1cbafefd21ca100f0282fb909399d29f9fca17e8", "20000000000000000000"], - ["0x8539c8e63490595caba6b8351e8f1fa8127cb748", "20000000000000000000"], - ["0x5e7ecdd6752d53588a111636a7217c9677fc08df", "20000000000000000000"], - ["0x88a0e3db6c1f9680e51b51187f8076c57b05557c", "20000000000000000000"], - ["0x09711a9e501e03769f32a0f8fc09aa517337b388", "20000000000000000000"], - ["0x59810804476105b545d4fbbe561f9ba0778b59fc", "20000000000000000000"], - ["0x82d5cf59bd09225f39b5c4925f738079f2a9ae69", "20000000000000000000"], - ["0xd00ffe05fb3abc421c74379917cf640ddbbd8487", "20000000000000000000"], - ["0x4763aedd619f18799121a86b3805f7772b4c7e8c", "20000000000000000000"], - ["0xbdb5d9d61d11c106d649dd21e4749a80884641a8", "19000000000000000000"], - ["0xcfb63b65d3ab019fb412472e43cffb396ecbbeae", "19000000000000000000"], - ["0x8b8e3da80e159eff2535b23e8b68f7ea45f930e1", "19000000000000000000"], - ["0xcc9047cd36cef35a88bfb434350a3bd778fa347e", "19000000000000000000"], - ["0x78edb806eeb8480162d3cb3acc32fb0f11c308bf", "18000000000000000000"], - ["0x5d782508ce956d9c75116dad7f54bcdd87829a01", "18000000000000000000"], - ["0x965211f826b66a35df7508194dae12beb8ccbaf9", "18000000000000000000"], - ["0x35dd8ae8e3ef1ffd223d77371badd6f7393a0817", "17000000000000000000"], - ["0x059dc2eae98465f97c57c392543fec3e5575bac3", "17000000000000000000"], - ["0xc54be037e6112716a507c0bdc0487785f3d3b118", "17000000000000000000"], - ["0xae1312033facd19bab61a6736aeeed07b3cf499e", "17000000000000000000"], - ["0x63f1a84816bd167f6af35eeff56aad37a37e4474", "17000000000000000000"], - ["0x01a6890ebe9cb8910c21c3a0f4a74575f602d3b0", "17000000000000000000"], - ["0xf1fe0a34e66d684f182a0886f795e5f22d0e64b6", "17000000000000000000"], - ["0x168881a4eea012a46eed7f3f2ab3fda2ff4bdd47", "17000000000000000000"], - ["0xb65ab25a3d86034b555a347bc176c3d41682e1e5", "17000000000000000000"], - ["0x0000000000000eb4ec62758aae93400b3e5f7f18", "16000000000000000000"], - ["0xd4d81e2a2ea21c7aa782f55d2a5dafe2da1bc36d", "16000000000000000000"], - ["0xfeb2549f293f54a96e780ae8a81b03129d539136", "16000000000000000000"], - ["0xc71af083b580fa0b697ad8b163006e4b2ec1072a", "16000000000000000000"], - ["0x7219179fd4740ed1bc76689b25f590a840f2f049", "16000000000000000000"], - ["0x9aa2329798818b32a6a16e9883a72b0b7c4710d7", "16000000000000000000"], - ["0x4ea6f231e53a4a60f0e3af775180e329df9c6cdc", "16000000000000000000"], - ["0x57c65938c659b4da2ef05d7064ae883140916af3", "16000000000000000000"], - ["0x6786b7e5022cd6e3e6b6a1018953f1d15dd442aa", "16000000000000000000"], - ["0x556cf3e831778860a132442fb6834482f6d91bab", "16000000000000000000"], - ["0x7827b605b08db3f80a24da6e725e98191b7185db", "15000000000000000000"], - ["0xb39975588e364b02d70964c1b06e6e2716c09721", "15000000000000000000"], - ["0x80750964836f9527e18417467a5b7f79bf2a6a21", "15000000000000000000"], - ["0xae8df6c6f0a18ac42f8636f6876c47ce6f56e071", "15000000000000000000"], - ["0xf60d5f136d093024502b91af48f7a42a0cff9527", "15000000000000000000"], - ["0x16857503dcfa74da125a1aa421ff9b266af281cc", "15000000000000000000"], - ["0xbd76c6487dabef207470afdb6f332c0432482f45", "14000000000000000000"], - ["0x24c3cf19e12dd05feafbe47cea4aea8211f0626f", "14000000000000000000"], - ["0xe3b3fd1927d55827257892642e71d4c14dc3aeff", "14000000000000000000"], - ["0xd5381da8a8b0f22ddd335292ac6203348f617b1d", "14000000000000000000"], - ["0xd6ceef56d1e877b26261305dec1094264d830f72", "14000000000000000000"], - ["0x229a690b16b748f047d4206087c27b735d9d231b", "14000000000000000000"], - ["0xa72a8686e5561ccbcc1142b091f43b30f8084626", "13000000000000000000"], - ["0xbee4077a7edf58e1ee76b390af64f377bc58191e", "13000000000000000000"], - ["0x8be64b7d3261390bda4b908fe62a2586a04871f9", "13000000000000000000"], - ["0x4071147abf0ad7646e7a3d8590b7357a7a57eb1f", "13000000000000000000"], - ["0xfbbe7ffba0ce6bd2c34360d925f61834838d79aa", "12000000000000000000"], - ["0x7c9f379ba78273aca5428a5aee1a2d7932016d92", "12000000000000000000"], - ["0x784e120f8e7b9b1d47ceb0af01bd688ff4a5e8c9", "12000000000000000000"], - ["0xbb2a74fead35c15cfce7000e583893820bc9a237", "12000000000000000000"], - ["0x7206834fc91111cd6cec6ead968d6bd33c5e434d", "12000000000000000000"], - ["0x233b17fba461159d4d6987713eae82bc03bf1dc9", "12000000000000000000"], - ["0xc680f93701d5055fdd67830427d248bbfdba794d", "12000000000000000000"], - ["0xda6caefcb34ece4860f52c30552605e6bf86694f", "11000000000000000000"], - ["0x468ecc9ce37e2e6348c3a1901ba84cb13dca42e1", "11000000000000000000"], - ["0x11ef3c94c6ff96615116a2b9423405bd0715b3ff", "85288760000000000000000"], - ["0x74d3ee195f9c1e062fc3ced2946800eecdaf249f", "11000000000000000000"], - ["0x3341c91212595f8d9bb6c36e63c86fa2cda636d0", "11000000000000000000"], - ["0x392141c7742a8794fd06a06bf72e4a0665cf4699", "11000000000000000000"], - ["0xebc627aac94297e8ebcaa3bd1dcc0ef69ce44ae9", "11000000000000000000"], - ["0x64c4c46731d2fe68672ffb08274491485eb26dd8", "10000000000000000000"], - ["0x9578797f81cca95c7f1f17b84a43bc58f1218270", "10000000000000000000"], - ["0x56ffb56a11417dc5126eb9ce0fde1c7058daf541", "10000000000000000000"], - ["0xd12defb3279003a6656023135edc975ed4d918b4", "10000000000000000000"], - ["0xd3fb0f853b67e1a3d03cf2664819e32b2478b253", "10000000000000000000"], - ["0x5423ed3bc1eafd37a84d4f445eae2662ec8ee475", "10000000000000000000"], - ["0x3197d9458abf3a1c66cedbbd285624d40b9f156d", "10000000000000000000"], - ["0x5ea98b98ce29cc5d333bc1ba294bc08bc618f294", "10000000000000000000"], - ["0xd8e74f85cffa74ea3a277b438549f468d87d704d", "10000000000000000000"], - ["0xf6da21e95d74767009accb145b96897ac3630bad", "10000000000000000000"], - ["0x5f30a2bb114091b07499d0d6aca58a392f385069", "9000000000000000000"], - ["0x053960de1dd789f2279b9c4b8a941b6437af3802", "9000000000000000000"], - ["0x8b0971ffa41adad2530f78e54fb7a260ca491bf2", "9000000000000000000"], - ["0xa7a68209dc4ba12a8a055ae9135e1339c057ef91", "8000000000000000000"], - ["0x1f4a913d0916883dd32090aed70f9119767eaa45", "8000000000000000000"], - ["0x3014a97f7b1f904aee0f1a76bded484448a1133f", "8000000000000000000"], - ["0x3397523a9e446b7018d9bd0e924aa85debadc6f1", "8000000000000000000"], - ["0x22a2f3588dc91a871ea600c528a702019ed04991", "8000000000000000000"], - ["0xf23a9799fe0011acb4326306a539b88644ac19a2", "7000000000000000000"], - ["0x2cf48f3be45d1786e74b88b7d33b0f6418df9ee2", "7000000000000000000"], - ["0x08bae5aca5d2347c2fa95f70ca1c4ebae0e5aadb", "7000000000000000000"], - ["0x1d7b13d2c5c130e698dffaa11d76adabc787f269", "7000000000000000000"], - ["0x0538d2c341c8da8087f4ad59b31c36fac6378c99", "7000000000000000000"], - ["0x164a85f1f708a82930b3afe3c395de6faef28496", "7000000000000000000"], - ["0xbf1d60655d83665bb5119196cd322df1633e50e3", "7000000000000000000"], - ["0x887406bdf59d5978717a83657fc95e7d156ec2b2", "6000000000000000000"], - ["0xba1d6621e6934d2a55054d97dc850d22c71bb176", "6000000000000000000"], - ["0x220c9e5808b754cb6274dae00252cf164e435b25", "5000000000000000000"], - ["0xbc147973709a9f8f25b5f45021cab1ea030d3885", "5000000000000000000"], - ["0xc4ff72a7d98222aee8c5a327e19362fd9550ba82", "5000000000000000000"], - ["0x51e373e9716fbf01c266568f51f426640279d7d9", "5000000000000000000"], - ["0x075234dcb3cf808c139be17b1103eca5a3f84aea", "5000000000000000000"], - ["0xc780077a65f33d9d88b59bbf421d4d89b1fc12a0", "5000000000000000000"], - ["0x01adb4f8299dffb1d81bf5c5c597ca3a82455d45", "5000000000000000000"], - ["0x0cfd83dd7e512b332da95b48fe11f572890282f5", "5000000000000000000"], - ["0x94d33ba21a27c96fc8748e76d4e5853bdc0aed69", "5000000000000000000"], - ["0xb40ee46d5f2a2312af3ba9aeb4be770ae7055219", "5000000000000000000"], - ["0x8baf2d1b82fb4039e6cf1e205daf0aed9b060616", "5000000000000000000"], - ["0x614c837b1bf1c60c6484da77eeba9a3b8ca49c08", "5000000000000000000"], - ["0xde7f739efec6c96aa041670bd656b86ca08f8785", "5000000000000000000"], - ["0xb60fcd4d2ac48985fcb2ea4d457595d48426a1c2", "5000000000000000000"], - ["0x8b861c583f176a6755a0354278e6f1c1e14a3f13", "5000000000000000000"], - ["0xe66edf95e1c24dcae334541f0ec9df5adeb54096", "5000000000000000000"], - ["0xa38e787ec7184ff316b1efe2722bbcef6de09b35", "5000000000000000000"], - ["0x5a799288c1571c2c9fe756d6baca1ab323877ad7", "5000000000000000000"], - ["0x2848af56c7d3277bbcd1fcaeea5b83ae467759bd", "5000000000000000000"], - ["0xb657043d58048e2338788483eaf6f4d1c8b02c2c", "5000000000000000000"], - ["0xa110e9c0e636fec57f941cc9b572ceda14f2948a", "5000000000000000000"], - ["0xf4be466db056e73991407ede81af9a02de0aa7d9", "5000000000000000000"], - ["0x173f23fae21ec04b28ba944c798cd947597347c7", "5000000000000000000"], - ["0xa89c05932276acdfd1eca3dda6a7d350f77b34ef", "5000000000000000000"], - ["0xaea4a3c2cfb75059f63390e801d1e6200c51fba2", "5000000000000000000"], - ["0xf735c24cd1e0f05c8f367385b8c624784e97dcae", "5000000000000000000"], - ["0x530617ae022c952fdbf8d46bde299b3383b10921", "5000000000000000000"], - ["0x09d1687c93ecf81cdae0c85d5a98f9645df67e30", "5000000000000000000"], - ["0x652101ea9b4e50964660bed75ec0da120691b9c5", "5000000000000000000"], - ["0xfc27a4d5ba1985ccd2363530097b91444b9936a1", "5000000000000000000"], - ["0x862e250f2f88e5513a1fdae4fd9455193a470aa6", "5000000000000000000"], - ["0xd37fb986c6436db1fb303c6261363338a1b8c1b5", "5000000000000000000"], - ["0x5f3c788ebbd4b45d1340a803b9fc736f6d6aaf9c", "5000000000000000000"], - ["0x25eefb6d114645368e7129fb20ad17ca83924f0a", "5000000000000000000"], - ["0xe89d2384f2df1fa771081a61c430ec67876c74cd", "5000000000000000000"], - ["0x5e2f9711b11a87c8b938dbd2a199d38d9be5b067", "5000000000000000000"], - ["0xf2e466ab2661a2d16ee80a94e804c4090a666e86", "5000000000000000000"], - ["0x2299e24d282a4aa40cbe927234bed1f2c1bdd884", "5000000000000000000"], - ["0x5dd44f5067d0c3d8a4a68add4eb9a3dd0779947b", "5000000000000000000"], - ["0xda1e161ad96dc191a7a6011ab39e15506b22f332", "5000000000000000000"], - ["0x794184d4b97b1e072780d1d6f1972c4b3e0f32ca", "5000000000000000000"], - ["0x665f3f318fa753a22452251bc8123e907e2cb95b", "5000000000000000000"], - ["0x35510f09df280c26452911d8b8ccaf36154ea529", "5000000000000000000"], - ["0xf737a4232135ddf22cb271a34b1af82917067116", "5000000000000000000"], - ["0x62e15cf071d3833e12e7b5c97110a4610a2e1d37", "5000000000000000000"], - ["0xddb956235a4f84365d69bb9d563bd6ee34552bc7", "5000000000000000000"], - ["0x795dc1e52d5409d2b39612435617c52c5cc80905", "5000000000000000000"], - ["0x57e627425c631815bb0d5d2edc05e6259fd535c3", "5000000000000000000"], - ["0x0d24c2bc717732b0006c076d0dda4ee724c749c9", "5000000000000000000"], - ["0x2bcea9e4ed4e5ddfd65f4dd15b5f1bab406c9b71", "5000000000000000000"], - ["0xa92704f53f5e1b6c2ce559a885cd3c1eeec918fd", "5000000000000000000"], - ["0x062820dd79da169d7d26f319739b8d67e0b0b1d5", "5000000000000000000"], - ["0x6871287bd87405c936d36c95554fa81bee7a4edc", "5000000000000000000"], - ["0x5b61219a5a1a1669b7277261e7fa8a2e7a9d3727", "5000000000000000000"], - ["0x121ee23cd51145c03be1e6ac0eb7471447da103c", "5000000000000000000"], - ["0xeb220ca18bbc9b7df57e5f64dc006ff6b678cbc1", "5000000000000000000"], - ["0xff3ae71cdfe3a0e3e8b3f548859536bdd2a87eb5", "5000000000000000000"], - ["0x20268e4060521f49476ecdaddf19ab9945d731e7", "5000000000000000000"], - ["0xfdf8e4c6c7cad7d7ab71acce915d0607422452bd", "5000000000000000000"], - ["0xd5ac1d9ed0f380a4248944e775b1b4d8e9a85ed4", "5000000000000000000"], - ["0xe6d70d56193215d35f324a930c8ba2f24b466588", "5000000000000000000"], - ["0xf00a5c176de6de15fe3b4968f8a16485e874b73d", "5000000000000000000"], - ["0x7351c5848af4c683dfd6945699a77d566938dd91", "5000000000000000000"], - ["0xb65eeeaa9e6f8c8227c13718c23834f09aafa857", "5000000000000000000"], - ["0x139cb882a255c0ae0dcbd3890221a9c07500c24a", "5000000000000000000"], - ["0x486dd6cf9a85d983c3ea9e16255d9b3a5220c0f8", "5000000000000000000"], - ["0x45cec176179747402c2868605eb65ac2a1913e14", "5000000000000000000"], - ["0xd5810d8aa0ae56ae180b38c0818d0f3ca1c16774", "5000000000000000000"], - ["0xd63eae19084c4fe9fb0c4f15c6712558ca20ade3", "5000000000000000000"], - ["0x3a8f208eac2420bd7814900c7cb7d1424d26f53b", "5000000000000000000"], - ["0x0630c749b8d1d4b62970e415c1ad691efda50d3e", "5000000000000000000"], - ["0xee18f898727016f82fe1a6f91e3b9dd0bc2a2fe3", "5000000000000000000"], - ["0x94733331a3a5514c0b02a977aa8d1d4071988827", "5000000000000000000"], - ["0xa2498ab7bb955e5fc8464330b3035e2395837524", "5000000000000000000"], - ["0xf2817674f7a8361b918aea9d4fb9c6900ddd70ff", "5000000000000000000"], - ["0x46138b3b33f8a716d68f39c57c98b56ac0a8f85f", "5000000000000000000"], - ["0xfde49c2d5e0c4099c46bc61f1ffe45c6dd2f3945", "5000000000000000000"], - ["0x788df054a2b4d0deca1d08fb2e91d64073f66229", "4000000000000000000"], - ["0xa9967dda196305eeb3ffe475b5a9b016c55f0be8", "4000000000000000000"], - ["0xe406c00cfa26c3980f2e1a7e0ea9928d0970e81a", "4000000000000000000"], - ["0xf2d7eebea898f42b4bd4ba37e91a263b238cce78", "4000000000000000000"], - ["0x6938b98336121bde01dd82136d9e820b7da9003a", "4000000000000000000"], - ["0x86a41524cb61edd8b115a72ad9735f8068996688", "4000000000000000000"], - ["0x3eeca6cf2a180b3a13c241d5472cd46fd66ee938", "4000000000000000000"], - ["0x5d5c54fe70839286395afc1f08e8c62515bdf371", "4000000000000000000"], - ["0x41902410177bdc600e51f4bdc88b957e70c8d1da", "3000000000000000000"], - ["0xc86b85ee39c37f7226abed3fd7deb045034e4fba", "3000000000000000000"], - ["0xad615f88d4483b80dd415a0cf533c027d6ecde01", "3000000000000000000"], - ["0x1554927346e8f92465ec693e6ee46d9cb8cd6941", "2000000000000000000"], - ["0xade9086630754563619908bead432de161a1f558", "2000000000000000000"], - ["0x7a4c092a03d9f962a67d7822afa652366dac9b9c", "2000000000000000000"], - ["0xc8f59d3b127436cf6fc24170e42106518b6ea085", "2000000000000000000"], - ["0x930bfc8d93c71d4412b9e5532e3c91b822b8de51", "2000000000000000000"], - ["0x080f23321f1b0b9ec1653ab5730c627d455cc04d", "2000000000000000000"], - ["0xaa507c45a3b7f8e302c4699e7acc606bf6ca9d4d", "1000000000000000000"], - ["0xccc339cd783d4836b031c3fc43b9a49ae699ec25", "1000000000000000000"], - ["0x49c608827ac70fe7a258e0a95aa3fe0e262a4768", "1000000000000000000"], - ["0x40fd33f8006434f758ecddd42cf6feb0a8ca1d0f", "1000000000000000000"], - ["0xc8f6a989e73c42361fcbda3ca1a5559e7326206e", "1000000000000000000"], - ["0xc313cfce5eac941604d6f10bd6afd0a562bce37a", "1000000000000000000"], - ["0xc3f7a43e07fdd31ff207e14d51f01a625f47092c", "1000000000000000000"], - ["0x35f382d9daa602a23ad988d5bf837b8e6a01d002", "1000000000000000000"], - ["0x9a583afe399c74176ed6df0ff5609311731524ee", "1000000000000000000"], - ["0x388fa28e670f0dfd15833e3a1ab71a728acd1b50", "1000000000000000000"], - ["0x8fb1b269474bb69db9f5190b33c0d3751d1bef46", "1000000000000000000"], - ["0x0df1eeb03d08bad482cb6de5fc4a8d009e57c9eb", "1000000000000000000"], - ["0x66f18019715410c94d8882cb57ed0f2ba432fb39", "1000000000000000000"], - ["0xcd6622b78b16ab217809f6089c410442a84869e6", "1000000000000000000"], - ["0xcc23eb4ce2f2ad4f5407da66295f39d450c5b2d4", "1000000000000000000"], - ["0x9820f75afd5a15d62c3004874f0beee7408b472d", "1000000000000000000"], - ["0x090d267c596e937ffe1b06ff18ae444aa93ea9f9", "1000000000000000000"], - ["0xc556aa79252afb2acb6701b7fb9bccf82777ae66", "1000000000000000000"], - ["0x790b3a034da88ac00ea323beb1240a5273d5be32", "1000000000000000000"], - ["0xe4765356396d280de0690cd763a4612a44778bba", "1000000000000000000"], - ["0x6c8f55a65aaf01eb78b348d6e683e77eff8f57f0", "1000000000000000000"], - ["0x250a7b43dc0a2a0ef12245466095404ab09ff885", "1000000000000000000"], - ["0x5829937b446cd5806e6a350f6297023d0dbe98be", "1000000000000000000"], - ["0x6e3e80d88fd4e3417831b8686db83fc36dbe5fee", "1000000000000000000"], - ["0x6ec66509f82a6a4c83a7b80717bea75533d20e05", "1000000000000000000"], - ["0x200d426c684d730d40827e10c8ff8d90cd45eb1e", "1000000000000000000"], - ["0xc6d947c08ba8a703c15dcc8692ddd105ca43ff27", "1000000000000000000"], - ["0x40984ccaed62be93e9d773075defc0cebfc1474b", "1000000000000000000"], - ["0x636fab28bee42a98bf04f428d27974d35d7be603", "1000000000000000000"], - ["0x8006a2b383f107039fa8b5e898c3309add480a60", "1000000000000000000"], - ["0x5b7a7db5d98a212979837a563c24c067b0f81012", "1000000000000000000"], - ["0xc6c97d38ce7589c0881f6f845ac035042f088650", "1000000000000000000"], - ["0xc9daa2ffee04fa05c9d7199d2faba14ee712a9ae", "1000000000000000000"], - ["0x88f3a3b63a8daae5b3a7fb482302a4668d18a3c2", "1000000000000000000"], - ["0xf79e3832d138fbec9052652607554b1929a98655", "1000000000000000000"], - ["0xffa46639ef45b5da3033c3c394b4a46c90ed9790", "1000000000000000000"], - ["0xa407c2237fce82bf9f1f121df70d787af329a74e", "1000000000000000000"], - ["0x54b86d3f7bca92952b38cf1073407e302a12ec33", "1000000000000000000"], - ["0x6f92c928d005729656791f78637dfabb19c4fe49", "1000000000000000000"], - ["0x2159cd8abc5b09ec9ce6b89160e3d9720d244926", "1000000000000000000"], - ["0xb2953b2d2f41ef54b293557be1fd2afa19ef9340", "1000000000000000000"], - ["0x4952f5dde00a0677365e42d33bcc5a8abd4e2b43", "1000000000000000000"], - ["0x48ba945370f6de589f45307233bee6772a1abc4b", "1000000000000000000"], - ["0x65bf3d0acad5b5feeb916666d56cda2bb2837e58", "1000000000000000000"], - ["0x7d6d05856a972312b1554297529a7c0747567988", "1000000000000000000"], - ["0x3dad8cf200799f82fd8eb68f608220d8f3ebf8de", "1000000000000000000"], - ["0x094a540bd61318318ed8898dbc834374142c46ba", "1000000000000000000"], - ["0xf3c51aaa4fe7c62e762dfadf52499e62c5408010", "1000000000000000000"], - ["0x7162c6a7f4e58f4d3dd53181d7c7581dec566734", "1000000000000000000"], - ["0x2d62f955a3a18a4852143fe3aa019366964fef2e", "1000000000000000000"], - ["0xb3859c02a325320703097329b9b7a0e0e775a39f", "1000000000000000000"], - ["0x8cf0f4f9e131c0fd8996c723fd2920da7debf5b2", "1000000000000000000"], - ["0x496aa49830137bfb023a4cf93009905182adba9b", "257658550680000000000"], - ["0xe67421fe92494302b10d8b8987ad9a195d2b286e", "24000000000000000000000"], - ["0x7b57db50f91356abe299605095775a6246742538", "285714000000000000000000"], - ["0xb41e620f88c54d91d8945c91cc31bd467c012696", "6000000000000000000000000"], - ["0xe7bc8ef68cb17cd3f57c067574197d50b8a2e156", "22480420000000000000000"], - ["0x98f12b729bbe6f82ffe5c0a3625ec8a5ceda5e4b", "8872840000000000000000"], - ["0x88f10161eeb86a7f87ca62363f291d58b207621a", "389448660000000000000000"], - ["0x5338ef2d92489eaaca0cccadbcd408ad2bc6468e", "2002067500000000000000"], - ["0x776b7ca762b1f3713853f03ea2bbbe0d644bf53f", "14391780000000000000000"], - ["0x17e845e8f6b5bc93d9200c47e0a42ee0a9345acc", "2001260000000000000000"], - ["0xbea3903219313df867ff8663749a0fa3cfb20a43", "30119640000000000000000"], - ["0x1ce7b9f9371db21f4e14d93c1bfd620fa80cbebb", "44291580000000000000000"], - ["0x587c632db714654ece0476d0c21957c724a2c233", "6745560000000000000000"], - ["0x33a0c5ecac63b3f485676ae539455dc81e1c8f5b", "4211140000000000000000"], - ["0x7fc926185cd970deb8696bd4c0c0c56c351d4408", "500000000000000000000"], - ["0x864ae3652e31d2b7991ee6d267c3b8b1f3bc2e76", "399105302200000000000"], - ["0xdaae758a8a60e97f1ccb14ccaffe487acd31d0b9", "2647800000000000000000"], - ["0x7fbedf9c6c6c63ea734286450060d9804b4df146", "3120460000000000000000"], - ["0x91c7a2803dd820b9c0a76eb0980adeb21454d268", "2542420000000000000000"], - ["0xdc26dcf376f16c990fa4ea6030f8b77d912bc764", "25302600000000000000000"], - ["0x860cb0dcda89b13915a67619f8b0f18f48524455", "14345880000000000000000"], - ["0x6ed6462f3e2821f9f89b02205c28dace7432f3a3", "2502560000000000000000"], - ["0xd2415ba39744266c64094f3fdab538d44b62159c", "13476840000000000000000"], - ["0x460501463ddadf0b28e1b396f20e01df83a68274", "2186240000000000000000"], - ["0x824995efc6b53c0d873391d25859312d139b722b", "2269840000000000000000"], - ["0xbc963b5bc8842b9d2961f3187da4e9ff3583f483", "998355215200000000000"], - ["0xd7ba0cbd7421864681a406858b8c3f117445fae9", "4780080000000000000000"], - ["0x7d13166cf615044bacaebc9283a06713d12cceda", "7091500000000000000000"], - ["0x435ace6047e533da356bde40b5d20a3a542104b9", "3479600000000000000000"], - ["0x6507efbdd0e3edf1c671a3c54138020b96955607", "2798060000000000000000"], - ["0x195428b57b2a210f3a7495c6cde7ee4177d66696", "3151300000000000000000"], - ["0x57971ad4b95f8a7c6f7e62e56fce0fc2b76460c1", "2296000000000000000000"], - ["0x1a7138fc2992a04e8f13f5a9c0116787259c47ae", "10019580000000000000000"], - ["0xee4901320fccb9081a8814f888c926d83d306f1a", "516428122600000000000"], - ["0xc95696ca2358095df1f025e91e5c77b8332873c2", "41198200000000000000000"], - ["0x728b322a876d515fb9773acbe0b744973fc8b4a6", "9991500000000000000000"], - ["0xfe6bd4338e1abdbe99f1c9ed918fba846f8d1f3d", "2000000000000000000000"], - ["0x6ebf316c8040ffd01ac2ba6c22b2704019b8b2d3", "2667360000000000000000"], - ["0x80e8c108a9a057efb7d38f0a362a8da47cdfaf27", "15867400000000000000000"], - ["0x5d620183d5def4b09f4397b8407a397466559d80", "470423502800000000000"], - ["0xe9e6867dbcbeebc874ea071dbae681040d2399c8", "3694240000000000000000"], - ["0x09a84adf034e5901b80e68508e4fdc7931d9a7c9", "1298478163800000000000"], - ["0x6f72056a4cab954d2901c22b6f05ec75fd5fb6a2", "260539020000000000000000"], - ["0x8f01f8205744e2cdfda44cc29fc6e1e6ee8c864a", "50515480000000000000000"], - ["0x3930d9d8b77069ad62c4a1b5d943c1545f1e3a96", "1368513075600000000000"], - ["0x4467141db06d5ea8fb2a7b718f7534298aaf0c21", "542584356200000000000"], - ["0x1359669ddc1b3e23275c4542ce82680527c02f71", "97634000000000000000000"], - ["0xcff1fc75f7abd546d8a948660f46f0da9deea622", "2034740000000000000000"], - ["0x491dd4a1b070c22c0b287d675e9f5fd75b55ff56", "4000000000000000000000"], - ["0x3b565678521787151a5a66d1f51d73b6b7a0643c", "2000000000000000000000"], - ["0x0f4b0ae3b27f404d6aedc3dd08320179070a38fd", "751679400000000000000"], - ["0xd287ce3a79eab4574e7d7dcea80dcf74374e461d", "8162960000000000000000"], - ["0x547ed88d8bca88033428c9b300b7808d2e404e7e", "2731640000000000000000"], - ["0x470bab7c3e3e4fadba43afafc843149c6cbc3cfa", "55044600000000000000"], - ["0x6d16749cefb3892a101631279a8fe7369a281d0e", "422222000000000000000000"], - ["0xe00fa26712d743ec5f89af454f0424b17470fa2a", "3289600000000000000000"], - ["0x360676e09deb4daf9c159837d9bcb21f0f07227e", "5674000000000000000000"], - ["0x54427c853b20c6691f2aa9e1651402580068d503", "2000000000000000000000"], - ["0x3411a1279135403b885d9524166244da7676c54c", "1266198200000000000000"], - ["0xf011b0c84502cde1be42fd14532c7a0a5e734196", "20137500000000000000000"], - ["0xded4528c04eac80ce019adb0a4e30bd4d5fd9479", "20000000000000000000000"], - ["0x972929432e1c220860491f91a1096d69548aabb5", "4365992000000000000000"], - ["0x2497f7a60f34b315397b75ca739807318cca05fc", "20000000000000000000000"], - ["0xd8864bb8c74f9cee40347014f9de413022ab2b36", "20000000000000000000000"], - ["0xbce0b69c7066806318381076e24d41da19918a13", "20000000000000000000000"], - ["0x66d8e5c81010b49ea9703336c1a78dd769cd2494", "600000000000000000000"], - ["0x908851863ce45223c9d16892a2bf1553b5659be3", "3358000000000000000000"], - ["0xfb27c8582976f1a29d58e89bcc89da1e54d78076", "30431500000000000000000"], - ["0xfc0567dc074f803bc3d32290b4f995da96f6ce97", "20000000000000000000000"], - ["0x6bcfb281eefb0ba7c7264028a06003f6fd8a9cac", "2000000000000000000000"], - ["0x40ebf96e428b4920a7c4c57a34f99e71367a240c", "1989080000000000000000"], - ["0x6c388f50a0b0edfc6da6d58d75d19d70a2fece44", "20002000000000000000000"], - ["0x9910e06107b56e5f68e609f6f71ab611e38f4493", "20000000000000000000000"], - ["0x6b6c4a2a94c78d42c767bbc378ffcac3c530c8f4", "3321640000000000000000"], - ["0x6f7bf13e057305d04abd72e637e491cc30569f43", "203008380000000000000000"], - ["0x8f423720584b0eff220c8ff0b62700917089be22", "74251800000000000000"], - ["0xc38f9eac4df539c1e611021c062863e3286e6806", "4522240000000000000000"], - ["0x4b0ddf4513d807553695d13c195170cac50da9ce", "56386320000000000000000"], - ["0xc59de18ecd31f5e9c5a12c69ab8b175e28c96d04", "7036340000000000000000"], - ["0xa6b59d4419bae35d09432f2e35176a576e02f8ee", "2608940000000000000000"], - ["0x46419f392a12611ed82dc7d4e8c6642de0e75c5a", "12607960000000000000000"], - ["0x91e6b73b4270832829a9ba986d3beab57bfff4f9", "2102620000000000000000"], - ["0xaa9233eb821f3bf04b265319e5eba5607e752acd", "34206000000000000000000"], - ["0xa3bd3cc8207cfe58e71003e6d1d64256b2375467", "439241800000000000000"], - ["0x19868b43cc7e16f8a928c500400d24f1b5f2dcff", "27522358000000000000000"], - ["0xa7b95d2a2d10028cc4450e453151181cbcac74fc", "389503800000000000000"], - ["0x56fefd61bb9b10d8555f970de09ae1359c931035", "12341140000000000000000"], - ["0x59156935684fb81a35b068d599c34947A7eE78dE", "83333500000000000000000"], - ["0x24B4a356917d9F0b99353C56378FC247d9e6ea90", "125000000000000000000000"], - ["0x9216E7b3B0Df52291802f94C67004d262159Da73", "69444000000000000000000"], - ["0xb1dB3e730dF1833983222130cF95139f6b563578", "69444000000000000000000"], - ["0x5214a7293E165c1E1F36C14d0e16724ba13e14FE", "222222000000000000000000"], - ["0xc79Bd3a1cf2E6935136A4a9833f1aa67aE67D9aA", "152778000000000000000000"], - ["0x9cDb1804156F362Aa5900478E1465C917A5F6a3A", "55556000000000000000000"], - ["0x6728fCBA2012863e9E1bD12f2a95355deD06C7aD", "13889000000000000000000"], - ["0xCf3e183AEAE7802008a77a91CD90361860571717", "361111500000000000000000"], - ["0x8b90b067d02132fC7c5cDf64b8cac04D55aBC2B2", "222222500000000000000000"], - ["0x042b312CFD664e6f954E3e03099eE983ff45Ec3e", "277778000000000000000000"], - ["0x4a5BB1c9347A0d4F7e06a29239162f03647d9232", "38889000000000000000000"], - ["0xEBD59C8A39726591982E8e2104ec3D04c9F72146", "125000000000000000000000"], - ["0x719Ef1E50d44dc2F9fb43978A613164bE0275476", "55556000000000000000000"], - ["0x27f7E530d0c1aB780d8d6962e9Cfd45a9C96d8b9", "69444000000000000000000"], - ["0x3b24a7C97815d9F18eeB02f15e6B1b89064B6f9C", "194444000000000000000000"], - ["0x1DBe623157F7CDf98771020e688f7bc25A2e9A21", "6944500000000000000000"], - ["0x4553eD5d8d3731E629f67BD86abd021175F31848", "27778000000000000000000"], - ["0x0Ed67dAaacf97acF041cc65f04A632a8811347fF", "13889000000000000000000"], - ["0xD164f7d5B93F17C863F0FeAec8AB92447dA9B53d", "13889000000000000000000"], - ["0x53A2f447C61152917493679F8105811198648d81", "13889000000000000000000"], - ["0x5F6a4215FE729870A437f29d3b3278e27C8789B0", "55556000000000000000000"], - ["0x8b58f7c312406d7c6a5d01898f0c5aef31ee51a7", "13889000000000000000000"], - ["0x52E7bdE89Fcbd1e1C656Db1C08DdE45D82447e25", "13889000000000000000000"], - ["0x2D69BAB9738b05048be16DE3E5E0A945b8EeEf3a", "27778000000000000000000"], - ["0xa777D9a1BedFe3E4Df943BCFdD5B13Ace8B1f2f7", "18056000000000000000000"], - ["0x68C0F043Fb61F1be7e6F087033Ddf92b9Cd02de7", "13889000000000000000000"], - ["0xF90F5f3510AF48786D98aFeb3b8C39fBcB3C6C1e", "13889000000000000000000"], - ["0x0C2928630395EA989e3077Aefe50E08dc5426584", "13889000000000000000000"], - ["0x9455FD942cA87446fD914e07C403C785bdcdE84E", "20833500000000000000000"], - ["0x43f4759153292Ac675ec7ff56439c60065ACbC51", "19444000000000000000000"], - ["0x857B3470632d12B041a7823219165F37C2F84783", "13889000000000000000000"], - ["0x2938b2a7EbF9a59645E39d51ec5eCA2869D6C53D", "19444000000000000000000"], - ["0x482c7F6217292d40452b68897c8265d49f20A511", "13889000000000000000000"], - ["0x4F8b1d0FD9109de9099e1cA1312cA8089E602C25", "20833500000000000000000"], - ["0xdD59B334751E7A86bda7EFe96B93a5f760E33f2f", "13889000000000000000000"], - ["0x3B722bfB1c27B1Edc6C9C2e057c590a9ee57B2b0", "19444500000000000000000"], - ["0xa69303D076dFb54d50589C4D018205a409Aa4293", "13889000000000000000000"], - ["0x6cb8e395D1F7c7B00D6594deD6Aa03C5f7cA13C8", "13889000000000000000000"], - ["0xCA63CD425d0e78fFE05a84c330Bfee691242113d", "13889000000000000000000"], - ["0x2E79776460bf448B286874351AD55ef6DAF18102", "22222500000000000000000"], - ["0x778C029675d3e2435Cf4C207E981D37c2174bec8", "22222500000000000000000"], - ["0xE1176052966f14802BB3755bbdfcaA712B4708e8", "22222500000000000000000"], - ["0x4d883824258f7253101f266a23207DCb2Dd45768", "22222500000000000000000"], - ["0x2165Ffc3b1c7eE4A618ecDf3D025625f30112E4E", "22222500000000000000000"], - ["0x468cB54a3821d8b0129C42Ea6ADf12748d97fD98", "27778000000000000000000"], - ["0x20F7C7E4b410af0D7309a04792FC22c7b4c7f46E", "13889000000000000000000"], - ["0xfD6231A29661100e9F7E68d37730b040E24caD28", "13889000000000000000000"], - ["0x187c77E1C74057b5Ae98F90B45E4303Cb7361C76", "83333000000000000000000"], - ["0x1791Ef76A0b0451457B244B2D2FE414237992cc6", "138888000000000000000000"], - ["0x67505Aaf91258a086dA665FaFdEAEF7de9D971bd", "176720000000000000000000"], - ["0x954f1AC51131cffd7985Ab5bBA78cf2f643E050C", "75626000000000000000000"], - ["0xbbfaF36Dd3159628489F42c7bBC6e058Fb9b18Bc", "4166000000000000000000"], - ]; - - module.exports = whiteList; \ No newline at end of file + ["0xFBca6a35F5ad385d995ac50e4fF1C6c53d54a8e3", "10000000000000000000000000"], + ["0xDE29dC6232b345d37C949f808E8F95A461eA3Cd0", "10000000000000000000000000"], + ["0xA64916f1235455fB8b9b97a5a2CD9b3B48879629", "10000000000000000000000000"], + ["0x046a5A1FA5986767ec460B998cC78F59c6ee03Ef", "10000000000000000000000000"], + ["0xbE8dCAd36698764A7b442d69CBaAB6cA820B017f", "10000000000000000000000000"], + ["0x8AABE1D0A229399a49b77dc29C75A951e520F1c2", "10000000000000000000000000"], + ["0xFbf4836627698D038Ed947B62fDf407C9CcaBA62", "10000000000000000000000000"], + ["0x8b7eE466B4a3B3746736904ac7667E433DC8a468", "10000000000000000000000000"], + ["0x23B5202803b01c6ABFc06C8B13417ac39aCDEfaA", "10000000000000000000000000"], + ["0x30A1Cee5E3A1A9AbE6b532bBd834329220BCD735", "10000000000000000000000000"], + ["0x38bf23E8E282C72142Ad8976acB1F15503E0Eb5B", "10000000000000000000000000"], + ["0xF1B299dBEFdcf8F65AF04D5DdBad8F8fF7e58F14", "10000000000000000000000000"], + ["0x19AF8A8aA7aF4DB47793eA9e397219E0b60bc0fC", "10000000000000000000000000"], + ["0x06eCD417F5Cb845752afCaD1F4C85139e8ECA5Da", "10000000000000000000000000"], + ["0x5593F66B77355668bF1Ef3166eDb7Fd49e932103", "10000000000000000000000000"], + ["0x6de41e8712C23e0cF48Fa60A155872DFBDC40F98", "10000000000000000000000000"], + ["0x68B25867E78C39ad8b88A0d040AD47025DD42C62", "10000000000000000000000000"], + ["0xa23cff7a4f319445e4584897941bf478b4931abc", "10000000000000000000000000"], + ["0x2e811568b0fb4b6e9077c4cd2d57c34f554b835d", "10000000000000000000000000"], + ["0xd4ce1744799b189c7a19a3d3ce0aac8de60f781b", "10000000000000000000000000"], + ["0xa66bf5d22d48b69a08746d28c711f6d56d44480e", "10000000000000000000000000"], + ["0x3374c353f4bcd5772a0d4def26e3857e2a45cab2", "10000000000000000000000000"], + ["0x87d67301a24d7b94224cdefcf943417162ae7007", "10000000000000000000000000"], + ["0xef3fdc051bac5ccb7aa1de3a0c2b3a463cb6c677", "10000000000000000000000000"], + ["0x468e7f6f6438864dd31ef61961dfd3e01b69180f", "10000000000000000000000000"], + ["0x21cbbc3639d35bf216c8ecc111876a96177e465c", "10000000000000000000000000"], + ["0x2a8ac196905afff02550b547af6110c87f504b8e", "10000000000000000000000000"], + ["0xdc31df63ca0b6de64bc62d81844e8956d2476541", "10000000000000000000000000"], + ["0x809676df9f7ef012b1201e767575bc9b5aebd108", "10000000000000000000000000"], + ["0x88168d089f75f5cd93f777ec16bbb178a7c7b512", "10000000000000000000000000"], + ["0xb0823fffac86c709c658db3f8765e9da8c7d9647", "10000000000000000000000000"], + ["0x1688888ebdab05737cf752acf7d11d82f21ac5f2", "10000000000000000000000000"], + ["0xb67dfcf4dec5944101d363ef4ec8bfb1996eff82", "10000000000000000000000000"], + ["0x5f60ad4ed6777500005b4179deff0eec362b5c25", "10000000000000000000000000"], + ["0x13991cc1ffae4cf57c5caefb951826ffa54a88af", "10000000000000000000000000"], + ["0xec578146b22d7ef5f6e5c69fdde00bdaa5f0b33b", "10000000000000000000000000"], + ["0x3b54a04374a884cb70f45abcc0539037bcfb9da2", "10000000000000000000000000"], + ["0x73c52612f72075361bd707934dbc2b4358c58f32", "10000000000000000000000000"], + ["0xc599c65767d1527bda5064676aa6de96c65a2ad4", "10000000000000000000000000"], + ["0xad25daf8b180d846c78fe7b4aabd83f881d6b733", "10000000000000000000000000"], + ["0x9f7ae94f69d27bc1e8f895f21d8c13cdcbe3bdf0", "10000000000000000000000000"], + ["0xd1dadf4a440afb322d1b8fc3aa2e6f4f5ed6c68a", "10000000000000000000000000"], + ["0x05534d1785113ff3b24b7402971bd2efb395f699", "10000000000000000000000000"], + ["0x22431dff508f62be49108848141b28bdcf3a3d4a", "10000000000000000000000000"], + ["0xcee520071a03f70f5839f915e43989a59bdb8b1c", "10000000000000000000000000"], + ["0x6d17a1d100ba0732a72c309834c8cb7aa3690e4a", "10000000000000000000000000"], + ["0xa9c7caa7029c886ed5463155217110c25d8ee393", "10000000000000000000000000"], + ["0x9467f85edba87ede9c42e6dee079aab29879ce79", "10000000000000000000000000"], + ["0xbeeaae250ca286a7b861c8b0fcb1d5bbdee44394", "10000000000000000000000000"], + ["0x3938f63158de24fdedb8f8953db13bd581118f89", "10000000000000000000000000"], + ["0x9fb1c52126c34fc0a0e4b37bedd2e65fe5617654", "10000000000000000000000000"], + ["0x60f13d97e7342b046396705952afaf9b9f9a442d", "10000000000000000000000000"], + ["0xa8ce9d6c62ffa6e4cec0d215624f9a1419d78ed2", "10000000000000000000000000"], + ["0x0975c2e82af9eb16c68f682fe50e864ae557de72", "10000000000000000000000000"], + ["0xa9b3e4e7667d96cc5bc44bbf17e80fa39f1e5006", "10000000000000000000000000"], + ["0xd46808f9c39b9bfea1cd817f2e8c2ecb3184a5bd", "10000000000000000000000000"], + ["0x3c495a69ff82e36a6479f4af470f6389676d0b9f", "10000000000000000000000000"], + ["0x752663015b9bb32d0ffb575967a833176b793f1e", "10000000000000000000000000"], + ["0xc0b374f27abccd5f34e30ba437adf10f084a66c4", "10000000000000000000000000"], + ["0x54e10526b3bbb5e51cd26d3db374e4332d8fee8e", "10000000000000000000000000"], + ["0x5b4275ba1251b4692ec8b76bdc78111031d2a7cd", "10000000000000000000000000"], + ["0xa59b5f2d362ce789671212bd8e18b2d928ca60e3", "10000000000000000000000000"], + ["0x472c8e03d9972e1ae1774346b18f091462eb24f0", "10000000000000000000000000"], + ["0x78ffe1e4ada70afaccd803355d2241e2e1bcb5f3", "10000000000000000000000000"], + ["0x3fc46fa504a40830cb5a0416b9625b88e1eb41af", "10000000000000000000000000"], + ["0x9bf7b27182e988d302ca1ec1f64a6ae59dbce3fe", "10000000000000000000000000"], + ["0x0df3cea37ea6146657ef5f393cb51edc579bc552", "10000000000000000000000000"], + ["0x254265d8f5d988426f2297e9b68997815737ad0b", "10000000000000000000000000"], + ["0xdd8fe8805751ef039795f998cbee33aa861018f8", "10000000000000000000000000"], + ["0x3c0d9d0e15a4422ff8c27a496b9c786ae1b7a5bb", "10000000000000000000000000"], + ["0x9d43b4dec57280f4d8923d0404ebb8416bcbcf84", "10000000000000000000000000"], + ["0xb0dbfa6e34adf8cbca0332a155f0fd9b93abf35c", "10000000000000000000000000"], + ["0x2897958f27ef55067e39afd882f2f5695d266e98", "10000000000000000000000000"], + ["0xbec118e18379f10ddd4c57c708f4e43a41afbcbd", "10000000000000000000000000"], + ["0x2c12f81506c3bbd3a5250f742a877fd30f6460aa", "10000000000000000000000000"], + ["0x10b9924602f31b716821eccb7b81ba0c3f9b34e0", "10000000000000000000000000"], + ["0xbaed499414cc63472d770c0b329b6720f271cece", "10000000000000000000000000"], + ["0xf03abdc9039400ed2434218415895ee2b7da8b7b", "10000000000000000000000000"], + ["0x9037398f5c6e14a8654c59539c16f84123dd425c", "10000000000000000000000000"], + ["0xcce8d59affdd93be338fc77fa0a298c2cb65da59", "10000000000000000000000000"], + ["0xe3232b4e03cfea16e1dfa908b52cad3a4ae2592f", "10000000000000000000000000"], + ["0x8a20ecc5dcf7cfdcadd9969c66366ec958317fb5", "10000000000000000000000000"], + ["0x2764f88fe0cf47fbd481f5f1166eb8da0ed7feb6", "10000000000000000000000000"], + ["0xcd003b9ce7b1c64b57857710beccdda8d982a740", "10000000000000000000000000"], + ["0x86e6f18c836882e7429592d9d5261bdd4f3eae29", "10000000000000000000000000"], + ["0xa1ecb46c0be223dff23efda8bd553d17b938af47", "10000000000000000000000000"], + ["0x113e21c37cab951c281476dc7ee8951d3ec6d6be", "10000000000000000000000000"], + ["0xe1cb0ddb050889f7c99a2859c81729ff5ca6d29a", "10000000000000000000000000"], + ["0x81864360d166e53446390454422a3d0e904005f5", "10000000000000000000000000"], + ["0xc03c4476fbe25138bf724fa1b95551c6e6b8fd2c", "10000000000000000000000000"], + ["0xb50c13ac04ad1e1b074d76eb64356a08cfeeb449", "10000000000000000000000000"], + ["0xb3a14719e1da663e7f48fbaf97ef872990551243", "10000000000000000000000000"], + ["0x003f7293e7282b4c8ca4a807f3f621a0659f1c09", "10000000000000000000000000"], + ["0x553c6a57a1436fa9d7275d77cd3d3ea62c75ca17", "10000000000000000000000000"], + ["0x4e9ce0f37ad40d302fd3af2909ee7101b17c9c37", "10000000000000000000000000"], + ["0xfdae0e73be9d4bb5439ed1724af6435fe91c1c69", "10000000000000000000000000"], + ["0x3b1d75ad5170136f41ba923139ff6f45932ba546", "10000000000000000000000000"], + ["0x7767319acedbbd5192ac06150424909a27138544", "10000000000000000000000000"], + ["0xe708acf4264610f0fe7064f498666cfefb9648c6", "10000000000000000000000000"], + ["0x1946102fa977780a0c265b6073f206c2d6d3bfa3", "10000000000000000000000000"], + ["0xa8b5eacc8b5c10cc8b68b315cb9781b311a7ac3f", "10000000000000000000000000"], + ["0x20f542e36ccb48129524c4592c7f040300336b92", "10000000000000000000000000"], + ["0x8c09f9dd2289e88acf387601873da8a4b766fd33", "10000000000000000000000000"], + ["0x092c741651725063aaebf422f2ba775875ca4dc3", "10000000000000000000000000"], + ["0x7a2121e0b92ae39ca9fdca303e73753c21e35f25", "10000000000000000000000000"], + ["0xc70628f0931abeeb9864b5a632439f30118e384c", "10000000000000000000000000"], + ["0xdcf8d6905ed8e2c8e2194a99c22f1232398ef3b0", "10000000000000000000000000"], + ["0x6ffbca4259dfcec4b72bed5008704468208e7635", "10000000000000000000000000"], + ["0x4217309cab4803fb455b0d6d33678dca3555cf01", "10000000000000000000000000"], + ["0x04c860013028fcad8762518cff977516f5a21662", "10000000000000000000000000"], + ["0x4b1c40ec0452e28a885aabe08e2f2b32cca85ff5", "10000000000000000000000000"], + ["0x754c3c591dd4f3922cbdca43f0735f2efaf41541", "10000000000000000000000000"], + ["0x51e00a95748dbd2a3f47bc5c3b3e7b3f0fea666c", "10000000000000000000000000"], + ["0x14290920ddf69e07a3b8e5b6a40b51dc75a802c2", "10000000000000000000000000"], + ["0x405227400e15b125609acfcecfca5008c175ddba", "10000000000000000000000000"], + ["0xa64333ed5ef49bb2ba34530563b39e0a2b9e0586", "10000000000000000000000000"], + ["0x14c4cb6077c8929386428c853a65d5c2be033945", "10000000000000000000000000"], + ["0x80fdcdd692c0a586723a8cfb940f4739917182da", "10000000000000000000000000"], + ["0x605cdb5968e47fd867783b60f8390479f699eab9", "10000000000000000000000000"], + ["0xb75f87261a1fac3a86f8a48d55597a622ba3cc48", "10000000000000000000000000"], + ["0x1461bfdc10cabb981f4eb9d64a3cfc174f7cc56c", "10000000000000000000000000"], + ["0x8237f4daa90abc0a4e2097a8b423dbc6c0d0d614", "10000000000000000000000000"], + ["0xa65a4aefdddddd8c8614d820177ff52c2076d70a", "10000000000000000000000000"], + ["0xdb59117e9c20c7f79fb1ecfb4497c38aeefa7919", "10000000000000000000000000"], + ["0xfd68e3ef807230c2b7859a47c8a33e81a439bbc6", "10000000000000000000000000"], + ["0x296ac1ff52b9ff97b404b93da139443b4d81843f", "10000000000000000000000000"], + ["0xb03e52e5b8ae0a203212662a6a0e3cfece59630d", "10000000000000000000000000"], + ["0x21d4c58c8aae74f33c96f9b62308a413f39cdd27", "10000000000000000000000000"], + ["0xb585814c924440cebd8954ded5b97b59f65aaf50", "10000000000000000000000000"], + ["0xee9cbd996f33efae4b53329c9f9efa500ca6e365", "10000000000000000000000000"], + ["0x07c83d42c835ac1b56a02fec4788a456116e5453", "10000000000000000000000000"], + ["0x58a4b71db382a108171e2cc9b6dd490aa5514fb4", "10000000000000000000000000"], + ["0x563400e04295c1f28b4ac4872b91a0e52cb520a8", "10000000000000000000000000"], + ["0xeda057376704bfbe71971aa21b249449dc7bae3c", "10000000000000000000000000"], + ["0x89e8c756efa594116409929ecbde979a8ea1de14", "10000000000000000000000000"], + ["0x6247bf5f0037a090dc33b74d5357ec46547a9ba8", "10000000000000000000000000"], + ["0x912dd31f6a07ece098df4350682c2090a19b2fcf", "10000000000000000000000000"], + ["0xfee724806ef43fe223fc77bf92554b1d8caf772d", "10000000000000000000000000"], + ["0xdbc57a1dc6bf9080c10b2d66be3afef7ba2a4f19", "10000000000000000000000000"], + ["0xfc795960c9f785a2cb599c1e0d949dc5c19f6258", "10000000000000000000000000"], + ["0x14fe1322209eaccafe3f7545195bd163359cdf0d", "10000000000000000000000000"], + ["0x1a77abd08956b73ab2fd7d9a2c25fac53495bef5", "10000000000000000000000000"], + ["0x53cbf587156d4970e452967794962f67dd3ba110", "10000000000000000000000000"], + ["0xd79a3323119dfe910c6ac7c506036be6ebd44417", "10000000000000000000000000"], + ["0xf3bfb88affacbecefc1a570a848a79cde46291a4", "10000000000000000000000000"], + ["0x74102bc480a41681e66add3ec9378ae6f3a79652", "10000000000000000000000000"], + ["0x57aabccd6f5e465f6359fa9d5c11aefa34925cb5", "10000000000000000000000000"], + ["0x3296474f536bdf252eddee60e1580f0cbc72e286", "10000000000000000000000000"], + ["0xbcf6f519b022927f7160f940d7646decf75f68aa", "10000000000000000000000000"], + ["0xe03d7d4d41c403d65505c29e4717a06ffc10da00", "10000000000000000000000000"], + ["0x860be57d3951c3dadc7a21156b82949596a18de7", "10000000000000000000000000"], + ["0xd70a9dcd0753dd7ad9cc49d434b91659a6165512", "10000000000000000000000000"], + ["0xf43c75b8af6cbe076918069ba5d5fc9d1afac954", "10000000000000000000000000"], + ["0x94d2f2c38b5a198df362dae026c72d3cf27725dd", "10000000000000000000000000"], + ["0xf14fe2d917f5b59e90a199a401bf1ad7f3a59265", "10000000000000000000000000"], + ["0x598c2fe8ceea012153f2fd9cd77cb1b5befdca39", "10000000000000000000000000"], + ["0xb0e24f33249c4f85ef1df3e2773ac94b0e637a00", "10000000000000000000000000"], + ["0x032c1a94b8039773aa839e38d4d76e0e991dd7bf", "10000000000000000000000000"], + ["0x164d909ea9986f95a8ecf9ae141de56dd0c2d86b", "10000000000000000000000000"], + ["0x7d2098ea80cb929e9fcf79ed18092ef3034239d2", "10000000000000000000000000"], + ["0xf3b08a2e2747a0638ad91e163be3a251f26b6c38", "10000000000000000000000000"], + ["0x4b9b7dda7c64046776b0166f4f71a2cf058c3e56", "10000000000000000000000000"], + ["0xd4ada92d41687b960856cd16755f4dbd4a82d70f", "10000000000000000000000000"], + ["0x44b2fc812df9b5945a88a1d2f70f217c2afa292c", "10000000000000000000000000"], + ["0xd6f82c5b7af5a6ba2a60421d304c93abd2a98bb6", "10000000000000000000000000"], + ["0xbaacf4656a2b60c54445db7211988edfc3cd98cc", "10000000000000000000000000"], + ["0xa5b55e9277f39ed77a09319a36acf4961a1a67e3", "10000000000000000000000000"], + ["0x7558d0ed461e0fd323556a049167d90d25a78a0a", "10000000000000000000000000"], + ["0xa44f346aa65d88bc2cf51ce1f2651187f005be0a", "10000000000000000000000000"], + ["0xb2780b37a3197f2ff03733ac84a8b3fdf7fcf10d", "10000000000000000000000000"], + ["0xb1d58b06fccd1aaab557d895f494d8457fd488a2", "10000000000000000000000000"], + ["0x2b2434b24c58486a16953952acef2c4adcf7033a", "10000000000000000000000000"], + ["0x2adba2d00c7716f5b218b4df61fbfe30fb52d191", "10000000000000000000000000"], + ["0x43fce290181eb60bdd2ea8b2a7695387da3416bd", "10000000000000000000000000"], + ["0xd012e4961de1d7138305bda73d37587916cbc68c", "10000000000000000000000000"], + ["0x40f293766af55e2ced9d2bee7ef1d584bcee41d3", "10000000000000000000000000"], + ["0x95d43258483ade54f7a2c53dc985031f0f619286", "10000000000000000000000000"], + ["0xc25e850f6cede52809014d4eecca402eb47bdc28", "10000000000000000000000000"], + ["0xfbde6d57645b6b9c259e84ee0071b71e0572683e", "10000000000000000000000000"], + ["0x58a19d5dadd2f465ba16e1358a9cd113ef279cef", "10000000000000000000000000"], + ["0xaf914aa608b13ae7cf94cb38a99bbad15387e28d", "10000000000000000000000000"], + ["0x7e6b47cf352ca5e3713af88dc4fdc23b60ad67f6", "10000000000000000000000000"], + ["0xab8410bb53ce7e27bd45b86ec7b3688159c512ec", "10000000000000000000000000"], + ["0xa8dbc1ee88a30efeef9692e7476620279e8f95db", "10000000000000000000000000"], + ["0xf0025d7f196d8d5d5a944c311896bf94dd3efafb", "10000000000000000000000000"], + ["0xd1a863da4c548fb5bf6915292e635b58ef38b77b", "10000000000000000000000000"], + ["0x1227b6bce1b40ea3d2edd33c5107454acb9d5fe2", "10000000000000000000000000"], + ["0x4ca1fac10635f822aea0d0cdfacb958ba029f56e", "10000000000000000000000000"], + ["0x360b254c868064168d9dd8dd7d7e103fdc5c7f8d", "10000000000000000000000000"], + ["0x6bce1ea16205869fa7f28f12e217993304019e7e", "10000000000000000000000000"], + ["0x46a15045f68feb474938e2c7155c05bce5f104cc", "10000000000000000000000000"], + ["0xe32f576578f9aea942226b6a280fbce93da45638", "10000000000000000000000000"], + ["0xc1a0c65a031374ab3e6692ca32320bc04e546419", "10000000000000000000000000"], + ["0xd3ba5a299c45c3a6e1b5739964d68dff822fa658", "10000000000000000000000000"], + ["0x3410afba6587ae91909d5c5d020c8dcae4048188", "10000000000000000000000000"], + ["0x5c18260c85efe5a4a26efae933588d80e727bebe", "10000000000000000000000000"], + ["0xafdebb99329df4d002919aae3d8b055bc9053e20", "10000000000000000000000000"], + ["0x4a4d58adb25180f2e36c7429ba17bc4a79a21eb1", "10000000000000000000000000"], + ["0xd7d7d68e4bdcf85c073485ab7bfd151b0c019f1f", "10000000000000000000000000"], + ["0xf249e7b44c5ae0f3e216f79d9925a47a23438c6e", "10000000000000000000000000"], + ["0x8181dd76e1ad2362407973aa2f63159288932e0b", "10000000000000000000000000"], + ["0x9bb4ba47e280674fdd60be04e70af293a80dc99e", "10000000000000000000000000"], + ["0xf7b28eb110feadbef0af896b82045676bd329714", "10000000000000000000000000"], + ["0x0dc290114023af5614868a6ef0147be261a4baa7", "10000000000000000000000000"], + ["0x6dd8afd0338510eef17db0fb4f76b0cfab9002d3", "10000000000000000000000000"], + ["0xdb94bf07317d263b2f7d771c0652bff5dba0de2f", "10000000000000000000000000"], + ["0x93aab40dd6888569598dd97463373db270b47977", "10000000000000000000000000"], + ["0x1075df73e8532bfb64164e94924c6898ebcf7635", "10000000000000000000000000"], + ["0xe8869dfe6492c4f6f078ba74c651b4808bfb784b", "10000000000000000000000000"], + ["0xd8f01abaa9afafbffc4039e79410dcd938cd64b1", "10000000000000000000000000"], + ["0x60ef9085391291e674802975fdf53cccccf8b70f", "10000000000000000000000000"], + ["0x5a68fa86f34e3c4a9f49dcaa6b5c4da816aba829", "10000000000000000000000000"], + ["0x74fc66cc35b90cf3f8ffa0b08ab7b00acd419a48", "10000000000000000000000000"], + ["0xbf9d36e48125a856e5ebf4eaba8e314cace90663", "10000000000000000000000000"], + ["0xac9ea7537e24c736918c33ce30e16d57e3efebed", "10000000000000000000000000"], + ["0x527422122bc5508d68dda6903bca53740a1a3248", "10000000000000000000000000"], + ["0x098fb583a27052ad8533d8dc0767f648f464db13", "10000000000000000000000000"], + ["0xaea4565a717e4ba257035829ca6055a2c6e151c5", "10000000000000000000000000"], + ["0xd382570c8c16fa6bd31302e5cb2bfa4f58ba1004", "10000000000000000000000000"], + ["0x8598770dd49c6c867d2019336ce66c04278c9a8a", "10000000000000000000000000"], + ["0xd350a04d2566b5356afc7b6ec93db428084d7392", "10000000000000000000000000"], + ["0x95ff03009c97dfc85675e3540441f278cd3491a9", "10000000000000000000000000"], + ["0x4495e211f9e46b97c75d95fa0863243e7d74b9fc", "10000000000000000000000000"], + ["0x44c6c0bdf106c2248174577c5342dc785a981bf3", "10000000000000000000000000"], + ["0xb99f63fda30bd3afbc73c0c4afeb728b3a451ea3", "10000000000000000000000000"], + ["0x3cd5496a6e4d789e40961259e257ba1fe4ec32f2", "10000000000000000000000000"], + ["0x5e154121e1b9279a26f9f477310acafbe11bd91b", "10000000000000000000000000"], + ["0x388411e858cb11414b7eeccf26c8c6a2c23ec52f", "10000000000000000000000000"], + ["0x39427de5d859576c849f4ac0e4601a2504697bed", "10000000000000000000000000"], + ["0xeb090b315b21b4e46f9e789c314da9c2fb974e23", "10000000000000000000000000"], + ["0x8d81209f5619ef5f35878a8c459b8680a54ef057", "10000000000000000000000000"], + ["0x43db77a27790a91ecbe9bb8e974d5fadd17d53c5", "10000000000000000000000000"], + ["0x7161f402ffdae5c4d63a750139ad714a3233ca9a", "10000000000000000000000000"], + ["0x12e468a4ee35da7d5e5128b222c008b6a5453dc5", "10000000000000000000000000"], + ["0x4e6180f2eca3f9bbba840f324502a95cf38cb468", "10000000000000000000000000"], + ["0xc02132ff17c01bb0a36fb9d622d3bc3dc9df0adb", "10000000000000000000000000"], + ["0x63c4f08599d91ec68bbfb118f087f7e56c3dac71", "10000000000000000000000000"], + ["0x066369d37121ad4b0565ae86af6afc7f92cda522", "10000000000000000000000000"], + ["0xa50d73d6b1ebb47b633a093884b72331f1df2903", "10000000000000000000000000"], + ["0x3abcb5d5fb4044620c319bb63c5540a04e024aa1", "10000000000000000000000000"], + ["0x49c6f828acaf25e548d77e4487d14c385a19370a", "10000000000000000000000000"], + ["0xe9d1b2be36cd8f868183bccf553c4e893ce64b28", "10000000000000000000000000"], + ["0x2574a67bdff7a08169d91f4d57a0116b15cf710e", "10000000000000000000000000"], + ["0xf3e4d991a20043b6bd025058cf4d96fd7501070b", "10000000000000000000000000"], + ["0x1f56b9d1b9e1745f69510ac87a5f7686bc014876", "10000000000000000000000000"], + ["0x8f045416a994751f1e106297149d6f743b993556", "10000000000000000000000000"], + ["0xb0ed71a81cc64a0e81a900b74bd8814141a62cfa", "10000000000000000000000000"], + ["0x6df3b8c8d4981ec6deed2fdafafae95888f670c0", "10000000000000000000000000"], + ["0x7d6fbc9a46cc83d74fc6712f83e2e1b49ed934fb", "10000000000000000000000000"], + ["0xd9f72143b4105402c1f254ccd47e1853e80a4df4", "10000000000000000000000000"], + ["0x1cb41360375dfe8ac94a6e10a9027e364966cfd1", "10000000000000000000000000"], + ["0x47602a969b3b978147e25a23dcf87565831e8a7c", "10000000000000000000000000"], + ["0x6bd39ecd7fb71d37866146618d781492e5568dd2", "10000000000000000000000000"], + ["0x04307c5c7878d8d3374a73a2d08f9a9b7dfc5cc6", "10000000000000000000000000"], + ["0x0c60ec8c9f4aecc22c838a5c35137465660cea55", "10000000000000000000000000"], + ["0x589444ad1b6b6cfff04ae5a7bed9b5b00ec09c3a", "10000000000000000000000000"], + ["0x57f1dd3e391b25011faf40dde74c54c7098cc5ff", "10000000000000000000000000"], + ["0xc04c10834f669237282dce7ee4c3e4ac9ed490c6", "10000000000000000000000000"], + ["0x152254c00a481e75b392db07538a8a35aa83b971", "10000000000000000000000000"], + ["0x3092c89b545e38b47d36ff7bd298ebae735ed637", "10000000000000000000000000"], + ["0x839b3b71448af0a5d3c28e154f265e7045528132", "10000000000000000000000000"], + ["0x7310e939c0a814f15065ce27afa8d493e30c899b", "10000000000000000000000000"], + ["0xc6036c93d956c4ac1b84bf4984f2eb4730731f7c", "10000000000000000000000000"], + ["0x30fda24649eb8346d933837a9d4c1c9d76852d01", "10000000000000000000000000"], + ["0x7b2af7a96ae32d71eec4d58708c046c588136683", "10000000000000000000000000"], + ["0x5159d30a3f42b65ac459618b2aebfe757a81736a", "10000000000000000000000000"], + ["0x33708692c5b03b031efd133f71e9c310ff2ad0b9", "10000000000000000000000000"], + ["0x03783617290732be0c02166a4a5641f59bce8be3", "10000000000000000000000000"], + ["0xc87d678c7fefa7c4eb3ce069cc89bb87d0831c8e", "10000000000000000000000000"], + ["0x98bc894eaf9af129dcfd53eb8b6c1af3d860ec7f", "10000000000000000000000000"], + ["0x868e486f3a00cf0ae17b1c55032e80504c67d708", "10000000000000000000000000"], + ["0x78101af8fe6f833ac524852def611ab369adfa73", "10000000000000000000000000"], + ["0xb6b6362fe7f912d557afe0e8b4f68068d4018731", "10000000000000000000000000"], + ["0x69a9e74a795173e2bbb8c70113048edb234bbc40", "10000000000000000000000000"], + ["0x08b3f7dd2e443fb03487538f8f31e6411b589d09", "10000000000000000000000000"], + ["0x13e42ee586d7277b3ffe0ac42d1bf1ecb3632b34", "10000000000000000000000000"], + ["0x2bd6453653efb934a642a383fe8ace4d3e3a4a79", "10000000000000000000000000"], + ["0x5abb2333de084ab4eb31f48341b1ef8d115a329b", "10000000000000000000000000"], + ["0x20c75587792bd5bfbe96abb680e9faea5b3edd9f", "10000000000000000000000000"], + ["0xca1e9f0ef2f5cc54d3fa14d3bfde1675a168bad5", "10000000000000000000000000"], + ["0xcc03e33fc298f2d627c62ac42cca953a4e01bd4c", "10000000000000000000000000"], + ["0xc725c9c374006989c5878c80989d70b6bd275c0e", "10000000000000000000000000"], + ["0x90a92d256a27b67b4c4f3c5382e2fe826ce8fbe9", "10000000000000000000000000"], + ["0x22f278deba92ce1861d1b6f4f0cab72ebd745662", "10000000000000000000000000"], + ["0x54ee4d0f0b7037ba0a2705a97cbdd5487bfebd22", "10000000000000000000000000"], + ["0x5e35fd90ae2978334b6672536e751f30aff2f4d9", "10000000000000000000000000"], + ["0xc46828ae2e8229efb80ea6c832dd598d26d7d968", "10000000000000000000000000"], + ["0xa6355adb4e10156bcde1c2d57684d42628d8fdda", "10000000000000000000000000"], + ["0xbedbb0cb2938f906a847203c2641c1403b75b9e8", "10000000000000000000000000"], + ["0x56da79d3a5c205c6fc87ad269b702c59ff1c76af", "10000000000000000000000000"], + ["0x42e53bb7698b0ebca963abf668c6b441ed0c57e2", "10000000000000000000000000"], + ["0xc7e070b317588e04ad189144668da4e7160f0b2a", "10000000000000000000000000"], + ["0xf05b881e060a0eeed476945e7aa475b5f195f488", "10000000000000000000000000"], + ["0x6b5b79aed614d65eb253ecc2bd312bb24c7ccc68", "10000000000000000000000000"], + ["0x93dc859e6ab49134a0763b9594384e211ffe987e", "10000000000000000000000000"], + ["0xcc531ee4b12c23b654a0fa4b99420d6e964f016c", "10000000000000000000000000"], + ["0xbd9205acb643095de74002d1b14ca7e5e7b56bd2", "10000000000000000000000000"], + ["0xa79aa90437290d45d0fa653b6502bb905a1f62b3", "10000000000000000000000000"], + ["0xd89869a28d7da90d1c8416d172ab6566f7e4d5dc", "10000000000000000000000000"], + ["0xf5b2e66c3569932fd42c38d0d91bdb97612c347a", "10000000000000000000000000"], + ["0xb20a18cb4b22759eec8dce76736a0c2fefbc09dc", "10000000000000000000000000"], + ["0x97546af83caef687a36539c839dff70608970db9", "10000000000000000000000000"], + ["0xc40fc1c553737b2aa8572fdb036986510219f233", "10000000000000000000000000"], + ["0xf3f6a7b59414338f072e2aa3beaa76ab6991b8d9", "10000000000000000000000000"], + ["0x4cfee29694aacf4648b30d7a4816234c0b88602c", "10000000000000000000000000"], + ["0xadf6bc0ea95fcd2114404fd7e23ae541f9e2f7f0", "10000000000000000000000000"], + ["0x0d889d4f642ec877407fc0d32b8620b92981738e", "10000000000000000000000000"], + ["0x81ed41dea967a8d5c8272b4f41eeb20952a18771", "10000000000000000000000000"], + ["0x3e2a56e784e654781bad62c9ea8a9bcb60403b93", "10000000000000000000000000"], + ["0x5a39b59a1361a8cbb5e6d7208adbb0b076a5a218", "10000000000000000000000000"], + ["0x2b025b429dfdc92e513e4ab5cfccc23a3d804f3e", "10000000000000000000000000"], + ["0x18017c2790b6e24e6de3109e87b8077504ce83e1", "10000000000000000000000000"], + ["0xf431834917c01f82ee5aca04c41b845b79aef6da", "10000000000000000000000000"], + ["0xaf0a6cff1f39efe7a364316aa4b586b5c15d749a", "10000000000000000000000000"], + ["0x0e9dbfa14f88c866f3a7ef8f5534090e11eaddcb", "10000000000000000000000000"], + ["0x11223fd41ec1003408855cf97d4ec7faf9d7e719", "10000000000000000000000000"], + ["0x7f98bd1dc02b5421336fdff34b0ad3fdcfd33950", "10000000000000000000000000"], + ["0x6e908eda91209f91df15e045f4eeb04276fda62c", "10000000000000000000000000"], + ["0xb140a7d96974166fa1f10b98c604c1be6c1488cf", "10000000000000000000000000"], + ["0x16385c9b02dcddc25816634c82e6a249b21723fc", "10000000000000000000000000"], + ["0xf7a4c6dc2fa63b3d3e227a5fd29ef9087b824290", "10000000000000000000000000"], + ["0x5ddcd7c84f101d7aabb2bfa73184316394bd662c", "10000000000000000000000000"], + ["0xbb681e2efda1fe3cbf8222579507f296e9493f0c", "10000000000000000000000000"], + ["0x3c13912c7fcca5d247f1b72a00fa9c6fc6c8b38e", "10000000000000000000000000"], + ["0xaa1ca78662fddd0f399a7526fd5eae5903097858", "10000000000000000000000000"], + ["0xfc67581e8c5f8be15459274e5cab03501adcef94", "10000000000000000000000000"], + ["0x9beda91892c5c7c9debd4f33d6170b71ff34b7e9", "10000000000000000000000000"], + ["0x28a13140fd796a0cd5a79bb464841e6c3ad7b2cc", "10000000000000000000000000"], + ["0x917527ee6a9624cafcc0ffce2db566d465e36fb1", "10000000000000000000000000"], + ["0x3dde282df518df4edbba9d9a55a5ab4383c216e9", "10000000000000000000000000"], + ["0x3bb5401d7266dfffafeaa041b7c2df13fe4e1d8b", "10000000000000000000000000"], + ["0x7bd2e4d34e07749e33833046539b662d0258da93", "10000000000000000000000000"], + ["0x649be78b71f1cf10ce4af486af8bda1737ad54c1", "10000000000000000000000000"], + ["0x7f2ab459a66e3d043a2f1380e0056f2734b714b4", "10000000000000000000000000"], + ["0x6c60b3fd031eca32ecfbb98ed9d64bbf74a0a4b3", "10000000000000000000000000"], + ["0xf60f587d07e52ba306a9c4a75d35a752bfa3a922", "10000000000000000000000000"], + ["0x7e1269f51541a46b30ac02905ee8d453ec96485e", "10000000000000000000000000"], + ["0x5ef0ccd9e730d832e01aa859894cf8feef148cf5", "10000000000000000000000000"], + ["0x1bc09946b7c42a61617f64c2e1e0dc7ed9cf6167", "10000000000000000000000000"], + ["0xccb3d8e0efb5f9688f8cff5505a34aba21fdc233", "10000000000000000000000000"], + ["0x2e516e5b2919b866f88f62884a5262e034c48201", "10000000000000000000000000"], + ["0x37050a10fcd3b1c485c33f5d4aef3d0e33750792", "10000000000000000000000000"], + ["0x53672f9be477d5829fcdde348f35caf15b2e3255", "10000000000000000000000000"], + ["0xb1d308241b2627bc1f575ddc3b381e98d8a69e5f", "10000000000000000000000000"], + ["0xf10aefcf3e275977e2fb00051893532cfa35c33b", "10000000000000000000000000"], + ["0xd80e214d86399d966b5d0a0f647e48eb8e73a24b", "10000000000000000000000000"], + ["0xd3811712e3fa3e03388868a62b1067513741c4d5", "10000000000000000000000000"], + ["0x3ae86cfa52b197ce73468a5e5861fe77ff1a6d19", "10000000000000000000000000"], + ["0x4995c93767eeb943a0707efc6a6b3bddbbe6622f", "10000000000000000000000000"], + ["0x8322f06cf86436714f1cc322c652f526db6b400f", "10000000000000000000000000"], + ["0x6ff58125397af2f78127178d8e9d0514e9529086", "10000000000000000000000000"], + ["0xc0cb43a119c1c6a9ea50399161ff1b620c6bc1ed", "10000000000000000000000000"], + ["0x5330170b9cdceb4694f7278f6418346b21832474", "10000000000000000000000000"], + ["0xdea3e18aa866f46da789f0b908e90bf55a0dca90", "10000000000000000000000000"], + ["0x223a35433f3f87ef302fdfccd77777dd0cd51f80", "10000000000000000000000000"], + ["0x2281db2f9c78f6a0afc70e2dbbec2472b24a2bd0", "10000000000000000000000000"], + ["0x590b01699be980e92b38326904f19b19214cbfd5", "10000000000000000000000000"], + ["0x11db895a439d0dd024270a32b1113979f72a3b26", "10000000000000000000000000"], + ["0x88c66d3d576ba03b7561c6330c07e49f2cf8a412", "10000000000000000000000000"], + ["0x3ee20f990c3bb65ac6a3adb57b4ff66f592dc2a4", "10000000000000000000000000"], + ["0x557fef30faeb0acd5e7c733704e56a7107879d4c", "10000000000000000000000000"], + ["0xc537fee3bcdab2a6ba3ae0a4856e41d196709bfb", "10000000000000000000000000"], + ["0x79f7b7c0270a519c7bc46091b3038f36c78549e5", "10000000000000000000000000"], + ["0x5088439f51728d47b603ef557cdf739e17a28922", "10000000000000000000000000"], + ["0xa10671808455d6f8cb663459c9f334a873f4c81f", "10000000000000000000000000"], + ["0xbdf2c86f988f4b1b367e4b2e7dc8da5f99f2593a", "10000000000000000000000000"], + ["0xb3d69de03151c786d05a6c470dcc8d7f1f109c8d", "10000000000000000000000000"], + ["0x961dfb44c895a2b94f96c1d1513e7bcd75a5e454", "10000000000000000000000000"], + ["0x43f824adfac29a2bd611545540965efc8ec2e4ac", "10000000000000000000000000"], + ["0x58e777e71cd05138b1216e26cf50a02546655ddb", "10000000000000000000000000"], + ["0x4ba2ed434abceab019415e7b4770beca368f8db5", "10000000000000000000000000"], + ["0x5b40794812deb51dd95aaadbafd1a33fe125757c", "10000000000000000000000000"], + ["0x6c358adb31f0110d2880c9351615c8627ac84177", "10000000000000000000000000"], + ["0xd03e1b93424a5bab90f2f88a75a0336b46b516e9", "10000000000000000000000000"], + ["0x720d330816afd75a72e012f8d669a19918483375", "10000000000000000000000000"], + ["0x5cf8a362e7b801d555d3155919dcbb6253d4d0fc", "10000000000000000000000000"], + ["0x82720619b4b6cf8a19c29888f9b081e2d8645867", "10000000000000000000000000"], + ["0x8c055e84ed56a1f87b5e901babd799b154cd5c78", "10000000000000000000000000"], + ["0xd73db7bef50aa4302f13c16b07ad0919b955dca2", "10000000000000000000000000"], + ["0xe809492c3e85cf52dcd4fb284cd0f2e629f3eba6", "10000000000000000000000000"], + ["0x39a38050190f980e1ed3e259084ff315e244f037", "10000000000000000000000000"], + ["0xd47bdd78c4eca4b5ac941a4b4cf62b34be730c42", "10000000000000000000000000"], + ["0x38c1649b72fd245e434b9db29f6148a90aa7ca12", "10000000000000000000000000"], + ["0x23f7c4667a0d1faa42105b991816fb84fa3037dc", "10000000000000000000000000"], + ["0x703960bd917478f9f41cca901f3da41bf96d31d6", "10000000000000000000000000"], + ["0x89a38dd6d08f3a87a31c292c51d0f18d2677c825", "10000000000000000000000000"], + ["0x79dfdfa0c384b0fbf49854eb491a9fa7d197f93e", "10000000000000000000000000"], + ["0x699d021dc88fa7a071bebdb93e9f905bc983de9e", "10000000000000000000000000"], + ["0x8cc848d8d1eb77fc1518a91111c428c28035e0fa", "10000000000000000000000000"], + ["0xf8b317264429a80a7246ac9b5e2326e7bde760ae", "10000000000000000000000000"], + ["0xfa38df65face3ffba188f0bd2814c2266c3c23d5", "10000000000000000000000000"], + ["0x86542a9ebbfe8447ba02e28c5f31f04c7340a1ff", "10000000000000000000000000"], + ["0xc10a4691f0c675d026a8191d70c231b78f65d969", "10000000000000000000000000"], + ["0xe4aeddfc1adb70c0c639592c9c423b27a38f2ab7", "10000000000000000000000000"], + ["0xaaf323c9fea7e6d81ce36d7ad40e67d3599069c4", "10000000000000000000000000"], + ["0x6e6f1bdf898eebc6a95c9a82350f609327d8eb9c", "10000000000000000000000000"], + ["0xe95dc5d3fa1b75ab6ce0a8775eaa1735bbbbf382", "10000000000000000000000000"], + ["0x9f404425f7cd1559076663faa284659ed6ff7c91", "10000000000000000000000000"], + ["0xa90800d5ab123cbd3ec96b89178b3955bdcca2dc", "10000000000000000000000000"], + ["0xc87f715096e770422e4f19c4b49a158eafbbe90d", "10000000000000000000000000"], + ["0x3bc1b9ce24f0fa636a8ed446a0172c15fda230d0", "10000000000000000000000000"], + ["0x4c3e5d6c762c3ff116b07cfb5f488b43ef4e4d45", "10000000000000000000000000"], + ["0x9a188cc4fc5e7d6b1ffc2e0d185d59195fd160e4", "10000000000000000000000000"], + ["0x2e32c7815a96dc1a2a1787f9013b0169a242d714", "10000000000000000000000000"], + ["0xa095ddff8597e1ff75e43fd95fe37e36aec4c689", "10000000000000000000000000"], + ["0x326ea036c2bf0021f3909ab08cf8c230c7bfc4d5", "10000000000000000000000000"], + ["0xebf78b93e96aefe3c2c9bc8568513f8288436a4a", "10000000000000000000000000"], + ["0x981b175c75ff25016b987d96ec15a13ab1237e96", "10000000000000000000000000"], + ["0xa2f696958a5e023014620687f1d34755c707e5d1", "10000000000000000000000000"], + ["0x47064935e90c060ffdad7a748c37e62c4f03b8cc", "10000000000000000000000000"], + ["0x9531647f5ffaf86ccc95307a2841d44864f50d2f", "10000000000000000000000000"], + ["0x62c323e6a3e702706e889a58974f2f84ccc53f7d", "10000000000000000000000000"], + ["0x25d0cff8c47f33b32192b3ea9824ac1bc550bd43", "10000000000000000000000000"], + ["0x573267a8c5d5b3965fa778fa4de1b5f676073f92", "10000000000000000000000000"], + ["0xf6c23bffe946dbaa9ae6964b298cb058f3ef6635", "10000000000000000000000000"], + ["0x15fda64fcdbca27a60aa8c6ca882aa3e1de4ea41", "10000000000000000000000000"], + ["0x04158ab32847369010045e922e8d24c03d6aa7f5", "10000000000000000000000000"], + ["0x8b46924a0d6d610a46caf0a5d13dabdd25b68645", "10000000000000000000000000"], + ["0x73c27b2542a3e7481b796a47c95759b4216a4bd2", "10000000000000000000000000"], + ["0xa0f0ab619aec09ed753748adc8c258f2c89285e3", "10000000000000000000000000"], + ["0xf26db1ab6a6b3e6544cef663f8a8b7496844d410", "10000000000000000000000000"], + ["0xe4ad4e411c64e94e327d66d1a6515c4988186451", "10000000000000000000000000"], + ["0x10370734e1791ce74456dedda3b724a44f664eea", "10000000000000000000000000"], + ["0xb19eb4d14fd9cec25c5a99220a5bcbd4ffbdf948", "10000000000000000000000000"], + ["0xd76be4ab3b5a12a604ca81cc34b8a83e9331156d", "10000000000000000000000000"], + ["0x8a4b25ac9651992c73aae3e51f3923d806feeffe", "10000000000000000000000000"], + ["0xad0de39a552a8e05139c7d806a977231bd23a2d4", "10000000000000000000000000"], + ["0x38d73354ac5c5d6f8db3e36285f1a2f5784d1372", "10000000000000000000000000"], + ["0xcd09ff5da28fee209f92fcd58fbd87a9bf6d196c", "10000000000000000000000000"], + ["0x93f5af632ce523286e033f0510e9b3c9710f4489", "10000000000000000000000000"], + ["0xbaf658faa46bc1e4985cf5d0a2ba21a511f5db5c", "10000000000000000000000000"], + ["0x2b06ae2df3f81fe505a142f05af98525bf51a1b8", "10000000000000000000000000"], + ["0xf5859a2f9e22e67c1e4fb1d2e538a586b1dfe454", "10000000000000000000000000"], + ["0x6f9ca333b957bc02217ea9ecfa5ba674c09c7431", "10000000000000000000000000"], + ["0xcd3550bf2ca177ff4cf5b2452e6e908564c21ed6", "10000000000000000000000000"], + ["0x838eeb65281e211eb8ebddd29270947f95444808", "10000000000000000000000000"], + ["0x0a6e37ceea837299f160b63ccb71a0a1587e3c47", "10000000000000000000000000"], + ["0x76a746079946279aaf1c7fd9a94ca7fd48c555b7", "10000000000000000000000000"], + ["0x330ae361002ec0cc7b68dbc5ec57073d52e8cfd1", "10000000000000000000000000"], + ["0x8821b354c6e7bdc13a1155b8815d696675f2ca0d", "10000000000000000000000000"], + ["0x5c0dc504be827714b81ce99ed287a0428eb397a6", "10000000000000000000000000"], + ["0x8c2365fe0b0a9aa879b4114eb2b9b6565e431153", "10000000000000000000000000"], + ["0x56633bbb3c6572f8013a1174219812532d6cecbd", "10000000000000000000000000"], + ["0xf0ea58b65c82c48ce69f0abd68d178e7764c4ba2", "10000000000000000000000000"], + ["0xef0505cf1ec565f3bae09a1e982dda7d9876c07e", "10000000000000000000000000"], + ["0x346d2b27737d0fb24a5dc9c3cda345da8b727446", "10000000000000000000000000"], + ["0x141fae74850982116eb69534060277640db3eeb7", "10000000000000000000000000"], + ["0x6f3169d904fc580b24e5f541758834b07aab63eb", "10000000000000000000000000"], + ["0xc8a51f193c35edc394616ca00a782377017ab675", "10000000000000000000000000"], + ["0x6713db93c0a7580fe0e81dfb1b6d121030120b33", "10000000000000000000000000"], + ["0x006cbf936f193ce6359256c6a5380f8f49d5066a", "10000000000000000000000000"], + ["0x4cdf78724f6f80670bebcd03a69fab9a6778556c", "10000000000000000000000000"], + ["0xac841f0da675dbdc6e988f4fe78208a68315c3b7", "10000000000000000000000000"], + ["0xb4027525352031ac6eaf4d78d88605d344073985", "10000000000000000000000000"], + ["0x6e5b935ac926e11dec812eb0a5425ec5e4c96355", "10000000000000000000000000"], + ["0x9acd3e502dc33ddf6675b40783ff05d89b1e2f25", "10000000000000000000000000"], + ["0xbb9727a4f0133577d1893268725474dd00beb8ce", "10000000000000000000000000"], + ["0x5463fc9c971189816d71891315dc7c60782b28bf", "10000000000000000000000000"], + ["0xc6676c09fb04ae2a7039cb35dd58094ce3b2753b", "10000000000000000000000000"], + ["0x85d535d22249f02ebd3e30fe314c4aa2a7fbf363", "10000000000000000000000000"], + ["0x2285b2ef91844e8443ceec8aa8a32524b5a65389", "10000000000000000000000000"], + ["0x43f0f04b4740c49331c4cffc8392def59572aef7", "10000000000000000000000000"], + ["0x7cc1c8e53063623708e9c67affd463e9c55e5a98", "10000000000000000000000000"], + ["0x1543a0b0a7000426afd8caed7dfed9ce5477d418", "10000000000000000000000000"], + ["0x434d871309194367082397ad72f2682195090bba", "10000000000000000000000000"], + ["0x003155a1565b4233a5027f43062c2395eb114073", "10000000000000000000000000"], + ["0x207659e7014a0823021c101d80b029c234588e84", "10000000000000000000000000"], + ["0x561c7f1fd5c2e369ce5922945985181c7aa411d3", "10000000000000000000000000"], + ["0x4f2cb8a64665abae49b9ac7e9962230d29aefe3c", "10000000000000000000000000"], + ["0xc7c1de06b394f956a2cf9d1e34360772eedede87", "10000000000000000000000000"], + ["0xaa62d6dc492e917ee9fa3ba971cbf82480b6c77e", "10000000000000000000000000"], + ["0x0482e93db464af4c9d1346a097b6a048aeca38fa", "10000000000000000000000000"], + ["0x522bd2c3ca9c6a697083c4e62d8e883a1b519176", "10000000000000000000000000"], + ["0x2c28ce41d2df4b64a9c6509a4dcf5a3ff04952f8", "10000000000000000000000000"], + ["0x0d4ddea3849c54e16c85cb4354943dc876e05552", "10000000000000000000000000"], + ["0x8046bc2af3556c8657995d5c268195286925c67c", "10000000000000000000000000"], + ["0x4d23a692c2d37285fa6beb9637caac449891718f", "10000000000000000000000000"], + ["0x1d29298b4de8f7a56e85a7d7c08fd5d78c391cc7", "10000000000000000000000000"], + ["0xca002ca0ce3b4d0568f450dc9ef0c3637e6a13a0", "10000000000000000000000000"], + ["0x4fcec7642200dabaab8c303c6d4efac4decc8859", "10000000000000000000000000"], + ["0xf39b74d3f90a032d0ea671868783be073fd51161", "10000000000000000000000000"], + ["0xe5c67c31c22ac9d1c4a11f687ed2185f12fbbb5b", "10000000000000000000000000"], + ["0x7ec228399810f6960fa04ae2818a835d79d3f8bd", "10000000000000000000000000"], + ["0x15a0e86ec1a099dfe20a2d9e2e9deebc9a90986f", "10000000000000000000000000"], + ["0xbaf3299a7d05f339193e61239525cbcae444fa68", "10000000000000000000000000"], + ["0x0f038a4a26ca3cb90dbec66d772853af3fcdf733", "10000000000000000000000000"], + ["0x2db78ad46c3684fec3058af917228c5b6e4a2a61", "10000000000000000000000000"], + ["0x9588d1ad3d3f5757d90f9a7b791ad6edc48862a7", "10000000000000000000000000"], + ["0x7e243c07afceafe22c05ff1415db8effad5fc100", "10000000000000000000000000"], + ["0x3bcf25e8da05c55e236d6caa0ddc7d17482ab178", "10000000000000000000000000"], + ["0x2e465ddca6d2c6c81ce6f260ab13148d43e93371", "10000000000000000000000000"], + ["0xd7d59e74f960824336b1925c1bb2f2b6040a6b3c", "10000000000000000000000000"], + ["0xd7eb0bdbec9f3ef66472e0933310a212781977ec", "10000000000000000000000000"], + ["0x52831fc8d8344000f92734db70cd4a01a1383eaf", "10000000000000000000000000"], + ["0x91911e488791fb4629edd8d1a5b4a685d44ce46a", "10000000000000000000000000"], + ["0x700965eb67dc62d2a3eafce9ede4b2ec15217874", "10000000000000000000000000"], + ["0xd1fa45d2f1b2ce7de6fd4f4b5898adce9c95734b", "10000000000000000000000000"], + ["0x85aca057c1b5a8b31ab251162b43f8438746844e", "10000000000000000000000000"], + ["0x35c81e79e1c49718db71b95179600e8c2472571d", "10000000000000000000000000"], + ["0xed2d0e6b843188c87cd75217e6a343d30d49f107", "10000000000000000000000000"], + ["0x2748cbe2f1440b3557f20eef103b59098c29582f", "10000000000000000000000000"], + ["0xa0cd7cab17c5fc68b86b19bbf4f8f46ff24dd6b3", "10000000000000000000000000"], + ["0x4d82322f62a0186dcfd16051b42e8ba019e6daea", "10000000000000000000000000"], + ["0x23408fa8f9acbd66ab4f9b2dcbb9e85ebe989993", "10000000000000000000000000"], + ["0x5370e4db012e3492508ea2eb6f93985ed44fc61a", "10000000000000000000000000"], + ["0x2197606e51dd4b6aac8317533dab492aa53edad3", "10000000000000000000000000"], + ["0xcb1703717e125d4db28f6e95afec2d8d3c2d9ff2", "10000000000000000000000000"], + ["0x31110fadb4401fad566606905c03d9daf3c87ce2", "10000000000000000000000000"], + ["0xbcf840e1e4ca28e7a50982d2c60b9acaa158d0a0", "10000000000000000000000000"], + ["0x98b45938641f2bbd0a1f5c946840fb73d45fda6f", "10000000000000000000000000"], + ["0xfae2169ebe7d52bdaa4bc91c59a6f53f17a00d9d", "10000000000000000000000000"], + ["0x100e45613e1ea5c16b2b2338e2f1bad3785068f6", "10000000000000000000000000"], + ["0x1eceda8cae8cd1d2c26ff4a09db5f16d9213a891", "10000000000000000000000000"], + ["0x2da668c1b6d281181cc717306fcc7c9c463fa17f", "10000000000000000000000000"], + ["0xba14977adcfc73f1552c5c510b9bff83d95f346b", "10000000000000000000000000"], + ["0xb5758b77607d8af9d7e83282186209d5258e52fc", "10000000000000000000000000"], + ["0x5815b5e4f0945370d305310d0faae21ba0e118a8", "10000000000000000000000000"], + ["0x0e2c7260327e3609d65690779ad077b9b967612a", "10000000000000000000000000"], + ["0x9da13a3a1fe5c7dae732bf3a75635c5e7f4f2070", "10000000000000000000000000"], + ["0xe4637ed4e4e07a31657b9b9c8cb97950be499ae4", "10000000000000000000000000"], + ["0x032578c5c63820f91024523df6e0ebc13edcbca2", "10000000000000000000000000"], + ["0x5bcdf5d8870cc21c8d33259c252cab428f74e8fb", "10000000000000000000000000"], + ["0x952e430c56301eb302e25b6073b042dea5bc32b0", "10000000000000000000000000"], + ["0x08508310276b879190a6f787c404ce8eef8d5432", "10000000000000000000000000"], + ["0xaf98b60342e94244e0732a0bd04b4fba06c30854", "10000000000000000000000000"], + ["0xaf114921e8d91c1bb01b5f416e12a552d7473602", "10000000000000000000000000"], + ["0xc4d9019fcc3b2ce94c6c3a8cec495e904bd81576", "10000000000000000000000000"], + ["0x544fe5703ef129a3a72fffe44e49ee8d333a2a38", "10000000000000000000000000"], + ["0x0042614e5deea4709fac6584d1560e3222daf963", "10000000000000000000000000"], + ["0xf8cf675d7b41c7e039ed0602325099443ed701f6", "10000000000000000000000000"], + ["0x38a21985b77f1658bed383ebae079bec6c5f3a07", "10000000000000000000000000"], + ["0x55e4536c228323fe22837b0821a26dc35e3d77a9", "10000000000000000000000000"], + ["0x7f1b27c621fe7e2a02a55c65a14e696c437b4470", "10000000000000000000000000"], + ["0x4d0665a2829db89e8cb5f2f50fb12d0459f0a125", "10000000000000000000000000"], + ["0x3d258c7e14957fa02a001ee4177d3af2d52b1d53", "10000000000000000000000000"], + ["0xd506b99e2c57beec32678ad7d5b838ae703ead57", "10000000000000000000000000"], + ["0xb7facb4f9aab1507a8512eea3393dce126445939", "10000000000000000000000000"], + ["0xfad857ea48dfab915ac34ee3a1a73195bf21a222", "10000000000000000000000000"], + ["0xd33efc182c87de58d5bf8d38bce446ba2bf138b3", "10000000000000000000000000"], + ["0x002011d68c8c3747ec2e90d39f61abb84609a6aa", "10000000000000000000000000"], + ["0x36bc8c1e846556b8f29191f5d68941d37e62754c", "10000000000000000000000000"], + ["0x7d2e02a9faef2a4a1b5dfe83a530d3571979d240", "10000000000000000000000000"], + ["0x0c81bdb2e8aab74423d6a1da2d1d3961b465c579", "10000000000000000000000000"], + ["0xeea7a36d41d739ab8c3fe94309f677e87a4146d0", "10000000000000000000000000"], + ["0x8424860cb889f787024ac78bf0667d55ea4afb1e", "10000000000000000000000000"], + ["0x10367c5335f5a1567598fd4ac3838943e0b8774b", "10000000000000000000000000"], + ["0x91a34c4b48510fc1262e092c044cbe1220a7099b", "10000000000000000000000000"], + ["0x9b362014da9e2d24e7d744de791faa00e6a8f9a1", "10000000000000000000000000"], + ["0x3c8bd33e51cd82abb6e9c59ef7b9a6d61682e690", "10000000000000000000000000"], + ["0x0820ca934e4ead413f5181fed24a57382f37d915", "10000000000000000000000000"], + ["0xe78b5888142a873d075e2cdf5293402b117090a8", "10000000000000000000000000"], + ["0x7a4ba3489ca5b28f33800e1f95780686495c99cd", "10000000000000000000000000"], + ["0x40db8365d1252bcb06598927698238a99d39228e", "10000000000000000000000000"], + ["0x1ebc680bbf8ea1aceb9113389cf4ec839ff6b198", "10000000000000000000000000"], + ["0xce62ec58396d56c18e6ee35c885025539ff3ca0b", "10000000000000000000000000"], + ["0x0efa20d60fde441cbe6f245f2d2201e732820ab2", "10000000000000000000000000"], + ["0x8f4e6be0925af97e9412e78fd185b84e80575a88", "10000000000000000000000000"], + ["0x9b0fc8c04a0c872477c278ffdb6e9a0b3b4d7849", "10000000000000000000000000"], + ["0x5053a1354cb45eebdd2d8342ceee71d41efa75ca", "10000000000000000000000000"], + ["0xd6aabdb37616ec782844d4005207a7aab43a08ee", "10000000000000000000000000"], + ["0x34cab12b13fd5bb41567a73e04907b861a743198", "10000000000000000000000000"], + ["0x8d040102f998508a65c2e6f44ef035eafad2bfc5", "10000000000000000000000000"], + ["0x8f82c1e59fb6e7f49792b7b8e661b01b541bdbce", "10000000000000000000000000"], + ["0x30270a4e14002409a769548636fe1b73d1250788", "10000000000000000000000000"], + ["0xd9b4047ef0c3407e3a3ef3a22beb9f7993f1f346", "10000000000000000000000000"], + ["0x050bc4d2797d43ed0068fc9a60b83a064fd8a91c", "10000000000000000000000000"], + ["0xd895ffe25d7627fb29fc48df4af20bf377c57266", "10000000000000000000000000"], + ["0xca76c23278495e3a0bc534b074f0accc98b6a759", "10000000000000000000000000"], + ["0xd9ea22f48d8ada55048e8495e04862eb5b7d11a1", "10000000000000000000000000"], + ["0xf873ad9135088add364c7a96575482c53233d9b5", "10000000000000000000000000"], + ["0x99b0fc050b69b6638986328b5cad5f59e65aeed2", "10000000000000000000000000"], + ["0x608cf4dc98ac76eaf04d63e73f6524e9ce72d1b3", "10000000000000000000000000"], + ["0xd6f14a1cc837a728f22fd53adc3a3c1d20350326", "10000000000000000000000000"], + ["0xc30c8930a8fa7a5ecbb8df9d3a19febfbbcd897e", "10000000000000000000000000"], + ["0xd9b4342749b93504138eab8bac8e9279a0a3e91c", "10000000000000000000000000"], + ["0xc3903bb04ad89160891f5dce66a01a6535a24994", "10000000000000000000000000"], + ["0xb293641a9d1e5129c9a9d4f701b6c47f28a4f26f", "10000000000000000000000000"], + ["0x36774a983fc9e2e11a5a4a9b540297a846bb4a01", "10000000000000000000000000"], + ["0x8ab2ae2c445b8d88311979caa46bab47037dc9b5", "10000000000000000000000000"], + ["0x3aef750ad04585a023321d507c83c903fa121529", "10000000000000000000000000"], + ["0x2c826f6d49d58ebfc5e45906be9eae3fc7ca71dc", "10000000000000000000000000"], + ["0xaef76cd08844019385b3148799114bdc8cb75cb0", "10000000000000000000000000"], + ["0xbe2ef7d04af3e9851099a5d4c27ab42389e0425d", "10000000000000000000000000"], + ["0x632889c2536b12fa1cd80309144c73559d89d405", "10000000000000000000000000"], + ["0x5907f6596de3235d9a1ddcf4e23535257e88d592", "10000000000000000000000000"], + ["0xeb6b51d158a5fdf67ba74d66dfe44b396e4e227d", "10000000000000000000000000"], + ["0x70022ffe7f412cfc638725cd33b1a3a2aa5edd0f", "10000000000000000000000000"], + ["0x8c16c8fe98a50b515cf8268090bcb8886b241908", "10000000000000000000000000"], + ["0x992f8e145c5404e944aeb8f53660985daf9dc827", "10000000000000000000000000"], + ["0x3f5165d28fa84a8ad165b2897f9a9a6eb1de5bf8", "10000000000000000000000000"], + ["0x037a936c8af287798f6563df168a2d371bbfe635", "10000000000000000000000000"], + ["0x738b9aeea3d5e37f67ebe540b9d5a2ab2248634b", "10000000000000000000000000"], + ["0x3df551bb6b29eb05fc709a25f8f05e07119d99a9", "10000000000000000000000000"], + ["0xc4c0ed8bab66f995bd6a98e8b1261534ebcb5867", "10000000000000000000000000"], + ["0xc4784bb8ee943f408a876fac881ce4ef1100409a", "10000000000000000000000000"], + ["0xb88f002634cd733fa51eecf4905bcdd83c5b2adf", "10000000000000000000000000"], + ["0x194e9c9d49798596cc9bc76781f992fb83c232c6", "10000000000000000000000000"], + ["0x3a547d56ea5a9a316803f9c7c978837845625b38", "10000000000000000000000000"], + ["0x791bdf53cc4afefa841506035e474c3c1e7126dd", "10000000000000000000000000"], + ["0xb9461e4f092bad1d6bc3a549ad87ebf6ef7e4925", "10000000000000000000000000"], + ["0xbcc3cdc81b8243acf58cd96f43f99a3b9c393ea2", "10000000000000000000000000"], + ["0xfc7a28b3332801a8e5405e65b3be67c8680742e8", "10000000000000000000000000"], + ["0x0ce77f9ec6a65b0b3ef1756d633751ca182f4eaf", "10000000000000000000000000"], + ["0x2f14f93c092983cf96e17f5e8a4719ddae4c82dc", "10000000000000000000000000"], + ["0x1afde41a98a9960a5dc785090149bb1740c8478f", "10000000000000000000000000"], + ["0x102dbc29586f8e4b12b0e11c95176a32249cf80f", "10000000000000000000000000"], + ["0x20795012a635b8d0c4f2d9824f68419b36bb5564", "10000000000000000000000000"], + ["0x97b9a3cd5425974558a3b8a8315284f06d9451bb", "10000000000000000000000000"], + ["0xe12ebb51f6a712bc323f7fe1ed36c9cdacb47d15", "10000000000000000000000000"], + ["0x13b5ea12da65161e2289de15b2f9cd323f44db3e", "10000000000000000000000000"], + ["0x647c7da221168fe5086cf8556fbaf1343c77b657", "10000000000000000000000000"], + ["0xc5958a9c4f7169cc95969849a6065beadd5322d6", "10000000000000000000000000"], + ["0xf6d41073c8c5091bc8e62236d5c1ae13617af599", "10000000000000000000000000"], + ["0x89c7de79549fa5ef5785d7a7cbaff0c241bb0714", "10000000000000000000000000"], + ["0x2901131b2e1acfaf29b3363b72e523ab668511d5", "10000000000000000000000000"], + ["0xc676ead43c7f45d8d50e975acd3abaa8a2b1d3fe", "10000000000000000000000000"], + ["0xb2f5b7009a21a6af46582f31325ad9aaea0c0bd2", "10000000000000000000000000"], + ["0xdeb5e8abe33af81011431d0203cc180a6e78c2ad", "10000000000000000000000000"], + ["0x292d9fc110a111c5b431e9758d34964b61f1fd92", "10000000000000000000000000"], + ["0x3c2e4b3040d1aab686d34fe5f111530a21f8be74", "10000000000000000000000000"], + ["0x269e54cc50ed9502003d92664acf1f6cb91999c0", "10000000000000000000000000"], + ["0x4219ff8cf85ef15fb75c350a3e848b58832ae167", "10000000000000000000000000"], + ["0xf0e6829f09337cffd3275a098a572ca7cbe309fc", "10000000000000000000000000"], + ["0x88748a7dafce7d4783d060d1f497b586cfddab84", "10000000000000000000000000"], + ["0x0b43ff85c3cc38e1f08ae6235bdc6e4d645dcf29", "10000000000000000000000000"], + ["0x4d3ca31daa91366c6ada0223c002c0d927878445", "10000000000000000000000000"], + ["0x0136c6fe0796a373e9ac5bbac2576e94ba0b81ba", "10000000000000000000000000"], + ["0xfea76ea25c285587ce75c86d46558606cc382f35", "10000000000000000000000000"], + ["0x06f5d2a078e42e33718d5f0bdd55c76f17bd67fc", "10000000000000000000000000"], + ["0x3a0c3ad39673cce83bf9735fbe3b4889e832326e", "10000000000000000000000000"], + ["0x0c16d08cdd114f9830d3cbb1045df4e8da6bae8c", "10000000000000000000000000"], + ["0x0f430a50595ba595a82836695f2ef60a24ae327a", "10000000000000000000000000"], + ["0xa5e8c5b3add6c49265ac558dbe756952ee7ec439", "10000000000000000000000000"], + ["0x46d0bcf7f8ef33d12948deb4f8583191a0103e60", "10000000000000000000000000"], + ["0xba516997513bf9046d7fa4cc1442144d4fcc3bdf", "10000000000000000000000000"], + ["0xd0de011f8e252c71b6d4d60b7a6dcd7940d9470b", "10000000000000000000000000"], + ["0x15cc94ab6414cafa6b0f37c365421708b8bdf017", "10000000000000000000000000"], + ["0x5ec1dab31f07762aefe439aee7e12f061c325b2a", "10000000000000000000000000"], + ["0x7ece5fc7290e8df49f8f1ca2f838dc1c8b0712f1", "10000000000000000000000000"], + ["0x670b60b8d9f47ad4b325a69527c4f876e7b498e1", "10000000000000000000000000"], + ["0x88434368aa860a58879e7afa4fe19801fe833eb9", "10000000000000000000000000"], + ["0x7bd74690dd2dba6e408825e3938697a311cebb2c", "10000000000000000000000000"], + ["0xf6bb44ad0878049eda05e168f670560f182a689c", "10000000000000000000000000"], + ["0x30367d0323be56e9bf2c19231f9ada204a47ff7a", "10000000000000000000000000"], + ["0x48926666d0a6e3919507c1828b5b30229bfeafc6", "10000000000000000000000000"], + ["0xa5f0c698ca7858b7cee31613ff2c133e6e968485", "10000000000000000000000000"], + ["0x6d5bec7a483962bed9eb4014d415abdc52bed240", "10000000000000000000000000"], + ["0x5e8ed66f58c41657b05545e6a32ab4d32024372c", "10000000000000000000000000"], + ["0x67851af7920206006ae0eef3bbb445c91c39938c", "10000000000000000000000000"], + ["0xbcc22f7d6a49df2b081df31924a668959adea52e", "10000000000000000000000000"], + ["0x8552af06727a69240a6ff9764d84a1fd9f240ec8", "10000000000000000000000000"], + ["0x8e677d99c9c679af13820748efbafc3c42e31f2e", "10000000000000000000000000"], + ["0xbac42c9b32e574f41b86e20fba0cf479a5a1ca58", "10000000000000000000000000"], + ["0xfe6acc4399146045a2c9c5459fd49954897114f4", "10000000000000000000000000"], + ["0xb9c9c621eff2f103600615fb9bedb3e00c7be1aa", "10000000000000000000000000"], + ["0x0ac0240f4656dc80684d0df1208bb91c0220725d", "10000000000000000000000000"], + ["0x7a170000240e38137e5f34f429af03b2b71c98f7", "10000000000000000000000000"], + ["0x42b86a1f912d8aa0174cd46f63ebbc846421a500", "10000000000000000000000000"], + ["0x20ccc519e34462a0744d1b064611e9982f6b6fe6", "10000000000000000000000000"], + ["0x5b19d76e11dc68064777b12ff57a223dcd8f929f", "10000000000000000000000000"], + ["0x0205b7d3566b036a8f1d0dd4ee726c22eee16bd1", "10000000000000000000000000"], + ["0x7e9206591571b2166cd42baa92f2e69f683a979d", "10000000000000000000000000"], + ["0xc0e745a82eeadee784e7ba56fad17e7b5adcb76b", "10000000000000000000000000"], + ["0xb53f0a18bcc0eea66d5ee75e0ab949ef4d8a132e", "10000000000000000000000000"], + ["0x836b748c46024b464898d7a2da6d8ecabf1c812d", "10000000000000000000000000"], + ["0xee848eaed71719b93482a4f998aa78cff8b132cd", "10000000000000000000000000"], + ["0x1fd18f2f75cae7caff305391be2f18432ba562e9", "10000000000000000000000000"], + ["0xc13cce21ab71432ffefa56758794586615a38d17", "10000000000000000000000000"], + ["0x24a5040f0190d86841c4ea6f5a6de8ced5f0b334", "10000000000000000000000000"], + ["0x644aaa204d299941c58f757774e2c2bd522cda98", "10000000000000000000000000"], + ["0xb5a8f3381408cecfcf602301c78ceed92d23ff23", "10000000000000000000000000"], + ["0x0621c518df390245282e945400a84f48e2dbd215", "10000000000000000000000000"], + ["0xdcd134aec7a9bdd1a051d17b2e29454dcd375b56", "10000000000000000000000000"], + ["0x914c5633990af2e1636377bf4c7e6e059ea1e436", "10000000000000000000000000"], + ["0xf7ab5f9db3b621877c123d4f7f9ec61997cca0a4", "10000000000000000000000000"], + ["0x1f834184b11a4adadc4e8c9b408168b95d50dd10", "10000000000000000000000000"], + ["0x649427f141e8f9dbe9be80983b4ba71dc3bebe8b", "10000000000000000000000000"], + ["0x68aee219d75fda4e508f70454628acb9bdf413f1", "10000000000000000000000000"], + ["0x94e08736426948c5f463ac243416f0473f680b2b", "10000000000000000000000000"], + ["0x49248e9dc8a4ae03789ed9c54cd0e0c1ab0a5d0d", "10000000000000000000000000"], + ["0xb32a672d21b1b8c033d0a195aca2eec16117ba7b", "10000000000000000000000000"], + ["0x503c4ab4899be94dbe935f3c40bd63ba37ea59b4", "10000000000000000000000000"], + ["0xfa019bc786013802890118a76a6f97c70edbc418", "10000000000000000000000000"], + ["0x291f728ba2800d9cf0bb8af7f1ce33d0e78f313f", "10000000000000000000000000"], + ["0x701a24d812e4d9827ec8dd2b3eed726ffd9b4065", "10000000000000000000000000"], + ["0x7d1e9050f02044cbf200bc2b75d443d8e464a0d9", "10000000000000000000000000"], + ["0xce18b30c8e4d287f5ec429f053b8274cfd2aabb4", "10000000000000000000000000"], + ["0xe3f4e9fc5ece5e42366dbe7c7d0f50ce348986d8", "10000000000000000000000000"], + ["0x4b36c4b9c7c92e2a643cc42f0d9859519d5591dc", "10000000000000000000000000"], + ["0x581f967fabe549fb85ee7a851a432ee27eb2861c", "10000000000000000000000000"], + ["0xcb824df92feedb354c0d1cb5097e8bf2ca478290", "10000000000000000000000000"], + ["0x2cc7bfe4e11687d0f5c28cbaa48073458dddefa7", "10000000000000000000000000"], + ["0x306db8baa49080658b86f93b8f79adfb062ef9ec", "10000000000000000000000000"], + ["0x3b704c981d82726d439179302bddf6abf990a9fc", "10000000000000000000000000"], + ["0xb753087bc71d5ca6f7336567b4dcb9d8577f806e", "10000000000000000000000000"], + ["0xc9badc2b35e5143b74443a990cac1ae820d2508f", "10000000000000000000000000"], + ["0xc163197a9d80f04dfaa550da9aeb826d81ea33ae", "10000000000000000000000000"], + ["0x0607af01bce45d29f9c784e2754045d609a921a6", "10000000000000000000000000"], + ["0x9ab4d84f9882b1ef8e33259ea8010fb62a895139", "10000000000000000000000000"], + ["0x57abd7868f043e17d33e37c6cbd86e1e189bef0e", "10000000000000000000000000"], + ["0x83401c971ae7c1ec19646c99cfe6c6e2b9115781", "10000000000000000000000000"], + ["0x3308e8cc698c4903af3571c8147f0ce3874f0a0a", "10000000000000000000000000"], + ["0xd22fa7a71e896d5ba8ed87522d0af5c0ef7b5fce", "10000000000000000000000000"], + ["0x986fd6f03e337e18174e1ed694f81b81668fd3ea", "10000000000000000000000000"], + ["0xe903349a368acaf2833c30d1ebd1f09f6a0b6830", "10000000000000000000000000"], + ["0x9dc49081cae215ac1c5a5744630b4fcc23cb960d", "10000000000000000000000000"], + ["0xeb2adc57bfb86ca79c8f106db8ea3f3364c09330", "10000000000000000000000000"], + ["0x77370579286515d09e4dbe68bf634980f3ce6f97", "10000000000000000000000000"], + ["0xb3d3fea5ca6b60f6b3d305edc55fa941a4dbf678", "10000000000000000000000000"], + ["0x8ee79cf84cc62b05b1febb22062b87f7418852a9", "10000000000000000000000000"], + ["0x21e3545aa43f043df8aa2604275613dbf3dd52b4", "10000000000000000000000000"], + ["0x6628d0731ac8e564e16d60da68c8200064b47f56", "10000000000000000000000000"], + ["0x63c33d37e0523f1a99e6c7abd211a72ad4e58f85", "10000000000000000000000000"], + ["0x72c31f6cf2f22396c42ec33e51f76b6e6c9fcfdb", "10000000000000000000000000"], + ["0x5367d9bd6996b32b65a062618f7d0e00be27b107", "10000000000000000000000000"], + ["0xce42353fd66097a9a87885fa1e66c70c20a0ee60", "10000000000000000000000000"], + ["0x16e16af66e019c4eb514db27d6033de083e7dbc9", "10000000000000000000000000"], + ["0x72147caa9fb9832dcd7700ba5a9ec1e3fc6f5ab2", "10000000000000000000000000"], + ["0x0427b2d09abb942c3b30e7063a19588d777a28d4", "10000000000000000000000000"], + ["0x903217c7d31d6a36106f76df578e4b0366318cc4", "10000000000000000000000000"], + ["0xd3841da932756b1f76608f790dd91d06ae30fc11", "10000000000000000000000000"], + ["0xf53f20ab50e744973d8b3c23e2afe5e4f7e20c47", "10000000000000000000000000"], + ["0x3854fe3b8c0e5fb25d919c5f439083e9377c9a68", "10000000000000000000000000"], + ["0x5c8b9c86c219a8ffd7bd6a82367b5560d8c29dd3", "10000000000000000000000000"], + ["0xdfbda378cdcb7e9b385e1a907b5c0f3507703ba4", "10000000000000000000000000"], + ["0xb1b763f855d5f81be4c93193f6f096c6a051585c", "10000000000000000000000000"], + ["0x8671d45621c481cfd397f2655b9764932d20bb8d", "10000000000000000000000000"], + ["0xc1da60cdf769938e5d2b7f17c673286d79aa6755", "10000000000000000000000000"], + ["0x52567a674bc0060120508e9b1026b712ac475132", "10000000000000000000000000"], + ["0x78700077174de0fdd7b848c21361490262e809c0", "10000000000000000000000000"], + ["0x3624c808b025fa95402b13860de4d43b39999bbd", "10000000000000000000000000"], + ["0x345fa4f148bfdca72ad3590f7986c537e8067ea3", "10000000000000000000000000"], + ["0xb2e7c3ef8d3a76012ae89f2be0a93d7809dd9f10", "10000000000000000000000000"], + ["0xa48f0361a682c26d88ed23b591236d8c1b823c49", "10000000000000000000000000"], + ["0xa09c039ff0d13880ada68ffc7a0d79267420a983", "10000000000000000000000000"], + ["0x97fa11bd06452f6c39d5bd9a64777dcaf42d10b5", "10000000000000000000000000"], + ["0xa649bd1a0b8e35ef782b7cfd7cce929a8fd1b04d", "10000000000000000000000000"], + ["0x2211a920dcc05a44131dc0933bfa921d9280c7e7", "10000000000000000000000000"], + ["0xb7a0738523de5e8c2f40e5ea1009c68c25004aa7", "10000000000000000000000000"], + ["0x1a5be5472c6c80b1b71d93f5eb550b6b1c3405ab", "10000000000000000000000000"], + ["0x2c9ef3aee79a6ce5041b37f4564ef7e88d1ce2c6", "10000000000000000000000000"], + ["0x0833a0ac904cc2883e7a07a5ba4c37b492599f2c", "10000000000000000000000000"], + ["0x31e3a2e7107171823ec242445f3b8f32ec2f08d9", "10000000000000000000000000"], + ["0x34b07db14f4db3bc9c528caa8c696f97cd3d621f", "10000000000000000000000000"], + ["0xffe026112ff700f2c3d1e47423c22288cf85ac16", "10000000000000000000000000"], + ["0xd2ac7e9d8ad98e9c5e57b935d6bdd2e7ecc9e1c1", "10000000000000000000000000"], + ["0x6c1485ca7219d57874daa56a8924a348ae3891f0", "10000000000000000000000000"], + ["0xd4d8c6a21f71de026e68c160d75cfd1d720d22bb", "10000000000000000000000000"], + ["0x65e57eb1a37ccbe3409c1b7323912b0587fe659e", "10000000000000000000000000"], + ["0x5b4183b0d1eb25bff61e28421afbdba3b7eb1f73", "10000000000000000000000000"], + ["0x0032eec8d52138ff880e0f8c1a3afc6393965b6b", "10000000000000000000000000"], + ["0x5f9840c4d45a91b600b9e41dfa7a6920bba649c3", "10000000000000000000000000"], + ["0x5895b7467afdd8cae2d9dbdac6de5522234f2e1a", "10000000000000000000000000"], + ["0x517047f615a07450ab32e4fee13c56c2f9e7d961", "10000000000000000000000000"], + ["0x4680e5ca03bf2021581b73d28e5434e81a47e23c", "10000000000000000000000000"], + ["0x6bd00b0d08c0245d07893b4873e4021a7c92b2fb", "10000000000000000000000000"], + ["0xef779d79e7027044ef3b8167a0b785282926d018", "10000000000000000000000000"], + ["0xd784ae16a4734d978f124579d759aeab454597a4", "10000000000000000000000000"], + ["0xe2fbb2d735beb5c98641d5233c64cf48b72e97a9", "10000000000000000000000000"], + ["0x7fce987f2f034e58e5d3be47cc2ae92e8b473492", "10000000000000000000000000"], + ["0xffae4c3d0a479702090080039d5c6b87647fa4a1", "10000000000000000000000000"], + ["0xc20c41877a9af9c59360a4c66f70ed63d30bc661", "10000000000000000000000000"], + ["0x0605e76bb3bf5cd33e38287a020a7129687a1a7d", "10000000000000000000000000"], + ["0x06f57d59f857d9b3fe110524727b339547c3f5bf", "10000000000000000000000000"], + ["0x1438096913309fccbc17529398752aebffd52c0e", "10000000000000000000000000"], + ["0x62eecd8f1e3ddabcd63937c268ca3659b88a198d", "10000000000000000000000000"], + ["0x9b37996b36c4cc37bac28017c22c1c9c7d91b807", "10000000000000000000000000"], + ["0x69a10364a3051ae0665a05e6573b6ca92a79516e", "10000000000000000000000000"], + ["0x2d62f7f7227e00769d3136882d1224bbce96714d", "10000000000000000000000000"], + ["0x41bf28dcacaa6de53eb9771799b6fca5aaa57758", "10000000000000000000000000"], + ["0x631648a072ef63216eda1e23395fd155ec35ed4f", "10000000000000000000000000"], + ["0xf1ddcd748203362ec65cfeff36f24d58cc5a1a66", "10000000000000000000000000"], + ["0x4d94667b1003393828cc885f0dfccaa7dca4ab7c", "10000000000000000000000000"], + ["0x19cbf8aafe9f7fd950567c53915d6c348bf3fa8b", "10000000000000000000000000"], + ["0xd7469590c1a809c859caa77598d87b8dd0144391", "10000000000000000000000000"], + ["0x0b34f1e072214721d7e591beacdab1098466493a", "10000000000000000000000000"], + ["0xa0798fdd595c12b5de930687d5857e9e277b22e0", "10000000000000000000000000"], + ["0xe011cc1d3281619876e98996270bc08c0719d7c0", "10000000000000000000000000"], + ["0x083e31eb571d4a2dac8faedd77fe9bf3359d4b1d", "10000000000000000000000000"], + ["0xfd7e37b3e50759e8cd304663986d70c17632dff6", "10000000000000000000000000"], + ["0xabcdfcefe14a8737dd366de6f485a2831564789b", "10000000000000000000000000"], + ["0x1a48f70a2ef3be51a941ff475594bd1c4cf34e24", "10000000000000000000000000"], + ["0xc3c47a883dba39254f7af7c655566791bd404085", "10000000000000000000000000"], + ["0x64bc2504519948633f639ec35d955f738cd70b43", "10000000000000000000000000"], + ["0xfa59f5b8a1894c97418c0cdb6bd17705d1f6cb37", "10000000000000000000000000"], + ["0x672e226dbf55787c23a3f5105f662ff42ebb391f", "10000000000000000000000000"], + ["0xba3fbc2885144e9a352cca0fa5f39f9753e23323", "10000000000000000000000000"], + ["0x6a2995e6da98f65c7c1548e6a2b681f1352addff", "10000000000000000000000000"], + ["0x28bc33c61382a9e5895b4d1a892333ca7cbdc3d3", "10000000000000000000000000"], + ["0x2053a99675b0d2070b7503ff4767567f91073de1", "10000000000000000000000000"], + ["0xb5f622c8c7696ea5f4ec7c1049ecca38f987df4c", "10000000000000000000000000"], + ["0x7907b64bb4fac25c535b16d43c263f459c3c21ff", "10000000000000000000000000"], + ["0xf7d5d1e3074331bd6d7de5519107f8ac187aed90", "10000000000000000000000000"], + ["0xc564de8c526f74e0b2f106d06a2929a0b5146fac", "10000000000000000000000000"], + ["0x8dd20fd51a88b088cef02662f816a431cc4d689c", "10000000000000000000000000"], + ["0xa58d8b96e665e54a9b45df09b42f17ead20f361d", "10000000000000000000000000"], + ["0x55e0d5d452eafc98dd4e60200e8865a1f09a51d0", "10000000000000000000000000"], + ["0xf0f75571e01ba8610b91a583ef18a330c14bbe7e", "10000000000000000000000000"], + ["0x5dbfc31c252397cb6cafcd0efffe56d89087919a", "10000000000000000000000000"], + ["0x959398fe03b1b7dc43231b90d73a33d798353a79", "10000000000000000000000000"], + ["0x5fb42f57eca503e305027774be412453ab005792", "10000000000000000000000000"], + ["0xa3f19470d3fc0c0f69bd82876bd573b592ca9597", "10000000000000000000000000"], + ["0x48f88a8d8e4a9dff33c0a4d857a81a189c2d6e07", "10000000000000000000000000"], + ["0x5ea85d36eb9c9960724b6d1f912d52d4856805f1", "10000000000000000000000000"], + ["0xb5b083bbf813f314263f42bc3fb25b1c139fc96e", "10000000000000000000000000"], + ["0x93560aa4084dec59695c1a9dfdc24d5f4b55483a", "10000000000000000000000000"], + ["0xb66b58e836568543f45d86dab458df7a71ee35db", "10000000000000000000000000"], + ["0xfeb0ed524ab18cb82038422671b82fa8ef6d073a", "10000000000000000000000000"], + ["0x473f9715ee5434523e4dfc4d8ba6a2dc2ec4dafa", "10000000000000000000000000"], + ["0x60a6853b39d3b37e1436c1e281e28cd91f09fcd6", "10000000000000000000000000"], + ["0x0efe3b099c8281a26a3aeea43b2749645ec75210", "10000000000000000000000000"], + ["0xcf46e636a925b5cf1f5ae06001b26b25e98faac6", "10000000000000000000000000"], + ["0x3b60bfb78f3fe84ff2bc75dee2b14b2ea13805e2", "10000000000000000000000000"], + ["0xfc0739f29e140f2f932bdb995fcee1edd0a2235b", "10000000000000000000000000"], + ["0x685b5d49f4a9ef3b1e36c81c6237c62024b487aa", "10000000000000000000000000"], + ["0x8159ae23624200b2929739f628a5472182f2b979", "10000000000000000000000000"], + ["0x2be2fa0c5a0ba2c046ede2255e4bd08854347de1", "10000000000000000000000000"], + ["0x4a26b856e9eb9db65ec5acb93214eabbcbe3a749", "10000000000000000000000000"], + ["0xe4c3ae3235e0a8f267e27d27fc56e46bfdd62525", "10000000000000000000000000"], + ["0x6d759273795a2d3f23c5887aa694fb21f2ff0901", "10000000000000000000000000"], + ["0xe3970902d748181e04bf81919d5ff8ed30cf005e", "10000000000000000000000000"], + ["0x3b4b0d8853db68f290757e8d5de2e5c7893ddab0", "10000000000000000000000000"], + ["0xcd50f59edd184bcc4e44d7cc33f12cd469519dcf", "10000000000000000000000000"], + ["0x6f3013ef8589af4f024b4f926edf538c3321456c", "10000000000000000000000000"], + ["0xc7efca477afa3c8fe231614b9dc0c78988baeb1d", "10000000000000000000000000"], + ["0xb786074078d2cd10146521b500cfd8a154c13b2d", "10000000000000000000000000"], + ["0x23c51a184ad7e7095e40b5b394d6566ec9f01eb5", "10000000000000000000000000"], + ["0x9c4ab5727c76563f8c386c3e78672b4f9cdbde5b", "10000000000000000000000000"], + ["0xd5c534c0a39865bc0d11835659ea8440ede7d29e", "10000000000000000000000000"], + ["0x20b5c8288b313c6ae31fc563a9d40dd1142cdff2", "10000000000000000000000000"], + ["0x4f7946655b920890c6ec9cc53c6b851ea96d8f98", "10000000000000000000000000"], + ["0x6acce4cc780847e681a269a821557e4c32ad9cb7", "10000000000000000000000000"], + ["0xff3cee0891d5b50b7c6a6f148a9c922c37b94626", "10000000000000000000000000"], + ["0x8f41fd9319b0f3dd7c1afb69c36ffb467fb324de", "10000000000000000000000000"], + ["0xb6dd90bdb43c76793080e2a8065f084763602245", "10000000000000000000000000"], + ["0x7717a9ec35c24a20faaa38760c6f29133aeb8874", "10000000000000000000000000"], + ["0x2b5b309e6c233c06e766178ec02864d15fc49195", "10000000000000000000000000"], + ["0x3a30d21670b7080ee19bafef23db9a40a104e769", "10000000000000000000000000"], + ["0xa5c7a7d03f6b6b2c3ba97054563f6e0a9e27eae0", "10000000000000000000000000"], + ["0xf9e2f244537f1c01628a51226bae34d1583af045", "10000000000000000000000000"], + ["0x06be50385115b75926f7ab496f0c11adc5c74bfe", "10000000000000000000000000"], + ["0xac2f0ae87a45cccc52de8e0f6d00d9e9b477f745", "10000000000000000000000000"], + ["0x2ace839c452e0e5666328b638cc36337f1c37c2e", "10000000000000000000000000"], + ["0xecf6692c7952cdcb34b52b2ce5f0008d2714ef7a", "10000000000000000000000000"], + ["0xcb77c3033c1629f1d8f261c5e506e007041fd642", "10000000000000000000000000"], + ["0x468f05137394f349f37c5e7d9b35661b6f68c0b5", "10000000000000000000000000"], + ["0xc147deebfe852b23c7c58434c435d9f6b0cb90ed", "10000000000000000000000000"], + ["0x1861608fb90cfa01c1b348915497c658e22fc8bd", "10000000000000000000000000"], + ["0x47bb57496ae8c10b3b714bc7f064f3ac049b28e0", "10000000000000000000000000"], + ["0xcba9e488850be09d9cd0d60556c2848d5ec3457b", "10000000000000000000000000"], + ["0xbf2293d6467c1938d5989dc3959a044b48cf9bee", "10000000000000000000000000"], + ["0xd8ad5c375b7ec4088ac091aad2fb1b9acf0bdc6d", "10000000000000000000000000"], + ["0xda1df669ad144edea25f4c22daf16354a3be9df6", "10000000000000000000000000"], + ["0xe12986de407031a7b59260faa2b28571f0757854", "10000000000000000000000000"], + ["0x039dd827ddc52c0d8f0a8c7a8052dd6868963de2", "10000000000000000000000000"], + ["0xf5a28d905b6829fb17e6ab9e749698fb30130672", "10000000000000000000000000"], + ["0x547f00cffa5688f3a364e37c57a24e00fbd9491a", "10000000000000000000000000"], + ["0x2f6f02ced513858d95f3687a6ff18cb38ddbaabb", "10000000000000000000000000"], + ["0xf63a7079b193ee1437ff41ae40b7f705f59d5e34", "10000000000000000000000000"], + ["0x4e3cfa54f8cd3ab91a8ad2340cdcd183b5dc7440", "10000000000000000000000000"], + ["0x89dec99a09b0030000c5508d9b7110e594af142e", "10000000000000000000000000"], + ["0xfa066dc042d979e585aeef94ef20af736581cece", "10000000000000000000000000"], + ["0xe25ef55fcff7956941fb2ca00929e9891f027b6f", "10000000000000000000000000"], + ["0x52db50d39f1182054ad03c61d714032a46c6993a", "10000000000000000000000000"], + ["0x479b80a249614752fd5a15e132669e47c49d75c3", "10000000000000000000000000"], + ["0x91a73acb271c3ebb3ea5467f9ef9b29d5a080d04", "10000000000000000000000000"], + ["0xae5a42c292a9bf774e0dd92779110b8f0a355e0d", "10000000000000000000000000"], + ["0x82735147c800a786166d7cc0e076fd056f773dd1", "10000000000000000000000000"], + ["0xb97176276b93980a659bb54b3243364e2a8c4d21", "10000000000000000000000000"], + ["0xce124b52f0559266b041b020ff1c246ca88538d6", "10000000000000000000000000"], + ["0x2d6f91803e8d713ea47d03a74ebdcaca2b7d92b9", "10000000000000000000000000"], + ["0x5ca910b699dc0e1dada4b6f25ba5a871d1fde8eb", "10000000000000000000000000"], + ["0x93c3fd1f1f4b736a6cfce3d54b1d21394e5efada", "10000000000000000000000000"], + ["0x5bd1fad41798914f3c3e2dd1b1a78f738cde262d", "10000000000000000000000000"], + ["0xf09ec2813777ef277034865649096e1e215e777a", "10000000000000000000000000"], + ["0x8f622c74f05494638992d1fff99b8403fc29bae7", "10000000000000000000000000"], + ["0x92743bdf2346c0117dbdd8a707a4b0929d66ee26", "10000000000000000000000000"], + ["0xa001d2981383b739fbb80297f94316b8073b0ce9", "10000000000000000000000000"], + ["0x40213401b9bc76bda3cee270418056062c47c702", "10000000000000000000000000"], + ["0xd2854b0300723d0cc0a06640968c4c497ed67230", "10000000000000000000000000"], + ["0x778e4aadb3da1e922c7ee817b0c9362043beed96", "10000000000000000000000000"], + ["0x4d157701701e2555c6e6b546422a8ff2b85adc97", "10000000000000000000000000"], + ["0xc4e3ed12796972cccbf328f9ed6b260605628e46", "10000000000000000000000000"], + ["0x2a183e310e56cd262e4b3024ef9dc490fd108f8d", "10000000000000000000000000"], + ["0x214a2e26a097295603ed2913e018c53944189613", "10000000000000000000000000"], + ["0x6635ecb26290fc4bba9517314d32ba8e0758aae1", "10000000000000000000000000"], + ["0xbaf3f8e7797003be711b86a871fa70603601d9d8", "10000000000000000000000000"], + ["0xaddd614c47aa8788305a2bdff4c17f6407729b4e", "10000000000000000000000000"], + ["0x194a6e092392449f567cc86500363811e36ecf52", "10000000000000000000000000"], + ["0x2c77374cd22630a86834e74149eca868e4b1a1b6", "10000000000000000000000000"], + ["0xc3fd21806cff1b370e864967db4ff14c82277aaa", "10000000000000000000000000"], + ["0x1233dd90d5334c8d7d0a7e14fd0b9638235402cb", "10000000000000000000000000"], + ["0x3e19f7d73f807f4e7b99431b8d9676d8553894b6", "10000000000000000000000000"], + ["0x9b97380c223f85b410add0ed75675a6513ecb771", "10000000000000000000000000"], + ["0x9fad047281a61db481ebed86f0fe1eb660f5b633", "10000000000000000000000000"], + ["0x0f6362f799434041070bb8bdba02984e85fa8ad8", "10000000000000000000000000"], + ["0xf7858ffe1810a5ba72b843b9c2322fd1779276a2", "10000000000000000000000000"], + ["0x8f5ef950d786877f86fa150989f6d1e68af9e97d", "10000000000000000000000000"], + ["0x33cefb235c6d1328eb5486d154a6ee5d57652f8e", "10000000000000000000000000"], + ["0xf7cbcf9afc2c1a818aa7b1ee3e954e65b0b9e0f4", "10000000000000000000000000"], + ["0x0b6c146abbbf45b2566f8442ac4269e6124abb83", "10000000000000000000000000"], + ["0x8cd332bb8f734e0db6d5ccc4b9486b4e40de4322", "10000000000000000000000000"], + ["0xcd7365ecf7227896d23b75e150ca10821923b811", "10000000000000000000000000"], + ["0x79e421c024485ed3e23e264bba8f2b295950b20a", "10000000000000000000000000"], + ["0x874fcf122bb816b4bb1770a3aceb03b9b39cca9c", "10000000000000000000000000"], + ["0x3163bc6537b81a8e54d850081d700c14ae30510d", "10000000000000000000000000"], + ["0xa2cefc3ea05baef04e1b360da7d5de70b8338fb0", "10000000000000000000000000"], + ["0xddaaf2c3305dd1feddd005f7273fb07b9cdfa7cf", "10000000000000000000000000"], + ["0xedf470bd925d0c64bc96962d3bdd717eac84006f", "10000000000000000000000000"], + ["0xd6cbe50054c9a9e3eed385dd2ba094f7e8018f34", "10000000000000000000000000"], + ["0x2479737205df8bb6523878b4c881470e80c46d48", "10000000000000000000000000"], + ["0x085ea1d2fc525884484646718a508905037497ed", "10000000000000000000000000"], + ["0xf4b151977024678823489a72ccc6f53f5d496104", "10000000000000000000000000"], + ["0x21712e1a233d5a90da82e1c61fa6183e81e878f9", "10000000000000000000000000"], + ["0x6db4efba09349084ef2073748551ced6db403c35", "10000000000000000000000000"], + ["0xf760069bb5119e6028cd9bc1bb2ea655e4203d77", "10000000000000000000000000"], + ["0x990fe30cabb0567512609caacd882e5c2998b224", "10000000000000000000000000"], + ["0xd2a67a1b56d9e2a60548960359bf525a252c1780", "10000000000000000000000000"], + ["0x6a76747342f55b67cdc1571df445744afb93c2ea", "10000000000000000000000000"], + ["0x9374616e569445ef0a4c2eb51094be31a18ce77b", "10000000000000000000000000"], + ["0x8e360daa57ab3ccc99a8af77fc2de8ae1cb99e87", "10000000000000000000000000"], + ["0x37557ec9c02fb6636c7321d5ccf273bea051dd06", "10000000000000000000000000"], + ["0xb22091c028270c0c772c7ae16948778365fdbd14", "10000000000000000000000000"], + ["0x97d4afb35f95bda7a3fd39263ad7bda18bc85690", "10000000000000000000000000"], + ["0xb000132aad9d8dc5a8c37bd2750b1fcd211d4716", "10000000000000000000000000"], + ["0xe9ff7e5c69bd53638c4d04568f29ab575417d102", "10000000000000000000000000"], + ["0x2abb000c0544152ab12e39549c9457410f206790", "10000000000000000000000000"], + ["0xeff06e7953a4d97f4dbdb7060ada79f338a5ca60", "10000000000000000000000000"], + ["0x822245daa39ab32206fb343b1ed653ac8e5d7338", "10000000000000000000000000"], + ["0xa0a822070b4df32e1e68232200a11e7f564d10b6", "10000000000000000000000000"], + ["0xeaea5e20ba7d72164244b13a4435f12730e2c8a6", "10000000000000000000000000"], + ["0x641954c0ef957bb20068c061a4233e04fbe3db46", "10000000000000000000000000"], + ["0x51b9704c7f271a557e74778725f1cb83135497fc", "10000000000000000000000000"], + ["0xcce0dca48636e823ace24ec16cb242c2312c589f", "10000000000000000000000000"], + ["0x72fc958886e2d0b94d6b3bb67d0fd0654a2a8606", "10000000000000000000000000"], + ["0x402dec3f9fb0d2fdb4ca22f3800738bfe7082765", "10000000000000000000000000"], + ["0xfb044636b92629aa38ee94aa397e09cb7f3ae6cb", "10000000000000000000000000"], + ["0x812f1f434fae0346764687e6069e8176c8601991", "10000000000000000000000000"], + ["0x0420dd486f8905fb7c408d315870d579d2ff2507", "10000000000000000000000000"], + ["0xad6b6793a66c99cccd368567ad16652be4603717", "10000000000000000000000000"], + ["0xd3fbda6a3a49adf3cf6b2a3501b5c8cf270a07ac", "10000000000000000000000000"], + ["0x084466b7f2eba52ed37c63c7fa25b0148e707497", "10000000000000000000000000"], + ["0xc7ac35c412cb902f1c90d1498d04758f3d23d8a0", "10000000000000000000000000"], + ["0x2999cfbf7bec652ac7c72f555d4489c5fdce46cb", "10000000000000000000000000"], + ["0x02966fd54b31a7ec842a323bd5049b0378699c4c", "10000000000000000000000000"], + ["0xcd520946df75ec47ff56521ff1e9bca07dba21e8", "10000000000000000000000000"], + ["0x7b5928b2894ad3ce37af7cf1f842b81ab8932ea9", "10000000000000000000000000"], + ["0xa8ddba3c1e0cf1eb3a06c8bedaf25f9fc7e297c4", "10000000000000000000000000"], + ["0xad7878b5cf4da8c84dd62eb55c827fda3f9a7033", "10000000000000000000000000"], + ["0x2c047714d4486f67754e8172c97f45e92be87054", "10000000000000000000000000"], + ["0x583105cfb4f7aad30770f338efd06e1affc4fe88", "10000000000000000000000000"], + ["0x5c114501cab9f379b6aab10e78b4f50eae7a0d6e", "10000000000000000000000000"], + ["0x84c6de104b03af18ed72e472de1869dd0757bf7a", "10000000000000000000000000"], + ["0xf53b53af7530aa0c7db54b4d028157af60daeac1", "10000000000000000000000000"], + ["0xedac0b6db8a835a8664fd51fb96361ac707f8ff3", "10000000000000000000000000"], + ["0xaefcc8992d7d42dc40b8a88c2b30a5c808d2b58c", "10000000000000000000000000"], + ["0x232ed6686e163cd9de640b0635d1ad0b30e986a8", "10000000000000000000000000"], + ["0x481dec5c5f7a9bb4cfebf2ceceaf9fb9e99aab92", "10000000000000000000000000"], + ["0x566280a89dd72c8d60bb4db62ce24b08be82cfa9", "10000000000000000000000000"], + ["0xfa497b907904ddc735f5059a4ed97275295148c5", "10000000000000000000000000"], + ["0x386cf921c3c64859d4892588aa02778807627709", "10000000000000000000000000"], + ["0xdc5ac9650b4296b1d62943873f5222359bfa92c0", "10000000000000000000000000"], + ["0xa6e4cf15c8a582cc2d4a175847f52586e326bde7", "10000000000000000000000000"], + ["0x32371b624fad61fcc122813ac42ec6f8639f7fb4", "10000000000000000000000000"], + ["0xce0f30a8633bf0a8b528c73535cdc79aee8220bd", "10000000000000000000000000"], + ["0xd59656fa517bd5c3dc3588ff6b1dcdb4228139f5", "10000000000000000000000000"], + ["0x2fea4f7c1e2452368cb661b83d34eed82450d110", "10000000000000000000000000"], + ["0x0980e08622091456d60a6d0b04c45521f719add3", "10000000000000000000000000"], + ["0xc5ab97ee3048ae3b3430ae8e7ce2c0cc09fe44de", "10000000000000000000000000"], + ["0xe612941e974e818ed8679fd385c19e188da66968", "10000000000000000000000000"], + ["0x732737614ad17dc6ca2e43581f8271afb2e4a9fa", "10000000000000000000000000"], + ["0x37b66ad48c6bf20596ac215354fd5e047011d0a3", "10000000000000000000000000"], + ["0xf467c7b8f063b46a0e633d28dd9b0f9f3a1dffea", "10000000000000000000000000"], + ["0x90b7f8eb3e7690ad5b093ef92ad4055f2b61e693", "10000000000000000000000000"], + ["0x8b71fd7dcf80db1d6d8f0cd40b85fa620305685b", "10000000000000000000000000"], + ["0xf2c471943666deae814c787a5c834e8fc599c70b", "10000000000000000000000000"], + ["0x4fbee6850965c8f6eb5eb56627c4a805acd9d11d", "10000000000000000000000000"], + ["0x361347da8d154ee26683f279b5b4744212b7993b", "10000000000000000000000000"], + ["0x2401270543d683c1c428426e6a40e0f1d3168bef", "10000000000000000000000000"], + ["0x0382c934bf6ccc1ec63dc455874f883770ba73fe", "10000000000000000000000000"], + ["0xecf14d987a0663e83dfc22e089e96c6dc159f1bc", "10000000000000000000000000"], + ["0x262157b8359a51c23b532a97486ec517ee2ae9ad", "10000000000000000000000000"], + ["0x440b2690daf461acb09c469509f8af45d411c383", "10000000000000000000000000"], + ["0x0c48ebfa89d87ca96fc1d427997c794653354c36", "10000000000000000000000000"], + ["0x4cb453ae03113deb75d7a8267fb20621e8c996fe", "10000000000000000000000000"], + ["0x01716a7211e33de598d15f599e80d6694df3a17c", "10000000000000000000000000"], + ["0xca15c29018ac0e5ec0ea9970fa4543b8d4921c6d", "10000000000000000000000000"], + ["0x8195a3cc2cc8b11002ee5ea9804e780c9b8f9daa", "10000000000000000000000000"], + ["0x0664fdd5d83ae8fce72e703e1e26834abcc2e202", "10000000000000000000000000"], + ["0xc76245b8209aebb92399525fd75d8d72531f1648", "10000000000000000000000000"], + ["0x8a8d30e81c1c2f08fb775232e204f564b73adfe4", "10000000000000000000000000"], + ["0x7dd2bf18c61136286f6476f104fca5d3b85c86f9", "10000000000000000000000000"], + ["0xa3b5063da84a887b71f7c047a2cadb84042aaa3b", "10000000000000000000000000"], + ["0x5c616a8601360577283c6d509718416d70ad6430", "10000000000000000000000000"], + ["0x2b7933f62e7bc307ef1f33d8b82dde6ed57aa273", "10000000000000000000000000"], + ["0x79d8972843837a22d6c92c2ba0816badbc30ecb9", "10000000000000000000000000"], + ["0x54520d193057ccb8f6ba6980bf95dcf7d48c816e", "10000000000000000000000000"], + ["0xddca23c6ba5155936c8c05c198e452a0674f4bbd", "10000000000000000000000000"], + ["0xdb963ed159f34ce8f552f8ba26d19790c3c072d6", "10000000000000000000000000"], + ["0xb8308ba70e18419dd2cf27b225800595a07813bc", "10000000000000000000000000"], + ["0x30a9925705190e5b298f94b3f3bad4589e241a4e", "10000000000000000000000000"], + ["0x3fcec81357e2cedd46941c867889ed0f66a0f6a7", "10000000000000000000000000"], + ["0xafac8df7f27be423c590cb64c4cf1b359d6308d7", "10000000000000000000000000"], + ["0xfdba76029046e9385569fb13cfd8e1f5aa0ea953", "10000000000000000000000000"], + ["0xa2bee999df19254bf98aab7ad2e99249ca8f58ab", "10000000000000000000000000"], + ["0x7a26f2a0b0bfe00e9c6f5e7cf1206eeeb40245d0", "10000000000000000000000000"], + ["0x7901792223f235d68d8c02b56d0067476e26c092", "10000000000000000000000000"], + ["0xbaa40eb03893a081c2b1a56427b8ecf9e29dc2f7", "10000000000000000000000000"], + ["0xed1f74b2a93eec66042b17dedd20127058c1413e", "10000000000000000000000000"], + ["0x47a0a7653a39643240d7b11854e68b2daea9002b", "10000000000000000000000000"], + ["0x54c6619a52a679e9c4532becf8c9cc8a4d30383c", "10000000000000000000000000"], + ["0x7923d1ba6e7776d5e096bdab45223eb4dae0c114", "10000000000000000000000000"], + ["0x385d94de0be5f6d958b8340a8be6f51c4d53bd87", "10000000000000000000000000"], + ["0x4a8bfa165ba851b078d9d4c5423735ee1eb79699", "10000000000000000000000000"], + ["0x180699fbf0862ffb1fa1f352814f1a2ad74fb818", "10000000000000000000000000"], + ["0x22d514195ed0d7a7c34973dcd597741e197c932a", "10000000000000000000000000"], + ["0xbc5fdc52eae854bb43b6ad24d95bbbcba3af38f4", "10000000000000000000000000"], + ["0x466b23bf30d7bc4541b5470b62a0fddcfcaa33d6", "10000000000000000000000000"], + ["0xd11e3e8815ab3bc592a032bd1b56b01a89d83a66", "10000000000000000000000000"], + ["0x0a2eea8df5198e26357e6742b17023587056316e", "10000000000000000000000000"], + ["0xaa06323c05e3ffc542a0aec88c091f1b2027fce5", "10000000000000000000000000"], + ["0x7316df9dc6a6f0b0e4476b577117349bc6232448", "10000000000000000000000000"], + ["0x81e6884a4dfb51079f7898e5d6a682ea78ffd1e1", "10000000000000000000000000"], + ["0x9fc8c18036a79e89969f404e45ac6dfbf7fa2cf8", "10000000000000000000000000"], + ["0x7a0b2faa1c8b54ccaa026c293d78e80a7c11424f", "10000000000000000000000000"], + ["0xe3e3128698063e388f65fb6cdd4b86e43e8e86ae", "10000000000000000000000000"], + ["0x1d4c9a9b253cdd3c24565b9ff354f6987af7b659", "10000000000000000000000000"], + ["0xc2c2220cdb0b5b72f60cf0beefaeb559b64938c4", "10000000000000000000000000"], + ["0xec9afbb62de1df0e4c183885e7e96da7e8b72732", "10000000000000000000000000"], + ["0x764592f9c0ec019e29ee67d7b2032e6e989881ef", "10000000000000000000000000"], + ["0xe21d93aed5c47a9f5c17f3abe07100de250b9a4c", "10000000000000000000000000"], + ["0xf60c5173df0fa450be932f82c25b4b4e2a9566a0", "10000000000000000000000000"], + ["0xee9b161a24c293a17221cbdefb5b0c874ecf9b0f", "10000000000000000000000000"], + ["0x49e28333b9ea6b584cbb92314162b2f955380c7b", "10000000000000000000000000"], + ["0xffda8e1961d9e55ece7dde23deb06ef7a5b53e4c", "10000000000000000000000000"], + ["0x5fdeda0f94c664b94dba921889664c4dba7056de", "10000000000000000000000000"], + ["0x81bd75c315bd8d5af172e578224865d98aa80da8", "10000000000000000000000000"], + ["0x8f22dfbc78545c5c96c21187773dd70e7a95b2d6", "10000000000000000000000000"], + ["0x9b5fb7a2c9b82b834dfa027d5b5f9600a5d70418", "10000000000000000000000000"], + ["0x00e6bdc5caaf6236d08744beab010936ef7d6153", "10000000000000000000000000"], + ["0x7a4c60bf1c98d690262f054543e6ad72530935fc", "10000000000000000000000000"], + ["0x2c9394f92fd4a275f534041b0d85c0bce540e2de", "10000000000000000000000000"], + ["0x28bb4fd62dd3b29b46884ea7bf8113d4b0cab828", "10000000000000000000000000"], + ["0x3beb972102bb45920b152fa68463bdd4c17da5f5", "10000000000000000000000000"], + ["0x00c1f06ad4b8b930864f5a3fc0c63d5cf228655e", "10000000000000000000000000"], + ["0x12715ba002688b3dea97433530f18b0904b9b956", "10000000000000000000000000"], + ["0x982e0bcda3abb6404a6568ac27b9aa4c397212c2", "10000000000000000000000000"], + ["0xd8d333750d5c9567b1b080759439dcc8e7546a5f", "10000000000000000000000000"], + ["0xe6bf6a74c6d48645e2a305e0ce79a87993861d79", "10000000000000000000000000"], + ["0x3f4abb63d3f0c16956d7d0d3c29ad6d4c283b5c9", "10000000000000000000000000"], + ["0x186bc37c98daaed5b95bf3eb41141b32c250864b", "10000000000000000000000000"], + ["0xa0164e6590885be7d67b0d17608fe95b259b0209", "10000000000000000000000000"], + ["0x7eb3892dfc4529b81a9b10d07f46d9278bbcb35c", "10000000000000000000000000"], + ["0x2c9e1bf8c530a1c7f01e251536101876a73018cd", "10000000000000000000000000"], + ["0xe9fdd1f4d127fe79327ca9793684d31a4d138fb5", "10000000000000000000000000"], + ["0x9f2b668726dfbeb7a976d78513a602170fd5b270", "10000000000000000000000000"], + ["0xdfbb2a7eacffae06638eb0e35cbf2fabcab79f44", "10000000000000000000000000"], + ["0xab19019fcc47c350018d709040376e648465e83c", "10000000000000000000000000"], + ["0xdc3ce2f704e78ac0933b8bd60a1ec42f746cd207", "10000000000000000000000000"], + ["0x92272428764257be4e09355858691a7c751af36a", "10000000000000000000000000"], + ["0x3cc7f73f5a3a687c7ffa6234863d10c33b51aee6", "10000000000000000000000000"], + ["0x5ced069213dac826e1848a5b6c84a071c271f16d", "10000000000000000000000000"], + ["0xdb31938f36ea69ba720da05d83a53d23d235fb51", "10000000000000000000000000"], + ["0xd57ad2f27702eebd5094669c5616f66f4b2d7215", "10000000000000000000000000"], + ["0x673423876ce8b3450c2cb52e4845510e4b26e366", "10000000000000000000000000"], + ["0x7360675ed884c1038e22d602fb9ce219977ab11d", "10000000000000000000000000"], + ["0x9b181cbcc5bf35cad0da18af4558a70190cb41ef", "10000000000000000000000000"], + ["0xdf0ae251dd439d49ba136d4cb63a7f75b9159cdd", "10000000000000000000000000"], + ["0xb10d1e24ea7b92fc7eb305813c5197b373c364fd", "10000000000000000000000000"], + ["0x833b8eb15e8c4f42765400c86c095c5d7493fa77", "10000000000000000000000000"], + ["0x23b660111d92492af9845319d1af62384caaa32f", "10000000000000000000000000"], + ["0x92a413d33ed4b28405f1c785824480e616dd6f38", "10000000000000000000000000"], + ["0xa1c03903041346aac74960d8c4fa4a3953a8cac4", "10000000000000000000000000"], + ["0x23a4eaa46e520937f286e4d8c6cc79b129f2ef56", "10000000000000000000000000"], + ["0xa56402fb07ece948941a04ca2ac8c3b28d28877e", "10000000000000000000000000"], + ["0x81fb9677ec41e7f4c57cbe7fe6d7c67ab63765ac", "10000000000000000000000000"], + ["0x2c4b803574bb89267112f4392636aa8ee830fb0f", "10000000000000000000000000"], + ["0x013cc5f05bbc8c11a4c5fbb42ed6005e00bbf187", "10000000000000000000000000"], + ["0x543ca251cd58c577de8b8b7ccaf3b3f8a89ffc46", "10000000000000000000000000"], + ["0x01bbb770e02b811a656ac3e9b650d8d3296b1561", "10000000000000000000000000"], + ["0x1d9ee73419dd37821a1a01d5fed6b5f7d51f2375", "10000000000000000000000000"], + ["0x1ed6fcaab87bee0ca9cd08100268f00ae2a68052", "10000000000000000000000000"], + ["0x98c0b3b7ef21e8103e8171699adf32c677d68650", "10000000000000000000000000"], + ["0xd081c10773d09a70d8b7db328d596337a70fa220", "10000000000000000000000000"], + ["0x6363f1a75640552d5a372156617753187b9981fa", "10000000000000000000000000"], + ["0x07787a63f09e23043570735711373beb6dd857e6", "10000000000000000000000000"], + ["0x60303dae1c3bded0bae1d070271eff3a2d7de08d", "10000000000000000000000000"], + ["0xe5296e767d4be445e2d89c2e15fdc9c9ac130d00", "10000000000000000000000000"], + ["0x0541bb465a19a6490450d3b808a7fcc7f08bd5d7", "10000000000000000000000000"], + ["0xbd26a9c29ca9dc2c195094300e467d98ca67afcc", "10000000000000000000000000"], + ["0x95d8d95e92b9478aff767adbf188b3f7a9a59e81", "10000000000000000000000000"], + ["0x5d9fdfaacf5bc2e759fa210f6de3d7de5457b385", "10000000000000000000000000"], + ["0xf9c5edf27dfc90ed25ffd3d3beaa8523fbbe51e5", "10000000000000000000000000"], + ["0x91c4809243add1848b86e362192d80cd0304211b", "10000000000000000000000000"], + ["0xb968f274598f081cecd9404d033936754c7f93f9", "10000000000000000000000000"], + ["0xecf3d64e92b9d684c715a32347985e1501aaf329", "10000000000000000000000000"], + ["0x626159c3420a0c3ad5f5dd153a94425961becf11", "10000000000000000000000000"], + ["0xc32d531decd5376fcf1ddf18bc62b30765139f84", "10000000000000000000000000"], + ["0x4831b73ee8feca6c8e5d196c070044cc1d63e249", "10000000000000000000000000"], + ["0x3122123d411f4d8feb72c96480c07dc62c5d2c51", "10000000000000000000000000"], + ["0xc4565748161db315a1da5c7301c6553227a2a196", "10000000000000000000000000"], + ["0x76a95d549ca36d955df2c72f693690d8e51a94d0", "10000000000000000000000000"], + ["0x7e89f45bf62510b134db6b46e957470b9c2a95e0", "10000000000000000000000000"], + ["0x48cc8217b84aca0c7c966dc4f7dae6b2c675e7fe", "10000000000000000000000000"], + ["0xd57e5adb72156cfba34d6e2f62edf2b6a11eb55e", "10000000000000000000000000"], + ["0xad3eac819288fcdafaf486afbd54d05b54ccaadc", "10000000000000000000000000"], + ["0x87011327ccf35ab7e88f36deddcebf0a1ef049d7", "10000000000000000000000000"], + ["0x5c93d34e5e18d25fed99df0771ecf7de322bed4e", "10000000000000000000000000"], + ["0x3d1c7dcbf883c0717bbec30aed5a616bd9002b01", "10000000000000000000000000"], + ["0xd5a9666fad55f6f0884e7665d52b70cf129313f8", "10000000000000000000000000"], + ["0xd0529b53bae79ebf00e429dc74c897fc372f61de", "10000000000000000000000000"], + ["0x97649619b88d94b08f0b54ab9ccac75e87b29e47", "10000000000000000000000000"], + ["0x836c59b17f87e3eae5a3291a96d1c046f5b1a164", "10000000000000000000000000"], + ["0x1b33cac177206f04b5137d0068c82e454a28e2d1", "10000000000000000000000000"], + ["0x971ef1f39352abd927f900750ee2231c47d65e88", "10000000000000000000000000"], + ["0x9ec6c8972f54e0d1c44d289f1dbe5fb6d71ad0cf", "10000000000000000000000000"], + ["0xf49b270e500c6179a83cd22cb7bf820befa11412", "10000000000000000000000000"], + ["0x273ce084c4a7631d2495883e75cced66e02537b7", "10000000000000000000000000"], + ["0x4624a7e23594287df1be7a4bcf5055fc86a397e0", "10000000000000000000000000"], + ["0xf0efe8f6028425e9ba49d251baa7b29875443bdd", "10000000000000000000000000"], + ["0x2b92d12d8cc0b9af862451393925092c6c21a611", "10000000000000000000000000"], + ["0x4bfe442562f52780265dcd542a8a512d577fdb34", "10000000000000000000000000"], + ["0x61bfce6fe4fe2901e1255702e7388c24fbf84c25", "10000000000000000000000000"], + ["0xb3956cf916d72b56b36577c13f2acba868d26c5d", "10000000000000000000000000"], + ["0xbcb2a27048dbcb983ab00829679a1c4b004505a5", "10000000000000000000000000"], + ["0x518199a207a142ee06610e3baff187de184d6dd6", "10000000000000000000000000"], + ["0xc4b2d4c8c7fe747c40050f238fd09e5c5cbb5869", "10000000000000000000000000"], + ["0x41c97ffd1b0427d6961c7a3a4325ad8ff5213d7a", "10000000000000000000000000"], + ["0x0959ba0cabd2ab398c2c2fa7d398c2310eb4cfaa", "10000000000000000000000000"], + ["0x8ec4ac695ee355e544e024b0500247321c922dc5", "10000000000000000000000000"], + ["0x0c142f334643be2eb555e28ac1365d27a0872849", "10000000000000000000000000"], + ["0xc25798a86da18c56aa19ea11aab217ce53bfbb2e", "10000000000000000000000000"], + ["0x3db6c3cbfe1ec01f81c1acbcfb3cc8338c8f958e", "10000000000000000000000000"], + ["0xc3da4c7a75cb02b6c90e57f62aa6f749cfba254e", "10000000000000000000000000"], + ["0x33d288c6f473cfc32a837e6717d276891dd5c9fc", "10000000000000000000000000"], + ["0x1d12ef0edc253a3744352cb2518a5dc2a1b0f928", "10000000000000000000000000"], + ["0x3d96b71e0c13f1ffcfa4bace75b92715370d2f5e", "10000000000000000000000000"], + ["0xa856a47eee22fef15c855613e66912d2deeaf135", "10000000000000000000000000"], + ["0xc4e4149cc6e6cd63f44735824632fc17c9cb79e8", "10000000000000000000000000"], + ["0x79f57e53618d51eeef5baddea0cb2fb2a0b836fb", "10000000000000000000000000"], + ["0x7288933308a14c55a3cf6add0deb00b5dbca8951", "10000000000000000000000000"], + ["0xc4477d22eb18932331e86eeb6da26d1711e43997", "10000000000000000000000000"], + ["0x7061e70b88268765072520a44d0a1e326121959e", "10000000000000000000000000"], + ["0x82a99eec2fc2ea9d7ce68a5b48e893fbd135ac31", "10000000000000000000000000"], + ["0x957b17da5ff2ad20b123bf11ada5105465ecd09b", "10000000000000000000000000"], + ["0xd7a3bc9af6a4e6653ceb0842b0d3a914232bc4ac", "10000000000000000000000000"], + ["0x7b5e82a13bbec350d81374d99eb4c30140cf09e2", "10000000000000000000000000"], + ["0xde8147deaf08e5d4d345fded89e96bba39ba0a8d", "10000000000000000000000000"], + ["0x2198ffea0be9e5d666cd1f57d2680839891dda3a", "10000000000000000000000000"], + ["0xaed19ec110d850b0d34609927c43970750c42494", "10000000000000000000000000"], + ["0x3c72abf6f7c7490736b1d623e459fbd7a91a8743", "10000000000000000000000000"], + ["0x3136540ebe9c2703412b387dcd993ae0c1232a18", "10000000000000000000000000"], + ["0xa2c967b2590f73b5d9f641a84513e1bab92ba301", "10000000000000000000000000"], + ["0x4b70fa020654a4b52a0a5e2b44db0f05f2378764", "10000000000000000000000000"], + ["0x81cb8102b18045d698c184a199de742f0efc99ce", "10000000000000000000000000"], + ["0x320bfde66e78d741d739e8852699bb9364dd46ea", "10000000000000000000000000"], + ["0x0c797ae93211d918ba59938788170ef17f812ef6", "10000000000000000000000000"], + ["0xfafb0aba94438e20fc73c518c0737823f36ca39a", "10000000000000000000000000"], + ["0x3086e62472801e47c99316b695d2d9733212b981", "10000000000000000000000000"], + ["0x5e510bdd3c1aa904c70acfc6e1c110a12fe24a1b", "10000000000000000000000000"], + ["0xce8fee93efae505980413f345f7f530f4d1a9dee", "10000000000000000000000000"], + ["0x8328e993824843a5348e1c1a9194925f468d7dee", "10000000000000000000000000"], + ["0xf94e7b042241e71a2c1f1fcc171c5d876dc47f0c", "10000000000000000000000000"], + ["0x295f6052269e4097d6dc18d36c48de2b390b38bf", "10000000000000000000000000"], + ["0x6e66f477e0bc825137ee18434ea2af9b862c6191", "10000000000000000000000000"], + ["0xf9f2cf0bfbe63b89f141244a6522f5d9dfe4039d", "10000000000000000000000000"], + ["0x6c3a4ce1995e69b4b1851477055c8756984c4b1e", "10000000000000000000000000"], + ["0x8bd42ceba1ac37fe6e1fe8ef545d94fabe4f1fab", "10000000000000000000000000"], + ["0x85330b3a8ac3209c9b16791470f9a69c5cb44970", "10000000000000000000000000"], + ["0x990e5e85387f04354c90845c82a448478c166d17", "10000000000000000000000000"], + ["0x390009b6400888a869b790ba8add3e588dce992f", "10000000000000000000000000"], + ["0x6339e9b65dae5f990cebd40bd171cc16a74f9d26", "10000000000000000000000000"], + ["0xef3f09025bbfaf8bc0673cd539d40f2ad98f5416", "10000000000000000000000000"], + ["0x3e40634d50c2382923e85c877050e2d1f1841348", "10000000000000000000000000"], + ["0xbffac4187d7bbdfbd3ec8e4c5e706e77ff847523", "10000000000000000000000000"], + ["0x742e4a93ea3f3d91b408c738bf17b75b77f4e9ad", "10000000000000000000000000"], + ["0x5653e1c2d1c1a0f3b0b67b91d4c718c000e68f9c", "10000000000000000000000000"], + ["0xbf816189f827777a11ec129bb062456fcce09cea", "10000000000000000000000000"], + ["0x35d918542153109253d5b7d8d4935a6890f9cc80", "10000000000000000000000000"], + ["0xac3b7e023df1035c6971cc9a9871eaa8d1f4ee5f", "10000000000000000000000000"], + ["0xc06fdb17e63c3f58e959b4cdbd0d0ce49a4fe5e2", "10000000000000000000000000"], + ["0xf999493a9785ddac946b9f1f516a79511f0014c3", "10000000000000000000000000"], + ["0xea793efe12f6d9297741199e5a57e3918f2a0fca", "10000000000000000000000000"], + ["0x01c0bd4dbc178c9f2e84c545603e0f0392d1a553", "10000000000000000000000000"], + ["0x910336910d9202999bc17161b95ab9ca14187f0d", "10000000000000000000000000"], + ["0xa79521ad05ce767047048eda8a37dcfcd26a2a18", "10000000000000000000000000"], + ["0xdda2dd3bca56ea616111c0f6b8aeb5a7b6845d82", "10000000000000000000000000"], + ["0x58fc252d4a7393b9e4cbfaa619f97dcc97b42631", "10000000000000000000000000"], + ["0xcfad78f8e2de8eee753d8b40ee8833ce169188d6", "10000000000000000000000000"], + ["0x8e9fadd4dabb560c6366339fbf241d10d8ba33a2", "10000000000000000000000000"], + ["0xbfd55f6bd156168dc4c9213e63fa539954fe4110", "10000000000000000000000000"], + ["0x544c8fb835aa4c5a26129b20baa418a8154c0aab", "10000000000000000000000000"], + ["0xf8608049ea0ba52622c3e96924bff2144aaa38df", "10000000000000000000000000"], + ["0xa0ecffbb906e6628d2a398f2b8f7c92f5aecd8ba", "10000000000000000000000000"], + ["0xbe2615b571502afa5a5dfdb0361e7f2f62627606", "10000000000000000000000000"], + ["0xce7631d978c4cdb1184435bb6581a5b76aa10ce6", "10000000000000000000000000"], + ["0x3e5111973cc681e36b8fe8a41b38699139b42bdc", "10000000000000000000000000"], + ["0xd1d513c5c0c200fcfc21dbcd24ea81437a821b0f", "10000000000000000000000000"], + ["0x14cf589818c2b04b454d36ce8c4225ec04649406", "10000000000000000000000000"], + ["0x8a23f18e8a9d2d017e21857610fa7fb3438bfc89", "10000000000000000000000000"], + ["0x788719cbae9a9bd3622e549765edb61e29098457", "10000000000000000000000000"], + ["0x7a274bdbdae4af10406502bf742f8cfb77069a06", "10000000000000000000000000"], + ["0xb4628e64079398379aed2485e3fb05424cf57dcd", "10000000000000000000000000"], + ["0xdf607813e808063dcd68d4c12cb39a964d21d329", "10000000000000000000000000"], + ["0x653d8bfa24a06a1edef740057d35ea89807e8170", "10000000000000000000000000"], + ["0x9e61230a7f37add321f82b7a546d99678dc3cc41", "10000000000000000000000000"], + ["0x4964d39f28551e8a2d703144ec7add1fb97f9f6c", "10000000000000000000000000"], + ["0x0d6f394a1ba9f80c7984a90784fd46c12adefb81", "10000000000000000000000000"], + ["0x461abb509f2d017d4a2091a7c91b583282fd148d", "10000000000000000000000000"], + ["0x0c2283e4a76eccb11784ad4e7dd049bd31c6753c", "10000000000000000000000000"], + ["0x9ed9f90362a7b2509d753bef8af3a164804e1761", "10000000000000000000000000"], + ["0xaa904493622a146fa04799626eb8b27f5e6d9f0e", "10000000000000000000000000"], + ["0x27132b1c44ed20bf54ed53d13557485dee422a66", "10000000000000000000000000"], + ["0x4614bd31c121e8c8d6c73db7dc06645dbde670dc", "10000000000000000000000000"], + ["0xc8b8f52fe929731ab4a66c0ee3606293d2a63467", "10000000000000000000000000"], + ["0x13d8e76e2674d4457ad3cf3ffa7ac068f5c91f83", "10000000000000000000000000"], + ["0x1786a4d979138c58a0a966cfb0b028020b165d0d", "10000000000000000000000000"], + ["0xe44b88dadbac54ba75beaa07aae99b243b0b9f87", "10000000000000000000000000"], + ["0xf0c6f42ed9a560c0301f87cd81768f3d015b7788", "10000000000000000000000000"], + ["0xfda9622805b436bfed46381ebddcc043eb2ff789", "10000000000000000000000000"], + ["0x95727815db52cd0e09bad68ab92213935c32c937", "10000000000000000000000000"], + ["0x80b759f0a9391e64351e6b94e32c384a40d96b7d", "10000000000000000000000000"], + ["0x105badbbd9fe1ea1039dcaf217b5537c7bd53c20", "10000000000000000000000000"], + ["0xb468590c2f22608890b82121c0f0d73126f8ed99", "10000000000000000000000000"], + ["0xa79cd80e47ceafcbf8583405a04dcaa8f1823396", "10000000000000000000000000"], + ["0x8b0176be32b4cd028d52755b99250202e1d4118b", "10000000000000000000000000"], + ["0x8cab89fa802710d92ea99fceb67566a6457080cf", "10000000000000000000000000"], + ["0x9881565cd25dac0174f3f5706842d7041999bf08", "10000000000000000000000000"], + ["0xdc8bddc41008a38ae53ab5edd2b5cc954784d888", "10000000000000000000000000"], + ["0xe002fa6d0ecc0809a836f62c54a5c9ee228375f3", "10000000000000000000000000"], + ["0x7e132fd2322fc120632dad83790d3f343d81dd33", "10000000000000000000000000"], + ["0xb2e8379220ab36c38da6adbc974f5bbac2989db5", "10000000000000000000000000"], + ["0x99496a4c0426e3dc0eeda7f28298774dbecf815a", "10000000000000000000000000"], + ["0x00f4e673cbaa5bdd1551d5d9b5c442fa3cb6f510", "10000000000000000000000000"], + ["0xafbd8a1ac79c5ef7ad396a06c8f3ed7fea4c5dd6", "10000000000000000000000000"], + ["0xef782b830c609149d3e8210e6a186f86c8b9a1e8", "10000000000000000000000000"], + ["0xfc3d9bec2e0874ac5ff540692b7a28941b9bbb47", "10000000000000000000000000"], + ["0x5e0ff987fd553b8c814fddeb201ebed1a73e9751", "10000000000000000000000000"], + ["0x1e8b0ffd7189512e0f0897ddc1749760389b456d", "10000000000000000000000000"], + ["0x2e148e78a11e2c6fcbd11c98fda2e79aedb537a5", "10000000000000000000000000"], + ["0x88cc3e896c4c178ab98333dcd29c33d2cc2102a8", "10000000000000000000000000"], + ["0x2b6501b74149cbe243bf5897ed780253791ee009", "10000000000000000000000000"], + ["0x41e48af7bd19ebc2fe19fa0d8e0b721bedf10573", "10000000000000000000000000"], + ["0xd46c61ec25a6a568a51afb4248ed42ff6f70f181", "10000000000000000000000000"], + ["0x8c270f234cdcbd30d281799b584db3d0789e1317", "10000000000000000000000000"], + ["0xb91ce51ad82855a8c3269d175803cbf197331db0", "10000000000000000000000000"], + ["0x61f932a755e2e489839ae7853a69fca855b118ac", "10000000000000000000000000"], + ["0x95d7e264eaa821c313134dd72ca678dfeaa4067e", "10000000000000000000000000"], + ["0x3e3d2a8f9f116621234c91aae1e52331c9ab3ec9", "10000000000000000000000000"], + ["0x7502a1cce098394d71da3b77678254c657f62152", "10000000000000000000000000"], + ["0xfe8f5e90b236302c9db977e2ef9ae260d4842cbc", "10000000000000000000000000"], + ["0x2e55c161ff59635777d5e6bd5324041b80ae8034", "10000000000000000000000000"], + ["0x174d8441977f4492bfc7c7be26bcac2056cbcb10", "10000000000000000000000000"], + ["0x1ca20d63ff66314b82bfc3c4af942e919fdf2fd0", "10000000000000000000000000"], + ["0xf3f1d44125447ba5085d38474142edf973c4041a", "10000000000000000000000000"], + ["0x2b86e171ea99d2466814762436734a3823fcc8ce", "10000000000000000000000000"], + ["0xdc80092ea3610835da05f66b489f06dffc77bff5", "10000000000000000000000000"], + ["0x28af95d7a16ab63b5d816b5f12b605b7c2b268c9", "10000000000000000000000000"], + ["0xb2238198fd969e597b0cf636ccbc4de707123489", "10000000000000000000000000"], + ["0xfee2aa256b65efa5a78892ab14d206200ef5d7ae", "10000000000000000000000000"], + ["0xc3b424d84c3ae1c04a5e2c33860be8a1b89b72fb", "10000000000000000000000000"], + ["0x660f5420e6d0347bdce568e4f9abd3748f471f3a", "10000000000000000000000000"], + ["0xe0aef1db9cb60708202caaf9a505dfb8aa9bac16", "10000000000000000000000000"], + ["0xe290050f9556f76c7371cc3fd0b09eb34a869d7f", "10000000000000000000000000"], + ["0xe53c0315004bcd22b3b598c04a09b0c8c3fb7f34", "10000000000000000000000000"], + ["0x4f8716018ccb54ac64b68cd1d5f205d6e9818ac1", "10000000000000000000000000"], + ["0x1a9fa4d87f76cce6dfc143d28e73f69638096895", "10000000000000000000000000"], + ["0x4df86dcd6f836e8974a49d14fd7f4cabba78c012", "10000000000000000000000000"], + ["0xae58cf5deb81b849cbdad6e462b7c8c831813f17", "10000000000000000000000000"], + ["0x17ba3a6f59d4287ddc5120f5df42611d9c76cf4c", "10000000000000000000000000"], + ["0x8a2b108bee6fd05af78828682fa4dbb6aca4bf3b", "10000000000000000000000000"], + ["0xc49b15298c1ba9920caa36e4abe2ef080ffca692", "10000000000000000000000000"], + ["0x360a8c16f60acaa92b7ba3512ef0350a96628cc8", "10000000000000000000000000"], + ["0x1fa85889e388802cefd30b3104e8cc6f9a6eccd2", "10000000000000000000000000"], + ["0xa5038c7717d2b082c6301cd68093e8ad3b5dc466", "10000000000000000000000000"], + ["0xb63cf382fd5805f8a377cfc6eb75fdd46b9ec847", "10000000000000000000000000"], + ["0x8fc770715ac29266d155960c940204518e26e586", "10000000000000000000000000"], + ["0x54ca1ebd499d694f94c0f0e75b851c5e154f519c", "10000000000000000000000000"], + ["0x0ca3a47840cd9a4156f1268dae0f7c65cdf0dc25", "10000000000000000000000000"], + ["0x8685141579a4d62b198301063a4b59270c2d1fcc", "10000000000000000000000000"], + ["0x3e9692ac50af0083aa224a57cc329235d872be4a", "10000000000000000000000000"], + ["0xa663590cb3071c5161d243a72caf16feda584993", "10000000000000000000000000"], + ["0x2ce990adc9e3310bc68240119fbfbc2c889fab1e", "10000000000000000000000000"], + ["0xb3f702af57fd6409bee50f43d1024b5aa500410b", "10000000000000000000000000"], + ["0xbb4e989f6f57ef2bf6e307fe89aee29b7509b762", "10000000000000000000000000"], + ["0x9cc62dbb138093e72291ea20bbea62b8b0cbfe42", "10000000000000000000000000"], + ["0xd8e1aa74ef85f17f2ea8301b42f17eebc3879269", "10000000000000000000000000"], + ["0x045d21bb1807d4f96b17479b619aa8376c16e696", "10000000000000000000000000"], + ["0x5b68f82525c3688d9da8603ce018fe2110692a49", "10000000000000000000000000"], + ["0x4f4317748fb27ea53d770282d1de357d3b0e20a7", "10000000000000000000000000"], + ["0x9fa36d7f704890969255ef680ae5f45f74c45614", "10000000000000000000000000"], + ["0xb9de6af66902305e14a81a113986efac1f40dd09", "10000000000000000000000000"], + ["0x9170f03f451896ce80e7678a4c95ff845d3b431a", "10000000000000000000000000"], + ["0xac1bd1c6dc224d7538507d5a8f8d1e517d385d89", "10000000000000000000000000"], + ["0x02bc4b5f1b91780e462b90aa0deef6dff9481d64", "10000000000000000000000000"], + ["0x8d3c0495a3bbfa0940840064cf30a0d2c0b75b2d", "10000000000000000000000000"], + ["0x9acb7a770a8a6a3dcb381e492cc5793f6ba40f70", "10000000000000000000000000"], + ["0x41f1dcc467c912e9752b9905cb6cccade7f85f27", "10000000000000000000000000"], + ["0xf7977e5e81d9caef2d2e80bc73c0ea28cc49c75a", "10000000000000000000000000"], + ["0x357b04177c70faab80d567154666f36f91356906", "10000000000000000000000000"], + ["0x8e1304d4ec77c17f85362494662154eef7a1a865", "10000000000000000000000000"], + ["0x3af3c36cd8ad782290600d655640db0d88258068", "10000000000000000000000000"], + ["0xdac60a975597741d10aee740c044aec22a0f9f44", "10000000000000000000000000"], + ["0x706267573810dc5b3143977478d3c8bbf79aef0f", "10000000000000000000000000"], + ["0x32326fb83189fd32f6412c30dbda1d110858ece8", "10000000000000000000000000"], + ["0x525c8ee9be82b647218aea01c2e914b70469d966", "10000000000000000000000000"], + ["0xfdfb87d1ee9e369c67755e3adb1736b26067b05d", "10000000000000000000000000"], + ["0x5a32ff1ffc4b4587b6d9e587be787b10ebef17ef", "10000000000000000000000000"], + ["0x4167247acd955124fff268ab657693c2a9a9d00c", "10000000000000000000000000"], + ["0xd9efea29ea8cb6cb23dfabb088531d749fcb502d", "10000000000000000000000000"], + ["0x96eacc68caa66ce13988c7a05599f83c4440ac9b", "10000000000000000000000000"], + ["0xb0a9de2479f5cd97669b0fbd4d1ee1ef70c99b22", "10000000000000000000000000"], + ["0xea46a28e5e2bd27432437bb54e1796b102c6a47e", "10000000000000000000000000"], + ["0xbf77f58fa7bb4086c47349a5dc16d78b38c0e94c", "10000000000000000000000000"], + ["0x0be6dd5712a57913893f33422b1fb63c076cef0c", "10000000000000000000000000"], + ["0x2c81cce3f18f25f77c2763c6940e53bbe3257415", "10000000000000000000000000"], + ["0xf665fa4163412f3ec094578f31e5e90dfa9fb412", "10000000000000000000000000"], + ["0x8e49b61be4f02d68eb620954730b5cc74ef53b92", "10000000000000000000000000"], + ["0x01c3a0aa472a156af8c2edb04d4459d8d2fe7c5b", "10000000000000000000000000"], + ["0xe3896ec9d6d056939844007d503b95ca3b1c05ad", "10000000000000000000000000"], + ["0x31dce26a1cb7001cce3b7488431c3521d10c010b", "10000000000000000000000000"], + ["0xcc6cf3c5e02b51e9f45d5170ab640bd743c4ffb5", "10000000000000000000000000"], + ["0xd263b093076130d5c2db662e2237532b6eb8cc87", "10000000000000000000000000"], + ["0x96edea2c6c23c40185c3adfd8805c236d091c21f", "10000000000000000000000000"], + ["0x69449f50f833185dd09b5cd0afa6872d4f92d1e1", "10000000000000000000000000"], + ["0x5835a02d0f46b3474305b2612ca9c6d61a973822", "10000000000000000000000000"], + ["0x328ba899bc165dc0b2e1f78999b6ac499a48e2b4", "10000000000000000000000000"], + ["0x61fc898bd97ab50c72780266f2d4ab251db07458", "10000000000000000000000000"], + ["0x8c0680efc3404eafdc7a506e221f60b70a88a43b", "10000000000000000000000000"], + ["0xa1cf8209979ee8da52b2b0f1335cbb9b3065ab20", "10000000000000000000000000"], + ["0x409fbd2cd0a755ef2d005af5b72ebf24d68a1e50", "10000000000000000000000000"], + ["0x0c1eb4da74daf337bacaddb2850b3b93d8f646cc", "10000000000000000000000000"], + ["0x24b920280b73f550cebc0bd002b82d8b573dd6f2", "10000000000000000000000000"], + ["0xd6a113f95a860036f1dcb6e6c0bd2d6fd43ed6ae", "10000000000000000000000000"], + ["0xcd0a2de6fc3a2409b0a7cc0161797da8e8c128e0", "10000000000000000000000000"], + ["0x212114a050a94560ed9376eb15c0fd3c1b6cae45", "10000000000000000000000000"], + ["0x62eb62372c1c489fa83fb23a12b62093257da734", "10000000000000000000000000"], + ["0x17443f321a2ec804661fa41c873e0fe75c7f56a0", "10000000000000000000000000"], + ["0x0a3db74dc8ae7eed8e4edb3e92e7b929eed8c6e5", "10000000000000000000000000"], + ["0xec3c118bab9e5131dbd3e1ecfbb7122926116dc4", "10000000000000000000000000"], + ["0xcd91b9b8e1ca71e0a5c9ecc6bda33f8d26a532a1", "10000000000000000000000000"], + ["0x1c04432207aaa34da9ec3c6549b5e4996d847dc9", "10000000000000000000000000"], + ["0x3c9c41789f90825a61760c0b6419e8a0b312e810", "10000000000000000000000000"], + ["0xc1141fe5f58929529a1a3057c80b54d6b03a4d29", "10000000000000000000000000"], + ["0x915ad5d773d25c1e1afacebbf687ff54c1470381", "10000000000000000000000000"], + ["0xdf8a1c4cbb74a7a06e5c4a724ad34c9561ab358e", "10000000000000000000000000"], + ["0x89ec8c7699dff36dee9b1f79b00ad12b5a0a0195", "10000000000000000000000000"], + ["0xa92288c98bb57b0030645735e33b28bd50b619f3", "10000000000000000000000000"], + ["0x9e6224de8973bc4f9ba9da4a4322f9db6c5ef413", "10000000000000000000000000"], + ["0x4761bf691bb4346a7e3790ed1fc0581052a86d34", "10000000000000000000000000"], + ["0x51f0277abb28a731f5a52ce57a45daacfe9ebfb8", "10000000000000000000000000"], + ["0xac06a4d2b15566c2e827fc827e214098a8bd7411", "10000000000000000000000000"], + ["0x401918351b997816f802db30de7b4a21518a79b9", "10000000000000000000000000"], + ["0x9915f9204997b77184d8335c4a66986c2a3e124e", "10000000000000000000000000"], + ["0xcd5485a4875e4d5fdc8710cb5e55185d3da7f925", "10000000000000000000000000"], + ["0xa9f0dca0bb105f61856d1c177c0873b93773034a", "10000000000000000000000000"], + ["0x6da7b7f64c73ff7985f2bf55c71c2b46c9e41a5a", "10000000000000000000000000"], + ["0xcac68fffdb3ce264e23543343d75a01b8c29c1ab", "10000000000000000000000000"], + ["0x0c6665a2bd065dff1b01aed1d91627534cd49a3d", "10000000000000000000000000"], + ["0xbd11206f52ebc48db4252f72ea2508c2b1aee495", "10000000000000000000000000"], + ["0x69c167b99a780de252eb818a6029209ad3788fe5", "10000000000000000000000000"], + ["0xfd370d9ab0baefb11851a229e51aef162cd68358", "10000000000000000000000000"], + ["0x554781b03b403bf628b6174a86ba84b3c6f1454a", "10000000000000000000000000"], + ["0xcbae1c624daac0002cfaed5c40e9c6ac755d9c05", "10000000000000000000000000"], + ["0xc9b0de883e2749229b1e8349f30f88e061d0505a", "10000000000000000000000000"], + ["0x4f9d7a99270e6cd73ee18125b02494f19f0bce81", "10000000000000000000000000"], + ["0xd82ca6827a0f2c43883788fb8a2dcd44ed29159c", "10000000000000000000000000"], + ["0x71d3336f95ec829a4e6f96b6bc3f9da14cc03b22", "10000000000000000000000000"], + ["0x0a892e051157de5ecdc8d1b166f732a543a0ff6d", "10000000000000000000000000"], + ["0x6b44bc885a03a6f89465ab19c2204f0cef862810", "10000000000000000000000000"], + ["0x1942cdda93ae1b56de2fbdbcca200f0d5ec5ef4d", "10000000000000000000000000"], + ["0x6d760e87cc0a7d1421b686b8f0faad65416f15f7", "10000000000000000000000000"], + ["0x6032f5ba871404c425a04b6f0800fefc386ddd15", "10000000000000000000000000"], + ["0x613080b74a75eb7d649330d7279f548916a36eb0", "10000000000000000000000000"], + ["0x64268a5531cd895a7c0e84be4c7ed9cf96fc6c12", "10000000000000000000000000"], + ["0x4bcdeb1dca8a2407e2801ea4d9b18850eb61dbb3", "10000000000000000000000000"], + ["0x1882142b506101f35ce157eb61ffb6ea2545e05d", "10000000000000000000000000"], + ["0x68cccc13f4e0655536b2396c1444f8fadf0f77f4", "10000000000000000000000000"], + ["0xe760d2fcff38783761361518e8cf79b589d4de8a", "10000000000000000000000000"], + ["0x868110e3db5357b77986421e0adeaebe3d3a04fc", "10000000000000000000000000"], + ["0xe5b218700e71f05acea6a0eac74f5d2a221839da", "10000000000000000000000000"], + ["0x40f350d109c0f9f71e79f3001b14f419a8e75741", "10000000000000000000000000"], + ["0xb83e57d57bd60e315a248d2021388cc94a8e2f52", "10000000000000000000000000"], + ["0x67a0c887b9bc702f0d881806b629852caed97e98", "10000000000000000000000000"], + ["0xb44bf7c8b81c85f6fbaf3f7d03de45106c793b5b", "10000000000000000000000000"], + ["0x6d98309340fb8dab4b2cd46eab754929aef3c313", "10000000000000000000000000"], + ["0x24fe29cdb9ff152d93183f62d53604d8f3502485", "10000000000000000000000000"], + ["0xd259d6f4314ca6ba596451b6a5782ec2763bba5a", "10000000000000000000000000"], + ["0xdfab1639e5ee371805484f572422e2fdf9b1398b", "10000000000000000000000000"], + ["0xdbee3104f8790208e2980e4acdbba3d8f0c44848", "10000000000000000000000000"], + ["0x599bfb1fde32960c81b29ed2e99b1ffe4f9deb12", "10000000000000000000000000"], + ["0xba41a3b71560ef120498f6f1b87ab273f6f737be", "10000000000000000000000000"], + ["0xd9369e74ffae45412fd2c75cb055fdd7876fb2b7", "10000000000000000000000000"], + ["0xa2bab972d07cd5dc079845bc8880c06439c2f244", "10000000000000000000000000"], + ["0x2dda4f1e44ab1173d81099aa725a551093f7ecc6", "10000000000000000000000000"], + ["0x5b758931dcb89f07dd23c2bedf10004071d6b467", "10000000000000000000000000"], + ["0xd7fcd7c92d184c2c3d84721df201f9bc95b32f4e", "10000000000000000000000000"], + ["0x97100df19cf2ae7992ba35d91e861d6f925417f6", "10000000000000000000000000"], + ["0xf8745c33c1588a7bd55dc498b96d9481f885c243", "10000000000000000000000000"], + ["0xeb41fe1090bb7a7fe6162de8fea3c16051544cf4", "10000000000000000000000000"], + ["0x64f2ebde230da818000d545e820aca110abe7d51", "10000000000000000000000000"], + ["0xa1acc88b50248b6556e65d5d5ecd51a997e370db", "10000000000000000000000000"], + ["0x91611f17375142f46999fe2b7c32c31782841efe", "10000000000000000000000000"], + ["0xdd21941e0d2a8a0ce7fc5f186c1d1c12f913a33d", "10000000000000000000000000"], + ["0xa39938007c9d48714b2a039ff6197f7329ec6fdc", "10000000000000000000000000"], + ["0xc6c9d802bc16d8746aafcac4781f9a8d442d585d", "10000000000000000000000000"], + ["0x96d1ee9fb9a841dbfe8605857871e568935586fa", "10000000000000000000000000"], + ["0x53cb5265ec16ccbc89aee4f924388009dd5d048a", "10000000000000000000000000"], + ["0xcd55923c253c0177172911f2f7ba9e5f7073f4bf", "10000000000000000000000000"], + ["0x6d478145a63ff539f1406220a018792f9b51fad0", "10000000000000000000000000"], + ["0x659da58f1eaf1bea47542fecf2fef36ec9f1eac2", "10000000000000000000000000"], + ["0x21375871597130eb0a7b825658da464f86ad4f48", "10000000000000000000000000"], + ["0x1da318b980bd5577f2cb21777635cad9a292fc64", "10000000000000000000000000"], + ["0x0ee72348a52c1543351b4382d943ab4a2d1848d3", "10000000000000000000000000"], + ["0x13d8ea39567bcb8b49d86bb786ff421505cf59f0", "10000000000000000000000000"], + ["0xf7e11cf5a04c3cf0061928d8c0b417464e08eff7", "10000000000000000000000000"], + ["0x83799c180b161b3a52eecbdcaa1750881aa65426", "10000000000000000000000000"], + ["0xd3a58b0268b9b249661726bce7d498b3622ad1c7", "10000000000000000000000000"], + ["0x757ab63222b3cc04f9df32a33ab5e0b15f4fefca", "10000000000000000000000000"], + ["0x50e505a74bc525c0410c6df6d2c723a91289d440", "10000000000000000000000000"], + ["0x9cbc1a8334cf32fa596f40133e071efa30cde3e2", "10000000000000000000000000"], + ["0x0146ef4fc66ec0902818221f98549a2b9b13bf59", "10000000000000000000000000"], + ["0xd5e77669d038afd6ce06fb032ec756220b39dab4", "10000000000000000000000000"], + ["0xb4ef9a2a020c14337e7e0ef9ebad8b1c2d50eec8", "10000000000000000000000000"], + ["0x78a9e315c6d6fe8ea0ee1cc40ead04477f02bed1", "10000000000000000000000000"], + ["0xe3803f7010b5581bbed1dc50ce09b7e14a05bed9", "10000000000000000000000000"], + ["0x9b985bce86c5af3e6071222c8cfd6012522b07c3", "10000000000000000000000000"], + ["0xacbb228856f194aa5f7001525211c22f097c75cc", "10000000000000000000000000"], + ["0x8eadad4a88dc4ee218529b4e9517c80c72f35fab", "10000000000000000000000000"], + ["0x2f7fbb348059f2aa899c2d0838fe4824d25ae65f", "10000000000000000000000000"], + ["0xc36cca68158af642ee2d83982ae42c7cf196d1bd", "10000000000000000000000000"], + ["0x136c613c400e5fd1ef4b6c1d47d9f8fb8803c946", "10000000000000000000000000"], + ["0x2e26eea6e806fc6331fdc5d1d11aab3dc3bd60b2", "10000000000000000000000000"], + ["0x38ea78de44c7a0e56ecc172284a41773cebc260b", "10000000000000000000000000"], + ["0x2eacd09e92273d5fb86cf40504917f664ee15da8", "10000000000000000000000000"], + ["0x9519a4c81b5f3281e6baae3496c0fe70b97b36fc", "10000000000000000000000000"], + ["0x2060970cbb9681ed667ae0624abf73bd5fa99a28", "10000000000000000000000000"], + ["0x03616be5b794cdb242340b97b93eabc855244376", "10000000000000000000000000"], + ["0xbcb34dd9351dac05d061a60dc4c07b522613995e", "10000000000000000000000000"], + ["0xf5ca017c3db54d0f380a3da12521d5ca40ef3981", "10000000000000000000000000"], + ["0x10c5f89cb714d908e4cc3db31c4d551d6ee15061", "10000000000000000000000000"], + ["0xa42ee67222e8756b1fa987aa359ed2f59932283e", "10000000000000000000000000"], + ["0xac145add2e42e6bc5ce81dc35268420b0672c431", "10000000000000000000000000"], + ["0xa2e623425160fb596b58a95485a2505baaeaf9a8", "10000000000000000000000000"], + ["0x46b9ffe94a7b9b8db830b058834978be31d4e414", "10000000000000000000000000"], + ["0x8c523eeb4aa347423983298af4eeea05d4d6e2c5", "10000000000000000000000000"], + ["0x6eb7907e49187d231cf8e3849b24183a3ed7a9d0", "10000000000000000000000000"], + ["0x052390813b25ece17f855c65f4dacb094f23eeba", "10000000000000000000000000"], + ["0xe95c69de2c03a7152fd334a7790ed86d0f7ff85f", "10000000000000000000000000"], + ["0x007f2a96cbdf08bf1a58f1de3599cb67571a40ac", "10000000000000000000000000"], + ["0x8181f49f1ae41d5801bb9239d2bec888e60f83df", "10000000000000000000000000"], + ["0xf0320a025904029713cba832376cddc0119a952c", "10000000000000000000000000"], + ["0x089b147ebe5cee7b844f6aad2e3d129a4506b16e", "10000000000000000000000000"], + ["0x886a3033fa4bebe2bf687d982e9350e249fbb2d9", "10000000000000000000000000"], + ["0x335a5f686a1e87915d586d6348cecace4fd1f289", "10000000000000000000000000"], + ["0x9386be091ef974611c103f95d6ee8805767b2020", "10000000000000000000000000"], + ["0x22b90bfcde85f75d8de08b552b837aacb561e968", "10000000000000000000000000"], + ["0x8bfff78edbfa534fe52dd87d945dac9a671957ae", "10000000000000000000000000"], + ["0x1b83218bac7e4857d98e0eba0f2f263abde2421d", "10000000000000000000000000"], + ["0x9f6bc999298a31973b343726f1c84a8c1f7e8c91", "10000000000000000000000000"], + ["0x3c6d73475d8a64cec5b5170853ab38ccf51eb130", "10000000000000000000000000"], + ["0x0d66fc519f0a4616603aeebe4ccb52c8246ebc96", "10000000000000000000000000"], + ["0x3701ecf85eae013842224c9e0649f97ed2bbfd72", "10000000000000000000000000"], + ["0x56b0d4debfa7ebcdccf1c726d2e20d335c6b4db0", "10000000000000000000000000"], + ["0xbd7d947f4c68b9dcf5292ddabb6e533c3625257a", "10000000000000000000000000"], + ["0x9629378dd9adbf50d572d31b5925e8f973b2b36e", "10000000000000000000000000"], + ["0x45b5853e83aa71c81c1bbdeeed8487aad35c8f85", "10000000000000000000000000"], + ["0x54ec0f31378c8fef5abd9ff0be137f5a1fe765ae", "10000000000000000000000000"], + ["0xbc94a1fc41c82c65ae6f48e93856840d2530344d", "10000000000000000000000000"], + ["0xf1f12493b2cd11414f4661f5dcba9f912304d374", "10000000000000000000000000"], + ["0xc417e40fa2f1da0c275028f899408e89a7610318", "10000000000000000000000000"], + ["0x7069839f10fa2df4c1683395800264ad8b3f5560", "10000000000000000000000000"], + ["0x198788c6464a543fa0bb0e7938f790ccbce8522f", "10000000000000000000000000"], + ["0x9a6e6cd88351cc484c1be29689fe2b4413e90f4e", "10000000000000000000000000"], + ["0x3c6c0e87e42cbe52f040eca9dde982c46ab5efbe", "10000000000000000000000000"], + ["0x4f062d55a46eb724e0b1a95bdcfe715c778471ff", "10000000000000000000000000"], + ["0x3b58b97485cbfa5ddabb9852ccc612edd97afd8f", "10000000000000000000000000"], + ["0x70fedc4a7c06b055c2f39f3e9d7f78c173c438c5", "10000000000000000000000000"], + ["0x86526f570ca6c2c9ffb4a535ffe50fa56fd9dd87", "10000000000000000000000000"], + ["0x9a214bd8eb5dfac880df184640e6a5b73be59ccb", "10000000000000000000000000"], + ["0x5233d3460ecf216ad5de886b2d9a4bf0698219d8", "10000000000000000000000000"], + ["0xd70cf5cfa19eca9af10ef3b62bae57458058d2dd", "10000000000000000000000000"], + ["0xa2db796f0b89db0d4c1a0b94213e4878b2e9b36b", "10000000000000000000000000"], + ["0x173740c91c5015bab10b3830676c9c4d4168d8b4", "10000000000000000000000000"], + ["0xf02d24acff9893df026c0f80d4fa41e2ecc73b74", "10000000000000000000000000"], + ["0x693419bb4fd60c53da83af223b347288b8a352df", "10000000000000000000000000"], + ["0xdeccd02d72ba5304a885264be43b604990939189", "10000000000000000000000000"], + ["0x59427cd74811cd0528fa8169ef553c5cf4960ef3", "10000000000000000000000000"], + ["0x904741012d539bef640ce16a8364d1c3c2c773a5", "10000000000000000000000000"], + ["0xc1586c071516c2b7caf9ae65194449ae3c670c04", "10000000000000000000000000"], + ["0x874d021ca047a114b9833290490a6f16a68f7a72", "10000000000000000000000000"], + ["0x90ac914ae057050395484459181eb916f0e50f71", "10000000000000000000000000"], + ["0xf93c380ee224063334c2ef1a3af4eae7d74b70ed", "10000000000000000000000000"], + ["0xdd37d8a39bc7efd33e7e20826c5edb518370d8c7", "10000000000000000000000000"], + ["0x87a5f68bf6af01519982f3846cc408d027dfe174", "10000000000000000000000000"], + ["0x0000000000007f150bd6f54c40a34d7c3d5e9f56", "10000000000000000000000000"], + ["0xc1e308014cad4cfae79759caf740c98ef57f4783", "10000000000000000000000000"], + ["0xa095d9f9e49cde356bd1a0428edd88bcd5b46c59", "10000000000000000000000000"], + ["0x462898ad742c7d5a02ded65eb78964e035f6e448", "10000000000000000000000000"], + ["0x27f364a96cc92793263ee07214b38e68acad220f", "10000000000000000000000000"], + ["0x8fe0cf1b42d12be68058944105ea1d956d2f848b", "10000000000000000000000000"], + ["0x6f5c2cdb3411481b5d8c1a2f17f211c41fb22698", "10000000000000000000000000"], + ["0x2e0a9d5ec769f4d9cc4c2455f2eacc9c3de043ce", "10000000000000000000000000"], + ["0x7dd6426d14c25e47f13b4f0cb1f2fb695c5a0e2b", "10000000000000000000000000"], + ["0x4bbd1d4542d315447c715cbf107834ef15ce9d44", "10000000000000000000000000"], + ["0x94b1243a186ee0e92dfa0a1d7d2d38b6935d1146", "10000000000000000000000000"], + ["0xe335b972e0c5237bdae8bc55bb7b40fc8b927fc1", "10000000000000000000000000"], + ["0x161408732fe88c487d06e78bef86b0a49c2641a4", "10000000000000000000000000"], + ["0xcec63c49a3ac904d20f74dc44e49e2abbf9ca4b8", "10000000000000000000000000"], + ["0xed7115544b9dd9e997441c4236d17e495ff3280c", "10000000000000000000000000"], + ["0xeb2375b164c734081cf76cab1eec0949d9e0cfc1", "10000000000000000000000000"], + ["0xf7ead947ffbfefbecd0963d9c547d470b37439c9", "10000000000000000000000000"], + ["0xf5556f61810e6c8c0741fd03f20032af4276ccdb", "10000000000000000000000000"], + ["0x54cc7c5281e0ad8158a48c5d2d308e33989e7b48", "10000000000000000000000000"], + ["0x39889ebae2bcc641f9fea9646ec668e4987534bf", "10000000000000000000000000"], + ["0x41e524a757e83c51535bf8bdbf3a9bb992a5dfca", "10000000000000000000000000"], + ["0x60fb9bf2d2150efa7d8d23cec63907e5711fe42a", "10000000000000000000000000"], + ["0x1345dbe1a6fcd48be3074294bbe12d5e078c1c98", "10000000000000000000000000"], + ["0x924fc4d6c2fd3a91fbc2a28760b6e6c01c168bc8", "10000000000000000000000000"], + ["0x729f805cebc72ef06c7e6cf229868034fda5776b", "10000000000000000000000000"], + ["0x0ce730fac3a07820fdc9e17bb68e3574f6fdfc0e", "10000000000000000000000000"], + ["0x92f1190086a287d48667aafd40aed165a35044ba", "10000000000000000000000000"], + ["0x9aeddd3e58d79841e79a3570069fac84de21fb0f", "10000000000000000000000000"], + ["0xf14c056414f8a6f75f6eef7dcaa94cf12d9a5403", "10000000000000000000000000"], + ["0x0f924c28480ff77ad01ddb9dfcd2d558dee56f05", "10000000000000000000000000"], + ["0xb2044676525ce37ecc9cf859861a27fd4652c04f", "10000000000000000000000000"], + ["0x9e291fd9095d3662fa3917927403f193912c0766", "10000000000000000000000000"], + ["0x5d35c351e4c718200ff04cf609a9d2c5d37dd930", "10000000000000000000000000"], + ["0x2bdfcc9d73992a8da349c63734ff5a50fa678677", "10000000000000000000000000"], + ["0x5b4cad9a8774696c4a1d31c5082338491138bae9", "10000000000000000000000000"], + ["0x1437033c44d4e4f3abbf79c06e5222e7f41cffd4", "10000000000000000000000000"], + ["0xff5eb7340f17b6308400a4692efc16e7969c9663", "10000000000000000000000000"], + ["0xe384c6124e0da68155563aeafb5adf8d0af00bcf", "10000000000000000000000000"], + ["0x914c7e671a046b7b216895553d0db7cfa72463e7", "10000000000000000000000000"], + ["0xc593a1668d9bc0f319a15a43ef21c1befe3d7d57", "10000000000000000000000000"], + ["0xa0c559760de28dde7d87087b4db69aea05c24f18", "10000000000000000000000000"], + ["0xc165a1b4188eb0eb10275f31a11f07902abbbebd", "10000000000000000000000000"], + ["0x6c472e04f34a7ae8bd74ffcefe4d5026b02410a0", "10000000000000000000000000"], + ["0x9e06af6bdd23d2b3920107f82247ab7ca18bc03e", "10000000000000000000000000"], + ["0x933e7205089c1f14a913bea6f1e1424540cb83a3", "10000000000000000000000000"], + ["0x3710f6a6af356bfcf86fba06f4e862e1d4283f27", "10000000000000000000000000"], + ["0x2c7a998197b51dd7f1981aa9e75a23b059f5a59c", "10000000000000000000000000"], + ["0x20ef5f3d39ae3230cf720b215b6f010f4c757345", "10000000000000000000000000"], + ["0x9925e32016a44a579abefbd191cf8862c75365ec", "10000000000000000000000000"], + ["0x05f3de310fe37a798cbd5039e4a9272baaba9c14", "10000000000000000000000000"], + ["0xd1fca26b21d9b795f63dfbbff8a8a9c7e591243e", "10000000000000000000000000"], + ["0x307c2908e197ab2a61adbd40b7301afdfe881e2d", "10000000000000000000000000"], + ["0xefb5ef346997390c2280e414a438b38b0615549b", "10000000000000000000000000"], + ["0xcb00edeadd800b172a6fffd12116cd2bbf24afc1", "10000000000000000000000000"], + ["0x8c31de2dba1f084fdb6d58959d873c68e2e762b8", "10000000000000000000000000"], + ["0x4ecdad670f6864239d442f4c213e861b48e58211", "10000000000000000000000000"], + ["0xf3ce237bdf667be3b0e6da23daba5380294b6b07", "10000000000000000000000000"], + ["0x99412ff8554137bed8a0d248fce93869baecdb4e", "10000000000000000000000000"], + ["0x9933e62bcada6efb795d77a914a311a49503658e", "10000000000000000000000000"], + ["0xc871ca05c704e0031208789555ef1f3f1a3ce0a5", "10000000000000000000000000"], + ["0x91d92b00d14098c933b1f0bb8a881a2ee65be4c4", "10000000000000000000000000"], + ["0x320ac2c6fc3eb2ccb8861ecbd0c06d7c7dad0295", "10000000000000000000000000"], + ["0x49e3d6a14e18fe7c631420533f4cabafea240b2a", "10000000000000000000000000"], + ["0x2b7aad8a12f4845f91d8047dd763d26432976264", "10000000000000000000000000"], + ["0x9b61b1bf5ec4df21e685dd46ce58280734ad20a3", "10000000000000000000000000"], + ["0x773dcadc1b5c57068987ca19de84a7fbb74330f2", "10000000000000000000000000"], + ["0x3aa80f86314fc45e380e14f06865d62e746b267e", "10000000000000000000000000"], + ["0x3458d62703f72a123a029648f08ab2ea4ca918dd", "10000000000000000000000000"], + ["0x31c04f3f6619cbb564e5f68f028d676d3ad8bfa8", "10000000000000000000000000"], + ["0xd668e0161fcbc6f1bf6d1f051c9c0d8f00253c2c", "10000000000000000000000000"], + ["0x225482adc95a9f23ff5c448419b2803fab9780d5", "10000000000000000000000000"], + ["0xa02234c3b3060553ddafee3afbf66ba94aafba8b", "10000000000000000000000000"], + ["0x652022b1f234aa39f5dd7a5ff1162574fd4a9646", "10000000000000000000000000"], + ["0x7fb7e6e71ac334bdcc5882bdf19e7f87191dfd8e", "10000000000000000000000000"], + ["0x36db16e254c1d37795e1a6b38efc07b91d7ec910", "10000000000000000000000000"], + ["0xf4a2c26e538e27ae54ad946907fcc0a68a7681cc", "10000000000000000000000000"], + ["0x75d076f0a9d560654fcadcf6a78c212c38e60bf5", "10000000000000000000000000"], + ["0x3e50030e520c629b9facba589f5ee50656204da9", "10000000000000000000000000"], + ["0xd073a914e6feea850c46143eebaa681373b65f67", "10000000000000000000000000"], + ["0x9b1e37be2659fcf010cadf27cc0592daf60f2b86", "10000000000000000000000000"], + ["0x8b84ea014a4cda04e9b57aeb4ea10296eef66d70", "10000000000000000000000000"], + ["0xb22311477095b537c3fc475a32f6b1d781bf9f2c", "10000000000000000000000000"], + ["0x47135dccdda3f0d0da891fed7aee21c0a546409c", "10000000000000000000000000"], + ["0x4a612d69eed0b8827ec9a212664ccdc9cb2ee67e", "10000000000000000000000000"], + ["0x69b2283c42647ddea1d9689d39679072112c9c0f", "10000000000000000000000000"], + ["0x5828ea3ce544ece493a44894d94c3b824bccbe31", "10000000000000000000000000"], + ["0xd0a6c4ab167e2e1538badc7259f6c6c68b6d3690", "10000000000000000000000000"], + ["0x6ba9d0c502127fa27964ecc61f9021f4e2066abd", "10000000000000000000000000"], + ["0xda68e21acd377f1be13340ee4b588bd2a6a66b29", "10000000000000000000000000"], + ["0x820457ec3fc535017026c44a757babfaf5a7d6a2", "10000000000000000000000000"], + ["0x7332cc520576cb233fa71e66eae0dd76e50fd60d", "10000000000000000000000000"], + ["0x200b12b7ad06ab04495f33e22a9a60786870354f", "10000000000000000000000000"], + ["0x3184533b4cdd8984468df86f147363cc575b8483", "10000000000000000000000000"], + ["0x5baa9a8ce0b1afeedcb015634d6f91163dc84374", "10000000000000000000000000"], + ["0x44e4e1976312f9d1e80d88197f280c6163460859", "10000000000000000000000000"], + ["0xf31b7a7df2faf975e9c7efb75849658750ce0468", "10000000000000000000000000"], + ["0x19afe6e49a488e225acbcdd7edef99330dcf4855", "10000000000000000000000000"], + ["0x912d85c7c08cad46cc88366c29853686707514bc", "10000000000000000000000000"], + ["0x7bb7a6ef0d9807b28cab6f75cb0e6b847d04b7a0", "10000000000000000000000000"], + ["0xca9dc9e4afaa33f39a42cb2044c3f0745ccfbcd6", "10000000000000000000000000"], + ["0x1e9baf5c20a7a3cc3e55b89ed4e30579e0f072d4", "10000000000000000000000000"], + ["0x1715a7a493053e67731116f03d25a333498afa42", "10000000000000000000000000"], + ["0xbabf8fc6592c7b9da8c66baa5d3f0c98a94558ab", "10000000000000000000000000"], + ["0xa111fbd8bce6b05c21c5007fcb1c41b92885a80c", "10000000000000000000000000"], + ["0x1cdf4798fc3d0812fd57e39ee83fd503e01fe4f2", "10000000000000000000000000"], + ["0x61c98f7110ddce29680cd7eb6e1cd77a81d7587a", "10000000000000000000000000"], + ["0x9a160699730d8aa4efb9bbbf454c54b4e08c0bcc", "10000000000000000000000000"], + ["0x77f88e4bc35c794a1fd3bc8c6a7971ce3c4b9e17", "10000000000000000000000000"], + ["0x10fbbbcbe4ad8d981685e5570e2f5339556308ea", "10000000000000000000000000"], + ["0xaa7cde714d11d663de2a560aaa956c7046b4352f", "10000000000000000000000000"], + ["0x2c6a30120aef59a4cac0ea21de8a2d2411df6b51", "10000000000000000000000000"], + ["0x56b824a505646a483f0464914a30c7c5ea1b43f4", "10000000000000000000000000"], + ["0x605d993dabcd1422f0e626ab508ce89facabb372", "10000000000000000000000000"], + ["0x1baac833f371b962939cf556a9295cbb6c95ceb8", "10000000000000000000000000"], + ["0x4d9b15cc8a5a46d9fc167302c3af73800aa68c67", "10000000000000000000000000"], + ["0x11ad865b9dbe0de2234460c4bf809033b1724e66", "10000000000000000000000000"], + ["0xeedc67aee2e487ea332b45d2a0e7289f955bbdc8", "10000000000000000000000000"], + ["0xd99a1022d51573c6d0c2b186673d3de7c5ca5e2c", "10000000000000000000000000"], + ["0x24bd8002343ce7502059c3397767a4c44f8b81af", "10000000000000000000000000"], + ["0xc9e9326c738378cab73c63accbcdc3fdf23d835a", "10000000000000000000000000"], + ["0x87ae5401789a49c8b9103b4139bdbdb5e4309172", "10000000000000000000000000"], + ["0xc459d9101d939335c9c60ffdc445f4e678b37269", "10000000000000000000000000"], + ["0xf6f5ae9fa4565078974d7eee7eb520df987fab80", "10000000000000000000000000"], + ["0xf3bcf408ce0dacb9bd9f65405cbaeb6d242089cb", "10000000000000000000000000"], + ["0x0f8030f8766ec4ae52e8c9f018cb157507187f54", "10000000000000000000000000"], + ["0x75b25a519dfedfb1c47b611ba2d186c67a5dd751", "10000000000000000000000000"], + ["0x73d9a622f40f03c3207f49352736faf47b2e1028", "10000000000000000000000000"], + ["0xd820c6c96260a7737f9d3602fad4f1df2d311761", "10000000000000000000000000"], + ["0xdb5019b8dfbccef8906c39b16a4870082eabbc4c", "10000000000000000000000000"], + ["0xd452af0d9bd437e8a67f15ebaca06e1c015fc528", "10000000000000000000000000"], + ["0x3af08e71d0fae7c1293516d74035b050d58df024", "10000000000000000000000000"], + ["0xc3dc996ae0db7d9217c63fcd28dd44883c0f2b70", "10000000000000000000000000"], + ["0xcd51129761b394b447bd0f5f43834d36f1f90563", "10000000000000000000000000"], + ["0x0f40d04bc330f708e809c10831e5c8203047a63a", "10000000000000000000000000"], + ["0xf056177a8d906a32fd0e08e16bc594cd41203dc9", "10000000000000000000000000"], + ["0x6e049bac106fb1a1dd43a25fc6e707385aa61776", "10000000000000000000000000"], + ["0xe11a457888140c78fe0d4bf613fd49b91177deea", "10000000000000000000000000"], + ["0x2ae02587a2b86fbd4502c5322154e97908d7279f", "10000000000000000000000000"], + ["0x90785a2bfc4ac26f310000171ae7d8dc74e04774", "10000000000000000000000000"], + ["0xb79b013c49db009541c5eac78a0bca11038845a1", "10000000000000000000000000"], + ["0x37e7e09a5c4f2d3e4d9d54cf995f20aa74cf6d56", "10000000000000000000000000"], + ["0x11651b7f8e2d6a0ac84cdcef4c4732426e0af4a5", "10000000000000000000000000"], + ["0x606e7af1c5c8c5cd29f2115e517b9d7b89e6c653", "10000000000000000000000000"], + ["0x57701abe35763f60cbeabbf4cd352a1052b775bc", "10000000000000000000000000"], + ["0x00ee28821f5c355d6dbfd3c7dd38acc60165294a", "10000000000000000000000000"], + ["0xbadf5f1375e407943e45ced6286ff95412f27948", "10000000000000000000000000"], + ["0xfedde14ac70ed6aec56f955d204355196427e09f", "10000000000000000000000000"], + ["0xef03048081a9a883a33c7f1052d5e5a0804bb7d0", "10000000000000000000000000"], + ["0xe8f4c5afc8582f381d2cf5b4ffc652b04177d982", "10000000000000000000000000"], + ["0x7774aa89740fba372ccbf0a40f30846376c12eff", "10000000000000000000000000"], + ["0x0b0a23ef72341b7a3dc67595f523975fe66aa904", "10000000000000000000000000"], + ["0xed4899b2a8da2f6e30cb2b4f593f83969d27da37", "10000000000000000000000000"], + ["0xa9867c46e2fbc004d04da3b8ebcae8d5db171fe2", "10000000000000000000000000"], + ["0xd6b2095e913695dd10c071cc2f20247e921efb8e", "10000000000000000000000000"], + ["0xb26cbde240a343e46005cc016e39ce4386ae97ed", "10000000000000000000000000"], + ["0x203f3eb497c504061e0aceea749103296b0b91bb", "10000000000000000000000000"], + ["0x4345d9ae4f4c6e6793e1605d74352a98669138ff", "10000000000000000000000000"], + ["0xb80c12c95fb15b0779ea0119e7813a1879f9802d", "10000000000000000000000000"], + ["0x9c9131873ccce172cd636474ff255ebb1c692c80", "10000000000000000000000000"], + ["0x505ee2c414c50cda40a13a1c9b9c5af106d6a3aa", "10000000000000000000000000"], + ["0x3e37cb2e3d904b8455f4446db67dcc8577ada0e5", "10000000000000000000000000"], + ["0xc0f420c1b0a7abe2f629d5d403007840470959b3", "10000000000000000000000000"], + ["0xec0e5588df094efe79d8b0ab045831bc454cff4c", "10000000000000000000000000"], + ["0xd6ae2aad9406c7d429418ccf941a129970ded3de", "10000000000000000000000000"], + ["0x676c34516117107fd380940c62d5ef9cf08a7fe8", "10000000000000000000000000"], + ["0x260e528f015f03889da48bfe1a15efb191546b44", "10000000000000000000000000"], + ["0xc144ccb02b3901bc93783663e760123f510c3cfb", "10000000000000000000000000"], + ["0xa845dfaca6b3494d6be4a851100a2cd44ef0a4e7", "10000000000000000000000000"], + ["0x5d38594a188ee4cd60371a33fea4da82ef9b342d", "10000000000000000000000000"], + ["0xe40b491ff78b9be4e89ed0d24b6da44fdcbe354f", "10000000000000000000000000"], + ["0xfcb3b7cc281c65d723dcb0e3d7322badd1eedce1", "10000000000000000000000000"], + ["0xb4db68d75fdb55ed204b086ff6205c70e446fbb3", "10000000000000000000000000"], + ["0xaec0ccc91de830b0e9ff5c99ff6c347ce70c4a36", "10000000000000000000000000"], + ["0x4a378971a462477657cfa6cd90e26ee02603c5db", "10000000000000000000000000"], + ["0x8b7a2884437c544848c4a187d3f8278f54834c68", "10000000000000000000000000"], + ["0x3d93dbbb6d17a93735d0a845ca0da846567eefc7", "10000000000000000000000000"], + ["0x6ae66ab87dad05e9d49c49455631fe285d2e4ee3", "10000000000000000000000000"], + ["0x0ed49c6d8b6e0a2342287707b857d58c94763481", "10000000000000000000000000"], + ["0xd5d810066689a08d45d03d0aa4e63cc8480b37f8", "10000000000000000000000000"], + ["0x1774fae209dc31011daa5e5e11ef7d8f016a8ad5", "10000000000000000000000000"], + ["0x8e3294acf8c96e446d96ade898150798101bcea3", "10000000000000000000000000"], + ["0xca712fc7ffe3a7cb8e44dcfec968f3daac91b4bd", "10000000000000000000000000"], + ["0x0b3d6e6ebf95f38290b527c3dab253d94dd10b03", "10000000000000000000000000"], + ["0xb6d827ad79d3c036fd7a73d294255441ced7bc60", "10000000000000000000000000"], + ["0xc61716975e0212fa98419b6960bfbc6d8fc8d74b", "10000000000000000000000000"], + ["0xf478792755a5581809ae4116395c32ceba827acf", "10000000000000000000000000"], + ["0x8fc87c199203332c1cc43430b9fad2b1868e44d0", "10000000000000000000000000"], + ["0x1b59237d0cff7b879f3a7c5045d30ba3e9518d3f", "10000000000000000000000000"], + ["0x208b82b04449cd51803fae4b1561450ba13d9510", "10000000000000000000000000"], + ["0xad3ff004a4897047032c8aba65795916bd9f23cc", "10000000000000000000000000"], + ["0xd819e3705425dfa164e395d79256cdd9ee4871cb", "10000000000000000000000000"], + ["0x5c53bee9f713d427fd930f8910cb9442422b98e4", "10000000000000000000000000"], + ["0x03fbc3640e447f59e9540034f6cac2731b729701", "10000000000000000000000000"], + ["0xb699684651ff748a6357892e006a0bdaa1707d1a", "10000000000000000000000000"], + ["0x31099ac2e8b4530ba82f4fed6b489a85569912c7", "10000000000000000000000000"], + ["0x09dcf911a4b1d72cc97db56617b57b92fce326b6", "10000000000000000000000000"], + ["0x29eceeafdfff73e125c2fb93cde3e6bb6f1b602c", "10000000000000000000000000"], + ["0x70eb0915474806164a0fe4bf0d9f29a5f50dfebb", "10000000000000000000000000"], + ["0xe1e3e3b6cdf387279ef26beabbf08185bf334f72", "10000000000000000000000000"], + ["0x9403bc5bf2c9a4ca001eacc9b6fc4a70aca3ccfc", "10000000000000000000000000"], + ["0xde48537ce6df7f50daf3989e3202636b09b55f5b", "10000000000000000000000000"], + ["0x2d953f2d7cb77fe2d28eb804f5e5a4a379f91871", "10000000000000000000000000"], + ["0xa4f23e9a9eae680e5ff48ea972a31cc1a787500e", "10000000000000000000000000"], + ["0x1b927f5f8680b660be3f545a36bffca62628d762", "10000000000000000000000000"], + ["0x8dd0eb4ac9b49e2193a73d0f77f431acc0af1b37", "10000000000000000000000000"], + ["0x0521c7212c72e7fb2fbeb9be54bc19c5004bee47", "10000000000000000000000000"], + ["0xbe8572dbc32db091715e3f55dc913fd3b05173d2", "10000000000000000000000000"], + ["0x98e7131c1d9da1977f96345c85e00f10846f61c7", "10000000000000000000000000"], + ["0xe47a8c0d429d75745578e2b7108b7b3cbfe07b86", "10000000000000000000000000"], + ["0x74f0ef88878bad5c38ee76144ebb723c94e25a86", "10000000000000000000000000"], + ["0x150be62edddd543452545e502bcaf6800bcaf2d6", "10000000000000000000000000"], + ["0xacc3df87b9d1758a407d352f7c5f2460021703be", "10000000000000000000000000"], + ["0x26661bc4fc9d2d51e8369cfe088bb127423771df", "10000000000000000000000000"], + ["0x290789aed2d6fae51191bce9cce498d0c336dd89", "10000000000000000000000000"], + ["0x13483c88a35c27e0a893b7196ead0903d08a84a2", "10000000000000000000000000"], + ["0x60ca37f5ccd976c99c0ed51beb95f02e41f258f2", "10000000000000000000000000"], + ["0xd7148f95e0fe82036e389ed8d58c92508dcdfffc", "10000000000000000000000000"], + ["0xe153ba6e7c8d5ff6ce6d5968044ce72cd4ba38fe", "10000000000000000000000000"], + ["0x21543a89d39730bc239623fd9a41bf379dc3f6f1", "10000000000000000000000000"], + ["0xbef1fefe4bb6dda516e9af3a3f793d182cf053bc", "10000000000000000000000000"], + ["0xf11ce14bbbb90ca3feea63f5599119888c07f941", "10000000000000000000000000"], + ["0x8106f06a53396d174b0edbdfd17660f67e71adb6", "10000000000000000000000000"], + ["0xa91b82084b37b01a7b5fd60160eef7b04302517f", "10000000000000000000000000"], + ["0xc4ea0e92c4978c04e82e904e81c70ed959615a32", "10000000000000000000000000"], + ["0xf8a3b68661e928c1d755feaa1e0c611b8fe061bd", "10000000000000000000000000"], + ["0x8a0454b05a952c572619935ed46b6d8d0aa97a76", "10000000000000000000000000"], + ["0x0f0c832a009802ff4119d10154c247c459763754", "10000000000000000000000000"], + ["0x4de216fb73e84c5b980eaf76d1d97b1c9a8456b0", "10000000000000000000000000"], + ["0x1f7ebb2c573eeed2d967a706f0fcd66953fc9e9e", "10000000000000000000000000"], + ["0xc474fcf2666d8885bd0d48f942f760448b2f9f34", "10000000000000000000000000"], + ["0x5922233a62ed0ac08eb3d7d2ca3bd2f1080a81fe", "10000000000000000000000000"], + ["0xfcd538bc55328adaf45121f307f76f5589f060ce", "10000000000000000000000000"], + ["0xe564148fbe1cf67c5dc041e8a99f1b309d277058", "10000000000000000000000000"], + ["0x461b4b406d7a366a965bfd455c013de70aa12a6b", "10000000000000000000000000"], + ["0x3b0a5f022d0e0b43d0b74f961dc7bd236b919205", "10000000000000000000000000"], + ["0xa18b495f1bd998541eaf890aeea4e16558ee355f", "10000000000000000000000000"], + ["0x997202adee11ebeb3d5b6b3c0b3b2b3f3002bc31", "10000000000000000000000000"], + ["0x337ac9e753c374553626ba5bac8593713ad0ed20", "10000000000000000000000000"], + ["0x07a6d58cac8d98af26508635815ce1e56458c5a2", "10000000000000000000000000"], + ["0xbb15089724c2797ad7ca7c9b210e2cb6fdbc30d1", "10000000000000000000000000"], + ["0xf54176ec9bd05eb83b94926e74f09960b685fbe6", "10000000000000000000000000"], + ["0xd89cdcba2a2f85fb3b185253ca29c6127eb7cef5", "10000000000000000000000000"], + ["0xf2c95079e35a27c296b01759431e05c38e392a21", "10000000000000000000000000"], + ["0xc8d46eb7881975f9ae15216feeba2ff58e55803c", "10000000000000000000000000"], + ["0x75c98e92eac409963e27efc75d2bf556d8a7878f", "10000000000000000000000000"], + ["0x8e67207da081b391d646c1483de673ae76c6b293", "10000000000000000000000000"], + ["0x963dca698ade8fe3ac61e5a4410ebd15c0a42d77", "10000000000000000000000000"], + ["0x76811ec47ab59d83b57c40c2778f5a355b3bb2e5", "10000000000000000000000000"], + ["0xa81597bd911cc633a58f4362b0b333d4c7398d4f", "10000000000000000000000000"], + ["0x3ce90db75670e28fc9bb3fde67c1d6e005012d2b", "10000000000000000000000000"], + ["0xbd7f9fb39e0f1346b45380088e901ce2916cfd39", "10000000000000000000000000"], + ["0xe95a30e3795b85db37b1c9b082869e4f7615420c", "10000000000000000000000000"], + ["0xb424a3cda7bca285a363f9a98b1d133b995172bc", "10000000000000000000000000"], + ["0x6a79c1749229179b4f16e6957597fd8f4d2fae7d", "10000000000000000000000000"], + ["0x56a41dd21f2e65ca5342697b6c9b8675ad781bde", "10000000000000000000000000"], + ["0x2d8e09501fe9a3116dbc76613bc10c8942612bdb", "10000000000000000000000000"], + ["0x9afef5badf5725bd13b4c938df3c62f66f1aafbb", "10000000000000000000000000"], + ["0xc25cb20ae7569da8d0557a125b1050f21948603f", "10000000000000000000000000"], + ["0x359a76db7afdad46f0e2c6699ec768c1064c86ca", "10000000000000000000000000"], + ["0xe5f5380ed6088e97e29488d327385c86ba91d8f6", "10000000000000000000000000"], + ["0x82480356b5df6db351182e831e63476b640fe82d", "10000000000000000000000000"], + ["0x4e14171a451884c44edbe412b03a128d7e473e55", "10000000000000000000000000"], + ["0xb9c6801ab14077b3ad443105f67979c841587dbf", "10000000000000000000000000"], + ["0xeaf8c4e0e502923f1a627cbbae36ef6339df2688", "10000000000000000000000000"], + ["0xecd7c8f64e2ea8e3f8e912ea58504eba324b2b66", "10000000000000000000000000"], + ["0x11f37eda87206bdc200222855328e5dd5809613f", "10000000000000000000000000"], + ["0x1d15395f781e9e13bf77fc34f1663d6d3543c7fe", "10000000000000000000000000"], + ["0xb488796afcbd542ef14edde6e2dd14211fa6c9e2", "10000000000000000000000000"], + ["0x4ed05ae3fdd40136ac74b15bde5949ce50f7614a", "10000000000000000000000000"], + ["0xa4146769c7cee0787777e5a7c4459c45c336912b", "10000000000000000000000000"], + ["0x66ea49e53039a3befecad444220033313c7109e2", "10000000000000000000000000"], + ["0x9d7db4635fcf4f8eeb93ba3fa1f6f149181efd21", "10000000000000000000000000"], + ["0x8c78b28b6bea4ffc557b32a643e576572067515d", "10000000000000000000000000"], + ["0xdee169c8e26a252b5b606daf2344555570982114", "10000000000000000000000000"], + ["0x15d8fd2653c10faa953df207a66bfb58aee9c95e", "10000000000000000000000000"], + ["0xb4bdd9b1404ac20e4c0556ed0f23510af89e0ee9", "10000000000000000000000000"], + ["0x14f683329a73e977cf2fb6cbec2094ca516b61f5", "10000000000000000000000000"], + ["0x6c0363c075a82fcd439d3127abee6622228934e6", "10000000000000000000000000"], + ["0x55d65e9a4b47196c4f6d252a6440e1eb5d29c0f7", "10000000000000000000000000"], + ["0xc3d835ec0a336fd2f97e2ac9a6226e8e331dee76", "10000000000000000000000000"], + ["0x82cb410279688d98dbe0a523fc47cebe5833f1d5", "10000000000000000000000000"], + ["0xf470d2371810803eea3a6364fcb0ec116e65d7d8", "10000000000000000000000000"], + ["0x37679d8f112e2fdc0d3180d19961b977c45760e5", "10000000000000000000000000"], + ["0x45e3b3a5dbf5f698117e72ea65126121d13d7337", "10000000000000000000000000"], + ["0x08bba49acda81fbdf2ea7f1903860ac83988c75e", "10000000000000000000000000"], + ["0xd866cf56768daf406afbe50f612689cc466c6f1f", "10000000000000000000000000"], + ["0x777abe19a2cd375451bf7a307eed869df57542f4", "10000000000000000000000000"], + ["0xa0806b99df2d8c220221f8b6b7b2c57fcdfbb546", "10000000000000000000000000"], + ["0x838db4c8150d90276634c1c8df5b9ffa967ae658", "10000000000000000000000000"], + ["0x67bbd261fa3a2f73e07f44ec15726cf363f2546c", "10000000000000000000000000"], + ["0x36143d6ab3ebad1977abf30676e77f27e5ad4d6f", "10000000000000000000000000"], + ["0x2e8b559b47b288ce8cfb4952f9e0bb9a5e0c2fb1", "10000000000000000000000000"], + ["0xab6c7040b9c1bc2133081bbe008a740a5ba063d2", "10000000000000000000000000"], + ["0x50af859cc14971cadbed8b5159eae7def0284468", "10000000000000000000000000"], + ["0xe61cfbd09e6cccc6507ba8e7539f9a74f6278318", "10000000000000000000000000"], + ["0x55fd246cbbbbe28de49ae6a415bedfbf9e2b8dc9", "10000000000000000000000000"], + ["0x12a7872c328b5d6c7703137ebb6c7186da6affcf", "10000000000000000000000000"], + ["0x4c409e10e85b43e80be5b14696f4a7b20626d02b", "10000000000000000000000000"], + ["0xabe8a7ad2f597c077794f5f74149f69ef4356c13", "10000000000000000000000000"], + ["0x910bf2d50fa5e014fd06666f456182d4ab7c8bd2", "10000000000000000000000000"], + ["0x8edaf22542cc324ad48aad9b04fab79c1e70ae61", "10000000000000000000000000"], + ["0x0867f05c2490e9ccf5620a67514857d388b1f436", "10000000000000000000000000"], + ["0x050f788d09395724777a67dd08be127cf70dd238", "10000000000000000000000000"], + ["0x5bf004761b8c7d08c0eff3a031cf85b5a51815c4", "10000000000000000000000000"], + ["0x7067bce753801201b94fae26a344b7d16f6ae039", "10000000000000000000000000"], + ["0xd78e1cbd27f40a9039131eccaebd0a6da510ee96", "10000000000000000000000000"], + ["0x7cae6729198d7013c7c87e11ae0796a727665d6d", "10000000000000000000000000"], + ["0xe679cd0aed39a1c1e91b4fb5c6dd1fba9d2c6173", "10000000000000000000000000"], + ["0x666df143bf8c00e91d6e43a303f2e99d57e1679d", "10000000000000000000000000"], + ["0xafeb9a39177ea632434217a5f90ca129cdb557da", "10000000000000000000000000"], + ["0x00d14d2bffa3363114793f8f5df05b6d82f14ba1", "10000000000000000000000000"], + ["0xf1e6a831ceb1ad01128fc2b10a066a67d3654640", "10000000000000000000000000"], + ["0xd9ca2b65b8a90589a16354ea178a14427b10ad32", "10000000000000000000000000"], + ["0x0a81f577d8a4776bb7389ff0ae9be97a96c280c2", "10000000000000000000000000"], + ["0x315e5d590354e103412169a485ad4c496195c78e", "10000000000000000000000000"], + ["0x67d3e94a845a1cbb3c1154d3ef429479fd80ca39", "10000000000000000000000000"], + ["0xabbf8d6b5ff051c4d424a0fc35b2a295437d93f2", "10000000000000000000000000"], + ["0x00ec52d4bbdaa3d6dc6d06064fd48bc6793d5071", "10000000000000000000000000"], + ["0xb1c18ede2ebb33ed5cf6909edad6ef1abc8d3708", "10000000000000000000000000"], + ["0xb6237775a4b5adfd81ee09a5417bc15406fcddd2", "10000000000000000000000000"], + ["0x0f56ed6f7c71aef4e67028882ad5567db63f7925", "10000000000000000000000000"], + ["0x88eed781abbbb20b8f47cd9614187af817706170", "10000000000000000000000000"], + ["0x1bfb3b57522eefd75957e5763399b9a4f4a61d2a", "10000000000000000000000000"], + ["0x88e6c5b96710c0c7fa63e593d9675a424f4346a1", "10000000000000000000000000"], + ["0x030f21b61d520bda2792d81cb461cc9a72b91950", "10000000000000000000000000"], + ["0x795f7fac23ffbe668619cd2d4036b177cb388983", "10000000000000000000000000"], + ["0xd84c30afbdc2332c4eb0680d848b9c2e7b01de73", "10000000000000000000000000"], + ["0x13d9b821efd055ffd7efb25aa43e0f754111d612", "10000000000000000000000000"], + ["0xfe325c57946f1dc280af5fe510ec83d1da16997d", "10000000000000000000000000"], + ["0xddf7b2b23a0f5d44f0badc4a4062214df8b7a6e1", "10000000000000000000000000"], + ["0x4c4f137e4bbbc8ded7c708ed230400db580448e7", "10000000000000000000000000"], + ["0xf8fb053bef2209712c85dbfb90302d92cce274bb", "10000000000000000000000000"], + ["0xbad51b52f6169a6b784fb18981d6d7b72c2b2a9c", "10000000000000000000000000"], + ["0xf340b41f31552968b4600cd2566d4af0a40d7fc2", "10000000000000000000000000"], + ["0x30c88b12098224b13a4c697d15ec8b4c9f3262ee", "10000000000000000000000000"], + ["0xa562ca817c23b6590c3d32398f723fd759242cbb", "10000000000000000000000000"], + ["0x6fba1aac65478fa7f269c668b82977612ea9cb95", "10000000000000000000000000"], + ["0xec253779e6bb668b82786dcce8603548421937b9", "10000000000000000000000000"], + ["0x92cfd9472b012561a9de9907d8c5dd19d911797e", "10000000000000000000000000"], + ["0xd68f3344741a1b4214155c3aeb8cfebbebef7274", "10000000000000000000000000"], + ["0x58937d451bf8baa298d568a6fd69a2daac326e4d", "10000000000000000000000000"], + ["0xfba19a5411e602d40be8eda3fdb479258f1b4699", "10000000000000000000000000"], + ["0x393c5ccd623945aa64aec6455bda10e471a0046c", "10000000000000000000000000"], + ["0x3b09fa07b38a8ea1673219fd3c2b586312d6a0b7", "10000000000000000000000000"], + ["0xe25373181da11fa4e586bb4c982d866b0bbed661", "10000000000000000000000000"], + ["0x7e73a94993f9652802c016b7a3ef808cdc5c74a9", "10000000000000000000000000"], + ["0x3992eaf6f696781a7bcfd073e72fc4e10adf5ad6", "10000000000000000000000000"], + ["0xaccda574311ddf0d9262ce7aefba7a6743f6eb7e", "10000000000000000000000000"], + ["0xcec6ba8aa1fc9423b5a480dcc7f9352f26894aac", "10000000000000000000000000"], + ["0xaea564e201c9eafca02bb8a586509908c68f94b3", "10000000000000000000000000"], + ["0xe84995bcbf58606d919acc03d21da5abc1ceac6a", "10000000000000000000000000"], + ["0x2f094e189859e20ceb97a911b90e1471accbca27", "10000000000000000000000000"], + ["0x0f4ef857e05aed6e3cad417a244c117997d0e83f", "10000000000000000000000000"], + ["0x50d934a02c47688ab45376d9754e2629484873b1", "10000000000000000000000000"], + ["0x55569242acb5e5ad26dda8f68683d661ecf6fb25", "10000000000000000000000000"], + ["0x8922aa8921de71e66824b0665e7fbe0488a0fcca", "10000000000000000000000000"], + ["0x79aed628ed7faa2e7f9f69cdd53e32a92261a009", "10000000000000000000000000"], + ["0xa1a945b2325ed4cf93cdbe28ea96e5f85c8b81d1", "10000000000000000000000000"], + ["0x1c626fa2c802f8bc8019066cadecfe3787a412d2", "10000000000000000000000000"], + ["0x3977497f572b16a01e2da7193e301340dbfb3bde", "10000000000000000000000000"], + ["0xea76d930de7a153c97d0c98e1fcd02a69a5a4659", "10000000000000000000000000"], + ["0x9539b32640aaa0015c1a02524c33a10ed510fc86", "10000000000000000000000000"], + ["0x448bb8f15b115cf267ef7a46ff689117537abade", "10000000000000000000000000"], + ["0x65d6e0beaae01021d6471ec87e60a3d1ff32e132", "10000000000000000000000000"], + ["0x9c95df27387e63c94bb0d76ccce4ed22ed97af47", "10000000000000000000000000"], + ["0x78aee528cfc9bfc11f56798c56e1fd3fbfc26774", "10000000000000000000000000"], + ["0x79160a6530fac0853c9826dd7ce08c87c0641295", "10000000000000000000000000"], + ["0xdcbee0643b7d920da6c64f60ad31fb5be473e781", "10000000000000000000000000"], + ["0x12e721ca67c70f9e83d51d6b5139376cddc618d9", "10000000000000000000000000"], + ["0xd668ee736188bafeb82bc118a05c5ab4524fd051", "10000000000000000000000000"], + ["0x4295093af90ac152fcd37f683b033f0a16b0d51b", "10000000000000000000000000"], + ["0x2049fc7430c483c807a99afab92778b633070bf0", "10000000000000000000000000"], + ["0x08dda4b3d2daa6f32bbad7afc6bbddb27f6bc685", "10000000000000000000000000"], + ["0x382ffce2287252f930e1c8dc9328dac5bf282ba1", "10000000000000000000000000"], + ["0x92db74bdacb0b60be8fdc95ced85703bdde8432e", "10000000000000000000000000"], + ["0x1a95d0c59131212c06cbd824fe1cf258b184a74d", "10000000000000000000000000"], + ["0xd00f8d6cef430cf533296949cf0f38b8b0f743b5", "10000000000000000000000000"], + ["0xd5644cedd75150061552ab7c8414042f7cb95c6e", "10000000000000000000000000"], + ["0x099d35e0160269460cf979fb33ff5c59abee8b7e", "10000000000000000000000000"], + ["0x45477092f0d8cf6156b37905985e6f2d00e2ac83", "10000000000000000000000000"], + ["0x258e4db433a16e22826db7e91d8178e60cefc57e", "10000000000000000000000000"], + ["0x90c353978402085de3f363085e833a676fc6bfa5", "10000000000000000000000000"], + ["0x7a3e3233ad71e71f66ee1ccf034a6240fc447a47", "10000000000000000000000000"], + ["0xae4b2db117e0b599433b9457fb15eea4e97eaeb4", "10000000000000000000000000"], + ["0xacf98af36845ec9aeda29feed2907ea287388cf3", "10000000000000000000000000"], + ["0xaf1890305fcff4bf485d09efafe08bb07fa2a74f", "10000000000000000000000000"], + ["0x14d86d4c84e583b90a65b872cecc6ef56451f645", "10000000000000000000000000"], + ["0x5e6bb4c1e776d9c7f440e1c8b0edae547a3f6932", "10000000000000000000000000"], + ["0x52ebe7c7b4009560209622232b60c3e113e66944", "10000000000000000000000000"], + ["0x8842c59ecabd372bf247652217802edb27ea3420", "10000000000000000000000000"], + ["0x40e4668add6c20b214c04aaf34ecdb3073864af7", "10000000000000000000000000"], + ["0xfcf44a92ab1be1e3aa882fb26ba5d6da6ee51955", "10000000000000000000000000"], + ["0xc1f008835c2ed5fecceec1275bfa258633e5f639", "10000000000000000000000000"], + ["0x5f02dc0afbec8316ec273a21fe22858fbbdba143", "10000000000000000000000000"], + ["0x7a68e3af98c5b101e45a9a9d0862c811189fb58a", "10000000000000000000000000"], + ["0x08e412c1780b9decfd612d9946d9fb4284d4d8af", "10000000000000000000000000"], + ["0x7fa9600c78710e8c1f712f274294b301dc27d86a", "10000000000000000000000000"], + ["0xf0b4d51d517ab5fbdadf63d4057592d0e93bcb83", "10000000000000000000000000"], + ["0x2c88a02bdf1294a4b222803cade35d241dde0c36", "10000000000000000000000000"], + ["0x4e079f7ae28120d5b95cc2f7efb5b1f150552ee0", "10000000000000000000000000"], + ["0x30d2c399b94c2b4e4e27b43adbcbc35b1e8e10d7", "10000000000000000000000000"], + ["0x47a541ca68800b3353f89653e5d77e4a7cae4ebb", "10000000000000000000000000"], + ["0x65f322c51b633341bd5d0ba377444602d12fee86", "10000000000000000000000000"], + ["0xb98c90b964bbcafcb6cf1648d7247d2040986af3", "10000000000000000000000000"], + ["0x97ea1ffb9d02efcdc22ad6b2a235da72c4e7d949", "10000000000000000000000000"], + ["0xa33ff5adaa402c130f6568855cfc9a65a17c8e4a", "10000000000000000000000000"], + ["0xc7c61e6884b14933f61c4af0f62de65ee04e812d", "10000000000000000000000000"], + ["0xc33f2de83c9d3d1fad2de073ba83f40e55440ea9", "10000000000000000000000000"], + ["0x41a9406d3443cdcc105c95b6e4efb4a7e7b3c188", "10000000000000000000000000"], + ["0x592231aa7459d22dc9674f726e14ed80f0d65bf0", "10000000000000000000000000"], + ["0x09a4e26d69821edeffa5eb29f134d0d8cad8efc4", "10000000000000000000000000"], + ["0xc324720784121f19dfc31919d183576732492a3e", "10000000000000000000000000"], + ["0xc6273dbc610fe3f032a509beb32830d40018182f", "10000000000000000000000000"], + ["0xd4f43a6b58ad6ed8e078b34f029bc24255fce120", "10000000000000000000000000"], + ["0x53345a9fd3098d3b0e2ebea2d0845b302ebc3471", "10000000000000000000000000"], + ["0x8fe6662b70b93bbcda26e98c37dc325608704d09", "10000000000000000000000000"], + ["0x86f991c173663d554540cd655ce0dc10944899db", "10000000000000000000000000"], + ["0xc1d88eb17c2574192fddd016e4d201928244eb5d", "10000000000000000000000000"], + ["0xe3077c57c0ebcd5db24a0bee0da528738842d425", "10000000000000000000000000"], + ["0xa627db0a15f3a763190d69c72522ff70715b9289", "10000000000000000000000000"], + ["0x44f4129e10976e20745cbf5cf6023a284eeee8f2", "10000000000000000000000000"], + ["0x956f1ce3ff2ea59a8b41df83ce9f85ed59d73f92", "10000000000000000000000000"], + ["0x02a97b8ebc1f3baff3755f0ad7d2dc64e03cdb7c", "10000000000000000000000000"], + ["0x596a9866d288e6c0ff98e756608169f9bf64be0a", "10000000000000000000000000"], + ["0x5754ac025e57b961faf6f7fbea1c1cdb586e9a14", "10000000000000000000000000"], + ["0xb57cae748c618ab8685a8143890c61c62fcd0f8b", "10000000000000000000000000"], + ["0x1cbafefd21ca100f0282fb909399d29f9fca17e8", "10000000000000000000000000"], + ["0x8539c8e63490595caba6b8351e8f1fa8127cb748", "10000000000000000000000000"], + ["0x5e7ecdd6752d53588a111636a7217c9677fc08df", "10000000000000000000000000"], + ["0x88a0e3db6c1f9680e51b51187f8076c57b05557c", "10000000000000000000000000"], + ["0x09711a9e501e03769f32a0f8fc09aa517337b388", "10000000000000000000000000"], + ["0x59810804476105b545d4fbbe561f9ba0778b59fc", "10000000000000000000000000"], + ["0x82d5cf59bd09225f39b5c4925f738079f2a9ae69", "10000000000000000000000000"], + ["0xd00ffe05fb3abc421c74379917cf640ddbbd8487", "10000000000000000000000000"], + ["0x4763aedd619f18799121a86b3805f7772b4c7e8c", "10000000000000000000000000"], + ["0xbdb5d9d61d11c106d649dd21e4749a80884641a8", "10000000000000000000000000"], + ["0xcfb63b65d3ab019fb412472e43cffb396ecbbeae", "10000000000000000000000000"], + ["0x8b8e3da80e159eff2535b23e8b68f7ea45f930e1", "10000000000000000000000000"], + ["0xcc9047cd36cef35a88bfb434350a3bd778fa347e", "10000000000000000000000000"], + ["0x78edb806eeb8480162d3cb3acc32fb0f11c308bf", "10000000000000000000000000"], + ["0x5d782508ce956d9c75116dad7f54bcdd87829a01", "10000000000000000000000000"], + ["0x965211f826b66a35df7508194dae12beb8ccbaf9", "10000000000000000000000000"], + ["0x35dd8ae8e3ef1ffd223d77371badd6f7393a0817", "10000000000000000000000000"], + ["0x059dc2eae98465f97c57c392543fec3e5575bac3", "10000000000000000000000000"], + ["0xc54be037e6112716a507c0bdc0487785f3d3b118", "10000000000000000000000000"], + ["0xae1312033facd19bab61a6736aeeed07b3cf499e", "10000000000000000000000000"], + ["0x63f1a84816bd167f6af35eeff56aad37a37e4474", "10000000000000000000000000"], + ["0x01a6890ebe9cb8910c21c3a0f4a74575f602d3b0", "10000000000000000000000000"], + ["0xf1fe0a34e66d684f182a0886f795e5f22d0e64b6", "10000000000000000000000000"], + ["0xb65ab25a3d86034b555a347bc176c3d41682e1e5", "10000000000000000000000000"], + ["0x0000000000000eb4ec62758aae93400b3e5f7f18", "10000000000000000000000000"], + ["0xd4d81e2a2ea21c7aa782f55d2a5dafe2da1bc36d", "10000000000000000000000000"], + ["0xfeb2549f293f54a96e780ae8a81b03129d539136", "10000000000000000000000000"], + ["0xc71af083b580fa0b697ad8b163006e4b2ec1072a", "10000000000000000000000000"], + ["0x7219179fd4740ed1bc76689b25f590a840f2f049", "10000000000000000000000000"], + ["0x9aa2329798818b32a6a16e9883a72b0b7c4710d7", "10000000000000000000000000"], + ["0x4ea6f231e53a4a60f0e3af775180e329df9c6cdc", "10000000000000000000000000"], + ["0x57c65938c659b4da2ef05d7064ae883140916af3", "10000000000000000000000000"], + ["0x6786b7e5022cd6e3e6b6a1018953f1d15dd442aa", "10000000000000000000000000"], + ["0x556cf3e831778860a132442fb6834482f6d91bab", "10000000000000000000000000"], + ["0x7827b605b08db3f80a24da6e725e98191b7185db", "10000000000000000000000000"], + ["0xb39975588e364b02d70964c1b06e6e2716c09721", "10000000000000000000000000"], + ["0x80750964836f9527e18417467a5b7f79bf2a6a21", "10000000000000000000000000"], + ["0xae8df6c6f0a18ac42f8636f6876c47ce6f56e071", "10000000000000000000000000"], + ["0xf60d5f136d093024502b91af48f7a42a0cff9527", "10000000000000000000000000"], + ["0x16857503dcfa74da125a1aa421ff9b266af281cc", "10000000000000000000000000"], + ["0xbd76c6487dabef207470afdb6f332c0432482f45", "10000000000000000000000000"], + ["0x24c3cf19e12dd05feafbe47cea4aea8211f0626f", "10000000000000000000000000"], + ["0xe3b3fd1927d55827257892642e71d4c14dc3aeff", "10000000000000000000000000"], + ["0xd5381da8a8b0f22ddd335292ac6203348f617b1d", "10000000000000000000000000"], + ["0xd6ceef56d1e877b26261305dec1094264d830f72", "10000000000000000000000000"], + ["0x229a690b16b748f047d4206087c27b735d9d231b", "10000000000000000000000000"], + ["0xa72a8686e5561ccbcc1142b091f43b30f8084626", "10000000000000000000000000"], + ["0xbee4077a7edf58e1ee76b390af64f377bc58191e", "10000000000000000000000000"], + ["0x8be64b7d3261390bda4b908fe62a2586a04871f9", "10000000000000000000000000"], + ["0x4071147abf0ad7646e7a3d8590b7357a7a57eb1f", "10000000000000000000000000"], + ["0xfbbe7ffba0ce6bd2c34360d925f61834838d79aa", "10000000000000000000000000"], + ["0x7c9f379ba78273aca5428a5aee1a2d7932016d92", "10000000000000000000000000"], + ["0x784e120f8e7b9b1d47ceb0af01bd688ff4a5e8c9", "10000000000000000000000000"], + ["0xbb2a74fead35c15cfce7000e583893820bc9a237", "10000000000000000000000000"], + ["0x7206834fc91111cd6cec6ead968d6bd33c5e434d", "10000000000000000000000000"], + ["0x233b17fba461159d4d6987713eae82bc03bf1dc9", "10000000000000000000000000"], + ["0xc680f93701d5055fdd67830427d248bbfdba794d", "10000000000000000000000000"], + ["0xda6caefcb34ece4860f52c30552605e6bf86694f", "10000000000000000000000000"], + ["0x468ecc9ce37e2e6348c3a1901ba84cb13dca42e1", "10000000000000000000000000"], + ["0x11ef3c94c6ff96615116a2b9423405bd0715b3ff", "10000000000000000000000000"], + ["0x74d3ee195f9c1e062fc3ced2946800eecdaf249f", "10000000000000000000000000"], + ["0x3341c91212595f8d9bb6c36e63c86fa2cda636d0", "10000000000000000000000000"], + ["0x392141c7742a8794fd06a06bf72e4a0665cf4699", "10000000000000000000000000"], + ["0xebc627aac94297e8ebcaa3bd1dcc0ef69ce44ae9", "10000000000000000000000000"], + ["0x64c4c46731d2fe68672ffb08274491485eb26dd8", "10000000000000000000000000"], + ["0x9578797f81cca95c7f1f17b84a43bc58f1218270", "10000000000000000000000000"], + ["0x56ffb56a11417dc5126eb9ce0fde1c7058daf541", "10000000000000000000000000"], + ["0xd3fb0f853b67e1a3d03cf2664819e32b2478b253", "10000000000000000000000000"], + ["0x5423ed3bc1eafd37a84d4f445eae2662ec8ee475", "10000000000000000000000000"], + ["0x3197d9458abf3a1c66cedbbd285624d40b9f156d", "10000000000000000000000000"], + ["0x5ea98b98ce29cc5d333bc1ba294bc08bc618f294", "10000000000000000000000000"], + ["0xd8e74f85cffa74ea3a277b438549f468d87d704d", "10000000000000000000000000"], + ["0xf6da21e95d74767009accb145b96897ac3630bad", "10000000000000000000000000"], + ["0x5f30a2bb114091b07499d0d6aca58a392f385069", "10000000000000000000000000"], + ["0x053960de1dd789f2279b9c4b8a941b6437af3802", "10000000000000000000000000"], + ["0x8b0971ffa41adad2530f78e54fb7a260ca491bf2", "10000000000000000000000000"], + ["0xa7a68209dc4ba12a8a055ae9135e1339c057ef91", "10000000000000000000000000"], + ["0x1f4a913d0916883dd32090aed70f9119767eaa45", "10000000000000000000000000"], + ["0x3014a97f7b1f904aee0f1a76bded484448a1133f", "10000000000000000000000000"], + ["0x3397523a9e446b7018d9bd0e924aa85debadc6f1", "10000000000000000000000000"], + ["0x22a2f3588dc91a871ea600c528a702019ed04991", "10000000000000000000000000"], + ["0xf23a9799fe0011acb4326306a539b88644ac19a2", "10000000000000000000000000"], + ["0x08bae5aca5d2347c2fa95f70ca1c4ebae0e5aadb", "10000000000000000000000000"], + ["0x1d7b13d2c5c130e698dffaa11d76adabc787f269", "10000000000000000000000000"], + ["0x0538d2c341c8da8087f4ad59b31c36fac6378c99", "10000000000000000000000000"], + ["0x164a85f1f708a82930b3afe3c395de6faef28496", "10000000000000000000000000"], + ["0xbf1d60655d83665bb5119196cd322df1633e50e3", "10000000000000000000000000"], + ["0x887406bdf59d5978717a83657fc95e7d156ec2b2", "10000000000000000000000000"], + ["0xba1d6621e6934d2a55054d97dc850d22c71bb176", "10000000000000000000000000"], + ["0x220c9e5808b754cb6274dae00252cf164e435b25", "10000000000000000000000000"], + ["0xbc147973709a9f8f25b5f45021cab1ea030d3885", "10000000000000000000000000"], + ["0xc4ff72a7d98222aee8c5a327e19362fd9550ba82", "10000000000000000000000000"], + ["0x51e373e9716fbf01c266568f51f426640279d7d9", "10000000000000000000000000"], + ["0x075234dcb3cf808c139be17b1103eca5a3f84aea", "10000000000000000000000000"], + ["0xc780077a65f33d9d88b59bbf421d4d89b1fc12a0", "10000000000000000000000000"], + ["0x01adb4f8299dffb1d81bf5c5c597ca3a82455d45", "10000000000000000000000000"], + ["0x0cfd83dd7e512b332da95b48fe11f572890282f5", "10000000000000000000000000"], + ["0x94d33ba21a27c96fc8748e76d4e5853bdc0aed69", "10000000000000000000000000"], + ["0xb40ee46d5f2a2312af3ba9aeb4be770ae7055219", "10000000000000000000000000"], + ["0x8baf2d1b82fb4039e6cf1e205daf0aed9b060616", "10000000000000000000000000"], + ["0x614c837b1bf1c60c6484da77eeba9a3b8ca49c08", "10000000000000000000000000"], + ["0xde7f739efec6c96aa041670bd656b86ca08f8785", "10000000000000000000000000"], + ["0xb60fcd4d2ac48985fcb2ea4d457595d48426a1c2", "10000000000000000000000000"], + ["0x8b861c583f176a6755a0354278e6f1c1e14a3f13", "10000000000000000000000000"], + ["0xe66edf95e1c24dcae334541f0ec9df5adeb54096", "10000000000000000000000000"], + ["0xa38e787ec7184ff316b1efe2722bbcef6de09b35", "10000000000000000000000000"], + ["0x5a799288c1571c2c9fe756d6baca1ab323877ad7", "10000000000000000000000000"], + ["0x2848af56c7d3277bbcd1fcaeea5b83ae467759bd", "10000000000000000000000000"], + ["0xb657043d58048e2338788483eaf6f4d1c8b02c2c", "10000000000000000000000000"], + ["0xa110e9c0e636fec57f941cc9b572ceda14f2948a", "10000000000000000000000000"], + ["0xf4be466db056e73991407ede81af9a02de0aa7d9", "10000000000000000000000000"], + ["0x173f23fae21ec04b28ba944c798cd947597347c7", "10000000000000000000000000"], + ["0xa89c05932276acdfd1eca3dda6a7d350f77b34ef", "10000000000000000000000000"], + ["0xaea4a3c2cfb75059f63390e801d1e6200c51fba2", "10000000000000000000000000"], + ["0xf735c24cd1e0f05c8f367385b8c624784e97dcae", "10000000000000000000000000"], + ["0x530617ae022c952fdbf8d46bde299b3383b10921", "10000000000000000000000000"], + ["0x09d1687c93ecf81cdae0c85d5a98f9645df67e30", "10000000000000000000000000"], + ["0x652101ea9b4e50964660bed75ec0da120691b9c5", "10000000000000000000000000"], + ["0xfc27a4d5ba1985ccd2363530097b91444b9936a1", "10000000000000000000000000"], + ["0x862e250f2f88e5513a1fdae4fd9455193a470aa6", "10000000000000000000000000"], + ["0xd37fb986c6436db1fb303c6261363338a1b8c1b5", "10000000000000000000000000"], + ["0x5f3c788ebbd4b45d1340a803b9fc736f6d6aaf9c", "10000000000000000000000000"], + ["0x25eefb6d114645368e7129fb20ad17ca83924f0a", "10000000000000000000000000"], + ["0xe89d2384f2df1fa771081a61c430ec67876c74cd", "10000000000000000000000000"], + ["0x5e2f9711b11a87c8b938dbd2a199d38d9be5b067", "10000000000000000000000000"], + ["0xf2e466ab2661a2d16ee80a94e804c4090a666e86", "10000000000000000000000000"], + ["0x2299e24d282a4aa40cbe927234bed1f2c1bdd884", "10000000000000000000000000"], + ["0x5dd44f5067d0c3d8a4a68add4eb9a3dd0779947b", "10000000000000000000000000"], + ["0xda1e161ad96dc191a7a6011ab39e15506b22f332", "10000000000000000000000000"], + ["0x794184d4b97b1e072780d1d6f1972c4b3e0f32ca", "10000000000000000000000000"], + ["0x665f3f318fa753a22452251bc8123e907e2cb95b", "10000000000000000000000000"], + ["0x35510f09df280c26452911d8b8ccaf36154ea529", "10000000000000000000000000"], + ["0xf737a4232135ddf22cb271a34b1af82917067116", "10000000000000000000000000"], + ["0x62e15cf071d3833e12e7b5c97110a4610a2e1d37", "10000000000000000000000000"], + ["0xddb956235a4f84365d69bb9d563bd6ee34552bc7", "10000000000000000000000000"], + ["0x795dc1e52d5409d2b39612435617c52c5cc80905", "10000000000000000000000000"], + ["0x57e627425c631815bb0d5d2edc05e6259fd535c3", "10000000000000000000000000"], + ["0x0d24c2bc717732b0006c076d0dda4ee724c749c9", "10000000000000000000000000"], + ["0x2bcea9e4ed4e5ddfd65f4dd15b5f1bab406c9b71", "10000000000000000000000000"], + ["0xa92704f53f5e1b6c2ce559a885cd3c1eeec918fd", "10000000000000000000000000"], + ["0x062820dd79da169d7d26f319739b8d67e0b0b1d5", "10000000000000000000000000"], + ["0x6871287bd87405c936d36c95554fa81bee7a4edc", "10000000000000000000000000"], + ["0x5b61219a5a1a1669b7277261e7fa8a2e7a9d3727", "10000000000000000000000000"], + ["0x121ee23cd51145c03be1e6ac0eb7471447da103c", "10000000000000000000000000"], + ["0xeb220ca18bbc9b7df57e5f64dc006ff6b678cbc1", "10000000000000000000000000"], + ["0xff3ae71cdfe3a0e3e8b3f548859536bdd2a87eb5", "10000000000000000000000000"], + ["0x20268e4060521f49476ecdaddf19ab9945d731e7", "10000000000000000000000000"], + ["0xfdf8e4c6c7cad7d7ab71acce915d0607422452bd", "10000000000000000000000000"], + ["0xd5ac1d9ed0f380a4248944e775b1b4d8e9a85ed4", "10000000000000000000000000"], + ["0xe6d70d56193215d35f324a930c8ba2f24b466588", "10000000000000000000000000"], + ["0xf00a5c176de6de15fe3b4968f8a16485e874b73d", "10000000000000000000000000"], + ["0x7351c5848af4c683dfd6945699a77d566938dd91", "10000000000000000000000000"], + ["0xb65eeeaa9e6f8c8227c13718c23834f09aafa857", "10000000000000000000000000"], + ["0x139cb882a255c0ae0dcbd3890221a9c07500c24a", "10000000000000000000000000"], + ["0x486dd6cf9a85d983c3ea9e16255d9b3a5220c0f8", "10000000000000000000000000"], + ["0x45cec176179747402c2868605eb65ac2a1913e14", "10000000000000000000000000"], + ["0xd5810d8aa0ae56ae180b38c0818d0f3ca1c16774", "10000000000000000000000000"], + ["0xd63eae19084c4fe9fb0c4f15c6712558ca20ade3", "10000000000000000000000000"], + ["0x3a8f208eac2420bd7814900c7cb7d1424d26f53b", "10000000000000000000000000"], + ["0x0630c749b8d1d4b62970e415c1ad691efda50d3e", "10000000000000000000000000"], + ["0xee18f898727016f82fe1a6f91e3b9dd0bc2a2fe3", "10000000000000000000000000"], + ["0x94733331a3a5514c0b02a977aa8d1d4071988827", "10000000000000000000000000"], + ["0xa2498ab7bb955e5fc8464330b3035e2395837524", "10000000000000000000000000"], + ["0xf2817674f7a8361b918aea9d4fb9c6900ddd70ff", "10000000000000000000000000"], + ["0xfde49c2d5e0c4099c46bc61f1ffe45c6dd2f3945", "10000000000000000000000000"], + ["0x788df054a2b4d0deca1d08fb2e91d64073f66229", "10000000000000000000000000"], + ["0xa9967dda196305eeb3ffe475b5a9b016c55f0be8", "10000000000000000000000000"], + ["0xe406c00cfa26c3980f2e1a7e0ea9928d0970e81a", "10000000000000000000000000"], + ["0xf2d7eebea898f42b4bd4ba37e91a263b238cce78", "10000000000000000000000000"], + ["0x6938b98336121bde01dd82136d9e820b7da9003a", "10000000000000000000000000"], + ["0x86a41524cb61edd8b115a72ad9735f8068996688", "10000000000000000000000000"], + ["0x3eeca6cf2a180b3a13c241d5472cd46fd66ee938", "10000000000000000000000000"], + ["0x5d5c54fe70839286395afc1f08e8c62515bdf371", "10000000000000000000000000"], + ["0x41902410177bdc600e51f4bdc88b957e70c8d1da", "10000000000000000000000000"], + ["0xc86b85ee39c37f7226abed3fd7deb045034e4fba", "10000000000000000000000000"], + ["0xad615f88d4483b80dd415a0cf533c027d6ecde01", "10000000000000000000000000"], + ["0x1554927346e8f92465ec693e6ee46d9cb8cd6941", "10000000000000000000000000"], + ["0xade9086630754563619908bead432de161a1f558", "10000000000000000000000000"], + ["0x930bfc8d93c71d4412b9e5532e3c91b822b8de51", "10000000000000000000000000"], + ["0x080f23321f1b0b9ec1653ab5730c627d455cc04d", "10000000000000000000000000"], + ["0xaa507c45a3b7f8e302c4699e7acc606bf6ca9d4d", "10000000000000000000000000"], + ["0xccc339cd783d4836b031c3fc43b9a49ae699ec25", "10000000000000000000000000"], + ["0x49c608827ac70fe7a258e0a95aa3fe0e262a4768", "10000000000000000000000000"], + ["0xc8f6a989e73c42361fcbda3ca1a5559e7326206e", "10000000000000000000000000"], + ["0xc3f7a43e07fdd31ff207e14d51f01a625f47092c", "10000000000000000000000000"], + ["0x9a583afe399c74176ed6df0ff5609311731524ee", "10000000000000000000000000"], + ["0x0df1eeb03d08bad482cb6de5fc4a8d009e57c9eb", "10000000000000000000000000"], + ["0x9820f75afd5a15d62c3004874f0beee7408b472d", "10000000000000000000000000"], + ["0x090d267c596e937ffe1b06ff18ae444aa93ea9f9", "10000000000000000000000000"], + ["0xc556aa79252afb2acb6701b7fb9bccf82777ae66", "10000000000000000000000000"], + ["0x790b3a034da88ac00ea323beb1240a5273d5be32", "10000000000000000000000000"], + ["0xe4765356396d280de0690cd763a4612a44778bba", "10000000000000000000000000"], + ["0x5829937b446cd5806e6a350f6297023d0dbe98be", "10000000000000000000000000"], + ["0x6e3e80d88fd4e3417831b8686db83fc36dbe5fee", "10000000000000000000000000"], + ["0x6ec66509f82a6a4c83a7b80717bea75533d20e05", "10000000000000000000000000"], + ["0x200d426c684d730d40827e10c8ff8d90cd45eb1e", "10000000000000000000000000"], + ["0xc6d947c08ba8a703c15dcc8692ddd105ca43ff27", "10000000000000000000000000"], + ["0x636fab28bee42a98bf04f428d27974d35d7be603", "10000000000000000000000000"], + ["0x5b7a7db5d98a212979837a563c24c067b0f81012", "10000000000000000000000000"], + ["0xc6c97d38ce7589c0881f6f845ac035042f088650", "10000000000000000000000000"], + ["0xc9daa2ffee04fa05c9d7199d2faba14ee712a9ae", "10000000000000000000000000"], + ["0x88f3a3b63a8daae5b3a7fb482302a4668d18a3c2", "10000000000000000000000000"], + ["0xf79e3832d138fbec9052652607554b1929a98655", "10000000000000000000000000"], + ["0xffa46639ef45b5da3033c3c394b4a46c90ed9790", "10000000000000000000000000"], + ["0xa407c2237fce82bf9f1f121df70d787af329a74e", "10000000000000000000000000"], + ["0x6f92c928d005729656791f78637dfabb19c4fe49", "10000000000000000000000000"], + ["0x2159cd8abc5b09ec9ce6b89160e3d9720d244926", "10000000000000000000000000"], + ["0xb2953b2d2f41ef54b293557be1fd2afa19ef9340", "10000000000000000000000000"], + ["0x4952f5dde00a0677365e42d33bcc5a8abd4e2b43", "10000000000000000000000000"], + ["0x65bf3d0acad5b5feeb916666d56cda2bb2837e58", "10000000000000000000000000"], + ["0x7d6d05856a972312b1554297529a7c0747567988", "10000000000000000000000000"], + ["0x3dad8cf200799f82fd8eb68f608220d8f3ebf8de", "10000000000000000000000000"], + ["0x094a540bd61318318ed8898dbc834374142c46ba", "10000000000000000000000000"], + ["0x7162c6a7f4e58f4d3dd53181d7c7581dec566734", "10000000000000000000000000"], + ["0x2d62f955a3a18a4852143fe3aa019366964fef2e", "10000000000000000000000000"], + ["0xb3859c02a325320703097329b9b7a0e0e775a39f", "10000000000000000000000000"], + ["0x496aa49830137bfb023a4cf93009905182adba9b", "10000000000000000000000000"], + ["0xe67421fe92494302b10d8b8987ad9a195d2b286e", "10000000000000000000000000"], + ["0x7b57db50f91356abe299605095775a6246742538", "10000000000000000000000000"], + ["0xe7bc8ef68cb17cd3f57c067574197d50b8a2e156", "10000000000000000000000000"], + ["0x88f10161eeb86a7f87ca62363f291d58b207621a", "10000000000000000000000000"], + ["0x5338ef2d92489eaaca0cccadbcd408ad2bc6468e", "10000000000000000000000000"], + ["0x17e845e8f6b5bc93d9200c47e0a42ee0a9345acc", "10000000000000000000000000"], + ["0xbea3903219313df867ff8663749a0fa3cfb20a43", "10000000000000000000000000"], + ["0x1ce7b9f9371db21f4e14d93c1bfd620fa80cbebb", "10000000000000000000000000"], + ["0x587c632db714654ece0476d0c21957c724a2c233", "10000000000000000000000000"], + ["0x33a0c5ecac63b3f485676ae539455dc81e1c8f5b", "10000000000000000000000000"], + ["0x7fc926185cd970deb8696bd4c0c0c56c351d4408", "10000000000000000000000000"], + ["0x91c7a2803dd820b9c0a76eb0980adeb21454d268", "10000000000000000000000000"], + ["0xdc26dcf376f16c990fa4ea6030f8b77d912bc764", "10000000000000000000000000"], + ["0x860cb0dcda89b13915a67619f8b0f18f48524455", "10000000000000000000000000"], + ["0xd2415ba39744266c64094f3fdab538d44b62159c", "10000000000000000000000000"], + ["0x460501463ddadf0b28e1b396f20e01df83a68274", "10000000000000000000000000"], + ["0x824995efc6b53c0d873391d25859312d139b722b", "10000000000000000000000000"], + ["0xd7ba0cbd7421864681a406858b8c3f117445fae9", "10000000000000000000000000"], + ["0x7d13166cf615044bacaebc9283a06713d12cceda", "10000000000000000000000000"], + ["0x57971ad4b95f8a7c6f7e62e56fce0fc2b76460c1", "10000000000000000000000000"], + ["0xc95696ca2358095df1f025e91e5c77b8332873c2", "10000000000000000000000000"], + ["0x728b322a876d515fb9773acbe0b744973fc8b4a6", "10000000000000000000000000"], + ["0xfe6bd4338e1abdbe99f1c9ed918fba846f8d1f3d", "10000000000000000000000000"], + ["0x80e8c108a9a057efb7d38f0a362a8da47cdfaf27", "10000000000000000000000000"], + ["0x6f72056a4cab954d2901c22b6f05ec75fd5fb6a2", "10000000000000000000000000"], + ["0x1359669ddc1b3e23275c4542ce82680527c02f71", "10000000000000000000000000"], + ["0xcff1fc75f7abd546d8a948660f46f0da9deea622", "10000000000000000000000000"], + ["0x491dd4a1b070c22c0b287d675e9f5fd75b55ff56", "10000000000000000000000000"], + ["0x3b565678521787151a5a66d1f51d73b6b7a0643c", "10000000000000000000000000"], + ["0x547ed88d8bca88033428c9b300b7808d2e404e7e", "10000000000000000000000000"], + ["0x470bab7c3e3e4fadba43afafc843149c6cbc3cfa", "10000000000000000000000000"], + ["0x6d16749cefb3892a101631279a8fe7369a281d0e", "10000000000000000000000000"], + ["0xe00fa26712d743ec5f89af454f0424b17470fa2a", "10000000000000000000000000"], + ["0x54427c853b20c6691f2aa9e1651402580068d503", "10000000000000000000000000"], + ["0x3411a1279135403b885d9524166244da7676c54c", "10000000000000000000000000"], + ["0xded4528c04eac80ce019adb0a4e30bd4d5fd9479", "10000000000000000000000000"], + ["0x972929432e1c220860491f91a1096d69548aabb5", "10000000000000000000000000"], + ["0x2497f7a60f34b315397b75ca739807318cca05fc", "10000000000000000000000000"], + ["0xd8864bb8c74f9cee40347014f9de413022ab2b36", "10000000000000000000000000"], + ["0xbce0b69c7066806318381076e24d41da19918a13", "10000000000000000000000000"], + ["0x66d8e5c81010b49ea9703336c1a78dd769cd2494", "10000000000000000000000000"], + ["0x908851863ce45223c9d16892a2bf1553b5659be3", "10000000000000000000000000"], + ["0xfb27c8582976f1a29d58e89bcc89da1e54d78076", "10000000000000000000000000"], + ["0xfc0567dc074f803bc3d32290b4f995da96f6ce97", "10000000000000000000000000"], + ["0x6bcfb281eefb0ba7c7264028a06003f6fd8a9cac", "10000000000000000000000000"], + ["0x40ebf96e428b4920a7c4c57a34f99e71367a240c", "10000000000000000000000000"], + ["0x6c388f50a0b0edfc6da6d58d75d19d70a2fece44", "10000000000000000000000000"], + ["0x9910e06107b56e5f68e609f6f71ab611e38f4493", "10000000000000000000000000"], + ["0x6b6c4a2a94c78d42c767bbc378ffcac3c530c8f4", "10000000000000000000000000"], + ["0x8f423720584b0eff220c8ff0b62700917089be22", "10000000000000000000000000"], + ["0xc59de18ecd31f5e9c5a12c69ab8b175e28c96d04", "10000000000000000000000000"], + ["0xaa9233eb821f3bf04b265319e5eba5607e752acd", "10000000000000000000000000"], + ["0xa3bd3cc8207cfe58e71003e6d1d64256b2375467", "10000000000000000000000000"], + ["0x19868b43cc7e16f8a928c500400d24f1b5f2dcff", "10000000000000000000000000"], + ["0xa7b95d2a2d10028cc4450e453151181cbcac74fc", "10000000000000000000000000"], + ["0x59156935684fb81a35b068d599c34947A7eE78dE", "10000000000000000000000000"], + ["0x24B4a356917d9F0b99353C56378FC247d9e6ea90", "10000000000000000000000000"], + ["0x9216E7b3B0Df52291802f94C67004d262159Da73", "10000000000000000000000000"], + ["0xb1dB3e730dF1833983222130cF95139f6b563578", "10000000000000000000000000"], + ["0x5214a7293E165c1E1F36C14d0e16724ba13e14FE", "10000000000000000000000000"], + ["0xc79Bd3a1cf2E6935136A4a9833f1aa67aE67D9aA", "10000000000000000000000000"], + ["0x9cDb1804156F362Aa5900478E1465C917A5F6a3A", "10000000000000000000000000"], + ["0x6728fCBA2012863e9E1bD12f2a95355deD06C7aD", "10000000000000000000000000"], + ["0xCf3e183AEAE7802008a77a91CD90361860571717", "10000000000000000000000000"], + ["0x8b90b067d02132fC7c5cDf64b8cac04D55aBC2B2", "10000000000000000000000000"], + ["0x042b312CFD664e6f954E3e03099eE983ff45Ec3e", "10000000000000000000000000"], + ["0x4a5BB1c9347A0d4F7e06a29239162f03647d9232", "10000000000000000000000000"], + ["0x719Ef1E50d44dc2F9fb43978A613164bE0275476", "10000000000000000000000000"], + ["0x27f7E530d0c1aB780d8d6962e9Cfd45a9C96d8b9", "10000000000000000000000000"], + ["0x3b24a7C97815d9F18eeB02f15e6B1b89064B6f9C", "10000000000000000000000000"], + ["0x1DBe623157F7CDf98771020e688f7bc25A2e9A21", "10000000000000000000000000"], + ["0x0Ed67dAaacf97acF041cc65f04A632a8811347fF", "10000000000000000000000000"], + ["0xD164f7d5B93F17C863F0FeAec8AB92447dA9B53d", "10000000000000000000000000"], + ["0x53A2f447C61152917493679F8105811198648d81", "10000000000000000000000000"], + ["0x5F6a4215FE729870A437f29d3b3278e27C8789B0", "10000000000000000000000000"], + ["0x8b58f7c312406d7c6a5d01898f0c5aef31ee51a7", "10000000000000000000000000"], + ["0x52E7bdE89Fcbd1e1C656Db1C08DdE45D82447e25", "10000000000000000000000000"], + ["0x2D69BAB9738b05048be16DE3E5E0A945b8EeEf3a", "10000000000000000000000000"], + ["0xa777D9a1BedFe3E4Df943BCFdD5B13Ace8B1f2f7", "10000000000000000000000000"], + ["0x68C0F043Fb61F1be7e6F087033Ddf92b9Cd02de7", "10000000000000000000000000"], + ["0xF90F5f3510AF48786D98aFeb3b8C39fBcB3C6C1e", "10000000000000000000000000"], + ["0x0C2928630395EA989e3077Aefe50E08dc5426584", "10000000000000000000000000"], + ["0x9455FD942cA87446fD914e07C403C785bdcdE84E", "10000000000000000000000000"], + ["0x43f4759153292Ac675ec7ff56439c60065ACbC51", "10000000000000000000000000"], + ["0x857B3470632d12B041a7823219165F37C2F84783", "10000000000000000000000000"], + ["0x2938b2a7EbF9a59645E39d51ec5eCA2869D6C53D", "10000000000000000000000000"], + ["0x482c7F6217292d40452b68897c8265d49f20A511", "10000000000000000000000000"], + ["0x4F8b1d0FD9109de9099e1cA1312cA8089E602C25", "10000000000000000000000000"], + ["0x3B722bfB1c27B1Edc6C9C2e057c590a9ee57B2b0", "10000000000000000000000000"], + ["0xa69303D076dFb54d50589C4D018205a409Aa4293", "10000000000000000000000000"], + ["0x6cb8e395D1F7c7B00D6594deD6Aa03C5f7cA13C8", "10000000000000000000000000"], + ["0xCA63CD425d0e78fFE05a84c330Bfee691242113d", "10000000000000000000000000"], + ["0x2E79776460bf448B286874351AD55ef6DAF18102", "10000000000000000000000000"], + ["0x778C029675d3e2435Cf4C207E981D37c2174bec8", "10000000000000000000000000"], + ["0xE1176052966f14802BB3755bbdfcaA712B4708e8", "10000000000000000000000000"], + ["0x2165Ffc3b1c7eE4A618ecDf3D025625f30112E4E", "10000000000000000000000000"], + ["0x468cB54a3821d8b0129C42Ea6ADf12748d97fD98", "10000000000000000000000000"], + ["0x20F7C7E4b410af0D7309a04792FC22c7b4c7f46E", "10000000000000000000000000"], + ["0xfD6231A29661100e9F7E68d37730b040E24caD28", "10000000000000000000000000"], + ["0x187c77E1C74057b5Ae98F90B45E4303Cb7361C76", "10000000000000000000000000"], + ["0x1791Ef76A0b0451457B244B2D2FE414237992cc6", "10000000000000000000000000"], + ["0x3a1ba4c78f6277f51ba365a532812d1703c2c7ec", "10000000000000000000000000"], + ["0xeadb2be9a7123966214f3fef1ae19a9f38b0220b", "10000000000000000000000000"], + ["0x8afcd932c015955eb3177f865b0f91e3f122b3ca", "10000000000000000000000000"], + ["0xbaea24e991f0723f845a08d3e299dd6f739285ef", "10000000000000000000000000"], + ["0xab21d8ab61a99e75641466a6bd0a480fee3e4696", "10000000000000000000000000"], + ["0xd6ce913c3e81b5e67a6b94d705d9e7cddf073a7e", "10000000000000000000000000"], + ["0xa4fc358455febe425536fd1878be67ffdbdec59a", "10000000000000000000000000"], + ["0x8437a6bf9235fd003d50cd4024fa7ec6979208d5", "10000000000000000000000000"], + ["0xdd6c35aff646b2fb7d8a8955ccbe0994409348d0", "10000000000000000000000000"], + ["0x59e83877bd248cbfe392dbb5a8a29959bcb48592", "10000000000000000000000000"], + ["0xf8e7e3d15f4b46eeaac1143ac1391a4f82a750a8", "10000000000000000000000000"], + ["0xd11ad84d720a5e7fa11c8412af6c1caa815a436d", "10000000000000000000000000"], + ["0x5dce3cf1bbdd8fee714cf7ec1f00b817cbcf2160", "10000000000000000000000000"], + ["0x72a40e1681bec3811a7d91a0966cce618fadee42", "10000000000000000000000000"], + ["0x4b0ddf4513d807553695d13c195170cac50da9ce", "10000000000000000000000000"], + ["0x403c2d4099179e178a0b9860139f0284a63c8690", "10000000000000000000000000"], + ["0xa21392dd4b12cb543fb6d1e4e8759b3ac6e55169", "10000000000000000000000000"], + ["0x4553ed5d8d3731e629f67bd86abd021175f31848", "10000000000000000000000000"], + ["0x21e05694383dd7582c0e5bae41f780fb46a4d09c", "10000000000000000000000000"], + ["0xab0df7a6282cf7967c07268775c252aa4317a116", "10000000000000000000000000"], + ["0x6f7bf13e057305d04abd72e637e491cc30569f43", "10000000000000000000000000"], + ["0x9fd1b607684361533a70184f90cf239fd41d4a6e", "10000000000000000000000000"], + ["0xd287ce3a79eab4574e7d7dcea80dcf74374e461d", "10000000000000000000000000"], + ["0xde4d9f976ea868147df16e829e13c3f5565c2760", "10000000000000000000000000"], + ["0x7dd17c10f9dfe26f335360dfc00f85fa7323d5b4", "10000000000000000000000000"], + ["0x83e8ff54a46f1a3ec12407d75f810b1c31a8f669", "10000000000000000000000000"], + ["0xed9692b68b9c66e88cdc68c15fd16bb7b266bedf", "10000000000000000000000000"], + ["0x07d22cd5d483b1242518d5cd26b21b552f0cfcdb", "10000000000000000000000000"], + ["0x954f1ac51131cffd7985ab5bba78cf2f643e050c", "10000000000000000000000000"], + ["0x80be2689bcfdf04f4893cb76375e04b2d7d727c9", "10000000000000000000000000"], + ["0x420df34795f8c583f0edc2c618d4fc7e612bc202", "10000000000000000000000000"], + ["0x47642347c9731e9fc2470cc393373b95e8c0d730", "10000000000000000000000000"], + ["0x6d5de6cb1e6ae08986dab1407333e3c3f8e7cb94", "10000000000000000000000000"], + ["0x1c1f37636b0ca65ff03afd123b60d2e4fda961e4", "10000000000000000000000000"], + ["0x11ededebf63bef0ea2d2d071bdf88f71543ec6fb", "10000000000000000000000000"], + ["0x5ffc335ec2fadf0d61a466f7a1ebc738a7d1fbdc", "10000000000000000000000000"], + ["0xb2e7d71432001a0eb0fcbd4d32ba66439d413bd1", "10000000000000000000000000"], + ["0x2556ad9687048bec195221cada3699a1cc249b0a", "10000000000000000000000000"], + ["0x4d883824258f7253101f266a23207dcb2dd45768", "10000000000000000000000000"], + ["0xf52e6269393144b636b17c73eeb00057106af6e9", "10000000000000000000000000"], + ["0xbd87efbd4b883a969b646045dd9a3661468ecc23", "10000000000000000000000000"], + ["0x91e6b73b4270832829a9ba986d3beab57bfff4f9", "10000000000000000000000000"], + ["0x21ff5b95839790bb88a033a543e7077e67f9e7a4", "10000000000000000000000000"], + ["0xca0bc649c84a982935b03b0e27fde5035d921f34", "10000000000000000000000000"], + ["0x3d8648ddcf10f0dede9ac8d49857abd564cd56f8", "10000000000000000000000000"], + ["0x9b6ca74030bdb7f2be2d4109def9e5c4ea316eb0", "10000000000000000000000000"], + ["0x0a7a4e9bd0d88ae882fc823a85cbf50683f60e4c", "10000000000000000000000000"], + ["0x14786310da605118e09b20079b1bacf3e6bc499a", "10000000000000000000000000"], + ["0x00a7e14d75a339c080da5295fd0176d02bf9a74c", "10000000000000000000000000"], + ["0x29bbf77899bf371b9ce9bb9d2fb7f1325fe198f6", "10000000000000000000000000"], + ["0xdd59b334751e7a86bda7efe96b93a5f760e33f2f", "10000000000000000000000000"], + ["0x190c6fc3121706b5d600de5de94c1a6c8055660b", "10000000000000000000000000"], + ["0x3dc13f21eb7815ea9b2fba3e2b25904beac5936c", "10000000000000000000000000"], + ["0xa1b0176b24cfb9db3aee2edf7a6df129b69ed376", "10000000000000000000000000"], + ["0x7cf70b2a18436074c518cd27d3f66615ffd73948", "10000000000000000000000000"], + ["0x42d17def388c0435073eff221a121c04002c485f", "10000000000000000000000000"], + ["0x41b9ba8b989ba0a1d73168278522550350df9e3b", "10000000000000000000000000"], + ["0x3a96850e2d38e2d0f8cac1bac3a175b7c7ef2661", "10000000000000000000000000"], + ["0x666666a0200c2b78eddd1ef279488c6a714f010d", "10000000000000000000000000"], + ["0xbf5ae133b9a0fc1a07952a7df2afa21f7f69ef58", "10000000000000000000000000"], + ["0x2c6de6e4c2b419c7d68b7ede3ac4030586c7b83e", "10000000000000000000000000"], + ["0xd76db662ebaf51dbee67a01c5241e8dd0399b0c2", "10000000000000000000000000"], + ["0x56fefd61bb9b10d8555f970de09ae1359c931035", "10000000000000000000000000"], + ["0x0000000000d1d773661e4b2102bbe07d4dcde777", "10000000000000000000000000"], + ["0x00000000b7ca7e12dcc72290d1fe47b2ef14c607", "10000000000000000000000000"], + ["0x000000000035b5e5ad9019092c665357240f594e", "10000000000000000000000000"], + ["0x0000000000d41c96294ccdac8612bdfe29c641af", "10000000000000000000000000"], + ["0x0000000000003f5e74c1ba8a66b48e6f3d71ae82", "10000000000000000000000000"], + ["0x7a4c092a03d9f962a67d7822afa652366dac9b9c", "10000000000000000000000000"], + ["0x8006a2b383f107039fa8b5e898c3309add480a60", "10000000000000000000000000"], + ["0x8763f5b2cdad1e27a09eecb949a8c41d4b54ca0d", "10000000000000000000000000"], + ["0xc8f59d3b127436cf6fc24170e42106518b6ea085", "10000000000000000000000000"], + ["0xcde2984ee2b18dbd33d7fb18d25202c13cb2e2d8", "10000000000000000000000000"], + ["0xd12defb3279003a6656023135edc975ed4d918b4", "10000000000000000000000000"], + ["0x8adace41ec579423f149d7402f282301fcfaff36", "10000000000000000000000000"], + ["0x712de1b0b10a53f7ea9999a3e861ec25358e33be", "10000000000000000000000000"], + ["0x51c0ac97fe85b5bfccb7f631b49a90b0cb75de24", "10000000000000000000000000"], + ["0xdf5a0469340f97beda65fce15ec7eb153e2aaba9", "10000000000000000000000000"], + ["0x859eb852e93ecc12f24790ab764f98a571b9757d", "10000000000000000000000000"], + ["0xd3b6affb1e8d3e115e1a6ad1ad8ce54fbe9927b1", "10000000000000000000000000"], + ["0xcf75a4a23afabde6938f4b28c33107e61f3d8444", "10000000000000000000000000"], + ["0xed110c981c05941aa7920e389a93e5c68028216a", "10000000000000000000000000"], + ["0x533a04903dade8b86cc01fcb29204d273fc9f9b9", "10000000000000000000000000"], + ["0xbc259c4f7a55b13f3b2d4e886c341a41fb9fe211", "10000000000000000000000000"], + ["0xe3075a08b7f42c0fb55b8546eb7170a6435531f3", "10000000000000000000000000"], + ["0x03b0a411e6329f446154b119209b1d385aa816e0", "10000000000000000000000000"], + ["0x4cc8c9a45b953a1922d8700e7cf4c0489d0b4154", "10000000000000000000000000"], + ["0xad5b555f1bcad54e85366697635b98e46358d2d9", "10000000000000000000000000"], + ["0xd685f9a87f5cbd534824bf1dea581a8de083f2da", "10000000000000000000000000"], + ["0xcdd22c828649c98dd9833f0ebe359dc5e79788b5", "10000000000000000000000000"], + ["0xee6c7834be4765496e94fd2cc2703d01d4895bbb", "10000000000000000000000000"], + ["0x7d29711eec0483299107b3c1093a60c161108834", "10000000000000000000000000"], + ["0xb4080eb64a6f303fae044713dbd5ae211ffda945", "10000000000000000000000000"], + ["0xf4e13d7c879fac90875900084cbe4b0dd98d698e", "10000000000000000000000000"], + ["0x09c75afa49a945c2b7222a1442e75efa184cd35a", "10000000000000000000000000"], + ["0xfc51089adf2e5ba5658f3e176c7cfff4a58a0dfe", "10000000000000000000000000"], + ["0x8fb1b269474bb69db9f5190b33c0d3751d1bef46", "10000000000000000000000000"], + ["0xc92486f92c88a951f97f137585a810df120a70f7", "10000000000000000000000000"], + ["0xd056020d84a35cd62115fa4666e0f10d7f83acc6", "10000000000000000000000000"], + ["0x193dad0127f564d973aba50b373db51fd2f2588a", "10000000000000000000000000"], + ["0x20e5e29c0c9a2c5f95508cc9f6c4ad1d224a4fa9", "10000000000000000000000000"], + ["0xb1f19df9cf8f3825ee880622a37edbba6b155a76", "10000000000000000000000000"], + ["0x1609bc551b38eefe1738bce85ecd46797082709a", "10000000000000000000000000"], + ["0x0866f8e82e7b9af1c0f74424bd7ded65ecd0a78d", "10000000000000000000000000"], + ["0xf47f42b1fbf477e89cb8f08815da073d287b973b", "10000000000000000000000000"], + ["0x6896625252cd1410425465bc0790e232aa7dd978", "10000000000000000000000000"], + ["0xe1ed8a8cd6160f7ac8d597b64ba8ce473577e585", "10000000000000000000000000"], + ["0x6e5f7bd9b940287f6c9ae8a2ecfb93224a09cba5", "10000000000000000000000000"], + ["0xa4a4d97cded9ad9727f7a5b58558bf30736156f6", "10000000000000000000000000"], + ["0x03894d4ac41dd6c4c2f524ed4417c90fa46972c6", "10000000000000000000000000"], + ["0x09a84adf034e5901b80e68508e4fdc7931d9a7c9", "10000000000000000000000000"], + ["0x9101d1990818065d2bf3f5ee9d658bf255a0475d", "10000000000000000000000000"], + ["0xc6ead34620572c0f1c5f27b92dfb9290d50a7986", "10000000000000000000000000"], + ["0x42c5d633ac3486115db8f5a23f7dbd4b0d259cc4", "10000000000000000000000000"], + ["0x12d5289b2081a257583de99a6b6b393150734e04", "10000000000000000000000000"], + ["0xbfbb6b0341f73380906cd4af13895360465fb53e", "10000000000000000000000000"], + ["0x815fcf7e300a21fc3097e995feeb56fdec925b24", "10000000000000000000000000"], + ["0x35ebf9baf1bb4e74fb2769a3fc93e431457c4d40", "10000000000000000000000000"], + ["0x4bca809a232d8805b80e5d186758b9df6e72c879", "10000000000000000000000000"], + ["0xc1e549320f048d8149d5b0cb9cb268da59f1f2ad", "10000000000000000000000000"], + ["0x0aa5973f2614dccfbe53c8273da22502d7e4fbd5", "10000000000000000000000000"], + ["0xae151eeb1e090673f0bf077254c5c3fe9911e167", "10000000000000000000000000"], + ["0x98098214ad5b1b08cc9d94e32f056e9a0de18110", "10000000000000000000000000"], + ["0xe2a16ddf313f188ebf8c45b46ea3ceebb05357dd", "10000000000000000000000000"], + ["0xc39a90d17a9f67f3a7972823bd371ba99b4ff9ba", "10000000000000000000000000"], + ["0xfb799cfc9b278f05559ba019d0ea1a5b0a3ef6a6", "10000000000000000000000000"], + ["0x46419f392a12611ed82dc7d4e8c6642de0e75c5a", "10000000000000000000000000"], + ["0xb3fa7b97f809ae5d006937c3db8c28f15edc7ee6", "10000000000000000000000000"], + ["0x46483f48fdf320b98700c7309270c0ad44f1d244", "10000000000000000000000000"], + ["0x50d89673639483f4d9d7eba8b3f999e102b6585a", "10000000000000000000000000"], + ["0xafe019f6f74880e4ab83211b39d8b278744f6e9f", "10000000000000000000000000"], + ["0xbdee16eeb6eb4b263f3dbb8d96bf47c9516c4848", "10000000000000000000000000"], + ["0x022110ad17cc7b923a9104912a8af8738722922f", "10000000000000000000000000"], + ["0xc1440f6c952862e39c84e901bf032ffaa9ec2fc4", "10000000000000000000000000"], + ["0x7bceb3338373cc3239cc4d326e936061b7563fd9", "10000000000000000000000000"], + ["0x8e61c5cafb9b6e44a9495f364a538aab068dc164", "10000000000000000000000000"], + ["0xe906889a717ce0f53f5f5a0c4f64f6407623d1c2", "10000000000000000000000000"], + ["0x2bc8d75939444db20669df1c0d1ba7980b25ed72", "10000000000000000000000000"], + ["0x35ff839c553611b5552dde6bef183892aab324ac", "10000000000000000000000000"], + ["0xe07b9539d2451a2b9bdfbd92dd3f149375b080a4", "10000000000000000000000000"], + ["0x7816de01faf651f085dd9184f600faaa65a592dc", "10000000000000000000000000"], + ["0xefe9b7bb49cbc970a502ff8d54fc8abead1be40b", "10000000000000000000000000"], + ["0x93de650c5758322449ba8990a5e072ab37cfcc0e", "10000000000000000000000000"], + ["0xedae54ded7e6b721b7c233be911d7a5822d7b436", "10000000000000000000000000"], + ["0xb3de73d12866e4b68bea36d02519d7d565c005f9", "10000000000000000000000000"], + ["0x45a5f6c9372ef4644f5c45dab0b1a7619f4cf981", "10000000000000000000000000"], + ["0x2245be89fc8fab94ed982e859aa3212a4e4eb7e5", "10000000000000000000000000"], + ["0xb3d68e6a107695562ad87d6a656ee63a910a86bd", "10000000000000000000000000"], + ["0xc5fbc6a76a4b462911787529f144561cbcde165a", "10000000000000000000000000"], + ["0x4617628f76c30e9553189c034dc6f4055798f406", "10000000000000000000000000"], + ["0xe261b0606dd815a7952994c5c60c88040a316692", "10000000000000000000000000"], + ["0x72f55b96e746075da2932a5518251aa641f79e4d", "10000000000000000000000000"], + ["0x500e5eb0cf12736f237604bb90ee996a24def620", "10000000000000000000000000"], + ["0xd5a191afe4c240f2ed31049aacaf5eba4112e041", "10000000000000000000000000"], + ["0xc35f4f66ef059db7fd47e7c9e6c2ca0020db8f7d", "10000000000000000000000000"], + ["0xf02a62c2f98b0d2dadc1a234f0d1b2b2937a5f62", "10000000000000000000000000"], + ["0x46138b3b33f8a716d68f39c57c98b56ac0a8f85f", "10000000000000000000000000"], + ["0x1ea1f14ae49d530b3963d5191792c1465bce4329", "10000000000000000000000000"], + ["0x2133287f2f85b21ae14674a1f1b5c88ed75ecdcc", "10000000000000000000000000"], + ["0xb2f456886367c8e50566377ec6d9293d4da5bb81", "10000000000000000000000000"], + ["0xc72d73222f0ea792287746420fec94f35d84208d", "10000000000000000000000000"], + ["0xec24ea9ecb4c1601399c64e8d7abaf46d68cf494", "10000000000000000000000000"], + ["0xb2dfffeac59e3f836abc893440f847f20f563bbf", "10000000000000000000000000"], + ["0x697ec55dc3fac5bda4b296a1b7c098899b828a7f", "10000000000000000000000000"], + ["0x66f322df0f7c9876b504b7e4ea1a564d895e88e5", "10000000000000000000000000"], + ["0xe3695c0e7284e173387c8a0f822e46c30714cb4a", "10000000000000000000000000"], + ["0xd87bbf3ad63007664d2a59ef71be2b5fb48ec293", "10000000000000000000000000"], + ["0x34f0c3c7614f134c4101ea78f318c311c0291435", "10000000000000000000000000"], + ["0x877a05fc102f5b0485ffd9ea390c6343b1d5d850", "10000000000000000000000000"], + ["0x83ec0d66b71817de7c927e9db3ea4e993466af26", "10000000000000000000000000"], + ["0x1c7679cf155d6df0523743bc4f26f4a08b6a7daf", "10000000000000000000000000"], + ["0x092e6fef0f3c8289d257b651d50f673241aa2a0c", "10000000000000000000000000"], + ["0x93d1caef0ce3633ff54ca04c99b235719562c3cc", "10000000000000000000000000"], + ["0xac95e9dec056835d88817a8a59a06b1667c515d7", "10000000000000000000000000"], + ["0xe121443d78019ab37cda3d3e868fd2c487ec2a42", "10000000000000000000000000"], + ["0x6ff97e9c4236761ff003c7761134252e25a3ca71", "10000000000000000000000000"], + ["0x7df1a25fa00989566bd9ae3a3cdd80d5d571e1b4", "10000000000000000000000000"], + ["0x8e3960ec34da976ea4550531d35ef1a9221258ec", "10000000000000000000000000"], + ["0x2f50cf82bf670dff6bf41ae1f62df193fe5c2755", "10000000000000000000000000"], + ["0x452e99c306c63c1264012bf036df034a8ee4b7e2", "10000000000000000000000000"], + ["0xcd44aa80d4ed8ff6f98ce0256ea056965752d61f", "10000000000000000000000000"], + ["0x6c8f072c7a385cfd1ade39f56c3002952ce1e459", "10000000000000000000000000"], + ["0x88168519dba7e4957246f2179980a54cbb43d29f", "10000000000000000000000000"], + ["0xfceebfc42775d38427c4078a9d1a8160b6ff9a2e", "10000000000000000000000000"], + ["0x527e55577b6b0807f8b45d2bf0187cf9f690d15a", "10000000000000000000000000"], + ["0x4683928755319691003dff88e14c595b14730022", "10000000000000000000000000"], + ["0x111cd92405b1dfbd19882d361418f49d99d8fed8", "10000000000000000000000000"], + ["0x76a9fab29d56ce1b259f75a2284ea809fff14fa2", "10000000000000000000000000"], + ["0xad44b8380d76f0b4cce74743c5745ff79ae859f9", "10000000000000000000000000"], + ["0x67505aaf91258a086da665fafdeaef7de9d971bd", "10000000000000000000000000"], + ["0xfabd45734e66b7cb619d154496d1e675bf3c802a", "10000000000000000000000000"], + ["0x238296e3ec62a9cca297f02a33b7cd310f0f63be", "10000000000000000000000000"], + ["0xc18a0029637f1803dc347761cd10dd3b5c7a7ef5", "10000000000000000000000000"], + ["0xa28e586e24e6d78d05e822188ddc118ac2fb034b", "10000000000000000000000000"], + ["0xc977e7b16c33cf122302d5285247da09a460dda1", "10000000000000000000000000"], + ["0x0b7b72a26780a8ac9cd5ed6d4bb6c3a741158fc3", "10000000000000000000000000"], + ["0xccd902ed10c711a8b2d0e916239cb016f23efb13", "10000000000000000000000000"], + ["0x2738f6cbddcd604979aa1909d6c72d285e588a32", "10000000000000000000000000"], + ["0xf26415fae6e4765060541f8f1b329568015b184d", "10000000000000000000000000"], + ["0x8ff04dbcf6633de5570a07b32f015a3d4138dc73", "10000000000000000000000000"], + ["0x60f84a94673d3802588ebcaf494da34e1a636067", "10000000000000000000000000"], + ["0x3678f32be7a9998c61ec05d940a9f3a0cf70d4a8", "10000000000000000000000000"], + ["0x3d85684b413f8b30d677d849dc3e24cff184efbc", "10000000000000000000000000"], + ["0xf251efb1d2f28204b2cd77ff30e9dc7564adfafd", "10000000000000000000000000"], + ["0xc40d5980f1c46b32c17d4694214488997411a3b7", "10000000000000000000000000"], + ["0x98006832cd6d49b80a317ae5f84a5049a954d31d", "10000000000000000000000000"], + ["0x82fc6a686c5db9b41f58fea5a8ce4c1f6062e5a5", "10000000000000000000000000"], + ["0xf63e2d56e42bdc66ba3dac234f48ef24d53c4e57", "10000000000000000000000000"], + ["0xca9b1442ee47083a3a2eb06853def92f30e8d70b", "10000000000000000000000000"], + ["0x0a8499633c25a9207efe48fbcdf80a51f9a5c427", "10000000000000000000000000"], + ["0xb98cb808991fc151a7dd0ee967d60fc4766dcf57", "10000000000000000000000000"], + ["0xb19be18a7d279432f607676acd34c62ff932daba", "10000000000000000000000000"], + ["0xf204c7c87ed81a78aaf98c4a908190a5044a3baa", "10000000000000000000000000"], + ["0x8cc4264361216b9e3ca4d764cbf317c0c746780e", "10000000000000000000000000"], + ["0x2c5651d9c4d9a9031ff789845f2d44c82f194033", "10000000000000000000000000"], + ["0xcc4aa092e8fe6e64763ddf1bf52ee661cdbca217", "10000000000000000000000000"], + ["0xa1cc1d2de52706ae895dba1852689d8d03708f3b", "10000000000000000000000000"], + ["0x0f8dfda2cc073a6160c03ca856bec0f376e54440", "10000000000000000000000000"], + ["0xd255391dece0185504219f96e6b2a7465bcd24e0", "10000000000000000000000000"], + ["0xdb461dd202c8cbc96cfbeb65ceb6fc6b0e618a41", "10000000000000000000000000"], + ["0x9ee5dd588712241236ce514c234cc18256200fa5", "10000000000000000000000000"], + ["0xb335175efa2f4bd897cfd3e4e60b18805261f021", "10000000000000000000000000"], + ["0xfaf09c4d3213fb8d0ee7f8cc6f11c6248a213993", "10000000000000000000000000"], + ["0xbf06bc4dbeb472c4320823467143375a53713cad", "10000000000000000000000000"], + ["0x6fe797a05359c9d91b1f85d418e2ed4ea6c65a8f", "10000000000000000000000000"], + ["0xbbfaf36dd3159628489f42c7bbc6e058fb9b18bc", "10000000000000000000000000"], + ["0xc313cfce5eac941604d6f10bd6afd0a562bce37a", "10000000000000000000000000"], + ["0x7d81510ef626292f361e97708b6a618cae3ceead", "10000000000000000000000000"], + ["0xa51add0a3ad07fd3f69a06082765b0d112914c8d", "10000000000000000000000000"], + ["0x41239bf909cd4f138990575cd1a34c8efddfab68", "10000000000000000000000000"], + ["0x432cbdce8596e8d5eae91e0a744909672c587681", "10000000000000000000000000"], + ["0x48ba945370f6de589f45307233bee6772a1abc4b", "10000000000000000000000000"], + ["0xcf3dc6107a41911d39104bc06f62b5835511d6e8", "10000000000000000000000000"], + ["0x5d59d5f366689486dd493a90d0d7af142aefe0ba", "10000000000000000000000000"], + ["0xd9458d4518322bad7423858d356043596edee347", "10000000000000000000000000"], + ["0xc38f9eac4df539c1e611021c062863e3286e6806", "10000000000000000000000000"], + ["0x8f6c5455b4879117d29710c9cc61f8d6fb76ec0a", "10000000000000000000000000"], + ["0xd81e2cb9394b399d6f08c69637adfea1e3634103", "10000000000000000000000000"], + ["0xb2fc53f237cf2d72a8b7a6589bb72b9711552c90", "10000000000000000000000000"], + ["0x04cc796ea4f9b9682c3f7a31c81d947530b72f70", "10000000000000000000000000"], + ["0xebd59c8a39726591982e8e2104ec3d04c9f72146", "10000000000000000000000000"], + ["0xc45317b15633bbc021af594890e21e630b85727e", "10000000000000000000000000"], + ["0xb41707d73b2056882f0ed732893202f018855cfe", "10000000000000000000000000"], + ["0x2e457454ea91f413b743ded4d1a19be20d74aa60", "10000000000000000000000000"], + ["0xbc8ec6306f447a9768da5f91ccf79a0cfe76f0bb", "10000000000000000000000000"], + ["0xde415a33e0e99414d6870f8cac6d134641c28582", "10000000000000000000000000"], + ["0x00e484da1156202e9dd341ad7ea9c908bb919e96", "10000000000000000000000000"], + ["0xb18bb39014a720b060a85390332453bc2ead0a1b", "10000000000000000000000000"], + ["0x7b96526a9b6b8a895dee2f805b053bc3c8c2499f", "10000000000000000000000000"], + ["0x0f4b0ae3b27f404d6aedc3dd08320179070a38fd", "10000000000000000000000000"], + ["0x59e62fee4888039c5edf467a7c210b5cc1d449da", "10000000000000000000000000"], + ["0x51a23f481037ca208086f42fe83d28b71c1ebc2c", "10000000000000000000000000"], + ["0x98d0e5a9063c05bc36a14c01f99f41b354d53bf3", "10000000000000000000000000"], + ["0xc106905443d60547546e9913055c297b7bb9c481", "10000000000000000000000000"], + ["0xe857c6a64db58da249231351382ef26b7f576557", "10000000000000000000000000"], + ["0x5efec2646eb5d768dfa12c9943ee2f1cc458913b", "10000000000000000000000000"], + ["0x1ae86593387e4fdd53b9ff960a684793cf515292", "10000000000000000000000000"], + ["0x18e0f8930d743d1f45904f420cf8a23f73e4f4b7", "10000000000000000000000000"], + ["0x9d64f2cd1e442b379ade1f8c2a6bd7db84681e85", "10000000000000000000000000"], + ["0x3238934316238ebbda1ffb229ec9a37bf66c5564", "10000000000000000000000000"], + ["0xb362074efb3f8f294162a9692c2d834b31833e23", "10000000000000000000000000"], + ["0x8193a6d86f1f93639a9aeef18a24d5f92fc10285", "10000000000000000000000000"], + ["0xa35010a4055e9dab4a7308d7f83307771d57fc7f", "10000000000000000000000000"], + ["0x8091587f4dd6019196e89fe82a5ee40400fa8bf9", "10000000000000000000000000"], + ["0x8bc0fc5b31fa30266a3dd81753be66ee4b62a7f9", "10000000000000000000000000"], + ["0xd1a122e10e270582844d3d9f1153835f8aae5054", "10000000000000000000000000"], + ["0x3930d9d8b77069ad62c4a1b5d943c1545f1e3a96", "10000000000000000000000000"], + ["0xde9a570afeca6f1fefc7edc7c41c8aebc5eb5b65", "10000000000000000000000000"], + ["0x6f1d13763c581dbef3842595a2aa5b7b9e7ae4ab", "10000000000000000000000000"], + ["0xe3f1ca0e4234d5c586379818e9c47acbe4ad6d73", "10000000000000000000000000"], + ["0x8bc85e6ce33a0fdac6b295c52a1c97cb1b122ea5", "10000000000000000000000000"], + ["0x26c5376bcb8452b81bebddbc275e2a313a54a9ad", "10000000000000000000000000"], + ["0x04b55fe6fda3fdc46e10e6d3ceac1f69b1b09274", "10000000000000000000000000"], + ["0xd9464b951523d6ff53cf9519983c250e7b4742e0", "10000000000000000000000000"], + ["0xf3057ebf7e6e86afa7868ec09afa611945ce6ae0", "10000000000000000000000000"], + ["0x4467141db06d5ea8fb2a7b718f7534298aaf0c21", "10000000000000000000000000"], + ["0x1f276d48171bc17e12ecbf076e8b5867aae8f98e", "10000000000000000000000000"], + ["0x51684f4ad0937a3b59b19a6284be73af032ec516", "10000000000000000000000000"], + ["0x41be02b00c813a1de79385a5dcb0df2f2b9147a5", "10000000000000000000000000"], + ["0x047979c54cb43566111aa9f6f1c560df9532cc34", "10000000000000000000000000"], + ["0xd574466cbf972bd07f99f57c885a86bde04a5c57", "10000000000000000000000000"], + ["0x2345201df04fd175113b95898e1b0ebc1a36e36f", "10000000000000000000000000"], + ["0xb2612f01a0837e08844eab677a6d9643201a4a0f", "10000000000000000000000000"], + ["0xd72eee7dd4fb7ec80cb60be9d6b7238288bd3ba5", "10000000000000000000000000"], + ["0x7c0eed74d4e818dddf82bbbc378cc3283502d87e", "10000000000000000000000000"], + ["0xbc963b5bc8842b9d2961f3187da4e9ff3583f483", "10000000000000000000000000"], + ["0xeef0d258918ade7cd0c3a089b8f2e08304043b7b", "10000000000000000000000000"], + ["0xd31b1b35ec8b89d648d4b1f7f96689a2d5b0d2fc", "10000000000000000000000000"], + ["0x5d620183d5def4b09f4397b8407a397466559d80", "10000000000000000000000000"], + ["0x5242afde24b8487c8b3523d258bbf6e334a7ba5c", "10000000000000000000000000"], + ["0x5f2922c51b7db86f680268bef147a7626e43f450", "10000000000000000000000000"], + ["0x12c88b88326874ab2e44051e14d1c9c2446947d6", "10000000000000000000000000"], + ["0x3d5f99c5d6c3b012f4731815118f897c14e4e07b", "10000000000000000000000000"], + ["0x2ce2c28fb6105f8d7b38263edc29ba101cb2f772", "10000000000000000000000000"], + ["0x35f382d9daa602a23ad988d5bf837b8e6a01d002", "10000000000000000000000000"], + ["0x20e0e86d92cc1a6ab6aa3c1b7b28760477a8d29b", "10000000000000000000000000"], + ["0x1a7138fc2992a04e8f13f5a9c0116787259c47ae", "10000000000000000000000000"], + ["0xdaae758a8a60e97f1ccb14ccaffe487acd31d0b9", "10000000000000000000000000"], + ["0xb965d68052b849b29fe25497c51659bf9678bc9b", "10000000000000000000000000"], + ["0x614572f25a619926d52b94af861608d9605119b9", "10000000000000000000000000"], + ["0x151b2b565011f7b93400990abe73429494c2f2c9", "10000000000000000000000000"], + ["0xf3c51aaa4fe7c62e762dfadf52499e62c5408010", "10000000000000000000000000"], + ["0x8fb2a5d8736776291388827e9787f221a1d3633a", "10000000000000000000000000"], + ["0x2f19b1cc0f6d291e5ae74e43fd3f6a5d1661f7d2", "10000000000000000000000000"], + ["0x4468b3584979063722a160257b31642c1e9d9a57", "10000000000000000000000000"], + ["0x5e3a2f3b7f30683ca294b7d1afe8936116228f40", "10000000000000000000000000"], + ["0x492059918a8d8c9435768b56ec848062e6a27bc9", "10000000000000000000000000"], + ["0x0df49e55fb107d036d3ece1da035cbaeeecc5dc4", "10000000000000000000000000"], + ["0x56b93a4717e47829520b5f0da10c5fee04b3ace2", "10000000000000000000000000"], + ["0x7d0d0e6c6b57a116429ab14d08303e8f71b452f4", "10000000000000000000000000"], + ["0x3e790ac4d142f867c2880e3c42304353192ff87e", "10000000000000000000000000"], + ["0x40ea5001129509c4cb3ac25c30e3d318bc7388fc", "10000000000000000000000000"], + ["0x634c90af94eea55a5eafcf7d81b3c415bf2b1d50", "10000000000000000000000000"], + ["0x802fb4d3059f69d9a59f6158ae6fde5896d23b2e", "10000000000000000000000000"], + ["0x41c98dbbfa1900e46e37a028d404124e03d60192", "10000000000000000000000000"], + ["0x6216f2b6eb479969013e3bed0b25cfd5dede29d4", "10000000000000000000000000"], + ["0xc9eca061745c057c047c083e2f309598b5412018", "10000000000000000000000000"], + ["0x1b8268398f42d775a5592312b54601031b0629d6", "10000000000000000000000000"], + ["0x1b4ef3e3ae9c60f8e8b0b6a080773d274126294c", "10000000000000000000000000"], + ["0x3cf807b5f994f2860f44860b2e3221847f4cffe2", "10000000000000000000000000"], + ["0x24668bf7cf97145a7046eca265cbe375c27e2e8e", "10000000000000000000000000"], + ["0xdb1e5883d636ecb81eb7dfb111e7ba5fc1f4f2f7", "10000000000000000000000000"], + ["0x53cbe65000bb66f5291a3b819817959e4ed702ce", "10000000000000000000000000"], + ["0xd4e1f6e0d6b121253bb08b3246d9458b13c5d92a", "10000000000000000000000000"], + ["0x2b404f693fab1a348cc202f2bf0d30b61ef845d0", "10000000000000000000000000"], + ["0xa4c7a84624feb966df8e8559e53f67c367498b45", "10000000000000000000000000"], + ["0x814be1893da48c6955ce5dd9edf0af847f6a0344", "10000000000000000000000000"], + ["0x6431616a013198a7015ee181ec5bd88db65f6e8f", "10000000000000000000000000"], + ["0x847eae52fe226fb5db6449c290493c91397184e2", "10000000000000000000000000"], + ["0xeace932fa48018c7cfc9bcc8e5399a77c4b73c7b", "10000000000000000000000000"], + ["0xfbc6f3db7fd32a2c67e68dd499b0358e42a91793", "10000000000000000000000000"], + ["0xe8676497f39e31ef373ca2af659c34aee93db732", "10000000000000000000000000"], + ["0xe54e33a39643d5ce792da297ff7ed612397820a9", "10000000000000000000000000"], + ["0x95f389b6a7ecf523f879459968594a738f8a7b99", "10000000000000000000000000"], + ["0x72fa5121368a922c9a259a601b4474eac12a8a10", "10000000000000000000000000"], + ["0x829bc14065efe75860aa947854ff0986063017b3", "10000000000000000000000000"], + ["0xca7600dd571d1380229918c50a9ccdc38829dd09", "10000000000000000000000000"], + ["0x8351b3bbefd26f05aa286380c57b27d722738110", "10000000000000000000000000"], + ["0xe26211851e76370091004bf543121e967a56a0e2", "10000000000000000000000000"], + ["0xd141be396359910cd3c760d35ae77643eb18c56d", "10000000000000000000000000"], + ["0x36079e5ebf26b77a5816bc8bc01024ba7e82fb50", "10000000000000000000000000"], + ["0x5df451ad02e8d91cb8b767d9082ee559b9a191b9", "10000000000000000000000000"], + ["0x00d9947f78df8abb265207538d496b25c89b5f72", "10000000000000000000000000"], + ["0x69c3541fd1eaa0da10cb8a40c5d45f2c9cb591f4", "10000000000000000000000000"], + ["0x40984ccaed62be93e9d773075defc0cebfc1474b", "10000000000000000000000000"], + ["0xf0b69f6f8ddd43ef0b35ab4070319d83a5528aca", "10000000000000000000000000"], + ["0xc0c08f6da70b0123aa07021461d2735e9987898b", "10000000000000000000000000"], + ["0xa96263a9aa77327536f029dff4d6b476f9c7df49", "10000000000000000000000000"], + ["0xdc53bf946cac35301ec39bf58e85da82f82944d2", "10000000000000000000000000"], + ["0x4e36d25114edb822900baf3bee7792bd70b92202", "10000000000000000000000000"], + ["0x7002c4c3a0c5dd007cd323ce1b43d128d04bd63e", "10000000000000000000000000"], + ["0x0bdb3e3479313e0a970fad4a12bf9175f2acf5eb", "10000000000000000000000000"], + ["0xc1663f28ce0aa93391a150743119a55d1ac1f470", "10000000000000000000000000"], + ["0x8cf0f4f9e131c0fd8996c723fd2920da7debf5b2", "10000000000000000000000000"], + ["0xb4dd128deabd371f2bb177f85ef7ba77d34a11d6", "10000000000000000000000000"], + ["0x789ef5f417efeb7ab14faa0a36eba98a5ee17273", "10000000000000000000000000"], + ["0x62f7c9e6cd838e5f48d4083f08b97d05b31418bb", "10000000000000000000000000"], + ["0xee4901320fccb9081a8814f888c926d83d306f1a", "10000000000000000000000000"], + ["0xaa6f31632b95a41acb3355caa7c9124806c4dbc5", "10000000000000000000000000"], + ["0x194f0fe6d4dfbf198868b1b507cd74122fbfebcc", "10000000000000000000000000"], + ["0xd82ced87a3fbc3d86793de2473d2dd19bec8c75b", "10000000000000000000000000"], + ["0x66f18019715410c94d8882cb57ed0f2ba432fb39", "10000000000000000000000000"], + ["0x05307009064d09ff1c2e7186fe6c19eb7e14c1a1", "10000000000000000000000000"], + ["0x8cc1547f2aebbbaa9466310355110427449a937f", "10000000000000000000000000"], + ["0x3c3fe2b5159fe58d83041472bdf6fe6a4ca1e3f7", "10000000000000000000000000"], + ["0xfd1192199e9084b39cfba0b5f41f7158505dfa10", "10000000000000000000000000"], + ["0x250a7b43dc0a2a0ef12245466095404ab09ff885", "10000000000000000000000000"], + ["0xa50e1f41b6ecf5ed5be029ddff62ea306d756291", "10000000000000000000000000"], + ["0x8092de26142e0287a2b6ee4e0c622f43b353e29f", "10000000000000000000000000"], + ["0xebc7e58735280478eadb480f7584c79ab955b094", "10000000000000000000000000"], + ["0x9dfb83c79e4b6f23ac5e2b9a6d084b0c7b8036e1", "10000000000000000000000000"], + ["0x388fa28e670f0dfd15833e3a1ab71a728acd1b50", "10000000000000000000000000"], + ["0x87195fef2b399b91d0e7ecc249bf857d69a8eb45", "10000000000000000000000000"], + ["0x6f15aa54a9370fb5a64291499b77650d5f3882fc", "10000000000000000000000000"], + ["0x3dc76149f2f0f68cecc124e32eae0b67221d6dbb", "10000000000000000000000000"], + ["0xcbf7d1c2012629e4689f6c2ca10c4e3a7ce1a75c", "10000000000000000000000000"], + ["0xa1a99f9fe000022ccd1d373ff83f5c254cc2fbf6", "10000000000000000000000000"], + ["0xa08c19ade8180c14d05efa461df4768d4281e3d6", "10000000000000000000000000"], + ["0x5a3b0da8f36ee9b5416413fef39a951d7d821345", "10000000000000000000000000"], + ["0xd20871ee995fca59a92c397a73a983d18c3566c2", "10000000000000000000000000"], + ["0x864ae3652e31d2b7991ee6d267c3b8b1f3bc2e76", "10000000000000000000000000"], + ["0x01b5f0a5df18abd3155d717217839a5aeee3f30b", "10000000000000000000000000"], + ["0xd5ba426d7d05a9da0cafb1b1b13f3e7d71621c23", "10000000000000000000000000"], + ["0xfc442a70f8f4e3d436f1cf8d666d29aa02c3594b", "10000000000000000000000000"], + ["0x4baf591f801e7dcc74c04de25c501d2afdb2f847", "10000000000000000000000000"], + ["0x57c9f224b2f0a2bc8007f17324088105d1dfbc01", "10000000000000000000000000"], + ["0xd1a59dccb20ee4750b4840eaaa2b8a3796581dcd", "10000000000000000000000000"], + ["0x3bff29408eac8569d0dc8c936e6b55f71a5f3397", "10000000000000000000000000"], + ["0x60f79525ed412211ff056bb8837fcff41db3785a", "10000000000000000000000000"], + ["0x49ef15fcb17a1d73abfeb1c847ad6348144367d5", "10000000000000000000000000"], + ["0x6e6d814ddb9ab9056bd58de9eea3621f01ee69fa", "10000000000000000000000000"], + ["0x49531aecfcd467f728bf951556bbe0299486840d", "10000000000000000000000000"], + ["0x2aa0136e55157cf1dcf8fb3b5d316e068638f9c8", "10000000000000000000000000"], + ["0x81adfa0309a1629f68db6a6cff37a1fe68ffdd2a", "10000000000000000000000000"], + ["0xfaca05f09ddba223f2d7596d563277219fcf8884", "10000000000000000000000000"], + ["0x56652031d1c38d176e627a12e40eaf0357d0f453", "10000000000000000000000000"], + ["0xb4b24de3ab5004a33909a4602d744967eca18d28", "10000000000000000000000000"], + ["0x30db929782c3d15d0424cfb1173a424f183278d1", "10000000000000000000000000"], + ["0x6a316f344bda31e6687173c97c839c7160dd2cd1", "10000000000000000000000000"], + ["0x95ae952b0fcbefd6c1013142420641d3c8143b3d", "10000000000000000000000000"], + ["0x787fa9a8c6cc1aa8f11197b703d39a17a2e4842b", "10000000000000000000000000"], + ["0xf25e635a9f35c97df49c52637eddcdca64259ef8", "10000000000000000000000000"], + ["0x7e3df6203b66cd77f724e3d52f7fc9597ebf5640", "10000000000000000000000000"], + ["0x74c8f1f3a5b9f684c393a30ecb7dbeacd00273ef", "10000000000000000000000000"], + ["0xd6e80ee9847a29ae1beb60abbbe1f659ed12ef96", "10000000000000000000000000"], + ["0x6e93a65f1688c69ea36c59579f0d25c9a1f010dc", "10000000000000000000000000"], + ["0xec992491159d31e3764f5e8be3fd3fdf6b805fd1", "10000000000000000000000000"], + ["0x40fd33f8006434f758ecddd42cf6feb0a8ca1d0f", "10000000000000000000000000"], + ["0xdf90663d8cdfbc463efa6c8ef85a05671c8b2e73", "10000000000000000000000000"], + ["0x3b687a0ae6a2f40aaea75428e26aeb89ba382c01", "10000000000000000000000000"], + ["0x914c4c2d50ebf786f16dcdafafe385b74a8d6f7b", "10000000000000000000000000"], + ["0x54b86d3f7bca92952b38cf1073407e302a12ec33", "10000000000000000000000000"], + ["0xcd6622b78b16ab217809f6089c410442a84869e6", "10000000000000000000000000"], + ["0x711a71e1873988f8da861e57b01a7838b8068b93", "10000000000000000000000000"], + ["0xed159585fc50f449b1b2b8bfcb6460b19b69d5fa", "10000000000000000000000000"], + ["0xc1cf75ddc9e07a2cef8b87b89e5170fd7351a602", "10000000000000000000000000"], + ["0xf5da0a103d57eaaad5c1bae57f128f3763a9f639", "10000000000000000000000000"], + ["0x111b46246ba9bf46ef15dca39ab7775897271951", "10000000000000000000000000"], + ["0xc0d3a8d939d8653f0fd8fe7a0646dd3884293466", "10000000000000000000000000"], + ["0x168881a4eea012a46eed7f3f2ab3fda2ff4bdd47", "10000000000000000000000000"], + ["0x1672f36ee969205ee8a41b1124e35d1252bfcbeb", "10000000000000000000000000"], + ["0x7fbedf9c6c6c63ea734286450060d9804b4df146", "10000000000000000000000000"], + ["0xb41e620f88c54d91d8945c91cc31bd467c012696", "10000000000000000000000000"], + ["0x8b379dcdd35a15d98dde096e294d2eb3f6cfe312", "10000000000000000000000000"], + ["0xe8489f4013f7136b78fb773562ba8418377869ac", "10000000000000000000000000"], + ["0x17ece12815f614ef56ab298f29a9758b36059862", "10000000000000000000000000"], + ["0x97963d547b010ee36faab9cb4c16305a9e0974a5", "10000000000000000000000000"], + ["0x2a0302b11111f0c4fa9b4e10f12486a2534370df", "10000000000000000000000000"], + ["0x2b0c5830da5312b5f35fa811f9852c0da21b93b3", "10000000000000000000000000"], + ["0xfd57270723f8849c751d456e0dfd39629a7b0455", "10000000000000000000000000"], + ["0x5a6e92e35e332ac4e51ddd0448588c16014f400e", "10000000000000000000000000"], + ["0x31124bb5d59369d2fcceedecda1340d5d065a7a3", "10000000000000000000000000"], + ["0x6c8f55a65aaf01eb78b348d6e683e77eff8f57f0", "10000000000000000000000000"], + ["0x02b32ea3ee66454839702babdacaf00bf5ca874c", "10000000000000000000000000"], + ["0x70cd3cff9bdfb4847214290652e586f0b3a2e673", "10000000000000000000000000"], + ["0xe47a14edd56510a77f8fc753cdf1353302d75211", "10000000000000000000000000"], + ["0xf1479af81176cead86a155940bb7c8d5366ed31d", "10000000000000000000000000"], + ["0xf011b0c84502cde1be42fd14532c7a0a5e734196", "10000000000000000000000000"], + ["0xe9e6867dbcbeebc874ea071dbae681040d2399c8", "10000000000000000000000000"], + ["0xc1ea53874efd8e6374931a83aeccdf66d24f70fc", "10000000000000000000000000"], + ["0x6ebf316c8040ffd01ac2ba6c22b2704019b8b2d3", "10000000000000000000000000"], + ["0x25779abc102dee9beee26c0de20e595ea790d44b", "10000000000000000000000000"], + ["0x98f12b729bbe6f82ffe5c0a3625ec8a5ceda5e4b", "10000000000000000000000000"], + ["0x1002f408759c0bee0d4deed7fbf1cc1071210f4d", "10000000000000000000000000"], + ["0x7dfd5fec79cc6877ae6a62f97f57980fc99dab3e", "10000000000000000000000000"], + ["0xbc5b6246fd1e1f50185df9ec8d14354ceb8f8917", "10000000000000000000000000"], + ["0x1b33838ecca98a302bb10d7de6eb8ea25120239b", "10000000000000000000000000"], + ["0x195428b57b2a210f3a7495c6cde7ee4177d66696", "10000000000000000000000000"], + ["0x71ec5abfc49075e158b0f85575d400d0f5d7d3be", "10000000000000000000000000"], + ["0x450fffcdcca801488ac805f2bbb30e0447aef746", "10000000000000000000000000"], + ["0xf9be5c224ccf6224b42ac431deb73bd697fb6499", "10000000000000000000000000"], + ["0x2cf48f3be45d1786e74b88b7d33b0f6418df9ee2", "10000000000000000000000000"], + ["0xf6c0dd57dd4db03cc898ad396bb7c8ceaf554d30", "10000000000000000000000000"], + ["0x69045868bfa5a07b112fc0b34b6fb0cd60cbc36e", "10000000000000000000000000"], + ["0x435ace6047e533da356bde40b5d20a3a542104b9", "10000000000000000000000000"], + ["0x83388b2b26c2e5c1a998da3a0203515441a4e60e", "10000000000000000000000000"], + ["0x2966e925cc8c2e0c4b39adbf22194265c0584858", "10000000000000000000000000"], + ["0x6f58c1472dbdaab0b305e7d0dc00c8505e29b029", "10000000000000000000000000"], + ["0xcc3ce701840f6d689ae93ba6f211a5e897691710", "10000000000000000000000000"], + ["0x407e5c8a607a5f3b7d3b4ffa1c51d965d9b13083", "10000000000000000000000000"], + ["0x323f3ad4dc84ed90315d155fe1977de93840a9a0", "10000000000000000000000000"], + ["0xa73e5baee3eda185b4f844c3615ec2c8efcc9241", "10000000000000000000000000"], + ["0xa6b59d4419bae35d09432f2e35176a576e02f8ee", "10000000000000000000000000"], + ["0xeffe60ec0bd219760eb40e8b810c54dd2eddc351", "10000000000000000000000000"], + ["0xb4ae4070a56624a7c99b438664853d0f454be116", "10000000000000000000000000"], + ["0xe5348acca3061a742af08be6b6d102879e06b8c9", "10000000000000000000000000"], + ["0x360676e09deb4daf9c159837d9bcb21f0f07227e", "10000000000000000000000000"], + ["0x2b8454f668669c9c888c8346416e10be86bb7620", "10000000000000000000000000"], + ["0x594ba954d7da509ace74ea9e185a7dfe81fa8f2a", "10000000000000000000000000"], + ["0x776b7ca762b1f3713853f03ea2bbbe0d644bf53f", "10000000000000000000000000"], + ["0x26ace2bf39ff787a9a5b4a773e81ed89a5174f99", "10000000000000000000000000"], + ["0xcc23eb4ce2f2ad4f5407da66295f39d450c5b2d4", "10000000000000000000000000"], + ["0x91d720f45c53d897d39d61d2f88c6f8d56ba6125", "10000000000000000000000000"], + ["0xe38fd1c83bb7883adc4b5b910c6f6e8311da3b6f", "10000000000000000000000000"], + ["0x5cfa454b330a9166b377aa51b8d030b3ea5910b7", "10000000000000000000000000"], + ["0x51aa5d0e7796f433234515321255bf15c8f25f07", "10000000000000000000000000"], + ["0x6507efbdd0e3edf1c671a3c54138020b96955607", "10000000000000000000000000"], + ["0xf29d3c5fd33f4769c92095c7801091688e2ccc37", "10000000000000000000000000"], + ["0x6ed6462f3e2821f9f89b02205c28dace7432f3a3", "10000000000000000000000000"], + ["0xfe217f95ac791ec38c4550971273ae26e56d9bd1", "10000000000000000000000000"], + ["0x8e044b15ea6bd5b4d6b1aa7196eec81bcb33dfd8", "10000000000000000000000000"], + ["0x94800c39f3a793c3a67f901b71e397d28d89b7a1", "10000000000000000000000000"], + ["0xfd7e62106cac2289eb8066caf2ca5dcc08f12eaf", "10000000000000000000000000"], + ["0xd52d09b041a9ed634053300e6484aff73290626f", "10000000000000000000000000"], +]; + +module.exports = whiteList; From 8998d6bd84894c96d2a09f583078fdbade099112 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Wed, 21 Jul 2021 17:33:24 +0800 Subject: [PATCH 202/254] Merge xDVD implementation. --- services/vaults/tvl/handler.js | 57 +++++++++++++++------------------- 1 file changed, 25 insertions(+), 32 deletions(-) diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index 7fc2140..6263dfc 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -86,25 +86,9 @@ const getTokenPrice = async (coingecko_token_id) => { } }; -const getxDVGPrice = async () => { - // xDVG price = DVG amount of xDVG SC * DVG price / xDVG amount - const contracts = - process.env.PRODUCTION != null && process.env.PRODUCTION != "" - ? mainContracts - : testContracts; - - const DVGcontract = await getContract(contracts.DVG); - const xDVGcontract = await getContract(contracts.vipDVG); - const amountDVG = await getBalance( - DVGcontract, - contracts.vipDVG.address - ); - const amountxDVG = await getTotalSupply(xDVGcontract); - const priceDVG = await getTokenPrice(contracts.DVG.tokenId); - - const pricexDVG = amountxDVG == 0 ? 1 : (amountDVG * priceDVG) / amountxDVG; - return pricexDVG; -}; +const getVipTokenPrice = async (vipTotalSupply, tokenBalOfVipToken, tokenPrice) => { + return (tokenBalOfVipToken * tokenPrice) / vipTotalSupply; +} /** * Get TVL of specified vault. @@ -152,19 +136,25 @@ const getTVL = async (vault) => { return tvl; }; -/** - * Get TVL of xDVG. - * TVL = totalSupply * xDVG Price - */ -const getTVLxDVG = async (vault) => { - const { tokenId } = vault; + +const getVipTokenTVL = async (vipTokenVault, tokenVault) => { + const { decimals } = vipTokenVault; + const { tokenId } = tokenVault; let tvl; - const contract = await getContract(vault); - const totalSupply = await getTotalSupply(contract); - const decimals = await getDecimals(contract); - const tokenPrice = await getxDVGPrice(tokenId); // Not implemented yet + + const vipTokenContract = await getTokenContract(vipTokenVault); + const tokenContract = await getTokenContract(tokenVault); + + const vipTotalSupply = await getTotalSupply(vipTokenContract); + const tokenBalOfVipToken = await getBalance(tokenContract, vipTokenContract._address); + + const tokenPrice = (tokenId === "daoventures") + ? await getTokenPrice(tokenId) + : 0.225 ; + + const vipTokenPrice = await getVipTokenPrice(vipTotalSupply, tokenBalOfVipToken, tokenPrice); + tvl = (vipTotalSupply / 10 ** decimals) * vipTokenPrice; - tvl = (totalSupply / 10 ** decimals) * tokenPrice; return tvl; }; @@ -188,10 +178,13 @@ const getAllTVL = async () => { } try { - let _vault = vaults.vipDVG; - let tvl = await getTVLxDVG(_vault); + let tvl = await getVipTokenTVL(vaults.vipDVG, vaults.DVG); tvls.push(tvl); await saveTVL("xDVG", tvl); + + const vipDVDTVL = await getVipTokenTVL(vaults.vipDVD, vaults.DVD); + tvls.push(vipDVDTVL); + await saveTVL("xDVD", vipDVDTVL); } catch (err) { console.error(err); } From bd731a11c1bfdb3e994c38b798c81bffd45d4072 Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Mon, 26 Jul 2021 17:21:00 +0800 Subject: [PATCH 203/254] Remove daoSTO --- jobs/task.js | 1 + services/vaults/performance/handler.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/jobs/task.js b/jobs/task.js index 6baaabb..fa83fdd 100644 --- a/jobs/task.js +++ b/jobs/task.js @@ -133,6 +133,7 @@ const saveVipApr = async () => { /** Store DAOVIP APR */ const savePerformance = async () => { + console.log("[savePerformance]", new Date().getTime()); await performanceSave.savePerformance(); cron.schedule( "0 0 * * *", diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js index aebf03a..e56dcaf 100644 --- a/services/vaults/performance/handler.js +++ b/services/vaults/performance/handler.js @@ -41,7 +41,8 @@ if (process.env.PRODUCTION != "") { } // const ETF_STRATEGIES = ["daoCDV", "daoSTO", "daoELO"]; -const ETF_STRATEGIES = ["daoCDV", "daoSTO"]; +// const ETF_STRATEGIES = ["daoCDV", "daoSTO"]; +const ETF_STRATEGIES = ["daoCDV"]; const aggregatorV3InterfaceABI = require("./AggregatorABI.json"); From c245a4d79cd3263f2622e458d5a89f33cb52330d Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Tue, 27 Jul 2021 12:16:10 +0800 Subject: [PATCH 204/254] Merged for matic network --- config/serverless/domain.js | 4 ++-- scripts/initial.js | 1 + services/vaults/apy/save/polygon-vault.js | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config/serverless/domain.js b/config/serverless/domain.js index d35cdb8..fba6670 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -398,9 +398,9 @@ const mainContracts = { network: constant.ETHEREUM, }, daoMPT: { - address: '', // Update to mainnet + address: '0x7e515e00e2d605d763ffe25fd7b1e00f8fd97a16', abi: abi.moneyPrinterVaultContract, - strategyAddress: '', // Update to mainnet + strategyAddress: '0x111de482a01eb87875d18f8c1131fca709b6a646', strategyABI: abi.moneyPrinterStrategyContract, contractType: 'moneyPrinter', tokenId: ["tether", "usd-coin", "dai"], diff --git a/scripts/initial.js b/scripts/initial.js index 8a17b56..ba8a451 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -10,6 +10,7 @@ db.vault_categories.insertMany([ { name: 'expert', contract_address: '0x8fe826cc1225b03aa06477ad5af745aed5fe7066', symbol: 'daoCDV', }, { name: 'degen', contract_address: '0x2d9a136cf87d599628bcbdfb6c4fe75acd2a0aa8', symbol: 'daoELO', }, { name: 'advance', contract_address: '0x742a85daf742ca0213b06fdae449434e0448691e', symbol: 'daoSTO', }, + { name: 'advance', contract_address: '0x7e515e00e2d605d763ffe25fd7b1e00f8fd97a16', symbol: 'daoMPT', }, // TODO: add in mainnet contract addresss // { name: 'basic', contract_address: '', symbol: 'hfUSDT'}, // { name: 'basic', contract_address: '', symbol: 'hfUSDC'}, diff --git a/services/vaults/apy/save/polygon-vault.js b/services/vaults/apy/save/polygon-vault.js index 5b91fd9..c72e5c0 100644 --- a/services/vaults/apy/save/polygon-vault.js +++ b/services/vaults/apy/save/polygon-vault.js @@ -37,9 +37,9 @@ const mainVaults = [ description: "DAO Vault Money Printer for 3 stablecoins", vaultSymbol: "daoMPT", erc20address: "0xbd21a10f619be90d6066c941b04e340841f1f989", - vaultContractAddress: "", // TODO: Mainnet Address + vaultContractAddress: "0x7e515e00e2d605d763ffe25fd7b1e00f8fd97a16", vaultContractABI: abi.moneyPrinterVaultContract, - strategyContractAddress: "", // TODO: Mainnet Address + strategyContractAddress: "0x111de482a01eb87875d18f8c1131fca709b6a646", strategyABI: abi.moneyPrinterStrategyContract, balance: 0, vaultBalance: 0, From 11d0bf8e8e7dddf84bb7d1751e6deb3d47779670 Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Tue, 27 Jul 2021 12:42:23 +0800 Subject: [PATCH 205/254] Fix inception APY issue --- services/vaults/performance/handler.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js index e56dcaf..948bf94 100644 --- a/services/vaults/performance/handler.js +++ b/services/vaults/performance/handler.js @@ -15,7 +15,7 @@ const { const CoinGecko = require("coingecko-api"); const CoinGeckoClient = new CoinGecko(); -const url = process.env.ARCHIVENODE_ENDPOINT; +let url = process.env.ARCHIVENODE_ENDPOINT; // Using ethers.js const provider = new ethers.providers.JsonRpcProvider(url); @@ -344,6 +344,7 @@ module.exports.pnlHandle = async (req, res) => { let collection = ""; let result; let pnl; + let lastDataIndex; switch (req.params.farmer) { case historicalDb.daoCDVFarmer: @@ -377,6 +378,12 @@ module.exports.pnlHandle = async (req, res) => { if (startTime == -1) { result = await historicalDb.findAll(collection); + lastDataIndex = result.length - 1; + + return res.status(200).json({ + message: `Performance Data for ${req.params.farmer}`, + body: result[lastDataIndex]["lp_performance"], + }); } else { result = await historicalDb.findPerformanceWithTimePeriods( collection, @@ -386,13 +393,13 @@ module.exports.pnlHandle = async (req, res) => { if (result) { const basePrice = result[0]["lp_token_price_usd"]; - const lastDataIndex = result.length - 1; + lastDataIndex = result.length - 1; pnl = calculatePerformance( basePrice, result[lastDataIndex]["lp_token_price_usd"] ); console.log("🚀 | module.exports.pnlHandle= | pnl", pnl); - res.status(200).json({ + return res.status(200).json({ message: `Performance Data for ${req.params.farmer}`, body: pnl, }); From 05638696c04690ac93c55faf3339e9a928d86348 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Tue, 27 Jul 2021 13:01:18 +0800 Subject: [PATCH 206/254] updated --- services/vaults/apy/save/polygon-vault.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/vaults/apy/save/polygon-vault.js b/services/vaults/apy/save/polygon-vault.js index c72e5c0..0642fac 100644 --- a/services/vaults/apy/save/polygon-vault.js +++ b/services/vaults/apy/save/polygon-vault.js @@ -36,7 +36,7 @@ const mainVaults = [ symbol: ["USDT","USDC","DAI"], description: "DAO Vault Money Printer for 3 stablecoins", vaultSymbol: "daoMPT", - erc20address: "0xbd21a10f619be90d6066c941b04e340841f1f989", + erc20address: "0xc2132d05d31c914a87c6611c10748aeb04b58e8f", vaultContractAddress: "0x7e515e00e2d605d763ffe25fd7b1e00f8fd97a16", vaultContractABI: abi.moneyPrinterVaultContract, strategyContractAddress: "0x111de482a01eb87875d18f8c1131fca709b6a646", @@ -48,7 +48,7 @@ const mainVaults = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 15970970, + lastMeasurement: 17293764, measurement: 1e18, price_id: ["tether", "usd-coin", "dai"], isMoneyPrinter: true, From 65e9c1c74115967b9b3e83e4bce4666c6a4510c8 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Tue, 27 Jul 2021 16:07:40 +0800 Subject: [PATCH 207/254] fixeddd --- config/serverless/domain.js | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/config/serverless/domain.js b/config/serverless/domain.js index bbe280a..5ab0a0a 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -442,33 +442,6 @@ const mainContracts = { tokenId: ["tether", "usd-coin", "dai"], network: constant.POLYGON }, - hfDAI: { - address: '', // TODO: Update that this to mainnet address - abi: abi.hfVaultContract, - strategyAddress: '', - strategyABI: abi.hfStrategyContract, - contractType: 'harvest', - tokenId: "dai", - network: constant.ETHEREUM - }, - hfUSDC: { - address: '', // TODO: Update that this to mainnet address - abi: abi.hfVaultContract, - strategyAddress: '', - strategyABI: abi.hfStrategyContract, - contractType: 'harvest', - tokenId: "usd-coin", - network: constant.ETHEREUM - }, - hfUSDT: { - address: '', // TODO: Update that this to mainnet address - abi: abi.hfVaultContract, - strategyAddress: '', - strategyABI: abi.hfStrategyContract, - contractType: 'harvest', - tokenId: "tether", - network: constant.ETHEREUM - }, hfDAI: { address: '0x2cc1507e6e3c844eeb77db90d193489f1ddfb299', abi: abi.hfVaultContract, From 8ba846a3d17250cc652c013a0912539767d18468 Mon Sep 17 00:00:00 2001 From: Soon Lai <43904148+soonlai814@users.noreply.github.com> Date: Tue, 27 Jul 2021 20:22:21 +0800 Subject: [PATCH 208/254] Update whitelist.js --- services/reimbursement/whitelist.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/services/reimbursement/whitelist.js b/services/reimbursement/whitelist.js index 2d60caa..975bd39 100644 --- a/services/reimbursement/whitelist.js +++ b/services/reimbursement/whitelist.js @@ -2722,6 +2722,22 @@ const whiteList = [ ["0x94800c39f3a793c3a67f901b71e397d28d89b7a1", "10000000000000000000000000"], ["0xfd7e62106cac2289eb8066caf2ca5dcc08f12eaf", "10000000000000000000000000"], ["0xd52d09b041a9ed634053300e6484aff73290626f", "10000000000000000000000000"], + ['0x35b5676573c398fCf59A90BC2fF817B27Ad14E97','10000000000000000000000000'], + ['0xa626B92Ac70634c5CF16942c5423ba626c9370c9','10000000000000000000000000'], + ['0x42959b3392c528bd2a54e06e4fb185a6e1376610','10000000000000000000000000'], + ['0xcA7B7554cbb2c611844a8B552628276496De5A98','10000000000000000000000000'], + ['0xb12ebdb490249abd58e2ff15acfaab4431093cb9','10000000000000000000000000'], + ['0x55f69d209705AA8d5A518561a2DC9664eE98E68B','10000000000000000000000000'], + ['0x649Ec2D17F9370695Eca94c418f4eFdAeD114520','10000000000000000000000000'], + ['0x77e75656E262534B7C6EA6236ae97F2f60Fd8d9f','10000000000000000000000000'], + ['0x2Ec8C099CE47358695097d8ae9bD8554619d4D6f','10000000000000000000000000'], + ['0x926bc0070fa0F010dC7c63BF3d30131bFa009307','10000000000000000000000000'], + ['0x4C3a823f33114eA6D021353d1eD1e19bc73eD611','10000000000000000000000000'], + ['0x7BF6830aE2Dd299316294e824Ef98Aa2732dC411','10000000000000000000000000'], + ['0xD0f6Cb50266F433Db5E5B1f079C804011185b4d3','10000000000000000000000000'], + ['0x74ec4d3f2a39A2f39337D36c70512C852FBD402B','10000000000000000000000000'], + ['0x411D5a0D80C79F041195d08241687E500fC0e52C','10000000000000000000000000'], + ['0xa022b5dCBC0d5f416a75949Eb77c991bcDe99464','10000000000000000000000000'], ]; module.exports = whiteList; From 1942b7ebd72b6fdf6e021123f84102307accbdc9 Mon Sep 17 00:00:00 2001 From: Soon Lai <43904148+soonlai814@users.noreply.github.com> Date: Wed, 28 Jul 2021 20:22:02 +0800 Subject: [PATCH 209/254] Update whitelist.js --- services/reimbursement/whitelist.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/reimbursement/whitelist.js b/services/reimbursement/whitelist.js index 975bd39..a36905f 100644 --- a/services/reimbursement/whitelist.js +++ b/services/reimbursement/whitelist.js @@ -2738,6 +2738,11 @@ const whiteList = [ ['0x74ec4d3f2a39A2f39337D36c70512C852FBD402B','10000000000000000000000000'], ['0x411D5a0D80C79F041195d08241687E500fC0e52C','10000000000000000000000000'], ['0xa022b5dCBC0d5f416a75949Eb77c991bcDe99464','10000000000000000000000000'], + ['0x42c74262E7a97b85e9ADEB50027d18CDa41Be9df','10000000000000000000000000'], + ['0x1d308E78F558e78271Ac88Dd3D5c7ed9F76f40aE','10000000000000000000000000'], + ['0x3B8b4cB8D4ff25537D4A4869a3CA56F1A076A2f4','10000000000000000000000000'], + ['0x76E7E7E60C6288479B4ECd6563e54cBEB502e547','10000000000000000000000000'], + ['0x73088662aE671E419375CE82788b0E5A6f55e3E6','10000000000000000000000000'], ]; module.exports = whiteList; From 4d76b34463e8dd2b7872081e20191d6731ea079c Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Fri, 30 Jul 2021 18:34:25 +0800 Subject: [PATCH 210/254] Fix inception price fr BTC and ETH --- services/vaults/performance/handler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js index 948bf94..4325c28 100644 --- a/services/vaults/performance/handler.js +++ b/services/vaults/performance/handler.js @@ -262,11 +262,11 @@ async function syncHistoricalPerformance() { basePrice = lpTokenPriceUSD; lpPriceInception = basePrice; } - if (btcPrice > 0 && btcBasePrice == 0) { + if (lpTokenPriceUSD > 0 && btcPrice > 0 && btcBasePrice == 0) { btcBasePrice = btcPrice; btcPriceInception = btcBasePrice; } - if (ethPrice > 0 && ethBasePrice == 0) { + if (lpTokenPriceUSD > 0 && ethPrice > 0 && ethBasePrice == 0) { ethBasePrice = ethPrice; ethPriceInception = ethBasePrice; } From b953c7f44e8bc50cee3cb32012d9c8a2dcd00398 Mon Sep 17 00:00:00 2001 From: Soon Lai <43904148+soonlai814@users.noreply.github.com> Date: Fri, 30 Jul 2021 19:40:27 +0800 Subject: [PATCH 211/254] Update whitelist.js --- services/reimbursement/whitelist.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/reimbursement/whitelist.js b/services/reimbursement/whitelist.js index a36905f..ae114ec 100644 --- a/services/reimbursement/whitelist.js +++ b/services/reimbursement/whitelist.js @@ -2743,6 +2743,8 @@ const whiteList = [ ['0x3B8b4cB8D4ff25537D4A4869a3CA56F1A076A2f4','10000000000000000000000000'], ['0x76E7E7E60C6288479B4ECd6563e54cBEB502e547','10000000000000000000000000'], ['0x73088662aE671E419375CE82788b0E5A6f55e3E6','10000000000000000000000000'], + ['0xE5b6D2Bf24Afa66add82ab0d5cc729Ea48358644','10000000000000000000000000'], + ['0x8bA6Fb982CB4B6a240065376b944100bCE31b9D6','10000000000000000000000000'], ]; module.exports = whiteList; From 678575537d92358f1badce83b87d09da91201841 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Fri, 30 Jul 2021 20:06:28 +0800 Subject: [PATCH 212/254] Hide unncessary stuff --- app.js | 4 +- config/serverless/domain.js | 117 ++++++++----------- services/vaults/apy/save/vaults.js | 180 ++++++++++++++--------------- 3 files changed, 137 insertions(+), 164 deletions(-) diff --git a/app.js b/app.js index 290629e..8c039bc 100644 --- a/app.js +++ b/app.js @@ -35,10 +35,10 @@ async function init() { jobs.saveVault(); jobs.saveVaultAPY(); - jobs.savePolygonVaultAPY(); + // jobs.savePolygonVaultAPY(); jobs.savePricePerFullShare(); jobs.saveHistoricalAPY(); - jobs.savePolygonHistoricalAPY(); + // jobs.savePolygonHistoricalAPY(); jobs.saveHistoricalTVL(); jobs.saveHistoricalPools(); jobs.saveABIPools(); diff --git a/config/serverless/domain.js b/config/serverless/domain.js index e7c8adf..a82a075 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -424,78 +424,51 @@ const mainContracts = { tokenId: ["tether", "usd-coin", "dai"], network: constant.ETHEREUM, }, - daoSTO: { - address: "0x742a85daf742ca0213b06fdae449434e0448691e", - abi: abi.daoFaangStonkVaultContract, - strategyAddress: "0x7f1cffb0e0a7351a72ef53cb51796221e2bac3a5", - strategyABI: abi.daoFaangStonkStrategyContract, - contractType: "daoFaang", - tokenId: ["tether", "usd-coin", "dai"], - network: constant.ETHEREUM, - }, - daoMPT: { - address: '', // Update to mainnet - abi: abi.moneyPrinterVaultContract, - strategyAddress: '', // Update to mainnet - strategyABI: abi.moneyPrinterStrategyContract, - contractType: 'moneyPrinter', - tokenId: ["tether", "usd-coin", "dai"], - network: constant.POLYGON - }, - hfDAI: { - address: '', // TODO: Update that this to mainnet address - abi: abi.hfVaultContract, - strategyAddress: '', - strategyABI: abi.hfStrategyContract, - contractType: 'harvest', - tokenId: "dai", - network: constant.ETHEREUM - }, - hfUSDC: { - address: '', // TODO: Update that this to mainnet address - abi: abi.hfVaultContract, - strategyAddress: '', - strategyABI: abi.hfStrategyContract, - contractType: 'harvest', - tokenId: "usd-coin", - network: constant.ETHEREUM - }, - hfUSDT: { - address: '', // TODO: Update that this to mainnet address - abi: abi.hfVaultContract, - strategyAddress: '', - strategyABI: abi.hfStrategyContract, - contractType: 'harvest', - tokenId: "tether", - network: constant.ETHEREUM - }, - hfDAI: { - address: '0x2cc1507e6e3c844eeb77db90d193489f1ddfb299', - abi: abi.hfVaultContract, - strategyAddress: '0x89541e3b8e8b73c108744909ea11d506b4a8e6c7', - strategyABI: abi.hfStrategyContract, - contractType: 'harvest', - tokenId: "dai", - network: constant.ETHEREUM - }, - hfUSDC: { - address: '0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc', - abi: abi.hfVaultContract, - strategyAddress: '0x0af9547974e056fca221f679dbbb7f8651407d7f', - strategyABI: abi.hfStrategyContract, - contractType: 'harvest', - tokenId: "usd-coin", - network: constant.ETHEREUM - }, - hfUSDT: { - address: '0xe4e6ce7c1d9ff44db27f622accbb0753c2f48955', - abi: abi.hfVaultContract, - strategyAddress: '0xef9a15025c2ed048a67c5c8019a1101172eeb51c', - strategyABI: abi.hfStrategyContract, - contractType: 'harvest', - tokenId: "tether", - network: constant.ETHEREUM - }, + // daoSTO: { + // address: "0x742a85daf742ca0213b06fdae449434e0448691e", + // abi: abi.daoFaangStonkVaultContract, + // strategyAddress: "0x7f1cffb0e0a7351a72ef53cb51796221e2bac3a5", + // strategyABI: abi.daoFaangStonkStrategyContract, + // contractType: "daoFaang", + // tokenId: ["tether", "usd-coin", "dai"], + // network: constant.ETHEREUM, + // }, + // daoMPT: { + // address: '', // Update to mainnet + // abi: abi.moneyPrinterVaultContract, + // strategyAddress: '', // Update to mainnet + // strategyABI: abi.moneyPrinterStrategyContract, + // contractType: 'moneyPrinter', + // tokenId: ["tether", "usd-coin", "dai"], + // network: constant.POLYGON + // }, + // hfDAI: { + // address: '0x2cc1507e6e3c844eeb77db90d193489f1ddfb299', + // abi: abi.hfVaultContract, + // strategyAddress: '0x89541e3b8e8b73c108744909ea11d506b4a8e6c7', + // strategyABI: abi.hfStrategyContract, + // contractType: 'harvest', + // tokenId: "dai", + // network: constant.ETHEREUM + // }, + // hfUSDC: { + // address: '0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc', + // abi: abi.hfVaultContract, + // strategyAddress: '0x0af9547974e056fca221f679dbbb7f8651407d7f', + // strategyABI: abi.hfStrategyContract, + // contractType: 'harvest', + // tokenId: "usd-coin", + // network: constant.ETHEREUM + // }, + // hfUSDT: { + // address: '0xe4e6ce7c1d9ff44db27f622accbb0753c2f48955', + // abi: abi.hfVaultContract, + // strategyAddress: '0xef9a15025c2ed048a67c5c8019a1101172eeb51c', + // strategyABI: abi.hfStrategyContract, + // contractType: 'harvest', + // tokenId: "tether", + // network: constant.ETHEREUM + // }, }, compund: { cUSDT: { diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 9c4d734..a957386 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -515,96 +515,96 @@ const mainVaults = [ price_id: ["tether", "usd-coin", "dai"], isCuban: true, }, - { - id: "daoSTO", - name: "DAO Vault Stonks", - symbol: ["USDT","USDC","DAI"], - description: "DAO Vault Stonks for 3 stablecoins", - vaultSymbol: "daoSTO", - erc20address: ["0xdAC17F958D2ee523a2206206994597C13D831ec7", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0x6b175474e89094c44da98b954eedeac495271d0f"], - vaultContractAddress: "0x742a85daf742ca0213b06fdae449434e0448691e", - vaultContractABI: abi.daoFaangStonkVaultContract, - balance: 0, - vaultBalance: 0, - decimals: 18, - deposit: true, - depositAll: true, - withdraw: true, - withdrawAll: true, - lastMeasurement: 12766399, - measurement: 1e18, - price_id: ["tether", "usd-coin", "dai"], - isFaang: true, - }, - { - id: "hfDAI", - name: "DAI", - symbol: "DAI", - description: "DAI Stablecoin", - vaultSymbol: "hfDAI", - erc20address: "0x6b175474e89094c44da98b954eedeac495271d0f", - vaultContractAddress: "0xe4e6ce7c1d9ff44db27f622accbb0753c2f48955", - vaultContractABI: abi.hfVaultContract, - strategyContractAddress: "0xef9a15025c2ed048a67c5c8019a1101172eeb51c", - strategyABI: abi.hfStrategyContract, - balance: 0, - vaultBalance: 0, - decimals: 18, - deposit: true, - depositAll: true, - withdraw: true, - withdrawAll: true, - lastMeasurement: 12593517, - measurement: 1e18, - price_id: "dai", - isHarvest: true - }, - { - id: "hfUSDC", - name: "USD Coin", - symbol: "USDC", - description: "USD//C", - vaultSymbol: "hfUSDC", - erc20address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - vaultContractAddress: "0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc", - vaultContractABI: abi.hfVaultContract, - strategyContractAddress: "0x0af9547974e056fca221f679dbbb7f8651407d7f", - strategyABI: abi.hfStrategyContract, - balance: 0, - vaultBalance: 0, - decimals: 18, - deposit: true, - depositAll: false, - withdraw: true, - withdrawAll: false, - lastMeasurement: 12593522, - measurement: 1e18, - price_id: "usd-coin", - isHarvest: true - }, - { - id: "hfUSDT", - name: "USDT", - symbol: "USDT", - description: "Tether USD", - vaultSymbol: "hfUSDT", - erc20address: "0xdac17f958d2ee523a2206206994597c13d831ec7", - vaultContractAddress: "0x2cc1507e6e3c844eeb77db90d193489f1ddfb299", - vaultContractABI: abi.hfVaultContract, - strategyContractAddress: "0x89541e3b8e8b73c108744909ea11d506b4a8e6c7", - strategyABI: abi.hfStrategyContract, - balance: 0, - vaultBalance: 0, - decimals: 18, - deposit: true, - depositAll: true, - withdraw: true, - withdrawAll: true, - lastMeasurement: 12593527, - measurement: 1e18, - price_id: "tether", - isHarvest: true - }, + // { + // id: "daoSTO", + // name: "DAO Vault Stonks", + // symbol: ["USDT","USDC","DAI"], + // description: "DAO Vault Stonks for 3 stablecoins", + // vaultSymbol: "daoSTO", + // erc20address: ["0xdAC17F958D2ee523a2206206994597C13D831ec7", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0x6b175474e89094c44da98b954eedeac495271d0f"], + // vaultContractAddress: "0x742a85daf742ca0213b06fdae449434e0448691e", + // vaultContractABI: abi.daoFaangStonkVaultContract, + // balance: 0, + // vaultBalance: 0, + // decimals: 18, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // lastMeasurement: 12766399, + // measurement: 1e18, + // price_id: ["tether", "usd-coin", "dai"], + // isFaang: true, + // }, + // { + // id: "hfDAI", + // name: "DAI", + // symbol: "DAI", + // description: "DAI Stablecoin", + // vaultSymbol: "hfDAI", + // erc20address: "0x6b175474e89094c44da98b954eedeac495271d0f", + // vaultContractAddress: "0xe4e6ce7c1d9ff44db27f622accbb0753c2f48955", + // vaultContractABI: abi.hfVaultContract, + // strategyContractAddress: "0xef9a15025c2ed048a67c5c8019a1101172eeb51c", + // strategyABI: abi.hfStrategyContract, + // balance: 0, + // vaultBalance: 0, + // decimals: 18, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // lastMeasurement: 12593517, + // measurement: 1e18, + // price_id: "dai", + // isHarvest: true + // }, + // { + // id: "hfUSDC", + // name: "USD Coin", + // symbol: "USDC", + // description: "USD//C", + // vaultSymbol: "hfUSDC", + // erc20address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + // vaultContractAddress: "0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc", + // vaultContractABI: abi.hfVaultContract, + // strategyContractAddress: "0x0af9547974e056fca221f679dbbb7f8651407d7f", + // strategyABI: abi.hfStrategyContract, + // balance: 0, + // vaultBalance: 0, + // decimals: 18, + // deposit: true, + // depositAll: false, + // withdraw: true, + // withdrawAll: false, + // lastMeasurement: 12593522, + // measurement: 1e18, + // price_id: "usd-coin", + // isHarvest: true + // }, + // { + // id: "hfUSDT", + // name: "USDT", + // symbol: "USDT", + // description: "Tether USD", + // vaultSymbol: "hfUSDT", + // erc20address: "0xdac17f958d2ee523a2206206994597c13d831ec7", + // vaultContractAddress: "0x2cc1507e6e3c844eeb77db90d193489f1ddfb299", + // vaultContractABI: abi.hfVaultContract, + // strategyContractAddress: "0x89541e3b8e8b73c108744909ea11d506b4a8e6c7", + // strategyABI: abi.hfStrategyContract, + // balance: 0, + // vaultBalance: 0, + // decimals: 18, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // lastMeasurement: 12593527, + // measurement: 1e18, + // price_id: "tether", + // isHarvest: true + // }, ]; module.exports = (process.env.PRODUCTION != '') ? mainVaults : testVaults; \ No newline at end of file From 2937ba99b5ec33900ada9d87cae2febe7fa96a0a Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Fri, 30 Jul 2021 20:28:22 +0800 Subject: [PATCH 213/254] bug fixes --- services/vaults/tvl/handler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index 6263dfc..3191ac2 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -142,8 +142,8 @@ const getVipTokenTVL = async (vipTokenVault, tokenVault) => { const { tokenId } = tokenVault; let tvl; - const vipTokenContract = await getTokenContract(vipTokenVault); - const tokenContract = await getTokenContract(tokenVault); + const vipTokenContract = await getContract(vipTokenVault); + const tokenContract = await getContract(tokenVault); const vipTotalSupply = await getTotalSupply(vipTokenContract); const tokenBalOfVipToken = await getBalance(tokenContract, vipTokenContract._address); From 93c2321c504638287cad2de8871fa4503b0fce21 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Sat, 31 Jul 2021 19:57:48 +0800 Subject: [PATCH 214/254] commit new faang stonk --- config/abi.js | 8743 ++++++++++++++++++++-------- config/serverless/domain.js | 4 +- services/vaults/apy/save/vaults.js | 4 +- 3 files changed, 6268 insertions(+), 2483 deletions(-) diff --git a/config/abi.js b/config/abi.js index ae323a7..fb8dd4c 100644 --- a/config/abi.js +++ b/config/abi.js @@ -14826,579 +14826,4090 @@ const cUSDCContract = [ const xDVGABIContract = [ { - inputs: [ - { internalType: "contract IERC20", name: "_dvg", type: "address" }, + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_dvg", + "type": "address" + } ], - stateMutability: "nonpayable", - type: "constructor", + "stateMutability": "nonpayable", + "type": "constructor" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "owner", - type: "address", + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "spender", - type: "address", + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" }, { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } ], - name: "Approval", - type: "event", + "name": "Approval", + "type": "event" }, { - anonymous: false, - inputs: [ - { indexed: true, internalType: "address", name: "user", type: "address" }, + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "uint256", - name: "dvgAmount", - type: "uint256", + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" }, { - indexed: false, - internalType: "uint256", - name: "xDVGAmount", - type: "uint256", + "indexed": false, + "internalType": "uint256", + "name": "dvgAmount", + "type": "uint256" }, + { + "indexed": false, + "internalType": "uint256", + "name": "xDVGAmount", + "type": "uint256" + } ], - name: "Deposit", - type: "event", + "name": "Deposit", + "type": "event" }, { - anonymous: false, - inputs: [ - { indexed: true, internalType: "address", name: "from", type: "address" }, - { indexed: true, internalType: "address", name: "to", type: "address" }, + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } ], - name: "Transfer", - type: "event", + "name": "Transfer", + "type": "event" }, { - anonymous: false, - inputs: [ - { indexed: true, internalType: "address", name: "user", type: "address" }, + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "uint256", - name: "dvgAmount", - type: "uint256", + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" }, { - indexed: false, - internalType: "uint256", - name: "xDVGAmount", - type: "uint256", + "indexed": false, + "internalType": "uint256", + "name": "dvgAmount", + "type": "uint256" }, + { + "indexed": false, + "internalType": "uint256", + "name": "xDVGAmount", + "type": "uint256" + } ], - name: "Withdraw", - type: "event", + "name": "Withdraw", + "type": "event" }, { - inputs: [ - { internalType: "address", name: "owner", type: "address" }, - { internalType: "address", name: "spender", type: "address" }, + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } ], - name: "allowance", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "spender", type: "address" }, - { internalType: "uint256", name: "amount", type: "uint256" }, + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } ], - name: "approve", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [{ internalType: "address", name: "account", type: "address" }], - name: "balanceOf", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: "decimals", - outputs: [{ internalType: "uint8", name: "", type: "uint8" }], - stateMutability: "view", - type: "function", + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { internalType: "address", name: "spender", type: "address" }, - { internalType: "uint256", name: "subtractedValue", type: "uint256" }, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } ], - name: "decreaseAllowance", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [{ internalType: "uint256", name: "_amount", type: "uint256" }], - name: "deposit", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: "dvg", - outputs: [{ internalType: "contract IERC20", name: "", type: "address" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "spender", type: "address" }, - { internalType: "uint256", name: "addedValue", type: "uint256" }, + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } ], - name: "increaseAllowance", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [{ internalType: "string", name: "", type: "string" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [{ internalType: "string", name: "", type: "string" }], - stateMutability: "view", - type: "function", + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: "totalSupply", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", + "inputs": [], + "name": "dvg", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { internalType: "address", name: "recipient", type: "address" }, - { internalType: "uint256", name: "amount", type: "uint256" }, + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } ], - name: "transfer", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "nonpayable", - type: "function", + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ - { internalType: "address", name: "sender", type: "address" }, - { internalType: "address", name: "recipient", type: "address" }, - { internalType: "uint256", name: "amount", type: "uint256" }, + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } ], - name: "transferFrom", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [{ internalType: "uint256", name: "_share", type: "uint256" }], - name: "withdraw", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" }, -]; - -const DVGABIContract = [ { - inputs: [ - { internalType: "address", name: "_treasuryWalletAddr", type: "address" }, - { internalType: "uint256", name: "_dvgInAdvance", type: "uint256" }, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } ], - stateMutability: "nonpayable", - type: "constructor", + "stateMutability": "view", + "type": "function" }, { - anonymous: false, - inputs: [ + "inputs": [ { - indexed: true, - internalType: "address", - name: "owner", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, + "internalType": "bool", + "name": "", + "type": "bool" + } ], - name: "Approval", - type: "event", + "stateMutability": "nonpayable", + "type": "function" }, { - anonymous: false, - inputs: [ + "inputs": [ { - indexed: true, - internalType: "address", - name: "delegator", - type: "address", + "internalType": "address", + "name": "sender", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "fromDelegate", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "toDelegate", - type: "address", - }, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } ], - name: "DelegateChanged", - type: "event", + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" }, { - anonymous: false, - inputs: [ + "inputs": [ { - indexed: true, - internalType: "address", - name: "delegate", - type: "address", - }, + "internalType": "uint256", + "name": "_share", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; + +const DVGABIContract = [ + { + "inputs": [ { - indexed: false, - internalType: "uint256", - name: "previousBalance", - type: "uint256", + "internalType": "address", + "name": "_treasuryWalletAddr", + "type": "address" }, { - indexed: false, - internalType: "uint256", - name: "newBalance", - type: "uint256", - }, + "internalType": "uint256", + "name": "_dvgInAdvance", + "type": "uint256" + } ], - name: "DelegateVotesChanged", - type: "event", + "stateMutability": "nonpayable", + "type": "constructor" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" }, - ], - name: "OwnershipTransferred", - type: "event", + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" }, { - anonymous: false, - inputs: [ - { indexed: true, internalType: "address", name: "from", type: "address" }, - { indexed: true, internalType: "address", name: "to", type: "address" }, + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } ], - name: "Transfer", - type: "event", + "name": "DelegateChanged", + "type": "event" }, { - inputs: [], - name: "DELEGATION_TYPEHASH", - outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], - stateMutability: "view", - type: "function", + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" }, { - inputs: [], - name: "DOMAIN_TYPEHASH", - outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], - stateMutability: "view", - type: "function", + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" }, { - inputs: [ - { internalType: "address", name: "owner", type: "address" }, - { internalType: "address", name: "spender", type: "address" }, + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } ], - name: "allowance", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", + "name": "Transfer", + "type": "event" }, { - inputs: [ - { internalType: "address", name: "spender", type: "address" }, - { internalType: "uint256", name: "amount", type: "uint256" }, + "inputs": [], + "name": "DELEGATION_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } ], - name: "approve", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [{ internalType: "address", name: "account", type: "address" }], - name: "balanceOf", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", + "inputs": [], + "name": "DOMAIN_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { internalType: "address", name: "", type: "address" }, - { internalType: "uint32", name: "", type: "uint32" }, + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } ], - name: "checkpoints", - outputs: [ - { internalType: "uint32", name: "fromBlock", type: "uint32" }, - { internalType: "uint256", name: "votes", type: "uint256" }, + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [{ internalType: "uint8", name: "", type: "uint8" }], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { internalType: "address", name: "spender", type: "address" }, - { internalType: "uint256", name: "subtractedValue", type: "uint256" }, + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } ], - name: "decreaseAllowance", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "nonpayable", - type: "function", + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [{ internalType: "address", name: "delegatee", type: "address" }], - name: "delegate", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { internalType: "address", name: "delegatee", type: "address" }, - { internalType: "uint256", name: "nonce", type: "uint256" }, - { internalType: "uint256", name: "expiry", type: "uint256" }, - { internalType: "uint8", name: "v", type: "uint8" }, - { internalType: "bytes32", name: "r", type: "bytes32" }, - { internalType: "bytes32", name: "s", type: "bytes32" }, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } ], - name: "delegateBySig", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "checkpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "fromBlock", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [{ internalType: "address", name: "delegator", type: "address" }], - name: "delegates", - outputs: [{ internalType: "address", name: "", type: "address" }], - stateMutability: "view", - type: "function", + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "dvgInAdvance", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [{ internalType: "address", name: "account", type: "address" }], - name: "getCurrentVotes", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "account", type: "address" }, - { internalType: "uint256", name: "blockNumber", type: "uint256" }, + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } ], - name: "getPriorVotes", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "spender", type: "address" }, - { internalType: "uint256", name: "addedValue", type: "uint256" }, + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } ], - name: "increaseAllowance", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ - { internalType: "address", name: "_to", type: "address" }, - { internalType: "uint256", name: "_amount", type: "uint256" }, + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } ], - name: "mint", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: "name", - outputs: [{ internalType: "string", name: "", type: "string" }], - stateMutability: "view", - type: "function", + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [{ internalType: "address", name: "", type: "address" }], - name: "nonces", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", + "inputs": [ + { + "internalType": "address", + "name": "delegator", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [{ internalType: "address", name: "", type: "address" }], - name: "numCheckpoints", - outputs: [{ internalType: "uint32", name: "", type: "uint32" }], - stateMutability: "view", - type: "function", + "inputs": [], + "name": "dvgInAdvance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "owner", - outputs: [{ internalType: "address", name: "", type: "address" }], - stateMutability: "view", - type: "function", + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "renounceOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPriorVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "symbol", - outputs: [{ internalType: "string", name: "", type: "string" }], - stateMutability: "view", - type: "function", + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: "totalSupply", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ - { internalType: "address", name: "recipient", type: "address" }, - { internalType: "uint256", name: "amount", type: "uint256" }, + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } ], - name: "transfer", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { internalType: "address", name: "sender", type: "address" }, - { internalType: "address", name: "recipient", type: "address" }, - { internalType: "uint256", name: "amount", type: "uint256" }, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } ], - name: "transferFrom", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "nonpayable", - type: "function", + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [{ internalType: "address", name: "newOwner", type: "address" }], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryWalletAddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } +]; + +const xDVDABIContract = [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "DVDAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "xDVDAmount", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "DVDAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "xDVDAmount", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "dvd", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_addr", + "type": "address" + } + ], + "name": "getTier", + "outputs": [ + { + "internalType": "uint256", + "name": "_tier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_depositedAmount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_dvd", + "type": "address" + }, + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint256[]", + "name": "_tierAmounts", + "type": "uint256[]" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "tierAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_share", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; + +const DVDABIContract = [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "Snapshot", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DELEGATION_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "balanceOfAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "checkpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "fromBlock", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegator", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPriorVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "address", + "name": "_addr", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_initialSupply", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "snapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "totalSupplyAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; + +const daoStakeContract = [ + { + "inputs": [ + { + "internalType": "address", + "name": "_treasuryWalletAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "_communityWalletAddr", + "type": "address" + }, + { + "internalType": "contract DVGToken", + "name": "_dvg", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "lpTokenAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "poolWeight", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + } + ], + "name": "AddPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "poolId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "poolId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EmergencyWithdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract DVGToken", + "name": "dvg", + "type": "address" + } + ], + "name": "SetDVG", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "poolId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "poolWeight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalPoolWeight", + "type": "uint256" + } + ], + "name": "SetPoolWeight", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "treasuryWalletAddr", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "communityWalletAddr", + "type": "address" + } + ], + "name": "SetWalletAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "TransferDVGOwnership", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "poolId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalDVG", + "type": "uint256" + } + ], + "name": "UpdatePool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "poolId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "BLOCK_PER_PERIOD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COMMUNITY_WALLET_PERCENT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "END_BLOCK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PERIOD_AMOUNT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "POOL_PERCENT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "START_BLOCK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "TREASURY_WALLET_PERCENT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_lpTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_poolWeight", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "addPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "communityWalletAddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "dvg", + "outputs": [ + { + "internalType": "contract DVGToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_from", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_to", + "type": "uint256" + } + ], + "name": "getMultiplier", + "outputs": [ + { + "internalType": "uint256", + "name": "multiplier", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "massUpdatePools", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "pendingDVG", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "periodDVGPerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "pool", + "outputs": [ + { + "internalType": "address", + "name": "lpTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "poolWeight", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accDVGPerLP", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract DVGToken", + "name": "_dvg", + "type": "address" + } + ], + "name": "setDVG", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_poolWeight", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" + } + ], + "name": "setPoolWeight", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_treasuryWalletAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "_communityWalletAddr", + "type": "address" + } + ], + "name": "setWalletAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "totalPoolWeight", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferDVGOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryWalletAddr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "updatePool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "user", + "outputs": [ + { + "internalType": "uint256", + "name": "lpAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "finishedDVG", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; + +const uniswapPairABIContract = [{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount0Out","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1Out","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Swap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint112","name":"reserve0","type":"uint112"},{"indexed":false,"internalType":"uint112","name":"reserve1","type":"uint112"}],"name":"Sync","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MINIMUM_LIQUIDITY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"burn","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getReserves","outputs":[{"internalType":"uint112","name":"_reserve0","type":"uint112"},{"internalType":"uint112","name":"_reserve1","type":"uint112"},{"internalType":"uint32","name":"_blockTimestampLast","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token0","type":"address"},{"internalType":"address","name":"_token1","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"kLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"liquidity","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"price0CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"price1CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"skim","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount0Out","type":"uint256"},{"internalType":"uint256","name":"amount1Out","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"swap","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"sync","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"token0","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token1","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]; + +const citadelABIContract = [{"inputs":[{"internalType":"address","name":"_strategy","type":"address"},{"internalType":"address","name":"_treasuryWallet","type":"address"},{"internalType":"address","name":"_communityWallet","type":"address"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_strategist","type":"address"},{"internalType":"address","name":"_biconomy","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenDeposit","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amtDeposit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sharesMint","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_balanceOfWETH","type":"uint256"}],"name":"ETHToInvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fromStrategy","type":"address"},{"indexed":true,"internalType":"address","name":"toStrategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MigrateFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldCustomNetworkFeePerc","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCustomNetworkFeePerc","type":"uint256"}],"name":"SetCustomNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldCustomNetworkFeeTier","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newCustomNetworkFeeTier","type":"uint256"}],"name":"SetCustomNetworkFeeTier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeePerc","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeePerc","type":"uint256[]"}],"name":"SetNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeeTier2","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeeTier2","type":"uint256[]"}],"name":"SetNetworkFeeTier2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldProfileSharingFeePerc","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newProfileSharingFeePerc","type":"uint256"}],"name":"SetProfitSharingFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fees","type":"uint256"}],"name":"TransferredOutFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenWithdraw","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amtWithdraw","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sharesBurn","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"LOCKTIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_balanceOfDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canSetPendingStrategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeeTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"getAllPoolInETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllPoolInUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"getReimburseTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"migrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeeTier2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"profitSharingFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reimburseTokenFromStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reinvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_biconomy","type":"address"}],"name":"setBiconomy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"}],"name":"setCommunityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setCustomNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_customNetworkFeeTier","type":"uint256"}],"name":"setCustomNetworkFeeTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeePerc","type":"uint256[]"}],"name":"setNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeeTier2","type":"uint256[]"}],"name":"setNetworkFeeTier2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pendingStrategy","type":"address"}],"name":"setPendingStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_percentages","type":"uint256[]"}],"name":"setPercTokenKeepInVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setProfitSharingFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"contract ICitadelStrategy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenFrom","type":"uint256"},{"internalType":"uint256","name":"_tokenTo","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"swapTokenWithinVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trustedForwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockMigrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"versionRecipient","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yield","outputs":[],"stateMutability":"nonpayable","type":"function"}] + +const citadelStrategyABIContract = [{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"},{"internalType":"address","name":"_strategist","type":"address"},{"internalType":"address","name":"_admin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"pairs","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountA","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountB","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lpTokenMinted","type":"uint256"}],"name":"AddLiquidity","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"curveHBTC","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pickleWBTC","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sushiSwapDPI","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pickleDAI","type":"uint256"}],"name":"CurrentComposition","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ETHToInvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"curveHBTC","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pickleWBTC","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sushiSwapDPI","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pickleDAI","type":"uint256"}],"name":"LatestLPTokenPrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"curveHBTC","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pickleWBTC","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sushiSwapDPI","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pickleDAI","type":"uint256"}],"name":"TargetComposition","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"curveHBTC","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pickleWBTC","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sushiSwapDPI","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pickleDAI","type":"uint256"}],"name":"YieldAmount","type":"event"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"approveMigrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getCurrentPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isVesting","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reimburse","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reinvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"contract ICitadelVault","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yield","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yieldFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]; + +const hfDAOContract = [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "fromStrategy", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toStrategy", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "MigrateFunds", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldCommunityWallet", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newCommunityWallet", + "type": "address" + } + ], + "name": "SetCommunityWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldCustomNetworkFeePercentage", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newCustomNetworkFeePercentage", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldCustomNetworkFeeTier", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newCustomNetworkFeeTier", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeeTier", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeePercentage", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeePercentage", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeePercentage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeeTier2", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeeTier2", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeeTier2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldTreasuryWallet", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newTreasuryWallet", + "type": "address" + } + ], + "name": "SetTreasuryWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DENOMINATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "LOCKTIME", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "canSetPendingStrategy", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeeTier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "getCurrentBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "result", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_vaultName", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "address", + "name": "_strategy", + "type": "address" + }, + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "migrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeeTier2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingStrategy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "refund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_communityWallet", + "type": "address" + } + ], + "name": "setCommunityWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_percentage", + "type": "uint256" + } + ], + "name": "setCustomNetworkFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_customNetworkFeeTier", + "type": "uint256" + } + ], + "name": "setCustomNetworkFeeTier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeePercentage", + "type": "uint256[]" + } + ], + "name": "setNetworkFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeeTier2", + "type": "uint256[]" + } + ], + "name": "setNetworkFeeTier2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pendingStrategy", + "type": "address" + } + ], + "name": "setPendingStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_treasuryWallet", + "type": "address" + } + ], + "name": "setTreasuryWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "strategy", + "outputs": [ + { + "internalType": "contract IStrategy2", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unlockMigrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unlockTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "vaultName", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "treasuryWalletAddr", - outputs: [{ internalType: "address", name: "", type: "address" }], - stateMutability: "view", - type: "function", + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; + +const hfStrategyContract = [{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldCommunityWallet","type":"address"},{"indexed":true,"internalType":"address","name":"newCommunityWallet","type":"address"}],"name":"SetCommunityWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldProfileSharingFeePercentage","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newProfileSharingFeePercentage","type":"uint256"}],"name":"SetProfileSharingFeePercentage","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldTreasuryWallet","type":"address"},{"indexed":true,"internalType":"address","name":"newTreasuryWallet","type":"address"}],"name":"SetTreasuryWallet","type":"event"},{"inputs":[],"name":"FARM","outputs":[{"internalType":"contract IFARM","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"amountOutMinPerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"approveMigrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"daoVault","outputs":[{"internalType":"contract IDAOVault2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getCurrentBalance","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPseudoPool","outputs":[{"internalType":"uint256","name":"pseudoPool","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hfStake","outputs":[{"internalType":"contract IHFStake","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hfVault","outputs":[{"internalType":"contract IHFVault","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_strategyName","type":"bytes32"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_hfVault","type":"address"},{"internalType":"address","name":"_hfStake","type":"address"},{"internalType":"address","name":"_FARM","type":"address"},{"internalType":"address","name":"_uniswapRouter","type":"address"},{"internalType":"address","name":"_WETH","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_toInvest","type":"uint256"}],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isVesting","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"profileSharingFeePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"refund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reuseContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revertVesting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setAmountOutMinPerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"}],"name":"setCommunityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setProfileSharingFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategyName","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapRouter","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vesting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]; + +const hfVaultContract = [{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fromStrategy","type":"address"},{"indexed":true,"internalType":"address","name":"toStrategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MigrateFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldCommunityWallet","type":"address"},{"indexed":true,"internalType":"address","name":"newCommunityWallet","type":"address"}],"name":"SetCommunityWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldCustomNetworkFeePercentage","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCustomNetworkFeePercentage","type":"uint256"}],"name":"SetCustomNetworkFeePercentage","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldCustomNetworkFeeTier","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newCustomNetworkFeeTier","type":"uint256"}],"name":"SetCustomNetworkFeeTier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeePercentage","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeePercentage","type":"uint256[]"}],"name":"SetNetworkFeePercentage","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeeTier2","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeeTier2","type":"uint256[]"}],"name":"SetNetworkFeeTier2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldTreasuryWallet","type":"address"},{"indexed":true,"internalType":"address","name":"newTreasuryWallet","type":"address"}],"name":"SetTreasuryWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canSetPendingStrategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeeTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_vaultName","type":"bytes32"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_strategy","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"migrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeeTier2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"refund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"}],"name":"setCommunityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setCustomNetworkFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_customNetworkFeeTier","type":"uint256"}],"name":"setCustomNetworkFeeTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeePercentage","type":"uint256[]"}],"name":"setNetworkFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeeTier2","type":"uint256[]"}],"name":"setNetworkFeeTier2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pendingStrategy","type":"address"}],"name":"setPendingStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"contract IStrategy2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockMigrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultName","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]; + +const eacAggregatoorProxyContract = [{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"},{"internalType":"address","name":"_accessController","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"int256","name":"current","type":"int256"},{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"updatedAt","type":"uint256"}],"name":"AnswerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":true,"internalType":"address","name":"startedBy","type":"address"},{"indexed":false,"internalType":"uint256","name":"startedAt","type":"uint256"}],"name":"NewRound","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"accessController","outputs":[{"internalType":"contract AccessControllerInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"aggregator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"}],"name":"confirmAggregator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundId","type":"uint256"}],"name":"getAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"_roundId","type":"uint80"}],"name":"getRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundId","type":"uint256"}],"name":"getTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"phaseAggregators","outputs":[{"internalType":"contract AggregatorV2V3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"phaseId","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"}],"name":"proposeAggregator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"proposedAggregator","outputs":[{"internalType":"contract AggregatorV2V3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"_roundId","type":"uint80"}],"name":"proposedGetRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proposedLatestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_accessController","type":"address"}],"name":"setController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]; + +const elonApeVaultContract = [ + { + "inputs": [ + { + "internalType": "address", + "name": "_strategy", + "type": "address" + }, + { + "internalType": "address", + "name": "_treasuryWallet", + "type": "address" + }, + { + "internalType": "address", + "name": "_communityWallet", + "type": "address" + }, + { + "internalType": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_strategist", + "type": "address" + }, + { + "internalType": "address", + "name": "_biconomy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "tokenDeposit", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amtDeposit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sharesMint", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "fromStrategy", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toStrategy", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "MigrateFunds", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldCustomNetworkFeePerc", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newCustomNetworkFeePerc", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeePerc", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldCustomNetworkFeeTier", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newCustomNetworkFeeTier", + "type": "uint256" + } + ], + "name": "SetCustomNetworkFeeTier", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeePerc", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeePerc", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeePerc", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeeTier2", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeeTier2", + "type": "uint256[]" + } + ], + "name": "SetNetworkFeeTier2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldProfileSharingFeePerc", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newProfileSharingFeePerc", + "type": "uint256" + } + ], + "name": "SetProfitSharingFeePerc", + "type": "event" }, -]; - -const daoStakeContract = [ { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "_treasuryWalletAddr", + "name": "from", "type": "address" }, { + "indexed": true, "internalType": "address", - "name": "_communityWalletAddr", + "name": "to", "type": "address" }, { - "internalType": "contract DVGToken", - "name": "_dvg", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "stateMutability": "nonpayable", - "type": "constructor" + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "fees", + "type": "uint256" + } + ], + "name": "TransferredOutFees", + "type": "event" }, { "anonymous": false, @@ -15406,217 +18917,349 @@ const daoStakeContract = [ { "indexed": true, "internalType": "address", - "name": "lpTokenAddress", + "name": "tokenWithdraw", "type": "address" }, { "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, "internalType": "uint256", - "name": "poolWeight", + "name": "amtWithdraw", "type": "uint256" }, { - "indexed": true, + "indexed": false, "internalType": "uint256", - "name": "lastRewardBlock", + "name": "sharesBurn", "type": "uint256" } ], - "name": "AddPool", + "name": "Withdraw", "type": "event" }, { - "anonymous": false, + "inputs": [], + "name": "LOCKTIME", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { "inputs": [ { - "indexed": true, "internalType": "address", - "name": "user", + "name": "owner", "type": "address" }, { - "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { "internalType": "uint256", - "name": "poolId", + "name": "", "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" }, { - "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], - "name": "Deposit", - "type": "event" + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "user", + "name": "account", "type": "address" - }, + } + ], + "name": "balanceOf", + "outputs": [ { - "indexed": true, "internalType": "uint256", - "name": "poolId", + "name": "", "type": "uint256" - }, + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "canSetPendingStrategy", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeePerc", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "", "type": "uint256" } ], - "name": "EmergencyWithdraw", - "type": "event" + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "customNetworkFeeTier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "previousOwner", + "name": "spender", "type": "address" }, { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" } ], - "name": "OwnershipTransferred", - "type": "event" + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "contract DVGToken", - "name": "dvg", - "type": "address" + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_tokenIndex", + "type": "uint256" } ], - "name": "SetDVG", - "type": "event" + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getAllPoolInUSD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "uint256", - "name": "poolId", - "type": "uint256" + "internalType": "address", + "name": "spender", + "type": "address" }, { - "indexed": true, "internalType": "uint256", - "name": "poolWeight", + "name": "addedValue", "type": "uint256" - }, + } + ], + "name": "increaseAllowance", + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "totalPoolWeight", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "SetPoolWeight", - "type": "event" + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "invest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "treasuryWalletAddr", + "name": "forwarder", "type": "address" - }, + } + ], + "name": "isTrustedForwarder", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "communityWalletAddr", - "type": "address" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "SetWalletAddress", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "inputs": [], + "name": "migrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "string", + "name": "", + "type": "string" } ], - "name": "TransferDVGOwnership", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "uint256", - "name": "poolId", - "type": "uint256" - }, - { - "indexed": true, "internalType": "uint256", - "name": "lastRewardBlock", + "name": "", "type": "uint256" - }, + } + ], + "name": "networkFeePerc", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "totalDVG", + "name": "", "type": "uint256" } ], - "name": "UpdatePool", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "poolId", - "type": "uint256" - }, - { - "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "", "type": "uint256" } ], - "name": "Withdraw", - "type": "event" - }, - { - "inputs": [], - "name": "BLOCK_PER_PERIOD", + "name": "networkFeeTier2", "outputs": [ { "internalType": "uint256", @@ -15629,12 +19272,12 @@ const daoStakeContract = [ }, { "inputs": [], - "name": "COMMUNITY_WALLET_PERCENT", + "name": "owner", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "stateMutability": "view", @@ -15642,12 +19285,12 @@ const daoStakeContract = [ }, { "inputs": [], - "name": "END_BLOCK", + "name": "pendingStrategy", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "stateMutability": "view", @@ -15655,7 +19298,7 @@ const daoStakeContract = [ }, { "inputs": [], - "name": "PERIOD_AMOUNT", + "name": "profitSharingFeePerc", "outputs": [ { "internalType": "uint256", @@ -15668,119 +19311,193 @@ const daoStakeContract = [ }, { "inputs": [], - "name": "POOL_PERCENT", - "outputs": [ + "name": "reinvest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "_tokenIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_farmIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", "type": "uint256" } ], - "stateMutability": "view", + "name": "retrieveStablecoinsFromStrategy", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "START_BLOCK", - "outputs": [ + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "_admin", + "type": "address" } ], - "stateMutability": "view", + "name": "setAdmin", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "TREASURY_WALLET_PERCENT", - "outputs": [ + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "_biconomy", + "type": "address" } ], - "stateMutability": "view", + "name": "setBiconomy", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "_lpTokenAddress", + "name": "_communityWallet", "type": "address" - }, + } + ], + "name": "setCommunityWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { "internalType": "uint256", - "name": "_poolWeight", + "name": "_percentage", "type": "uint256" - }, + } + ], + "name": "setCustomNetworkFeePerc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "internalType": "bool", - "name": "_withUpdate", - "type": "bool" + "internalType": "uint256", + "name": "_customNetworkFeeTier", + "type": "uint256" } ], - "name": "addPool", + "name": "setCustomNetworkFeeTier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeePerc", + "type": "uint256[]" + } + ], + "name": "setNetworkFeePerc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_networkFeeTier2", + "type": "uint256[]" + } + ], + "name": "setNetworkFeeTier2", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "communityWalletAddr", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "_pendingStrategy", "type": "address" } ], - "stateMutability": "view", + "name": "setPendingStrategy", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, + "internalType": "uint256[]", + "name": "_percentages", + "type": "uint256[]" + } + ], + "name": "setPercTokenKeepInVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { "internalType": "uint256", - "name": "_amount", + "name": "_percentage", "type": "uint256" } ], - "name": "deposit", + "name": "setProfitSharingFeePerc", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "dvg", - "outputs": [ + "inputs": [ { - "internalType": "contract DVGToken", - "name": "", + "internalType": "address", + "name": "_strategist", "type": "address" } ], - "stateMutability": "view", + "name": "setStrategist", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" + "internalType": "address", + "name": "_treasuryWallet", + "type": "address" } ], - "name": "emergencyWithdraw", + "name": "setTreasuryWallet", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -15788,22 +19505,24 @@ const daoStakeContract = [ { "inputs": [ { - "internalType": "uint256", - "name": "_from", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_to", - "type": "uint256" + "internalType": "uint256[]", + "name": "_weights", + "type": "uint256[]" } ], - "name": "getMultiplier", + "name": "setWeights", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "strategist", "outputs": [ { - "internalType": "uint256", - "name": "multiplier", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" } ], "stateMutability": "view", @@ -15811,17 +19530,10 @@ const daoStakeContract = [ }, { "inputs": [], - "name": "massUpdatePools", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", + "name": "strategy", "outputs": [ { - "internalType": "address", + "internalType": "contract IStrategy", "name": "", "type": "address" } @@ -15833,40 +19545,33 @@ const daoStakeContract = [ "inputs": [ { "internalType": "uint256", - "name": "_pid", + "name": "_tokenFrom", "type": "uint256" }, { - "internalType": "address", - "name": "_user", - "type": "address" - } - ], - "name": "pendingDVG", - "outputs": [ + "internalType": "uint256", + "name": "_tokenTo", + "type": "uint256" + }, { "internalType": "uint256", - "name": "", + "name": "_amount", "type": "uint256" } ], - "stateMutability": "view", + "name": "swapTokenWithinVault", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "periodDVGPerBlock", + "inputs": [], + "name": "symbol", "outputs": [ { - "internalType": "uint256", + "internalType": "string", "name": "", - "type": "uint256" + "type": "string" } ], "stateMutability": "view", @@ -15880,26 +19585,21 @@ const daoStakeContract = [ "type": "uint256" } ], - "name": "pool", + "name": "tokens", "outputs": [ { - "internalType": "address", - "name": "lpTokenAddress", + "internalType": "contract IERC20", + "name": "token", "type": "address" }, { "internalType": "uint256", - "name": "poolWeight", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lastRewardBlock", + "name": "decimals", "type": "uint256" }, { "internalType": "uint256", - "name": "accDVGPerLP", + "name": "percKeepInVault", "type": "uint256" } ], @@ -15908,7 +19608,7 @@ const daoStakeContract = [ }, { "inputs": [], - "name": "poolLength", + "name": "totalSupply", "outputs": [ { "internalType": "uint256", @@ -15919,46 +19619,27 @@ const daoStakeContract = [ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { - "internalType": "contract DVGToken", - "name": "_dvg", + "internalType": "address", + "name": "recipient", "type": "address" - } - ], - "name": "setDVG", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" }, { "internalType": "uint256", - "name": "_poolWeight", + "name": "amount", "type": "uint256" - }, + } + ], + "name": "transfer", + "outputs": [ { "internalType": "bool", - "name": "_withUpdate", + "name": "", "type": "bool" } ], - "name": "setPoolWeight", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -15966,42 +19647,34 @@ const daoStakeContract = [ "inputs": [ { "internalType": "address", - "name": "_treasuryWalletAddr", + "name": "sender", "type": "address" }, { "internalType": "address", - "name": "_communityWalletAddr", + "name": "recipient", "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "setWalletAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "totalPoolWeight", + "name": "transferFrom", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "_newOwner", - "type": "address" - } - ], - "name": "transferDVGOwnership", + "inputs": [], + "name": "transferOutNetworkFees", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -16021,7 +19694,7 @@ const daoStakeContract = [ }, { "inputs": [], - "name": "treasuryWalletAddr", + "name": "treasuryWallet", "outputs": [ { "internalType": "address", @@ -16033,57 +19706,61 @@ const daoStakeContract = [ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "trustedForwarder", + "outputs": [ { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "updatePool", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unlockMigrateFunds", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "unlockTime", + "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" - }, - { - "internalType": "address", - "name": "", - "type": "address" } ], - "name": "user", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "versionRecipient", "outputs": [ { - "internalType": "uint256", - "name": "lpAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "finishedDVG", - "type": "uint256" + "internalType": "string", + "name": "", + "type": "string" } ], - "stateMutability": "view", + "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "uint256", - "name": "_pid", + "name": "_shares", "type": "uint256" }, { "internalType": "uint256", - "name": "_amount", + "name": "_tokenIndex", "type": "uint256" } ], @@ -16094,61 +19771,54 @@ const daoStakeContract = [ } ]; -const uniswapPairABIContract = [{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount0Out","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1Out","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Swap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint112","name":"reserve0","type":"uint112"},{"indexed":false,"internalType":"uint112","name":"reserve1","type":"uint112"}],"name":"Sync","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MINIMUM_LIQUIDITY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"burn","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getReserves","outputs":[{"internalType":"uint112","name":"_reserve0","type":"uint112"},{"internalType":"uint112","name":"_reserve1","type":"uint112"},{"internalType":"uint32","name":"_blockTimestampLast","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token0","type":"address"},{"internalType":"address","name":"_token1","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"kLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"liquidity","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"price0CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"price1CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"skim","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount0Out","type":"uint256"},{"internalType":"uint256","name":"amount1Out","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"swap","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"sync","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"token0","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token1","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]; - -const citadelABIContract = [{"inputs":[{"internalType":"address","name":"_strategy","type":"address"},{"internalType":"address","name":"_treasuryWallet","type":"address"},{"internalType":"address","name":"_communityWallet","type":"address"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_strategist","type":"address"},{"internalType":"address","name":"_biconomy","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenDeposit","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amtDeposit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sharesMint","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_balanceOfWETH","type":"uint256"}],"name":"ETHToInvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fromStrategy","type":"address"},{"indexed":true,"internalType":"address","name":"toStrategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MigrateFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldCustomNetworkFeePerc","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCustomNetworkFeePerc","type":"uint256"}],"name":"SetCustomNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldCustomNetworkFeeTier","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newCustomNetworkFeeTier","type":"uint256"}],"name":"SetCustomNetworkFeeTier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeePerc","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeePerc","type":"uint256[]"}],"name":"SetNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeeTier2","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeeTier2","type":"uint256[]"}],"name":"SetNetworkFeeTier2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldProfileSharingFeePerc","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newProfileSharingFeePerc","type":"uint256"}],"name":"SetProfitSharingFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fees","type":"uint256"}],"name":"TransferredOutFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenWithdraw","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"amtWithdraw","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sharesBurn","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"LOCKTIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_balanceOfDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canSetPendingStrategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeeTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"getAllPoolInETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllPoolInUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"getReimburseTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"migrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeeTier2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"profitSharingFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reimburseTokenFromStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reinvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_biconomy","type":"address"}],"name":"setBiconomy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"}],"name":"setCommunityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setCustomNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_customNetworkFeeTier","type":"uint256"}],"name":"setCustomNetworkFeeTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeePerc","type":"uint256[]"}],"name":"setNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeeTier2","type":"uint256[]"}],"name":"setNetworkFeeTier2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pendingStrategy","type":"address"}],"name":"setPendingStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_percentages","type":"uint256[]"}],"name":"setPercTokenKeepInVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setProfitSharingFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"contract ICitadelStrategy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenFrom","type":"uint256"},{"internalType":"uint256","name":"_tokenTo","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"swapTokenWithinVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trustedForwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockMigrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"versionRecipient","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"uint256","name":"_tokenIndex","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yield","outputs":[],"stateMutability":"nonpayable","type":"function"}] - -const citadelStrategyABIContract = [{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"},{"internalType":"address","name":"_strategist","type":"address"},{"internalType":"address","name":"_admin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"pairs","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountA","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountB","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lpTokenMinted","type":"uint256"}],"name":"AddLiquidity","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"curveHBTC","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pickleWBTC","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sushiSwapDPI","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pickleDAI","type":"uint256"}],"name":"CurrentComposition","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ETHToInvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"curveHBTC","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pickleWBTC","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sushiSwapDPI","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pickleDAI","type":"uint256"}],"name":"LatestLPTokenPrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"curveHBTC","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pickleWBTC","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sushiSwapDPI","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pickleDAI","type":"uint256"}],"name":"TargetComposition","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"curveHBTC","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pickleWBTC","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sushiSwapDPI","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pickleDAI","type":"uint256"}],"name":"YieldAmount","type":"event"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"approveMigrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getCurrentPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isVesting","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reimburse","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reinvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"contract ICitadelVault","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yield","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yieldFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]; - -const hfDAOContract = [ +const elonApeStrategyContract = [ { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, + "internalType": "uint256[]", + "name": "_weights", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ { "indexed": false, "internalType": "uint256", - "name": "value", + "name": "_amount", "type": "uint256" } ], - "name": "Approval", + "name": "AmtToInvest", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "fromStrategy", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "_poolSTSLA", + "type": "uint256" }, { - "indexed": true, - "internalType": "address", - "name": "toStrategy", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "_poolWBTC", + "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "_poolRenDOGE", "type": "uint256" } ], - "name": "MigrateFunds", + "name": "CurrentComposition", "type": "event" }, { @@ -16174,157 +19844,224 @@ const hfDAOContract = [ "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "oldCommunityWallet", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "_poolSTSLA", + "type": "uint256" }, { - "indexed": true, - "internalType": "address", - "name": "newCommunityWallet", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "_poolWBTC", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_poolRenDOGE", + "type": "uint256" } ], - "name": "SetCommunityWallet", + "name": "TargetComposition", "type": "event" }, { - "anonymous": false, - "inputs": [ + "inputs": [], + "name": "approveMigrate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getFarmsPool", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "oldCustomNetworkFeePercentage", + "name": "", "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "newCustomNetworkFeePercentage", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", "type": "uint256" } ], - "name": "SetCustomNetworkFeePercentage", - "type": "event" + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTotalPool", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "uint256", - "name": "oldCustomNetworkFeeTier", + "name": "_amountUSDT", "type": "uint256" }, { - "indexed": true, "internalType": "uint256", - "name": "newCustomNetworkFeeTier", + "name": "_amountUSDC", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amountDAI", "type": "uint256" } ], - "name": "SetCustomNetworkFeeTier", - "type": "event" + "name": "invest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "inputs": [], + "name": "isVesting", + "outputs": [ { - "indexed": false, - "internalType": "uint256[]", - "name": "oldNetworkFeePercentage", - "type": "uint256[]" - }, + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ { - "indexed": false, - "internalType": "uint256[]", - "name": "newNetworkFeePercentage", - "type": "uint256[]" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "SetNetworkFeePercentage", - "type": "event" + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reinvest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint256[]", - "name": "oldNetworkFeeTier2", - "type": "uint256[]" + "internalType": "uint256", + "name": "_tokenIndex", + "type": "uint256" }, { - "indexed": false, - "internalType": "uint256[]", - "name": "newNetworkFeeTier2", - "type": "uint256[]" + "internalType": "uint256", + "name": "_farmIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" } ], - "name": "SetNetworkFeeTier2", - "type": "event" + "name": "releaseStablecoinsToVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "oldTreasuryWallet", - "type": "address" - }, - { - "indexed": true, "internalType": "address", - "name": "newTreasuryWallet", + "name": "_vault", "type": "address" } ], - "name": "SetTreasuryWallet", - "type": "event" + "name": "setVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, + "internalType": "uint256[]", + "name": "_weights", + "type": "uint256[]" + } + ], + "name": "setWeights", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "indexed": true, "internalType": "address", - "name": "to", + "name": "newOwner", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" } ], - "name": "Transfer", - "type": "event" + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { "inputs": [], - "name": "DENOMINATOR", + "name": "vault", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "LOCKTIME", + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "weights", "outputs": [ { "internalType": "uint256", @@ -16338,17 +20075,17 @@ const hfDAOContract = [ { "inputs": [ { - "internalType": "address", - "name": "owner", - "type": "address" + "internalType": "uint256", + "name": "_amount", + "type": "uint256" }, { - "internalType": "address", - "name": "spender", - "type": "address" + "internalType": "uint256", + "name": "_tokenIndex", + "type": "uint256" } ], - "name": "allowance", + "name": "withdraw", "outputs": [ { "internalType": "uint256", @@ -16356,304 +20093,326 @@ const hfDAOContract = [ "type": "uint256" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" - }, + } +]; + +const polygonEacAggregatoorProxyContract = [{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"},{"internalType":"address","name":"_accessController","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"int256","name":"current","type":"int256"},{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"updatedAt","type":"uint256"}],"name":"AnswerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":true,"internalType":"address","name":"startedBy","type":"address"},{"indexed":false,"internalType":"uint256","name":"startedAt","type":"uint256"}],"name":"NewRound","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"accessController","outputs":[{"internalType":"contract AccessControllerInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"aggregator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"}],"name":"confirmAggregator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundId","type":"uint256"}],"name":"getAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"_roundId","type":"uint80"}],"name":"getRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundId","type":"uint256"}],"name":"getTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"phaseAggregators","outputs":[{"internalType":"contract AggregatorV2V3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"phaseId","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"}],"name":"proposeAggregator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"proposedAggregator","outputs":[{"internalType":"contract AggregatorV2V3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"_roundId","type":"uint80"}],"name":"proposedGetRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proposedLatestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_accessController","type":"address"}],"name":"setController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]; + +const daoFaangStonkVaultContract = [{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_strategy","type":"address"},{"internalType":"address","name":"_biconomy","type":"address"},{"internalType":"address","name":"_communityWallet","type":"address"},{"internalType":"address","name":"_strategist","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sharesMinted","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"admin","type":"address"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"SetAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"biconomy","type":"address"}],"name":"SetBiconomy","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldCommunityWallet","type":"address"},{"indexed":false,"internalType":"address","name":"newcommunityWallet","type":"address"}],"name":"SetCommunityWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldCustomNetworkFeePerc","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCustomNetworkFeePerc","type":"uint256"}],"name":"SetCustomNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeePerc","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeePerc","type":"uint256[]"}],"name":"SetNetworkFeePerc","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newStrategy","type":"address"}],"name":"SetPendingStrategy","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldStrategistWallet","type":"address"},{"indexed":false,"internalType":"address","name":"newStrategistWallet","type":"address"}],"name":"SetStrategistWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldTreasury","type":"address"},{"indexed":false,"internalType":"address","name":"newTreasury","type":"address"}],"name":"SetTreasuryWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"SetWithdrawlFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"unlockTime","type":"uint256"}],"name":"UnlockMigrateFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sharesBurned","type":"uint256"}],"name":"Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newStrategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"migrateFunds","type":"event"},{"inputs":[],"name":"DAI","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOCKTIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDC","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDT","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canSetPendingStrategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeeTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"depositedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalValueInPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isEmergency","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"}],"name":"migrateFund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeeTier2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reInvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newAdmin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_daiPercentage","type":"uint256"},{"internalType":"uint256","name":"_usdcPercentage","type":"uint256"},{"internalType":"uint256","name":"usdtPercentage","type":"uint256"}],"name":"setAmountToKeepInVaultPerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_biconomy","type":"address"}],"name":"setBiconomy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newCommunityWallet","type":"address"}],"name":"setCommunityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setCustomNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeePerc","type":"uint256[]"}],"name":"setNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategy","type":"address"}],"name":"setPendingStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategistWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newTreasury","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setWithdrawalFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"contract IStrategy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trustedForwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockMigrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"versionRecipient","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yield","outputs":[],"stateMutability":"nonpayable","type":"function"}]; + +const daoFaangStonkStrategyContract = [{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"},{"internalType":"address","name":"_communityWallet","type":"address"},{"internalType":"address","name":"_strategist","type":"address"},{"internalType":"address","name":"_mirustPool","type":"address"},{"internalType":"uint256[]","name":"weights","type":"uint256[]"},{"internalType":"contract IERC20[]","name":"mAssetsTokens","type":"address[]"},{"internalType":"contract ILPPool[]","name":"lpPools","type":"address[]"},{"internalType":"contract IERC20[]","name":"lpTokens","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_mirHarvested","type":"uint256"}],"name":"HarvestedMIR","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"DAIToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"curveFi","outputs":[{"internalType":"contract ICurveFi","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"contract IUniswapV2Factory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalValueInPool","outputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"mAssets","outputs":[{"internalType":"uint256","name":"weight","type":"uint256"},{"internalType":"contract IERC20","name":"mAssetToken","type":"address"},{"internalType":"contract ILPPool","name":"lpPool","type":"address"},{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"amountOfATotal","type":"uint256"},{"internalType":"uint256","name":"amountOfBTotal","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mir","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mirUstPooltoken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"weights","type":"uint256[]"}],"name":"reBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"}],"name":"setCommunityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"name":"userTotalLPToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ust","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_tokenToConvert","type":"address"}],"name":"withdrawAllFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yield","outputs":[],"stateMutability":"nonpayable","type":"function"}]; + +const cubanApeVaultContract = [ { "inputs": [ { "internalType": "address", - "name": "spender", + "name": "_strategy", "type": "address" }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ + "internalType": "address", + "name": "_treasuryWallet", + "type": "address" + }, { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "address", + "name": "_communityWallet", + "type": "address" + }, + { + "internalType": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_strategist", + "type": "address" + }, + { + "internalType": "address", + "name": "_biconomy", + "type": "address" } ], "stateMutability": "nonpayable", - "type": "function" + "type": "constructor" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "account", + "name": "owner", "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ + }, { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "value", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "name": "Approval", + "type": "event" }, { - "inputs": [], - "name": "canSetPendingStrategy", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": true, + "internalType": "address", + "name": "tokenDeposit", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amtDeposit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sharesMint", + "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "name": "Deposit", + "type": "event" }, { - "inputs": [], - "name": "communityFee", - "outputs": [ + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "fromStrategy", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toStrategy", + "type": "address" + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "name": "MigrateFunds", + "type": "event" }, { - "inputs": [], - "name": "communityWallet", - "outputs": [ + "anonymous": false, + "inputs": [ { + "indexed": true, "internalType": "address", - "name": "", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "OwnershipTransferred", + "type": "event" }, { - "inputs": [], - "name": "customNetworkFeePercentage", - "outputs": [ + "anonymous": false, + "inputs": [ { + "indexed": true, "internalType": "uint256", - "name": "", + "name": "oldCustomNetworkFeePerc", "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "customNetworkFeeTier", - "outputs": [ + }, { + "indexed": true, "internalType": "uint256", - "name": "", + "name": "newCustomNetworkFeePerc", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" + "name": "SetCustomNetworkFeePerc", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "spender", - "type": "address" + "indexed": true, + "internalType": "uint256", + "name": "oldCustomNetworkFeeTier", + "type": "uint256" }, { + "indexed": true, "internalType": "uint256", - "name": "subtractedValue", + "name": "newCustomNetworkFeeTier", "type": "uint256" } ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" + "name": "SetCustomNetworkFeeTier", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeePerc", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeePerc", + "type": "uint256[]" } ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "SetNetworkFeePerc", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "getCurrentBalance", - "outputs": [ + "indexed": false, + "internalType": "uint256[]", + "name": "oldNetworkFeeTier2", + "type": "uint256[]" + }, { - "internalType": "uint256", - "name": "result", - "type": "uint256" + "indexed": false, + "internalType": "uint256[]", + "name": "newNetworkFeeTier2", + "type": "uint256[]" } ], - "stateMutability": "view", - "type": "function" + "name": "SetNetworkFeeTier2", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "spender", - "type": "address" + "indexed": true, + "internalType": "uint256", + "name": "oldProfileSharingFeePerc", + "type": "uint256" }, { + "indexed": true, "internalType": "uint256", - "name": "addedValue", + "name": "newProfileSharingFeePerc", "type": "uint256" } ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" + "name": "SetProfitSharingFeePerc", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "bytes32", - "name": "_vaultName", - "type": "bytes32" - }, - { + "indexed": true, "internalType": "address", - "name": "_token", + "name": "from", "type": "address" }, { + "indexed": true, "internalType": "address", - "name": "_strategy", + "name": "to", "type": "address" }, { - "internalType": "address", - "name": "_owner", - "type": "address" - } - ], - "name": "init", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "migrateFunds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "name": "Transfer", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "networkFeePercentage", - "outputs": [ - { - "internalType": "uint256", - "name": "", + "name": "fees", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "name": "TransferredOutFees", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, + "internalType": "address", + "name": "tokenWithdraw", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "amtWithdraw", "type": "uint256" - } - ], - "name": "networkFeeTier2", - "outputs": [ + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "sharesBurn", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "name": "Withdraw", + "type": "event" }, { "inputs": [], - "name": "owner", + "name": "LOCKTIME", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", @@ -16661,7 +20420,7 @@ const hfDAOContract = [ }, { "inputs": [], - "name": "pendingStrategy", + "name": "admin", "outputs": [ { "internalType": "address", @@ -16672,110 +20431,92 @@ const hfDAOContract = [ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "refund", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { "internalType": "address", - "name": "_communityWallet", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", "type": "address" } ], - "name": "setCommunityWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "name": "allowance", + "outputs": [ { "internalType": "uint256", - "name": "_percentage", + "name": "", "type": "uint256" } ], - "name": "setCustomNetworkFeePercentage", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, { "internalType": "uint256", - "name": "_customNetworkFeeTier", + "name": "amount", "type": "uint256" } ], - "name": "setCustomNetworkFeeTier", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "name": "approve", + "outputs": [ { - "internalType": "uint256[]", - "name": "_networkFeePercentage", - "type": "uint256[]" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "setNetworkFeePercentage", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "uint256[]", - "name": "_networkFeeTier2", - "type": "uint256[]" + "internalType": "address", + "name": "account", + "type": "address" } ], - "name": "setNetworkFeeTier2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "name": "balanceOf", + "outputs": [ { - "internalType": "address", - "name": "_pendingStrategy", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "setPendingStrategy", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "canSetPendingStrategy", + "outputs": [ { - "internalType": "address", - "name": "_treasuryWallet", - "type": "address" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "setTreasuryWallet", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "strategy", + "name": "communityWallet", "outputs": [ { - "internalType": "contract IStrategy2", + "internalType": "address", "name": "", "type": "address" } @@ -16785,12 +20526,12 @@ const hfDAOContract = [ }, { "inputs": [], - "name": "symbol", + "name": "customNetworkFeePerc", "outputs": [ { - "internalType": "string", + "internalType": "uint256", "name": "", - "type": "string" + "type": "uint256" } ], "stateMutability": "view", @@ -16798,12 +20539,12 @@ const hfDAOContract = [ }, { "inputs": [], - "name": "token", + "name": "customNetworkFeeTier", "outputs": [ { - "internalType": "contract IERC20Upgradeable", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", @@ -16811,12 +20552,12 @@ const hfDAOContract = [ }, { "inputs": [], - "name": "totalSupply", + "name": "decimals", "outputs": [ { - "internalType": "uint256", + "internalType": "uint8", "name": "", - "type": "uint256" + "type": "uint8" } ], "stateMutability": "view", @@ -16826,16 +20567,16 @@ const hfDAOContract = [ "inputs": [ { "internalType": "address", - "name": "recipient", + "name": "spender", "type": "address" }, { "internalType": "uint256", - "name": "amount", + "name": "subtractedValue", "type": "uint256" } ], - "name": "transfer", + "name": "decreaseAllowance", "outputs": [ { "internalType": "bool", @@ -16849,48 +20590,31 @@ const hfDAOContract = [ { "inputs": [ { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" + "internalType": "uint256", + "name": "_amount", + "type": "uint256" }, { "internalType": "uint256", - "name": "amount", + "name": "_tokenIndex", "type": "uint256" } ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], + "name": "deposit", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", + "inputs": [], + "name": "emergencyWithdraw", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "treasuryFee", + "name": "getAllPoolInUSD", "outputs": [ { "internalType": "uint256", @@ -16902,33 +20626,50 @@ const hfDAOContract = [ "type": "function" }, { - "inputs": [], - "name": "treasuryWallet", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "spender", "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" } ], - "stateMutability": "view", + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "unlockMigrateFunds", + "name": "invest", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "unlockTime", + "inputs": [ + { + "internalType": "address", + "name": "forwarder", + "type": "address" + } + ], + "name": "isTrustedForwarder", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "stateMutability": "view", @@ -16936,12 +20677,19 @@ const hfDAOContract = [ }, { "inputs": [], - "name": "vaultName", + "name": "migrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", "outputs": [ { - "internalType": "bytes32", + "internalType": "string", "name": "", - "type": "bytes32" + "type": "string" } ], "stateMutability": "view", @@ -16951,331 +20699,370 @@ const hfDAOContract = [ "inputs": [ { "internalType": "uint256", - "name": "_amount", + "name": "", "type": "uint256" } ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -]; - -const hfStrategyContract = [{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldCommunityWallet","type":"address"},{"indexed":true,"internalType":"address","name":"newCommunityWallet","type":"address"}],"name":"SetCommunityWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldProfileSharingFeePercentage","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newProfileSharingFeePercentage","type":"uint256"}],"name":"SetProfileSharingFeePercentage","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldTreasuryWallet","type":"address"},{"indexed":true,"internalType":"address","name":"newTreasuryWallet","type":"address"}],"name":"SetTreasuryWallet","type":"event"},{"inputs":[],"name":"FARM","outputs":[{"internalType":"contract IFARM","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"amountOutMinPerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"approveMigrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"daoVault","outputs":[{"internalType":"contract IDAOVault2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getCurrentBalance","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPseudoPool","outputs":[{"internalType":"uint256","name":"pseudoPool","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hfStake","outputs":[{"internalType":"contract IHFStake","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hfVault","outputs":[{"internalType":"contract IHFVault","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_strategyName","type":"bytes32"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_hfVault","type":"address"},{"internalType":"address","name":"_hfStake","type":"address"},{"internalType":"address","name":"_FARM","type":"address"},{"internalType":"address","name":"_uniswapRouter","type":"address"},{"internalType":"address","name":"_WETH","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_toInvest","type":"uint256"}],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isVesting","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"profileSharingFeePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"refund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reuseContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revertVesting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setAmountOutMinPerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"}],"name":"setCommunityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setProfileSharingFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategyName","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapRouter","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vesting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]; - -const hfVaultContract = [{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fromStrategy","type":"address"},{"indexed":true,"internalType":"address","name":"toStrategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MigrateFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldCommunityWallet","type":"address"},{"indexed":true,"internalType":"address","name":"newCommunityWallet","type":"address"}],"name":"SetCommunityWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldCustomNetworkFeePercentage","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCustomNetworkFeePercentage","type":"uint256"}],"name":"SetCustomNetworkFeePercentage","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldCustomNetworkFeeTier","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newCustomNetworkFeeTier","type":"uint256"}],"name":"SetCustomNetworkFeeTier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeePercentage","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeePercentage","type":"uint256[]"}],"name":"SetNetworkFeePercentage","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeeTier2","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeeTier2","type":"uint256[]"}],"name":"SetNetworkFeeTier2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldTreasuryWallet","type":"address"},{"indexed":true,"internalType":"address","name":"newTreasuryWallet","type":"address"}],"name":"SetTreasuryWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canSetPendingStrategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeeTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_vaultName","type":"bytes32"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_strategy","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"invest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"migrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeeTier2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"refund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"}],"name":"setCommunityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setCustomNetworkFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_customNetworkFeeTier","type":"uint256"}],"name":"setCustomNetworkFeeTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeePercentage","type":"uint256[]"}],"name":"setNetworkFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeeTier2","type":"uint256[]"}],"name":"setNetworkFeeTier2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pendingStrategy","type":"address"}],"name":"setPendingStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"contract IStrategy2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockMigrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultName","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]; - -const eacAggregatoorProxyContract = [{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"},{"internalType":"address","name":"_accessController","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"int256","name":"current","type":"int256"},{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"updatedAt","type":"uint256"}],"name":"AnswerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":true,"internalType":"address","name":"startedBy","type":"address"},{"indexed":false,"internalType":"uint256","name":"startedAt","type":"uint256"}],"name":"NewRound","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"accessController","outputs":[{"internalType":"contract AccessControllerInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"aggregator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"}],"name":"confirmAggregator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundId","type":"uint256"}],"name":"getAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"_roundId","type":"uint80"}],"name":"getRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundId","type":"uint256"}],"name":"getTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"phaseAggregators","outputs":[{"internalType":"contract AggregatorV2V3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"phaseId","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"}],"name":"proposeAggregator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"proposedAggregator","outputs":[{"internalType":"contract AggregatorV2V3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"_roundId","type":"uint80"}],"name":"proposedGetRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proposedLatestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_accessController","type":"address"}],"name":"setController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]; - -const elonApeVaultContract = [ - { - "inputs": [ - { - "internalType": "address", - "name": "_strategy", - "type": "address" - }, - { - "internalType": "address", - "name": "_treasuryWallet", - "type": "address" - }, - { - "internalType": "address", - "name": "_communityWallet", - "type": "address" - }, - { - "internalType": "address", - "name": "_admin", - "type": "address" - }, - { - "internalType": "address", - "name": "_strategist", - "type": "address" - }, + "name": "networkFeePerc", + "outputs": [ { - "internalType": "address", - "name": "_biconomy", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "stateMutability": "nonpayable", - "type": "constructor" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeeTier2", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "value", + "name": "", "type": "uint256" } ], - "name": "Approval", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "inputs": [], + "name": "owner", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "tokenDeposit", + "name": "", "type": "address" - }, + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingStrategy", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "caller", + "name": "", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amtDeposit", - "type": "uint256" - }, + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "profitSharingFeePerc", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "sharesMint", + "name": "", "type": "uint256" } ], - "name": "Deposit", - "type": "event" + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reinvest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "fromStrategy", - "type": "address" + "internalType": "uint256", + "name": "_tokenIndex", + "type": "uint256" }, { - "indexed": true, - "internalType": "address", - "name": "toStrategy", - "type": "address" + "internalType": "uint256", + "name": "_farmIndex", + "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "_amount", "type": "uint256" } ], - "name": "MigrateFunds", - "type": "event" + "name": "retrieveStablecoinsFromStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "previousOwner", + "name": "_admin", "type": "address" - }, + } + ], + "name": "setAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "_biconomy", "type": "address" } ], - "name": "OwnershipTransferred", - "type": "event" + "name": "setBiconomy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "uint256", - "name": "oldCustomNetworkFeePerc", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "newCustomNetworkFeePerc", - "type": "uint256" + "internalType": "address", + "name": "_communityWallet", + "type": "address" } ], - "name": "SetCustomNetworkFeePerc", - "type": "event" + "name": "setCommunityWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "uint256", - "name": "oldCustomNetworkFeeTier", + "name": "_percentage", "type": "uint256" - }, + } + ], + "name": "setCustomNetworkFeePerc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "indexed": true, "internalType": "uint256", - "name": "newCustomNetworkFeeTier", + "name": "_customNetworkFeeTier", "type": "uint256" } ], - "name": "SetCustomNetworkFeeTier", - "type": "event" + "name": "setCustomNetworkFeeTier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, "internalType": "uint256[]", - "name": "oldNetworkFeePerc", + "name": "_networkFeePerc", "type": "uint256[]" - }, + } + ], + "name": "setNetworkFeePerc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "indexed": false, "internalType": "uint256[]", - "name": "newNetworkFeePerc", + "name": "_networkFeeTier2", "type": "uint256[]" } ], - "name": "SetNetworkFeePerc", - "type": "event" + "name": "setNetworkFeeTier2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint256[]", - "name": "oldNetworkFeeTier2", - "type": "uint256[]" - }, + "internalType": "address", + "name": "_pendingStrategy", + "type": "address" + } + ], + "name": "setPendingStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "indexed": false, "internalType": "uint256[]", - "name": "newNetworkFeeTier2", + "name": "_percentages", "type": "uint256[]" } ], - "name": "SetNetworkFeeTier2", - "type": "event" + "name": "setPercTokenKeepInVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "uint256", - "name": "oldProfileSharingFeePerc", - "type": "uint256" - }, - { - "indexed": true, "internalType": "uint256", - "name": "newProfileSharingFeePerc", + "name": "_percentage", "type": "uint256" } ], - "name": "SetProfitSharingFeePerc", - "type": "event" + "name": "setProfitSharingFeePerc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "from", + "name": "_strategist", "type": "address" - }, + } + ], + "name": "setStrategist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "indexed": true, "internalType": "address", - "name": "to", + "name": "_treasuryWallet", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" } ], - "name": "Transfer", - "type": "event" + "name": "setTreasuryWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "fees", - "type": "uint256" + "internalType": "uint256[]", + "name": "_weights", + "type": "uint256[]" } ], - "name": "TransferredOutFees", - "type": "event" + "name": "setWeights", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "inputs": [], + "name": "strategist", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "tokenWithdraw", + "name": "", "type": "address" - }, + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "strategy", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "caller", + "internalType": "contract IStrategy", + "name": "", "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenFrom", + "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "amtWithdraw", + "name": "_tokenTo", "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "sharesBurn", + "name": "_amount", "type": "uint256" } ], - "name": "Withdraw", - "type": "event" + "name": "swapTokenWithinVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { "inputs": [], - "name": "LOCKTIME", + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "tokens", "outputs": [ + { + "internalType": "contract IERC20", + "name": "token", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "decimals", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "percKeepInVault", "type": "uint256" } ], @@ -17284,12 +21071,12 @@ const elonApeVaultContract = [ }, { "inputs": [], - "name": "admin", + "name": "totalSupply", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", @@ -17299,31 +21086,36 @@ const elonApeVaultContract = [ "inputs": [ { "internalType": "address", - "name": "owner", + "name": "recipient", "type": "address" }, { - "internalType": "address", - "name": "spender", - "type": "address" + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "allowance", + "name": "transfer", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "spender", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", "type": "address" }, { @@ -17332,7 +21124,7 @@ const elonApeVaultContract = [ "type": "uint256" } ], - "name": "approve", + "name": "transferFrom", "outputs": [ { "internalType": "bool", @@ -17343,33 +21135,34 @@ const elonApeVaultContract = [ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "transferOutNetworkFees", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { "internalType": "address", - "name": "account", + "name": "newOwner", "type": "address" } ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "canSetPendingStrategy", + "name": "treasuryWallet", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], "stateMutability": "view", @@ -17377,7 +21170,7 @@ const elonApeVaultContract = [ }, { "inputs": [], - "name": "communityWallet", + "name": "trustedForwarder", "outputs": [ { "internalType": "address", @@ -17390,7 +21183,14 @@ const elonApeVaultContract = [ }, { "inputs": [], - "name": "customNetworkFeePerc", + "name": "unlockMigrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unlockTime", "outputs": [ { "internalType": "uint256", @@ -17403,52 +21203,217 @@ const elonApeVaultContract = [ }, { "inputs": [], - "name": "customNetworkFeeTier", + "name": "versionRecipient", "outputs": [ { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_tokenIndex", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; + +const cubanApeStrategyContract = [ + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_weights", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "AmtToInvest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "indexed": false, "internalType": "uint256", "name": "", "type": "uint256" } ], - "stateMutability": "view", + "name": "CurrentComposition", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "TargetComposition", + "type": "event" + }, + { + "inputs": [], + "name": "approveMigrate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "decimals", + "name": "getFarmsPool", "outputs": [ { - "internalType": "uint8", + "internalType": "uint256[]", "name": "", - "type": "uint8" + "type": "uint256[]" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", + "inputs": [], + "name": "getTotalPoolInUSD", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -17457,57 +21422,65 @@ const elonApeVaultContract = [ "internalType": "uint256", "name": "_amount", "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_tokenIndex", - "type": "uint256" } ], - "name": "deposit", + "name": "invest", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "emergencyWithdraw", - "outputs": [], - "stateMutability": "nonpayable", + "name": "isVesting", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "getAllPoolInUSD", + "name": "owner", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "reinvest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { - "internalType": "address", - "name": "spender", - "type": "address" + "internalType": "uint256", + "name": "_amount", + "type": "uint256" }, { "internalType": "uint256", - "name": "addedValue", + "name": "_farmIndex", "type": "uint256" } ], - "name": "increaseAllowance", + "name": "releaseETHToVault", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "stateMutability": "nonpayable", @@ -17515,7 +21488,7 @@ const elonApeVaultContract = [ }, { "inputs": [], - "name": "invest", + "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -17524,36 +21497,49 @@ const elonApeVaultContract = [ "inputs": [ { "internalType": "address", - "name": "forwarder", + "name": "_vault", "type": "address" } ], - "name": "isTrustedForwarder", - "outputs": [ + "name": "setVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint256[]", + "name": "_weights", + "type": "uint256[]" } ], - "stateMutability": "view", + "name": "setWeights", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "migrateFunds", + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "name", + "name": "vault", "outputs": [ { - "internalType": "string", + "internalType": "address", "name": "", - "type": "string" + "type": "address" } ], "stateMutability": "view", @@ -17567,7 +21553,7 @@ const elonApeVaultContract = [ "type": "uint256" } ], - "name": "networkFeePerc", + "name": "weights", "outputs": [ { "internalType": "uint256", @@ -17582,11 +21568,11 @@ const elonApeVaultContract = [ "inputs": [ { "internalType": "uint256", - "name": "", + "name": "_amount", "type": "uint256" } ], - "name": "networkFeeTier2", + "name": "withdraw", "outputs": [ { "internalType": "uint256", @@ -17594,260 +21580,331 @@ const elonApeVaultContract = [ "type": "uint256" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" - }, + } +]; + +const moneyPrinterVaultContract = [ { - "inputs": [], - "name": "owner", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "_strategy", "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingStrategy", - "outputs": [ + }, { "internalType": "address", - "name": "", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_treasuryWallet", + "type": "address" + }, + { + "internalType": "address", + "name": "_communityWallet", + "type": "address" + }, + { + "internalType": "address", + "name": "_strategist", + "type": "address" + }, + { + "internalType": "address", + "name": "_biconomy", "type": "address" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "nonpayable", + "type": "constructor" }, { - "inputs": [], - "name": "profitSharingFeePerc", - "outputs": [ + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "value", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "reinvest", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "Approval", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "_tokenIndex", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" }, { + "indexed": false, "internalType": "uint256", - "name": "_farmIndex", + "name": "amount", "type": "uint256" }, { + "indexed": false, "internalType": "uint256", - "name": "_amount", + "name": "sharesMinted", "type": "uint256" } ], - "name": "retrieveStablecoinsFromStrategy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "Deposit", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "_admin", + "name": "fromStrategy", "type": "address" - } - ], - "name": "setAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + }, { + "indexed": true, "internalType": "address", - "name": "_biconomy", + "name": "newStrategy", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" } - ], - "name": "setBiconomy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + ], + "name": "MigrateFunds", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "_communityWallet", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", "type": "address" } ], - "name": "setCommunityWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "OwnershipTransferred", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "_percentage", - "type": "uint256" + "indexed": false, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" } ], - "name": "setCustomNetworkFeePerc", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "SetAdmin", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "_customNetworkFeeTier", - "type": "uint256" + "indexed": false, + "internalType": "address", + "name": "oldCommunityWallet", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newCommunityWallet", + "type": "address" } ], - "name": "setCustomNetworkFeeTier", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "SetCommunityWallet", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "uint256[]", - "name": "_networkFeePerc", - "type": "uint256[]" + "indexed": false, + "internalType": "address", + "name": "oldStrategy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newStrategy", + "type": "address" } ], - "name": "setNetworkFeePerc", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "SetPendingStrategy", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "uint256[]", - "name": "_networkFeeTier2", - "type": "uint256[]" + "indexed": false, + "internalType": "address", + "name": "oldStrategist", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newStrategist", + "type": "address" } ], - "name": "setNetworkFeeTier2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "SetStrategistWallet", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "_pendingStrategy", + "name": "oldTreasury", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newTreasury", "type": "address" } ], - "name": "setPendingStrategy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "SetTreasuryWallet", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "uint256[]", - "name": "_percentages", - "type": "uint256[]" + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "name": "setPercTokenKeepInVault", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "Transfer", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "_percentage", + "name": "unlockTime", "type": "uint256" } ], - "name": "setProfitSharingFeePerc", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "UnlockMigrateFunds", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "_strategist", + "name": "from", "type": "address" - } - ], - "name": "setStrategist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + }, { + "indexed": true, "internalType": "address", - "name": "_treasuryWallet", + "name": "token", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sharesBurned", + "type": "uint256" } ], - "name": "setTreasuryWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "Withdraw", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "uint256[]", - "name": "_weights", - "type": "uint256[]" + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" } ], - "name": "setWeights", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "Yield", + "type": "event" }, { "inputs": [], - "name": "strategist", + "name": "DAI", "outputs": [ { - "internalType": "address", + "internalType": "contract IERC20", "name": "", "type": "address" } @@ -17857,77 +21914,51 @@ const elonApeVaultContract = [ }, { "inputs": [], - "name": "strategy", + "name": "LOCKTIME", "outputs": [ { - "internalType": "contract IStrategy", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "_tokenFrom", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_tokenTo", - "type": "uint256" - }, + "inputs": [], + "name": "QuickSwapRouter", + "outputs": [ { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" + "internalType": "contract IUniswapV2Router02", + "name": "", + "type": "address" } ], - "name": "swapTokenWithinVault", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "symbol", + "name": "USDC", "outputs": [ { - "internalType": "string", + "internalType": "contract IERC20", "name": "", - "type": "string" + "type": "address" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "tokens", + "inputs": [], + "name": "USDT", "outputs": [ { "internalType": "contract IERC20", - "name": "token", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "decimals", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "percKeepInVault", - "type": "uint256" } ], "stateMutability": "view", @@ -17935,12 +21966,12 @@ const elonApeVaultContract = [ }, { "inputs": [], - "name": "totalSupply", + "name": "admin", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "stateMutability": "view", @@ -17950,36 +21981,31 @@ const elonApeVaultContract = [ "inputs": [ { "internalType": "address", - "name": "recipient", + "name": "owner", "type": "address" }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "internalType": "address", + "name": "spender", + "type": "address" } ], - "name": "transfer", + "name": "allowance", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", + "name": "spender", "type": "address" }, { @@ -17988,7 +22014,7 @@ const elonApeVaultContract = [ "type": "uint256" } ], - "name": "transferFrom", + "name": "approve", "outputs": [ { "internalType": "bool", @@ -17999,34 +22025,33 @@ const elonApeVaultContract = [ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "transferOutNetworkFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { "internalType": "address", - "name": "newOwner", + "name": "account", "type": "address" } ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "treasuryWallet", + "name": "canSetPendingStrategy", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "stateMutability": "view", @@ -18034,7 +22059,7 @@ const elonApeVaultContract = [ }, { "inputs": [], - "name": "trustedForwarder", + "name": "communityWallet", "outputs": [ { "internalType": "address", @@ -18047,14 +22072,20 @@ const elonApeVaultContract = [ }, { "inputs": [], - "name": "unlockMigrateFunds", - "outputs": [], - "stateMutability": "nonpayable", + "name": "customNetworkFeePerc", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "unlockTime", + "name": "customNetworkFeeTier", "outputs": [ { "internalType": "uint256", @@ -18067,171 +22098,195 @@ const elonApeVaultContract = [ }, { "inputs": [], - "name": "versionRecipient", + "name": "decimals", "outputs": [ { - "internalType": "string", + "internalType": "uint8", "name": "", - "type": "string" + "type": "uint8" } ], - "stateMutability": "pure", + "stateMutability": "view", "type": "function" }, { "inputs": [ { - "internalType": "uint256", - "name": "_shares", - "type": "uint256" + "internalType": "address", + "name": "spender", + "type": "address" }, { "internalType": "uint256", - "name": "_tokenIndex", + "name": "subtractedValue", "type": "uint256" } ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -]; - -elonApeStrategyContract = [ - { - "inputs": [ + "name": "decreaseAllowance", + "outputs": [ { - "internalType": "uint256[]", - "name": "_weights", - "type": "uint256[]" + "internalType": "bool", + "name": "", + "type": "bool" } ], "stateMutability": "nonpayable", - "type": "constructor" + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, "internalType": "uint256", "name": "_amount", "type": "uint256" + }, + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" } ], - "name": "AmtToInvest", - "type": "event" + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "_poolSTSLA", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_poolWBTC", - "type": "uint256" - }, + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "depositedAmount", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "_poolRenDOGE", + "name": "", "type": "uint256" } ], - "name": "CurrentComposition", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", + "internalType": "contract IERC20", + "name": "_token", "type": "address" } ], - "name": "OwnershipTransferred", - "type": "event" + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "inputs": [], + "name": "getValueInPool", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "_poolSTSLA", + "name": "", "type": "uint256" - }, + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "_poolWBTC", - "type": "uint256" + "internalType": "address", + "name": "spender", + "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "_poolRenDOGE", + "name": "addedValue", "type": "uint256" } ], - "name": "TargetComposition", - "type": "event" + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" }, { "inputs": [], - "name": "approveMigrate", - "outputs": [], - "stateMutability": "nonpayable", + "name": "isEmergency", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "emergencyWithdraw", + "inputs": [ + { + "internalType": "address", + "name": "forwarder", + "type": "address" + } + ], + "name": "isTrustedForwarder", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + } + ], + "name": "migrateFunds", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "getFarmsPool", + "name": "name", "outputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", + "internalType": "string", "name": "", - "type": "uint256" + "type": "string" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "getTotalPool", + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeePerc", "outputs": [ { "internalType": "uint256", @@ -18246,33 +22301,29 @@ elonApeStrategyContract = [ "inputs": [ { "internalType": "uint256", - "name": "_amountUSDT", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_amountUSDC", + "name": "", "type": "uint256" - }, + } + ], + "name": "networkFeeTier2", + "outputs": [ { "internalType": "uint256", - "name": "_amountDAI", + "name": "", "type": "uint256" } ], - "name": "invest", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "isVesting", + "name": "owner", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], "stateMutability": "view", @@ -18280,7 +22331,7 @@ elonApeStrategyContract = [ }, { "inputs": [], - "name": "owner", + "name": "pendingStrategy", "outputs": [ { "internalType": "address", @@ -18293,7 +22344,27 @@ elonApeStrategyContract = [ }, { "inputs": [], - "name": "reinvest", + "name": "profitSharingFeePerc", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reInvest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -18301,29 +22372,25 @@ elonApeStrategyContract = [ { "inputs": [ { - "internalType": "uint256", - "name": "_tokenIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_farmIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" + "internalType": "address", + "name": "_newAdmin", + "type": "address" } ], - "name": "releaseStablecoinsToVault", + "name": "setAdmin", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "renounceOwnership", + "inputs": [ + { + "internalType": "address", + "name": "_communityWallet", + "type": "address" + } + ], + "name": "setCommunityWallet", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -18332,11 +22399,11 @@ elonApeStrategyContract = [ "inputs": [ { "internalType": "address", - "name": "_vault", + "name": "_pendingStrategy", "type": "address" } ], - "name": "setVault", + "name": "setPendingStrategy", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -18344,12 +22411,12 @@ elonApeStrategyContract = [ { "inputs": [ { - "internalType": "uint256[]", - "name": "_weights", - "type": "uint256[]" + "internalType": "address", + "name": "_strategist", + "type": "address" } ], - "name": "setWeights", + "name": "setStrategist", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -18358,18 +22425,18 @@ elonApeStrategyContract = [ "inputs": [ { "internalType": "address", - "name": "newOwner", + "name": "_treasuryWallet", "type": "address" } ], - "name": "transferOwnership", + "name": "setTreasuryWallet", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "vault", + "name": "strategist", "outputs": [ { "internalType": "address", @@ -18381,38 +22448,34 @@ elonApeStrategyContract = [ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "strategy", + "outputs": [ { - "internalType": "uint256", + "internalType": "contract IStrategy", "name": "", - "type": "uint256" + "type": "address" } ], - "name": "weights", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", "outputs": [ { - "internalType": "uint256", + "internalType": "string", "name": "", - "type": "uint256" + "type": "string" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_tokenIndex", - "type": "uint256" - } - ], - "name": "withdraw", + "inputs": [], + "name": "totalSupply", "outputs": [ { "internalType": "uint256", @@ -18420,250 +22483,197 @@ elonApeStrategyContract = [ "type": "uint256" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" - } -] - -const daoFaangStonkVaultContract = [ + }, { "inputs": [ { "internalType": "address", - "name": "_treasuryWallet", - "type": "address" - }, - { - "internalType": "address", - "name": "_admin", - "type": "address" - }, - { - "internalType": "address", - "name": "_strategy", - "type": "address" - }, - { - "internalType": "address", - "name": "_biconomy", + "name": "recipient", "type": "address" }, { - "internalType": "address", - "name": "_communityWallet", - "type": "address" - }, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ { - "internalType": "address", - "name": "_strategist", - "type": "address" + "internalType": "bool", + "name": "", + "type": "bool" } ], "stateMutability": "nonpayable", - "type": "constructor" + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "owner", + "name": "sender", "type": "address" }, { - "indexed": true, "internalType": "address", - "name": "spender", + "name": "recipient", "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "value", + "name": "amount", "type": "uint256" } ], - "name": "Approval", - "type": "event" + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, "internalType": "address", - "name": "token", + "name": "newOwner", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "sharesMinted", - "type": "uint256" } ], - "name": "Deposit", - "type": "event" + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "inputs": [], + "name": "treasuryWallet", + "outputs": [ { - "indexed": false, "internalType": "address", - "name": "admin", + "name": "", "type": "address" } ], - "name": "EmergencyWithdraw", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, + "inputs": [], + "name": "trustedForwarder", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "", "type": "address" } ], - "name": "OwnershipTransferred", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, + "inputs": [], + "name": "unlockMigrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unlockTime", + "outputs": [ { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "SetAdmin", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "inputs": [], + "name": "versionRecipient", + "outputs": [ { - "indexed": false, - "internalType": "address", - "name": "biconomy", - "type": "address" + "internalType": "string", + "name": "", + "type": "string" } ], - "name": "SetBiconomy", - "type": "event" + "stateMutability": "pure", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "oldCommunityWallet", - "type": "address" + "internalType": "uint256", + "name": "_shares", + "type": "uint256" }, { - "indexed": false, - "internalType": "address", - "name": "newcommunityWallet", + "internalType": "contract IERC20", + "name": "_token", "type": "address" } ], - "name": "SetCommunityWallet", - "type": "event" + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "inputs": [], + "name": "yield", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +]; + +const moneyPrinterStrategyContract = [ + { "inputs": [ { - "indexed": false, "internalType": "address", - "name": "newStrategy", + "name": "_strategy", "type": "address" - } - ], - "name": "SetPendingStrategy", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + }, { - "indexed": false, "internalType": "address", - "name": "oldStrategistWallet", + "name": "_admin", "type": "address" }, { - "indexed": false, "internalType": "address", - "name": "newStrategistWallet", + "name": "_treasuryWallet", "type": "address" - } - ], - "name": "SetStrategistWallet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + }, { - "indexed": false, "internalType": "address", - "name": "oldTreasury", + "name": "_communityWallet", "type": "address" }, { - "indexed": false, "internalType": "address", - "name": "newTreasury", + "name": "_strategist", "type": "address" - } - ], - "name": "SetTreasuryWallet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + }, { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" + "internalType": "address", + "name": "_biconomy", + "type": "address" } ], - "name": "SetWithdrawlFee", - "type": "event" + "stateMutability": "nonpayable", + "type": "constructor" }, { "anonymous": false, @@ -18671,13 +22681,13 @@ const daoFaangStonkVaultContract = [ { "indexed": true, "internalType": "address", - "name": "from", + "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "to", + "name": "spender", "type": "address" }, { @@ -18687,20 +22697,7 @@ const daoFaangStonkVaultContract = [ "type": "uint256" } ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "unlockTime", - "type": "uint256" - } - ], - "name": "UnlockMigrateFunds", + "name": "Approval", "type": "event" }, { @@ -18727,16 +22724,22 @@ const daoFaangStonkVaultContract = [ { "indexed": false, "internalType": "uint256", - "name": "sharesBurned", + "name": "sharesMinted", "type": "uint256" } ], - "name": "Withdraw", + "name": "Deposit", "type": "event" }, { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "fromStrategy", + "type": "address" + }, { "indexed": true, "internalType": "address", @@ -18750,296 +22753,221 @@ const daoFaangStonkVaultContract = [ "type": "uint256" } ], - "name": "migrateFunds", + "name": "MigrateFunds", "type": "event" }, { - "inputs": [], - "name": "DAI", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOCKTIME", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "Router", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "contract IUniswapV2Router02", - "name": "", + "indexed": true, + "internalType": "address", + "name": "previousOwner", "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "USDC", - "outputs": [ + }, { - "internalType": "contract IERC20", - "name": "", + "indexed": true, + "internalType": "address", + "name": "newOwner", "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "OwnershipTransferred", + "type": "event" }, { - "inputs": [], - "name": "USDT", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "contract IERC20", - "name": "", + "indexed": false, + "internalType": "address", + "name": "oldAdmin", "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ + }, { + "indexed": false, "internalType": "address", - "name": "", + "name": "newAdmin", "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "SetAdmin", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "owner", + "name": "oldCommunityWallet", "type": "address" }, { + "indexed": false, "internalType": "address", - "name": "spender", + "name": "newCommunityWallet", "type": "address" } ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + "name": "SetCommunityWallet", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "spender", + "name": "oldStrategy", "type": "address" }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": false, + "internalType": "address", + "name": "newStrategy", + "type": "address" } ], - "stateMutability": "nonpayable", - "type": "function" + "name": "SetPendingStrategy", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "account", + "name": "oldStrategist", "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": false, + "internalType": "address", + "name": "newStrategist", + "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "SetStrategistWallet", + "type": "event" }, { - "inputs": [], - "name": "canSetPendingStrategy", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "communityWallet", - "outputs": [ + "indexed": false, + "internalType": "address", + "name": "oldTreasury", + "type": "address" + }, { + "indexed": false, "internalType": "address", - "name": "", + "name": "newTreasury", "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "SetTreasuryWallet", + "type": "event" }, { - "inputs": [], - "name": "customNetworkFeePerc", - "outputs": [ + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "value", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "name": "Transfer", + "type": "event" }, { - "inputs": [], - "name": "customNetworkFeeTier", - "outputs": [ + "anonymous": false, + "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "unlockTime", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" + "name": "UnlockMigrateFunds", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "spender", + "name": "from", "type": "address" }, { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, { + "indexed": false, "internalType": "uint256", - "name": "_amount", + "name": "amount", "type": "uint256" }, { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "sharesBurned", + "type": "uint256" } ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "Withdraw", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "depositedAmount", - "outputs": [ - { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "timestamp", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "name": "Yield", + "type": "event" }, { - "inputs": [ + "inputs": [], + "name": "DAI", + "outputs": [ { "internalType": "contract IERC20", - "name": "_token", + "name": "", "type": "address" } ], - "name": "emergencyWithdraw", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "fee", + "name": "LOCKTIME", "outputs": [ { "internalType": "uint256", @@ -19052,75 +22980,51 @@ const daoFaangStonkVaultContract = [ }, { "inputs": [], - "name": "getTotalValueInPool", + "name": "QuickSwapRouter", "outputs": [ { - "internalType": "uint256", + "internalType": "contract IUniswapV2Router02", "name": "", - "type": "uint256" + "type": "address" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", + "inputs": [], + "name": "USDC", "outputs": [ { - "internalType": "bool", + "internalType": "contract IERC20", "name": "", - "type": "bool" + "type": "address" } ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "invest", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "isEmergency", + "name": "USDT", "outputs": [ { - "internalType": "bool", + "internalType": "contract IERC20", "name": "", - "type": "bool" + "type": "address" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "forwarder", - "type": "address" - } - ], - "name": "isTrustedForwarder", + "inputs": [], + "name": "admin", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], "stateMutability": "view", @@ -19129,24 +23033,22 @@ const daoFaangStonkVaultContract = [ { "inputs": [ { - "internalType": "contract IERC20", - "name": "_token", + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", "type": "address" } ], - "name": "migrateFund", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", + "name": "allowance", "outputs": [ { - "internalType": "string", + "internalType": "uint256", "name": "", - "type": "string" + "type": "uint256" } ], "stateMutability": "view", @@ -19154,32 +23056,37 @@ const daoFaangStonkVaultContract = [ }, { "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" } ], - "name": "networkFeePerc", + "name": "approve", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "account", + "type": "address" } ], - "name": "networkFeeTier2", + "name": "balanceOf", "outputs": [ { "internalType": "uint256", @@ -19192,12 +23099,12 @@ const daoFaangStonkVaultContract = [ }, { "inputs": [], - "name": "owner", + "name": "canSetPendingStrategy", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "stateMutability": "view", @@ -19205,7 +23112,7 @@ const daoFaangStonkVaultContract = [ }, { "inputs": [], - "name": "pendingStrategy", + "name": "communityWallet", "outputs": [ { "internalType": "address", @@ -19218,7 +23125,7 @@ const daoFaangStonkVaultContract = [ }, { "inputs": [], - "name": "profitSharingFeePerc", + "name": "customNetworkFeePerc", "outputs": [ { "internalType": "uint256", @@ -19231,116 +23138,51 @@ const daoFaangStonkVaultContract = [ }, { "inputs": [], - "name": "reInvest", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newAdmin", - "type": "address" - } - ], - "name": "setAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_daiPercentage", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_usdcPercentage", - "type": "uint256" - }, + "name": "customNetworkFeeTier", + "outputs": [ { "internalType": "uint256", - "name": "usdtPercentage", + "name": "", "type": "uint256" } ], - "name": "setAmountToKeepInVaultPerc", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_biconomy", - "type": "address" - } - ], - "name": "setBiconomy", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "decimals", + "outputs": [ { - "internalType": "address", - "name": "_newCommunityWallet", - "type": "address" + "internalType": "uint8", + "name": "", + "type": "uint8" } ], - "name": "setCommunityWallet", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "_strategy", + "name": "spender", "type": "address" - } - ], - "name": "setPendingStrategy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + }, { - "internalType": "address", - "name": "_strategist", - "type": "address" + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" } ], - "name": "setStrategistWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "name": "decreaseAllowance", + "outputs": [ { - "internalType": "address", - "name": "_newTreasury", - "type": "address" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "setTreasuryWallet", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -19348,57 +23190,55 @@ const daoFaangStonkVaultContract = [ "inputs": [ { "internalType": "uint256", - "name": "_fee", + "name": "_amount", "type": "uint256" + }, + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" } ], - "name": "setWithdrawalFee", + "name": "deposit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "strategist", - "outputs": [ + "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "strategy", + "name": "depositedAmount", "outputs": [ { - "internalType": "contract IStrategy", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "symbol", - "outputs": [ + "inputs": [ { - "internalType": "string", - "name": "", - "type": "string" + "internalType": "contract IERC20", + "name": "_token", + "type": "address" } ], - "stateMutability": "view", + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "totalSupply", + "name": "getValueInPool", "outputs": [ { "internalType": "uint256", @@ -19413,16 +23253,16 @@ const daoFaangStonkVaultContract = [ "inputs": [ { "internalType": "address", - "name": "recipient", + "name": "spender", "type": "address" }, { "internalType": "uint256", - "name": "amount", + "name": "addedValue", "type": "uint256" } ], - "name": "transfer", + "name": "increaseAllowance", "outputs": [ { "internalType": "bool", @@ -19434,24 +23274,27 @@ const daoFaangStonkVaultContract = [ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "isEmergency", + "outputs": [ { - "internalType": "address", - "name": "sender", - "type": "address" - }, + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ { "internalType": "address", - "name": "recipient", + "name": "forwarder", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "transferFrom", + "name": "isTrustedForwarder", "outputs": [ { "internalType": "bool", @@ -19459,63 +23302,81 @@ const daoFaangStonkVaultContract = [ "type": "bool" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { - "internalType": "address", - "name": "newOwner", + "internalType": "contract IERC20", + "name": "_token", "type": "address" } ], - "name": "transferOwnership", + "name": "migrateFunds", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "treasuryWallet", + "name": "name", "outputs": [ { - "internalType": "address", + "internalType": "string", "name": "", - "type": "address" + "type": "string" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "trustedForwarder", + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeePerc", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "unlockMigrateFunds", - "outputs": [], - "stateMutability": "nonpayable", + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "networkFeeTier2", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "unlockTime", + "name": "owner", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "stateMutability": "view", @@ -19523,156 +23384,115 @@ const daoFaangStonkVaultContract = [ }, { "inputs": [], - "name": "versionRecipient", + "name": "pendingStrategy", "outputs": [ { - "internalType": "string", + "internalType": "address", "name": "", - "type": "string" + "type": "address" } ], - "stateMutability": "pure", + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "profitSharingFeePerc", + "outputs": [ { "internalType": "uint256", - "name": "_shares", + "name": "", "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" } ], - "name": "withdraw", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reInvest", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "yield", + "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" - } -]; - -const daoFaangStonkStrategyContract =[ + }, { "inputs": [ { "internalType": "address", - "name": "_treasuryWallet", - "type": "address" - }, - { - "internalType": "address", - "name": "_mirustPool", + "name": "_newAdmin", "type": "address" - }, - { - "internalType": "uint256[]", - "name": "weights", - "type": "uint256[]" - }, - { - "internalType": "contract IERC20[]", - "name": "mAssetsTokens", - "type": "address[]" - }, - { - "internalType": "contract ILPPool[]", - "name": "lpPools", - "type": "address[]" - }, - { - "internalType": "contract IERC20[]", - "name": "lpTokens", - "type": "address[]" } ], + "name": "setAdmin", + "outputs": [], "stateMutability": "nonpayable", - "type": "constructor" + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "_communityWallet", "type": "address" } ], - "name": "OwnershipTransferred", - "type": "event" + "name": "setCommunityWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { "inputs": [ { - "internalType": "contract IERC20", - "name": "", + "internalType": "address", + "name": "_pendingStrategy", "type": "address" } ], - "name": "amountInPool", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", + "name": "setPendingStrategy", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "curveFi", - "outputs": [ + "inputs": [ { - "internalType": "contract ICurveFi", - "name": "", + "internalType": "address", + "name": "_strategist", "type": "address" } ], - "stateMutability": "view", + "name": "setStrategist", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "_token", + "internalType": "address", + "name": "_treasuryWallet", "type": "address" } ], - "name": "deposit", + "name": "setTreasuryWallet", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "factory", + "name": "strategist", "outputs": [ { - "internalType": "contract IUniswapV2Factory", + "internalType": "address", "name": "", "type": "address" } @@ -19682,56 +23502,12 @@ const daoFaangStonkStrategyContract =[ }, { "inputs": [], - "name": "getTotalValueInPool", + "name": "strategy", "outputs": [ { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", + "internalType": "contract IStrategy", "name": "", - "type": "uint256" - } - ], - "name": "mAssets", - "outputs": [ - { - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "mAssetToken", - "type": "address" - }, - { - "internalType": "contract ILPPool", - "name": "lpPool", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "lpToken", "type": "address" - }, - { - "internalType": "uint256", - "name": "amountOfATotal", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOfBTotal", - "type": "uint256" } ], "stateMutability": "view", @@ -19739,26 +23515,20 @@ const daoFaangStonkStrategyContract =[ }, { "inputs": [], - "name": "owner", + "name": "symbol", "outputs": [ { - "internalType": "address", + "internalType": "string", "name": "", - "type": "address" + "type": "string" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "contract ILPPool", - "name": "", - "type": "address" - } - ], - "name": "poolStakedMIRLPToken", + "inputs": [], + "name": "totalSupply", "outputs": [ { "internalType": "uint256", @@ -19772,46 +23542,53 @@ const daoFaangStonkStrategyContract =[ { "inputs": [ { - "internalType": "uint256[]", - "name": "weights", - "type": "uint256[]" + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "reBalance", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "router", + "name": "transfer", "outputs": [ { - "internalType": "contract IUniswapV2Router02", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "_vault", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "setVault", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -19842,14 +23619,28 @@ const daoFaangStonkStrategyContract =[ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "trustedForwarder", + "outputs": [ { - "internalType": "contract IERC20", + "internalType": "address", "name": "", "type": "address" } ], - "name": "userTotalLPToken", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unlockMigrateFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unlockTime", "outputs": [ { "internalType": "uint256", @@ -19862,22 +23653,22 @@ const daoFaangStonkStrategyContract =[ }, { "inputs": [], - "name": "vault", + "name": "versionRecipient", "outputs": [ { - "internalType": "address", + "internalType": "string", "name": "", - "type": "address" + "type": "string" } ], - "stateMutability": "view", + "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "uint256", - "name": "_amount", + "name": "_shares", "type": "uint256" }, { @@ -19891,19 +23682,6 @@ const daoFaangStonkStrategyContract =[ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_tokenToConvert", - "type": "address" - } - ], - "name": "withdrawAllFunds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "yield", @@ -19935,6 +23713,8 @@ module.exports = { cUSDTContract, cDAIContract, cUSDCContract, + xDVDABIContract, + DVDABIContract, xDVGABIContract, DVGABIContract, daoStakeContract, @@ -19945,8 +23725,13 @@ module.exports = { hfStrategyContract, hfVaultContract, eacAggregatoorProxyContract, + polygonEacAggregatoorProxyContract, elonApeVaultContract, elonApeStrategyContract, daoFaangStonkVaultContract, - daoFaangStonkStrategyContract + daoFaangStonkStrategyContract, + cubanApeVaultContract, + cubanApeStrategyContract, + moneyPrinterVaultContract, + moneyPrinterStrategyContract, }; diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 5aae864..aa8b0ba 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -345,9 +345,9 @@ const mainContracts = { tokenId: ["tether", "usd-coin", "dai"], }, daoSTO: { - address: "0x742a85daf742ca0213b06fdae449434e0448691e", + address: "0x9ee54014e1e6cf10fd7e9290fdb6101fd0d5d416", abi: abi.daoFaangStonkVaultContract, - strategyAddress: "0x7f1cffb0e0a7351a72ef53cb51796221e2bac3a5", + strategyAddress: "0x4a73dd597b8257e651ef12fd04a91a8819c89416", strategyABI: abi.daoFaangStonkStrategyContract, contractType: "daoFaang", tokenId: ["tether", "usd-coin", "dai"], diff --git a/services/vaults/apy/save/vaults.js b/services/vaults/apy/save/vaults.js index 909b54f..f529f9b 100644 --- a/services/vaults/apy/save/vaults.js +++ b/services/vaults/apy/save/vaults.js @@ -480,7 +480,7 @@ const mainVaults = [ description: "DAO Vault Stonks for 3 stablecoins", vaultSymbol: "daoSTO", erc20address: ["0xdAC17F958D2ee523a2206206994597C13D831ec7", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "0x6b175474e89094c44da98b954eedeac495271d0f"], - vaultContractAddress: "0x742a85daf742ca0213b06fdae449434e0448691e", + vaultContractAddress: "0x9ee54014e1e6cf10fd7e9290fdb6101fd0d5d416", vaultContractABI: abi.daoFaangStonkVaultContract, balance: 0, vaultBalance: 0, @@ -489,7 +489,7 @@ const mainVaults = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 12766399, + lastMeasurement: 12932754, measurement: 1e18, price_id: ["tether", "usd-coin", "dai"], isFaang: true, From 5ae59472a8c9abb76a0c6175ac15cbc97bfe76c9 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Sat, 31 Jul 2021 20:09:40 +0800 Subject: [PATCH 215/254] Enable DaoSTO --- services/vaults/performance/handler.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js index 948bf94..f98ca0e 100644 --- a/services/vaults/performance/handler.js +++ b/services/vaults/performance/handler.js @@ -41,8 +41,7 @@ if (process.env.PRODUCTION != "") { } // const ETF_STRATEGIES = ["daoCDV", "daoSTO", "daoELO"]; -// const ETF_STRATEGIES = ["daoCDV", "daoSTO"]; -const ETF_STRATEGIES = ["daoCDV"]; +const ETF_STRATEGIES = ["daoCDV", "daoSTO"]; const aggregatorV3InterfaceABI = require("./AggregatorABI.json"); From d515d894f35308378a814b28851d0644c0199587 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Sat, 31 Jul 2021 21:13:57 +0800 Subject: [PATCH 216/254] merged live --- services/vaults/performance/handler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js index f98ca0e..0455241 100644 --- a/services/vaults/performance/handler.js +++ b/services/vaults/performance/handler.js @@ -78,7 +78,7 @@ function getInceptionBlock(farmer) { if (process.env.PRODUCTION != "") { const farmers = { daoCDV: 12586420, - daoSTO: 12766399, + daoSTO: 12932754, daoELO: 12722655, daoCUB: 12799447, }; From 00772801789502eb3394b31eae86515d6ab1ffbd Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Sat, 31 Jul 2021 22:29:26 +0800 Subject: [PATCH 217/254] bug fixes --- services/vaults/performance/handler.js | 168 +++++++++++++------------ 1 file changed, 89 insertions(+), 79 deletions(-) diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js index 0455241..295bd35 100644 --- a/services/vaults/performance/handler.js +++ b/services/vaults/performance/handler.js @@ -406,92 +406,102 @@ module.exports.pnlHandle = async (req, res) => { }; module.exports.performanceHandle = async (req, res) => { - if ( - req.params.days !== "30d" && - req.params.days !== "7d" && - req.params.days !== "1d" && - req.params.days !== undefined - ) { - res.status(200).json({ - message: "Days should be 30d, 7d, 1d or empty (all).", - body: null, - }); - return; - } - // check if vault param is input - if (req.params.farmer === null || req.params.farmer === "") { - res.status(200).json({ - message: "Vault input is empty", - body: null, - }); - return; - } - - let startTime = -1; - let collection = ""; - let result; - - switch (req.params.farmer) { - case historicalDb.daoCDVFarmer: - collection = historicalDb.daoCDVFarmer; - break; - // case historicalDb.daoELOFarmer: - // collection = historicalDb.daoELOFarmer; - // break; - case historicalDb.daoSTOFarmer: - collection = historicalDb.daoSTOFarmer; - break; - default: + try { + if ( + req.params.days !== "30d" && + req.params.days !== "7d" && + req.params.days !== "1d" && + req.params.days !== undefined + ) { res.status(200).json({ - message: "Invalid Farmer", + message: "Days should be 30d, 7d, 1d or empty (all).", body: null, }); return; - } - - switch (req.params.days) { - case "30d": - startTime = moment().subtract(30, "days").unix(); - break; - case "7d": - startTime = moment().subtract(7, "days").unix(); - break; - case "1d": - startTime = moment().subtract(1, "days").unix(); - break; - } - - if (startTime == -1) { - result = await historicalDb.findAll(collection); - } else { - result = await historicalDb.findPerformanceWithTimePeriods( - collection, - startTime - ); - - const basePrice = result[0]["lp_token_price_usd"]; - const btcBasePrice = result[0]["btc_price"]; - const ethBasePrice = result[0]["eth_price"]; - result.forEach((data) => { - data["lp_performance"] = calculatePerformance( - basePrice, - data["lp_token_price_usd"] - ); - data["btc_performance"] = calculatePerformance( - btcBasePrice, - data["btc_price"] - ); - data["eth_performance"] = calculatePerformance( - ethBasePrice, - data["eth_price"] + } + // check if vault param is input + if (req.params.farmer === null || req.params.farmer === "") { + res.status(200).json({ + message: "Vault input is empty", + body: null, + }); + return; + } + + let startTime = -1; + let collection = ""; + let result; + + switch (req.params.farmer) { + case historicalDb.daoCDVFarmer: + collection = historicalDb.daoCDVFarmer; + break; + // case historicalDb.daoELOFarmer: + // collection = historicalDb.daoELOFarmer; + // break; + case historicalDb.daoSTOFarmer: + collection = historicalDb.daoSTOFarmer; + break; + default: + res.status(200).json({ + message: "Invalid Farmer", + body: null, + }); + return; + } + + switch (req.params.days) { + case "30d": + startTime = moment().subtract(30, "days").unix(); + break; + case "7d": + startTime = moment().subtract(7, "days").unix(); + break; + case "1d": + startTime = moment().subtract(1, "days").unix(); + break; + } + + if (startTime == -1) { + result = await historicalDb.findAll(collection); + } else { + result = await historicalDb.findPerformanceWithTimePeriods( + collection, + startTime ); - }); - } - - if (result) { + + if (result != null && result.length > 0) { + const basePrice = result[0]["lp_token_price_usd"]; + const btcBasePrice = result[0]["btc_price"]; + const ethBasePrice = result[0]["eth_price"]; + result.forEach((data) => { + data["lp_performance"] = calculatePerformance( + basePrice, + data["lp_token_price_usd"] + ); + data["btc_performance"] = calculatePerformance( + btcBasePrice, + data["btc_price"] + ); + data["eth_performance"] = calculatePerformance( + ethBasePrice, + data["eth_price"] + ); + }); + } + } + + if (result) { + res.status(200).json({ + message: `Performance Data for ${req.params.farmer}`, + body: result, + }); + } + } catch (err) { res.status(200).json({ message: `Performance Data for ${req.params.farmer}`, - body: result, + body: null, + error: err }); } }; From 1a1de7430cd90a8080309299cf50e66c09c40d85 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Sat, 31 Jul 2021 22:42:49 +0800 Subject: [PATCH 218/254] bug fixes --- services/vaults/performance/handler.js | 154 +++++++++++++------------ 1 file changed, 81 insertions(+), 73 deletions(-) diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js index 295bd35..fbcee96 100644 --- a/services/vaults/performance/handler.js +++ b/services/vaults/performance/handler.js @@ -318,89 +318,97 @@ module.exports.savePerformance = async (event) => { // Return just PNL of timeframe module.exports.pnlHandle = async (req, res) => { - if ( - req.params.days !== "30d" && - req.params.days !== "7d" && - req.params.days !== "1d" && - req.params.days !== undefined - ) { - res.status(200).json({ - message: "Days should be 30d, 7d, 1d or empty (all).", - body: null, - }); - return; - } - // check if vault param is input - if (req.params.farmer === null || req.params.farmer === "") { - res.status(200).json({ - message: "Vault input is empty", - body: null, - }); - return; - } - - let startTime = -1; - let collection = ""; - let result; - let pnl; - let lastDataIndex; - - switch (req.params.farmer) { - case historicalDb.daoCDVFarmer: - collection = historicalDb.daoCDVFarmer; - break; - // case historicalDb.daoELOFarmer: - // collection = historicalDb.daoELOFarmer; - // break; - case historicalDb.daoSTOFarmer: - collection = historicalDb.daoSTOFarmer; - break; - default: + try { + if ( + req.params.days !== "30d" && + req.params.days !== "7d" && + req.params.days !== "1d" && + req.params.days !== undefined + ) { res.status(200).json({ - message: "Invalid Farmer", + message: "Days should be 30d, 7d, 1d or empty (all).", body: null, }); return; - } - - switch (req.params.days) { - case "30d": - startTime = moment().subtract(30, "days").unix(); - break; - case "7d": - startTime = moment().subtract(7, "days").unix(); - break; - case "1d": - startTime = moment().subtract(1, "days").unix(); - break; - } - - if (startTime == -1) { - result = await historicalDb.findAll(collection); - lastDataIndex = result.length - 1; + } + // check if vault param is input + if (req.params.farmer === null || req.params.farmer === "") { + res.status(200).json({ + message: "Vault input is empty", + body: null, + }); + return; + } + + let startTime = -1; + let collection = ""; + let result; + let pnl; + let lastDataIndex; + + switch (req.params.farmer) { + case historicalDb.daoCDVFarmer: + collection = historicalDb.daoCDVFarmer; + break; + // case historicalDb.daoELOFarmer: + // collection = historicalDb.daoELOFarmer; + // break; + case historicalDb.daoSTOFarmer: + collection = historicalDb.daoSTOFarmer; + break; + default: + res.status(200).json({ + message: "Invalid Farmer", + body: null, + }); + return; + } + + switch (req.params.days) { + case "30d": + startTime = moment().subtract(30, "days").unix(); + break; + case "7d": + startTime = moment().subtract(7, "days").unix(); + break; + case "1d": + startTime = moment().subtract(1, "days").unix(); + break; + } + + if (startTime == -1) { + result = await historicalDb.findAll(collection); + lastDataIndex = result.length - 1; + + return res.status(200).json({ + message: `Performance Data for ${req.params.farmer}`, + body: result[lastDataIndex]["lp_performance"], + }); + } else { + result = await historicalDb.findPerformanceWithTimePeriods( + collection, + startTime + ); + } + + if (result && result.length > 0) { + const basePrice = result[0]["lp_token_price_usd"]; + lastDataIndex = result.length - 1; + pnl = calculatePerformance( + basePrice, + result[lastDataIndex]["lp_token_price_usd"] + ); + console.log("🚀 | module.exports.pnlHandle= | pnl", pnl); + } return res.status(200).json({ message: `Performance Data for ${req.params.farmer}`, - body: result[lastDataIndex]["lp_performance"], + body: result, }); - } else { - result = await historicalDb.findPerformanceWithTimePeriods( - collection, - startTime - ); - } - - if (result) { - const basePrice = result[0]["lp_token_price_usd"]; - lastDataIndex = result.length - 1; - pnl = calculatePerformance( - basePrice, - result[lastDataIndex]["lp_token_price_usd"] - ); - console.log("🚀 | module.exports.pnlHandle= | pnl", pnl); + } catch (error) { return res.status(200).json({ message: `Performance Data for ${req.params.farmer}`, - body: pnl, + body: null, }); } }; From 848f1a91192fb31beecf2a240f4602155bb98118 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Sat, 31 Jul 2021 22:48:38 +0800 Subject: [PATCH 219/254] bug fixes --- services/vaults/performance/handler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js index fbcee96..db4cbeb 100644 --- a/services/vaults/performance/handler.js +++ b/services/vaults/performance/handler.js @@ -403,7 +403,7 @@ module.exports.pnlHandle = async (req, res) => { return res.status(200).json({ message: `Performance Data for ${req.params.farmer}`, - body: result, + body: pnl, }); } catch (error) { return res.status(200).json({ From 92d3e6c07ba930f5f7f329b38400bae74e9d493e Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Sat, 31 Jul 2021 22:54:17 +0800 Subject: [PATCH 220/254] bug fixes --- services/vaults/performance/handler.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js index db4cbeb..90375e1 100644 --- a/services/vaults/performance/handler.js +++ b/services/vaults/performance/handler.js @@ -380,10 +380,17 @@ module.exports.pnlHandle = async (req, res) => { result = await historicalDb.findAll(collection); lastDataIndex = result.length - 1; - return res.status(200).json({ - message: `Performance Data for ${req.params.farmer}`, - body: result[lastDataIndex]["lp_performance"], - }); + if (result && result.length > 0) { + return res.status(200).json({ + message: `Performance Data for ${req.params.farmer}`, + body: result[lastDataIndex]["lp_performance"], + }); + } else { + return res.status(200).json({ + message: `Performance Data for ${req.params.farmer}`, + body: 0, + }); + } } else { result = await historicalDb.findPerformanceWithTimePeriods( collection, @@ -408,7 +415,7 @@ module.exports.pnlHandle = async (req, res) => { } catch (error) { return res.status(200).json({ message: `Performance Data for ${req.params.farmer}`, - body: null, + body: 0, }); } }; From 773e1a84ee06880621544910c88d735b8ee8b992 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Sat, 31 Jul 2021 22:56:42 +0800 Subject: [PATCH 221/254] bug fixes --- services/vaults/performance/handler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js index 90375e1..8187643 100644 --- a/services/vaults/performance/handler.js +++ b/services/vaults/performance/handler.js @@ -378,9 +378,9 @@ module.exports.pnlHandle = async (req, res) => { if (startTime == -1) { result = await historicalDb.findAll(collection); - lastDataIndex = result.length - 1; if (result && result.length > 0) { + lastDataIndex = result.length - 1; return res.status(200).json({ message: `Performance Data for ${req.params.farmer}`, body: result[lastDataIndex]["lp_performance"], From b3711ff561949dee5bd1fc2d59ba72eb73f2f874 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Sat, 31 Jul 2021 23:11:33 +0800 Subject: [PATCH 222/254] bug fixes --- services/vaults/performance/handler.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js index 8187643..7a967f6 100644 --- a/services/vaults/performance/handler.js +++ b/services/vaults/performance/handler.js @@ -378,7 +378,6 @@ module.exports.pnlHandle = async (req, res) => { if (startTime == -1) { result = await historicalDb.findAll(collection); - if (result && result.length > 0) { lastDataIndex = result.length - 1; return res.status(200).json({ @@ -406,12 +405,16 @@ module.exports.pnlHandle = async (req, res) => { result[lastDataIndex]["lp_token_price_usd"] ); console.log("🚀 | module.exports.pnlHandle= | pnl", pnl); - } - - return res.status(200).json({ - message: `Performance Data for ${req.params.farmer}`, - body: pnl, - }); + return res.status(200).json({ + message: `Performance Data for ${req.params.farmer}`, + body: pnl, + }); + } else { + return res.status(200).json({ + message: `Performance Data for ${req.params.farmer}`, + body: 0, + }); + } } catch (error) { return res.status(200).json({ message: `Performance Data for ${req.params.farmer}`, From 8a7d974eac44c2a9db71fcf96e29d900bc767c60 Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Sat, 31 Jul 2021 23:24:27 +0800 Subject: [PATCH 223/254] Update Swagger --- swagger.json | 574 ++++++++++++++++++++++++++------------------------- 1 file changed, 297 insertions(+), 277 deletions(-) diff --git a/swagger.json b/swagger.json index d713884..2851f1e 100644 --- a/swagger.json +++ b/swagger.json @@ -1,280 +1,300 @@ { - "swagger": "2.0", - "info": { - "version": "1.0.0", - "title": "DAOventures API", - "description": "DAOventures API documentation" + "swagger": "2.0", + "info": { + "version": "1.0.0", + "title": "DAOventures API", + "description": "DAOventures API documentation" + }, + "basePath": "/api/", + "consumes": ["application/json"], + "produces": ["application/json"], + "paths": { + "/vaults/apy": { + "get": { + "tags": ["Vaults"], + "description": "Vault Information with APY", + "produces": ["application/json"], + "responses": {} + } }, - "basePath": "/api/", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/vaults/apy": { - "get": { - "tags": [ - "Vaults" - ], - "description": "Vault Information with APY", - "produces": [ - "application/json" - ], - "responses": {} - } - }, - "/user/{userAddress}/vaults/statistics": { - "get": { - "tags": [ - "Users" - ], - "description": "Transaction information of the user and vaults", - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "userAddress", - "in": "path", - "description": "User Wallet Address (Lower Case)", - "required": true, - "type": "string" - } - ], - "responses": {} - } - }, - "/user/{userAddress}/vaults/transactions": { - "get": { - "tags": [ - "Users" - ], - "description": "Transaction history of the user", - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "userAddress", - "in": "path", - "description": "User Wallet Address (Lower Case)", - "required": true, - "type": "string" - } - ], - "responses": {} - } - }, - "/vaults/price/{farmer}/{days}": { - "get": { - "tags": [ - "Vaults" - ], - "description": "Price history of the vault", - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "farmer", - "in": "path", - "description": "Vault ID with '_price'", - "required": true, - "type": "string" - }, - { - "name": "days", - "in": "path", - "description": "Number of days. Only available for '30d', '7d', '1d'.", - "required": true, - "type": "string" - } - ], - "responses": {} - } - }, - "/vaults/historical-apy/{contractAddress}/{days}": { - "get": { - "tags": [ - "Vaults" - ], - "description": "APY history of the vaults", - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "contractAddress", - "in": "path", - "description": "Vault Address", - "required": true, - "type": "string" - }, - { - "name": "days", - "in": "path", - "description": "Number of days. Only available for '30d', '7d', '1d'.", - "required": true, - "type": "string" - } - ], - "responses": {} - } - }, - "/vaults/tvl/{farmer}": { - "get": { - "tags": [ - "Vaults" - ], - "description": "TVL of the vault", - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "farmer", - "in": "path", - "description": "Vault ID with '_tvl'", - "required": true, - "type": "string" - } - ], - "responses": {} - } - }, - "/vaults/tvl/total": { - "get": { - "tags": [ - "Vaults" - ], - "description": "Total TVL of all the existing vaults", - "produces": [ - "application/json" - ], - "responses": {} - } - }, - "/vaults/category": { - "get": { - "tags": [ - "Vaults" - ], - "description": "Get All Vault Categories", - "produces": [ - "application/json" - ], - "responses": {} - } - }, - "/staking/get-vip-tokens": { - "get": { - "tags": [ - "Stake" - ], - "description": "vipDVG Token Information", - "produces": [ - "application/json" - ], - "responses": {} - } - }, - "/staking/get-pools": { - "get": { - "tags": [ - "Stake" - ], - "description": "Stake Pools Information", - "produces": [ - "application/json" - ], - "responses": {} - } - }, - "/staking/get-xdvg-stake" :{ - "get": { - "tags": [ - "Stake" - ], - "description": "Get xDVG stake", - "produces": [ - "application/json" - ], - "responses": {} - } - }, - "/event/verify" : { - "get": { - "tags": [ - "Vaults" - ], - "description": "Check if any happy hour event at current time.", - "produces": [ - "application/json" - ], - "responses": {} - } - }, - "/event/verify/{amount}" : { - "get": { - "tags": [ - "Vaults" - ], - "description": "Verify user eligible for special event deposit.", - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "amount", - "in": "path", - "description": "Amount to deposit", - "required": true, - "type": "string" - } - ], - "responses": {} - } - }, - "/staking/emergency-withdraw-snapshot": { - "post": { - "tags": [ - "Stake" - ], - "description": "Stake Pools Emergency Withdrawal Snapshot", - "produces": [ - "application/json" - ], - "consumes": [ - "application/json" - ], - "parameters": [ - { - "in": "body", - "name": "Snap Shot", - "description": "Emergency Withdrawal SnapShot", - "schema": { - "type": "object", - "properties": { - "pid": { - "type": "string", - "description": "Pool ID" - }, - "userAddress": { - "type": "string", - "description": "User Wallet Address" - }, - "pendingDVG": { - "type": "integer", - "description": "Pending DVG Amount" - } - } - } - } - ], - "responses": {} + "/user/{userAddress}/vaults/statistics": { + "get": { + "tags": ["Users"], + "description": "Transaction information of the user and vaults", + "produces": ["application/json"], + "parameters": [ + { + "name": "userAddress", + "in": "path", + "description": "User Wallet Address (Lower Case)", + "required": true, + "type": "string" + } + ], + "responses": {} + } + }, + "/user/{userAddress}/vaults/transactions": { + "get": { + "tags": ["Users"], + "description": "Transaction history of the user", + "produces": ["application/json"], + "parameters": [ + { + "name": "userAddress", + "in": "path", + "description": "User Wallet Address (Lower Case)", + "required": true, + "type": "string" + } + ], + "responses": {} + } + }, + "/vaults/price/{farmer}/{days}": { + "get": { + "tags": ["Vaults"], + "description": "Price history of the vault", + "produces": ["application/json"], + "parameters": [ + { + "name": "farmer", + "in": "path", + "description": "Vault ID with '_price'", + "required": true, + "type": "string" + }, + { + "name": "days", + "in": "path", + "description": "Number of days. Only available for '30d', '7d', '1d'.", + "required": true, + "type": "string" + } + ], + "responses": {} + } + }, + "/vaults/historical-apy/{contractAddress}/{days}": { + "get": { + "tags": ["Vaults"], + "description": "APY history of the vaults", + "produces": ["application/json"], + "parameters": [ + { + "name": "contractAddress", + "in": "path", + "description": "Vault Address", + "required": true, + "type": "string" + }, + { + "name": "days", + "in": "path", + "description": "Number of days. Only available for '30d', '7d', '1d'.", + "required": true, + "type": "string" + } + ], + "responses": {} + } + }, + "/vaults/tvl/{farmer}": { + "get": { + "tags": ["Vaults"], + "description": "TVL of the vault", + "produces": ["application/json"], + "parameters": [ + { + "name": "farmer", + "in": "path", + "description": "Vault ID with '_tvl'", + "required": true, + "type": "string" + } + ], + "responses": {} + } + }, + "/vaults/tvl/total": { + "get": { + "tags": ["Vaults"], + "description": "Total TVL of all the existing vaults", + "produces": ["application/json"], + "responses": {} + } + }, + "/vaults/category": { + "get": { + "tags": ["Vaults"], + "description": "Get All Vault Categories", + "produces": ["application/json"], + "responses": {} + } + }, + "/vaults/performance/{farmer}/{days}": { + "get": { + "tags": ["Vaults"], + "description": "Get All Vault Performance for stated days", + "produces": ["application/json"], + "parameters": [ + { + "name": "farmer", + "in": "path", + "description": "Vault ID with", + "required": true, + "type": "string" + }, + { + "name": "days", + "in": "path", + "description": "Number of days. Only available for '30d', '7d', '1d'.", + "required": true, + "type": "string" + } + ], + "responses": {} + } + }, + "/vaults/performance/{farmer}": { + "get": { + "tags": ["Vaults"], + "description": "Get All Vault Performance from inception", + "produces": ["application/json"], + "parameters": [ + { + "name": "farmer", + "in": "path", + "description": "Vault ID", + "required": true, + "type": "string" + } + ], + "responses": {} + } + }, + "/vaults/pnl/{farmer}/{days}": { + "get": { + "tags": ["Vaults"], + "description": "Get Vault PNL since specified day", + "produces": ["application/json"], + "parameters": [ + { + "name": "farmer", + "in": "path", + "description": "Vault ID with'", + "required": true, + "type": "string" + }, + { + "name": "days", + "in": "path", + "description": "Number of days. Only available for '30d', '7d', '1d'.", + "required": true, + "type": "string" + } + ], + "responses": {} + } + }, + "/vaults/pnl/{farmer}": { + "get": { + "tags": ["Vaults"], + "description": "Get Vault PNL since inception", + "produces": ["application/json"], + "parameters": [ + { + "name": "farmer", + "in": "path", + "description": "Vault ID", + "required": true, + "type": "string" + } + ], + "responses": {} + } + }, + "/staking/get-vip-tokens": { + "get": { + "tags": ["Stake"], + "description": "vipDVG Token Information", + "produces": ["application/json"], + "responses": {} + } + }, + "/staking/get-pools": { + "get": { + "tags": ["Stake"], + "description": "Stake Pools Information", + "produces": ["application/json"], + "responses": {} + } + }, + "/staking/get-xdvg-stake": { + "get": { + "tags": ["Stake"], + "description": "Get xDVG stake", + "produces": ["application/json"], + "responses": {} + } + }, + "/event/verify": { + "get": { + "tags": ["Vaults"], + "description": "Check if any happy hour event at current time.", + "produces": ["application/json"], + "responses": {} + } + }, + "/event/verify/{amount}": { + "get": { + "tags": ["Vaults"], + "description": "Verify user eligible for special event deposit.", + "produces": ["application/json"], + "parameters": [ + { + "name": "amount", + "in": "path", + "description": "Amount to deposit", + "required": true, + "type": "string" + } + ], + "responses": {} + } + }, + "/staking/emergency-withdraw-snapshot": { + "post": { + "tags": ["Stake"], + "description": "Stake Pools Emergency Withdrawal Snapshot", + "produces": ["application/json"], + "consumes": ["application/json"], + "parameters": [ + { + "in": "body", + "name": "Snap Shot", + "description": "Emergency Withdrawal SnapShot", + "schema": { + "type": "object", + "properties": { + "pid": { + "type": "string", + "description": "Pool ID" + }, + "userAddress": { + "type": "string", + "description": "User Wallet Address" + }, + "pendingDVG": { + "type": "integer", + "description": "Pending DVG Amount" + } + } } - } - } -} \ No newline at end of file + } + ], + "responses": {} + } + } + } +} From a3045e154270b6566cc81a4df1f36f9975dbb424 Mon Sep 17 00:00:00 2001 From: Soon Lai <43904148+soonlai814@users.noreply.github.com> Date: Sun, 1 Aug 2021 19:26:59 +0800 Subject: [PATCH 224/254] Update whitelist.js --- services/reimbursement/whitelist.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/reimbursement/whitelist.js b/services/reimbursement/whitelist.js index ae114ec..4c2644c 100644 --- a/services/reimbursement/whitelist.js +++ b/services/reimbursement/whitelist.js @@ -2745,6 +2745,8 @@ const whiteList = [ ['0x73088662aE671E419375CE82788b0E5A6f55e3E6','10000000000000000000000000'], ['0xE5b6D2Bf24Afa66add82ab0d5cc729Ea48358644','10000000000000000000000000'], ['0x8bA6Fb982CB4B6a240065376b944100bCE31b9D6','10000000000000000000000000'], + ['0xe8a90314d1e705246b3c425bc806334d2e7f3565','10000000000000000000000000'], + ['0x54B44041b79021a10e38dcbaEA0AfDcEF1803FFe','10000000000000000000000001'], ]; module.exports = whiteList; From f6f34adab98f0c9e464a375d5d910a578d1afd7c Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Mon, 2 Aug 2021 16:20:59 +0800 Subject: [PATCH 225/254] Fix situation where vault from subgraph cannot match with domain.js --- services/user/vaults/statistics/handler.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/services/user/vaults/statistics/handler.js b/services/user/vaults/statistics/handler.js index 80b6975..cc940f6 100644 --- a/services/user/vaults/statistics/handler.js +++ b/services/user/vaults/statistics/handler.js @@ -92,6 +92,15 @@ const getVaultStatistics = async (contractAddress, transactions, userAddress) => : testContracts; const vault = Object.values(contracts.farmer).find(contract => contract.address.toLowerCase() === contractAddress.toLowerCase()); + + if(!vault) { + // Return empty object, if subgraph's vault address cannot match with domain.js farmer + return { + contractAddress, + message: "No vault found.", + }; + } + const type = vault.contractType; if(vault.network === constant.ETHEREUM) { From cb728832b56afee7235927bdd0f8602f5ad7266b Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Mon, 2 Aug 2021 17:24:57 +0800 Subject: [PATCH 226/254] Fix Performance update --- jobs/task.js | 10 +++--- services/vaults/performance/handler.js | 48 +++++++++++++++----------- 2 files changed, 34 insertions(+), 24 deletions(-) diff --git a/jobs/task.js b/jobs/task.js index fa83fdd..25bfec3 100644 --- a/jobs/task.js +++ b/jobs/task.js @@ -133,13 +133,15 @@ const saveVipApr = async () => { /** Store DAOVIP APR */ const savePerformance = async () => { - console.log("[savePerformance]", new Date().getTime()); - await performanceSave.savePerformance(); + currentDateTime = new Date().getTime(); + console.log("[savePerformance]", currentDateTime); + await performanceSave.savePerformance(null); cron.schedule( "0 0 * * *", async () => { - console.log("[savePerformance]", new Date().getTime()); - await performanceSave.savePerformance(); + currentDateTime = new Date().getTime(); + console.log("[savePerformance]", currentDateTime); + await performanceSave.savePerformance(currentDateTime); }, { scheduled: true, diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js index e006f13..939444a 100644 --- a/services/vaults/performance/handler.js +++ b/services/vaults/performance/handler.js @@ -201,11 +201,19 @@ async function getSearchRange(firstBlock, lastBlock) { return days; } +async function getNextUpdateBlock(dateTime) { + let block = await dater.getDate( + dateTime, // Date, required. Any valid moment.js value: string, milliseconds, Date() object, moment() object. + false // Block after, optional. Search for the nearest block before or after the given date. By default true. + ); + return [block]; +} + async function getUnixTime(block) { return (await provider.getBlock(block)).timestamp; } -async function syncHistoricalPerformance() { +async function syncHistoricalPerformance(dateTime) { // let results = []; // Get latest entry in database @@ -232,20 +240,20 @@ async function syncHistoricalPerformance() { let lpPriceInception = 0; let ethPriceInception = 0; let btcPriceInception = 0; + let latestBlock; + let dates; if (latestEntry.length != 0) { - startBlock = latestEntry[0].block; basePrice = latestEntry[0]["lp_inception_price"]; btcBasePrice = latestEntry[0]["btc_inception_price"]; ethBasePrice = latestEntry[0]["eth_inception_price"]; + dates = await getNextUpdateBlock(dateTime); } else { startBlock = getInceptionBlock(etf); + latestBlock = await provider.getBlockNumber(); + dates = await getSearchRange(startBlock, latestBlock); } - let latestBlock = await provider.getBlockNumber(); - - let dates = await getSearchRange(startBlock, latestBlock); - for (const date of dates) { try { totalSupply = await getTotalSupply(etf, vault, date.block); @@ -299,8 +307,8 @@ async function syncHistoricalPerformance() { } } -module.exports.savePerformance = async (event) => { - await syncHistoricalPerformance(); +module.exports.savePerformance = async (dateTime) => { + await syncHistoricalPerformance(dateTime); }; // module.exports.handler = async (event) => { @@ -339,13 +347,13 @@ module.exports.pnlHandle = async (req, res) => { }); return; } - + let startTime = -1; let collection = ""; let result; let pnl; let lastDataIndex; - + switch (req.params.farmer) { case historicalDb.daoCDVFarmer: collection = historicalDb.daoCDVFarmer; @@ -363,7 +371,7 @@ module.exports.pnlHandle = async (req, res) => { }); return; } - + switch (req.params.days) { case "30d": startTime = moment().subtract(30, "days").unix(); @@ -375,7 +383,7 @@ module.exports.pnlHandle = async (req, res) => { startTime = moment().subtract(1, "days").unix(); break; } - + if (startTime == -1) { result = await historicalDb.findAll(collection); if (result && result.length > 0) { @@ -396,7 +404,7 @@ module.exports.pnlHandle = async (req, res) => { startTime ); } - + if (result && result.length > 0) { const basePrice = result[0]["lp_token_price_usd"]; lastDataIndex = result.length - 1; @@ -445,11 +453,11 @@ module.exports.performanceHandle = async (req, res) => { }); return; } - + let startTime = -1; let collection = ""; let result; - + switch (req.params.farmer) { case historicalDb.daoCDVFarmer: collection = historicalDb.daoCDVFarmer; @@ -467,7 +475,7 @@ module.exports.performanceHandle = async (req, res) => { }); return; } - + switch (req.params.days) { case "30d": startTime = moment().subtract(30, "days").unix(); @@ -479,7 +487,7 @@ module.exports.performanceHandle = async (req, res) => { startTime = moment().subtract(1, "days").unix(); break; } - + if (startTime == -1) { result = await historicalDb.findAll(collection); } else { @@ -487,7 +495,7 @@ module.exports.performanceHandle = async (req, res) => { collection, startTime ); - + if (result != null && result.length > 0) { const basePrice = result[0]["lp_token_price_usd"]; const btcBasePrice = result[0]["btc_price"]; @@ -508,7 +516,7 @@ module.exports.performanceHandle = async (req, res) => { }); } } - + if (result) { res.status(200).json({ message: `Performance Data for ${req.params.farmer}`, @@ -519,7 +527,7 @@ module.exports.performanceHandle = async (req, res) => { res.status(200).json({ message: `Performance Data for ${req.params.farmer}`, body: null, - error: err + error: err, }); } }; From 6cff9c3f740737abb3f20aab2f7e7c87dd730c85 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Mon, 2 Aug 2021 20:41:46 +0800 Subject: [PATCH 227/254] temporary hide money printer --- services/vaults/apy/save/polygon-vault.js | 48 +++++++++++------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/services/vaults/apy/save/polygon-vault.js b/services/vaults/apy/save/polygon-vault.js index c72e5c0..95f0c73 100644 --- a/services/vaults/apy/save/polygon-vault.js +++ b/services/vaults/apy/save/polygon-vault.js @@ -30,30 +30,30 @@ const testVaults = [ ]; const mainVaults = [ - { - id: "daoMPT", - name: "DAO Vault Money Printer", - symbol: ["USDT","USDC","DAI"], - description: "DAO Vault Money Printer for 3 stablecoins", - vaultSymbol: "daoMPT", - erc20address: "0xbd21a10f619be90d6066c941b04e340841f1f989", - vaultContractAddress: "0x7e515e00e2d605d763ffe25fd7b1e00f8fd97a16", - vaultContractABI: abi.moneyPrinterVaultContract, - strategyContractAddress: "0x111de482a01eb87875d18f8c1131fca709b6a646", - strategyABI: abi.moneyPrinterStrategyContract, - balance: 0, - vaultBalance: 0, - decimals: 18, - deposit: true, - depositAll: true, - withdraw: true, - withdrawAll: true, - lastMeasurement: 15970970, - measurement: 1e18, - price_id: ["tether", "usd-coin", "dai"], - isMoneyPrinter: true, - network: constant.POLYGON, - }, + // { + // id: "daoMPT", + // name: "DAO Vault Money Printer", + // symbol: ["USDT","USDC","DAI"], + // description: "DAO Vault Money Printer for 3 stablecoins", + // vaultSymbol: "daoMPT", + // erc20address: "0xbd21a10f619be90d6066c941b04e340841f1f989", + // vaultContractAddress: "0x7e515e00e2d605d763ffe25fd7b1e00f8fd97a16", + // vaultContractABI: abi.moneyPrinterVaultContract, + // strategyContractAddress: "0x111de482a01eb87875d18f8c1131fca709b6a646", + // strategyABI: abi.moneyPrinterStrategyContract, + // balance: 0, + // vaultBalance: 0, + // decimals: 18, + // deposit: true, + // depositAll: true, + // withdraw: true, + // withdrawAll: true, + // lastMeasurement: 15970970, + // measurement: 1e18, + // price_id: ["tether", "usd-coin", "dai"], + // isMoneyPrinter: true, + // network: constant.POLYGON, + // }, ]; module.exports = (process.env.PRODUCTION != '') ? mainVaults : testVaults; \ No newline at end of file From c47f99f30fd593ca78393bf275b0d67423e3747f Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Mon, 2 Aug 2021 23:43:40 +0800 Subject: [PATCH 228/254] Fix Cron Job --- jobs/task.js | 9 +++++---- services/vaults/performance/handler.js | 22 ++++++++++++++++++---- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/jobs/task.js b/jobs/task.js index 25bfec3..58c8c03 100644 --- a/jobs/task.js +++ b/jobs/task.js @@ -131,21 +131,22 @@ const saveVipApr = async () => { ); }; -/** Store DAOVIP APR */ +/** Store Performance */ const savePerformance = async () => { currentDateTime = new Date().getTime(); - console.log("[savePerformance]", currentDateTime); + console.log("[savePerformance first]", currentDateTime); await performanceSave.savePerformance(null); cron.schedule( "0 0 * * *", + // "* * * * *", async () => { currentDateTime = new Date().getTime(); - console.log("[savePerformance]", currentDateTime); + console.log("[savePerformance job]", currentDateTime); await performanceSave.savePerformance(currentDateTime); }, { scheduled: true, - timezone: "Etc/UTC", // UTC +0 + // timezone: "Etc/UTC", // UTC +0 } ); }; diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js index 939444a..a28f2f4 100644 --- a/services/vaults/performance/handler.js +++ b/services/vaults/performance/handler.js @@ -18,9 +18,9 @@ const CoinGeckoClient = new CoinGecko(); let url = process.env.ARCHIVENODE_ENDPOINT; // Using ethers.js -const provider = new ethers.providers.JsonRpcProvider(url); +let provider = new ethers.providers.JsonRpcProvider(url); -const dater = new EthDater( +let dater = new EthDater( provider // Web3 object, required. ); @@ -202,9 +202,17 @@ async function getSearchRange(firstBlock, lastBlock) { } async function getNextUpdateBlock(dateTime) { + let url = process.env.ARCHIVENODE_ENDPOINT; + // Using ethers.js + let provider = new ethers.providers.JsonRpcProvider(url); + + let dater = new EthDater( + provider // Web3 object, required. + ); + let block = await dater.getDate( dateTime, // Date, required. Any valid moment.js value: string, milliseconds, Date() object, moment() object. - false // Block after, optional. Search for the nearest block before or after the given date. By default true. + true // Block after, optional. Search for the nearest block before or after the given date. By default true. ); return [block]; } @@ -247,7 +255,13 @@ async function syncHistoricalPerformance(dateTime) { basePrice = latestEntry[0]["lp_inception_price"]; btcBasePrice = latestEntry[0]["btc_inception_price"]; ethBasePrice = latestEntry[0]["eth_inception_price"]; - dates = await getNextUpdateBlock(dateTime); + console.log("🚀 | syncHistoricalPerformance | dateTime", dateTime); + if (dateTime) { + dates = await getNextUpdateBlock(dateTime); + console.log("🚀 | syncHistoricalPerformance | dates", dates); + } else { + return; + } } else { startBlock = getInceptionBlock(etf); latestBlock = await provider.getBlockNumber(); From cabdb6db9ff0db74cc400ec0cedf33a4884ebb19 Mon Sep 17 00:00:00 2001 From: Soon Lai <43904148+soonlai814@users.noreply.github.com> Date: Tue, 3 Aug 2021 01:33:15 +0800 Subject: [PATCH 229/254] Update whitelist.js --- services/reimbursement/whitelist.js | 1 + 1 file changed, 1 insertion(+) diff --git a/services/reimbursement/whitelist.js b/services/reimbursement/whitelist.js index 4c2644c..b0e72ea 100644 --- a/services/reimbursement/whitelist.js +++ b/services/reimbursement/whitelist.js @@ -2747,6 +2747,7 @@ const whiteList = [ ['0x8bA6Fb982CB4B6a240065376b944100bCE31b9D6','10000000000000000000000000'], ['0xe8a90314d1e705246b3c425bc806334d2e7f3565','10000000000000000000000000'], ['0x54B44041b79021a10e38dcbaEA0AfDcEF1803FFe','10000000000000000000000001'], + ['0xEDC8D1681766C4ba8CE2eBb52072bE3b4fB6CF6a','10000000000000000000000001'], ]; module.exports = whiteList; From 04376cb0364a73712180089013a952e53dc8dd35 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Tue, 3 Aug 2021 18:27:35 +0800 Subject: [PATCH 230/254] Added for updated money printer contract --- config/abi.js | 2108 +-------------------- config/serverless/domain.js | 4 +- scripts/initial.js | 2 +- services/vaults/apy/save/polygon-vault.js | 6 +- 4 files changed, 9 insertions(+), 2111 deletions(-) diff --git a/config/abi.js b/config/abi.js index 3efc24f..0feaf7f 100644 --- a/config/abi.js +++ b/config/abi.js @@ -19915,2111 +19915,9 @@ const daoFaangStonkStrategyContract =[ } ]; -const moneyPrinterVaultContract = [ - { - "inputs": [ - { - "internalType": "address", - "name": "_strategy", - "type": "address" - }, - { - "internalType": "address", - "name": "_admin", - "type": "address" - }, - { - "internalType": "address", - "name": "_treasuryWallet", - "type": "address" - }, - { - "internalType": "address", - "name": "_communityWallet", - "type": "address" - }, - { - "internalType": "address", - "name": "_strategist", - "type": "address" - }, - { - "internalType": "address", - "name": "_biconomy", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "sharesMinted", - "type": "uint256" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "fromStrategy", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newStrategy", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "MigrateFunds", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "SetAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldCommunityWallet", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newCommunityWallet", - "type": "address" - } - ], - "name": "SetCommunityWallet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldStrategy", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newStrategy", - "type": "address" - } - ], - "name": "SetPendingStrategy", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldStrategist", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newStrategist", - "type": "address" - } - ], - "name": "SetStrategistWallet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldTreasury", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newTreasury", - "type": "address" - } - ], - "name": "SetTreasuryWallet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "unlockTime", - "type": "uint256" - } - ], - "name": "UnlockMigrateFunds", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "sharesBurned", - "type": "uint256" - } - ], - "name": "Withdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - } - ], - "name": "Yield", - "type": "event" - }, - { - "inputs": [], - "name": "DAI", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOCKTIME", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "QuickSwapRouter", - "outputs": [ - { - "internalType": "contract IUniswapV2Router02", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "USDC", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "USDT", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "canSetPendingStrategy", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "communityWallet", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "customNetworkFeePerc", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "customNetworkFeeTier", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "depositedAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - } - ], - "name": "emergencyWithdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getValueInPool", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "isEmergency", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "forwarder", - "type": "address" - } - ], - "name": "isTrustedForwarder", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - } - ], - "name": "migrateFunds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "networkFeePerc", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "networkFeeTier2", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingStrategy", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "profitSharingFeePerc", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "reInvest", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newAdmin", - "type": "address" - } - ], - "name": "setAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_communityWallet", - "type": "address" - } - ], - "name": "setCommunityWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_pendingStrategy", - "type": "address" - } - ], - "name": "setPendingStrategy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_strategist", - "type": "address" - } - ], - "name": "setStrategist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_treasuryWallet", - "type": "address" - } - ], - "name": "setTreasuryWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "strategist", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "strategy", - "outputs": [ - { - "internalType": "contract IStrategy", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "treasuryWallet", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "trustedForwarder", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unlockMigrateFunds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unlockTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "versionRecipient", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_shares", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "yield", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -]; - -const moneyPrinterStrategyContract = [ - { - "inputs": [ - { - "internalType": "address", - "name": "_strategy", - "type": "address" - }, - { - "internalType": "address", - "name": "_admin", - "type": "address" - }, - { - "internalType": "address", - "name": "_treasuryWallet", - "type": "address" - }, - { - "internalType": "address", - "name": "_communityWallet", - "type": "address" - }, - { - "internalType": "address", - "name": "_strategist", - "type": "address" - }, - { - "internalType": "address", - "name": "_biconomy", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "sharesMinted", - "type": "uint256" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "fromStrategy", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newStrategy", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "MigrateFunds", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "SetAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldCommunityWallet", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newCommunityWallet", - "type": "address" - } - ], - "name": "SetCommunityWallet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldStrategy", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newStrategy", - "type": "address" - } - ], - "name": "SetPendingStrategy", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldStrategist", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newStrategist", - "type": "address" - } - ], - "name": "SetStrategistWallet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldTreasury", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newTreasury", - "type": "address" - } - ], - "name": "SetTreasuryWallet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "unlockTime", - "type": "uint256" - } - ], - "name": "UnlockMigrateFunds", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "sharesBurned", - "type": "uint256" - } - ], - "name": "Withdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - } - ], - "name": "Yield", - "type": "event" - }, - { - "inputs": [], - "name": "DAI", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOCKTIME", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "QuickSwapRouter", - "outputs": [ - { - "internalType": "contract IUniswapV2Router02", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "USDC", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "USDT", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "canSetPendingStrategy", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "communityWallet", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "customNetworkFeePerc", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "customNetworkFeeTier", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "depositedAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - } - ], - "name": "emergencyWithdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getValueInPool", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "isEmergency", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "forwarder", - "type": "address" - } - ], - "name": "isTrustedForwarder", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - } - ], - "name": "migrateFunds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "networkFeePerc", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "networkFeeTier2", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingStrategy", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "profitSharingFeePerc", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "reInvest", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newAdmin", - "type": "address" - } - ], - "name": "setAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_communityWallet", - "type": "address" - } - ], - "name": "setCommunityWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_pendingStrategy", - "type": "address" - } - ], - "name": "setPendingStrategy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_strategist", - "type": "address" - } - ], - "name": "setStrategist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_treasuryWallet", - "type": "address" - } - ], - "name": "setTreasuryWallet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "strategist", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "strategy", - "outputs": [ - { - "internalType": "contract IStrategy", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "treasuryWallet", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "trustedForwarder", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unlockMigrateFunds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unlockTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "versionRecipient", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_shares", - "type": "uint256" - }, - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "yield", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -]; +const moneyPrinterVaultContract = [{"inputs":[{"internalType":"address","name":"_strategy","type":"address"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_treasuryWallet","type":"address"},{"internalType":"address","name":"_communityWallet","type":"address"},{"internalType":"address","name":"_strategist","type":"address"},{"internalType":"address","name":"_biconomy","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sharesMinted","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fromStrategy","type":"address"},{"indexed":true,"internalType":"address","name":"newStrategy","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MigrateFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"SetAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldCommunityWallet","type":"address"},{"indexed":false,"internalType":"address","name":"newCommunityWallet","type":"address"}],"name":"SetCommunityWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldStrategy","type":"address"},{"indexed":false,"internalType":"address","name":"newStrategy","type":"address"}],"name":"SetPendingStrategy","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldStrategist","type":"address"},{"indexed":false,"internalType":"address","name":"newStrategist","type":"address"}],"name":"SetStrategistWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldTreasury","type":"address"},{"indexed":false,"internalType":"address","name":"newTreasury","type":"address"}],"name":"SetTreasuryWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"unlockTime","type":"uint256"}],"name":"UnlockMigrateFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sharesBurned","type":"uint256"}],"name":"Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Yield","type":"event"},{"inputs":[],"name":"DAI","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOCKTIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"QuickSwapRouter","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDC","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDT","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canSetPendingStrategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeeTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"depositedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getValueInPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isEmergency","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"}],"name":"migrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeeTier2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"profitSharingFeePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reInvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newAdmin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_biconomy","type":"address"}],"name":"setBiconomy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"}],"name":"setCommunityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setCustomNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_customNetworkFeeTier","type":"uint256"}],"name":"setCustomNetworkFeeTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeePerc","type":"uint256[]"}],"name":"setNetworkFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeeTier2","type":"uint256[]"}],"name":"setNetworkFeeTier2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pendingStrategy","type":"address"}],"name":"setPendingStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setProfitSharingFeePerc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"contract IStrategy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trustedForwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockMigrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"versionRecipient","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yield","outputs":[],"stateMutability":"nonpayable","type":"function"}]; + +const moneyPrinterStrategyContract = [{"inputs":[{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"address","name":"_communityWallet","type":"address"},{"internalType":"address","name":"_strategist","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"wexPolyEarned","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"quickEarned","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"wMaticEarned","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"crvEarned","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"valueInDai","type":"uint256"}],"name":"Yield","type":"event"},{"inputs":[],"name":"CRV","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DAI","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DAIUSDTQuickswapPool","outputs":[{"internalType":"contract ILPPool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MATIC","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"QUICK","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"QuickDAI_USDTPair","outputs":[{"internalType":"contract IUniswapV2Pair","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDC","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDT","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WexPolyRouter","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WexUSDT_USDCPair","outputs":[{"internalType":"contract IUniswapV2Pair","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Wexpoly","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"curveFi","outputs":[{"internalType":"contract ICurveFi","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"curveLpToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getValueInPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"}],"name":"migrateFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"quickSwapRouter","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardGauge","outputs":[{"internalType":"contract IGauge","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"}],"name":"setCommunityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wexStakingContract","outputs":[{"internalType":"contract WexPolyMaster","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]; module.exports = { earnUSDTABIContract, diff --git a/config/serverless/domain.js b/config/serverless/domain.js index fba6670..716b140 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -398,9 +398,9 @@ const mainContracts = { network: constant.ETHEREUM, }, daoMPT: { - address: '0x7e515e00e2d605d763ffe25fd7b1e00f8fd97a16', + address: '0x3db93e95c9881bc7d9f2c845ce12e97130ebf5f2', abi: abi.moneyPrinterVaultContract, - strategyAddress: '0x111de482a01eb87875d18f8c1131fca709b6a646', + strategyAddress: '0x822427cd2a5a69e810301626bb355450a47c60ea', strategyABI: abi.moneyPrinterStrategyContract, contractType: 'moneyPrinter', tokenId: ["tether", "usd-coin", "dai"], diff --git a/scripts/initial.js b/scripts/initial.js index ba8a451..6364221 100644 --- a/scripts/initial.js +++ b/scripts/initial.js @@ -10,7 +10,7 @@ db.vault_categories.insertMany([ { name: 'expert', contract_address: '0x8fe826cc1225b03aa06477ad5af745aed5fe7066', symbol: 'daoCDV', }, { name: 'degen', contract_address: '0x2d9a136cf87d599628bcbdfb6c4fe75acd2a0aa8', symbol: 'daoELO', }, { name: 'advance', contract_address: '0x742a85daf742ca0213b06fdae449434e0448691e', symbol: 'daoSTO', }, - { name: 'advance', contract_address: '0x7e515e00e2d605d763ffe25fd7b1e00f8fd97a16', symbol: 'daoMPT', }, + { name: 'advance', contract_address: '0x3db93e95c9881bc7d9f2c845ce12e97130ebf5f2', symbol: 'daoMPT', }, // TODO: add in mainnet contract addresss // { name: 'basic', contract_address: '', symbol: 'hfUSDT'}, // { name: 'basic', contract_address: '', symbol: 'hfUSDC'}, diff --git a/services/vaults/apy/save/polygon-vault.js b/services/vaults/apy/save/polygon-vault.js index c72e5c0..59f4fb0 100644 --- a/services/vaults/apy/save/polygon-vault.js +++ b/services/vaults/apy/save/polygon-vault.js @@ -37,9 +37,9 @@ const mainVaults = [ description: "DAO Vault Money Printer for 3 stablecoins", vaultSymbol: "daoMPT", erc20address: "0xbd21a10f619be90d6066c941b04e340841f1f989", - vaultContractAddress: "0x7e515e00e2d605d763ffe25fd7b1e00f8fd97a16", + vaultContractAddress: "0x3db93e95c9881bc7d9f2c845ce12e97130ebf5f2", vaultContractABI: abi.moneyPrinterVaultContract, - strategyContractAddress: "0x111de482a01eb87875d18f8c1131fca709b6a646", + strategyContractAddress: "0x822427cd2a5a69e810301626bb355450a47c60ea", strategyABI: abi.moneyPrinterStrategyContract, balance: 0, vaultBalance: 0, @@ -48,7 +48,7 @@ const mainVaults = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 15970970, + lastMeasurement: 17566349, measurement: 1e18, price_id: ["tether", "usd-coin", "dai"], isMoneyPrinter: true, From 0a70ad30d3a119bfb489ac6ca8b399b078c90422 Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Tue, 3 Aug 2021 21:16:05 +0800 Subject: [PATCH 231/254] Update to save performance every 5 minutes --- jobs/task.js | 3 ++- services/vaults/performance/handler.js | 20 +++++++++++--------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/jobs/task.js b/jobs/task.js index 58c8c03..32501da 100644 --- a/jobs/task.js +++ b/jobs/task.js @@ -137,7 +137,8 @@ const savePerformance = async () => { console.log("[savePerformance first]", currentDateTime); await performanceSave.savePerformance(null); cron.schedule( - "0 0 * * *", + "*/5 * * * *", + // "0 0 * * *", // "* * * * *", async () => { currentDateTime = new Date().getTime(); diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js index a28f2f4..4b6a3b7 100644 --- a/services/vaults/performance/handler.js +++ b/services/vaults/performance/handler.js @@ -15,9 +15,9 @@ const { const CoinGecko = require("coingecko-api"); const CoinGeckoClient = new CoinGecko(); -let url = process.env.ARCHIVENODE_ENDPOINT; +let url = process.env.ARCHIVENODE_ENDPOINT_2; -// Using ethers.js +// Using ethers.js0.26 let provider = new ethers.providers.JsonRpcProvider(url); let dater = new EthDater( @@ -202,7 +202,8 @@ async function getSearchRange(firstBlock, lastBlock) { } async function getNextUpdateBlock(dateTime) { - let url = process.env.ARCHIVENODE_ENDPOINT; + console.log("🚀 | getNextUpdateBlock | dateTime", dateTime); + let url = process.env.ARCHIVENODE_ENDPOINT_2; // Using ethers.js let provider = new ethers.providers.JsonRpcProvider(url); @@ -210,8 +211,11 @@ async function getNextUpdateBlock(dateTime) { provider // Web3 object, required. ); + let nearestDateTime = dateTime - (dateTime % 86400000); // round down to midnight + console.log("🚀 | getNextUpdateBlock | dateTime", dateTime); + let block = await dater.getDate( - dateTime, // Date, required. Any valid moment.js value: string, milliseconds, Date() object, moment() object. + nearestDateTime, // Date, required. Any valid moment.js value: string, milliseconds, Date() object, moment() object. true // Block after, optional. Search for the nearest block before or after the given date. By default true. ); return [block]; @@ -257,7 +261,7 @@ async function syncHistoricalPerformance(dateTime) { ethBasePrice = latestEntry[0]["eth_inception_price"]; console.log("🚀 | syncHistoricalPerformance | dateTime", dateTime); if (dateTime) { - dates = await getNextUpdateBlock(dateTime); + dates = await getNextUpdateBlock(dateTime); // Round down to nearest 0:00 UTC day console.log("🚀 | syncHistoricalPerformance | dates", dates); } else { return; @@ -269,16 +273,14 @@ async function syncHistoricalPerformance(dateTime) { } for (const date of dates) { + console.log("🚀 | syncHistoricalPerformance | date", date); try { totalSupply = await getTotalSupply(etf, vault, date.block); totalPool = await getTotalPool(etf, vault, date.block); btcPrice = await getBTCPriceCoinGecko(date.date); ethPrice = await getETHPriceCoinGecko(date.date); lpTokenPriceUSD = calcLPTokenPriceUSD(etf, totalSupply, totalPool); - console.log( - "🚀 | syncHistoricalPerformance | lpTokenPriceUSD", - lpTokenPriceUSD - ); + if (lpTokenPriceUSD > 0 && basePrice == 0) { basePrice = lpTokenPriceUSD; lpPriceInception = basePrice; From df7ffa64ea34092ee6be628b16a555695ac260ce Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Tue, 3 Aug 2021 22:43:26 +0800 Subject: [PATCH 232/254] Do not insert if date already exists --- services/vaults/performance/handler.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js index 4b6a3b7..d62aecd 100644 --- a/services/vaults/performance/handler.js +++ b/services/vaults/performance/handler.js @@ -254,16 +254,31 @@ async function syncHistoricalPerformance(dateTime) { let btcPriceInception = 0; let latestBlock; let dates; + let latestUpdateDate; if (latestEntry.length != 0) { basePrice = latestEntry[0]["lp_inception_price"]; btcBasePrice = latestEntry[0]["btc_inception_price"]; ethBasePrice = latestEntry[0]["eth_inception_price"]; + latestUpdateDate = latestEntry[0]["date"]; + console.log( + "🚀 | syncHistoricalPerformance | latestUpdateDate", + latestUpdateDate + ); console.log("🚀 | syncHistoricalPerformance | dateTime", dateTime); if (dateTime) { dates = await getNextUpdateBlock(dateTime); // Round down to nearest 0:00 UTC day console.log("🚀 | syncHistoricalPerformance | dates", dates); + if (dates[0].date === latestUpdateDate) { + console.log( + "🚀 | syncHistoricalPerformance | dates[0].date", + dates[0].date + ); + console.log("already updated"); + return; + } } else { + console.log("already initialized"); return; } } else { From ed0f29d11401cf416fef817745a54aa8d3e81483 Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Tue, 3 Aug 2021 22:44:07 +0800 Subject: [PATCH 233/254] remove console logs --- services/vaults/performance/handler.js | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js index d62aecd..50c6736 100644 --- a/services/vaults/performance/handler.js +++ b/services/vaults/performance/handler.js @@ -57,7 +57,6 @@ const ETHpriceFeed = new ethers.Contract( ); // 8 DEcimals async function getTokenPrice(coingecko_token_id, date) { - // console.log(coingecko_token_id); let data; try { data = await CoinGeckoClient.coins.fetchHistory(coingecko_token_id, { @@ -70,7 +69,6 @@ async function getTokenPrice(coingecko_token_id, date) { } } catch (err) { // Catch error, Default Value = 1 - console.log(err); } } @@ -202,7 +200,6 @@ async function getSearchRange(firstBlock, lastBlock) { } async function getNextUpdateBlock(dateTime) { - console.log("🚀 | getNextUpdateBlock | dateTime", dateTime); let url = process.env.ARCHIVENODE_ENDPOINT_2; // Using ethers.js let provider = new ethers.providers.JsonRpcProvider(url); @@ -212,7 +209,6 @@ async function getNextUpdateBlock(dateTime) { ); let nearestDateTime = dateTime - (dateTime % 86400000); // round down to midnight - console.log("🚀 | getNextUpdateBlock | dateTime", dateTime); let block = await dater.getDate( nearestDateTime, // Date, required. Any valid moment.js value: string, milliseconds, Date() object, moment() object. @@ -231,7 +227,6 @@ async function syncHistoricalPerformance(dateTime) { // Get latest entry in database for (const etf of ETF_STRATEGIES) { - // console.log(">", etf); let vaultAddress = contracts["farmer"][etf]["address"]; let vaultABI = contracts["farmer"][etf]["abi"]; vault = new ethers.Contract(vaultAddress, vaultABI, provider); @@ -261,24 +256,12 @@ async function syncHistoricalPerformance(dateTime) { btcBasePrice = latestEntry[0]["btc_inception_price"]; ethBasePrice = latestEntry[0]["eth_inception_price"]; latestUpdateDate = latestEntry[0]["date"]; - console.log( - "🚀 | syncHistoricalPerformance | latestUpdateDate", - latestUpdateDate - ); - console.log("🚀 | syncHistoricalPerformance | dateTime", dateTime); if (dateTime) { dates = await getNextUpdateBlock(dateTime); // Round down to nearest 0:00 UTC day - console.log("🚀 | syncHistoricalPerformance | dates", dates); if (dates[0].date === latestUpdateDate) { - console.log( - "🚀 | syncHistoricalPerformance | dates[0].date", - dates[0].date - ); - console.log("already updated"); return; } } else { - console.log("already initialized"); return; } } else { @@ -288,7 +271,6 @@ async function syncHistoricalPerformance(dateTime) { } for (const date of dates) { - console.log("🚀 | syncHistoricalPerformance | date", date); try { totalSupply = await getTotalSupply(etf, vault, date.block); totalPool = await getTotalPool(etf, vault, date.block); @@ -329,11 +311,8 @@ async function syncHistoricalPerformance(dateTime) { eth_inception_price: ethPriceInception.toString(), }; - // console.log(data); historicalDb.add(etf, data); - } catch (e) { - console.log(e); - } + } catch (e) {} } } } @@ -443,7 +422,6 @@ module.exports.pnlHandle = async (req, res) => { basePrice, result[lastDataIndex]["lp_token_price_usd"] ); - console.log("🚀 | module.exports.pnlHandle= | pnl", pnl); return res.status(200).json({ message: `Performance Data for ${req.params.farmer}`, body: pnl, From f3a76ad8a752147622ce6f36b4d4e8851d34dd56 Mon Sep 17 00:00:00 2001 From: Soon Lai <43904148+soonlai814@users.noreply.github.com> Date: Wed, 4 Aug 2021 21:34:35 +0800 Subject: [PATCH 234/254] Update whitelist.js --- services/reimbursement/whitelist.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/reimbursement/whitelist.js b/services/reimbursement/whitelist.js index b0e72ea..8dcefce 100644 --- a/services/reimbursement/whitelist.js +++ b/services/reimbursement/whitelist.js @@ -2748,6 +2748,9 @@ const whiteList = [ ['0xe8a90314d1e705246b3c425bc806334d2e7f3565','10000000000000000000000000'], ['0x54B44041b79021a10e38dcbaEA0AfDcEF1803FFe','10000000000000000000000001'], ['0xEDC8D1681766C4ba8CE2eBb52072bE3b4fB6CF6a','10000000000000000000000001'], + ['0xF8132edE85C4A4626F0e3fcE678378B90Fc6bBfe','10000000000000000000000000'], + ['0xA53e72EeD7DAf63f920e510B3d43339f5433413A','10000000000000000000000000'], + ['0x527A088a9524CE3b8E5b6d3785BB8ed24744FbaE','10000000000000000000000000'], ]; module.exports = whiteList; From 08d8e1cca5c5b34bc3455bdeffcf9e9f2e5ac092 Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Thu, 5 Aug 2021 14:58:11 +0800 Subject: [PATCH 235/254] Fix inception APY issue --- services/vaults/performance/handler.js | 40 ++++++++++++++++++-------- 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js index 50c6736..3fe037c 100644 --- a/services/vaults/performance/handler.js +++ b/services/vaults/performance/handler.js @@ -252,14 +252,19 @@ async function syncHistoricalPerformance(dateTime) { let latestUpdateDate; if (latestEntry.length != 0) { + console.log("🚀 | syncHistoricalPerformance | latestEntry", latestEntry); basePrice = latestEntry[0]["lp_inception_price"]; btcBasePrice = latestEntry[0]["btc_inception_price"]; ethBasePrice = latestEntry[0]["eth_inception_price"]; + lpPriceInception = basePrice; + btcPriceInception = btcBasePrice; + ethPriceInception = ethBasePrice; + latestUpdateDate = latestEntry[0]["date"]; if (dateTime) { dates = await getNextUpdateBlock(dateTime); // Round down to nearest 0:00 UTC day if (dates[0].date === latestUpdateDate) { - return; + continue; } } else { return; @@ -271,6 +276,15 @@ async function syncHistoricalPerformance(dateTime) { } for (const date of dates) { + console.log("🚀 | syncHistoricalPerformance | basePrice", basePrice); + console.log( + "🚀 | syncHistoricalPerformance | btcBasePrice", + btcBasePrice + ); + console.log( + "🚀 | syncHistoricalPerformance | ethBasePrice", + ethBasePrice + ); try { totalSupply = await getTotalSupply(etf, vault, date.block); totalPool = await getTotalPool(etf, vault, date.block); @@ -278,17 +292,19 @@ async function syncHistoricalPerformance(dateTime) { ethPrice = await getETHPriceCoinGecko(date.date); lpTokenPriceUSD = calcLPTokenPriceUSD(etf, totalSupply, totalPool); - if (lpTokenPriceUSD > 0 && basePrice == 0) { - basePrice = lpTokenPriceUSD; - lpPriceInception = basePrice; - } - if (lpTokenPriceUSD > 0 && btcPrice > 0 && btcBasePrice == 0) { - btcBasePrice = btcPrice; - btcPriceInception = btcBasePrice; - } - if (lpTokenPriceUSD > 0 && ethPrice > 0 && ethBasePrice == 0) { - ethBasePrice = ethPrice; - ethPriceInception = ethBasePrice; + if (lpTokenPriceUSD > 0) { + if (basePrice === 0) { + basePrice = lpTokenPriceUSD; + lpPriceInception = basePrice; + } + if (btcPrice > 0 && btcBasePrice === 0) { + btcBasePrice = btcPrice; + btcPriceInception = btcBasePrice; + } + if (ethPrice > 0 && ethBasePrice === 0) { + ethBasePrice = ethPrice; + ethPriceInception = ethBasePrice; + } } lpPerformance = calculatePerformance(basePrice, lpTokenPriceUSD); btcPerformance = calculatePerformance(btcBasePrice, btcPrice); From 313775c58d8ffb85dd1b84698d1875e1691beb6d Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Fri, 6 Aug 2021 02:58:10 +0800 Subject: [PATCH 236/254] Update FAANG mainnet address to 0x9ee54014e1E6CF10fD7E9290FdB6101fd0d5D416 --- config/serverless/domain.js | 200 ++++++++++++++++++------------------ 1 file changed, 100 insertions(+), 100 deletions(-) diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 34e8ec8..1037f7b 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -88,7 +88,7 @@ const testContracts = { strategyABI: abi.yearnUSDTABIContract, contractType: "yearn", tokenId: "tether", - network: constant.ETHEREUM + network: constant.ETHEREUM, }, yUSDC: { address: "0x6e15e283dc430eca010ade8b11b5b377902d6e56", @@ -97,7 +97,7 @@ const testContracts = { strategyABI: abi.yearnUSDCABIContract, contractType: "yearn", tokenId: "usd-coin", - network: constant.ETHEREUM + network: constant.ETHEREUM, }, yDAI: { address: "0x2428bfd238a3632552b343297c504f60283009ed", @@ -106,7 +106,7 @@ const testContracts = { strategyABI: abi.yearnDAIABIContract, contractType: "yearn", tokenId: "dai", - network: constant.ETHEREUM + network: constant.ETHEREUM, }, yTUSD: { address: "0xeccb98c36bfc8c49c6065d1cd90bcf1c6f02d4ad", @@ -115,7 +115,7 @@ const testContracts = { strategyABI: abi.yearnTUSDABIContract, contractType: "yearn", tokenId: "true-usd", - network: constant.ETHEREUM + network: constant.ETHEREUM, }, cUSDT: { address: "0x5d102e0bdf2037899e1ff2e8cc50987108533c52", @@ -124,7 +124,7 @@ const testContracts = { strategyABI: abi.compoundStrategyContract, contractType: "compound", tokenId: "tether", - network: constant.ETHEREUM + network: constant.ETHEREUM, }, cUSDC: { address: "0x05ab7659e6ef9ba1a5f790b402fd1688f01b003e", @@ -133,7 +133,7 @@ const testContracts = { strategyABI: abi.compoundStrategyContract, contractType: "compound", tokenId: "usd-coin", - network: constant.ETHEREUM + network: constant.ETHEREUM, }, cDAI: { address: "0x47e565b1e23cda3d6bb69e7ae398b884f5addc7d", @@ -142,7 +142,7 @@ const testContracts = { strategyABI: abi.compoundStrategyContract, contractType: "compound", tokenId: "dai", - network: constant.ETHEREUM + network: constant.ETHEREUM, }, daoCDV: { address: "0x626c25ca5b86277f395c0e40dbdf51f2a302ab43", @@ -151,7 +151,7 @@ const testContracts = { strategyABI: abi.citadelStrategyABIContract, contractType: "citadel", tokenId: ["tether", "usd-coin", "dai"], - network: constant.ETHEREUM + network: constant.ETHEREUM, }, daoELO: { address: "0xf03fa8553379d872b4e2bafbc679409fb82604c2", @@ -160,7 +160,7 @@ const testContracts = { strategyABI: abi.elonApeStrategyContract, contractType: "elon", tokenId: ["tether", "usd-coin", "dai"], - network: constant.ETHEREUM + network: constant.ETHEREUM, }, daoCUB: { address: "0x5c304a6cb105e1bff9805ca5cf072f1d2c3beac5", @@ -169,7 +169,7 @@ const testContracts = { strategyABI: abi.cubanApeStrategyContract, contractType: "cuban", tokenId: ["tether", "usd-coin", "dai"], - network: constant.ETHEREUM + network: constant.ETHEREUM, }, daoSTO: { address: "0xd6af81e5288be43137debf969d7f2c03482c8cc1", @@ -178,44 +178,44 @@ const testContracts = { strategyABI: abi.daoFaangStonkStrategyContract, contractType: "daoFaang", tokenId: ["tether", "usd-coin", "dai"], - network: constant.ETHEREUM + network: constant.ETHEREUM, }, - 'hfDAI': { - address: '0x6d7e8fa90c1ffdc019d691bafc18d6362fdeecd7', + hfDAI: { + address: "0x6d7e8fa90c1ffdc019d691bafc18d6362fdeecd7", abi: abi.hfVaultContract, - strategyAddress: '0xdfeb689aea68f221eaafeeeb91767003265968d6', + strategyAddress: "0xdfeb689aea68f221eaafeeeb91767003265968d6", strategyABI: abi.hfStrategyContract, - contractType: 'harvest', + contractType: "harvest", tokenId: "dai", - network: constant.ETHEREUM + network: constant.ETHEREUM, }, - 'hfUSDC': { - address: '0x68b1c860300c4f7d577f08d8b3c3aee23887b280', + hfUSDC: { + address: "0x68b1c860300c4f7d577f08d8b3c3aee23887b280", abi: abi.hfVaultContract, - strategyAddress: '0x7da9e06545c4fe6556fc0990f5afd4955379e1d2', + strategyAddress: "0x7da9e06545c4fe6556fc0990f5afd4955379e1d2", strategyABI: abi.hfStrategyContract, - contractType: 'harvest', + contractType: "harvest", tokenId: "usd-coin", - network: constant.ETHEREUM + network: constant.ETHEREUM, }, - 'hfUSDT': { - address: '0x35880615bb18da592ff0feb0940ade2c02249715', + hfUSDT: { + address: "0x35880615bb18da592ff0feb0940ade2c02249715", abi: abi.hfVaultContract, - strategyAddress: '0xac783dc15d2cf08d1e1c34e18e531a9b182277b0', + strategyAddress: "0xac783dc15d2cf08d1e1c34e18e531a9b182277b0", strategyABI: abi.hfStrategyContract, - contractType: 'harvest', + contractType: "harvest", tokenId: "tether", - network: constant.ETHEREUM + network: constant.ETHEREUM, }, daoMPT: { - address: '0x4f0bc6bd6beb231087781336bacd5613527ac63c', + address: "0x4f0bc6bd6beb231087781336bacd5613527ac63c", abi: abi.moneyPrinterVaultContract, - strategyAddress: '0x8894da48bb8b7f7751ac4e2c37ed31b68d0c587f', + strategyAddress: "0x8894da48bb8b7f7751ac4e2c37ed31b68d0c587f", strategyABI: abi.moneyPrinterStrategyContract, - contractType: 'moneyPrinter', + contractType: "moneyPrinter", tokenId: ["tether", "usd-coin", "dai"], - network: constant.POLYGON - } + network: constant.POLYGON, + }, }, DVD: { address: "0x6639c554a299d58284e36663f609a7d94526fec0", @@ -244,7 +244,7 @@ const testContracts = { abi: abi.xDVGABIContract, tokenId: "xDVG", decimals: 18, - lastMeasurement: 24819747, + lastMeasurement: 24819747, network: constant.ETHEREUM, }, daoStake: { @@ -257,23 +257,23 @@ const testContracts = { uniswap: { ethDVG: { address: "0x0A15e37442e2a41A3A51A9Eff7fE1DCE0E96f0bB", - abi: abi.uniswapPairABIContract, + abi: abi.uniswapPairABIContract, network: constant.ETHEREUM, - } + }, }, harvest: { - 'hfDAI': { - address: '0xed2ebf9cde8c8fcc4f82ec6e3675130ae5649442', + hfDAI: { + address: "0xed2ebf9cde8c8fcc4f82ec6e3675130ae5649442", abi: abi.hfVault, }, - 'hfUSDC': { - address: '0xeff936f12c1600b8ce60f0e0575f520f82aedce3', + hfUSDC: { + address: "0xeff936f12c1600b8ce60f0e0575f520f82aedce3", abi: abi.hfVault, }, - 'hfUSDT': { - address: '0x1298e9b9a2350ad91f2baf68ab4de8ecb9267621', + hfUSDT: { + address: "0x1298e9b9a2350ad91f2baf68ab4de8ecb9267621", abi: abi.hfVault, - } + }, }, chainLink: { USDT_ETH: { @@ -285,15 +285,15 @@ const testContracts = { address: "0x2ca5A90D34cA333661083F89D831f757A9A50148", abi: abi.eacAggregatoorProxyContract, network: constant.ETHEREUM, - } + }, }, polygonChainLink: { USDT_USD: { - address:"0x92c09849638959196e976289418e5973cc96d645", + address: "0x92c09849638959196e976289418e5973cc96d645", abi: abi.polygonEacAggregatoorProxyContract, - network: constant.POLYGON - } - } + network: constant.POLYGON, + }, + }, }; const mainContracts = { @@ -398,25 +398,25 @@ const mainContracts = { network: constant.ETHEREUM, }, daoCDV: { - address: "0x8fe826cc1225b03aa06477ad5af745aed5fe7066", + address: "0x8fe826cc1225b03aa06477ad5af745aed5fe7066", abi: abi.citadelABIContract, - strategyAddress: "0x8a00046ab28051a952e64a886cd8961ca90a59bd", + strategyAddress: "0x8a00046ab28051a952e64a886cd8961ca90a59bd", strategyABI: abi.citadelStrategyABIContract, contractType: "citadel", tokenId: ["tether", "usd-coin", "dai"], network: constant.ETHEREUM, }, daoELO: { - address: "0x2d9a136cf87d599628bcbdfb6c4fe75acd2a0aa8", + address: "0x2d9a136cf87d599628bcbdfb6c4fe75acd2a0aa8", abi: abi.elonApeVaultContract, - strategyAddress: "0x24d281dcc7d435500669459eaa393dc5200595b1", + strategyAddress: "0x24d281dcc7d435500669459eaa393dc5200595b1", strategyABI: abi.elonApeStrategyContract, contractType: "elon", tokenId: ["tether", "usd-coin", "dai"], network: constant.ETHEREUM, }, daoCUB: { - address: "", // TODO: Update that this to mainnet address + address: "", // TODO: Update that this to mainnet address abi: abi.cubanApeVaultContract, strategyAddress: "", // TODO: Update that this to mainnet address strategyABI: abi.cubanApeStrategyContract, @@ -425,7 +425,7 @@ const mainContracts = { network: constant.ETHEREUM, }, daoSTO: { - address: "0x742a85daf742ca0213b06fdae449434e0448691e", + address: "0x9ee54014e1E6CF10fD7E9290FdB6101fd0d5D416", abi: abi.daoFaangStonkVaultContract, strategyAddress: "0x7f1cffb0e0a7351a72ef53cb51796221e2bac3a5", strategyABI: abi.daoFaangStonkStrategyContract, @@ -434,67 +434,67 @@ const mainContracts = { network: constant.ETHEREUM, }, daoMPT: { - address: '0x7e515e00e2d605d763ffe25fd7b1e00f8fd97a16', + address: "0x7e515e00e2d605d763ffe25fd7b1e00f8fd97a16", abi: abi.moneyPrinterVaultContract, - strategyAddress: '0x111de482a01eb87875d18f8c1131fca709b6a646', + strategyAddress: "0x111de482a01eb87875d18f8c1131fca709b6a646", strategyABI: abi.moneyPrinterStrategyContract, - contractType: 'moneyPrinter', + contractType: "moneyPrinter", tokenId: ["tether", "usd-coin", "dai"], - network: constant.POLYGON + network: constant.POLYGON, }, hfDAI: { - address: '', // TODO: Update that this to mainnet address + address: "", // TODO: Update that this to mainnet address abi: abi.hfVaultContract, - strategyAddress: '', - strategyABI: abi.hfStrategyContract, - contractType: 'harvest', + strategyAddress: "", + strategyABI: abi.hfStrategyContract, + contractType: "harvest", tokenId: "dai", - network: constant.ETHEREUM + network: constant.ETHEREUM, }, hfUSDC: { - address: '', // TODO: Update that this to mainnet address + address: "", // TODO: Update that this to mainnet address abi: abi.hfVaultContract, - strategyAddress: '', + strategyAddress: "", strategyABI: abi.hfStrategyContract, - contractType: 'harvest', + contractType: "harvest", tokenId: "usd-coin", - network: constant.ETHEREUM + network: constant.ETHEREUM, }, hfUSDT: { - address: '', // TODO: Update that this to mainnet address + address: "", // TODO: Update that this to mainnet address abi: abi.hfVaultContract, - strategyAddress: '', + strategyAddress: "", strategyABI: abi.hfStrategyContract, - contractType: 'harvest', + contractType: "harvest", tokenId: "tether", - network: constant.ETHEREUM + network: constant.ETHEREUM, }, hfDAI: { - address: '0x2cc1507e6e3c844eeb77db90d193489f1ddfb299', + address: "0x2cc1507e6e3c844eeb77db90d193489f1ddfb299", abi: abi.hfVaultContract, - strategyAddress: '0x89541e3b8e8b73c108744909ea11d506b4a8e6c7', - strategyABI: abi.hfStrategyContract, - contractType: 'harvest', + strategyAddress: "0x89541e3b8e8b73c108744909ea11d506b4a8e6c7", + strategyABI: abi.hfStrategyContract, + contractType: "harvest", tokenId: "dai", - network: constant.ETHEREUM + network: constant.ETHEREUM, }, hfUSDC: { - address: '0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc', + address: "0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc", abi: abi.hfVaultContract, - strategyAddress: '0x0af9547974e056fca221f679dbbb7f8651407d7f', + strategyAddress: "0x0af9547974e056fca221f679dbbb7f8651407d7f", strategyABI: abi.hfStrategyContract, - contractType: 'harvest', + contractType: "harvest", tokenId: "usd-coin", - network: constant.ETHEREUM + network: constant.ETHEREUM, }, hfUSDT: { - address: '0xe4e6ce7c1d9ff44db27f622accbb0753c2f48955', + address: "0xe4e6ce7c1d9ff44db27f622accbb0753c2f48955", abi: abi.hfVaultContract, - strategyAddress: '0xef9a15025c2ed048a67c5c8019a1101172eeb51c', + strategyAddress: "0xef9a15025c2ed048a67c5c8019a1101172eeb51c", strategyABI: abi.hfStrategyContract, - contractType: 'harvest', + contractType: "harvest", tokenId: "tether", - network: constant.ETHEREUM + network: constant.ETHEREUM, }, }, compund: { @@ -515,7 +515,7 @@ const mainContracts = { address: "0x77dcE26c03a9B833fc2D7C31C22Da4f42e9d9582", abi: abi.DVDABIContract, tokenId: "", - network: constant.ETHEREUM + network: constant.ETHEREUM, }, vipDVD: { name: "vipDVD", @@ -523,14 +523,14 @@ const mainContracts = { abi: abi.xDVDABIContract, tokenId: "xDVD", decimals: 18, - lastMeasurement: 12838468, - network: constant.ETHEREUM + lastMeasurement: 12838468, + network: constant.ETHEREUM, }, DVG: { address: "0x51e00a95748dbd2a3f47bc5c3b3e7b3f0fea666c", abi: abi.DVGABIContract, - tokenId: "daoventures", - network: constant.ETHEREUM + tokenId: "daoventures", + network: constant.ETHEREUM, }, vipDVG: { name: "vipDVG", @@ -538,42 +538,42 @@ const mainContracts = { abi: abi.xDVGABIContract, tokenId: "xDVG", decimals: 18, - lastMeasurement: 12670237, - network: constant.ETHEREUM + lastMeasurement: 12670237, + network: constant.ETHEREUM, }, daoStake: { address: "", // TODO Update mainnet address abi: abi.daoStakeContract, - startBlock: 12770000, // Start block from contract's START_BLOCK + startBlock: 12770000, // Start block from contract's START_BLOCK poolPercent: 0.51, - network: constant.ETHEREUM + network: constant.ETHEREUM, }, uniswap: { ethDVG: { address: "0xd11aD84D720A5e7fA11c8412Af6C1cAA815a436d", abi: abi.uniswapPairABIContract, - network: constant.ETHEREUM - } + network: constant.ETHEREUM, + }, }, chainLink: { USDT_ETH: { address: "0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46", abi: abi.eacAggregatoorProxyContract, - network: constant.ETHEREUM + network: constant.ETHEREUM, }, USDT_USD: { address: "0x3E7d1eAB13ad0104d2750B8863b489D65364e32D", abi: abi.eacAggregatoorProxyContract, - network: constant.ETHEREUM - } + network: constant.ETHEREUM, + }, }, polygonChainLink: { USDT_USD: { - address:"0x0a6513e40db6eb1b165753ad52e80663aea50545", + address: "0x0a6513e40db6eb1b165753ad52e80663aea50545", abi: abi.polygonEacAggregatoorProxyContract, - network: constant.POLYGON - } - } + network: constant.POLYGON, + }, + }, }; const devEarnContract = "0xdb12e805d004698fc58f6e4fbdd876268df2dffe"; From c4efc9b5c23fc7899bbc9239b358fce485e2e185 Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Fri, 6 Aug 2021 05:34:02 +0800 Subject: [PATCH 237/254] Update calculation for daoSTO --- services/vaults/performance/handler.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js index 3fe037c..f0debb4 100644 --- a/services/vaults/performance/handler.js +++ b/services/vaults/performance/handler.js @@ -161,9 +161,11 @@ function calcLPTokenPriceUSD(etf, totalSupply, totalPool) { // totalSupply = await getTotalSupply(vault, date.block); // totalPool = await getTotalPool(vault, date.block); if (totalSupply != 0) { - return totalPool - .mul(ethers.BigNumber.from("1000000000000")) - .div(totalSupply); + return ( + totalPool + // .mul(ethers.BigNumber.from("1000000000000")) + .div(totalSupply) + ); } else { return 0; } @@ -252,7 +254,6 @@ async function syncHistoricalPerformance(dateTime) { let latestUpdateDate; if (latestEntry.length != 0) { - console.log("🚀 | syncHistoricalPerformance | latestEntry", latestEntry); basePrice = latestEntry[0]["lp_inception_price"]; btcBasePrice = latestEntry[0]["btc_inception_price"]; ethBasePrice = latestEntry[0]["eth_inception_price"]; @@ -267,7 +268,7 @@ async function syncHistoricalPerformance(dateTime) { continue; } } else { - return; + continue; } } else { startBlock = getInceptionBlock(etf); From 001f67549ac0d1603b691a3b04fe069c562478a2 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Fri, 6 Aug 2021 14:55:27 +0800 Subject: [PATCH 238/254] Added polygon cronjob --- app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index 8c039bc..290629e 100644 --- a/app.js +++ b/app.js @@ -35,10 +35,10 @@ async function init() { jobs.saveVault(); jobs.saveVaultAPY(); - // jobs.savePolygonVaultAPY(); + jobs.savePolygonVaultAPY(); jobs.savePricePerFullShare(); jobs.saveHistoricalAPY(); - // jobs.savePolygonHistoricalAPY(); + jobs.savePolygonHistoricalAPY(); jobs.saveHistoricalTVL(); jobs.saveHistoricalPools(); jobs.saveABIPools(); From 1fc7185154f1d4321b675d95efee16bb473f9636 Mon Sep 17 00:00:00 2001 From: Soon Lai <43904148+soonlai814@users.noreply.github.com> Date: Fri, 6 Aug 2021 15:58:34 +0800 Subject: [PATCH 239/254] Update whitelist.js --- services/reimbursement/whitelist.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/reimbursement/whitelist.js b/services/reimbursement/whitelist.js index 8dcefce..b97502e 100644 --- a/services/reimbursement/whitelist.js +++ b/services/reimbursement/whitelist.js @@ -2751,6 +2751,9 @@ const whiteList = [ ['0xF8132edE85C4A4626F0e3fcE678378B90Fc6bBfe','10000000000000000000000000'], ['0xA53e72EeD7DAf63f920e510B3d43339f5433413A','10000000000000000000000000'], ['0x527A088a9524CE3b8E5b6d3785BB8ed24744FbaE','10000000000000000000000000'], + ['0xe9eAf9fe16622A152c8fD3aFB7ad0434D8aC11a3','10000000000000000000000000'], + ['0x7BF1ce6D06B20F506f8940860cd05BF1224c12DF','10000000000000000000000000'], + ['0x5e7fED05ed07ac9aB6c9dA0Fe6F1AB0Db399fFD1','10000000000000000000000000'], ]; module.exports = whiteList; From 91fd5c5f86e72521f9d06bdc16135e4b8010839a Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Fri, 6 Aug 2021 17:26:26 +0800 Subject: [PATCH 240/254] Update number of compounding per year. --- services/vaults/apy/save/historical-handle-polygon.js | 2 +- services/vaults/apy/save/polygon-handler.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/vaults/apy/save/historical-handle-polygon.js b/services/vaults/apy/save/historical-handle-polygon.js index f68a262..9b64bdc 100644 --- a/services/vaults/apy/save/historical-handle-polygon.js +++ b/services/vaults/apy/save/historical-handle-polygon.js @@ -54,7 +54,7 @@ const getApyForVault = async (vault) => { pricePerFullShareCurrent = (0 < pricePerFullShareCurrent) ? pricePerFullShareCurrent : 1; pricePerFullShareOneDayAgo = (0 < pricePerFullShareOneDayAgo) ? pricePerFullShareOneDayAgo : 1; - const n = 365 / 2; // Assume 2 days to trigger invest function + const n = 5 * 24 * 365; // Assume trigger compound function 5 times per HOUR const apr = (pricePerFullShareCurrent - pricePerFullShareOneDayAgo) * n; const apy = (Math.pow((1 + (apr / 100) / n), n) - 1) * 100; diff --git a/services/vaults/apy/save/polygon-handler.js b/services/vaults/apy/save/polygon-handler.js index d3e734a..6950333 100644 --- a/services/vaults/apy/save/polygon-handler.js +++ b/services/vaults/apy/save/polygon-handler.js @@ -32,7 +32,7 @@ const getApyForVault = async (vault) => { pricePerFullShareCurrent = (0 < pricePerFullShareCurrent) ? pricePerFullShareCurrent : 1; pricePerFullShareOneDayAgo = (0 < pricePerFullShareOneDayAgo) ? pricePerFullShareOneDayAgo : 1; - const n = 365 / 2; // Assume 2 days to trigger invest function + const n = 5 * 24 * 365; // Assume trigger compound function 5 times per HOUR const apr = (pricePerFullShareCurrent - pricePerFullShareOneDayAgo) * n; const apy = (Math.pow((1 + (apr / 100) / n), n) - 1) * 100; From 39329a753aa8189b297f808d91afaa5df9827607 Mon Sep 17 00:00:00 2001 From: Lim Keng Hin Date: Tue, 10 Aug 2021 15:47:57 +0800 Subject: [PATCH 241/254] Fix LP Price issue --- services/vaults/performance/handler.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/services/vaults/performance/handler.js b/services/vaults/performance/handler.js index f0debb4..b46da4a 100644 --- a/services/vaults/performance/handler.js +++ b/services/vaults/performance/handler.js @@ -151,21 +151,25 @@ function calcLPTokenPriceUSD(etf, totalSupply, totalPool) { // totalSupply = await getTotalSupply(vault, date.block); // totalPool = await getTotalPool(vault, date.block); if (totalSupply != 0) { - return totalPool + let lpPrice = totalPool .mul(ethers.BigNumber.from("1000000000000")) + .mul(ethers.BigNumber.from("1000000000000000000")) .div(totalSupply); + lpPrice = ethers.utils.formatEther(lpPrice); + return lpPrice; } else { return 0; } } else if (etf === "daoSTO") { // totalSupply = await getTotalSupply(vault, date.block); // totalPool = await getTotalPool(vault, date.block); + if (totalSupply != 0) { - return ( - totalPool - // .mul(ethers.BigNumber.from("1000000000000")) - .div(totalSupply) - ); + let lpPrice = totalPool + .mul(ethers.BigNumber.from("1000000000000000000")) + .div(totalSupply); + lpPrice = ethers.utils.formatEther(lpPrice); + return lpPrice; } else { return 0; } From 3dd2ea418219db2d4adcf269467c478f7b908d30 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Wed, 11 Aug 2021 14:05:01 +0800 Subject: [PATCH 242/254] Replace historical apy value if latest apy is 0. --- models/historical-apy.model.js | 12 ++++++++++++ .../vaults/apy/save/historical-handle-polygon.js | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/models/historical-apy.model.js b/models/historical-apy.model.js index 61014f5..3049687 100644 --- a/models/historical-apy.model.js +++ b/models/historical-apy.model.js @@ -15,6 +15,17 @@ const findWithTimePeriods = async (startTime, endTime, collection) => { }).toArray(); } +const getLatestNonZeroMoneyPrinterHistoricalAPY = async() => { + const db = mongo.getDB(); + return await db.collection("daoMPT_historical-apy").find({ + moneyPrinterApy: { + $ne: 0 + } + }).sort({ + timestamp: -1 + }).limit(1).toArray(); +} + const add = async (params, collection) => { const db = mongo.getDB(); Object.assign(params, { @@ -26,6 +37,7 @@ const add = async (params, collection) => { module.exports = { findAll, findWithTimePeriods, + getLatestNonZeroMoneyPrinterHistoricalAPY, add, usdtFarmer: 'yUSDT_historical-apy', usdcFarmer: 'yUSDC_historical-apy', diff --git a/services/vaults/apy/save/historical-handle-polygon.js b/services/vaults/apy/save/historical-handle-polygon.js index 9b64bdc..de3c64e 100644 --- a/services/vaults/apy/save/historical-handle-polygon.js +++ b/services/vaults/apy/save/historical-handle-polygon.js @@ -56,7 +56,13 @@ const getApyForVault = async (vault) => { const n = 5 * 24 * 365; // Assume trigger compound function 5 times per HOUR const apr = (pricePerFullShareCurrent - pricePerFullShareOneDayAgo) * n; - const apy = (Math.pow((1 + (apr / 100) / n), n) - 1) * 100; + let apy = (Math.pow((1 + (apr / 100) / n), n) - 1) * 100; + + // If APY is 0, then take the previous value + if(apy === 0) { + const mpHistoricalApy = await historicalDb.getLatestNonZeroMoneyPrinterHistoricalAPY(); + apy = mpHistoricalApy[0].moneyPrinterApy + } return { apyInceptionSample: 0, From 29cce2618328c805fd4f06d3c4138140da704092 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Wed, 11 Aug 2021 14:30:53 +0800 Subject: [PATCH 243/254] Replace apy value with previous one if current apy = 0. --- models/apy.model.js | 9 +++++++++ services/vaults/apy/save/polygon-handler.js | 11 +++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/models/apy.model.js b/models/apy.model.js index c63487c..182461f 100644 --- a/models/apy.model.js +++ b/models/apy.model.js @@ -6,12 +6,20 @@ const findAll = async () => { return await db.collection(collection).find({}).toArray(); }; +const getApy = async(vaultSymbol) => { + const db = mongo.getDB(); + return await db.collection(collection).findOne({ + vaultSymbol: vaultSymbol + }); +} + const add = async (params) => { const db = mongo.getDB(); const result = await db.collection(collection).findOne({ vaultSymbol: params.vaultSymbol }); + if (result != null) { return await db.collection(collection).updateOne({ vaultSymbol: params.vaultSymbol @@ -28,5 +36,6 @@ const add = async (params) => { module.exports = { findAll, + getApy, add }; \ No newline at end of file diff --git a/services/vaults/apy/save/polygon-handler.js b/services/vaults/apy/save/polygon-handler.js index 6950333..2e5b1c0 100644 --- a/services/vaults/apy/save/polygon-handler.js +++ b/services/vaults/apy/save/polygon-handler.js @@ -34,8 +34,15 @@ const getApyForVault = async (vault) => { const n = 5 * 24 * 365; // Assume trigger compound function 5 times per HOUR const apr = (pricePerFullShareCurrent - pricePerFullShareOneDayAgo) * n; - const apy = (Math.pow((1 + (apr / 100) / n), n) - 1) * 100; - + let apy = (Math.pow((1 + (apr / 100) / n), n) - 1) * 100; + + if(apy === 0) { + // Use back previous value if apy = 0 + const mpApyObj = await apyDb.getApy("daoMPT"); + console.log(`MP Apy Obj ${mpApyObj.moneyPrinterApy}, timestamp: ${mpApyObj.timestamp}`); + apy = mpApyObj.moneyPrinterApy; + } + return { apyInceptionSample: 0, apyOneDaySample: 0, From 44bb168e9be32481bfaac00809fc927254f5d025 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Wed, 11 Aug 2021 17:48:50 +0800 Subject: [PATCH 244/254] Delay polygon's cronjob for 2 minutes. --- services/vaults/apy/save/historical-handle-polygon.js | 2 ++ services/vaults/apy/save/polygon-handler.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/services/vaults/apy/save/historical-handle-polygon.js b/services/vaults/apy/save/historical-handle-polygon.js index de3c64e..71c6732 100644 --- a/services/vaults/apy/save/historical-handle-polygon.js +++ b/services/vaults/apy/save/historical-handle-polygon.js @@ -104,6 +104,8 @@ const saveHistoricalAPY = async (data, collection) => { // Cronjob handler const saveHandler = async() => { try { + await delay(2 * 60 * 1000); // Delay for 2 minutes. + const oneDayAgo = moment().subtract(1, "days").valueOf(); const threeDaysAgo = moment().subtract(3, "days").valueOf(); const oneWeekAgo = moment().subtract(1, "weeks").valueOf(); diff --git a/services/vaults/apy/save/polygon-handler.js b/services/vaults/apy/save/polygon-handler.js index 2e5b1c0..499ee30 100644 --- a/services/vaults/apy/save/polygon-handler.js +++ b/services/vaults/apy/save/polygon-handler.js @@ -87,6 +87,8 @@ const saveVaultWithApy = async (data) => { module.exports.saveHandler = async() => { try { + await delay(2 * 60 * 1000); // Delay for 2 minutes + const oneDayAgo = moment().subtract(1, "days").valueOf(); console.log("Fetching Polygon historical blocks"); From 86b5f9a0dc40787fc61c87131b10296bf0be5787 Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Thu, 12 Aug 2021 23:32:42 +0800 Subject: [PATCH 245/254] update address --- config/serverless/domain.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/serverless/domain.js b/config/serverless/domain.js index 716b140..b9b811b 100644 --- a/config/serverless/domain.js +++ b/config/serverless/domain.js @@ -400,7 +400,7 @@ const mainContracts = { daoMPT: { address: '0x3db93e95c9881bc7d9f2c845ce12e97130ebf5f2', abi: abi.moneyPrinterVaultContract, - strategyAddress: '0x822427cd2a5a69e810301626bb355450a47c60ea', + strategyAddress: '0x4728a38b6b00cdff9fdc59ace8e3c7ef3c6560e5', strategyABI: abi.moneyPrinterStrategyContract, contractType: 'moneyPrinter', tokenId: ["tether", "usd-coin", "dai"], From 3d22db6c01a3ca1545ac006bf435fe2f204653ea Mon Sep 17 00:00:00 2001 From: Soon Lai Date: Thu, 12 Aug 2021 23:34:42 +0800 Subject: [PATCH 246/254] updated strategy info --- services/vaults/apy/save/polygon-vault.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/vaults/apy/save/polygon-vault.js b/services/vaults/apy/save/polygon-vault.js index 59f4fb0..cd00934 100644 --- a/services/vaults/apy/save/polygon-vault.js +++ b/services/vaults/apy/save/polygon-vault.js @@ -39,7 +39,7 @@ const mainVaults = [ erc20address: "0xbd21a10f619be90d6066c941b04e340841f1f989", vaultContractAddress: "0x3db93e95c9881bc7d9f2c845ce12e97130ebf5f2", vaultContractABI: abi.moneyPrinterVaultContract, - strategyContractAddress: "0x822427cd2a5a69e810301626bb355450a47c60ea", + strategyContractAddress: "0x4728a38b6b00cdff9fdc59ace8e3c7ef3c6560e5", strategyABI: abi.moneyPrinterStrategyContract, balance: 0, vaultBalance: 0, @@ -48,7 +48,7 @@ const mainVaults = [ depositAll: true, withdraw: true, withdrawAll: true, - lastMeasurement: 17566349, + lastMeasurement: 17818981, measurement: 1e18, price_id: ["tether", "usd-coin", "dai"], isMoneyPrinter: true, From 326e2f79672570cdc29912eccadd76d7bb129881 Mon Sep 17 00:00:00 2001 From: Soon Lai <43904148+soonlai814@users.noreply.github.com> Date: Fri, 13 Aug 2021 09:03:24 +0800 Subject: [PATCH 247/254] Update whitelist.js --- services/reimbursement/whitelist.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/reimbursement/whitelist.js b/services/reimbursement/whitelist.js index b97502e..e72c3fd 100644 --- a/services/reimbursement/whitelist.js +++ b/services/reimbursement/whitelist.js @@ -2754,6 +2754,8 @@ const whiteList = [ ['0xe9eAf9fe16622A152c8fD3aFB7ad0434D8aC11a3','10000000000000000000000000'], ['0x7BF1ce6D06B20F506f8940860cd05BF1224c12DF','10000000000000000000000000'], ['0x5e7fED05ed07ac9aB6c9dA0Fe6F1AB0Db399fFD1','10000000000000000000000000'], + ['0x50f1D47B777a8DDbe3C4dB75De1Ffd895e62e91D','10000000000000000000000000'], + ['0x33aFD994cAE354Fd701D31d990E40B4a0Da5E9fF','10000000000000000000000001'], ]; module.exports = whiteList; From 571c95e3c7bc5de3eb16ec912d2bd7e8871f8cac Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Fri, 13 Aug 2021 12:42:26 +0800 Subject: [PATCH 248/254] Enhanced cronjob execution sequence. --- jobs/task.js | 124 +++++++++++++----- .../apy/save/historical-handle-polygon.js | 2 - services/vaults/apy/save/polygon-handler.js | 4 +- 3 files changed, 94 insertions(+), 36 deletions(-) diff --git a/jobs/task.js b/jobs/task.js index 5ecbf2d..22782a3 100644 --- a/jobs/task.js +++ b/jobs/task.js @@ -1,4 +1,5 @@ const cron = require("node-cron"); +const delay = require("delay"); const vaultApySave = require("../services/vaults/apy/save/historical-handle"); const vaultPolygonApySave = require("../services/vaults/apy/save/historical-handle-polygon"); const vaultHandlerSave = require("../services/vaults/apy/save/handler"); @@ -11,14 +12,22 @@ const poolSave = require("../services/staking/handler"); const vipDVG = require("../services/staking/vipdvg/handler"); const performanceSave = require("../services/vaults/performance/handler"); +const jobDelayTime = { + saveHistoricalApy: 3 * 60 * 1000, // 3 mins in milliseconds + savePricePerFullShare: 6 * 60 * 1000, // 5 mins in milliseconds + saveHistoricalTVL: 7 * 60 * 1000, // 7 mins + saveVaultApy: 15 * 60 * 1000, // 15 mins + saveABIPools: 18 * 60 * 1000, // 18 mins + savePolygonVaultAPY: 3 * 60 * 1000, // 3 mins in milliseconds; +}; + /** Save Vault **/ const saveVault = async () => { - await vaultSave.handler(); + await saveVaultHandler(); cron.schedule( "0 0 0 * * *", async () => { - console.log("[saveVault]"); - await vaultSave.handler(); + await saveVaultHandler(); }, { scheduled: true, @@ -26,15 +35,21 @@ const saveVault = async () => { } ); }; +const saveVaultHandler = async() => { + console.log(`[saveVault] START: ${new Date().getTime()}`); + await vaultSave.handler(); + console.log(`[saveVault] END: ${new Date().getTime()}`); +} /** Save Vault APY */ const saveVaultAPY = async () => { - await vaultHandlerSave.handler(); + await delay(jobDelayTime.saveVaultApy); + await saveVaultAPYHandler(); + cron.schedule( "0 0 0 * * *", async () => { - console.log("[saveVaultAPY]"); - await vaultHandlerSave.handler(); + await saveVaultAPYHandler(); }, { scheduled: true, @@ -42,15 +57,21 @@ const saveVaultAPY = async () => { } ); }; +const saveVaultAPYHandler = async() => { + console.log(`[saveVaultAPY] START: ${new Date().getTime()}`); + await vaultHandlerSave.handler(); + console.log(`[saveVaultAPY] END: ${new Date().getTime()}`); +} /** Save Vault APY */ const savePolygonVaultAPY = async() => { - await vaultPolygonHandlerSave.saveHandler(); + await delay(jobDelayTime.savePolygonVaultAPY); + await savePolygonVaultAPYHandler();; + cron.schedule( "0 0 0 * * *", async () => { - console.log("[saveVaultAPY Polygon]"); - await vaultPolygonHandlerSave.saveHandler(); + await savePolygonVaultAPYHandler(); }, { scheduled: true, @@ -58,111 +79,152 @@ const savePolygonVaultAPY = async() => { } ); } +const savePolygonVaultAPYHandler = async() => { + console.log(`[saveVaultAPY Polygon] START: ${new Date().getTime()}`); + await vaultPolygonHandlerSave.saveHandler(); + console.log(`[saveVaultAPY Polygon] END: ${new Date().getTime()}`); +} /** Store getPricePerFullShare */ const savePricePerFullShare = async () => { - await priceSave.handler(); + await delay(jobDelayTime.savePricePerFullShare); + await savePricePerFullShareHandler(); + cron.schedule( "*/5 * * * *", async () => { - console.log("[savePricePerFullShare]", new Date().getTime()); - await priceSave.handler(); + await savePricePerFullShareHandler(); }, { scheduled: true, } ); }; +const savePricePerFullShareHandler = async() => { + console.log(`[savePricePerFullShare] START: ${new Date().getTime()}`); + await priceSave.handler(); + console.log(`[savePricePerFullShare] END: ${new Date().getTime()}`); +} /** Store Historical APY */ const saveHistoricalAPY = async () => { - await vaultApySave.saveHandler(); + await delay(jobDelayTime.saveHistoricalApy); + await saveHistoricalApyHandler(); + cron.schedule( "*/5 * * * *", async () => { - console.log("[saveAPY]", new Date().getTime()); - await vaultApySave.saveHandler(); + await saveHistoricalApyHandler(); }, { scheduled: true, } ); }; +const saveHistoricalApyHandler = async() => { + console.log(`[saveHistoricalAPY] START: ${new Date().getTime()}`); + await vaultApySave.saveHandler(); + console.log(`[saveHistoricalAPY] END: ${new Date().getTime()}`); +} /** Store Historical APY For Polygon */ const savePolygonHistoricalAPY = async () => { - await vaultPolygonApySave.saveHandler(); + await savePolygonHistoricalAPYHandler(); cron.schedule( "*/5 * * * *", async () => { - console.log("[savePolygonAPY]", new Date().getTime()); - await vaultPolygonApySave.saveHandler(); + await savePolygonHistoricalAPYHandler(); }, { scheduled: true, } ); } +const savePolygonHistoricalAPYHandler = async () => { + console.log(`[savePolygonHistoricalAPY] START: ${new Date().getTime()}`); + await vaultPolygonApySave.saveHandler(); + console.log(`[savePolygonHistoricalAPY] END: ${new Date().getTime()}`); +} /** Store Historical TVL */ const saveHistoricalTVL = async () => { - await tvlSave.saveAllTVLhandler(); + await delay(jobDelayTime.saveHistoricalTVL); + await saveHistoricalTVLHandler(); + cron.schedule( "*/5 * * * *", async () => { - console.log("[saveTVL]", new Date().getTime()); - await tvlSave.saveAllTVLhandler(); + await saveHistoricalTVLHandler(); }, { scheduled: true, } ); }; +const saveHistoricalTVLHandler = async() => { + console.log(`[saveTVL] START: ${new Date().getTime()}`); + await tvlSave.saveAllTVLhandler(); + console.log(`[saveTVL] END: ${new Date().getTime()}`); +} /** Store Historical Stake Pools */ const saveHistoricalPools = async () => { - await stakeSave.saveStakedPools(); + await saveStakedPoolsHandler(); cron.schedule( "*/5 * * * *", async () => { - console.log("[saveStakedPools]", new Date().getTime()); - await stakeSave.saveStakedPools(); + await saveStakedPoolsHandler(); }, { scheduled: true, } ); }; +const saveStakedPoolsHandler = async() => { + console.log(`[saveStakedPools] START: ${new Date().getTime()}`); + await stakeSave.saveStakedPools(); + console.log(`[saveStakedPools] END: ${new Date().getTime()}`); +} /** Store Stake Pools ABI */ const saveABIPools = async () => { - await poolSave.savePoolInfo(); + await delay(jobDelayTime.saveABIPools); + await saveABIPoolsHandler(); + cron.schedule( - "*/5 * * * *", + "0 2 0 * * *", async () => { - console.log("[savePoolInfo]", new Date().getTime()); - await poolSave.savePoolInfo(); + await saveABIPoolsHandler(); }, { scheduled: true, } ); }; +const saveABIPoolsHandler = async() => { + console.log(`[savePoolInfo] START: ${new Date().getTime()}`); + await poolSave.savePoolInfo(); + console.log(`[savePoolInfo] END: ${new Date().getTime()}`); +} /** Store DAOVIP APR */ const saveVipApr = async () => { - await vipDVG.getVipAPY(); + await saveVipAprHandler(); cron.schedule( "*/5 * * * *", async () => { - console.log("[saveVipApr]", new Date().getTime()); - await vipDVG.getVipAPY(); + await saveVipAprHandler(); }, { scheduled: true, } ); }; +const saveVipAprHandler = async() => { + console.log(`[saveVipApr] START: ${new Date().getTime()}`); + await vipDVG.getVipAPY(); + console.log(`[saveVipApr] END: ${new Date().getTime()}`); +} /** Store Performance */ const savePerformance = async () => { diff --git a/services/vaults/apy/save/historical-handle-polygon.js b/services/vaults/apy/save/historical-handle-polygon.js index 71c6732..de3c64e 100644 --- a/services/vaults/apy/save/historical-handle-polygon.js +++ b/services/vaults/apy/save/historical-handle-polygon.js @@ -104,8 +104,6 @@ const saveHistoricalAPY = async (data, collection) => { // Cronjob handler const saveHandler = async() => { try { - await delay(2 * 60 * 1000); // Delay for 2 minutes. - const oneDayAgo = moment().subtract(1, "days").valueOf(); const threeDaysAgo = moment().subtract(3, "days").valueOf(); const oneWeekAgo = moment().subtract(1, "weeks").valueOf(); diff --git a/services/vaults/apy/save/polygon-handler.js b/services/vaults/apy/save/polygon-handler.js index 499ee30..d338f98 100644 --- a/services/vaults/apy/save/polygon-handler.js +++ b/services/vaults/apy/save/polygon-handler.js @@ -86,9 +86,7 @@ const saveVaultWithApy = async (data) => { }; module.exports.saveHandler = async() => { - try { - await delay(2 * 60 * 1000); // Delay for 2 minutes - + try { const oneDayAgo = moment().subtract(1, "days").valueOf(); console.log("Fetching Polygon historical blocks"); From f904220d59a1dd2b302d7f6d016988e62021b42f Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Mon, 9 Aug 2021 12:01:41 +0800 Subject: [PATCH 249/254] TVL: Amendment on Coingecko API call. (cherry picked from commit 6a238696e5cf4233f22c572148f3291f3ac779cf) --- services/vaults/tvl/handler.js | 40 +++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index 3191ac2..31796a5 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -5,6 +5,14 @@ const CoinGecko = require("coingecko-api"); const CoinGeckoClient = new CoinGecko(); const contractHelper = require('../../../utils/contract'); +const constant = require("../../../utils/constant"); + +let tokens = { + "tether": 0.00, + "dai": 0.00, + "true-usd": 0.00, + "usd-coin": 0.00 +}; const { testContracts, @@ -67,24 +75,28 @@ const getContract = async (vault) => { /** * Get Token price from coingecko */ -const getTokenPrice = async (coingecko_token_id) => { - // console.log(coingecko_token_id); - let data; +const getTokenPrice = async() => { + const tokenIds = Object.keys(tokens); + try { data = await CoinGeckoClient.simple.price({ - ids: coingecko_token_id, + ids: tokenIds, vs_currencies: ["usd"], }); - if (Object.keys(data.data).length != 0) { - return data.data[coingecko_token_id]["usd"]; - } else { - return 1; + + if (data.code == 200 && data.message == 'OK' && data.data) { + const result = data.data; + + tokenIds.map(t => { + tokens[t] = result[t]["usd"]; + }) } - } catch (err) { - // Catch error, Default Value = 1 - console.log(err); + + } catch(err) { + console.log("Error occur in getTokenPrice(): ", err); } -}; + +} const getVipTokenPrice = async (vipTotalSupply, tokenBalOfVipToken, tokenPrice) => { return (tokenBalOfVipToken * tokenPrice) / vipTotalSupply; @@ -121,7 +133,7 @@ const getTVL = async (vault) => { const strategyContract = await getContract(strategy); const poolAmount = await getPoolAmount(strategyContract); - const tokenPrice = await getTokenPrice(tokenId); + const tokenPrice = tokens[tokenId] ? tokens[tokenId] : 0.00; let decimals = 0; if(vault.contractType === 'harvest') { @@ -130,6 +142,7 @@ const getTVL = async (vault) => { } else { decimals = await getDecimals(strategyContract); } + tvl = (poolAmount / 10 ** decimals) * tokenPrice; } @@ -232,6 +245,7 @@ const saveTVL = async (name, tvl) => { // Save All TVLs to database module.exports.saveAllTVLhandler = async () => { + await getTokenPrice(); const tvls = await getAllTVL(); const totalTvl = await getTotalTVL(tvls); await saveTotalTVL(totalTvl); From 812a1f215cd0a9f3f3596c84c03c4e785b060220 Mon Sep 17 00:00:00 2001 From: Phyllice Wai Date: Fri, 13 Aug 2021 20:34:22 +0800 Subject: [PATCH 250/254] Add DAOventures token to vipDVD and vipDVG TVL calculation. --- services/vaults/tvl/handler.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/vaults/tvl/handler.js b/services/vaults/tvl/handler.js index 31796a5..65dd9db 100644 --- a/services/vaults/tvl/handler.js +++ b/services/vaults/tvl/handler.js @@ -11,7 +11,8 @@ let tokens = { "tether": 0.00, "dai": 0.00, "true-usd": 0.00, - "usd-coin": 0.00 + "usd-coin": 0.00, + "daoventures": 0.00 }; const { @@ -86,7 +87,6 @@ const getTokenPrice = async() => { if (data.code == 200 && data.message == 'OK' && data.data) { const result = data.data; - tokenIds.map(t => { tokens[t] = result[t]["usd"]; }) @@ -162,7 +162,7 @@ const getVipTokenTVL = async (vipTokenVault, tokenVault) => { const tokenBalOfVipToken = await getBalance(tokenContract, vipTokenContract._address); const tokenPrice = (tokenId === "daoventures") - ? await getTokenPrice(tokenId) + ? tokens["daoventures"] : 0.225 ; const vipTokenPrice = await getVipTokenPrice(vipTotalSupply, tokenBalOfVipToken, tokenPrice); From 7ca971937158f853caf5de597eb44245f4e9d89e Mon Sep 17 00:00:00 2001 From: Aditya Date: Wed, 8 Sep 2021 12:02:33 +0530 Subject: [PATCH 251/254] Referral Work --- app.js | 27 +- config/db.js | 8 +- docker-compose.yml | 2 +- models/referral-deposit.model.js | 29 + models/referral-withdrawal.model.js | 25 + models/referrals.model.js | 35 + package-lock.json | 4909 ++++++++++++++++++++++++- package.json | 1 + services/referral/deposit/handler.js | 110 + services/referral/handler.js | 30 + services/referral/withdraw/handler.js | 75 + 11 files changed, 5153 insertions(+), 98 deletions(-) create mode 100644 models/referral-deposit.model.js create mode 100644 models/referral-withdrawal.model.js create mode 100644 models/referrals.model.js create mode 100644 services/referral/deposit/handler.js create mode 100644 services/referral/handler.js create mode 100644 services/referral/withdraw/handler.js diff --git a/app.js b/app.js index 290629e..fbd0c77 100644 --- a/app.js +++ b/app.js @@ -12,10 +12,13 @@ const vaultPerformance = require("./services/vaults/performance/handler"); const stakeVIP = require("./services/staking/xdvg/handler"); const stakePool = require("./services/staking/handler"); const stakeXDvg = require("./services/staking/vipdvg/handler"); -const reimbursementAddresses = require("./services/reimbursement/handler") +const reimbursementAddresses = require("./services/reimbursement/handler"); const stakeDaoStakes = require("./services/staking/dao-stake/handler"); const specialEvent = require("./services/user/special-event/handler"); const reimburse = require("./services/user/reimburse/handler"); +const referral = require("./services/referral/handler"); +const deposit = require("./services/referral/deposit/handler"); +const withdraw = require("./services/referral/deposit/handler"); const app = express(); const cors = require("cors"); const port = process.env.PORT || 8080; @@ -80,7 +83,7 @@ async function init() { stakeXDvg.getxDVGStake(req, res) ); app.get("/staking/get-xdvd-stake", (req, res) => { - stakeXDvg.getxDVDStake(req, res) + stakeXDvg.getxDVDStake(req, res); }); app.get("/event/verify", (req, res) => specialEvent.handleVerifyEvent(req, res) @@ -103,7 +106,7 @@ async function init() { app.get("/reimbursement-addresses/dvg/:address", (req, res) => reimbursementAddresses.handler(req, res) ); - + app.get("/vaults/pnl/:farmer/:days", (req, res) => vaultPerformance.pnlHandle(req, res) ); @@ -115,12 +118,24 @@ async function init() { stakePool.snapshotEmergency(req, res) ); - app.get('/user/reimburse-address/:address', (req, res) => + app.get("/user/reimburse-address/:address", (req, res) => reimburse.getReimburseAddress(req, res) ); - app.post('/user/reimburse-address/update', (req, res) => { - reimburse.updateReimburseAddressClaimAmount(req, res) + app.get("/user/:address/:referral", (req, res) => { + referral.addNewReferral(req, res); + }); + + app.get("/user/:referral", (req, res) => { + referral.checkReferral(req, res); + }); + + app.post("/user/:referral/:address", (req, res) => { + referral.addNewReferral(req, res); + }); + + app.post("/user/reimburse-address/update", (req, res) => { + reimburse.updateReimburseAddressClaimAmount(req, res); }); app.use("/api-docs", swaggerUi.serve, swaggerUi.setup(swaggerDocument)); diff --git a/config/db.js b/config/db.js index 9b25eaf..2402bfa 100644 --- a/config/db.js +++ b/config/db.js @@ -11,9 +11,11 @@ const Api = require("../utils/api"); let _db; const connectDB = async (callback) => { - var url = ''; - if (process.env.MONGO_AUTH != '') { - url = `mongodb://${encodeURIComponent(MONGO_USERNAME)}:${encodeURIComponent(MONGO_PASSWORD)}@${MONGO_HOSTNAME}:${MONGO_PORT}/${MONGO_DB}?authMechanism=${AUTH_MECHANISM}`; + var url = ""; + if (process.env.MONGO_AUTH != "") { + url = `mongodb://${encodeURIComponent(MONGO_USERNAME)}:${encodeURIComponent( + MONGO_PASSWORD + )}@${MONGO_HOSTNAME}:${MONGO_PORT}/${MONGO_DB}?authMechanism=${AUTH_MECHANISM}`; } else { url = `mongodb://${MONGO_HOSTNAME}`; } diff --git a/docker-compose.yml b/docker-compose.yml index 0873532..8c6d897 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ services: database: image: mongo container_name: "database" - command: [--auth] + #command: [--auth] restart: always ports: - "27017:27017" diff --git a/models/referral-deposit.model.js b/models/referral-deposit.model.js new file mode 100644 index 0000000..70c8d06 --- /dev/null +++ b/models/referral-deposit.model.js @@ -0,0 +1,29 @@ +const mongo = require("../config/db"); +//const subgraphUrl = process.env.SUBGRAPH_ENDPOINT; +//const polygonSubgraphUrl = process.env.POLYGON_SUBGRAPH_ENDPOINT; + +const collection = "Referral-Deposit"; + +const findAll = async () => { + const db = mongo.getDB(); + return await db.collection(collection).find({}).toArray(); +}; + +const getTransaction = async (transactionID) => { + const db = mongo.getDB(); + return await db.collection(collection).findOne({ + _id: transactionID, + }); +}; + +//Blockchain address, Amount, Referral + +const depositAmount = async (params) => { + return await db.collection(collection).insertOne(params); +}; + +module.exports = { + findAll, + getTransaction, + depositAmount, +}; diff --git a/models/referral-withdrawal.model.js b/models/referral-withdrawal.model.js new file mode 100644 index 0000000..c4d83cc --- /dev/null +++ b/models/referral-withdrawal.model.js @@ -0,0 +1,25 @@ +const mongo = require("../config/db"); + +const collection = "Referral-Withdrawal"; + +const findAll = async () => { + const db = mongo.getDB(); + return await db.collection(collection).find({}).toArray(); +}; + +const getTransaction = async (transactionID) => { + const db = mongo.getDB(); + return await db.collection(collection).findOne({ + _id: transactionID, + }); +}; + +const withdrawAmount = async (params) => { + return await db.collection(collection).insertOne(params); +}; + +module.exports = { + findAll, + getTransaction, + withdrawAmount, +}; diff --git a/models/referrals.model.js b/models/referrals.model.js new file mode 100644 index 0000000..5a52e74 --- /dev/null +++ b/models/referrals.model.js @@ -0,0 +1,35 @@ +const mongo = require("../config/db"); + +const collection = "referrals"; + +//1. Address 2. Code + +const findAll = async () => { + const db = mongo.getDB(); + return await db.collection(collection).find({}).toArray(); +}; + +const findOne = async (params) => { + const db = mongo.getDB(); + return await db.collection(collection).findOne({ + address: params, + }); +}; + +const addReferral = async (params) => { + return await db.collection(collection).insertOne(params); +}; + +const obj1 = { address: "#efg", referral: "adi" }; +const obj2 = { address: "#pqr", referral: "soon" }; +const obj3 = { address: "#xyz", referral: "vic" }; + +addReferral(obj1); +addReferral(obj2); +addReferral(obj3); + +module.exports = { + findAll, + findOne, + addReferral, +}; diff --git a/package-lock.json b/package-lock.json index 293ce03..bfff12b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,24 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@ethereumjs/common": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.4.0.tgz", + "integrity": "sha512-UdkhFWzWcJCZVsj1O/H8/oqj/0RVYjLc1OhPjBrQdALAkQHpCp8xXI4WLnuGTADqTdJZww0NtgwG+TRPkXt27w==", + "requires": { + "crc-32": "^1.2.0", + "ethereumjs-util": "^7.1.0" + } + }, + "@ethereumjs/tx": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.3.0.tgz", + "integrity": "sha512-yTwEj2lVzSMgE6Hjw9Oa1DZks/nKTWM8Wn4ykDNapBPua2f4nXO3qKnni86O6lgDj5fVNRqbDsD0yy7/XNGDEA==", + "requires": { + "@ethereumjs/common": "^2.4.0", + "ethereumjs-util": "^7.1.0" + } + }, "@ethersproject/abi": { "version": "5.4.0", "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.4.0.tgz", @@ -372,145 +390,4860 @@ "@ethersproject/strings": "^5.4.0" } }, + "@hapi/accept": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@hapi/accept/-/accept-3.2.4.tgz", + "integrity": "sha512-soThGB+QMgfxlh0Vzhzlf3ZOEOPk5biEwcOXhkF0Eedqx8VnhGiggL9UYHrIsOb1rUg3Be3K8kp0iDL2wbVSOQ==", + "dev": true, + "requires": { + "@hapi/boom": "7.x.x", + "@hapi/hoek": "8.x.x" + } + }, + "@hapi/address": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz", + "integrity": "sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ==", + "dev": true + }, + "@hapi/ammo": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@hapi/ammo/-/ammo-3.1.2.tgz", + "integrity": "sha512-ej9OtFmiZv1qr45g1bxEZNGyaR4jRpyMxU6VhbxjaYThymvOwsyIsUKMZnP5Qw2tfYFuwqCJuIBHGpeIbdX9gQ==", + "dev": true, + "requires": { + "@hapi/hoek": "8.x.x" + } + }, + "@hapi/b64": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@hapi/b64/-/b64-4.2.1.tgz", + "integrity": "sha512-zqHpQuH5CBMw6hADzKfU/IGNrxq1Q+/wTYV+OiZRQN9F3tMyk+9BUMeBvFRMamduuqL8iSp62QAnJ+7ATiYLWA==", + "dev": true, + "requires": { + "@hapi/hoek": "8.x.x" + } + }, + "@hapi/boom": { + "version": "7.4.11", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", + "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", + "dev": true, + "requires": { + "@hapi/hoek": "8.x.x" + } + }, + "@hapi/bounce": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@hapi/bounce/-/bounce-1.3.2.tgz", + "integrity": "sha512-3bnb1AlcEByFZnpDIidxQyw1Gds81z/1rSqlx4bIEE+wUN0ATj0D49B5cE1wGocy90Rp/de4tv7GjsKd5RQeew==", + "dev": true, + "requires": { + "@hapi/boom": "7.x.x", + "@hapi/hoek": "^8.3.1" + } + }, + "@hapi/bourne": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-1.3.2.tgz", + "integrity": "sha512-1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA==", + "dev": true + }, + "@hapi/call": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/@hapi/call/-/call-5.1.3.tgz", + "integrity": "sha512-5DfWpMk7qZiYhvBhM5oUiT4GQ/O8a2rFR121/PdwA/eZ2C1EsuD547ZggMKAR5bZ+FtxOf0fdM20zzcXzq2mZA==", + "dev": true, + "requires": { + "@hapi/boom": "7.x.x", + "@hapi/hoek": "8.x.x" + } + }, + "@hapi/catbox": { + "version": "10.2.3", + "resolved": "https://registry.npmjs.org/@hapi/catbox/-/catbox-10.2.3.tgz", + "integrity": "sha512-kN9hXO4NYyOHW09CXiuj5qW1syc/0XeVOBsNNk0Tz89wWNQE5h21WF+VsfAw3uFR8swn/Wj3YEVBnWqo82m/JQ==", + "dev": true, + "requires": { + "@hapi/boom": "7.x.x", + "@hapi/hoek": "8.x.x", + "@hapi/joi": "16.x.x", + "@hapi/podium": "3.x.x" + } + }, + "@hapi/catbox-memory": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@hapi/catbox-memory/-/catbox-memory-4.1.1.tgz", + "integrity": "sha512-T6Hdy8DExzG0jY7C8yYWZB4XHfc0v+p1EGkwxl2HoaPYAmW7I3E59M/IvmSVpis8RPcIoBp41ZpO2aZPBpM2Ww==", + "dev": true, + "requires": { + "@hapi/boom": "7.x.x", + "@hapi/hoek": "8.x.x" + } + }, + "@hapi/content": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@hapi/content/-/content-4.1.1.tgz", + "integrity": "sha512-3TWvmwpVPxFSF3KBjKZ8yDqIKKZZIm7VurDSweYpXYENZrJH3C1hd1+qEQW9wQaUaI76pPBLGrXl6I3B7i3ipA==", + "dev": true, + "requires": { + "@hapi/boom": "7.x.x" + } + }, + "@hapi/cryptiles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@hapi/cryptiles/-/cryptiles-4.2.1.tgz", + "integrity": "sha512-XoqgKsHK0l/VpqPs+tr6j6vE+VQ3+2bkF2stvttmc7xAOf1oSAwHcJ0tlp/6MxMysktt1IEY0Csy3khKaP9/uQ==", + "dev": true, + "requires": { + "@hapi/boom": "7.x.x" + } + }, + "@hapi/file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@hapi/file/-/file-1.0.0.tgz", + "integrity": "sha512-Bsfp/+1Gyf70eGtnIgmScvrH8sSypO3TcK3Zf0QdHnzn/ACnAkI6KLtGACmNRPEzzIy+W7aJX5E+1fc9GwIABQ==", + "dev": true + }, + "@hapi/formula": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@hapi/formula/-/formula-1.2.0.tgz", + "integrity": "sha512-UFbtbGPjstz0eWHb+ga/GM3Z9EzqKXFWIbSOFURU0A/Gku0Bky4bCk9/h//K2Xr3IrCfjFNhMm4jyZ5dbCewGA==", + "dev": true + }, + "@hapi/h2o2": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/@hapi/h2o2/-/h2o2-8.3.2.tgz", + "integrity": "sha512-2WkZq+QAkvYHWGqnUuG0stcVeGyv9T7bopBYnCJSUEuvBZlUf2BTX2JCVSKxsnTLOxCYwoC/aI4Rr0ZSRd2oVg==", + "dev": true, + "requires": { + "@hapi/boom": "7.x.x", + "@hapi/hoek": "8.x.x", + "@hapi/joi": "16.x.x", + "@hapi/wreck": "15.x.x" + } + }, + "@hapi/hapi": { + "version": "18.4.1", + "resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-18.4.1.tgz", + "integrity": "sha512-9HjVGa0Z4Qv9jk9AVoUdJMQLA+KuZ+liKWyEEkVBx3e3H1F0JM6aGbPkY9jRfwsITBWGBU2iXazn65SFKSi/tg==", + "dev": true, + "requires": { + "@hapi/accept": "^3.2.4", + "@hapi/ammo": "^3.1.2", + "@hapi/boom": "7.x.x", + "@hapi/bounce": "1.x.x", + "@hapi/call": "^5.1.3", + "@hapi/catbox": "10.x.x", + "@hapi/catbox-memory": "4.x.x", + "@hapi/heavy": "6.x.x", + "@hapi/hoek": "8.x.x", + "@hapi/joi": "15.x.x", + "@hapi/mimos": "4.x.x", + "@hapi/podium": "3.x.x", + "@hapi/shot": "4.x.x", + "@hapi/somever": "2.x.x", + "@hapi/statehood": "6.x.x", + "@hapi/subtext": "^6.1.3", + "@hapi/teamwork": "3.x.x", + "@hapi/topo": "3.x.x" + }, + "dependencies": { + "@hapi/joi": { + "version": "15.1.1", + "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-15.1.1.tgz", + "integrity": "sha512-entf8ZMOK8sc+8YfeOlM8pCfg3b5+WZIKBfUaaJT8UsjAAPjartzxIYm3TIbjvA4u+u++KbcXD38k682nVHDAQ==", + "dev": true, + "requires": { + "@hapi/address": "2.x.x", + "@hapi/bourne": "1.x.x", + "@hapi/hoek": "8.x.x", + "@hapi/topo": "3.x.x" + } + } + } + }, + "@hapi/heavy": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/@hapi/heavy/-/heavy-6.2.2.tgz", + "integrity": "sha512-PY1dCCO6dsze7RlafIRhTaGeyTgVe49A/lSkxbhKGjQ7x46o/OFf7hLiRqTCDh3atcEKf6362EaB3+kTUbCsVA==", + "dev": true, + "requires": { + "@hapi/boom": "7.x.x", + "@hapi/hoek": "8.x.x", + "@hapi/joi": "16.x.x" + } + }, + "@hapi/hoek": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", + "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==", + "dev": true + }, + "@hapi/iron": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/@hapi/iron/-/iron-5.1.4.tgz", + "integrity": "sha512-+ElC+OCiwWLjlJBmm8ZEWjlfzTMQTdgPnU/TsoU5QsktspIWmWi9IU4kU83nH+X/SSya8TP8h8P11Wr5L7dkQQ==", + "dev": true, + "requires": { + "@hapi/b64": "4.x.x", + "@hapi/boom": "7.x.x", + "@hapi/bourne": "1.x.x", + "@hapi/cryptiles": "4.x.x", + "@hapi/hoek": "8.x.x" + } + }, + "@hapi/joi": { + "version": "16.1.8", + "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-16.1.8.tgz", + "integrity": "sha512-wAsVvTPe+FwSrsAurNt5vkg3zo+TblvC5Bb1zMVK6SJzZqw9UrJnexxR+76cpePmtUZKHAPxcQ2Bf7oVHyahhg==", + "dev": true, + "requires": { + "@hapi/address": "^2.1.2", + "@hapi/formula": "^1.2.0", + "@hapi/hoek": "^8.2.4", + "@hapi/pinpoint": "^1.0.2", + "@hapi/topo": "^3.1.3" + } + }, + "@hapi/mimos": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@hapi/mimos/-/mimos-4.1.1.tgz", + "integrity": "sha512-CXoi/zfcTWfKYX756eEea8rXJRIb9sR4d7VwyAH9d3BkDyNgAesZxvqIdm55npQc6S9mU3FExinMAQVlIkz0eA==", + "dev": true, + "requires": { + "@hapi/hoek": "8.x.x", + "mime-db": "1.x.x" + } + }, + "@hapi/nigel": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@hapi/nigel/-/nigel-3.1.1.tgz", + "integrity": "sha512-R9YWx4S8yu0gcCBrMUDCiEFm1SQT895dMlYoeNBp8I6YhF1BFF1iYPueKA2Kkp9BvyHdjmvrxCOns7GMmpl+Fw==", + "dev": true, + "requires": { + "@hapi/hoek": "8.x.x", + "@hapi/vise": "3.x.x" + } + }, + "@hapi/pez": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@hapi/pez/-/pez-4.1.2.tgz", + "integrity": "sha512-8zSdJ8cZrJLFldTgwjU9Fb1JebID+aBCrCsycgqKYe0OZtM2r3Yv3aAwW5z97VsZWCROC1Vx6Mdn4rujh5Ktcg==", + "dev": true, + "requires": { + "@hapi/b64": "4.x.x", + "@hapi/boom": "7.x.x", + "@hapi/content": "^4.1.1", + "@hapi/hoek": "8.x.x", + "@hapi/nigel": "3.x.x" + } + }, + "@hapi/pinpoint": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@hapi/pinpoint/-/pinpoint-1.0.2.tgz", + "integrity": "sha512-dtXC/WkZBfC5vxscazuiJ6iq4j9oNx1SHknmIr8hofarpKUZKmlUVYVIhNVzIEgK5Wrc4GMHL5lZtt1uS2flmQ==", + "dev": true + }, + "@hapi/podium": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/@hapi/podium/-/podium-3.4.3.tgz", + "integrity": "sha512-QJlnYLEYZWlKQ9fSOtuUcpANyoVGwT68GA9P0iQQCAetBK0fI+nbRBt58+aMixoifczWZUthuGkNjqKxgPh/CQ==", + "dev": true, + "requires": { + "@hapi/hoek": "8.x.x", + "@hapi/joi": "16.x.x" + } + }, + "@hapi/shot": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@hapi/shot/-/shot-4.1.2.tgz", + "integrity": "sha512-6LeHLjvsq/bQ0R+fhEyr7mqExRGguNTrxFZf5DyKe3CK6pNabiGgYO4JVFaRrLZ3JyuhkS0fo8iiRE2Ql2oA/A==", + "dev": true, + "requires": { + "@hapi/hoek": "8.x.x", + "@hapi/joi": "16.x.x" + } + }, + "@hapi/somever": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@hapi/somever/-/somever-2.1.1.tgz", + "integrity": "sha512-cic5Sto4KGd9B0oQSdKTokju+rYhCbdpzbMb0EBnrH5Oc1z048hY8PaZ1lx2vBD7I/XIfTQVQetBH57fU51XRA==", + "dev": true, + "requires": { + "@hapi/bounce": "1.x.x", + "@hapi/hoek": "8.x.x" + } + }, + "@hapi/statehood": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/@hapi/statehood/-/statehood-6.1.2.tgz", + "integrity": "sha512-pYXw1x6npz/UfmtcpUhuMvdK5kuOGTKcJNfLqdNptzietK2UZH5RzNJSlv5bDHeSmordFM3kGItcuQWX2lj2nQ==", + "dev": true, + "requires": { + "@hapi/boom": "7.x.x", + "@hapi/bounce": "1.x.x", + "@hapi/bourne": "1.x.x", + "@hapi/cryptiles": "4.x.x", + "@hapi/hoek": "8.x.x", + "@hapi/iron": "5.x.x", + "@hapi/joi": "16.x.x" + } + }, + "@hapi/subtext": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@hapi/subtext/-/subtext-6.1.3.tgz", + "integrity": "sha512-qWN6NbiHNzohVcJMeAlpku/vzbyH4zIpnnMPMPioQMwIxbPFKeNViDCNI6fVBbMPBiw/xB4FjqiJkRG5P9eWWg==", + "dev": true, + "requires": { + "@hapi/boom": "7.x.x", + "@hapi/bourne": "1.x.x", + "@hapi/content": "^4.1.1", + "@hapi/file": "1.x.x", + "@hapi/hoek": "8.x.x", + "@hapi/pez": "^4.1.2", + "@hapi/wreck": "15.x.x" + } + }, + "@hapi/teamwork": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@hapi/teamwork/-/teamwork-3.3.1.tgz", + "integrity": "sha512-61tiqWCYvMKP7fCTXy0M4VE6uNIwA0qvgFoiDubgfj7uqJ0fdHJFQNnVPGrxhLWlwz0uBPWrQlBH7r8y9vFITQ==", + "dev": true + }, + "@hapi/topo": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.6.tgz", + "integrity": "sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ==", + "dev": true, + "requires": { + "@hapi/hoek": "^8.3.0" + } + }, + "@hapi/vise": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@hapi/vise/-/vise-3.1.1.tgz", + "integrity": "sha512-OXarbiCSadvtg+bSdVPqu31Z1JoBL+FwNYz3cYoBKQ5xq1/Cr4A3IkGpAZbAuxU5y4NL5pZFZG3d2a3ZGm/dOQ==", + "dev": true, + "requires": { + "@hapi/hoek": "8.x.x" + } + }, + "@hapi/wreck": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/@hapi/wreck/-/wreck-15.1.0.tgz", + "integrity": "sha512-tQczYRTTeYBmvhsek/D49En/5khcShaBEmzrAaDjMrFXKJRuF8xA8+tlq1ETLBFwGd6Do6g2OC74rt11kzawzg==", + "dev": true, + "requires": { + "@hapi/boom": "7.x.x", + "@hapi/bourne": "1.x.x", + "@hapi/hoek": "8.x.x" + } + }, + "@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==" + }, + "@szmarczak/http-timer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "requires": { + "defer-to-connect": "^1.0.1" + } + }, + "@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "requires": { + "@types/node": "*" + } + }, + "@types/node": { + "version": "12.20.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.19.tgz", + "integrity": "sha512-niAuZrwrjKck4+XhoCw6AAVQBENHftpXw9F4ryk66fTgYaKQ53R4FI7c9vUGGw5vQis1HKBHDR1gcYI/Bq1xvw==" + }, + "@types/pbkdf2": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", + "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", + "requires": { + "@types/node": "*" + } + }, + "@types/retry": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.1.tgz", + "integrity": "sha512-xoDlM2S4ortawSWORYqsdU+2rxdh4LRW9ytc3zmT37RIKQh6IHyKwwtKhKis9ah8ol07DCkZxPt8BBvPjC6v4g==", + "dev": true + }, + "@types/secp256k1": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.3.tgz", + "integrity": "sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w==", + "requires": { + "@types/node": "*" + } + }, + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, "aes-js": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-align": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz", + "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==", + "dev": true, + "requires": { + "string-width": "^3.0.0" + }, + "dependencies": { + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + } + } + }, + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, + "requires": { + "lodash": "^4.17.14" + } + }, + "async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true + }, + "available-typed-arrays": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.4.tgz", + "integrity": "sha512-SA5mXJWrId1TaQjfxUYghbqQ/hYioKmLJvPJyDuYRtXXenFNMjj4hSSt1Cf1xsuXSXrtxrVC5Ot4eU6cOtBDdA==" + }, + "aws-sdk": { + "version": "2.970.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.970.0.tgz", + "integrity": "sha512-9+ktvE5xgpHr3RsFOcq1SrhXLvU+jUji44jbecFZb5C2lzoEEB29aeN39OLJMW0ZuOrR+3TNum8c3f8YVx6A7w==", + "dev": true, + "requires": { + "buffer": "4.9.2", + "events": "1.1.1", + "ieee754": "1.1.13", + "jmespath": "0.15.0", + "querystring": "0.2.0", + "sax": "1.2.1", + "url": "0.10.3", + "uuid": "3.3.2", + "xml2js": "0.4.19" + }, + "dependencies": { + "buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", + "dev": true + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + } + } + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + }, + "axios": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", + "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", + "requires": { + "follow-redirects": "^1.10.0" + } + }, + "base-x": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", + "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "requires": { + "tweetnacl": "^0.14.3" + } + }, "bech32": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" }, + "bignumber": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/bignumber/-/bignumber-1.1.0.tgz", + "integrity": "sha1-5qsKdD2l8+oBjlwXWX0SH3howVk=" + }, + "bignumber.js": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", + "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==" + }, + "bl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", + "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "blakejs": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.1.tgz", + "integrity": "sha512-bLG6PHOCZJKNshTjGRBvET0vTciwQE6zFKOKKXPDJfwFBd4Ac0yBfPZqcGvGJap50l7ktvlpFqc2jGVaUgbJgg==" + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" + }, "bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, + "body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "requires": { + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" + } + }, + "boxen": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.0.1.tgz", + "integrity": "sha512-49VBlw+PrWEF51aCmy7QIteYPIFZxSpvqBdP/2itCPPlJ49kj9zg/XPRFrdkne2W+CfwXUls8exMvu1RysZpKA==", + "dev": true, + "requires": { + "ansi-align": "^3.0.0", + "camelcase": "^6.2.0", + "chalk": "^4.1.0", + "cli-boxes": "^2.2.1", + "string-width": "^4.2.0", + "type-fest": "^0.20.2", + "widest-line": "^3.1.0", + "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" }, - "coingecko-api": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/coingecko-api/-/coingecko-api-1.0.10.tgz", - "integrity": "sha512-7YLLC85+daxAw5QlBWoHVBVpJRwoPr4HtwanCr8V/WRjoyHTa1Lb9DQAvv4MDJZHiz4no6HGnDQnddtjV35oRA==" + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } }, - "elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", "requires": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" } }, - "ethereum-block-by-date": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ethereum-block-by-date/-/ethereum-block-by-date-1.4.0.tgz", - "integrity": "sha512-3D+6esxU9bQDyFev9/9C6+Wqpb+HdSyeKnAhktIZXOQjgPdGRc4zwr/FdrgMfrJlB9Ee4cG9psu7eCgYQ3szaA==", + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", "requires": { - "moment": "^2.29.1" + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "requires": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" }, "dependencies": { - "moment": { - "version": "2.29.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", - "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==" + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==" } } }, - "ethers": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.4.1.tgz", - "integrity": "sha512-SrcddMdCgP1hukDvCPd87Aipbf4NWjQvdfAbZ65XSZGbfyuYPtIrUJPDH5B1SBRsdlfiEgX3eoz28DdBDzMNFg==", + "browserify-sign": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", "requires": { - "@ethersproject/abi": "5.4.0", - "@ethersproject/abstract-provider": "5.4.0", - "@ethersproject/abstract-signer": "5.4.0", - "@ethersproject/address": "5.4.0", - "@ethersproject/base64": "5.4.0", - "@ethersproject/basex": "5.4.0", - "@ethersproject/bignumber": "5.4.0", - "@ethersproject/bytes": "5.4.0", - "@ethersproject/constants": "5.4.0", - "@ethersproject/contracts": "5.4.0", - "@ethersproject/hash": "5.4.0", - "@ethersproject/hdnode": "5.4.0", - "@ethersproject/json-wallets": "5.4.0", - "@ethersproject/keccak256": "5.4.0", - "@ethersproject/logger": "5.4.0", - "@ethersproject/networks": "5.4.1", - "@ethersproject/pbkdf2": "5.4.0", - "@ethersproject/properties": "5.4.0", - "@ethersproject/providers": "5.4.1", - "@ethersproject/random": "5.4.0", - "@ethersproject/rlp": "5.4.0", - "@ethersproject/sha2": "5.4.0", - "@ethersproject/signing-key": "5.4.0", - "@ethersproject/solidity": "5.4.0", - "@ethersproject/strings": "5.4.0", - "@ethersproject/transactions": "5.4.0", - "@ethersproject/units": "5.4.0", - "@ethersproject/wallet": "5.4.0", - "@ethersproject/web": "5.4.0", - "@ethersproject/wordlists": "5.4.0" + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==" + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + } } }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" + "base-x": "^3.0.2" } }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "requires": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "bson": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.6.tgz", + "integrity": "sha512-EvVNVeGo4tHxwi8L6bPj3y3itEvStdwvvlojVxxbyYfoaxJ6keLgrTuKdyfEAszFK+H3olzBuafE0yoh0D1gdg==" + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=", + "dev": true + }, + "buffer-to-arraybuffer": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", + "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=" + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + }, + "bufferutil": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.3.tgz", + "integrity": "sha512-yEYTwGndELGvfXsImMBLop58eaGW+YdONi1fNjTINSY98tmMmFijBG6WXgdkfuLNt4imzQNtIE+eBp1PVpMCSw==", + "requires": { + "node-gyp-build": "^4.2.0" + } + }, + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" + }, + "cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" + }, + "dependencies": { + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "requires": { + "pump": "^3.0.0" + } + }, + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==" + } + } + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "camelcase": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + }, + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, + "cids": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz", + "integrity": "sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==", + "requires": { + "buffer": "^5.5.0", + "class-is": "^1.1.0", + "multibase": "~0.6.0", + "multicodec": "^1.0.0", + "multihashes": "~0.4.15" + }, + "dependencies": { + "multicodec": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", + "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==", + "requires": { + "buffer": "^5.6.0", + "varint": "^5.0.0" + } + } + } + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "class-is": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", + "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==" + }, + "cli-boxes": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", + "dev": true + }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "requires": { + "mimic-response": "^1.0.0" + } + }, + "coingecko-api": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/coingecko-api/-/coingecko-api-1.0.10.tgz", + "integrity": "sha512-7YLLC85+daxAw5QlBWoHVBVpJRwoPr4HtwanCr8V/WRjoyHTa1Lb9DQAvv4MDJZHiz4no6HGnDQnddtjV35oRA==" + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "configstore": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", + "dev": true, + "requires": { + "dot-prop": "^5.2.0", + "graceful-fs": "^4.1.2", + "make-dir": "^3.0.0", + "unique-string": "^2.0.0", + "write-file-atomic": "^3.0.0", + "xdg-basedir": "^4.0.0" + } + }, + "content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "requires": { + "safe-buffer": "5.1.2" + } + }, + "content-hash": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/content-hash/-/content-hash-2.5.2.tgz", + "integrity": "sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==", + "requires": { + "cids": "^0.7.1", + "multicodec": "^0.5.5", + "multihashes": "^0.4.15" + } + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "cookiejar": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, + "crc-32": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.0.tgz", + "integrity": "sha512-1uBwHxF+Y/4yF5G48fwnKq6QsIXheor3ZLPT80yGBV1oEUwpPojlEhQbWKVw1VwcTQyMGHK1/XMmTjmlsmTTGA==", + "requires": { + "exit-on-epipe": "~1.0.1", + "printj": "~1.1.0" + } + }, + "create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "cron-parser": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-2.18.0.tgz", + "integrity": "sha512-s4odpheTyydAbTBQepsqd2rNWGa2iV3cyo8g7zbI2QQYGLVsfbhmwukayS1XHppe02Oy1fg7mg6xoaraVJeEcg==", + "dev": true, + "requires": { + "is-nan": "^1.3.0", + "moment-timezone": "^0.5.31" + } + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "crypto-random-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", + "dev": true + }, + "cuid": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/cuid/-/cuid-2.1.8.tgz", + "integrity": "sha512-xiEMER6E7TlTPnDxrM4eRiC6TRgjNX9xzEZ5U/Se2YJKr7Mq4pJn/2XEHjl3STcSh96GmkHPcBXLES8M29wyyg==", + "dev": true + }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "requires": { + "mimic-response": "^1.0.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true + }, + "defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==" + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "requires": { + "object-keys": "^1.0.12" + } + }, + "delay": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/delay/-/delay-4.4.1.tgz", + "integrity": "sha512-aL3AhqtfhOlT/3ai6sWXeqwnw63ATNpnUiN4HL7x9q+My5QtHlO3OIkasmug9LKzpheLdmUKGRKnYXYAS7FQkQ==" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "denque": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.0.tgz", + "integrity": "sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ==" + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "dom-walk": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", + "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==" + }, + "dot-prop": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", + "dev": true, + "requires": { + "is-obj": "^2.0.0" + } + }, + "dotenv": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz", + "integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==" + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "requires": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "requires": { + "once": "^1.4.0" + } + }, + "es-abstract": { + "version": "1.18.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.5.tgz", + "integrity": "sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==", + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.3", + "is-string": "^1.0.6", + "object-inspect": "^1.11.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "es5-ext": { + "version": "0.10.53", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", + "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.3", + "next-tick": "~1.0.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "requires": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "escape-goat": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", + "dev": true + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "eth-ens-namehash": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", + "integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=", + "requires": { + "idna-uts46-hx": "^2.3.1", + "js-sha3": "^0.5.7" + } + }, + "eth-lib": { + "version": "0.1.29", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", + "integrity": "sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==", + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "nano-json-stream-parser": "^0.1.2", + "servify": "^0.1.12", + "ws": "^3.0.0", + "xhr-request-promise": "^0.1.2" + }, + "dependencies": { + "ws": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", + "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", + "requires": { + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" + } + } + } + }, + "ethereum-block-by-date": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ethereum-block-by-date/-/ethereum-block-by-date-1.4.0.tgz", + "integrity": "sha512-3D+6esxU9bQDyFev9/9C6+Wqpb+HdSyeKnAhktIZXOQjgPdGRc4zwr/FdrgMfrJlB9Ee4cG9psu7eCgYQ3szaA==", + "requires": { + "moment": "^2.29.1" + }, + "dependencies": { + "moment": { + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", + "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==" + } + } + }, + "ethereum-bloom-filters": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz", + "integrity": "sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==", + "requires": { + "js-sha3": "^0.8.0" + }, + "dependencies": { + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + } + } + }, + "ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "requires": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "ethereumjs-util": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.0.tgz", + "integrity": "sha512-kR+vhu++mUDARrsMMhsjjzPduRVAeundLGXucGRHF3B4oEltOUspfgCVco4kckucj3FMlLaZHUl9n7/kdmr6Tw==", + "requires": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.4" + }, + "dependencies": { + "@types/bn.js": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", + "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", + "requires": { + "@types/node": "*" + } + }, + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==" + } + } + }, + "ethers": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.4.1.tgz", + "integrity": "sha512-SrcddMdCgP1hukDvCPd87Aipbf4NWjQvdfAbZ65XSZGbfyuYPtIrUJPDH5B1SBRsdlfiEgX3eoz28DdBDzMNFg==", + "requires": { + "@ethersproject/abi": "5.4.0", + "@ethersproject/abstract-provider": "5.4.0", + "@ethersproject/abstract-signer": "5.4.0", + "@ethersproject/address": "5.4.0", + "@ethersproject/base64": "5.4.0", + "@ethersproject/basex": "5.4.0", + "@ethersproject/bignumber": "5.4.0", + "@ethersproject/bytes": "5.4.0", + "@ethersproject/constants": "5.4.0", + "@ethersproject/contracts": "5.4.0", + "@ethersproject/hash": "5.4.0", + "@ethersproject/hdnode": "5.4.0", + "@ethersproject/json-wallets": "5.4.0", + "@ethersproject/keccak256": "5.4.0", + "@ethersproject/logger": "5.4.0", + "@ethersproject/networks": "5.4.1", + "@ethersproject/pbkdf2": "5.4.0", + "@ethersproject/properties": "5.4.0", + "@ethersproject/providers": "5.4.1", + "@ethersproject/random": "5.4.0", + "@ethersproject/rlp": "5.4.0", + "@ethersproject/sha2": "5.4.0", + "@ethersproject/signing-key": "5.4.0", + "@ethersproject/solidity": "5.4.0", + "@ethersproject/strings": "5.4.0", + "@ethersproject/transactions": "5.4.0", + "@ethersproject/units": "5.4.0", + "@ethersproject/wallet": "5.4.0", + "@ethersproject/web": "5.4.0", + "@ethersproject/wordlists": "5.4.0" + } + }, + "ethjs-unit": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", + "integrity": "sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk=", + "requires": { + "bn.js": "4.11.6", + "number-to-bn": "1.7.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + } + } + }, + "ethjs-util": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", + "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "requires": { + "is-hex-prefixed": "1.0.0", + "strip-hex-prefix": "1.0.0" + } + }, + "eventemitter3": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", + "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==" + }, + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "dev": true + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "dependencies": { + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + } + } + }, + "exit-on-epipe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz", + "integrity": "sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw==" + }, + "express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "requires": { + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", + "content-type": "~1.0.4", + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.1.2", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + } + }, + "ext": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", + "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", + "requires": { + "type": "^2.0.0" + }, + "dependencies": { + "type": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz", + "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==" + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + } + }, + "follow-redirects": { + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.2.tgz", + "integrity": "sha512-yLR6WaE2lbF0x4K2qE2p9PEXKLDjUjnR/xmjS3wHAYxtlsI9MLLBJUZirAHKzUZDGLxje7w/cXR49WOUo4rbsA==" + }, + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==" + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "fs-extra": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs-minipass": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "requires": { + "minipass": "^2.6.0" + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "requires": { + "pump": "^3.0.0" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "global": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", + "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", + "requires": { + "min-document": "^2.19.0", + "process": "^0.11.10" + } + }, + "global-dirs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", + "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", + "dev": true, + "requires": { + "ini": "2.0.0" + } + }, + "got": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "requires": { + "@sindresorhus/is": "^0.14.0", + "@szmarczak/http-timer": "^1.1.2", + "cacheable-request": "^6.0.0", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^4.1.0", + "lowercase-keys": "^1.0.1", + "mimic-response": "^1.0.1", + "p-cancelable": "^1.0.0", + "to-readable-stream": "^1.0.0", + "url-parse-lax": "^3.0.0" + } + }, + "graceful-fs": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==" + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbol-support-x": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==" + }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" + }, + "has-to-string-tag-x": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "requires": { + "has-symbol-support-x": "^1.4.1" + } + }, + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "requires": { + "has-symbols": "^1.0.2" + } + }, + "has-yarn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", + "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", + "dev": true + }, + "hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "requires": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + } + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "helmet": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/helmet/-/helmet-4.6.0.tgz", + "integrity": "sha512-HVqALKZlR95ROkrnesdhbbZJFi/rIVSoNq6f3jA/9u6MIbTsPh3xZwihjeI5+DO/2sOV6HMHooXcEOuwskHpTg==" + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" + }, + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + } + } + }, + "http-https": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", + "integrity": "sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs=" + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "idna-uts46-hx": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", + "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", + "requires": { + "punycode": "2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", + "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=" + } + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, + "immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=", + "dev": true + }, + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "dev": true + }, + "internal-slot": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "requires": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + } + }, + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" + }, + "is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "requires": { + "has-bigints": "^1.0.1" + } + }, + "is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-callable": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==" + }, + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dev": true, + "requires": { + "ci-info": "^2.0.0" + } + }, + "is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-function": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", + "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==" + }, + "is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" + }, + "is-installed-globally": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", + "dev": true, + "requires": { + "global-dirs": "^3.0.0", + "is-path-inside": "^3.0.2" + } + }, + "is-nan": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", + "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + } + }, + "is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==" + }, + "is-npm": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", + "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==", + "dev": true + }, + "is-number-object": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", + "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "dev": true + }, + "is-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", + "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==" + }, + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" + }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-retry-allowed": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==" + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "requires": { + "has-symbols": "^1.0.2" + } + }, + "is-typed-array": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.7.tgz", + "integrity": "sha512-VxlpTBGknhQ3o7YiVjIhdLU6+oD8dPz/79vvvH4F+S/c8608UCVa9fgDpa1kZgFoUST2DCgacc70UszKgzKuvA==", + "requires": { + "available-typed-arrays": "^1.0.4", + "call-bind": "^1.0.2", + "es-abstract": "^1.18.5", + "foreach": "^2.0.5", + "has-tostringtag": "^1.0.0" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "is-yarn-global": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", + "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "isurl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "requires": { + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" + } + }, + "java-invoke-local": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/java-invoke-local/-/java-invoke-local-0.0.6.tgz", + "integrity": "sha512-gZmQKe1QrfkkMjCn8Qv9cpyJFyogTYqkP5WCobX5RNaHsJzIV/6NvAnlnouOcwKr29QrxLGDGcqYuJ+ae98s1A==", + "dev": true + }, + "jmespath": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz", + "integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=", + "dev": true + }, + "js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + }, + "js-string-escape": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz", + "integrity": "sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8=", + "dev": true + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=" + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsonpath-plus": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-5.1.0.tgz", + "integrity": "sha512-890w2Pjtj0iswAxalRlt2kHthi6HKrXEfZcn+ZNZptv7F3rUGIeDuZo+C+h4vXBHLEsVjJrHeCm35nYeZLzSBQ==", + "dev": true + }, + "jsonschema": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.0.tgz", + "integrity": "sha512-/YgW6pRMr6M7C+4o8kS+B/2myEpHCrxO4PEWnqJNBFMjn7EWXqlQ4tGwL6xTHeRplwuZmcAncdvfOad1nT2yMw==", + "dev": true + }, + "jsonwebtoken": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", + "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "dev": true, + "requires": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^5.6.0" + }, + "dependencies": { + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "jszip": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.7.1.tgz", + "integrity": "sha512-ghL0tz1XG9ZEmRMcEN2vt7xabrDdqHHeykgARpmZ0BiIctWxM47Vt63ZO2dnp4QYt/xJVLLy5Zv1l/xRdh2byg==", + "dev": true, + "requires": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "set-immediate-shim": "~1.0.1" + } + }, + "jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dev": true, + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dev": true, + "requires": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "keccak": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz", + "integrity": "sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==", + "requires": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + } + }, + "keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "requires": { + "json-buffer": "3.0.0" + } + }, + "latest-version": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", + "dev": true, + "requires": { + "package-json": "^6.3.0" + } + }, + "lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "dev": true, + "requires": { + "immediate": "~3.0.5" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=", + "dev": true + }, + "lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=", + "dev": true + }, + "lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=", + "dev": true + }, + "lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=", + "dev": true + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", + "dev": true + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=", + "dev": true + }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=", + "dev": true + }, + "long-timeout": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/long-timeout/-/long-timeout-0.1.1.tgz", + "integrity": "sha1-lyHXiLR+C8taJMLivuGg2lXatRQ=", + "dev": true + }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + }, + "dependencies": { + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "luxon": { + "version": "1.28.0", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-1.28.0.tgz", + "integrity": "sha512-TfTiyvZhwBYM/7QdAVDh+7dBTBA29v4ik0Ce9zda3Mnf8on1S5KJI8P2jKFZ8+5C0jhmr0KwJEO/Wdpm0VeWJQ==", + "dev": true + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "map-age-cleaner": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", + "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "dev": true, + "requires": { + "p-defer": "^1.0.0" + } + }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "mem": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/mem/-/mem-6.1.1.tgz", + "integrity": "sha512-Ci6bIfq/UgcxPTYa8dQQ5FY3BzKkT894bwXWXxC/zqs0XgMO2cT20CGkOqda7gZNkmK5VP4x89IGZ6K7hfbn3Q==", + "dev": true, + "requires": { + "map-age-cleaner": "^0.1.3", + "mimic-fn": "^3.0.0" + }, + "dependencies": { + "mimic-fn": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-3.1.0.tgz", + "integrity": "sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ==", + "dev": true + } + } + }, + "memory-pager": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", + "optional": true + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "mime-db": { + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", + "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==" + }, + "mime-types": { + "version": "2.1.32", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", + "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", + "requires": { + "mime-db": "1.49.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" + }, + "min-document": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", + "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", + "requires": { + "dom-walk": "^0.1.0" + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "minipass": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "requires": { + "minipass": "^2.9.0" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "mkdirp-promise": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", + "integrity": "sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE=", + "requires": { + "mkdirp": "*" + } + }, + "mock-fs": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.14.0.tgz", + "integrity": "sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==" + }, + "moment": { + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", + "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==" + }, + "moment-timezone": { + "version": "0.5.33", + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.33.tgz", + "integrity": "sha512-PTc2vcT8K9J5/9rDEPe5czSIKgLoGsH8UNpA4qZTVw0Vd/Uz19geE9abbIOQKaAQFcnQ3v5YEXrbSc5BpshH+w==", + "dev": true, + "requires": { + "moment": ">= 2.9.0" + } + }, + "mongodb": { + "version": "3.6.11", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.11.tgz", + "integrity": "sha512-4Y4lTFHDHZZdgMaHmojtNAlqkvddX2QQBEN0K//GzxhGwlI9tZ9R0vhbjr1Decw+TF7qK0ZLjQT292XgHRRQgw==", + "requires": { + "bl": "^2.2.1", + "bson": "^1.1.4", + "denque": "^1.4.1", + "optional-require": "^1.0.3", + "safe-buffer": "^5.1.2", + "saslprep": "^1.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "multibase": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.6.1.tgz", + "integrity": "sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==", + "requires": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + } + }, + "multicodec": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.5.7.tgz", + "integrity": "sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==", + "requires": { + "varint": "^5.0.0" + } + }, + "multihashes": { + "version": "0.4.21", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.21.tgz", + "integrity": "sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==", + "requires": { + "buffer": "^5.5.0", + "multibase": "^0.7.0", + "varint": "^5.0.0" + }, + "dependencies": { + "multibase": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz", + "integrity": "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==", + "requires": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + } + } + } + }, + "nano-json-stream-parser": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz", + "integrity": "sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18=" + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + }, + "node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" + }, + "node-cron": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/node-cron/-/node-cron-2.0.3.tgz", + "integrity": "sha512-eJI+QitXlwcgiZwNNSRbqsjeZMp5shyajMR81RZCqeW0ZDEj4zU9tpd4nTh/1JsBiKbF8d08FCewiipDmVIYjg==", + "requires": { + "opencollective-postinstall": "^2.0.0", + "tz-offset": "0.0.1" + } + }, + "node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" + }, + "node-gyp-build": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz", + "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==" + }, + "node-schedule": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/node-schedule/-/node-schedule-1.3.3.tgz", + "integrity": "sha512-uF9Ubn6luOPrcAYKfsXWimcJ1tPFtQ8I85wb4T3NgJQrXazEzojcFZVk46ZlLHby3eEJChgkV/0T689IsXh2Gw==", + "dev": true, + "requires": { + "cron-parser": "^2.18.0", + "long-timeout": "0.1.1", + "sorted-array-functions": "^1.3.0" + } + }, + "normalize-url": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", + "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==" + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "number-to-bn": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", + "integrity": "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=", + "requires": { + "bn.js": "4.11.6", + "strip-hex-prefix": "1.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + } + } + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "object-hash": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz", + "integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==", + "dev": true + }, + "object-inspect": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==" + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, + "object.fromentries": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.4.tgz", + "integrity": "sha512-EsFBshs5RUUpQEY1D4q/m59kMfz4YJvxuNCJcv/jWwOJr34EaVnG11ZrZa0UHB3wnzV1wx8m58T4hQL8IuNXlQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.2", + "has": "^1.0.3" + } + }, + "oboe": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.5.tgz", + "integrity": "sha1-VVQoTFQ6ImbXo48X4HOCH73jk80=", + "requires": { + "http-https": "^1.0.0" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "opencollective-postinstall": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz", + "integrity": "sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==" + }, + "optional-require": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/optional-require/-/optional-require-1.1.7.tgz", + "integrity": "sha512-cIeRZocXsZnZYn+SevbtSqNlLbeoS4mLzuNn4fvXRMDRNhTGg0sxuKXl0FnZCtnew85LorNxIbZp5OeliILhMw==", + "requires": { + "require-at": "^1.0.6" + } + }, + "p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==" + }, + "p-defer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + }, + "p-memoize": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/p-memoize/-/p-memoize-4.0.1.tgz", + "integrity": "sha512-km0sP12uE0dOZ5qP+s7kGVf07QngxyG0gS8sYFvFWhqlgzOsSy+m71aUejf/0akxj5W7gE//2G74qTv6b4iMog==", + "dev": true, + "requires": { + "mem": "^6.0.1", + "mimic-fn": "^3.0.0" + }, + "dependencies": { + "mimic-fn": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-3.1.0.tgz", + "integrity": "sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ==", + "dev": true + } + } + }, + "p-queue": { + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-6.6.2.tgz", + "integrity": "sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==", + "dev": true, + "requires": { + "eventemitter3": "^4.0.4", + "p-timeout": "^3.2.0" + }, + "dependencies": { + "p-timeout": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", + "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", + "dev": true, + "requires": { + "p-finally": "^1.0.0" + } + } + } + }, + "p-retry": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.1.tgz", + "integrity": "sha512-e2xXGNhZOZ0lfgR9kL34iGlU8N/KO0xZnQxVEwdeOvpqNDQfdnxIYizvWtK8RglUa3bGqI8g0R/BdfzLMxRkiA==", + "dev": true, + "requires": { + "@types/retry": "^0.12.0", + "retry": "^0.13.1" + } + }, + "p-timeout": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", + "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", + "requires": { + "p-finally": "^1.0.0" + } + }, + "package-json": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", + "dev": true, + "requires": { + "got": "^9.6.0", + "registry-auth-token": "^4.0.0", + "registry-url": "^5.0.0", + "semver": "^6.2.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, + "parse-asn1": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "requires": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "parse-headers": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.4.tgz", + "integrity": "sha512-psZ9iZoCNFLrgRjZ1d8mn0h9WRqJwFxM9q3x7iUjN/YT2OksthDJ5TiPCu2F38kS4zutqfW+YdVVkBZZx3/1aw==" + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "please-upgrade-node": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", + "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", + "dev": true, + "requires": { + "semver-compare": "^1.0.0" + } + }, + "portfinder": { + "version": "1.0.28", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", + "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", + "dev": true, + "requires": { + "async": "^2.6.2", + "debug": "^3.1.1", + "mkdirp": "^0.5.5" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + } + } + }, + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" + }, + "printj": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/printj/-/printj-1.1.2.tgz", + "integrity": "sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ==" + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "requires": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + } + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "pupa": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", + "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", + "dev": true, + "requires": { + "escape-goat": "^2.0.0" + } + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + }, + "query-string": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "requires": { + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "ramda": { + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.1.tgz", + "integrity": "sha512-PgIdVpn5y5Yns8vqb8FzBUEYn98V3xcPgawAkkgj0YJ0qDsnHCiNmZYfOGMgOvoB0eWFLpYbhxUR3mxfDIMvpw==" + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + }, + "raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "requires": { + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + } + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "registry-auth-token": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", + "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", + "dev": true, + "requires": { + "rc": "^1.2.8" + } + }, + "registry-url": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", + "dev": true, + "requires": { + "rc": "^1.2.8" + } + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + } + } + }, + "require-at": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/require-at/-/require-at-1.0.6.tgz", + "integrity": "sha512-7i1auJbMUrXEAZCOQ0VNJgmcT2VOKPRl2YGJwgpHpC9CE91Mv4/4UYIUm4chGJaI381ZDq1JUicFii64Hapd8g==" + }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "requires": { + "lowercase-keys": "^1.0.0" + } + }, + "retry": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", + "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", + "dev": true + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "rlp": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.6.tgz", + "integrity": "sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg==", + "requires": { + "bn.js": "^4.11.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "saslprep": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", + "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", + "optional": true, + "requires": { + "sparse-bitfield": "^3.0.3" + } + }, + "sax": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", + "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o=", + "dev": true + }, + "scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" + }, + "secp256k1": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz", + "integrity": "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==", + "requires": { + "elliptic": "^6.5.2", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "semver-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", + "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", + "dev": true + }, + "semver-diff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", + "dev": true, + "requires": { + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + } + } + }, + "serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + } + }, + "serverless-aws-documentation": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/serverless-aws-documentation/-/serverless-aws-documentation-1.1.0.tgz", + "integrity": "sha512-b2iM1eZIWxQjAa6RNnARq+iXgiffbtSmKnZUh7l8KOkaD/BapqfOkKKi6MGxp3KxQFkW31sVsAiqJ0NQSSyXOw==", + "dev": true, + "requires": { + "object-hash": "^1.1.7" + } + }, + "serverless-domain-manager": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/serverless-domain-manager/-/serverless-domain-manager-4.2.3.tgz", + "integrity": "sha512-qZJwl98TQ6V0YtCnjywpdoruyFUdCprm55tUyF7Hecd5S3QJg5tovXCg2bTnmt0pieGHut4l9oqBdkcOPiGzjg==", + "dev": true, + "requires": { + "aws-sdk": "^2.755.0", + "chalk": "^2.4.2" + } + }, + "serverless-export-swagger": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/serverless-export-swagger/-/serverless-export-swagger-2.0.0.tgz", + "integrity": "sha512-X4Hi8tftfzyOF6nol122LyKwM4zWgrvdV9MP6gIuJ2XeMaQo5wkHgsi+rHnuWGjyVb4BpIL/BGOMWMpPK3j//A==", + "dev": true, + "requires": { + "aws-sdk": "^2.385.0" + } + }, + "serverless-offline": { + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/serverless-offline/-/serverless-offline-6.9.0.tgz", + "integrity": "sha512-toKcyXUv0rFM7nGk/0QcCxP1Zlv/37IAf3vQiUlOh5XHPl6pFWfHUVF4HelMkosAeWJqJt1SngNmK38uiAsLtg==", + "dev": true, + "requires": { + "@hapi/boom": "^7.4.11", + "@hapi/h2o2": "^8.3.2", + "@hapi/hapi": "^18.4.1", + "aws-sdk": "^2.834.0", + "boxen": "^5.0.0", + "chalk": "^4.1.0", + "cuid": "^2.1.8", + "execa": "^5.0.0", + "extend": "^3.0.2", + "fs-extra": "^9.1.0", + "java-invoke-local": "0.0.6", + "js-string-escape": "^1.0.1", + "jsonpath-plus": "^5.0.2", + "jsonschema": "^1.4.0", + "jsonwebtoken": "^8.5.1", + "jszip": "^3.5.0", + "luxon": "^1.25.0", + "node-fetch": "^2.6.1", + "node-schedule": "^1.3.3", + "object.fromentries": "^2.0.3", + "p-memoize": "^4.0.1", + "p-queue": "^6.6.2", + "p-retry": "^4.3.0", + "please-upgrade-node": "^3.2.0", + "portfinder": "^1.0.28", + "semver": "^7.3.4", + "update-notifier": "^5.0.1", + "velocityjs": "^2.0.3", + "ws": "^7.4.2" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "requires": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true + } + } + }, + "servify": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/servify/-/servify-0.1.12.tgz", + "integrity": "sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==", + "requires": { + "body-parser": "^1.16.0", + "cors": "^2.8.1", + "express": "^4.14.0", + "request": "^2.79.0", + "xhr": "^2.3.3" + } + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, + "simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" + }, + "simple-get": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", + "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", + "requires": { + "decompress-response": "^3.3.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "sorted-array-functions": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/sorted-array-functions/-/sorted-array-functions-1.3.0.tgz", + "integrity": "sha512-2sqgzeFlid6N4Z2fUQ1cvFmTOLRi/sEDzSQ0OKYchqgoPmQBVyM3959qYx3fpS6Esef80KjmpgPeEr028dP3OA==", + "dev": true + }, + "sparse-bitfield": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", + "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", + "optional": true, + "requires": { + "memory-pager": "^1.0.2" } }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } }, - "js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, - "minimalistic-assert": { + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, + "strip-hex-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", + "requires": { + "is-hex-prefixed": "1.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "swagger-ui-dist": { + "version": "3.52.0", + "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-3.52.0.tgz", + "integrity": "sha512-SGfhW8FCih00QG59PphdeAUtTNw7HS5k3iPqDZowerPw9mcbhKchUb12kbROk99c1X6RTWW1gB1kqgfnYGuCSg==" + }, + "swagger-ui-express": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/swagger-ui-express/-/swagger-ui-express-4.1.6.tgz", + "integrity": "sha512-Xs2BGGudvDBtL7RXcYtNvHsFtP1DBFPMJFRxHe5ez/VG/rzVOEjazJOOSc/kSCyxreCTKfJrII6MJlL9a6t8vw==", + "requires": { + "swagger-ui-dist": "^3.18.1" + } + }, + "swarm-js": { + "version": "0.1.40", + "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.40.tgz", + "integrity": "sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA==", + "requires": { + "bluebird": "^3.5.0", + "buffer": "^5.0.5", + "eth-lib": "^0.1.26", + "fs-extra": "^4.0.2", + "got": "^7.1.0", + "mime-types": "^2.1.16", + "mkdirp-promise": "^5.0.1", + "mock-fs": "^4.1.0", + "setimmediate": "^1.0.5", + "tar": "^4.0.2", + "xhr-request": "^1.0.1" + }, + "dependencies": { + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + }, + "got": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", + "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", + "requires": { + "decompress-response": "^3.2.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-plain-obj": "^1.1.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "p-cancelable": "^0.3.0", + "p-timeout": "^1.1.1", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "url-parse-lax": "^1.0.0", + "url-to-options": "^1.0.1" + } + }, + "p-cancelable": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==" + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "requires": { + "prepend-http": "^1.0.1" + } + } + } + }, + "tar": { + "version": "4.4.17", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.17.tgz", + "integrity": "sha512-q7OwXq6NTdcYIa+k58nEMV3j1euhDhGCs/VRw9ymx/PbH0jtIM2+VTgDE/BW3rbLkrBUXs5fzEKgic5oUciu7g==", + "requires": { + "chownr": "^1.1.4", + "fs-minipass": "^1.2.7", + "minipass": "^2.9.0", + "minizlib": "^1.3.3", + "mkdirp": "^0.5.5", + "safe-buffer": "^5.2.1", + "yallist": "^3.1.1" + }, + "dependencies": { + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + } + } + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" + }, + "to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==" + }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "requires": { + "is-typedarray": "^1.0.0" + } + }, + "tz-offset": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tz-offset/-/tz-offset-0.0.1.tgz", + "integrity": "sha512-kMBmblijHJXyOpKzgDhKx9INYU4u4E1RPMB0HqmKSgWG8vEcf3exEfLh4FFfzd3xdQOw9EuIy/cP0akY6rHopQ==" + }, + "ultron": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" + }, + "unbox-primitive": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "requires": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + } }, - "minimalistic-crypto-utils": { + "unique-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", + "dev": true, + "requires": { + "crypto-random-string": "^2.0.0" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "update-notifier": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", + "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", + "dev": true, + "requires": { + "boxen": "^5.0.0", + "chalk": "^4.1.0", + "configstore": "^5.0.1", + "has-yarn": "^2.1.0", + "import-lazy": "^2.1.0", + "is-ci": "^2.0.0", + "is-installed-globally": "^0.4.0", + "is-npm": "^5.0.0", + "is-yarn-global": "^0.3.0", + "latest-version": "^5.1.0", + "pupa": "^2.1.1", + "semver": "^7.3.4", + "semver-diff": "^3.1.1", + "xdg-basedir": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, + "url": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", + "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "requires": { + "prepend-http": "^2.0.0" + } + }, + "url-set-query": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", + "integrity": "sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk=" + }, + "url-to-options": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=" }, - "scrypt-js": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", - "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" + "utf-8-validate": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.5.tgz", + "integrity": "sha512-+pnxRYsS/axEpkrrEpzYfNZGXp0IjC/9RIxwM5gntY4Koi8SHmUGSfxfWqxZdRxrtaoVstuOzUp/rbs3JSPELQ==", + "requires": { + "node-gyp-build": "^4.2.0" + } + }, + "utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", + "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==" + }, + "util": { + "version": "0.12.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz", + "integrity": "sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==", + "requires": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "safe-buffer": "^5.1.2", + "which-typed-array": "^1.1.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + }, + "varint": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "velocityjs": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/velocityjs/-/velocityjs-2.0.3.tgz", + "integrity": "sha512-sUkygY7HwvbKZvS3naiI7t2o4RTqui6efSwTXLb03igdvPKm3SwCpnqA2kU4/jLD2f0eHB9xPoiza9XAkpuU+g==", + "dev": true + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "web3": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.5.2.tgz", + "integrity": "sha512-aapKLdO8t7Cos6tZLeeQUtCJvTiPMlLcHsHHDLSBZ/VaJEucSTxzun32M8sp3BmF4waDEmhY+iyUM1BKvtAcVQ==", + "requires": { + "web3-bzz": "1.5.2", + "web3-core": "1.5.2", + "web3-eth": "1.5.2", + "web3-eth-personal": "1.5.2", + "web3-net": "1.5.2", + "web3-shh": "1.5.2", + "web3-utils": "1.5.2" + } + }, + "web3-bzz": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.5.2.tgz", + "integrity": "sha512-W/sPCdA+XQ9duUYKHAwf/g69cbbV8gTCRsa1MpZwU7spXECiyJ2EvD/QzAZ+UpJk3GELXFF/fUByeZ3VRQKF2g==", + "requires": { + "@types/node": "^12.12.6", + "got": "9.6.0", + "swarm-js": "^0.1.40" + } + }, + "web3-core": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.5.2.tgz", + "integrity": "sha512-sebMpQbg3kbh3vHUbHrlKGKOxDWqjgt8KatmTBsTAWj/HwWYVDzeX+2Q84+swNYsm2DrTBVFlqTErFUwPBvyaA==", + "requires": { + "@types/bn.js": "^4.11.5", + "@types/node": "^12.12.6", + "bignumber.js": "^9.0.0", + "web3-core-helpers": "1.5.2", + "web3-core-method": "1.5.2", + "web3-core-requestmanager": "1.5.2", + "web3-utils": "1.5.2" + } + }, + "web3-core-helpers": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.5.2.tgz", + "integrity": "sha512-U7LJoeUdQ3aY9t5gU7t/1XpcApsWm+4AcW5qKl/44ZxD44w0Dmsq1c5zJm3GuLr/a9MwQfXK4lpmvxVQWHHQRg==", + "requires": { + "web3-eth-iban": "1.5.2", + "web3-utils": "1.5.2" + } + }, + "web3-core-method": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.5.2.tgz", + "integrity": "sha512-/mC5t9UjjJoQmJJqO5nWK41YHo+tMzFaT7Tp7jDCQsBkinE68KsUJkt0jzygpheW84Zra0DVp6q19gf96+cugg==", + "requires": { + "@ethereumjs/common": "^2.4.0", + "@ethersproject/transactions": "^5.0.0-beta.135", + "web3-core-helpers": "1.5.2", + "web3-core-promievent": "1.5.2", + "web3-core-subscriptions": "1.5.2", + "web3-utils": "1.5.2" + } + }, + "web3-core-promievent": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.5.2.tgz", + "integrity": "sha512-5DacbJXe98ozSor7JlkTNCy6G8945VunRRkPxMk98rUrg60ECVEM/vuefk1atACzjQsKx6tmLZuHxbJQ64TQeQ==", + "requires": { + "eventemitter3": "4.0.4" + } + }, + "web3-core-requestmanager": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.5.2.tgz", + "integrity": "sha512-oRVW9OrAsXN2JIZt68OEg1Mb1A9a/L3JAGMv15zLEFEnJEGw0KQsGK1ET2kvZBzvpFd5G0EVkYCnx7WDe4HSNw==", + "requires": { + "util": "^0.12.0", + "web3-core-helpers": "1.5.2", + "web3-providers-http": "1.5.2", + "web3-providers-ipc": "1.5.2", + "web3-providers-ws": "1.5.2" + } + }, + "web3-core-subscriptions": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.5.2.tgz", + "integrity": "sha512-hapI4rKFk22yurtIv0BYvkraHsM7epA4iI8Np+HuH6P9DD0zj/llaps6TXLM9HyacLBRwmOLZmr+pHBsPopUnQ==", + "requires": { + "eventemitter3": "4.0.4", + "web3-core-helpers": "1.5.2" + } + }, + "web3-eth": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.5.2.tgz", + "integrity": "sha512-DwWQ6TCOUqvYyo7T20S7HpQDPveNHNqOn2Q2F3E8ZFyEjmqT4XsGiwvm08kB/VgQ4e/ANyq/i8PPFSYMT8JKHg==", + "requires": { + "web3-core": "1.5.2", + "web3-core-helpers": "1.5.2", + "web3-core-method": "1.5.2", + "web3-core-subscriptions": "1.5.2", + "web3-eth-abi": "1.5.2", + "web3-eth-accounts": "1.5.2", + "web3-eth-contract": "1.5.2", + "web3-eth-ens": "1.5.2", + "web3-eth-iban": "1.5.2", + "web3-eth-personal": "1.5.2", + "web3-net": "1.5.2", + "web3-utils": "1.5.2" + } + }, + "web3-eth-abi": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.5.2.tgz", + "integrity": "sha512-P3bJbDR5wib4kWGfVeBKBVi27T+AiHy4EJxYM6SMNbpm3DboLDdisu9YBd6INMs8rzxgnprBbGmmyn4jKIDKAA==", + "requires": { + "@ethersproject/abi": "5.0.7", + "web3-utils": "1.5.2" + }, + "dependencies": { + "@ethersproject/abi": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.7.tgz", + "integrity": "sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw==", + "requires": { + "@ethersproject/address": "^5.0.4", + "@ethersproject/bignumber": "^5.0.7", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/constants": "^5.0.4", + "@ethersproject/hash": "^5.0.4", + "@ethersproject/keccak256": "^5.0.3", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.3", + "@ethersproject/strings": "^5.0.4" + } + } + } + }, + "web3-eth-accounts": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.5.2.tgz", + "integrity": "sha512-F8mtzxgEhxfLc66vPi0Gqd6mpscvvk7Ua575bsJ1p9J2X/VtuKgDgpWcU4e4LKeROQ+ouCpAG9//0j9jQuij3A==", + "requires": { + "@ethereumjs/common": "^2.3.0", + "@ethereumjs/tx": "^3.2.1", + "crypto-browserify": "3.12.0", + "eth-lib": "0.2.8", + "ethereumjs-util": "^7.0.10", + "scrypt-js": "^3.0.1", + "uuid": "3.3.2", + "web3-core": "1.5.2", + "web3-core-helpers": "1.5.2", + "web3-core-method": "1.5.2", + "web3-utils": "1.5.2" + }, + "dependencies": { + "eth-lib": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + } + } + }, + "web3-eth-contract": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.5.2.tgz", + "integrity": "sha512-4B8X/IPFxZCTmtENpdWXtyw5fskf2muyc3Jm5brBQRb4H3lVh1/ZyQy7vOIkdphyaXu4m8hBLHzeyKkd37mOUg==", + "requires": { + "@types/bn.js": "^4.11.5", + "web3-core": "1.5.2", + "web3-core-helpers": "1.5.2", + "web3-core-method": "1.5.2", + "web3-core-promievent": "1.5.2", + "web3-core-subscriptions": "1.5.2", + "web3-eth-abi": "1.5.2", + "web3-utils": "1.5.2" + } + }, + "web3-eth-ens": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.5.2.tgz", + "integrity": "sha512-/UrLL42ZOCYge+BpFBdzG8ICugaRS4f6X7PxJKO+zAt+TwNgBpjuWfW/ZYNcuqJun/ZyfcTuj03TXqA1RlNhZQ==", + "requires": { + "content-hash": "^2.5.2", + "eth-ens-namehash": "2.0.8", + "web3-core": "1.5.2", + "web3-core-helpers": "1.5.2", + "web3-core-promievent": "1.5.2", + "web3-eth-abi": "1.5.2", + "web3-eth-contract": "1.5.2", + "web3-utils": "1.5.2" + } + }, + "web3-eth-iban": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.5.2.tgz", + "integrity": "sha512-C04YDXuSG/aDwOHSX+HySBGb0KraiAVt+/l1Mw7y/fCUrKC/K0yYzMYqY/uYOcvLtepBPsC4ZfUYWUBZ2PO8Vg==", + "requires": { + "bn.js": "^4.11.9", + "web3-utils": "1.5.2" + } + }, + "web3-eth-personal": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.5.2.tgz", + "integrity": "sha512-nH5N2GiVC0C5XeMEKU16PeFP3Hb3hkPvlR6Tf9WQ+pE+jw1c8eaXBO1CJQLr15ikhUF3s94ICyHcfjzkDsmRbA==", + "requires": { + "@types/node": "^12.12.6", + "web3-core": "1.5.2", + "web3-core-helpers": "1.5.2", + "web3-core-method": "1.5.2", + "web3-net": "1.5.2", + "web3-utils": "1.5.2" + } + }, + "web3-net": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.5.2.tgz", + "integrity": "sha512-VEc9c+jfoERhbJIxnx0VPlQDot8Lm4JW/tOWFU+ekHgIiu2zFKj5YxhURIth7RAbsaRsqCb79aE+M0eI8maxVQ==", + "requires": { + "web3-core": "1.5.2", + "web3-core-method": "1.5.2", + "web3-utils": "1.5.2" + } + }, + "web3-providers-http": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.5.2.tgz", + "integrity": "sha512-dUNFJc9IMYDLZnkoQX3H4ZjvHjGO6VRVCqrBrdh84wPX/0da9dOA7DwIWnG0Gv3n9ybWwu5JHQxK4MNQ444lyA==", + "requires": { + "web3-core-helpers": "1.5.2", + "xhr2-cookies": "1.1.0" + } + }, + "web3-providers-ipc": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.5.2.tgz", + "integrity": "sha512-SJC4Sivt4g9LHKlRy7cs1jkJgp7bjrQeUndE6BKs0zNALKguxu6QYnzbmuHCTFW85GfMDjhvi24jyyZHMnBNXQ==", + "requires": { + "oboe": "2.1.5", + "web3-core-helpers": "1.5.2" + } + }, + "web3-providers-ws": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.5.2.tgz", + "integrity": "sha512-xy9RGlyO8MbJDuKv2vAMDkg+en+OvXG0CGTCM2BTl6l1vIdHpCa+6A/9KV2rK8aU9OBZ7/Pf+Y19517kHVl9RA==", + "requires": { + "eventemitter3": "4.0.4", + "web3-core-helpers": "1.5.2", + "websocket": "^1.0.32" + } + }, + "web3-shh": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.5.2.tgz", + "integrity": "sha512-wOxOcYt4Sa0AHAI8gG7RulCwVuVjSRS/M/AbFsea3XfJdN6sU13/syY7OdZNjNYuKjYTzxKYrd3dU/K2iqffVw==", + "requires": { + "web3-core": "1.5.2", + "web3-core-method": "1.5.2", + "web3-core-subscriptions": "1.5.2", + "web3-net": "1.5.2" + } + }, + "web3-utils": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.5.2.tgz", + "integrity": "sha512-quTtTeQJHYSxAwIBOCGEcQtqdVcFWX6mCFNoqnp+mRbq+Hxbs8CGgO/6oqfBx4OvxIOfCpgJWYVHswRXnbEu9Q==", + "requires": { + "bn.js": "^4.11.9", + "eth-lib": "0.2.8", + "ethereum-bloom-filters": "^1.0.6", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + }, + "dependencies": { + "eth-lib": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + } + } + }, + "websocket": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", + "integrity": "sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==", + "requires": { + "bufferutil": "^4.0.1", + "debug": "^2.2.0", + "es5-ext": "^0.10.50", + "typedarray-to-buffer": "^3.1.5", + "utf-8-validate": "^5.0.2", + "yaeti": "^0.0.6" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, + "which-typed-array": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.6.tgz", + "integrity": "sha512-DdY984dGD5sQ7Tf+x1CkXzdg85b9uEel6nr4UkFg1LoE9OXv3uRuZhe5CoWdawhGACeFpEZXH8fFLQnDhbpm/Q==", + "requires": { + "available-typed-arrays": "^1.0.4", + "call-bind": "^1.0.2", + "es-abstract": "^1.18.5", + "foreach": "^2.0.5", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.6" + } + }, + "widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dev": true, + "requires": { + "string-width": "^4.0.0" + } + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } }, "ws": { "version": "7.4.6", "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==" + }, + "xdg-basedir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", + "dev": true + }, + "xhr": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.6.0.tgz", + "integrity": "sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA==", + "requires": { + "global": "~4.4.0", + "is-function": "^1.0.1", + "parse-headers": "^2.0.0", + "xtend": "^4.0.0" + } + }, + "xhr-request": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xhr-request/-/xhr-request-1.1.0.tgz", + "integrity": "sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==", + "requires": { + "buffer-to-arraybuffer": "^0.0.5", + "object-assign": "^4.1.1", + "query-string": "^5.0.1", + "simple-get": "^2.7.0", + "timed-out": "^4.0.1", + "url-set-query": "^1.0.0", + "xhr": "^2.0.4" + } + }, + "xhr-request-promise": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz", + "integrity": "sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg==", + "requires": { + "xhr-request": "^1.1.0" + } + }, + "xhr2-cookies": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz", + "integrity": "sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg=", + "requires": { + "cookiejar": "^2.1.1" + } + }, + "xml2js": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "dev": true, + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~9.0.1" + } + }, + "xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", + "dev": true + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, + "yaeti": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", + "integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=" + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" } } } diff --git a/package.json b/package.json index 4cb3138..214c0f2 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "ethereum-block-by-date": "^1.4.0", "ethers": "^5.4.1", "express": "^4.17.1", + "helmet": "^4.6.0", "lodash": "^4.17.20", "moment": "^2.28.0", "mongodb": "^3.6.3", diff --git a/services/referral/deposit/handler.js b/services/referral/deposit/handler.js new file mode 100644 index 0000000..5061aa4 --- /dev/null +++ b/services/referral/deposit/handler.js @@ -0,0 +1,110 @@ +const db = require("../../../models/referral-deposit.model"); +const dbReferral = require("../../../models/referrals.model"); + +module.exports.getAddress = async (req, res) => { + try { + const addressInfo = await db.findOne(req.params.address.toLowerCase()); + + if (addressInfo != null) { + delete addressInfo._id; + } + + res.status(200).json({ + message: "Successful Response", + body: addressInfo, + }); + } catch (err) { + res.status(400).json({ + message: err.message, + body: null, + }); + } + + return; +}; + +module.exports.checkReferral = async (req, res) => { + try { + const referralInfo = await dbReferral.findOne( + req.params.referral.toLowerCase() + ); + + if (referralInfo != null) { + delete referralInfo._id; + } + + res.status(200).json({ + message: "Successful Response", + body: referralInfo, + }); + } catch (err) { + res.status(400).json({ + message: err.message, + body: null, + }); + } +}; + +module.exports.addDepositAmount = async (req, res) => { + try { + if ( + !req.body || + !req.body.address || + !req.body.amount || + !req.body.referrer + ) { + if (!req.body.address) { + res.status(200).json({ + message: "Missing user address.", + body: null, + }); + } + if (!req.body.amount) { + res.status(200).json({ + message: "Missing input amount.", + body: null, + }); + } + if (!req.body.referrer) { + res.status(200).json({ + message: "Missing referral link.", + body: null, + }); + } + } + + var today = new Date(); + var datetime = + today.getFullYear() + + "-" + + (today.getMonth() + 1) + + "-" + + today.getDate() + + "-" + + today.getHours() + + ":" + + today.getMinutes() + + ":" + + today.getSeconds(); + + await db.depositAmount({ + referrer: req.body.referrer, + amount: req.body.amount, + address: req.body.address, + timestamp: datetime, + }); + + res.status(200).json({ + message: "Deposit Success!", + body: null, + }); + + return; + } catch (err) { + res.status(200).json({ + message: err.message, + body: null, + }); + return; + } +}; diff --git a/services/referral/handler.js b/services/referral/handler.js new file mode 100644 index 0000000..4475827 --- /dev/null +++ b/services/referral/handler.js @@ -0,0 +1,30 @@ +const db = require("../../models/referrals.model"); + +module.exports.checkReferral = async (req, res) => { + try { + const referralInfo = await dbReferral.findOne( + req.params.referral.toLowerCase() + ); + + if (referralInfo != null) { + delete referralInfo._id; + } + + res.status(200).json({ + message: "Successful Response", + body: referralInfo, + }); + } catch (err) { + res.status(400).json({ + message: err.message, + body: null, + }); + } +}; + +module.exports.addNewReferral = async (req, res) => { + await db.addReferral(req.params); + res.status(400).json({ + body: req.params, + }); +}; diff --git a/services/referral/withdraw/handler.js b/services/referral/withdraw/handler.js new file mode 100644 index 0000000..c7e3d1a --- /dev/null +++ b/services/referral/withdraw/handler.js @@ -0,0 +1,75 @@ +const db = require("../../../models/referral-withdrawal.model"); + +module.exports.getAddress = async (req, res) => { + try { + const addressInfo = await db.findOne(req.params.address.toLowerCase()); + + if (addressInfo != null) { + delete addressInfo._id; + } + + res.status(200).json({ + message: "Successful Response", + body: addressInfo, + }); + } catch (err) { + res.status(200).json({ + message: err.message, + body: null, + }); + } + return; +}; + +module.exports.addWithdrawalAmount = async (req, res) => { + try { + if (!req.body || !req.body.address || !req.body.amount) { + if (!req.body.address) { + res.status(200).json({ + message: "Missing user address.", + body: null, + }); + } + if (!req.body.amount) { + res.status(200).json({ + message: "Missing input amount.", + body: null, + }); + } + } + + var today = new Date(); + var datetime = + today.getFullYear() + + "-" + + (today.getMonth() + 1) + + "-" + + today.getDate() + + "-" + + today.getHours() + + ":" + + today.getMinutes() + + ":" + + today.getSeconds(); + + await db.withdrawAmount({ + referrer: req.body.referrer, + amount: req.body.amount, + address: req.body.address, + timestamp: datetime, + }); + + res.status(200).json({ + message: "Withdrawal Success!", + body: null, + }); + + return; + } catch (err) { + res.status(200).json({ + message: err.message, + body: null, + }); + return; + } +}; From fe30632c0a28af7da7af0a03b97855788d59c618 Mon Sep 17 00:00:00 2001 From: Aditya Date: Fri, 10 Sep 2021 12:27:40 +0530 Subject: [PATCH 252/254] Tried API testing, some code changes --- app.js | 21 ++++++++-- models/referral-deposit.model.js | 12 +++++- models/referral-withdrawal.model.js | 8 ++++ models/referrals.model.js | 6 ++- services/referral/deposit/handler.js | 63 +++++++++++++++++++++------- services/referral/handler.js | 44 +++++++++++++++---- 6 files changed, 124 insertions(+), 30 deletions(-) diff --git a/app.js b/app.js index fbd0c77..2f0a11d 100644 --- a/app.js +++ b/app.js @@ -122,18 +122,31 @@ async function init() { reimburse.getReimburseAddress(req, res) ); - app.get("/user/:address/:referral", (req, res) => { - referral.addNewReferral(req, res); - }); - + /* app.get("/user/:referral", (req, res) => { referral.checkReferral(req, res); }); +*/ + app.get("/user/getreferrals", (req, res) => { + referral.seeAllReferrals(req, res); + }); app.post("/user/:referral/:address", (req, res) => { referral.addNewReferral(req, res); }); + app.post("/user/:address/:amount/:referrer", (req, res) => { + deposit.addDepositAmount(req, res); + }); + + app.get("/user/getdeposits", (req, res) => { + deposit.getAll(req, res); + }); + + app.get("/user/:id", (req, res) => { + deposit.getTransaction(req, res); + }); + app.post("/user/reimburse-address/update", (req, res) => { reimburse.updateReimburseAddressClaimAmount(req, res); }); diff --git a/models/referral-deposit.model.js b/models/referral-deposit.model.js index 70c8d06..32e1309 100644 --- a/models/referral-deposit.model.js +++ b/models/referral-deposit.model.js @@ -1,14 +1,20 @@ const mongo = require("../config/db"); +const collection = "Referral-Deposit"; //const subgraphUrl = process.env.SUBGRAPH_ENDPOINT; //const polygonSubgraphUrl = process.env.POLYGON_SUBGRAPH_ENDPOINT; -const collection = "Referral-Deposit"; - const findAll = async () => { const db = mongo.getDB(); return await db.collection(collection).find({}).toArray(); }; +const findOne = async (params) => { + const db = mongo.getDB(); + return await db.collection(collection).findOne({ + address: params, + }); +}; + const getTransaction = async (transactionID) => { const db = mongo.getDB(); return await db.collection(collection).findOne({ @@ -19,11 +25,13 @@ const getTransaction = async (transactionID) => { //Blockchain address, Amount, Referral const depositAmount = async (params) => { + const db = mongo.getDB(); return await db.collection(collection).insertOne(params); }; module.exports = { findAll, + findOne, getTransaction, depositAmount, }; diff --git a/models/referral-withdrawal.model.js b/models/referral-withdrawal.model.js index c4d83cc..2775783 100644 --- a/models/referral-withdrawal.model.js +++ b/models/referral-withdrawal.model.js @@ -7,6 +7,13 @@ const findAll = async () => { return await db.collection(collection).find({}).toArray(); }; +const findOne = async (params) => { + const db = mongo.getDB(); + return await db.collection(collection).findOne({ + address: params, + }); +}; + const getTransaction = async (transactionID) => { const db = mongo.getDB(); return await db.collection(collection).findOne({ @@ -20,6 +27,7 @@ const withdrawAmount = async (params) => { module.exports = { findAll, + findOne, getTransaction, withdrawAmount, }; diff --git a/models/referrals.model.js b/models/referrals.model.js index 5a52e74..d2fdda1 100644 --- a/models/referrals.model.js +++ b/models/referrals.model.js @@ -1,5 +1,4 @@ const mongo = require("../config/db"); - const collection = "referrals"; //1. Address 2. Code @@ -12,14 +11,16 @@ const findAll = async () => { const findOne = async (params) => { const db = mongo.getDB(); return await db.collection(collection).findOne({ - address: params, + address: params.address, }); }; const addReferral = async (params) => { + const db = mongo.getDB(); return await db.collection(collection).insertOne(params); }; +/* const obj1 = { address: "#efg", referral: "adi" }; const obj2 = { address: "#pqr", referral: "soon" }; const obj3 = { address: "#xyz", referral: "vic" }; @@ -27,6 +28,7 @@ const obj3 = { address: "#xyz", referral: "vic" }; addReferral(obj1); addReferral(obj2); addReferral(obj3); +*/ module.exports = { findAll, diff --git a/services/referral/deposit/handler.js b/services/referral/deposit/handler.js index 5061aa4..bb3fde8 100644 --- a/services/referral/deposit/handler.js +++ b/services/referral/deposit/handler.js @@ -45,7 +45,40 @@ module.exports.checkReferral = async (req, res) => { } }; +module.exports.getAll = async (req, res) => { + try { + const result = await db.findAll(); + res.status(200).json({ + message: "Successful Response", + body: result, + }); + } catch (err) { + res.status(400).json({ + message: err.message, + body: null, + }); + return; + } +}; + +module.exports.getTransaction = async (req, res) => { + try { + const result = await db.getTransaction(req.params.id); + res.status(200).json({ + message: "Successful Response", + body: result, + }); + } catch (err) { + res.status(400).json({ + message: err.message, + body: null, + }); + return; + } +}; + module.exports.addDepositAmount = async (req, res) => { + /* try { if ( !req.body || @@ -72,21 +105,21 @@ module.exports.addDepositAmount = async (req, res) => { }); } } - - var today = new Date(); - var datetime = - today.getFullYear() + - "-" + - (today.getMonth() + 1) + - "-" + - today.getDate() + - "-" + - today.getHours() + - ":" + - today.getMinutes() + - ":" + - today.getSeconds(); - +*/ + var today = new Date(); + var datetime = + today.getFullYear() + + "-" + + (today.getMonth() + 1) + + "-" + + today.getDate() + + "-" + + today.getHours() + + ":" + + today.getMinutes() + + ":" + + today.getSeconds(); + try { await db.depositAmount({ referrer: req.body.referrer, amount: req.body.amount, diff --git a/services/referral/handler.js b/services/referral/handler.js index 4475827..ae929a6 100644 --- a/services/referral/handler.js +++ b/services/referral/handler.js @@ -1,10 +1,32 @@ const db = require("../../models/referrals.model"); +//Creates referral system +//1. (Influencer)Address 2. Referral Code + +//2. Deposit => a)Amount b)Referral c)Timestamp +//3. Withdrawal => a)Amount b) Timestamp + +module.exports.seeAllReferrals = async (req, res) => { + try { + const result = await db.findAll(); + setTimeout(() => { + console.log("hi"); + }, 3000); + res.status(200).json({ + message: "Successful Response", + body: result, + }); + } catch (err) { + res.status(400).json({ + message: err.message, + body: null, + }); + } +}; + module.exports.checkReferral = async (req, res) => { try { - const referralInfo = await dbReferral.findOne( - req.params.referral.toLowerCase() - ); + const referralInfo = await db.findOne(req.params.referral.toLowerCase()); if (referralInfo != null) { delete referralInfo._id; @@ -23,8 +45,16 @@ module.exports.checkReferral = async (req, res) => { }; module.exports.addNewReferral = async (req, res) => { - await db.addReferral(req.params); - res.status(400).json({ - body: req.params, - }); + try { + const result = await db.addReferral(req.params); + res.status(200).json({ + message: "Successful Response", + body: req.params, + }); + } catch (err) { + res.status(400).json({ + message: err.message, + body: null, + }); + } }; From f48352b0943b26227f059ca34873acb4fa4ec06b Mon Sep 17 00:00:00 2001 From: Aditya Date: Thu, 16 Sep 2021 15:10:43 +0530 Subject: [PATCH 253/254] Working APIs referral --- app.js | 49 ++++++++--- jobs/task.js | 53 ++++++------ models/referral-deposit.model.js | 4 +- models/referral-withdrawal.model.js | 5 +- models/referrals.model.js | 20 ++--- services/referral/deposit/handler.js | 119 ++++++++++---------------- services/referral/handler.js | 38 +++++--- services/referral/validate/handler.js | 38 ++++++++ services/referral/withdraw/handler.js | 92 ++++++++++---------- 9 files changed, 229 insertions(+), 189 deletions(-) create mode 100644 services/referral/validate/handler.js diff --git a/app.js b/app.js index 2f0a11d..0723fd4 100644 --- a/app.js +++ b/app.js @@ -18,7 +18,7 @@ const specialEvent = require("./services/user/special-event/handler"); const reimburse = require("./services/user/reimburse/handler"); const referral = require("./services/referral/handler"); const deposit = require("./services/referral/deposit/handler"); -const withdraw = require("./services/referral/deposit/handler"); +const withdraw = require("./services/referral/withdraw/handler"); const app = express(); const cors = require("cors"); const port = process.env.PORT || 8080; @@ -35,7 +35,7 @@ async function init() { db.connectDB(async (err) => { if (err) throw err; - + /* jobs.saveVault(); jobs.saveVaultAPY(); jobs.savePolygonVaultAPY(); @@ -47,6 +47,7 @@ async function init() { jobs.saveABIPools(); jobs.saveVipApr(); jobs.savePerformance(); + */ }); app.use(cors()); @@ -122,29 +123,28 @@ async function init() { reimburse.getReimburseAddress(req, res) ); - /* - app.get("/user/:referral", (req, res) => { - referral.checkReferral(req, res); - }); -*/ app.get("/user/getreferrals", (req, res) => { referral.seeAllReferrals(req, res); }); - app.post("/user/:referral/:address", (req, res) => { + app.post("/user/addreferral", (req, res) => { referral.addNewReferral(req, res); }); - app.post("/user/:address/:amount/:referrer", (req, res) => { + app.post("/user/adddeposit", (req, res) => { deposit.addDepositAmount(req, res); }); - app.get("/user/getdeposits", (req, res) => { + app.get("/user/deposits", (req, res) => { deposit.getAll(req, res); }); - app.get("/user/:id", (req, res) => { - deposit.getTransaction(req, res); + app.post("/user/addwithdrawal", (req, res) => { + withdraw.addWithdrawalAmount(req, res); + }); + + app.get("/user/withdrawals", (req, res) => { + withdraw.getAll(req, res); }); app.post("/user/reimburse-address/update", (req, res) => { @@ -157,3 +157,28 @@ async function init() { } init(); + +/* + localhost:2002/student/:name/:course + + PUT localhost:2002/student/:studentId + req.body = { + name: "", + batch: "" + } + req.params = {studentId: ""} + + req.params: { + name: "Omkar", + course: "AI" + } + + localhost:2002/student/:name/:course?i20=1 + req.query = { + i20: 1 + } + + req.body = { + ... + } +*/ diff --git a/jobs/task.js b/jobs/task.js index 22782a3..50f76f4 100644 --- a/jobs/task.js +++ b/jobs/task.js @@ -12,13 +12,14 @@ const poolSave = require("../services/staking/handler"); const vipDVG = require("../services/staking/vipdvg/handler"); const performanceSave = require("../services/vaults/performance/handler"); -const jobDelayTime = { +const jobDelayTime = { saveHistoricalApy: 3 * 60 * 1000, // 3 mins in milliseconds - savePricePerFullShare: 6 * 60 * 1000, // 5 mins in milliseconds + savePricePerFullShare: 6 * 60 * 1000, // 6 mins in milliseconds saveHistoricalTVL: 7 * 60 * 1000, // 7 mins saveVaultApy: 15 * 60 * 1000, // 15 mins saveABIPools: 18 * 60 * 1000, // 18 mins savePolygonVaultAPY: 3 * 60 * 1000, // 3 mins in milliseconds; + saveReferralStatus: 6 * 60 * 1000, // 6 mins in milliseconds }; /** Save Vault **/ @@ -35,11 +36,11 @@ const saveVault = async () => { } ); }; -const saveVaultHandler = async() => { +const saveVaultHandler = async () => { console.log(`[saveVault] START: ${new Date().getTime()}`); await vaultSave.handler(); console.log(`[saveVault] END: ${new Date().getTime()}`); -} +}; /** Save Vault APY */ const saveVaultAPY = async () => { @@ -57,16 +58,16 @@ const saveVaultAPY = async () => { } ); }; -const saveVaultAPYHandler = async() => { +const saveVaultAPYHandler = async () => { console.log(`[saveVaultAPY] START: ${new Date().getTime()}`); await vaultHandlerSave.handler(); console.log(`[saveVaultAPY] END: ${new Date().getTime()}`); -} +}; /** Save Vault APY */ -const savePolygonVaultAPY = async() => { +const savePolygonVaultAPY = async () => { await delay(jobDelayTime.savePolygonVaultAPY); - await savePolygonVaultAPYHandler();; + await savePolygonVaultAPYHandler(); cron.schedule( "0 0 0 * * *", @@ -78,12 +79,12 @@ const savePolygonVaultAPY = async() => { timezone: "Etc/UTC", // UTC +0 } ); -} -const savePolygonVaultAPYHandler = async() => { +}; +const savePolygonVaultAPYHandler = async () => { console.log(`[saveVaultAPY Polygon] START: ${new Date().getTime()}`); await vaultPolygonHandlerSave.saveHandler(); console.log(`[saveVaultAPY Polygon] END: ${new Date().getTime()}`); -} +}; /** Store getPricePerFullShare */ const savePricePerFullShare = async () => { @@ -100,17 +101,17 @@ const savePricePerFullShare = async () => { } ); }; -const savePricePerFullShareHandler = async() => { +const savePricePerFullShareHandler = async () => { console.log(`[savePricePerFullShare] START: ${new Date().getTime()}`); await priceSave.handler(); console.log(`[savePricePerFullShare] END: ${new Date().getTime()}`); -} +}; /** Store Historical APY */ const saveHistoricalAPY = async () => { await delay(jobDelayTime.saveHistoricalApy); await saveHistoricalApyHandler(); - + cron.schedule( "*/5 * * * *", async () => { @@ -121,11 +122,11 @@ const saveHistoricalAPY = async () => { } ); }; -const saveHistoricalApyHandler = async() => { +const saveHistoricalApyHandler = async () => { console.log(`[saveHistoricalAPY] START: ${new Date().getTime()}`); await vaultApySave.saveHandler(); console.log(`[saveHistoricalAPY] END: ${new Date().getTime()}`); -} +}; /** Store Historical APY For Polygon */ const savePolygonHistoricalAPY = async () => { @@ -139,12 +140,12 @@ const savePolygonHistoricalAPY = async () => { scheduled: true, } ); -} +}; const savePolygonHistoricalAPYHandler = async () => { console.log(`[savePolygonHistoricalAPY] START: ${new Date().getTime()}`); await vaultPolygonApySave.saveHandler(); console.log(`[savePolygonHistoricalAPY] END: ${new Date().getTime()}`); -} +}; /** Store Historical TVL */ const saveHistoricalTVL = async () => { @@ -161,11 +162,11 @@ const saveHistoricalTVL = async () => { } ); }; -const saveHistoricalTVLHandler = async() => { +const saveHistoricalTVLHandler = async () => { console.log(`[saveTVL] START: ${new Date().getTime()}`); await tvlSave.saveAllTVLhandler(); console.log(`[saveTVL] END: ${new Date().getTime()}`); -} +}; /** Store Historical Stake Pools */ const saveHistoricalPools = async () => { @@ -180,11 +181,11 @@ const saveHistoricalPools = async () => { } ); }; -const saveStakedPoolsHandler = async() => { +const saveStakedPoolsHandler = async () => { console.log(`[saveStakedPools] START: ${new Date().getTime()}`); await stakeSave.saveStakedPools(); console.log(`[saveStakedPools] END: ${new Date().getTime()}`); -} +}; /** Store Stake Pools ABI */ const saveABIPools = async () => { @@ -201,11 +202,11 @@ const saveABIPools = async () => { } ); }; -const saveABIPoolsHandler = async() => { +const saveABIPoolsHandler = async () => { console.log(`[savePoolInfo] START: ${new Date().getTime()}`); await poolSave.savePoolInfo(); console.log(`[savePoolInfo] END: ${new Date().getTime()}`); -} +}; /** Store DAOVIP APR */ const saveVipApr = async () => { @@ -220,11 +221,11 @@ const saveVipApr = async () => { } ); }; -const saveVipAprHandler = async() => { +const saveVipAprHandler = async () => { console.log(`[saveVipApr] START: ${new Date().getTime()}`); await vipDVG.getVipAPY(); console.log(`[saveVipApr] END: ${new Date().getTime()}`); -} +}; /** Store Performance */ const savePerformance = async () => { diff --git a/models/referral-deposit.model.js b/models/referral-deposit.model.js index 32e1309..b209cbb 100644 --- a/models/referral-deposit.model.js +++ b/models/referral-deposit.model.js @@ -3,9 +3,9 @@ const collection = "Referral-Deposit"; //const subgraphUrl = process.env.SUBGRAPH_ENDPOINT; //const polygonSubgraphUrl = process.env.POLYGON_SUBGRAPH_ENDPOINT; -const findAll = async () => { +const findAll = async (query) => { const db = mongo.getDB(); - return await db.collection(collection).find({}).toArray(); + return await db.collection(collection).find(query).toArray(); }; const findOne = async (params) => { diff --git a/models/referral-withdrawal.model.js b/models/referral-withdrawal.model.js index 2775783..8b618dc 100644 --- a/models/referral-withdrawal.model.js +++ b/models/referral-withdrawal.model.js @@ -2,9 +2,9 @@ const mongo = require("../config/db"); const collection = "Referral-Withdrawal"; -const findAll = async () => { +const findAll = async (query) => { const db = mongo.getDB(); - return await db.collection(collection).find({}).toArray(); + return await db.collection(collection).find(query).toArray(); }; const findOne = async (params) => { @@ -22,6 +22,7 @@ const getTransaction = async (transactionID) => { }; const withdrawAmount = async (params) => { + const db = mongo.getDB(); return await db.collection(collection).insertOne(params); }; diff --git a/models/referrals.model.js b/models/referrals.model.js index d2fdda1..fcfc308 100644 --- a/models/referrals.model.js +++ b/models/referrals.model.js @@ -1,7 +1,7 @@ const mongo = require("../config/db"); const collection = "referrals"; -//1. Address 2. Code +//1. Address 2. Referral associated with address const findAll = async () => { const db = mongo.getDB(); @@ -15,23 +15,21 @@ const findOne = async (params) => { }); }; +const checkReferral = async (referral) => { + const db = mongo.getDB(); + return await db.collection(collection).findOne({ + referral: referral, + }); +}; + const addReferral = async (params) => { const db = mongo.getDB(); return await db.collection(collection).insertOne(params); }; -/* -const obj1 = { address: "#efg", referral: "adi" }; -const obj2 = { address: "#pqr", referral: "soon" }; -const obj3 = { address: "#xyz", referral: "vic" }; - -addReferral(obj1); -addReferral(obj2); -addReferral(obj3); -*/ - module.exports = { findAll, findOne, addReferral, + checkReferral, }; diff --git a/services/referral/deposit/handler.js b/services/referral/deposit/handler.js index bb3fde8..5e28b16 100644 --- a/services/referral/deposit/handler.js +++ b/services/referral/deposit/handler.js @@ -1,53 +1,19 @@ const db = require("../../../models/referral-deposit.model"); const dbReferral = require("../../../models/referrals.model"); +const moment = require("moment"); -module.exports.getAddress = async (req, res) => { - try { - const addressInfo = await db.findOne(req.params.address.toLowerCase()); - - if (addressInfo != null) { - delete addressInfo._id; - } - - res.status(200).json({ - message: "Successful Response", - body: addressInfo, - }); - } catch (err) { - res.status(400).json({ - message: err.message, - body: null, - }); - } - - return; -}; - -module.exports.checkReferral = async (req, res) => { - try { - const referralInfo = await dbReferral.findOne( - req.params.referral.toLowerCase() - ); - - if (referralInfo != null) { - delete referralInfo._id; - } - - res.status(200).json({ - message: "Successful Response", - body: referralInfo, - }); - } catch (err) { - res.status(400).json({ - message: err.message, - body: null, - }); - } +isValidReferral = async (referral) => { + const referralInfo = await dbReferral.checkReferral(referral); + return referralInfo; }; module.exports.getAll = async (req, res) => { try { - const result = await db.findAll(); + let f = {}; + if (req.query) { + f = req.query; + } + const result = await db.findAll(f); res.status(200).json({ message: "Successful Response", body: result, @@ -63,7 +29,7 @@ module.exports.getAll = async (req, res) => { module.exports.getTransaction = async (req, res) => { try { - const result = await db.getTransaction(req.params.id); + const result = await db.getTransaction(req.body.id); res.status(200).json({ message: "Successful Response", body: result, @@ -78,13 +44,13 @@ module.exports.getTransaction = async (req, res) => { }; module.exports.addDepositAmount = async (req, res) => { - /* try { if ( !req.body || !req.body.address || !req.body.amount || - !req.body.referrer + !req.body.referral || + !req.body.transactionId ) { if (!req.body.address) { res.status(200).json({ @@ -98,46 +64,47 @@ module.exports.addDepositAmount = async (req, res) => { body: null, }); } - if (!req.body.referrer) { + if (!req.body.referral) { res.status(200).json({ message: "Missing referral link.", body: null, }); } - } -*/ - var today = new Date(); - var datetime = - today.getFullYear() + - "-" + - (today.getMonth() + 1) + - "-" + - today.getDate() + - "-" + - today.getHours() + - ":" + - today.getMinutes() + - ":" + - today.getSeconds(); - try { - await db.depositAmount({ - referrer: req.body.referrer, - amount: req.body.amount, - address: req.body.address, - timestamp: datetime, - }); - - res.status(200).json({ - message: "Deposit Success!", - body: null, - }); + if (!req.body.transactionId) { + res.status(200).json({ + message: "Missing Transaction ID.", + body: null, + }); + } + } else { + const result = await isValidReferral(req.body.referral); + if (result) { + const now = moment().format("MMMM Do YYYY, h:mm:ss a"); + await db.depositAmount({ + _id: req.body.transactionId, + referral: req.body.referral, + amount: req.body.amount, + address: req.body.address, + timestamp: now, + status: "pending", + }); - return; + res.status(200).json({ + message: "Deposit Success!", + body: null, + }); + return; + } else { + res.status(200).json({ + message: "Referral link invalid", + }); + return; + } + } } catch (err) { res.status(200).json({ message: err.message, body: null, }); - return; } }; diff --git a/services/referral/handler.js b/services/referral/handler.js index ae929a6..d279e56 100644 --- a/services/referral/handler.js +++ b/services/referral/handler.js @@ -3,15 +3,12 @@ const db = require("../../models/referrals.model"); //Creates referral system //1. (Influencer)Address 2. Referral Code -//2. Deposit => a)Amount b)Referral c)Timestamp -//3. Withdrawal => a)Amount b) Timestamp +//2. Deposit => a)Amount b)Referral c)Timestamp d) User-Address +//3. Withdrawal => a)Amount b) Timestamp c) User-Address module.exports.seeAllReferrals = async (req, res) => { try { const result = await db.findAll(); - setTimeout(() => { - console.log("hi"); - }, 3000); res.status(200).json({ message: "Successful Response", body: result, @@ -26,8 +23,7 @@ module.exports.seeAllReferrals = async (req, res) => { module.exports.checkReferral = async (req, res) => { try { - const referralInfo = await db.findOne(req.params.referral.toLowerCase()); - + const referralInfo = await db.findOne(req.body.referral.toLowerCase()); if (referralInfo != null) { delete referralInfo._id; } @@ -46,13 +42,29 @@ module.exports.checkReferral = async (req, res) => { module.exports.addNewReferral = async (req, res) => { try { - const result = await db.addReferral(req.params); - res.status(200).json({ - message: "Successful Response", - body: req.params, - }); + if (!req.body || !req.body.address || !req.body.referral) { + if (!req.body.address) { + res.status(200).json({ + message: "Missing user address.", + body: null, + }); + } + if (!req.body.referral) { + res.status(200).json({ + message: "Missing referral link.", + body: null, + }); + } + } else { + await db.addReferral(req.body); + res.status(200).json({ + message: "Successful Response", + body: req.params, + }); + return; + } } catch (err) { - res.status(400).json({ + res.status(200).json({ message: err.message, body: null, }); diff --git a/services/referral/validate/handler.js b/services/referral/validate/handler.js new file mode 100644 index 0000000..87ffbb0 --- /dev/null +++ b/services/referral/validate/handler.js @@ -0,0 +1,38 @@ +const deposit = require("../deposit/handler"); +const withdraw = require("../withdraw/handler"); + +const getPendingDeposits = async (req, res) => { + const result = await deposit.getAll({ status: "pending" }); + const resultId = result; +}; + +const getGraphTransactions = async (userAddress, network) => { + const query = ` + { + deposits: deposits (where: {account: "${userAddress}"}) { + transactionAddress: transaction { + id + } + } + `; + + let url = ""; + switch (network) { + case constant.ETHEREUM: + url = subgraphUrl; + break; + case constant.POLYGON: + url = polygonSubgraphUrl; + break; + default: + break; + } + const response = await fetch(url, { + method: "POST", + body: JSON.stringify({ query }), + }); + + const responseJson = await response.json(); + const graphTransactions = responseJson.data; + return graphTransactions; +}; diff --git a/services/referral/withdraw/handler.js b/services/referral/withdraw/handler.js index c7e3d1a..ba637b3 100644 --- a/services/referral/withdraw/handler.js +++ b/services/referral/withdraw/handler.js @@ -1,29 +1,14 @@ const db = require("../../../models/referral-withdrawal.model"); - -module.exports.getAddress = async (req, res) => { - try { - const addressInfo = await db.findOne(req.params.address.toLowerCase()); - - if (addressInfo != null) { - delete addressInfo._id; - } - - res.status(200).json({ - message: "Successful Response", - body: addressInfo, - }); - } catch (err) { - res.status(200).json({ - message: err.message, - body: null, - }); - } - return; -}; +const moment = require("moment"); module.exports.addWithdrawalAmount = async (req, res) => { try { - if (!req.body || !req.body.address || !req.body.amount) { + if ( + !req.body || + !req.body.address || + !req.body.amount || + !req.body.transactionId + ) { if (!req.body.address) { res.status(200).json({ message: "Missing user address.", @@ -36,37 +21,50 @@ module.exports.addWithdrawalAmount = async (req, res) => { body: null, }); } - } - - var today = new Date(); - var datetime = - today.getFullYear() + - "-" + - (today.getMonth() + 1) + - "-" + - today.getDate() + - "-" + - today.getHours() + - ":" + - today.getMinutes() + - ":" + - today.getSeconds(); - - await db.withdrawAmount({ - referrer: req.body.referrer, - amount: req.body.amount, - address: req.body.address, - timestamp: datetime, - }); + if (!req.body.transactionId) { + res.status(200).json({ + message: "Missing Transaction ID.", + body: null, + }); + } + } else { + const now = moment().format("MMMM Do YYYY, h:mm:ss a"); + await db.withdrawAmount({ + _id: req.body.transactionId, + amount: req.body.amount, + address: req.body.address, + timestamp: now, + status: "pending", + }); + res.status(200).json({ + message: "Withdraw Success!", + body: null, + }); + return; + } + } catch (err) { res.status(200).json({ - message: "Withdrawal Success!", + message: err.message, body: null, }); - return; - } catch (err) { + } +}; + +module.exports.getAll = async (req, res) => { + try { + let f = {}; + if (req.query) { + f = req.query; + } + const result = await db.findAll(f); res.status(200).json({ + message: "Successful Response", + body: result, + }); + } catch (err) { + res.status(400).json({ message: err.message, body: null, }); From f53545b63ca711338255d7502da39c41db6fc5ba Mon Sep 17 00:00:00 2001 From: Aditya Date: Mon, 27 Sep 2021 18:38:06 +0530 Subject: [PATCH 254/254] Referral that works --- app.js | 28 +----- jobs/task.js | 22 +++++ models/referral-deposit.model.js | 21 +++++ models/referral-withdrawal.model.js | 21 +++++ services/referral/deposit/handler.js | 2 +- services/referral/validate/handler.js | 119 ++++++++++++++++++++------ services/referral/withdraw/handler.js | 2 +- 7 files changed, 161 insertions(+), 54 deletions(-) diff --git a/app.js b/app.js index 0723fd4..9fc617b 100644 --- a/app.js +++ b/app.js @@ -35,7 +35,6 @@ async function init() { db.connectDB(async (err) => { if (err) throw err; - /* jobs.saveVault(); jobs.saveVaultAPY(); jobs.savePolygonVaultAPY(); @@ -47,7 +46,7 @@ async function init() { jobs.saveABIPools(); jobs.saveVipApr(); jobs.savePerformance(); - */ + jobs.saveTransaction(); }); app.use(cors()); @@ -157,28 +156,3 @@ async function init() { } init(); - -/* - localhost:2002/student/:name/:course - - PUT localhost:2002/student/:studentId - req.body = { - name: "", - batch: "" - } - req.params = {studentId: ""} - - req.params: { - name: "Omkar", - course: "AI" - } - - localhost:2002/student/:name/:course?i20=1 - req.query = { - i20: 1 - } - - req.body = { - ... - } -*/ diff --git a/jobs/task.js b/jobs/task.js index 50f76f4..144e337 100644 --- a/jobs/task.js +++ b/jobs/task.js @@ -11,9 +11,11 @@ const stakeSave = require("../services/staking/dao-stake/handler"); const poolSave = require("../services/staking/handler"); const vipDVG = require("../services/staking/vipdvg/handler"); const performanceSave = require("../services/vaults/performance/handler"); +const transactionValidator = require("../services/referral/validate/handler"); const jobDelayTime = { saveHistoricalApy: 3 * 60 * 1000, // 3 mins in milliseconds + saveTransaction: 6 * 60 * 1000, // 6 mins in milliseconds savePricePerFullShare: 6 * 60 * 1000, // 6 mins in milliseconds saveHistoricalTVL: 7 * 60 * 1000, // 7 mins saveVaultApy: 15 * 60 * 1000, // 15 mins @@ -147,6 +149,25 @@ const savePolygonHistoricalAPYHandler = async () => { console.log(`[savePolygonHistoricalAPY] END: ${new Date().getTime()}`); }; +//Blockchain Transaction Validator +const saveTransaction = async () => { + await saveTransactionHandler(); + cron.schedule( + async () => { + await saveTransactionHandler(); + }, + { + scheduled: true, + } + ); +}; + +const saveTransactionHandler = async () => { + console.log(`[saveTransaction] START: ${new Date().getTime()}`); + await transactionValidator.validator(); + console.log(`[saveTransaction] END: ${new Date().getTime()}`); +}; + /** Store Historical TVL */ const saveHistoricalTVL = async () => { await delay(jobDelayTime.saveHistoricalTVL); @@ -260,4 +281,5 @@ module.exports = { saveABIPools, saveVipApr, savePerformance, + saveTransaction, }; diff --git a/models/referral-deposit.model.js b/models/referral-deposit.model.js index b209cbb..e19eb4f 100644 --- a/models/referral-deposit.model.js +++ b/models/referral-deposit.model.js @@ -29,9 +29,30 @@ const depositAmount = async (params) => { return await db.collection(collection).insertOne(params); }; +const updateStatus = async (id, amount) => { + const db = mongo.getDB(); + const result = await db.collection(collection).findOne({ + _id: id, + }); + if (result) { + return await db.collection(collection).updateOne( + { + _id: id, + }, + { + $set: { + status: "success", + amount: amount, + }, + } + ); + } +}; + module.exports = { findAll, findOne, getTransaction, depositAmount, + updateStatus, }; diff --git a/models/referral-withdrawal.model.js b/models/referral-withdrawal.model.js index 8b618dc..e8d69cb 100644 --- a/models/referral-withdrawal.model.js +++ b/models/referral-withdrawal.model.js @@ -26,9 +26,30 @@ const withdrawAmount = async (params) => { return await db.collection(collection).insertOne(params); }; +const updateStatus = async (id, amount) => { + const db = mongo.getDB(); + const result = await db.collection(collection).findOne({ + _id: id, + }); + if (result) { + return await db.collection(collection).updateOne( + { + _id: id, + }, + { + $set: { + status: "success", + amount: amount, + }, + } + ); + } +}; + module.exports = { findAll, findOne, getTransaction, withdrawAmount, + updateStatus, }; diff --git a/services/referral/deposit/handler.js b/services/referral/deposit/handler.js index 5e28b16..bbc4f48 100644 --- a/services/referral/deposit/handler.js +++ b/services/referral/deposit/handler.js @@ -79,7 +79,7 @@ module.exports.addDepositAmount = async (req, res) => { } else { const result = await isValidReferral(req.body.referral); if (result) { - const now = moment().format("MMMM Do YYYY, h:mm:ss a"); + const now = moment().valueOf(); await db.depositAmount({ _id: req.body.transactionId, referral: req.body.referral, diff --git a/services/referral/validate/handler.js b/services/referral/validate/handler.js index 87ffbb0..6bfc2cc 100644 --- a/services/referral/validate/handler.js +++ b/services/referral/validate/handler.js @@ -1,38 +1,107 @@ -const deposit = require("../deposit/handler"); -const withdraw = require("../withdraw/handler"); +"use strict"; -const getPendingDeposits = async (req, res) => { - const result = await deposit.getAll({ status: "pending" }); - const resultId = result; +require("dotenv").config(); +const fetch = require("node-fetch"); +const subgraphUrl = process.env.SUBGRAPH_ENDPOINT; +const polygonSubgraphUrl = process.env.POLYGON_SUBGRAPH_ENDPOINT; + +const db_deposit = require("../../../models/referral-deposit.model"); +const db_withdraw = require("../../../models/referral-withdrawal.model"); + +const getPendingDeposits = async () => { + const result = await db_deposit.findAll({ status: "pending" }); + let resultIds = []; + result.forEach((element) => { + resultIds.push(element._id); + }); + + return resultIds; }; -const getGraphTransactions = async (userAddress, network) => { +const getPendingWithdrawals = async () => { + const result = await db_withdraw.findAll({ status: "pending" }); + let resultIds = []; + result.forEach((element) => { + resultIds.push(element._id); + }); + + return resultIds; +}; + +const getGraphTransactions = async () => { const query = ` - { - deposits: deposits (where: {account: "${userAddress}"}) { - transactionAddress: transaction { - id - } + { + withdrawals{ + id + amountInUSD + } + deposits{ + id + amountInUSD } + } `; - let url = ""; - switch (network) { - case constant.ETHEREUM: - url = subgraphUrl; - break; - case constant.POLYGON: - url = polygonSubgraphUrl; - break; - default: - break; - } - const response = await fetch(url, { + //Getting Polygon transactions + const response = await fetch(polygonSubgraphUrl, { method: "POST", body: JSON.stringify({ query }), }); const responseJson = await response.json(); - const graphTransactions = responseJson.data; - return graphTransactions; + + let graphTransactionsID = []; + responseJson.data.deposits.forEach((element) => { + graphTransactionsID.push([element.id, element.amountInUSD]); + }); + responseJson.data.withdrawals.forEach((element) => { + graphTransactionsID.push([element.id, element.amountInUSD]); + }); + + //Getting subgraph transactions + + const response_2 = await fetch(subgraphUrl, { + method: "POST", + body: JSON.stringify({ query }), + }); + + const responseJson_2 = await response_2.json(); + + let graphTransactionsID_2 = []; + responseJson_2.data.deposits.forEach((element) => { + graphTransactionsID_2.push([element.id, element.amountInUSD]); + }); + + responseJson_2.data.withdrawals.forEach((element) => { + graphTransactionsID_2.push([element.id, element.amountInUSD]); + }); + + //0x0023d5fedabdaa884411e433ff28baeac2eab72da8868d399bd3347132842b4e + return [graphTransactionsID, graphTransactionsID_2]; +}; + +module.exports.validator = async () => { + let pendingDeposits = await getPendingDeposits(); + let graphIds = await getGraphTransactions(); + let pendingWithdrawals = await getPendingWithdrawals(); + + for (const unit of graphIds[0]) { + if (pendingDeposits.includes(unit[0])) { + await db_deposit.updateStatus(unit[0], unit[1]); + } + if (pendingWithdrawals.includes(unit[0])) { + await db_withdraw.updateStatus(unit[0], unit[1]); + } + } + + for (const unit of graphIds[1]) { + if (pendingDeposits.includes(unit[0])) { + await db_deposit.updateStatus(unit[0], unit[1]); + } + if (pendingWithdrawals.includes(unit[0])) { + await db_withdraw.updateStatus(unit[0], unit[1]); + } + } + + return; }; diff --git a/services/referral/withdraw/handler.js b/services/referral/withdraw/handler.js index ba637b3..48d84d1 100644 --- a/services/referral/withdraw/handler.js +++ b/services/referral/withdraw/handler.js @@ -28,7 +28,7 @@ module.exports.addWithdrawalAmount = async (req, res) => { }); } } else { - const now = moment().format("MMMM Do YYYY, h:mm:ss a"); + const now = moment().valueOf(); await db.withdrawAmount({ _id: req.body.transactionId, amount: req.body.amount,