@boostxyz/sdk 5.0.0 → 5.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/dist/Actions/Action.cjs +1 -1
  2. package/dist/Actions/Action.js +5 -5
  3. package/dist/Actions/EventAction.cjs +1 -1
  4. package/dist/Actions/EventAction.cjs.map +1 -1
  5. package/dist/Actions/EventAction.d.ts +18 -0
  6. package/dist/Actions/EventAction.d.ts.map +1 -1
  7. package/dist/Actions/EventAction.js +201 -132
  8. package/dist/Actions/EventAction.js.map +1 -1
  9. package/dist/AllowLists/AllowList.cjs +1 -1
  10. package/dist/AllowLists/AllowList.js +3 -3
  11. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  12. package/dist/AllowLists/SimpleAllowList.js +8 -8
  13. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  14. package/dist/AllowLists/SimpleDenyList.js +3 -3
  15. package/dist/Auth/PassthroughAuth.cjs +1 -1
  16. package/dist/Auth/PassthroughAuth.js +1 -1
  17. package/dist/BoostCore.cjs +2 -2
  18. package/dist/BoostCore.cjs.map +1 -1
  19. package/dist/BoostCore.d.ts +14 -0
  20. package/dist/BoostCore.d.ts.map +1 -1
  21. package/dist/BoostCore.js +130 -111
  22. package/dist/BoostCore.js.map +1 -1
  23. package/dist/BoostRegistry.cjs +1 -1
  24. package/dist/BoostRegistry.js +6 -6
  25. package/dist/{Budget-fHCvlPfB.js → Budget-C0SMvfEl.js} +53 -53
  26. package/dist/{Budget-fHCvlPfB.js.map → Budget-C0SMvfEl.js.map} +1 -1
  27. package/dist/{Budget-Cnyh81n5.cjs → Budget-N0YEfSt2.cjs} +2 -2
  28. package/dist/{Budget-Cnyh81n5.cjs.map → Budget-N0YEfSt2.cjs.map} +1 -1
  29. package/dist/Budgets/Budget.cjs +1 -1
  30. package/dist/Budgets/Budget.js +3 -3
  31. package/dist/Budgets/ManagedBudget.cjs +1 -1
  32. package/dist/Budgets/ManagedBudget.js +29 -29
  33. package/dist/Deployable/DeployableTarget.cjs +1 -1
  34. package/dist/Deployable/DeployableTarget.js +1 -1
  35. package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
  36. package/dist/Deployable/DeployableTargetWithRBAC.js +15 -15
  37. package/dist/Incentive-DSsxOFKY.js +901 -0
  38. package/dist/Incentive-DSsxOFKY.js.map +1 -0
  39. package/dist/Incentive-lNp-ZudZ.cjs +2 -0
  40. package/dist/Incentive-lNp-ZudZ.cjs.map +1 -0
  41. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  42. package/dist/Incentives/AllowListIncentive.js +11 -11
  43. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  44. package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
  45. package/dist/Incentives/CGDAIncentive.d.ts +1 -1
  46. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
  47. package/dist/Incentives/CGDAIncentive.js +24 -22
  48. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  49. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  50. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  51. package/dist/Incentives/ERC20Incentive.js +19 -19
  52. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  53. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.d.ts +1035 -0
  54. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.d.ts.map +1 -0
  55. package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +1 -1
  56. package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs.map +1 -1
  57. package/dist/Incentives/ERC20VariableCriteriaIncentive.js +19 -19
  58. package/dist/Incentives/ERC20VariableCriteriaIncentive.js.map +1 -1
  59. package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
  60. package/dist/Incentives/ERC20VariableIncentive.cjs.map +1 -1
  61. package/dist/Incentives/ERC20VariableIncentive.d.ts +1 -1
  62. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  63. package/dist/Incentives/ERC20VariableIncentive.js +25 -23
  64. package/dist/Incentives/ERC20VariableIncentive.js.map +1 -1
  65. package/dist/Incentives/Incentive.cjs +1 -1
  66. package/dist/Incentives/Incentive.d.ts +6 -5
  67. package/dist/Incentives/Incentive.d.ts.map +1 -1
  68. package/dist/Incentives/Incentive.js +17 -16
  69. package/dist/Incentives/PointsIncentive.cjs +1 -1
  70. package/dist/Incentives/PointsIncentive.js +8 -8
  71. package/dist/{SimpleDenyList-GZlSeh2G.js → SimpleDenyList-B8QeJthf.js} +12 -12
  72. package/dist/{SimpleDenyList-GZlSeh2G.js.map → SimpleDenyList-B8QeJthf.js.map} +1 -1
  73. package/dist/{SimpleDenyList-CgQvS1ek.cjs → SimpleDenyList-DIb4xX3j.cjs} +2 -2
  74. package/dist/{SimpleDenyList-CgQvS1ek.cjs.map → SimpleDenyList-DIb4xX3j.cjs.map} +1 -1
  75. package/dist/Validators/LimitedSignerValidator.cjs +1 -1
  76. package/dist/Validators/LimitedSignerValidator.js +18 -18
  77. package/dist/Validators/SignerValidator.cjs +1 -1
  78. package/dist/Validators/SignerValidator.js +16 -16
  79. package/dist/Validators/Validator.cjs +1 -1
  80. package/dist/Validators/Validator.js +4 -4
  81. package/dist/componentInterfaces-D7r9xJmt.cjs +2 -0
  82. package/dist/componentInterfaces-D7r9xJmt.cjs.map +1 -0
  83. package/dist/componentInterfaces-PR3ijhgZ.js +18 -0
  84. package/dist/componentInterfaces-PR3ijhgZ.js.map +1 -0
  85. package/dist/{deployments-CMdsItcq.cjs → deployments-BGpr4ppG.cjs} +2 -2
  86. package/dist/deployments-BGpr4ppG.cjs.map +1 -0
  87. package/dist/{deployments-DzhmI-zL.js → deployments-COxshLqt.js} +42 -32
  88. package/dist/deployments-COxshLqt.js.map +1 -0
  89. package/dist/deployments.json +20 -15
  90. package/dist/generated-CRD9XfOT.cjs +3 -0
  91. package/dist/generated-CRD9XfOT.cjs.map +1 -0
  92. package/dist/{generated-Hbd0NIf9.js → generated-ClbO_ULI.js} +1274 -709
  93. package/dist/generated-ClbO_ULI.js.map +1 -0
  94. package/dist/index.cjs +1 -1
  95. package/dist/index.d.ts +1 -0
  96. package/dist/index.d.ts.map +1 -1
  97. package/dist/index.js +133 -129
  98. package/dist/utils.cjs +1 -1
  99. package/dist/utils.cjs.map +1 -1
  100. package/dist/utils.d.ts +7 -1
  101. package/dist/utils.d.ts.map +1 -1
  102. package/dist/utils.js +1121 -41
  103. package/dist/utils.js.map +1 -1
  104. package/package.json +1 -1
  105. package/src/Actions/EventAction.ts +85 -1
  106. package/src/BoostCore.ts +27 -0
  107. package/src/Incentives/CGDAIncentive.ts +3 -1
  108. package/src/Incentives/ERC20PeggedIncentive.ts +2 -2
  109. package/src/Incentives/ERC20PeggedVariableCriteriaIncentive.test.ts +315 -0
  110. package/src/Incentives/ERC20PeggedVariableCriteriaIncentive.ts +728 -0
  111. package/src/Incentives/ERC20VariableIncentive.ts +3 -1
  112. package/src/Incentives/Incentive.ts +8 -2
  113. package/src/index.ts +1 -0
  114. package/src/utils.ts +10 -0
  115. package/dist/Incentive-M45PaQsT.js +0 -397
  116. package/dist/Incentive-M45PaQsT.js.map +0 -1
  117. package/dist/Incentive-axLU7ndr.cjs +0 -2
  118. package/dist/Incentive-axLU7ndr.cjs.map +0 -1
  119. package/dist/componentInterfaces-Bt-4sNB5.cjs +0 -2
  120. package/dist/componentInterfaces-Bt-4sNB5.cjs.map +0 -1
  121. package/dist/componentInterfaces-C4uAYjSo.js +0 -16
  122. package/dist/componentInterfaces-C4uAYjSo.js.map +0 -1
  123. package/dist/deployments-CMdsItcq.cjs.map +0 -1
  124. package/dist/deployments-DzhmI-zL.js.map +0 -1
  125. package/dist/generated-CNkDfjzI.cjs +0 -3
  126. package/dist/generated-CNkDfjzI.cjs.map +0 -1
  127. package/dist/generated-Hbd0NIf9.js.map +0 -1
@@ -0,0 +1,901 @@
1
+ import { v as p, bQ as E, bR as T, bS as x, bT as N, bU as P, bV as D, bW as $, bX as k, bY as B, bZ as F, b_ as G, b$ as U, c0 as q, c1 as L, c2 as j, l as A, c3 as M, c4 as S, c5 as Y, c6 as J, c7 as W, c8 as X, c9 as Z, ca as z, cb as H, cc as K, cd as O, ce as Q, cf as f0, cg as b0, ch as a0, ci as e0, cj as d0, ck as c0 } from "./generated-ClbO_ULI.js";
2
+ import { f as t0, g as s0, h as i0, i as r0, j as n0, k as o0, l as l0, m as h0 } from "./componentInterfaces-PR3ijhgZ.js";
3
+ import { getTransactionReceipt as u0, getTransaction as g0, readContract as m0 } from "@wagmi/core";
4
+ import { NoMatchingLogsError as I, DecodedArgsError as l, InvalidCriteriaTypeError as w0, IncentiveCriteriaNotFoundError as y0, InvalidComponentInterfaceError as p0 } from "./errors.js";
5
+ import { AllowListIncentive as A0 } from "./Incentives/AllowListIncentive.js";
6
+ import { CGDAIncentive as I0 } from "./Incentives/CGDAIncentive.js";
7
+ import { ERC20Incentive as C0 } from "./Incentives/ERC20Incentive.js";
8
+ import { encodeAbiParameters as n, zeroAddress as _, parseEventLogs as V0, decodeFunctionData as _0 } from "viem";
9
+ import { g as v0, h as R0 } from "./deployments-COxshLqt.js";
10
+ import { DeployableTarget as v } from "./Deployable/DeployableTarget.js";
11
+ import { prepareClaimPayload as h } from "./claiming.js";
12
+ import { RegistryType as R, CheatCodes as E0 } from "./utils.js";
13
+ import { SignatureType as C } from "./Actions/EventAction.js";
14
+ import { ERC20VariableCriteriaIncentive as T0 } from "./Incentives/ERC20VariableCriteriaIncentive.js";
15
+ import { ERC20VariableIncentive as x0 } from "./Incentives/ERC20VariableIncentive.js";
16
+ import { PointsIncentive as N0 } from "./Incentives/PointsIncentive.js";
17
+ const P0 = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b6127bf806100bd5f395ff3fe60806040526004361061020e575f3560e01c806354d1f13d11610117578063d54ad2a11161009f578063ec87621c1161006e578063ec87621c14610739578063f04e283e14610763578063f2fde38b1461077f578063fe9fbb801461079b578063fee81cf4146107d75761020e565b8063d54ad2a114610681578063db09da12146106ab578063dcc21361146106e7578063dcc59b6f1461070f5761020e565b80639214fa4d116100e65780639214fa4d1461058d578063a4d66daf146105b7578063bb1757cf146105e1578063be4994f81461061d578063c884ef83146106455761020e565b806354d1f13d14610525578063715018a61461052f57806375b238fc146105395780638da5cb5b146105635761020e565b80632de948071161019a578063474f5a4411610169578063474f5a441461042a5780634a4ee7b1146104675780634e7165a214610483578063514e62fc146104bf578063547d1864146104fb5761020e565b80632de948071461037457806338d52e0f146103b05780634359d28a146103da578063439fab91146104025761020e565b80631cd64df4116101e15780631cd64df4146102b05780631f1cb62b146102ec578063228cb73314610316578063256929621461034057806328d6183b1461034a5761020e565b806301ffc9a71461021257806307621eca1461024e578063183a4f6e146102785780631c10893f14610294575b5f80fd5b34801561021d575f80fd5b5061023860048036038101906102339190611a8c565b610813565b6040516102459190611ad1565b60405180910390f35b348015610259575f80fd5b5061026261088c565b60405161026f9190611b02565b60405180910390f35b610292600480360381019061028d9190611b45565b610894565b005b6102ae60048036038101906102a99190611bca565b6108a1565b005b3480156102bb575f80fd5b506102d660048036038101906102d19190611bca565b6108b7565b6040516102e39190611ad1565b60405180910390f35b3480156102f7575f80fd5b506103006108cd565b60405161030d9190611c17565b60405180910390f35b348015610321575f80fd5b5061032a6108f2565b6040516103379190611b02565b60405180910390f35b6103486108f7565b005b348015610355575f80fd5b5061035e610948565b60405161036b9190611c3f565b60405180910390f35b34801561037f575f80fd5b5061039a60048036038101906103959190611c58565b61096f565b6040516103a79190611b02565b60405180910390f35b3480156103bb575f80fd5b506103c4610988565b6040516103d19190611c17565b60405180910390f35b3480156103e5575f80fd5b5061040060048036038101906103fb9190611d39565b6109ad565b005b34801561040d575f80fd5b5061042860048036038101906104239190611e0c565b610abb565b005b348015610435575f80fd5b50610450600480360381019061044b9190611e0c565b610d45565b60405161045e929190611e57565b60405180910390f35b610481600480360381019061047c9190611bca565b610eaf565b005b34801561048e575f80fd5b506104a960048036038101906104a49190611e0c565b610ec5565b6040516104b69190611eee565b60405180910390f35b3480156104ca575f80fd5b506104e560048036038101906104e09190611bca565b610f9a565b6040516104f29190611ad1565b60405180910390f35b348015610506575f80fd5b5061050f610fb1565b60405161051c9190611b02565b60405180910390f35b61052d610fb7565b005b610537610ff0565b005b348015610544575f80fd5b5061054d611003565b60405161055a9190611b02565b60405180910390f35b34801561056e575f80fd5b50610577611008565b6040516105849190611c17565b60405180910390f35b348015610598575f80fd5b506105a1611030565b6040516105ae9190611c17565b60405180910390f35b3480156105c2575f80fd5b506105cb611058565b6040516105d89190611b02565b60405180910390f35b3480156105ec575f80fd5b5061060760048036038101906106029190611f0e565b61105e565b6040516106149190611ad1565b60405180910390f35b348015610628575f80fd5b50610643600480360381019061063e9190611fc0565b611239565b005b348015610650575f80fd5b5061066b60048036038101906106669190611c58565b6112ef565b6040516106789190611ad1565b60405180910390f35b34801561068c575f80fd5b5061069561130c565b6040516106a29190611b02565b60405180910390f35b3480156106b6575f80fd5b506106d160048036038101906106cc9190611f0e565b611312565b6040516106de9190611ad1565b60405180910390f35b3480156106f2575f80fd5b5061070d60048036038101906107089190611fc0565b611355565b005b34801561071a575f80fd5b5061072361140b565b6040516107309190611b02565b60405180910390f35b348015610744575f80fd5b5061074d611411565b60405161075a9190611b02565b60405180910390f35b61077d60048036038101906107789190611c58565b611416565b005b61079960048036038101906107949190611c58565b611454565b005b3480156107a6575f80fd5b506107c160048036038101906107bc9190611c58565b61147d565b6040516107ce9190611ad1565b60405180910390f35b3480156107e2575f80fd5b506107fd60048036038101906107f89190611c58565b6114d0565b60405161080a9190611b02565b60405180910390f35b5f7f56586338000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806108855750610884826114e9565b5b9050919050565b5f8054905090565b61089e3382611562565b50565b6108a9611571565b6108b382826115a8565b5050565b5f81826108c38561096f565b1614905092915050565b60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f5481565b5f6109006115b8565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7f5658633800000000000000000000000000000000000000000000000000000000905090565b5f638b78c6d8600c52815f526020600c20549050919050565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60026109b8816115c2565b8282905085859050146109f7576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85859050811015610ab3575f848483818110610a1857610a1761203e565b5b9050602002016020810190610a2d9190612095565b90506001151581151503610a7257610a6d878784818110610a5157610a5061203e565b5b9050602002016020810190610a669190611c58565b60016115a8565b610aa5565b610aa4878784818110610a8857610a8761203e565b5b9050602002016020810190610a9d9190611c58565b6001611562565b5b5080806001019150506109f9565b505050505050565b5f610ac46115f7565b90508054600382558015610af65760018160011c14303b10610aed5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f8383810190610b0791906121c9565b90505f81604001511480610b1e57505f8160600151145b15610b55576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816060015190505f610b8a30845f015173ffffffffffffffffffffffffffffffffffffffff1661162090919063ffffffff16565b905081811015610bd857825f015181836040517f5c54305e000000000000000000000000000000000000000000000000000000008152600401610bcf939291906121f4565b60405180910390fd5b825f015160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550826020015160075f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082604001515f819055508260600151600581905550610c7d33611653565b610c8c83608001516001611729565b826020015173ffffffffffffffffffffffffffffffffffffffff16835f015173ffffffffffffffffffffffffffffffffffffffff167fd20715546497e6d32bc9b61b35416a25a8cc41d2fb7f389a1bb26dc040213a3b856040015186606001518760800151604051610d0093929190612229565b60405180910390a35050508015610d40576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806001610d52816115c2565b5f8585810190610d629190612377565b90505f8160200151806020019051810190610d7d91906123d2565b90508060055f828254610d90919061242a565b92505081905550610de6825f01518260035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661176a9092919063ffffffff16565b815f015173ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d360035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16845f015184604051602001610e5a939291906124c2565b604051602081830303815290604052604051610e769190611eee565b60405180910390a28060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16945094505050509250929050565b610eb7611571565b610ec18282611562565b5050565b60605f8383810190610ed791906121c9565b90505f81606001519050604051806080016040528060016002811115610f0057610eff6124fe565b5b8152602001835f015173ffffffffffffffffffffffffffffffffffffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff168152602001604051806020016040528084815250604051602001610f5f9190612554565b604051602081830303815290604052815250604051602001610f81919061266a565b6040516020818303038152906040529250505092915050565b5f8082610fa68561096f565b161415905092915050565b60025481565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610ff8611571565b6110015f6117b3565b565b600281565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b5f60075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60055481565b5f611067611571565b5f8383810190611077919061270f565b90505f816020015180602001905181019061109291906123d2565b905061109e8682611879565b6110d4576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600554816006546110e59190612756565b111561111d576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060065f82825461112e9190612756565b92505081905550600160045f8282546111479190612756565b9250508190555061119a868260035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661176a9092919063ffffffff16565b8573ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d360035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff168884604051602001611208939291906124c2565b6040516020818303038152906040526040516112249190611eee565b60405180910390a26001925050509392505050565b6002611244816115c2565b828290508585905014611283576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b858590508110156112e7576112da8686838181106112a6576112a561203e565b5b90506020020160208101906112bb9190611c58565b8585848181106112ce576112cd61203e565b5b905060200201356115a8565b8080600101915050611285565b505050505050565b6001602052805f5260405f205f915054906101000a900460ff1681565b60065481565b5f808383810190611323919061270f565b90505f816020015180602001905181019061133e91906123d2565b905061134a8682611879565b925050509392505050565b6002611360816115c2565b82829050858590501461139f576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85859050811015611403576113f68686838181106113c2576113c161203e565b5b90506020020160208101906113d79190611c58565b8585848181106113ea576113e961203e565b5b90506020020135611562565b80806001019150506113a1565b505050505050565b60045481565b600181565b61141e611571565b63389a75e1600c52805f526020600c20805442111561144457636f5e88185f526004601cfd5b5f815550611451816117b3565b50565b61145c611571565b8060601b61147157637448fbae5f526004601cfd5b61147a816117b3565b50565b5f8173ffffffffffffffffffffffffffffffffffffffff1661149d611008565b73ffffffffffffffffffffffffffffffffffffffff1614806114c957506114c8826002600117610f9a565b5b9050919050565b5f63389a75e1600c52815f526020600c20549050919050565b5f7fa9216705000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061155b575061155a826118e8565b5b9050919050565b61156d82825f611961565b5050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275433146115a6576382b429005f526004601cfd5b565b6115b482826001611961565b5050565b5f6202a300905090565b638b78c6d8195433146115f457638b78c6d8600c52335f52806020600c2054166115f3576382b429005f526004601cfd5b5b50565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b61165b6119b9565b156116d3577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392780541561169557630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350611726565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af13d1560015f511417166117aa576390b8ec185f526004601cfd5b5f603452505050565b6117bb6119b9565b15611820577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550611876565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff161580156118e05750600554826006546118dd9190612756565b11155b905092915050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061195a5750611959826119bd565b5b9050919050565b638b78c6d8600c52825f526020600c2080548381178361198357848216821890505b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611a6b81611a37565b8114611a75575f80fd5b50565b5f81359050611a8681611a62565b92915050565b5f60208284031215611aa157611aa0611a2f565b5b5f611aae84828501611a78565b91505092915050565b5f8115159050919050565b611acb81611ab7565b82525050565b5f602082019050611ae45f830184611ac2565b92915050565b5f819050919050565b611afc81611aea565b82525050565b5f602082019050611b155f830184611af3565b92915050565b611b2481611aea565b8114611b2e575f80fd5b50565b5f81359050611b3f81611b1b565b92915050565b5f60208284031215611b5a57611b59611a2f565b5b5f611b6784828501611b31565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f611b9982611b70565b9050919050565b611ba981611b8f565b8114611bb3575f80fd5b50565b5f81359050611bc481611ba0565b92915050565b5f8060408385031215611be057611bdf611a2f565b5b5f611bed85828601611bb6565b9250506020611bfe85828601611b31565b9150509250929050565b611c1181611b8f565b82525050565b5f602082019050611c2a5f830184611c08565b92915050565b611c3981611a37565b82525050565b5f602082019050611c525f830184611c30565b92915050565b5f60208284031215611c6d57611c6c611a2f565b5b5f611c7a84828501611bb6565b91505092915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f840112611ca457611ca3611c83565b5b8235905067ffffffffffffffff811115611cc157611cc0611c87565b5b602083019150836020820283011115611cdd57611cdc611c8b565b5b9250929050565b5f8083601f840112611cf957611cf8611c83565b5b8235905067ffffffffffffffff811115611d1657611d15611c87565b5b602083019150836020820283011115611d3257611d31611c8b565b5b9250929050565b5f805f8060408587031215611d5157611d50611a2f565b5b5f85013567ffffffffffffffff811115611d6e57611d6d611a33565b5b611d7a87828801611c8f565b9450945050602085013567ffffffffffffffff811115611d9d57611d9c611a33565b5b611da987828801611ce4565b925092505092959194509250565b5f8083601f840112611dcc57611dcb611c83565b5b8235905067ffffffffffffffff811115611de957611de8611c87565b5b602083019150836001820283011115611e0557611e04611c8b565b5b9250929050565b5f8060208385031215611e2257611e21611a2f565b5b5f83013567ffffffffffffffff811115611e3f57611e3e611a33565b5b611e4b85828601611db7565b92509250509250929050565b5f604082019050611e6a5f830185611af3565b611e776020830184611c08565b9392505050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f611ec082611e7e565b611eca8185611e88565b9350611eda818560208601611e98565b611ee381611ea6565b840191505092915050565b5f6020820190508181035f830152611f068184611eb6565b905092915050565b5f805f60408486031215611f2557611f24611a2f565b5b5f611f3286828701611bb6565b935050602084013567ffffffffffffffff811115611f5357611f52611a33565b5b611f5f86828701611db7565b92509250509250925092565b5f8083601f840112611f8057611f7f611c83565b5b8235905067ffffffffffffffff811115611f9d57611f9c611c87565b5b602083019150836020820283011115611fb957611fb8611c8b565b5b9250929050565b5f805f8060408587031215611fd857611fd7611a2f565b5b5f85013567ffffffffffffffff811115611ff557611ff4611a33565b5b61200187828801611c8f565b9450945050602085013567ffffffffffffffff81111561202457612023611a33565b5b61203087828801611f6b565b925092505092959194509250565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b61207481611ab7565b811461207e575f80fd5b50565b5f8135905061208f8161206b565b92915050565b5f602082840312156120aa576120a9611a2f565b5b5f6120b784828501612081565b91505092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6120fa82611ea6565b810181811067ffffffffffffffff82111715612119576121186120c4565b5b80604052505050565b5f61212b611a26565b905061213782826120f1565b919050565b5f80fd5b5f60a08284031215612155576121546120c0565b5b61215f60a0612122565b90505f61216e84828501611bb6565b5f83015250602061218184828501611bb6565b602083015250604061219584828501611b31565b60408301525060606121a984828501611b31565b60608301525060806121bd84828501611bb6565b60808301525092915050565b5f60a082840312156121de576121dd611a2f565b5b5f6121eb84828501612140565b91505092915050565b5f6060820190506122075f830186611c08565b6122146020830185611af3565b6122216040830184611af3565b949350505050565b5f60608201905061223c5f830186611af3565b6122496020830185611af3565b6122566040830184611c08565b949350505050565b5f80fd5b5f67ffffffffffffffff82111561227c5761227b6120c4565b5b61228582611ea6565b9050602081019050919050565b828183375f83830152505050565b5f6122b26122ad84612262565b612122565b9050828152602081018484840111156122ce576122cd61225e565b5b6122d9848285612292565b509392505050565b5f82601f8301126122f5576122f4611c83565b5b81356123058482602086016122a0565b91505092915050565b5f60408284031215612323576123226120c0565b5b61232d6040612122565b90505f61233c84828501611bb6565b5f83015250602082013567ffffffffffffffff81111561235f5761235e61213c565b5b61236b848285016122e1565b60208301525092915050565b5f6020828403121561238c5761238b611a2f565b5b5f82013567ffffffffffffffff8111156123a9576123a8611a33565b5b6123b58482850161230e565b91505092915050565b5f815190506123cc81611b1b565b92915050565b5f602082840312156123e7576123e6611a2f565b5b5f6123f4848285016123be565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61243482611aea565b915061243f83611aea565b9250828203905081811115612457576124566123fd565b5b92915050565b5f8160601b9050919050565b5f6124738261245d565b9050919050565b5f61248482612469565b9050919050565b61249c61249782611b8f565b61247a565b82525050565b5f819050919050565b6124bc6124b782611aea565b6124a2565b82525050565b5f6124cd828661248b565b6014820191506124dd828561248b565b6014820191506124ed82846124ab565b602082019150819050949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b61253481611aea565b82525050565b602082015f82015161254e5f85018261252b565b50505050565b5f6020820190506125675f83018461253a565b92915050565b6003811061257e5761257d6124fe565b5b50565b5f81905061258e8261256d565b919050565b5f61259d82612581565b9050919050565b6125ad81612593565b82525050565b6125bc81611b8f565b82525050565b5f82825260208201905092915050565b5f6125dc82611e7e565b6125e681856125c2565b93506125f6818560208601611e98565b6125ff81611ea6565b840191505092915050565b5f608083015f83015161261f5f8601826125a4565b50602083015161263260208601826125b3565b50604083015161264560408601826125b3565b506060830151848203606086015261265d82826125d2565b9150508091505092915050565b5f6020820190508181035f830152612682818461260a565b905092915050565b5f6040828403121561269f5761269e6120c0565b5b6126a96040612122565b90505f82013567ffffffffffffffff8111156126c8576126c761213c565b5b6126d4848285016122e1565b5f83015250602082013567ffffffffffffffff8111156126f7576126f661213c565b5b612703848285016122e1565b60208301525092915050565b5f6020828403121561272457612723611a2f565b5b5f82013567ffffffffffffffff81111561274157612740611a33565b5b61274d8482850161268a565b91505092915050565b5f61276082611aea565b915061276b83611aea565b9250828201905080821115612783576127826123fd565b5b9291505056fea2646970667358221220dac302ea2cd5b1bd043f32307b4b55326db7520539ec80e9572f86826d8305f064736f6c634300081a0033", u = class u extends v {
18
+ constructor() {
19
+ super(...arguments), this.abi = p;
20
+ }
21
+ /**
22
+ * The owner of the incentive
23
+ *
24
+ * @public
25
+ * @async
26
+ * @param {?ReadParams} [params]
27
+ * @returns {Promise<Address>}
28
+ */
29
+ async owner(f) {
30
+ return await E(this._config, {
31
+ address: this.assertValidAddress(),
32
+ args: [],
33
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
34
+ ...f
35
+ });
36
+ }
37
+ /**
38
+ * Calculates the current reward based on the time since the last claim. The reward is calculated based on the time since the last claim, the available budget, and the reward parameters. It increases linearly over time in the absence of claims, with each hour adding `rewardBoost` to the current reward, up to the available budget. For example, if there is one claim in the first hour, then no claims for three hours, the claimable reward would be `initialReward - rewardDecay + (rewardBoost * 3)`
39
+ *
40
+ * @public
41
+ * @async
42
+ * @param {?ReadParams} [params]
43
+ * @returns {Promise<bigint>} - The current reward
44
+ */
45
+ async currentReward(f) {
46
+ return await T(this._config, {
47
+ address: this.assertValidAddress(),
48
+ args: [],
49
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
50
+ ...f
51
+ });
52
+ }
53
+ /**
54
+ * The number of claims that have been made
55
+ *
56
+ * @public
57
+ * @async
58
+ * @param {?ReadParams} [params]
59
+ * @returns {Promise<bigint>}
60
+ */
61
+ async claims(f) {
62
+ return await x(this._config, {
63
+ address: this.assertValidAddress(),
64
+ args: [],
65
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
66
+ ...f
67
+ });
68
+ }
69
+ /**
70
+ * The total amount of rewards claimed
71
+ *
72
+ * @public
73
+ * @async
74
+ * @param {?ReadParams} [params]
75
+ * @returns {Promise<bigint>}
76
+ */
77
+ async totalClaimed(f) {
78
+ return await N(this._config, {
79
+ address: this.assertValidAddress(),
80
+ args: [],
81
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
82
+ ...f
83
+ });
84
+ }
85
+ /**
86
+ * A mapping of address to claim status
87
+ *
88
+ * @public
89
+ * @async
90
+ * @param {Address} address
91
+ * @param {?ReadParams} [params]
92
+ * @returns {Promise<boolean>}
93
+ */
94
+ async claimed(f, b) {
95
+ return await P(this._config, {
96
+ address: this.assertValidAddress(),
97
+ args: [f],
98
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
99
+ ...b
100
+ });
101
+ }
102
+ /**
103
+ * The address of the ERC20-like token
104
+ *
105
+ * @public
106
+ * @async
107
+ * @param {?ReadParams} [params]
108
+ * @returns {Promise<Address>}
109
+ */
110
+ async asset(f) {
111
+ return await D(this._config, {
112
+ address: this.assertValidAddress(),
113
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
114
+ ...f
115
+ });
116
+ }
117
+ /**
118
+ * The address of the pegged ERC20-like token
119
+ *
120
+ * @public
121
+ * @async
122
+ * @param {?ReadParams} [params]
123
+ * @returns {Promise<Address>}
124
+ */
125
+ async peg(f) {
126
+ return await $(this._config, {
127
+ address: this.assertValidAddress(),
128
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
129
+ ...f
130
+ });
131
+ }
132
+ /**
133
+ * The reward amount issued for each claim
134
+ *
135
+ * @public
136
+ * @async
137
+ * @param {?ReadParams} [params]
138
+ * @returns {Promise<bigint>}
139
+ */
140
+ async reward(f) {
141
+ return await k(this._config, {
142
+ address: this.assertValidAddress(),
143
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
144
+ ...f
145
+ });
146
+ }
147
+ /**
148
+ * The limit (max possible rewards payout in reward token)
149
+ *
150
+ * @public
151
+ * @async
152
+ * @param {?ReadParams} [params]
153
+ * @returns {Promise<bigint>}
154
+ */
155
+ async limit(f) {
156
+ return await B(this._config, {
157
+ address: this.assertValidAddress(),
158
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
159
+ ...f
160
+ });
161
+ }
162
+ /**
163
+ * Claim the incentive
164
+ *
165
+ * @public
166
+ * @async
167
+ * @param {ClaimPayload} payload
168
+ * @param {?WriteParams} [params]
169
+ * @returns {Promise<boolean>} - Returns true if successfully claimed
170
+ */
171
+ async claim(f, b) {
172
+ return await this.awaitResult(this.claimRaw(f, b));
173
+ }
174
+ /**
175
+ * Claim the incentive
176
+ *
177
+ * @public
178
+ * @async
179
+ * @param {ClaimPayload} payload
180
+ * @param {?WriteParams} [params]
181
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - Returns true if successfully claimed
182
+ */
183
+ async claimRaw(f, b) {
184
+ const { request: a, result: e } = await F(
185
+ this._config,
186
+ {
187
+ address: this.assertValidAddress(),
188
+ args: [h(f)],
189
+ ...this.optionallyAttachAccount(),
190
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
191
+ ...b
192
+ }
193
+ );
194
+ return { hash: await G(this._config, a), result: e };
195
+ }
196
+ /**
197
+ * Clawback assets from the incentive
198
+ *
199
+ * @public
200
+ * @async
201
+ * @param {ClaimPayload} payload
202
+ * @param {?WriteParams} [params]
203
+ * @returns {Promise<boolean>} - True if the assets were successfully clawbacked
204
+ */
205
+ async clawback(f, b) {
206
+ return await this.awaitResult(this.clawbackRaw(f, b));
207
+ }
208
+ /**
209
+ * Clawback assets from the incentive
210
+ *
211
+ * @public
212
+ * @async
213
+ * @param {ClaimPayload} payload
214
+ * @param {?WriteParams} [params]
215
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the assets were successfully clawbacked
216
+ */
217
+ async clawbackRaw(f, b) {
218
+ const { request: a, result: e } = await U(
219
+ this._config,
220
+ {
221
+ address: this.assertValidAddress(),
222
+ args: [h(f)],
223
+ ...this.optionallyAttachAccount(),
224
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
225
+ ...b
226
+ }
227
+ );
228
+ return { hash: await q(this._config, a), result: e };
229
+ }
230
+ /**
231
+ * Check if an incentive is claimable.
232
+ *
233
+ * @public
234
+ * @async
235
+ * @param {ClaimPayload} payload
236
+ * @param {?ReadParams} [params]
237
+ * @returns {Promise<boolean>} = True if the incentive is claimable based on the data payload
238
+ */
239
+ async isClaimable(f, b) {
240
+ return await L(this._config, {
241
+ address: this.assertValidAddress(),
242
+ args: [f.target, f.data],
243
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
244
+ ...b
245
+ });
246
+ }
247
+ /**
248
+ * read the peg token for the incentive.
249
+ *
250
+ * @public
251
+ * @async
252
+ * @param {?ReadParams} [params]
253
+ * @returns {Promise<Address>} = The address of the token the reward is pegged to
254
+ */
255
+ async getPeg(f) {
256
+ return await j(this._config, {
257
+ address: this.assertValidAddress(),
258
+ args: [],
259
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
260
+ ...f
261
+ });
262
+ }
263
+ /**
264
+ * Get the maximum amount that can be claimed by this incentive. Useful when used in conjunction with `BoostCore.calculateProtocolFee`
265
+ *
266
+ * @public
267
+ * @async
268
+ * @param {?ReadParams} [params]
269
+ * @returns {Promise<bigint>} = Return a bigint representing that maximum amount that can be distributed by this incentive.
270
+ */
271
+ async getTotalBudget(f) {
272
+ return await this.limit(f);
273
+ }
274
+ /**
275
+ * Check if any claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.
276
+ *
277
+ * @public
278
+ * @async
279
+ * @param {?ReadParams} [params]
280
+ * @returns {Promise<boolean>} - True if total claims is less than limit
281
+ */
282
+ async canBeClaimed(f) {
283
+ return await this.getRemainingClaimPotential(f) > 0n;
284
+ }
285
+ /**
286
+ * Check how many claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.
287
+ *
288
+ * @public
289
+ * @async
290
+ * @param {?ReadParams} [params]
291
+ * @returns {Promise<bigint>} - True if total claims is less than limit
292
+ */
293
+ async getRemainingClaimPotential(f) {
294
+ const [b, a] = await Promise.all([
295
+ this.claims(f),
296
+ this.limit(f)
297
+ ]);
298
+ return a - b;
299
+ }
300
+ /**
301
+ * @inheritdoc
302
+ *
303
+ * @public
304
+ * @param {?ERC20PeggedIncentivePayload} [_payload]
305
+ * @param {?DeployableOptions} [_options]
306
+ * @returns {GenericDeployableParams}
307
+ */
308
+ buildParameters(f, b) {
309
+ const [a, e] = this.validateDeploymentConfig(
310
+ f,
311
+ b
312
+ );
313
+ return {
314
+ abi: p,
315
+ bytecode: P0,
316
+ args: [D0(a)],
317
+ ...this.optionallyAttachAccount(e.account)
318
+ };
319
+ }
320
+ /**
321
+ * Encodes an amount to clawback from the incentive
322
+ *
323
+ * @public
324
+ * @param {bigint} amount - How much of the asset to clawback
325
+ * @returns {Hex} - Returns an encoded uint256
326
+ */
327
+ buildClawbackData(f) {
328
+ return n([{ type: "uint256" }], [f]);
329
+ }
330
+ /**
331
+ * Builds the claim data for the ERC20PeggedIncentive.
332
+ *
333
+ * @public
334
+ * @param {bigint} rewardAmount
335
+ * @returns {Hash} Returns the encoded claim data
336
+ * @description This function returns the encoded claim data for the ERC20PeggedIncentive.
337
+ */
338
+ buildClaimData(f) {
339
+ return n(
340
+ [{ type: "uint256", name: "rewardAmount" }],
341
+ [f]
342
+ );
343
+ }
344
+ };
345
+ u.bases = {
346
+ 31337: void 0,
347
+ ...v0
348
+ }, u.registryType = R.INCENTIVE;
349
+ let m = u;
350
+ function D0({
351
+ asset: i,
352
+ peg: f,
353
+ reward: b,
354
+ limit: a,
355
+ manager: e = _
356
+ }) {
357
+ return n(
358
+ [
359
+ { type: "address", name: "asset" },
360
+ { type: "address", name: "peg" },
361
+ { type: "uint256", name: "reward" },
362
+ { type: "uint256", name: "limit" },
363
+ { type: "address", name: "manager" }
364
+ ],
365
+ [i, f, b, a, e]
366
+ );
367
+ }
368
+ const $0 = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b612e66806100bd5f395ff3fe60806040526004361061022f575f3560e01c8063715018a61161012d578063c884ef83116100aa578063ec87621c1161006e578063ec87621c146107db578063f04e283e14610805578063f2fde38b14610821578063fe9fbb801461083d578063fee81cf4146108795761022f565b8063c884ef83146106e7578063d54ad2a114610723578063db09da121461074d578063dcc2136114610789578063dcc59b6f146107b15761022f565b8063a4d66daf116100f1578063a4d66daf14610605578063a871ced21461062f578063bb1757cf14610659578063be4994f814610695578063c213f3f9146106bd5761022f565b8063715018a61461055057806375b238fc1461055a57806377548687146105845780638da5cb5b146105b15780639214fa4d146105db5761022f565b80632de94807116101bb5780634a4ee7b11161017f5780634a4ee7b1146104885780634e7165a2146104a4578063514e62fc146104e0578063547d18641461051c57806354d1f13d146105465761022f565b80632de948071461039557806338d52e0f146103d15780634359d28a146103fb578063439fab9114610423578063474f5a441461044b5761022f565b80631cd64df4116102025780631cd64df4146102d15780631f1cb62b1461030d578063228cb73314610337578063256929621461036157806328d6183b1461036b5761022f565b806301ffc9a71461023357806307621eca1461026f578063183a4f6e146102995780631c10893f146102b5575b5f80fd5b34801561023e575f80fd5b5061025960048036038101906102549190611e0d565b6108b5565b6040516102669190611e52565b60405180910390f35b34801561027a575f80fd5b5061028361092e565b6040516102909190611e83565b60405180910390f35b6102b360048036038101906102ae9190611ec6565b610936565b005b6102cf60048036038101906102ca9190611f4b565b610943565b005b3480156102dc575f80fd5b506102f760048036038101906102f29190611f4b565b610959565b6040516103049190611e52565b60405180910390f35b348015610318575f80fd5b5061032161096f565b60405161032e9190611f98565b60405180910390f35b348015610342575f80fd5b5061034b610994565b6040516103589190611e83565b60405180910390f35b610369610999565b005b348015610376575f80fd5b5061037f6109ea565b60405161038c9190611fc0565b60405180910390f35b3480156103a0575f80fd5b506103bb60048036038101906103b69190611fd9565b610a11565b6040516103c89190611e83565b60405180910390f35b3480156103dc575f80fd5b506103e5610a2a565b6040516103f29190611f98565b60405180910390f35b348015610406575f80fd5b50610421600480360381019061041c91906120ba565b610a4f565b005b34801561042e575f80fd5b506104496004803603810190610444919061218d565b610b5d565b005b348015610456575f80fd5b50610471600480360381019061046c919061218d565b610e9c565b60405161047f9291906121d8565b60405180910390f35b6104a2600480360381019061049d9190611f4b565b611006565b005b3480156104af575f80fd5b506104ca60048036038101906104c5919061218d565b61101c565b6040516104d7919061226f565b60405180910390f35b3480156104eb575f80fd5b5061050660048036038101906105019190611f4b565b6110f1565b6040516105139190611e52565b60405180910390f35b348015610527575f80fd5b50610530611108565b60405161053d9190611e83565b60405180910390f35b61054e61110e565b005b610558611147565b005b348015610565575f80fd5b5061056e61115a565b60405161057b9190611e83565b60405180910390f35b34801561058f575f80fd5b5061059861115f565b6040516105a89493929190612335565b60405180910390f35b3480156105bc575f80fd5b506105c56111b4565b6040516105d29190611f98565b60405180910390f35b3480156105e6575f80fd5b506105ef6111dc565b6040516105fc9190611f98565b60405180910390f35b348015610610575f80fd5b50610619611204565b6040516106269190611e83565b60405180910390f35b34801561063a575f80fd5b5061064361120a565b6040516106509190612407565b60405180910390f35b348015610664575f80fd5b5061067f600480360381019061067a9190612420565b6112d9565b60405161068c9190611e52565b60405180910390f35b3480156106a0575f80fd5b506106bb60048036038101906106b691906124d2565b611506565b005b3480156106c8575f80fd5b506106d16115bc565b6040516106de9190611e83565b60405180910390f35b3480156106f2575f80fd5b5061070d60048036038101906107089190611fd9565b6115c5565b60405161071a9190611e52565b60405180910390f35b34801561072e575f80fd5b506107376115e2565b6040516107449190611e83565b60405180910390f35b348015610758575f80fd5b50610773600480360381019061076e9190612420565b6115e8565b6040516107809190611e52565b60405180910390f35b348015610794575f80fd5b506107af60048036038101906107aa91906124d2565b61165f565b005b3480156107bc575f80fd5b506107c5611715565b6040516107d29190611e83565b60405180910390f35b3480156107e6575f80fd5b506107ef61171b565b6040516107fc9190611e83565b60405180910390f35b61081f600480360381019061081a9190611fd9565b611720565b005b61083b60048036038101906108369190611fd9565b61175e565b005b348015610848575f80fd5b50610863600480360381019061085e9190611fd9565b611787565b6040516108709190611e52565b60405180910390f35b348015610884575f80fd5b5061089f600480360381019061089a9190611fd9565b6117da565b6040516108ac9190611e83565b60405180910390f35b5f7ff60c99c9000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806109275750610926826117f3565b5b9050919050565b5f8054905090565b610940338261186c565b50565b61094b61187b565b61095582826118b2565b5050565b5f818261096585610a11565b1614905092915050565b600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f5481565b5f6109a26118c2565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7ff60c99c900000000000000000000000000000000000000000000000000000000905090565b5f638b78c6d8600c52815f526020600c20549050919050565b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6002610a5a816118cc565b828290508585905014610a99576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85859050811015610b55575f848483818110610aba57610ab9612550565b5b9050602002016020810190610acf91906125a7565b90506001151581151503610b1457610b0f878784818110610af357610af2612550565b5b9050602002016020810190610b089190611fd9565b60016118b2565b610b47565b610b46878784818110610b2a57610b29612550565b5b9050602002016020810190610b3f9190611fd9565b600161186c565b5b508080600101915050610a9b565b505050505050565b5f610b66611901565b90508054600382558015610b985760018160011c14303b10610b8f5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f8383810190610ba991906127f0565b90505f816060015103610be8576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f816060015190505f610c1d30845f015173ffffffffffffffffffffffffffffffffffffffff1661192a90919063ffffffff16565b905081811015610c6b57825f015181836040517f5c54305e000000000000000000000000000000000000000000000000000000008152600401610c629392919061281c565b60405180910390fd5b5f8360c001519050835f015160065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508360200151600a5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083604001515f8190555083606001516008819055508360a00151600b819055508060035f820151815f015f6101000a81548160ff02191690836001811115610d4557610d4461228f565b5b0217905550602082015181600101556040820151816002015f6101000a81548160ff021916908360ff16021790555060608201518160020160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050610dc73361195d565b610dd684608001516001611a33565b836020015173ffffffffffffffffffffffffffffffffffffffff16845f015173ffffffffffffffffffffffffffffffffffffffff167fdc505a50c6f2c816d981a377c8177e2604d8302821a502bc9f742e0748f338428660400151876060015188608001518960a001518a60c00151604051610e56959493929190612851565b60405180910390a3505050508015610e97576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806001610ea9816118cc565b5f8585810190610eb991906129bc565b90505f8160200151806020019051810190610ed49190612a17565b90508060085f828254610ee79190612a6f565b92505081905550610f3d825f01518260065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611a749092919063ffffffff16565b815f015173ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d360065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16845f015184604051602001610fb193929190612b07565b604051602081830303815290604052604051610fcd919061226f565b60405180910390a28060065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16945094505050509250929050565b61100e61187b565b611018828261186c565b5050565b60605f838381019061102e91906127f0565b90505f816060015190506040518060800160405280600160028111156110575761105661228f565b5b8152602001835f015173ffffffffffffffffffffffffffffffffffffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff1681526020016040518060200160405280848152506040516020016110b69190612b6c565b6040516020818303038152906040528152506040516020016110d89190612c73565b6040516020818303038152906040529250505092915050565b5f80826110fd85610a11565b161415905092915050565b60025481565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b61114f61187b565b6111585f611abd565b565b600281565b6003805f015f9054906101000a900460ff1690806001015490806002015f9054906101000a900460ff16908060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905084565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b5f600a5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60085481565b611212611d55565b60036040518060800160405290815f82015f9054906101000a900460ff1660018111156112425761124161228f565b5b60018111156112545761125361228f565b5b815260200160018201548152602001600282015f9054906101000a900460ff1660ff1660ff1681526020016002820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525050905090565b5f6112e261187b565b5f83838101906112f29190612d18565b90505f816020015180602001905181019061130d9190612a17565b90505f805f540361132057819050611343565b670de0b6b3a7640000825f546113369190612d5f565b6113409190612dcd565b90505b5f600b54141580156113565750600b5481115b1561136157600b5490505b61136a81611b83565b6113a0576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600854816009546113b19190612dfd565b11156113e9576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060095f8282546113fa9190612dfd565b92505081905550600160075f8282546114139190612dfd565b92505081905550611466878260065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611a749092919063ffffffff16565b8673ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d360065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1689846040516020016114d493929190612b07565b6040516020818303038152906040526040516114f0919061226f565b60405180910390a2600193505050509392505050565b6002611511816118cc565b828290508585905014611550576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b858590508110156115b4576115a786868381811061157357611572612550565b5b90506020020160208101906115889190611fd9565b85858481811061159b5761159a612550565b5b905060200201356118b2565b8080600101915050611552565b505050505050565b5f600b54905090565b6001602052805f5260405f205f915054906101000a900460ff1681565b60095481565b5f805f84848101906115fa9190612d18565b90505f81602001518060200190518101906116159190612a17565b90505f8054036116275780925061164a565b670de0b6b3a7640000815f5461163d9190612d5f565b6116479190612dcd565b92505b61165383611b83565b93505050509392505050565b600261166a816118cc565b8282905085859050146116a9576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8585905081101561170d576117008686838181106116cc576116cb612550565b5b90506020020160208101906116e19190611fd9565b8585848181106116f4576116f3612550565b5b9050602002013561186c565b80806001019150506116ab565b505050505050565b60075481565b600181565b61172861187b565b63389a75e1600c52805f526020600c20805442111561174e57636f5e88185f526004601cfd5b5f81555061175b81611abd565b50565b61176661187b565b8060601b61177b57637448fbae5f526004601cfd5b61178481611abd565b50565b5f8173ffffffffffffffffffffffffffffffffffffffff166117a76111b4565b73ffffffffffffffffffffffffffffffffffffffff1614806117d357506117d28260026001176110f1565b5b9050919050565b5f63389a75e1600c52815f526020600c20549050919050565b5f7f56586338000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611865575061186482611b9e565b5b9050919050565b61187782825f611c17565b5050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275433146118b0576382b429005f526004601cfd5b565b6118be82826001611c17565b5050565b5f6202a300905090565b638b78c6d8195433146118fe57638b78c6d8600c52335f52806020600c2054166118fd576382b429005f526004601cfd5b5b50565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b611965611c6f565b156119dd577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392780541561199f57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350611a30565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af13d1560015f51141716611ab4576390b8ec185f526004601cfd5b5f603452505050565b611ac5611c6f565b15611b2a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550611b80565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f60085482600954611b959190612dfd565b11159050919050565b5f7fa9216705000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611c105750611c0f82611c73565b5b9050919050565b638b78c6d8600c52825f526020600c20805483811783611c3957848216821890505b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f90565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611ce55750611ce482611cec565b5b9050919050565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60405180608001604052805f6001811115611d7357611d7261228f565b5b81526020015f80191681526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681525090565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611dec81611db8565b8114611df6575f80fd5b50565b5f81359050611e0781611de3565b92915050565b5f60208284031215611e2257611e21611db0565b5b5f611e2f84828501611df9565b91505092915050565b5f8115159050919050565b611e4c81611e38565b82525050565b5f602082019050611e655f830184611e43565b92915050565b5f819050919050565b611e7d81611e6b565b82525050565b5f602082019050611e965f830184611e74565b92915050565b611ea581611e6b565b8114611eaf575f80fd5b50565b5f81359050611ec081611e9c565b92915050565b5f60208284031215611edb57611eda611db0565b5b5f611ee884828501611eb2565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f611f1a82611ef1565b9050919050565b611f2a81611f10565b8114611f34575f80fd5b50565b5f81359050611f4581611f21565b92915050565b5f8060408385031215611f6157611f60611db0565b5b5f611f6e85828601611f37565b9250506020611f7f85828601611eb2565b9150509250929050565b611f9281611f10565b82525050565b5f602082019050611fab5f830184611f89565b92915050565b611fba81611db8565b82525050565b5f602082019050611fd35f830184611fb1565b92915050565b5f60208284031215611fee57611fed611db0565b5b5f611ffb84828501611f37565b91505092915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261202557612024612004565b5b8235905067ffffffffffffffff81111561204257612041612008565b5b60208301915083602082028301111561205e5761205d61200c565b5b9250929050565b5f8083601f84011261207a57612079612004565b5b8235905067ffffffffffffffff81111561209757612096612008565b5b6020830191508360208202830111156120b3576120b261200c565b5b9250929050565b5f805f80604085870312156120d2576120d1611db0565b5b5f85013567ffffffffffffffff8111156120ef576120ee611db4565b5b6120fb87828801612010565b9450945050602085013567ffffffffffffffff81111561211e5761211d611db4565b5b61212a87828801612065565b925092505092959194509250565b5f8083601f84011261214d5761214c612004565b5b8235905067ffffffffffffffff81111561216a57612169612008565b5b6020830191508360018202830111156121865761218561200c565b5b9250929050565b5f80602083850312156121a3576121a2611db0565b5b5f83013567ffffffffffffffff8111156121c0576121bf611db4565b5b6121cc85828601612138565b92509250509250929050565b5f6040820190506121eb5f830185611e74565b6121f86020830184611f89565b9392505050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f612241826121ff565b61224b8185612209565b935061225b818560208601612219565b61226481612227565b840191505092915050565b5f6020820190508181035f8301526122878184612237565b905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600281106122cd576122cc61228f565b5b50565b5f8190506122dd826122bc565b919050565b5f6122ec826122d0565b9050919050565b6122fc816122e2565b82525050565b5f819050919050565b61231481612302565b82525050565b5f60ff82169050919050565b61232f8161231a565b82525050565b5f6080820190506123485f8301876122f3565b612355602083018661230b565b6123626040830185612326565b61236f6060830184611f89565b95945050505050565b612381816122e2565b82525050565b61239081612302565b82525050565b61239f8161231a565b82525050565b6123ae81611f10565b82525050565b608082015f8201516123c85f850182612378565b5060208201516123db6020850182612387565b5060408201516123ee6040850182612396565b50606082015161240160608501826123a5565b50505050565b5f60808201905061241a5f8301846123b4565b92915050565b5f805f6040848603121561243757612436611db0565b5b5f61244486828701611f37565b935050602084013567ffffffffffffffff81111561246557612464611db4565b5b61247186828701612138565b92509250509250925092565b5f8083601f84011261249257612491612004565b5b8235905067ffffffffffffffff8111156124af576124ae612008565b5b6020830191508360208202830111156124cb576124ca61200c565b5b9250929050565b5f805f80604085870312156124ea576124e9611db0565b5b5f85013567ffffffffffffffff81111561250757612506611db4565b5b61251387828801612010565b9450945050602085013567ffffffffffffffff81111561253657612535611db4565b5b6125428782880161247d565b925092505092959194509250565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b61258681611e38565b8114612590575f80fd5b50565b5f813590506125a18161257d565b92915050565b5f602082840312156125bc576125bb611db0565b5b5f6125c984828501612593565b91505092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61260c82612227565b810181811067ffffffffffffffff8211171561262b5761262a6125d6565b5b80604052505050565b5f61263d611da7565b90506126498282612603565b919050565b5f80fd5b6002811061265e575f80fd5b50565b5f8135905061266f81612652565b92915050565b61267e81612302565b8114612688575f80fd5b50565b5f8135905061269981612675565b92915050565b6126a88161231a565b81146126b2575f80fd5b50565b5f813590506126c38161269f565b92915050565b5f608082840312156126de576126dd6125d2565b5b6126e86080612634565b90505f6126f784828501612661565b5f83015250602061270a8482850161268b565b602083015250604061271e848285016126b5565b604083015250606061273284828501611f37565b60608301525092915050565b5f6101408284031215612754576127536125d2565b5b61275e60e0612634565b90505f61276d84828501611f37565b5f83015250602061278084828501611f37565b602083015250604061279484828501611eb2565b60408301525060606127a884828501611eb2565b60608301525060806127bc84828501611f37565b60808301525060a06127d084828501611eb2565b60a08301525060c06127e4848285016126c9565b60c08301525092915050565b5f610140828403121561280657612805611db0565b5b5f6128138482850161273e565b91505092915050565b5f60608201905061282f5f830186611f89565b61283c6020830185611e74565b6128496040830184611e74565b949350505050565b5f610100820190506128655f830188611e74565b6128726020830187611e74565b61287f6040830186611f89565b61288c6060830185611e74565b61289960808301846123b4565b9695505050505050565b5f80fd5b5f67ffffffffffffffff8211156128c1576128c06125d6565b5b6128ca82612227565b9050602081019050919050565b828183375f83830152505050565b5f6128f76128f2846128a7565b612634565b905082815260208101848484011115612913576129126128a3565b5b61291e8482856128d7565b509392505050565b5f82601f83011261293a57612939612004565b5b813561294a8482602086016128e5565b91505092915050565b5f60408284031215612968576129676125d2565b5b6129726040612634565b90505f61298184828501611f37565b5f83015250602082013567ffffffffffffffff8111156129a4576129a361264e565b5b6129b084828501612926565b60208301525092915050565b5f602082840312156129d1576129d0611db0565b5b5f82013567ffffffffffffffff8111156129ee576129ed611db4565b5b6129fa84828501612953565b91505092915050565b5f81519050612a1181611e9c565b92915050565b5f60208284031215612a2c57612a2b611db0565b5b5f612a3984828501612a03565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f612a7982611e6b565b9150612a8483611e6b565b9250828203905081811115612a9c57612a9b612a42565b5b92915050565b5f8160601b9050919050565b5f612ab882612aa2565b9050919050565b5f612ac982612aae565b9050919050565b612ae1612adc82611f10565b612abf565b82525050565b5f819050919050565b612b01612afc82611e6b565b612ae7565b82525050565b5f612b128286612ad0565b601482019150612b228285612ad0565b601482019150612b328284612af0565b602082019150819050949350505050565b612b4c81611e6b565b82525050565b602082015f820151612b665f850182612b43565b50505050565b5f602082019050612b7f5f830184612b52565b92915050565b60038110612b9657612b9561228f565b5b50565b5f819050612ba682612b85565b919050565b5f612bb582612b99565b9050919050565b612bc581612bab565b82525050565b5f82825260208201905092915050565b5f612be5826121ff565b612bef8185612bcb565b9350612bff818560208601612219565b612c0881612227565b840191505092915050565b5f608083015f830151612c285f860182612bbc565b506020830151612c3b60208601826123a5565b506040830151612c4e60408601826123a5565b5060608301518482036060860152612c668282612bdb565b9150508091505092915050565b5f6020820190508181035f830152612c8b8184612c13565b905092915050565b5f60408284031215612ca857612ca76125d2565b5b612cb26040612634565b90505f82013567ffffffffffffffff811115612cd157612cd061264e565b5b612cdd84828501612926565b5f83015250602082013567ffffffffffffffff811115612d0057612cff61264e565b5b612d0c84828501612926565b60208301525092915050565b5f60208284031215612d2d57612d2c611db0565b5b5f82013567ffffffffffffffff811115612d4a57612d49611db4565b5b612d5684828501612c93565b91505092915050565b5f612d6982611e6b565b9150612d7483611e6b565b9250828202612d8281611e6b565b91508282048414831517612d9957612d98612a42565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f612dd782611e6b565b9150612de283611e6b565b925082612df257612df1612da0565b5b828204905092915050565b5f612e0782611e6b565b9150612e1283611e6b565b9250828201905080821115612e2a57612e29612a42565b5b9291505056fea264697066735822122050bb6a176feb20b04fcded40293358e8fdba927c1e1bf68a160c7fa7cac6b41664736f6c634300081a0033", g = class g extends v {
369
+ constructor() {
370
+ super(...arguments), this.abi = A;
371
+ }
372
+ /**
373
+ * The owner of the incentive
374
+ *
375
+ * @public
376
+ * @async
377
+ * @param {?ReadParams} [params]
378
+ * @returns {Promise<Address>}
379
+ */
380
+ async owner(f) {
381
+ return await M(this._config, {
382
+ address: this.assertValidAddress(),
383
+ args: [],
384
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
385
+ ...f
386
+ });
387
+ }
388
+ /**
389
+ * Calculates the current reward based on the time since the last claim. The reward is calculated based on the time since the last claim, the available budget, and the reward parameters. It increases linearly over time in the absence of claims, with each hour adding `rewardBoost` to the current reward, up to the available budget. For example, if there is one claim in the first hour, then no claims for three hours, the claimable reward would be `initialReward - rewardDecay + (rewardBoost * 3)`
390
+ *
391
+ * @public
392
+ * @async
393
+ * @param {?ReadParams} [params]
394
+ * @returns {Promise<bigint>} - The current reward
395
+ */
396
+ async currentReward(f) {
397
+ return await S(
398
+ this._config,
399
+ {
400
+ address: this.assertValidAddress(),
401
+ args: [],
402
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
403
+ ...f
404
+ }
405
+ );
406
+ }
407
+ /**
408
+ * Retrieves the maximum reward amount per claim.
409
+ *
410
+ * @public
411
+ * @async
412
+ * @param {?ReadParams} [params]
413
+ * @returns {Promise<bigint>} The maximum reward amount per claim
414
+ */
415
+ async getMaxReward(f) {
416
+ return await Y(this._config, {
417
+ ...f,
418
+ address: this.assertValidAddress()
419
+ });
420
+ }
421
+ /**
422
+ * Fetches the incentive scalar from a transaction hash
423
+ *
424
+ * @param {GetIncentiveScalarParams} params
425
+ * @param {?ReadParams} [params]
426
+ * @returns {Promise<bigint>}
427
+ * @throws {InvalidCriteriaTypeError | NoMatchingLogsError | DecodedArgsError}
428
+ */
429
+ async getIncentiveScalar({ chainId: f, hash: b, knownSignatures: a }, e) {
430
+ var c;
431
+ const d = await this.getIncentiveCriteria(e);
432
+ if (d.criteriaType === C.EVENT) {
433
+ const t = await u0(this._config, {
434
+ chainId: f,
435
+ hash: b
436
+ });
437
+ if (d.fieldIndex === E0.GAS_REBATE_INCENTIVE)
438
+ return t.gasUsed * t.effectiveGasPrice + // Normal gas cost
439
+ (t.blobGasUsed ?? 0n) * (t.blobGasPrice ?? 0n);
440
+ const r = t.logs;
441
+ if (r.length === 0)
442
+ throw new I(
443
+ `No logs found for event signature ${d.signature}`
444
+ );
445
+ try {
446
+ const o = a[d.signature], s = V0({
447
+ abi: [o],
448
+ logs: r
449
+ });
450
+ if (s == null || s.length === 0)
451
+ throw new I(
452
+ `No logs found for event signature ${d.signature}`
453
+ );
454
+ const y = ((c = s[0]) == null ? void 0 : c.args)[d.fieldIndex];
455
+ if (y === void 0)
456
+ throw new l(
457
+ `Decoded argument at index ${d.fieldIndex} is undefined`
458
+ );
459
+ return BigInt(y);
460
+ } catch (o) {
461
+ throw new l(
462
+ `Failed to decode event log for signature ${d.signature}: ${o.message}`
463
+ );
464
+ }
465
+ } else if (d.criteriaType === C.FUNC) {
466
+ const t = await g0(this._config, {
467
+ chainId: f,
468
+ hash: b
469
+ });
470
+ try {
471
+ const r = a[d.signature], s = _0({
472
+ abi: [r],
473
+ data: t.input
474
+ }).args[d.fieldIndex];
475
+ if (s == null)
476
+ throw new l(
477
+ `Decoded argument at index ${d.fieldIndex} is undefined`
478
+ );
479
+ return BigInt(s);
480
+ } catch (r) {
481
+ throw new l(
482
+ `Failed to decode function data for signature ${d.signature}: ${r.message}`
483
+ );
484
+ }
485
+ } else
486
+ throw new w0(
487
+ `Invalid criteria type ${d.criteriaType}`
488
+ );
489
+ }
490
+ /**
491
+ * The number of claims that have been made
492
+ *
493
+ * @public
494
+ * @async
495
+ * @param {?ReadParams} [params]
496
+ * @returns {Promise<bigint>}
497
+ */
498
+ async claims(f) {
499
+ return await J(this._config, {
500
+ address: this.assertValidAddress(),
501
+ args: [],
502
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
503
+ ...f
504
+ });
505
+ }
506
+ /**
507
+ * The total amount of rewards claimed
508
+ *
509
+ * @public
510
+ * @async
511
+ * @param {?ReadParams} [params]
512
+ * @returns {Promise<bigint>}
513
+ */
514
+ async totalClaimed(f) {
515
+ return await W(
516
+ this._config,
517
+ {
518
+ address: this.assertValidAddress(),
519
+ args: [],
520
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
521
+ ...f
522
+ }
523
+ );
524
+ }
525
+ /**
526
+ * A mapping of address to claim status
527
+ *
528
+ * @public
529
+ * @async
530
+ * @param {Address} address
531
+ * @param {?ReadParams} [params]
532
+ * @returns {Promise<boolean>}
533
+ */
534
+ async claimed(f, b) {
535
+ return await X(this._config, {
536
+ address: this.assertValidAddress(),
537
+ args: [f],
538
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
539
+ ...b
540
+ });
541
+ }
542
+ /**
543
+ * The address of the ERC20-like token
544
+ *
545
+ * @public
546
+ * @async
547
+ * @param {?ReadParams} [params]
548
+ * @returns {Promise<Address>}
549
+ */
550
+ async asset(f) {
551
+ return await Z(this._config, {
552
+ address: this.assertValidAddress(),
553
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
554
+ ...f
555
+ });
556
+ }
557
+ /**
558
+ * The address of the pegged ERC20-like token
559
+ *
560
+ * @public
561
+ * @async
562
+ * @param {?ReadParams} [params]
563
+ * @returns {Promise<Address>}
564
+ */
565
+ async peg(f) {
566
+ return await z(this._config, {
567
+ address: this.assertValidAddress(),
568
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
569
+ ...f
570
+ });
571
+ }
572
+ /**
573
+ * The reward amount issued for each claim
574
+ *
575
+ * @public
576
+ * @async
577
+ * @param {?ReadParams} [params]
578
+ * @returns {Promise<bigint>}
579
+ */
580
+ async reward(f) {
581
+ return await H(this._config, {
582
+ address: this.assertValidAddress(),
583
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
584
+ ...f
585
+ });
586
+ }
587
+ /**
588
+ * The limit (max possible rewards payout in reward token)
589
+ *
590
+ * @public
591
+ * @async
592
+ * @param {?ReadParams} [params]
593
+ * @returns {Promise<bigint>}
594
+ */
595
+ async limit(f) {
596
+ return await K(this._config, {
597
+ address: this.assertValidAddress(),
598
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
599
+ ...f
600
+ });
601
+ }
602
+ /**
603
+ * Claim the incentive
604
+ *
605
+ * @public
606
+ * @async
607
+ * @param {ClaimPayload} payload
608
+ * @param {?WriteParams} [params]
609
+ * @returns {Promise<boolean>} - Returns true if successfully claimed
610
+ */
611
+ async claim(f, b) {
612
+ return await this.awaitResult(this.claimRaw(f, b));
613
+ }
614
+ /**
615
+ * Claim the incentive
616
+ *
617
+ * @public
618
+ * @async
619
+ * @param {ClaimPayload} payload
620
+ * @param {?WriteParams} [params]
621
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - Returns true if successfully claimed
622
+ */
623
+ async claimRaw(f, b) {
624
+ const { request: a, result: e } = await O(this._config, {
625
+ address: this.assertValidAddress(),
626
+ args: [h(f)],
627
+ ...this.optionallyAttachAccount(),
628
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
629
+ ...b
630
+ });
631
+ return { hash: await Q(
632
+ this._config,
633
+ a
634
+ ), result: e };
635
+ }
636
+ /**
637
+ * Clawback assets from the incentive
638
+ *
639
+ * @public
640
+ * @async
641
+ * @param {ClaimPayload} payload
642
+ * @param {?WriteParams} [params]
643
+ * @returns {Promise<boolean>} - True if the assets were successfully clawbacked
644
+ */
645
+ async clawback(f, b) {
646
+ return await this.awaitResult(this.clawbackRaw(f, b));
647
+ }
648
+ /**
649
+ * Clawback assets from the incentive
650
+ *
651
+ * @public
652
+ * @async
653
+ * @param {ClaimPayload} payload
654
+ * @param {?WriteParams} [params]
655
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the assets were successfully clawbacked
656
+ */
657
+ async clawbackRaw(f, b) {
658
+ const { request: a, result: e } = await f0(this._config, {
659
+ address: this.assertValidAddress(),
660
+ args: [h(f)],
661
+ ...this.optionallyAttachAccount(),
662
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
663
+ ...b
664
+ });
665
+ return { hash: await b0(
666
+ this._config,
667
+ a
668
+ ), result: e };
669
+ }
670
+ /**
671
+ * Check if an incentive is claimable.
672
+ *
673
+ * @public
674
+ * @async
675
+ * @param {ClaimPayload} payload
676
+ * @param {?ReadParams} [params]
677
+ * @returns {Promise<boolean>} = True if the incentive is claimable based on the data payload
678
+ */
679
+ async isClaimable(f, b) {
680
+ return await a0(
681
+ this._config,
682
+ {
683
+ address: this.assertValidAddress(),
684
+ args: [f.target, f.data],
685
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
686
+ ...b
687
+ }
688
+ );
689
+ }
690
+ /**
691
+ * read the peg token for the incentive.
692
+ *
693
+ * @public
694
+ * @async
695
+ * @param {?ReadParams} [params]
696
+ * @returns {Promise<Address>} = The address of the token the reward is pegged to
697
+ */
698
+ async getPeg(f) {
699
+ return await e0(this._config, {
700
+ address: this.assertValidAddress(),
701
+ args: [],
702
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
703
+ ...f
704
+ });
705
+ }
706
+ /**
707
+ * Get the maximum amount that can be claimed by this incentive. Useful when used in conjunction with `BoostCore.calculateProtocolFee`
708
+ *
709
+ * @public
710
+ * @async
711
+ * @param {?ReadParams} [params]
712
+ * @returns {Promise<bigint>} = Return a bigint representing that maximum amount that can be distributed by this incentive.
713
+ */
714
+ async getTotalBudget(f) {
715
+ return await this.limit(f);
716
+ }
717
+ /**
718
+ * Check if any claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.
719
+ *
720
+ * @public
721
+ * @async
722
+ * @param {?ReadParams} [params]
723
+ * @returns {Promise<boolean>} - True if total claims is less than limit
724
+ */
725
+ async canBeClaimed(f) {
726
+ return await this.getRemainingClaimPotential(f) > 0n;
727
+ }
728
+ /**
729
+ * Check how many claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.
730
+ *
731
+ * @public
732
+ * @async
733
+ * @param {?ReadParams} [params]
734
+ * @returns {Promise<bigint>} - True if total claims is less than limit
735
+ */
736
+ async getRemainingClaimPotential(f) {
737
+ const [b, a] = await Promise.all([
738
+ this.totalClaimed(f),
739
+ this.limit(f)
740
+ ]);
741
+ return a - b;
742
+ }
743
+ /**
744
+ *Functions from the ERC20VariableIncentive contract
745
+ */
746
+ /**
747
+ * Fetches the IncentiveCriteria struct from the contract
748
+ *
749
+ * @param {?ReadParams} [params]
750
+ * @returns {Promise<IncentiveCriteria>} Incentive criteria structure
751
+ * @throws {IncentiveCriteriaNotFoundError}
752
+ */
753
+ async getIncentiveCriteria(f) {
754
+ try {
755
+ return await d0(
756
+ this._config,
757
+ {
758
+ ...f,
759
+ address: this.assertValidAddress()
760
+ }
761
+ );
762
+ } catch (b) {
763
+ throw new y0(b);
764
+ }
765
+ }
766
+ /**
767
+ * @inheritdoc
768
+ *
769
+ * @public
770
+ * @param {?ERC20PeggedVariableCriteriaIncentivePayload} [_payload]
771
+ * @param {?DeployableOptions} [_options]
772
+ * @returns {GenericDeployableParams}
773
+ */
774
+ buildParameters(f, b) {
775
+ const [a, e] = this.validateDeploymentConfig(
776
+ f,
777
+ b
778
+ );
779
+ return {
780
+ abi: A,
781
+ bytecode: $0,
782
+ args: [k0(a)],
783
+ ...this.optionallyAttachAccount(e.account)
784
+ };
785
+ }
786
+ /**
787
+ * Encodes an amount to clawback from the incentive
788
+ *
789
+ * @public
790
+ * @param {bigint} amount - How much of the asset to clawback
791
+ * @returns {Hex} - Returns an encoded uint256
792
+ */
793
+ buildClawbackData(f) {
794
+ return n([{ type: "uint256" }], [f]);
795
+ }
796
+ /**
797
+ * Builds the claim data for the ERC20PeggedVariableCriteriaIncentivePayload.
798
+ *
799
+ * @public
800
+ * @param {bigint} rewardAmount
801
+ * @returns {Hash} Returns the encoded claim data
802
+ * @description This function returns the encoded claim data for the ERC20PeggedVariableCriteriaIncentivePayload.
803
+ */
804
+ buildClaimData(f) {
805
+ return n(
806
+ [{ type: "uint256", name: "rewardAmount" }],
807
+ [f]
808
+ );
809
+ }
810
+ };
811
+ g.bases = {
812
+ 31337: void 0,
813
+ ...R0
814
+ }, g.registryType = R.INCENTIVE;
815
+ let w = g;
816
+ function k0({
817
+ asset: i,
818
+ peg: f,
819
+ reward: b,
820
+ limit: a,
821
+ maxReward: e = 0n,
822
+ manager: d = _,
823
+ criteria: c
824
+ }) {
825
+ return n(
826
+ [
827
+ {
828
+ type: "tuple",
829
+ name: "initPayloadExtended",
830
+ components: [
831
+ { type: "address", name: "asset" },
832
+ { type: "address", name: "peg" },
833
+ { type: "uint256", name: "reward" },
834
+ { type: "uint256", name: "limit" },
835
+ { type: "address", name: "manager" },
836
+ { type: "uint256", name: "maxReward" },
837
+ {
838
+ type: "tuple",
839
+ name: "criteria",
840
+ components: [
841
+ { type: "uint8", name: "criteriaType" },
842
+ { type: "bytes32", name: "signature" },
843
+ { type: "uint8", name: "fieldIndex" },
844
+ { type: "address", name: "targetContract" }
845
+ ]
846
+ }
847
+ ]
848
+ }
849
+ ],
850
+ [
851
+ {
852
+ asset: i,
853
+ peg: f,
854
+ reward: b,
855
+ limit: a,
856
+ manager: d,
857
+ maxReward: e,
858
+ criteria: {
859
+ criteriaType: c.criteriaType,
860
+ signature: c.signature,
861
+ fieldIndex: c.fieldIndex,
862
+ targetContract: c.targetContract
863
+ }
864
+ }
865
+ ]
866
+ );
867
+ }
868
+ const V = {
869
+ [t0]: N0,
870
+ [s0]: C0,
871
+ [i0]: w,
872
+ [r0]: m,
873
+ [n0]: A0,
874
+ // [AERC1155Incentive as Hex]: ERC1155Incentive,
875
+ [o0]: I0,
876
+ [l0]: x0,
877
+ [h0]: T0
878
+ };
879
+ async function K0(i, f, b) {
880
+ const a = await m0(i.config, {
881
+ abi: c0,
882
+ functionName: "getComponentInterface",
883
+ address: f,
884
+ ...b
885
+ }), e = V[a];
886
+ if (!e)
887
+ throw new p0(
888
+ Object.keys(V),
889
+ a
890
+ );
891
+ return new e(i, f);
892
+ }
893
+ export {
894
+ m as E,
895
+ V as I,
896
+ w as a,
897
+ k0 as b,
898
+ K0 as i,
899
+ D0 as p
900
+ };
901
+ //# sourceMappingURL=Incentive-DSsxOFKY.js.map