@pufferfinance/puffer-sdk 1.11.0 → 1.11.2

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 (32) hide show
  1. package/dist/contracts/addresses.cjs +1 -1
  2. package/dist/contracts/addresses.cjs.map +1 -1
  3. package/dist/contracts/addresses.d.ts +0 -23
  4. package/dist/contracts/addresses.js +2 -26
  5. package/dist/contracts/addresses.js.map +1 -1
  6. package/dist/contracts/handlers/nucleus-accountant-handler.cjs +1 -1
  7. package/dist/contracts/handlers/nucleus-accountant-handler.cjs.map +1 -1
  8. package/dist/contracts/handlers/nucleus-accountant-handler.js +3 -3
  9. package/dist/contracts/handlers/nucleus-accountant-handler.js.map +1 -1
  10. package/dist/contracts/handlers/nucleus-boring-vault-handler.cjs +1 -1
  11. package/dist/contracts/handlers/nucleus-boring-vault-handler.cjs.map +1 -1
  12. package/dist/contracts/handlers/nucleus-boring-vault-handler.js +3 -3
  13. package/dist/contracts/handlers/nucleus-boring-vault-handler.js.map +1 -1
  14. package/dist/contracts/handlers/nucleus-teller-handler.cjs +1 -1
  15. package/dist/contracts/handlers/nucleus-teller-handler.cjs.map +1 -1
  16. package/dist/contracts/handlers/nucleus-teller-handler.js +9 -9
  17. package/dist/contracts/handlers/nucleus-teller-handler.js.map +1 -1
  18. package/dist/contracts/tokens.cjs +1 -1
  19. package/dist/contracts/tokens.cjs.map +1 -1
  20. package/dist/contracts/tokens.d.ts +4 -2
  21. package/dist/contracts/tokens.js +21 -9
  22. package/dist/contracts/tokens.js.map +1 -1
  23. package/dist/contracts/vaults-addresses.cjs +2 -0
  24. package/dist/contracts/vaults-addresses.cjs.map +1 -0
  25. package/dist/contracts/vaults-addresses.d.ts +30 -0
  26. package/dist/contracts/vaults-addresses.js +36 -0
  27. package/dist/contracts/vaults-addresses.js.map +1 -0
  28. package/dist/main.cjs +1 -1
  29. package/dist/main.js +22 -23
  30. package/dist/utils/version.cjs +1 -1
  31. package/dist/utils/version.js +1 -1
  32. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../constants-DA2xUb9r.cjs"),a=require("./tokens.cjs"),c={[e.Chain.Mainnet]:{PufferVault:"0xD9A442856C234a39a81a089C06451EBAa4306a72",PufferDepositor:"0x4aa799c5dfc01ee7d790e3bf1a7c2257ce1dceff",PufferL2Depositor:"0x3436E0B85cd929929F5802e792CFE282166E0259",PufLocker:"0x48e8dE138C246c14248C94d2D616a2F9eb4590D2",L1RewardManager:"0x157788cc028Ac6405bD406f2D1e0A8A22b3cf17b",L2RewardManager:"0x0000000000000000000000000000000000000000",PufferWithdrawalManager:"0xDdA0483184E75a5579ef9635ED14BacCf9d50283",NucleusAtomicQueue:"0xc7287780bfa0C5D2dD74e3e51E238B1cd9B221ee"},[e.Chain.Holesky]:{PufferVault:"0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9",PufferDepositor:"0x824AC05aeb86A0aD770b8acDe0906d2d4a6c4A8c",PufferL2Depositor:"0x0af6998e4828ad8ef8f79a9288d0a861890f791d",PufLocker:"0xa58983ad0899a452b7420bc57228e329d7ba92b6",L1RewardManager:"0x10f970bcb84B82B82a65eBCbF45F26dD26D69F12",L2RewardManager:"0x58C046794f69A8830b0BE737022a45b4acd01dE5",PufferWithdrawalManager:"0x5A3E1069B66800c0ecbc91bd81b1AE4D1804DBc4"},[e.Chain.Base]:{L2RewardManager:"0xF9Dd335bF363b2E4ecFe3c94A86EBD7Dd3Dcf0e7"}},f={[a.UnifiToken.unifiETH]:{[e.Chain.Mainnet]:{NucleusBoringVault:"0x196ead472583bc1e9af7a05f860d9857e1bd3dcc",NucleusAccountant:"0xa9fb7e2922216debe3fd5e1bbe7591ee446dc21c",NucleusTeller:"0x08eb2eccdf6ebd7aba601791f23ec5b5f68a1d53"}},[a.UnifiToken.unifiUSD]:{[e.Chain.Mainnet]:{NucleusBoringVault:"0x82c40e07277eBb92935f79cE92268F80dDc7caB4",NucleusAccountant:"0xe0bDb7b9225A2CeB42998dc2E51D4D3CDeb7e3Be",NucleusTeller:"0x5d3Fb47FE7f3F4Ce8fe55518f7E4F7D6061B54DD"}},[a.UnifiToken.unifiBTC]:{[e.Chain.Mainnet]:{NucleusBoringVault:"0x170d847a8320f3b6a77ee15b0cae430e3ec933a0",NucleusAccountant:"0x2afb28b0561d99b5e00829ec2ef54946a00a35f7",NucleusTeller:"0x0743647a607822781f9d0a639454e76289182f0b"}}};exports.CONTRACT_ADDRESSES=c;exports.NUCLEUS_CONTRACT_ADDRESSES=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../constants-DA2xUb9r.cjs"),a={[e.Chain.Mainnet]:{PufferVault:"0xD9A442856C234a39a81a089C06451EBAa4306a72",PufferDepositor:"0x4aa799c5dfc01ee7d790e3bf1a7c2257ce1dceff",PufferL2Depositor:"0x3436E0B85cd929929F5802e792CFE282166E0259",PufLocker:"0x48e8dE138C246c14248C94d2D616a2F9eb4590D2",L1RewardManager:"0x157788cc028Ac6405bD406f2D1e0A8A22b3cf17b",L2RewardManager:"0x0000000000000000000000000000000000000000",PufferWithdrawalManager:"0xDdA0483184E75a5579ef9635ED14BacCf9d50283",NucleusAtomicQueue:"0xc7287780bfa0C5D2dD74e3e51E238B1cd9B221ee"},[e.Chain.Holesky]:{PufferVault:"0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9",PufferDepositor:"0x824AC05aeb86A0aD770b8acDe0906d2d4a6c4A8c",PufferL2Depositor:"0x0af6998e4828ad8ef8f79a9288d0a861890f791d",PufLocker:"0xa58983ad0899a452b7420bc57228e329d7ba92b6",L1RewardManager:"0x10f970bcb84B82B82a65eBCbF45F26dD26D69F12",L2RewardManager:"0x58C046794f69A8830b0BE737022a45b4acd01dE5",PufferWithdrawalManager:"0x5A3E1069B66800c0ecbc91bd81b1AE4D1804DBc4"},[e.Chain.Base]:{L2RewardManager:"0xF9Dd335bF363b2E4ecFe3c94A86EBD7Dd3Dcf0e7"}};exports.CONTRACT_ADDRESSES=a;
2
2
  //# sourceMappingURL=addresses.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"addresses.cjs","sources":["../../lib/contracts/addresses.ts"],"sourcesContent":["import { Chain } from '../chains/constants';\nimport { UnifiToken } from './tokens';\n\n// Source of truth:\n// https://github.com/PufferFinance/Deployments-and-ACL/tree/main/docs/deployments\nexport const CONTRACT_ADDRESSES = {\n [Chain.Mainnet]: {\n PufferVault: '0xD9A442856C234a39a81a089C06451EBAa4306a72',\n PufferDepositor: '0x4aa799c5dfc01ee7d790e3bf1a7c2257ce1dceff',\n PufferL2Depositor: '0x3436E0B85cd929929F5802e792CFE282166E0259',\n PufLocker: '0x48e8dE138C246c14248C94d2D616a2F9eb4590D2',\n L1RewardManager: '0x157788cc028Ac6405bD406f2D1e0A8A22b3cf17b',\n // L2RewardManager is not deployed to mainnet but base.\n L2RewardManager: '0x0000000000000000000000000000000000000000',\n PufferWithdrawalManager: '0xDdA0483184E75a5579ef9635ED14BacCf9d50283',\n NucleusAtomicQueue: '0xc7287780bfa0C5D2dD74e3e51E238B1cd9B221ee',\n },\n [Chain.Holesky]: {\n PufferVault: '0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9',\n PufferDepositor: '0x824AC05aeb86A0aD770b8acDe0906d2d4a6c4A8c',\n PufferL2Depositor: '0x0af6998e4828ad8ef8f79a9288d0a861890f791d',\n PufLocker: '0xa58983ad0899a452b7420bc57228e329d7ba92b6',\n L1RewardManager: '0x10f970bcb84B82B82a65eBCbF45F26dD26D69F12',\n L2RewardManager: '0x58C046794f69A8830b0BE737022a45b4acd01dE5',\n PufferWithdrawalManager: '0x5A3E1069B66800c0ecbc91bd81b1AE4D1804DBc4',\n },\n [Chain.Base]: {\n L2RewardManager: '0xF9Dd335bF363b2E4ecFe3c94A86EBD7Dd3Dcf0e7',\n },\n};\n\nexport const NUCLEUS_CONTRACT_ADDRESSES = {\n [UnifiToken.unifiETH]: {\n [Chain.Mainnet]: {\n NucleusBoringVault: '0x196ead472583bc1e9af7a05f860d9857e1bd3dcc',\n NucleusAccountant: '0xa9fb7e2922216debe3fd5e1bbe7591ee446dc21c',\n NucleusTeller: '0x08eb2eccdf6ebd7aba601791f23ec5b5f68a1d53',\n },\n },\n [UnifiToken.unifiUSD]: {\n [Chain.Mainnet]: {\n NucleusBoringVault: '0x82c40e07277eBb92935f79cE92268F80dDc7caB4',\n NucleusAccountant: '0xe0bDb7b9225A2CeB42998dc2E51D4D3CDeb7e3Be',\n NucleusTeller: '0x5d3Fb47FE7f3F4Ce8fe55518f7E4F7D6061B54DD',\n },\n },\n [UnifiToken.unifiBTC]: {\n [Chain.Mainnet]: {\n NucleusBoringVault: '0x170d847a8320f3b6a77ee15b0cae430e3ec933a0',\n NucleusAccountant: '0x2afb28b0561d99b5e00829ec2ef54946a00a35f7',\n NucleusTeller: '0x0743647a607822781f9d0a639454e76289182f0b',\n },\n },\n};\n"],"names":["CONTRACT_ADDRESSES","Chain","NUCLEUS_CONTRACT_ADDRESSES","UnifiToken"],"mappings":"uJAKaA,EAAqB,CAChC,CAACC,EAAAA,MAAM,OAAO,EAAG,CACf,YAAa,6CACb,gBAAiB,6CACjB,kBAAmB,6CACnB,UAAW,6CACX,gBAAiB,6CAEjB,gBAAiB,6CACjB,wBAAyB,6CACzB,mBAAoB,4CACtB,EACA,CAACA,EAAAA,MAAM,OAAO,EAAG,CACf,YAAa,6CACb,gBAAiB,6CACjB,kBAAmB,6CACnB,UAAW,6CACX,gBAAiB,6CACjB,gBAAiB,6CACjB,wBAAyB,4CAC3B,EACA,CAACA,EAAAA,MAAM,IAAI,EAAG,CACZ,gBAAiB,4CAAA,CAErB,EAEaC,EAA6B,CACxC,CAACC,EAAAA,WAAW,QAAQ,EAAG,CACrB,CAACF,EAAAA,MAAM,OAAO,EAAG,CACf,mBAAoB,6CACpB,kBAAmB,6CACnB,cAAe,4CAAA,CAEnB,EACA,CAACE,EAAAA,WAAW,QAAQ,EAAG,CACrB,CAACF,EAAAA,MAAM,OAAO,EAAG,CACf,mBAAoB,6CACpB,kBAAmB,6CACnB,cAAe,4CAAA,CAEnB,EACA,CAACE,EAAAA,WAAW,QAAQ,EAAG,CACrB,CAACF,EAAAA,MAAM,OAAO,EAAG,CACf,mBAAoB,6CACpB,kBAAmB,6CACnB,cAAe,4CAAA,CACjB,CAEJ"}
1
+ {"version":3,"file":"addresses.cjs","sources":["../../lib/contracts/addresses.ts"],"sourcesContent":["import { Chain } from '../chains/constants';\n\n// Source of truth:\n// https://github.com/PufferFinance/Deployments-and-ACL/tree/main/docs/deployments\nexport const CONTRACT_ADDRESSES = {\n [Chain.Mainnet]: {\n PufferVault: '0xD9A442856C234a39a81a089C06451EBAa4306a72',\n PufferDepositor: '0x4aa799c5dfc01ee7d790e3bf1a7c2257ce1dceff',\n PufferL2Depositor: '0x3436E0B85cd929929F5802e792CFE282166E0259',\n PufLocker: '0x48e8dE138C246c14248C94d2D616a2F9eb4590D2',\n L1RewardManager: '0x157788cc028Ac6405bD406f2D1e0A8A22b3cf17b',\n // L2RewardManager is not deployed to mainnet but base.\n L2RewardManager: '0x0000000000000000000000000000000000000000',\n PufferWithdrawalManager: '0xDdA0483184E75a5579ef9635ED14BacCf9d50283',\n NucleusAtomicQueue: '0xc7287780bfa0C5D2dD74e3e51E238B1cd9B221ee',\n },\n [Chain.Holesky]: {\n PufferVault: '0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9',\n PufferDepositor: '0x824AC05aeb86A0aD770b8acDe0906d2d4a6c4A8c',\n PufferL2Depositor: '0x0af6998e4828ad8ef8f79a9288d0a861890f791d',\n PufLocker: '0xa58983ad0899a452b7420bc57228e329d7ba92b6',\n L1RewardManager: '0x10f970bcb84B82B82a65eBCbF45F26dD26D69F12',\n L2RewardManager: '0x58C046794f69A8830b0BE737022a45b4acd01dE5',\n PufferWithdrawalManager: '0x5A3E1069B66800c0ecbc91bd81b1AE4D1804DBc4',\n },\n [Chain.Base]: {\n L2RewardManager: '0xF9Dd335bF363b2E4ecFe3c94A86EBD7Dd3Dcf0e7',\n },\n};\n"],"names":["CONTRACT_ADDRESSES","Chain"],"mappings":"6HAIaA,EAAqB,CAChC,CAACC,EAAAA,MAAM,OAAO,EAAG,CACf,YAAa,6CACb,gBAAiB,6CACjB,kBAAmB,6CACnB,UAAW,6CACX,gBAAiB,6CAEjB,gBAAiB,6CACjB,wBAAyB,6CACzB,mBAAoB,4CACtB,EACA,CAACA,EAAAA,MAAM,OAAO,EAAG,CACf,YAAa,6CACb,gBAAiB,6CACjB,kBAAmB,6CACnB,UAAW,6CACX,gBAAiB,6CACjB,gBAAiB,6CACjB,wBAAyB,4CAC3B,EACA,CAACA,EAAAA,MAAM,IAAI,EAAG,CACZ,gBAAiB,4CAAA,CAErB"}
@@ -28,26 +28,3 @@ export declare const CONTRACT_ADDRESSES: {
28
28
  NucleusAtomicQueue?: undefined;
29
29
  };
30
30
  };
31
- export declare const NUCLEUS_CONTRACT_ADDRESSES: {
32
- unifiETH: {
33
- [x: number]: {
34
- NucleusBoringVault: string;
35
- NucleusAccountant: string;
36
- NucleusTeller: string;
37
- };
38
- };
39
- unifiUSD: {
40
- [x: number]: {
41
- NucleusBoringVault: string;
42
- NucleusAccountant: string;
43
- NucleusTeller: string;
44
- };
45
- };
46
- unifiBTC: {
47
- [x: number]: {
48
- NucleusBoringVault: string;
49
- NucleusAccountant: string;
50
- NucleusTeller: string;
51
- };
52
- };
53
- };
@@ -1,6 +1,5 @@
1
1
  import { C as e } from "../constants-BjRNQpT2.js";
2
- import { UnifiToken as a } from "./tokens.js";
3
- const d = {
2
+ const f = {
4
3
  [e.Mainnet]: {
5
4
  PufferVault: "0xD9A442856C234a39a81a089C06451EBAa4306a72",
6
5
  PufferDepositor: "0x4aa799c5dfc01ee7d790e3bf1a7c2257ce1dceff",
@@ -24,31 +23,8 @@ const d = {
24
23
  [e.Base]: {
25
24
  L2RewardManager: "0xF9Dd335bF363b2E4ecFe3c94A86EBD7Dd3Dcf0e7"
26
25
  }
27
- }, b = {
28
- [a.unifiETH]: {
29
- [e.Mainnet]: {
30
- NucleusBoringVault: "0x196ead472583bc1e9af7a05f860d9857e1bd3dcc",
31
- NucleusAccountant: "0xa9fb7e2922216debe3fd5e1bbe7591ee446dc21c",
32
- NucleusTeller: "0x08eb2eccdf6ebd7aba601791f23ec5b5f68a1d53"
33
- }
34
- },
35
- [a.unifiUSD]: {
36
- [e.Mainnet]: {
37
- NucleusBoringVault: "0x82c40e07277eBb92935f79cE92268F80dDc7caB4",
38
- NucleusAccountant: "0xe0bDb7b9225A2CeB42998dc2E51D4D3CDeb7e3Be",
39
- NucleusTeller: "0x5d3Fb47FE7f3F4Ce8fe55518f7E4F7D6061B54DD"
40
- }
41
- },
42
- [a.unifiBTC]: {
43
- [e.Mainnet]: {
44
- NucleusBoringVault: "0x170d847a8320f3b6a77ee15b0cae430e3ec933a0",
45
- NucleusAccountant: "0x2afb28b0561d99b5e00829ec2ef54946a00a35f7",
46
- NucleusTeller: "0x0743647a607822781f9d0a639454e76289182f0b"
47
- }
48
- }
49
26
  };
50
27
  export {
51
- d as CONTRACT_ADDRESSES,
52
- b as NUCLEUS_CONTRACT_ADDRESSES
28
+ f as CONTRACT_ADDRESSES
53
29
  };
54
30
  //# sourceMappingURL=addresses.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"addresses.js","sources":["../../lib/contracts/addresses.ts"],"sourcesContent":["import { Chain } from '../chains/constants';\nimport { UnifiToken } from './tokens';\n\n// Source of truth:\n// https://github.com/PufferFinance/Deployments-and-ACL/tree/main/docs/deployments\nexport const CONTRACT_ADDRESSES = {\n [Chain.Mainnet]: {\n PufferVault: '0xD9A442856C234a39a81a089C06451EBAa4306a72',\n PufferDepositor: '0x4aa799c5dfc01ee7d790e3bf1a7c2257ce1dceff',\n PufferL2Depositor: '0x3436E0B85cd929929F5802e792CFE282166E0259',\n PufLocker: '0x48e8dE138C246c14248C94d2D616a2F9eb4590D2',\n L1RewardManager: '0x157788cc028Ac6405bD406f2D1e0A8A22b3cf17b',\n // L2RewardManager is not deployed to mainnet but base.\n L2RewardManager: '0x0000000000000000000000000000000000000000',\n PufferWithdrawalManager: '0xDdA0483184E75a5579ef9635ED14BacCf9d50283',\n NucleusAtomicQueue: '0xc7287780bfa0C5D2dD74e3e51E238B1cd9B221ee',\n },\n [Chain.Holesky]: {\n PufferVault: '0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9',\n PufferDepositor: '0x824AC05aeb86A0aD770b8acDe0906d2d4a6c4A8c',\n PufferL2Depositor: '0x0af6998e4828ad8ef8f79a9288d0a861890f791d',\n PufLocker: '0xa58983ad0899a452b7420bc57228e329d7ba92b6',\n L1RewardManager: '0x10f970bcb84B82B82a65eBCbF45F26dD26D69F12',\n L2RewardManager: '0x58C046794f69A8830b0BE737022a45b4acd01dE5',\n PufferWithdrawalManager: '0x5A3E1069B66800c0ecbc91bd81b1AE4D1804DBc4',\n },\n [Chain.Base]: {\n L2RewardManager: '0xF9Dd335bF363b2E4ecFe3c94A86EBD7Dd3Dcf0e7',\n },\n};\n\nexport const NUCLEUS_CONTRACT_ADDRESSES = {\n [UnifiToken.unifiETH]: {\n [Chain.Mainnet]: {\n NucleusBoringVault: '0x196ead472583bc1e9af7a05f860d9857e1bd3dcc',\n NucleusAccountant: '0xa9fb7e2922216debe3fd5e1bbe7591ee446dc21c',\n NucleusTeller: '0x08eb2eccdf6ebd7aba601791f23ec5b5f68a1d53',\n },\n },\n [UnifiToken.unifiUSD]: {\n [Chain.Mainnet]: {\n NucleusBoringVault: '0x82c40e07277eBb92935f79cE92268F80dDc7caB4',\n NucleusAccountant: '0xe0bDb7b9225A2CeB42998dc2E51D4D3CDeb7e3Be',\n NucleusTeller: '0x5d3Fb47FE7f3F4Ce8fe55518f7E4F7D6061B54DD',\n },\n },\n [UnifiToken.unifiBTC]: {\n [Chain.Mainnet]: {\n NucleusBoringVault: '0x170d847a8320f3b6a77ee15b0cae430e3ec933a0',\n NucleusAccountant: '0x2afb28b0561d99b5e00829ec2ef54946a00a35f7',\n NucleusTeller: '0x0743647a607822781f9d0a639454e76289182f0b',\n },\n },\n};\n"],"names":["CONTRACT_ADDRESSES","Chain","NUCLEUS_CONTRACT_ADDRESSES","UnifiToken"],"mappings":";;AAKO,MAAMA,IAAqB;AAAA,EAChC,CAACC,EAAM,OAAO,GAAG;AAAA,IACf,aAAa;AAAA,IACb,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,WAAW;AAAA,IACX,iBAAiB;AAAA;AAAA,IAEjB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,oBAAoB;AAAA,EACtB;AAAA,EACA,CAACA,EAAM,OAAO,GAAG;AAAA,IACf,aAAa;AAAA,IACb,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,WAAW;AAAA,IACX,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,EAC3B;AAAA,EACA,CAACA,EAAM,IAAI,GAAG;AAAA,IACZ,iBAAiB;AAAA,EAAA;AAErB,GAEaC,IAA6B;AAAA,EACxC,CAACC,EAAW,QAAQ,GAAG;AAAA,IACrB,CAACF,EAAM,OAAO,GAAG;AAAA,MACf,oBAAoB;AAAA,MACpB,mBAAmB;AAAA,MACnB,eAAe;AAAA,IAAA;AAAA,EAEnB;AAAA,EACA,CAACE,EAAW,QAAQ,GAAG;AAAA,IACrB,CAACF,EAAM,OAAO,GAAG;AAAA,MACf,oBAAoB;AAAA,MACpB,mBAAmB;AAAA,MACnB,eAAe;AAAA,IAAA;AAAA,EAEnB;AAAA,EACA,CAACE,EAAW,QAAQ,GAAG;AAAA,IACrB,CAACF,EAAM,OAAO,GAAG;AAAA,MACf,oBAAoB;AAAA,MACpB,mBAAmB;AAAA,MACnB,eAAe;AAAA,IAAA;AAAA,EACjB;AAEJ;"}
1
+ {"version":3,"file":"addresses.js","sources":["../../lib/contracts/addresses.ts"],"sourcesContent":["import { Chain } from '../chains/constants';\n\n// Source of truth:\n// https://github.com/PufferFinance/Deployments-and-ACL/tree/main/docs/deployments\nexport const CONTRACT_ADDRESSES = {\n [Chain.Mainnet]: {\n PufferVault: '0xD9A442856C234a39a81a089C06451EBAa4306a72',\n PufferDepositor: '0x4aa799c5dfc01ee7d790e3bf1a7c2257ce1dceff',\n PufferL2Depositor: '0x3436E0B85cd929929F5802e792CFE282166E0259',\n PufLocker: '0x48e8dE138C246c14248C94d2D616a2F9eb4590D2',\n L1RewardManager: '0x157788cc028Ac6405bD406f2D1e0A8A22b3cf17b',\n // L2RewardManager is not deployed to mainnet but base.\n L2RewardManager: '0x0000000000000000000000000000000000000000',\n PufferWithdrawalManager: '0xDdA0483184E75a5579ef9635ED14BacCf9d50283',\n NucleusAtomicQueue: '0xc7287780bfa0C5D2dD74e3e51E238B1cd9B221ee',\n },\n [Chain.Holesky]: {\n PufferVault: '0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9',\n PufferDepositor: '0x824AC05aeb86A0aD770b8acDe0906d2d4a6c4A8c',\n PufferL2Depositor: '0x0af6998e4828ad8ef8f79a9288d0a861890f791d',\n PufLocker: '0xa58983ad0899a452b7420bc57228e329d7ba92b6',\n L1RewardManager: '0x10f970bcb84B82B82a65eBCbF45F26dD26D69F12',\n L2RewardManager: '0x58C046794f69A8830b0BE737022a45b4acd01dE5',\n PufferWithdrawalManager: '0x5A3E1069B66800c0ecbc91bd81b1AE4D1804DBc4',\n },\n [Chain.Base]: {\n L2RewardManager: '0xF9Dd335bF363b2E4ecFe3c94A86EBD7Dd3Dcf0e7',\n },\n};\n"],"names":["CONTRACT_ADDRESSES","Chain"],"mappings":";AAIO,MAAMA,IAAqB;AAAA,EAChC,CAACC,EAAM,OAAO,GAAG;AAAA,IACf,aAAa;AAAA,IACb,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,WAAW;AAAA,IACX,iBAAiB;AAAA;AAAA,IAEjB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,oBAAoB;AAAA,EACtB;AAAA,EACA,CAACA,EAAM,OAAO,GAAG;AAAA,IACf,aAAa;AAAA,IACb,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,WAAW;AAAA,IACX,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,EAC3B;AAAA,EACA,CAACA,EAAM,IAAI,GAAG;AAAA,IACZ,iBAAiB;AAAA,EAAA;AAErB;"}
@@ -1,2 +1,2 @@
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 s=require("../addresses.cjs"),o=require("../abis/nucleus-accountant-abis.cjs"),u=require("../tokens.cjs"),l=require("../../getContract-3QbyfZBF.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=s.NUCLEUS_CONTRACT_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 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-3QbyfZBF.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;
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 { NUCLEUS_CONTRACT_ADDRESSES } from '../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 = NUCLEUS_CONTRACT_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","NUCLEUS_CONTRACT_ADDRESSES","abi","NUCLEUS_ACCOUNTANT_ABIS","client","getContract","tokenAddress","isPeggedToBase","rateProvider","quoteAddress"],"mappings":"gZAiBO,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,2BAA2B,KAAK,KAAK,EAAE,KAAK,KAAK,EAC9D,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 { 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,11 +1,11 @@
1
1
  var i = Object.defineProperty;
2
2
  var o = (a, t, e) => t in a ? i(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
3
3
  var n = (a, t, e) => o(a, typeof t != "symbol" ? t + "" : t, e);
4
- import { NUCLEUS_CONTRACT_ADDRESSES as s } from "../addresses.js";
4
+ import { VAULTS_ADDRESSES as s } from "../vaults-addresses.js";
5
5
  import { NUCLEUS_ACCOUNTANT_ABIS as c } from "../abis/nucleus-accountant-abis.js";
6
6
  import { UnifiToken as u } from "../tokens.js";
7
7
  import { g as h } from "../../getContract-CezEyDf-.js";
8
- class R {
8
+ class S {
9
9
  /**
10
10
  * Create the handler for processing tokens.
11
11
  *
@@ -91,6 +91,6 @@ class R {
91
91
  }
92
92
  }
93
93
  export {
94
- R as NucleusAccountantHandler
94
+ S as NucleusAccountantHandler
95
95
  };
96
96
  //# sourceMappingURL=nucleus-accountant-handler.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nucleus-accountant-handler.js","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 { NUCLEUS_CONTRACT_ADDRESSES } from '../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 = NUCLEUS_CONTRACT_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","NUCLEUS_CONTRACT_ADDRESSES","abi","NUCLEUS_ACCOUNTANT_ABIS","client","getContract","tokenAddress","isPeggedToBase","rateProvider","quoteAddress"],"mappings":";;;;;;;AAiBO,MAAMA,EAAyB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYpC,YACUC,GACAC,GACAC,GACR;AAfM,IAAAC,EAAA;AAYE,SAAA,QAAAH,GACA,KAAA,eAAAC,GACA,KAAA,eAAAC,GAER,KAAK,QAAQE,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,mBACGC,IAAMC,EAAwB,KAAK,KAAK,EAAE,YAC1CC,IAAS,EAAE,QAAQ,KAAK,cAAc,QAAQ,KAAK,aAAa;AAEtE,WAAOC,EAAY,EAAE,SAAAL,GAAS,KAAAE,GAAK,QAAAE,GAAQ;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAa7C,MAAa,iBAAiBE,GAAuB;AACnD,UAAM,CAACC,GAAgBC,CAAY,IACjC,MAAM,KAAK,YAAY,EAAE,KAAK,iBAAiB,CAACF,CAAY,CAAC;AAExD,WAAA,EAAE,gBAAAC,GAAgB,cAAAC,EAAa;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQjC,QAAQ;AACb,WAAO,KAAK,cAAc,KAAK,MAAM;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQhC,UAAU;AACf,WAAO,KAAK,cAAc,KAAK,QAAQ;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQlC,cAAc;AACnB,WAAO,KAAK,cAAc,KAAK,YAAY;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQtC,eAAeC,GAAuB;AAC3C,WAAO,KAAK,YAAY,EAAE,KAAK,eAAe,CAACA,CAAY,CAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQvD,mBAAmBA,GAAuB;AAC/C,WAAO,KAAK,YAAY,EAAE,KAAK,mBAAmB,CAACA,CAAY,CAAC;AAAA,EAAA;AAEpE;"}
1
+ {"version":3,"file":"nucleus-accountant-handler.js","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":";;;;;;;AAiBO,MAAMA,EAAyB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYpC,YACUC,GACAC,GACAC,GACR;AAfM,IAAAC,EAAA;AAYE,SAAA,QAAAH,GACA,KAAA,eAAAC,GACA,KAAA,eAAAC,GAER,KAAK,QAAQE,EAAW;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUnB,UAA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!0,value:e}):a[t]=e;var c=(a,t,e)=>C(a,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../../constants-DA2xUb9r.cjs"),m=require("../abis/nucleus-boring-vault-abis.cjs"),p=require("../addresses.cjs"),S=require("../tokens.cjs"),_=require("../../getContract-3QbyfZBF.cjs");class b{constructor(t,e,n){c(this,"viemChain");c(this,"token");this.chain=t,this.walletClient=e,this.publicClient=n,this.viemChain=g.VIEM_CHAINS[t],this.token=S.UnifiToken.unifiETH}withToken(t){return this.token=t,this}getContract(){const t=p.NUCLEUS_CONTRACT_ADDRESSES[this.token][this.chain].NucleusBoringVault,e=m.NUCLEUS_BORING_VAULT_ABIS[this.chain].BoringVault,n={public:this.publicClient,wallet:this.walletClient};return _.getContract({address:t,abi:e,client:n})}getAllowance(t,e){return this.getContract().read.allowance([t,e])}balanceOf(t){return this.getContract().read.balanceOf([t])}totalSupply(){return this.getContract().read.totalSupply()}approve(t,e,n){return this.getContract().write.approve([e,n],{account:t,chain:this.viemChain})}transfer(t,e,n){return{transact:()=>this.getContract().write.transfer([e,n],{account:t,chain:this.viemChain}),estimate:()=>this.getContract().estimateGas.transfer([e,n],{account:t})}}transferFrom(t,e,n,i){return{transact:()=>this.getContract().write.transferFrom([e,n,i],{account:t,chain:this.viemChain}),estimate:()=>this.getContract().estimateGas.transferFrom([e,n,i],{account:t})}}permit(t){const{account:e,owner:n,spender:i,value:r,deadline:s,v:o,r:u,s:h}=t;return{transact:()=>this.getContract().write.permit([n,i,r,s,o,u,h],{account:e,chain:this.viemChain}),estimate:()=>this.getContract().estimateGas.permit([n,i,r,s,o,u,h],{account:e})}}}exports.NucleusBoringVaultHandler=b;
1
+ "use strict";var l=Object.defineProperty;var C=(a,t,e)=>t in a?l(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var c=(a,t,e)=>C(a,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../../constants-DA2xUb9r.cjs"),m=require("../abis/nucleus-boring-vault-abis.cjs"),p=require("../vaults-addresses.cjs"),S=require("../tokens.cjs"),b=require("../../getContract-3QbyfZBF.cjs");class f{constructor(t,e,n){c(this,"viemChain");c(this,"token");this.chain=t,this.walletClient=e,this.publicClient=n,this.viemChain=g.VIEM_CHAINS[t],this.token=S.UnifiToken.unifiETH}withToken(t){return this.token=t,this}getContract(){const t=p.VAULTS_ADDRESSES[this.token][this.chain].NucleusBoringVault,e=m.NUCLEUS_BORING_VAULT_ABIS[this.chain].BoringVault,n={public:this.publicClient,wallet:this.walletClient};return b.getContract({address:t,abi:e,client:n})}getAllowance(t,e){return this.getContract().read.allowance([t,e])}balanceOf(t){return this.getContract().read.balanceOf([t])}totalSupply(){return this.getContract().read.totalSupply()}approve(t,e,n){return this.getContract().write.approve([e,n],{account:t,chain:this.viemChain})}transfer(t,e,n){return{transact:()=>this.getContract().write.transfer([e,n],{account:t,chain:this.viemChain}),estimate:()=>this.getContract().estimateGas.transfer([e,n],{account:t})}}transferFrom(t,e,n,i){return{transact:()=>this.getContract().write.transferFrom([e,n,i],{account:t,chain:this.viemChain}),estimate:()=>this.getContract().estimateGas.transferFrom([e,n,i],{account:t})}}permit(t){const{account:e,owner:n,spender:i,value:r,deadline:s,v:o,r:u,s:h}=t;return{transact:()=>this.getContract().write.permit([n,i,r,s,o,u,h],{account:e,chain:this.viemChain}),estimate:()=>this.getContract().estimateGas.permit([n,i,r,s,o,u,h],{account:e})}}}exports.NucleusBoringVaultHandler=f;
2
2
  //# sourceMappingURL=nucleus-boring-vault-handler.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"nucleus-boring-vault-handler.cjs","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":"4bA6BO,MAAMA,CAA0B,CAarC,YACUC,EACAC,EACAC,EACR,CAhBMC,EAAA,kBACAA,EAAA,cAYE,KAAA,MAAAH,EACA,KAAA,aAAAC,EACA,KAAA,aAAAC,EAEH,KAAA,UAAYE,cAAYJ,CAAK,EAClC,KAAK,MAAQK,EAAAA,WAAW,QAAA,CAUnB,UAAUC,EAAmB,CAClC,YAAK,MAAQA,EACN,IAAA,CASF,aAAc,CACnB,MAAMC,EAAUC,EAAAA,2BAA2B,KAAK,KAAK,EAAE,KAAK,KAAK,EAC9D,mBACGC,EAAMC,EAAA,0BAA0B,KAAK,KAAK,EAAE,YAC5CC,EAAS,CAAE,OAAQ,KAAK,aAAc,OAAQ,KAAK,YAAa,EAEtE,OAAOC,EAAY,YAAA,CAAE,QAAAL,EAAS,IAAAE,EAAK,OAAAE,EAAQ,CAAA,CActC,aAAaE,EAAgBC,EAAkB,CAC7C,OAAA,KAAK,c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B,CAACR,EAAOC,EAASG,EAAOK,EAAUC,EAAGC,EAAGC,CAAC,EACzC,CAAE,QAAAJ,CAAQ,CACZ,CAE0B,CAAA,CAEhC"}
1
+ {"version":3,"file":"nucleus-boring-vault-handler.cjs","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 { VAULTS_ADDRESSES } from '../vaults-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 = VAULTS_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","VAULTS_ADDRESSES","abi","NUCLEUS_BORING_VAULT_ABIS","client","getContract","owner","spender","walletAddress","spenderAddress","value","toAddress","fromAddress","params","account","deadline","v","r","s"],"mappings":"mcA6BO,MAAMA,CAA0B,CAarC,YACUC,EACAC,EACAC,EACR,CAhBMC,EAAA,kBACAA,EAAA,cAYE,KAAA,MAAAH,EACA,KAAA,aAAAC,EACA,KAAA,aAAAC,EAEH,KAAA,UAAYE,cAAYJ,CAAK,EAClC,KAAK,MAAQK,EAAAA,WAAW,QAAA,CAUnB,UAAUC,EAAmB,CAClC,YAAK,MAAQA,EACN,IAAA,CASF,aAAc,CACnB,M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MAAAR,EAAO,QAAAC,EAAS,MAAAG,EAAO,SAAAK,EAAU,EAAAC,EAAG,EAAAC,EAAG,EAAAC,CAAA,EAAML,EAYvD,MAAA,CAAE,SAXQ,IACf,KAAK,cAAc,MAAM,OACvB,CAACP,EAAOC,EAASG,EAAOK,EAAUC,EAAGC,EAAGC,CAAC,EACzC,CAAE,QAAAJ,EAAS,MAAO,KAAK,SAAU,CACnC,EAOiB,SANF,IACf,KAAK,cAAc,YAAY,OAC7B,CAACR,EAAOC,EAASG,EAAOK,EAAUC,EAAGC,EAAGC,CAAC,EACzC,CAAE,QAAAJ,CAAQ,CACZ,CAE0B,CAAA,CAEhC"}
@@ -3,10 +3,10 @@ var l = (e, t, n) => t in e ? u(e, t, { enumerable: !0, configurable: !0, writab
3
3
  var c = (e, t, n) => l(e, typeof t != "symbol" ? t + "" : t, n);
4
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 { NUCLEUS_CONTRACT_ADDRESSES as g } from "../addresses.js";
6
+ import { VAULTS_ADDRESSES as g } from "../vaults-addresses.js";
7
7
  import { UnifiToken as f } from "../tokens.js";
8
8
  import { g as w } from "../../getContract-CezEyDf-.js";
9
- class V {
9
+ class T {
10
10
  /**
11
11
  * Create the handler for processing UniFi tokens.
12
12
  *
@@ -154,6 +154,6 @@ class V {
154
154
  }
155
155
  }
156
156
  export {
157
- V as NucleusBoringVaultHandler
157
+ T as NucleusBoringVaultHandler
158
158
  };
159
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 { 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,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XQ,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,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
+ {"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 { VAULTS_ADDRESSES } from '../vaults-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 = VAULTS_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","VAULTS_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,EAAiB,KAAK,KAAK,EAAE,KAAK,KAAK,EACpD,oBACGC,IAAMC,EAA0B,KAAK,KAAK,EAAE,aAC5CC,IAAS,EAAE,QAAQ,KAAK,cAAc,QAAQ,KAAK,aAAa;AAEtE,WAAOC,EAAY,EAAE,SAAAL,GAAS,KAAAE,GAAK,QAAAE,GAAQ;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EActC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Y;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 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;
1
+ "use strict";var S=Object.defineProperty;var P=(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)=>P(r,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("../../constants-DA2xUb9r.cjs"),p=require("../vaults-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=T.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.VAULTS_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 { 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,E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C7B,CAACI,EAAcH,EAAQC,CAAW,EAClC,CAAE,QAAAF,CAAQ,CAAA,CAEhB,EAGI,KAAA,CAAE,EAAAM,EAAG,EAAAC,EAAG,EAAAC,EAAG,SAAAC,CAAA,EAAa,MAAM,KAAK,mBACtC,UAAUnB,CAAK,EACf,mBACCU,EAEAK,EAAAA,iBAAiBN,CAAU,EAAE,KAAK,KAAK,EACvCE,CACF,EAEIS,EAAqB,CACzBN,EACAH,EACAC,EACAO,EACA,OAAOD,CAAC,EACRF,EACAC,CACF,EAYO,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,CAEyB,CAAA,CAqBvB,kBAAkBF,EAAiC,CAClD,KAAA,CACJ,QAAAE,EACA,aAAAW,EACA,cAAAC,EACA,YAAAV,EACA,SAAAO,EACA,EAAAD,EACA,EAAAF,EACA,EAAAC,CAAA,EACET,EAkBG,MAAA,CAAE,SAhBQ,IACf,KAAK,cAAc,MAAM,kBACvB,CAACa,EAAcC,EAAeV,EAAaO,EAAUD,EAAGF,EAAGC,CAAC,EAC5D,CACE,QAAAP,EACA,MAAO,KAAK,SAAA,CAEhB,EASiB,SARF,IACf,KAAK,cAAc,YAAY,kBAC7B,CAACW,EAAcC,EAAeV,EAAaO,EAAUD,EAAGF,EAAGC,CAAC,EAC5D,CACE,QAAAP,CAAA,CAEJ,CAE0B,CAAA,CAEhC"}
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 { VAULTS_ADDRESSES } from '../vaults-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 = VAULTS_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","VAULTS_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":"qeAoCO,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,CAC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,EAEAK,EAAAA,iBAAiBN,CAAU,EAAE,KAAK,KAAK,EACvCE,CACF,EAEIS,EAAqB,CACzBN,EACAH,EACAC,EACAO,EACA,OAAOD,CAAC,EACRF,EACAC,CACF,EAYO,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,CAEyB,CAAA,CAqBvB,kBAAkBF,EAAiC,CAClD,KAAA,CACJ,QAAAE,EACA,aAAAW,EACA,cAAAC,EACA,YAAAV,EACA,SAAAO,EACA,EAAAD,EACA,EAAAF,EACA,EAAAC,CAAA,EACET,EAkBG,MAAA,CAAE,SAhBQ,IACf,KAAK,cAAc,MAAM,kBACvB,CAACa,EAAcC,EAAeV,EAAaO,EAAUD,EAAGF,EAAGC,CAAC,EAC5D,CACE,QAAAP,EACA,MAAO,KAAK,SAAA,CAEhB,EASiB,SARF,IACf,KAAK,cAAc,YAAY,kBAC7B,CAACW,EAAcC,EAAeV,EAAaO,EAAUD,EAAGF,EAAGC,CAAC,EAC5D,CACE,QAAAP,CAAA,CAEJ,CAE0B,CAAA,CAEhC"}
@@ -2,12 +2,12 @@ var g = Object.defineProperty;
2
2
  var P = (n, t, e) => t in n ? g(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
3
  var m = (n, t, e) => P(n, typeof t != "symbol" ? t + "" : t, e);
4
4
  import { V as k } from "../../constants-BjRNQpT2.js";
5
- import { NUCLEUS_CONTRACT_ADDRESSES as T } from "../addresses.js";
6
- import { NUCLEUS_TELLER_ABIS as E } from "../abis/nucleus-teller-abis.js";
7
- import { UnifiToken as S, TOKENS_ADDRESSES as C } from "../tokens.js";
8
- import { ERC20PermitHandler as f } from "./erc20-permit-handler.js";
5
+ import { VAULTS_ADDRESSES as T } from "../vaults-addresses.js";
6
+ import { NUCLEUS_TELLER_ABIS as S } from "../abis/nucleus-teller-abis.js";
7
+ import { UnifiToken as f, TOKENS_ADDRESSES as C } from "../tokens.js";
8
+ import { ERC20PermitHandler as E } from "./erc20-permit-handler.js";
9
9
  import { g as v } from "../../getContract-CezEyDf-.js";
10
- class b {
10
+ class D {
11
11
  /**
12
12
  * Create the handler for processing tokens.
13
13
  *
@@ -21,11 +21,11 @@ class b {
21
21
  m(this, "viemChain");
22
22
  m(this, "erc20PermitHandler");
23
23
  m(this, "token");
24
- this.chain = t, this.walletClient = e, this.publicClient = i, this.viemChain = k[t], this.erc20PermitHandler = new f(
24
+ this.chain = t, this.walletClient = e, this.publicClient = i, this.viemChain = k[t], this.erc20PermitHandler = new E(
25
25
  t,
26
26
  e,
27
27
  i
28
- ), this.token = S.unifiETH;
28
+ ), this.token = f.unifiETH;
29
29
  }
30
30
  /**
31
31
  * Set the UniFi token to use for executing transactions on the
@@ -44,7 +44,7 @@ class b {
44
44
  * @returns The viem contract.
45
45
  */
46
46
  getContract() {
47
- const t = T[this.token][this.chain].NucleusTeller, e = E[this.chain].Teller, i = { public: this.publicClient, wallet: this.walletClient };
47
+ const t = T[this.token][this.chain].NucleusTeller, e = S[this.chain].Teller, i = { public: this.publicClient, wallet: this.walletClient };
48
48
  return v({ address: t, abi: e, client: i });
49
49
  }
50
50
  /**
@@ -194,6 +194,6 @@ class b {
194
194
  }
195
195
  }
196
196
  export {
197
- b as NucleusTellerHandler
197
+ D as NucleusTellerHandler
198
198
  };
199
199
  //# sourceMappingURL=nucleus-teller-handler.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nucleus-teller-handler.js","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":";;;;;;;;;AAoCO,MAAMA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAchC,YACUC,GACAC,GACAC,GACR;AAjBM,IAAAC,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AAYE,SAAA,QAAAH,GACA,KAAA,eAAAC,GAC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ClD,UAAA;AAAA,MACJ,SAAAE;AAAA,MACA,cAAAW;AAAA,MACA,eAAAC;AAAA,MACA,aAAAV;AAAA,MACA,UAAAO;AAAA,MACA,GAAAD;AAAA,MACA,GAAAF;AAAA,MACA,GAAAC;AAAA,IAAA,IACET;AAkBG,WAAA,EAAE,UAhBQ,MACf,KAAK,cAAc,MAAM;AAAA,MACvB,CAACa,GAAcC,GAAeV,GAAaO,GAAUD,GAAGF,GAAGC,CAAC;AAAA,MAC5D;AAAA,QACE,SAAAP;AAAA,QACA,OAAO,KAAK;AAAA,MAAA;AAAA,IAEhB,GASiB,UARF,MACf,KAAK,cAAc,YAAY;AAAA,MAC7B,CAACW,GAAcC,GAAeV,GAAaO,GAAUD,GAAGF,GAAGC,CAAC;AAAA,MAC5D;AAAA,QACE,SAAAP;AAAA,MAAA;AAAA,IAEJ,EAE0B;AAAA,EAAA;AAEhC;"}
1
+ {"version":3,"file":"nucleus-teller-handler.js","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 { VAULTS_ADDRESSES } from '../vaults-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 = VAULTS_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","VAULTS_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":";;;;;;;;;AAoCO,MAAMA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAchC,YACUC,GACAC,GACAC,GACR;AAjBM,IAAAC,EAAA;AACA,IAAAA,EAAA;AACA,IAAAA,EAAA;AAYE,SAAA,QAAAH,GACA,KAAA,eAAAC,GACA,KAAA,eAAAC,GAEH,KAAA,YAAYE,EAAYJ,CAAK,GAClC,KAAK,qBAAqB,IAAIK;AAAA,MAC5BL;AAAA,MACAC;AAAA,MACAC;AAAA,IACF,GACA,KAAK,QAAQI,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,EAAiB,KAAK,KAAK,EAAE,KAAK,KAAK,EACpD,eACGC,IAAMC,EAAoB,KAAK,KAAK,EAAE,QACtCC,IAAS,EAAE,QAAQ,KAAK,cAAc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C,CAAC;AAAA,MAC5D;AAAA,QACE,SAAAP;AAAA,MAAA;AAAA,IAEJ,EAE0B;AAAA,EAAA;AAEhC;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../constants-DA2xUb9r.cjs");var C=(e=>(e.USDT="USDT",e.USDC="USDC",e.DAI="DAI",e.WETH="WETH",e.stETH="stETH",e.wstETH="wstETH",e.ALT="ALT",e.eETH="eETH",e.pufETHwstE="pufETHwstE",e.pufETH="pufETH",e.WBTC="WBTC",e.LBTC="LBTC",e.tBTC="tBTC",e.cbBTC="cbBTC",e.pumpBTC="pumpBTC",e.SolvBTC="SolvBTC",e.PUFFER="PUFFER",e.CARROT="CARROT",e.lvlUSD="lvlUSD",e.slvlUSD="slvlUSD",e.mtwCARROT="mtwCARROT",e))(C||{}),i=(e=>(e.unifiETH="unifiETH",e.unifiUSD="unifiUSD",e.unifiBTC="unifiBTC",e))(i||{});const n={USDT:{[a.Chain.Mainnet]:"0xdac17f958d2ee523a2206206994597c13d831ec7",[a.Chain.Holesky]:"0xd5bef2c64f418fd460319521d37862327122e3bc"},USDC:{[a.Chain.Mainnet]:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",[a.Chain.Holesky]:"0x64Cc0de0429bcb87e875905a0c313ec88f6d1d3E"},DAI:{[a.Chain.Mainnet]:"0x6b175474e89094c44da98b954eedeac495271d0f",[a.Chain.Holesky]:"0x4478905505ddfb7eA1c8A9f46eAEC3695cE542ac"},WETH:{[a.Chain.Mainnet]:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",[a.Chain.Holesky]:"0x1d181cBd1825e9eBC6AD966878D555A7215FF4F0"},stETH:{[a.Chain.Mainnet]:"0xae7ab96520de3a18e5e111b5eaab095312d7fe84",[a.Chain.Holesky]:"0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034"},wstETH:{[a.Chain.Mainnet]:"0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",[a.Chain.Holesky]:"0x8d09a4502Cc8Cf1547aD300E066060D043f6982D"},ALT:{[a.Chain.Mainnet]:"0x8457ca5040ad67fdebbcc8edce889a335bc0fbfb",[a.Chain.Holesky]:"0xaf5588a571b42c7e50bd440d80f9bf94a4db94ee"},eETH:{[a.Chain.Mainnet]:"0x35fa164735182de50811e8e2e824cfb9b6118ac2",[a.Chain.Holesky]:"0x7ba2ee123b5977e3da040e1eacb3a61c82c17876"},pufETHwstE:{[a.Chain.Mainnet]:"0xeeda34a377dd0ca676b9511ee1324974fa8d980d",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},pufETH:{[a.Chain.Mainnet]:"0xd9a442856c234a39a81a089c06451ebaa4306a72",[a.Chain.Holesky]:"0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9"},WBTC:{[a.Chain.Mainnet]:"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},LBTC:{[a.Chain.Mainnet]:"0x8236a87084f8b84306f72007f36f2618a5634494",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},tBTC:{[a.Chain.Mainnet]:"0x18084fbA666a33d37592fA2633fD49a74DD93a88",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},cbBTC:{[a.Chain.Mainnet]:"0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},pumpBTC:{[a.Chain.Mainnet]:"0xf469fbd2abcd6b9de8e169d128226c0fc90a012e",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},SolvBTC:{[a.Chain.Mainnet]:"0x7a56e1c57c7475ccf742a1832b028f0456652f97",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},PUFFER:{[a.Chain.Mainnet]:"0x4d1c297d39c5c1277964d0e3f8aa901493664530",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},CARROT:{[a.Chain.Mainnet]:"0x282a69142bac47855c3fbe1693fcc4ba3b4d5ed6",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},lvlUSD:{[a.Chain.Mainnet]:"0x7C1156E515aA1A2E851674120074968C905aAF37",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},slvlUSD:{[a.Chain.Mainnet]:"0x4737d9b4592b40d51e110b94c9c043c6654067ae",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},mtwCARROT:{[a.Chain.Mainnet]:"0x8A5A5DE9db5770123Ff2145F59e9F20047f0A8EC",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},unifiETH:{[a.Chain.Mainnet]:"0x196ead472583bc1e9af7a05f860d9857e1bd3dcc",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},unifiUSD:{[a.Chain.Mainnet]:"0x82c40e07277eBb92935f79cE92268F80dDc7caB4",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},unifiBTC:{[a.Chain.Mainnet]:"0x170d847a8320f3b6a77ee15b0cae430e3ec933a0",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"}},c={USDT:"",USDC:"",DAI:"",WETH:"",stETH:"2",wstETH:"1",ALT:"1",eETH:"1",pufETHwstE:"v7.0.0",pufETH:"1",WBTC:"",LBTC:"",tBTC:"",cbBTC:"",pumpBTC:"",SolvBTC:"",PUFFER:"1",CARROT:"1",lvlUSD:"1",slvlUSD:"1",mtwCARROT:"",unifiETH:"1",unifiUSD:"1",unifiBTC:"1"},f={pufETHwstE:{[a.Chain.Mainnet]:"0x0e986ed5610121905f03fd3850cebcc00f66166fc3ab760acb4e087d735d9457",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000000000000000000000000000"}};exports.TOKENS_ADDRESSES=n;exports.TOKENS_PERMIT_VERSION=c;exports.TOKENS_SALT=f;exports.Token=C;exports.UnifiToken=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../constants-DA2xUb9r.cjs");var C=(e=>(e.USDT="USDT",e.USDC="USDC",e.DAI="DAI",e.WETH="WETH",e.stETH="stETH",e.wstETH="wstETH",e.eETH="eETH",e.cbETH="cbETH",e.ALT="ALT",e.pufETHwstE="pufETHwstE",e.pufETH="pufETH",e.WBTC="WBTC",e.LBTC="LBTC",e.tBTC="tBTC",e.cbBTC="cbBTC",e.pumpBTC="pumpBTC",e.SolvBTC="SolvBTC",e.PUFFER="PUFFER",e.CARROT="CARROT",e.lvlUSD="lvlUSD",e.slvlUSD="slvlUSD",e.mtwCARROT="mtwCARROT",e))(C||{}),n=(e=>(e.unifiETH="unifiETH",e.unifiUSD="unifiUSD",e.unifiBTC="unifiBTC",e.pufETHs="pufETHs",e))(n||{});const i={USDT:{[a.Chain.Mainnet]:"0xdac17f958d2ee523a2206206994597c13d831ec7",[a.Chain.Holesky]:"0xd5bef2c64f418fd460319521d37862327122e3bc"},USDC:{[a.Chain.Mainnet]:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",[a.Chain.Holesky]:"0x64Cc0de0429bcb87e875905a0c313ec88f6d1d3E"},DAI:{[a.Chain.Mainnet]:"0x6b175474e89094c44da98b954eedeac495271d0f",[a.Chain.Holesky]:"0x4478905505ddfb7eA1c8A9f46eAEC3695cE542ac"},WETH:{[a.Chain.Mainnet]:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",[a.Chain.Holesky]:"0x1d181cBd1825e9eBC6AD966878D555A7215FF4F0"},stETH:{[a.Chain.Mainnet]:"0xae7ab96520de3a18e5e111b5eaab095312d7fe84",[a.Chain.Holesky]:"0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034"},wstETH:{[a.Chain.Mainnet]:"0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",[a.Chain.Holesky]:"0x8d09a4502Cc8Cf1547aD300E066060D043f6982D"},eETH:{[a.Chain.Mainnet]:"0x35fa164735182de50811e8e2e824cfb9b6118ac2",[a.Chain.Holesky]:"0x7ba2ee123b5977e3da040e1eacb3a61c82c17876"},cbETH:{[a.Chain.Mainnet]:"0xbe9895146f7af43049ca1c1ae358b0541ea49704",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},ALT:{[a.Chain.Mainnet]:"0x8457ca5040ad67fdebbcc8edce889a335bc0fbfb",[a.Chain.Holesky]:"0xaf5588a571b42c7e50bd440d80f9bf94a4db94ee"},pufETHwstE:{[a.Chain.Mainnet]:"0xeeda34a377dd0ca676b9511ee1324974fa8d980d",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},pufETH:{[a.Chain.Mainnet]:"0xd9a442856c234a39a81a089c06451ebaa4306a72",[a.Chain.Holesky]:"0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9"},WBTC:{[a.Chain.Mainnet]:"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},LBTC:{[a.Chain.Mainnet]:"0x8236a87084f8b84306f72007f36f2618a5634494",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},tBTC:{[a.Chain.Mainnet]:"0x18084fbA666a33d37592fA2633fD49a74DD93a88",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},cbBTC:{[a.Chain.Mainnet]:"0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},pumpBTC:{[a.Chain.Mainnet]:"0xf469fbd2abcd6b9de8e169d128226c0fc90a012e",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},SolvBTC:{[a.Chain.Mainnet]:"0x7a56e1c57c7475ccf742a1832b028f0456652f97",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},PUFFER:{[a.Chain.Mainnet]:"0x4d1c297d39c5c1277964d0e3f8aa901493664530",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},CARROT:{[a.Chain.Mainnet]:"0x282a69142bac47855c3fbe1693fcc4ba3b4d5ed6",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},lvlUSD:{[a.Chain.Mainnet]:"0x7C1156E515aA1A2E851674120074968C905aAF37",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},slvlUSD:{[a.Chain.Mainnet]:"0x4737d9b4592b40d51e110b94c9c043c6654067ae",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},mtwCARROT:{[a.Chain.Mainnet]:"0x8A5A5DE9db5770123Ff2145F59e9F20047f0A8EC",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},unifiETH:{[a.Chain.Mainnet]:"0x196ead472583bc1e9af7a05f860d9857e1bd3dcc",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},unifiUSD:{[a.Chain.Mainnet]:"0x82c40e07277eBb92935f79cE92268F80dDc7caB4",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},unifiBTC:{[a.Chain.Mainnet]:"0x170d847a8320f3b6a77ee15b0cae430e3ec933a0",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"},pufETHs:{[a.Chain.Mainnet]:"0x62a4ce0722ee65635c0f8339dd814d549b6f6735",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000"}},c={USDT:"",USDC:"",DAI:"",WETH:"",stETH:"2",wstETH:"1",eETH:"1",cbETH:"2",ALT:"1",pufETHwstE:"v7.0.0",pufETH:"1",WBTC:"",LBTC:"",tBTC:"",cbBTC:"",pumpBTC:"",SolvBTC:"",PUFFER:"1",CARROT:"1",lvlUSD:"1",slvlUSD:"1",mtwCARROT:"",unifiETH:"1",unifiUSD:"1",unifiBTC:"1",pufETHs:"1"},f={pufETHwstE:{[a.Chain.Mainnet]:"0x0e986ed5610121905f03fd3850cebcc00f66166fc3ab760acb4e087d735d9457",[a.Chain.Holesky]:"0x0000000000000000000000000000000000000000000000000000000000000000"}};exports.TOKENS_ADDRESSES=i;exports.TOKENS_PERMIT_VERSION=c;exports.TOKENS_SALT=f;exports.Token=C;exports.UnifiToken=n;
2
2
  //# sourceMappingURL=tokens.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.cjs","sources":["../../lib/contracts/tokens.ts"],"sourcesContent":["import { Address } from 'viem';\nimport { Chain } from '../chains/constants';\n\nexport enum Token {\n USDT = 'USDT',\n USDC = 'USDC',\n DAI = 'DAI',\n WETH = 'WETH',\n stETH = 'stETH',\n wstETH = 'wstETH',\n ALT = 'ALT',\n eETH = 'eETH',\n pufETHwstE = 'pufETHwstE',\n pufETH = 'pufETH',\n WBTC = 'WBTC',\n LBTC = 'LBTC',\n tBTC = 'tBTC',\n cbBTC = 'cbBTC',\n pumpBTC = 'pumpBTC',\n SolvBTC = 'SolvBTC',\n PUFFER = 'PUFFER',\n CARROT = 'CARROT',\n lvlUSD = 'lvlUSD',\n slvlUSD = 'slvlUSD',\n mtwCARROT = 'mtwCARROT',\n}\n\nexport enum UnifiToken {\n unifiETH = 'unifiETH',\n unifiUSD = 'unifiUSD',\n unifiBTC = 'unifiBTC',\n}\n\nexport type AnyToken = Token | UnifiToken;\n\nexport const TOKENS_ADDRESSES: {\n [key in AnyToken]: { [chain in Chain]: Address };\n} = {\n [Token.USDT]: {\n [Chain.Mainnet]: '0xdac17f958d2ee523a2206206994597c13d831ec7',\n [Chain.Holesky]: '0xd5bef2c64f418fd460319521d37862327122e3bc',\n },\n [Token.USDC]: {\n [Chain.Mainnet]: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',\n [Chain.Holesky]: '0x64Cc0de0429bcb87e875905a0c313ec88f6d1d3E',\n },\n [Token.DAI]: {\n [Chain.Mainnet]: '0x6b175474e89094c44da98b954eedeac495271d0f',\n [Chain.Holesky]: '0x4478905505ddfb7eA1c8A9f46eAEC3695cE542ac',\n },\n [Token.WETH]: {\n [Chain.Mainnet]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',\n [Chain.Holesky]: '0x1d181cBd1825e9eBC6AD966878D555A7215FF4F0',\n },\n [Token.stETH]: {\n [Chain.Mainnet]: '0xae7ab96520de3a18e5e111b5eaab095312d7fe84',\n [Chain.Holesky]: '0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034',\n },\n [Token.wstETH]: {\n [Chain.Mainnet]: '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0',\n [Chain.Holesky]: '0x8d09a4502Cc8Cf1547aD300E066060D043f6982D',\n },\n [Token.ALT]: {\n [Chain.Mainnet]: '0x8457ca5040ad67fdebbcc8edce889a335bc0fbfb',\n [Chain.Holesky]: '0xaf5588a571b42c7e50bd440d80f9bf94a4db94ee',\n },\n [Token.eETH]: {\n [Chain.Mainnet]: '0x35fa164735182de50811e8e2e824cfb9b6118ac2',\n [Chain.Holesky]: '0x7ba2ee123b5977e3da040e1eacb3a61c82c17876',\n },\n [Token.pufETHwstE]: {\n [Chain.Mainnet]: '0xeeda34a377dd0ca676b9511ee1324974fa8d980d',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.pufETH]: {\n [Chain.Mainnet]: '0xd9a442856c234a39a81a089c06451ebaa4306a72',\n [Chain.Holesky]: '0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9',\n },\n [Token.WBTC]: {\n [Chain.Mainnet]: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.LBTC]: {\n [Chain.Mainnet]: '0x8236a87084f8b84306f72007f36f2618a5634494',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.tBTC]: {\n [Chain.Mainnet]: '0x18084fbA666a33d37592fA2633fD49a74DD93a88',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.cbBTC]: {\n [Chain.Mainnet]: '0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.pumpBTC]: {\n [Chain.Mainnet]: '0xf469fbd2abcd6b9de8e169d128226c0fc90a012e',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.SolvBTC]: {\n [Chain.Mainnet]: '0x7a56e1c57c7475ccf742a1832b028f0456652f97',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.PUFFER]: {\n [Chain.Mainnet]: '0x4d1c297d39c5c1277964d0e3f8aa901493664530',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.CARROT]: {\n [Chain.Mainnet]: '0x282a69142bac47855c3fbe1693fcc4ba3b4d5ed6',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.lvlUSD]: {\n [Chain.Mainnet]: '0x7C1156E515aA1A2E851674120074968C905aAF37',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.slvlUSD]: {\n [Chain.Mainnet]: '0x4737d9b4592b40d51e110b94c9c043c6654067ae',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.mtwCARROT]: {\n [Chain.Mainnet]: '0x8A5A5DE9db5770123Ff2145F59e9F20047f0A8EC',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n\n // UniFi Tokens\n [UnifiToken.unifiETH]: {\n [Chain.Mainnet]: '0x196ead472583bc1e9af7a05f860d9857e1bd3dcc',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [UnifiToken.unifiUSD]: {\n [Chain.Mainnet]: '0x82c40e07277eBb92935f79cE92268F80dDc7caB4',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [UnifiToken.unifiBTC]: {\n [Chain.Mainnet]: '0x170d847a8320f3b6a77ee15b0cae430e3ec933a0',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n};\n\nexport const TOKENS_PERMIT_VERSION: { [key in AnyToken]: string } = {\n // USDC does not support permit signatures (ERC20Permit).\n // https://ethereum.stackexchange.com/questions/166254/usdt-contract-dont-have-erc20permit\n [Token.USDT]: '',\n // USDC does not support permit signatures (ERC20Permit).\n [Token.USDC]: '',\n // DAI does not support permit signatures (ERC20Permit).\n [Token.DAI]: '',\n // WETH does not support permit signatures (ERC20Permit).\n [Token.WETH]: '',\n [Token.stETH]: '2',\n // Puffer Quest v1 uses version 1 for wstETH.\n [Token.wstETH]: '1',\n [Token.ALT]: '1',\n // https://github.com/etherfi-protocol/smart-contracts/blob/7c66e571df4fe7ec502a3c325b623bc52349ef9d/src/EETH.sol#L55\n [Token.eETH]: '1',\n [Token.pufETHwstE]: 'v7.0.0',\n [Token.pufETH]: '1',\n [Token.WBTC]: '',\n [Token.LBTC]: '',\n [Token.tBTC]: '',\n [Token.cbBTC]: '',\n [Token.pumpBTC]: '',\n [Token.SolvBTC]: '',\n [Token.PUFFER]: '1',\n [Token.CARROT]: '1',\n [Token.lvlUSD]: '1',\n [Token.slvlUSD]: '1',\n [Token.mtwCARROT]: '',\n\n // UniFi Tokens\n // https://etherscan.io/address/0x196ead472583bc1e9af7a05f860d9857e1bd3dcc#code#F7#L172\n [UnifiToken.unifiETH]: '1',\n // https://etherscan.io/address/0x82c40e07277eBb92935f79cE92268F80dDc7caB4#code#F7#L172\n [UnifiToken.unifiUSD]: '1',\n // https://etherscan.io/address/0x170d847a8320f3b6a77ee15b0cae430e3ec933a0#code#F7#L172\n [UnifiToken.unifiBTC]: '1',\n};\n\nexport const TOKENS_SALT: Partial<{\n [key in AnyToken]: { [chain in Chain]: Address };\n}> = {\n [Token.pufETHwstE]: {\n // Taken from\n // https://etherscan.io/token/0xeeda34a377dd0ca676b9511ee1324974fa8d980d#readContract#F39.\n [Chain.Mainnet]:\n '0x0e986ed5610121905f03fd3850cebcc00f66166fc3ab760acb4e087d735d9457',\n [Chain.Holesky]:\n '0x0000000000000000000000000000000000000000000000000000000000000000',\n },\n};\n"],"names":["Token","UnifiToken","TOKENS_ADDRESSES","Chain","TOKENS_PERMIT_VERSION","TOKENS_SALT"],"mappings":"6HAGY,IAAAA,GAAAA,IACVA,EAAA,KAAO,OACPA,EAAA,KAAO,OAC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SAAsB,CACrB,CAACA,EAAAA,MAAM,OAAO,EAAG,6CACjB,CAACA,EAAAA,MAAM,OAAO,EAAG,4CACnB,EACC,SAAsB,CACrB,CAACA,EAAAA,MAAM,OAAO,EAAG,6CACjB,CAACA,EAAAA,MAAM,OAAO,EAAG,4CACnB,EACC,SAAsB,CACrB,CAACA,EAAAA,MAAM,OAAO,EAAG,6CACjB,CAACA,EAAAA,MAAM,OAAO,EAAG,4CAAA,CAErB,EAEaC,EAAuD,CAGjE,KAAa,GAEb,KAAa,GAEb,IAAY,GAEZ,KAAa,GACb,MAAc,IAEd,OAAe,IACf,IAAY,IAEZ,KAAa,IACb,WAAmB,SACnB,OAAe,IACf,KAAa,GACb,KAAa,GACb,KAAa,GACb,MAAc,GACd,QAAgB,GAChB,QAAgB,GAChB,OAAe,IACf,OAAe,IACf,OAAe,IACf,QAAgB,IAChB,UAAkB,GAIlB,SAAsB,IAEtB,SAAsB,IAEtB,SAAsB,GACzB,EAEaC,EAER,CACF,WAAmB,CAGlB,CAACF,EAAAA,MAAM,OAAO,EACZ,qEACF,CAACA,EAAAA,MAAM,OAAO,EACZ,oEAAA,CAEN"}
1
+ {"version":3,"file":"tokens.cjs","sources":["../../lib/contracts/tokens.ts"],"sourcesContent":["import { Address } from 'viem';\nimport { Chain } from '../chains/constants';\n\nexport enum Token {\n USDT = 'USDT',\n USDC = 'USDC',\n DAI = 'DAI',\n WETH = 'WETH',\n stETH = 'stETH',\n wstETH = 'wstETH',\n eETH = 'eETH',\n cbETH = 'cbETH',\n ALT = 'ALT',\n pufETHwstE = 'pufETHwstE',\n pufETH = 'pufETH',\n WBTC = 'WBTC',\n LBTC = 'LBTC',\n tBTC = 'tBTC',\n cbBTC = 'cbBTC',\n pumpBTC = 'pumpBTC',\n SolvBTC = 'SolvBTC',\n PUFFER = 'PUFFER',\n CARROT = 'CARROT',\n lvlUSD = 'lvlUSD',\n slvlUSD = 'slvlUSD',\n mtwCARROT = 'mtwCARROT',\n}\n\nexport enum UnifiToken {\n unifiETH = 'unifiETH',\n unifiUSD = 'unifiUSD',\n unifiBTC = 'unifiBTC',\n // Symbiotic pufETH.\n pufETHs = 'pufETHs',\n}\n\nexport type AnyToken = Token | UnifiToken;\n\nexport const TOKENS_ADDRESSES: {\n [key in AnyToken]: { [chain in Chain]: Address };\n} = {\n [Token.USDT]: {\n [Chain.Mainnet]: '0xdac17f958d2ee523a2206206994597c13d831ec7',\n [Chain.Holesky]: '0xd5bef2c64f418fd460319521d37862327122e3bc',\n },\n [Token.USDC]: {\n [Chain.Mainnet]: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',\n [Chain.Holesky]: '0x64Cc0de0429bcb87e875905a0c313ec88f6d1d3E',\n },\n [Token.DAI]: {\n [Chain.Mainnet]: '0x6b175474e89094c44da98b954eedeac495271d0f',\n [Chain.Holesky]: '0x4478905505ddfb7eA1c8A9f46eAEC3695cE542ac',\n },\n [Token.WETH]: {\n [Chain.Mainnet]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',\n [Chain.Holesky]: '0x1d181cBd1825e9eBC6AD966878D555A7215FF4F0',\n },\n [Token.stETH]: {\n [Chain.Mainnet]: '0xae7ab96520de3a18e5e111b5eaab095312d7fe84',\n [Chain.Holesky]: '0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034',\n },\n [Token.wstETH]: {\n [Chain.Mainnet]: '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0',\n [Chain.Holesky]: '0x8d09a4502Cc8Cf1547aD300E066060D043f6982D',\n },\n [Token.eETH]: {\n [Chain.Mainnet]: '0x35fa164735182de50811e8e2e824cfb9b6118ac2',\n [Chain.Holesky]: '0x7ba2ee123b5977e3da040e1eacb3a61c82c17876',\n },\n [Token.cbETH]: {\n [Chain.Mainnet]: '0xbe9895146f7af43049ca1c1ae358b0541ea49704',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.ALT]: {\n [Chain.Mainnet]: '0x8457ca5040ad67fdebbcc8edce889a335bc0fbfb',\n [Chain.Holesky]: '0xaf5588a571b42c7e50bd440d80f9bf94a4db94ee',\n },\n [Token.pufETHwstE]: {\n [Chain.Mainnet]: '0xeeda34a377dd0ca676b9511ee1324974fa8d980d',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.pufETH]: {\n [Chain.Mainnet]: '0xd9a442856c234a39a81a089c06451ebaa4306a72',\n [Chain.Holesky]: '0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9',\n },\n [Token.WBTC]: {\n [Chain.Mainnet]: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.LBTC]: {\n [Chain.Mainnet]: '0x8236a87084f8b84306f72007f36f2618a5634494',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.tBTC]: {\n [Chain.Mainnet]: '0x18084fbA666a33d37592fA2633fD49a74DD93a88',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.cbBTC]: {\n [Chain.Mainnet]: '0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.pumpBTC]: {\n [Chain.Mainnet]: '0xf469fbd2abcd6b9de8e169d128226c0fc90a012e',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.SolvBTC]: {\n [Chain.Mainnet]: '0x7a56e1c57c7475ccf742a1832b028f0456652f97',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.PUFFER]: {\n [Chain.Mainnet]: '0x4d1c297d39c5c1277964d0e3f8aa901493664530',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.CARROT]: {\n [Chain.Mainnet]: '0x282a69142bac47855c3fbe1693fcc4ba3b4d5ed6',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.lvlUSD]: {\n [Chain.Mainnet]: '0x7C1156E515aA1A2E851674120074968C905aAF37',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.slvlUSD]: {\n [Chain.Mainnet]: '0x4737d9b4592b40d51e110b94c9c043c6654067ae',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.mtwCARROT]: {\n [Chain.Mainnet]: '0x8A5A5DE9db5770123Ff2145F59e9F20047f0A8EC',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n\n // UniFi Tokens\n [UnifiToken.unifiETH]: {\n [Chain.Mainnet]: '0x196ead472583bc1e9af7a05f860d9857e1bd3dcc',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [UnifiToken.unifiUSD]: {\n [Chain.Mainnet]: '0x82c40e07277eBb92935f79cE92268F80dDc7caB4',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [UnifiToken.unifiBTC]: {\n [Chain.Mainnet]: '0x170d847a8320f3b6a77ee15b0cae430e3ec933a0',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [UnifiToken.pufETHs]: {\n [Chain.Mainnet]: '0x62a4ce0722ee65635c0f8339dd814d549b6f6735',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n};\n\nexport const TOKENS_PERMIT_VERSION: { [key in AnyToken]: string } = {\n // USDC does not support permit signatures (ERC20Permit).\n // https://ethereum.stackexchange.com/questions/166254/usdt-contract-dont-have-erc20permit\n [Token.USDT]: '',\n // USDC does not support permit signatures (ERC20Permit).\n [Token.USDC]: '',\n // DAI does not support permit signatures (ERC20Permit).\n [Token.DAI]: '',\n // WETH does not support permit signatures (ERC20Permit).\n [Token.WETH]: '',\n [Token.stETH]: '2',\n // Puffer Quest v1 uses version 1 for wstETH.\n [Token.wstETH]: '1',\n // https://github.com/etherfi-protocol/smart-contracts/blob/7c66e571df4fe7ec502a3c325b623bc52349ef9d/src/EETH.sol#L55\n [Token.eETH]: '1',\n // https://etherscan.io/token/0xbe9895146f7af43049ca1c1ae358b0541ea49704#readProxyContract#F26\n [Token.cbETH]: '2',\n [Token.ALT]: '1',\n [Token.pufETHwstE]: 'v7.0.0',\n [Token.pufETH]: '1',\n [Token.WBTC]: '',\n [Token.LBTC]: '',\n [Token.tBTC]: '',\n [Token.cbBTC]: '',\n [Token.pumpBTC]: '',\n [Token.SolvBTC]: '',\n [Token.PUFFER]: '1',\n [Token.CARROT]: '1',\n [Token.lvlUSD]: '1',\n [Token.slvlUSD]: '1',\n [Token.mtwCARROT]: '',\n\n // UniFi Tokens\n // https://etherscan.io/address/0x196ead472583bc1e9af7a05f860d9857e1bd3dcc#code#F7#L172\n [UnifiToken.unifiETH]: '1',\n // https://etherscan.io/address/0x82c40e07277eBb92935f79cE92268F80dDc7caB4#code#F7#L172\n [UnifiToken.unifiUSD]: '1',\n // https://etherscan.io/address/0x170d847a8320f3b6a77ee15b0cae430e3ec933a0#code#F7#L172\n [UnifiToken.unifiBTC]: '1',\n // https://etherscan.io/address/0x62a4ce0722ee65635c0f8339dd814d549b6f6735#code#F7#L172\n [UnifiToken.pufETHs]: '1',\n};\n\nexport const TOKENS_SALT: Partial<{\n [key in AnyToken]: { [chain in Chain]: Address };\n}> = {\n [Token.pufETHwstE]: {\n // Taken from\n // https://etherscan.io/token/0xeeda34a377dd0ca676b9511ee1324974fa8d980d#readContract#F39.\n [Chain.Mainnet]:\n '0x0e986ed5610121905f03fd3850cebcc00f66166fc3ab760acb4e087d735d9457',\n [Chain.Holesky]:\n '0x0000000000000000000000000000000000000000000000000000000000000000',\n },\n};\n"],"names":["Token","UnifiToken","TOKENS_ADDRESSES","Chain","TOKENS_PERMIT_VERSION","TOKENS_SALT"],"mappings":"6HAGY,IAAAA,GAAAA,IACVA,EAAA,KAAO,OACPA,EAAA,KAAO,OACPA,EAAA,IAAM,MACNA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,OAAS,SACTA,EAAA,KAAO,OACPA,EAAA,MA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M,OAAO,EAAG,4CACnB,EAGC,SAAsB,CACrB,CAACA,EAAAA,MAAM,OAAO,EAAG,6CACjB,CAACA,EAAAA,MAAM,OAAO,EAAG,4CACnB,EACC,SAAsB,CACrB,CAACA,EAAAA,MAAM,OAAO,EAAG,6CACjB,CAACA,EAAAA,MAAM,OAAO,EAAG,4CACnB,EACC,SAAsB,CACrB,CAACA,EAAAA,MAAM,OAAO,EAAG,6CACjB,CAACA,EAAAA,MAAM,OAAO,EAAG,4CACnB,EACC,QAAqB,CACpB,CAACA,EAAAA,MAAM,OAAO,EAAG,6CACjB,CAACA,EAAAA,MAAM,OAAO,EAAG,4CAAA,CAErB,EAEaC,EAAuD,CAGjE,KAAa,GAEb,KAAa,GAEb,IAAY,GAEZ,KAAa,GACb,MAAc,IAEd,OAAe,IAEf,KAAa,IAEb,MAAc,IACd,IAAY,IACZ,WAAmB,SACnB,OAAe,IACf,KAAa,GACb,KAAa,GACb,KAAa,GACb,MAAc,GACd,QAAgB,GAChB,QAAgB,GAChB,OAAe,IACf,OAAe,IACf,OAAe,IACf,QAAgB,IAChB,UAAkB,GAIlB,SAAsB,IAEtB,SAAsB,IAEtB,SAAsB,IAEtB,QAAqB,GACxB,EAEaC,EAER,CACF,WAAmB,CAGlB,CAACF,EAAAA,MAAM,OAAO,EACZ,qEACF,CAACA,EAAAA,MAAM,OAAO,EACZ,oEAAA,CAEN"}
@@ -7,8 +7,9 @@ export declare enum Token {
7
7
  WETH = "WETH",
8
8
  stETH = "stETH",
9
9
  wstETH = "wstETH",
10
- ALT = "ALT",
11
10
  eETH = "eETH",
11
+ cbETH = "cbETH",
12
+ ALT = "ALT",
12
13
  pufETHwstE = "pufETHwstE",
13
14
  pufETH = "pufETH",
14
15
  WBTC = "WBTC",
@@ -26,7 +27,8 @@ export declare enum Token {
26
27
  export declare enum UnifiToken {
27
28
  unifiETH = "unifiETH",
28
29
  unifiUSD = "unifiUSD",
29
- unifiBTC = "unifiBTC"
30
+ unifiBTC = "unifiBTC",
31
+ pufETHs = "pufETHs"
30
32
  }
31
33
  export type AnyToken = Token | UnifiToken;
32
34
  export declare const TOKENS_ADDRESSES: {
@@ -1,5 +1,5 @@
1
1
  import { C as e } from "../constants-BjRNQpT2.js";
2
- var c = /* @__PURE__ */ ((a) => (a.USDT = "USDT", a.USDC = "USDC", a.DAI = "DAI", a.WETH = "WETH", a.stETH = "stETH", a.wstETH = "wstETH", a.ALT = "ALT", a.eETH = "eETH", a.pufETHwstE = "pufETHwstE", a.pufETH = "pufETH", a.WBTC = "WBTC", a.LBTC = "LBTC", a.tBTC = "tBTC", a.cbBTC = "cbBTC", a.pumpBTC = "pumpBTC", a.SolvBTC = "SolvBTC", a.PUFFER = "PUFFER", a.CARROT = "CARROT", a.lvlUSD = "lvlUSD", a.slvlUSD = "slvlUSD", a.mtwCARROT = "mtwCARROT", a))(c || {}), f = /* @__PURE__ */ ((a) => (a.unifiETH = "unifiETH", a.unifiUSD = "unifiUSD", a.unifiBTC = "unifiBTC", a))(f || {});
2
+ var c = /* @__PURE__ */ ((a) => (a.USDT = "USDT", a.USDC = "USDC", a.DAI = "DAI", a.WETH = "WETH", a.stETH = "stETH", a.wstETH = "wstETH", a.eETH = "eETH", a.cbETH = "cbETH", a.ALT = "ALT", a.pufETHwstE = "pufETHwstE", a.pufETH = "pufETH", a.WBTC = "WBTC", a.LBTC = "LBTC", a.tBTC = "tBTC", a.cbBTC = "cbBTC", a.pumpBTC = "pumpBTC", a.SolvBTC = "SolvBTC", a.PUFFER = "PUFFER", a.CARROT = "CARROT", a.lvlUSD = "lvlUSD", a.slvlUSD = "slvlUSD", a.mtwCARROT = "mtwCARROT", a))(c || {}), f = /* @__PURE__ */ ((a) => (a.unifiETH = "unifiETH", a.unifiUSD = "unifiUSD", a.unifiBTC = "unifiBTC", a.pufETHs = "pufETHs", a))(f || {});
3
3
  const d = {
4
4
  USDT: {
5
5
  [e.Mainnet]: "0xdac17f958d2ee523a2206206994597c13d831ec7",
@@ -25,14 +25,18 @@ const d = {
25
25
  [e.Mainnet]: "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",
26
26
  [e.Holesky]: "0x8d09a4502Cc8Cf1547aD300E066060D043f6982D"
27
27
  },
28
- ALT: {
29
- [e.Mainnet]: "0x8457ca5040ad67fdebbcc8edce889a335bc0fbfb",
30
- [e.Holesky]: "0xaf5588a571b42c7e50bd440d80f9bf94a4db94ee"
31
- },
32
28
  eETH: {
33
29
  [e.Mainnet]: "0x35fa164735182de50811e8e2e824cfb9b6118ac2",
34
30
  [e.Holesky]: "0x7ba2ee123b5977e3da040e1eacb3a61c82c17876"
35
31
  },
32
+ cbETH: {
33
+ [e.Mainnet]: "0xbe9895146f7af43049ca1c1ae358b0541ea49704",
34
+ [e.Holesky]: "0x0000000000000000000000000000000000000000"
35
+ },
36
+ ALT: {
37
+ [e.Mainnet]: "0x8457ca5040ad67fdebbcc8edce889a335bc0fbfb",
38
+ [e.Holesky]: "0xaf5588a571b42c7e50bd440d80f9bf94a4db94ee"
39
+ },
36
40
  pufETHwstE: {
37
41
  [e.Mainnet]: "0xeeda34a377dd0ca676b9511ee1324974fa8d980d",
38
42
  [e.Holesky]: "0x0000000000000000000000000000000000000000"
@@ -97,6 +101,10 @@ const d = {
97
101
  unifiBTC: {
98
102
  [e.Mainnet]: "0x170d847a8320f3b6a77ee15b0cae430e3ec933a0",
99
103
  [e.Holesky]: "0x0000000000000000000000000000000000000000"
104
+ },
105
+ pufETHs: {
106
+ [e.Mainnet]: "0x62a4ce0722ee65635c0f8339dd814d549b6f6735",
107
+ [e.Holesky]: "0x0000000000000000000000000000000000000000"
100
108
  }
101
109
  }, E = {
102
110
  // USDC does not support permit signatures (ERC20Permit).
@@ -111,9 +119,11 @@ const d = {
111
119
  stETH: "2",
112
120
  // Puffer Quest v1 uses version 1 for wstETH.
113
121
  wstETH: "1",
114
- ALT: "1",
115
122
  // https://github.com/etherfi-protocol/smart-contracts/blob/7c66e571df4fe7ec502a3c325b623bc52349ef9d/src/EETH.sol#L55
116
123
  eETH: "1",
124
+ // https://etherscan.io/token/0xbe9895146f7af43049ca1c1ae358b0541ea49704#readProxyContract#F26
125
+ cbETH: "2",
126
+ ALT: "1",
117
127
  pufETHwstE: "v7.0.0",
118
128
  pufETH: "1",
119
129
  WBTC: "",
@@ -133,8 +143,10 @@ const d = {
133
143
  // https://etherscan.io/address/0x82c40e07277eBb92935f79cE92268F80dDc7caB4#code#F7#L172
134
144
  unifiUSD: "1",
135
145
  // https://etherscan.io/address/0x170d847a8320f3b6a77ee15b0cae430e3ec933a0#code#F7#L172
136
- unifiBTC: "1"
137
- }, C = {
146
+ unifiBTC: "1",
147
+ // https://etherscan.io/address/0x62a4ce0722ee65635c0f8339dd814d549b6f6735#code#F7#L172
148
+ pufETHs: "1"
149
+ }, H = {
138
150
  pufETHwstE: {
139
151
  // Taken from
140
152
  // https://etherscan.io/token/0xeeda34a377dd0ca676b9511ee1324974fa8d980d#readContract#F39.
@@ -145,7 +157,7 @@ const d = {
145
157
  export {
146
158
  d as TOKENS_ADDRESSES,
147
159
  E as TOKENS_PERMIT_VERSION,
148
- C as TOKENS_SALT,
160
+ H as TOKENS_SALT,
149
161
  c as Token,
150
162
  f as UnifiToken
151
163
  };
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.js","sources":["../../lib/contracts/tokens.ts"],"sourcesContent":["import { Address } from 'viem';\nimport { Chain } from '../chains/constants';\n\nexport enum Token {\n USDT = 'USDT',\n USDC = 'USDC',\n DAI = 'DAI',\n WETH = 'WETH',\n stETH = 'stETH',\n wstETH = 'wstETH',\n ALT = 'ALT',\n eETH = 'eETH',\n pufETHwstE = 'pufETHwstE',\n pufETH = 'pufETH',\n WBTC = 'WBTC',\n LBTC = 'LBTC',\n tBTC = 'tBTC',\n cbBTC = 'cbBTC',\n pumpBTC = 'pumpBTC',\n SolvBTC = 'SolvBTC',\n PUFFER = 'PUFFER',\n CARROT = 'CARROT',\n lvlUSD = 'lvlUSD',\n slvlUSD = 'slvlUSD',\n mtwCARROT = 'mtwCARROT',\n}\n\nexport enum UnifiToken {\n unifiETH = 'unifiETH',\n unifiUSD = 'unifiUSD',\n unifiBTC = 'unifiBTC',\n}\n\nexport type AnyToken = Token | UnifiToken;\n\nexport const TOKENS_ADDRESSES: {\n [key in AnyToken]: { [chain in Chain]: Address };\n} = {\n [Token.USDT]: {\n [Chain.Mainnet]: '0xdac17f958d2ee523a2206206994597c13d831ec7',\n [Chain.Holesky]: '0xd5bef2c64f418fd460319521d37862327122e3bc',\n },\n [Token.USDC]: {\n [Chain.Mainnet]: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',\n [Chain.Holesky]: '0x64Cc0de0429bcb87e875905a0c313ec88f6d1d3E',\n },\n [Token.DAI]: {\n [Chain.Mainnet]: '0x6b175474e89094c44da98b954eedeac495271d0f',\n [Chain.Holesky]: '0x4478905505ddfb7eA1c8A9f46eAEC3695cE542ac',\n },\n [Token.WETH]: {\n [Chain.Mainnet]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',\n [Chain.Holesky]: '0x1d181cBd1825e9eBC6AD966878D555A7215FF4F0',\n },\n [Token.stETH]: {\n [Chain.Mainnet]: '0xae7ab96520de3a18e5e111b5eaab095312d7fe84',\n [Chain.Holesky]: '0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034',\n },\n [Token.wstETH]: {\n [Chain.Mainnet]: '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0',\n [Chain.Holesky]: '0x8d09a4502Cc8Cf1547aD300E066060D043f6982D',\n },\n [Token.ALT]: {\n [Chain.Mainnet]: '0x8457ca5040ad67fdebbcc8edce889a335bc0fbfb',\n [Chain.Holesky]: '0xaf5588a571b42c7e50bd440d80f9bf94a4db94ee',\n },\n [Token.eETH]: {\n [Chain.Mainnet]: '0x35fa164735182de50811e8e2e824cfb9b6118ac2',\n [Chain.Holesky]: '0x7ba2ee123b5977e3da040e1eacb3a61c82c17876',\n },\n [Token.pufETHwstE]: {\n [Chain.Mainnet]: '0xeeda34a377dd0ca676b9511ee1324974fa8d980d',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.pufETH]: {\n [Chain.Mainnet]: '0xd9a442856c234a39a81a089c06451ebaa4306a72',\n [Chain.Holesky]: '0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9',\n },\n [Token.WBTC]: {\n [Chain.Mainnet]: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.LBTC]: {\n [Chain.Mainnet]: '0x8236a87084f8b84306f72007f36f2618a5634494',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.tBTC]: {\n [Chain.Mainnet]: '0x18084fbA666a33d37592fA2633fD49a74DD93a88',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.cbBTC]: {\n [Chain.Mainnet]: '0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.pumpBTC]: {\n [Chain.Mainnet]: '0xf469fbd2abcd6b9de8e169d128226c0fc90a012e',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.SolvBTC]: {\n [Chain.Mainnet]: '0x7a56e1c57c7475ccf742a1832b028f0456652f97',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.PUFFER]: {\n [Chain.Mainnet]: '0x4d1c297d39c5c1277964d0e3f8aa901493664530',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.CARROT]: {\n [Chain.Mainnet]: '0x282a69142bac47855c3fbe1693fcc4ba3b4d5ed6',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.lvlUSD]: {\n [Chain.Mainnet]: '0x7C1156E515aA1A2E851674120074968C905aAF37',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.slvlUSD]: {\n [Chain.Mainnet]: '0x4737d9b4592b40d51e110b94c9c043c6654067ae',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.mtwCARROT]: {\n [Chain.Mainnet]: '0x8A5A5DE9db5770123Ff2145F59e9F20047f0A8EC',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n\n // UniFi Tokens\n [UnifiToken.unifiETH]: {\n [Chain.Mainnet]: '0x196ead472583bc1e9af7a05f860d9857e1bd3dcc',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [UnifiToken.unifiUSD]: {\n [Chain.Mainnet]: '0x82c40e07277eBb92935f79cE92268F80dDc7caB4',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [UnifiToken.unifiBTC]: {\n [Chain.Mainnet]: '0x170d847a8320f3b6a77ee15b0cae430e3ec933a0',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n};\n\nexport const TOKENS_PERMIT_VERSION: { [key in AnyToken]: string } = {\n // USDC does not support permit signatures (ERC20Permit).\n // https://ethereum.stackexchange.com/questions/166254/usdt-contract-dont-have-erc20permit\n [Token.USDT]: '',\n // USDC does not support permit signatures (ERC20Permit).\n [Token.USDC]: '',\n // DAI does not support permit signatures (ERC20Permit).\n [Token.DAI]: '',\n // WETH does not support permit signatures (ERC20Permit).\n [Token.WETH]: '',\n [Token.stETH]: '2',\n // Puffer Quest v1 uses version 1 for wstETH.\n [Token.wstETH]: '1',\n [Token.ALT]: '1',\n // https://github.com/etherfi-protocol/smart-contracts/blob/7c66e571df4fe7ec502a3c325b623bc52349ef9d/src/EETH.sol#L55\n [Token.eETH]: '1',\n [Token.pufETHwstE]: 'v7.0.0',\n [Token.pufETH]: '1',\n [Token.WBTC]: '',\n [Token.LBTC]: '',\n [Token.tBTC]: '',\n [Token.cbBTC]: '',\n [Token.pumpBTC]: '',\n [Token.SolvBTC]: '',\n [Token.PUFFER]: '1',\n [Token.CARROT]: '1',\n [Token.lvlUSD]: '1',\n [Token.slvlUSD]: '1',\n [Token.mtwCARROT]: '',\n\n // UniFi Tokens\n // https://etherscan.io/address/0x196ead472583bc1e9af7a05f860d9857e1bd3dcc#code#F7#L172\n [UnifiToken.unifiETH]: '1',\n // https://etherscan.io/address/0x82c40e07277eBb92935f79cE92268F80dDc7caB4#code#F7#L172\n [UnifiToken.unifiUSD]: '1',\n // https://etherscan.io/address/0x170d847a8320f3b6a77ee15b0cae430e3ec933a0#code#F7#L172\n [UnifiToken.unifiBTC]: '1',\n};\n\nexport const TOKENS_SALT: Partial<{\n [key in AnyToken]: { [chain in Chain]: Address };\n}> = {\n [Token.pufETHwstE]: {\n // Taken from\n // https://etherscan.io/token/0xeeda34a377dd0ca676b9511ee1324974fa8d980d#readContract#F39.\n [Chain.Mainnet]:\n '0x0e986ed5610121905f03fd3850cebcc00f66166fc3ab760acb4e087d735d9457',\n [Chain.Holesky]:\n '0x0000000000000000000000000000000000000000000000000000000000000000',\n },\n};\n"],"names":["Token","UnifiToken","TOKENS_ADDRESSES","Chain","TOKENS_PERMIT_VERSION","TOKENS_SALT"],"mappings":";AAGY,IAAAA,sBAAAA,OACVA,EAAA,OAAO,QACPA,EAAA,OAAO,QACPA,EAAA,MAAM,OACNA,EAAA,OAAO,QACPA,EAAA,QAAQ,SACRA,EAAA,SAAS,UACTA,EAAA,MAAM,OACNA,EAAA,OAAO,QACPA,EAAA,aAAa,cACbA,EAAA,SAAS,UACTA,EAAA,OAAO,QACPA,EAAA,OAAO,QACPA,EAAA,OAAO,QACPA,EAAA,QAAQ,SACRA,EAAA,UAAU,WACVA,EAAA,UAAU,WACVA,EAAA,SAAS,UACTA,EAAA,SAAS,UACTA,EAAA,SAAS,UACTA,EAAA,UAAU,WACVA,EAAA,YAAY,aArBFA,IAAAA,KAAA,CAAA,CAAA,GAwBAC,sBAAAA,OACVA,EAAA,WAAW,YACXA,EAAA,WAAW,YACXA,EAAA,WAAW,YAHDA,IAAAA,KAAA,CAAA,CAAA;AAQ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AAA;AAAA;AAAA,EAGjE,MAAa;AAAA;AAAA,EAEb,MAAa;AAAA;AAAA,EAEb,KAAY;AAAA;AAAA,EAEZ,MAAa;AAAA,EACb,OAAc;AAAA;AAAA,EAEd,QAAe;AAAA,EACf,KAAY;AAAA;AAAA,EAEZ,MAAa;AAAA,EACb,YAAmB;AAAA,EACnB,QAAe;AAAA,EACf,MAAa;AAAA,EACb,MAAa;AAAA,EACb,MAAa;AAAA,EACb,OAAc;AAAA,EACd,SAAgB;AAAA,EAChB,SAAgB;AAAA,EAChB,QAAe;AAAA,EACf,QAAe;AAAA,EACf,QAAe;AAAA,EACf,SAAgB;AAAA,EAChB,WAAkB;AAAA;AAAA;AAAA,EAIlB,UAAsB;AAAA;AAAA,EAEtB,UAAsB;AAAA;AAAA,EAEtB,UAAsB;AACzB,GAEaC,IAER;AAAA,EACF,YAAmB;AAAA;AAAA;AAAA,IAGlB,CAACF,EAAM,OAAO,GACZ;AAAA,IACF,CAACA,EAAM,OAAO,GACZ;AAAA,EAAA;AAEN;"}
1
+ {"version":3,"file":"tokens.js","sources":["../../lib/contracts/tokens.ts"],"sourcesContent":["import { Address } from 'viem';\nimport { Chain } from '../chains/constants';\n\nexport enum Token {\n USDT = 'USDT',\n USDC = 'USDC',\n DAI = 'DAI',\n WETH = 'WETH',\n stETH = 'stETH',\n wstETH = 'wstETH',\n eETH = 'eETH',\n cbETH = 'cbETH',\n ALT = 'ALT',\n pufETHwstE = 'pufETHwstE',\n pufETH = 'pufETH',\n WBTC = 'WBTC',\n LBTC = 'LBTC',\n tBTC = 'tBTC',\n cbBTC = 'cbBTC',\n pumpBTC = 'pumpBTC',\n SolvBTC = 'SolvBTC',\n PUFFER = 'PUFFER',\n CARROT = 'CARROT',\n lvlUSD = 'lvlUSD',\n slvlUSD = 'slvlUSD',\n mtwCARROT = 'mtwCARROT',\n}\n\nexport enum UnifiToken {\n unifiETH = 'unifiETH',\n unifiUSD = 'unifiUSD',\n unifiBTC = 'unifiBTC',\n // Symbiotic pufETH.\n pufETHs = 'pufETHs',\n}\n\nexport type AnyToken = Token | UnifiToken;\n\nexport const TOKENS_ADDRESSES: {\n [key in AnyToken]: { [chain in Chain]: Address };\n} = {\n [Token.USDT]: {\n [Chain.Mainnet]: '0xdac17f958d2ee523a2206206994597c13d831ec7',\n [Chain.Holesky]: '0xd5bef2c64f418fd460319521d37862327122e3bc',\n },\n [Token.USDC]: {\n [Chain.Mainnet]: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',\n [Chain.Holesky]: '0x64Cc0de0429bcb87e875905a0c313ec88f6d1d3E',\n },\n [Token.DAI]: {\n [Chain.Mainnet]: '0x6b175474e89094c44da98b954eedeac495271d0f',\n [Chain.Holesky]: '0x4478905505ddfb7eA1c8A9f46eAEC3695cE542ac',\n },\n [Token.WETH]: {\n [Chain.Mainnet]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',\n [Chain.Holesky]: '0x1d181cBd1825e9eBC6AD966878D555A7215FF4F0',\n },\n [Token.stETH]: {\n [Chain.Mainnet]: '0xae7ab96520de3a18e5e111b5eaab095312d7fe84',\n [Chain.Holesky]: '0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034',\n },\n [Token.wstETH]: {\n [Chain.Mainnet]: '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0',\n [Chain.Holesky]: '0x8d09a4502Cc8Cf1547aD300E066060D043f6982D',\n },\n [Token.eETH]: {\n [Chain.Mainnet]: '0x35fa164735182de50811e8e2e824cfb9b6118ac2',\n [Chain.Holesky]: '0x7ba2ee123b5977e3da040e1eacb3a61c82c17876',\n },\n [Token.cbETH]: {\n [Chain.Mainnet]: '0xbe9895146f7af43049ca1c1ae358b0541ea49704',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.ALT]: {\n [Chain.Mainnet]: '0x8457ca5040ad67fdebbcc8edce889a335bc0fbfb',\n [Chain.Holesky]: '0xaf5588a571b42c7e50bd440d80f9bf94a4db94ee',\n },\n [Token.pufETHwstE]: {\n [Chain.Mainnet]: '0xeeda34a377dd0ca676b9511ee1324974fa8d980d',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.pufETH]: {\n [Chain.Mainnet]: '0xd9a442856c234a39a81a089c06451ebaa4306a72',\n [Chain.Holesky]: '0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9',\n },\n [Token.WBTC]: {\n [Chain.Mainnet]: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.LBTC]: {\n [Chain.Mainnet]: '0x8236a87084f8b84306f72007f36f2618a5634494',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.tBTC]: {\n [Chain.Mainnet]: '0x18084fbA666a33d37592fA2633fD49a74DD93a88',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.cbBTC]: {\n [Chain.Mainnet]: '0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.pumpBTC]: {\n [Chain.Mainnet]: '0xf469fbd2abcd6b9de8e169d128226c0fc90a012e',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.SolvBTC]: {\n [Chain.Mainnet]: '0x7a56e1c57c7475ccf742a1832b028f0456652f97',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.PUFFER]: {\n [Chain.Mainnet]: '0x4d1c297d39c5c1277964d0e3f8aa901493664530',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.CARROT]: {\n [Chain.Mainnet]: '0x282a69142bac47855c3fbe1693fcc4ba3b4d5ed6',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.lvlUSD]: {\n [Chain.Mainnet]: '0x7C1156E515aA1A2E851674120074968C905aAF37',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.slvlUSD]: {\n [Chain.Mainnet]: '0x4737d9b4592b40d51e110b94c9c043c6654067ae',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.mtwCARROT]: {\n [Chain.Mainnet]: '0x8A5A5DE9db5770123Ff2145F59e9F20047f0A8EC',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n\n // UniFi Tokens\n [UnifiToken.unifiETH]: {\n [Chain.Mainnet]: '0x196ead472583bc1e9af7a05f860d9857e1bd3dcc',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [UnifiToken.unifiUSD]: {\n [Chain.Mainnet]: '0x82c40e07277eBb92935f79cE92268F80dDc7caB4',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [UnifiToken.unifiBTC]: {\n [Chain.Mainnet]: '0x170d847a8320f3b6a77ee15b0cae430e3ec933a0',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [UnifiToken.pufETHs]: {\n [Chain.Mainnet]: '0x62a4ce0722ee65635c0f8339dd814d549b6f6735',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n};\n\nexport const TOKENS_PERMIT_VERSION: { [key in AnyToken]: string } = {\n // USDC does not support permit signatures (ERC20Permit).\n // https://ethereum.stackexchange.com/questions/166254/usdt-contract-dont-have-erc20permit\n [Token.USDT]: '',\n // USDC does not support permit signatures (ERC20Permit).\n [Token.USDC]: '',\n // DAI does not support permit signatures (ERC20Permit).\n [Token.DAI]: '',\n // WETH does not support permit signatures (ERC20Permit).\n [Token.WETH]: '',\n [Token.stETH]: '2',\n // Puffer Quest v1 uses version 1 for wstETH.\n [Token.wstETH]: '1',\n // https://github.com/etherfi-protocol/smart-contracts/blob/7c66e571df4fe7ec502a3c325b623bc52349ef9d/src/EETH.sol#L55\n [Token.eETH]: '1',\n // https://etherscan.io/token/0xbe9895146f7af43049ca1c1ae358b0541ea49704#readProxyContract#F26\n [Token.cbETH]: '2',\n [Token.ALT]: '1',\n [Token.pufETHwstE]: 'v7.0.0',\n [Token.pufETH]: '1',\n [Token.WBTC]: '',\n [Token.LBTC]: '',\n [Token.tBTC]: '',\n [Token.cbBTC]: '',\n [Token.pumpBTC]: '',\n [Token.SolvBTC]: '',\n [Token.PUFFER]: '1',\n [Token.CARROT]: '1',\n [Token.lvlUSD]: '1',\n [Token.slvlUSD]: '1',\n [Token.mtwCARROT]: '',\n\n // UniFi Tokens\n // https://etherscan.io/address/0x196ead472583bc1e9af7a05f860d9857e1bd3dcc#code#F7#L172\n [UnifiToken.unifiETH]: '1',\n // https://etherscan.io/address/0x82c40e07277eBb92935f79cE92268F80dDc7caB4#code#F7#L172\n [UnifiToken.unifiUSD]: '1',\n // https://etherscan.io/address/0x170d847a8320f3b6a77ee15b0cae430e3ec933a0#code#F7#L172\n [UnifiToken.unifiBTC]: '1',\n // https://etherscan.io/address/0x62a4ce0722ee65635c0f8339dd814d549b6f6735#code#F7#L172\n [UnifiToken.pufETHs]: '1',\n};\n\nexport const TOKENS_SALT: Partial<{\n [key in AnyToken]: { [chain in Chain]: Address };\n}> = {\n [Token.pufETHwstE]: {\n // Taken from\n // https://etherscan.io/token/0xeeda34a377dd0ca676b9511ee1324974fa8d980d#readContract#F39.\n [Chain.Mainnet]:\n '0x0e986ed5610121905f03fd3850cebcc00f66166fc3ab760acb4e087d735d9457',\n [Chain.Holesky]:\n '0x0000000000000000000000000000000000000000000000000000000000000000',\n },\n};\n"],"names":["Token","UnifiToken","TOKENS_ADDRESSES","Chain","TOKENS_PERMIT_VERSION","TOKENS_SALT"],"mappings":";AAGY,IAAAA,sBAAAA,OACVA,EAAA,OAAO,QACPA,EAAA,OAAO,QACPA,EAAA,MAAM,OACNA,EAAA,OAAO,QACPA,EAAA,QAAQ,SACRA,EAAA,SAAS,UACTA,EAAA,OAAO,QACPA,EAAA,QAAQ,SACRA,EAAA,MAAM,OACNA,EAAA,aAAa,cACbA,EAAA,SAAS,UACTA,EAAA,OA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AEN;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../constants-DA2xUb9r.cjs"),c=require("./tokens.cjs"),a={[c.UnifiToken.unifiETH]:{[e.Chain.Mainnet]:{NucleusBoringVault:"0x196ead472583bc1e9af7a05f860d9857e1bd3dcc",NucleusAccountant:"0xa9fb7e2922216debe3fd5e1bbe7591ee446dc21c",NucleusTeller:"0x08eb2eccdf6ebd7aba601791f23ec5b5f68a1d53"}},[c.UnifiToken.unifiUSD]:{[e.Chain.Mainnet]:{NucleusBoringVault:"0x82c40e07277eBb92935f79cE92268F80dDc7caB4",NucleusAccountant:"0xe0bDb7b9225A2CeB42998dc2E51D4D3CDeb7e3Be",NucleusTeller:"0x5d3Fb47FE7f3F4Ce8fe55518f7E4F7D6061B54DD"}},[c.UnifiToken.unifiBTC]:{[e.Chain.Mainnet]:{NucleusBoringVault:"0x170d847a8320f3b6a77ee15b0cae430e3ec933a0",NucleusAccountant:"0x2afb28b0561d99b5e00829ec2ef54946a00a35f7",NucleusTeller:"0x0743647a607822781f9d0a639454e76289182f0b"}},[c.UnifiToken.pufETHs]:{[e.Chain.Mainnet]:{NucleusBoringVault:"0x62a4ce0722ee65635c0f8339dd814d549b6f6735",NucleusAccountant:"0xa99a92c505ff92c543d9d48295f1f31024afb31f",NucleusTeller:"0xd049ebeaa59b75ba8ee38f9f6830db7293320236"}}};exports.VAULTS_ADDRESSES=a;
2
+ //# sourceMappingURL=vaults-addresses.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vaults-addresses.cjs","sources":["../../lib/contracts/vaults-addresses.ts"],"sourcesContent":["import { Chain } from '../chains/constants';\nimport { UnifiToken } from './tokens';\n\nexport const VAULTS_ADDRESSES = {\n [UnifiToken.unifiETH]: {\n [Chain.Mainnet]: {\n NucleusBoringVault: '0x196ead472583bc1e9af7a05f860d9857e1bd3dcc',\n NucleusAccountant: '0xa9fb7e2922216debe3fd5e1bbe7591ee446dc21c',\n NucleusTeller: '0x08eb2eccdf6ebd7aba601791f23ec5b5f68a1d53',\n },\n },\n [UnifiToken.unifiUSD]: {\n [Chain.Mainnet]: {\n NucleusBoringVault: '0x82c40e07277eBb92935f79cE92268F80dDc7caB4',\n NucleusAccountant: '0xe0bDb7b9225A2CeB42998dc2E51D4D3CDeb7e3Be',\n NucleusTeller: '0x5d3Fb47FE7f3F4Ce8fe55518f7E4F7D6061B54DD',\n },\n },\n [UnifiToken.unifiBTC]: {\n [Chain.Mainnet]: {\n NucleusBoringVault: '0x170d847a8320f3b6a77ee15b0cae430e3ec933a0',\n NucleusAccountant: '0x2afb28b0561d99b5e00829ec2ef54946a00a35f7',\n NucleusTeller: '0x0743647a607822781f9d0a639454e76289182f0b',\n },\n },\n [UnifiToken.pufETHs]: {\n [Chain.Mainnet]: {\n NucleusBoringVault: '0x62a4ce0722ee65635c0f8339dd814d549b6f6735',\n NucleusAccountant: '0xa99a92c505ff92c543d9d48295f1f31024afb31f',\n NucleusTeller: '0xd049ebeaa59b75ba8ee38f9f6830db7293320236',\n },\n },\n};\n"],"names":["VAULTS_ADDRESSES","UnifiToken","Chain"],"mappings":"uJAGaA,EAAmB,CAC9B,CAACC,EAAAA,WAAW,QAAQ,EAAG,CACrB,CAACC,EAAAA,MAAM,OAAO,EAAG,CACf,mBAAoB,6CACpB,kBAAmB,6CACnB,cAAe,4CAAA,CAEnB,EACA,CAACD,EAAAA,WAAW,QAAQ,EAAG,CACrB,CAACC,EAAAA,MAAM,OAAO,EAAG,CACf,mBAAoB,6CACpB,kBAAmB,6CACnB,cAAe,4CAAA,CAEnB,EACA,CAACD,EAAAA,WAAW,QAAQ,EAAG,CACrB,CAACC,EAAAA,MAAM,OAAO,EAAG,CACf,mBAAoB,6CACpB,kBAAmB,6CACnB,cAAe,4CAAA,CAEnB,EACA,CAACD,EAAAA,WAAW,OAAO,EAAG,CACpB,CAACC,EAAAA,MAAM,OAAO,EAAG,CACf,mBAAoB,6CACpB,kBAAmB,6CACnB,cAAe,4CAAA,CACjB,CAEJ"}
@@ -0,0 +1,30 @@
1
+ export declare const VAULTS_ADDRESSES: {
2
+ unifiETH: {
3
+ [x: number]: {
4
+ NucleusBoringVault: string;
5
+ NucleusAccountant: string;
6
+ NucleusTeller: string;
7
+ };
8
+ };
9
+ unifiUSD: {
10
+ [x: number]: {
11
+ NucleusBoringVault: string;
12
+ NucleusAccountant: string;
13
+ NucleusTeller: string;
14
+ };
15
+ };
16
+ unifiBTC: {
17
+ [x: number]: {
18
+ NucleusBoringVault: string;
19
+ NucleusAccountant: string;
20
+ NucleusTeller: string;
21
+ };
22
+ };
23
+ pufETHs: {
24
+ [x: number]: {
25
+ NucleusBoringVault: string;
26
+ NucleusAccountant: string;
27
+ NucleusTeller: string;
28
+ };
29
+ };
30
+ };
@@ -0,0 +1,36 @@
1
+ import { C as e } from "../constants-BjRNQpT2.js";
2
+ import { UnifiToken as c } from "./tokens.js";
3
+ const f = {
4
+ [c.unifiETH]: {
5
+ [e.Mainnet]: {
6
+ NucleusBoringVault: "0x196ead472583bc1e9af7a05f860d9857e1bd3dcc",
7
+ NucleusAccountant: "0xa9fb7e2922216debe3fd5e1bbe7591ee446dc21c",
8
+ NucleusTeller: "0x08eb2eccdf6ebd7aba601791f23ec5b5f68a1d53"
9
+ }
10
+ },
11
+ [c.unifiUSD]: {
12
+ [e.Mainnet]: {
13
+ NucleusBoringVault: "0x82c40e07277eBb92935f79cE92268F80dDc7caB4",
14
+ NucleusAccountant: "0xe0bDb7b9225A2CeB42998dc2E51D4D3CDeb7e3Be",
15
+ NucleusTeller: "0x5d3Fb47FE7f3F4Ce8fe55518f7E4F7D6061B54DD"
16
+ }
17
+ },
18
+ [c.unifiBTC]: {
19
+ [e.Mainnet]: {
20
+ NucleusBoringVault: "0x170d847a8320f3b6a77ee15b0cae430e3ec933a0",
21
+ NucleusAccountant: "0x2afb28b0561d99b5e00829ec2ef54946a00a35f7",
22
+ NucleusTeller: "0x0743647a607822781f9d0a639454e76289182f0b"
23
+ }
24
+ },
25
+ [c.pufETHs]: {
26
+ [e.Mainnet]: {
27
+ NucleusBoringVault: "0x62a4ce0722ee65635c0f8339dd814d549b6f6735",
28
+ NucleusAccountant: "0xa99a92c505ff92c543d9d48295f1f31024afb31f",
29
+ NucleusTeller: "0xd049ebeaa59b75ba8ee38f9f6830db7293320236"
30
+ }
31
+ }
32
+ };
33
+ export {
34
+ f as VAULTS_ADDRESSES
35
+ };
36
+ //# sourceMappingURL=vaults-addresses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vaults-addresses.js","sources":["../../lib/contracts/vaults-addresses.ts"],"sourcesContent":["import { Chain } from '../chains/constants';\nimport { UnifiToken } from './tokens';\n\nexport const VAULTS_ADDRESSES = {\n [UnifiToken.unifiETH]: {\n [Chain.Mainnet]: {\n NucleusBoringVault: '0x196ead472583bc1e9af7a05f860d9857e1bd3dcc',\n NucleusAccountant: '0xa9fb7e2922216debe3fd5e1bbe7591ee446dc21c',\n NucleusTeller: '0x08eb2eccdf6ebd7aba601791f23ec5b5f68a1d53',\n },\n },\n [UnifiToken.unifiUSD]: {\n [Chain.Mainnet]: {\n NucleusBoringVault: '0x82c40e07277eBb92935f79cE92268F80dDc7caB4',\n NucleusAccountant: '0xe0bDb7b9225A2CeB42998dc2E51D4D3CDeb7e3Be',\n NucleusTeller: '0x5d3Fb47FE7f3F4Ce8fe55518f7E4F7D6061B54DD',\n },\n },\n [UnifiToken.unifiBTC]: {\n [Chain.Mainnet]: {\n NucleusBoringVault: '0x170d847a8320f3b6a77ee15b0cae430e3ec933a0',\n NucleusAccountant: '0x2afb28b0561d99b5e00829ec2ef54946a00a35f7',\n NucleusTeller: '0x0743647a607822781f9d0a639454e76289182f0b',\n },\n },\n [UnifiToken.pufETHs]: {\n [Chain.Mainnet]: {\n NucleusBoringVault: '0x62a4ce0722ee65635c0f8339dd814d549b6f6735',\n NucleusAccountant: '0xa99a92c505ff92c543d9d48295f1f31024afb31f',\n NucleusTeller: '0xd049ebeaa59b75ba8ee38f9f6830db7293320236',\n },\n },\n};\n"],"names":["VAULTS_ADDRESSES","UnifiToken","Chain"],"mappings":";;AAGO,MAAMA,IAAmB;AAAA,EAC9B,CAACC,EAAW,QAAQ,GAAG;AAAA,IACrB,CAACC,EAAM,OAAO,GAAG;AAAA,MACf,oBAAoB;AAAA,MACpB,mBAAmB;AAAA,MACnB,eAAe;AAAA,IAAA;AAAA,EAEnB;AAAA,EACA,CAACD,EAAW,QAAQ,GAAG;AAAA,IACrB,CAACC,EAAM,OAAO,GAAG;AAAA,MACf,oBAAoB;AAAA,MACpB,mBAAmB;AAAA,MACnB,eAAe;AAAA,IAAA;AAAA,EAEnB;AAAA,EACA,CAACD,EAAW,QAAQ,GAAG;AAAA,IACrB,CAACC,EAAM,OAAO,GAAG;AAAA,MACf,oBAAoB;AAAA,MACpB,mBAAmB;AAAA,MACnB,eAAe;AAAA,IAAA;AAAA,EAEnB;AAAA,EACA,CAACD,EAAW,OAAO,GAAG;AAAA,IACpB,CAACC,EAAM,OAAO,GAAG;AAAA,MACf,oBAAoB;AAAA,MACpB,mBAAmB;AAAA,MACnB,eAAe;AAAA,IAAA;AAAA,EACjB;AAEJ;"}
package/dist/main.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./api/puffer-client.cjs"),t=require("./api/puffer-client-helpers.cjs"),r=require("./constants-DA2xUb9r.cjs"),e=require("./contracts/tokens.cjs"),a=require("./contracts/addresses.cjs"),l=require("./contracts/handlers/erc20-permit-handler.cjs"),s=require("./contracts/handlers/l1-reward-manager-handler.cjs"),o=require("./contracts/handlers/l2-reward-manager-handler.cjs"),d=require("./contracts/handlers/puf-locker-handler.cjs"),i=require("./contracts/handlers/puffer-depositor-handler.cjs"),f=require("./contracts/handlers/puffer-l2-depositor-handler.cjs"),c=require("./contracts/handlers/puffer-vault-handler.cjs"),u=require("./contracts/handlers/puffer-withdrawal-manager-handler.cjs");exports.PufferClient=n.PufferClient;exports.PufferClientHelpers=t.PufferClientHelpers;exports.Chain=r.Chain;exports.VIEM_CHAINS=r.VIEM_CHAINS;exports.TOKENS_ADDRESSES=e.TOKENS_ADDRESSES;exports.TOKENS_PERMIT_VERSION=e.TOKENS_PERMIT_VERSION;exports.TOKENS_SALT=e.TOKENS_SALT;exports.Token=e.Token;exports.UnifiToken=e.UnifiToken;exports.CONTRACT_ADDRESSES=a.CONTRACT_ADDRESSES;exports.NUCLEUS_CONTRACT_ADDRESSES=a.NUCLEUS_CONTRACT_ADDRESSES;exports.ERC20PermitHandler=l.ERC20PermitHandler;exports.L1RewardManagerHandler=s.L1RewardManagerHandler;exports.L2RewardManagerHandler=o.L2RewardManagerHandler;exports.PufLockerHandler=d.PufLockerHandler;exports.PufferDepositorHandler=i.PufferDepositorHandler;exports.PufferL2DepositorHandler=f.PufferL2DepositorHandler;exports.PufferVaultHandler=c.PufferVaultHandler;exports.PufferWithdrawalManagerHandler=u.PufferWithdrawalManagerHandler;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./api/puffer-client.cjs"),n=require("./api/puffer-client-helpers.cjs"),r=require("./constants-DA2xUb9r.cjs"),e=require("./contracts/tokens.cjs"),t=require("./contracts/addresses.cjs"),l=require("./contracts/handlers/erc20-permit-handler.cjs"),s=require("./contracts/handlers/l1-reward-manager-handler.cjs"),o=require("./contracts/handlers/l2-reward-manager-handler.cjs"),d=require("./contracts/handlers/puf-locker-handler.cjs"),i=require("./contracts/handlers/puffer-depositor-handler.cjs"),f=require("./contracts/handlers/puffer-l2-depositor-handler.cjs"),c=require("./contracts/handlers/puffer-vault-handler.cjs"),u=require("./contracts/handlers/puffer-withdrawal-manager-handler.cjs");exports.PufferClient=a.PufferClient;exports.PufferClientHelpers=n.PufferClientHelpers;exports.Chain=r.Chain;exports.VIEM_CHAINS=r.VIEM_CHAINS;exports.TOKENS_ADDRESSES=e.TOKENS_ADDRESSES;exports.TOKENS_PERMIT_VERSION=e.TOKENS_PERMIT_VERSION;exports.TOKENS_SALT=e.TOKENS_SALT;exports.Token=e.Token;exports.UnifiToken=e.UnifiToken;exports.CONTRACT_ADDRESSES=t.CONTRACT_ADDRESSES;exports.ERC20PermitHandler=l.ERC20PermitHandler;exports.L1RewardManagerHandler=s.L1RewardManagerHandler;exports.L2RewardManagerHandler=o.L2RewardManagerHandler;exports.PufLockerHandler=d.PufLockerHandler;exports.PufferDepositorHandler=i.PufferDepositorHandler;exports.PufferL2DepositorHandler=f.PufferL2DepositorHandler;exports.PufferVaultHandler=c.PufferVaultHandler;exports.PufferWithdrawalManagerHandler=u.PufferWithdrawalManagerHandler;
2
2
  //# sourceMappingURL=main.cjs.map
package/dist/main.js CHANGED
@@ -1,35 +1,34 @@
1
1
  import { PufferClient as o } from "./api/puffer-client.js";
2
2
  import { PufferClientHelpers as a } from "./api/puffer-client-helpers.js";
3
3
  import { C as n, V as p } from "./constants-BjRNQpT2.js";
4
- import { TOKENS_ADDRESSES as m, TOKENS_PERMIT_VERSION as E, TOKENS_SALT as l, Token as x, UnifiToken as d } from "./contracts/tokens.js";
5
- import { CONTRACT_ADDRESSES as T, NUCLEUS_CONTRACT_ADDRESSES as H } from "./contracts/addresses.js";
6
- import { ERC20PermitHandler as i } from "./contracts/handlers/erc20-permit-handler.js";
7
- import { L1RewardManagerHandler as u } from "./contracts/handlers/l1-reward-manager-handler.js";
8
- import { L2RewardManagerHandler as N } from "./contracts/handlers/l2-reward-manager-handler.js";
9
- import { PufLockerHandler as A } from "./contracts/handlers/puf-locker-handler.js";
10
- import { PufferDepositorHandler as O } from "./contracts/handlers/puffer-depositor-handler.js";
4
+ import { TOKENS_ADDRESSES as l, TOKENS_PERMIT_VERSION as x, TOKENS_SALT as S, Token as d, UnifiToken as E } from "./contracts/tokens.js";
5
+ import { CONTRACT_ADDRESSES as i } from "./contracts/addresses.js";
6
+ import { ERC20PermitHandler as T } from "./contracts/handlers/erc20-permit-handler.js";
7
+ import { L1RewardManagerHandler as C } from "./contracts/handlers/l1-reward-manager-handler.js";
8
+ import { L2RewardManagerHandler as D } from "./contracts/handlers/l2-reward-manager-handler.js";
9
+ import { PufLockerHandler as _ } from "./contracts/handlers/puf-locker-handler.js";
10
+ import { PufferDepositorHandler as A } from "./contracts/handlers/puffer-depositor-handler.js";
11
11
  import { PufferL2DepositorHandler as M } from "./contracts/handlers/puffer-l2-depositor-handler.js";
12
- import { PufferVaultHandler as V } from "./contracts/handlers/puffer-vault-handler.js";
13
- import { PufferWithdrawalManagerHandler as k } from "./contracts/handlers/puffer-withdrawal-manager-handler.js";
12
+ import { PufferVaultHandler as I } from "./contracts/handlers/puffer-vault-handler.js";
13
+ import { PufferWithdrawalManagerHandler as g } from "./contracts/handlers/puffer-withdrawal-manager-handler.js";
14
14
  export {
15
- T as CONTRACT_ADDRESSES,
15
+ i as CONTRACT_ADDRESSES,
16
16
  n as Chain,
17
- i as ERC20PermitHandler,
18
- u as L1RewardManagerHandler,
19
- N as L2RewardManagerHandler,
20
- H as NUCLEUS_CONTRACT_ADDRESSES,
21
- A as PufLockerHandler,
17
+ T as ERC20PermitHandler,
18
+ C as L1RewardManagerHandler,
19
+ D as L2RewardManagerHandler,
20
+ _ as PufLockerHandler,
22
21
  o as PufferClient,
23
22
  a as PufferClientHelpers,
24
- O as PufferDepositorHandler,
23
+ A as PufferDepositorHandler,
25
24
  M as PufferL2DepositorHandler,
26
- V as PufferVaultHandler,
27
- k as PufferWithdrawalManagerHandler,
28
- m as TOKENS_ADDRESSES,
29
- E as TOKENS_PERMIT_VERSION,
30
- l as TOKENS_SALT,
31
- x as Token,
32
- d as UnifiToken,
25
+ I as PufferVaultHandler,
26
+ g as PufferWithdrawalManagerHandler,
27
+ l as TOKENS_ADDRESSES,
28
+ x as TOKENS_PERMIT_VERSION,
29
+ S as TOKENS_SALT,
30
+ d as Token,
31
+ E as UnifiToken,
33
32
  p as VIEM_CHAINS
34
33
  };
35
34
  //# sourceMappingURL=main.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="1.10.2",o=e;exports.version=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="1.11.1",o=e;exports.version=o;
2
2
  //# sourceMappingURL=version.cjs.map
@@ -1,4 +1,4 @@
1
- const o = "1.10.2", n = o;
1
+ const o = "1.11.1", n = o;
2
2
  export {
3
3
  n as version
4
4
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pufferfinance/puffer-sdk",
3
3
  "description": "SDK for interacting with the puffer smart contracts",
4
- "version": "1.11.0",
4
+ "version": "1.11.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/PufferFinance/puffer-sdk.git"