@pufferfinance/puffer-sdk 1.29.1 → 1.29.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/dist/api/puffer-client-helpers.cjs +1 -1
  2. package/dist/api/puffer-client-helpers.cjs.map +1 -1
  3. package/dist/api/puffer-client-helpers.js +3 -3
  4. package/dist/api/puffer-client-helpers.js.map +1 -1
  5. package/dist/api/puffer-client.cjs +1 -1
  6. package/dist/api/puffer-client.js +2 -2
  7. package/dist/{ccip-Dv8Z-tXr.cjs → ccip-BQKdkZzc.cjs} +2 -2
  8. package/dist/{ccip-Dv8Z-tXr.cjs.map → ccip-BQKdkZzc.cjs.map} +1 -1
  9. package/dist/{ccip-dYaIZXTj.js → ccip-DkpMYAPh.js} +4 -4
  10. package/dist/{ccip-dYaIZXTj.js.map → ccip-DkpMYAPh.js.map} +1 -1
  11. package/dist/chains/constants.cjs +1 -1
  12. package/dist/chains/constants.d.ts +3 -1
  13. package/dist/chains/constants.js +1 -1
  14. package/dist/{constants-BO_Dvglw.js → constants-0GZgavMM.js} +511 -443
  15. package/dist/constants-0GZgavMM.js.map +1 -0
  16. package/dist/constants-CwkqnEF2.cjs +8 -0
  17. package/dist/constants-CwkqnEF2.cjs.map +1 -0
  18. package/dist/contracts/addresses.cjs +1 -1
  19. package/dist/contracts/addresses.js +1 -1
  20. package/dist/contracts/handlers/carrot-staking-handler.cjs +1 -1
  21. package/dist/contracts/handlers/carrot-staking-handler.d.ts +9 -3
  22. package/dist/contracts/handlers/carrot-staking-handler.js +2 -2
  23. package/dist/contracts/handlers/carrot-vesting-handler.cjs +1 -1
  24. package/dist/contracts/handlers/carrot-vesting-handler.d.ts +9 -3
  25. package/dist/contracts/handlers/carrot-vesting-handler.js +2 -2
  26. package/dist/contracts/handlers/concrete-vault-handler.cjs +1 -1
  27. package/dist/contracts/handlers/concrete-vault-handler.d.ts +9 -3
  28. package/dist/contracts/handlers/concrete-vault-handler.js +2 -2
  29. package/dist/contracts/handlers/distributor-handler.cjs +1 -1
  30. package/dist/contracts/handlers/distributor-handler.d.ts +9 -3
  31. package/dist/contracts/handlers/distributor-handler.js +2 -2
  32. package/dist/contracts/handlers/erc20-permit-handler.cjs +1 -1
  33. package/dist/contracts/handlers/erc20-permit-handler.cjs.map +1 -1
  34. package/dist/contracts/handlers/erc20-permit-handler.d.ts +9 -3
  35. package/dist/contracts/handlers/erc20-permit-handler.js +3 -3
  36. package/dist/contracts/handlers/erc20-permit-handler.js.map +1 -1
  37. package/dist/contracts/handlers/gauge-registry-handler.cjs +1 -1
  38. package/dist/contracts/handlers/gauge-registry-handler.d.ts +9 -3
  39. package/dist/contracts/handlers/gauge-registry-handler.js +2 -2
  40. package/dist/contracts/handlers/guardian-module-handler.cjs +1 -1
  41. package/dist/contracts/handlers/guardian-module-handler.d.ts +9 -3
  42. package/dist/contracts/handlers/guardian-module-handler.js +2 -2
  43. package/dist/contracts/handlers/institutional-access-manager-handler.cjs +1 -1
  44. package/dist/contracts/handlers/institutional-access-manager-handler.d.ts +9 -3
  45. package/dist/contracts/handlers/institutional-access-manager-handler.js +3 -3
  46. package/dist/contracts/handlers/institutional-vault-handler.cjs +1 -1
  47. package/dist/contracts/handlers/institutional-vault-handler.d.ts +9 -3
  48. package/dist/contracts/handlers/institutional-vault-handler.js +2 -2
  49. package/dist/contracts/handlers/l1-reward-manager-handler.cjs +1 -1
  50. package/dist/contracts/handlers/l1-reward-manager-handler.d.ts +9 -3
  51. package/dist/contracts/handlers/l1-reward-manager-handler.js +2 -2
  52. package/dist/contracts/handlers/l2-reward-manager-handler.cjs +1 -1
  53. package/dist/contracts/handlers/l2-reward-manager-handler.d.ts +9 -3
  54. package/dist/contracts/handlers/l2-reward-manager-handler.js +2 -2
  55. package/dist/contracts/handlers/lagoon-vault-handler.cjs +1 -1
  56. package/dist/contracts/handlers/lagoon-vault-handler.d.ts +9 -3
  57. package/dist/contracts/handlers/lagoon-vault-handler.js +2 -2
  58. package/dist/contracts/handlers/mtw-carrot-handler.cjs +1 -1
  59. package/dist/contracts/handlers/mtw-carrot-handler.d.ts +9 -3
  60. package/dist/contracts/handlers/mtw-carrot-handler.js +2 -2
  61. package/dist/contracts/handlers/nucleus-accountant-handler.cjs +1 -1
  62. package/dist/contracts/handlers/nucleus-accountant-handler.d.ts +9 -3
  63. package/dist/contracts/handlers/nucleus-accountant-handler.js +1 -1
  64. package/dist/contracts/handlers/nucleus-atomic-queue-handler.cjs +1 -1
  65. package/dist/contracts/handlers/nucleus-atomic-queue-handler.d.ts +10 -4
  66. package/dist/contracts/handlers/nucleus-atomic-queue-handler.js +2 -2
  67. package/dist/contracts/handlers/nucleus-boring-vault-handler.cjs +1 -1
  68. package/dist/contracts/handlers/nucleus-boring-vault-handler.d.ts +9 -3
  69. package/dist/contracts/handlers/nucleus-boring-vault-handler.js +2 -2
  70. package/dist/contracts/handlers/nucleus-teller-handler.cjs +1 -1
  71. package/dist/contracts/handlers/nucleus-teller-handler.d.ts +9 -3
  72. package/dist/contracts/handlers/nucleus-teller-handler.js +2 -2
  73. package/dist/contracts/handlers/puf-locker-handler.cjs +1 -1
  74. package/dist/contracts/handlers/puf-locker-handler.d.ts +9 -3
  75. package/dist/contracts/handlers/puf-locker-handler.js +2 -2
  76. package/dist/contracts/handlers/puffer-depositor-handler.cjs +1 -1
  77. package/dist/contracts/handlers/puffer-depositor-handler.d.ts +9 -3
  78. package/dist/contracts/handlers/puffer-depositor-handler.js +2 -2
  79. package/dist/contracts/handlers/puffer-l2-depositor-handler.cjs +1 -1
  80. package/dist/contracts/handlers/puffer-l2-depositor-handler.d.ts +9 -3
  81. package/dist/contracts/handlers/puffer-l2-depositor-handler.js +2 -2
  82. package/dist/contracts/handlers/puffer-oracle-v2-handler.cjs +1 -1
  83. package/dist/contracts/handlers/puffer-oracle-v2-handler.d.ts +9 -3
  84. package/dist/contracts/handlers/puffer-oracle-v2-handler.js +2 -2
  85. package/dist/contracts/handlers/puffer-protocol-handler.cjs +1 -1
  86. package/dist/contracts/handlers/puffer-protocol-handler.d.ts +9 -3
  87. package/dist/contracts/handlers/puffer-protocol-handler.js +2 -2
  88. package/dist/contracts/handlers/puffer-vault-handler.cjs +1 -1
  89. package/dist/contracts/handlers/puffer-vault-handler.d.ts +9 -3
  90. package/dist/contracts/handlers/puffer-vault-handler.js +2 -2
  91. package/dist/contracts/handlers/puffer-withdrawal-manager-handler.cjs +1 -1
  92. package/dist/contracts/handlers/puffer-withdrawal-manager-handler.d.ts +9 -3
  93. package/dist/contracts/handlers/puffer-withdrawal-manager-handler.js +2 -2
  94. package/dist/contracts/handlers/validator-ticket-handler.cjs +1 -1
  95. package/dist/contracts/handlers/validator-ticket-handler.d.ts +10 -4
  96. package/dist/contracts/handlers/validator-ticket-handler.js +2 -2
  97. package/dist/contracts/handlers/vl-puffer-handler.cjs +1 -1
  98. package/dist/contracts/handlers/vl-puffer-handler.d.ts +9 -3
  99. package/dist/contracts/handlers/vl-puffer-handler.js +2 -2
  100. package/dist/contracts/tokens.cjs +1 -1
  101. package/dist/contracts/tokens.js +1 -1
  102. package/dist/contracts/vaults-addresses.cjs +1 -1
  103. package/dist/contracts/vaults-addresses.js +1 -1
  104. package/dist/{getContract-C6a8L2Jd.cjs → getContract-BinxcNSi.cjs} +2 -2
  105. package/dist/{getContract-C6a8L2Jd.cjs.map → getContract-BinxcNSi.cjs.map} +1 -1
  106. package/dist/{getContract-DRjKmuyC.js → getContract-DaCKXI8P.js} +2 -2
  107. package/dist/{getContract-DRjKmuyC.js.map → getContract-DaCKXI8P.js.map} +1 -1
  108. package/dist/http-BC-nqLLb.cjs +5 -0
  109. package/dist/http-BC-nqLLb.cjs.map +1 -0
  110. package/dist/{http-ZcKHvn9V.js → http-DfLfk9B5.js} +1343 -1302
  111. package/dist/http-DfLfk9B5.js.map +1 -0
  112. package/dist/{localBatchGatewayRequest-BTy8p6qj.cjs → localBatchGatewayRequest-B7XKTHRK.cjs} +2 -2
  113. package/dist/{localBatchGatewayRequest-BTy8p6qj.cjs.map → localBatchGatewayRequest-B7XKTHRK.cjs.map} +1 -1
  114. package/dist/{localBatchGatewayRequest-Cb0QKL0s.js → localBatchGatewayRequest-C1C2Kpcs.js} +3 -3
  115. package/dist/{localBatchGatewayRequest-Cb0QKL0s.js.map → localBatchGatewayRequest-C1C2Kpcs.js.map} +1 -1
  116. package/dist/main.cjs +1 -1
  117. package/dist/main.js +1 -1
  118. package/dist/{secp256k1-Dx1prb1E.js → secp256k1-BNsewQvi.js} +2 -2
  119. package/dist/{secp256k1-Dx1prb1E.js.map → secp256k1-BNsewQvi.js.map} +1 -1
  120. package/dist/{secp256k1-CzsL7iVx.cjs → secp256k1-Be7RiBch.cjs} +2 -2
  121. package/dist/{secp256k1-CzsL7iVx.cjs.map → secp256k1-Be7RiBch.cjs.map} +1 -1
  122. package/dist/utils/version.cjs +1 -1
  123. package/dist/utils/version.js +1 -1
  124. package/dist/writeContract-De1cMFmW.cjs +36 -0
  125. package/dist/writeContract-De1cMFmW.cjs.map +1 -0
  126. package/dist/{writeContract-BFxyLFA9.js → writeContract-DordYfu2.js} +1650 -1479
  127. package/dist/writeContract-DordYfu2.js.map +1 -0
  128. package/package.json +2 -2
  129. package/dist/constants-4-ehn8UI.cjs +0 -9
  130. package/dist/constants-4-ehn8UI.cjs.map +0 -1
  131. package/dist/constants-BO_Dvglw.js.map +0 -1
  132. package/dist/http-CRYDzx7w.cjs +0 -5
  133. package/dist/http-CRYDzx7w.cjs.map +0 -1
  134. package/dist/http-ZcKHvn9V.js.map +0 -1
  135. package/dist/writeContract-BFxyLFA9.js.map +0 -1
  136. package/dist/writeContract-HBsqM_Od.cjs +0 -36
  137. package/dist/writeContract-HBsqM_Od.cjs.map +0 -1
@@ -1,2 +1,2 @@
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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../constants-CwkqnEF2.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,4 +1,4 @@
1
- import { C as e } from "../constants-BO_Dvglw.js";
1
+ import { C as e } from "../constants-0GZgavMM.js";
2
2
  const f = {
3
3
  // Casting to number so the consumer can use chain ids. Also not using
4
4
  // a generic type for the variable so the consumer knows which
@@ -1,2 +1,2 @@
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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../constants-CwkqnEF2.cjs"),n=require("../tokens.cjs"),i=require("../abis/mainnet/CarrotStaker.cjs"),s=require("../../getContract-BinxcNSi.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
@@ -122,6 +122,7 @@ export declare class CarrotStakingHandler {
122
122
  request?: (parameters: import('viem').CcipRequestParameters) => Promise<`0x${string}`>;
123
123
  } | undefined;
124
124
  chain: ViemChain | undefined;
125
+ dataSuffix?: import('viem').DataSuffix | undefined;
125
126
  experimental_blockTag?: import('viem').BlockTag | undefined;
126
127
  key: string;
127
128
  name: string;
@@ -141,6 +142,7 @@ export declare class CarrotStakingHandler {
141
142
  createPendingTransactionFilter: () => Promise<import('viem').CreatePendingTransactionFilterReturnType>;
142
143
  estimateContractGas: <chain extends ViemChain | undefined, const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "nonpayable" | "payable">, args extends import('viem').ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>>(args: import('viem').EstimateContractGasParameters<abi, functionName, args, chain>) => Promise<import('viem').EstimateContractGasReturnType>;
143
144
  estimateGas: (args: import('viem').EstimateGasParameters<ViemChain | undefined>) => Promise<import('viem').EstimateGasReturnType>;
145
+ fillTransaction: <chainOverride extends ViemChain | undefined = undefined, accountOverride extends import('viem').Account | Address | undefined = undefined>(args: import('viem').FillTransactionParameters<ViemChain | undefined, import('viem').Account | undefined, chainOverride, accountOverride>) => Promise<import('viem').FillTransactionReturnType<ViemChain | undefined, chainOverride>>;
144
146
  getBalance: (args: import('viem').GetBalanceParameters) => Promise<import('viem').GetBalanceReturnType>;
145
147
  getBlobBaseFee: () => Promise<import('viem').GetBlobBaseFeeReturnType>;
146
148
  getBlock: <includeTransactions extends boolean = false, blockTag extends import('viem').BlockTag = "latest">(args?: import('viem').GetBlockParameters<includeTransactions, blockTag> | undefined) => Promise<{
@@ -3738,6 +3740,7 @@ export declare class CarrotStakingHandler {
3738
3740
  cacheTime?: undefined;
3739
3741
  ccipRead?: undefined;
3740
3742
  chain?: undefined;
3743
+ dataSuffix?: undefined;
3741
3744
  experimental_blockTag?: undefined;
3742
3745
  key?: undefined;
3743
3746
  name?: undefined;
@@ -3746,7 +3749,7 @@ export declare class CarrotStakingHandler {
3746
3749
  transport?: undefined;
3747
3750
  type?: undefined;
3748
3751
  uid?: undefined;
3749
- } & import('viem').ExactPartial<Pick<import('viem').PublicActions<import('viem').Transport, ViemChain | undefined, undefined>, "getChainId" | "prepareTransactionRequest" | "sendRawTransaction" | "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import('viem').WalletActions<ViemChain | undefined, undefined>, "sendTransaction" | "writeContract">>>(fn: (client: import('viem').Client<import('viem').Transport, ViemChain | undefined, undefined, import('viem').PublicRpcSchema, import('viem').PublicActions<import('viem').Transport, ViemChain | undefined>>) => client) => import('viem').Client<import('viem').Transport, ViemChain | undefined, undefined, import('viem').PublicRpcSchema, { [K in keyof client]: client[K]; } & import('viem').PublicActions<import('viem').Transport, ViemChain | undefined>>;
3752
+ } & import('viem').ExactPartial<Pick<import('viem').PublicActions<import('viem').Transport, ViemChain | undefined, undefined>, "prepareTransactionRequest" | "getChainId" | "sendRawTransaction" | "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import('viem').WalletActions<ViemChain | undefined, undefined>, "sendTransaction" | "writeContract">>>(fn: (client: import('viem').Client<import('viem').Transport, ViemChain | undefined, undefined, import('viem').PublicRpcSchema, import('viem').PublicActions<import('viem').Transport, ViemChain | undefined>>) => client) => import('viem').Client<import('viem').Transport, ViemChain | undefined, undefined, import('viem').PublicRpcSchema, { [K in keyof client]: client[K]; } & import('viem').PublicActions<import('viem').Transport, ViemChain | undefined>>;
3750
3753
  };
3751
3754
  wallet: {
3752
3755
  account: import('viem').Account | undefined;
@@ -3758,6 +3761,7 @@ export declare class CarrotStakingHandler {
3758
3761
  request?: (parameters: import('viem').CcipRequestParameters) => Promise<`0x${string}`>;
3759
3762
  } | undefined;
3760
3763
  chain: ViemChain | undefined;
3764
+ dataSuffix?: import('viem').DataSuffix | undefined;
3761
3765
  experimental_blockTag?: import('viem').BlockTag | undefined;
3762
3766
  key: string;
3763
3767
  name: string;
@@ -3768,6 +3772,7 @@ export declare class CarrotStakingHandler {
3768
3772
  uid: string;
3769
3773
  addChain: (args: import('viem').AddChainParameters) => Promise<void>;
3770
3774
  deployContract: <const abi extends import('viem').Abi | readonly unknown[], chainOverride extends ViemChain | undefined>(args: import('viem').DeployContractParameters<abi, ViemChain | undefined, import('viem').Account | undefined, chainOverride>) => Promise<import('viem').DeployContractReturnType>;
3775
+ fillTransaction: <chainOverride extends ViemChain | undefined = undefined, accountOverride extends import('viem').Account | Address | undefined = undefined>(args: import('viem').FillTransactionParameters<ViemChain | undefined, import('viem').Account | undefined, chainOverride, accountOverride>) => Promise<import('viem').FillTransactionReturnType<ViemChain | undefined, chainOverride>>;
3771
3776
  getAddresses: () => Promise<import('viem').GetAddressesReturnType>;
3772
3777
  getCallsStatus: (parameters: import('viem').GetCallsStatusParameters) => Promise<import('viem').GetCallsStatusReturnType>;
3773
3778
  getCapabilities: <chainId extends number | undefined>(parameters?: import('viem').GetCapabilitiesParameters<chainId>) => Promise<import('viem').GetCapabilitiesReturnType<chainId>>;
@@ -7052,7 +7057,7 @@ export declare class CarrotStakingHandler {
7052
7057
  sendRawTransaction: (args: import('viem').SendRawTransactionParameters) => Promise<import('viem').SendRawTransactionReturnType>;
7053
7058
  sendRawTransactionSync: (args: import('viem').SendRawTransactionSyncParameters) => Promise<import('viem').TransactionReceipt>;
7054
7059
  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>;
7060
+ 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').TransactionReceipt>;
7056
7061
  showCallsStatus: (parameters: import('viem').ShowCallsStatusParameters) => Promise<import('viem').ShowCallsStatusReturnType>;
7057
7062
  signAuthorization: (parameters: import('viem').SignAuthorizationParameters<import('viem').Account | undefined>) => Promise<import('viem').SignAuthorizationReturnType>;
7058
7063
  signMessage: (args: import('viem').SignMessageParameters<import('viem').Account | undefined>) => Promise<import('viem').SignMessageReturnType>;
@@ -8168,6 +8173,7 @@ export declare class CarrotStakingHandler {
8168
8173
  cacheTime?: undefined;
8169
8174
  ccipRead?: undefined;
8170
8175
  chain?: undefined;
8176
+ dataSuffix?: undefined;
8171
8177
  experimental_blockTag?: undefined;
8172
8178
  key?: undefined;
8173
8179
  name?: undefined;
@@ -8176,7 +8182,7 @@ export declare class CarrotStakingHandler {
8176
8182
  transport?: undefined;
8177
8183
  type?: undefined;
8178
8184
  uid?: undefined;
8179
- } & import('viem').ExactPartial<Pick<import('viem').PublicActions<import('viem').Transport, ViemChain | undefined, import('viem').Account | undefined>, "getChainId" | "prepareTransactionRequest" | "sendRawTransaction" | "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import('viem').WalletActions<ViemChain | undefined, import('viem').Account | undefined>, "sendTransaction" | "writeContract">>>(fn: (client: import('viem').Client<import('viem').Transport, ViemChain | undefined, import('viem').Account | undefined, import('viem').WalletRpcSchema, import('viem').WalletActions<ViemChain | undefined, import('viem').Account | undefined>>) => client) => import('viem').Client<import('viem').Transport, ViemChain | undefined, import('viem').Account | undefined, import('viem').WalletRpcSchema, { [K in keyof client]: client[K]; } & import('viem').WalletActions<ViemChain | undefined, import('viem').Account | undefined>>;
8185
+ } & import('viem').ExactPartial<Pick<import('viem').PublicActions<import('viem').Transport, ViemChain | undefined, import('viem').Account | undefined>, "prepareTransactionRequest" | "getChainId" | "sendRawTransaction" | "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import('viem').WalletActions<ViemChain | undefined, import('viem').Account | undefined>, "sendTransaction" | "writeContract">>>(fn: (client: import('viem').Client<import('viem').Transport, ViemChain | undefined, import('viem').Account | undefined, import('viem').WalletRpcSchema, import('viem').WalletActions<ViemChain | undefined, import('viem').Account | undefined>>) => client) => import('viem').Client<import('viem').Transport, ViemChain | undefined, import('viem').Account | undefined, import('viem').WalletRpcSchema, { [K in keyof client]: client[K]; } & import('viem').WalletActions<ViemChain | undefined, import('viem').Account | undefined>>;
8180
8186
  };
8181
8187
  }, Address>;
8182
8188
  /**
@@ -1,7 +1,7 @@
1
- import { V as r } from "../../constants-BO_Dvglw.js";
1
+ import { V as r } from "../../constants-0GZgavMM.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-DRjKmuyC.js";
4
+ import { g as l } from "../../getContract-DaCKXI8P.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-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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../constants-CwkqnEF2.cjs"),i=require("../abis/mainnet/CarrotVesting.cjs"),s=require("../addresses.cjs"),c=require("../tokens.cjs"),o=require("./erc20-permit-handler.cjs"),g=require("../../getContract-BinxcNSi.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
@@ -39,6 +39,7 @@ export declare class CarrotVestingHandler {
39
39
  request?: (parameters: import('viem').CcipRequestParameters) => Promise<`0x${string}`>;
40
40
  } | undefined;
41
41
  chain: ViemChain | undefined;
42
+ dataSuffix?: import('viem').DataSuffix | undefined;
42
43
  experimental_blockTag?: import('viem').BlockTag | undefined;
43
44
  key: string;
44
45
  name: string;
@@ -58,6 +59,7 @@ export declare class CarrotVestingHandler {
58
59
  createPendingTransactionFilter: () => Promise<import('viem').CreatePendingTransactionFilterReturnType>;
59
60
  estimateContractGas: <chain extends ViemChain | undefined, const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "nonpayable" | "payable">, args extends import('viem').ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>>(args: import('viem').EstimateContractGasParameters<abi, functionName, args, chain>) => Promise<import('viem').EstimateContractGasReturnType>;
60
61
  estimateGas: (args: import('viem').EstimateGasParameters<ViemChain | undefined>) => Promise<import('viem').EstimateGasReturnType>;
62
+ fillTransaction: <chainOverride extends ViemChain | undefined = undefined, accountOverride extends Account | Address | undefined = undefined>(args: import('viem').FillTransactionParameters<ViemChain | undefined, Account | undefined, chainOverride, accountOverride>) => Promise<import('viem').FillTransactionReturnType<ViemChain | undefined, chainOverride>>;
61
63
  getBalance: (args: import('viem').GetBalanceParameters) => Promise<import('viem').GetBalanceReturnType>;
62
64
  getBlobBaseFee: () => Promise<import('viem').GetBlobBaseFeeReturnType>;
63
65
  getBlock: <includeTransactions extends boolean = false, blockTag extends import('viem').BlockTag = "latest">(args?: import('viem').GetBlockParameters<includeTransactions, blockTag> | undefined) => Promise<{
@@ -3655,6 +3657,7 @@ export declare class CarrotVestingHandler {
3655
3657
  cacheTime?: undefined;
3656
3658
  ccipRead?: undefined;
3657
3659
  chain?: undefined;
3660
+ dataSuffix?: undefined;
3658
3661
  experimental_blockTag?: undefined;
3659
3662
  key?: undefined;
3660
3663
  name?: undefined;
@@ -3663,7 +3666,7 @@ export declare class CarrotVestingHandler {
3663
3666
  transport?: undefined;
3664
3667
  type?: undefined;
3665
3668
  uid?: undefined;
3666
- } & import('viem').ExactPartial<Pick<import('viem').PublicActions<import('viem').Transport, ViemChain | undefined, undefined>, "getChainId" | "prepareTransactionRequest" | "sendRawTransaction" | "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import('viem').WalletActions<ViemChain | undefined, undefined>, "sendTransaction" | "writeContract">>>(fn: (client: import('viem').Client<import('viem').Transport, ViemChain | undefined, undefined, import('viem').PublicRpcSchema, import('viem').PublicActions<import('viem').Transport, ViemChain | undefined>>) => client) => import('viem').Client<import('viem').Transport, ViemChain | undefined, undefined, import('viem').PublicRpcSchema, { [K in keyof client]: client[K]; } & import('viem').PublicActions<import('viem').Transport, ViemChain | undefined>>;
3669
+ } & import('viem').ExactPartial<Pick<import('viem').PublicActions<import('viem').Transport, ViemChain | undefined, undefined>, "prepareTransactionRequest" | "getChainId" | "sendRawTransaction" | "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import('viem').WalletActions<ViemChain | undefined, undefined>, "sendTransaction" | "writeContract">>>(fn: (client: import('viem').Client<import('viem').Transport, ViemChain | undefined, undefined, import('viem').PublicRpcSchema, import('viem').PublicActions<import('viem').Transport, ViemChain | undefined>>) => client) => import('viem').Client<import('viem').Transport, ViemChain | undefined, undefined, import('viem').PublicRpcSchema, { [K in keyof client]: client[K]; } & import('viem').PublicActions<import('viem').Transport, ViemChain | undefined>>;
3667
3670
  };
3668
3671
  wallet: {
3669
3672
  account: Account | undefined;
@@ -3675,6 +3678,7 @@ export declare class CarrotVestingHandler {
3675
3678
  request?: (parameters: import('viem').CcipRequestParameters) => Promise<`0x${string}`>;
3676
3679
  } | undefined;
3677
3680
  chain: ViemChain | undefined;
3681
+ dataSuffix?: import('viem').DataSuffix | undefined;
3678
3682
  experimental_blockTag?: import('viem').BlockTag | undefined;
3679
3683
  key: string;
3680
3684
  name: string;
@@ -3685,6 +3689,7 @@ export declare class CarrotVestingHandler {
3685
3689
  uid: string;
3686
3690
  addChain: (args: import('viem').AddChainParameters) => Promise<void>;
3687
3691
  deployContract: <const abi extends import('viem').Abi | readonly unknown[], chainOverride extends ViemChain | undefined>(args: import('viem').DeployContractParameters<abi, ViemChain | undefined, Account | undefined, chainOverride>) => Promise<import('viem').DeployContractReturnType>;
3692
+ fillTransaction: <chainOverride extends ViemChain | undefined = undefined, accountOverride extends Account | Address | undefined = undefined>(args: import('viem').FillTransactionParameters<ViemChain | undefined, Account | undefined, chainOverride, accountOverride>) => Promise<import('viem').FillTransactionReturnType<ViemChain | undefined, chainOverride>>;
3688
3693
  getAddresses: () => Promise<import('viem').GetAddressesReturnType>;
3689
3694
  getCallsStatus: (parameters: import('viem').GetCallsStatusParameters) => Promise<import('viem').GetCallsStatusReturnType>;
3690
3695
  getCapabilities: <chainId extends number | undefined>(parameters?: import('viem').GetCapabilitiesParameters<chainId>) => Promise<import('viem').GetCapabilitiesReturnType<chainId>>;
@@ -6969,7 +6974,7 @@ export declare class CarrotVestingHandler {
6969
6974
  sendRawTransaction: (args: import('viem').SendRawTransactionParameters) => Promise<import('viem').SendRawTransactionReturnType>;
6970
6975
  sendRawTransactionSync: (args: import('viem').SendRawTransactionSyncParameters) => Promise<import('viem').TransactionReceipt>;
6971
6976
  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>;
6977
+ 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').TransactionReceipt>;
6973
6978
  showCallsStatus: (parameters: import('viem').ShowCallsStatusParameters) => Promise<import('viem').ShowCallsStatusReturnType>;
6974
6979
  signAuthorization: (parameters: import('viem').SignAuthorizationParameters<Account | undefined>) => Promise<import('viem').SignAuthorizationReturnType>;
6975
6980
  signMessage: (args: import('viem').SignMessageParameters<Account | undefined>) => Promise<import('viem').SignMessageReturnType>;
@@ -8085,6 +8090,7 @@ export declare class CarrotVestingHandler {
8085
8090
  cacheTime?: undefined;
8086
8091
  ccipRead?: undefined;
8087
8092
  chain?: undefined;
8093
+ dataSuffix?: undefined;
8088
8094
  experimental_blockTag?: undefined;
8089
8095
  key?: undefined;
8090
8096
  name?: undefined;
@@ -8093,7 +8099,7 @@ export declare class CarrotVestingHandler {
8093
8099
  transport?: undefined;
8094
8100
  type?: undefined;
8095
8101
  uid?: undefined;
8096
- } & import('viem').ExactPartial<Pick<import('viem').PublicActions<import('viem').Transport, ViemChain | undefined, Account | undefined>, "getChainId" | "prepareTransactionRequest" | "sendRawTransaction" | "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import('viem').WalletActions<ViemChain | undefined, Account | undefined>, "sendTransaction" | "writeContract">>>(fn: (client: import('viem').Client<import('viem').Transport, ViemChain | undefined, Account | undefined, import('viem').WalletRpcSchema, import('viem').WalletActions<ViemChain | undefined, Account | undefined>>) => client) => import('viem').Client<import('viem').Transport, ViemChain | undefined, Account | undefined, import('viem').WalletRpcSchema, { [K in keyof client]: client[K]; } & import('viem').WalletActions<ViemChain | undefined, Account | undefined>>;
8102
+ } & import('viem').ExactPartial<Pick<import('viem').PublicActions<import('viem').Transport, ViemChain | undefined, Account | undefined>, "prepareTransactionRequest" | "getChainId" | "sendRawTransaction" | "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import('viem').WalletActions<ViemChain | undefined, Account | undefined>, "sendTransaction" | "writeContract">>>(fn: (client: import('viem').Client<import('viem').Transport, ViemChain | undefined, Account | undefined, import('viem').WalletRpcSchema, import('viem').WalletActions<ViemChain | undefined, Account | undefined>>) => client) => import('viem').Client<import('viem').Transport, ViemChain | undefined, Account | undefined, import('viem').WalletRpcSchema, { [K in keyof client]: client[K]; } & import('viem').WalletActions<ViemChain | undefined, Account | undefined>>;
8097
8103
  };
8098
8104
  }, Address>;
8099
8105
  /**
@@ -1,9 +1,9 @@
1
- import { V as i } from "../../constants-BO_Dvglw.js";
1
+ import { V as i } from "../../constants-0GZgavMM.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 } from "../../getContract-DRjKmuyC.js";
6
+ import { g } from "../../getContract-DaCKXI8P.js";
7
7
  class w {
8
8
  /**
9
9
  * Create the handler for the `CarrotVesting` contract exposing methods to
@@ -1,2 +1,2 @@
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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../constants-CwkqnEF2.cjs"),r=require("../abis/mainnet/ConcreteMultiStrategyVault.cjs"),a=require("../tokens.cjs"),c=require("../vaults-addresses.cjs"),o=require("../../getContract-BinxcNSi.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
@@ -366,6 +366,7 @@ export declare class ConcreteVaultHandler {
366
366
  request?: (parameters: import('viem').CcipRequestParameters) => Promise<`0x${string}`>;
367
367
  } | undefined;
368
368
  chain: ViemChain | undefined;
369
+ dataSuffix?: import('viem').DataSuffix | undefined;
369
370
  experimental_blockTag?: import('viem').BlockTag | undefined;
370
371
  key: string;
371
372
  name: string;
@@ -385,6 +386,7 @@ export declare class ConcreteVaultHandler {
385
386
  createPendingTransactionFilter: () => Promise<import('viem').CreatePendingTransactionFilterReturnType>;
386
387
  estimateContractGas: <chain extends ViemChain | undefined, const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "nonpayable" | "payable">, args extends import('viem').ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>>(args: import('viem').EstimateContractGasParameters<abi, functionName, args, chain>) => Promise<import('viem').EstimateContractGasReturnType>;
387
388
  estimateGas: (args: import('viem').EstimateGasParameters<ViemChain | undefined>) => Promise<import('viem').EstimateGasReturnType>;
389
+ fillTransaction: <chainOverride extends ViemChain | undefined = undefined, accountOverride extends Account | Address | undefined = undefined>(args: import('viem').FillTransactionParameters<ViemChain | undefined, Account | undefined, chainOverride, accountOverride>) => Promise<import('viem').FillTransactionReturnType<ViemChain | undefined, chainOverride>>;
388
390
  getBalance: (args: import('viem').GetBalanceParameters) => Promise<import('viem').GetBalanceReturnType>;
389
391
  getBlobBaseFee: () => Promise<import('viem').GetBlobBaseFeeReturnType>;
390
392
  getBlock: <includeTransactions extends boolean = false, blockTag extends import('viem').BlockTag = "latest">(args?: import('viem').GetBlockParameters<includeTransactions, blockTag> | undefined) => Promise<{
@@ -3982,6 +3984,7 @@ export declare class ConcreteVaultHandler {
3982
3984
  cacheTime?: undefined;
3983
3985
  ccipRead?: undefined;
3984
3986
  chain?: undefined;
3987
+ dataSuffix?: undefined;
3985
3988
  experimental_blockTag?: undefined;
3986
3989
  key?: undefined;
3987
3990
  name?: undefined;
@@ -3990,7 +3993,7 @@ export declare class ConcreteVaultHandler {
3990
3993
  transport?: undefined;
3991
3994
  type?: undefined;
3992
3995
  uid?: undefined;
3993
- } & import('viem').ExactPartial<Pick<import('viem').PublicActions<import('viem').Transport, ViemChain | undefined, undefined>, "getChainId" | "prepareTransactionRequest" | "sendRawTransaction" | "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import('viem').WalletActions<ViemChain | undefined, undefined>, "sendTransaction" | "writeContract">>>(fn: (client: import('viem').Client<import('viem').Transport, ViemChain | undefined, undefined, import('viem').PublicRpcSchema, import('viem').PublicActions<import('viem').Transport, ViemChain | undefined>>) => client) => import('viem').Client<import('viem').Transport, ViemChain | undefined, undefined, import('viem').PublicRpcSchema, { [K in keyof client]: client[K]; } & import('viem').PublicActions<import('viem').Transport, ViemChain | undefined>>;
3996
+ } & import('viem').ExactPartial<Pick<import('viem').PublicActions<import('viem').Transport, ViemChain | undefined, undefined>, "prepareTransactionRequest" | "getChainId" | "sendRawTransaction" | "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import('viem').WalletActions<ViemChain | undefined, undefined>, "sendTransaction" | "writeContract">>>(fn: (client: import('viem').Client<import('viem').Transport, ViemChain | undefined, undefined, import('viem').PublicRpcSchema, import('viem').PublicActions<import('viem').Transport, ViemChain | undefined>>) => client) => import('viem').Client<import('viem').Transport, ViemChain | undefined, undefined, import('viem').PublicRpcSchema, { [K in keyof client]: client[K]; } & import('viem').PublicActions<import('viem').Transport, ViemChain | undefined>>;
3994
3997
  };
3995
3998
  wallet: {
3996
3999
  account: Account | undefined;
@@ -4002,6 +4005,7 @@ export declare class ConcreteVaultHandler {
4002
4005
  request?: (parameters: import('viem').CcipRequestParameters) => Promise<`0x${string}`>;
4003
4006
  } | undefined;
4004
4007
  chain: ViemChain | undefined;
4008
+ dataSuffix?: import('viem').DataSuffix | undefined;
4005
4009
  experimental_blockTag?: import('viem').BlockTag | undefined;
4006
4010
  key: string;
4007
4011
  name: string;
@@ -4012,6 +4016,7 @@ export declare class ConcreteVaultHandler {
4012
4016
  uid: string;
4013
4017
  addChain: (args: import('viem').AddChainParameters) => Promise<void>;
4014
4018
  deployContract: <const abi extends import('viem').Abi | readonly unknown[], chainOverride extends ViemChain | undefined>(args: import('viem').DeployContractParameters<abi, ViemChain | undefined, Account | undefined, chainOverride>) => Promise<import('viem').DeployContractReturnType>;
4019
+ fillTransaction: <chainOverride extends ViemChain | undefined = undefined, accountOverride extends Account | Address | undefined = undefined>(args: import('viem').FillTransactionParameters<ViemChain | undefined, Account | undefined, chainOverride, accountOverride>) => Promise<import('viem').FillTransactionReturnType<ViemChain | undefined, chainOverride>>;
4015
4020
  getAddresses: () => Promise<import('viem').GetAddressesReturnType>;
4016
4021
  getCallsStatus: (parameters: import('viem').GetCallsStatusParameters) => Promise<import('viem').GetCallsStatusReturnType>;
4017
4022
  getCapabilities: <chainId extends number | undefined>(parameters?: import('viem').GetCapabilitiesParameters<chainId>) => Promise<import('viem').GetCapabilitiesReturnType<chainId>>;
@@ -7296,7 +7301,7 @@ export declare class ConcreteVaultHandler {
7296
7301
  sendRawTransaction: (args: import('viem').SendRawTransactionParameters) => Promise<import('viem').SendRawTransactionReturnType>;
7297
7302
  sendRawTransactionSync: (args: import('viem').SendRawTransactionSyncParameters) => Promise<import('viem').TransactionReceipt>;
7298
7303
  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>;
7304
+ 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').TransactionReceipt>;
7300
7305
  showCallsStatus: (parameters: import('viem').ShowCallsStatusParameters) => Promise<import('viem').ShowCallsStatusReturnType>;
7301
7306
  signAuthorization: (parameters: import('viem').SignAuthorizationParameters<Account | undefined>) => Promise<import('viem').SignAuthorizationReturnType>;
7302
7307
  signMessage: (args: import('viem').SignMessageParameters<Account | undefined>) => Promise<import('viem').SignMessageReturnType>;
@@ -8412,6 +8417,7 @@ export declare class ConcreteVaultHandler {
8412
8417
  cacheTime?: undefined;
8413
8418
  ccipRead?: undefined;
8414
8419
  chain?: undefined;
8420
+ dataSuffix?: undefined;
8415
8421
  experimental_blockTag?: undefined;
8416
8422
  key?: undefined;
8417
8423
  name?: undefined;
@@ -8420,7 +8426,7 @@ export declare class ConcreteVaultHandler {
8420
8426
  transport?: undefined;
8421
8427
  type?: undefined;
8422
8428
  uid?: undefined;
8423
- } & import('viem').ExactPartial<Pick<import('viem').PublicActions<import('viem').Transport, ViemChain | undefined, Account | undefined>, "getChainId" | "prepareTransactionRequest" | "sendRawTransaction" | "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import('viem').WalletActions<ViemChain | undefined, Account | undefined>, "sendTransaction" | "writeContract">>>(fn: (client: import('viem').Client<import('viem').Transport, ViemChain | undefined, Account | undefined, import('viem').WalletRpcSchema, import('viem').WalletActions<ViemChain | undefined, Account | undefined>>) => client) => import('viem').Client<import('viem').Transport, ViemChain | undefined, Account | undefined, import('viem').WalletRpcSchema, { [K in keyof client]: client[K]; } & import('viem').WalletActions<ViemChain | undefined, Account | undefined>>;
8429
+ } & import('viem').ExactPartial<Pick<import('viem').PublicActions<import('viem').Transport, ViemChain | undefined, Account | undefined>, "prepareTransactionRequest" | "getChainId" | "sendRawTransaction" | "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import('viem').WalletActions<ViemChain | undefined, Account | undefined>, "sendTransaction" | "writeContract">>>(fn: (client: import('viem').Client<import('viem').Transport, ViemChain | undefined, Account | undefined, import('viem').WalletRpcSchema, import('viem').WalletActions<ViemChain | undefined, Account | undefined>>) => client) => import('viem').Client<import('viem').Transport, ViemChain | undefined, Account | undefined, import('viem').WalletRpcSchema, { [K in keyof client]: client[K]; } & import('viem').WalletActions<ViemChain | undefined, Account | undefined>>;
8424
8430
  };
8425
8431
  }, Address>;
8426
8432
  /**
@@ -1,8 +1,8 @@
1
- import { V as r } from "../../constants-BO_Dvglw.js";
1
+ import { V as r } from "../../constants-0GZgavMM.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-DRjKmuyC.js";
5
+ import { g as c } from "../../getContract-DaCKXI8P.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-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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../constants-CwkqnEF2.cjs"),s=require("../addresses.cjs"),o=require("../abis/mainnet/Distributor.cjs"),c=require("../../getContract-BinxcNSi.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
@@ -252,6 +252,7 @@ export declare class DistributorHandler {
252
252
  request?: (parameters: import('viem').CcipRequestParameters) => Promise<`0x${string}`>;
253
253
  } | undefined;
254
254
  chain: ViemChain | undefined;
255
+ dataSuffix?: import('viem').DataSuffix | undefined;
255
256
  experimental_blockTag?: import('viem').BlockTag | undefined;
256
257
  key: string;
257
258
  name: string;
@@ -271,6 +272,7 @@ export declare class DistributorHandler {
271
272
  createPendingTransactionFilter: () => Promise<import('viem').CreatePendingTransactionFilterReturnType>;
272
273
  estimateContractGas: <chain extends ViemChain | undefined, const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "nonpayable" | "payable">, args extends import('viem').ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>>(args: import('viem').EstimateContractGasParameters<abi, functionName, args, chain>) => Promise<import('viem').EstimateContractGasReturnType>;
273
274
  estimateGas: (args: import('viem').EstimateGasParameters<ViemChain | undefined>) => Promise<import('viem').EstimateGasReturnType>;
275
+ fillTransaction: <chainOverride extends ViemChain | undefined = undefined, accountOverride extends import('viem').Account | Address | undefined = undefined>(args: import('viem').FillTransactionParameters<ViemChain | undefined, import('viem').Account | undefined, chainOverride, accountOverride>) => Promise<import('viem').FillTransactionReturnType<ViemChain | undefined, chainOverride>>;
274
276
  getBalance: (args: import('viem').GetBalanceParameters) => Promise<import('viem').GetBalanceReturnType>;
275
277
  getBlobBaseFee: () => Promise<import('viem').GetBlobBaseFeeReturnType>;
276
278
  getBlock: <includeTransactions extends boolean = false, blockTag extends import('viem').BlockTag = "latest">(args?: import('viem').GetBlockParameters<includeTransactions, blockTag> | undefined) => Promise<{
@@ -3868,6 +3870,7 @@ export declare class DistributorHandler {
3868
3870
  cacheTime?: undefined;
3869
3871
  ccipRead?: undefined;
3870
3872
  chain?: undefined;
3873
+ dataSuffix?: undefined;
3871
3874
  experimental_blockTag?: undefined;
3872
3875
  key?: undefined;
3873
3876
  name?: undefined;
@@ -3876,7 +3879,7 @@ export declare class DistributorHandler {
3876
3879
  transport?: undefined;
3877
3880
  type?: undefined;
3878
3881
  uid?: undefined;
3879
- } & import('viem').ExactPartial<Pick<import('viem').PublicActions<import('viem').Transport, ViemChain | undefined, undefined>, "getChainId" | "prepareTransactionRequest" | "sendRawTransaction" | "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import('viem').WalletActions<ViemChain | undefined, undefined>, "sendTransaction" | "writeContract">>>(fn: (client: import('viem').Client<import('viem').Transport, ViemChain | undefined, undefined, import('viem').PublicRpcSchema, import('viem').PublicActions<import('viem').Transport, ViemChain | undefined>>) => client) => import('viem').Client<import('viem').Transport, ViemChain | undefined, undefined, import('viem').PublicRpcSchema, { [K in keyof client]: client[K]; } & import('viem').PublicActions<import('viem').Transport, ViemChain | undefined>>;
3882
+ } & import('viem').ExactPartial<Pick<import('viem').PublicActions<import('viem').Transport, ViemChain | undefined, undefined>, "prepareTransactionRequest" | "getChainId" | "sendRawTransaction" | "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import('viem').WalletActions<ViemChain | undefined, undefined>, "sendTransaction" | "writeContract">>>(fn: (client: import('viem').Client<import('viem').Transport, ViemChain | undefined, undefined, import('viem').PublicRpcSchema, import('viem').PublicActions<import('viem').Transport, ViemChain | undefined>>) => client) => import('viem').Client<import('viem').Transport, ViemChain | undefined, undefined, import('viem').PublicRpcSchema, { [K in keyof client]: client[K]; } & import('viem').PublicActions<import('viem').Transport, ViemChain | undefined>>;
3880
3883
  };
3881
3884
  wallet: {
3882
3885
  account: import('viem').Account | undefined;
@@ -3888,6 +3891,7 @@ export declare class DistributorHandler {
3888
3891
  request?: (parameters: import('viem').CcipRequestParameters) => Promise<`0x${string}`>;
3889
3892
  } | undefined;
3890
3893
  chain: ViemChain | undefined;
3894
+ dataSuffix?: import('viem').DataSuffix | undefined;
3891
3895
  experimental_blockTag?: import('viem').BlockTag | undefined;
3892
3896
  key: string;
3893
3897
  name: string;
@@ -3898,6 +3902,7 @@ export declare class DistributorHandler {
3898
3902
  uid: string;
3899
3903
  addChain: (args: import('viem').AddChainParameters) => Promise<void>;
3900
3904
  deployContract: <const abi extends import('viem').Abi | readonly unknown[], chainOverride extends ViemChain | undefined>(args: import('viem').DeployContractParameters<abi, ViemChain | undefined, import('viem').Account | undefined, chainOverride>) => Promise<import('viem').DeployContractReturnType>;
3905
+ fillTransaction: <chainOverride extends ViemChain | undefined = undefined, accountOverride extends import('viem').Account | Address | undefined = undefined>(args: import('viem').FillTransactionParameters<ViemChain | undefined, import('viem').Account | undefined, chainOverride, accountOverride>) => Promise<import('viem').FillTransactionReturnType<ViemChain | undefined, chainOverride>>;
3901
3906
  getAddresses: () => Promise<import('viem').GetAddressesReturnType>;
3902
3907
  getCallsStatus: (parameters: import('viem').GetCallsStatusParameters) => Promise<import('viem').GetCallsStatusReturnType>;
3903
3908
  getCapabilities: <chainId extends number | undefined>(parameters?: import('viem').GetCapabilitiesParameters<chainId>) => Promise<import('viem').GetCapabilitiesReturnType<chainId>>;
@@ -7182,7 +7187,7 @@ export declare class DistributorHandler {
7182
7187
  sendRawTransaction: (args: import('viem').SendRawTransactionParameters) => Promise<import('viem').SendRawTransactionReturnType>;
7183
7188
  sendRawTransactionSync: (args: import('viem').SendRawTransactionSyncParameters) => Promise<import('viem').TransactionReceipt>;
7184
7189
  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>;
7185
- 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>;
7190
+ 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').TransactionReceipt>;
7186
7191
  showCallsStatus: (parameters: import('viem').ShowCallsStatusParameters) => Promise<import('viem').ShowCallsStatusReturnType>;
7187
7192
  signAuthorization: (parameters: import('viem').SignAuthorizationParameters<import('viem').Account | undefined>) => Promise<import('viem').SignAuthorizationReturnType>;
7188
7193
  signMessage: (args: import('viem').SignMessageParameters<import('viem').Account | undefined>) => Promise<import('viem').SignMessageReturnType>;
@@ -8298,6 +8303,7 @@ export declare class DistributorHandler {
8298
8303
  cacheTime?: undefined;
8299
8304
  ccipRead?: undefined;
8300
8305
  chain?: undefined;
8306
+ dataSuffix?: undefined;
8301
8307
  experimental_blockTag?: undefined;
8302
8308
  key?: undefined;
8303
8309
  name?: undefined;
@@ -8306,7 +8312,7 @@ export declare class DistributorHandler {
8306
8312
  transport?: undefined;
8307
8313
  type?: undefined;
8308
8314
  uid?: undefined;
8309
- } & import('viem').ExactPartial<Pick<import('viem').PublicActions<import('viem').Transport, ViemChain | undefined, import('viem').Account | undefined>, "getChainId" | "prepareTransactionRequest" | "sendRawTransaction" | "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import('viem').WalletActions<ViemChain | undefined, import('viem').Account | undefined>, "sendTransaction" | "writeContract">>>(fn: (client: import('viem').Client<import('viem').Transport, ViemChain | undefined, import('viem').Account | undefined, import('viem').WalletRpcSchema, import('viem').WalletActions<ViemChain | undefined, import('viem').Account | undefined>>) => client) => import('viem').Client<import('viem').Transport, ViemChain | undefined, import('viem').Account | undefined, import('viem').WalletRpcSchema, { [K in keyof client]: client[K]; } & import('viem').WalletActions<ViemChain | undefined, import('viem').Account | undefined>>;
8315
+ } & import('viem').ExactPartial<Pick<import('viem').PublicActions<import('viem').Transport, ViemChain | undefined, import('viem').Account | undefined>, "prepareTransactionRequest" | "getChainId" | "sendRawTransaction" | "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import('viem').WalletActions<ViemChain | undefined, import('viem').Account | undefined>, "sendTransaction" | "writeContract">>>(fn: (client: import('viem').Client<import('viem').Transport, ViemChain | undefined, import('viem').Account | undefined, import('viem').WalletRpcSchema, import('viem').WalletActions<ViemChain | undefined, import('viem').Account | undefined>>) => client) => import('viem').Client<import('viem').Transport, ViemChain | undefined, import('viem').Account | undefined, import('viem').WalletRpcSchema, { [K in keyof client]: client[K]; } & import('viem').WalletActions<ViemChain | undefined, import('viem').Account | undefined>>;
8310
8316
  };
8311
8317
  }, Address>;
8312
8318
  /**
@@ -1,7 +1,7 @@
1
- import { V as n } from "../../constants-BO_Dvglw.js";
1
+ import { V as n } from "../../constants-0GZgavMM.js";
2
2
  import { CONTRACT_ADDRESSES as o } from "../addresses.js";
3
3
  import { Distributor as s } from "../abis/mainnet/Distributor.js";
4
- import { g as c } from "../../getContract-DRjKmuyC.js";
4
+ import { g as c } from "../../getContract-DaCKXI8P.js";
5
5
  class g {
6
6
  /**
7
7
  * Create the handler for the Distributor contract exposing
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../constants-4-ehn8UI.cjs"),s=require("../tokens.cjs"),g=require("../../utils/time.cjs"),p=require("../abis/mainnet/ERC20Permit.cjs"),d=require("../../getContract-C6a8L2Jd.cjs"),y=require("../../secp256k1-CzsL7iVx.cjs");function S(o){const{r:t,s:n}=y.secp256k1.Signature.fromCompact(o.slice(2,130)),e=+`0x${o.slice(130)}`,[i,r]=(()=>{if(e===0||e===1)return[void 0,e];if(e===27)return[BigInt(e),0];if(e===28)return[BigInt(e),1];throw new Error("Invalid yParityOrV value")})();return typeof i<"u"?{r:a.numberToHex(t,{size:32}),s:a.numberToHex(n,{size:32}),v:i,yParity:r}:{r:a.numberToHex(t,{size:32}),s:a.numberToHex(n,{size:32}),yParity:r}}class C{constructor(t,n,e){this.chain=t,this.walletClient=n,this.publicClient=e,this.viemChain=a.VIEM_CHAINS[t],this.token=s.Token.WETH}viemChain;token;withToken(t){return this.token=t,this}getContract(){const t=s.TOKENS_ADDRESSES[this.token][this.chain],n=p.ERC20Permit,e={public:this.publicClient,wallet:this.walletClient};return d.getContract({address:t,abi:n,client:e})}nonces(t){return this.getContract().read.nonces([t])}async getPermitSignature(t,n,e){const i=this.getContract(),r=await this.nonces(t),c={name:await i.read.name(),version:this.getPermitVersion(this.token),chainId:this.chain,verifyingContract:s.TOKENS_ADDRESSES[this.token][this.chain],salt:this.getPermitSalt(this.token)},u={Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},h=BigInt(g.getTimestampInSeconds()+3600*2),l=await this.walletClient.signTypedData({account:t,domain:c,types:u,primaryType:"Permit",message:{owner:t,spender:n,value:e,nonce:r,deadline:h}});return{...S(l),deadline:h}}async getPermitData(t,n,e){const{r:i,s:r,v:m,yParity:c,deadline:u}=await this.getPermitSignature(t,n,e);return{r:i,s:r,v:Number(m??c),deadline:u,amount:e}}approve(t,n,e){return this.getContract().write.approve([n,e],{account:t,chain:this.viemChain})}getPermitVersion(t){return s.TOKENS_PERMIT_VERSION[t]}getPermitSalt(t){return s.TOKENS_SALT?.[t]?.[this.chain]}}exports.ERC20PermitHandler=C;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../constants-CwkqnEF2.cjs"),s=require("../tokens.cjs"),g=require("../../utils/time.cjs"),p=require("../abis/mainnet/ERC20Permit.cjs"),d=require("../../getContract-BinxcNSi.cjs"),y=require("../../secp256k1-Be7RiBch.cjs");function S(o){const{r:t,s:n}=y.secp256k1.Signature.fromCompact(o.slice(2,130)),e=+`0x${o.slice(130)}`,[i,r]=(()=>{if(e===0||e===1)return[void 0,e];if(e===27)return[BigInt(e),0];if(e===28)return[BigInt(e),1];throw new Error("Invalid yParityOrV value")})();return typeof i<"u"?{r:a.numberToHex(t,{size:32}),s:a.numberToHex(n,{size:32}),v:i,yParity:r}:{r:a.numberToHex(t,{size:32}),s:a.numberToHex(n,{size:32}),yParity:r}}class C{constructor(t,n,e){this.chain=t,this.walletClient=n,this.publicClient=e,this.viemChain=a.VIEM_CHAINS[t],this.token=s.Token.WETH}viemChain;token;withToken(t){return this.token=t,this}getContract(){const t=s.TOKENS_ADDRESSES[this.token][this.chain],n=p.ERC20Permit,e={public:this.publicClient,wallet:this.walletClient};return d.getContract({address:t,abi:n,client:e})}nonces(t){return this.getContract().read.nonces([t])}async getPermitSignature(t,n,e){const i=this.getContract(),r=await this.nonces(t),c={name:await i.read.name(),version:this.getPermitVersion(this.token),chainId:this.chain,verifyingContract:s.TOKENS_ADDRESSES[this.token][this.chain],salt:this.getPermitSalt(this.token)},u={Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},h=BigInt(g.getTimestampInSeconds()+3600*2),l=await this.walletClient.signTypedData({account:t,domain:c,types:u,primaryType:"Permit",message:{owner:t,spender:n,value:e,nonce:r,deadline:h}});return{...S(l),deadline:h}}async getPermitData(t,n,e){const{r:i,s:r,v:m,yParity:c,deadline:u}=await this.getPermitSignature(t,n,e);return{r:i,s:r,v:Number(m??c),deadline:u,amount:e}}approve(t,n,e){return this.getContract().write.approve([n,e],{account:t,chain:this.viemChain})}getPermitVersion(t){return s.TOKENS_PERMIT_VERSION[t]}getPermitSalt(t){return s.TOKENS_SALT?.[t]?.[this.chain]}}exports.ERC20PermitHandler=C;
2
2
  //# sourceMappingURL=erc20-permit-handler.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"erc20-permit-handler.cjs","sources":["../../../node_modules/.pnpm/viem@2.38.5_typescript@5.9.3_zod@4.1.12/node_modules/viem/_esm/utils/signature/parseSignature.js","../../../lib/contracts/handlers/erc20-permit-handler.ts"],"sourcesContent":["import { secp256k1 } from '@noble/curves/secp256k1';\nimport { numberToHex, } from '../../utils/encoding/toHex.js';\n/**\n * @description Parses a hex formatted signature into a structured signature.\n *\n * @param signatureHex Signature in hex format.\n * @returns The structured signature.\n *\n * @example\n * parseSignature('0x6e100a352ec6ad1b70802290e18aeed190704973570f3b8ed42cb9808e2ea6bf4a90a229a244495b41890987806fcbd2d5d23fc0dbe5f5256c2613c039d76db81c')\n * // { r: '0x...', s: '0x...', v: 28n }\n */\nexport function parseSignature(signatureHex) {\n const { r, s } = secp256k1.Signature.fromCompact(signatureHex.slice(2, 130));\n const yParityOrV = Number(`0x${signatureHex.slice(130)}`);\n const [v, yParity] = (() => {\n if (yParityOrV === 0 || yParityOrV === 1)\n return [undefined, yParityOrV];\n if (yParityOrV === 27)\n return [BigInt(yParityOrV), 0];\n if (yParityOrV === 28)\n return [BigInt(yParityOrV), 1];\n throw new Error('Invalid yParityOrV value');\n })();\n if (typeof v !== 'undefined')\n return {\n r: numberToHex(r, { size: 32 }),\n s: numberToHex(s, { size: 32 }),\n v,\n yParity,\n };\n return {\n r: numberToHex(r, { size: 32 }),\n s: numberToHex(s, { size: 32 }),\n yParity,\n };\n}\n//# sourceMappingURL=parseSignature.js.map","import {\n WalletClient,\n PublicClient,\n getContract,\n Address,\n parseSignature,\n GetContractReturnType,\n} from 'viem';\nimport { Chain, VIEM_CHAINS, ViemChain } from '../../chains/constants';\nimport {\n AnyToken,\n TOKENS_ADDRESSES,\n TOKENS_SALT,\n TOKENS_PERMIT_VERSION,\n Token,\n} from '../tokens';\nimport { getTimestampInSeconds } from '../../utils/time';\nimport { ERC20Permit } from '../abis/mainnet/ERC20Permit';\nimport { PermitData } from '../common/lib/types';\n\n/**\n * Handler for performing operations for and with ERC20Permit tokens.\n */\nexport class ERC20PermitHandler {\n private viemChain: ViemChain;\n private token: AnyToken;\n\n /**\n * Create the handler for processing tokens.\n *\n * @param chain Chain to use for the client.\n * @param walletClient The wallet client to use for wallet\n * interactions.\n * @param publicClient The public client to use for public\n * interactions.\n */\n constructor(\n private chain: Chain,\n private walletClient: WalletClient,\n private publicClient: PublicClient,\n ) {\n this.viemChain = VIEM_CHAINS[chain];\n this.token = Token.WETH;\n }\n\n /**\n * Set the token to use for executing transactions on the contract.\n *\n * @param token Token to use for the handler.\n * @returns The handler.\n */\n public withToken(token: AnyToken) {\n this.token = token;\n return this;\n }\n\n /**\n * Get the contract. This is a method because the typings are complex\n * and lost when trying to make it a member.\n *\n * @returns The viem contract.\n */\n public getContract() {\n const address = TOKENS_ADDRESSES[this.token][this.chain];\n const abi = ERC20Permit;\n const client = { public: this.publicClient, wallet: this.walletClient };\n\n return getContract({ address, abi, client }) as GetContractReturnType<\n typeof abi,\n typeof client,\n Address\n >;\n }\n\n /**\n * Get the nonces for the given account.\n *\n * @param account Address of the account.\n * @returns The nonces.\n */\n public nonces(account: Address) {\n return this.getContract().read.nonces([account]);\n }\n\n /**\n * Process and get permit signature for the given token to perform\n * transactions without calling `approve()`.\n *\n * @param ownerAddress Address of the token owner.\n * @param spenderAddress Address of the spender who needs the permit.\n * @param value Value of the transaction.\n * @returns Permit signature in the form `{ r, s, v?, yParity }`.\n */\n public async getPermitSignature(\n ownerAddress: Address,\n spenderAddress: Address,\n value: bigint,\n ) {\n const contract = this.getContract();\n\n const permitNonces = await this.nonces(ownerAddress);\n const name = await contract.read.name();\n const domain = <const>{\n name,\n version: this.getPermitVersion(this.token),\n chainId: this.chain,\n verifyingContract: TOKENS_ADDRESSES[this.token][this.chain],\n salt: this.getPermitSalt(this.token),\n };\n const types = <const>{\n Permit: [\n { name: 'owner', type: 'address' },\n { name: 'spender', type: 'address' },\n { name: 'value', type: 'uint256' },\n { name: 'nonce', type: 'uint256' },\n { name: 'deadline', type: 'uint256' },\n ],\n };\n // Valid for 2 hours.\n const deadline = BigInt(getTimestampInSeconds() + 60 * 60 * 2);\n\n const signature = await this.walletClient.signTypedData({\n account: ownerAddress,\n domain,\n types,\n primaryType: 'Permit',\n message: {\n owner: ownerAddress,\n spender: spenderAddress,\n value,\n nonce: permitNonces,\n deadline,\n },\n });\n\n return { ...parseSignature(signature), deadline };\n }\n\n /**\n * Get the permit data for the given owner, spender and value.\n *\n * @param ownerAddress Address of the token owner.\n * @param spenderAddress Address of the spender who needs the permit.\n * @param value Value/amount to be permitted.\n * @returns Permit data in the form `{ r, s, v, deadline, amount }`.\n */\n public async getPermitData(\n ownerAddress: Address,\n spenderAddress: Address,\n value: bigint,\n ): Promise<PermitData> {\n const { r, s, v, yParity, deadline } = await this.getPermitSignature(\n ownerAddress,\n spenderAddress,\n value,\n );\n\n /* istanbul ignore next */\n return { r, s, v: Number(v ?? yParity), deadline, amount: value };\n }\n\n /**\n * Approve transaction for the spender to spend the owner's tokens.\n *\n * @param ownerAddress Address of the caller of the transaction.\n * @param spenderAddress Address of the spender.\n * @param value Value to approve for the spender.\n * @returns Hash of the transaction.\n */\n public approve(\n ownerAddress: Address,\n spenderAddress: Address,\n value: bigint,\n ) {\n return this.getContract().write.approve([spenderAddress, value], {\n account: ownerAddress,\n chain: this.viemChain,\n });\n }\n\n private getPermitVersion(token: AnyToken): string {\n return TOKENS_PERMIT_VERSION[token];\n }\n\n private getPermitSalt(token: AnyToken) {\n return TOKENS_SALT?.[token]?.[this.chain];\n }\n}\n"],"names":["parseSignature","signatureHex","r","s","secp256k1","yParityOrV","v","yParity","numberToHex","ERC20PermitHandler","chain","walletClient","publicClient","VIEM_CHAINS","Token","token","address","TOKENS_ADDRESSES","abi","ERC20Permit","client","getContract","account","ownerAddress","spenderAddress","value","contract","permitNonces","domain","types","deadline","getTimestampInSeconds","signature","TOKENS_PERMIT_VERSION","TOKENS_SALT"],"mappings":"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","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"erc20-permit-handler.cjs","sources":["../../../node_modules/.pnpm/viem@2.45.0_typescript@5.9.3_zod@4.1.12/node_modules/viem/_esm/utils/signature/parseSignature.js","../../../lib/contracts/handlers/erc20-permit-handler.ts"],"sourcesContent":["import { secp256k1 } from '@noble/curves/secp256k1';\nimport { numberToHex, } from '../../utils/encoding/toHex.js';\n/**\n * @description Parses a hex formatted signature into a structured signature.\n *\n * @param signatureHex Signature in hex format.\n * @returns The structured signature.\n *\n * @example\n * parseSignature('0x6e100a352ec6ad1b70802290e18aeed190704973570f3b8ed42cb9808e2ea6bf4a90a229a244495b41890987806fcbd2d5d23fc0dbe5f5256c2613c039d76db81c')\n * // { r: '0x...', s: '0x...', v: 28n }\n */\nexport function parseSignature(signatureHex) {\n const { r, s } = secp256k1.Signature.fromCompact(signatureHex.slice(2, 130));\n const yParityOrV = Number(`0x${signatureHex.slice(130)}`);\n const [v, yParity] = (() => {\n if (yParityOrV === 0 || yParityOrV === 1)\n return [undefined, yParityOrV];\n if (yParityOrV === 27)\n return [BigInt(yParityOrV), 0];\n if (yParityOrV === 28)\n return [BigInt(yParityOrV), 1];\n throw new Error('Invalid yParityOrV value');\n })();\n if (typeof v !== 'undefined')\n return {\n r: numberToHex(r, { size: 32 }),\n s: numberToHex(s, { size: 32 }),\n v,\n yParity,\n };\n return {\n r: numberToHex(r, { size: 32 }),\n s: numberToHex(s, { size: 32 }),\n yParity,\n };\n}\n//# sourceMappingURL=parseSignature.js.map","import {\n WalletClient,\n PublicClient,\n getContract,\n Address,\n parseSignature,\n GetContractReturnType,\n} from 'viem';\nimport { Chain, VIEM_CHAINS, ViemChain } from '../../chains/constants';\nimport {\n AnyToken,\n TOKENS_ADDRESSES,\n TOKENS_SALT,\n TOKENS_PERMIT_VERSION,\n Token,\n} from '../tokens';\nimport { getTimestampInSeconds } from '../../utils/time';\nimport { ERC20Permit } from '../abis/mainnet/ERC20Permit';\nimport { PermitData } from '../common/lib/types';\n\n/**\n * Handler for performing operations for and with ERC20Permit tokens.\n */\nexport class ERC20PermitHandler {\n private viemChain: ViemChain;\n private token: AnyToken;\n\n /**\n * Create the handler for processing tokens.\n *\n * @param chain Chain to use for the client.\n * @param walletClient The wallet client to use for wallet\n * interactions.\n * @param publicClient The public client to use for public\n * interactions.\n */\n constructor(\n private chain: Chain,\n private walletClient: WalletClient,\n private publicClient: PublicClient,\n ) {\n this.viemChain = VIEM_CHAINS[chain];\n this.token = Token.WETH;\n }\n\n /**\n * Set the token to use for executing transactions on the contract.\n *\n * @param token Token to use for the handler.\n * @returns The handler.\n */\n public withToken(token: AnyToken) {\n this.token = token;\n return this;\n }\n\n /**\n * Get the contract. This is a method because the typings are complex\n * and lost when trying to make it a member.\n *\n * @returns The viem contract.\n */\n public getContract() {\n const address = TOKENS_ADDRESSES[this.token][this.chain];\n const abi = ERC20Permit;\n const client = { public: this.publicClient, wallet: this.walletClient };\n\n return getContract({ address, abi, client }) as GetContractReturnType<\n typeof abi,\n typeof client,\n Address\n >;\n }\n\n /**\n * Get the nonces for the given account.\n *\n * @param account Address of the account.\n * @returns The nonces.\n */\n public nonces(account: Address) {\n return this.getContract().read.nonces([account]);\n }\n\n /**\n * Process and get permit signature for the given token to perform\n * transactions without calling `approve()`.\n *\n * @param ownerAddress Address of the token owner.\n * @param spenderAddress Address of the spender who needs the permit.\n * @param value Value of the transaction.\n * @returns Permit signature in the form `{ r, s, v?, yParity }`.\n */\n public async getPermitSignature(\n ownerAddress: Address,\n spenderAddress: Address,\n value: bigint,\n ) {\n const contract = this.getContract();\n\n const permitNonces = await this.nonces(ownerAddress);\n const name = await contract.read.name();\n const domain = <const>{\n name,\n version: this.getPermitVersion(this.token),\n chainId: this.chain,\n verifyingContract: TOKENS_ADDRESSES[this.token][this.chain],\n salt: this.getPermitSalt(this.token),\n };\n const types = <const>{\n Permit: [\n { name: 'owner', type: 'address' },\n { name: 'spender', type: 'address' },\n { name: 'value', type: 'uint256' },\n { name: 'nonce', type: 'uint256' },\n { name: 'deadline', type: 'uint256' },\n ],\n };\n // Valid for 2 hours.\n const deadline = BigInt(getTimestampInSeconds() + 60 * 60 * 2);\n\n const signature = await this.walletClient.signTypedData({\n account: ownerAddress,\n domain,\n types,\n primaryType: 'Permit',\n message: {\n owner: ownerAddress,\n spender: spenderAddress,\n value,\n nonce: permitNonces,\n deadline,\n },\n });\n\n return { ...parseSignature(signature), deadline };\n }\n\n /**\n * Get the permit data for the given owner, spender and value.\n *\n * @param ownerAddress Address of the token owner.\n * @param spenderAddress Address of the spender who needs the permit.\n * @param value Value/amount to be permitted.\n * @returns Permit data in the form `{ r, s, v, deadline, amount }`.\n */\n public async getPermitData(\n ownerAddress: Address,\n spenderAddress: Address,\n value: bigint,\n ): Promise<PermitData> {\n const { r, s, v, yParity, deadline } = await this.getPermitSignature(\n ownerAddress,\n spenderAddress,\n value,\n );\n\n /* istanbul ignore next */\n return { r, s, v: Number(v ?? yParity), deadline, amount: value };\n }\n\n /**\n * Approve transaction for the spender to spend the owner's tokens.\n *\n * @param ownerAddress Address of the caller of the transaction.\n * @param spenderAddress Address of the spender.\n * @param value Value to approve for the spender.\n * @returns Hash of the transaction.\n */\n public approve(\n ownerAddress: Address,\n spenderAddress: Address,\n value: bigint,\n ) {\n return this.getContract().write.approve([spenderAddress, value], {\n account: ownerAddress,\n chain: this.viemChain,\n });\n }\n\n private getPermitVersion(token: AnyToken): string {\n return TOKENS_PERMIT_VERSION[token];\n }\n\n private getPermitSalt(token: AnyToken) {\n return TOKENS_SALT?.[token]?.[this.chain];\n }\n}\n"],"names":["parseSignature","signatureHex","r","s","secp256k1","yParityOrV","v","yParity","numberToHex","ERC20PermitHandler","chain","walletClient","publicClient","VIEM_CHAINS","Token","token","address","TOKENS_ADDRESSES","abi","ERC20Permit","client","getContract","account","ownerAddress","spenderAddress","value","contract","permitNonces","domain","types","deadline","getTimestampInSeconds","signature","TOKENS_PERMIT_VERSION","TOKENS_SALT"],"mappings":"gUAYO,SAASA,EAAeC,EAAc,CACzC,KAAM,CAAE,EAAAC,EAAG,EAAAC,CAAC,EAAKC,YAAU,UAAU,YAAYH,EAAa,MAAM,EAAG,GAAG,CAAC,EACrEI,EAAa,CAAO,KAAKJ,EAAa,MAAM,GAAG,CAAC,GAChD,CAACK,EAAGC,CAAO,GAAK,IAAM,CACxB,GAAIF,IAAe,GAAKA,IAAe,EACnC,MAAO,CAAC,OAAWA,CAAU,EACjC,GAAIA,IAAe,GACf,MAAO,CAAC,OAAOA,CAAU,EAAG,CAAC,EACjC,GAAIA,IAAe,GACf,MAAO,CAAC,OAAOA,CAAU,EAAG,CAAC,EACjC,MAAM,IAAI,MAAM,0BAA0B,CAC9C,GAAC,EACD,OAAI,OAAOC,EAAM,IACN,CACH,EAAGE,EAAAA,YAAYN,EAAG,CAAE,KAAM,EAAE,CAAE,EAC9B,EAAGM,EAAAA,YAAYL,EAAG,CAAE,KAAM,EAAE,CAAE,EAC9B,EAAAG,EACA,QAAAC,CACZ,EACW,CACH,EAAGC,EAAAA,YAAYN,EAAG,CAAE,KAAM,EAAE,CAAE,EAC9B,EAAGM,EAAAA,YAAYL,EAAG,CAAE,KAAM,EAAE,CAAE,EAC9B,QAAAI,CACR,CACA,CCbO,MAAME,CAAmB,CAa9B,YACUC,EACAC,EACAC,EACR,CAHQ,KAAA,MAAAF,EACA,KAAA,aAAAC,EACA,KAAA,aAAAC,EAER,KAAK,UAAYC,EAAAA,YAAYH,CAAK,EAClC,KAAK,MAAQI,EAAAA,MAAM,IACrB,CAnBQ,UACA,MA0BD,UAAUC,EAAiB,CAChC,YAAK,MAAQA,EACN,IACT,CAQO,aAAc,CACnB,MAAMC,EAAUC,EAAAA,iBAAiB,KAAK,KAAK,EAAE,KAAK,KAAK,EACjDC,EAAMC,EAAAA,YACNC,EAAS,CAAE,OAAQ,KAAK,aAAc,OAAQ,KAAK,YAAA,EAEzD,OAAOC,EAAAA,YAAY,CAAE,QAAAL,EAAS,IAAAE,EAAK,OAAAE,EAAQ,CAK7C,CAQO,OAAOE,EAAkB,CAC9B,OAAO,KAAK,YAAA,EAAc,KAAK,OAAO,CAACA,CAAO,CAAC,CACjD,CAWA,MAAa,mBACXC,EACAC,EACAC,EACA,CACA,MAAMC,EAAW,KAAK,YAAA,EAEhBC,EAAe,MAAM,KAAK,OAAOJ,CAAY,EAE7CK,EAAgB,CACpB,KAFW,MAAMF,EAAS,KAAK,KAAA,EAG/B,QAAS,KAAK,iBAAiB,KAAK,KAAK,EACzC,QAAS,KAAK,MACd,kBAAmBT,EAAAA,iBAAiB,KAAK,KAAK,EAAE,KAAK,KAAK,EAC1D,KAAM,KAAK,cAAc,KAAK,KAAK,CAAA,EAE/BY,EAAe,CACnB,OAAQ,CACN,CAAE,KAAM,QAAS,KAAM,SAAA,EACvB,CAAE,KAAM,UAAW,KAAM,SAAA,EACzB,CAAE,KAAM,QAAS,KAAM,SAAA,EACvB,CAAE,KAAM,QAAS,KAAM,SAAA,EACvB,CAAE,KAAM,WAAY,KAAM,SAAA,CAAU,CACtC,EAGIC,EAAW,OAAOC,EAAAA,sBAAA,EAA0B,KAAU,CAAC,EAEvDC,EAAY,MAAM,KAAK,aAAa,cAAc,CACtD,QAAST,EACT,OAAAK,EACA,MAAAC,EACA,YAAa,SACb,QAAS,CACP,MAAON,EACP,QAASC,EACT,MAAAC,EACA,MAAOE,EACP,SAAAG,CAAA,CACF,CACD,EAED,MAAO,CAAE,GAAG9B,EAAegC,CAAS,EAAG,SAAAF,CAAA,CACzC,CAUA,MAAa,cACXP,EACAC,EACAC,EACqB,CACrB,KAAM,CAAE,EAAAvB,EAAG,EAAAC,EAAG,EAAAG,EAAG,QAAAC,EAAS,SAAAuB,CAAA,EAAa,MAAM,KAAK,mBAChDP,EACAC,EACAC,CAAA,EAIF,MAAO,CAAE,EAAAvB,EAAG,EAAAC,EAAG,EAAG,OAAOG,GAAKC,CAAO,EAAG,SAAAuB,EAAU,OAAQL,CAAA,CAC5D,CAUO,QACLF,EACAC,EACAC,EACA,CACA,OAAO,KAAK,cAAc,MAAM,QAAQ,CAACD,EAAgBC,CAAK,EAAG,CAC/D,QAASF,EACT,MAAO,KAAK,SAAA,CACb,CACH,CAEQ,iBAAiBR,EAAyB,CAChD,OAAOkB,EAAAA,sBAAsBlB,CAAK,CACpC,CAEQ,cAAcA,EAAiB,CACrC,OAAOmB,gBAAcnB,CAAK,IAAI,KAAK,KAAK,CAC1C,CACF","x_google_ignoreList":[0]}