@pufferfinance/puffer-sdk 1.28.5 → 1.29.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-helpers.cjs +1 -1
- package/dist/api/puffer-client-helpers.cjs.map +1 -1
- package/dist/api/puffer-client-helpers.js +3 -3
- package/dist/api/puffer-client-helpers.js.map +1 -1
- package/dist/api/puffer-client.cjs +1 -1
- package/dist/api/puffer-client.js +2 -2
- package/dist/{ccip-LIGR3N1A.cjs → ccip-Dv8Z-tXr.cjs} +2 -2
- package/dist/{ccip-LIGR3N1A.cjs.map → ccip-Dv8Z-tXr.cjs.map} +1 -1
- package/dist/{ccip-78YM988s.js → ccip-dYaIZXTj.js} +4 -4
- package/dist/{ccip-78YM988s.js.map → ccip-dYaIZXTj.js.map} +1 -1
- package/dist/chains/constants.cjs +1 -1
- package/dist/chains/constants.js +1 -1
- package/dist/constants-4-ehn8UI.cjs +9 -0
- package/dist/constants-4-ehn8UI.cjs.map +1 -0
- package/dist/{constants-CuIEh_ZS.js → constants-BO_Dvglw.js} +163 -143
- package/dist/constants-BO_Dvglw.js.map +1 -0
- package/dist/contracts/abis/mainnet/CarrotVesting.cjs +1 -1
- package/dist/contracts/abis/mainnet/CarrotVesting.cjs.map +1 -1
- package/dist/contracts/abis/mainnet/CarrotVesting.d.ts +30 -0
- package/dist/contracts/abis/mainnet/CarrotVesting.js +21 -0
- package/dist/contracts/abis/mainnet/CarrotVesting.js.map +1 -1
- package/dist/contracts/addresses.cjs +1 -1
- package/dist/contracts/addresses.js +1 -1
- package/dist/contracts/handlers/carrot-staking-handler.cjs +1 -1
- package/dist/contracts/handlers/carrot-staking-handler.d.ts +18 -0
- package/dist/contracts/handlers/carrot-staking-handler.js +2 -2
- package/dist/contracts/handlers/carrot-vesting-handler.cjs +1 -1
- package/dist/contracts/handlers/carrot-vesting-handler.cjs.map +1 -1
- package/dist/contracts/handlers/carrot-vesting-handler.d.ts +39 -0
- package/dist/contracts/handlers/carrot-vesting-handler.js +32 -5
- package/dist/contracts/handlers/carrot-vesting-handler.js.map +1 -1
- package/dist/contracts/handlers/concrete-vault-handler.cjs +1 -1
- package/dist/contracts/handlers/concrete-vault-handler.d.ts +18 -0
- package/dist/contracts/handlers/concrete-vault-handler.js +2 -2
- package/dist/contracts/handlers/distributor-handler.cjs +1 -1
- package/dist/contracts/handlers/distributor-handler.d.ts +18 -0
- package/dist/contracts/handlers/distributor-handler.js +2 -2
- package/dist/contracts/handlers/erc20-permit-handler.cjs +1 -1
- package/dist/contracts/handlers/erc20-permit-handler.cjs.map +1 -1
- package/dist/contracts/handlers/erc20-permit-handler.d.ts +18 -0
- package/dist/contracts/handlers/erc20-permit-handler.js +3 -3
- package/dist/contracts/handlers/erc20-permit-handler.js.map +1 -1
- package/dist/contracts/handlers/gauge-registry-handler.cjs +1 -1
- package/dist/contracts/handlers/gauge-registry-handler.d.ts +18 -0
- package/dist/contracts/handlers/gauge-registry-handler.js +2 -2
- package/dist/contracts/handlers/guardian-module-handler.cjs +1 -1
- package/dist/contracts/handlers/guardian-module-handler.d.ts +18 -0
- package/dist/contracts/handlers/guardian-module-handler.js +2 -2
- package/dist/contracts/handlers/institutional-access-manager-handler.cjs +1 -1
- package/dist/contracts/handlers/institutional-access-manager-handler.d.ts +18 -0
- package/dist/contracts/handlers/institutional-access-manager-handler.js +3 -3
- package/dist/contracts/handlers/institutional-vault-handler.cjs +1 -1
- package/dist/contracts/handlers/institutional-vault-handler.d.ts +18 -0
- package/dist/contracts/handlers/institutional-vault-handler.js +2 -2
- package/dist/contracts/handlers/l1-reward-manager-handler.cjs +1 -1
- package/dist/contracts/handlers/l1-reward-manager-handler.d.ts +18 -0
- package/dist/contracts/handlers/l1-reward-manager-handler.js +2 -2
- package/dist/contracts/handlers/l2-reward-manager-handler.cjs +1 -1
- package/dist/contracts/handlers/l2-reward-manager-handler.d.ts +18 -0
- package/dist/contracts/handlers/l2-reward-manager-handler.js +2 -2
- package/dist/contracts/handlers/lagoon-vault-handler.cjs +1 -1
- package/dist/contracts/handlers/lagoon-vault-handler.d.ts +18 -0
- package/dist/contracts/handlers/lagoon-vault-handler.js +2 -2
- package/dist/contracts/handlers/mtw-carrot-handler.cjs +1 -1
- package/dist/contracts/handlers/mtw-carrot-handler.d.ts +18 -0
- package/dist/contracts/handlers/mtw-carrot-handler.js +2 -2
- package/dist/contracts/handlers/nucleus-accountant-handler.cjs +1 -1
- package/dist/contracts/handlers/nucleus-accountant-handler.d.ts +18 -0
- package/dist/contracts/handlers/nucleus-accountant-handler.js +1 -1
- package/dist/contracts/handlers/nucleus-atomic-queue-handler.cjs +1 -1
- package/dist/contracts/handlers/nucleus-atomic-queue-handler.d.ts +18 -0
- package/dist/contracts/handlers/nucleus-atomic-queue-handler.js +2 -2
- package/dist/contracts/handlers/nucleus-boring-vault-handler.cjs +1 -1
- package/dist/contracts/handlers/nucleus-boring-vault-handler.d.ts +18 -0
- package/dist/contracts/handlers/nucleus-boring-vault-handler.js +2 -2
- package/dist/contracts/handlers/nucleus-teller-handler.cjs +1 -1
- package/dist/contracts/handlers/nucleus-teller-handler.d.ts +18 -0
- package/dist/contracts/handlers/nucleus-teller-handler.js +2 -2
- package/dist/contracts/handlers/puf-locker-handler.cjs +1 -1
- package/dist/contracts/handlers/puf-locker-handler.d.ts +18 -0
- package/dist/contracts/handlers/puf-locker-handler.js +2 -2
- package/dist/contracts/handlers/puffer-depositor-handler.cjs +1 -1
- package/dist/contracts/handlers/puffer-depositor-handler.d.ts +18 -0
- package/dist/contracts/handlers/puffer-depositor-handler.js +2 -2
- package/dist/contracts/handlers/puffer-l2-depositor-handler.cjs +1 -1
- package/dist/contracts/handlers/puffer-l2-depositor-handler.d.ts +18 -0
- package/dist/contracts/handlers/puffer-l2-depositor-handler.js +2 -2
- package/dist/contracts/handlers/puffer-oracle-v2-handler.cjs +1 -1
- package/dist/contracts/handlers/puffer-oracle-v2-handler.d.ts +18 -0
- package/dist/contracts/handlers/puffer-oracle-v2-handler.js +2 -2
- package/dist/contracts/handlers/puffer-protocol-handler.cjs +1 -1
- package/dist/contracts/handlers/puffer-protocol-handler.d.ts +18 -0
- package/dist/contracts/handlers/puffer-protocol-handler.js +2 -2
- package/dist/contracts/handlers/puffer-vault-handler.cjs +1 -1
- package/dist/contracts/handlers/puffer-vault-handler.d.ts +18 -0
- package/dist/contracts/handlers/puffer-vault-handler.js +2 -2
- package/dist/contracts/handlers/puffer-withdrawal-manager-handler.cjs +1 -1
- package/dist/contracts/handlers/puffer-withdrawal-manager-handler.d.ts +18 -0
- package/dist/contracts/handlers/puffer-withdrawal-manager-handler.js +2 -2
- package/dist/contracts/handlers/validator-ticket-handler.cjs +1 -1
- package/dist/contracts/handlers/validator-ticket-handler.d.ts +18 -0
- package/dist/contracts/handlers/validator-ticket-handler.js +2 -2
- package/dist/contracts/handlers/vl-puffer-handler.cjs +1 -1
- package/dist/contracts/handlers/vl-puffer-handler.d.ts +18 -0
- package/dist/contracts/handlers/vl-puffer-handler.js +2 -2
- package/dist/contracts/tokens.cjs +1 -1
- package/dist/contracts/tokens.js +1 -1
- package/dist/contracts/vaults-addresses.cjs +1 -1
- package/dist/contracts/vaults-addresses.js +1 -1
- package/dist/{getContract-D4_SEfqa.cjs → getContract-C6a8L2Jd.cjs} +2 -2
- package/dist/{getContract-D4_SEfqa.cjs.map → getContract-C6a8L2Jd.cjs.map} +1 -1
- package/dist/{getContract-DQN7VDBo.js → getContract-DRjKmuyC.js} +2 -2
- package/dist/{getContract-DQN7VDBo.js.map → getContract-DRjKmuyC.js.map} +1 -1
- package/dist/http-CRYDzx7w.cjs +5 -0
- package/dist/http-CRYDzx7w.cjs.map +1 -0
- package/dist/{http-CajzXkt4.js → http-ZcKHvn9V.js} +1313 -1116
- package/dist/http-ZcKHvn9V.js.map +1 -0
- package/dist/{localBatchGatewayRequest-C7zYTS2c.cjs → localBatchGatewayRequest-BTy8p6qj.cjs} +2 -2
- package/dist/{localBatchGatewayRequest-C7zYTS2c.cjs.map → localBatchGatewayRequest-BTy8p6qj.cjs.map} +1 -1
- package/dist/{localBatchGatewayRequest-DtOvBmA9.js → localBatchGatewayRequest-Cb0QKL0s.js} +3 -3
- package/dist/{localBatchGatewayRequest-DtOvBmA9.js.map → localBatchGatewayRequest-Cb0QKL0s.js.map} +1 -1
- package/dist/main.cjs +1 -1
- package/dist/main.js +1 -1
- package/dist/{secp256k1-CMP_u7qb.cjs → secp256k1-CzsL7iVx.cjs} +2 -2
- package/dist/{secp256k1-CMP_u7qb.cjs.map → secp256k1-CzsL7iVx.cjs.map} +1 -1
- package/dist/{secp256k1-DCMgMsfV.js → secp256k1-Dx1prb1E.js} +2 -2
- package/dist/{secp256k1-DCMgMsfV.js.map → secp256k1-Dx1prb1E.js.map} +1 -1
- package/dist/utils/version.cjs +1 -1
- package/dist/utils/version.js +1 -1
- package/dist/{writeContract-DYAfDrRz.js → writeContract-BFxyLFA9.js} +881 -902
- package/dist/writeContract-BFxyLFA9.js.map +1 -0
- package/dist/{writeContract-BnmmOPwy.cjs → writeContract-HBsqM_Od.cjs} +22 -22
- package/dist/writeContract-HBsqM_Od.cjs.map +1 -0
- package/package.json +12 -12
- package/dist/constants-6kuRTsbU.cjs +0 -9
- package/dist/constants-6kuRTsbU.cjs.map +0 -1
- package/dist/constants-CuIEh_ZS.js.map +0 -1
- package/dist/http-CajzXkt4.js.map +0 -1
- package/dist/http-qhIDc8Dn.cjs +0 -5
- package/dist/http-qhIDc8Dn.cjs.map +0 -1
- package/dist/writeContract-BnmmOPwy.cjs.map +0 -1
- package/dist/writeContract-DYAfDrRz.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=[{type:"function",name:"calculateClaimableAmount",stateMutability:"view",inputs:[{type:"address",name:"user",simpleType:"address"}],outputs:[{type:"uint256",name:"",simpleType:"uint"}]},{type:"function",name:"PUFFER",stateMutability:"view",outputs:[{type:"address",name:"",simpleType:"address"}],inputs:[]},{type:"function",name:"claim",stateMutability:"nonpayable",outputs:[{type:"uint128",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"owner",stateMutability:"view",outputs:[{type:"address",name:"",simpleType:"address"}],inputs:[]},{type:"function",name:"getTotalDepositedAmount",stateMutability:"view",outputs:[{type:"uint128",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"getVestings",stateMutability:"view",inputs:[{type:"address",name:"user",simpleType:"address"}],outputs:[{type:"tuple[]",name:"",simpleType:"slice",nestedType:{type:"tuple"},components:[{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:"TOTAL_PUFFER_REWARDS",stateMutability:"view",outputs:[{type:"uint256",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"getDuration",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:"getSteps",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:"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:"CARROT",stateMutability:"view",outputs:[{type:"address",name:"",simpleType:"address"}],inputs:[]},{type:"function",name:"getStartTimestamp",stateMutability:"view",outputs:[{type:"uint48",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"MAX_CARROT_AMOUNT",stateMutability:"view",outputs:[{type:"uint256",name:"",simpleType:"uint"}],inputs:[]}];exports.CarrotVesting=t;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=[{type:"function",name:"calculateClaimableAmount",stateMutability:"view",inputs:[{type:"address",name:"user",simpleType:"address"}],outputs:[{type:"uint256",name:"",simpleType:"uint"}]},{type:"function",name:"PUFFER",stateMutability:"view",outputs:[{type:"address",name:"",simpleType:"address"}],inputs:[]},{type:"function",name:"claim",stateMutability:"nonpayable",outputs:[{type:"uint128",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"owner",stateMutability:"view",outputs:[{type:"address",name:"",simpleType:"address"}],inputs:[]},{type:"function",name:"getTotalDepositedAmount",stateMutability:"view",outputs:[{type:"uint128",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"getVestings",stateMutability:"view",inputs:[{type:"address",name:"user",simpleType:"address"}],outputs:[{type:"tuple[]",name:"",simpleType:"slice",nestedType:{type:"tuple"},components:[{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:"TOTAL_PUFFER_REWARDS",stateMutability:"view",outputs:[{type:"uint256",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"getDuration",stateMutability:"view",outputs:[{type:"uint32",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"getNewDuration",stateMutability:"view",outputs:[{internalType:"uint32",name:"",type:"uint32"}],inputs:[]},{type:"function",name:"startVesting",stateMutability:"nonpayable",inputs:[{type:"uint256",name:"amount",simpleType:"uint"}],outputs:[]},{type:"function",name:"getSteps",stateMutability:"view",outputs:[{type:"uint32",name:"",simpleType:"uint"}],inputs:[]},{inputs:[],name:"getNewSteps",outputs:[{internalType:"uint32",name:"",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUpgradeTimestamp",outputs:[{internalType:"uint48",name:"",type:"uint48"}],stateMutability:"view",type:"function"},{type:"function",name:"EXCHANGE_RATE",stateMutability:"view",outputs:[{type:"uint256",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:"CARROT",stateMutability:"view",outputs:[{type:"address",name:"",simpleType:"address"}],inputs:[]},{type:"function",name:"getStartTimestamp",stateMutability:"view",outputs:[{type:"uint48",name:"",simpleType:"uint"}],inputs:[]},{type:"function",name:"MAX_CARROT_AMOUNT",stateMutability:"view",outputs:[{type:"uint256",name:"",simpleType:"uint"}],inputs:[]}];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: 'calculateClaimableAmount',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'user', simpleType: 'address' }],\n outputs: [{ type: 'uint256', name: '', simpleType: 'uint' }],\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: 'claim',\n stateMutability: 'nonpayable',\n outputs: [{ type: 'uint128', 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: 'getTotalDepositedAmount',\n stateMutability: 'view',\n outputs: [{ type: 'uint128', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'getVestings',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'user', simpleType: 'address' }],\n outputs: [\n {\n type: 'tuple[]',\n name: '',\n simpleType: 'slice',\n nestedType: { type: 'tuple' },\n components: [\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 },\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: 'getDuration',\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: 'getSteps',\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: '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: 'CARROT',\n stateMutability: 'view',\n outputs: [{ type: 'address', name: '', simpleType: 'address' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'getStartTimestamp',\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"],"names":["CarrotVesting"],"mappings":"gFAAO,MAAMA,EAAuB,CAClC,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,MAAA,CAAQ,CAAA,EAE7D,CACE,KAAM,WACN,KAAM,SACN,gBAAiB,OACjB,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,UAAW,EAC9D,OAAQ,CAAA,CAAC,EAEX,CACE,KAAM,WACN,KAAM,QACN,gBAAiB,aACjB,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,OAAQ,EAC3D,OAAQ,CAAA,CAAC,EAEX,CACE,KAAM,WACN,KAAM,QACN,gBAAiB,OACjB,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,UAAW,EAC9D,OAAQ,CAAA,CAAC,EAEX,CACE,KAAM,WACN,KAAM,0BACN,gBAAiB,OACjB,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,OAAQ,EAC3D,OAAQ,CAAA,CAAC,EAEX,CACE,KAAM,WACN,KAAM,cACN,gBAAiB,OACjB,OAAQ,CAAC,CAAE,KAAM,UAAW,KAAM,OAAQ,WAAY,UAAW,EACjE,QAAS,CACP,CACE,KAAM,UACN,KAAM,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,KAAM,UAAW,KAAM,IAAK,WAAY,OAAA,CAAQ,CACpD,CACF,EAEF,QAAS,CAAA,CAAC,EAEZ,CACE,KAAM,WACN,KAAM,SACN,gBAAiB,OACjB,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,UAAW,EAC9D,OAAQ,CAAA,CAAC,EAEX,CACE,KAAM,WACN,KAAM,oBACN,gBAAiB,OACjB,QAAS,CAAC,CAAE,KAAM,SAAU,KAAM,GAAI,WAAY,OAAQ,EAC1D,OAAQ,CAAA,CAAC,EAEX,CACE,KAAM,WACN,KAAM,oBACN,gBAAiB,OACjB,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,OAAQ,EAC3D,OAAQ,CAAA,CAAC,CAEb"}
|
|
1
|
+
{"version":3,"file":"CarrotVesting.cjs","sources":["../../../../lib/contracts/abis/mainnet/CarrotVesting.ts"],"sourcesContent":["export const CarrotVesting = <const>[\n {\n type: 'function',\n name: 'calculateClaimableAmount',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'user', simpleType: 'address' }],\n outputs: [{ type: 'uint256', name: '', simpleType: 'uint' }],\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: 'claim',\n stateMutability: 'nonpayable',\n outputs: [{ type: 'uint128', 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: 'getTotalDepositedAmount',\n stateMutability: 'view',\n outputs: [{ type: 'uint128', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'getVestings',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'user', simpleType: 'address' }],\n outputs: [\n {\n type: 'tuple[]',\n name: '',\n simpleType: 'slice',\n nestedType: { type: 'tuple' },\n components: [\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 },\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: 'getDuration',\n stateMutability: 'view',\n outputs: [{ type: 'uint32', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'getNewDuration',\n stateMutability: 'view',\n outputs: [{ internalType: 'uint32', name: '', type: 'uint32' }],\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: 'getSteps',\n stateMutability: 'view',\n outputs: [{ type: 'uint32', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n inputs: [],\n name: 'getNewSteps',\n outputs: [{ internalType: 'uint32', name: '', type: 'uint32' }],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [],\n name: 'getUpgradeTimestamp',\n outputs: [{ internalType: 'uint48', name: '', type: 'uint48' }],\n stateMutability: 'view',\n type: 'function',\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: '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: 'CARROT',\n stateMutability: 'view',\n outputs: [{ type: 'address', name: '', simpleType: 'address' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'getStartTimestamp',\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"],"names":["CarrotVesting"],"mappings":"gFAAO,MAAMA,EAAuB,CAClC,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,MAAA,CAAQ,CAAA,EAE7D,CACE,KAAM,WACN,KAAM,SACN,gBAAiB,OACjB,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,UAAW,EAC9D,OAAQ,CAAA,CAAC,EAEX,CACE,KAAM,WACN,KAAM,QACN,gBAAiB,aACjB,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,OAAQ,EAC3D,OAAQ,CAAA,CAAC,EAEX,CACE,KAAM,WACN,KAAM,QACN,gBAAiB,OACjB,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,UAAW,EAC9D,OAAQ,CAAA,CAAC,EAEX,CACE,KAAM,WACN,KAAM,0BACN,gBAAiB,OACjB,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,OAAQ,EAC3D,OAAQ,CAAA,CAAC,EAEX,CACE,KAAM,WACN,KAAM,cACN,gBAAiB,OACjB,OAAQ,CAAC,CAAE,KAAM,UAAW,KAAM,OAAQ,WAAY,UAAW,EACjE,QAAS,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ACN,gBAAiB,OACjB,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,OAAQ,EAC3D,OAAQ,CAAA,CAAC,EAEX,CACE,KAAM,WACN,KAAM,yBACN,gBAAiB,aACjB,OAAQ,CACN,CACE,KAAM,QACN,KAAM,aACN,WAAY,QACZ,WAAY,CACV,CAAE,KAAM,UAAW,KAAM,WAAY,WAAY,MAAA,EACjD,CAAE,KAAM,UAAW,KAAM,SAAU,WAAY,MAAA,EAC/C,CAAE,KAAM,QAAS,KAAM,IAAK,WAAY,MAAA,EACxC,CAAE,KAAM,UAAW,KAAM,IAAK,WAAY,OAAA,EAC1C,CAAE,KAAM,UAAW,KAAM,IAAK,WAAY,OAAA,CAAQ,CACpD,CACF,EAEF,QAAS,CAAA,CAAC,EAEZ,CACE,KAAM,WACN,KAAM,SACN,gBAAiB,OACjB,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,UAAW,EAC9D,OAAQ,CAAA,CAAC,EAEX,CACE,KAAM,WACN,KAAM,oBACN,gBAAiB,OACjB,QAAS,CAAC,CAAE,KAAM,SAAU,KAAM,GAAI,WAAY,OAAQ,EAC1D,OAAQ,CAAA,CAAC,EAEX,CACE,KAAM,WACN,KAAM,oBACN,gBAAiB,OACjB,QAAS,CAAC,CAAE,KAAM,UAAW,KAAM,GAAI,WAAY,OAAQ,EAC3D,OAAQ,CAAA,CAAC,CAEb"}
|
|
@@ -106,6 +106,16 @@ export declare const CarrotVesting: readonly [{
|
|
|
106
106
|
readonly simpleType: "uint";
|
|
107
107
|
}];
|
|
108
108
|
readonly inputs: readonly [];
|
|
109
|
+
}, {
|
|
110
|
+
readonly type: "function";
|
|
111
|
+
readonly name: "getNewDuration";
|
|
112
|
+
readonly stateMutability: "view";
|
|
113
|
+
readonly outputs: readonly [{
|
|
114
|
+
readonly internalType: "uint32";
|
|
115
|
+
readonly name: "";
|
|
116
|
+
readonly type: "uint32";
|
|
117
|
+
}];
|
|
118
|
+
readonly inputs: readonly [];
|
|
109
119
|
}, {
|
|
110
120
|
readonly type: "function";
|
|
111
121
|
readonly name: "startVesting";
|
|
@@ -126,6 +136,26 @@ export declare const CarrotVesting: readonly [{
|
|
|
126
136
|
readonly simpleType: "uint";
|
|
127
137
|
}];
|
|
128
138
|
readonly inputs: readonly [];
|
|
139
|
+
}, {
|
|
140
|
+
readonly inputs: readonly [];
|
|
141
|
+
readonly name: "getNewSteps";
|
|
142
|
+
readonly outputs: readonly [{
|
|
143
|
+
readonly internalType: "uint32";
|
|
144
|
+
readonly name: "";
|
|
145
|
+
readonly type: "uint32";
|
|
146
|
+
}];
|
|
147
|
+
readonly stateMutability: "view";
|
|
148
|
+
readonly type: "function";
|
|
149
|
+
}, {
|
|
150
|
+
readonly inputs: readonly [];
|
|
151
|
+
readonly name: "getUpgradeTimestamp";
|
|
152
|
+
readonly outputs: readonly [{
|
|
153
|
+
readonly internalType: "uint48";
|
|
154
|
+
readonly name: "";
|
|
155
|
+
readonly type: "uint48";
|
|
156
|
+
}];
|
|
157
|
+
readonly stateMutability: "view";
|
|
158
|
+
readonly type: "function";
|
|
129
159
|
}, {
|
|
130
160
|
readonly type: "function";
|
|
131
161
|
readonly name: "EXCHANGE_RATE";
|
|
@@ -68,6 +68,13 @@ const t = [
|
|
|
68
68
|
outputs: [{ type: "uint32", name: "", simpleType: "uint" }],
|
|
69
69
|
inputs: []
|
|
70
70
|
},
|
|
71
|
+
{
|
|
72
|
+
type: "function",
|
|
73
|
+
name: "getNewDuration",
|
|
74
|
+
stateMutability: "view",
|
|
75
|
+
outputs: [{ internalType: "uint32", name: "", type: "uint32" }],
|
|
76
|
+
inputs: []
|
|
77
|
+
},
|
|
71
78
|
{
|
|
72
79
|
type: "function",
|
|
73
80
|
name: "startVesting",
|
|
@@ -82,6 +89,20 @@ const t = [
|
|
|
82
89
|
outputs: [{ type: "uint32", name: "", simpleType: "uint" }],
|
|
83
90
|
inputs: []
|
|
84
91
|
},
|
|
92
|
+
{
|
|
93
|
+
inputs: [],
|
|
94
|
+
name: "getNewSteps",
|
|
95
|
+
outputs: [{ internalType: "uint32", name: "", type: "uint32" }],
|
|
96
|
+
stateMutability: "view",
|
|
97
|
+
type: "function"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
inputs: [],
|
|
101
|
+
name: "getUpgradeTimestamp",
|
|
102
|
+
outputs: [{ internalType: "uint48", name: "", type: "uint48" }],
|
|
103
|
+
stateMutability: "view",
|
|
104
|
+
type: "function"
|
|
105
|
+
},
|
|
85
106
|
{
|
|
86
107
|
type: "function",
|
|
87
108
|
name: "EXCHANGE_RATE",
|
|
@@ -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: 'calculateClaimableAmount',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'user', simpleType: 'address' }],\n outputs: [{ type: 'uint256', name: '', simpleType: 'uint' }],\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: 'claim',\n stateMutability: 'nonpayable',\n outputs: [{ type: 'uint128', 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: 'getTotalDepositedAmount',\n stateMutability: 'view',\n outputs: [{ type: 'uint128', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'getVestings',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'user', simpleType: 'address' }],\n outputs: [\n {\n type: 'tuple[]',\n name: '',\n simpleType: 'slice',\n nestedType: { type: 'tuple' },\n components: [\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 },\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: 'getDuration',\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: 'getSteps',\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: '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: 'CARROT',\n stateMutability: 'view',\n outputs: [{ type: 'address', name: '', simpleType: 'address' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'getStartTimestamp',\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: [],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AA,QACN,MAAM;AAAA,QACN,YAAY;AAAA,QACZ,YAAY;AAAA,UACV,EAAE,MAAM,WAAW,MAAM,YAAY,YAAY,OAAA;AAAA,UACjD,EAAE,MAAM,WAAW,MAAM,UAAU,YAAY,OAAA;AAAA,UAC/C,EAAE,MAAM,SAAS,MAAM,KAAK,YAAY,OAAA;AAAA,UACxC,EAAE,MAAM,WAAW,MAAM,KAAK,YAAY,QAAA;AAAA,UAC1C,EAAE,MAAM,WAAW,MAAM,KAAK,YAAY,QAAA;AAAA,QAAQ;AAAA,MACpD;AAAA,IACF;AAAA,IAEF,SAAS,CAAA;AAAA,EAAC;AAAA,EAEZ;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,EAAC;AAAA,EAEX;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,iBAAiB;AAAA,IACjB,SAAS,CAAC,EAAE,MAAM,UAAU,MAAM,IAAI,YAAY,QAAQ;AAAA,IAC1D,QAAQ,CAAA;AAAA,EAAC;AAAA,EAEX;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,iBAAiB;AAAA,IACjB,SAAS,CAAC,EAAE,MAAM,WAAW,MAAM,IAAI,YAAY,QAAQ;AAAA,IAC3D,QAAQ,CAAA;AAAA,EAAC;AAEb;"}
|
|
1
|
+
{"version":3,"file":"CarrotVesting.js","sources":["../../../../lib/contracts/abis/mainnet/CarrotVesting.ts"],"sourcesContent":["export const CarrotVesting = <const>[\n {\n type: 'function',\n name: 'calculateClaimableAmount',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'user', simpleType: 'address' }],\n outputs: [{ type: 'uint256', name: '', simpleType: 'uint' }],\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: 'claim',\n stateMutability: 'nonpayable',\n outputs: [{ type: 'uint128', 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: 'getTotalDepositedAmount',\n stateMutability: 'view',\n outputs: [{ type: 'uint128', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'getVestings',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'user', simpleType: 'address' }],\n outputs: [\n {\n type: 'tuple[]',\n name: '',\n simpleType: 'slice',\n nestedType: { type: 'tuple' },\n components: [\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 },\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: 'getDuration',\n stateMutability: 'view',\n outputs: [{ type: 'uint32', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'getNewDuration',\n stateMutability: 'view',\n outputs: [{ internalType: 'uint32', name: '', type: 'uint32' }],\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: 'getSteps',\n stateMutability: 'view',\n outputs: [{ type: 'uint32', name: '', simpleType: 'uint' }],\n inputs: [],\n },\n {\n inputs: [],\n name: 'getNewSteps',\n outputs: [{ internalType: 'uint32', name: '', type: 'uint32' }],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [],\n name: 'getUpgradeTimestamp',\n outputs: [{ internalType: 'uint48', name: '', type: 'uint48' }],\n stateMutability: 'view',\n type: 'function',\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: '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: 'CARROT',\n stateMutability: 'view',\n outputs: [{ type: 'address', name: '', simpleType: 'address' }],\n inputs: [],\n },\n {\n type: 'function',\n name: 'getStartTimestamp',\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"],"names":["CarrotVesting"],"mappings":"AAAO,MAAMA,IAAuB;AAAA,EAClC;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,OAAA,CAAQ;AAAA,EAAA;AAAA,EAE7D;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,iBAAiB;AAAA,IACjB,SAAS,CAAC,EAAE,MAAM,WAAW,MAAM,IAAI,YAAY,WAAW;AAAA,IAC9D,QAAQ,C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ACN,MAAM;AAAA,IACN,iBAAiB;AAAA,IACjB,QAAQ;AAAA,MACN;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,YAAY;AAAA,QACZ,YAAY;AAAA,UACV,EAAE,MAAM,WAAW,MAAM,YAAY,YAAY,OAAA;AAAA,UACjD,EAAE,MAAM,WAAW,MAAM,UAAU,YAAY,OAAA;AAAA,UAC/C,EAAE,MAAM,SAAS,MAAM,KAAK,YAAY,OAAA;AAAA,UACxC,EAAE,MAAM,WAAW,MAAM,KAAK,YAAY,QAAA;AAAA,UAC1C,EAAE,MAAM,WAAW,MAAM,KAAK,YAAY,QAAA;AAAA,QAAQ;AAAA,MACpD;AAAA,IACF;AAAA,IAEF,SAAS,CAAA;AAAA,EAAC;AAAA,EAEZ;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,EAAC;AAAA,EAEX;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,iBAAiB;AAAA,IACjB,SAAS,CAAC,EAAE,MAAM,UAAU,MAAM,IAAI,YAAY,QAAQ;AAAA,IAC1D,QAAQ,CAAA;AAAA,EAAC;AAAA,EAEX;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,iBAAiB;AAAA,IACjB,SAAS,CAAC,EAAE,MAAM,WAAW,MAAM,IAAI,YAAY,QAAQ;AAAA,IAC3D,QAAQ,CAAA;AAAA,EAAC;AAEb;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../constants-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../constants-4-ehn8UI.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:"0x27ef0bc5eaa61dc6e7d08f17eb00de7d94398a25",CarrotVesting:"0xff00c2dd07d811bea632cb9f9e4919dd6fcbc82b"},[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,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../constants-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../constants-4-ehn8UI.cjs"),n=require("../tokens.cjs"),i=require("../abis/mainnet/CarrotStaker.cjs"),s=require("../../getContract-C6a8L2Jd.cjs");class c{constructor(t,e,a){this.chain=t,this.walletClient=e,this.publicClient=a,this.viemChain=r.VIEM_CHAINS[t]}viemChain;getContract(){const t=n.TOKENS_ADDRESSES[n.Token.sCARROT][this.chain],e=i.CarrotStaker,a={public:this.publicClient,wallet:this.walletClient};return s.getContract({address:t,abi:e,client:a})}allowance(t,e){return this.getContract().read.allowance([t,e])}balanceOf(t){return this.getContract().read.balanceOf([t])}decimals(){return this.getContract().read.decimals()}isUnstakingAllowed(){return this.getContract().read.isUnstakingAllowed()}totalSupply(){return this.getContract().read.totalSupply()}stake(t,e){return this.getContract().write.stake([e],{account:t,chain:this.viemChain})}unstake(t,e,a){return this.getContract().write.unstake([e,a],{account:t,chain:this.viemChain})}}exports.CarrotStakingHandler=c;
|
|
2
2
|
//# sourceMappingURL=carrot-staking-handler.cjs.map
|
|
@@ -3705,6 +3705,7 @@ export declare class CarrotStakingHandler {
|
|
|
3705
3705
|
}, (request["parameters"] extends readonly import('viem').PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "fees" | "gas" | "nonce" | "blobVersionedHashes" | "chainId" | "type") extends infer T_13 ? T_13 extends (request["parameters"] extends readonly import('viem').PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "fees" | "gas" | "nonce" | "blobVersionedHashes" | "chainId" | "type") ? T_13 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_13 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">) extends infer T ? { [K in keyof T]: T[K]; } : never>;
|
|
3706
3706
|
readContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "pure" | "view">, const args extends import('viem').ContractFunctionArgs<abi, "pure" | "view", functionName>>(args: import('viem').ReadContractParameters<abi, functionName, args>) => Promise<import('viem').ReadContractReturnType<abi, functionName, args>>;
|
|
3707
3707
|
sendRawTransaction: (args: import('viem').SendRawTransactionParameters) => Promise<import('viem').SendRawTransactionReturnType>;
|
|
3708
|
+
sendRawTransactionSync: (args: import('viem').SendRawTransactionSyncParameters) => Promise<import('viem').TransactionReceipt>;
|
|
3708
3709
|
simulate: <const calls extends readonly unknown[]>(args: import('viem').SimulateBlocksParameters<calls>) => Promise<import('viem').SimulateBlocksReturnType<calls>>;
|
|
3709
3710
|
simulateBlocks: <const calls extends readonly unknown[]>(args: import('viem').SimulateBlocksParameters<calls>) => Promise<import('viem').SimulateBlocksReturnType<calls>>;
|
|
3710
3711
|
simulateCalls: <const calls extends readonly unknown[]>(args: import('viem').SimulateCallsParameters<calls>) => Promise<import('viem').SimulateCallsReturnType<calls>>;
|
|
@@ -7034,8 +7035,24 @@ export declare class CarrotStakingHandler {
|
|
|
7034
7035
|
} | undefined;
|
|
7035
7036
|
id: string;
|
|
7036
7037
|
}>;
|
|
7038
|
+
sendCallsSync: <const calls extends readonly unknown[], chainOverride extends ViemChain | undefined = undefined>(parameters: import('viem').SendCallsSyncParameters<ViemChain | undefined, import('viem').Account | undefined, chainOverride, calls>) => Promise<{
|
|
7039
|
+
id: string;
|
|
7040
|
+
chainId: number;
|
|
7041
|
+
version: string;
|
|
7042
|
+
atomic: boolean;
|
|
7043
|
+
capabilities?: {
|
|
7044
|
+
[key: string]: any;
|
|
7045
|
+
} | {
|
|
7046
|
+
[x: string]: any;
|
|
7047
|
+
} | undefined;
|
|
7048
|
+
receipts?: import('viem').WalletCallReceipt<bigint, "success" | "reverted">[] | undefined;
|
|
7049
|
+
statusCode: number;
|
|
7050
|
+
status: "pending" | "success" | "failure" | undefined;
|
|
7051
|
+
}>;
|
|
7037
7052
|
sendRawTransaction: (args: import('viem').SendRawTransactionParameters) => Promise<import('viem').SendRawTransactionReturnType>;
|
|
7053
|
+
sendRawTransactionSync: (args: import('viem').SendRawTransactionSyncParameters) => Promise<import('viem').TransactionReceipt>;
|
|
7038
7054
|
sendTransaction: <const request extends import('viem').SendTransactionRequest<ViemChain | undefined, chainOverride>, chainOverride extends ViemChain | undefined = undefined>(args: import('viem').SendTransactionParameters<ViemChain | undefined, import('viem').Account | undefined, chainOverride, request>) => Promise<import('viem').SendTransactionReturnType>;
|
|
7055
|
+
sendTransactionSync: <const request extends import('viem').SendTransactionSyncRequest<ViemChain | undefined, chainOverride>, chainOverride extends ViemChain | undefined = undefined>(args: import('viem').SendTransactionSyncParameters<ViemChain | undefined, import('viem').Account | undefined, chainOverride, request>) => Promise<import('viem').SendTransactionSyncReturnType>;
|
|
7039
7056
|
showCallsStatus: (parameters: import('viem').ShowCallsStatusParameters) => Promise<import('viem').ShowCallsStatusReturnType>;
|
|
7040
7057
|
signAuthorization: (parameters: import('viem').SignAuthorizationParameters<import('viem').Account | undefined>) => Promise<import('viem').SignAuthorizationReturnType>;
|
|
7041
7058
|
signMessage: (args: import('viem').SignMessageParameters<import('viem').Account | undefined>) => Promise<import('viem').SignMessageReturnType>;
|
|
@@ -8143,6 +8160,7 @@ export declare class CarrotStakingHandler {
|
|
|
8143
8160
|
waitForCallsStatus: (parameters: import('viem').WaitForCallsStatusParameters) => Promise<import('viem').WaitForCallsStatusReturnType>;
|
|
8144
8161
|
watchAsset: (args: import('viem').WatchAssetParameters) => Promise<import('viem').WatchAssetReturnType>;
|
|
8145
8162
|
writeContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "nonpayable" | "payable">, args_1 extends import('viem').ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends ViemChain | undefined = undefined>(args: import('viem').WriteContractParameters<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride>) => Promise<import('viem').WriteContractReturnType>;
|
|
8163
|
+
writeContractSync: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "nonpayable" | "payable">, args_1 extends import('viem').ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends ViemChain | undefined = undefined>(args: import('viem').WriteContractSyncParameters<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride>) => Promise<import('viem').WriteContractSyncReturnType>;
|
|
8146
8164
|
extend: <const client extends {
|
|
8147
8165
|
[x: string]: unknown;
|
|
8148
8166
|
account?: undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { V as r } from "../../constants-
|
|
1
|
+
import { V as r } from "../../constants-BO_Dvglw.js";
|
|
2
2
|
import { TOKENS_ADDRESSES as i, Token as n } from "../tokens.js";
|
|
3
3
|
import { CarrotStaker as s } from "../abis/mainnet/CarrotStaker.js";
|
|
4
|
-
import { g as l } from "../../getContract-
|
|
4
|
+
import { g as l } from "../../getContract-DRjKmuyC.js";
|
|
5
5
|
class m {
|
|
6
6
|
/**
|
|
7
7
|
* Create the handler for the `CarrotStaker` contract exposing
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../constants-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../constants-4-ehn8UI.cjs"),i=require("../abis/mainnet/CarrotVesting.cjs"),s=require("../addresses.cjs"),c=require("../tokens.cjs"),o=require("./erc20-permit-handler.cjs"),g=require("../../getContract-C6a8L2Jd.cjs");class u{constructor(t,e,r){this.chain=t,this.walletClient=e,this.publicClient=r,this.viemChain=n.VIEM_CHAINS[t],this.erc20PermitHandler=new o.ERC20PermitHandler(t,e,r)}viemChain;erc20PermitHandler;getContract(){const t=s.CONTRACT_ADDRESSES[this.chain].CarrotVesting,e=i.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()}getSteps(){return this.getContract().read.getSteps()}maxCarrotAmount(){return this.getContract().read.MAX_CARROT_AMOUNT()}async getVestings(t){return await this.getContract().read.getVestings([t])}getStartTimestamp(){return this.getContract().read.getStartTimestamp()}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,a=await this.erc20PermitHandler.withToken(c.Token.CARROT).getPermitData(r.address,this.getContract().address,t);return this.startVestingWithPermit(a)}getTotalDepositedAmount(){return this.getContract().read.getTotalDepositedAmount()}getDuration(){return this.getContract().read.getDuration()}getNewDuration(){return this.getContract().read.getNewDuration()}getNewSteps(){return this.getContract().read.getNewSteps()}getUpgradeTimestamp(){return this.getContract().read.getUpgradeTimestamp()}}exports.CarrotVestingHandler=u;
|
|
2
2
|
//# sourceMappingURL=carrot-vesting-handler.cjs.map
|
|
@@ -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 getSteps() {\n return this.getContract().read.getSteps();\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 getVestings(user: Address) {\n return await this.getContract().read.getVestings([user]);\n }\n\n /**\n * Get the start timestamp.\n *\n * @returns The start timestamp.\n */\n public getStartTimestamp() {\n return this.getContract().read.getStartTimestamp();\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 getTotalDepositedAmount() {\n return this.getContract().read.getTotalDepositedAmount();\n }\n\n /**\n * Get the duration of the vesting period.\n *\n * @returns The duration of the vesting period.\n */\n public getDuration() {\n return this.getContract().read.getDuration();\n }\n}\n"],"names":["CarrotVestingHandler","chain","walletClient","publicClient","VIEM_CHAINS","ERC20PermitHandler","address","CONTRACT_ADDRESSES","abi","CarrotVesting","client","getContract","user","amount","permitData","isPreapproved","account","Token"],"mappings":"4TAoBO,MAAMA,CAAqB,CAchC,YACUC,EACAC,EACAC,EACR,CAHQ,KAAA,MAAAF,EACA,KAAA,aAAAC,EACA,KAAA,aAAAC,EAER,KAAK,UAAYC,EAAAA,YAAYH,CAAK,EAClC,KAAK,mBAAqB,IAAII,EAAAA,mBAC5BJ,EACAC,EACAC,CAAA,CAEJ,CAxBQ,UACA,mBA8BD,aAAc,CACnB,MAAMG,EAAUC,EAAAA,mBAAmB,KAAK,KAAK,EAAE,cACzCC,EAAMC,EAAAA,cACNC,EAAS,CAAE,OAAQ,KAAK,aAAc,OAAQ,KAAK,YAAA,EAEzD,OAAOC,EAAAA,YAAY,CAAE,QAAAL,EAAS,IAAAE,EAAK,OAAAE,EAAQ,CAK7C,CAOO,OAAQ,CACb,OAAO,KAAK,cAAc,KAAK,MAAA,CACjC,CAQO,yBAAyBE,EAAe,CAC7C,OAAO,KAAK,YAAA,EAAc,KAAK,yBAAyB,CAACA,CAAI,CAAC,CAChE,CAOO,cAAe,CACpB,OAAO,KAAK,cAAc,KAAK,cAAA,CACjC,CAOO,OAAQ,CACb,OAAO,KAAK,cAAc,MAAM,MAAM,CACpC,QAAS,KAAK,a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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 getSteps() {\n return this.getContract().read.getSteps();\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 getVestings(user: Address) {\n return await this.getContract().read.getVestings([user]);\n }\n\n /**\n * Get the start timestamp.\n *\n * @returns The start timestamp.\n */\n public getStartTimestamp() {\n return this.getContract().read.getStartTimestamp();\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 getTotalDepositedAmount() {\n return this.getContract().read.getTotalDepositedAmount();\n }\n\n /**\n * Get the duration of the vesting period.\n *\n * @returns The duration of the vesting period.\n */\n public getDuration() {\n return this.getContract().read.getDuration();\n }\n\n /**\n * Get the new duration of the vesting period. This is a new function\n * added after contract upgrade.\n *\n * @returns The new duration of the vesting period.\n */\n public getNewDuration() {\n return this.getContract().read.getNewDuration();\n }\n\n /**\n * Get the upgrade timestamp. This is a new function added after\n * contract upgrade.\n *\n * @returns The upgrade timestamp.\n */\n public getNewSteps() {\n return this.getContract().read.getNewSteps();\n }\n\n /**\n * Get the upgrade timestamp. This is a new function added after\n * contract upgrade.\n *\n * @returns The upgrade timestamp.\n */\n public getUpgradeTimestamp() {\n return this.getContract().read.getUpgradeTimestamp();\n }\n}\n"],"names":["CarrotVestingHandler","chain","walletClient","publicClient","VIEM_CHAINS","ERC20PermitHandler","address","CONTRACT_ADDRESSES","abi","CarrotVesting","client","getContract","user","amount","permitData","isPreapproved","account","Token"],"mappings":"4TAoBO,MAAMA,CAAqB,CAchC,YACUC,EACAC,EACAC,EACR,CAHQ,KAAA,MAAAF,EACA,KAAA,aAAAC,EACA,KAAA,aAAAC,EAER,KAAK,UAAYC,EAAAA,YAAYH,CAAK,EAClC,KAAK,mBAAqB,IAAII,EAAAA,mBAC5BJ,EACAC,EACAC,CAAA,CAEJ,CAxBQ,UACA,mBA8BD,aAAc,CACnB,MAAMG,EAAUC,EAAAA,mBAAmB,KAAK,KAAK,EAAE,cACzCC,EAAMC,EAAAA,cACNC,EAAS,CAAE,OAAQ,KAAK,aAAc,OAAQ,KAAK,YAAA,EAEzD,OAAOC,EAAAA,YAAY,CAAE,QAAAL,EAAS,IA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,MAAM,EACtB,cAAcD,EAAQ,QAAS,KAAK,YAAA,EAAc,QAASH,CAAM,EAEpE,OAAO,KAAK,uBAAuBC,CAAU,CAC/C,CAOO,yBAA0B,CAC/B,OAAO,KAAK,cAAc,KAAK,wBAAA,CACjC,CAOO,aAAc,CACnB,OAAO,KAAK,cAAc,KAAK,YAAA,CACjC,CAQO,gBAAiB,CACtB,OAAO,KAAK,cAAc,KAAK,eAAA,CACjC,CAQO,aAAc,CACnB,OAAO,KAAK,cAAc,KAAK,YAAA,CACjC,CAQO,qBAAsB,CAC3B,OAAO,KAAK,cAAc,KAAK,oBAAA,CACjC,CACF"}
|
|
@@ -3622,6 +3622,7 @@ export declare class CarrotVestingHandler {
|
|
|
3622
3622
|
}, (request["parameters"] extends readonly import('viem').PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "fees" | "gas" | "nonce" | "blobVersionedHashes" | "chainId" | "type") extends infer T_13 ? T_13 extends (request["parameters"] extends readonly import('viem').PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "fees" | "gas" | "nonce" | "blobVersionedHashes" | "chainId" | "type") ? T_13 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_13 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">) extends infer T ? { [K in keyof T]: T[K]; } : never>;
|
|
3623
3623
|
readContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "pure" | "view">, const args extends import('viem').ContractFunctionArgs<abi, "pure" | "view", functionName>>(args: import('viem').ReadContractParameters<abi, functionName, args>) => Promise<import('viem').ReadContractReturnType<abi, functionName, args>>;
|
|
3624
3624
|
sendRawTransaction: (args: import('viem').SendRawTransactionParameters) => Promise<import('viem').SendRawTransactionReturnType>;
|
|
3625
|
+
sendRawTransactionSync: (args: import('viem').SendRawTransactionSyncParameters) => Promise<import('viem').TransactionReceipt>;
|
|
3625
3626
|
simulate: <const calls extends readonly unknown[]>(args: import('viem').SimulateBlocksParameters<calls>) => Promise<import('viem').SimulateBlocksReturnType<calls>>;
|
|
3626
3627
|
simulateBlocks: <const calls extends readonly unknown[]>(args: import('viem').SimulateBlocksParameters<calls>) => Promise<import('viem').SimulateBlocksReturnType<calls>>;
|
|
3627
3628
|
simulateCalls: <const calls extends readonly unknown[]>(args: import('viem').SimulateCallsParameters<calls>) => Promise<import('viem').SimulateCallsReturnType<calls>>;
|
|
@@ -6951,8 +6952,24 @@ export declare class CarrotVestingHandler {
|
|
|
6951
6952
|
} | undefined;
|
|
6952
6953
|
id: string;
|
|
6953
6954
|
}>;
|
|
6955
|
+
sendCallsSync: <const calls extends readonly unknown[], chainOverride extends ViemChain | undefined = undefined>(parameters: import('viem').SendCallsSyncParameters<ViemChain | undefined, Account | undefined, chainOverride, calls>) => Promise<{
|
|
6956
|
+
id: string;
|
|
6957
|
+
chainId: number;
|
|
6958
|
+
version: string;
|
|
6959
|
+
atomic: boolean;
|
|
6960
|
+
capabilities?: {
|
|
6961
|
+
[key: string]: any;
|
|
6962
|
+
} | {
|
|
6963
|
+
[x: string]: any;
|
|
6964
|
+
} | undefined;
|
|
6965
|
+
receipts?: import('viem').WalletCallReceipt<bigint, "success" | "reverted">[] | undefined;
|
|
6966
|
+
statusCode: number;
|
|
6967
|
+
status: "pending" | "success" | "failure" | undefined;
|
|
6968
|
+
}>;
|
|
6954
6969
|
sendRawTransaction: (args: import('viem').SendRawTransactionParameters) => Promise<import('viem').SendRawTransactionReturnType>;
|
|
6970
|
+
sendRawTransactionSync: (args: import('viem').SendRawTransactionSyncParameters) => Promise<import('viem').TransactionReceipt>;
|
|
6955
6971
|
sendTransaction: <const request extends import('viem').SendTransactionRequest<ViemChain | undefined, chainOverride>, chainOverride extends ViemChain | undefined = undefined>(args: import('viem').SendTransactionParameters<ViemChain | undefined, Account | undefined, chainOverride, request>) => Promise<import('viem').SendTransactionReturnType>;
|
|
6972
|
+
sendTransactionSync: <const request extends import('viem').SendTransactionSyncRequest<ViemChain | undefined, chainOverride>, chainOverride extends ViemChain | undefined = undefined>(args: import('viem').SendTransactionSyncParameters<ViemChain | undefined, Account | undefined, chainOverride, request>) => Promise<import('viem').SendTransactionSyncReturnType>;
|
|
6956
6973
|
showCallsStatus: (parameters: import('viem').ShowCallsStatusParameters) => Promise<import('viem').ShowCallsStatusReturnType>;
|
|
6957
6974
|
signAuthorization: (parameters: import('viem').SignAuthorizationParameters<Account | undefined>) => Promise<import('viem').SignAuthorizationReturnType>;
|
|
6958
6975
|
signMessage: (args: import('viem').SignMessageParameters<Account | undefined>) => Promise<import('viem').SignMessageReturnType>;
|
|
@@ -8060,6 +8077,7 @@ export declare class CarrotVestingHandler {
|
|
|
8060
8077
|
waitForCallsStatus: (parameters: import('viem').WaitForCallsStatusParameters) => Promise<import('viem').WaitForCallsStatusReturnType>;
|
|
8061
8078
|
watchAsset: (args: import('viem').WatchAssetParameters) => Promise<import('viem').WatchAssetReturnType>;
|
|
8062
8079
|
writeContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "nonpayable" | "payable">, args_1 extends import('viem').ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends ViemChain | undefined = undefined>(args: import('viem').WriteContractParameters<abi, functionName, args_1, ViemChain | undefined, Account | undefined, chainOverride>) => Promise<import('viem').WriteContractReturnType>;
|
|
8080
|
+
writeContractSync: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "nonpayable" | "payable">, args_1 extends import('viem').ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends ViemChain | undefined = undefined>(args: import('viem').WriteContractSyncParameters<abi, functionName, args_1, ViemChain | undefined, Account | undefined, chainOverride>) => Promise<import('viem').WriteContractSyncReturnType>;
|
|
8063
8081
|
extend: <const client extends {
|
|
8064
8082
|
[x: string]: unknown;
|
|
8065
8083
|
account?: undefined;
|
|
@@ -8187,4 +8205,25 @@ export declare class CarrotVestingHandler {
|
|
|
8187
8205
|
* @returns The duration of the vesting period.
|
|
8188
8206
|
*/
|
|
8189
8207
|
getDuration(): Promise<number>;
|
|
8208
|
+
/**
|
|
8209
|
+
* Get the new duration of the vesting period. This is a new function
|
|
8210
|
+
* added after contract upgrade.
|
|
8211
|
+
*
|
|
8212
|
+
* @returns The new duration of the vesting period.
|
|
8213
|
+
*/
|
|
8214
|
+
getNewDuration(): Promise<number>;
|
|
8215
|
+
/**
|
|
8216
|
+
* Get the upgrade timestamp. This is a new function added after
|
|
8217
|
+
* contract upgrade.
|
|
8218
|
+
*
|
|
8219
|
+
* @returns The upgrade timestamp.
|
|
8220
|
+
*/
|
|
8221
|
+
getNewSteps(): Promise<number>;
|
|
8222
|
+
/**
|
|
8223
|
+
* Get the upgrade timestamp. This is a new function added after
|
|
8224
|
+
* contract upgrade.
|
|
8225
|
+
*
|
|
8226
|
+
* @returns The upgrade timestamp.
|
|
8227
|
+
*/
|
|
8228
|
+
getUpgradeTimestamp(): Promise<number>;
|
|
8190
8229
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { V as i } from "../../constants-
|
|
1
|
+
import { V as i } from "../../constants-BO_Dvglw.js";
|
|
2
2
|
import { CarrotVesting as n } from "../abis/mainnet/CarrotVesting.js";
|
|
3
3
|
import { CONTRACT_ADDRESSES as s } from "../addresses.js";
|
|
4
4
|
import { Token as o } from "../tokens.js";
|
|
5
5
|
import { ERC20PermitHandler as c } from "./erc20-permit-handler.js";
|
|
6
|
-
import { g
|
|
7
|
-
class
|
|
6
|
+
import { g } from "../../getContract-DRjKmuyC.js";
|
|
7
|
+
class w {
|
|
8
8
|
/**
|
|
9
9
|
* Create the handler for the `CarrotVesting` contract exposing methods to
|
|
10
10
|
* interact with the contract.
|
|
@@ -31,7 +31,7 @@ class A {
|
|
|
31
31
|
*/
|
|
32
32
|
getContract() {
|
|
33
33
|
const t = s[this.chain].CarrotVesting, e = n, r = { public: this.publicClient, wallet: this.walletClient };
|
|
34
|
-
return
|
|
34
|
+
return g({ address: t, abi: e, client: r });
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* Get the owner of the contract.
|
|
@@ -181,8 +181,35 @@ class A {
|
|
|
181
181
|
getDuration() {
|
|
182
182
|
return this.getContract().read.getDuration();
|
|
183
183
|
}
|
|
184
|
+
/**
|
|
185
|
+
* Get the new duration of the vesting period. This is a new function
|
|
186
|
+
* added after contract upgrade.
|
|
187
|
+
*
|
|
188
|
+
* @returns The new duration of the vesting period.
|
|
189
|
+
*/
|
|
190
|
+
getNewDuration() {
|
|
191
|
+
return this.getContract().read.getNewDuration();
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Get the upgrade timestamp. This is a new function added after
|
|
195
|
+
* contract upgrade.
|
|
196
|
+
*
|
|
197
|
+
* @returns The upgrade timestamp.
|
|
198
|
+
*/
|
|
199
|
+
getNewSteps() {
|
|
200
|
+
return this.getContract().read.getNewSteps();
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Get the upgrade timestamp. This is a new function added after
|
|
204
|
+
* contract upgrade.
|
|
205
|
+
*
|
|
206
|
+
* @returns The upgrade timestamp.
|
|
207
|
+
*/
|
|
208
|
+
getUpgradeTimestamp() {
|
|
209
|
+
return this.getContract().read.getUpgradeTimestamp();
|
|
210
|
+
}
|
|
184
211
|
}
|
|
185
212
|
export {
|
|
186
|
-
|
|
213
|
+
w as CarrotVestingHandler
|
|
187
214
|
};
|
|
188
215
|
//# sourceMappingURL=carrot-vesting-handler.js.map
|
|
@@ -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 getSteps() {\n return this.getContract().read.getSteps();\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 getVestings(user: Address) {\n return await this.getContract().read.getVestings([user]);\n }\n\n /**\n * Get the start timestamp.\n *\n * @returns The start timestamp.\n */\n public getStartTimestamp() {\n return this.getContract().read.getStartTimestamp();\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 getTotalDepositedAmount() {\n return this.getContract().read.getTotalDepositedAmount();\n }\n\n /**\n * Get the duration of the vesting period.\n *\n * @returns The duration of the vesting period.\n */\n public getDuration() {\n return this.getContract().read.getDuration();\n }\n}\n"],"names":["CarrotVestingHandler","chain","walletClient","publicClient","VIEM_CHAINS","ERC20PermitHandler","address","CONTRACT_ADDRESSES","abi","CarrotVesting","client","getContract","user","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;AAHQ,SAAA,QAAAF,GACA,KAAA,eAAAC,GACA,KAAA,eAAAC,GAER,KAAK,YAAYC,EAAYH,CAAK,GAClC,KAAK,qBAAqB,IAAII;AAAA,MAC5BJ;AAAA,MACAC;AAAA,MACAC;AAAA,IAAA;AAAA,EAEJ;AAAA,EAxBQ;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA8BD,cAAc;AACnB,UAAMG,IAAUC,EAAmB,KAAK,KAAK,EAAE,eACzCC,IAAMC,GACNC,IAAS,EAAE,QAAQ,KAAK,cAAc,QAAQ,KAAK,aAAA;AAEzD,WAAOC,EAAY,EAAE,SAAAL,GAAS,KAAAE,GAAK,QAAAE,GAAQ;AAAA,EAK7C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,QAAQ;AACb,WAAO,KAAK,cAAc,KAAK,MAAA;AAAA,EACjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,yBAAyBE,GAAe;AAC7C,WAAO,KAAK,YAAA,EAAc,KAAK,yBAAyB,CAACA,CAAI,CAAC;AAAA,EAChE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,eAAe;AACpB,WAAO,KAAK,cAAc,KAAK,cAAA;AAAA,EACjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,QAAQ;AACb,WAAO,KAAK,cAA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K;AAAA,IAAA,CACb;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,aAAaD,GAAgBE,GAAwB;AAChE,QAAIA;AACF,aAAO,KAAK,wBAAwBF,CAAM;AAG5C,UAAMG,IAAU,KAAK,aAAa,SAC5BF,IAAa,MAAM,KAAK,mBAC3B,UAAUG,EAAM,MAAM,EACtB,cAAcD,EAAQ,SAAS,KAAK,YAAA,EAAc,SAASH,CAAM;AAEpE,WAAO,KAAK,uBAAuBC,CAAU;AAAA,EAC/C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,0BAA0B;AAC/B,WAAO,KAAK,cAAc,KAAK,wBAAA;AAAA,EACjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,cAAc;AACnB,WAAO,KAAK,cAAc,KAAK,YAAA;AAAA,EACjC;AACF;"}
|
|
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 getSteps() {\n return this.getContract().read.getSteps();\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 getVestings(user: Address) {\n return await this.getContract().read.getVestings([user]);\n }\n\n /**\n * Get the start timestamp.\n *\n * @returns The start timestamp.\n */\n public getStartTimestamp() {\n return this.getContract().read.getStartTimestamp();\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 getTotalDepositedAmount() {\n return this.getContract().read.getTotalDepositedAmount();\n }\n\n /**\n * Get the duration of the vesting period.\n *\n * @returns The duration of the vesting period.\n */\n public getDuration() {\n return this.getContract().read.getDuration();\n }\n\n /**\n * Get the new duration of the vesting period. This is a new function\n * added after contract upgrade.\n *\n * @returns The new duration of the vesting period.\n */\n public getNewDuration() {\n return this.getContract().read.getNewDuration();\n }\n\n /**\n * Get the upgrade timestamp. This is a new function added after\n * contract upgrade.\n *\n * @returns The upgrade timestamp.\n */\n public getNewSteps() {\n return this.getContract().read.getNewSteps();\n }\n\n /**\n * Get the upgrade timestamp. This is a new function added after\n * contract upgrade.\n *\n * @returns The upgrade timestamp.\n */\n public getUpgradeTimestamp() {\n return this.getContract().read.getUpgradeTimestamp();\n }\n}\n"],"names":["CarrotVestingHandler","chain","walletClient","publicClient","VIEM_CHAINS","ERC20PermitHandler","address","CONTRACT_ADDRESSES","abi","CarrotVesting","client","getContract","user","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;AAHQ,SAAA,QAAAF,GACA,KAAA,eAAAC,GACA,KAAA,eAAAC,GAER,KAAK,YAAYC,EAAYH,CAAK,GAClC,KAAK,qBAAqB,IAAII;AAAA,MAC5BJ;AAAA,MACAC;AAAA,MACAC;AAAA,IAAA;AAAA,EAEJ;AAAA,EAxBQ;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA8BD,cAAc;AACnB,UAAMG,IAAUC,EAAmB,KAAK,KAAK,EAAE,eACzCC,IAAMC,GACNC,IAAS,EAAE,QAAQ,KAAK,cAAc,QAAQ,KAAK,aAAA;AAEzD,WAAOC,EAAY,EAAE,SAAAL,GAAS,KAAAE,GAAK,QAAAE,GAAQ;AAAA,EAK7C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,QAAQ;AACb,WAAO,KAAK,cAAc,KAAK,MAAA;AAAA,EACjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,yBAAyBE,GAAe;AAC7C,WAAO,KAAK,YAAA,EAAc,KAAK,yBAAyB,CAACA,CAAI,CAAC;AAAA,EAChE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,eAAe;AACpB,WAAO,KAAK,cAAc,KAAK,cAAA;AAAA,EACjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,QAAQ;AACb,WAAO,KAAK,cAAc,MAAM,MAAM;AAAA,MACpC,SAAS,KAAK,aAAa;AAAA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AAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,aAAaD,GAAgBE,GAAwB;AAChE,QAAIA;AACF,aAAO,KAAK,wBAAwBF,CAAM;AAG5C,UAAMG,IAAU,KAAK,aAAa,SAC5BF,IAAa,MAAM,KAAK,mBAC3B,UAAUG,EAAM,MAAM,EACtB,cAAcD,EAAQ,SAAS,KAAK,YAAA,EAAc,SAASH,CAAM;AAEpE,WAAO,KAAK,uBAAuBC,CAAU;AAAA,EAC/C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,0BAA0B;AAC/B,WAAO,KAAK,cAAc,KAAK,wBAAA;AAAA,EACjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,cAAc;AACnB,WAAO,KAAK,cAAc,KAAK,YAAA;AAAA,EACjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,iBAAiB;AACtB,WAAO,KAAK,cAAc,KAAK,eAAA;AAAA,EACjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,cAAc;AACnB,WAAO,KAAK,cAAc,KAAK,YAAA;AAAA,EACjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,sBAAsB;AAC3B,WAAO,KAAK,cAAc,KAAK,oBAAA;AAAA,EACjC;AACF;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../constants-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../constants-4-ehn8UI.cjs"),r=require("../abis/mainnet/ConcreteMultiStrategyVault.cjs"),a=require("../tokens.cjs"),c=require("../vaults-addresses.cjs"),o=require("../../getContract-C6a8L2Jd.cjs");class s{constructor(t,e,i){this.chain=t,this.walletClient=e,this.publicClient=i,this.viemChain=n.VIEM_CHAINS[t],this.token=a.Token.ctTACpufETH}viemChain;token;withToken(t){return this.token=t,this}getContract(){const t=c.VAULTS_ADDRESSES[this.token][this.chain].ConcreteMultiStrategyVault,e=r.ConcreteMultiStrategyVault,i={public:this.publicClient,wallet:this.walletClient};return o.getContract({address:t,abi:e,client:i})}approve(t,e){return this.getContract().write.approve([t,e],{account:this.walletClient.account,chain:this.viemChain})}getAllowance(t,e){return this.getContract().read.allowance([t,e])}getBalance(t){return this.getContract().read.balanceOf([t])}getTotalSupply(){return this.getContract().read.totalSupply()}deposit(t){return this.getContract().write.deposit([t],{account:this.walletClient.account,chain:this.viemChain})}withdraw(t){return this.getContract().write.withdraw([t],{account:this.walletClient.account,chain:this.viemChain})}redeem(t,e,i){return e&&i?this.getContract().write.redeem([t,e,i],{account:this.walletClient.account,chain:this.viemChain}):this.getContract().write.redeem([t],{account:this.walletClient.account,chain:this.viemChain})}previewDeposit(t){return this.getContract().read.previewDeposit([t])}previewWithdraw(t){return this.getContract().read.previewWithdraw([t])}previewRedeem(t){return this.getContract().read.previewRedeem([t])}}exports.ConcreteVaultHandler=s;
|
|
2
2
|
//# sourceMappingURL=concrete-vault-handler.cjs.map
|
|
@@ -3949,6 +3949,7 @@ export declare class ConcreteVaultHandler {
|
|
|
3949
3949
|
}, (request["parameters"] extends readonly import('viem').PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "fees" | "gas" | "nonce" | "blobVersionedHashes" | "chainId" | "type") extends infer T_13 ? T_13 extends (request["parameters"] extends readonly import('viem').PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "fees" | "gas" | "nonce" | "blobVersionedHashes" | "chainId" | "type") ? T_13 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_13 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">) extends infer T ? { [K in keyof T]: T[K]; } : never>;
|
|
3950
3950
|
readContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "pure" | "view">, const args extends import('viem').ContractFunctionArgs<abi, "pure" | "view", functionName>>(args: import('viem').ReadContractParameters<abi, functionName, args>) => Promise<import('viem').ReadContractReturnType<abi, functionName, args>>;
|
|
3951
3951
|
sendRawTransaction: (args: import('viem').SendRawTransactionParameters) => Promise<import('viem').SendRawTransactionReturnType>;
|
|
3952
|
+
sendRawTransactionSync: (args: import('viem').SendRawTransactionSyncParameters) => Promise<import('viem').TransactionReceipt>;
|
|
3952
3953
|
simulate: <const calls extends readonly unknown[]>(args: import('viem').SimulateBlocksParameters<calls>) => Promise<import('viem').SimulateBlocksReturnType<calls>>;
|
|
3953
3954
|
simulateBlocks: <const calls extends readonly unknown[]>(args: import('viem').SimulateBlocksParameters<calls>) => Promise<import('viem').SimulateBlocksReturnType<calls>>;
|
|
3954
3955
|
simulateCalls: <const calls extends readonly unknown[]>(args: import('viem').SimulateCallsParameters<calls>) => Promise<import('viem').SimulateCallsReturnType<calls>>;
|
|
@@ -7278,8 +7279,24 @@ export declare class ConcreteVaultHandler {
|
|
|
7278
7279
|
} | undefined;
|
|
7279
7280
|
id: string;
|
|
7280
7281
|
}>;
|
|
7282
|
+
sendCallsSync: <const calls extends readonly unknown[], chainOverride extends ViemChain | undefined = undefined>(parameters: import('viem').SendCallsSyncParameters<ViemChain | undefined, Account | undefined, chainOverride, calls>) => Promise<{
|
|
7283
|
+
id: string;
|
|
7284
|
+
chainId: number;
|
|
7285
|
+
version: string;
|
|
7286
|
+
atomic: boolean;
|
|
7287
|
+
capabilities?: {
|
|
7288
|
+
[key: string]: any;
|
|
7289
|
+
} | {
|
|
7290
|
+
[x: string]: any;
|
|
7291
|
+
} | undefined;
|
|
7292
|
+
receipts?: import('viem').WalletCallReceipt<bigint, "success" | "reverted">[] | undefined;
|
|
7293
|
+
statusCode: number;
|
|
7294
|
+
status: "pending" | "success" | "failure" | undefined;
|
|
7295
|
+
}>;
|
|
7281
7296
|
sendRawTransaction: (args: import('viem').SendRawTransactionParameters) => Promise<import('viem').SendRawTransactionReturnType>;
|
|
7297
|
+
sendRawTransactionSync: (args: import('viem').SendRawTransactionSyncParameters) => Promise<import('viem').TransactionReceipt>;
|
|
7282
7298
|
sendTransaction: <const request extends import('viem').SendTransactionRequest<ViemChain | undefined, chainOverride>, chainOverride extends ViemChain | undefined = undefined>(args: import('viem').SendTransactionParameters<ViemChain | undefined, Account | undefined, chainOverride, request>) => Promise<import('viem').SendTransactionReturnType>;
|
|
7299
|
+
sendTransactionSync: <const request extends import('viem').SendTransactionSyncRequest<ViemChain | undefined, chainOverride>, chainOverride extends ViemChain | undefined = undefined>(args: import('viem').SendTransactionSyncParameters<ViemChain | undefined, Account | undefined, chainOverride, request>) => Promise<import('viem').SendTransactionSyncReturnType>;
|
|
7283
7300
|
showCallsStatus: (parameters: import('viem').ShowCallsStatusParameters) => Promise<import('viem').ShowCallsStatusReturnType>;
|
|
7284
7301
|
signAuthorization: (parameters: import('viem').SignAuthorizationParameters<Account | undefined>) => Promise<import('viem').SignAuthorizationReturnType>;
|
|
7285
7302
|
signMessage: (args: import('viem').SignMessageParameters<Account | undefined>) => Promise<import('viem').SignMessageReturnType>;
|
|
@@ -8387,6 +8404,7 @@ export declare class ConcreteVaultHandler {
|
|
|
8387
8404
|
waitForCallsStatus: (parameters: import('viem').WaitForCallsStatusParameters) => Promise<import('viem').WaitForCallsStatusReturnType>;
|
|
8388
8405
|
watchAsset: (args: import('viem').WatchAssetParameters) => Promise<import('viem').WatchAssetReturnType>;
|
|
8389
8406
|
writeContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "nonpayable" | "payable">, args_1 extends import('viem').ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends ViemChain | undefined = undefined>(args: import('viem').WriteContractParameters<abi, functionName, args_1, ViemChain | undefined, Account | undefined, chainOverride>) => Promise<import('viem').WriteContractReturnType>;
|
|
8407
|
+
writeContractSync: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "nonpayable" | "payable">, args_1 extends import('viem').ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends ViemChain | undefined = undefined>(args: import('viem').WriteContractSyncParameters<abi, functionName, args_1, ViemChain | undefined, Account | undefined, chainOverride>) => Promise<import('viem').WriteContractSyncReturnType>;
|
|
8390
8408
|
extend: <const client extends {
|
|
8391
8409
|
[x: string]: unknown;
|
|
8392
8410
|
account?: undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { V as r } from "../../constants-
|
|
1
|
+
import { V as r } from "../../constants-BO_Dvglw.js";
|
|
2
2
|
import { ConcreteMultiStrategyVault as n } from "../abis/mainnet/ConcreteMultiStrategyVault.js";
|
|
3
3
|
import { Token as a } from "../tokens.js";
|
|
4
4
|
import { VAULTS_ADDRESSES as o } from "../vaults-addresses.js";
|
|
5
|
-
import { g as c } from "../../getContract-
|
|
5
|
+
import { g as c } from "../../getContract-DRjKmuyC.js";
|
|
6
6
|
class w {
|
|
7
7
|
/**
|
|
8
8
|
* Create the handler for processing UniFi tokens.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../constants-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../constants-4-ehn8UI.cjs"),s=require("../addresses.cjs"),o=require("../abis/mainnet/Distributor.cjs"),c=require("../../getContract-C6a8L2Jd.cjs");class u{constructor(t,e,r){this.chain=t,this.walletClient=e,this.publicClient=r,this.viemChain=a.VIEM_CHAINS[t]}viemChain;getContract(){const t=s.CONTRACT_ADDRESSES[this.chain].Distributor,e=o.Distributor,r={public:this.publicClient,wallet:this.walletClient};return c.getContract({address:t,abi:e,client:r})}claim(t,{users:e,tokens:r,amounts:i,proofs:n}){return this.getContract().write.claim([e,r,i,n],{account:t,chain:this.viemChain})}async claimed(t,e){const[r,i,n]=await this.getContract().read.claimed([t,e]);return{amount:r,timestamp:BigInt(i),merkleRoot:n}}core(){return this.getContract().read.core()}disputeAmount(){return this.getContract().read.disputeAmount()}disputePeriod(){return this.getContract().read.disputePeriod()}disputeToken(){return this.getContract().read.disputeToken()}disputeTree(t,e){return this.getContract().write.disputeTree([e],{account:t,chain:this.viemChain})}disputer(){return this.getContract().read.disputer()}endOfDisputePeriod(){return this.getContract().read.endOfDisputePeriod()}getMerkleRoot(){return this.getContract().read.getMerkleRoot()}async lastTree(){const[t,e]=await this.getContract().read.lastTree();return{merkleRoot:t,ipfsHash:e}}onlyOperatorCanClaim(t){return this.getContract().read.onlyOperatorCanClaim([t])}toggleOnlyOperatorCanClaim(t,e){return this.getContract().write.toggleOnlyOperatorCanClaim([e],{account:t,chain:this.viemChain})}toggleOperator(t,e,r){return this.getContract().write.toggleOperator([e,r],{account:t,chain:this.viemChain})}toggleTrusted(t,e){return this.getContract().write.toggleTrusted([e],{account:t,chain:this.viemChain})}async tree(){const[t,e]=await this.getContract().read.tree();return{merkleRoot:t,ipfsHash:e}}}exports.DistributorHandler=u;
|
|
2
2
|
//# sourceMappingURL=distributor-handler.cjs.map
|