@pufferfinance/puffer-sdk 1.9.0 → 1.10.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 (192) hide show
  1. package/dist/api/puffer-client-helpers.cjs +1 -1
  2. package/dist/api/puffer-client-helpers.cjs.map +1 -1
  3. package/dist/api/puffer-client-helpers.js +82 -81
  4. package/dist/api/puffer-client-helpers.js.map +1 -1
  5. package/dist/api/puffer-client.cjs +1 -1
  6. package/dist/api/puffer-client.cjs.map +1 -1
  7. package/dist/api/puffer-client.js +2 -2
  8. package/dist/api/puffer-client.js.map +1 -1
  9. package/dist/ccip-BO_b9tFc.cjs +2 -0
  10. package/dist/ccip-BO_b9tFc.cjs.map +1 -0
  11. package/dist/ccip-DLDO0_x2.js +148 -0
  12. package/dist/ccip-DLDO0_x2.js.map +1 -0
  13. package/dist/chains/constants.cjs +1 -1
  14. package/dist/chains/constants.js +1 -1
  15. package/dist/constants-BjRNQpT2.js +1997 -0
  16. package/dist/constants-BjRNQpT2.js.map +1 -0
  17. package/dist/constants-DA2xUb9r.cjs +9 -0
  18. package/dist/constants-DA2xUb9r.cjs.map +1 -0
  19. package/dist/contracts/abis/holesky/PufferDepositor.cjs.map +1 -1
  20. package/dist/contracts/abis/holesky/PufferDepositor.js.map +1 -1
  21. package/dist/contracts/abis/holesky/PufferVaultV2.cjs.map +1 -1
  22. package/dist/contracts/abis/holesky/PufferVaultV2.js.map +1 -1
  23. package/dist/contracts/abis/l1-reward-manager-abis.cjs +1 -1
  24. package/dist/contracts/abis/l1-reward-manager-abis.cjs.map +1 -1
  25. package/dist/contracts/abis/l1-reward-manager-abis.js +1 -1
  26. package/dist/contracts/abis/l2-reward-manager-abis.cjs +1 -1
  27. package/dist/contracts/abis/l2-reward-manager-abis.cjs.map +1 -1
  28. package/dist/contracts/abis/l2-reward-manager-abis.js +1 -1
  29. package/dist/contracts/abis/mainnet/Accountant.cjs.map +1 -1
  30. package/dist/contracts/abis/mainnet/Accountant.js.map +1 -1
  31. package/dist/contracts/abis/mainnet/AtomicQueue.cjs.map +1 -1
  32. package/dist/contracts/abis/mainnet/AtomicQueue.js.map +1 -1
  33. package/dist/contracts/abis/mainnet/BoringVault.cjs.map +1 -1
  34. package/dist/contracts/abis/mainnet/BoringVault.js.map +1 -1
  35. package/dist/contracts/abis/mainnet/ERC20Permit.cjs.map +1 -1
  36. package/dist/contracts/abis/mainnet/ERC20Permit.js.map +1 -1
  37. package/dist/contracts/abis/mainnet/L1RewardManager.cjs.map +1 -1
  38. package/dist/contracts/abis/mainnet/L1RewardManager.js.map +1 -1
  39. package/dist/contracts/abis/mainnet/L2RewardManager.cjs.map +1 -1
  40. package/dist/contracts/abis/mainnet/L2RewardManager.js.map +1 -1
  41. package/dist/contracts/abis/mainnet/PufLocker.cjs.map +1 -1
  42. package/dist/contracts/abis/mainnet/PufLocker.js.map +1 -1
  43. package/dist/contracts/abis/mainnet/PufferDepositor.cjs.map +1 -1
  44. package/dist/contracts/abis/mainnet/PufferDepositor.js.map +1 -1
  45. package/dist/contracts/abis/mainnet/PufferL2Depositor.cjs.map +1 -1
  46. package/dist/contracts/abis/mainnet/PufferL2Depositor.js.map +1 -1
  47. package/dist/contracts/abis/mainnet/PufferVaultV2.cjs.map +1 -1
  48. package/dist/contracts/abis/mainnet/PufferVaultV2.js.map +1 -1
  49. package/dist/contracts/abis/mainnet/PufferWithdrawalManager.cjs.map +1 -1
  50. package/dist/contracts/abis/mainnet/PufferWithdrawalManager.js.map +1 -1
  51. package/dist/contracts/abis/mainnet/Teller.cjs.map +1 -1
  52. package/dist/contracts/abis/mainnet/Teller.js.map +1 -1
  53. package/dist/contracts/abis/nucleus-accountant-abis.cjs +1 -1
  54. package/dist/contracts/abis/nucleus-accountant-abis.cjs.map +1 -1
  55. package/dist/contracts/abis/nucleus-accountant-abis.js +1 -1
  56. package/dist/contracts/abis/nucleus-atomic-queue-abis.cjs +1 -1
  57. package/dist/contracts/abis/nucleus-atomic-queue-abis.cjs.map +1 -1
  58. package/dist/contracts/abis/nucleus-atomic-queue-abis.js +1 -1
  59. package/dist/contracts/abis/nucleus-boring-vault-abis.cjs +1 -1
  60. package/dist/contracts/abis/nucleus-boring-vault-abis.cjs.map +1 -1
  61. package/dist/contracts/abis/nucleus-boring-vault-abis.js +1 -1
  62. package/dist/contracts/abis/nucleus-teller-abis.cjs +1 -1
  63. package/dist/contracts/abis/nucleus-teller-abis.cjs.map +1 -1
  64. package/dist/contracts/abis/nucleus-teller-abis.js +1 -1
  65. package/dist/contracts/abis/puf-locker-abis.cjs +1 -1
  66. package/dist/contracts/abis/puf-locker-abis.cjs.map +1 -1
  67. package/dist/contracts/abis/puf-locker-abis.js +1 -1
  68. package/dist/contracts/abis/puffer-depositor-abis.cjs +1 -1
  69. package/dist/contracts/abis/puffer-depositor-abis.cjs.map +1 -1
  70. package/dist/contracts/abis/puffer-depositor-abis.js +1 -1
  71. package/dist/contracts/abis/puffer-depositor-abis.js.map +1 -1
  72. package/dist/contracts/abis/puffer-vault-abis.cjs +1 -1
  73. package/dist/contracts/abis/puffer-vault-abis.cjs.map +1 -1
  74. package/dist/contracts/abis/puffer-vault-abis.js +1 -1
  75. package/dist/contracts/abis/puffer-vault-abis.js.map +1 -1
  76. package/dist/contracts/abis/puffer-withdrawal-manager-abis.cjs +1 -1
  77. package/dist/contracts/abis/puffer-withdrawal-manager-abis.cjs.map +1 -1
  78. package/dist/contracts/abis/puffer-withdrawal-manager-abis.js +1 -1
  79. package/dist/contracts/addresses.cjs +1 -1
  80. package/dist/contracts/addresses.cjs.map +1 -1
  81. package/dist/contracts/addresses.d.ts +26 -12
  82. package/dist/contracts/addresses.js +29 -12
  83. package/dist/contracts/addresses.js.map +1 -1
  84. package/dist/contracts/handlers/erc20-permit-handler.cjs +1 -1
  85. package/dist/contracts/handlers/erc20-permit-handler.cjs.map +1 -1
  86. package/dist/contracts/handlers/erc20-permit-handler.d.ts +11128 -2714
  87. package/dist/contracts/handlers/erc20-permit-handler.js +3 -3
  88. package/dist/contracts/handlers/erc20-permit-handler.js.map +1 -1
  89. package/dist/contracts/handlers/l1-reward-manager-handler.cjs +1 -1
  90. package/dist/contracts/handlers/l1-reward-manager-handler.cjs.map +1 -1
  91. package/dist/contracts/handlers/l1-reward-manager-handler.d.ts +11128 -2714
  92. package/dist/contracts/handlers/l1-reward-manager-handler.js +2 -2
  93. package/dist/contracts/handlers/l1-reward-manager-handler.js.map +1 -1
  94. package/dist/contracts/handlers/l2-reward-manager-handler.cjs +1 -1
  95. package/dist/contracts/handlers/l2-reward-manager-handler.cjs.map +1 -1
  96. package/dist/contracts/handlers/l2-reward-manager-handler.d.ts +11128 -2714
  97. package/dist/contracts/handlers/l2-reward-manager-handler.js +2 -2
  98. package/dist/contracts/handlers/l2-reward-manager-handler.js.map +1 -1
  99. package/dist/contracts/handlers/nucleus-accountant-handler.cjs +1 -1
  100. package/dist/contracts/handlers/nucleus-accountant-handler.cjs.map +1 -1
  101. package/dist/contracts/handlers/nucleus-accountant-handler.d.ts +11173 -2749
  102. package/dist/contracts/handlers/nucleus-accountant-handler.js +26 -11
  103. package/dist/contracts/handlers/nucleus-accountant-handler.js.map +1 -1
  104. package/dist/contracts/handlers/nucleus-atomic-queue-handler.cjs +1 -1
  105. package/dist/contracts/handlers/nucleus-atomic-queue-handler.cjs.map +1 -1
  106. package/dist/contracts/handlers/nucleus-atomic-queue-handler.d.ts +11128 -2714
  107. package/dist/contracts/handlers/nucleus-atomic-queue-handler.js +5 -5
  108. package/dist/contracts/handlers/nucleus-atomic-queue-handler.js.map +1 -1
  109. package/dist/contracts/handlers/nucleus-boring-vault-handler.cjs +1 -1
  110. package/dist/contracts/handlers/nucleus-boring-vault-handler.cjs.map +1 -1
  111. package/dist/contracts/handlers/nucleus-boring-vault-handler.d.ts +11187 -2769
  112. package/dist/contracts/handlers/nucleus-boring-vault-handler.js +39 -35
  113. package/dist/contracts/handlers/nucleus-boring-vault-handler.js.map +1 -1
  114. package/dist/contracts/handlers/nucleus-teller-handler.cjs +1 -1
  115. package/dist/contracts/handlers/nucleus-teller-handler.cjs.map +1 -1
  116. package/dist/contracts/handlers/nucleus-teller-handler.d.ts +11172 -2749
  117. package/dist/contracts/handlers/nucleus-teller-handler.js +30 -19
  118. package/dist/contracts/handlers/nucleus-teller-handler.js.map +1 -1
  119. package/dist/contracts/handlers/puf-locker-handler.cjs +1 -1
  120. package/dist/contracts/handlers/puf-locker-handler.cjs.map +1 -1
  121. package/dist/contracts/handlers/puf-locker-handler.d.ts +11128 -2714
  122. package/dist/contracts/handlers/puf-locker-handler.js +2 -2
  123. package/dist/contracts/handlers/puf-locker-handler.js.map +1 -1
  124. package/dist/contracts/handlers/puffer-depositor-handler.cjs +1 -1
  125. package/dist/contracts/handlers/puffer-depositor-handler.cjs.map +1 -1
  126. package/dist/contracts/handlers/puffer-depositor-handler.d.ts +11128 -2714
  127. package/dist/contracts/handlers/puffer-depositor-handler.js +2 -2
  128. package/dist/contracts/handlers/puffer-depositor-handler.js.map +1 -1
  129. package/dist/contracts/handlers/puffer-l2-depositor-handler.cjs +1 -1
  130. package/dist/contracts/handlers/puffer-l2-depositor-handler.cjs.map +1 -1
  131. package/dist/contracts/handlers/puffer-l2-depositor-handler.d.ts +11128 -2714
  132. package/dist/contracts/handlers/puffer-l2-depositor-handler.js +2 -2
  133. package/dist/contracts/handlers/puffer-l2-depositor-handler.js.map +1 -1
  134. package/dist/contracts/handlers/puffer-vault-handler.cjs +1 -1
  135. package/dist/contracts/handlers/puffer-vault-handler.cjs.map +1 -1
  136. package/dist/contracts/handlers/puffer-vault-handler.d.ts +11128 -2714
  137. package/dist/contracts/handlers/puffer-vault-handler.js +2 -2
  138. package/dist/contracts/handlers/puffer-vault-handler.js.map +1 -1
  139. package/dist/contracts/handlers/puffer-withdrawal-manager-handler.cjs +1 -1
  140. package/dist/contracts/handlers/puffer-withdrawal-manager-handler.cjs.map +1 -1
  141. package/dist/contracts/handlers/puffer-withdrawal-manager-handler.d.ts +11128 -2714
  142. package/dist/contracts/handlers/puffer-withdrawal-manager-handler.js +2 -2
  143. package/dist/contracts/handlers/puffer-withdrawal-manager-handler.js.map +1 -1
  144. package/dist/contracts/tokens.cjs +1 -1
  145. package/dist/contracts/tokens.cjs.map +1 -1
  146. package/dist/contracts/tokens.d.ts +8 -2
  147. package/dist/contracts/tokens.js +40 -10
  148. package/dist/contracts/tokens.js.map +1 -1
  149. package/dist/createWalletClient-BuLYysrp.cjs +4 -0
  150. package/dist/createWalletClient-BuLYysrp.cjs.map +1 -0
  151. package/dist/createWalletClient-DNcW-ENe.js +2028 -0
  152. package/dist/createWalletClient-DNcW-ENe.js.map +1 -0
  153. package/dist/errors/base-error.cjs.map +1 -1
  154. package/dist/errors/base-error.js.map +1 -1
  155. package/dist/{getContract-MrPLx6gp.cjs → getContract-3QbyfZBF.cjs} +2 -2
  156. package/dist/getContract-3QbyfZBF.cjs.map +1 -0
  157. package/dist/{getContract-B3Spz0SO.js → getContract-CezEyDf-.js} +2 -2
  158. package/dist/{getContract-MrPLx6gp.cjs.map → getContract-CezEyDf-.js.map} +1 -1
  159. package/dist/main.cjs +1 -1
  160. package/dist/main.js +24 -23
  161. package/dist/secp256k1-3OC5y4qp.js +1579 -0
  162. package/dist/secp256k1-3OC5y4qp.js.map +1 -0
  163. package/dist/secp256k1-bcahnPX9.cjs +2 -0
  164. package/dist/secp256k1-bcahnPX9.cjs.map +1 -0
  165. package/dist/utils/version.cjs +1 -1
  166. package/dist/utils/version.js +1 -1
  167. package/dist/writeContract-ChuHpJLC.js +3799 -0
  168. package/dist/writeContract-ChuHpJLC.js.map +1 -0
  169. package/dist/writeContract-D97dSJQe.cjs +32 -0
  170. package/dist/writeContract-D97dSJQe.cjs.map +1 -0
  171. package/package.json +13 -13
  172. package/dist/ccip-D4klNwCt.js +0 -159
  173. package/dist/ccip-D4klNwCt.js.map +0 -1
  174. package/dist/ccip-DLDqFodf.cjs +0 -2
  175. package/dist/ccip-DLDqFodf.cjs.map +0 -1
  176. package/dist/constants-BvU-JhfL.cjs +0 -9
  177. package/dist/constants-BvU-JhfL.cjs.map +0 -1
  178. package/dist/constants-rWWWhxR_.js +0 -2099
  179. package/dist/constants-rWWWhxR_.js.map +0 -1
  180. package/dist/createWalletClient-Bmopj8MM.cjs +0 -4
  181. package/dist/createWalletClient-Bmopj8MM.cjs.map +0 -1
  182. package/dist/createWalletClient-DKcpswHR.js +0 -2007
  183. package/dist/createWalletClient-DKcpswHR.js.map +0 -1
  184. package/dist/getContract-B3Spz0SO.js.map +0 -1
  185. package/dist/secp256k1-BLbXMlpX.js +0 -1172
  186. package/dist/secp256k1-BLbXMlpX.js.map +0 -1
  187. package/dist/secp256k1-CFnFaJ0H.cjs +0 -2
  188. package/dist/secp256k1-CFnFaJ0H.cjs.map +0 -1
  189. package/dist/writeContract-BBHpAss8.cjs +0 -32
  190. package/dist/writeContract-BBHpAss8.cjs.map +0 -1
  191. package/dist/writeContract-RluxM31W.js +0 -3833
  192. package/dist/writeContract-RluxM31W.js.map +0 -1
@@ -1,11 +1,12 @@
1
1
  var u = Object.defineProperty;
2
- var m = (n, t, a) => t in n ? u(n, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : n[t] = a;
3
- var l = (n, t, a) => m(n, typeof t != "symbol" ? t + "" : t, a);
4
- import { V as C } from "../../constants-rWWWhxR_.js";
2
+ var l = (e, t, n) => t in e ? u(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var c = (e, t, n) => l(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { V as C } from "../../constants-BjRNQpT2.js";
5
5
  import { NUCLEUS_BORING_VAULT_ABIS as p } from "../abis/nucleus-boring-vault-abis.js";
6
- import { CONTRACT_ADDRESSES as g } from "../addresses.js";
7
- import { g as f } from "../../getContract-B3Spz0SO.js";
8
- class _ {
6
+ import { NUCLEUS_CONTRACT_ADDRESSES as g } from "../addresses.js";
7
+ import { UnifiToken as f } from "../tokens.js";
8
+ import { g as w } from "../../getContract-CezEyDf-.js";
9
+ class V {
9
10
  /**
10
11
  * Create the handler for processing UniFi tokens.
11
12
  *
@@ -15,9 +16,20 @@ class _ {
15
16
  * @param publicClient The public client to use for public
16
17
  * interactions.
17
18
  */
18
- constructor(t, a, e) {
19
- l(this, "viemChain");
20
- this.chain = t, this.walletClient = a, this.publicClient = e, this.viemChain = C[t];
19
+ constructor(t, n, a) {
20
+ c(this, "viemChain");
21
+ c(this, "token");
22
+ this.chain = t, this.walletClient = n, this.publicClient = a, this.viemChain = C[t], this.token = f.unifiETH;
23
+ }
24
+ /**
25
+ * Set the UniFi token to use for executing transactions on the
26
+ * contract.
27
+ *
28
+ * @param token UniFi token to use for the handler.
29
+ * @returns The handler.
30
+ */
31
+ withToken(t) {
32
+ return this.token = t, this;
21
33
  }
22
34
  /**
23
35
  * Get the contract. This is a method because the typings are complex
@@ -26,8 +38,8 @@ class _ {
26
38
  * @returns The viem contract.
27
39
  */
28
40
  getContract() {
29
- const t = g[this.chain].NucleusBoringVault, a = p[this.chain].BoringVault, e = { public: this.publicClient, wallet: this.walletClient };
30
- return f({ address: t, abi: a, client: e });
41
+ const t = g[this.token][this.chain].NucleusBoringVault, n = p[this.chain].BoringVault, a = { public: this.publicClient, wallet: this.walletClient };
42
+ return w({ address: t, abi: n, client: a });
31
43
  }
32
44
  /**
33
45
  * Get the allowance for the given owner and spender.
@@ -36,16 +48,8 @@ class _ {
36
48
  * @param spender Address of the spender.
37
49
  * @returns Allowance for the given owner and spender.
38
50
  */
39
- getAllowance(t, a) {
40
- return this.getContract().read.allowance([t, a]);
41
- }
42
- /**
43
- * Get the total supply of the token.
44
- *
45
- * @returns Total supply of the token.
46
- */
47
- getTotalSupply() {
48
- return this.getContract().read.totalSupply();
51
+ getAllowance(t, n) {
52
+ return this.getContract().read.allowance([t, n]);
49
53
  }
50
54
  /**
51
55
  * Check the token balance of the wallet.
@@ -72,8 +76,8 @@ class _ {
72
76
  * @param value Value to approve for the spender.
73
77
  * @returns Hash of the transaction.
74
78
  */
75
- approve(t, a, e) {
76
- return this.getContract().write.approve([a, e], {
79
+ approve(t, n, a) {
80
+ return this.getContract().write.approve([n, a], {
77
81
  account: t,
78
82
  chain: this.viemChain
79
83
  });
@@ -90,11 +94,11 @@ class _ {
90
94
  * `estimate: () => Promise<bigint>` - Gas estimate of the
91
95
  * transaction.
92
96
  */
93
- transfer(t, a, e) {
94
- return { transact: () => this.getContract().write.transfer([a, e], {
97
+ transfer(t, n, a) {
98
+ return { transact: () => this.getContract().write.transfer([n, a], {
95
99
  account: t,
96
100
  chain: this.viemChain
97
- }), estimate: () => this.getContract().estimateGas.transfer([a, e], {
101
+ }), estimate: () => this.getContract().estimateGas.transfer([n, a], {
98
102
  account: t
99
103
  }) };
100
104
  }
@@ -111,12 +115,12 @@ class _ {
111
115
  * `estimate: () => Promise<bigint>` - Gas estimate of the
112
116
  * transaction.
113
117
  */
114
- transferFrom(t, a, e, r) {
115
- return { transact: () => this.getContract().write.transferFrom([a, e, r], {
118
+ transferFrom(t, n, a, i) {
119
+ return { transact: () => this.getContract().write.transferFrom([n, a, i], {
116
120
  account: t,
117
121
  chain: this.viemChain
118
122
  }), estimate: () => this.getContract().estimateGas.transferFrom(
119
- [a, e, r],
123
+ [n, a, i],
120
124
  { account: t }
121
125
  ) };
122
126
  }
@@ -139,17 +143,17 @@ class _ {
139
143
  * transaction.
140
144
  */
141
145
  permit(t) {
142
- const { account: a, owner: e, spender: r, value: i, deadline: c, v: s, r: o, s: h } = t;
146
+ const { account: n, owner: a, spender: i, value: r, deadline: s, v: o, r: h, s: m } = t;
143
147
  return { transact: () => this.getContract().write.permit(
144
- [e, r, i, c, s, o, h],
145
- { account: a, chain: this.viemChain }
148
+ [a, i, r, s, o, h, m],
149
+ { account: n, chain: this.viemChain }
146
150
  ), estimate: () => this.getContract().estimateGas.permit(
147
- [e, r, i, c, s, o, h],
148
- { account: a }
151
+ [a, i, r, s, o, h, m],
152
+ { account: n }
149
153
  ) };
150
154
  }
151
155
  }
152
156
  export {
153
- _ as NucleusBoringVaultHandler
157
+ V as NucleusBoringVaultHandler
154
158
  };
155
159
  //# sourceMappingURL=nucleus-boring-vault-handler.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nucleus-boring-vault-handler.js","sources":["../../../lib/contracts/handlers/nucleus-boring-vault-handler.ts"],"sourcesContent":["/* istanbul ignore file */\n\nimport {\n WalletClient,\n PublicClient,\n getContract,\n Address,\n GetContractReturnType,\n} from 'viem';\nimport { Chain, VIEM_CHAINS, ViemChain } from '../../chains/constants';\nimport { NUCLEUS_BORING_VAULT_ABIS } from '../abis/nucleus-boring-vault-abis';\nimport { CONTRACT_ADDRESSES } from '../addresses';\n\nexport type PermitParams = {\n account: Address;\n owner: Address;\n spender: Address;\n value: bigint;\n deadline: bigint;\n v: number;\n r: Address;\n s: Address;\n};\n\n/**\n * Handler for the `BoringVault` contract for a given token exposing\n * methods to interact with the contract.\n */\nexport class NucleusBoringVaultHandler {\n private viemChain: ViemChain;\n\n /**\n * Create the handler for processing UniFi 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.viemChain = VIEM_CHAINS[chain];\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 = CONTRACT_ADDRESSES[this.chain]\n .NucleusBoringVault as Address;\n const abi = NUCLEUS_BORING_VAULT_ABIS[this.chain].BoringVault;\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 allowance for the given owner and spender.\n *\n * @param owner Address of the owner.\n * @param spender Address of the spender.\n * @returns Allowance for the given owner and spender.\n */\n public getAllowance(owner: Address, spender: Address) {\n return this.getContract().read.allowance([owner, spender]);\n }\n\n /**\n * Get the total supply of the token.\n *\n * @returns Total supply of the token.\n */\n public getTotalSupply() {\n return this.getContract().read.totalSupply();\n }\n\n /**\n * Check the token balance of the wallet.\n *\n * @param walletAddress Wallet address to check the balance of.\n * @returns Token balance in wei.\n */\n public balanceOf(walletAddress: Address) {\n return this.getContract().read.balanceOf([walletAddress]);\n }\n\n /**\n * Get the total supply of the token.\n *\n * @returns Total supply of the token.\n */\n public totalSupply() {\n return this.getContract().read.totalSupply();\n }\n\n /**\n * Approve transaction for the spender to spend the owner's tokens.\n *\n * @param walletAddress Address of the caller of the transaction.\n * @param spenderAddress Address of the spender.\n * @param value Value to approve for the spender.\n * @returns Hash of the transaction.\n */\n public approve(\n walletAddress: Address,\n spenderAddress: Address,\n value: bigint,\n ) {\n return this.getContract().write.approve([spenderAddress, value], {\n account: walletAddress,\n chain: this.viemChain,\n });\n }\n\n /**\n * Transfer tokens from the owner's wallet to the given address.\n *\n * @param walletAddress Address of the owner's wallet.\n * @param toAddress Address to transfer the tokens to.\n * @param value Value to transfer.\n * @returns `transact: () => Promise<Address>` - Used to make the\n * transaction with the given value.\n *\n * `estimate: () => Promise<bigint>` - Gas estimate of the\n * transaction.\n */\n public transfer(walletAddress: Address, toAddress: Address, value: bigint) {\n const transact = () =>\n this.getContract().write.transfer([toAddress, value], {\n account: walletAddress,\n chain: this.viemChain,\n });\n const estimate = () =>\n this.getContract().estimateGas.transfer([toAddress, value], {\n account: walletAddress,\n });\n\n return { transact, estimate };\n }\n\n /**\n * Transfer tokens from the given address to another address.\n *\n * @param walletAddress Address of the caller of the transaction.\n * @param fromAddress Address to transfer the tokens from.\n * @param toAddress Address to transfer the tokens to.\n * @param value Value to transfer.\n * @returns `transact: () => Promise<Address>` - Used to\n * make the transaction with the given value.\n *\n * `estimate: () => Promise<bigint>` - Gas estimate of the\n * transaction.\n */\n public transferFrom(\n walletAddress: Address,\n fromAddress: Address,\n toAddress: Address,\n value: bigint,\n ) {\n const transact = () =>\n this.getContract().write.transferFrom([fromAddress, toAddress, value], {\n account: walletAddress,\n chain: this.viemChain,\n });\n const estimate = () =>\n this.getContract().estimateGas.transferFrom(\n [fromAddress, toAddress, value],\n { account: walletAddress },\n );\n\n return { transact, estimate };\n }\n\n /**\n * Get permit to be able to use the token.\n *\n * @param params Permit parameters.\n * @param params.account Address of the caller of the transaction.\n * @param params.owner Address of the owner.\n * @param params.spender Address of the spender.\n * @param params.value Value to approve for the spender.\n * @param params.deadline Deadline for the permit.\n * @param params.v v value of the permit.\n * @param params.r r value of the permit.\n * @param params.s s value of the permit.\n * @returns `transact: () => Promise<Address>` - Used to make the\n * transaction with the given value.\n *\n * `estimate: () => Promise<bigint>` - Gas estimate of the\n * transaction.\n */\n public permit(params: PermitParams) {\n const { account, owner, spender, value, deadline, v, r, s } = params;\n const transact = () =>\n this.getContract().write.permit(\n [owner, spender, value, deadline, v, r, s],\n { account, chain: this.viemChain },\n );\n const estimate = () =>\n this.getContract().estimateGas.permit(\n [owner, spender, value, deadline, v, r, s],\n { account },\n );\n\n return { transact, estimate };\n }\n}\n"],"names":["NucleusBoringVaultHandler","chain","walletClient","publicClient","__publicField","VIEM_CHAINS","address","CONTRACT_ADDRESSES","abi","NUCLEUS_BORING_VAULT_ABIS","client","getContract","owner","spender","walletAddress","spenderAddress","value","toAddress","fromAddress","params","account","deadline","v","r","s"],"mappings":";;;;;;;AA4BO,MAAMA,EAA0B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYrC,YACUC,GACAC,GACAC,GACR;AAfM,IAAAC,EAAA;AAYE,SAAA,QAAAH,GACA,KAAA,eAAAC,GACA,KAAA,eAAAC,GAEH,KAAA,YAAYE,EAAYJ,CAAK;AAAA,EACpC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,cAAc;AACnB,UAAMK,IAAUC,EAAmB,KAAK,KAAK,EAC1C,oBACGC,IAAMC,EAA0B,KAAK,KAA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AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAeO,aACLA,GACAI,GACAD,GACAD,GACA;AAYO,WAAA,EAAE,UAXQ,MACf,KAAK,cAAc,MAAM,aAAa,CAACE,GAAaD,GAAWD,CAAK,GAAG;AAAA,MACrE,SAASF;AAAA,MACT,OAAO,KAAK;AAAA,IAAA,CACb,GAOgB,UANF,MACf,KAAK,cAAc,YAAY;AAAA,MAC7B,CAACI,GAAaD,GAAWD,CAAK;AAAA,MAC9B,EAAE,SAASF,EAAc;AAAA,IAAA;EAI/B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAoBO,OAAOK,GAAsB;AAC5B,UAAA,EAAE,SAAAC,GAAS,OAAAR,GAAO,SAAAC,GAAS,OAAAG,GAAO,UAAAK,GAAU,GAAAC,GAAG,GAAAC,GAAG,GAAAC,EAAM,IAAAL;AAYvD,WAAA,EAAE,UAXQ,MACf,KAAK,cAAc,MAAM;AAAA,MACvB,CAACP,GAAOC,GAASG,GAAOK,GAAUC,GAAGC,GAAGC,CAAC;AAAA,MACzC,EAAE,SAAAJ,GAAS,OAAO,KAAK,UAAU;AAAA,IAAA,GAQlB,UANF,MACf,KAAK,cAAc,YAAY;AAAA,MAC7B,CAACR,GAAOC,GAASG,GAAOK,GAAUC,GAAGC,GAAGC,CAAC;AAAA,MACzC,EAAE,SAAAJ,EAAQ;AAAA,IAAA;EAIhB;AACF;"}
1
+ {"version":3,"file":"nucleus-boring-vault-handler.js","sources":["../../../lib/contracts/handlers/nucleus-boring-vault-handler.ts"],"sourcesContent":["/* istanbul ignore file */\n\nimport {\n WalletClient,\n PublicClient,\n getContract,\n Address,\n GetContractReturnType,\n} from 'viem';\nimport { Chain, VIEM_CHAINS, ViemChain } from '../../chains/constants';\nimport { NUCLEUS_BORING_VAULT_ABIS } from '../abis/nucleus-boring-vault-abis';\nimport { NUCLEUS_CONTRACT_ADDRESSES } from '../addresses';\nimport { UnifiToken } from '../tokens';\n\nexport type PermitParams = {\n account: Address;\n owner: Address;\n spender: Address;\n value: bigint;\n deadline: bigint;\n v: number;\n r: Address;\n s: Address;\n};\n\n/**\n * Handler for the `BoringVault` contract for a given token exposing\n * methods to interact with the contract.\n */\nexport class NucleusBoringVaultHandler {\n private viemChain: ViemChain;\n private token: UnifiToken;\n\n /**\n * Create the handler for processing UniFi 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.viemChain = VIEM_CHAINS[chain];\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 = NUCLEUS_CONTRACT_ADDRESSES[this.token][this.chain]\n .NucleusBoringVault as Address;\n const abi = NUCLEUS_BORING_VAULT_ABIS[this.chain].BoringVault;\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 allowance for the given owner and spender.\n *\n * @param owner Address of the owner.\n * @param spender Address of the spender.\n * @returns Allowance for the given owner and spender.\n */\n public getAllowance(owner: Address, spender: Address) {\n return this.getContract().read.allowance([owner, spender]);\n }\n\n /**\n * Check the token balance of the wallet.\n *\n * @param walletAddress Wallet address to check the balance of.\n * @returns Token balance in wei.\n */\n public balanceOf(walletAddress: Address) {\n return this.getContract().read.balanceOf([walletAddress]);\n }\n\n /**\n * Get the total supply of the token.\n *\n * @returns Total supply of the token.\n */\n public totalSupply() {\n return this.getContract().read.totalSupply();\n }\n\n /**\n * Approve transaction for the spender to spend the owner's tokens.\n *\n * @param walletAddress Address of the caller of the transaction.\n * @param spenderAddress Address of the spender.\n * @param value Value to approve for the spender.\n * @returns Hash of the transaction.\n */\n public approve(\n walletAddress: Address,\n spenderAddress: Address,\n value: bigint,\n ) {\n return this.getContract().write.approve([spenderAddress, value], {\n account: walletAddress,\n chain: this.viemChain,\n });\n }\n\n /**\n * Transfer tokens from the owner's wallet to the given address.\n *\n * @param walletAddress Address of the owner's wallet.\n * @param toAddress Address to transfer the tokens to.\n * @param value Value to transfer.\n * @returns `transact: () => Promise<Address>` - Used to make the\n * transaction with the given value.\n *\n * `estimate: () => Promise<bigint>` - Gas estimate of the\n * transaction.\n */\n public transfer(walletAddress: Address, toAddress: Address, value: bigint) {\n const transact = () =>\n this.getContract().write.transfer([toAddress, value], {\n account: walletAddress,\n chain: this.viemChain,\n });\n const estimate = () =>\n this.getContract().estimateGas.transfer([toAddress, value], {\n account: walletAddress,\n });\n\n return { transact, estimate };\n }\n\n /**\n * Transfer tokens from the given address to another address.\n *\n * @param walletAddress Address of the caller of the transaction.\n * @param fromAddress Address to transfer the tokens from.\n * @param toAddress Address to transfer the tokens to.\n * @param value Value to transfer.\n * @returns `transact: () => Promise<Address>` - Used to\n * make the transaction with the given value.\n *\n * `estimate: () => Promise<bigint>` - Gas estimate of the\n * transaction.\n */\n public transferFrom(\n walletAddress: Address,\n fromAddress: Address,\n toAddress: Address,\n value: bigint,\n ) {\n const transact = () =>\n this.getContract().write.transferFrom([fromAddress, toAddress, value], {\n account: walletAddress,\n chain: this.viemChain,\n });\n const estimate = () =>\n this.getContract().estimateGas.transferFrom(\n [fromAddress, toAddress, value],\n { account: walletAddress },\n );\n\n return { transact, estimate };\n }\n\n /**\n * Get permit to be able to use the token.\n *\n * @param params Permit parameters.\n * @param params.account Address of the caller of the transaction.\n * @param params.owner Address of the owner.\n * @param params.spender Address of the spender.\n * @param params.value Value to approve for the spender.\n * @param params.deadline Deadline for the permit.\n * @param params.v v value of the permit.\n * @param params.r r value of the permit.\n * @param params.s s value of the permit.\n * @returns `transact: () => Promise<Address>` - Used to make the\n * transaction with the given value.\n *\n * `estimate: () => Promise<bigint>` - Gas estimate of the\n * transaction.\n */\n public permit(params: PermitParams) {\n const { account, owner, spender, value, deadline, v, r, s } = params;\n const transact = () =>\n this.getContract().write.permit(\n [owner, spender, value, deadline, v, r, s],\n { account, chain: this.viemChain },\n );\n const estimate = () =>\n this.getContract().estimateGas.permit(\n [owner, spender, value, deadline, v, r, s],\n { account },\n );\n\n return { transact, estimate };\n }\n}\n"],"names":["NucleusBoringVaultHandler","chain","walletClient","publicClient","__publicField","VIEM_CHAINS","UnifiToken","token","address","NUCLEUS_CONTRACT_ADDRESSES","abi","NUCLEUS_BORING_VAULT_ABIS","client","getContract","owner","spender","walletAddress","spenderAddress","value","toAddress","fromAddress","params","account","deadline","v","r","s"],"mappings":";;;;;;;;AA6BO,MAAMA,EAA0B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAarC,YACUC,GACAC,GACAC,GACR;AAhBM,IAAAC,EAAA;AACA,IAAAA,EAAA;AAYE,SAAA,QAAAH,GACA,KAAA,eAAAC,GACA,KAAA,eAAAC,GAEH,KAAA,YAAYE,EAAYJ,CAAK,GAClC,KAAK,QAAQK,EAAW;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUnB,UAAUC,GAAmB;AAClC,gBAAK,QAAQA,GACN;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASF,cAAc;AACnB,UAAMC,IAAUC,EAA2B,KAAK,KAAK,EAAE,KAAK,KAAK,EAC9D,oBACGC,IAAMC,EAA0B,KAAK,KAAK,EAAE,aAC5CC,IAAS,EAAE,QAAQ,KAAK,cAAc,QAAQ,KAAK,aA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MAAM,aAAa,CAACE,GAAaD,GAAWD,CAAK,GAAG;AAAA,MACrE,SAASF;AAAA,MACT,OAAO,KAAK;AAAA,IAAA,CACb,GAOgB,UANF,MACf,KAAK,cAAc,YAAY;AAAA,MAC7B,CAACI,GAAaD,GAAWD,CAAK;AAAA,MAC9B,EAAE,SAASF,EAAc;AAAA,IAC3B,EAE0B;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAqBvB,OAAOK,GAAsB;AAC5B,UAAA,EAAE,SAAAC,GAAS,OAAAR,GAAO,SAAAC,GAAS,OAAAG,GAAO,UAAAK,GAAU,GAAAC,GAAG,GAAAC,GAAG,GAAAC,EAAA,IAAML;AAYvD,WAAA,EAAE,UAXQ,MACf,KAAK,cAAc,MAAM;AAAA,MACvB,CAACP,GAAOC,GAASG,GAAOK,GAAUC,GAAGC,GAAGC,CAAC;AAAA,MACzC,EAAE,SAAAJ,GAAS,OAAO,KAAK,UAAU;AAAA,IACnC,GAOiB,UANF,MACf,KAAK,cAAc,YAAY;AAAA,MAC7B,CAACR,GAAOC,GAASG,GAAOK,GAAUC,GAAGC,GAAGC,CAAC;AAAA,MACzC,EAAE,SAAAJ,EAAQ;AAAA,IACZ,EAE0B;AAAA,EAAA;AAEhC;"}
@@ -1,2 +1,2 @@
1
- "use strict";var P=Object.defineProperty;var S=(n,t,e)=>t in n?P(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var u=(n,t,e)=>S(n,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../../constants-BvU-JhfL.cjs"),T=require("../addresses.cjs"),E=require("../abis/nucleus-teller-abis.cjs"),C=require("../tokens.cjs"),_=require("./erc20-permit-handler.cjs"),v=require("../../getContract-MrPLx6gp.cjs");class A{constructor(t,e,i){u(this,"viemChain");u(this,"erc20PermitHandler");this.chain=t,this.walletClient=e,this.publicClient=i,this.viemChain=p.VIEM_CHAINS[t],this.erc20PermitHandler=new _.ERC20PermitHandler(t,e,i)}getContract(){const t=T.CONTRACT_ADDRESSES[this.chain].NucleusTeller,e=E.NUCLEUS_TELLER_ABIS[this.chain].Teller,i={public:this.publicClient,wallet:this.walletClient};return v.getContract({address:t,abi:e,client:i})}accountant(){return this.getContract().read.accountant()}vault(){return this.getContract().read.vault()}shareLockPeriod(){return this.getContract().read.shareLockPeriod()}shareUnlockTime(t){return this.getContract().read.shareUnlockTime([t])}isPaused(){return this.getContract().read.isPaused()}async deposit(t){const{token:e,unifiToken:i,account:s,amount:r,minimumMint:a,isPreapproved:o=!1}=t,c=C.TOKENS_ADDRESSES[e][this.chain];if(o)return{transact:()=>this.getContract().write.deposit([c,r,a],{account:s,chain:this.viemChain}),estimate:()=>this.getContract().estimateGas.deposit([c,r,a],{account:s})};const{r:h,s:l,v:d,deadline:g}=await this.erc20PermitHandler.withToken(e).getPermitSignature(s,C.TOKENS_ADDRESSES[i][this.chain],r),m=[c,r,a,g,Number(d),h,l];return{transact:()=>this.getContract().write.depositWithPermit(m,{account:s,chain:this.viemChain}),estimate:()=>this.getContract().estimateGas.depositWithPermit(m,{account:s})}}depositWithPermit(t){const{account:e,depositAsset:i,depositAmount:s,minimumMint:r,deadline:a,v:o,r:c,s:h}=t;return{transact:()=>this.getContract().write.depositWithPermit([i,s,r,a,o,c,h],{account:e,chain:this.viemChain}),estimate:()=>this.getContract().estimateGas.depositWithPermit([i,s,r,a,o,c,h],{account:e})}}}exports.NucleusTellerHandler=A;
1
+ "use strict";var S=Object.defineProperty;var T=(r,t,e)=>t in r?S(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var u=(r,t,e)=>T(r,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("../../constants-DA2xUb9r.cjs"),p=require("../addresses.cjs"),k=require("../abis/nucleus-teller-abis.cjs"),l=require("../tokens.cjs"),E=require("./erc20-permit-handler.cjs"),_=require("../../getContract-3QbyfZBF.cjs");class v{constructor(t,e,i){u(this,"viemChain");u(this,"erc20PermitHandler");u(this,"token");this.chain=t,this.walletClient=e,this.publicClient=i,this.viemChain=P.VIEM_CHAINS[t],this.erc20PermitHandler=new E.ERC20PermitHandler(t,e,i),this.token=l.UnifiToken.unifiETH}withToken(t){return this.token=t,this}getContract(){const t=p.NUCLEUS_CONTRACT_ADDRESSES[this.token][this.chain].NucleusTeller,e=k.NUCLEUS_TELLER_ABIS[this.chain].Teller,i={public:this.publicClient,wallet:this.walletClient};return _.getContract({address:t,abi:e,client:i})}accountant(){return this.getContract().read.accountant()}vault(){return this.getContract().read.vault()}shareLockPeriod(){return this.getContract().read.shareLockPeriod()}shareUnlockTime(t){return this.getContract().read.shareUnlockTime([t])}isPaused(){return this.getContract().read.isPaused()}async deposit(t){const{token:e,unifiToken:i,account:s,amount:n,minimumMint:a,isPreapproved:o=!1}=t,c=l.TOKENS_ADDRESSES[e][this.chain];if(o)return{transact:()=>this.getContract().write.deposit([c,n,a],{account:s,chain:this.viemChain}),estimate:()=>this.getContract().estimateGas.deposit([c,n,a],{account:s})};const{r:h,s:d,v:m,deadline:g}=await this.erc20PermitHandler.withToken(e).getPermitSignature(s,l.TOKENS_ADDRESSES[i][this.chain],n),C=[c,n,a,g,Number(m),h,d];return{transact:()=>this.getContract().write.depositWithPermit(C,{account:s,chain:this.viemChain}),estimate:()=>this.getContract().estimateGas.depositWithPermit(C,{account:s})}}depositWithPermit(t){const{account:e,depositAsset:i,depositAmount:s,minimumMint:n,deadline:a,v:o,r:c,s:h}=t;return{transact:()=>this.getContract().write.depositWithPermit([i,s,n,a,o,c,h],{account:e,chain:this.viemChain}),estimate:()=>this.getContract().estimateGas.depositWithPermit([i,s,n,a,o,c,h],{account:e})}}}exports.NucleusTellerHandler=v;
2
2
  //# sourceMappingURL=nucleus-teller-handler.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"nucleus-teller-handler.cjs","sources":["../../../lib/contracts/handlers/nucleus-teller-handler.ts"],"sourcesContent":["import {\n WalletClient,\n PublicClient,\n getContract,\n Address,\n GetContractReturnType,\n} from 'viem';\nimport { Chain, VIEM_CHAINS, ViemChain } from '../../chains/constants';\nimport { CONTRACT_ADDRESSES } from '../addresses';\nimport { NUCLEUS_TELLER_ABIS } from '../abis/nucleus-teller-abis';\nimport { Token, TOKENS_ADDRESSES, UnifiToken } from '../tokens';\nimport { ERC20PermitHandler } from './erc20-permit-handler';\n\nexport type DepositParams = {\n account: Address;\n token: Token;\n unifiToken: UnifiToken;\n amount: bigint;\n minimumMint: bigint;\n isPreapproved?: boolean;\n};\n\nexport type DepositWithPermitParams = {\n account: Address;\n depositAsset: Address;\n depositAmount: bigint;\n minimumMint: bigint;\n deadline: bigint;\n v: number;\n r: Address;\n s: Address;\n};\n\n/**\n * Handler for the `Teller` contract from nucleus.\n */\nexport class NucleusTellerHandler {\n private viemChain: ViemChain;\n private erc20PermitHandler: ERC20PermitHandler;\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.viemChain = VIEM_CHAINS[chain];\n this.erc20PermitHandler = new ERC20PermitHandler(\n chain,\n walletClient,\n publicClient,\n );\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 = CONTRACT_ADDRESSES[this.chain].NucleusTeller as Address;\n const abi = NUCLEUS_TELLER_ABIS[this.chain].Teller;\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 address of the `Accountant` contract.\n *\n * @returns The address of the `Accountant` contract.\n */\n public accountant() {\n return this.getContract().read.accountant();\n }\n\n /**\n * Get the address of the `BoringVault` contract.\n *\n * @returns The address of the `BoringVault` contract.\n */\n public vault() {\n return this.getContract().read.vault();\n }\n\n /**\n * Get the share lock period.\n *\n * @returns The share lock period.\n */\n public shareLockPeriod() {\n return this.getContract().read.shareLockPeriod();\n }\n\n /**\n * Get the share unlock time for the given wallet address.\n *\n * @param walletAddress Address of the wallet.\n * @returns The share unlock time.\n */\n public shareUnlockTime(walletAddress: Address) {\n return this.getContract().read.shareUnlockTime([walletAddress]);\n }\n\n /**\n * Get the paused state of the contract.\n *\n * @returns The paused state of the contract.\n */\n public isPaused() {\n return this.getContract().read.isPaused();\n }\n\n /**\n * Deposit the given token for staking. This doesn't make the\n * transaction but returns two methods namely `transact` and\n * `estimate`.\n *\n * @param params Deposit parameters.\n * @param params.account Address of the caller of the transaction.\n * @param params.token Token to deposit.\n * @param params.unifiToken UniFi token to get in return of the deposit.\n * @param params.amount Amount of the token to deposit.\n * @param params.minimumMint Minimum amount of shares to mint.\n * @param params.isPreapproved Whether the token is preapproved.\n * @returns `transact: () => Promise<Address>` - Used to make the\n * transaction with the given value.\n *\n * `estimate: () => Promise<bigint>` - Gas estimate of the\n * transaction.\n */\n public async deposit(params: DepositParams) {\n const {\n token,\n unifiToken,\n account,\n amount,\n minimumMint,\n isPreapproved = false,\n } = params;\n const tokenAddress = TOKENS_ADDRESSES[token][this.chain];\n\n if (isPreapproved) {\n return {\n transact: () =>\n this.getContract().write.deposit(\n [tokenAddress, amount, minimumMint],\n {\n account,\n chain: this.viemChain,\n },\n ),\n estimate: () =>\n this.getContract().estimateGas.deposit(\n [tokenAddress, amount, minimumMint],\n { account },\n ),\n };\n }\n\n const { r, s, v, deadline } = await this.erc20PermitHandler\n .withToken(token)\n .getPermitSignature(\n account,\n // The UniFi token contract is the spender.\n TOKENS_ADDRESSES[unifiToken][this.chain],\n amount,\n );\n\n const depositArgs = <const>[\n tokenAddress,\n amount,\n minimumMint,\n deadline,\n Number(v),\n r,\n s,\n ];\n\n const transact = () =>\n this.getContract().write.depositWithPermit(depositArgs, {\n account,\n chain: this.viemChain,\n });\n const estimate = () =>\n this.getContract().estimateGas.depositWithPermit(depositArgs, {\n account,\n });\n\n return { transact, estimate };\n }\n\n /**\n * Deposit an asset/token for staking with a permit.\n *\n * @param params Permit parameters.\n * @param params.account Address of the caller of the transaction.\n * @param params.depositAsset Address of the asset/token to deposit.\n * @param params.depositAmount Amount of the asset/token to deposit.\n * @param params.minimumMint Minimum amount of shares to mint.\n * @param params.deadline Deadline for the permit.\n * @param params.v v value of the permit.\n * @param params.r r value of the permit.\n * @param params.s s value of the permit.\n * @returns `transact: () => Promise<Address>` - Used to make the\n * transaction with the given value.\n *\n * `estimate: () => Promise<bigint>` - Gas estimate of the\n * transaction.\n */\n public depositWithPermit(params: DepositWithPermitParams) {\n const {\n account,\n depositAsset,\n depositAmount,\n minimumMint,\n deadline,\n v,\n r,\n s,\n } = params;\n\n const transact = () =>\n this.getContract().write.depositWithPermit(\n [depositAsset, depositAmount, minimumMint, deadline, v, r, s],\n {\n account,\n chain: this.viemChain,\n },\n );\n const estimate = () =>\n this.getContract().estimateGas.depositWithPermit(\n [depositAsset, depositAmount, minimumMint, deadline, v, r, s],\n {\n account,\n },\n );\n\n return { transact, estimate };\n }\n}\n"],"names":["NucleusTellerHandler","chain","walletClient","publicClient","__publicField","VIEM_CHAINS","ERC20PermitHandler","address","CONTRACT_ADDRESSES","abi","NUCLEUS_TELLER_ABIS","client","getContract","walletAddress","params","token","unifiToken","account","amount","minimumMint","isPreapproved","tokenAddress","TOKENS_ADDRESSES","r","s","v","deadline","depositArgs","depositAsset","depositAmount"],"mappings":"8dAoCO,MAAMA,CAAqB,CAahC,YACUC,EACAC,EACAC,EACR,CAhBMC,EAAA,kBACAA,EAAA,2BAYE,KAAA,MAAAH,EACA,KAAA,aAAAC,EACA,KAAA,aAAAC,EAEH,KAAA,UAAYE,cAAYJ,CAAK,EACl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AE,KAAK,KAAK,EACvCE,CAAA,EAGES,EAAqB,CACzBN,EACAH,EACAC,EACAO,EACA,OAAOD,CAAC,EACRF,EACAC,CAAA,EAaK,MAAA,CAAE,SAVQ,IACf,KAAK,YAAc,EAAA,MAAM,kBAAkBG,EAAa,CACtD,QAAAV,EACA,MAAO,KAAK,SAAA,CACb,EAMgB,SALF,IACf,KAAK,YAAc,EAAA,YAAY,kBAAkBU,EAAa,CAC5D,QAAAV,CAAA,CACD,EAGL,CAoBO,kBAAkBH,EAAiC,CAClD,KAAA,CACJ,QAAAG,EACA,aAAAW,EACA,cAAAC,EACA,YAAAV,EACA,SAAAO,EACA,EAAAD,EACA,EAAAF,EACA,EAAAC,CACE,EAAAV,EAkBG,MAAA,CAAE,SAhBQ,IACf,KAAK,cAAc,MAAM,kBACvB,CAACc,EAAcC,EAAeV,EAAaO,EAAUD,EAAGF,EAAGC,CAAC,EAC5D,CACE,QAAAP,EACA,MAAO,KAAK,SACd,CAAA,EAUe,SARF,IACf,KAAK,cAAc,YAAY,kBAC7B,CAACW,EAAcC,EAAeV,EAAaO,EAAUD,EAAGF,EAAGC,CAAC,EAC5D,CACE,QAAAP,CACF,CAAA,EAIN,CACF"}
1
+ {"version":3,"file":"nucleus-teller-handler.cjs","sources":["../../../lib/contracts/handlers/nucleus-teller-handler.ts"],"sourcesContent":["import {\n WalletClient,\n PublicClient,\n getContract,\n Address,\n GetContractReturnType,\n} from 'viem';\nimport { Chain, VIEM_CHAINS, ViemChain } from '../../chains/constants';\nimport { NUCLEUS_CONTRACT_ADDRESSES } from '../addresses';\nimport { NUCLEUS_TELLER_ABIS } from '../abis/nucleus-teller-abis';\nimport { Token, TOKENS_ADDRESSES, UnifiToken } from '../tokens';\nimport { ERC20PermitHandler } from './erc20-permit-handler';\n\nexport type DepositParams = {\n account: Address;\n token: Token;\n unifiToken: UnifiToken;\n amount: bigint;\n minimumMint: bigint;\n isPreapproved?: boolean;\n};\n\nexport type DepositWithPermitParams = {\n account: Address;\n depositAsset: Address;\n depositAmount: bigint;\n minimumMint: bigint;\n deadline: bigint;\n v: number;\n r: Address;\n s: Address;\n};\n\n/**\n * Handler for the `Teller` contract from nucleus.\n */\nexport class NucleusTellerHandler {\n private viemChain: ViemChain;\n private erc20PermitHandler: ERC20PermitHandler;\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.viemChain = VIEM_CHAINS[chain];\n this.erc20PermitHandler = new ERC20PermitHandler(\n chain,\n walletClient,\n 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 = NUCLEUS_CONTRACT_ADDRESSES[this.token][this.chain]\n .NucleusTeller as Address;\n const abi = NUCLEUS_TELLER_ABIS[this.chain].Teller;\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 address of the `Accountant` contract.\n *\n * @returns The address of the `Accountant` contract.\n */\n public accountant() {\n return this.getContract().read.accountant();\n }\n\n /**\n * Get the address of the `BoringVault` contract.\n *\n * @returns The address of the `BoringVault` contract.\n */\n public vault() {\n return this.getContract().read.vault();\n }\n\n /**\n * Get the share lock period.\n *\n * @returns The share lock period.\n */\n public shareLockPeriod() {\n return this.getContract().read.shareLockPeriod();\n }\n\n /**\n * Get the share unlock time for the given wallet address.\n *\n * @param walletAddress Address of the wallet.\n * @returns The share unlock time.\n */\n public shareUnlockTime(walletAddress: Address) {\n return this.getContract().read.shareUnlockTime([walletAddress]);\n }\n\n /**\n * Get the paused state of the contract.\n *\n * @returns The paused state of the contract.\n */\n public isPaused() {\n return this.getContract().read.isPaused();\n }\n\n /**\n * Deposit the given token for staking. This doesn't make the\n * transaction but returns two methods namely `transact` and\n * `estimate`.\n *\n * @param params Deposit parameters.\n * @param params.account Address of the caller of the transaction.\n * @param params.token Token to deposit.\n * @param params.unifiToken UniFi token to get in return of the deposit.\n * @param params.amount Amount of the token to deposit.\n * @param params.minimumMint Minimum amount of shares to mint.\n * @param params.isPreapproved Whether the token is preapproved.\n * @returns `transact: () => Promise<Address>` - Used to make the\n * transaction with the given value.\n *\n * `estimate: () => Promise<bigint>` - Gas estimate of the\n * transaction.\n */\n public async deposit(params: DepositParams) {\n const {\n token,\n unifiToken,\n account,\n amount,\n minimumMint,\n isPreapproved = false,\n } = params;\n const tokenAddress = TOKENS_ADDRESSES[token][this.chain];\n\n if (isPreapproved) {\n return {\n transact: () =>\n this.getContract().write.deposit(\n [tokenAddress, amount, minimumMint],\n {\n account,\n chain: this.viemChain,\n },\n ),\n estimate: () =>\n this.getContract().estimateGas.deposit(\n [tokenAddress, amount, minimumMint],\n { account },\n ),\n };\n }\n\n const { r, s, v, deadline } = await this.erc20PermitHandler\n .withToken(token)\n .getPermitSignature(\n account,\n // The UniFi token contract is the spender.\n TOKENS_ADDRESSES[unifiToken][this.chain],\n amount,\n );\n\n const depositArgs = <const>[\n tokenAddress,\n amount,\n minimumMint,\n deadline,\n Number(v),\n r,\n s,\n ];\n\n const transact = () =>\n this.getContract().write.depositWithPermit(depositArgs, {\n account,\n chain: this.viemChain,\n });\n const estimate = () =>\n this.getContract().estimateGas.depositWithPermit(depositArgs, {\n account,\n });\n\n return { transact, estimate };\n }\n\n /**\n * Deposit an asset/token for staking with a permit.\n *\n * @param params Permit parameters.\n * @param params.account Address of the caller of the transaction.\n * @param params.depositAsset Address of the asset/token to deposit.\n * @param params.depositAmount Amount of the asset/token to deposit.\n * @param params.minimumMint Minimum amount of shares to mint.\n * @param params.deadline Deadline for the permit.\n * @param params.v v value of the permit.\n * @param params.r r value of the permit.\n * @param params.s s value of the permit.\n * @returns `transact: () => Promise<Address>` - Used to make the\n * transaction with the given value.\n *\n * `estimate: () => Promise<bigint>` - Gas estimate of the\n * transaction.\n */\n public depositWithPermit(params: DepositWithPermitParams) {\n const {\n account,\n depositAsset,\n depositAmount,\n minimumMint,\n deadline,\n v,\n r,\n s,\n } = params;\n\n const transact = () =>\n this.getContract().write.depositWithPermit(\n [depositAsset, depositAmount, minimumMint, deadline, v, r, s],\n {\n account,\n chain: this.viemChain,\n },\n );\n const estimate = () =>\n this.getContract().estimateGas.depositWithPermit(\n [depositAsset, depositAmount, minimumMint, deadline, v, r, s],\n {\n account,\n },\n );\n\n return { transact, estimate };\n }\n}\n"],"names":["NucleusTellerHandler","chain","walletClient","publicClient","__publicField","VIEM_CHAINS","ERC20PermitHandler","UnifiToken","token","address","NUCLEUS_CONTRACT_ADDRESSES","abi","NUCLEUS_TELLER_ABIS","client","getContract","walletAddress","params","unifiToken","account","amount","minimumMint","isPreapproved","tokenAddress","TOKENS_ADDRESSES","r","s","v","deadline","depositArgs","depositAsset","depositAmount"],"mappings":"8dAoCO,MAAMA,CAAqB,CAchC,YACUC,EACAC,EACAC,EACR,CAjBMC,EAAA,kBACAA,EAAA,2BACAA,EAAA,cAYE,KAAA,MAAAH,EACA,KAAA,aAAAC,EACA,KAAA,aAAAC,EAEH,KAAA,UAAYE,cAAYJ,CAAK,EAClC,KAAK,mBAAqB,IAAIK,EAAA,mBAC5BL,EACAC,EACAC,CACF,EACA,KAAK,MAAQI,EAAAA,WAAW,QAAA,CAUnB,UAAUC,EAAmB,CAClC,YAAK,MAAQA,EACN,IAAA,CASF,aAAc,CACnB,MAAMC,EAAUC,EAAAA,2BAA2B,KAAK,KAAK,EAAE,KAAK,KAAK,EAC9D,cACGC,EAAMC,EAAA,oBAAoB,KAAK,KAAK,EAA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