@stake-dao/reader 0.2.16 → 0.2.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/esm/abis/angleVaultsMulticall.js +85 -0
  2. package/dist/esm/abis/angleVaultsMulticall.js.map +1 -0
  3. package/dist/esm/abis/lockersMulticall.js +296 -0
  4. package/dist/esm/abis/lockersMulticall.js.map +1 -0
  5. package/dist/esm/abis/pendleVaultsMulticall.js +105 -0
  6. package/dist/esm/abis/pendleVaultsMulticall.js.map +1 -0
  7. package/dist/esm/abis/yearnVaultsMulticall.js +109 -0
  8. package/dist/esm/abis/yearnVaultsMulticall.js.map +1 -0
  9. package/dist/esm/lockers/fetch/index.js +1 -1
  10. package/dist/esm/lockers/fetch/index.js.map +1 -1
  11. package/dist/esm/strategies/angle/fetch.js +1 -1
  12. package/dist/esm/strategies/angle/fetch.js.map +1 -1
  13. package/dist/esm/strategies/pendle/fetch.js +1 -1
  14. package/dist/esm/strategies/pendle/fetch.js.map +1 -1
  15. package/dist/esm/strategies/yearn/fetch/fetchAllYearnGauges.js +1 -1
  16. package/dist/esm/strategies/yearn/fetch/fetchAllYearnGauges.js.map +1 -1
  17. package/dist/esm/strategies/yearn/fetch/index.js +1 -1
  18. package/dist/esm/strategies/yearn/fetch/index.js.map +1 -1
  19. package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
  20. package/dist/types/abis/angleVaultsMulticall.d.ts +42 -0
  21. package/dist/types/abis/angleVaultsMulticall.d.ts.map +1 -0
  22. package/dist/types/abis/lockersMulticall.d.ts +52 -0
  23. package/dist/types/abis/lockersMulticall.d.ts.map +1 -0
  24. package/dist/types/abis/pendleVaultsMulticall.d.ts +31 -0
  25. package/dist/types/abis/pendleVaultsMulticall.d.ts.map +1 -0
  26. package/dist/types/abis/yearnVaultsMulticall.d.ts +46 -0
  27. package/dist/types/abis/yearnVaultsMulticall.d.ts.map +1 -0
  28. package/dist/types/strategies/pendle/fetch.d.ts.map +1 -1
  29. package/package.json +1 -1
  30. package/src/abis/angleVaultsMulticall.ts +85 -0
  31. package/src/abis/lockersMulticall.ts +296 -0
  32. package/src/abis/pendleVaultsMulticall.ts +105 -0
  33. package/src/abis/yearnVaultsMulticall.ts +109 -0
  34. package/src/lockers/fetch/index.ts +1 -1
  35. package/src/strategies/angle/fetch.ts +1 -1
  36. package/src/strategies/pendle/fetch.ts +1 -1
  37. package/src/strategies/yearn/fetch/fetchAllYearnGauges.ts +1 -1
  38. package/src/strategies/yearn/fetch/index.ts +1 -1
  39. package/dist/esm/abis/MulticallAngleVaults.json +0 -83
  40. package/dist/esm/lockers/abis/MulticallLockers.json +0 -591
  41. package/dist/esm/strategies/pendle/abis/MulticallPendleStratsAbi.json +0 -103
  42. package/dist/esm/strategies/utils/abis/MulticallYearnStratsAbi.json +0 -107
@@ -0,0 +1,109 @@
1
+ const yearnVaultsMulticall = [
2
+ {
3
+ inputs: [{ internalType: 'address', name: 'account', type: 'address' }],
4
+ name: 'balanceOf',
5
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
6
+ payable: false,
7
+ stateMutability: 'view',
8
+ type: 'function',
9
+ },
10
+ {
11
+ inputs: [],
12
+ name: 'totalSupply',
13
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
14
+ payable: false,
15
+ stateMutability: 'view',
16
+ type: 'function',
17
+ },
18
+ {
19
+ inputs: [],
20
+ name: 'pricePerShare',
21
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
22
+ payable: false,
23
+ stateMutability: 'view',
24
+ type: 'function',
25
+ },
26
+ {
27
+ inputs: [],
28
+ name: 'working_supply',
29
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
30
+ payable: false,
31
+ stateMutability: 'view',
32
+ type: 'function',
33
+ },
34
+ {
35
+ inputs: [],
36
+ name: 'claimIncentiveFee',
37
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
38
+ payable: false,
39
+ stateMutability: 'view',
40
+ type: 'function',
41
+ },
42
+ {
43
+ inputs: [],
44
+ name: 'protocolFeesPercent',
45
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
46
+ payable: false,
47
+ stateMutability: 'view',
48
+ type: 'function',
49
+ },
50
+ {
51
+ inputs: [{ internalType: 'address', name: '_account', type: 'address' }],
52
+ name: 'nextBoostedBalanceOf',
53
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
54
+ stateMutability: 'view',
55
+ type: 'function',
56
+ },
57
+ {
58
+ inputs: [{ internalType: 'address', name: '_account', type: 'address' }],
59
+ name: 'earned',
60
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
61
+ stateMutability: 'view',
62
+ type: 'function',
63
+ },
64
+ {
65
+ inputs: [],
66
+ name: 'totalAssets',
67
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
68
+ stateMutability: 'view',
69
+ type: 'function',
70
+ },
71
+ {
72
+ inputs: [],
73
+ name: 'rewardRate',
74
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
75
+ stateMutability: 'view',
76
+ type: 'function',
77
+ },
78
+ {
79
+ inputs: [{ internalType: 'address', name: 'account', type: 'address' }],
80
+ name: 'redeemRewards',
81
+ outputs: [{ internalType: 'uint256[]', name: '', type: 'uint256[]' }],
82
+ payable: false,
83
+ stateMutability: 'view',
84
+ type: 'function',
85
+ },
86
+ {
87
+ stateMutability: 'view',
88
+ type: 'function',
89
+ name: 'gauge_relative_weight',
90
+ inputs: [{ name: 'addr', type: 'address' }],
91
+ outputs: [{ name: '', type: 'uint256' }],
92
+ },
93
+ {
94
+ stateMutability: 'view',
95
+ type: 'function',
96
+ name: 'get_gauge_weight',
97
+ inputs: [{ name: 'addr', type: 'address' }],
98
+ outputs: [{ name: '', type: 'uint256' }],
99
+ },
100
+ {
101
+ stateMutability: 'view',
102
+ type: 'function',
103
+ name: 'get_total_weight',
104
+ inputs: [],
105
+ outputs: [{ name: '', type: 'uint256' }],
106
+ },
107
+ ]
108
+
109
+ export default yearnVaultsMulticall
@@ -8,8 +8,8 @@ import { type Price } from '../../prices.js'
8
8
  import { type Call, multicall } from '../../utils.js'
9
9
  import { lockedAmountCallSideChain } from '../utils/index.js'
10
10
 
11
+ import lockersMulticallAbi from '../../abis/lockersMulticall.js'
11
12
  import { type MultiChainCall, multichainMulticall } from '../../utils.js'
12
- import lockersMulticallAbi from '../abis/MulticallLockers.json' with { type: 'json' }
13
13
  import { getCherriesLeaderBoard } from '../utils/getCherriesLeaderBoard.js'
14
14
 
15
15
  import { extractFees, feeCalls } from '../utils/callsForLockers/feeCalls.js'
@@ -2,7 +2,7 @@ import { STRAT_FEES, angleStrats, contracts } from '@stake-dao/constants'
2
2
  import { chunk, uniq } from 'lodash-es'
3
3
  import { encodeAbiParameters, formatUnits, parseAbiParameters } from 'viem'
4
4
  import { mainnet } from 'viem/chains'
5
- import multicallAngleVaultsAbi from '../../abis/MulticallAngleVaults.json' with { type: 'json' }
5
+ import multicallAngleVaultsAbi from '../../abis/angleVaultsMulticall.js'
6
6
  import { batchAngleStrats } from '../../bytecodes/index.js'
7
7
  import { type Price, getPricesFromLlama } from '../../prices.js'
8
8
  import { batchJsonRpc, equalTlc, multicall } from '../../utils.js'
@@ -3,6 +3,7 @@ import { chunk } from 'lodash-es'
3
3
  import { encodeAbiParameters, formatUnits, parseAbiParameters } from 'viem'
4
4
 
5
5
  import { ONE_YEAR, STRAT_FEES, contract, contracts, mainnet, pendleStrats, tokenWithId } from '@stake-dao/constants'
6
+ import multicallPendleStratsAbi from '../../abis/pendleVaultsMulticall.js'
6
7
  import { batchPendleStrats } from '../../bytecodes/index.js'
7
8
  import type { Price } from '../../prices.js'
8
9
  import { type Call, batchJsonRpc, equalTlc, multicall } from '../../utils.js'
@@ -12,7 +13,6 @@ import { getBoost } from '../utils/boost.js'
12
13
  import decodeEtherscanFactoryEvent from '../utils/decodeEtherscanFactoryEvent.js'
13
14
  import { getAprBreakdown } from '../utils/getAprBreakdown.js'
14
15
  import { OneEther, Zero, concatBytecode } from '../utils/index.js'
15
- import multicallPendleStratsAbi from './abis/MulticallPendleStratsAbi.json' with { type: 'json' }
16
16
  import { buildPendleStrategies } from './build.js'
17
17
  import getPendleApiData from './getPendleApiData.js'
18
18
  import pendlePoints from './pendlePoints.js'
@@ -2,9 +2,9 @@ import { chunk } from 'lodash-es'
2
2
  import { encodeAbiParameters, parseAbiParameters } from 'viem'
3
3
 
4
4
  import { contracts } from '@stake-dao/constants'
5
+ import multicallYearnStratsAbi from '../../../abis/yearnVaultsMulticall.js'
5
6
  import { fetchYearnGauges } from '../../../bytecodes/index.js'
6
7
  import { batchJsonRpc, multicall } from '../../../utils.js'
7
- import multicallYearnStratsAbi from '../../utils/abis/MulticallYearnStratsAbi.json' with { type: 'json' }
8
8
  import { concatBytecode } from '../../utils/index.js'
9
9
  import { computeYearnApr } from './computeYearnApr.js'
10
10
 
@@ -2,9 +2,9 @@ import { chunk } from 'lodash-es'
2
2
  import { formatEther, formatUnits } from 'viem'
3
3
 
4
4
  import { ONE_YEAR, yearnStrats } from '@stake-dao/constants'
5
+ import multicallYearnStratsAbi from '../../../abis/yearnVaultsMulticall.js'
5
6
  import { equalTlc, multicall } from '../../../utils.js'
6
7
  import { NEW_FACTORY_EXPLORER_EVENTS } from '../../curve/endpoints.js'
7
- import multicallYearnStratsAbi from '../../utils/abis/MulticallYearnStratsAbi.json' with { type: 'json' }
8
8
  import { getBoost } from '../../utils/boost.js'
9
9
  import { buildYearnStrategies } from '../build.js'
10
10
  import { computeYearnApr } from './computeYearnApr.js'
@@ -1,83 +0,0 @@
1
- [
2
- {
3
- "inputs": [],
4
- "name": "totalSupply",
5
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
6
- "payable": false,
7
- "stateMutability": "view",
8
- "type": "function"
9
- },
10
- {
11
- "inputs": [],
12
- "name": "working_supply",
13
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
14
- "payable": false,
15
- "stateMutability": "view",
16
- "type": "function"
17
- },
18
- {
19
- "inputs": [],
20
- "name": "getUnderlyingBalances",
21
- "outputs": [
22
- { "internalType": "uint256", "name": "", "type": "uint256" },
23
- { "internalType": "uint256", "name": "", "type": "uint256" }
24
- ],
25
- "payable": false,
26
- "stateMutability": "view",
27
- "type": "function"
28
- },
29
- {
30
- "inputs": [],
31
- "name": "getTotalAmounts",
32
- "outputs": [
33
- { "internalType": "uint256", "name": "", "type": "uint256" },
34
- { "internalType": "uint256", "name": "", "type": "uint256" }
35
- ],
36
- "payable": false,
37
- "stateMutability": "view",
38
- "type": "function"
39
- },
40
- {
41
- "inputs": [],
42
- "name": "getTotalAmounts",
43
- "outputs": [
44
- { "internalType": "uint256", "name": "", "type": "uint256" },
45
- { "internalType": "uint256", "name": "", "type": "uint256" }
46
- ],
47
- "payable": false,
48
- "stateMutability": "view",
49
- "type": "function"
50
- },
51
- {
52
- "inputs": [{ "name": "arg0", "type": "address" }],
53
- "name": "reward_data",
54
- "outputs": [
55
- { "name": "token", "type": "address" },
56
- { "name": "distributor", "type": "address" },
57
- { "name": "period_finish", "type": "uint256" },
58
- { "name": "rate", "type": "uint256" },
59
- { "name": "last_update", "type": "uint256" },
60
- { "name": "integral", "type": "uint256" }
61
- ],
62
- "stateMutability": "view",
63
- "type": "function"
64
- },
65
- {
66
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
67
- "name": "rewardData",
68
- "outputs": [
69
- { "internalType": "address", "name": "rewardsDistributor", "type": "address" },
70
- { "internalType": "uint256", "name": "rewardsDuration", "type": "uint256" },
71
- { "internalType": "uint256", "name": "periodFinish", "type": "uint256" },
72
- { "internalType": "uint256", "name": "rewardRate", "type": "uint256" },
73
- { "internalType": "uint256", "name": "lastUpdateTime", "type": "uint256" },
74
- {
75
- "internalType": "uint256",
76
- "name": "rewardPerTokenStored",
77
- "type": "uint256"
78
- }
79
- ],
80
- "stateMutability": "view",
81
- "type": "function"
82
- }
83
- ]