@boostxyz/sdk 8.0.0-canary.1 → 8.0.0-canary.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 (97) hide show
  1. package/dist/Actions/Action.cjs +1 -1
  2. package/dist/Actions/Action.js +1 -1
  3. package/dist/Actions/EventAction.cjs +1 -1
  4. package/dist/Actions/EventAction.cjs.map +1 -1
  5. package/dist/Actions/EventAction.d.ts +19 -0
  6. package/dist/Actions/EventAction.d.ts.map +1 -1
  7. package/dist/Actions/EventAction.js +209 -204
  8. package/dist/Actions/EventAction.js.map +1 -1
  9. package/dist/{AllowList-NPDlllP6.js → AllowList-DQf-8HQC.js} +30 -30
  10. package/dist/{AllowList-NPDlllP6.js.map → AllowList-DQf-8HQC.js.map} +1 -1
  11. package/dist/{AllowList-BacG3oLt.cjs → AllowList-DaX239DR.cjs} +2 -2
  12. package/dist/{AllowList-BacG3oLt.cjs.map → AllowList-DaX239DR.cjs.map} +1 -1
  13. package/dist/AllowLists/AllowList.cjs +1 -1
  14. package/dist/AllowLists/AllowList.js +3 -3
  15. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  16. package/dist/AllowLists/SimpleAllowList.js +3 -3
  17. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  18. package/dist/AllowLists/SimpleDenyList.js +2 -2
  19. package/dist/Auth/PassthroughAuth.cjs +1 -1
  20. package/dist/Auth/PassthroughAuth.js +2 -2
  21. package/dist/BoostCore.cjs +2 -2
  22. package/dist/BoostCore.cjs.map +1 -1
  23. package/dist/BoostCore.d.ts +35 -0
  24. package/dist/BoostCore.d.ts.map +1 -1
  25. package/dist/BoostCore.js +75 -75
  26. package/dist/BoostRegistry.cjs +1 -1
  27. package/dist/BoostRegistry.js +12 -12
  28. package/dist/{Budget-Dq0K1LVM.js → Budget-LnAQ_Slw.js} +40 -40
  29. package/dist/{Budget-Dq0K1LVM.js.map → Budget-LnAQ_Slw.js.map} +1 -1
  30. package/dist/{Budget-Gk2p5v0g.cjs → Budget-WIB8IJoM.cjs} +2 -2
  31. package/dist/{Budget-Gk2p5v0g.cjs.map → Budget-WIB8IJoM.cjs.map} +1 -1
  32. package/dist/Budgets/Budget.cjs +1 -1
  33. package/dist/Budgets/Budget.js +2 -2
  34. package/dist/Budgets/ManagedBudget.cjs +1 -1
  35. package/dist/Budgets/ManagedBudget.js +25 -25
  36. package/dist/Deployable/DeployableTarget.cjs +1 -1
  37. package/dist/Deployable/DeployableTarget.js +3 -3
  38. package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
  39. package/dist/Deployable/DeployableTargetWithRBAC.js +21 -21
  40. package/dist/{Incentive-DupDIsTS.js → Incentive-D_IBex5V.js} +22 -22
  41. package/dist/{Incentive-DupDIsTS.js.map → Incentive-D_IBex5V.js.map} +1 -1
  42. package/dist/{Incentive-YiX6zKm1.cjs → Incentive-gT7z-4v3.cjs} +2 -2
  43. package/dist/{Incentive-YiX6zKm1.cjs.map → Incentive-gT7z-4v3.cjs.map} +1 -1
  44. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  45. package/dist/Incentives/AllowListIncentive.js +12 -12
  46. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  47. package/dist/Incentives/CGDAIncentive.js +43 -43
  48. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  49. package/dist/Incentives/ERC20Incentive.js +15 -15
  50. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.cjs +1 -1
  51. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.js +35 -35
  52. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs +1 -1
  53. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs.map +1 -1
  54. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.d.ts.map +1 -1
  55. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js +146 -161
  56. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js.map +1 -1
  57. package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +1 -1
  58. package/dist/Incentives/ERC20VariableCriteriaIncentive.js +6 -6
  59. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.cjs +1 -1
  60. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.cjs.map +1 -1
  61. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.d.ts.map +1 -1
  62. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.js +103 -118
  63. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.js.map +1 -1
  64. package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
  65. package/dist/Incentives/ERC20VariableIncentive.js +8 -8
  66. package/dist/Incentives/Incentive.cjs +1 -1
  67. package/dist/Incentives/Incentive.js +2 -2
  68. package/dist/Incentives/PointsIncentive.cjs +1 -1
  69. package/dist/Incentives/PointsIncentive.js +15 -15
  70. package/dist/{SimpleDenyList-DyKqIWYL.js → SimpleDenyList-CtdXM49y.js} +6 -6
  71. package/dist/{SimpleDenyList-DyKqIWYL.js.map → SimpleDenyList-CtdXM49y.js.map} +1 -1
  72. package/dist/{SimpleDenyList-DMdld3JN.cjs → SimpleDenyList-D5AoBdVi.cjs} +2 -2
  73. package/dist/{SimpleDenyList-DMdld3JN.cjs.map → SimpleDenyList-D5AoBdVi.cjs.map} +1 -1
  74. package/dist/{Validator-vn0kQ3Wu.js → Validator-BEUqV28V.js} +27 -27
  75. package/dist/{Validator-vn0kQ3Wu.js.map → Validator-BEUqV28V.js.map} +1 -1
  76. package/dist/{Validator-BwPDBcxh.cjs → Validator-FxcxYKhR.cjs} +2 -2
  77. package/dist/{Validator-BwPDBcxh.cjs.map → Validator-FxcxYKhR.cjs.map} +1 -1
  78. package/dist/Validators/LimitedSignerValidator.cjs +1 -1
  79. package/dist/Validators/LimitedSignerValidator.js +3 -3
  80. package/dist/Validators/SignerValidator.cjs +1 -1
  81. package/dist/Validators/SignerValidator.js +7 -7
  82. package/dist/Validators/Validator.cjs +1 -1
  83. package/dist/Validators/Validator.js +2 -2
  84. package/dist/generated-Cf82M-QP.cjs +3 -0
  85. package/dist/generated-Cf82M-QP.cjs.map +1 -0
  86. package/dist/{generated-D6oDILUw.js → generated-krkFnwbV.js} +290 -247
  87. package/dist/generated-krkFnwbV.js.map +1 -0
  88. package/dist/index.cjs +1 -1
  89. package/dist/index.js +165 -164
  90. package/package.json +1 -1
  91. package/src/Actions/EventAction.test.ts +100 -71
  92. package/src/Actions/EventAction.ts +57 -30
  93. package/src/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.ts +13 -41
  94. package/src/Incentives/ERC20VariableCriteriaIncentiveV2.ts +13 -41
  95. package/dist/generated-BzLYuFx3.cjs +0 -3
  96. package/dist/generated-BzLYuFx3.cjs.map +0 -1
  97. package/dist/generated-D6oDILUw.js.map +0 -1
@@ -1,14 +1,14 @@
1
- import { b as I, b6 as C, b7 as R } from "../generated-D6oDILUw.js";
2
- import { getTransactionReceipt as T, getTransaction as V } from "@wagmi/core";
3
- import { decodeAbiParameters as w, parseEther as B, parseEventLogs as D, decodeFunctionData as N, encodeAbiParameters as _, zeroHash as S, zeroAddress as $ } from "viem";
4
- import { c as F } from "../deployments-Dw5Suk_D.js";
5
- import { SignatureType as m, decodeAndReorderLogArgs as P, isCriteriaFieldIndexTuple as u, getScalarValueFromTuple as g, ValueType as O } from "../Actions/EventAction.js";
6
- import { IncentiveCriteriaNotFoundError as G, DecodedArgsError as i, NoMatchingLogsError as h, InvalidCriteriaTypeError as L } from "../errors.js";
7
- import { CheatCodes as v } from "../utils.js";
8
- import { ERC20VariableIncentive as M } from "./ERC20VariableIncentive.js";
9
- const U = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6121c8806100895f395ff3fe608060405260043610610277575f3560e01c8063715018a61161014b578063c884ef83116100c6578063ec87621c1161007c578063f2fde38b11610062578063f2fde38b14610729578063fe9fbb801461073c578063fee81cf41461075b575f80fd5b8063ec87621c14610702578063f04e283e14610716575f80fd5b8063db09da12116100ac578063db09da12146106af578063dcc21361146106ce578063dcc59b6f146106ed575f80fd5b8063c884ef831461066c578063d54ad2a11461069a575f80fd5b8063a4d66daf1161011b578063bb1757cf11610101578063bb1757cf1461061a578063be4994f814610639578063c213f3f914610658575f80fd5b8063a4d66daf146105e4578063a871ced2146105f9575f80fd5b8063715018a61461053857806375b238fc1461054057806377548687146105545780638da5cb5b146105cc575f80fd5b806330db555f116101f55780634a4ee7b1116101ab578063514e62fc11610191578063514e62fc146104e657806354d1f13d1461051b57806366a78e6c14610523575f80fd5b80634a4ee7b1146104a75780634e7165a2146104ba575f80fd5b80634359d28a116101db5780634359d28a14610420578063439fab911461043f578063474f5a441461045e575f80fd5b806330db555f146103b057806338d52e0f146103cf575f80fd5b80631cd64df41161024a5780632569296211610230578063256929621461033d57806328d6183b146103455780632de948071461037f575f80fd5b80631cd64df4146102f4578063228cb73314610329575f80fd5b806301ffc9a71461027b57806307621eca146102af578063183a4f6e146102cc5780631c10893f146102e1575b5f80fd5b348015610286575f80fd5b5061029a6102953660046118ed565b61078c565b60405190151581526020015b60405180910390f35b3480156102ba575f80fd5b505f545b6040519081526020016102a6565b6102df6102da366004611933565b6107e7565b005b6102df6102ef36600461196b565b6107f4565b3480156102ff575f80fd5b5061029a61030e36600461196b565b638b78c6d8600c9081525f9290925260209091205481161490565b348015610334575f80fd5b506102be5f5481565b6102df61080a565b348015610350575f80fd5b506040517f52b8e45c0000000000000000000000000000000000000000000000000000000081526020016102a6565b34801561038a575f80fd5b506102be610399366004611995565b638b78c6d8600c9081525f91909152602090205490565b3480156103bb575f80fd5b506102df6103ca366004611933565b610857565b3480156103da575f80fd5b506003546103fb9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102a6565b34801561042b575f80fd5b506102df61043a3660046119f8565b610913565b34801561044a575f80fd5b506102df610459366004611aa2565b610a0d565b348015610469575f80fd5b5061047d610478366004611aa2565b610d5f565b6040805192835273ffffffffffffffffffffffffffffffffffffffff9091166020830152016102a6565b6102df6104b536600461196b565b610ec1565b3480156104c5575f80fd5b506104d96104d4366004611aa2565b610ed3565b6040516102a69190611b2d565b3480156104f1575f80fd5b5061029a61050036600461196b565b638b78c6d8600c9081525f9290925260209091205416151590565b6102df610fbc565b34801561052e575f80fd5b506102be60065481565b6102df610ff5565b34801561054b575f80fd5b506102be600281565b34801561055f575f80fd5b506007546008546009546105bb9260ff908116929163ffffffff81169173ffffffffffffffffffffffffffffffffffffffff64010000000083041691780100000000000000000000000000000000000000000000000090041685565b6040516102a6959493929190611b7c565b3480156105d7575f80fd5b50638b78c6d819546103fb565b3480156105ef575f80fd5b506102be60025481565b348015610604575f80fd5b5061060d611008565b6040516102a69190611c35565b348015610625575f80fd5b5061029a610634366004611c43565b6110f7565b348015610644575f80fd5b506102df6106533660046119f8565b611328565b348015610663575f80fd5b506006546102be565b348015610677575f80fd5b5061029a610686366004611995565b60016020525f908152604090205460ff1681565b3480156106a5575f80fd5b506102be60055481565b3480156106ba575f80fd5b5061029a6106c9366004611c43565b6113c6565b3480156106d9575f80fd5b506102df6106e83660046119f8565b6113dc565b3480156106f8575f80fd5b506102be60045481565b34801561070d575f80fd5b506102be600181565b6102df610724366004611995565b61147a565b6102df610737366004611995565b6114b4565b348015610747575f80fd5b5061029a610756366004611995565b6114da565b348015610766575f80fd5b506102be610775366004611995565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f52b8e45c0000000000000000000000000000000000000000000000000000000014806107e157506107e182611539565b92915050565b6107f1338261158e565b50565b6107fc611599565b61080682826115b3565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b6001610862816115bf565b815f0361089b576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003546108c09073ffffffffffffffffffffffffffffffffffffffff163330856115f0565b8160025f8282546108d19190611cc1565b909155505060408051338152602081018490527fa64c2da41decbd538f8629e54c8fa0b7362c9102b691386a0fb6a1797454e9c6910160405180910390a15050565b600261091e816115bf565b838214610957576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610a05575f84848381811061097457610974611cd4565b90506020020160208101906109899190611d01565b90508015156001036109cb576109c68787848181106109aa576109aa611cd4565b90506020020160208101906109bf9190611995565b60016115b3565b6109fc565b6109fc8787848181106109e0576109e0611cd4565b90506020020160208101906109f59190611995565b600161158e565b50600101610959565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011328054600382558015610a5e5760018160011c14303b10610a555763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f610a6c83850185611db5565b805160208201516040830151606084015160808501519495509293919290915f839003610ac5576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610ae673ffffffffffffffffffffffffffffffffffffffff871630611652565b905083811015610b4f5786516040517f5c54305e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018290526044810185905260640160405180910390fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff88161790555f8581556002859055600684905560055581516007805484929082907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018381811115610be057610be0611b3f565b021790555060208201516001808301919091556040830151600283018054606086015173ffffffffffffffffffffffffffffffffffffffff16640100000000027fffffffffffffffff00000000000000000000000000000000000000000000000090911663ffffffff90931692909217919091178082556080850151927fffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffff909116907801000000000000000000000000000000000000000000000000908490811115610cae57610cae611b3f565b0217905550905050610cbf33611685565b610cca3360016116cd565b8573ffffffffffffffffffffffffffffffffffffffff167f742256c25dbd8c1cb315d87101bae0f6fc7656686d10d32d27fc2765ce9ccb9c86868686604051610d169493929190611ea0565b60405180910390a2505050505050508015610d5a576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806001610d6c816115bf565b5f610d7985870187611f75565b90505f8160200151806020019051810190610d949190611ff4565b90508060025f828254610da7919061200b565b90915550508151600354610dd49173ffffffffffffffffffffffffffffffffffffffff909116908361170e565b81516003546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529183901b90911660348201526048810183905273ffffffffffffffffffffffffffffffffffffffff909116907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610e9291611b2d565b60405180910390a260035490945073ffffffffffffffffffffffffffffffffffffffff16925050509250929050565b610ec9611599565b610806828261158e565b60605f80610ee38486018661201e565b9250509150604051806080016040528060016002811115610f0657610f06611b3f565b81526020018373ffffffffffffffffffffffffffffffffffffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff168152602001604051806020016040528084815250604051602001610f659151815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152915251610fa39190602001612050565b6040516020818303038152906040529250505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610ffd611599565b6110065f611761565b565b6040805160a0810182525f808252602082018190529181018290526060810182905260808101919091526040805160a0810190915260078054829060ff16600181111561105757611057611b3f565b600181111561106857611068611b3f565b81526001828101546020830152600283015463ffffffff81166040840152640100000000810473ffffffffffffffffffffffffffffffffffffffff1660608401526080909201917801000000000000000000000000000000000000000000000000900460ff16908111156110de576110de611b3f565b60018111156110ef576110ef611b3f565b905250919050565b5f611100611599565b5f61110d838501856120c6565b90505f81602001518060200190518101906111289190611ff4565b90505f6111386002546005541090565b61116e576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f545f0361117d5750806111a0565b670de0b6b3a7640000825f546111939190612143565b61119d919061215a565b90505b600654158015906111b2575060065481115b156111bc57506006545b600254816005546111cd9190611cc1565b1115611205576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060055f8282546112169190611cc1565b92505081905550600160045f82825461122f9190611cc1565b90915550506003546112589073ffffffffffffffffffffffffffffffffffffffff16888361170e565b6003546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529189901b90911660348201526048810182905273ffffffffffffffffffffffffffffffffffffffff8816907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261131391611b2d565b60405180910390a25060019695505050505050565b6002611333816115bf565b83821461136c576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610a05576113be86868381811061138b5761138b611cd4565b90506020020160208101906113a09190611995565b8585848181106113b2576113b2611cd4565b905060200201356115b3565b60010161136e565b5f6113d46002546005541090565b949350505050565b60026113e7816115bf565b838214611420576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610a055761147286868381811061143f5761143f611cd4565b90506020020160208101906114549190611995565b85858481811061146657611466611cd4565b9050602002013561158e565b600101611422565b611482611599565b63389a75e1600c52805f526020600c2080544211156114a857636f5e88185f526004601cfd5b5f90556107f181611761565b6114bc611599565b8060601b6114d157637448fbae5f526004601cfd5b6107f181611761565b5f8173ffffffffffffffffffffffffffffffffffffffff166114ff638b78c6d8195490565b73ffffffffffffffffffffffffffffffffffffffff1614806107e15750638b78c6d8600c9081525f839052602090205460031615156107e1565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f903181110000000000000000000000000000000000000000000000000000000014806107e157506107e1826117ab565b61080682825f611800565b638b78c6d819543314611006576382b429005f526004601cfd5b61080682826001611800565b638b78c6d8195433146107f157638b78c6d8600c52335f52806020600c2054166107f1576382b429005f526004601cfd5b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af18060015f51141661164457803d873b15171061164457637939f4245f526004601cfd5b505f60605260405250505050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b73ffffffffffffffffffffffffffffffffffffffff16638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af18060015f51141661175757803d853b151710611757576390b8ec185f526004601cfd5b505f603452505050565b638b78c6d819805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa92167050000000000000000000000000000000000000000000000000000000014806107e157506107e182611857565b638b78c6d8600c52825f526020600c20805483811783611821575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d0000000000000000000000000000000000000000000000000000000014806107e157507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146107e1565b5f602082840312156118fd575f80fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461192c575f80fd5b9392505050565b5f60208284031215611943575f80fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff811681146107f1575f80fd5b5f806040838503121561197c575f80fd5b82356119878161194a565b946020939093013593505050565b5f602082840312156119a5575f80fd5b813561192c8161194a565b5f8083601f8401126119c0575f80fd5b50813567ffffffffffffffff8111156119d7575f80fd5b6020830191508360208260051b85010111156119f1575f80fd5b9250929050565b5f805f8060408587031215611a0b575f80fd5b843567ffffffffffffffff811115611a21575f80fd5b611a2d878288016119b0565b909550935050602085013567ffffffffffffffff811115611a4c575f80fd5b611a58878288016119b0565b95989497509550505050565b5f8083601f840112611a74575f80fd5b50813567ffffffffffffffff811115611a8b575f80fd5b6020830191508360208285010111156119f1575f80fd5b5f8060208385031215611ab3575f80fd5b823567ffffffffffffffff811115611ac9575f80fd5b611ad585828601611a64565b90969095509350505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f61192c6020830184611ae1565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600281106107f1576107f1611b3f565b60a08101611b8987611b6c565b86825285602083015263ffffffff8516604083015273ffffffffffffffffffffffffffffffffffffffff84166060830152611bc383611b6c565b8260808301529695505050505050565b8051611bde81611b6c565b808352506020810151602083015263ffffffff604082015116604083015273ffffffffffffffffffffffffffffffffffffffff60608201511660608301526080810151611c2a81611b6c565b806080840152505050565b60a081016107e18284611bd3565b5f805f60408486031215611c55575f80fd5b8335611c608161194a565b9250602084013567ffffffffffffffff811115611c7b575f80fd5b611c8786828701611a64565b9497909650939450505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808201808211156107e1576107e1611c94565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f60208284031215611d11575f80fd5b8135801515811461192c575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405160a0810167ffffffffffffffff81118282101715611d7057611d70611d20565b60405290565b6040805190810167ffffffffffffffff81118282101715611d7057611d70611d20565b600281106107f1575f80fd5b8035611db081611d99565b919050565b5f81830361012081128015611dc8575f80fd5b50611dd1611d4d565b8335611ddc8161194a565b815260208481013590820152604080850135908201526060808501359082015260a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8083011215611e2b575f80fd5b611e33611d4d565b91506080840135611e4381611d99565b825260a0840135602083015260c084013563ffffffff81168114611e65575f80fd5b604083015260e0840135611e788161194a565b6060830152611e8a6101008501611da5565b6080830152816080820152809250505092915050565b84815260208101849052604081018390526101008101611ec36060830184611bd3565b95945050505050565b5f82601f830112611edb575f80fd5b813567ffffffffffffffff811115611ef557611ef5611d20565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff81118282101715611f4257611f42611d20565b604052818152838201602001851015611f59575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60208284031215611f85575f80fd5b813567ffffffffffffffff811115611f9b575f80fd5b820160408185031215611fac575f80fd5b611fb4611d76565b8135611fbf8161194a565b8152602082013567ffffffffffffffff811115611fda575f80fd5b611fe686828501611ecc565b602083015250949350505050565b5f60208284031215612004575f80fd5b5051919050565b818103818111156107e1576107e1611c94565b5f805f60608486031215612030575f80fd5b833561203b8161194a565b95602085013595506040909401359392505050565b602081525f82516003811061206757612067611b3f565b8060208401525073ffffffffffffffffffffffffffffffffffffffff602084015116604083015273ffffffffffffffffffffffffffffffffffffffff604084015116606083015260608301516080808401526113d460a0840182611ae1565b5f602082840312156120d6575f80fd5b813567ffffffffffffffff8111156120ec575f80fd5b8201604081850312156120fd575f80fd5b612105611d76565b813567ffffffffffffffff81111561211b575f80fd5b61212786828501611ecc565b825250602082013567ffffffffffffffff811115611fda575f80fd5b80820281158282048414176107e1576107e1611c94565b5f8261218d577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b50049056fea264697066735822122069f0df25d1ca7c14d80738715391c4a4b217c6b7362908da91c6fbdcc629bf6364736f6c634300081a0033", p = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_BOOST_MAINNET_SIGNER_EOA: "0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480", VITE_BOOST_TESTNET_SIGNER_EOA: "0xd63167e9db11B108940b2E8236581F961f33f396" }, y = class y extends M {
1
+ import { f as y, b6 as C, b7 as v } from "../generated-krkFnwbV.js";
2
+ import { getTransactionReceipt as E, getTransaction as R } from "@wagmi/core";
3
+ import { decodeAbiParameters as T, parseEther as x, parseEventLogs as V, decodeFunctionData as N, encodeAbiParameters as D, zeroHash as _, zeroAddress as B } from "viem";
4
+ import { c as S } from "../deployments-Dw5Suk_D.js";
5
+ import { SignatureType as g, decodeAndReorderLogArgs as O, getScalarValue as s, ValueType as P } from "../Actions/EventAction.js";
6
+ import { IncentiveCriteriaNotFoundError as $, DecodedArgsError as u, NoMatchingLogsError as h, InvalidCriteriaTypeError as F } from "../errors.js";
7
+ import { CheatCodes as w } from "../utils.js";
8
+ import { ERC20VariableIncentive as G } from "./ERC20VariableIncentive.js";
9
+ const L = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6121c8806100895f395ff3fe608060405260043610610277575f3560e01c8063715018a61161014b578063c884ef83116100c6578063ec87621c1161007c578063f2fde38b11610062578063f2fde38b14610729578063fe9fbb801461073c578063fee81cf41461075b575f80fd5b8063ec87621c14610702578063f04e283e14610716575f80fd5b8063db09da12116100ac578063db09da12146106af578063dcc21361146106ce578063dcc59b6f146106ed575f80fd5b8063c884ef831461066c578063d54ad2a11461069a575f80fd5b8063a4d66daf1161011b578063bb1757cf11610101578063bb1757cf1461061a578063be4994f814610639578063c213f3f914610658575f80fd5b8063a4d66daf146105e4578063a871ced2146105f9575f80fd5b8063715018a61461053857806375b238fc1461054057806377548687146105545780638da5cb5b146105cc575f80fd5b806330db555f116101f55780634a4ee7b1116101ab578063514e62fc11610191578063514e62fc146104e657806354d1f13d1461051b57806366a78e6c14610523575f80fd5b80634a4ee7b1146104a75780634e7165a2146104ba575f80fd5b80634359d28a116101db5780634359d28a14610420578063439fab911461043f578063474f5a441461045e575f80fd5b806330db555f146103b057806338d52e0f146103cf575f80fd5b80631cd64df41161024a5780632569296211610230578063256929621461033d57806328d6183b146103455780632de948071461037f575f80fd5b80631cd64df4146102f4578063228cb73314610329575f80fd5b806301ffc9a71461027b57806307621eca146102af578063183a4f6e146102cc5780631c10893f146102e1575b5f80fd5b348015610286575f80fd5b5061029a6102953660046118ed565b61078c565b60405190151581526020015b60405180910390f35b3480156102ba575f80fd5b505f545b6040519081526020016102a6565b6102df6102da366004611933565b6107e7565b005b6102df6102ef36600461196b565b6107f4565b3480156102ff575f80fd5b5061029a61030e36600461196b565b638b78c6d8600c9081525f9290925260209091205481161490565b348015610334575f80fd5b506102be5f5481565b6102df61080a565b348015610350575f80fd5b506040517f52b8e45c0000000000000000000000000000000000000000000000000000000081526020016102a6565b34801561038a575f80fd5b506102be610399366004611995565b638b78c6d8600c9081525f91909152602090205490565b3480156103bb575f80fd5b506102df6103ca366004611933565b610857565b3480156103da575f80fd5b506003546103fb9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102a6565b34801561042b575f80fd5b506102df61043a3660046119f8565b610913565b34801561044a575f80fd5b506102df610459366004611aa2565b610a0d565b348015610469575f80fd5b5061047d610478366004611aa2565b610d5f565b6040805192835273ffffffffffffffffffffffffffffffffffffffff9091166020830152016102a6565b6102df6104b536600461196b565b610ec1565b3480156104c5575f80fd5b506104d96104d4366004611aa2565b610ed3565b6040516102a69190611b2d565b3480156104f1575f80fd5b5061029a61050036600461196b565b638b78c6d8600c9081525f9290925260209091205416151590565b6102df610fbc565b34801561052e575f80fd5b506102be60065481565b6102df610ff5565b34801561054b575f80fd5b506102be600281565b34801561055f575f80fd5b506007546008546009546105bb9260ff908116929163ffffffff81169173ffffffffffffffffffffffffffffffffffffffff64010000000083041691780100000000000000000000000000000000000000000000000090041685565b6040516102a6959493929190611b7c565b3480156105d7575f80fd5b50638b78c6d819546103fb565b3480156105ef575f80fd5b506102be60025481565b348015610604575f80fd5b5061060d611008565b6040516102a69190611c35565b348015610625575f80fd5b5061029a610634366004611c43565b6110f7565b348015610644575f80fd5b506102df6106533660046119f8565b611328565b348015610663575f80fd5b506006546102be565b348015610677575f80fd5b5061029a610686366004611995565b60016020525f908152604090205460ff1681565b3480156106a5575f80fd5b506102be60055481565b3480156106ba575f80fd5b5061029a6106c9366004611c43565b6113c6565b3480156106d9575f80fd5b506102df6106e83660046119f8565b6113dc565b3480156106f8575f80fd5b506102be60045481565b34801561070d575f80fd5b506102be600181565b6102df610724366004611995565b61147a565b6102df610737366004611995565b6114b4565b348015610747575f80fd5b5061029a610756366004611995565b6114da565b348015610766575f80fd5b506102be610775366004611995565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f52b8e45c0000000000000000000000000000000000000000000000000000000014806107e157506107e182611539565b92915050565b6107f1338261158e565b50565b6107fc611599565b61080682826115b3565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b6001610862816115bf565b815f0361089b576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003546108c09073ffffffffffffffffffffffffffffffffffffffff163330856115f0565b8160025f8282546108d19190611cc1565b909155505060408051338152602081018490527fa64c2da41decbd538f8629e54c8fa0b7362c9102b691386a0fb6a1797454e9c6910160405180910390a15050565b600261091e816115bf565b838214610957576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610a05575f84848381811061097457610974611cd4565b90506020020160208101906109899190611d01565b90508015156001036109cb576109c68787848181106109aa576109aa611cd4565b90506020020160208101906109bf9190611995565b60016115b3565b6109fc565b6109fc8787848181106109e0576109e0611cd4565b90506020020160208101906109f59190611995565b600161158e565b50600101610959565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011328054600382558015610a5e5760018160011c14303b10610a555763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f610a6c83850185611db5565b805160208201516040830151606084015160808501519495509293919290915f839003610ac5576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610ae673ffffffffffffffffffffffffffffffffffffffff871630611652565b905083811015610b4f5786516040517f5c54305e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018290526044810185905260640160405180910390fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff88161790555f8581556002859055600684905560055581516007805484929082907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018381811115610be057610be0611b3f565b021790555060208201516001808301919091556040830151600283018054606086015173ffffffffffffffffffffffffffffffffffffffff16640100000000027fffffffffffffffff00000000000000000000000000000000000000000000000090911663ffffffff90931692909217919091178082556080850151927fffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffff909116907801000000000000000000000000000000000000000000000000908490811115610cae57610cae611b3f565b0217905550905050610cbf33611685565b610cca3360016116cd565b8573ffffffffffffffffffffffffffffffffffffffff167f742256c25dbd8c1cb315d87101bae0f6fc7656686d10d32d27fc2765ce9ccb9c86868686604051610d169493929190611ea0565b60405180910390a2505050505050508015610d5a576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806001610d6c816115bf565b5f610d7985870187611f75565b90505f8160200151806020019051810190610d949190611ff4565b90508060025f828254610da7919061200b565b90915550508151600354610dd49173ffffffffffffffffffffffffffffffffffffffff909116908361170e565b81516003546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529183901b90911660348201526048810183905273ffffffffffffffffffffffffffffffffffffffff909116907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610e9291611b2d565b60405180910390a260035490945073ffffffffffffffffffffffffffffffffffffffff16925050509250929050565b610ec9611599565b610806828261158e565b60605f80610ee38486018661201e565b9250509150604051806080016040528060016002811115610f0657610f06611b3f565b81526020018373ffffffffffffffffffffffffffffffffffffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff168152602001604051806020016040528084815250604051602001610f659151815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152915251610fa39190602001612050565b6040516020818303038152906040529250505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610ffd611599565b6110065f611761565b565b6040805160a0810182525f808252602082018190529181018290526060810182905260808101919091526040805160a0810190915260078054829060ff16600181111561105757611057611b3f565b600181111561106857611068611b3f565b81526001828101546020830152600283015463ffffffff81166040840152640100000000810473ffffffffffffffffffffffffffffffffffffffff1660608401526080909201917801000000000000000000000000000000000000000000000000900460ff16908111156110de576110de611b3f565b60018111156110ef576110ef611b3f565b905250919050565b5f611100611599565b5f61110d838501856120c6565b90505f81602001518060200190518101906111289190611ff4565b90505f6111386002546005541090565b61116e576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f545f0361117d5750806111a0565b670de0b6b3a7640000825f546111939190612143565b61119d919061215a565b90505b600654158015906111b2575060065481115b156111bc57506006545b600254816005546111cd9190611cc1565b1115611205576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060055f8282546112169190611cc1565b92505081905550600160045f82825461122f9190611cc1565b90915550506003546112589073ffffffffffffffffffffffffffffffffffffffff16888361170e565b6003546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529189901b90911660348201526048810182905273ffffffffffffffffffffffffffffffffffffffff8816907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261131391611b2d565b60405180910390a25060019695505050505050565b6002611333816115bf565b83821461136c576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610a05576113be86868381811061138b5761138b611cd4565b90506020020160208101906113a09190611995565b8585848181106113b2576113b2611cd4565b905060200201356115b3565b60010161136e565b5f6113d46002546005541090565b949350505050565b60026113e7816115bf565b838214611420576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610a055761147286868381811061143f5761143f611cd4565b90506020020160208101906114549190611995565b85858481811061146657611466611cd4565b9050602002013561158e565b600101611422565b611482611599565b63389a75e1600c52805f526020600c2080544211156114a857636f5e88185f526004601cfd5b5f90556107f181611761565b6114bc611599565b8060601b6114d157637448fbae5f526004601cfd5b6107f181611761565b5f8173ffffffffffffffffffffffffffffffffffffffff166114ff638b78c6d8195490565b73ffffffffffffffffffffffffffffffffffffffff1614806107e15750638b78c6d8600c9081525f839052602090205460031615156107e1565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f903181110000000000000000000000000000000000000000000000000000000014806107e157506107e1826117ab565b61080682825f611800565b638b78c6d819543314611006576382b429005f526004601cfd5b61080682826001611800565b638b78c6d8195433146107f157638b78c6d8600c52335f52806020600c2054166107f1576382b429005f526004601cfd5b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af18060015f51141661164457803d873b15171061164457637939f4245f526004601cfd5b505f60605260405250505050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b73ffffffffffffffffffffffffffffffffffffffff16638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af18060015f51141661175757803d853b151710611757576390b8ec185f526004601cfd5b505f603452505050565b638b78c6d819805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa92167050000000000000000000000000000000000000000000000000000000014806107e157506107e182611857565b638b78c6d8600c52825f526020600c20805483811783611821575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d0000000000000000000000000000000000000000000000000000000014806107e157507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146107e1565b5f602082840312156118fd575f80fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461192c575f80fd5b9392505050565b5f60208284031215611943575f80fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff811681146107f1575f80fd5b5f806040838503121561197c575f80fd5b82356119878161194a565b946020939093013593505050565b5f602082840312156119a5575f80fd5b813561192c8161194a565b5f8083601f8401126119c0575f80fd5b50813567ffffffffffffffff8111156119d7575f80fd5b6020830191508360208260051b85010111156119f1575f80fd5b9250929050565b5f805f8060408587031215611a0b575f80fd5b843567ffffffffffffffff811115611a21575f80fd5b611a2d878288016119b0565b909550935050602085013567ffffffffffffffff811115611a4c575f80fd5b611a58878288016119b0565b95989497509550505050565b5f8083601f840112611a74575f80fd5b50813567ffffffffffffffff811115611a8b575f80fd5b6020830191508360208285010111156119f1575f80fd5b5f8060208385031215611ab3575f80fd5b823567ffffffffffffffff811115611ac9575f80fd5b611ad585828601611a64565b90969095509350505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f61192c6020830184611ae1565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600281106107f1576107f1611b3f565b60a08101611b8987611b6c565b86825285602083015263ffffffff8516604083015273ffffffffffffffffffffffffffffffffffffffff84166060830152611bc383611b6c565b8260808301529695505050505050565b8051611bde81611b6c565b808352506020810151602083015263ffffffff604082015116604083015273ffffffffffffffffffffffffffffffffffffffff60608201511660608301526080810151611c2a81611b6c565b806080840152505050565b60a081016107e18284611bd3565b5f805f60408486031215611c55575f80fd5b8335611c608161194a565b9250602084013567ffffffffffffffff811115611c7b575f80fd5b611c8786828701611a64565b9497909650939450505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808201808211156107e1576107e1611c94565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f60208284031215611d11575f80fd5b8135801515811461192c575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405160a0810167ffffffffffffffff81118282101715611d7057611d70611d20565b60405290565b6040805190810167ffffffffffffffff81118282101715611d7057611d70611d20565b600281106107f1575f80fd5b8035611db081611d99565b919050565b5f81830361012081128015611dc8575f80fd5b50611dd1611d4d565b8335611ddc8161194a565b815260208481013590820152604080850135908201526060808501359082015260a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8083011215611e2b575f80fd5b611e33611d4d565b91506080840135611e4381611d99565b825260a0840135602083015260c084013563ffffffff81168114611e65575f80fd5b604083015260e0840135611e788161194a565b6060830152611e8a6101008501611da5565b6080830152816080820152809250505092915050565b84815260208101849052604081018390526101008101611ec36060830184611bd3565b95945050505050565b5f82601f830112611edb575f80fd5b813567ffffffffffffffff811115611ef557611ef5611d20565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff81118282101715611f4257611f42611d20565b604052818152838201602001851015611f59575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60208284031215611f85575f80fd5b813567ffffffffffffffff811115611f9b575f80fd5b820160408185031215611fac575f80fd5b611fb4611d76565b8135611fbf8161194a565b8152602082013567ffffffffffffffff811115611fda575f80fd5b611fe686828501611ecc565b602083015250949350505050565b5f60208284031215612004575f80fd5b5051919050565b818103818111156107e1576107e1611c94565b5f805f60608486031215612030575f80fd5b833561203b8161194a565b95602085013595506040909401359392505050565b602081525f82516003811061206757612067611b3f565b8060208401525073ffffffffffffffffffffffffffffffffffffffff602084015116604083015273ffffffffffffffffffffffffffffffffffffffff604084015116606083015260608301516080808401526113d460a0840182611ae1565b5f602082840312156120d6575f80fd5b813567ffffffffffffffff8111156120ec575f80fd5b8201604081850312156120fd575f80fd5b612105611d76565b813567ffffffffffffffff81111561211b575f80fd5b61212786828501611ecc565b825250602082013567ffffffffffffffff811115611fda575f80fd5b80820281158282048414176107e1576107e1611c94565b5f8261218d577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b50049056fea264697066735822122069f0df25d1ca7c14d80738715391c4a4b217c6b7362908da91c6fbdcc629bf6364736f6c634300081a0033", l = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_BOOST_MAINNET_SIGNER_EOA: "0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480", VITE_BOOST_TESTNET_SIGNER_EOA: "0xd63167e9db11B108940b2E8236581F961f33f396" }, p = class p extends G {
10
10
  constructor() {
11
- super(...arguments), this.abi = I;
11
+ super(...arguments), this.abi = y;
12
12
  }
13
13
  /**
14
14
  *Functions from the ERC20VariableIncentive contract
@@ -20,17 +20,17 @@ const U = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
20
20
  * @returns {Promise<IncentiveCriteria>} Incentive criteria structure
21
21
  * @throws {IncentiveCriteriaNotFoundError}
22
22
  */
23
- async getIncentiveCriteria(d) {
23
+ async getIncentiveCriteria(e) {
24
24
  try {
25
25
  return await C(
26
26
  this._config,
27
27
  {
28
- ...d,
28
+ ...e,
29
29
  address: this.assertValidAddress()
30
30
  }
31
31
  );
32
- } catch (c) {
33
- throw new G(c);
32
+ } catch (a) {
33
+ throw new $(a);
34
34
  }
35
35
  }
36
36
  /**
@@ -41,8 +41,8 @@ const U = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
41
41
  * @param {Hex} claimData
42
42
  * @returns {Promise<bigint>} Returns the reward amount from a claim data payload
43
43
  */
44
- async decodeClaimData(d) {
45
- const c = w(
44
+ async decodeClaimData(e) {
45
+ const a = T(
46
46
  [
47
47
  {
48
48
  type: "tuple",
@@ -53,17 +53,17 @@ const U = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
53
53
  ]
54
54
  }
55
55
  ],
56
- d
57
- ), t = w(
56
+ e
57
+ ), t = T(
58
58
  [{ type: "uint256" }],
59
- c[0].incentiveData
59
+ a[0].incentiveData
60
60
  )[0];
61
61
  let b = t;
62
- const [s, f] = await Promise.all([
62
+ const [r, f] = await Promise.all([
63
63
  this.reward(),
64
64
  this.getMaxReward()
65
65
  ]);
66
- return s === 0n || (b = s * t / B("1"), f !== 0n && b > f && (b = f)), b;
66
+ return r === 0n || (b = r * t / x("1"), f !== 0n && b > f && (b = f)), b;
67
67
  }
68
68
  /**
69
69
  * Fetches the IncentiveCriteria struct from the contract
@@ -72,11 +72,11 @@ const U = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
72
72
  * @returns {Promise<IncentiveCriteria>} Incentive criteria structure
73
73
  * @throws {IncentiveCriteriaNotFoundError}
74
74
  */
75
- async getMaxReward(d) {
76
- return await R(
75
+ async getMaxReward(e) {
76
+ return await v(
77
77
  this._config,
78
78
  {
79
- ...d,
79
+ ...e,
80
80
  address: this.assertValidAddress()
81
81
  }
82
82
  );
@@ -89,99 +89,84 @@ const U = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
89
89
  * @returns {Promise<bigint>}
90
90
  * @throws {InvalidCriteriaTypeError | NoMatchingLogsError | DecodedArgsError}
91
91
  */
92
- async getIncentiveScalar({ chainId: d, hash: c, knownSignatures: t, logs: b }, s) {
93
- var E;
94
- const f = await this.getIncentiveCriteria(s);
95
- if (f.criteriaType === m.EVENT) {
96
- const l = t[f.signature];
97
- if (f.fieldIndex === v.GAS_REBATE_INCENTIVE) {
98
- const e = await T(this._config, {
99
- chainId: d,
100
- hash: c
92
+ async getIncentiveScalar({ chainId: e, hash: a, knownSignatures: t, logs: b }, r) {
93
+ var m;
94
+ const f = await this.getIncentiveCriteria(r);
95
+ if (f.criteriaType === g.EVENT) {
96
+ const o = t[f.signature];
97
+ if (f.fieldIndex === w.GAS_REBATE_INCENTIVE) {
98
+ const d = await E(this._config, {
99
+ chainId: e,
100
+ hash: a
101
101
  });
102
- return e.gasUsed * e.effectiveGasPrice + // Normal gas cost
103
- (e.blobGasUsed ?? 0n) * (e.blobGasPrice ?? 0n);
102
+ return d.gasUsed * d.effectiveGasPrice + // Normal gas cost
103
+ (d.blobGasUsed ?? 0n) * (d.blobGasPrice ?? 0n);
104
104
  }
105
105
  if (b && b.length > 0)
106
106
  try {
107
- const e = b.filter((a) => a.topics && a.topics[0] === f.signature).map((a) => P(l, a));
108
- if (e.length > 0)
109
- for (const a of e) {
110
- if (u(f.fieldIndex))
111
- return g(
112
- a.args,
107
+ const d = b.filter((c) => c.topics && c.topics[0] === f.signature).map((c) => O(o, c));
108
+ if (d.length > 0)
109
+ for (const c of d)
110
+ try {
111
+ return s(
112
+ c.args,
113
113
  f.fieldIndex
114
114
  );
115
- const n = a.args ? a.args[f.fieldIndex] : void 0;
116
- if (n !== void 0)
117
- return BigInt(n);
118
- }
119
- } catch (e) {
120
- throw new i(
121
- `An error occurred while extracting scalar from logs: ${e.message}`
115
+ } catch {
116
+ continue;
117
+ }
118
+ } catch (d) {
119
+ throw new u(
120
+ `An error occurred while extracting scalar from logs: ${d.message}`
122
121
  );
123
122
  }
124
- const r = (await T(this._config, {
125
- chainId: d,
126
- hash: c
123
+ const i = (await E(this._config, {
124
+ chainId: e,
125
+ hash: a
127
126
  })).logs;
128
- if (r.length === 0)
127
+ if (i.length === 0)
129
128
  throw new h(
130
129
  `No logs found for event signature ${f.signature}`
131
130
  );
132
131
  try {
133
- const e = t[f.signature], a = D({
134
- abi: [e],
135
- logs: r
132
+ const d = t[f.signature], c = V({
133
+ abi: [d],
134
+ logs: i
136
135
  });
137
- if (a == null || a.length === 0)
136
+ if (c == null || c.length === 0)
138
137
  throw new h(
139
138
  `No logs found for event signature ${f.signature}`
140
139
  );
141
- if (u(f.fieldIndex))
142
- return g(
143
- (E = a[0]) == null ? void 0 : E.args,
144
- f.fieldIndex
145
- );
146
- const n = a[0] && a[0].args ? a[0].args[f.fieldIndex] : void 0;
147
- if (n === void 0)
148
- throw new i(
149
- `Decoded argument at index ${f.fieldIndex} is undefined`
150
- );
151
- return BigInt(n);
152
- } catch (e) {
153
- throw new i(
154
- `Failed to decode event log for signature ${f.signature}: ${e.message}`
140
+ return s(
141
+ (m = c[0]) == null ? void 0 : m.args,
142
+ f.fieldIndex
143
+ );
144
+ } catch (d) {
145
+ throw new u(
146
+ `Failed to decode event log for signature ${f.signature}: ${d.message}`
155
147
  );
156
148
  }
157
- } else if (f.criteriaType === m.FUNC) {
158
- const l = await V(this._config, {
159
- chainId: d,
160
- hash: c
149
+ } else if (f.criteriaType === g.FUNC) {
150
+ const o = await R(this._config, {
151
+ chainId: e,
152
+ hash: a
161
153
  });
162
154
  try {
163
- const o = t[f.signature], r = N({
164
- abi: [o],
165
- data: l.input
155
+ const n = t[f.signature], i = N({
156
+ abi: [n],
157
+ data: o.input
166
158
  });
167
- if (u(f.fieldIndex))
168
- return g(
169
- r.args,
170
- f.fieldIndex
171
- );
172
- const e = r.args[f.fieldIndex];
173
- if (e == null)
174
- throw new i(
175
- `Decoded argument at index ${f.fieldIndex} is undefined`
176
- );
177
- return BigInt(e);
178
- } catch (o) {
179
- throw new i(
180
- `Failed to decode function data for signature ${f.signature}: ${o.message}`
159
+ return s(
160
+ i.args,
161
+ f.fieldIndex
162
+ );
163
+ } catch (n) {
164
+ throw new u(
165
+ `Failed to decode function data for signature ${f.signature}: ${n.message}`
181
166
  );
182
167
  }
183
168
  } else
184
- throw new L(
169
+ throw new F(
185
170
  `Invalid criteria type ${f.criteriaType}`
186
171
  );
187
172
  }
@@ -193,43 +178,43 @@ const U = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
193
178
  * @param {?DeployableOptions} [_options]
194
179
  * @returns {GenericDeployableParams}
195
180
  */
196
- buildParameters(d, c) {
181
+ buildParameters(e, a) {
197
182
  const [t, b] = this.validateDeploymentConfig(
198
- d,
199
- c
183
+ e,
184
+ a
200
185
  );
201
186
  return {
202
- abi: I,
203
- bytecode: U,
204
- args: [z(t)],
187
+ abi: y,
188
+ bytecode: L,
189
+ args: [M(t)],
205
190
  ...this.optionallyAttachAccount(b.account)
206
191
  };
207
192
  }
208
193
  };
209
- y.bases = {
210
- ...p != null && p.VITE_ERC20_VARIABLE_CRITERIA_INCENTIVE_V2_BASE ? {
194
+ p.bases = {
195
+ ...l != null && l.VITE_ERC20_VARIABLE_CRITERIA_INCENTIVE_V2_BASE ? {
211
196
  31337: void 0
212
197
  } : {},
213
- ...F
198
+ ...S
214
199
  };
215
- let x = y;
216
- function Y() {
200
+ let I = p;
201
+ function Q() {
217
202
  return {
218
- criteriaType: m.EVENT,
219
- signature: S,
220
- fieldIndex: v.GAS_REBATE_INCENTIVE,
221
- targetContract: $,
222
- valueType: O.WAD
203
+ criteriaType: g.EVENT,
204
+ signature: _,
205
+ fieldIndex: w.GAS_REBATE_INCENTIVE,
206
+ targetContract: B,
207
+ valueType: P.WAD
223
208
  };
224
209
  }
225
- function z({
210
+ function M({
226
211
  asset: A,
227
- reward: d,
228
- limit: c,
212
+ reward: e,
213
+ limit: a,
229
214
  maxReward: t = 0n,
230
215
  criteria: b
231
216
  }) {
232
- return _(
217
+ return D(
233
218
  [
234
219
  {
235
220
  type: "tuple",
@@ -256,8 +241,8 @@ function z({
256
241
  [
257
242
  {
258
243
  asset: A,
259
- reward: d,
260
- limit: c,
244
+ reward: e,
245
+ limit: a,
261
246
  maxReward: t,
262
247
  criteria: {
263
248
  criteriaType: b.criteriaType,
@@ -271,9 +256,9 @@ function z({
271
256
  );
272
257
  }
273
258
  export {
274
- x as ERC20VariableCriteriaIncentiveV2,
275
- I as erc20VariableCriteriaIncentiveV2Abi,
276
- Y as gasRebateIncentiveCriteriaV2,
277
- z as prepareERC20VariableCriteriaIncentiveV2Payload
259
+ I as ERC20VariableCriteriaIncentiveV2,
260
+ y as erc20VariableCriteriaIncentiveV2Abi,
261
+ Q as gasRebateIncentiveCriteriaV2,
262
+ M as prepareERC20VariableCriteriaIncentiveV2Payload
278
263
  };
279
264
  //# sourceMappingURL=ERC20VariableCriteriaIncentiveV2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ERC20VariableCriteriaIncentiveV2.js","sources":["../../src/Incentives/ERC20VariableCriteriaIncentiveV2.ts"],"sourcesContent":["import {\n erc20VariableCriteriaIncentiveV2Abi,\n readErc20VariableCriteriaIncentiveV2GetIncentiveCriteria,\n readErc20VariableCriteriaIncentiveV2GetMaxReward,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/ERC20VariableCriteriaIncentiveV2.sol/ERC20VariableCriteriaIncentiveV2.json';\nimport { getTransaction, getTransactionReceipt } from '@wagmi/core';\nimport {\n type AbiEvent,\n type AbiFunction,\n type Address,\n type GetLogsReturnType,\n type Hex,\n decodeAbiParameters,\n decodeFunctionData,\n encodeAbiParameters,\n parseEther,\n parseEventLogs,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport { ERC20VariableCriteriaIncentiveV2 as ERC20VariableCriteriaIncentiveV2Bases } from '../../dist/deployments.json';\nimport {\n SignatureType,\n ValueType,\n decodeAndReorderLogArgs,\n getScalarValueFromTuple,\n isCriteriaFieldIndexTuple,\n} from '../Actions/EventAction';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport {\n DecodedArgsError,\n IncentiveCriteriaNotFoundError,\n InvalidCriteriaTypeError,\n NoMatchingLogsError,\n} from '../errors';\nimport { CheatCodes, type ReadParams } from '../utils';\nimport { ERC20VariableIncentive } from './ERC20VariableIncentive';\n\nexport { erc20VariableCriteriaIncentiveV2Abi };\n\nexport interface ERC20VariableCriteriaIncentiveV2Payload {\n /**\n * The address of the incentivized asset.\n *\n * @type {Address}\n */\n asset: Address;\n /**\n * The amount of the asset to distribute as reward.\n *\n * @type {bigint}\n */\n reward: bigint;\n /**\n * The total spending limit of the asset that will be distributed.\n *\n * @type {bigint}\n */\n limit: bigint;\n /**\n * The total amount claimable in a single claim or maximum per-action reward.\n *\n * @type {bigint}\n * @optional\n */\n maxReward?: bigint;\n /**\n * The criteria for the incentive that determines how the reward is distributed.\n *\n * @type {IncentiveCriteria}\n */\n criteria: IncentiveCriteriaV2;\n}\n\nexport interface IncentiveCriteriaV2 {\n /**\n * The type of criteria used, either function signature or event signature.\n *\n * @type {SignatureType}\n */\n criteriaType: SignatureType;\n /**\n * The function or event signature used for criteria matching.\n *\n * @type {Hex}\n */\n signature: Hex;\n /**\n * The index of the field from where the scalar value is extracted.\n *\n * @type {number}\n */\n fieldIndex: number;\n /**\n * The address of the contract where the event/function is called/emitted.\n *\n * @type {Address}\n */\n targetContract: Address;\n /**\n * The type of value used for the scalar value (RAW or WAD).\n * - RAW: Raw integer value (e.g., NFT quantity)\n * - WAD: Value with 18 decimals (e.g., token amount)\n *\n * @type {ValueType}\n */\n valueType: ValueType;\n}\n\nexport interface ReadIncentiveCriteriaV2Params extends ReadParams {}\n\nexport interface GetIncentiveScalarV2Params {\n chainId: number;\n hash: Hex;\n knownSignatures: Record<Hex, AbiFunction | AbiEvent>;\n logs?: GetLogsReturnType<AbiEvent, AbiEvent[], true>;\n}\n\n/**\n * Extended ERC20 Variable Criteria Incentive class that fetches incentive criteria and scalar\n *\n * @export\n * @class ERC20VariableCriteriaIncentive\n * @typedef {ERC20VariableCriteriaIncentiveV2}\n * @extends {ERC20VariableIncentive<ERC20VariableCriteriaIncentiveV2Payload, typeof erc20VariableCriteriaIncentiveV2Abi>}\n */\nexport class ERC20VariableCriteriaIncentiveV2 extends ERC20VariableIncentive<\n ERC20VariableCriteriaIncentiveV2Payload,\n typeof erc20VariableCriteriaIncentiveV2Abi,\n Promise<bigint>\n> {\n //@ts-expect-error instantiated correctly\n public override readonly abi = erc20VariableCriteriaIncentiveV2Abi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(import.meta.env?.VITE_ERC20_VARIABLE_CRITERIA_INCENTIVE_V2_BASE\n ? {\n 31337: import.meta.env.VITE_ERC20_VARIABLE_CRITERIA_INCENTIVE_V2_BASE,\n }\n : {}),\n ...(ERC20VariableCriteriaIncentiveV2Bases as Record<number, Address>),\n };\n\n /**\n *Functions from the ERC20VariableIncentive contract\n */\n\n /**\n * Fetches the IncentiveCriteria struct from the contract\n *\n * @param {?ReadParams} [params]\n * @returns {Promise<IncentiveCriteria>} Incentive criteria structure\n * @throws {IncentiveCriteriaNotFoundError}\n */\n public async getIncentiveCriteria(\n params?: ReadParams,\n ): Promise<IncentiveCriteriaV2> {\n try {\n const criteria =\n await readErc20VariableCriteriaIncentiveV2GetIncentiveCriteria(\n this._config,\n {\n ...params,\n address: this.assertValidAddress(),\n },\n );\n\n return criteria;\n } catch (e) {\n throw new IncentiveCriteriaNotFoundError(e as Error);\n }\n }\n\n /**\n * Decodes claim data for the ERC20VariableCriteriaIncentiveV2, returning the claim amount.\n * Useful when deriving amount claimed from logs.\n *\n * @public\n * @param {Hex} claimData\n * @returns {Promise<bigint>} Returns the reward amount from a claim data payload\n */\n public override async decodeClaimData(claimData: Hex) {\n const boostClaimData = decodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'BoostClaimData',\n components: [\n { type: 'bytes', name: 'validatorData' },\n { type: 'bytes', name: 'incentiveData' },\n ],\n },\n ],\n claimData,\n );\n const signedAmount = decodeAbiParameters(\n [{ type: 'uint256' }],\n boostClaimData[0].incentiveData,\n )[0];\n let claimAmount = signedAmount;\n const [reward, maxReward] = await Promise.all([\n this.reward(),\n this.getMaxReward(),\n ]);\n\n if (reward === 0n) {\n return claimAmount;\n } else {\n claimAmount = (reward * signedAmount) / parseEther('1');\n }\n\n if (maxReward !== 0n && claimAmount > maxReward) {\n claimAmount = maxReward;\n }\n\n return claimAmount;\n }\n\n /**\n * Fetches the IncentiveCriteria struct from the contract\n *\n * @param {?ReadParams} [params]\n * @returns {Promise<IncentiveCriteria>} Incentive criteria structure\n * @throws {IncentiveCriteriaNotFoundError}\n */\n public async getMaxReward(params?: ReadParams): Promise<bigint> {\n const maxReward = await readErc20VariableCriteriaIncentiveV2GetMaxReward(\n this._config,\n {\n ...params,\n address: this.assertValidAddress(),\n },\n );\n\n return maxReward;\n }\n\n /**\n * Fetches the incentive scalar from a transaction hash\n *\n * @param {GetIncentiveScalarParams} params\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n * @throws {InvalidCriteriaTypeError | NoMatchingLogsError | DecodedArgsError}\n */\n public async getIncentiveScalar(\n { chainId, hash, knownSignatures, logs }: GetIncentiveScalarV2Params,\n params?: ReadParams,\n ): Promise<bigint> {\n const criteria = await this.getIncentiveCriteria(params);\n if (criteria.criteriaType === SignatureType.EVENT) {\n const eventAbi = knownSignatures[criteria.signature] as AbiEvent;\n\n if (criteria.fieldIndex === CheatCodes.GAS_REBATE_INCENTIVE) {\n const transactionReceipt = await getTransactionReceipt(this._config, {\n chainId,\n hash,\n });\n const totalCost =\n transactionReceipt.gasUsed * transactionReceipt.effectiveGasPrice + // Normal gas cost\n (transactionReceipt.blobGasUsed ?? 0n) *\n (transactionReceipt.blobGasPrice ?? 0n); // Blob gas cost - account for potential undefined values\n return totalCost;\n }\n\n // if logs are provided, use them to extract the scalar\n if (logs && logs.length > 0) {\n try {\n // only check logs that match the criteria signature\n const signatureMatchingLogs = logs\n .filter((log) => log.topics && log.topics[0] === criteria.signature)\n .map((log) => decodeAndReorderLogArgs(eventAbi, log));\n\n if (signatureMatchingLogs.length > 0) {\n for (const log of signatureMatchingLogs) {\n if (isCriteriaFieldIndexTuple(criteria.fieldIndex)) {\n return getScalarValueFromTuple(\n log.args as unknown[],\n criteria.fieldIndex,\n );\n }\n const scalarValue = log.args\n ? (log.args as string[])[criteria.fieldIndex]\n : undefined;\n if (scalarValue !== undefined) {\n return BigInt(scalarValue);\n }\n }\n }\n } catch (e) {\n throw new DecodedArgsError(\n `An error occurred while extracting scalar from logs: ${(e as Error).message}`,\n );\n }\n }\n\n const transactionReceipt = await getTransactionReceipt(this._config, {\n chainId,\n hash,\n });\n const receiptLogs = transactionReceipt.logs;\n\n if (receiptLogs.length === 0) {\n throw new NoMatchingLogsError(\n `No logs found for event signature ${criteria.signature}`,\n );\n }\n\n // Decode the event log\n try {\n const eventAbi = knownSignatures[criteria.signature] as AbiEvent;\n const decodedEvents = parseEventLogs({\n abi: [eventAbi],\n logs: receiptLogs,\n });\n if (decodedEvents == undefined || decodedEvents.length === 0) {\n throw new NoMatchingLogsError(\n `No logs found for event signature ${criteria.signature}`,\n );\n }\n\n if (isCriteriaFieldIndexTuple(criteria.fieldIndex)) {\n return getScalarValueFromTuple(\n decodedEvents[0]?.args as unknown[],\n criteria.fieldIndex,\n );\n }\n\n const scalarValue =\n decodedEvents[0] && decodedEvents[0].args\n ? (decodedEvents[0].args as string[])[criteria.fieldIndex]\n : undefined;\n if (scalarValue === undefined) {\n throw new DecodedArgsError(\n `Decoded argument at index ${criteria.fieldIndex} is undefined`,\n );\n }\n return BigInt(scalarValue);\n } catch (e) {\n throw new DecodedArgsError(\n `Failed to decode event log for signature ${criteria.signature}: ${(e as Error).message}`,\n );\n }\n } else if (criteria.criteriaType === SignatureType.FUNC) {\n // Fetch the transaction data\n const transaction = await getTransaction(this._config, {\n chainId,\n hash,\n });\n try {\n // Decode function data\n const func = knownSignatures[criteria.signature] as AbiFunction;\n const decodedFunction = decodeFunctionData({\n abi: [func],\n data: transaction.input,\n });\n\n if (isCriteriaFieldIndexTuple(criteria.fieldIndex)) {\n return getScalarValueFromTuple(\n decodedFunction.args as unknown[],\n criteria.fieldIndex,\n );\n }\n\n const scalarValue = decodedFunction.args[criteria.fieldIndex] as string;\n if (scalarValue === undefined || scalarValue === null) {\n throw new DecodedArgsError(\n `Decoded argument at index ${criteria.fieldIndex} is undefined`,\n );\n }\n return BigInt(scalarValue);\n } catch (e) {\n throw new DecodedArgsError(\n `Failed to decode function data for signature ${criteria.signature}: ${(e as Error).message}`,\n );\n }\n } else {\n throw new InvalidCriteriaTypeError(\n `Invalid criteria type ${criteria.criteriaType}`,\n );\n }\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?ERC20VariableCriteriaIncentiveV2Payload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: ERC20VariableCriteriaIncentiveV2Payload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: erc20VariableCriteriaIncentiveV2Abi,\n bytecode: bytecode as Hex,\n args: [prepareERC20VariableCriteriaIncentiveV2Payload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Creates an IncentiveCriteria object representing a gas rebate incentive.\n * This object defines a variable incentive criteria where the criteria will be the gas spent.\n *\n * The criteria uses a signatureType of EVENT, with a special `fieldIndex` of 255 (using CheatCodes enum), which indicates\n * that the entire gas cost of the transaction will be used as the scalar value. If you don't want to\n * rebate the entire gas cost, you can use a reward value on the incentive..\n *\n * - `criteriaType`: EVENT, indicating it's based on event logs.\n * - `signature`: A zeroed signature (0x0000...0000), matching any event.\n * - `fieldIndex`: 255, indicating the use of transaction gas cost using CheatCodes enum.\n * - `targetContract`: A zeroed address (0x0000...0000), applicable to any contract.\n *\n * @returns {IncentiveCriteria} Returns an IncentiveCriteria object for a gas rebate.\n *\n * @example\n * const incentive = gasRebateIncentiveCriteria();\n * const actionPayload = {\n * criteria: incentive,\n * asset: \"0xAssetAddress\",\n * reward: 0, // Set to zero to rebate the entire gas cost\n * limit: BigInt(1000) // This is the total spend limit for the incentive\n * };\n * deployIncentive(actionPayload);\n */\nexport function gasRebateIncentiveCriteriaV2(): IncentiveCriteriaV2 {\n return {\n criteriaType: SignatureType.EVENT,\n signature: zeroHash,\n fieldIndex: CheatCodes.GAS_REBATE_INCENTIVE,\n targetContract: zeroAddress,\n valueType: ValueType.WAD,\n };\n}\n\n/**\n *\n *\n * @param {InitPayloadExtended} param0\n * @param {Address} param0.asset - The address of the ERC20 asset to incentivize.\n * @param {bigint} param0.reward - The reward amount to distribute per action.\n * @param {bigint} param0.limit - The total limit of the asset distribution.\n * @param {bigint} param0.maxReward - The maximum value claimable from a single completion.\n * @param {IncentiveCriteria} param0.criteria - The incentive criteria for reward distribution.\n * @returns {Hex}\n */\nexport function prepareERC20VariableCriteriaIncentiveV2Payload({\n asset,\n reward,\n limit,\n maxReward = 0n,\n criteria,\n}: ERC20VariableCriteriaIncentiveV2Payload) {\n return encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'initPayloadExtended',\n components: [\n { type: 'address', name: 'asset' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n { type: 'uint256', name: 'maxReward' },\n {\n type: 'tuple',\n name: 'criteria',\n components: [\n { type: 'uint8', name: 'criteriaType' },\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint8', name: 'valueType' },\n ],\n },\n ],\n },\n ],\n [\n {\n asset: asset,\n reward: reward,\n limit: limit,\n maxReward: maxReward,\n criteria: {\n criteriaType: criteria.criteriaType,\n signature: criteria.signature,\n fieldIndex: criteria.fieldIndex,\n targetContract: criteria.targetContract,\n valueType: criteria.valueType,\n },\n },\n ],\n );\n}\n"],"names":["_ERC20VariableCriteriaIncentiveV2","ERC20VariableIncentive","erc20VariableCriteriaIncentiveV2Abi","params","readErc20VariableCriteriaIncentiveV2GetIncentiveCriteria","e","IncentiveCriteriaNotFoundError","claimData","boostClaimData","decodeAbiParameters","signedAmount","claimAmount","reward","maxReward","parseEther","readErc20VariableCriteriaIncentiveV2GetMaxReward","chainId","hash","knownSignatures","logs","criteria","SignatureType","eventAbi","CheatCodes","transactionReceipt","getTransactionReceipt","signatureMatchingLogs","log","decodeAndReorderLogArgs","isCriteriaFieldIndexTuple","getScalarValueFromTuple","scalarValue","DecodedArgsError","receiptLogs","NoMatchingLogsError","decodedEvents","parseEventLogs","_a","transaction","getTransaction","func","decodedFunction","decodeFunctionData","InvalidCriteriaTypeError","_payload","_options","payload","options","bytecode","prepareERC20VariableCriteriaIncentiveV2Payload","__vite_import_meta_env__","ERC20VariableCriteriaIncentiveV2Bases","ERC20VariableCriteriaIncentiveV2","gasRebateIncentiveCriteriaV2","zeroHash","zeroAddress","ValueType","asset","limit","encodeAbiParameters"],"mappings":";;;;;;;;m5iBAkIaA,IAAN,MAAMA,UAAyCC,EAIpD;AAAA,EAJK,cAAA;AAAA,UAAA,GAAA,SAAA,GAML,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA4B/B,MAAa,qBACXC,GAC8B;AAC1B,QAAA;AAUK,aARL,MAAMC;AAAAA,QACJ,KAAK;AAAA,QACL;AAAA,UACE,GAAGD;AAAA,UACH,SAAS,KAAK,mBAAmB;AAAA,QACnC;AAAA,MAAA;AAAA,aAIGE,GAAG;AACJ,YAAA,IAAIC,EAA+BD,CAAU;AAAA,IACrD;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAsB,gBAAgBE,GAAgB;AACpD,UAAMC,IAAiBC;AAAA,MACrB;AAAA,QACE;AAAA,UACE,MAAM;AAAA,UACN,MAAM;AAAA,UACN,YAAY;AAAA,YACV,EAAE,MAAM,SAAS,MAAM,gBAAgB;AAAA,YACvC,EAAE,MAAM,SAAS,MAAM,gBAAgB;AAAA,UACzC;AAAA,QACF;AAAA,MACF;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A,EAAS;AAAA,UACpB,YAAYA,EAAS;AAAA,UACrB,gBAAgBA,EAAS;AAAA,UACzB,WAAWA,EAAS;AAAA,QACtB;AAAA,MACF;AAAA,IACF;AAAA,EAAA;AAEJ;"}
1
+ {"version":3,"file":"ERC20VariableCriteriaIncentiveV2.js","sources":["../../src/Incentives/ERC20VariableCriteriaIncentiveV2.ts"],"sourcesContent":["import {\n erc20VariableCriteriaIncentiveV2Abi,\n readErc20VariableCriteriaIncentiveV2GetIncentiveCriteria,\n readErc20VariableCriteriaIncentiveV2GetMaxReward,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/ERC20VariableCriteriaIncentiveV2.sol/ERC20VariableCriteriaIncentiveV2.json';\nimport { getTransaction, getTransactionReceipt } from '@wagmi/core';\nimport {\n type AbiEvent,\n type AbiFunction,\n type Address,\n type GetLogsReturnType,\n type Hex,\n decodeAbiParameters,\n decodeFunctionData,\n encodeAbiParameters,\n parseEther,\n parseEventLogs,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport { ERC20VariableCriteriaIncentiveV2 as ERC20VariableCriteriaIncentiveV2Bases } from '../../dist/deployments.json';\nimport {\n SignatureType,\n ValueType,\n decodeAndReorderLogArgs,\n getScalarValue,\n} from '../Actions/EventAction';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport {\n DecodedArgsError,\n IncentiveCriteriaNotFoundError,\n InvalidCriteriaTypeError,\n NoMatchingLogsError,\n} from '../errors';\nimport { CheatCodes, type ReadParams } from '../utils';\nimport { ERC20VariableIncentive } from './ERC20VariableIncentive';\n\nexport { erc20VariableCriteriaIncentiveV2Abi };\n\nexport interface ERC20VariableCriteriaIncentiveV2Payload {\n /**\n * The address of the incentivized asset.\n *\n * @type {Address}\n */\n asset: Address;\n /**\n * The amount of the asset to distribute as reward.\n *\n * @type {bigint}\n */\n reward: bigint;\n /**\n * The total spending limit of the asset that will be distributed.\n *\n * @type {bigint}\n */\n limit: bigint;\n /**\n * The total amount claimable in a single claim or maximum per-action reward.\n *\n * @type {bigint}\n * @optional\n */\n maxReward?: bigint;\n /**\n * The criteria for the incentive that determines how the reward is distributed.\n *\n * @type {IncentiveCriteria}\n */\n criteria: IncentiveCriteriaV2;\n}\n\nexport interface IncentiveCriteriaV2 {\n /**\n * The type of criteria used, either function signature or event signature.\n *\n * @type {SignatureType}\n */\n criteriaType: SignatureType;\n /**\n * The function or event signature used for criteria matching.\n *\n * @type {Hex}\n */\n signature: Hex;\n /**\n * The index of the field from where the scalar value is extracted.\n *\n * @type {number}\n */\n fieldIndex: number;\n /**\n * The address of the contract where the event/function is called/emitted.\n *\n * @type {Address}\n */\n targetContract: Address;\n /**\n * The type of value used for the scalar value (RAW or WAD).\n * - RAW: Raw integer value (e.g., NFT quantity)\n * - WAD: Value with 18 decimals (e.g., token amount)\n *\n * @type {ValueType}\n */\n valueType: ValueType;\n}\n\nexport interface ReadIncentiveCriteriaV2Params extends ReadParams {}\n\nexport interface GetIncentiveScalarV2Params {\n chainId: number;\n hash: Hex;\n knownSignatures: Record<Hex, AbiFunction | AbiEvent>;\n logs?: GetLogsReturnType<AbiEvent, AbiEvent[], true>;\n}\n\n/**\n * Extended ERC20 Variable Criteria Incentive class that fetches incentive criteria and scalar\n *\n * @export\n * @class ERC20VariableCriteriaIncentive\n * @typedef {ERC20VariableCriteriaIncentiveV2}\n * @extends {ERC20VariableIncentive<ERC20VariableCriteriaIncentiveV2Payload, typeof erc20VariableCriteriaIncentiveV2Abi>}\n */\nexport class ERC20VariableCriteriaIncentiveV2 extends ERC20VariableIncentive<\n ERC20VariableCriteriaIncentiveV2Payload,\n typeof erc20VariableCriteriaIncentiveV2Abi,\n Promise<bigint>\n> {\n //@ts-expect-error instantiated correctly\n public override readonly abi = erc20VariableCriteriaIncentiveV2Abi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(import.meta.env?.VITE_ERC20_VARIABLE_CRITERIA_INCENTIVE_V2_BASE\n ? {\n 31337: import.meta.env.VITE_ERC20_VARIABLE_CRITERIA_INCENTIVE_V2_BASE,\n }\n : {}),\n ...(ERC20VariableCriteriaIncentiveV2Bases as Record<number, Address>),\n };\n\n /**\n *Functions from the ERC20VariableIncentive contract\n */\n\n /**\n * Fetches the IncentiveCriteria struct from the contract\n *\n * @param {?ReadParams} [params]\n * @returns {Promise<IncentiveCriteria>} Incentive criteria structure\n * @throws {IncentiveCriteriaNotFoundError}\n */\n public async getIncentiveCriteria(\n params?: ReadParams,\n ): Promise<IncentiveCriteriaV2> {\n try {\n const criteria =\n await readErc20VariableCriteriaIncentiveV2GetIncentiveCriteria(\n this._config,\n {\n ...params,\n address: this.assertValidAddress(),\n },\n );\n\n return criteria;\n } catch (e) {\n throw new IncentiveCriteriaNotFoundError(e as Error);\n }\n }\n\n /**\n * Decodes claim data for the ERC20VariableCriteriaIncentiveV2, returning the claim amount.\n * Useful when deriving amount claimed from logs.\n *\n * @public\n * @param {Hex} claimData\n * @returns {Promise<bigint>} Returns the reward amount from a claim data payload\n */\n public override async decodeClaimData(claimData: Hex) {\n const boostClaimData = decodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'BoostClaimData',\n components: [\n { type: 'bytes', name: 'validatorData' },\n { type: 'bytes', name: 'incentiveData' },\n ],\n },\n ],\n claimData,\n );\n const signedAmount = decodeAbiParameters(\n [{ type: 'uint256' }],\n boostClaimData[0].incentiveData,\n )[0];\n let claimAmount = signedAmount;\n const [reward, maxReward] = await Promise.all([\n this.reward(),\n this.getMaxReward(),\n ]);\n\n if (reward === 0n) {\n return claimAmount;\n } else {\n claimAmount = (reward * signedAmount) / parseEther('1');\n }\n\n if (maxReward !== 0n && claimAmount > maxReward) {\n claimAmount = maxReward;\n }\n\n return claimAmount;\n }\n\n /**\n * Fetches the IncentiveCriteria struct from the contract\n *\n * @param {?ReadParams} [params]\n * @returns {Promise<IncentiveCriteria>} Incentive criteria structure\n * @throws {IncentiveCriteriaNotFoundError}\n */\n public async getMaxReward(params?: ReadParams): Promise<bigint> {\n const maxReward = await readErc20VariableCriteriaIncentiveV2GetMaxReward(\n this._config,\n {\n ...params,\n address: this.assertValidAddress(),\n },\n );\n\n return maxReward;\n }\n\n /**\n * Fetches the incentive scalar from a transaction hash\n *\n * @param {GetIncentiveScalarParams} params\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n * @throws {InvalidCriteriaTypeError | NoMatchingLogsError | DecodedArgsError}\n */\n public async getIncentiveScalar(\n { chainId, hash, knownSignatures, logs }: GetIncentiveScalarV2Params,\n params?: ReadParams,\n ): Promise<bigint> {\n const criteria = await this.getIncentiveCriteria(params);\n if (criteria.criteriaType === SignatureType.EVENT) {\n const eventAbi = knownSignatures[criteria.signature] as AbiEvent;\n\n if (criteria.fieldIndex === CheatCodes.GAS_REBATE_INCENTIVE) {\n const transactionReceipt = await getTransactionReceipt(this._config, {\n chainId,\n hash,\n });\n const totalCost =\n transactionReceipt.gasUsed * transactionReceipt.effectiveGasPrice + // Normal gas cost\n (transactionReceipt.blobGasUsed ?? 0n) *\n (transactionReceipt.blobGasPrice ?? 0n); // Blob gas cost - account for potential undefined values\n return totalCost;\n }\n\n // if logs are provided, use them to extract the scalar\n if (logs && logs.length > 0) {\n try {\n // only check logs that match the criteria signature\n const signatureMatchingLogs = logs\n .filter((log) => log.topics && log.topics[0] === criteria.signature)\n .map((log) => decodeAndReorderLogArgs(eventAbi, log));\n\n if (signatureMatchingLogs.length > 0) {\n for (const log of signatureMatchingLogs) {\n try {\n return getScalarValue(\n log.args as unknown[],\n criteria.fieldIndex,\n );\n } catch {\n continue;\n }\n }\n }\n } catch (e) {\n throw new DecodedArgsError(\n `An error occurred while extracting scalar from logs: ${(e as Error).message}`,\n );\n }\n }\n\n const transactionReceipt = await getTransactionReceipt(this._config, {\n chainId,\n hash,\n });\n const receiptLogs = transactionReceipt.logs;\n\n if (receiptLogs.length === 0) {\n throw new NoMatchingLogsError(\n `No logs found for event signature ${criteria.signature}`,\n );\n }\n\n // Decode the event log\n try {\n const eventAbi = knownSignatures[criteria.signature] as AbiEvent;\n const decodedEvents = parseEventLogs({\n abi: [eventAbi],\n logs: receiptLogs,\n });\n if (decodedEvents == undefined || decodedEvents.length === 0) {\n throw new NoMatchingLogsError(\n `No logs found for event signature ${criteria.signature}`,\n );\n }\n\n return getScalarValue(\n decodedEvents[0]?.args as unknown[],\n criteria.fieldIndex,\n );\n } catch (e) {\n throw new DecodedArgsError(\n `Failed to decode event log for signature ${criteria.signature}: ${(e as Error).message}`,\n );\n }\n } else if (criteria.criteriaType === SignatureType.FUNC) {\n // Fetch the transaction data\n const transaction = await getTransaction(this._config, {\n chainId,\n hash,\n });\n try {\n // Decode function data\n const func = knownSignatures[criteria.signature] as AbiFunction;\n const decodedFunction = decodeFunctionData({\n abi: [func],\n data: transaction.input,\n });\n\n return getScalarValue(\n decodedFunction.args as unknown[],\n criteria.fieldIndex,\n );\n } catch (e) {\n throw new DecodedArgsError(\n `Failed to decode function data for signature ${criteria.signature}: ${(e as Error).message}`,\n );\n }\n } else {\n throw new InvalidCriteriaTypeError(\n `Invalid criteria type ${criteria.criteriaType}`,\n );\n }\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?ERC20VariableCriteriaIncentiveV2Payload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: ERC20VariableCriteriaIncentiveV2Payload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: erc20VariableCriteriaIncentiveV2Abi,\n bytecode: bytecode as Hex,\n args: [prepareERC20VariableCriteriaIncentiveV2Payload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Creates an IncentiveCriteria object representing a gas rebate incentive.\n * This object defines a variable incentive criteria where the criteria will be the gas spent.\n *\n * The criteria uses a signatureType of EVENT, with a special `fieldIndex` of 255 (using CheatCodes enum), which indicates\n * that the entire gas cost of the transaction will be used as the scalar value. If you don't want to\n * rebate the entire gas cost, you can use a reward value on the incentive..\n *\n * - `criteriaType`: EVENT, indicating it's based on event logs.\n * - `signature`: A zeroed signature (0x0000...0000), matching any event.\n * - `fieldIndex`: 255, indicating the use of transaction gas cost using CheatCodes enum.\n * - `targetContract`: A zeroed address (0x0000...0000), applicable to any contract.\n *\n * @returns {IncentiveCriteria} Returns an IncentiveCriteria object for a gas rebate.\n *\n * @example\n * const incentive = gasRebateIncentiveCriteria();\n * const actionPayload = {\n * criteria: incentive,\n * asset: \"0xAssetAddress\",\n * reward: 0, // Set to zero to rebate the entire gas cost\n * limit: BigInt(1000) // This is the total spend limit for the incentive\n * };\n * deployIncentive(actionPayload);\n */\nexport function gasRebateIncentiveCriteriaV2(): IncentiveCriteriaV2 {\n return {\n criteriaType: SignatureType.EVENT,\n signature: zeroHash,\n fieldIndex: CheatCodes.GAS_REBATE_INCENTIVE,\n targetContract: zeroAddress,\n valueType: ValueType.WAD,\n };\n}\n\n/**\n *\n *\n * @param {InitPayloadExtended} param0\n * @param {Address} param0.asset - The address of the ERC20 asset to incentivize.\n * @param {bigint} param0.reward - The reward amount to distribute per action.\n * @param {bigint} param0.limit - The total limit of the asset distribution.\n * @param {bigint} param0.maxReward - The maximum value claimable from a single completion.\n * @param {IncentiveCriteria} param0.criteria - The incentive criteria for reward distribution.\n * @returns {Hex}\n */\nexport function prepareERC20VariableCriteriaIncentiveV2Payload({\n asset,\n reward,\n limit,\n maxReward = 0n,\n criteria,\n}: ERC20VariableCriteriaIncentiveV2Payload) {\n return encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'initPayloadExtended',\n components: [\n { type: 'address', name: 'asset' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n { type: 'uint256', name: 'maxReward' },\n {\n type: 'tuple',\n name: 'criteria',\n components: [\n { type: 'uint8', name: 'criteriaType' },\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint8', name: 'valueType' },\n ],\n },\n ],\n },\n ],\n [\n {\n asset: asset,\n reward: reward,\n limit: limit,\n maxReward: maxReward,\n criteria: {\n criteriaType: criteria.criteriaType,\n signature: criteria.signature,\n fieldIndex: criteria.fieldIndex,\n targetContract: criteria.targetContract,\n valueType: criteria.valueType,\n },\n },\n ],\n );\n}\n"],"names":["_ERC20VariableCriteriaIncentiveV2","ERC20VariableIncentive","erc20VariableCriteriaIncentiveV2Abi","params","readErc20VariableCriteriaIncentiveV2GetIncentiveCriteria","e","IncentiveCriteriaNotFoundError","claimData","boostClaimData","decodeAbiParameters","signedAmount","claimAmount","reward","maxReward","parseEther","readErc20VariableCriteriaIncentiveV2GetMaxReward","chainId","hash","knownSignatures","logs","criteria","SignatureType","eventAbi","CheatCodes","transactionReceipt","getTransactionReceipt","signatureMatchingLogs","log","decodeAndReorderLogArgs","getScalarValue","DecodedArgsError","receiptLogs","NoMatchingLogsError","decodedEvents","parseEventLogs","_a","transaction","getTransaction","func","decodedFunction","decodeFunctionData","InvalidCriteriaTypeError","_payload","_options","payload","options","bytecode","prepareERC20VariableCriteriaIncentiveV2Payload","__vite_import_meta_env__","ERC20VariableCriteriaIncentiveV2Bases","ERC20VariableCriteriaIncentiveV2","gasRebateIncentiveCriteriaV2","zeroHash","zeroAddress","ValueType","asset","limit","encodeAbiParameters"],"mappings":";;;;;;;;m5iBAiIaA,IAAN,MAAMA,UAAyCC,EAIpD;AAAA,EAJK,cAAA;AAAA,UAAA,GAAA,SAAA,GAML,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA4B/B,MAAa,qBACXC,GAC8B;AAC1B,QAAA;AAUK,aARL,MAAMC;AAAAA,QACJ,KAAK;AAAA,QACL;AAAA,UACE,GAAGD;AAA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2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../generated-BzLYuFx3.cjs"),c=require("viem"),u=require("../deployments-DimWVnA4.cjs"),h=require("../Deployable/DeployableTarget.cjs"),n=require("../claiming.cjs"),y=require("../utils.cjs"),g="0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b611c81806100895f395ff3fe60806040526004361061020f575f3560e01c806354d1f13d11610117578063d54ad2a1116100ac578063ec87621c1161007c578063f2fde38b11610062578063f2fde38b146105ff578063fe9fbb8014610612578063fee81cf414610631575f80fd5b8063ec87621c146105d8578063f04e283e146105ec575f80fd5b8063d54ad2a114610570578063db09da1214610585578063dcc21361146105a4578063dcc59b6f146105c3575f80fd5b8063a4d66daf116100e7578063a4d66daf146104ef578063bb1757cf14610504578063be4994f814610523578063c884ef8314610542575f80fd5b806354d1f13d146104b3578063715018a6146104bb57806375b238fc146104c35780638da5cb5b146104d7575f80fd5b80632de94807116101a7578063439fab91116101775780634a4ee7b11161015d5780634a4ee7b11461043f5780634e7165a214610452578063514e62fc1461047e575f80fd5b8063439fab91146103d7578063474f5a44146103f6575f80fd5b80632de948071461031757806330db555f1461034857806338d52e0f146103675780634359d28a146103b8575f80fd5b80631cd64df4116101e25780631cd64df41461028c578063228cb733146102c157806325692962146102d557806328d6183b146102dd575f80fd5b806301ffc9a71461021357806307621eca14610247578063183a4f6e146102645780631c10893f14610279575b5f80fd5b34801561021e575f80fd5b5061023261022d36600461153b565b610662565b60405190151581526020015b60405180910390f35b348015610252575f80fd5b505f545b60405190815260200161023e565b610277610272366004611581565b6106bd565b005b6102776102873660046115b9565b6106ca565b348015610297575f80fd5b506102326102a63660046115b9565b638b78c6d8600c9081525f9290925260209091205481161490565b3480156102cc575f80fd5b506102565f5481565b6102776106e0565b3480156102e8575f80fd5b506040517f9031811100000000000000000000000000000000000000000000000000000000815260200161023e565b348015610322575f80fd5b506102566103313660046115e3565b638b78c6d8600c9081525f91909152602090205490565b348015610353575f80fd5b50610277610362366004611581565b61072d565b348015610372575f80fd5b506003546103939073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161023e565b3480156103c3575f80fd5b506102776103d2366004611646565b6107e9565b3480156103e2575f80fd5b506102776103f13660046116f0565b6108e3565b348015610401575f80fd5b506104156104103660046116f0565b610b0d565b6040805192835273ffffffffffffffffffffffffffffffffffffffff90911660208301520161023e565b61027761044d3660046115b9565b610c6f565b34801561045d575f80fd5b5061047161046c3660046116f0565b610c81565b60405161023e919061177b565b348015610489575f80fd5b506102326104983660046115b9565b638b78c6d8600c9081525f9290925260209091205416151590565b610277610d6a565b610277610da3565b3480156104ce575f80fd5b50610256600281565b3480156104e2575f80fd5b50638b78c6d81954610393565b3480156104fa575f80fd5b5061025660025481565b34801561050f575f80fd5b5061023261051e36600461178d565b610db6565b34801561052e575f80fd5b5061027761053d366004611646565b610fcb565b34801561054d575f80fd5b5061023261055c3660046115e3565b60016020525f908152604090205460ff1681565b34801561057b575f80fd5b5061025660055481565b348015610590575f80fd5b5061023261059f36600461178d565b611069565b3480156105af575f80fd5b506102776105be366004611646565b61107f565b3480156105ce575f80fd5b5061025660045481565b3480156105e3575f80fd5b50610256600181565b6102776105fa3660046115e3565b61111d565b61027761060d3660046115e3565b611157565b34801561061d575f80fd5b5061023261062c3660046115e3565b61117d565b34801561063c575f80fd5b5061025661064b3660046115e3565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f903181110000000000000000000000000000000000000000000000000000000014806106b757506106b7826111dc565b92915050565b6106c73382611231565b50565b6106d261123c565b6106dc8282611256565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b600161073881611262565b815f03610771576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003546107969073ffffffffffffffffffffffffffffffffffffffff16333085611293565b8160025f8282546107a7919061180b565b909155505060408051338152602081018490527fa64c2da41decbd538f8629e54c8fa0b7362c9102b691386a0fb6a1797454e9c6910160405180910390a15050565b60026107f481611262565b83821461082d576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b848110156108db575f84848381811061084a5761084a61181e565b905060200201602081019061085f919061184b565b90508015156001036108a15761089c8787848181106108805761088061181e565b905060200201602081019061089591906115e3565b6001611256565b6108d2565b6108d28787848181106108b6576108b661181e565b90506020020160208101906108cb91906115e3565b6001611231565b5060010161082f565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156109345760018160011c14303b1061092b5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f610942838501856118c0565b80516020820151604083015192935090915f81900361098d576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6109ae73ffffffffffffffffffffffffffffffffffffffff8516306112f5565b905081811015610a175784516040517f5c54305e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018290526044810183905260640160405180910390fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86161790555f8381556002839055600555610a6c33611328565b6060850151610a7c816001611370565b604080518581526020810185905273ffffffffffffffffffffffffffffffffffffffff8716917fac711f624f923566afa4d63e74d67927870a724791c9569f0143ddea22657a0d910160405180910390a25050505050508015610b08576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806001610b1a81611262565b5f610b27858701876119dc565b90505f8160200151806020019051810190610b429190611a5b565b90508060025f828254610b559190611a72565b90915550508151600354610b829173ffffffffffffffffffffffffffffffffffffffff90911690836113b1565b81516003546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529183901b90911660348201526048810183905273ffffffffffffffffffffffffffffffffffffffff909116907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610c409161177b565b60405180910390a260035490945073ffffffffffffffffffffffffffffffffffffffff16925050509250929050565b610c7761123c565b6106dc8282611231565b60605f80610c9184860186611a85565b9250509150604051806080016040528060016002811115610cb457610cb4611ab7565b81526020018373ffffffffffffffffffffffffffffffffffffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff168152602001604051806020016040528084815250604051602001610d139151815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152915251610d519190602001611ae4565b6040516020818303038152906040529250505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610dab61123c565b610db45f611404565b565b5f610dbf61123c565b5f610dcc83850185611b7f565b90505f8160200151806020019051810190610de79190611a5b565b90505f610df76002546005541090565b610e2d576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f545f03610e3c575080610e5f565b670de0b6b3a7640000825f54610e529190611bfc565b610e5c9190611c13565b90505b60025481600554610e70919061180b565b1115610ea8576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060055f828254610eb9919061180b565b92505081905550600160045f828254610ed2919061180b565b9091555050600354610efb9073ffffffffffffffffffffffffffffffffffffffff1688836113b1565b6003546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529189901b90911660348201526048810182905273ffffffffffffffffffffffffffffffffffffffff8816907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610fb69161177b565b60405180910390a25060019695505050505050565b6002610fd681611262565b83821461100f576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b848110156108db5761106186868381811061102e5761102e61181e565b905060200201602081019061104391906115e3565b8585848181106110555761105561181e565b90506020020135611256565b600101611011565b5f6110776002546005541090565b949350505050565b600261108a81611262565b8382146110c3576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b848110156108db576111158686838181106110e2576110e261181e565b90506020020160208101906110f791906115e3565b8585848181106111095761110961181e565b90506020020135611231565b6001016110c5565b61112561123c565b63389a75e1600c52805f526020600c20805442111561114b57636f5e88185f526004601cfd5b5f90556106c781611404565b61115f61123c565b8060601b61117457637448fbae5f526004601cfd5b6106c781611404565b5f8173ffffffffffffffffffffffffffffffffffffffff166111a2638b78c6d8195490565b73ffffffffffffffffffffffffffffffffffffffff1614806106b75750638b78c6d8600c9081525f839052602090205460031615156106b7565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa92167050000000000000000000000000000000000000000000000000000000014806106b757506106b78261144e565b6106dc82825f6114e4565b638b78c6d819543314610db4576382b429005f526004601cfd5b6106dc828260016114e4565b638b78c6d8195433146106c757638b78c6d8600c52335f52806020600c2054166106c7576382b429005f526004601cfd5b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af18060015f5114166112e757803d873b1517106112e757637939f4245f526004601cfd5b505f60605260405250505050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b73ffffffffffffffffffffffffffffffffffffffff16638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af18060015f5114166113fa57803d853b1517106113fa576390b8ec185f526004601cfd5b505f603452505050565b638b78c6d819805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d0000000000000000000000000000000000000000000000000000000014806106b757507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146106b7565b638b78c6d8600c52825f526020600c20805483811783611505575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f6020828403121561154b575f80fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461157a575f80fd5b9392505050565b5f60208284031215611591575f80fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff811681146106c7575f80fd5b5f80604083850312156115ca575f80fd5b82356115d581611598565b946020939093013593505050565b5f602082840312156115f3575f80fd5b813561157a81611598565b5f8083601f84011261160e575f80fd5b50813567ffffffffffffffff811115611625575f80fd5b6020830191508360208260051b850101111561163f575f80fd5b9250929050565b5f805f8060408587031215611659575f80fd5b843567ffffffffffffffff81111561166f575f80fd5b61167b878288016115fe565b909550935050602085013567ffffffffffffffff81111561169a575f80fd5b6116a6878288016115fe565b95989497509550505050565b5f8083601f8401126116c2575f80fd5b50813567ffffffffffffffff8111156116d9575f80fd5b60208301915083602082850101111561163f575f80fd5b5f8060208385031215611701575f80fd5b823567ffffffffffffffff811115611717575f80fd5b611723858286016116b2565b90969095509350505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f61157a602083018461172f565b5f805f6040848603121561179f575f80fd5b83356117aa81611598565b9250602084013567ffffffffffffffff8111156117c5575f80fd5b6117d1868287016116b2565b9497909650939450505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808201808211156106b7576106b76117de565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6020828403121561185b575f80fd5b8135801515811461157a575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040805190810167ffffffffffffffff811182821017156118ba576118ba61186a565b60405290565b5f60808284031280156118d1575f80fd5b506040516080810167ffffffffffffffff811182821017156118f5576118f561186a565b604052823561190381611598565b81526020838101359082015260408084013590820152606083013561192781611598565b60608201529392505050565b5f82601f830112611942575f80fd5b813567ffffffffffffffff81111561195c5761195c61186a565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff811182821017156119a9576119a961186a565b6040528181528382016020018510156119c0575f80fd5b816020850160208301375f918101602001919091529392505050565b5f602082840312156119ec575f80fd5b813567ffffffffffffffff811115611a02575f80fd5b820160408185031215611a13575f80fd5b611a1b611897565b8135611a2681611598565b8152602082013567ffffffffffffffff811115611a41575f80fd5b611a4d86828501611933565b602083015250949350505050565b5f60208284031215611a6b575f80fd5b5051919050565b818103818111156106b7576106b76117de565b5f805f60608486031215611a97575f80fd5b8335611aa281611598565b95602085013595506040909401359392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b602081525f825160038110611b20577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b8060208401525073ffffffffffffffffffffffffffffffffffffffff602084015116604083015273ffffffffffffffffffffffffffffffffffffffff6040840151166060830152606083015160808084015261107760a084018261172f565b5f60208284031215611b8f575f80fd5b813567ffffffffffffffff811115611ba5575f80fd5b820160408185031215611bb6575f80fd5b611bbe611897565b813567ffffffffffffffff811115611bd4575f80fd5b611be086828501611933565b825250602082013567ffffffffffffffff811115611a41575f80fd5b80820281158282048414176106b7576106b76117de565b5f82611c46577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b50049056fea264697066735822122010e92bb170bbded5a39d9e31e19c0f4d00c38e9b3db120b41bfca6a48a497d3364736f6c634300081a0033",s={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BOOST_MAINNET_SIGNER_EOA:"0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480",VITE_BOOST_TESTNET_SIGNER_EOA:"0xd63167e9db11B108940b2E8236581F961f33f396"},t=class t extends h.DeployableTarget{constructor(){super(...arguments),this.abi=a.O}async owner(f){return await a.OH(this._config,{address:this.assertValidAddress(),args:[],...f})}async totalClaimed(f){return await a.HH(this._config,{address:this.assertValidAddress(),args:[],...f})}async currentReward(f){return await a.gH(this._config,{address:this.assertValidAddress(),args:[],...f})}async claims(f){return await a.wH(this._config,{address:this.assertValidAddress(),args:[],...f})}async claimed(f,b){return await a.TH(this._config,{address:this.assertValidAddress(),args:[f],...b})}async asset(f){return await a.vH(this._config,{address:this.assertValidAddress(),...f})}async reward(f){return await a.VH(this._config,{address:this.assertValidAddress(),...f})}async limit(f){return await a.RH(this._config,{address:this.assertValidAddress(),...f})}async claim(f,b){return await this.awaitResult(this.claimRaw(f,b))}async claimRaw(f,b){const{request:e,result:d}=await a.XH(this._config,{address:this.assertValidAddress(),args:[n.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...b});return{hash:await a.LH(this._config,e),result:d}}async clawback(f,b){return await this.awaitResult(this.clawbackRaw(f,b))}async clawbackRaw(f,b){const{request:e,result:d}=await a.YH(this._config,{address:this.assertValidAddress(),args:[n.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...b});return{hash:await a.SH(this._config,e),result:d}}async isClaimable(f,b){return await a.MH(this._config,{address:this.assertValidAddress(),args:[f.target,f.data],...b})}async getTotalBudget(f){var b;return((b=this.payload)==null?void 0:b.limit)!==void 0?this.payload.limit:await this.limit(f)}async canBeClaimed(f){return await this.getRemainingClaimPotential(f)>0n}async getRemainingClaimPotential(f){const[b,e]=await Promise.all([this.totalClaimed(f),this.limit(f)]);return e-b}async getTopupPayload(f){return r({asset:await this.asset(),reward:f,manager:c.zeroAddress,limit:1n})}buildClaimData(f){return c.encodeAbiParameters([{type:"uint256",name:"rewardAmount"}],[f])}decodeClaimData(f){return BigInt(c.decodeAbiParameters([{type:"uint256"}],f)[0])}buildClawbackData(f){return c.encodeAbiParameters([{type:"uint256"}],[f])}buildParameters(f,b){const[e,d]=this.validateDeploymentConfig(f,b);return{abi:a.O,bytecode:g,args:[r(e)],...this.optionallyAttachAccount(d.account)}}};t.bases={...s!=null&&s.VITE_ERC20_VARIABLE_INCENTIVE_BASE?{31337:void 0}:{},...u.ERC20VariableIncentive},t.registryType=y.RegistryType.INCENTIVE;let i=t;function r({asset:l,reward:f,limit:b,manager:e}){return c.encodeAbiParameters([{type:"address",name:"asset"},{type:"uint256",name:"reward"},{type:"uint256",name:"limit"},{type:"address",name:"manager"}],[l,f,b,e])}exports.erc20VariableIncentiveAbi=a.O;exports.ERC20VariableIncentive=i;exports.prepareERC20VariableIncentivePayload=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../generated-Cf82M-QP.cjs"),c=require("viem"),u=require("../deployments-DimWVnA4.cjs"),h=require("../Deployable/DeployableTarget.cjs"),n=require("../claiming.cjs"),y=require("../utils.cjs"),g="0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b611c81806100895f395ff3fe60806040526004361061020f575f3560e01c806354d1f13d11610117578063d54ad2a1116100ac578063ec87621c1161007c578063f2fde38b11610062578063f2fde38b146105ff578063fe9fbb8014610612578063fee81cf414610631575f80fd5b8063ec87621c146105d8578063f04e283e146105ec575f80fd5b8063d54ad2a114610570578063db09da1214610585578063dcc21361146105a4578063dcc59b6f146105c3575f80fd5b8063a4d66daf116100e7578063a4d66daf146104ef578063bb1757cf14610504578063be4994f814610523578063c884ef8314610542575f80fd5b806354d1f13d146104b3578063715018a6146104bb57806375b238fc146104c35780638da5cb5b146104d7575f80fd5b80632de94807116101a7578063439fab91116101775780634a4ee7b11161015d5780634a4ee7b11461043f5780634e7165a214610452578063514e62fc1461047e575f80fd5b8063439fab91146103d7578063474f5a44146103f6575f80fd5b80632de948071461031757806330db555f1461034857806338d52e0f146103675780634359d28a146103b8575f80fd5b80631cd64df4116101e25780631cd64df41461028c578063228cb733146102c157806325692962146102d557806328d6183b146102dd575f80fd5b806301ffc9a71461021357806307621eca14610247578063183a4f6e146102645780631c10893f14610279575b5f80fd5b34801561021e575f80fd5b5061023261022d36600461153b565b610662565b60405190151581526020015b60405180910390f35b348015610252575f80fd5b505f545b60405190815260200161023e565b610277610272366004611581565b6106bd565b005b6102776102873660046115b9565b6106ca565b348015610297575f80fd5b506102326102a63660046115b9565b638b78c6d8600c9081525f9290925260209091205481161490565b3480156102cc575f80fd5b506102565f5481565b6102776106e0565b3480156102e8575f80fd5b506040517f9031811100000000000000000000000000000000000000000000000000000000815260200161023e565b348015610322575f80fd5b506102566103313660046115e3565b638b78c6d8600c9081525f91909152602090205490565b348015610353575f80fd5b50610277610362366004611581565b61072d565b348015610372575f80fd5b506003546103939073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161023e565b3480156103c3575f80fd5b506102776103d2366004611646565b6107e9565b3480156103e2575f80fd5b506102776103f13660046116f0565b6108e3565b348015610401575f80fd5b506104156104103660046116f0565b610b0d565b6040805192835273ffffffffffffffffffffffffffffffffffffffff90911660208301520161023e565b61027761044d3660046115b9565b610c6f565b34801561045d575f80fd5b5061047161046c3660046116f0565b610c81565b60405161023e919061177b565b348015610489575f80fd5b506102326104983660046115b9565b638b78c6d8600c9081525f9290925260209091205416151590565b610277610d6a565b610277610da3565b3480156104ce575f80fd5b50610256600281565b3480156104e2575f80fd5b50638b78c6d81954610393565b3480156104fa575f80fd5b5061025660025481565b34801561050f575f80fd5b5061023261051e36600461178d565b610db6565b34801561052e575f80fd5b5061027761053d366004611646565b610fcb565b34801561054d575f80fd5b5061023261055c3660046115e3565b60016020525f908152604090205460ff1681565b34801561057b575f80fd5b5061025660055481565b348015610590575f80fd5b5061023261059f36600461178d565b611069565b3480156105af575f80fd5b506102776105be366004611646565b61107f565b3480156105ce575f80fd5b5061025660045481565b3480156105e3575f80fd5b50610256600181565b6102776105fa3660046115e3565b61111d565b61027761060d3660046115e3565b611157565b34801561061d575f80fd5b5061023261062c3660046115e3565b61117d565b34801561063c575f80fd5b5061025661064b3660046115e3565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f903181110000000000000000000000000000000000000000000000000000000014806106b757506106b7826111dc565b92915050565b6106c73382611231565b50565b6106d261123c565b6106dc8282611256565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b600161073881611262565b815f03610771576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003546107969073ffffffffffffffffffffffffffffffffffffffff16333085611293565b8160025f8282546107a7919061180b565b909155505060408051338152602081018490527fa64c2da41decbd538f8629e54c8fa0b7362c9102b691386a0fb6a1797454e9c6910160405180910390a15050565b60026107f481611262565b83821461082d576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b848110156108db575f84848381811061084a5761084a61181e565b905060200201602081019061085f919061184b565b90508015156001036108a15761089c8787848181106108805761088061181e565b905060200201602081019061089591906115e3565b6001611256565b6108d2565b6108d28787848181106108b6576108b661181e565b90506020020160208101906108cb91906115e3565b6001611231565b5060010161082f565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156109345760018160011c14303b1061092b5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f610942838501856118c0565b80516020820151604083015192935090915f81900361098d576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6109ae73ffffffffffffffffffffffffffffffffffffffff8516306112f5565b905081811015610a175784516040517f5c54305e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018290526044810183905260640160405180910390fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86161790555f8381556002839055600555610a6c33611328565b6060850151610a7c816001611370565b604080518581526020810185905273ffffffffffffffffffffffffffffffffffffffff8716917fac711f624f923566afa4d63e74d67927870a724791c9569f0143ddea22657a0d910160405180910390a25050505050508015610b08576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806001610b1a81611262565b5f610b27858701876119dc565b90505f8160200151806020019051810190610b429190611a5b565b90508060025f828254610b559190611a72565b90915550508151600354610b829173ffffffffffffffffffffffffffffffffffffffff90911690836113b1565b81516003546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529183901b90911660348201526048810183905273ffffffffffffffffffffffffffffffffffffffff909116907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610c409161177b565b60405180910390a260035490945073ffffffffffffffffffffffffffffffffffffffff16925050509250929050565b610c7761123c565b6106dc8282611231565b60605f80610c9184860186611a85565b9250509150604051806080016040528060016002811115610cb457610cb4611ab7565b81526020018373ffffffffffffffffffffffffffffffffffffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff168152602001604051806020016040528084815250604051602001610d139151815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152915251610d519190602001611ae4565b6040516020818303038152906040529250505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610dab61123c565b610db45f611404565b565b5f610dbf61123c565b5f610dcc83850185611b7f565b90505f8160200151806020019051810190610de79190611a5b565b90505f610df76002546005541090565b610e2d576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f545f03610e3c575080610e5f565b670de0b6b3a7640000825f54610e529190611bfc565b610e5c9190611c13565b90505b60025481600554610e70919061180b565b1115610ea8576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060055f828254610eb9919061180b565b92505081905550600160045f828254610ed2919061180b565b9091555050600354610efb9073ffffffffffffffffffffffffffffffffffffffff1688836113b1565b6003546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529189901b90911660348201526048810182905273ffffffffffffffffffffffffffffffffffffffff8816907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610fb69161177b565b60405180910390a25060019695505050505050565b6002610fd681611262565b83821461100f576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b848110156108db5761106186868381811061102e5761102e61181e565b905060200201602081019061104391906115e3565b8585848181106110555761105561181e565b90506020020135611256565b600101611011565b5f6110776002546005541090565b949350505050565b600261108a81611262565b8382146110c3576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b848110156108db576111158686838181106110e2576110e261181e565b90506020020160208101906110f791906115e3565b8585848181106111095761110961181e565b90506020020135611231565b6001016110c5565b61112561123c565b63389a75e1600c52805f526020600c20805442111561114b57636f5e88185f526004601cfd5b5f90556106c781611404565b61115f61123c565b8060601b61117457637448fbae5f526004601cfd5b6106c781611404565b5f8173ffffffffffffffffffffffffffffffffffffffff166111a2638b78c6d8195490565b73ffffffffffffffffffffffffffffffffffffffff1614806106b75750638b78c6d8600c9081525f839052602090205460031615156106b7565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa92167050000000000000000000000000000000000000000000000000000000014806106b757506106b78261144e565b6106dc82825f6114e4565b638b78c6d819543314610db4576382b429005f526004601cfd5b6106dc828260016114e4565b638b78c6d8195433146106c757638b78c6d8600c52335f52806020600c2054166106c7576382b429005f526004601cfd5b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af18060015f5114166112e757803d873b1517106112e757637939f4245f526004601cfd5b505f60605260405250505050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b73ffffffffffffffffffffffffffffffffffffffff16638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af18060015f5114166113fa57803d853b1517106113fa576390b8ec185f526004601cfd5b505f603452505050565b638b78c6d819805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d0000000000000000000000000000000000000000000000000000000014806106b757507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146106b7565b638b78c6d8600c52825f526020600c20805483811783611505575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f6020828403121561154b575f80fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461157a575f80fd5b9392505050565b5f60208284031215611591575f80fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff811681146106c7575f80fd5b5f80604083850312156115ca575f80fd5b82356115d581611598565b946020939093013593505050565b5f602082840312156115f3575f80fd5b813561157a81611598565b5f8083601f84011261160e575f80fd5b50813567ffffffffffffffff811115611625575f80fd5b6020830191508360208260051b850101111561163f575f80fd5b9250929050565b5f805f8060408587031215611659575f80fd5b843567ffffffffffffffff81111561166f575f80fd5b61167b878288016115fe565b909550935050602085013567ffffffffffffffff81111561169a575f80fd5b6116a6878288016115fe565b95989497509550505050565b5f8083601f8401126116c2575f80fd5b50813567ffffffffffffffff8111156116d9575f80fd5b60208301915083602082850101111561163f575f80fd5b5f8060208385031215611701575f80fd5b823567ffffffffffffffff811115611717575f80fd5b611723858286016116b2565b90969095509350505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f61157a602083018461172f565b5f805f6040848603121561179f575f80fd5b83356117aa81611598565b9250602084013567ffffffffffffffff8111156117c5575f80fd5b6117d1868287016116b2565b9497909650939450505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808201808211156106b7576106b76117de565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6020828403121561185b575f80fd5b8135801515811461157a575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040805190810167ffffffffffffffff811182821017156118ba576118ba61186a565b60405290565b5f60808284031280156118d1575f80fd5b506040516080810167ffffffffffffffff811182821017156118f5576118f561186a565b604052823561190381611598565b81526020838101359082015260408084013590820152606083013561192781611598565b60608201529392505050565b5f82601f830112611942575f80fd5b813567ffffffffffffffff81111561195c5761195c61186a565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff811182821017156119a9576119a961186a565b6040528181528382016020018510156119c0575f80fd5b816020850160208301375f918101602001919091529392505050565b5f602082840312156119ec575f80fd5b813567ffffffffffffffff811115611a02575f80fd5b820160408185031215611a13575f80fd5b611a1b611897565b8135611a2681611598565b8152602082013567ffffffffffffffff811115611a41575f80fd5b611a4d86828501611933565b602083015250949350505050565b5f60208284031215611a6b575f80fd5b5051919050565b818103818111156106b7576106b76117de565b5f805f60608486031215611a97575f80fd5b8335611aa281611598565b95602085013595506040909401359392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b602081525f825160038110611b20577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b8060208401525073ffffffffffffffffffffffffffffffffffffffff602084015116604083015273ffffffffffffffffffffffffffffffffffffffff6040840151166060830152606083015160808084015261107760a084018261172f565b5f60208284031215611b8f575f80fd5b813567ffffffffffffffff811115611ba5575f80fd5b820160408185031215611bb6575f80fd5b611bbe611897565b813567ffffffffffffffff811115611bd4575f80fd5b611be086828501611933565b825250602082013567ffffffffffffffff811115611a41575f80fd5b80820281158282048414176106b7576106b76117de565b5f82611c46577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b50049056fea264697066735822122010e92bb170bbded5a39d9e31e19c0f4d00c38e9b3db120b41bfca6a48a497d3364736f6c634300081a0033",s={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BOOST_MAINNET_SIGNER_EOA:"0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480",VITE_BOOST_TESTNET_SIGNER_EOA:"0xd63167e9db11B108940b2E8236581F961f33f396"},t=class t extends h.DeployableTarget{constructor(){super(...arguments),this.abi=a.O}async owner(f){return await a.Wx(this._config,{address:this.assertValidAddress(),args:[],...f})}async totalClaimed(f){return await a.Jx(this._config,{address:this.assertValidAddress(),args:[],...f})}async currentReward(f){return await a.Px(this._config,{address:this.assertValidAddress(),args:[],...f})}async claims(f){return await a.Lx(this._config,{address:this.assertValidAddress(),args:[],...f})}async claimed(f,b){return await a.Fx(this._config,{address:this.assertValidAddress(),args:[f],...b})}async asset(f){return await a.xx(this._config,{address:this.assertValidAddress(),...f})}async reward(f){return await a.jx(this._config,{address:this.assertValidAddress(),...f})}async limit(f){return await a.Ux(this._config,{address:this.assertValidAddress(),...f})}async claim(f,b){return await this.awaitResult(this.claimRaw(f,b))}async claimRaw(f,b){const{request:e,result:d}=await a.bF(this._config,{address:this.assertValidAddress(),args:[n.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...b});return{hash:await a.Yx(this._config,e),result:d}}async clawback(f,b){return await this.awaitResult(this.clawbackRaw(f,b))}async clawbackRaw(f,b){const{request:e,result:d}=await a.fF(this._config,{address:this.assertValidAddress(),args:[n.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...b});return{hash:await a.eF(this._config,e),result:d}}async isClaimable(f,b){return await a.qx(this._config,{address:this.assertValidAddress(),args:[f.target,f.data],...b})}async getTotalBudget(f){var b;return((b=this.payload)==null?void 0:b.limit)!==void 0?this.payload.limit:await this.limit(f)}async canBeClaimed(f){return await this.getRemainingClaimPotential(f)>0n}async getRemainingClaimPotential(f){const[b,e]=await Promise.all([this.totalClaimed(f),this.limit(f)]);return e-b}async getTopupPayload(f){return r({asset:await this.asset(),reward:f,manager:c.zeroAddress,limit:1n})}buildClaimData(f){return c.encodeAbiParameters([{type:"uint256",name:"rewardAmount"}],[f])}decodeClaimData(f){return BigInt(c.decodeAbiParameters([{type:"uint256"}],f)[0])}buildClawbackData(f){return c.encodeAbiParameters([{type:"uint256"}],[f])}buildParameters(f,b){const[e,d]=this.validateDeploymentConfig(f,b);return{abi:a.O,bytecode:g,args:[r(e)],...this.optionallyAttachAccount(d.account)}}};t.bases={...s!=null&&s.VITE_ERC20_VARIABLE_INCENTIVE_BASE?{31337:void 0}:{},...u.ERC20VariableIncentive},t.registryType=y.RegistryType.INCENTIVE;let i=t;function r({asset:l,reward:f,limit:b,manager:e}){return c.encodeAbiParameters([{type:"address",name:"asset"},{type:"uint256",name:"reward"},{type:"uint256",name:"limit"},{type:"address",name:"manager"}],[l,f,b,e])}exports.erc20VariableIncentiveAbi=a.O;exports.ERC20VariableIncentive=i;exports.prepareERC20VariableIncentivePayload=r;
2
2
  //# sourceMappingURL=ERC20VariableIncentive.cjs.map