@pufferfinance/puffer-sdk 1.13.2 → 1.14.0

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 (210) hide show
  1. package/dist/api/puffer-client-helpers.cjs.map +1 -1
  2. package/dist/api/puffer-client-helpers.js.map +1 -1
  3. package/dist/ccip-C0xwQhXU.cjs.map +1 -1
  4. package/dist/ccip-K-z2PL4P.js.map +1 -1
  5. package/dist/constants-BcPRVxdH.cjs.map +1 -1
  6. package/dist/constants-CH7Tz5jz.js.map +1 -1
  7. package/dist/contracts/abis/mainnet/Accountant.cjs +1 -1
  8. package/dist/contracts/abis/mainnet/Accountant.cjs.map +1 -1
  9. package/dist/contracts/abis/mainnet/Accountant.d.ts +13 -457
  10. package/dist/contracts/abis/mainnet/Accountant.js +12 -441
  11. package/dist/contracts/abis/mainnet/Accountant.js.map +1 -1
  12. package/dist/contracts/abis/mainnet/BoringVault.cjs +1 -1
  13. package/dist/contracts/abis/mainnet/BoringVault.cjs.map +1 -1
  14. package/dist/contracts/abis/mainnet/BoringVault.d.ts +18 -505
  15. package/dist/contracts/abis/mainnet/BoringVault.js +15 -346
  16. package/dist/contracts/abis/mainnet/BoringVault.js.map +1 -1
  17. package/dist/contracts/abis/mainnet/CarrotStaker.cjs +1 -1
  18. package/dist/contracts/abis/mainnet/CarrotStaker.cjs.map +1 -1
  19. package/dist/contracts/abis/mainnet/CarrotStaker.d.ts +2 -371
  20. package/dist/contracts/abis/mainnet/CarrotStaker.js +4 -295
  21. package/dist/contracts/abis/mainnet/CarrotStaker.js.map +1 -1
  22. package/dist/contracts/abis/mainnet/Distributor.cjs +1 -1
  23. package/dist/contracts/abis/mainnet/Distributor.cjs.map +1 -1
  24. package/dist/contracts/abis/mainnet/Distributor.d.ts +0 -413
  25. package/dist/contracts/abis/mainnet/Distributor.js +2 -355
  26. package/dist/contracts/abis/mainnet/Distributor.js.map +1 -1
  27. package/dist/contracts/abis/mainnet/L1RewardManager.cjs +1 -1
  28. package/dist/contracts/abis/mainnet/L1RewardManager.cjs.map +1 -1
  29. package/dist/contracts/abis/mainnet/L1RewardManager.d.ts +0 -489
  30. package/dist/contracts/abis/mainnet/L1RewardManager.js +0 -411
  31. package/dist/contracts/abis/mainnet/L1RewardManager.js.map +1 -1
  32. package/dist/contracts/abis/mainnet/L2RewardManager.cjs +1 -1
  33. package/dist/contracts/abis/mainnet/L2RewardManager.cjs.map +1 -1
  34. package/dist/contracts/abis/mainnet/L2RewardManager.d.ts +23 -569
  35. package/dist/contracts/abis/mainnet/L2RewardManager.js +16 -484
  36. package/dist/contracts/abis/mainnet/L2RewardManager.js.map +1 -1
  37. package/dist/contracts/abis/mainnet/PufLocker.cjs +1 -1
  38. package/dist/contracts/abis/mainnet/PufLocker.cjs.map +1 -1
  39. package/dist/contracts/abis/mainnet/PufLocker.d.ts +29 -371
  40. package/dist/contracts/abis/mainnet/PufLocker.js +15 -285
  41. package/dist/contracts/abis/mainnet/PufLocker.js.map +1 -1
  42. package/dist/contracts/abis/mainnet/PufferL2Depositor.cjs +1 -1
  43. package/dist/contracts/abis/mainnet/PufferL2Depositor.cjs.map +1 -1
  44. package/dist/contracts/abis/mainnet/PufferL2Depositor.d.ts +0 -325
  45. package/dist/contracts/abis/mainnet/PufferL2Depositor.js +0 -270
  46. package/dist/contracts/abis/mainnet/PufferL2Depositor.js.map +1 -1
  47. package/dist/contracts/abis/mainnet/PufferVaultV2.cjs +1 -1
  48. package/dist/contracts/abis/mainnet/PufferVaultV2.cjs.map +1 -1
  49. package/dist/contracts/abis/mainnet/PufferVaultV2.d.ts +35 -1289
  50. package/dist/contracts/abis/mainnet/PufferVaultV2.js +45 -1681
  51. package/dist/contracts/abis/mainnet/PufferVaultV2.js.map +1 -1
  52. package/dist/contracts/abis/mainnet/PufferWithdrawalManager.cjs +1 -1
  53. package/dist/contracts/abis/mainnet/PufferWithdrawalManager.cjs.map +1 -1
  54. package/dist/contracts/abis/mainnet/PufferWithdrawalManager.d.ts +3 -426
  55. package/dist/contracts/abis/mainnet/PufferWithdrawalManager.js +5 -552
  56. package/dist/contracts/abis/mainnet/PufferWithdrawalManager.js.map +1 -1
  57. package/dist/contracts/abis/mainnet/Teller.cjs +1 -1
  58. package/dist/contracts/abis/mainnet/Teller.cjs.map +1 -1
  59. package/dist/contracts/abis/mainnet/Teller.d.ts +18 -444
  60. package/dist/contracts/abis/mainnet/Teller.js +15 -390
  61. package/dist/contracts/abis/mainnet/Teller.js.map +1 -1
  62. package/dist/contracts/abis/mainnet/mtwCARROT.cjs +1 -1
  63. package/dist/contracts/abis/mainnet/mtwCARROT.cjs.map +1 -1
  64. package/dist/contracts/abis/mainnet/mtwCARROT.d.ts +69 -399
  65. package/dist/contracts/abis/mainnet/mtwCARROT.js +43 -346
  66. package/dist/contracts/abis/mainnet/mtwCARROT.js.map +1 -1
  67. package/dist/contracts/addresses.cjs.map +1 -1
  68. package/dist/contracts/addresses.js +3 -0
  69. package/dist/contracts/addresses.js.map +1 -1
  70. package/dist/contracts/handlers/carrot-staking-handler.d.ts +1652 -0
  71. package/dist/contracts/handlers/distributor-handler.cjs +1 -1
  72. package/dist/contracts/handlers/distributor-handler.cjs.map +1 -1
  73. package/dist/contracts/handlers/distributor-handler.d.ts +8762 -0
  74. package/dist/contracts/handlers/distributor-handler.js +13 -127
  75. package/dist/contracts/handlers/distributor-handler.js.map +1 -1
  76. package/dist/contracts/handlers/erc20-permit-handler.cjs +1 -1
  77. package/dist/contracts/handlers/erc20-permit-handler.cjs.map +1 -1
  78. package/dist/contracts/handlers/erc20-permit-handler.d.ts +4 -4
  79. package/dist/contracts/handlers/erc20-permit-handler.js +12 -12
  80. package/dist/contracts/handlers/erc20-permit-handler.js.map +1 -1
  81. package/dist/contracts/handlers/l1-reward-manager-handler.cjs +1 -1
  82. package/dist/contracts/handlers/l1-reward-manager-handler.cjs.map +1 -1
  83. package/dist/contracts/handlers/l1-reward-manager-handler.d.ts +339 -0
  84. package/dist/contracts/handlers/l1-reward-manager-handler.js +13 -13
  85. package/dist/contracts/handlers/l1-reward-manager-handler.js.map +1 -1
  86. package/dist/contracts/handlers/l2-reward-manager-handler.cjs +1 -1
  87. package/dist/contracts/handlers/l2-reward-manager-handler.cjs.map +1 -1
  88. package/dist/contracts/handlers/l2-reward-manager-handler.d.ts +2423 -0
  89. package/dist/contracts/handlers/l2-reward-manager-handler.js +4 -4
  90. package/dist/contracts/handlers/l2-reward-manager-handler.js.map +1 -1
  91. package/dist/contracts/handlers/mtw-carrot-handler.d.ts +14333 -0
  92. package/dist/contracts/handlers/nucleus-accountant-handler.cjs +1 -1
  93. package/dist/contracts/handlers/nucleus-accountant-handler.cjs.map +1 -1
  94. package/dist/contracts/handlers/nucleus-accountant-handler.d.ts +620 -0
  95. package/dist/contracts/handlers/nucleus-accountant-handler.js +8 -8
  96. package/dist/contracts/handlers/nucleus-accountant-handler.js.map +1 -1
  97. package/dist/contracts/handlers/nucleus-atomic-queue-handler.cjs +1 -1
  98. package/dist/contracts/handlers/nucleus-atomic-queue-handler.cjs.map +1 -1
  99. package/dist/contracts/handlers/nucleus-atomic-queue-handler.js +9 -9
  100. package/dist/contracts/handlers/nucleus-atomic-queue-handler.js.map +1 -1
  101. package/dist/contracts/handlers/nucleus-boring-vault-handler.cjs +1 -1
  102. package/dist/contracts/handlers/nucleus-boring-vault-handler.cjs.map +1 -1
  103. package/dist/contracts/handlers/nucleus-boring-vault-handler.d.ts +3917 -0
  104. package/dist/contracts/handlers/nucleus-boring-vault-handler.js +22 -22
  105. package/dist/contracts/handlers/nucleus-boring-vault-handler.js.map +1 -1
  106. package/dist/contracts/handlers/nucleus-teller-handler.cjs +1 -1
  107. package/dist/contracts/handlers/nucleus-teller-handler.cjs.map +1 -1
  108. package/dist/contracts/handlers/nucleus-teller-handler.d.ts +2209 -0
  109. package/dist/contracts/handlers/nucleus-teller-handler.js +13 -13
  110. package/dist/contracts/handlers/nucleus-teller-handler.js.map +1 -1
  111. package/dist/contracts/handlers/puf-locker-handler.cjs +1 -1
  112. package/dist/contracts/handlers/puf-locker-handler.cjs.map +1 -1
  113. package/dist/contracts/handlers/puf-locker-handler.d.ts +2389 -0
  114. package/dist/contracts/handlers/puf-locker-handler.js +11 -11
  115. package/dist/contracts/handlers/puf-locker-handler.js.map +1 -1
  116. package/dist/contracts/handlers/puffer-depositor-handler.cjs +1 -1
  117. package/dist/contracts/handlers/puffer-depositor-handler.cjs.map +1 -1
  118. package/dist/contracts/handlers/puffer-depositor-handler.d.ts +100 -100
  119. package/dist/contracts/handlers/puffer-depositor-handler.js +18 -18
  120. package/dist/contracts/handlers/puffer-depositor-handler.js.map +1 -1
  121. package/dist/contracts/handlers/puffer-l2-depositor-handler.cjs +1 -1
  122. package/dist/contracts/handlers/puffer-l2-depositor-handler.cjs.map +1 -1
  123. package/dist/contracts/handlers/puffer-l2-depositor-handler.d.ts +471 -0
  124. package/dist/contracts/handlers/puffer-l2-depositor-handler.js +16 -16
  125. package/dist/contracts/handlers/puffer-l2-depositor-handler.js.map +1 -1
  126. package/dist/contracts/handlers/puffer-vault-handler.cjs +1 -1
  127. package/dist/contracts/handlers/puffer-vault-handler.cjs.map +1 -1
  128. package/dist/contracts/handlers/puffer-vault-handler.d.ts +4657 -0
  129. package/dist/contracts/handlers/puffer-vault-handler.js +2 -2
  130. package/dist/contracts/handlers/puffer-vault-handler.js.map +1 -1
  131. package/dist/contracts/handlers/puffer-withdrawal-manager-handler.cjs +1 -1
  132. package/dist/contracts/handlers/puffer-withdrawal-manager-handler.cjs.map +1 -1
  133. package/dist/contracts/handlers/puffer-withdrawal-manager-handler.d.ts +1882 -0
  134. package/dist/contracts/handlers/puffer-withdrawal-manager-handler.js +8 -8
  135. package/dist/contracts/handlers/puffer-withdrawal-manager-handler.js.map +1 -1
  136. package/dist/contracts/vaults-addresses.d.ts +5 -4
  137. package/dist/createWalletClient-DNLhBkOd.js.map +1 -1
  138. package/dist/createWalletClient-Di5of07E.cjs.map +1 -1
  139. package/dist/getContract-6ajhFbP2.js.map +1 -1
  140. package/dist/getContract-ChPFzc5y.cjs.map +1 -1
  141. package/dist/utils/version.cjs +1 -1
  142. package/dist/utils/version.js +1 -1
  143. package/dist/writeContract-BatuNuTe.cjs.map +1 -1
  144. package/dist/writeContract-CjcOEtWX.js.map +1 -1
  145. package/package.json +2 -2
  146. package/dist/contracts/abis/holesky/PufferDepositor.cjs +0 -2
  147. package/dist/contracts/abis/holesky/PufferDepositor.cjs.map +0 -1
  148. package/dist/contracts/abis/holesky/PufferDepositor.d.ts +0 -283
  149. package/dist/contracts/abis/holesky/PufferDepositor.js +0 -377
  150. package/dist/contracts/abis/holesky/PufferDepositor.js.map +0 -1
  151. package/dist/contracts/abis/holesky/PufferVaultV2.cjs +0 -2
  152. package/dist/contracts/abis/holesky/PufferVaultV2.cjs.map +0 -1
  153. package/dist/contracts/abis/holesky/PufferVaultV2.d.ts +0 -1361
  154. package/dist/contracts/abis/holesky/PufferVaultV2.js +0 -1787
  155. package/dist/contracts/abis/holesky/PufferVaultV2.js.map +0 -1
  156. package/dist/contracts/abis/l1-reward-manager-abis.cjs +0 -2
  157. package/dist/contracts/abis/l1-reward-manager-abis.cjs.map +0 -1
  158. package/dist/contracts/abis/l1-reward-manager-abis.d.ts +0 -527
  159. package/dist/contracts/abis/l1-reward-manager-abis.js +0 -10
  160. package/dist/contracts/abis/l1-reward-manager-abis.js.map +0 -1
  161. package/dist/contracts/abis/l2-reward-manager-abis.cjs +0 -2
  162. package/dist/contracts/abis/l2-reward-manager-abis.cjs.map +0 -1
  163. package/dist/contracts/abis/l2-reward-manager-abis.d.ts +0 -709
  164. package/dist/contracts/abis/l2-reward-manager-abis.js +0 -11
  165. package/dist/contracts/abis/l2-reward-manager-abis.js.map +0 -1
  166. package/dist/contracts/abis/nucleus-accountant-abis.cjs +0 -2
  167. package/dist/contracts/abis/nucleus-accountant-abis.cjs.map +0 -1
  168. package/dist/contracts/abis/nucleus-accountant-abis.d.ts +0 -525
  169. package/dist/contracts/abis/nucleus-accountant-abis.js +0 -9
  170. package/dist/contracts/abis/nucleus-accountant-abis.js.map +0 -1
  171. package/dist/contracts/abis/nucleus-atomic-queue-abis.cjs +0 -2
  172. package/dist/contracts/abis/nucleus-atomic-queue-abis.cjs.map +0 -1
  173. package/dist/contracts/abis/nucleus-atomic-queue-abis.d.ts +0 -332
  174. package/dist/contracts/abis/nucleus-atomic-queue-abis.js +0 -9
  175. package/dist/contracts/abis/nucleus-atomic-queue-abis.js.map +0 -1
  176. package/dist/contracts/abis/nucleus-boring-vault-abis.cjs +0 -2
  177. package/dist/contracts/abis/nucleus-boring-vault-abis.cjs.map +0 -1
  178. package/dist/contracts/abis/nucleus-boring-vault-abis.d.ts +0 -626
  179. package/dist/contracts/abis/nucleus-boring-vault-abis.js +0 -9
  180. package/dist/contracts/abis/nucleus-boring-vault-abis.js.map +0 -1
  181. package/dist/contracts/abis/nucleus-teller-abis.cjs +0 -2
  182. package/dist/contracts/abis/nucleus-teller-abis.cjs.map +0 -1
  183. package/dist/contracts/abis/nucleus-teller-abis.d.ts +0 -545
  184. package/dist/contracts/abis/nucleus-teller-abis.js +0 -9
  185. package/dist/contracts/abis/nucleus-teller-abis.js.map +0 -1
  186. package/dist/contracts/abis/puf-locker-abis.cjs +0 -2
  187. package/dist/contracts/abis/puf-locker-abis.cjs.map +0 -1
  188. package/dist/contracts/abis/puf-locker-abis.d.ts +0 -484
  189. package/dist/contracts/abis/puf-locker-abis.js +0 -10
  190. package/dist/contracts/abis/puf-locker-abis.js.map +0 -1
  191. package/dist/contracts/abis/puffer-depositor-abis.cjs +0 -2
  192. package/dist/contracts/abis/puffer-depositor-abis.cjs.map +0 -1
  193. package/dist/contracts/abis/puffer-depositor-abis.d.ts +0 -664
  194. package/dist/contracts/abis/puffer-depositor-abis.js +0 -20
  195. package/dist/contracts/abis/puffer-depositor-abis.js.map +0 -1
  196. package/dist/contracts/abis/puffer-vault-abis.cjs +0 -2
  197. package/dist/contracts/abis/puffer-vault-abis.cjs.map +0 -1
  198. package/dist/contracts/abis/puffer-vault-abis.d.ts +0 -2787
  199. package/dist/contracts/abis/puffer-vault-abis.js +0 -15
  200. package/dist/contracts/abis/puffer-vault-abis.js.map +0 -1
  201. package/dist/contracts/abis/puffer-withdrawal-manager-abis.cjs +0 -2
  202. package/dist/contracts/abis/puffer-withdrawal-manager-abis.cjs.map +0 -1
  203. package/dist/contracts/abis/puffer-withdrawal-manager-abis.d.ts +0 -514
  204. package/dist/contracts/abis/puffer-withdrawal-manager-abis.js +0 -10
  205. package/dist/contracts/abis/puffer-withdrawal-manager-abis.js.map +0 -1
  206. package/dist/contracts/abis/tokens-abis.cjs +0 -2
  207. package/dist/contracts/abis/tokens-abis.cjs.map +0 -1
  208. package/dist/contracts/abis/tokens-abis.d.ts +0 -396
  209. package/dist/contracts/abis/tokens-abis.js +0 -6
  210. package/dist/contracts/abis/tokens-abis.js.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";var c=Object.defineProperty;var s=(n,t,e)=>t in n?c(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var r=(n,t,e)=>s(n,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../vaults-addresses.cjs"),o=require("../abis/nucleus-accountant-abis.cjs"),u=require("../tokens.cjs"),l=require("../../getContract-ChPFzc5y.cjs");class g{constructor(t,e,a){r(this,"token");this.chain=t,this.walletClient=e,this.publicClient=a,this.token=u.UnifiToken.unifiETH}withToken(t){return this.token=t,this}getContract(){const t=i.VAULTS_ADDRESSES[this.token][this.chain].NucleusAccountant,e=o.NUCLEUS_ACCOUNTANT_ABIS[this.chain].Accountant,a={public:this.publicClient,wallet:this.walletClient};return l.getContract({address:t,abi:e,client:a})}async rateProviderData(t){const[e,a]=await this.getContract().read.rateProviderData([t]);return{isPeggedToBase:e,rateProvider:a}}vault(){return this.getContract().read.vault()}getRate(){return this.getContract().read.getRate()}getRateSafe(){return this.getContract().read.getRateSafe()}getRateInQuote(t){return this.getContract().read.getRateInQuote([t])}getRateInQuoteSafe(t){return this.getContract().read.getRateInQuoteSafe([t])}}exports.NucleusAccountantHandler=g;
1
+ "use strict";var c=Object.defineProperty;var i=(n,t,e)=>t in n?c(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var r=(n,t,e)=>i(n,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../vaults-addresses.cjs"),s=require("../tokens.cjs"),u=require("../abis/mainnet/Accountant.cjs"),l=require("../../getContract-ChPFzc5y.cjs");class g{constructor(t,e,a){r(this,"token");this.chain=t,this.walletClient=e,this.publicClient=a,this.token=s.UnifiToken.unifiETH}withToken(t){return this.token=t,this}getContract(){const t=o.VAULTS_ADDRESSES[this.token][this.chain].NucleusAccountant,e=u.Accountant,a={public:this.publicClient,wallet:this.walletClient};return l.getContract({address:t,abi:e,client:a})}async rateProviderData(t){const[e,a]=await this.getContract().read.rateProviderData([t]);return{isPeggedToBase:e,rateProvider:a}}vault(){return this.getContract().read.vault()}getRate(){return this.getContract().read.getRate()}getRateSafe(){return this.getContract().read.getRateSafe()}getRateInQuote(t){return this.getContract().read.getRateInQuote([t])}getRateInQuoteSafe(t){return this.getContract().read.getRateInQuoteSafe([t])}}exports.NucleusAccountantHandler=g;
2
2
  //# sourceMappingURL=nucleus-accountant-handler.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"nucleus-accountant-handler.cjs","sources":["../../../lib/contracts/handlers/nucleus-accountant-handler.ts"],"sourcesContent":["/* istanbul ignore file */\n\nimport {\n WalletClient,\n PublicClient,\n getContract,\n Address,\n GetContractReturnType,\n} from 'viem';\nimport { Chain } from '../../chains/constants';\nimport { VAULTS_ADDRESSES } from '../vaults-addresses';\nimport { NUCLEUS_ACCOUNTANT_ABIS } from '../abis/nucleus-accountant-abis';\nimport { UnifiToken } from '../tokens';\n\n/**\n * Handler for the `Accountant` contract from nucleus.\n */\nexport class NucleusAccountantHandler {\n private token: UnifiToken;\n\n /**\n * Create the handler for processing tokens.\n *\n * @param chain Chain to use for the client.\n * @param walletClient The wallet client to use for wallet\n * interactions.\n * @param publicClient The public client to use for public\n * interactions.\n */\n constructor(\n private chain: Chain,\n private walletClient: WalletClient,\n private publicClient: PublicClient,\n ) {\n this.token = UnifiToken.unifiETH;\n }\n\n /**\n * Set the UniFi token to use for executing transactions on the\n * contract.\n *\n * @param token UniFi token to use for the handler.\n * @returns The handler.\n */\n public withToken(token: UnifiToken) {\n this.token = token;\n return this;\n }\n\n /**\n * Get the contract. This is a method because the typings are complex\n * and lost when trying to make it a member.\n *\n * @returns The viem contract.\n */\n public getContract() {\n const address = VAULTS_ADDRESSES[this.token][this.chain]\n .NucleusAccountant as Address;\n const abi = NUCLEUS_ACCOUNTANT_ABIS[this.chain].Accountant;\n const client = { public: this.publicClient, wallet: this.walletClient };\n\n return getContract({ address, abi, client }) as GetContractReturnType<\n typeof abi,\n typeof client,\n Address\n >;\n }\n\n /**\n * Get the rate provider data for the given token address.\n *\n * @param tokenAddress Address of the token.\n * @returns Rate provider data for the given token address.\n */\n public async rateProviderData(tokenAddress: Address) {\n const [isPeggedToBase, rateProvider] =\n await this.getContract().read.rateProviderData([tokenAddress]);\n\n return { isPeggedToBase, rateProvider };\n }\n\n /**\n * Get the vault for the given token address.\n *\n * @returns Vault for the given token address.\n */\n public vault() {\n return this.getContract().read.vault();\n }\n\n /**\n * Get the rate for the given token address.\n *\n * @returns Rate for the given token address.\n */\n public getRate() {\n return this.getContract().read.getRate();\n }\n\n /**\n * Get the rate for the given token address for safe.\n *\n * @returns Rate for the given token address for safe.\n */\n public getRateSafe() {\n return this.getContract().read.getRateSafe();\n }\n\n /**\n * Get the rate from the given quote address.\n *\n * @returns Rate for the given quote address.\n */\n public getRateInQuote(quoteAddress: Address) {\n return this.getContract().read.getRateInQuote([quoteAddress]);\n }\n\n /**\n * Get the rate from the given quote address for safe.\n *\n * @returns Rate for the given quote address for safe.\n */\n public getRateInQuoteSafe(quoteAddress: Address) {\n return this.getContract().read.getRateInQuoteSafe([quoteAddress]);\n }\n}\n"],"names":["NucleusAccountantHandler","chain","walletClient","publicClient","__publicField","UnifiToken","token","address","VAULTS_ADDRESSES","abi","NUCLEUS_ACCOUNTANT_ABIS","client","getContract","tokenAddress","isPeggedToBase","rateProvider","quoteAddress"],"mappings":"uZAiBO,MAAMA,CAAyB,CAYpC,YACUC,EACAC,EACAC,EACR,CAfMC,EAAA,cAYE,KAAA,MAAAH,EACA,KAAA,aAAAC,EACA,KAAA,aAAAC,EAER,KAAK,MAAQE,EAAAA,WAAW,QAAA,CAUnB,UAAUC,EAAmB,CAClC,YAAK,MAAQA,EACN,IAAA,CASF,aAAc,CACnB,MAAMC,EAAUC,EAAAA,iBAAiB,KAAK,KAAK,EAAE,KAAK,KAAK,EACpD,kBACGC,EAAMC,EAAA,wBAAwB,KAAK,KAAK,EAAE,WAC1CC,EAAS,CAAE,OAAQ,KAAK,aAAc,OAAQ,KAAK,YAAa,EAEtE,OAAOC,EAAY,YAAA,CAAE,QAAAL,EAAS,IAAAE,EAAK,OAAAE,EAAQ,CAAA,CAa7C,MAAa,iBAAiBE,EAAuB,CACnD,KAAM,CAACC,EAAgBC,CAAY,EACjC,MAAM,KAAK,YAAY,EAAE,KAAK,iBAAiB,CAACF,CAAY,CAAC,EAExD,MAAA,CAAE,eAAAC,EAAgB,aAAAC,CAAa,CAAA,CAQjC,OAAQ,CACb,OAAO,KAAK,cAAc,KAAK,MAAM,CAAA,CAQhC,SAAU,CACf,OAAO,KAAK,cAAc,KAAK,QAAQ,CAAA,CAQlC,aAAc,CACnB,OAAO,KAAK,cAAc,KAAK,YAAY,CAAA,CAQtC,eAAeC,EAAuB,CAC3C,OAAO,KAAK,YAAY,EAAE,KAAK,eAAe,CAACA,CAAY,CAAC,CAAA,CAQvD,mBAAmBA,EAAuB,CAC/C,OAAO,KAAK,YAAY,EAAE,KAAK,mBAAmB,CAACA,CAAY,CAAC,CAAA,CAEpE"}
1
+ {"version":3,"file":"nucleus-accountant-handler.cjs","sources":["../../../lib/contracts/handlers/nucleus-accountant-handler.ts"],"sourcesContent":["/* istanbul ignore file */\n\nimport {\n WalletClient,\n PublicClient,\n getContract,\n Address,\n GetContractReturnType,\n} from 'viem';\nimport { Chain } from '../../chains/constants';\nimport { VAULTS_ADDRESSES } from '../vaults-addresses';\nimport { UnifiToken } from '../tokens';\nimport { Accountant } from '../abis/mainnet/Accountant';\n\n/**\n * Handler for the `Accountant` contract from nucleus.\n */\nexport class NucleusAccountantHandler {\n private token: UnifiToken;\n\n /**\n * Create the handler for processing tokens.\n *\n * @param chain Chain to use for the client.\n * @param walletClient The wallet client to use for wallet\n * interactions.\n * @param publicClient The public client to use for public\n * interactions.\n */\n constructor(\n private chain: Chain,\n private walletClient: WalletClient,\n private publicClient: PublicClient,\n ) {\n this.token = UnifiToken.unifiETH;\n }\n\n /**\n * Set the UniFi token to use for executing transactions on the\n * contract.\n *\n * @param token UniFi token to use for the handler.\n * @returns The handler.\n */\n public withToken(token: UnifiToken) {\n this.token = token;\n return this;\n }\n\n /**\n * Get the contract. This is a method because the typings are complex\n * and lost when trying to make it a member.\n *\n * @returns The viem contract.\n */\n public getContract() {\n const address = VAULTS_ADDRESSES[this.token][this.chain]\n .NucleusAccountant as Address;\n const abi = Accountant;\n const client = { public: this.publicClient, wallet: this.walletClient };\n\n return getContract({ address, abi, client }) as GetContractReturnType<\n typeof abi,\n typeof client,\n Address\n >;\n }\n\n /**\n * Get the rate provider data for the given token address.\n *\n * @param tokenAddress Address of the token.\n * @returns Rate provider data for the given token address.\n */\n public async rateProviderData(tokenAddress: Address) {\n const [isPeggedToBase, rateProvider] =\n await this.getContract().read.rateProviderData([tokenAddress]);\n\n return { isPeggedToBase, rateProvider };\n }\n\n /**\n * Get the vault for the given token address.\n *\n * @returns Vault for the given token address.\n */\n public vault() {\n return this.getContract().read.vault();\n }\n\n /**\n * Get the rate for the given token address.\n *\n * @returns Rate for the given token address.\n */\n public getRate() {\n return this.getContract().read.getRate();\n }\n\n /**\n * Get the rate for the given token address for safe.\n *\n * @returns Rate for the given token address for safe.\n */\n public getRateSafe() {\n return this.getContract().read.getRateSafe();\n }\n\n /**\n * Get the rate from the given quote address.\n *\n * @returns Rate for the given quote address.\n */\n public getRateInQuote(quoteAddress: Address) {\n return this.getContract().read.getRateInQuote([quoteAddress]);\n }\n\n /**\n * Get the rate from the given quote address for safe.\n *\n * @returns Rate for the given quote address for safe.\n */\n public getRateInQuoteSafe(quoteAddress: Address) {\n return this.getContract().read.getRateInQuoteSafe([quoteAddress]);\n }\n}\n"],"names":["NucleusAccountantHandler","chain","walletClient","publicClient","__publicField","UnifiToken","token","address","VAULTS_ADDRESSES","abi","Accountant","client","getContract","tokenAddress","isPeggedToBase","rateProvider","quoteAddress"],"mappings":"kZAiBO,MAAMA,CAAyB,CAYpC,YACUC,EACAC,EACAC,EACR,CAfMC,EAAA,cAYE,KAAA,MAAAH,EACA,KAAA,aAAAC,EACA,KAAA,aAAAC,EAER,KAAK,MAAQE,EAAAA,WAAW,QAAA,CAUnB,UAAUC,EAAmB,CAClC,YAAK,MAAQA,EACN,IAAA,CASF,aAAc,CACnB,MAAMC,EAAUC,EAAAA,iBAAiB,KAAK,KAAK,EAAE,KAAK,KAAK,EACpD,kBACGC,EAAMC,EAAA,WACNC,EAAS,CAAE,OAAQ,KAAK,aAAc,OAAQ,KAAK,YAAa,EAEtE,OAAOC,EAAY,YAAA,CAAE,QAAAL,EAAS,IAAAE,EAAK,OAAAE,EAAQ,CAAA,CAa7C,MAAa,iBAAiBE,EAAuB,CACnD,KAAM,CAACC,EAAgBC,CAAY,EACjC,MAAM,KAAK,YAAY,EAAE,KAAK,iBAAiB,CAACF,CAAY,CAAC,EAExD,MAAA,CAAE,eAAAC,EAAgB,aAAAC,CAAa,CAAA,CAQjC,OAAQ,CACb,OAAO,KAAK,cAAc,KAAK,MAAM,CAAA,CAQhC,SAAU,CACf,OAAO,KAAK,cAAc,KAAK,QAAQ,CAAA,CAQlC,aAAc,CACnB,OAAO,KAAK,cAAc,KAAK,YAAY,CAAA,CAQtC,eAAeC,EAAuB,CAC3C,OAAO,KAAK,YAAY,EAAE,KAAK,eAAe,CAACA,CAAY,CAAC,CAAA,CAQvD,mBAAmBA,EAAuB,CAC/C,OAAO,KAAK,YAAY,EAAE,KAAK,mBAAmB,CAACA,CAAY,CAAC,CAAA,CAEpE"}
@@ -0,0 +1,620 @@
1
+ import { WalletClient, PublicClient, Address } from 'viem';
2
+ import { Chain } from '../../chains/constants';
3
+ import { UnifiToken } from '../tokens';
4
+ /**
5
+ * Handler for the `Accountant` contract from nucleus.
6
+ */
7
+ export declare class NucleusAccountantHandler {
8
+ private chain;
9
+ private walletClient;
10
+ private publicClient;
11
+ private token;
12
+ /**
13
+ * Create the handler for processing tokens.
14
+ *
15
+ * @param chain Chain to use for the client.
16
+ * @param walletClient The wallet client to use for wallet
17
+ * interactions.
18
+ * @param publicClient The public client to use for public
19
+ * interactions.
20
+ */
21
+ constructor(chain: Chain, walletClient: WalletClient, publicClient: PublicClient);
22
+ /**
23
+ * Set the UniFi token to use for executing transactions on the
24
+ * contract.
25
+ *
26
+ * @param token UniFi token to use for the handler.
27
+ * @returns The handler.
28
+ */
29
+ withToken(token: UnifiToken): this;
30
+ /**
31
+ * Get the contract. This is a method because the typings are complex
32
+ * and lost when trying to make it a member.
33
+ *
34
+ * @returns The viem contract.
35
+ */
36
+ getContract(): {
37
+ read: {
38
+ vault: (options?: import('viem').Prettify<import('viem').UnionOmit<import('viem').ReadContractParameters<readonly [{
39
+ readonly inputs: readonly [{
40
+ readonly internalType: "contract ERC20";
41
+ readonly name: "";
42
+ readonly type: "address";
43
+ }];
44
+ readonly name: "rateProviderData";
45
+ readonly outputs: readonly [{
46
+ readonly internalType: "bool";
47
+ readonly name: "isPeggedToBase";
48
+ readonly type: "bool";
49
+ }, {
50
+ readonly internalType: "contract IRateProvider";
51
+ readonly name: "rateProvider";
52
+ readonly type: "address";
53
+ }];
54
+ readonly stateMutability: "view";
55
+ readonly type: "function";
56
+ }, {
57
+ readonly inputs: readonly [];
58
+ readonly name: "vault";
59
+ readonly outputs: readonly [{
60
+ readonly internalType: "contract BoringVault";
61
+ readonly name: "";
62
+ readonly type: "address";
63
+ }];
64
+ readonly stateMutability: "view";
65
+ readonly type: "function";
66
+ }, {
67
+ readonly inputs: readonly [];
68
+ readonly name: "getRate";
69
+ readonly outputs: readonly [{
70
+ readonly internalType: "uint256";
71
+ readonly name: "rate";
72
+ readonly type: "uint256";
73
+ }];
74
+ readonly stateMutability: "view";
75
+ readonly type: "function";
76
+ }, {
77
+ readonly inputs: readonly [];
78
+ readonly name: "getRateSafe";
79
+ readonly outputs: readonly [{
80
+ readonly internalType: "uint256";
81
+ readonly name: "rate";
82
+ readonly type: "uint256";
83
+ }];
84
+ readonly stateMutability: "view";
85
+ readonly type: "function";
86
+ }, {
87
+ readonly inputs: readonly [{
88
+ readonly internalType: "contract ERC20";
89
+ readonly name: "quote";
90
+ readonly type: "address";
91
+ }];
92
+ readonly name: "getRateInQuote";
93
+ readonly outputs: readonly [{
94
+ readonly internalType: "uint256";
95
+ readonly name: "rateInQuote";
96
+ readonly type: "uint256";
97
+ }];
98
+ readonly stateMutability: "view";
99
+ readonly type: "function";
100
+ }, {
101
+ readonly inputs: readonly [{
102
+ readonly internalType: "contract ERC20";
103
+ readonly name: "quote";
104
+ readonly type: "address";
105
+ }];
106
+ readonly name: "getRateInQuoteSafe";
107
+ readonly outputs: readonly [{
108
+ readonly internalType: "uint256";
109
+ readonly name: "rateInQuote";
110
+ readonly type: "uint256";
111
+ }];
112
+ readonly stateMutability: "view";
113
+ readonly type: "function";
114
+ }], "vault", readonly []>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<`0x${string}`>;
115
+ rateProviderData: (args: readonly [`0x${string}`], options?: import('viem').Prettify<import('viem').UnionOmit<import('viem').ReadContractParameters<readonly [{
116
+ readonly inputs: readonly [{
117
+ readonly internalType: "contract ERC20";
118
+ readonly name: "";
119
+ readonly type: "address";
120
+ }];
121
+ readonly name: "rateProviderData";
122
+ readonly outputs: readonly [{
123
+ readonly internalType: "bool";
124
+ readonly name: "isPeggedToBase";
125
+ readonly type: "bool";
126
+ }, {
127
+ readonly internalType: "contract IRateProvider";
128
+ readonly name: "rateProvider";
129
+ readonly type: "address";
130
+ }];
131
+ readonly stateMutability: "view";
132
+ readonly type: "function";
133
+ }, {
134
+ readonly inputs: readonly [];
135
+ readonly name: "vault";
136
+ readonly outputs: readonly [{
137
+ readonly internalType: "contract BoringVault";
138
+ readonly name: "";
139
+ readonly type: "address";
140
+ }];
141
+ readonly stateMutability: "view";
142
+ readonly type: "function";
143
+ }, {
144
+ readonly inputs: readonly [];
145
+ readonly name: "getRate";
146
+ readonly outputs: readonly [{
147
+ readonly internalType: "uint256";
148
+ readonly name: "rate";
149
+ readonly type: "uint256";
150
+ }];
151
+ readonly stateMutability: "view";
152
+ readonly type: "function";
153
+ }, {
154
+ readonly inputs: readonly [];
155
+ readonly name: "getRateSafe";
156
+ readonly outputs: readonly [{
157
+ readonly internalType: "uint256";
158
+ readonly name: "rate";
159
+ readonly type: "uint256";
160
+ }];
161
+ readonly stateMutability: "view";
162
+ readonly type: "function";
163
+ }, {
164
+ readonly inputs: readonly [{
165
+ readonly internalType: "contract ERC20";
166
+ readonly name: "quote";
167
+ readonly type: "address";
168
+ }];
169
+ readonly name: "getRateInQuote";
170
+ readonly outputs: readonly [{
171
+ readonly internalType: "uint256";
172
+ readonly name: "rateInQuote";
173
+ readonly type: "uint256";
174
+ }];
175
+ readonly stateMutability: "view";
176
+ readonly type: "function";
177
+ }, {
178
+ readonly inputs: readonly [{
179
+ readonly internalType: "contract ERC20";
180
+ readonly name: "quote";
181
+ readonly type: "address";
182
+ }];
183
+ readonly name: "getRateInQuoteSafe";
184
+ readonly outputs: readonly [{
185
+ readonly internalType: "uint256";
186
+ readonly name: "rateInQuote";
187
+ readonly type: "uint256";
188
+ }];
189
+ readonly stateMutability: "view";
190
+ readonly type: "function";
191
+ }], "rateProviderData", readonly [`0x${string}`]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [boolean, `0x${string}`]>;
192
+ getRate: (options?: import('viem').Prettify<import('viem').UnionOmit<import('viem').ReadContractParameters<readonly [{
193
+ readonly inputs: readonly [{
194
+ readonly internalType: "contract ERC20";
195
+ readonly name: "";
196
+ readonly type: "address";
197
+ }];
198
+ readonly name: "rateProviderData";
199
+ readonly outputs: readonly [{
200
+ readonly internalType: "bool";
201
+ readonly name: "isPeggedToBase";
202
+ readonly type: "bool";
203
+ }, {
204
+ readonly internalType: "contract IRateProvider";
205
+ readonly name: "rateProvider";
206
+ readonly type: "address";
207
+ }];
208
+ readonly stateMutability: "view";
209
+ readonly type: "function";
210
+ }, {
211
+ readonly inputs: readonly [];
212
+ readonly name: "vault";
213
+ readonly outputs: readonly [{
214
+ readonly internalType: "contract BoringVault";
215
+ readonly name: "";
216
+ readonly type: "address";
217
+ }];
218
+ readonly stateMutability: "view";
219
+ readonly type: "function";
220
+ }, {
221
+ readonly inputs: readonly [];
222
+ readonly name: "getRate";
223
+ readonly outputs: readonly [{
224
+ readonly internalType: "uint256";
225
+ readonly name: "rate";
226
+ readonly type: "uint256";
227
+ }];
228
+ readonly stateMutability: "view";
229
+ readonly type: "function";
230
+ }, {
231
+ readonly inputs: readonly [];
232
+ readonly name: "getRateSafe";
233
+ readonly outputs: readonly [{
234
+ readonly internalType: "uint256";
235
+ readonly name: "rate";
236
+ readonly type: "uint256";
237
+ }];
238
+ readonly stateMutability: "view";
239
+ readonly type: "function";
240
+ }, {
241
+ readonly inputs: readonly [{
242
+ readonly internalType: "contract ERC20";
243
+ readonly name: "quote";
244
+ readonly type: "address";
245
+ }];
246
+ readonly name: "getRateInQuote";
247
+ readonly outputs: readonly [{
248
+ readonly internalType: "uint256";
249
+ readonly name: "rateInQuote";
250
+ readonly type: "uint256";
251
+ }];
252
+ readonly stateMutability: "view";
253
+ readonly type: "function";
254
+ }, {
255
+ readonly inputs: readonly [{
256
+ readonly internalType: "contract ERC20";
257
+ readonly name: "quote";
258
+ readonly type: "address";
259
+ }];
260
+ readonly name: "getRateInQuoteSafe";
261
+ readonly outputs: readonly [{
262
+ readonly internalType: "uint256";
263
+ readonly name: "rateInQuote";
264
+ readonly type: "uint256";
265
+ }];
266
+ readonly stateMutability: "view";
267
+ readonly type: "function";
268
+ }], "getRate", readonly []>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
269
+ getRateSafe: (options?: import('viem').Prettify<import('viem').UnionOmit<import('viem').ReadContractParameters<readonly [{
270
+ readonly inputs: readonly [{
271
+ readonly internalType: "contract ERC20";
272
+ readonly name: "";
273
+ readonly type: "address";
274
+ }];
275
+ readonly name: "rateProviderData";
276
+ readonly outputs: readonly [{
277
+ readonly internalType: "bool";
278
+ readonly name: "isPeggedToBase";
279
+ readonly type: "bool";
280
+ }, {
281
+ readonly internalType: "contract IRateProvider";
282
+ readonly name: "rateProvider";
283
+ readonly type: "address";
284
+ }];
285
+ readonly stateMutability: "view";
286
+ readonly type: "function";
287
+ }, {
288
+ readonly inputs: readonly [];
289
+ readonly name: "vault";
290
+ readonly outputs: readonly [{
291
+ readonly internalType: "contract BoringVault";
292
+ readonly name: "";
293
+ readonly type: "address";
294
+ }];
295
+ readonly stateMutability: "view";
296
+ readonly type: "function";
297
+ }, {
298
+ readonly inputs: readonly [];
299
+ readonly name: "getRate";
300
+ readonly outputs: readonly [{
301
+ readonly internalType: "uint256";
302
+ readonly name: "rate";
303
+ readonly type: "uint256";
304
+ }];
305
+ readonly stateMutability: "view";
306
+ readonly type: "function";
307
+ }, {
308
+ readonly inputs: readonly [];
309
+ readonly name: "getRateSafe";
310
+ readonly outputs: readonly [{
311
+ readonly internalType: "uint256";
312
+ readonly name: "rate";
313
+ readonly type: "uint256";
314
+ }];
315
+ readonly stateMutability: "view";
316
+ readonly type: "function";
317
+ }, {
318
+ readonly inputs: readonly [{
319
+ readonly internalType: "contract ERC20";
320
+ readonly name: "quote";
321
+ readonly type: "address";
322
+ }];
323
+ readonly name: "getRateInQuote";
324
+ readonly outputs: readonly [{
325
+ readonly internalType: "uint256";
326
+ readonly name: "rateInQuote";
327
+ readonly type: "uint256";
328
+ }];
329
+ readonly stateMutability: "view";
330
+ readonly type: "function";
331
+ }, {
332
+ readonly inputs: readonly [{
333
+ readonly internalType: "contract ERC20";
334
+ readonly name: "quote";
335
+ readonly type: "address";
336
+ }];
337
+ readonly name: "getRateInQuoteSafe";
338
+ readonly outputs: readonly [{
339
+ readonly internalType: "uint256";
340
+ readonly name: "rateInQuote";
341
+ readonly type: "uint256";
342
+ }];
343
+ readonly stateMutability: "view";
344
+ readonly type: "function";
345
+ }], "getRateSafe", readonly []>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
346
+ getRateInQuote: (args: readonly [`0x${string}`], options?: import('viem').Prettify<import('viem').UnionOmit<import('viem').ReadContractParameters<readonly [{
347
+ readonly inputs: readonly [{
348
+ readonly internalType: "contract ERC20";
349
+ readonly name: "";
350
+ readonly type: "address";
351
+ }];
352
+ readonly name: "rateProviderData";
353
+ readonly outputs: readonly [{
354
+ readonly internalType: "bool";
355
+ readonly name: "isPeggedToBase";
356
+ readonly type: "bool";
357
+ }, {
358
+ readonly internalType: "contract IRateProvider";
359
+ readonly name: "rateProvider";
360
+ readonly type: "address";
361
+ }];
362
+ readonly stateMutability: "view";
363
+ readonly type: "function";
364
+ }, {
365
+ readonly inputs: readonly [];
366
+ readonly name: "vault";
367
+ readonly outputs: readonly [{
368
+ readonly internalType: "contract BoringVault";
369
+ readonly name: "";
370
+ readonly type: "address";
371
+ }];
372
+ readonly stateMutability: "view";
373
+ readonly type: "function";
374
+ }, {
375
+ readonly inputs: readonly [];
376
+ readonly name: "getRate";
377
+ readonly outputs: readonly [{
378
+ readonly internalType: "uint256";
379
+ readonly name: "rate";
380
+ readonly type: "uint256";
381
+ }];
382
+ readonly stateMutability: "view";
383
+ readonly type: "function";
384
+ }, {
385
+ readonly inputs: readonly [];
386
+ readonly name: "getRateSafe";
387
+ readonly outputs: readonly [{
388
+ readonly internalType: "uint256";
389
+ readonly name: "rate";
390
+ readonly type: "uint256";
391
+ }];
392
+ readonly stateMutability: "view";
393
+ readonly type: "function";
394
+ }, {
395
+ readonly inputs: readonly [{
396
+ readonly internalType: "contract ERC20";
397
+ readonly name: "quote";
398
+ readonly type: "address";
399
+ }];
400
+ readonly name: "getRateInQuote";
401
+ readonly outputs: readonly [{
402
+ readonly internalType: "uint256";
403
+ readonly name: "rateInQuote";
404
+ readonly type: "uint256";
405
+ }];
406
+ readonly stateMutability: "view";
407
+ readonly type: "function";
408
+ }, {
409
+ readonly inputs: readonly [{
410
+ readonly internalType: "contract ERC20";
411
+ readonly name: "quote";
412
+ readonly type: "address";
413
+ }];
414
+ readonly name: "getRateInQuoteSafe";
415
+ readonly outputs: readonly [{
416
+ readonly internalType: "uint256";
417
+ readonly name: "rateInQuote";
418
+ readonly type: "uint256";
419
+ }];
420
+ readonly stateMutability: "view";
421
+ readonly type: "function";
422
+ }], "getRateInQuote", readonly [`0x${string}`]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
423
+ getRateInQuoteSafe: (args: readonly [`0x${string}`], options?: import('viem').Prettify<import('viem').UnionOmit<import('viem').ReadContractParameters<readonly [{
424
+ readonly inputs: readonly [{
425
+ readonly internalType: "contract ERC20";
426
+ readonly name: "";
427
+ readonly type: "address";
428
+ }];
429
+ readonly name: "rateProviderData";
430
+ readonly outputs: readonly [{
431
+ readonly internalType: "bool";
432
+ readonly name: "isPeggedToBase";
433
+ readonly type: "bool";
434
+ }, {
435
+ readonly internalType: "contract IRateProvider";
436
+ readonly name: "rateProvider";
437
+ readonly type: "address";
438
+ }];
439
+ readonly stateMutability: "view";
440
+ readonly type: "function";
441
+ }, {
442
+ readonly inputs: readonly [];
443
+ readonly name: "vault";
444
+ readonly outputs: readonly [{
445
+ readonly internalType: "contract BoringVault";
446
+ readonly name: "";
447
+ readonly type: "address";
448
+ }];
449
+ readonly stateMutability: "view";
450
+ readonly type: "function";
451
+ }, {
452
+ readonly inputs: readonly [];
453
+ readonly name: "getRate";
454
+ readonly outputs: readonly [{
455
+ readonly internalType: "uint256";
456
+ readonly name: "rate";
457
+ readonly type: "uint256";
458
+ }];
459
+ readonly stateMutability: "view";
460
+ readonly type: "function";
461
+ }, {
462
+ readonly inputs: readonly [];
463
+ readonly name: "getRateSafe";
464
+ readonly outputs: readonly [{
465
+ readonly internalType: "uint256";
466
+ readonly name: "rate";
467
+ readonly type: "uint256";
468
+ }];
469
+ readonly stateMutability: "view";
470
+ readonly type: "function";
471
+ }, {
472
+ readonly inputs: readonly [{
473
+ readonly internalType: "contract ERC20";
474
+ readonly name: "quote";
475
+ readonly type: "address";
476
+ }];
477
+ readonly name: "getRateInQuote";
478
+ readonly outputs: readonly [{
479
+ readonly internalType: "uint256";
480
+ readonly name: "rateInQuote";
481
+ readonly type: "uint256";
482
+ }];
483
+ readonly stateMutability: "view";
484
+ readonly type: "function";
485
+ }, {
486
+ readonly inputs: readonly [{
487
+ readonly internalType: "contract ERC20";
488
+ readonly name: "quote";
489
+ readonly type: "address";
490
+ }];
491
+ readonly name: "getRateInQuoteSafe";
492
+ readonly outputs: readonly [{
493
+ readonly internalType: "uint256";
494
+ readonly name: "rateInQuote";
495
+ readonly type: "uint256";
496
+ }];
497
+ readonly stateMutability: "view";
498
+ readonly type: "function";
499
+ }], "getRateInQuoteSafe", readonly [`0x${string}`]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
500
+ };
501
+ address: `0x${string}`;
502
+ abi: readonly [{
503
+ readonly inputs: readonly [{
504
+ readonly internalType: "contract ERC20";
505
+ readonly name: "";
506
+ readonly type: "address";
507
+ }];
508
+ readonly name: "rateProviderData";
509
+ readonly outputs: readonly [{
510
+ readonly internalType: "bool";
511
+ readonly name: "isPeggedToBase";
512
+ readonly type: "bool";
513
+ }, {
514
+ readonly internalType: "contract IRateProvider";
515
+ readonly name: "rateProvider";
516
+ readonly type: "address";
517
+ }];
518
+ readonly stateMutability: "view";
519
+ readonly type: "function";
520
+ }, {
521
+ readonly inputs: readonly [];
522
+ readonly name: "vault";
523
+ readonly outputs: readonly [{
524
+ readonly internalType: "contract BoringVault";
525
+ readonly name: "";
526
+ readonly type: "address";
527
+ }];
528
+ readonly stateMutability: "view";
529
+ readonly type: "function";
530
+ }, {
531
+ readonly inputs: readonly [];
532
+ readonly name: "getRate";
533
+ readonly outputs: readonly [{
534
+ readonly internalType: "uint256";
535
+ readonly name: "rate";
536
+ readonly type: "uint256";
537
+ }];
538
+ readonly stateMutability: "view";
539
+ readonly type: "function";
540
+ }, {
541
+ readonly inputs: readonly [];
542
+ readonly name: "getRateSafe";
543
+ readonly outputs: readonly [{
544
+ readonly internalType: "uint256";
545
+ readonly name: "rate";
546
+ readonly type: "uint256";
547
+ }];
548
+ readonly stateMutability: "view";
549
+ readonly type: "function";
550
+ }, {
551
+ readonly inputs: readonly [{
552
+ readonly internalType: "contract ERC20";
553
+ readonly name: "quote";
554
+ readonly type: "address";
555
+ }];
556
+ readonly name: "getRateInQuote";
557
+ readonly outputs: readonly [{
558
+ readonly internalType: "uint256";
559
+ readonly name: "rateInQuote";
560
+ readonly type: "uint256";
561
+ }];
562
+ readonly stateMutability: "view";
563
+ readonly type: "function";
564
+ }, {
565
+ readonly inputs: readonly [{
566
+ readonly internalType: "contract ERC20";
567
+ readonly name: "quote";
568
+ readonly type: "address";
569
+ }];
570
+ readonly name: "getRateInQuoteSafe";
571
+ readonly outputs: readonly [{
572
+ readonly internalType: "uint256";
573
+ readonly name: "rateInQuote";
574
+ readonly type: "uint256";
575
+ }];
576
+ readonly stateMutability: "view";
577
+ readonly type: "function";
578
+ }];
579
+ };
580
+ /**
581
+ * Get the rate provider data for the given token address.
582
+ *
583
+ * @param tokenAddress Address of the token.
584
+ * @returns Rate provider data for the given token address.
585
+ */
586
+ rateProviderData(tokenAddress: Address): Promise<{
587
+ isPeggedToBase: boolean;
588
+ rateProvider: `0x${string}`;
589
+ }>;
590
+ /**
591
+ * Get the vault for the given token address.
592
+ *
593
+ * @returns Vault for the given token address.
594
+ */
595
+ vault(): Promise<`0x${string}`>;
596
+ /**
597
+ * Get the rate for the given token address.
598
+ *
599
+ * @returns Rate for the given token address.
600
+ */
601
+ getRate(): Promise<bigint>;
602
+ /**
603
+ * Get the rate for the given token address for safe.
604
+ *
605
+ * @returns Rate for the given token address for safe.
606
+ */
607
+ getRateSafe(): Promise<bigint>;
608
+ /**
609
+ * Get the rate from the given quote address.
610
+ *
611
+ * @returns Rate for the given quote address.
612
+ */
613
+ getRateInQuote(quoteAddress: Address): Promise<bigint>;
614
+ /**
615
+ * Get the rate from the given quote address for safe.
616
+ *
617
+ * @returns Rate for the given quote address for safe.
618
+ */
619
+ getRateInQuoteSafe(quoteAddress: Address): Promise<bigint>;
620
+ }