@pufferfinance/puffer-sdk 1.28.0 → 1.28.1

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.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=[{type:"function",name:"owner",stateMutability:"view",outputs:[{type:"address",name:"",simpleType:"address"}],inputs:[]},{type:"function",name:"calculateClaimableAmount",stateMutability:"view",inputs:[{type:"address",name:"user",simpleType:"address"}],outputs:[{type:"uint128",name:"",simpleType:"uint"}]},{type:"function",name:"EXCHANGE_RATE",stateMutability:"view",outputs:[{type:"uint256",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"claim",stateMutability:"nonpayable",outputs:[{type:"uint128",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"CARROT",stateMutability:"view",outputs:[{type:"address",name:"",simpleType:"address"}],inputs:[]},{type:"function",name:"PUFFER",stateMutability:"view",outputs:[{type:"address",name:"",simpleType:"address"}],inputs:[]},{type:"function",name:"TOTAL_PUFFER_REWARDS",stateMutability:"view",outputs:[{type:"uint256",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"steps",stateMutability:"view",outputs:[{type:"uint32",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"MAX_CARROT_AMOUNT",stateMutability:"view",outputs:[{type:"uint256",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"vestings",stateMutability:"view",inputs:[{type:"address",name:"user",simpleType:"address"}],outputs:[{type:"uint128",name:"depositedAmount",simpleType:"uint"},{type:"uint128",name:"claimedAmount",simpleType:"uint"},{type:"uint48",name:"lastClaimedTimestamp",simpleType:"uint"},{type:"uint48",name:"depositedTimestamp",simpleType:"uint"}]},{type:"function",name:"startTimestamp",stateMutability:"view",outputs:[{type:"uint48",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"startVesting",stateMutability:"nonpayable",inputs:[{type:"uint256",name:"amount",simpleType:"uint"}],outputs:[]},{type:"function",name:"totalDepositedAmount",stateMutability:"view",outputs:[{type:"uint128",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"duration",stateMutability:"view",outputs:[{type:"uint32",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"startVestingWithPermit",stateMutability:"nonpayable",inputs:[{type:"tuple",name:"permitData",simpleType:"tuple",components:[{type:"uint256",name:"deadline",simpleType:"uint"},{type:"uint256",name:"amount",simpleType:"uint"},{type:"uint8",name:"v",simpleType:"uint"},{type:"bytes32",name:"r",simpleType:"bytes"},{type:"bytes32",name:"s",simpleType:"bytes"}]}],outputs:[]}];exports.CarrotVesting=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=[{type:"function",name:"steps",stateMutability:"view",outputs:[{type:"uint32",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"EXCHANGE_RATE",stateMutability:"view",outputs:[{type:"uint256",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"PUFFER_RECOVERY_GRACE_PERIOD",stateMutability:"view",outputs:[{type:"uint256",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"PUFFER",stateMutability:"view",outputs:[{type:"address",name:"",simpleType:"address"}],inputs:[]},{type:"function",name:"startPufferRecovery",stateMutability:"nonpayable",inputs:[],outputs:[]},{type:"function",name:"TOTAL_PUFFER_REWARDS",stateMutability:"view",outputs:[{type:"uint256",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"claim",stateMutability:"nonpayable",outputs:[{type:"uint128",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"totalDepositedAmount",stateMutability:"view",outputs:[{type:"uint128",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"startVestingWithPermit",stateMutability:"nonpayable",inputs:[{type:"tuple",name:"permitData",simpleType:"tuple",components:[{type:"uint256",name:"deadline",simpleType:"uint"},{type:"uint256",name:"amount",simpleType:"uint"},{type:"uint8",name:"v",simpleType:"uint"},{type:"bytes32",name:"r",simpleType:"bytes"},{type:"bytes32",name:"s",simpleType:"bytes"}]}],outputs:[]},{type:"function",name:"startTimestamp",stateMutability:"view",outputs:[{type:"uint48",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"MAX_CARROT_AMOUNT",stateMutability:"view",outputs:[{type:"uint256",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"owner",stateMutability:"view",outputs:[{type:"address",name:"",simpleType:"address"}],inputs:[]},{type:"function",name:"duration",stateMutability:"view",outputs:[{type:"uint32",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"startVesting",stateMutability:"nonpayable",inputs:[{type:"uint256",name:"amount",simpleType:"uint"}],outputs:[]},{type:"function",name:"CARROT",stateMutability:"view",outputs:[{type:"address",name:"",simpleType:"address"}],inputs:[]},{type:"function",name:"vestings",stateMutability:"view",inputs:[{type:"address",name:"user",simpleType:"address"}],outputs:[{type:"uint128",name:"depositedAmount",simpleType:"uint"},{type:"uint128",name:"claimedAmount",simpleType:"uint"},{type:"uint48",name:"lastClaimedTimestamp",simpleType:"uint"},{type:"uint48",name:"depositedTimestamp",simpleType:"uint"}]},{type:"function",name:"calculateClaimableAmount",stateMutability:"view",inputs:[{type:"address",name:"user",simpleType:"address"}],outputs:[{type:"uint128",name:"",simpleType:"uint"}]}];exports.CarrotVesting=t;
2
2
  //# sourceMappingURL=CarrotVesting.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"CarrotVesting.cjs","sources":["../../../../lib/contracts/abis/mainnet/CarrotVesting.ts"],"sourcesContent":["export const CarrotVesting = <const>[\n {\n type: 'function',\n name: 'owner',\n stateMutability: 'view',\n outputs: [{ type: 'address', name: '', simpleType: 'address' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'calculateClaimableAmount',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'user', simpleType: 'address' }],\n outputs: [{ type: 'uint128', name: '', simpleType: 'uint' }],\n },\n {\n type: 'function',\n name: 'EXCHANGE_RATE',\n stateMutability: 'view',\n outputs: [{ type: 'uint256', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'claim',\n stateMutability: 'nonpayable',\n outputs: [{ type: 'uint128', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'CARROT',\n stateMutability: 'view',\n outputs: [{ type: 'address', name: '', simpleType: 'address' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'PUFFER',\n stateMutability: 'view',\n outputs: [{ type: 'address', name: '', simpleType: 'address' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'TOTAL_PUFFER_REWARDS',\n stateMutability: 'view',\n outputs: [{ type: 'uint256', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'steps',\n stateMutability: 'view',\n outputs: [{ type: 'uint32', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'MAX_CARROT_AMOUNT',\n stateMutability: 'view',\n outputs: [{ type: 'uint256', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'vestings',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'user', simpleType: 'address' }],\n outputs: [\n { type: 'uint128', name: 'depositedAmount', simpleType: 'uint' },\n { type: 'uint128', name: 'claimedAmount', simpleType: 'uint' },\n { type: 'uint48', name: 'lastClaimedTimestamp', simpleType: 'uint' },\n { type: 'uint48', name: 'depositedTimestamp', simpleType: 'uint' },\n ],\n },\n {\n type: 'function',\n name: 'startTimestamp',\n stateMutability: 'view',\n outputs: [{ type: 'uint48', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'startVesting',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'uint256', name: 'amount', simpleType: 'uint' }],\n outputs: [],\n },\n {\n type: 'function',\n name: 'totalDepositedAmount',\n stateMutability: 'view',\n outputs: [{ type: 'uint128', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'duration',\n stateMutability: 'view',\n outputs: [{ type: 'uint32', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'startVestingWithPermit',\n stateMutability: 'nonpayable',\n inputs: [\n {\n type: 'tuple',\n name: 'permitData',\n simpleType: 'tuple',\n components: [\n { type: 'uint256', name: 'deadline', simpleType: 'uint' },\n { type: 'uint256', name: 'amount', simpleType: 'uint' },\n { type: 'uint8', name: 'v', simpleType: 'uint' },\n { type: 'bytes32', name: 'r', simpleType: 'bytes' },\n { type: 'bytes32', name: 's', simpleType: 'bytes' },\n ],\n },\n ],\n outputs: [],\n },\n];\n"],"names":["CarrotVesting"],"mappings":"gFAAO,MAAMA,EAAuB,CAClC,CACE,KAAM,WACN,KAAM,QACN,gBAAiB,OACjB,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,UAAW,EAC9D,OAAQ,CAAA,CACV,EACA,CACE,KAAM,WACN,KAAM,2BACN,gBAAiB,OACjB,OAAQ,CAAC,CAAE,KAAM,UAAW,KAAM,OAAQ,WAAY,UAAW,EACjE,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,MAAQ,CAAA,CAC7D,EACA,CACE,KAAM,WACN,KAAM,gBACN,gBAAiB,OACjB,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,OAAQ,EAC3D,OAAQ,CAAA,CACV,EACA,CACE,KAAM,WACN,KAAM,QACN,gBAAiB,aACjB,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,OAAQ,EAC3D,OAAQ,CAAA,CACV,EACA,CACE,KAAM,WACN,KAAM,SACN,gBAAiB,OACjB,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,UAAW,EAC9D,OAAQ,CAAA,CACV,EACA,CACE,KAAM,WACN,KAAM,SACN,gBAAiB,OACjB,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,UAAW,EAC9D,OAAQ,CAAA,CACV,EACA,CAC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AAM,yBACN,gBAAiB,aACjB,OAAQ,CACN,CACE,KAAM,QACN,KAAM,aACN,WAAY,QACZ,WAAY,CACV,CAAE,KAAM,UAAW,KAAM,WAAY,WAAY,MAAO,EACxD,CAAE,KAAM,UAAW,KAAM,SAAU,WAAY,MAAO,EACtD,CAAE,KAAM,QAAS,KAAM,IAAK,WAAY,MAAO,EAC/C,CAAE,KAAM,UAAW,KAAM,IAAK,WAAY,OAAQ,EAClD,CAAE,KAAM,UAAW,KAAM,IAAK,WAAY,OAAQ,CAAA,CACpD,CAEJ,EACA,QAAS,CAAA,CAAC,CAEd"}
1
+ {"version":3,"file":"CarrotVesting.cjs","sources":["../../../../lib/contracts/abis/mainnet/CarrotVesting.ts"],"sourcesContent":["export const CarrotVesting = <const>[\n {\n type: 'function',\n name: 'steps',\n stateMutability: 'view',\n outputs: [{ type: 'uint32', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'EXCHANGE_RATE',\n stateMutability: 'view',\n outputs: [{ type: 'uint256', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'PUFFER_RECOVERY_GRACE_PERIOD',\n stateMutability: 'view',\n outputs: [{ type: 'uint256', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'PUFFER',\n stateMutability: 'view',\n outputs: [{ type: 'address', name: '', simpleType: 'address' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'startPufferRecovery',\n stateMutability: 'nonpayable',\n inputs: [],\n outputs: [],\n },\n {\n type: 'function',\n name: 'TOTAL_PUFFER_REWARDS',\n stateMutability: 'view',\n outputs: [{ type: 'uint256', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'claim',\n stateMutability: 'nonpayable',\n outputs: [{ type: 'uint128', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'totalDepositedAmount',\n stateMutability: 'view',\n outputs: [{ type: 'uint128', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'startVestingWithPermit',\n stateMutability: 'nonpayable',\n inputs: [\n {\n type: 'tuple',\n name: 'permitData',\n simpleType: 'tuple',\n components: [\n { type: 'uint256', name: 'deadline', simpleType: 'uint' },\n { type: 'uint256', name: 'amount', simpleType: 'uint' },\n { type: 'uint8', name: 'v', simpleType: 'uint' },\n { type: 'bytes32', name: 'r', simpleType: 'bytes' },\n { type: 'bytes32', name: 's', simpleType: 'bytes' },\n ],\n },\n ],\n outputs: [],\n },\n {\n type: 'function',\n name: 'startTimestamp',\n stateMutability: 'view',\n outputs: [{ type: 'uint48', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'MAX_CARROT_AMOUNT',\n stateMutability: 'view',\n outputs: [{ type: 'uint256', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'owner',\n stateMutability: 'view',\n outputs: [{ type: 'address', name: '', simpleType: 'address' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'duration',\n stateMutability: 'view',\n outputs: [{ type: 'uint32', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'startVesting',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'uint256', name: 'amount', simpleType: 'uint' }],\n outputs: [],\n },\n {\n type: 'function',\n name: 'CARROT',\n stateMutability: 'view',\n outputs: [{ type: 'address', name: '', simpleType: 'address' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'vestings',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'user', simpleType: 'address' }],\n outputs: [\n { type: 'uint128', name: 'depositedAmount', simpleType: 'uint' },\n { type: 'uint128', name: 'claimedAmount', simpleType: 'uint' },\n { type: 'uint48', name: 'lastClaimedTimestamp', simpleType: 'uint' },\n { type: 'uint48', name: 'depositedTimestamp', simpleType: 'uint' },\n ],\n },\n {\n type: 'function',\n name: 'calculateClaimableAmount',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'user', simpleType: 'address' }],\n outputs: [{ type: 'uint128', name: '', simpleType: 'uint' }],\n },\n];\n"],"names":["CarrotVesting"],"mappings":"gFAAO,MAAMA,EAAuB,CAClC,CACE,KAAM,WACN,KAAM,QACN,gBAAiB,OACjB,QAAS,CAAC,CAAE,KAAM,SAAU,KAAM,GAAI,WAAY,OAAQ,EAC1D,OAAQ,CAAA,CACV,EACA,CACE,KAAM,WACN,KAAM,gBACN,gBAAiB,OACjB,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,OAAQ,EAC3D,OAAQ,CAAA,CACV,EACA,CACE,KAAM,WACN,KAAM,+BACN,gBAAiB,OACjB,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,OAAQ,EAC3D,OAAQ,CAAA,CACV,EACA,CACE,KAAM,WACN,KAAM,SACN,gBAAiB,OACjB,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,UAAW,EAC9D,OAAQ,CAAA,CACV,EACA,CACE,KAAM,WACN,KAAM,sBACN,gBAAiB,aACjB,OAAQ,CAAC,EACT,QAAS,CAAA,CACX,EACA,CACE,KAAM,WACN,KAAM,uBACN,gBAAiB,OACjB,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,OAAQ,EAC3D,OAAQ,CAAA,CACV,EACA,CACE,KAAM,WACN,KAAM,QACN,gBAAiB,aACjB,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,OAAQ,EAC3D,OAAQ,CAAA,CACV,EACA,CACE,KAAM,WACN,KAAM,uBACN,gBAAiB,OACjB,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,OAAQ,EAC3D,OAAQ,CAAA,CACV,EACA,CACE,KAAM,WACN,KAAM,yBACN,gBAAiB,aACjB,OAAQ,CACN,CACE,KAAM,QACN,KAAM,aACN,WAAY,QACZ,WAAY,CACV,CAAE,KAAM,UAAW,KAAM,WAA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AAE,KAAM,SAAU,KAAM,uBAAwB,WAAY,MAAO,EACnE,CAAE,KAAM,SAAU,KAAM,qBAAsB,WAAY,MAAO,CAAA,CAErE,EACA,CACE,KAAM,WACN,KAAM,2BACN,gBAAiB,OACjB,OAAQ,CAAC,CAAE,KAAM,UAAW,KAAM,OAAQ,WAAY,UAAW,EACjE,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,MAAQ,CAAA,CAAA,CAE/D"}
@@ -1,30 +1,26 @@
1
1
  export declare const CarrotVesting: readonly [{
2
2
  readonly type: "function";
3
- readonly name: "owner";
3
+ readonly name: "steps";
4
4
  readonly stateMutability: "view";
5
5
  readonly outputs: readonly [{
6
- readonly type: "address";
6
+ readonly type: "uint32";
7
7
  readonly name: "";
8
- readonly simpleType: "address";
8
+ readonly simpleType: "uint";
9
9
  }];
10
10
  readonly inputs: readonly [];
11
11
  }, {
12
12
  readonly type: "function";
13
- readonly name: "calculateClaimableAmount";
13
+ readonly name: "EXCHANGE_RATE";
14
14
  readonly stateMutability: "view";
15
- readonly inputs: readonly [{
16
- readonly type: "address";
17
- readonly name: "user";
18
- readonly simpleType: "address";
19
- }];
20
15
  readonly outputs: readonly [{
21
- readonly type: "uint128";
16
+ readonly type: "uint256";
22
17
  readonly name: "";
23
18
  readonly simpleType: "uint";
24
19
  }];
20
+ readonly inputs: readonly [];
25
21
  }, {
26
22
  readonly type: "function";
27
- readonly name: "EXCHANGE_RATE";
23
+ readonly name: "PUFFER_RECOVERY_GRACE_PERIOD";
28
24
  readonly stateMutability: "view";
29
25
  readonly outputs: readonly [{
30
26
  readonly type: "uint256";
@@ -34,50 +30,87 @@ export declare const CarrotVesting: readonly [{
34
30
  readonly inputs: readonly [];
35
31
  }, {
36
32
  readonly type: "function";
37
- readonly name: "claim";
38
- readonly stateMutability: "nonpayable";
33
+ readonly name: "PUFFER";
34
+ readonly stateMutability: "view";
39
35
  readonly outputs: readonly [{
40
- readonly type: "uint128";
36
+ readonly type: "address";
41
37
  readonly name: "";
42
- readonly simpleType: "uint";
38
+ readonly simpleType: "address";
43
39
  }];
44
40
  readonly inputs: readonly [];
45
41
  }, {
46
42
  readonly type: "function";
47
- readonly name: "CARROT";
43
+ readonly name: "startPufferRecovery";
44
+ readonly stateMutability: "nonpayable";
45
+ readonly inputs: readonly [];
46
+ readonly outputs: readonly [];
47
+ }, {
48
+ readonly type: "function";
49
+ readonly name: "TOTAL_PUFFER_REWARDS";
48
50
  readonly stateMutability: "view";
49
51
  readonly outputs: readonly [{
50
- readonly type: "address";
52
+ readonly type: "uint256";
51
53
  readonly name: "";
52
- readonly simpleType: "address";
54
+ readonly simpleType: "uint";
53
55
  }];
54
56
  readonly inputs: readonly [];
55
57
  }, {
56
58
  readonly type: "function";
57
- readonly name: "PUFFER";
58
- readonly stateMutability: "view";
59
+ readonly name: "claim";
60
+ readonly stateMutability: "nonpayable";
59
61
  readonly outputs: readonly [{
60
- readonly type: "address";
62
+ readonly type: "uint128";
61
63
  readonly name: "";
62
- readonly simpleType: "address";
64
+ readonly simpleType: "uint";
63
65
  }];
64
66
  readonly inputs: readonly [];
65
67
  }, {
66
68
  readonly type: "function";
67
- readonly name: "TOTAL_PUFFER_REWARDS";
69
+ readonly name: "totalDepositedAmount";
68
70
  readonly stateMutability: "view";
69
71
  readonly outputs: readonly [{
70
- readonly type: "uint256";
72
+ readonly type: "uint128";
71
73
  readonly name: "";
72
74
  readonly simpleType: "uint";
73
75
  }];
74
76
  readonly inputs: readonly [];
75
77
  }, {
76
78
  readonly type: "function";
77
- readonly name: "steps";
79
+ readonly name: "startVestingWithPermit";
80
+ readonly stateMutability: "nonpayable";
81
+ readonly inputs: readonly [{
82
+ readonly type: "tuple";
83
+ readonly name: "permitData";
84
+ readonly simpleType: "tuple";
85
+ readonly components: readonly [{
86
+ readonly type: "uint256";
87
+ readonly name: "deadline";
88
+ readonly simpleType: "uint";
89
+ }, {
90
+ readonly type: "uint256";
91
+ readonly name: "amount";
92
+ readonly simpleType: "uint";
93
+ }, {
94
+ readonly type: "uint8";
95
+ readonly name: "v";
96
+ readonly simpleType: "uint";
97
+ }, {
98
+ readonly type: "bytes32";
99
+ readonly name: "r";
100
+ readonly simpleType: "bytes";
101
+ }, {
102
+ readonly type: "bytes32";
103
+ readonly name: "s";
104
+ readonly simpleType: "bytes";
105
+ }];
106
+ }];
107
+ readonly outputs: readonly [];
108
+ }, {
109
+ readonly type: "function";
110
+ readonly name: "startTimestamp";
78
111
  readonly stateMutability: "view";
79
112
  readonly outputs: readonly [{
80
- readonly type: "uint32";
113
+ readonly type: "uint48";
81
114
  readonly name: "";
82
115
  readonly simpleType: "uint";
83
116
  }];
@@ -94,36 +127,20 @@ export declare const CarrotVesting: readonly [{
94
127
  readonly inputs: readonly [];
95
128
  }, {
96
129
  readonly type: "function";
97
- readonly name: "vestings";
130
+ readonly name: "owner";
98
131
  readonly stateMutability: "view";
99
- readonly inputs: readonly [{
132
+ readonly outputs: readonly [{
100
133
  readonly type: "address";
101
- readonly name: "user";
134
+ readonly name: "";
102
135
  readonly simpleType: "address";
103
136
  }];
104
- readonly outputs: readonly [{
105
- readonly type: "uint128";
106
- readonly name: "depositedAmount";
107
- readonly simpleType: "uint";
108
- }, {
109
- readonly type: "uint128";
110
- readonly name: "claimedAmount";
111
- readonly simpleType: "uint";
112
- }, {
113
- readonly type: "uint48";
114
- readonly name: "lastClaimedTimestamp";
115
- readonly simpleType: "uint";
116
- }, {
117
- readonly type: "uint48";
118
- readonly name: "depositedTimestamp";
119
- readonly simpleType: "uint";
120
- }];
137
+ readonly inputs: readonly [];
121
138
  }, {
122
139
  readonly type: "function";
123
- readonly name: "startTimestamp";
140
+ readonly name: "duration";
124
141
  readonly stateMutability: "view";
125
142
  readonly outputs: readonly [{
126
- readonly type: "uint48";
143
+ readonly type: "uint32";
127
144
  readonly name: "";
128
145
  readonly simpleType: "uint";
129
146
  }];
@@ -140,53 +157,52 @@ export declare const CarrotVesting: readonly [{
140
157
  readonly outputs: readonly [];
141
158
  }, {
142
159
  readonly type: "function";
143
- readonly name: "totalDepositedAmount";
160
+ readonly name: "CARROT";
144
161
  readonly stateMutability: "view";
145
162
  readonly outputs: readonly [{
146
- readonly type: "uint128";
163
+ readonly type: "address";
147
164
  readonly name: "";
148
- readonly simpleType: "uint";
165
+ readonly simpleType: "address";
149
166
  }];
150
167
  readonly inputs: readonly [];
151
168
  }, {
152
169
  readonly type: "function";
153
- readonly name: "duration";
170
+ readonly name: "vestings";
154
171
  readonly stateMutability: "view";
172
+ readonly inputs: readonly [{
173
+ readonly type: "address";
174
+ readonly name: "user";
175
+ readonly simpleType: "address";
176
+ }];
155
177
  readonly outputs: readonly [{
156
- readonly type: "uint32";
157
- readonly name: "";
178
+ readonly type: "uint128";
179
+ readonly name: "depositedAmount";
180
+ readonly simpleType: "uint";
181
+ }, {
182
+ readonly type: "uint128";
183
+ readonly name: "claimedAmount";
184
+ readonly simpleType: "uint";
185
+ }, {
186
+ readonly type: "uint48";
187
+ readonly name: "lastClaimedTimestamp";
188
+ readonly simpleType: "uint";
189
+ }, {
190
+ readonly type: "uint48";
191
+ readonly name: "depositedTimestamp";
158
192
  readonly simpleType: "uint";
159
193
  }];
160
- readonly inputs: readonly [];
161
194
  }, {
162
195
  readonly type: "function";
163
- readonly name: "startVestingWithPermit";
164
- readonly stateMutability: "nonpayable";
196
+ readonly name: "calculateClaimableAmount";
197
+ readonly stateMutability: "view";
165
198
  readonly inputs: readonly [{
166
- readonly type: "tuple";
167
- readonly name: "permitData";
168
- readonly simpleType: "tuple";
169
- readonly components: readonly [{
170
- readonly type: "uint256";
171
- readonly name: "deadline";
172
- readonly simpleType: "uint";
173
- }, {
174
- readonly type: "uint256";
175
- readonly name: "amount";
176
- readonly simpleType: "uint";
177
- }, {
178
- readonly type: "uint8";
179
- readonly name: "v";
180
- readonly simpleType: "uint";
181
- }, {
182
- readonly type: "bytes32";
183
- readonly name: "r";
184
- readonly simpleType: "bytes";
185
- }, {
186
- readonly type: "bytes32";
187
- readonly name: "s";
188
- readonly simpleType: "bytes";
189
- }];
199
+ readonly type: "address";
200
+ readonly name: "user";
201
+ readonly simpleType: "address";
202
+ }];
203
+ readonly outputs: readonly [{
204
+ readonly type: "uint128";
205
+ readonly name: "";
206
+ readonly simpleType: "uint";
190
207
  }];
191
- readonly outputs: readonly [];
192
208
  }];
@@ -1,58 +1,85 @@
1
1
  const t = [
2
2
  {
3
3
  type: "function",
4
- name: "owner",
4
+ name: "steps",
5
5
  stateMutability: "view",
6
- outputs: [{ type: "address", name: "", simpleType: "address" }],
6
+ outputs: [{ type: "uint32", name: "", simpleType: "uint" }],
7
7
  inputs: []
8
8
  },
9
9
  {
10
10
  type: "function",
11
- name: "calculateClaimableAmount",
11
+ name: "EXCHANGE_RATE",
12
12
  stateMutability: "view",
13
- inputs: [{ type: "address", name: "user", simpleType: "address" }],
14
- outputs: [{ type: "uint128", name: "", simpleType: "uint" }]
13
+ outputs: [{ type: "uint256", name: "", simpleType: "uint" }],
14
+ inputs: []
15
15
  },
16
16
  {
17
17
  type: "function",
18
- name: "EXCHANGE_RATE",
18
+ name: "PUFFER_RECOVERY_GRACE_PERIOD",
19
19
  stateMutability: "view",
20
20
  outputs: [{ type: "uint256", name: "", simpleType: "uint" }],
21
21
  inputs: []
22
22
  },
23
23
  {
24
24
  type: "function",
25
- name: "claim",
26
- stateMutability: "nonpayable",
27
- outputs: [{ type: "uint128", name: "", simpleType: "uint" }],
25
+ name: "PUFFER",
26
+ stateMutability: "view",
27
+ outputs: [{ type: "address", name: "", simpleType: "address" }],
28
28
  inputs: []
29
29
  },
30
30
  {
31
31
  type: "function",
32
- name: "CARROT",
32
+ name: "startPufferRecovery",
33
+ stateMutability: "nonpayable",
34
+ inputs: [],
35
+ outputs: []
36
+ },
37
+ {
38
+ type: "function",
39
+ name: "TOTAL_PUFFER_REWARDS",
33
40
  stateMutability: "view",
34
- outputs: [{ type: "address", name: "", simpleType: "address" }],
41
+ outputs: [{ type: "uint256", name: "", simpleType: "uint" }],
35
42
  inputs: []
36
43
  },
37
44
  {
38
45
  type: "function",
39
- name: "PUFFER",
40
- stateMutability: "view",
41
- outputs: [{ type: "address", name: "", simpleType: "address" }],
46
+ name: "claim",
47
+ stateMutability: "nonpayable",
48
+ outputs: [{ type: "uint128", name: "", simpleType: "uint" }],
42
49
  inputs: []
43
50
  },
44
51
  {
45
52
  type: "function",
46
- name: "TOTAL_PUFFER_REWARDS",
53
+ name: "totalDepositedAmount",
47
54
  stateMutability: "view",
48
- outputs: [{ type: "uint256", name: "", simpleType: "uint" }],
55
+ outputs: [{ type: "uint128", name: "", simpleType: "uint" }],
49
56
  inputs: []
50
57
  },
51
58
  {
52
59
  type: "function",
53
- name: "steps",
60
+ name: "startVestingWithPermit",
61
+ stateMutability: "nonpayable",
62
+ inputs: [
63
+ {
64
+ type: "tuple",
65
+ name: "permitData",
66
+ simpleType: "tuple",
67
+ components: [
68
+ { type: "uint256", name: "deadline", simpleType: "uint" },
69
+ { type: "uint256", name: "amount", simpleType: "uint" },
70
+ { type: "uint8", name: "v", simpleType: "uint" },
71
+ { type: "bytes32", name: "r", simpleType: "bytes" },
72
+ { type: "bytes32", name: "s", simpleType: "bytes" }
73
+ ]
74
+ }
75
+ ],
76
+ outputs: []
77
+ },
78
+ {
79
+ type: "function",
80
+ name: "startTimestamp",
54
81
  stateMutability: "view",
55
- outputs: [{ type: "uint32", name: "", simpleType: "uint" }],
82
+ outputs: [{ type: "uint48", name: "", simpleType: "uint" }],
56
83
  inputs: []
57
84
  },
58
85
  {
@@ -64,21 +91,16 @@ const t = [
64
91
  },
65
92
  {
66
93
  type: "function",
67
- name: "vestings",
94
+ name: "owner",
68
95
  stateMutability: "view",
69
- inputs: [{ type: "address", name: "user", simpleType: "address" }],
70
- outputs: [
71
- { type: "uint128", name: "depositedAmount", simpleType: "uint" },
72
- { type: "uint128", name: "claimedAmount", simpleType: "uint" },
73
- { type: "uint48", name: "lastClaimedTimestamp", simpleType: "uint" },
74
- { type: "uint48", name: "depositedTimestamp", simpleType: "uint" }
75
- ]
96
+ outputs: [{ type: "address", name: "", simpleType: "address" }],
97
+ inputs: []
76
98
  },
77
99
  {
78
100
  type: "function",
79
- name: "startTimestamp",
101
+ name: "duration",
80
102
  stateMutability: "view",
81
- outputs: [{ type: "uint48", name: "", simpleType: "uint" }],
103
+ outputs: [{ type: "uint32", name: "", simpleType: "uint" }],
82
104
  inputs: []
83
105
  },
84
106
  {
@@ -90,37 +112,29 @@ const t = [
90
112
  },
91
113
  {
92
114
  type: "function",
93
- name: "totalDepositedAmount",
115
+ name: "CARROT",
94
116
  stateMutability: "view",
95
- outputs: [{ type: "uint128", name: "", simpleType: "uint" }],
117
+ outputs: [{ type: "address", name: "", simpleType: "address" }],
96
118
  inputs: []
97
119
  },
98
120
  {
99
121
  type: "function",
100
- name: "duration",
122
+ name: "vestings",
101
123
  stateMutability: "view",
102
- outputs: [{ type: "uint32", name: "", simpleType: "uint" }],
103
- inputs: []
124
+ inputs: [{ type: "address", name: "user", simpleType: "address" }],
125
+ outputs: [
126
+ { type: "uint128", name: "depositedAmount", simpleType: "uint" },
127
+ { type: "uint128", name: "claimedAmount", simpleType: "uint" },
128
+ { type: "uint48", name: "lastClaimedTimestamp", simpleType: "uint" },
129
+ { type: "uint48", name: "depositedTimestamp", simpleType: "uint" }
130
+ ]
104
131
  },
105
132
  {
106
133
  type: "function",
107
- name: "startVestingWithPermit",
108
- stateMutability: "nonpayable",
109
- inputs: [
110
- {
111
- type: "tuple",
112
- name: "permitData",
113
- simpleType: "tuple",
114
- components: [
115
- { type: "uint256", name: "deadline", simpleType: "uint" },
116
- { type: "uint256", name: "amount", simpleType: "uint" },
117
- { type: "uint8", name: "v", simpleType: "uint" },
118
- { type: "bytes32", name: "r", simpleType: "bytes" },
119
- { type: "bytes32", name: "s", simpleType: "bytes" }
120
- ]
121
- }
122
- ],
123
- outputs: []
134
+ name: "calculateClaimableAmount",
135
+ stateMutability: "view",
136
+ inputs: [{ type: "address", name: "user", simpleType: "address" }],
137
+ outputs: [{ type: "uint128", name: "", simpleType: "uint" }]
124
138
  }
125
139
  ];
126
140
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"CarrotVesting.js","sources":["../../../../lib/contracts/abis/mainnet/CarrotVesting.ts"],"sourcesContent":["export const CarrotVesting = <const>[\n {\n type: 'function',\n name: 'owner',\n stateMutability: 'view',\n outputs: [{ type: 'address', name: '', simpleType: 'address' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'calculateClaimableAmount',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'user', simpleType: 'address' }],\n outputs: [{ type: 'uint128', name: '', simpleType: 'uint' }],\n },\n {\n type: 'function',\n name: 'EXCHANGE_RATE',\n stateMutability: 'view',\n outputs: [{ type: 'uint256', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'claim',\n stateMutability: 'nonpayable',\n outputs: [{ type: 'uint128', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'CARROT',\n stateMutability: 'view',\n outputs: [{ type: 'address', name: '', simpleType: 'address' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'PUFFER',\n stateMutability: 'view',\n outputs: [{ type: 'address', name: '', simpleType: 'address' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'TOTAL_PUFFER_REWARDS',\n stateMutability: 'view',\n outputs: [{ type: 'uint256', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'steps',\n stateMutability: 'view',\n outputs: [{ type: 'uint32', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'MAX_CARROT_AMOUNT',\n stateMutability: 'view',\n outputs: [{ type: 'uint256', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'vestings',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'user', simpleType: 'address' }],\n outputs: [\n { type: 'uint128', name: 'depositedAmount', simpleType: 'uint' },\n { type: 'uint128', name: 'claimedAmount', simpleType: 'uint' },\n { type: 'uint48', name: 'lastClaimedTimestamp', simpleType: 'uint' },\n { type: 'uint48', name: 'depositedTimestamp', simpleType: 'uint' },\n ],\n },\n {\n type: 'function',\n name: 'startTimestamp',\n stateMutability: 'view',\n outputs: [{ type: 'uint48', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'startVesting',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'uint256', name: 'amount', simpleType: 'uint' }],\n outputs: [],\n },\n {\n type: 'function',\n name: 'totalDepositedAmount',\n stateMutability: 'view',\n outputs: [{ type: 'uint128', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'duration',\n stateMutability: 'view',\n outputs: [{ type: 'uint32', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'startVestingWithPermit',\n stateMutability: 'nonpayable',\n inputs: [\n {\n type: 'tuple',\n name: 'permitData',\n simpleType: 'tuple',\n components: [\n { type: 'uint256', name: 'deadline', simpleType: 'uint' },\n { type: 'uint256', name: 'amount', simpleType: 'uint' },\n { type: 'uint8', name: 'v', simpleType: 'uint' },\n { type: 'bytes32', name: 'r', simpleType: 'bytes' },\n { type: 'bytes32', name: 's', simpleType: 'bytes' },\n ],\n },\n ],\n outputs: [],\n },\n];\n"],"names":["CarrotVesting"],"mappings":"AAAO,MAAMA,IAAuB;AAAA,EAClC;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,iBAAiB;AAAA,IACjB,SAAS,CAAC,EAAE,MAAM,WAAW,MAAM,IAAI,YAAY,WAAW;AAAA,IAC9D,QAAQ,CAAA;AAAA,EACV;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,iBAAiB;AAAA,IACjB,QAAQ,CAAC,EAAE,MAAM,WAAW,MAAM,QAAQ,YAAY,WAAW;AAAA,IACjE,SAAS,CAAC,EAAE,MAAM,WAAW,MAAM,IAAI,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AAM,WAAW,MAAM,YAAY,YAAY,OAAO;AAAA,UACxD,EAAE,MAAM,WAAW,MAAM,UAAU,YAAY,OAAO;AAAA,UACtD,EAAE,MAAM,SAAS,MAAM,KAAK,YAAY,OAAO;AAAA,UAC/C,EAAE,MAAM,WAAW,MAAM,KAAK,YAAY,QAAQ;AAAA,UAClD,EAAE,MAAM,WAAW,MAAM,KAAK,YAAY,QAAQ;AAAA,QAAA;AAAA,MACpD;AAAA,IAEJ;AAAA,IACA,SAAS,CAAA;AAAA,EAAC;AAEd;"}
1
+ {"version":3,"file":"CarrotVesting.js","sources":["../../../../lib/contracts/abis/mainnet/CarrotVesting.ts"],"sourcesContent":["export const CarrotVesting = <const>[\n {\n type: 'function',\n name: 'steps',\n stateMutability: 'view',\n outputs: [{ type: 'uint32', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'EXCHANGE_RATE',\n stateMutability: 'view',\n outputs: [{ type: 'uint256', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'PUFFER_RECOVERY_GRACE_PERIOD',\n stateMutability: 'view',\n outputs: [{ type: 'uint256', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'PUFFER',\n stateMutability: 'view',\n outputs: [{ type: 'address', name: '', simpleType: 'address' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'startPufferRecovery',\n stateMutability: 'nonpayable',\n inputs: [],\n outputs: [],\n },\n {\n type: 'function',\n name: 'TOTAL_PUFFER_REWARDS',\n stateMutability: 'view',\n outputs: [{ type: 'uint256', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'claim',\n stateMutability: 'nonpayable',\n outputs: [{ type: 'uint128', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'totalDepositedAmount',\n stateMutability: 'view',\n outputs: [{ type: 'uint128', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'startVestingWithPermit',\n stateMutability: 'nonpayable',\n inputs: [\n {\n type: 'tuple',\n name: 'permitData',\n simpleType: 'tuple',\n components: [\n { type: 'uint256', name: 'deadline', simpleType: 'uint' },\n { type: 'uint256', name: 'amount', simpleType: 'uint' },\n { type: 'uint8', name: 'v', simpleType: 'uint' },\n { type: 'bytes32', name: 'r', simpleType: 'bytes' },\n { type: 'bytes32', name: 's', simpleType: 'bytes' },\n ],\n },\n ],\n outputs: [],\n },\n {\n type: 'function',\n name: 'startTimestamp',\n stateMutability: 'view',\n outputs: [{ type: 'uint48', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'MAX_CARROT_AMOUNT',\n stateMutability: 'view',\n outputs: [{ type: 'uint256', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'owner',\n stateMutability: 'view',\n outputs: [{ type: 'address', name: '', simpleType: 'address' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'duration',\n stateMutability: 'view',\n outputs: [{ type: 'uint32', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'startVesting',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'uint256', name: 'amount', simpleType: 'uint' }],\n outputs: [],\n },\n {\n type: 'function',\n name: 'CARROT',\n stateMutability: 'view',\n outputs: [{ type: 'address', name: '', simpleType: 'address' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'vestings',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'user', simpleType: 'address' }],\n outputs: [\n { type: 'uint128', name: 'depositedAmount', simpleType: 'uint' },\n { type: 'uint128', name: 'claimedAmount', simpleType: 'uint' },\n { type: 'uint48', name: 'lastClaimedTimestamp', simpleType: 'uint' },\n { type: 'uint48', name: 'depositedTimestamp', simpleType: 'uint' },\n ],\n },\n {\n type: 'function',\n name: 'calculateClaimableAmount',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'user', simpleType: 'address' }],\n outputs: [{ type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,IACjB,SAAS,CAAC,EAAE,MAAM,UAAU,MAAM,IAAI,YAAY,QAAQ;AAAA,IAC1D,QAAQ,CAAA;AAAA,EACV;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,iBAAiB;AAAA,IACjB,QAAQ,CAAC,EAAE,MAAM,WAAW,MAAM,UAAU,YAAY,QAAQ;AAAA,IAChE,SAAS,CAAA;AAAA,EACX;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,iBAAiB;AAAA,IACjB,SAAS,CAAC,EAAE,MAAM,WAAW,MAAM,IAAI,YAAY,WAAW;AAAA,IAC9D,QAAQ,CAAA;AAAA,EACV;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,iBAAiB;AAAA,IACjB,QAAQ,CAAC,EAAE,MAAM,WAAW,MAAM,QAAQ,YAAY,WAAW;AAAA,IACjE,SAAS;AAAA,MACP,EAAE,MAAM,WAAW,MAAM,mBAAmB,YAAY,OAAO;AAAA,MAC/D,EAAE,MAAM,WAAW,MAAM,iBAAiB,YAAY,OAAO;AAAA,MAC7D,EAAE,MAAM,UAAU,MAAM,wBAAwB,YAAY,OAAO;AAAA,MACnE,EAAE,MAAM,UAAU,MAAM,sBAAsB,YAAY,OAAO;AAAA,IAAA;AAAA,EAErE;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,iBAAiB;AAAA,IACjB,QAAQ,CAAC,EAAE,MAAM,WAAW,MAAM,QAAQ,YAAY,WAAW;AAAA,IACjE,SAAS,CAAC,EAAE,MAAM,WAAW,MAAM,IAAI,YAAY,OAAQ,CAAA;AAAA,EAAA;AAE/D;"}
@@ -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",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;
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:"0xb750236d1a8ed77a816992bf8d8711b91b7bbc38"},[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 // 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"}
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: '0xb750236d1a8ed77a816992bf8d8711b91b7bbc38',\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"}
@@ -21,7 +21,7 @@ const f = {
21
21
  GuardianModule: "0x628b183F248a142A598AA2dcCCD6f7E480a7CcF2",
22
22
  GaugeRegistry: "0x0000000000000000000000000000000000000000",
23
23
  // TODO: Replace this tenderly address with the mainnet address.
24
- CarrotVesting: "0xd5f8a4f8312a1745aebe89bb92e90806721322c3"
24
+ CarrotVesting: "0xb750236d1a8ed77a816992bf8d8711b91b7bbc38"
25
25
  },
26
26
  [e.Holesky]: {
27
27
  PufferVault: "0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9",
@@ -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 // 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;"}
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: '0xb750236d1a8ed77a816992bf8d8711b91b7bbc38',\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;"}
@@ -1 +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","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AAA,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"}
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,\n * 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,CAUnD,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"}
@@ -14640,7 +14640,8 @@ export declare class CarrotVestingHandler {
14640
14640
  * Get vesting information for a user.
14641
14641
  *
14642
14642
  * @param user The user address.
14643
- * @returns The vesting information including deposited amount, claimed amount, last claimed timestamp, and deposited timestamp.
14643
+ * @returns The vesting information including deposited amount,
14644
+ * claimed amount, last claimed timestamp, and deposited timestamp.
14644
14645
  */
14645
14646
  vestings(user: Address): Promise<{
14646
14647
  depositedAmount: bigint;
@@ -116,7 +116,8 @@ class V {
116
116
  * Get vesting information for a user.
117
117
  *
118
118
  * @param user The user address.
119
- * @returns The vesting information including deposited amount, claimed amount, last claimed timestamp, and deposited timestamp.
119
+ * @returns The vesting information including deposited amount,
120
+ * claimed amount, last claimed timestamp, and deposited timestamp.
120
121
  */
121
122
  async vestings(t) {
122
123
  const [
@@ -1 +1 @@
1
- {"version":3,"file":"carrot-vesting-handler.js","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":";;;;;;;;;AAoBO,MAAMA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAchC,YACUC,GACAC,GACAC,GACR;AAjBM,IAAAC,EAAA;AACA,IAAAA,EAAA;AAaE,SAAA,QAAAH,GACA,KAAA,eAAAC,GACA,KAAA,eAAAC,GAEH,KAAA,YAAYE,EAAYJ,CAAK,GAClC,KAAK,qBA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AAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQxC,uBAAuB;AAC5B,WAAO,KAAK,cAAc,KAAK,qBAAqB;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ/C,WAAW;AAChB,WAAO,KAAK,cAAc,KAAK,SAAS;AAAA,EAAA;AAE5C;"}
1
+ {"version":3,"file":"carrot-vesting-handler.js","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,\n * 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":";;;;;;;;;AAoBO,MAAMA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAchC,YACUC,GACAC,GACAC,GACR;AAjBM,IAAAC,EAAA;AACA,IAAAA,EAAA;AAaE,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;AAAA,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B;AAC5B,WAAO,KAAK,cAAc,KAAK,qBAAqB;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ/C,WAAW;AAChB,WAAO,KAAK,cAAc,KAAK,SAAS;AAAA,EAAA;AAE5C;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="1.27.1",o=e;exports.version=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="1.28.0",o=e;exports.version=o;
2
2
  //# sourceMappingURL=version.cjs.map
@@ -1,4 +1,4 @@
1
- const o = "1.27.1", n = o;
1
+ const o = "1.28.0", 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.28.0",
4
+ "version": "1.28.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/PufferFinance/puffer-sdk.git"