Skip to content

Commit

Permalink
Vault fee data endpoint (beefyfinance#894)
Browse files Browse the repository at this point in the history
* Vault fee data fetching

* fee endpoint, updating logic and map contract responses to performanceFees

* add ethereum-multicall library alternative

* remove duplicate fee calls from abi

* refactor to use new library

* cleanup

* cleanup and reenable lastUpdated condition for fetching data

* chimp is awesome

* typos

* fixes to maxi vault fees

* if strat is paused, 0 withdraw fee

* reordering

* reenable filtering by date

* parallel multicall calls on same chain

* adjust intervals

* tidying up
  • Loading branch information
seguido authored Aug 25, 2022
1 parent 8d7e5b9 commit 6666a1e
Show file tree
Hide file tree
Showing 7 changed files with 1,216 additions and 2 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@
"apollo-link-timeout": "^4.0.0",
"bignumber.js": "^9.0.1",
"date-fns": "^2.21.3",
"eth-multicall": "^1.3.13",
"eth-multicall": "^1.4",
"ethereum-abi-types-generator": "^1.1.7",
"ethereum-multicall": "^2.14.1",
"ethers": "^5.0.26",
"graphql": "^15.5.0",
"graphql-tag": "^2.12.4",
Expand Down
307 changes: 307 additions & 0 deletions src/abis/FeeABI.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,307 @@
[
{
"inputs": [],
"name": "strategistFee",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "STRATEGIST_FEE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "callFee",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "callFeeAmount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "callfee",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "CALL_FEE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "beefyFee",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "TREASURY_FEE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "REWARDS_FEE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "rewardsFee",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "fee",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAX_FEE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAX_CALL_FEE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "maxfee",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "max",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getFees",
"outputs": [
{
"components": [
{
"internalType": "uint256",
"name": "total",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "beefy",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "call",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "strategist",
"type": "uint256"
},
{
"internalType": "string",
"name": "label",
"type": "string"
},
{
"internalType": "bool",
"name": "active",
"type": "bool"
}
],
"internalType": "struct IFeeConfig.FeeCategory",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "paused",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "withdrawalFee",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "WITHDRAWAL_FEE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "WITHDRAWAL_MAX",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "withdrawalMax",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}
]
Loading

0 comments on commit 6666a1e

Please sign in to comment.