@stake-dao/reader 0.4.30 → 0.4.32

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 (182) hide show
  1. package/dist/esm/bytecodes/ccipFee.js +11 -0
  2. package/dist/esm/bytecodes/ccipFee.js.map +1 -0
  3. package/dist/esm/bytecodes/gaugeManager/curveGaugeRewardsData.js +1 -1
  4. package/dist/esm/bytecodes/gaugeManager/curveGaugeRewardsData.js.map +1 -1
  5. package/dist/esm/bytecodes/votemarket/batchCampaigns.js +5 -3
  6. package/dist/esm/bytecodes/votemarket/batchCampaigns.js.map +1 -1
  7. package/dist/esm/bytecodes/votemarket/curve/batchCurveGauges.js +3 -2
  8. package/dist/esm/bytecodes/votemarket/curve/batchCurveGauges.js.map +1 -1
  9. package/dist/esm/ccip/fetchCcipFee.js +25 -0
  10. package/dist/esm/ccip/fetchCcipFee.js.map +1 -0
  11. package/dist/esm/endpoints.js +3 -0
  12. package/dist/esm/endpoints.js.map +1 -1
  13. package/dist/esm/index.js +8 -0
  14. package/dist/esm/index.js.map +1 -1
  15. package/dist/esm/lockers/fetch/index.js +7 -4
  16. package/dist/esm/lockers/fetch/index.js.map +1 -1
  17. package/dist/esm/lockers/fetch/parseBoost.js +13 -0
  18. package/dist/esm/lockers/fetch/parseBoost.js.map +1 -0
  19. package/dist/esm/lockers/utils/cakeLockerAirdrop.js +1 -1
  20. package/dist/esm/lockers/utils/cakeLockerAirdrop.js.map +1 -1
  21. package/dist/esm/lockers/utils/callsForLockers/index.js +4 -3
  22. package/dist/esm/lockers/utils/callsForLockers/index.js.map +1 -1
  23. package/dist/esm/lockers/utils/callsForLockers/pegCalls.js +1 -2
  24. package/dist/esm/lockers/utils/callsForLockers/pegCalls.js.map +1 -1
  25. package/dist/esm/lockers/utils/callsForLockers/veBoosts.js +9 -0
  26. package/dist/esm/lockers/utils/callsForLockers/veBoosts.js.map +1 -0
  27. package/dist/esm/lockers/utils/getBribesRewardsData.js +1 -2
  28. package/dist/esm/lockers/utils/getBribesRewardsData.js.map +1 -1
  29. package/dist/esm/lockers/utils/getHttpCalls.js +3 -2
  30. package/dist/esm/lockers/utils/getHttpCalls.js.map +1 -1
  31. package/dist/esm/lockers/utils/index.js +1 -1
  32. package/dist/esm/lockers/utils/index.js.map +1 -1
  33. package/dist/esm/prices.js +17 -21
  34. package/dist/esm/prices.js.map +1 -1
  35. package/dist/esm/sdt/fetch.js +1 -2
  36. package/dist/esm/sdt/fetch.js.map +1 -1
  37. package/dist/esm/sdt.js +1 -5
  38. package/dist/esm/sdt.js.map +1 -1
  39. package/dist/esm/strategies/angle/fetch.js +1 -2
  40. package/dist/esm/strategies/angle/fetch.js.map +1 -1
  41. package/dist/esm/strategies/balancer/fetch.js +2 -2
  42. package/dist/esm/strategies/balancer/fetch.js.map +1 -1
  43. package/dist/esm/strategies/curve/build.js +5 -13
  44. package/dist/esm/strategies/curve/build.js.map +1 -1
  45. package/dist/esm/strategies/curve/fetch/curveApiData/getCurveApiData.js +2 -2
  46. package/dist/esm/strategies/curve/fetch/curveApiData/getCurveApiData.js.map +1 -1
  47. package/dist/esm/strategies/curve/fetch/getCvxApr.js +1 -1
  48. package/dist/esm/strategies/curve/fetch/getCvxApr.js.map +1 -1
  49. package/dist/esm/strategies/curve/fetch/index.js +1 -2
  50. package/dist/esm/strategies/curve/fetch/index.js.map +1 -1
  51. package/dist/esm/strategies/pancakeswap/endpoints.js +2 -1
  52. package/dist/esm/strategies/pancakeswap/endpoints.js.map +1 -1
  53. package/dist/esm/strategies/pancakeswap/fetch/getPancakeV3Vaults.js +2 -2
  54. package/dist/esm/strategies/pancakeswap/fetch/index.js +2 -1
  55. package/dist/esm/strategies/pancakeswap/fetch/index.js.map +1 -1
  56. package/dist/esm/strategies/pancakeswap/fetch/pancakeswapMath.js +2 -3
  57. package/dist/esm/strategies/pancakeswap/fetch/pancakeswapMath.js.map +1 -1
  58. package/dist/esm/strategies/pendle/fetch.js +2 -2
  59. package/dist/esm/strategies/pendle/fetch.js.map +1 -1
  60. package/dist/esm/strategies/utils/boost.js +1 -1
  61. package/dist/esm/strategies/utils/boost.js.map +1 -1
  62. package/dist/esm/strategies/utils/index.js +1 -4
  63. package/dist/esm/strategies/utils/index.js.map +1 -1
  64. package/dist/esm/strategies/yearn/build.js +5 -13
  65. package/dist/esm/strategies/yearn/build.js.map +1 -1
  66. package/dist/esm/strategies/yearn/fetch/index.js +2 -2
  67. package/dist/esm/strategies/yearn/fetch/index.js.map +1 -1
  68. package/dist/esm/tokens.js +34 -0
  69. package/dist/esm/tokens.js.map +1 -0
  70. package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
  71. package/dist/esm/utils.js +27 -24
  72. package/dist/esm/utils.js.map +1 -1
  73. package/dist/esm/votemarket/curve/config.js +12 -1
  74. package/dist/esm/votemarket/curve/config.js.map +1 -1
  75. package/dist/esm/votemarket/curve/fetchCurveGauges.js +5 -3
  76. package/dist/esm/votemarket/curve/fetchCurveGauges.js.map +1 -1
  77. package/dist/esm/votemarket/curve/fetchCurveUserVotes.js +1 -1
  78. package/dist/esm/votemarket/curve/fetchCurveUserVotes.js.map +1 -1
  79. package/dist/esm/votemarket/curve/fetchUserVlCvxClaimable.js +81 -0
  80. package/dist/esm/votemarket/curve/fetchUserVlCvxClaimable.js.map +1 -0
  81. package/dist/esm/votemarket/fetchCampaigns.js +46 -49
  82. package/dist/esm/votemarket/fetchCampaigns.js.map +1 -1
  83. package/dist/esm/votemarket/fetchClaimableData.js +7 -12
  84. package/dist/esm/votemarket/fetchClaimableData.js.map +1 -1
  85. package/dist/esm/votemarket/generateProofs/getBlockProof.js +2 -1
  86. package/dist/esm/votemarket/generateProofs/getBlockProof.js.map +1 -1
  87. package/dist/types/bytecodes/ccipFee.d.ts +4 -0
  88. package/dist/types/bytecodes/ccipFee.d.ts.map +1 -0
  89. package/dist/types/bytecodes/votemarket/batchCampaigns.d.ts.map +1 -1
  90. package/dist/types/bytecodes/votemarket/curve/batchCurveGauges.d.ts.map +1 -1
  91. package/dist/types/ccip/fetchCcipFee.d.ts +15 -0
  92. package/dist/types/ccip/fetchCcipFee.d.ts.map +1 -0
  93. package/dist/types/endpoints.d.ts +3 -0
  94. package/dist/types/endpoints.d.ts.map +1 -1
  95. package/dist/types/index.d.ts +2 -0
  96. package/dist/types/index.d.ts.map +1 -1
  97. package/dist/types/lockers/fetch/index.d.ts +1 -0
  98. package/dist/types/lockers/fetch/index.d.ts.map +1 -1
  99. package/dist/types/lockers/fetch/parseBoost.d.ts +3 -0
  100. package/dist/types/lockers/fetch/parseBoost.d.ts.map +1 -0
  101. package/dist/types/lockers/utils/callsForLockers/index.d.ts +5 -1
  102. package/dist/types/lockers/utils/callsForLockers/index.d.ts.map +1 -1
  103. package/dist/types/lockers/utils/callsForLockers/pegCalls.d.ts.map +1 -1
  104. package/dist/types/lockers/utils/callsForLockers/veBoosts.d.ts +7 -0
  105. package/dist/types/lockers/utils/callsForLockers/veBoosts.d.ts.map +1 -0
  106. package/dist/types/lockers/utils/getBribesRewardsData.d.ts.map +1 -1
  107. package/dist/types/lockers/utils/getHttpCalls.d.ts.map +1 -1
  108. package/dist/types/prices.d.ts +1 -0
  109. package/dist/types/prices.d.ts.map +1 -1
  110. package/dist/types/sdt/fetch.d.ts.map +1 -1
  111. package/dist/types/sdt.d.ts.map +1 -1
  112. package/dist/types/strategies/angle/fetch.d.ts.map +1 -1
  113. package/dist/types/strategies/balancer/fetch.d.ts.map +1 -1
  114. package/dist/types/strategies/curve/build.d.ts.map +1 -1
  115. package/dist/types/strategies/curve/fetch/index.d.ts.map +1 -1
  116. package/dist/types/strategies/pancakeswap/endpoints.d.ts.map +1 -1
  117. package/dist/types/strategies/pancakeswap/fetch/index.d.ts.map +1 -1
  118. package/dist/types/strategies/pancakeswap/fetch/pancakeswapMath.d.ts.map +1 -1
  119. package/dist/types/strategies/pendle/fetch.d.ts.map +1 -1
  120. package/dist/types/strategies/utils/index.d.ts +0 -3
  121. package/dist/types/strategies/utils/index.d.ts.map +1 -1
  122. package/dist/types/strategies/yearn/build.d.ts.map +1 -1
  123. package/dist/types/tokens.d.ts +3 -0
  124. package/dist/types/tokens.d.ts.map +1 -0
  125. package/dist/types/utils.d.ts.map +1 -1
  126. package/dist/types/votemarket/curve/config.d.ts +12 -1
  127. package/dist/types/votemarket/curve/config.d.ts.map +1 -1
  128. package/dist/types/votemarket/curve/fetchCurveGauges.d.ts.map +1 -1
  129. package/dist/types/votemarket/curve/fetchUserVlCvxClaimable.d.ts +16 -0
  130. package/dist/types/votemarket/curve/fetchUserVlCvxClaimable.d.ts.map +1 -0
  131. package/dist/types/votemarket/fetchCampaigns.d.ts +4 -2
  132. package/dist/types/votemarket/fetchCampaigns.d.ts.map +1 -1
  133. package/dist/types/votemarket/fetchClaimableData.d.ts +1 -5
  134. package/dist/types/votemarket/fetchClaimableData.d.ts.map +1 -1
  135. package/dist/types/votemarket/generateProofs/getBlockProof.d.ts.map +1 -1
  136. package/dist/types/votemarket/types.d.ts +9 -1
  137. package/dist/types/votemarket/types.d.ts.map +1 -1
  138. package/package.json +2 -2
  139. package/src/bytecodes/ccipFee.ts +14 -0
  140. package/src/bytecodes/gaugeManager/curveGaugeRewardsData.ts +1 -1
  141. package/src/bytecodes/votemarket/batchCampaigns.ts +5 -3
  142. package/src/bytecodes/votemarket/curve/batchCurveGauges.ts +3 -2
  143. package/src/ccip/fetchCcipFee.ts +46 -0
  144. package/src/endpoints.ts +4 -0
  145. package/src/index.ts +13 -0
  146. package/src/lockers/fetch/index.ts +8 -2
  147. package/src/lockers/fetch/parseBoost.ts +13 -0
  148. package/src/lockers/utils/cakeLockerAirdrop.ts +1 -1
  149. package/src/lockers/utils/callsForLockers/index.ts +7 -2
  150. package/src/lockers/utils/callsForLockers/pegCalls.ts +1 -2
  151. package/src/lockers/utils/callsForLockers/veBoosts.ts +15 -0
  152. package/src/lockers/utils/getBribesRewardsData.ts +1 -2
  153. package/src/lockers/utils/getHttpCalls.ts +3 -2
  154. package/src/lockers/utils/index.ts +1 -1
  155. package/src/prices.ts +18 -21
  156. package/src/sdt/fetch.ts +1 -2
  157. package/src/sdt.ts +10 -5
  158. package/src/strategies/angle/fetch.ts +1 -2
  159. package/src/strategies/balancer/fetch.ts +3 -1
  160. package/src/strategies/curve/build.ts +6 -20
  161. package/src/strategies/curve/fetch/curveApiData/getCurveApiData.ts +2 -2
  162. package/src/strategies/curve/fetch/getCvxApr.ts +1 -1
  163. package/src/strategies/curve/fetch/index.ts +1 -2
  164. package/src/strategies/pancakeswap/endpoints.ts +3 -2
  165. package/src/strategies/pancakeswap/fetch/getPancakeV3Vaults.ts +2 -2
  166. package/src/strategies/pancakeswap/fetch/index.ts +2 -1
  167. package/src/strategies/pancakeswap/fetch/pancakeswapMath.ts +2 -3
  168. package/src/strategies/pendle/fetch.ts +12 -2
  169. package/src/strategies/utils/boost.ts +1 -1
  170. package/src/strategies/utils/index.ts +1 -5
  171. package/src/strategies/yearn/build.ts +6 -20
  172. package/src/strategies/yearn/fetch/index.ts +2 -2
  173. package/src/tokens.ts +44 -0
  174. package/src/utils.ts +41 -29
  175. package/src/votemarket/curve/config.ts +12 -1
  176. package/src/votemarket/curve/fetchCurveGauges.ts +5 -3
  177. package/src/votemarket/curve/fetchCurveUserVotes.ts +1 -1
  178. package/src/votemarket/curve/fetchUserVlCvxClaimable.ts +132 -0
  179. package/src/votemarket/fetchCampaigns.ts +61 -55
  180. package/src/votemarket/fetchClaimableData.ts +11 -16
  181. package/src/votemarket/generateProofs/getBlockProof.ts +2 -1
  182. package/src/votemarket/types.ts +9 -1
@@ -2,7 +2,7 @@ import type { BatchMetaData } from '../../types.js'
2
2
 
3
3
  const batchCurveGauges: BatchMetaData = {
4
4
  bytecode: {
5
- 1: '0x608060405234801561000f575f80fd5b50604051610a57380380610a578339818101604052810190610031919061068d565b5f732f50d538606fa9edd2b11e2446beb18c9d5846bb90505f825190505f8167ffffffffffffffff8111156100695761006861051e565b5b6040519080825280602002602001820160405280156100a257816020015b61008f6104b1565b8152602001906001900390816100875790505b5090505f5b8281101561036c575f8473ffffffffffffffffffffffffffffffffffffffff1663b05391878784815181106100df576100de6106d4565b5b60200260200101516040518263ffffffff1660e01b81526004016101039190610710565b602060405180830381865afa15801561011e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101429190610783565b905061014c6104b1565b81815f019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506101928261039b60201b60201c565b826080018360a00182815250821515151581525050508573ffffffffffffffffffffffffffffffffffffffff16634e791a3a836040518263ffffffff1660e01b81526004016101e191906107bd565b6020604051808303815f875af11580156101fd573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061022191906107d6565b8160200181815250508573ffffffffffffffffffffffffffffffffffffffff166395cfcec3836040518263ffffffff1660e01b815260040161026391906107bd565b6020604051808303815f875af115801561027f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102a391906107d6565b8160400181815250508573ffffffffffffffffffffffffffffffffffffffff16636472eee18362093a80426102d8919061082e565b6040518363ffffffff1660e01b81526004016102f5929190610861565b6020604051808303815f875af1158015610311573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061033591906107d6565b81606001818152505080848481518110610352576103516106d4565b5b6020026020010181905250505080806001019150506100a7565b505f8160405160200161037f91906109e1565b6040516020818303038152906040529050602081018059038082f35b5f805f8390508073ffffffffffffffffffffffffffffffffffffffff16639c868ac06040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561040957506040513d601f19601f820116820180604052508101906104069190610a2b565b60015b610415575f925061041a565b809350505b6104298461043160201b60201c565b915050915091565b5f8173ffffffffffffffffffffffffffffffffffffffff16633af973b16040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561049a57506040513d601f19601f8201168201806040525081019061049791906107d6565b60015b6104a757600190506104ac565b809150505b919050565b6040518060c001604052805f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81526020015f81526020015f81526020015f151581526020015f81525090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6105548261050e565b810181811067ffffffffffffffff821117156105735761057261051e565b5b80604052505050565b5f6105856104f9565b9050610591828261054b565b919050565b5f67ffffffffffffffff8211156105b0576105af61051e565b5b602082029050602081019050919050565b5f80fd5b5f819050919050565b6105d7816105c5565b81146105e1575f80fd5b50565b5f815190506105f2816105ce565b92915050565b5f61060a61060584610596565b61057c565b9050808382526020820190506020840283018581111561062d5761062c6105c1565b5b835b81811015610656578061064288826105e4565b84526020840193505060208101905061062f565b5050509392505050565b5f82601f8301126106745761067361050a565b5b81516106848482602086016105f8565b91505092915050565b5f602082840312156106a2576106a1610502565b5b5f82015167ffffffffffffffff8111156106bf576106be610506565b5b6106cb84828501610660565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b61070a816105c5565b82525050565b5f6020820190506107235f830184610701565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61075282610729565b9050919050565b61076281610748565b811461076c575f80fd5b50565b5f8151905061077d81610759565b92915050565b5f6020828403121561079857610797610502565b5b5f6107a58482850161076f565b91505092915050565b6107b781610748565b82525050565b5f6020820190506107d05f8301846107ae565b92915050565b5f602082840312156107eb576107ea610502565b5b5f6107f8848285016105e4565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610838826105c5565b9150610843836105c5565b925082820190508082111561085b5761085a610801565b5b92915050565b5f6040820190506108745f8301856107ae565b6108816020830184610701565b9392505050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6108ba81610748565b82525050565b6108c9816105c5565b82525050565b5f8115159050919050565b6108e3816108cf565b82525050565b60c082015f8201516108fd5f8501826108b1565b50602082015161091060208501826108c0565b50604082015161092360408501826108c0565b50606082015161093660608501826108c0565b50608082015161094960808501826108da565b5060a082015161095c60a08501826108c0565b50505050565b5f61096d83836108e9565b60c08301905092915050565b5f602082019050919050565b5f61098f82610888565b6109998185610892565b93506109a4836108a2565b805f5b838110156109d45781516109bb8882610962565b97506109c683610979565b9250506001810190506109a7565b5085935050505092915050565b5f6020820190508181035f8301526109f98184610985565b905092915050565b610a0a816108cf565b8114610a14575f80fd5b50565b5f81519050610a2581610a01565b92915050565b5f60208284031215610a4057610a3f610502565b5b5f610a4d84828501610a17565b9150509291505056fe',
5
+ 1: '0x608060405234801561000f575f80fd5b50604051610c5c380380610c5c83398181016040528101906100319190610817565b5f732f50d538606fa9edd2b11e2446beb18c9d5846bb90505f825190505f8167ffffffffffffffff811115610069576100686106a8565b5b6040519080825280602002602001820160405280156100a257816020015b61008f61061f565b8152602001906001900390816100875790505b5090505f5b828110156103c5575f8473ffffffffffffffffffffffffffffffffffffffff1663b05391878784815181106100df576100de61085e565b5b60200260200101516040518263ffffffff1660e01b8152600401610103919061089a565b602060405180830381865afa15801561011e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610142919061090d565b905061014c61061f565b81815f019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050610192826103f460201b60201c565b8260a0018360c001828152508215151515815250505060018160c00151146101c8576101c38261048a60201b60201c565b6101ca565b815b816020019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508573ffffffffffffffffffffffffffffffffffffffff16634e791a3a836040518263ffffffff1660e01b815260040161023a9190610947565b6020604051808303815f875af1158015610256573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061027a9190610960565b8160400181815250508573ffffffffffffffffffffffffffffffffffffffff166395cfcec3836040518263ffffffff1660e01b81526004016102bc9190610947565b6020604051808303815f875af11580156102d8573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102fc9190610960565b8160600181815250508573ffffffffffffffffffffffffffffffffffffffff16636472eee18362093a804261033191906109b8565b6040518363ffffffff1660e01b815260040161034e9291906109eb565b6020604051808303815f875af115801561036a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061038e9190610960565b816080018181525050808484815181106103ab576103aa61085e565b5b6020026020010181905250505080806001019150506100a7565b505f816040516020016103d89190610b7e565b6040516020818303038152906040529050602081018059038082f35b5f805f8390508073ffffffffffffffffffffffffffffffffffffffff16639c868ac06040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561046257506040513d601f19601f8201168201806040525081019061045f9190610bc8565b60015b61046e575f9250610473565b809350505b6104828461059f60201b60201c565b915050915091565b5f805f8373ffffffffffffffffffffffffffffffffffffffff166040516024016040516020818303038152906040527f9dbb1517000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516105349190610c45565b5f60405180830381855afa9150503d805f811461056c576040519150601f19603f3d011682016040523d82523d5f602084013e610571565b606091505b509150915081801561058357505f8151115b156105945760208101519250610598565b8392505b5050919050565b5f8173ffffffffffffffffffffffffffffffffffffffff16633af973b16040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561060857506040513d601f19601f820116820180604052508101906106059190610960565b60015b610615576001905061061a565b809150505b919050565b6040518060e001604052805f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81526020015f81526020015f81526020015f151581526020015f81525090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6106de82610698565b810181811067ffffffffffffffff821117156106fd576106fc6106a8565b5b80604052505050565b5f61070f610683565b905061071b82826106d5565b919050565b5f67ffffffffffffffff82111561073a576107396106a8565b5b602082029050602081019050919050565b5f80fd5b5f819050919050565b6107618161074f565b811461076b575f80fd5b50565b5f8151905061077c81610758565b92915050565b5f61079461078f84610720565b610706565b905080838252602082019050602084028301858111156107b7576107b661074b565b5b835b818110156107e057806107cc888261076e565b8452602084019350506020810190506107b9565b5050509392505050565b5f82601f8301126107fe576107fd610694565b5b815161080e848260208601610782565b91505092915050565b5f6020828403121561082c5761082b61068c565b5b5f82015167ffffffffffffffff81111561084957610848610690565b5b610855848285016107ea565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b6108948161074f565b82525050565b5f6020820190506108ad5f83018461088b565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6108dc826108b3565b9050919050565b6108ec816108d2565b81146108f6575f80fd5b50565b5f81519050610907816108e3565b92915050565b5f602082840312156109225761092161068c565b5b5f61092f848285016108f9565b91505092915050565b610941816108d2565b82525050565b5f60208201905061095a5f830184610938565b92915050565b5f602082840312156109755761097461068c565b5b5f6109828482850161076e565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6109c28261074f565b91506109cd8361074f565b92508282019050808211156109e5576109e461098b565b5b92915050565b5f6040820190506109fe5f830185610938565b610a0b602083018461088b565b9392505050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610a44816108d2565b82525050565b610a538161074f565b82525050565b5f8115159050919050565b610a6d81610a59565b82525050565b60e082015f820151610a875f850182610a3b565b506020820151610a9a6020850182610a3b565b506040820151610aad6040850182610a4a565b506060820151610ac06060850182610a4a565b506080820151610ad36080850182610a4a565b5060a0820151610ae660a0850182610a64565b5060c0820151610af960c0850182610a4a565b50505050565b5f610b0a8383610a73565b60e08301905092915050565b5f602082019050919050565b5f610b2c82610a12565b610b368185610a1c565b9350610b4183610a2c565b805f5b83811015610b71578151610b588882610aff565b9750610b6383610b16565b925050600181019050610b44565b5085935050505092915050565b5f6020820190508181035f830152610b968184610b22565b905092915050565b610ba781610a59565b8114610bb1575f80fd5b50565b5f81519050610bc281610b9e565b92915050565b5f60208284031215610bdd57610bdc61068c565b5b5f610bea84828501610bb4565b91505092915050565b5f81519050919050565b5f81905092915050565b8281835e5f83830152505050565b5f610c1f82610bf3565b610c298185610bfd565b9350610c39818560208601610c07565b80840191505092915050565b5f610c508284610c15565b91508190509291505056fe',
6
6
  },
7
7
  inputType: {
8
8
  1: ['uint256[] memory gaugesIds'],
@@ -10,7 +10,7 @@ const batchCurveGauges: BatchMetaData = {
10
10
  outputTypeHr: {
11
11
  1: [
12
12
  'ReturnData[] memory returnData',
13
- 'struct ReturnData { address gauge; uint256 weight; uint256 relativeWeight; uint256 futureRelativeWeight; bool isKilled; uint256 chainId; }',
13
+ 'struct ReturnData { address gauge; address childGauge; uint256 weight; uint256 relativeWeight; uint256 futureRelativeWeight; bool isKilled; uint256 chainId; }',
14
14
  ],
15
15
  },
16
16
  outputType: {
@@ -20,6 +20,7 @@ const batchCurveGauges: BatchMetaData = {
20
20
  name: 'returnData',
21
21
  components: [
22
22
  { type: 'address', name: 'gauge' },
23
+ { type: 'address', name: 'childGauge' },
23
24
  { type: 'uint256', name: 'weight' },
24
25
  { type: 'uint256', name: 'relativeWeight' },
25
26
  { type: 'uint256', name: 'futureRelativeWeight' },
@@ -0,0 +1,46 @@
1
+ import { contract } from '@stake-dao/constants'
2
+ import { encodeAbiParameters, parseAbiParameters } from 'viem'
3
+ import ccipFee from '../bytecodes/ccipFee.js'
4
+ import { batchJsonRpc, concatBytecode } from '../utils.js'
5
+
6
+ interface FetchCcipFeeProps {
7
+ rpc: string
8
+ sourceChainId: number
9
+ destChainId: number
10
+ destChainSelector: string
11
+ receiver: string
12
+ executionGasLimit: string
13
+ tokens: { address: string; amount: string }[]
14
+ }
15
+
16
+ export const fetchCcipFee = async ({
17
+ rpc,
18
+ sourceChainId,
19
+ destChainId,
20
+ destChainSelector,
21
+ receiver,
22
+ executionGasLimit,
23
+ tokens,
24
+ }: FetchCcipFeeProps): Promise<bigint> => {
25
+ const inputParams = [
26
+ contract('ccipRouter', sourceChainId),
27
+ destChainSelector,
28
+ destChainId,
29
+ receiver,
30
+ executionGasLimit,
31
+ tokens.map((t) => [t.address, t.amount]),
32
+ ]
33
+
34
+ const inputData = encodeAbiParameters(parseAbiParameters(ccipFee.inputType) as any, inputParams)
35
+ const call = concatBytecode(ccipFee.bytecode, inputData)
36
+
37
+ const rawCcipFee = await batchJsonRpc({
38
+ rpc,
39
+ calls: [call],
40
+ outputTypeAbi: ccipFee.outputType,
41
+ parse: false,
42
+ callsKey: `ccip/getCcipFee.ts: rawCcipFee - chainId ${sourceChainId} - rpc ${rpc}`,
43
+ })
44
+
45
+ return rawCcipFee?.length > 0 ? rawCcipFee[0] : BigInt('10000000000000000')
46
+ }
package/src/endpoints.ts CHANGED
@@ -1,3 +1,7 @@
1
+ export const GH_STAKE_DAO_RAW_ORG = 'https://raw.githubusercontent.com/stake-dao'
2
+ export const GH_STAKE_DAO_BOUNTIES_REPORT = `${GH_STAKE_DAO_RAW_ORG}/bounties-report`
3
+ export const GH_STAKE_DAO_VM_DATA = `${GH_STAKE_DAO_RAW_ORG}/votemarket-data`
4
+
1
5
  export const LLAMA_API_URL = 'https://coins.llama.fi'
2
6
  export const THE_GRAPH_BASE_URL =
3
7
  'https://gateway-arbitrum.network.thegraph.com/api/e3c2ef8231c88703a5b450c188ce2db6/subgraphs/id'
package/src/index.ts CHANGED
@@ -77,6 +77,10 @@ export { generateBlockProof } from './votemarket/generateProofs/getBlockProof.js
77
77
  export { generateGaugeProof } from './votemarket/generateProofs/getGaugeProof.js'
78
78
  export { generateUserProof } from './votemarket/generateProofs/getUserProof.js'
79
79
 
80
+ // vlCVX Claims
81
+
82
+ export { fetchUserVlCvxClaimable } from './votemarket/curve/fetchUserVlCvxClaimable.js'
83
+
80
84
  /// --- END VOTEMARKET
81
85
  ///////////////////////////////////////////////////////////////
82
86
 
@@ -89,3 +93,12 @@ export type { GmGaugeData } from './gaugeManager/curve/gmFetchGauge.js'
89
93
 
90
94
  /// --- END GAUGE MANAGER
91
95
  ///////////////////////////////////////////////////////////////
96
+
97
+ ////////////////////////////////////////////////////////////////
98
+ /// --- CCIP
99
+
100
+ // Curve
101
+ export { fetchCcipFee } from './ccip/fetchCcipFee.js'
102
+
103
+ /// --- CCIP
104
+ ///////////////////////////////////////////////////////////////
@@ -1,8 +1,8 @@
1
- import { type Locker, ONE_YEAR, delegationWithId, lockers } from '@stake-dao/constants'
1
+ import { type Locker, ONE_YEAR, Zero, delegationWithId, lockers } from '@stake-dao/constants'
2
2
  import { formatUnits, parseAbi, zeroAddress } from 'viem'
3
3
  import { fraxtal, mainnet } from 'viem/chains'
4
4
  import lockersMulticallAbi from '../../abis/lockersMulticall.js'
5
- import { Zero, getSdtInflationData } from '../../index.js'
5
+ import { getSdtInflationData } from '../../index.js'
6
6
  import type { Price } from '../../prices.js'
7
7
  import { handlePromise } from '../../strategies/utils/promise.js'
8
8
  import { type Call, type MultiChainCall, equalTlc, multicall, multichainMulticall } from '../../utils.js'
@@ -14,6 +14,7 @@ import getFees from '../utils/getFees.js'
14
14
  import getHttpCalls from '../utils/getHttpCalls.js'
15
15
  import { lockedAmountCallSideChain } from '../utils/index.js'
16
16
  import substractFees from '../utils/substractFees.js'
17
+ import { parseBoost } from './parseBoost.js'
17
18
  import { parsePeg } from './parsePeg.js'
18
19
  import { parseVoteBoosterData } from './parseVoteBoosterData.js'
19
20
 
@@ -59,6 +60,7 @@ export const fetchLockers = async ({ provider, chainId, prices, withAirdropGraph
59
60
  locker.modules.locker,
60
61
  locker.secondaryMarket,
61
62
  locker.voteBooster,
63
+ locker.veBoost,
62
64
  ),
63
65
  )
64
66
  lockersRewardsCalls.push(...callsForRewards(locker.modules.gauge, locker.rewards))
@@ -101,6 +103,7 @@ export const fetchLockers = async ({ provider, chainId, prices, withAirdropGraph
101
103
  locker.modules.locker,
102
104
  locker.secondaryMarket,
103
105
  locker.voteBooster,
106
+ locker.veBoost,
104
107
  ).length
105
108
  const chunkedRawLockersData = rawLockersData.splice(0, lockerCallsLength)
106
109
 
@@ -140,6 +143,8 @@ export const fetchLockers = async ({ provider, chainId, prices, withAirdropGraph
140
143
  const veTokenRate =
141
144
  locker.id === 'mav' ? formatUnits(chunkedRawLockersData[11].result[0], locker.token.decimals) : '4'
142
145
 
146
+ const veBoostTotalSupply = parseBoost(locker, chunkedRawLockersData)
147
+
143
148
  const sideChains = locker.extensions.sideChains?.map((sideChain) => {
144
149
  const rewards =
145
150
  sideChain.rewards?.map((reward) => {
@@ -322,6 +327,7 @@ export const fetchLockers = async ({ provider, chainId, prices, withAirdropGraph
322
327
  sideChains,
323
328
  ...(locker.id === 'cake' ? { airdropGraph } : {}),
324
329
  },
330
+ veBoostTotalSupply,
325
331
  }
326
332
  })
327
333
 
@@ -0,0 +1,13 @@
1
+ import { type Locker } from '@stake-dao/constants'
2
+ import { formatUnits } from 'viem'
3
+
4
+ export const parseBoost = (locker: Locker, chunkedRawLockersData: any) => {
5
+ let boost = '0'
6
+ if (locker.veBoost && locker.id === 'crv') {
7
+ boost = formatUnits(chunkedRawLockersData[15].result, locker.token.decimals)
8
+ } else if (locker.veBoost) {
9
+ boost = formatUnits(chunkedRawLockersData[11].result, locker.token.decimals)
10
+ }
11
+
12
+ return boost
13
+ }
@@ -1,4 +1,4 @@
1
- import { Zero } from '../../index.js'
1
+ import { Zero } from '@stake-dao/constants'
2
2
 
3
3
  const THREE_M_MULTIPLIER = BigInt(10)
4
4
  const TEN_M_MULTIPLIER = BigInt(8)
@@ -1,10 +1,10 @@
1
- import { FOUR_YEAR, type LockerSecondaryMarket } from '@stake-dao/constants'
2
- import { OneEther } from '../../../index.js'
1
+ import { FOUR_YEAR, type LockerSecondaryMarket, OneEther } from '@stake-dao/constants'
3
2
 
4
3
  import type { Address } from 'viem'
5
4
  import depositorCalls from './depositorCalls.js'
6
5
  import gaugeCalls from './gaugeCalls.js'
7
6
  import pegCalls from './pegCalls.js'
7
+ import veBoosts from './veBoosts.js'
8
8
  import veCalls from './veCalls.js'
9
9
  import veSdtCalls from './veSdtCalls.js'
10
10
 
@@ -18,6 +18,10 @@ const callsForLockers = (
18
18
  locker: string,
19
19
  secondaryMarket: LockerSecondaryMarket | undefined,
20
20
  voteBooster: any,
21
+ veBoost?: {
22
+ address: Address
23
+ delegator: Address
24
+ },
21
25
  ) => [
22
26
  ...veCalls(lockerId, votingEscrow, locker as Address, token),
23
27
  ...depositorCalls(depositor, locker as Address),
@@ -35,6 +39,7 @@ const callsForLockers = (
35
39
  },
36
40
  ]
37
41
  : []),
42
+ ...veBoosts(veBoost),
38
43
  ]
39
44
 
40
45
  export default callsForLockers
@@ -1,7 +1,6 @@
1
1
  import { parseUnits, zeroAddress } from 'viem'
2
2
 
3
- import { type LockerSecondaryMarket, contracts } from '@stake-dao/constants'
4
- import { One, Zero } from '../../../index.js'
3
+ import { type LockerSecondaryMarket, One, Zero, contracts } from '@stake-dao/constants'
5
4
 
6
5
  const pegCalls = (secondaryMarket: LockerSecondaryMarket | undefined, sdToken: string, token: string) => {
7
6
  const secondaryMarketLabel = secondaryMarket?.label || ''
@@ -0,0 +1,15 @@
1
+ import type { Address } from 'viem'
2
+
3
+ const veBoosts = (veBoost?: {
4
+ address: Address
5
+ delegator: Address
6
+ }) => {
7
+ const calls: any[] = []
8
+ if (veBoost) {
9
+ calls.push({ address: veBoost.delegator, name: 'totalSupply', params: [] })
10
+ }
11
+
12
+ return calls
13
+ }
14
+
15
+ export default veBoosts
@@ -1,7 +1,6 @@
1
1
  import { parseUnits } from 'viem'
2
2
 
3
- import { delegationWithId } from '@stake-dao/constants'
4
- import { One, Zero } from '../../index.js'
3
+ import { One, Zero, delegationWithId } from '@stake-dao/constants'
5
4
 
6
5
  import { calculateAllData } from './index.js'
7
6
 
@@ -1,10 +1,11 @@
1
1
  import { bsc, fraxtal, mainnet } from 'viem/chains'
2
+ import { GH_STAKE_DAO_BOUNTIES_REPORT } from '../../endpoints.js'
2
3
 
3
4
  const getHttpCalls = async (chainId: number) => {
4
5
  switch (chainId) {
5
6
  case mainnet.id: {
6
7
  const httpCalls = [
7
- (await fetch('https://raw.githubusercontent.com/stake-dao/bounties-report/main/delegationsAPRs.json')).json(),
8
+ (await fetch(`${GH_STAKE_DAO_BOUNTIES_REPORT}/main/delegationsAPRs.json`)).json(),
8
9
  fetch('https://api.frax.finance/v1/vefpisdata/1-day')
9
10
  .then((result) => result.json())
10
11
  .catch((error) => {
@@ -44,7 +45,7 @@ const getHttpCalls = async (chainId: number) => {
44
45
  case fraxtal.id:
45
46
  case bsc.id: {
46
47
  const httpCalls = [
47
- (await fetch('https://raw.githubusercontent.com/stake-dao/bounties-report/main/delegationsAPRs.json')).json(),
48
+ (await fetch(`${GH_STAKE_DAO_BOUNTIES_REPORT}/main/delegationsAPRs.json`)).json(),
48
49
  (await fetch('https://api.stakedao.org/api/lockers/sdfxs-working-supply.json')).json(),
49
50
  ]
50
51
 
@@ -1,6 +1,6 @@
1
1
  import { formatUnits, parseUnits } from 'viem'
2
2
 
3
- import { Zero } from '../../index.js'
3
+ import { Zero } from '@stake-dao/constants'
4
4
 
5
5
  interface Data {
6
6
  veSDTSupply: bigint
package/src/prices.ts CHANGED
@@ -57,33 +57,30 @@ export const getPricesFromCurve = async (chainId: number) => {
57
57
  return httpRequest
58
58
  }
59
59
 
60
+ export const getGeckoTerminalTokenPrefix = (chainId = 1): string => {
61
+ switch (chainId) {
62
+ case 1:
63
+ return 'eth'
64
+ case 56:
65
+ return 'bsc'
66
+ case 137:
67
+ return 'polygon_pos'
68
+ case 252:
69
+ return 'fraxtal'
70
+ case 42161:
71
+ return 'arbitrum'
72
+ default:
73
+ return 'eth'
74
+ }
75
+ }
76
+
60
77
  export const getPricesFromGeckoTerminal = async (
61
78
  tokens: any[],
62
79
  chainId = 1,
63
80
  defaultErrorValue?: any,
64
81
  ): Promise<Price[]> => {
65
82
  try {
66
- let network: string
67
- switch (chainId) {
68
- case 1:
69
- network = 'eth'
70
- break
71
- case 56:
72
- network = 'bsc'
73
- break
74
- case 137:
75
- network = 'polygon_pos'
76
- break
77
- case 252:
78
- network = 'fraxtal'
79
- break
80
- case 42161:
81
- network = 'arbitrum'
82
- break
83
- default:
84
- network = 'eth'
85
- break
86
- }
83
+ const network: string = getGeckoTerminalTokenPrefix(chainId)
87
84
 
88
85
  const httpArgs = uniq(tokens.map((t) => t.address)).join(',')
89
86
  const url = `${GECKO_TERMINAL_API_URL}/simple/networks/${network}/token_price/${httpArgs}`
package/src/sdt/fetch.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { decodeAbiParameters, formatUnits, parseAbi, parseUnits } from 'viem'
2
2
 
3
- import { ONE_DAY, type Token, contracts, explorers, tokenWithId } from '@stake-dao/constants'
4
- import { Zero } from '../index.js'
3
+ import { ONE_DAY, type Token, Zero, contracts, explorers, tokenWithId } from '@stake-dao/constants'
5
4
  import { type Price } from '../prices.js'
6
5
  import { multicall } from '../utils.js'
7
6
  import veSdtAlternativeYields from './veSdtAlternativeYields.js'
package/src/sdt.ts CHANGED
@@ -1,10 +1,15 @@
1
- import { ONE_WEEK, ONE_YEAR, contracts } from '@stake-dao/constants'
2
- import { LOCKERS_MASTERCHEF_PID } from '@stake-dao/constants'
3
- import { STRATEGIES_MASTERCHEF_PID } from '@stake-dao/constants'
4
- import { ETH_SECONDS_PER_BLOCK } from '@stake-dao/constants'
1
+ import {
2
+ ETH_SECONDS_PER_BLOCK,
3
+ LOCKERS_MASTERCHEF_PID,
4
+ ONE_WEEK,
5
+ ONE_YEAR,
6
+ OneEther,
7
+ STRATEGIES_MASTERCHEF_PID,
8
+ Zero,
9
+ contracts,
10
+ } from '@stake-dao/constants'
5
11
  import { formatUnits, parseAbi, parseEther, parseUnits } from 'viem'
6
12
  import type { RewardsData, SdtApr } from './strategies/types.js'
7
- import { OneEther, Zero } from './strategies/utils/index.js'
8
13
  import { multicall } from './utils.js'
9
14
 
10
15
  export type SdtEmissionData = {
@@ -1,4 +1,4 @@
1
- import { STRAT_FEES, angleStrats, contracts } from '@stake-dao/constants'
1
+ import { STRAT_FEES, Zero, 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'
@@ -8,7 +8,6 @@ import { type Price, getPricesFromLlama } from '../../prices.js'
8
8
  import { batchJsonRpc, equalTlc, multicall } from '../../utils.js'
9
9
  import type { RewardsData, SdtApr } from '../types.js'
10
10
  import { getAprBreakdown } from '../utils/getAprBreakdown.js'
11
- import { Zero } from '../utils/index.js'
12
11
  import { ANGLE_APR_URL, ANGLE_PRICE_URL } from './endpoints.js'
13
12
 
14
13
  interface TFetchAngle {
@@ -6,13 +6,15 @@ import {
6
6
  ETH_ONE_DAY_BLOCK,
7
7
  ONE_WEEK,
8
8
  ONE_YEAR,
9
+ OneEther,
9
10
  STRAT_FEES,
11
+ Zero,
10
12
  balancerStrats,
11
13
  contracts,
12
14
  tokenWithId,
13
15
  } from '@stake-dao/constants'
14
16
  import { batchBalancerStrats } from '../../bytecodes/index.js'
15
- import { OneEther, Zero, concatBytecode, getBoost, getPricesFromLlama, getSdtApr } from '../../index.js'
17
+ import { concatBytecode, getBoost, getPricesFromLlama, getSdtApr } from '../../index.js'
16
18
  import { equalTlc, graphql } from '../../utils.js'
17
19
  import { FACTORY_EXPLORER_EVENTS } from '../curve/endpoints.js'
18
20
  import type { BalancerGlobalData, RewardsData, Strategy, StrategyData, ValidChainId, ValidExplorer } from '../types.js'
@@ -1,9 +1,10 @@
1
- import { chunk, remove, uniq } from 'lodash-es'
1
+ import { chunk } from 'lodash-es'
2
2
  import { decodeAbiParameters, encodeAbiParameters, parseAbi, parseAbiParameters } from 'viem'
3
3
 
4
- import { contract, tokens } from '@stake-dao/constants'
5
- import type { FetchedToken, Token } from '@stake-dao/constants'
6
- import { batchSdtGaugeRewards, batchTokenData } from '../../bytecodes/index.js'
4
+ import { contract } from '@stake-dao/constants'
5
+ import type { FetchedToken } from '@stake-dao/constants'
6
+ import { batchSdtGaugeRewards } from '../../bytecodes/index.js'
7
+ import { fetchTokensData } from '../../tokens.js'
7
8
  import { equalTlc, getTokenInfo } from '../../utils.js'
8
9
  import type { BuiltStrat } from '../types.js'
9
10
  import { concatBytecode } from '../utils/index.js'
@@ -78,22 +79,7 @@ export const buildCurveStrategies = async (
78
79
  .filter((s) => s.type !== 'error')
79
80
 
80
81
  // Fetch tokens infos
81
- const inputArgsChunks = chunk(
82
- remove(uniq(tokensToFetch), (t) => !tokens.find((token: Token) => token.address === t)),
83
- 40,
84
- )
85
- const decodedPromise = await Promise.allSettled(
86
- inputArgsChunks.map(async (inputArgs) => {
87
- const inputData = encodeAbiParameters(parseAbiParameters(batchTokenData.inputType || []) as any, [inputArgs])
88
- const contractCreationCode = concatBytecode(batchTokenData.bytecode, inputData)
89
- const returnedData = await provider.call({
90
- data: contractCreationCode,
91
- })
92
- return decodeAbiParameters(parseAbiParameters(batchTokenData.outputTypeHr || []) as any, returnedData.data)
93
- }),
94
- )
95
-
96
- const fetchedTokenData = decodedPromise.flatMap((d) => (d.status === 'fulfilled' ? d.value : [])).flat()
82
+ const fetchedTokenData = await fetchTokensData(provider, tokensToFetch)
97
83
 
98
84
  // Fetch Sdt Gauge rewards tokens infos
99
85
  const sdtGaugeInputArgsChunks = chunk(
@@ -1,4 +1,4 @@
1
- import { ONE_YEAR, tokenWithId } from '@stake-dao/constants'
1
+ import { ONE_YEAR, Zero, tokenWithId } from '@stake-dao/constants'
2
2
  import { chunk, uniqBy } from 'lodash-es'
3
3
  import { encodeAbiParameters, formatUnits, parseAbiParameters, zeroAddress } from 'viem'
4
4
  import { mainnet } from 'viem/chains'
@@ -125,7 +125,7 @@ export const getCurveApiData = async (rpc: string, chainId: number, gaugesWeight
125
125
  })
126
126
 
127
127
  const usdTotal = coinsWithUsdBalance.reduce((total: number, x) => (total += x.usdBalance), 0)
128
- const lpPriceInUsd = p.totalSupply > BigInt(0) ? usdTotal / Number(formatUnits(p.totalSupply, 18)) : 0
128
+ const lpPriceInUsd = p.totalSupply > Zero ? usdTotal / Number(formatUnits(p.totalSupply, 18)) : 0
129
129
 
130
130
  let gaugeFromPool = CUSTOM_GAUGES[p.lp] ? CUSTOM_GAUGES[p.lp] : p.gauge
131
131
  const gaugeData = gauges.find((g) => equalTlc(g.gauge, gaugeFromPool) || equalTlc(g.lpToken, p.lp))
@@ -1,5 +1,5 @@
1
+ import { Zero } from '@stake-dao/constants'
1
2
  import { formatUnits, parseUnits } from 'viem'
2
- import { Zero } from '../../utils/index.js'
3
3
 
4
4
  const CVX_CLIFF_SIZE = parseUnits('100000', 18) // new cliff every 100,000 tokens
5
5
  const CVX_CLIFF_COUNT = BigInt(1000) // 1,000 cliffs
@@ -1,6 +1,6 @@
1
1
  import { formatUnits } from 'viem'
2
2
 
3
- import { ONE_YEAR, curveStrats, mainnet, tokenWithId } from '@stake-dao/constants'
3
+ import { ONE_YEAR, OneEther, Zero, curveStrats, mainnet, tokenWithId } from '@stake-dao/constants'
4
4
  import type { Price } from '../../../prices.js'
5
5
  import { type SdtEmissionData, getSdtApr } from '../../../sdt.js'
6
6
  import { equalTlc } from '../../../utils.js'
@@ -15,7 +15,6 @@ import type {
15
15
  import { getBoost } from '../../utils/boost.js'
16
16
  import decodeEtherscanFactoryEvent, { decodeNewFactoryEvent } from '../../utils/decodeEtherscanFactoryEvent.js'
17
17
  import { getAprBreakdown } from '../../utils/getAprBreakdown.js'
18
- import { OneEther, Zero } from '../../utils/index.js'
19
18
  import { buildCurveStrategies } from '../build.js'
20
19
  import { getCurveHttpCalls } from '../httpCalls.js'
21
20
  import { getOnChainSdCurveData } from '../onChainCalls.js'
@@ -1,3 +1,5 @@
1
+ import { GH_STAKE_DAO_VM_DATA } from '../../endpoints.js'
2
+
1
3
  export const CHAINS_DENOMINATOR = {
2
4
  1: 'ethereum',
3
5
  56: 'bsc',
@@ -8,5 +10,4 @@ export const PANCAKESWAP_FEE_URL = (version: string, chainId: number) => {
8
10
  return `https://explorer.pancakeswap.com/api/cached/pools/apr/${version}/${CHAINS_DENOMINATOR[chainId]}/farms-lp`
9
11
  }
10
12
 
11
- export const MANAGER_FEES_ENDPOINT =
12
- 'https://raw.githubusercontent.com/stake-dao/votemarket-data/main/tvls/pancakeManagersFees.json'
13
+ export const MANAGER_FEES_ENDPOINT = `${GH_STAKE_DAO_VM_DATA}/main/tvls/pancakeManagersFees.json`
@@ -61,8 +61,8 @@ export const getPancakeV3Vaults = async (
61
61
  lastSyncBlock: 0,
62
62
  fees: {
63
63
  veSdt: 0,
64
- perf: 15,
65
- accumulator: 0,
64
+ perf: 10,
65
+ accumulator: 5,
66
66
  claimer: 0,
67
67
  },
68
68
  }
@@ -1,6 +1,7 @@
1
1
  import { NEW_FACTORY_EXPLORER_EVENTS } from '../../curve/endpoints.js'
2
2
 
3
3
  import { contracts, pancakeswapErc20Strats } from '@stake-dao/constants'
4
+ import { GH_STAKE_DAO_VM_DATA } from '../../../endpoints.js'
4
5
  import type { Price } from '../../../prices.js'
5
6
  import type { ValidChainId, ValidExplorer } from '../../types.js'
6
7
  import { getPancakeSwapFeesAPR, getPancakeSwapManagerFeesAPR } from './getPancakeApisData.js'
@@ -31,7 +32,7 @@ export const fetchPancakeswap = async ({
31
32
  const [feesApr, managerFees, stakedTVLS, events] = await Promise.all([
32
33
  getPancakeSwapFeesAPR(chainId),
33
34
  getPancakeSwapManagerFeesAPR(chainId),
34
- (await fetch('https://raw.githubusercontent.com/stake-dao/votemarket-data/main/tvls/cake.json')).json(),
35
+ (await fetch(`${GH_STAKE_DAO_VM_DATA}/main/tvls/cake.json`)).json(),
35
36
  (
36
37
  await fetch(
37
38
  NEW_FACTORY_EXPLORER_EVENTS(
@@ -1,6 +1,5 @@
1
- import { ONE_YEAR } from '@stake-dao/constants'
1
+ import { ONE_YEAR, One, Zero } from '@stake-dao/constants'
2
2
  import { formatUnits, parseUnits } from 'viem'
3
- import { Zero } from '../../../index.js'
4
3
 
5
4
  const Q32 = BigInt(2 ** 32)
6
5
  const Q96 = BigInt(2 ** 96)
@@ -79,7 +78,7 @@ function getSqrtRatioAtTick(tick: number): bigint {
79
78
  if (tick > 0) ratio = MaxUint256 / ratio
80
79
 
81
80
  // back to Q96
82
- return ratio % Q32 > Zero ? ratio / Q32 + BigInt(1) : ratio / Q32
81
+ return ratio % Q32 > Zero ? ratio / Q32 + One : ratio / Q32
83
82
  }
84
83
 
85
84
  function getAmount0Delta(sqrtRatioAX96: bigint, sqrtRatioBX96: bigint, liquidity: bigint): bigint {
@@ -2,7 +2,17 @@ import dayjs from 'dayjs'
2
2
  import { chunk } from 'lodash-es'
3
3
  import { encodeAbiParameters, formatUnits, parseAbiParameters } from 'viem'
4
4
 
5
- import { ONE_YEAR, STRAT_FEES, contract, contracts, mainnet, pendleStrats, tokenWithId } from '@stake-dao/constants'
5
+ import {
6
+ ONE_YEAR,
7
+ OneEther,
8
+ STRAT_FEES,
9
+ Zero,
10
+ contract,
11
+ contracts,
12
+ mainnet,
13
+ pendleStrats,
14
+ tokenWithId,
15
+ } from '@stake-dao/constants'
6
16
  import multicallPendleStratsAbi from '../../abis/pendleVaultsMulticall.js'
7
17
  import { batchPendleStrats } from '../../bytecodes/index.js'
8
18
  import type { Price } from '../../prices.js'
@@ -12,7 +22,7 @@ import type { RewardsData, SdtApr, ValidChainId, ValidExplorer } from '../types.
12
22
  import { getBoost } from '../utils/boost.js'
13
23
  import decodeEtherscanFactoryEvent from '../utils/decodeEtherscanFactoryEvent.js'
14
24
  import { getAprBreakdown } from '../utils/getAprBreakdown.js'
15
- import { OneEther, Zero, concatBytecode } from '../utils/index.js'
25
+ import { concatBytecode } from '../utils/index.js'
16
26
  import { buildPendleStrategies } from './build.js'
17
27
  import getPendleApiData from './getPendleApiData.js'
18
28
  import pendlePoints from './pendlePoints.js'
@@ -1,5 +1,5 @@
1
+ import { OneEther, Zero } from '@stake-dao/constants'
1
2
  import { formatUnits } from 'viem'
2
- import { OneEther, Zero } from './index.js'
3
3
 
4
4
  export const getBoost = (protocol: string, strategyHoldings: bigint, workingBalance: bigint): number => {
5
5
  switch (protocol) {
@@ -1,8 +1,4 @@
1
- import { decodeAbiParameters, fromBytes, hexToBytes, parseAbiParameters, parseEther } from 'viem'
2
-
3
- export const Zero = BigInt(0)
4
- export const One = BigInt(1)
5
- export const OneEther = parseEther('1')
1
+ import { decodeAbiParameters, fromBytes, hexToBytes, parseAbiParameters } from 'viem'
6
2
 
7
3
  export const bytes32ToString = (bytes32: `0x${string}`) => {
8
4
  try {