@pufferfinance/puffer-sdk 1.27.1 → 1.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/puffer-client.cjs +1 -1
- package/dist/api/puffer-client.cjs.map +1 -1
- package/dist/api/puffer-client.d.ts +3 -0
- package/dist/api/puffer-client.js +20 -13
- package/dist/api/puffer-client.js.map +1 -1
- package/dist/contracts/abis/mainnet/CarrotVesting.cjs +2 -0
- package/dist/contracts/abis/mainnet/CarrotVesting.cjs.map +1 -0
- package/dist/contracts/abis/mainnet/CarrotVesting.d.ts +192 -0
- package/dist/contracts/abis/mainnet/CarrotVesting.js +129 -0
- package/dist/contracts/abis/mainnet/CarrotVesting.js.map +1 -0
- package/dist/contracts/addresses.cjs +1 -1
- package/dist/contracts/addresses.cjs.map +1 -1
- package/dist/contracts/addresses.d.ts +4 -0
- package/dist/contracts/addresses.js +5 -2
- package/dist/contracts/addresses.js.map +1 -1
- package/dist/contracts/handlers/carrot-vesting-handler.cjs +2 -0
- package/dist/contracts/handlers/carrot-vesting-handler.cjs.map +1 -0
- package/dist/contracts/handlers/carrot-vesting-handler.d.ts +14692 -0
- package/dist/contracts/handlers/carrot-vesting-handler.js +201 -0
- package/dist/contracts/handlers/carrot-vesting-handler.js.map +1 -0
- package/dist/utils/version.cjs +1 -1
- package/dist/utils/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../constants-CxSgz27h.cjs"),a={[e.Chain.Mainnet]:{PufferVault:"0xD9A442856C234a39a81a089C06451EBAa4306a72",PufferDepositor:"0x4aa799c5dfc01ee7d790e3bf1a7c2257ce1dceff",PufferL2Depositor:"0x3436E0B85cd929929F5802e792CFE282166E0259",PufLocker:"0x48e8dE138C246c14248C94d2D616a2F9eb4590D2",L1RewardManager:"0x157788cc028Ac6405bD406f2D1e0A8A22b3cf17b",L2RewardManager:"0x0000000000000000000000000000000000000000",PufferWithdrawalManager:"0xDdA0483184E75a5579ef9635ED14BacCf9d50283",NucleusAtomicQueue:"0x228c44bb4885c6633f4b6c83f14622f37d5112e5",CarrotStaker:"0x99c599227c65132822f0290d9e5b4b0430d6c0d6",Distributor:"0x3Ef3D8bA38EBe18DB133cEc108f4D14CE00Dd9Ae",ValidatorTicket:"0x7D26AD6F6BA9D6bA1de0218Ae5e20CD3a273a55A",PufferOracleV2:"0x0BE2aE0edbeBb517541DF217EF0074FC9a9e994f",PufferProtocol:"0xf7b6B32492c2e13799D921E84202450131bd238B",GuardianModule:"0x628b183F248a142A598AA2dcCCD6f7E480a7CcF2",GaugeRegistry:"0x0000000000000000000000000000000000000000"},[e.Chain.Holesky]:{PufferVault:"0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9",PufferDepositor:"0x824AC05aeb86A0aD770b8acDe0906d2d4a6c4A8c",PufferL2Depositor:"0x0af6998e4828ad8ef8f79a9288d0a861890f791d",PufLocker:"0xa58983ad0899a452b7420bc57228e329d7ba92b6",L1RewardManager:"0x10f970bcb84B82B82a65eBCbF45F26dD26D69F12",L2RewardManager:"0x58C046794f69A8830b0BE737022a45b4acd01dE5",PufferWithdrawalManager:"0x5A3E1069B66800c0ecbc91bd81b1AE4D1804DBc4",ValidatorTicket:"0xB028194785178a94Fe608994A4d5AD84c285A640",PufferOracleV2:"0x8e043ed3f06720615685d4978770cd5c8fe90fe3",PufferProtocol:"0xE00c79408B9De5BaD2FDEbB1688997a68eC988CD",GuardianModule:"0x0910310130d1c062def8b807528bdac80203bc66",GaugeRegistry:"0x0000000000000000000000000000000000000000"},[e.Chain.Sepolia]:{GaugeRegistry:"0x14b25b3a3C1e6032e7Fbf0309d1ef6881e9A8D7A"},[e.Chain.Base]:{L2RewardManager:"0xF9Dd335bF363b2E4ecFe3c94A86EBD7Dd3Dcf0e7"}};exports.CONTRACT_ADDRESSES=a;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../constants-CxSgz27h.cjs"),a={[e.Chain.Mainnet]:{PufferVault:"0xD9A442856C234a39a81a089C06451EBAa4306a72",PufferDepositor:"0x4aa799c5dfc01ee7d790e3bf1a7c2257ce1dceff",PufferL2Depositor:"0x3436E0B85cd929929F5802e792CFE282166E0259",PufLocker:"0x48e8dE138C246c14248C94d2D616a2F9eb4590D2",L1RewardManager:"0x157788cc028Ac6405bD406f2D1e0A8A22b3cf17b",L2RewardManager:"0x0000000000000000000000000000000000000000",PufferWithdrawalManager:"0xDdA0483184E75a5579ef9635ED14BacCf9d50283",NucleusAtomicQueue:"0x228c44bb4885c6633f4b6c83f14622f37d5112e5",CarrotStaker:"0x99c599227c65132822f0290d9e5b4b0430d6c0d6",Distributor:"0x3Ef3D8bA38EBe18DB133cEc108f4D14CE00Dd9Ae",ValidatorTicket:"0x7D26AD6F6BA9D6bA1de0218Ae5e20CD3a273a55A",PufferOracleV2:"0x0BE2aE0edbeBb517541DF217EF0074FC9a9e994f",PufferProtocol:"0xf7b6B32492c2e13799D921E84202450131bd238B",GuardianModule:"0x628b183F248a142A598AA2dcCCD6f7E480a7CcF2",GaugeRegistry:"0x0000000000000000000000000000000000000000",CarrotVesting:"0xd5f8a4f8312a1745aebe89bb92e90806721322c3"},[e.Chain.Holesky]:{PufferVault:"0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9",PufferDepositor:"0x824AC05aeb86A0aD770b8acDe0906d2d4a6c4A8c",PufferL2Depositor:"0x0af6998e4828ad8ef8f79a9288d0a861890f791d",PufLocker:"0xa58983ad0899a452b7420bc57228e329d7ba92b6",L1RewardManager:"0x10f970bcb84B82B82a65eBCbF45F26dD26D69F12",L2RewardManager:"0x58C046794f69A8830b0BE737022a45b4acd01dE5",PufferWithdrawalManager:"0x5A3E1069B66800c0ecbc91bd81b1AE4D1804DBc4",ValidatorTicket:"0xB028194785178a94Fe608994A4d5AD84c285A640",PufferOracleV2:"0x8e043ed3f06720615685d4978770cd5c8fe90fe3",PufferProtocol:"0xE00c79408B9De5BaD2FDEbB1688997a68eC988CD",GuardianModule:"0x0910310130d1c062def8b807528bdac80203bc66",GaugeRegistry:"0x0000000000000000000000000000000000000000",CarrotVesting:"0x0000000000000000000000000000000000000000"},[e.Chain.Sepolia]:{GaugeRegistry:"0x14b25b3a3C1e6032e7Fbf0309d1ef6881e9A8D7A"},[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';\n\n// Source of truth:\n// https://github.com/PufferFinance/Deployments-and-ACL/tree/main/docs/deployments\nexport const CONTRACT_ADDRESSES = {\n // Casting to number so the consumer can use chain ids. Also not using\n // a generic type for the variable so the consumer knows which\n // contracts can be accessed.\n [Chain.Mainnet as number]: {\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: '0x228c44bb4885c6633f4b6c83f14622f37d5112e5',\n CarrotStaker: '0x99c599227c65132822f0290d9e5b4b0430d6c0d6',\n Distributor: '0x3Ef3D8bA38EBe18DB133cEc108f4D14CE00Dd9Ae',\n ValidatorTicket: '0x7D26AD6F6BA9D6bA1de0218Ae5e20CD3a273a55A',\n PufferOracleV2: '0x0BE2aE0edbeBb517541DF217EF0074FC9a9e994f',\n PufferProtocol: '0xf7b6B32492c2e13799D921E84202450131bd238B',\n GuardianModule: '0x628b183F248a142A598AA2dcCCD6f7E480a7CcF2',\n GaugeRegistry: '0x0000000000000000000000000000000000000000',\n },\n [Chain.Holesky as number]: {\n PufferVault: '0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9',\n PufferDepositor: '0x824AC05aeb86A0aD770b8acDe0906d2d4a6c4A8c',\n PufferL2Depositor: '0x0af6998e4828ad8ef8f79a9288d0a861890f791d',\n PufLocker: '0xa58983ad0899a452b7420bc57228e329d7ba92b6',\n L1RewardManager: '0x10f970bcb84B82B82a65eBCbF45F26dD26D69F12',\n L2RewardManager: '0x58C046794f69A8830b0BE737022a45b4acd01dE5',\n PufferWithdrawalManager: '0x5A3E1069B66800c0ecbc91bd81b1AE4D1804DBc4',\n ValidatorTicket: '0xB028194785178a94Fe608994A4d5AD84c285A640',\n PufferOracleV2: '0x8e043ed3f06720615685d4978770cd5c8fe90fe3',\n PufferProtocol: '0xE00c79408B9De5BaD2FDEbB1688997a68eC988CD',\n GuardianModule: '0x0910310130d1c062def8b807528bdac80203bc66',\n GaugeRegistry: '0x0000000000000000000000000000000000000000',\n },\n [Chain.Sepolia as number]: {\n GaugeRegistry: '0x14b25b3a3C1e6032e7Fbf0309d1ef6881e9A8D7A',\n },\n [Chain.Base as number]: {\n L2RewardManager: '0xF9Dd335bF363b2E4ecFe3c94A86EBD7Dd3Dcf0e7',\n },\n};\n"],"names":["CONTRACT_ADDRESSES","Chain"],"mappings":"6HAIaA,EAAqB,CAIhC,CAACC,EAAAA,MAAM,OAAiB,EAAG,CACzB,YAAa,6CACb,gBAAiB,6CACjB,kBAAmB,6CACnB,UAAW,6CACX,gBAAiB,6CAEjB,gBAAiB,6CACjB,wBAAyB,6CACzB,mBAAoB,6CACpB,aAAc,6CACd,YAAa,6CACb,gBAAiB,6CACjB,eAAgB,6CAChB,eAAgB,6CAChB,eAAgB,6CAChB,cAAe,4CACjB,EACA,CAACA,EAAAA,MAAM,OAAiB,EAAG,CACzB,YAAa,6CACb,gBAAiB,6CACjB,kBAAmB,6CACnB,UAAW,6CACX,gBAAiB,6CACjB,gBAAiB,6CACjB,wBAAyB,6CACzB,gBAAiB,6CACjB,eAAgB,6CAChB,eAAgB,6CAChB,eAAgB,6CAChB,cAAe,4CACjB,EACA,CAACA,EAAAA,MAAM,OAAiB,EAAG,CACzB,cAAe,4CACjB,EACA,CAACA,EAAAA,MAAM,IAAc,EAAG,CACtB,gBAAiB,4CAAA,CAErB"}
|
|
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 // Casting to number so the consumer can use chain ids. Also not using\n // a generic type for the variable so the consumer knows which\n // contracts can be accessed.\n [Chain.Mainnet as number]: {\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: '0x228c44bb4885c6633f4b6c83f14622f37d5112e5',\n CarrotStaker: '0x99c599227c65132822f0290d9e5b4b0430d6c0d6',\n Distributor: '0x3Ef3D8bA38EBe18DB133cEc108f4D14CE00Dd9Ae',\n ValidatorTicket: '0x7D26AD6F6BA9D6bA1de0218Ae5e20CD3a273a55A',\n PufferOracleV2: '0x0BE2aE0edbeBb517541DF217EF0074FC9a9e994f',\n PufferProtocol: '0xf7b6B32492c2e13799D921E84202450131bd238B',\n GuardianModule: '0x628b183F248a142A598AA2dcCCD6f7E480a7CcF2',\n GaugeRegistry: '0x0000000000000000000000000000000000000000',\n // TODO: Replace this tenderly address with the mainnet address.\n CarrotVesting: '0xd5f8a4f8312a1745aebe89bb92e90806721322c3',\n },\n [Chain.Holesky as number]: {\n PufferVault: '0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9',\n PufferDepositor: '0x824AC05aeb86A0aD770b8acDe0906d2d4a6c4A8c',\n PufferL2Depositor: '0x0af6998e4828ad8ef8f79a9288d0a861890f791d',\n PufLocker: '0xa58983ad0899a452b7420bc57228e329d7ba92b6',\n L1RewardManager: '0x10f970bcb84B82B82a65eBCbF45F26dD26D69F12',\n L2RewardManager: '0x58C046794f69A8830b0BE737022a45b4acd01dE5',\n PufferWithdrawalManager: '0x5A3E1069B66800c0ecbc91bd81b1AE4D1804DBc4',\n ValidatorTicket: '0xB028194785178a94Fe608994A4d5AD84c285A640',\n PufferOracleV2: '0x8e043ed3f06720615685d4978770cd5c8fe90fe3',\n PufferProtocol: '0xE00c79408B9De5BaD2FDEbB1688997a68eC988CD',\n GuardianModule: '0x0910310130d1c062def8b807528bdac80203bc66',\n GaugeRegistry: '0x0000000000000000000000000000000000000000',\n CarrotVesting: '0x0000000000000000000000000000000000000000',\n },\n [Chain.Sepolia as number]: {\n GaugeRegistry: '0x14b25b3a3C1e6032e7Fbf0309d1ef6881e9A8D7A',\n },\n [Chain.Base as number]: {\n L2RewardManager: '0xF9Dd335bF363b2E4ecFe3c94A86EBD7Dd3Dcf0e7',\n },\n};\n"],"names":["CONTRACT_ADDRESSES","Chain"],"mappings":"6HAIaA,EAAqB,CAIhC,CAACC,EAAAA,MAAM,OAAiB,EAAG,CACzB,YAAa,6CACb,gBAAiB,6CACjB,kBAAmB,6CACnB,UAAW,6CACX,gBAAiB,6CAEjB,gBAAiB,6CACjB,wBAAyB,6CACzB,mBAAoB,6CACpB,aAAc,6CACd,YAAa,6CACb,gBAAiB,6CACjB,eAAgB,6CAChB,eAAgB,6CAChB,eAAgB,6CAChB,cAAe,6CAEf,cAAe,4CACjB,EACA,CAACA,EAAAA,MAAM,OAAiB,EAAG,CACzB,YAAa,6CACb,gBAAiB,6CACjB,kBAAmB,6CACnB,UAAW,6CACX,gBAAiB,6CACjB,gBAAiB,6CACjB,wBAAyB,6CACzB,gBAAiB,6CACjB,eAAgB,6CAChB,eAAgB,6CAChB,eAAgB,6CAChB,cAAe,6CACf,cAAe,4CACjB,EACA,CAACA,EAAAA,MAAM,OAAiB,EAAG,CACzB,cAAe,4CACjB,EACA,CAACA,EAAAA,MAAM,IAAc,EAAG,CACtB,gBAAiB,4CAAA,CAErB"}
|
|
@@ -15,6 +15,7 @@ export declare const CONTRACT_ADDRESSES: {
|
|
|
15
15
|
PufferProtocol: string;
|
|
16
16
|
GuardianModule: string;
|
|
17
17
|
GaugeRegistry: string;
|
|
18
|
+
CarrotVesting: string;
|
|
18
19
|
} | {
|
|
19
20
|
PufferVault: string;
|
|
20
21
|
PufferDepositor: string;
|
|
@@ -28,6 +29,7 @@ export declare const CONTRACT_ADDRESSES: {
|
|
|
28
29
|
PufferProtocol: string;
|
|
29
30
|
GuardianModule: string;
|
|
30
31
|
GaugeRegistry: string;
|
|
32
|
+
CarrotVesting: string;
|
|
31
33
|
NucleusAtomicQueue?: undefined;
|
|
32
34
|
CarrotStaker?: undefined;
|
|
33
35
|
Distributor?: undefined;
|
|
@@ -47,6 +49,7 @@ export declare const CONTRACT_ADDRESSES: {
|
|
|
47
49
|
PufferOracleV2?: undefined;
|
|
48
50
|
PufferProtocol?: undefined;
|
|
49
51
|
GuardianModule?: undefined;
|
|
52
|
+
CarrotVesting?: undefined;
|
|
50
53
|
} | {
|
|
51
54
|
L2RewardManager: string;
|
|
52
55
|
PufferVault?: undefined;
|
|
@@ -63,5 +66,6 @@ export declare const CONTRACT_ADDRESSES: {
|
|
|
63
66
|
PufferProtocol?: undefined;
|
|
64
67
|
GuardianModule?: undefined;
|
|
65
68
|
GaugeRegistry?: undefined;
|
|
69
|
+
CarrotVesting?: undefined;
|
|
66
70
|
};
|
|
67
71
|
};
|
|
@@ -19,7 +19,9 @@ const f = {
|
|
|
19
19
|
PufferOracleV2: "0x0BE2aE0edbeBb517541DF217EF0074FC9a9e994f",
|
|
20
20
|
PufferProtocol: "0xf7b6B32492c2e13799D921E84202450131bd238B",
|
|
21
21
|
GuardianModule: "0x628b183F248a142A598AA2dcCCD6f7E480a7CcF2",
|
|
22
|
-
GaugeRegistry: "0x0000000000000000000000000000000000000000"
|
|
22
|
+
GaugeRegistry: "0x0000000000000000000000000000000000000000",
|
|
23
|
+
// TODO: Replace this tenderly address with the mainnet address.
|
|
24
|
+
CarrotVesting: "0xd5f8a4f8312a1745aebe89bb92e90806721322c3"
|
|
23
25
|
},
|
|
24
26
|
[e.Holesky]: {
|
|
25
27
|
PufferVault: "0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9",
|
|
@@ -33,7 +35,8 @@ const f = {
|
|
|
33
35
|
PufferOracleV2: "0x8e043ed3f06720615685d4978770cd5c8fe90fe3",
|
|
34
36
|
PufferProtocol: "0xE00c79408B9De5BaD2FDEbB1688997a68eC988CD",
|
|
35
37
|
GuardianModule: "0x0910310130d1c062def8b807528bdac80203bc66",
|
|
36
|
-
GaugeRegistry: "0x0000000000000000000000000000000000000000"
|
|
38
|
+
GaugeRegistry: "0x0000000000000000000000000000000000000000",
|
|
39
|
+
CarrotVesting: "0x0000000000000000000000000000000000000000"
|
|
37
40
|
},
|
|
38
41
|
[e.Sepolia]: {
|
|
39
42
|
GaugeRegistry: "0x14b25b3a3C1e6032e7Fbf0309d1ef6881e9A8D7A"
|
|
@@ -1 +1 @@
|
|
|
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 // Casting to number so the consumer can use chain ids. Also not using\n // a generic type for the variable so the consumer knows which\n // contracts can be accessed.\n [Chain.Mainnet as number]: {\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: '0x228c44bb4885c6633f4b6c83f14622f37d5112e5',\n CarrotStaker: '0x99c599227c65132822f0290d9e5b4b0430d6c0d6',\n Distributor: '0x3Ef3D8bA38EBe18DB133cEc108f4D14CE00Dd9Ae',\n ValidatorTicket: '0x7D26AD6F6BA9D6bA1de0218Ae5e20CD3a273a55A',\n PufferOracleV2: '0x0BE2aE0edbeBb517541DF217EF0074FC9a9e994f',\n PufferProtocol: '0xf7b6B32492c2e13799D921E84202450131bd238B',\n GuardianModule: '0x628b183F248a142A598AA2dcCCD6f7E480a7CcF2',\n GaugeRegistry: '0x0000000000000000000000000000000000000000',\n },\n [Chain.Holesky as number]: {\n PufferVault: '0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9',\n PufferDepositor: '0x824AC05aeb86A0aD770b8acDe0906d2d4a6c4A8c',\n PufferL2Depositor: '0x0af6998e4828ad8ef8f79a9288d0a861890f791d',\n PufLocker: '0xa58983ad0899a452b7420bc57228e329d7ba92b6',\n L1RewardManager: '0x10f970bcb84B82B82a65eBCbF45F26dD26D69F12',\n L2RewardManager: '0x58C046794f69A8830b0BE737022a45b4acd01dE5',\n PufferWithdrawalManager: '0x5A3E1069B66800c0ecbc91bd81b1AE4D1804DBc4',\n ValidatorTicket: '0xB028194785178a94Fe608994A4d5AD84c285A640',\n PufferOracleV2: '0x8e043ed3f06720615685d4978770cd5c8fe90fe3',\n PufferProtocol: '0xE00c79408B9De5BaD2FDEbB1688997a68eC988CD',\n GuardianModule: '0x0910310130d1c062def8b807528bdac80203bc66',\n GaugeRegistry: '0x0000000000000000000000000000000000000000',\n },\n [Chain.Sepolia as number]: {\n GaugeRegistry: '0x14b25b3a3C1e6032e7Fbf0309d1ef6881e9A8D7A',\n },\n [Chain.Base as number]: {\n L2RewardManager: '0xF9Dd335bF363b2E4ecFe3c94A86EBD7Dd3Dcf0e7',\n },\n};\n"],"names":["CONTRACT_ADDRESSES","Chain"],"mappings":";AAIO,MAAMA,IAAqB;AAAA;AAAA;AAAA;AAAA,EAIhC,CAACC,EAAM,OAAiB,GAAG;AAAA,IACzB,aAAa;AAAA,IACb,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,WAAW;AAAA,IACX,iBAAiB;AAAA;AAAA,IAEjB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,oBAAoB;AAAA,IACpB,cAAc;AAAA,IACd,aAAa;AAAA,IACb,iBAAiB;AAAA,IACjB,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,eAAe;AAAA,EACjB;AAAA,EACA,CAACA,EAAM,OAAiB,GAAG;AAAA,IACzB,aAAa;AAAA,IACb,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,WAAW;AAAA,IACX,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,iBAAiB;AAAA,IACjB,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,eAAe;AAAA,EACjB;AAAA,EACA,CAACA,EAAM,OAAiB,GAAG;AAAA,IACzB,eAAe;AAAA,EACjB;AAAA,EACA,CAACA,EAAM,IAAc,GAAG;AAAA,IACtB,iBAAiB;AAAA,EAAA;AAErB;"}
|
|
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 // Casting to number so the consumer can use chain ids. Also not using\n // a generic type for the variable so the consumer knows which\n // contracts can be accessed.\n [Chain.Mainnet as number]: {\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: '0x228c44bb4885c6633f4b6c83f14622f37d5112e5',\n CarrotStaker: '0x99c599227c65132822f0290d9e5b4b0430d6c0d6',\n Distributor: '0x3Ef3D8bA38EBe18DB133cEc108f4D14CE00Dd9Ae',\n ValidatorTicket: '0x7D26AD6F6BA9D6bA1de0218Ae5e20CD3a273a55A',\n PufferOracleV2: '0x0BE2aE0edbeBb517541DF217EF0074FC9a9e994f',\n PufferProtocol: '0xf7b6B32492c2e13799D921E84202450131bd238B',\n GuardianModule: '0x628b183F248a142A598AA2dcCCD6f7E480a7CcF2',\n GaugeRegistry: '0x0000000000000000000000000000000000000000',\n // TODO: Replace this tenderly address with the mainnet address.\n CarrotVesting: '0xd5f8a4f8312a1745aebe89bb92e90806721322c3',\n },\n [Chain.Holesky as number]: {\n PufferVault: '0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9',\n PufferDepositor: '0x824AC05aeb86A0aD770b8acDe0906d2d4a6c4A8c',\n PufferL2Depositor: '0x0af6998e4828ad8ef8f79a9288d0a861890f791d',\n PufLocker: '0xa58983ad0899a452b7420bc57228e329d7ba92b6',\n L1RewardManager: '0x10f970bcb84B82B82a65eBCbF45F26dD26D69F12',\n L2RewardManager: '0x58C046794f69A8830b0BE737022a45b4acd01dE5',\n PufferWithdrawalManager: '0x5A3E1069B66800c0ecbc91bd81b1AE4D1804DBc4',\n ValidatorTicket: '0xB028194785178a94Fe608994A4d5AD84c285A640',\n PufferOracleV2: '0x8e043ed3f06720615685d4978770cd5c8fe90fe3',\n PufferProtocol: '0xE00c79408B9De5BaD2FDEbB1688997a68eC988CD',\n GuardianModule: '0x0910310130d1c062def8b807528bdac80203bc66',\n GaugeRegistry: '0x0000000000000000000000000000000000000000',\n CarrotVesting: '0x0000000000000000000000000000000000000000',\n },\n [Chain.Sepolia as number]: {\n GaugeRegistry: '0x14b25b3a3C1e6032e7Fbf0309d1ef6881e9A8D7A',\n },\n [Chain.Base as number]: {\n L2RewardManager: '0xF9Dd335bF363b2E4ecFe3c94A86EBD7Dd3Dcf0e7',\n },\n};\n"],"names":["CONTRACT_ADDRESSES","Chain"],"mappings":";AAIO,MAAMA,IAAqB;AAAA;AAAA;AAAA;AAAA,EAIhC,CAACC,EAAM,OAAiB,GAAG;AAAA,IACzB,aAAa;AAAA,IACb,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,WAAW;AAAA,IACX,iBAAiB;AAAA;AAAA,IAEjB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,oBAAoB;AAAA,IACpB,cAAc;AAAA,IACd,aAAa;AAAA,IACb,iBAAiB;AAAA,IACjB,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,eAAe;AAAA;AAAA,IAEf,eAAe;AAAA,EACjB;AAAA,EACA,CAACA,EAAM,OAAiB,GAAG;AAAA,IACzB,aAAa;AAAA,IACb,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,WAAW;AAAA,IACX,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,IACzB,iBAAiB;AAAA,IACjB,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,eAAe;AAAA,EACjB;AAAA,EACA,CAACA,EAAM,OAAiB,GAAG;AAAA,IACzB,eAAe;AAAA,EACjB;AAAA,EACA,CAACA,EAAM,IAAc,GAAG;AAAA,IACtB,iBAAiB;AAAA,EAAA;AAErB;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var c=Object.defineProperty;var o=(a,t,e)=>t in a?c(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var i=(a,t,e)=>o(a,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../../constants-CxSgz27h.cjs"),h=require("../abis/mainnet/CarrotVesting.cjs"),l=require("../addresses.cjs"),C=require("../tokens.cjs"),d=require("./erc20-permit-handler.cjs"),g=require("../../getContract-DUA3M2pm.cjs");class m{constructor(t,e,r){i(this,"viemChain");i(this,"erc20PermitHandler");this.chain=t,this.walletClient=e,this.publicClient=r,this.viemChain=u.VIEM_CHAINS[t],this.erc20PermitHandler=new d.ERC20PermitHandler(t,e,r)}getContract(){const t=l.CONTRACT_ADDRESSES[this.chain].CarrotVesting,e=h.CarrotVesting,r={public:this.publicClient,wallet:this.walletClient};return g.getContract({address:t,abi:e,client:r})}owner(){return this.getContract().read.owner()}calculateClaimableAmount(t){return this.getContract().read.calculateClaimableAmount([t])}exchangeRate(){return this.getContract().read.EXCHANGE_RATE()}claim(){return this.getContract().write.claim({account:this.walletClient.account,chain:this.viemChain})}getCarrotAddress(){return this.getContract().read.CARROT()}getPufferAddress(){return this.getContract().read.PUFFER()}totalPufferRewards(){return this.getContract().read.TOTAL_PUFFER_REWARDS()}steps(){return this.getContract().read.steps()}maxCarrotAmount(){return this.getContract().read.MAX_CARROT_AMOUNT()}async vestings(t){const[e,r,n,s]=await this.getContract().read.vestings([t]);return{depositedAmount:e,claimedAmount:r,lastClaimedTimestamp:n,depositedTimestamp:s}}startTimestamp(){return this.getContract().read.startTimestamp()}startVestingPreapproved(t){return this.getContract().write.startVesting([t],{account:this.walletClient.account,chain:this.viemChain})}startVestingWithPermit(t){return this.getContract().write.startVestingWithPermit([t],{account:this.walletClient.account,chain:this.viemChain})}async startVesting(t,e){if(e)return this.startVestingPreapproved(t);const r=this.walletClient.account,n=await this.erc20PermitHandler.withToken(C.Token.CARROT).getPermitData(r.address,this.getContract().address,t);return this.startVestingWithPermit(n)}totalDepositedAmount(){return this.getContract().read.totalDepositedAmount()}duration(){return this.getContract().read.duration()}}exports.CarrotVestingHandler=m;
|
|
2
|
+
//# sourceMappingURL=carrot-vesting-handler.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"carrot-vesting-handler.cjs","sources":["../../../lib/contracts/handlers/carrot-vesting-handler.ts"],"sourcesContent":["import {\n Address,\n GetContractReturnType,\n PublicClient,\n Chain as ViemChain,\n WalletClient,\n getContract,\n Account,\n} from 'viem';\nimport { Chain, VIEM_CHAINS } from '../../chains/constants';\nimport { CarrotVesting } from '../abis/mainnet/CarrotVesting';\nimport { CONTRACT_ADDRESSES } from '../addresses';\nimport { PermitData } from '../common/lib/types';\nimport { Token } from '../tokens';\nimport { ERC20PermitHandler } from './erc20-permit-handler';\n\n/**\n * Handler for the `CarrotVesting` contract exposing methods to interact\n * with the contract.\n */\nexport class CarrotVestingHandler {\n private viemChain: ViemChain;\n private erc20PermitHandler: ERC20PermitHandler;\n\n /**\n * Create the handler for the `CarrotVesting` contract exposing methods to\n * interact with the contract.\n *\n * @param chain Chain to use for the client.\n * @param walletClient The wallet client to use for wallet\n * interactions.\n * @param publicClient The public client to use for public\n * interactions.\n */\n constructor(\n private chain: Chain,\n private walletClient: WalletClient,\n private publicClient: PublicClient,\n ) {\n this.viemChain = VIEM_CHAINS[chain];\n this.erc20PermitHandler = new ERC20PermitHandler(\n chain,\n walletClient,\n publicClient,\n );\n }\n\n /**\n * Get the contract.\n *\n * @returns The viem contract.\n */\n public getContract() {\n const address = CONTRACT_ADDRESSES[this.chain].CarrotVesting as Address;\n const abi = CarrotVesting;\n const client = { public: this.publicClient, wallet: this.walletClient };\n\n return getContract({ address, abi, client }) as GetContractReturnType<\n typeof CarrotVesting,\n typeof client,\n Address\n >;\n }\n\n /**\n * Get the owner of the contract.\n *\n * @returns The owner address.\n */\n public owner() {\n return this.getContract().read.owner();\n }\n\n /**\n * Calculate the claimable amount for a user.\n *\n * @param user The user address.\n * @returns The claimable amount.\n */\n public calculateClaimableAmount(user: Address) {\n return this.getContract().read.calculateClaimableAmount([user]);\n }\n\n /**\n * Get the exchange rate.\n *\n * @returns The exchange rate.\n */\n public exchangeRate() {\n return this.getContract().read.EXCHANGE_RATE();\n }\n\n /**\n * Claim vested tokens.\n *\n * @returns The transaction.\n */\n public claim() {\n return this.getContract().write.claim({\n account: this.walletClient.account as Account,\n chain: this.viemChain,\n });\n }\n\n /**\n * Get the CARROT token address.\n *\n * @returns The CARROT token address.\n */\n public getCarrotAddress() {\n return this.getContract().read.CARROT();\n }\n\n /**\n * Get the PUFFER token address.\n *\n * @returns The PUFFER token address.\n */\n public getPufferAddress() {\n return this.getContract().read.PUFFER();\n }\n\n /**\n * Get the total puffer rewards.\n *\n * @returns The total puffer rewards.\n */\n public totalPufferRewards() {\n return this.getContract().read.TOTAL_PUFFER_REWARDS();\n }\n\n /**\n * Get the number of vesting steps.\n *\n * @returns The number of vesting steps.\n */\n public steps() {\n return this.getContract().read.steps();\n }\n\n /**\n * Get the maximum carrot amount.\n *\n * @returns The maximum carrot amount.\n */\n public maxCarrotAmount() {\n return this.getContract().read.MAX_CARROT_AMOUNT();\n }\n\n /**\n * Get vesting information for a user.\n *\n * @param user The user address.\n * @returns The vesting information including deposited amount, claimed amount, last claimed timestamp, and deposited timestamp.\n */\n public async vestings(user: Address) {\n const [\n depositedAmount,\n claimedAmount,\n lastClaimedTimestamp,\n depositedTimestamp,\n ] = await this.getContract().read.vestings([user]);\n\n return {\n depositedAmount,\n claimedAmount,\n lastClaimedTimestamp,\n depositedTimestamp,\n };\n }\n\n /**\n * Get the start timestamp.\n *\n * @returns The start timestamp.\n */\n public startTimestamp() {\n return this.getContract().read.startTimestamp();\n }\n\n /**\n * Start vesting for a user.\n *\n * @param amount The amount to vest.\n * @returns The transaction.\n */\n public startVestingPreapproved(amount: bigint) {\n return this.getContract().write.startVesting([amount], {\n account: this.walletClient.account as Account,\n chain: this.viemChain,\n });\n }\n\n /**\n * Start vesting with permit.\n *\n * @param permitData The permit data including deadline, amount, v, r, and s values.\n * @returns The transaction.\n */\n public startVestingWithPermit(permitData: PermitData) {\n return this.getContract().write.startVestingWithPermit([permitData], {\n account: this.walletClient.account as Account,\n chain: this.viemChain,\n });\n }\n\n /**\n * Start vesting.\n *\n * @param amount The amount to vest.\n * @param isPreapproved Whether the CARROT token is preapproved or\n * should use permit.\n * @returns The transaction.\n */\n public async startVesting(amount: bigint, isPreapproved: boolean) {\n if (isPreapproved) {\n return this.startVestingPreapproved(amount);\n }\n\n const account = this.walletClient.account as Account;\n const permitData = await this.erc20PermitHandler\n .withToken(Token.CARROT)\n .getPermitData(account.address, this.getContract().address, amount);\n\n return this.startVestingWithPermit(permitData);\n }\n\n /**\n * Get the total deposited amount.\n *\n * @returns The total deposited amount.\n */\n public totalDepositedAmount() {\n return this.getContract().read.totalDepositedAmount();\n }\n\n /**\n * Get the duration of the vesting period.\n *\n * @returns The duration of the vesting period.\n */\n public duration() {\n return this.getContract().read.duration();\n }\n}\n"],"names":["CarrotVestingHandler","chain","walletClient","publicClient","__publicField","VIEM_CHAINS","ERC20PermitHandler","address","CONTRACT_ADDRESSES","abi","CarrotVesting","client","getContract","user","depositedAmount","claimedAmount","lastClaimedTimestamp","depositedTimestamp","amount","permitData","isPreapproved","account","Token"],"mappings":"geAoBO,MAAMA,CAAqB,CAchC,YACUC,EACAC,EACAC,EACR,CAjBMC,EAAA,kBACAA,EAAA,2BAaE,KAAA,MAAAH,EACA,KAAA,aAAAC,EACA,KAAA,aAAAC,EAEH,KAAA,UAAYE,cAAYJ,CAAK,EAClC,KAAK,mBAAqB,IAAIK,EAAA,mBAC5BL,EACAC,EACAC,CACF,CAAA,CAQK,aAAc,CACnB,MAAMI,EAAUC,EAAA,mBAAmB,KAAK,KAAK,EAAE,cACzCC,EAAMC,EAAA,cACNC,EAAS,CAAE,OAAQ,KAAK,aAAc,OAAQ,KAAK,YAAa,EAEtE,OAAOC,EAAY,YAAA,CAAE,QAAAL,EAAS,IAAAE,EAAK,OAAAE,EAAQ,CAAA,CAYtC,OAAQ,CACb,OAAO,KAAK,cAAc,KAAK,MAAM,CAAA,CAShC,yBAAyBE,EAAe,CAC7C,OAAO,KAAK,YAAY,EAAE,KAAK,yBAAyB,CAACA,CAAI,CAAC,CAAA,CAQzD,cAAe,CACpB,OAAO,KAAK,cAAc,KAAK,cAAc,CAAA,CAQxC,OAAQ,CACb,OAAO,KAAK,cAAc,MAAM,MAAM,CACpC,QAAS,KAAK,aAAa,QAC3B,MAAO,KAAK,SAAA,CACb,CAAA,CAQI,kBAAmB,CACxB,OAAO,KAAK,cAAc,KAAK,OAAO,CAAA,CAQjC,kBAAmB,CACxB,OAAO,KAAK,cAAc,KAAK,OAAO,CAAA,CAQjC,oBAAqB,CAC1B,OAAO,KAAK,cAAc,KAAK,qBAAqB,CAAA,CAQ/C,OAAQ,CACb,OAAO,KAAK,cAAc,KAAK,MAAM,CAAA,CAQhC,iBAAkB,CACvB,OAAO,KAAK,cAAc,KAAK,kBAAkB,CAAA,CASnD,MAAa,SAASA,EAAe,CAC7B,KAAA,CACJC,EACAC,EACAC,EACAC,CAAA,EACE,MAAM,KAAK,cAAc,KAAK,SAAS,CAACJ,CAAI,CAAC,EAE1C,MAAA,CACL,gBAAAC,EACA,cAAAC,EACA,qBAAAC,EACA,mBAAAC,CACF,CAAA,CAQK,gBAAiB,CACtB,OAAO,KAAK,cAAc,KAAK,eAAe,CAAA,CASzC,wBAAwBC,EAAgB,CAC7C,OAAO,KAAK,YAAY,EAAE,MAAM,aAAa,CAACA,CAAM,EAAG,CACrD,QAAS,KAAK,aAAa,QAC3B,MAAO,KAAK,SAAA,CACb,CAAA,CASI,uBAAuBC,EAAwB,CACpD,OAAO,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAACA,CAAU,EAAG,CACnE,QAAS,KAAK,aAAa,QAC3B,MAAO,KAAK,SAAA,CACb,CAAA,CAWH,MAAa,aAAaD,EAAgBE,EAAwB,CAChE,GAAIA,EACK,OAAA,KAAK,wBAAwBF,CAAM,EAGtC,MAAAG,EAAU,KAAK,aAAa,QAC5BF,EAAa,MAAM,KAAK,mBAC3B,UAAUG,EAAM,MAAA,MAAM,EACtB,cAAcD,EAAQ,QAAS,KAAK,YAAY,EAAE,QAASH,CAAM,EAE7D,OAAA,KAAK,uBAAuBC,CAAU,CAAA,CAQxC,sBAAuB,CAC5B,OAAO,KAAK,cAAc,KAAK,qBAAqB,CAAA,CAQ/C,UAAW,CAChB,OAAO,KAAK,cAAc,KAAK,SAAS,CAAA,CAE5C"}
|