@boostxyz/sdk 6.0.0 → 6.0.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 (116) hide show
  1. package/dist/Actions/Action.cjs +1 -1
  2. package/dist/Actions/Action.js +2 -2
  3. package/dist/Actions/EventAction.cjs +1 -1
  4. package/dist/Actions/EventAction.cjs.map +1 -1
  5. package/dist/Actions/EventAction.js +40 -40
  6. package/dist/Actions/EventAction.js.map +1 -1
  7. package/dist/AllowLists/AllowList.cjs +1 -1
  8. package/dist/AllowLists/AllowList.js +3 -3
  9. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  10. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
  11. package/dist/AllowLists/SimpleAllowList.d.ts +2 -2
  12. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
  13. package/dist/AllowLists/SimpleAllowList.js +3 -3
  14. package/dist/AllowLists/SimpleAllowList.js.map +1 -1
  15. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  16. package/dist/AllowLists/SimpleDenyList.js +3 -3
  17. package/dist/Auth/PassthroughAuth.cjs +1 -1
  18. package/dist/Auth/PassthroughAuth.js +1 -1
  19. package/dist/BoostCore.cjs +2 -2
  20. package/dist/BoostCore.cjs.map +1 -1
  21. package/dist/BoostCore.d.ts +14 -0
  22. package/dist/BoostCore.d.ts.map +1 -1
  23. package/dist/BoostCore.js +119 -101
  24. package/dist/BoostCore.js.map +1 -1
  25. package/dist/BoostRegistry.cjs +1 -1
  26. package/dist/BoostRegistry.js +2 -2
  27. package/dist/Budget-CsqSI4NH.cjs +2 -0
  28. package/dist/Budget-CsqSI4NH.cjs.map +1 -0
  29. package/dist/Budget-bMiAGF8s.js +922 -0
  30. package/dist/Budget-bMiAGF8s.js.map +1 -0
  31. package/dist/Budgets/Budget.cjs +1 -1
  32. package/dist/Budgets/Budget.d.ts +5 -4
  33. package/dist/Budgets/Budget.d.ts.map +1 -1
  34. package/dist/Budgets/Budget.js +3 -3
  35. package/dist/Budgets/ManagedBudget.cjs +1 -1
  36. package/dist/Budgets/ManagedBudget.js +2 -2
  37. package/dist/Budgets/ManagedBudgetWithFeesV2.d.ts +1331 -0
  38. package/dist/Budgets/ManagedBudgetWithFeesV2.d.ts.map +1 -0
  39. package/dist/Deployable/DeployableTarget.cjs +1 -1
  40. package/dist/Deployable/DeployableTarget.js +1 -1
  41. package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
  42. package/dist/Deployable/DeployableTargetWithRBAC.js +2 -2
  43. package/dist/{Incentive-Boviez4z.js → Incentive-DZLG6T1-.js} +27 -27
  44. package/dist/{Incentive-Boviez4z.js.map → Incentive-DZLG6T1-.js.map} +1 -1
  45. package/dist/{Incentive-wM4zizTH.cjs → Incentive-DvNdIJ_x.cjs} +2 -2
  46. package/dist/{Incentive-wM4zizTH.cjs.map → Incentive-DvNdIJ_x.cjs.map} +1 -1
  47. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  48. package/dist/Incentives/AllowListIncentive.js +3 -3
  49. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  50. package/dist/Incentives/CGDAIncentive.js +2 -2
  51. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  52. package/dist/Incentives/ERC20Incentive.js +2 -2
  53. package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +1 -1
  54. package/dist/Incentives/ERC20VariableCriteriaIncentive.js +2 -2
  55. package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
  56. package/dist/Incentives/ERC20VariableIncentive.js +2 -2
  57. package/dist/Incentives/Incentive.cjs +1 -1
  58. package/dist/Incentives/Incentive.js +3 -3
  59. package/dist/Incentives/PointsIncentive.cjs +1 -1
  60. package/dist/Incentives/PointsIncentive.js +2 -2
  61. package/dist/{SimpleDenyList-Cybtz7AK.cjs → SimpleDenyList-BAIrFBAW.cjs} +2 -2
  62. package/dist/{SimpleDenyList-Cybtz7AK.cjs.map → SimpleDenyList-BAIrFBAW.cjs.map} +1 -1
  63. package/dist/{SimpleDenyList-CW4RwwRw.js → SimpleDenyList-C734XLxt.js} +11 -11
  64. package/dist/{SimpleDenyList-CW4RwwRw.js.map → SimpleDenyList-C734XLxt.js.map} +1 -1
  65. package/dist/Validators/LimitedSignerValidator.cjs +1 -1
  66. package/dist/Validators/LimitedSignerValidator.cjs.map +1 -1
  67. package/dist/Validators/LimitedSignerValidator.d.ts +1 -1
  68. package/dist/Validators/LimitedSignerValidator.d.ts.map +1 -1
  69. package/dist/Validators/LimitedSignerValidator.js +2 -2
  70. package/dist/Validators/LimitedSignerValidator.js.map +1 -1
  71. package/dist/Validators/SignerValidator.cjs +1 -1
  72. package/dist/Validators/SignerValidator.cjs.map +1 -1
  73. package/dist/Validators/SignerValidator.d.ts +1 -1
  74. package/dist/Validators/SignerValidator.d.ts.map +1 -1
  75. package/dist/Validators/SignerValidator.js +2 -2
  76. package/dist/Validators/SignerValidator.js.map +1 -1
  77. package/dist/Validators/Validator.cjs +1 -1
  78. package/dist/Validators/Validator.js +2 -2
  79. package/dist/componentInterfaces-5Ezh3Pvx.js +19 -0
  80. package/dist/componentInterfaces-5Ezh3Pvx.js.map +1 -0
  81. package/dist/componentInterfaces-Cm4Zfn1v.cjs +2 -0
  82. package/dist/componentInterfaces-Cm4Zfn1v.cjs.map +1 -0
  83. package/dist/{deployments-DqjtOTUr.js → deployments-3RHH-eW7.js} +3 -3
  84. package/dist/{deployments-DqjtOTUr.js.map → deployments-3RHH-eW7.js.map} +1 -1
  85. package/dist/errors.cjs +1 -1
  86. package/dist/errors.cjs.map +1 -1
  87. package/dist/errors.js +1 -1
  88. package/dist/errors.js.map +1 -1
  89. package/dist/generated-BPiHi7W2.cjs +3 -0
  90. package/dist/{generated-DgXPUgXl.cjs.map → generated-BPiHi7W2.cjs.map} +1 -1
  91. package/dist/{generated-pJZHmRCK.js → generated-CElkFqkY.js} +1315 -682
  92. package/dist/{generated-pJZHmRCK.js.map → generated-CElkFqkY.js.map} +1 -1
  93. package/dist/index.cjs +1 -1
  94. package/dist/index.d.ts +1 -0
  95. package/dist/index.d.ts.map +1 -1
  96. package/dist/index.js +155 -152
  97. package/package.json +2 -2
  98. package/src/AllowLists/SimpleAllowList.ts +2 -2
  99. package/src/BoostCore.ts +36 -4
  100. package/src/Budgets/Budget.ts +8 -2
  101. package/src/Budgets/ManagedBudgetWithFees.test.ts +0 -1
  102. package/src/Budgets/ManagedBudgetWithFeesV2.test.ts +327 -0
  103. package/src/Budgets/ManagedBudgetWithFeesV2.ts +713 -0
  104. package/src/Validators/LimitedSignerValidator.ts +1 -1
  105. package/src/Validators/SignerValidator.ts +1 -1
  106. package/src/errors.ts +1 -1
  107. package/src/index.ts +1 -0
  108. package/dist/Budget-DMbfdTom.cjs +0 -2
  109. package/dist/Budget-DMbfdTom.cjs.map +0 -1
  110. package/dist/Budget-DO6sGTIR.js +0 -463
  111. package/dist/Budget-DO6sGTIR.js.map +0 -1
  112. package/dist/componentInterfaces-D7r9xJmt.cjs +0 -2
  113. package/dist/componentInterfaces-D7r9xJmt.cjs.map +0 -1
  114. package/dist/componentInterfaces-PR3ijhgZ.js +0 -18
  115. package/dist/componentInterfaces-PR3ijhgZ.js.map +0 -1
  116. package/dist/generated-DgXPUgXl.cjs +0 -3
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../generated-DgXPUgXl.cjs"),r=require("viem"),p=require("../deployments-CIXw_WKk.cjs"),g=require("../Deployable/DeployableTarget.cjs"),m=require("../utils.cjs"),A="0x610120604052348015610010575f80fd5b50306080524660a0525f60c081905260e081905261010052610030610035565b610096565b63409feecd19805460018116156100535763f92ee8a95f526004601cfd5b8160c01c808260011c14610091578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b60805160a05160c05160e0516101005161167d6100c45f395f50505f50505f50505f50505f505061167d5ff3fe6080604052600436106100ef575f3560e01c8063736c0d5b11610087578063d3de6e7511610057578063d3de6e7514610293578063f04e283e146102c0578063f2fde38b146102d3578063fee81cf4146102e6575f80fd5b8063736c0d5b146101cc57806384b0196e146101fa5780638da5cb5b14610221578063a1d2756f14610274575f80fd5b8063439fab91116100c2578063439fab911461018a57806354d1f13d146101a9578063703b6900146101b1578063715018a6146101c4575f80fd5b806301ffc9a7146100f3578063256929621461012757806328d6183b146101315780634359d28a1461016b575b5f80fd5b3480156100fe575f80fd5b5061011261010d366004610ecb565b610317565b60405190151581526020015b60405180910390f35b61012f610372565b005b34801561013c575f80fd5b506040517fb8ce7b2200000000000000000000000000000000000000000000000000000000815260200161011e565b348015610176575f80fd5b5061012f610185366004610f52565b6103bf565b348015610195575f80fd5b5061012f6101a4366004610ffc565b6104bb565b61012f61068c565b6101126101bf36600461105c565b6106c5565b61012f610851565b3480156101d7575f80fd5b506101126101e63660046110c1565b5f6020819052908152604090205460ff1681565b348015610205575f80fd5b5061020e610864565b60405161011e9796959493929190611128565b34801561022c575f80fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275460405173ffffffffffffffffffffffffffffffffffffffff909116815260200161011e565b34801561027f575f80fd5b5061012f61028e3660046110c1565b61090c565b34801561029e575f80fd5b506102b26102ad366004611331565b61095b565b60405190815260200161011e565b61012f6102ce3660046110c1565b6109ee565b61012f6102e13660046110c1565b610a2b565b3480156102f1575f80fd5b506102b26103003660046110c1565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fb8ce7b2200000000000000000000000000000000000000000000000000000000148061036c575061036c82610a51565b92915050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b6103c7610aa6565b828114610400576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b838110156104b45782828281811061041c5761041c611399565b905060200201602081019061043191906113c6565b5f8087878581811061044557610445611399565b905060200201602081019061045a91906110c1565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f2080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101610402565b5050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf601132805460038255801561050c5760018160011c14303b106105035763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f8061051b848601866113f5565b91509150610541825f8151811061053457610534611399565b6020026020010151610adb565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161790555f5b82518110156106065760015f808584815181106105a2576105a2611399565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040015f2080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101610583565b5060405173ffffffffffffffffffffffffffffffffffffffff821681527f8098ebafc4f95fe5a577ff9be7c88d4445b6ef0acf915dad2b538c81b0384d7c9060200160405180910390a150508015610687576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b6002545f9073ffffffffffffffffffffffffffffffffffffffff163314610718576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610725838501856114bc565b90505f815f015180602001905181019061073f919061157c565b90505f61075689836040015189866020015161095b565b905087826040015160ff16116107ae5760408083015190517f17c66bc700000000000000000000000000000000000000000000000000000000815260ff90911660048201526024810189905260440160405180910390fd5b815173ffffffffffffffffffffffffffffffffffffffff165f9081526020819052604090205460ff1661080d576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108196001828a610b3e565b602082015182516108449173ffffffffffffffffffffffffffffffffffffffff909116908390610bcc565b9998505050505050505050565b610859610aa6565b6108625f610cd7565b565b7f0f000000000000000000000000000000000000000000000000000000000000006060805f8080836108fa604080518082018252600f81527f5369676e657256616c696461746f7200000000000000000000000000000000006020808301919091528251808401909352600183527f31000000000000000000000000000000000000000000000000000000000000009083015291565b97989097965046955030945091925090565b610914610aa6565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b8051602080830191909120604080517ffea51d5bd45bcd3c2ecc3679b43a3b80b0bd0923f8c16f822455b8cdecd9852f93810193909352820186905260ff8516606083015273ffffffffffffffffffffffffffffffffffffffff8416608083015260a08201525f906109e59060c00160405160208183030381529060405280519060200120610d3c565b95945050505050565b6109f6610aa6565b63389a75e1600c52805f526020600c208054421115610a1c57636f5e88185f526004601cfd5b5f9055610a2881610cd7565b50565b610a33610aa6565b8060601b610a4857637448fbae5f526004601cfd5b610a2881610cd7565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f5912b89c00000000000000000000000000000000000000000000000000000000148061036c575061036c82610d68565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610862576382b429005f526004601cfd5b73ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b7f3f57fc5c000000000000000000000000000000000000000000000000000000007f4de1225a000000000000000000000000000000000000000000000000000000006007831115610b9557815f528260045260245ffd5b84602052835f5260405f206001841b81541880851c6001166001188015610bc257835f528560045260245ffd5b5090555050505050565b73ffffffffffffffffffffffffffffffffffffffff909216915f8315610cd057604051835f5260208301516040526040835103610c45576040830151601b8160ff1c016020528060011b60011c606052506020600160805f60015afa805186183d1517610c4357505f606052604052506001610cd0565b505b6041835103610c885760608301515f1a60205260408301516060526020600160805f60015afa805186183d1517610c8657505f606052604052506001610cd0565b505b5f60605280604052631626ba7e60e01b808252846004830152602482016040815284516020018060448501828860045afa505060208160443d01858a5afa9051909114169150505b9392505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f610d45610dfe565b6719010000000000005f908152601a91909152603a928352604260182092525090565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d00000000000000000000000000000000000000000000000000000000148061036c57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461036c565b5f805f80610e70604080518082018252600f81527f5369676e657256616c696461746f7200000000000000000000000000000000006020808301919091528251808401909352600183527f31000000000000000000000000000000000000000000000000000000000000009083015291565b8151602092830120815191830191909120604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8152938401929092529082015246606082015230608082015260a09020949350505050565b5f60208284031215610edb575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610cd0575f80fd5b5f8083601f840112610f1a575f80fd5b50813567ffffffffffffffff811115610f31575f80fd5b6020830191508360208260051b8501011115610f4b575f80fd5b9250929050565b5f805f8060408587031215610f65575f80fd5b843567ffffffffffffffff811115610f7b575f80fd5b610f8787828801610f0a565b909550935050602085013567ffffffffffffffff811115610fa6575f80fd5b610fb287828801610f0a565b95989497509550505050565b5f8083601f840112610fce575f80fd5b50813567ffffffffffffffff811115610fe5575f80fd5b602083019150836020828501011115610f4b575f80fd5b5f806020838503121561100d575f80fd5b823567ffffffffffffffff811115611023575f80fd5b61102f85828601610fbe565b90969095509350505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610a28575f80fd5b5f805f805f60808688031215611070575f80fd5b853594506020860135935060408601356110898161103b565b9250606086013567ffffffffffffffff8111156110a4575f80fd5b6110b088828901610fbe565b969995985093965092949392505050565b5f602082840312156110d1575f80fd5b8135610cd08161103b565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f61116260e08301896110dc565b828103604084015261117481896110dc565b6060840188905273ffffffffffffffffffffffffffffffffffffffff8716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b818110156111d65783518352602093840193909201916001016111b8565b50909b9a5050505050505050505050565b60ff81168114610a28575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040516060810167ffffffffffffffff81118282101715611245576112456111f5565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611292576112926111f5565b604052919050565b5f67ffffffffffffffff8211156112b3576112b36111f5565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b5f82601f8301126112ee575f80fd5b81356113016112fc8261129a565b61124b565b818152846020838601011115611315575f80fd5b816020850160208301375f918101602001919091529392505050565b5f805f8060808587031215611344575f80fd5b843593506020850135611356816111e7565b925060408501356113668161103b565b9150606085013567ffffffffffffffff811115611381575f80fd5b61138d878288016112df565b91505092959194509250565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f602082840312156113d6575f80fd5b81358015158114610cd0575f80fd5b80356113f08161103b565b919050565b5f8060408385031215611406575f80fd5b823567ffffffffffffffff81111561141c575f80fd5b8301601f8101851361142c575f80fd5b803567ffffffffffffffff811115611446576114466111f5565b8060051b6114566020820161124b565b91825260208184018101929081019088841115611471575f80fd5b6020850194505b8385101561149f578435925061148d8361103b565b82825260209485019490910190611478565b80965050505050506114b3602084016113e5565b90509250929050565b5f602082840312156114cc575f80fd5b813567ffffffffffffffff8111156114e2575f80fd5b8201604081850312156114f3575f80fd5b6040805190810167ffffffffffffffff81118282101715611516576115166111f5565b604052813567ffffffffffffffff81111561152f575f80fd5b61153b868285016112df565b825250602082013567ffffffffffffffff811115611557575f80fd5b611563868285016112df565b602083015250949350505050565b80516113f0816111e7565b5f6020828403121561158c575f80fd5b815167ffffffffffffffff8111156115a2575f80fd5b8201606081850312156115b3575f80fd5b6115bb611222565b81516115c68161103b565b8152602082015167ffffffffffffffff8111156115e1575f80fd5b8201601f810186136115f1575f80fd5b80516115ff6112fc8261129a565b818152876020838501011115611613575f80fd5b8160208401602083015e5f6020838301015280602085015250505061163a60408301611571565b604082015294935050505056fea264697066735822122032bca89fce2f3bb99b837cc5cdf14197bc0e5dc59150ba871f24c9de6291396864736f6c634300081a0033",s=class s extends g.DeployableTarget{constructor(){super(...arguments),this.abi=e._}async signers(f,a){return await e.kk(this._config,{address:this.assertValidAddress(),args:[f],...a})}async hashSignerData(f,a){return await e.Hk(this._config,{address:this.assertValidAddress(),args:[f.boostId,f.incentiveQuantity,f.claimant,f.incentiveData],...a})}async validate(f,a){return await this.awaitResult(this.validateRaw(f,a))}async validateRaw(f,a){const{request:b,result:d}=await e.iP(this._config,{address:this.assertValidAddress(),args:[f.boostId,f.incentiveId,f.claimant,f.claimData],...this.optionallyAttachAccount(),...a});return{hash:await e.$k(this._config,b),result:d}}async setAuthorized(f,a,b){return await this.awaitResult(this.setAuthorizedRaw(f,a,b))}async setAuthorizedRaw(f,a,b){const{request:d,result:c}=await e.tP(this._config,{address:this.assertValidAddress(),args:[f,a],...this.optionallyAttachAccount(),...b});return{hash:await e.Uk(this._config,d),result:c}}async setValidatorCallerRaw(f,a){const{request:b,result:d}=await e.nP(this._config,{address:this.assertValidAddress(),args:[f],...this.optionallyAttachAccount(),...a});return{hash:await e.Zk(this._config,b),result:d}}async setValidatorCaller(f,a){return await this.awaitResult(this.setValidatorCallerRaw(f,a))}async encodeClaimData(f){return await o({...f,validator:this.assertValidAddress()})}buildParameters(f,a){const[b,d]=this.validateDeploymentConfig(f,a);return{abi:e._,bytecode:A,args:[u(b)],...this.optionallyAttachAccount(d.account)}}};s.bases={31337:void 0,...p.SignerValidator},s.registryType=m.RegistryType.VALIDATOR;let i=s;async function o({signer:t,incentiveData:f,chainId:a,validator:b,incentiveQuantity:d,claimant:c,boostId:n}){const y=await t.privateKey.signTypedData({domain:{name:"SignerValidator",version:"1",chainId:a,verifyingContract:b},types:{SignerValidatorData:[{name:"boostId",type:"uint256"},{name:"incentiveQuantity",type:"uint8"},{name:"claimant",type:"address"},{name:"incentiveData",type:"bytes"}]},primaryType:"SignerValidatorData",message:{boostId:n,incentiveQuantity:d,claimant:c,incentiveData:f}}),h=l({signer:t.account,signature:y,incentiveQuantity:d});return r.encodeAbiParameters([{type:"tuple",name:"BoostClaimData",components:[{type:"bytes",name:"validatorData"},{type:"bytes",name:"incentiveData"}]}],[{validatorData:h,incentiveData:f}])}function l({signer:t,signature:f,incentiveQuantity:a}){return r.encodeAbiParameters([{type:"tuple",name:"SignerValidatorInputParams",components:[{type:"address",name:"signer"},{type:"bytes",name:"signature"},{type:"uint8",name:"incentiveQuantity"}]}],[{signer:t,signature:f,incentiveQuantity:a}])}function u({signers:t,validatorCaller:f}){return r.encodeAbiParameters([{type:"address[]",name:"signers"},{type:"address",name:"validatorCaller"}],[t,f])}exports.signerValidatorAbi=e._;exports.SignerValidator=i;exports.prepareSignerValidatorClaimDataPayload=o;exports.prepareSignerValidatorInputParams=l;exports.prepareSignerValidatorPayload=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../generated-BPiHi7W2.cjs"),r=require("viem"),p=require("../deployments-CIXw_WKk.cjs"),g=require("../Deployable/DeployableTarget.cjs"),m=require("../utils.cjs"),A="0x610120604052348015610010575f80fd5b50306080524660a0525f60c081905260e081905261010052610030610035565b610096565b63409feecd19805460018116156100535763f92ee8a95f526004601cfd5b8160c01c808260011c14610091578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b60805160a05160c05160e0516101005161167d6100c45f395f50505f50505f50505f50505f505061167d5ff3fe6080604052600436106100ef575f3560e01c8063736c0d5b11610087578063d3de6e7511610057578063d3de6e7514610293578063f04e283e146102c0578063f2fde38b146102d3578063fee81cf4146102e6575f80fd5b8063736c0d5b146101cc57806384b0196e146101fa5780638da5cb5b14610221578063a1d2756f14610274575f80fd5b8063439fab91116100c2578063439fab911461018a57806354d1f13d146101a9578063703b6900146101b1578063715018a6146101c4575f80fd5b806301ffc9a7146100f3578063256929621461012757806328d6183b146101315780634359d28a1461016b575b5f80fd5b3480156100fe575f80fd5b5061011261010d366004610ecb565b610317565b60405190151581526020015b60405180910390f35b61012f610372565b005b34801561013c575f80fd5b506040517fb8ce7b2200000000000000000000000000000000000000000000000000000000815260200161011e565b348015610176575f80fd5b5061012f610185366004610f52565b6103bf565b348015610195575f80fd5b5061012f6101a4366004610ffc565b6104bb565b61012f61068c565b6101126101bf36600461105c565b6106c5565b61012f610851565b3480156101d7575f80fd5b506101126101e63660046110c1565b5f6020819052908152604090205460ff1681565b348015610205575f80fd5b5061020e610864565b60405161011e9796959493929190611128565b34801561022c575f80fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275460405173ffffffffffffffffffffffffffffffffffffffff909116815260200161011e565b34801561027f575f80fd5b5061012f61028e3660046110c1565b61090c565b34801561029e575f80fd5b506102b26102ad366004611331565b61095b565b60405190815260200161011e565b61012f6102ce3660046110c1565b6109ee565b61012f6102e13660046110c1565b610a2b565b3480156102f1575f80fd5b506102b26103003660046110c1565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fb8ce7b2200000000000000000000000000000000000000000000000000000000148061036c575061036c82610a51565b92915050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b6103c7610aa6565b828114610400576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b838110156104b45782828281811061041c5761041c611399565b905060200201602081019061043191906113c6565b5f8087878581811061044557610445611399565b905060200201602081019061045a91906110c1565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f2080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101610402565b5050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf601132805460038255801561050c5760018160011c14303b106105035763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f8061051b848601866113f5565b91509150610541825f8151811061053457610534611399565b6020026020010151610adb565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161790555f5b82518110156106065760015f808584815181106105a2576105a2611399565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040015f2080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101610583565b5060405173ffffffffffffffffffffffffffffffffffffffff821681527f8098ebafc4f95fe5a577ff9be7c88d4445b6ef0acf915dad2b538c81b0384d7c9060200160405180910390a150508015610687576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b6002545f9073ffffffffffffffffffffffffffffffffffffffff163314610718576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610725838501856114bc565b90505f815f015180602001905181019061073f919061157c565b90505f61075689836040015189866020015161095b565b905087826040015160ff16116107ae5760408083015190517f17c66bc700000000000000000000000000000000000000000000000000000000815260ff90911660048201526024810189905260440160405180910390fd5b815173ffffffffffffffffffffffffffffffffffffffff165f9081526020819052604090205460ff1661080d576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108196001828a610b3e565b602082015182516108449173ffffffffffffffffffffffffffffffffffffffff909116908390610bcc565b9998505050505050505050565b610859610aa6565b6108625f610cd7565b565b7f0f000000000000000000000000000000000000000000000000000000000000006060805f8080836108fa604080518082018252600f81527f5369676e657256616c696461746f7200000000000000000000000000000000006020808301919091528251808401909352600183527f31000000000000000000000000000000000000000000000000000000000000009083015291565b97989097965046955030945091925090565b610914610aa6565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b8051602080830191909120604080517ffea51d5bd45bcd3c2ecc3679b43a3b80b0bd0923f8c16f822455b8cdecd9852f93810193909352820186905260ff8516606083015273ffffffffffffffffffffffffffffffffffffffff8416608083015260a08201525f906109e59060c00160405160208183030381529060405280519060200120610d3c565b95945050505050565b6109f6610aa6565b63389a75e1600c52805f526020600c208054421115610a1c57636f5e88185f526004601cfd5b5f9055610a2881610cd7565b50565b610a33610aa6565b8060601b610a4857637448fbae5f526004601cfd5b610a2881610cd7565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f5912b89c00000000000000000000000000000000000000000000000000000000148061036c575061036c82610d68565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610862576382b429005f526004601cfd5b73ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b7f3f57fc5c000000000000000000000000000000000000000000000000000000007f4de1225a000000000000000000000000000000000000000000000000000000006007831115610b9557815f528260045260245ffd5b84602052835f5260405f206001841b81541880851c6001166001188015610bc257835f528560045260245ffd5b5090555050505050565b73ffffffffffffffffffffffffffffffffffffffff909216915f8315610cd057604051835f5260208301516040526040835103610c45576040830151601b8160ff1c016020528060011b60011c606052506020600160805f60015afa805186183d1517610c4357505f606052604052506001610cd0565b505b6041835103610c885760608301515f1a60205260408301516060526020600160805f60015afa805186183d1517610c8657505f606052604052506001610cd0565b505b5f60605280604052631626ba7e60e01b808252846004830152602482016040815284516020018060448501828860045afa505060208160443d01858a5afa9051909114169150505b9392505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f610d45610dfe565b6719010000000000005f908152601a91909152603a928352604260182092525090565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d00000000000000000000000000000000000000000000000000000000148061036c57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461036c565b5f805f80610e70604080518082018252600f81527f5369676e657256616c696461746f7200000000000000000000000000000000006020808301919091528251808401909352600183527f31000000000000000000000000000000000000000000000000000000000000009083015291565b8151602092830120815191830191909120604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8152938401929092529082015246606082015230608082015260a09020949350505050565b5f60208284031215610edb575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610cd0575f80fd5b5f8083601f840112610f1a575f80fd5b50813567ffffffffffffffff811115610f31575f80fd5b6020830191508360208260051b8501011115610f4b575f80fd5b9250929050565b5f805f8060408587031215610f65575f80fd5b843567ffffffffffffffff811115610f7b575f80fd5b610f8787828801610f0a565b909550935050602085013567ffffffffffffffff811115610fa6575f80fd5b610fb287828801610f0a565b95989497509550505050565b5f8083601f840112610fce575f80fd5b50813567ffffffffffffffff811115610fe5575f80fd5b602083019150836020828501011115610f4b575f80fd5b5f806020838503121561100d575f80fd5b823567ffffffffffffffff811115611023575f80fd5b61102f85828601610fbe565b90969095509350505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610a28575f80fd5b5f805f805f60808688031215611070575f80fd5b853594506020860135935060408601356110898161103b565b9250606086013567ffffffffffffffff8111156110a4575f80fd5b6110b088828901610fbe565b969995985093965092949392505050565b5f602082840312156110d1575f80fd5b8135610cd08161103b565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f61116260e08301896110dc565b828103604084015261117481896110dc565b6060840188905273ffffffffffffffffffffffffffffffffffffffff8716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b818110156111d65783518352602093840193909201916001016111b8565b50909b9a5050505050505050505050565b60ff81168114610a28575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040516060810167ffffffffffffffff81118282101715611245576112456111f5565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611292576112926111f5565b604052919050565b5f67ffffffffffffffff8211156112b3576112b36111f5565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b5f82601f8301126112ee575f80fd5b81356113016112fc8261129a565b61124b565b818152846020838601011115611315575f80fd5b816020850160208301375f918101602001919091529392505050565b5f805f8060808587031215611344575f80fd5b843593506020850135611356816111e7565b925060408501356113668161103b565b9150606085013567ffffffffffffffff811115611381575f80fd5b61138d878288016112df565b91505092959194509250565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f602082840312156113d6575f80fd5b81358015158114610cd0575f80fd5b80356113f08161103b565b919050565b5f8060408385031215611406575f80fd5b823567ffffffffffffffff81111561141c575f80fd5b8301601f8101851361142c575f80fd5b803567ffffffffffffffff811115611446576114466111f5565b8060051b6114566020820161124b565b91825260208184018101929081019088841115611471575f80fd5b6020850194505b8385101561149f578435925061148d8361103b565b82825260209485019490910190611478565b80965050505050506114b3602084016113e5565b90509250929050565b5f602082840312156114cc575f80fd5b813567ffffffffffffffff8111156114e2575f80fd5b8201604081850312156114f3575f80fd5b6040805190810167ffffffffffffffff81118282101715611516576115166111f5565b604052813567ffffffffffffffff81111561152f575f80fd5b61153b868285016112df565b825250602082013567ffffffffffffffff811115611557575f80fd5b611563868285016112df565b602083015250949350505050565b80516113f0816111e7565b5f6020828403121561158c575f80fd5b815167ffffffffffffffff8111156115a2575f80fd5b8201606081850312156115b3575f80fd5b6115bb611222565b81516115c68161103b565b8152602082015167ffffffffffffffff8111156115e1575f80fd5b8201601f810186136115f1575f80fd5b80516115ff6112fc8261129a565b818152876020838501011115611613575f80fd5b8160208401602083015e5f6020838301015280602085015250505061163a60408301611571565b604082015294935050505056fea264697066735822122032bca89fce2f3bb99b837cc5cdf14197bc0e5dc59150ba871f24c9de6291396864736f6c634300081a0033",s=class s extends g.DeployableTarget{constructor(){super(...arguments),this.abi=e._}async signers(f,a){return await e.kk(this._config,{address:this.assertValidAddress(),args:[f],...a})}async hashSignerData(f,a){return await e.Hk(this._config,{address:this.assertValidAddress(),args:[f.boostId,f.incentiveQuantity,f.claimant,f.incentiveData],...a})}async validate(f,a){return await this.awaitResult(this.validateRaw(f,a))}async validateRaw(f,a){const{request:b,result:d}=await e.iP(this._config,{address:this.assertValidAddress(),args:[f.boostId,f.incentiveId,f.claimant,f.claimData],...this.optionallyAttachAccount(),...a});return{hash:await e.$k(this._config,b),result:d}}async setAuthorized(f,a,b){return await this.awaitResult(this.setAuthorizedRaw(f,a,b))}async setAuthorizedRaw(f,a,b){const{request:d,result:c}=await e.tP(this._config,{address:this.assertValidAddress(),args:[f,a],...this.optionallyAttachAccount(),...b});return{hash:await e.Uk(this._config,d),result:c}}async setValidatorCallerRaw(f,a){const{request:b,result:d}=await e.nP(this._config,{address:this.assertValidAddress(),args:[f],...this.optionallyAttachAccount(),...a});return{hash:await e.Zk(this._config,b),result:d}}async setValidatorCaller(f,a){return await this.awaitResult(this.setValidatorCallerRaw(f,a))}async encodeClaimData(f){return await o({...f,validator:this.assertValidAddress()})}buildParameters(f,a){const[b,d]=this.validateDeploymentConfig(f,a);return{abi:e._,bytecode:A,args:[u(b)],...this.optionallyAttachAccount(d.account)}}};s.bases={31337:void 0,...p.SignerValidator},s.registryType=m.RegistryType.VALIDATOR;let i=s;async function o({signer:t,incentiveData:f,chainId:a,validator:b,incentiveQuantity:d,claimant:c,boostId:n}){const y=await t.privateKey.signTypedData({domain:{name:"SignerValidator",version:"1",chainId:a,verifyingContract:b},types:{SignerValidatorData:[{name:"boostId",type:"uint256"},{name:"incentiveQuantity",type:"uint8"},{name:"claimant",type:"address"},{name:"incentiveData",type:"bytes"}]},primaryType:"SignerValidatorData",message:{boostId:n,incentiveQuantity:d,claimant:c,incentiveData:f}}),h=l({signer:t.account,signature:y,incentiveQuantity:d});return r.encodeAbiParameters([{type:"tuple",name:"BoostClaimData",components:[{type:"bytes",name:"validatorData"},{type:"bytes",name:"incentiveData"}]}],[{validatorData:h,incentiveData:f}])}function l({signer:t,signature:f,incentiveQuantity:a}){return r.encodeAbiParameters([{type:"tuple",name:"SignerValidatorInputParams",components:[{type:"address",name:"signer"},{type:"bytes",name:"signature"},{type:"uint8",name:"incentiveQuantity"}]}],[{signer:t,signature:f,incentiveQuantity:a}])}function u({signers:t,validatorCaller:f}){return r.encodeAbiParameters([{type:"address[]",name:"signers"},{type:"address",name:"validatorCaller"}],[t,f])}exports.signerValidatorAbi=e._;exports.SignerValidator=i;exports.prepareSignerValidatorClaimDataPayload=o;exports.prepareSignerValidatorInputParams=l;exports.prepareSignerValidatorPayload=u;
2
2
  //# sourceMappingURL=SignerValidator.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"SignerValidator.cjs","sources":["../../src/Validators/SignerValidator.ts"],"sourcesContent":["import {\n readSignerValidatorHashSignerData,\n readSignerValidatorSigners,\n signerValidatorAbi,\n simulateSignerValidatorSetAuthorized,\n simulateSignerValidatorSetValidatorCaller,\n simulateSignerValidatorValidate,\n writeSignerValidatorSetAuthorized,\n writeSignerValidatorSetValidatorCaller,\n writeSignerValidatorValidate,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/validators/SignerValidator.sol/SignerValidator.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n type PrivateKeyAccount,\n encodeAbiParameters,\n} from 'viem';\nimport { SignerValidator as SignerValidatorBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { signerValidatorAbi };\n\n/**\n * Object reprentation of a {@link SignerValidator} initialization payload\n *\n * @export\n * @interface SignerValidatorPayload\n * @typedef {SignerValidatorPayload}\n */\nexport interface SignerValidatorPayload {\n /**\n * The list of authorized signers. The first address in the list will be the initial owner of the contract.\n *\n * @type {Address[]}\n */\n signers: Address[];\n /**\n * The authorized caller of the {@link prepareSignerValidator} function\n * @type {Address}\n */\n validatorCaller: Address;\n}\n\n/**\n * Description placeholder\n *\n * @export\n * @interface SignerValidatorValidatePayload\n * @typedef {SignerValidatorValidatePayload}\n */\nexport interface SignerValidatorValidatePayload {\n /**\n * The ID of the boost.\n *\n * @type {bigint}\n */\n boostId: bigint;\n /**\n * The ID of the incentive.\n *\n * @type {bigint}\n */\n incentiveId: bigint;\n /**\n * The address of the claimant.\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The claim data.\n *\n * @type {Hex}\n */\n claimData: Hex;\n}\n\n/**\n * Object reprentation of a {@link SignerValidator} initialization payload\n *\n * @export\n * @interface SignerValidatorPayload\n * @typedef {SignerValidatorPayload}\n */\nexport interface SignerValidatorPayload {\n /**\n * The list of authorized signers. The first address in the list will be the initial owner of the contract.\n *\n * @type {Address[]}\n */\n signers: Address[];\n /**\n * The authorized caller of the {@link prepareSignerValidator} function\n * @type {Address}\n */\n validatorCaller: Address;\n}\n\n/**\n * Description placeholder\n *\n * @export\n * @interface SignerValidatorValidatePayload\n * @typedef {SignerValidatorValidatePayload}\n */\nexport interface SignerValidatorValidatePayload {\n /**\n * The ID of the boost.\n *\n * @type {bigint}\n */\n boostId: bigint;\n /**\n * The ID of the incentive.\n *\n * @type {bigint}\n */\n incentiveId: bigint;\n /**\n * The address of the claimant.\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The claim data.\n *\n * @type {Hex}\n */\n claimData: Hex;\n}\n\n/**\n * Signer Validator Claim Data Payload\n *\n * @export\n * @interface SignerValidatorClaimDataParams\n * @typedef {SignerValidatorClaimDataParams}\n */\nexport interface SignerValidatorClaimDataParams {\n /**\n * The signer with which to sign the input\n *\n * @type {{\n * account: Address;\n * key: Hex;\n * privateKey: PrivateKeyAccount;\n * }}\n */\n signer: {\n account: Address;\n key: Hex;\n privateKey: PrivateKeyAccount;\n };\n /**\n * The encoded data to provide the underlying incentive. You can use {@link prepareAllowListIncentivePayload}, {@link prepareCGDAIncentivePayload}, {@link prepareERC20IncentivePayload}, {@link prepareERC1155IncentivePayload}, or {@link preparePointsIncentivePayload}\n *\n * @type {Hex}\n */\n incentiveData: Hex;\n /**\n * The chain id to target\n *\n * @type {number}\n */\n chainId: number;\n /**\n * The address of the validator\n *\n * @type {Address}\n */\n validator: Address;\n /**\n * The total number of incentives on the Boost\n *\n * @type {number}\n */\n incentiveQuantity: number;\n /**\n * The address of the claimant\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The ID of the boost\n *\n * @type {bigint}\n */\n boostId: bigint;\n}\n\n/**\n * Object representation of a {@link SignerValidatorInputParams} initialization payload\n *\n * @export\n * @interface SignerValidatorInputParams\n * @typedef {SignerValidatorInputParams}\n */\nexport interface SignerValidatorInputParams {\n /**\n * The signer address.\n *\n * @type {Address}\n */\n signer: Address;\n\n /**\n * The signature data.\n *\n * @type {string}\n */\n signature: Hex;\n\n /**\n * The total number of incentives on the Boost\n *\n * @type {number}\n */\n incentiveQuantity: number;\n}\n\n/**\n * Object representing the payload for signing before validaton.\n *\n * @export\n * @interface SignerValidatorSignaturePayload\n * @typedef {SignerValidatorSignaturePayload}\n */\nexport interface SignerValidatorSignaturePayload {\n /**\n * The ID of the boost.\n *\n * @type {bigint}\n */\n boostId: bigint;\n /**\n * The ID of the incentive.\n *\n * @type {number}\n */\n incentiveQuantity: number;\n /**\n * The address of the claimant.\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The claim data.\n *\n * @type {Hex}\n */\n incentiveData: Hex;\n}\n\n/**\n * A generic `viem.Log` event with support for `BoostCore` event types.\n *\n * @export\n * @typedef {SignerValidatorLog}\n * @template {ContractEventName<\n * typeof signerValidatorAbi\n * >} [event=ContractEventName<typeof signerValidatorAbi>]\n */\nexport type SignerValidatorLog<\n event extends ContractEventName<\n typeof signerValidatorAbi\n > = ContractEventName<typeof signerValidatorAbi>,\n> = GenericLog<typeof signerValidatorAbi, event>;\n\n/**\n * A simple implementation of a Validator that verifies a given signature and checks the recovered address against a set of authorized signers\n *\n * @export\n * @class SignerValidator\n * @typedef {SignerValidator}\n * @extends {DeployableTarget<SignerValidatorPayload>}\n */\nexport class SignerValidator extends DeployableTarget<\n SignerValidatorPayload,\n typeof signerValidatorAbi\n> {\n /**\n * @inheritdoc\n *\n * @public\n * @readonly\n * @type {*}\n */\n public override readonly abi = signerValidatorAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n 31337: import.meta.env.VITE_SIGNER_VALIDATOR_BASE,\n ...(SignerValidatorBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.VALIDATOR;\n\n /**\n * The set of authorized signers\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>}\n */\n public async signers(address: Address, params?: ReadParams) {\n return await readSignerValidatorSigners(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Retrieve the hash and signer data for a given hash\n *\n * @public\n * @async\n * @param {SignerValidatorSignaturePayload} payload\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex>}\n */\n public async hashSignerData(\n payload: SignerValidatorSignaturePayload,\n params?: ReadParams,\n ) {\n return await readSignerValidatorHashSignerData(this._config, {\n address: this.assertValidAddress(),\n args: [\n payload.boostId,\n payload.incentiveQuantity,\n payload.claimant,\n payload.incentiveData,\n ],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Validate that the action has been completed successfully. The data payload is expected to be a tuple of (address signer, bytes32 hash, bytes signature). The signature is expected to be a valid ECDSA or EIP-1271 signature of a unique hash by an authorized signer.\n *\n * @public\n * @async\n * @param {SignerValidatorValidatePayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the action has been validated based on the data payload\n */\n protected async validate(\n payload: SignerValidatorValidatePayload,\n params?: WriteParams,\n ) {\n return await this.awaitResult(this.validateRaw(payload, params));\n }\n\n /**\n * Validate that the action has been completed successfully. The data payload is expected to be a tuple of (address signer, bytes32 hash, bytes signature). The signature is expected to be a valid ECDSA or EIP-1271 signature of a unique hash by an authorized signer.\n *\n * @public\n * @async\n * @param {SignerValidatorValidatePayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the action has been validated based on the data payload\n */\n protected async validateRaw(\n payload: SignerValidatorValidatePayload,\n params?: ReadParams,\n ) {\n const { request, result } = await simulateSignerValidatorValidate(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [\n payload.boostId,\n payload.incentiveId,\n payload.claimant,\n payload.claimData,\n ],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorValidate(this._config, request);\n return { hash, result };\n }\n\n /**\n * Set the authorized status of a signer\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of signers to update\n * @param {boolean[]} allowed - The authorized status of each signer\n * @param {?WriteParams} [params]\n * @returns {Promise<void>}\n */\n public async setAuthorized(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams,\n ) {\n return await this.awaitResult(\n this.setAuthorizedRaw(addresses, allowed, params),\n );\n }\n\n /**\n * Set the authorized status of a signer\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of signers to update\n * @param {boolean[]} allowed - The authorized status of each signer\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async setAuthorizedRaw(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams,\n ) {\n const { request, result } = await simulateSignerValidatorSetAuthorized(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [addresses, allowed],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorSetAuthorized(this._config, request);\n return { hash, result };\n }\n\n /**\n * Update the authorized caller of the validator function\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async setValidatorCallerRaw(address: Address, params?: WriteParams) {\n const { request, result } = await simulateSignerValidatorSetValidatorCaller(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [address],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorSetValidatorCaller(\n this._config,\n request,\n );\n return { hash, result };\n }\n\n /**\n * Update the authorized caller of the validator function\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?WriteParams} [params]\n * @returns {Promise<void>}\n */\n public async setValidatorCaller(address: Address, params?: WriteParams) {\n return await this.awaitResult(this.setValidatorCallerRaw(address, params));\n }\n\n /**\n * Properly encodes the data needed to claim\n *\n * @public\n * @async\n * @param {SignerValidatorClaimDataParams} params\n * @returns {Promise<Hex>}\n */\n public async encodeClaimData(\n params: Omit<SignerValidatorClaimDataParams, 'validator'>,\n ): Promise<Hex> {\n return await prepareSignerValidatorClaimDataPayload({\n ...params,\n validator: this.assertValidAddress(),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?SignerValidatorPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: SignerValidatorPayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: signerValidatorAbi,\n bytecode: bytecode as Hex,\n args: [prepareSignerValidatorPayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Signer Validator Claim Data Payload Preparation\n *\n * @export\n * @async\n * @param {SignerValidatorClaimDataParams} param0\n * @param {{ account: Address; key: Hex; privateKey: PrivateKeyAccount; }} param0.signer\n * @param {Hex} param0.incentiveData\n * @param {number} param0.chainId\n * @param {Address} param0.validator\n * @param {number} param0.incentiveQuantity\n * @param {Address} param0.claimant\n * @param {bigint} param0.boostId\n * @returns {Promise<Hex>}\n */\nexport async function prepareSignerValidatorClaimDataPayload({\n signer,\n incentiveData,\n chainId,\n validator,\n incentiveQuantity,\n claimant,\n boostId,\n}: SignerValidatorClaimDataParams): Promise<Hex> {\n const trustedSignature = await signer.privateKey.signTypedData({\n domain: {\n name: 'SignerValidator',\n version: '1',\n chainId: chainId,\n verifyingContract: validator,\n },\n types: {\n SignerValidatorData: [\n { name: 'boostId', type: 'uint256' },\n { name: 'incentiveQuantity', type: 'uint8' },\n { name: 'claimant', type: 'address' },\n { name: 'incentiveData', type: 'bytes' },\n ],\n },\n primaryType: 'SignerValidatorData' as const,\n message: {\n boostId,\n incentiveQuantity,\n claimant,\n incentiveData: incentiveData,\n },\n });\n\n // Prepare the claim data payload using the new helper\n const validatorData = prepareSignerValidatorInputParams({\n signer: signer.account,\n signature: trustedSignature,\n incentiveQuantity, // Adjust incentive quantity as necessary\n });\n\n const boostClaimDataPayload = encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'BoostClaimData',\n components: [\n { type: 'bytes', name: 'validatorData' },\n { type: 'bytes', name: 'incentiveData' },\n ],\n },\n ],\n [{ validatorData, incentiveData }],\n );\n\n return boostClaimDataPayload;\n}\n\n/**\n * Given a {@link SignerValidatorInputParams}, properly encode the initialization payload.\n *\n * @param {SignerValidatorInputParams} param0\n * @param {Address} param0.signer\n * @param {Hex} param0.signature\n * @param {number} param0.incentiveQuantity\n * @returns {Hex}\n */\nexport function prepareSignerValidatorInputParams({\n signer,\n signature,\n incentiveQuantity,\n}: SignerValidatorInputParams) {\n return encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'SignerValidatorInputParams',\n components: [\n { type: 'address', name: 'signer' },\n { type: 'bytes', name: 'signature' },\n { type: 'uint8', name: 'incentiveQuantity' },\n ],\n },\n ],\n [{ signer, signature, incentiveQuantity }],\n );\n}\n\n/**\n * Given a {@link SignerValidatorPayload}, properly encode the initialization payload.\n *\n * @param {SignerValidatorPayload} param0\n * @param {Address[]} param0.signers\n * @param {Address} param0.validatorCaller\n * @returns {Hex}\n */\nexport function prepareSignerValidatorPayload({\n signers,\n validatorCaller,\n}: SignerValidatorPayload) {\n return encodeAbiParameters(\n [\n { type: 'address[]', name: 'signers' },\n { type: 'address', name: 'validatorCaller' },\n ],\n [signers, validatorCaller],\n );\n}\n"],"names":["_SignerValidator","DeployableTarget","signerValidatorAbi","address","params","readSignerValidatorSigners","payload","readSignerValidatorHashSignerData","request","result","simulateSignerValidatorValidate","writeSignerValidatorValidate","addresses","allowed","simulateSignerValidatorSetAuthorized","writeSignerValidatorSetAuthorized","simulateSignerValidatorSetValidatorCaller","writeSignerValidatorSetValidatorCaller","prepareSignerValidatorClaimDataPayload","_payload","_options","options","bytecode","prepareSignerValidatorPayload","SignerValidatorBases","RegistryType","SignerValidator","signer","incentiveData","chainId","validator","incentiveQuantity","claimant","boostId","trustedSignature","validatorData","prepareSignerValidatorInputParams","encodeAbiParameters","signature","signers","validatorCaller"],"mappings":"24XAmSaA,EAAN,MAAMA,UAAwBC,EAAAA,gBAGnC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAWL,KAAyB,IAAMC,GAAA,CA8B/B,MAAa,QAAQC,EAAkBC,EAAqB,CACnD,OAAA,MAAMC,EAAAA,GAA2B,K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QAAAG,EACA,kBAAAF,EACA,SAAAC,EACA,cAAAJ,CACF,CAAA,CACD,EAGKO,EAAgBC,EAAkC,CACtD,OAAQT,EAAO,QACf,UAAWO,EACX,kBAAAH,CAAA,CACD,EAgBM,OAduBM,EAAA,oBAC5B,CACE,CACE,KAAM,QACN,KAAM,iBACN,WAAY,CACV,CAAE,KAAM,QAAS,KAAM,eAAgB,EACvC,CAAE,KAAM,QAAS,KAAM,eAAgB,CACzC,CACF,CACF,EACA,CAAC,CAAE,cAAAF,EAAe,cAAAP,EAAe,CAAA,CAIrC,CAWO,SAASQ,EAAkC,CAChD,OAAAT,EACA,UAAAW,EACA,kBAAAP,CACF,EAA+B,CACtB,OAAAM,EAAA,oBACL,CACE,CACE,KAAM,QACN,KAAM,6BACN,WAAY,CACV,CAAE,KAAM,UAAW,KAAM,QAAS,EAClC,CAAE,KAAM,QAAS,KAAM,WAAY,EACnC,CAAE,KAAM,QAAS,KAAM,mBAAoB,CAC7C,CACF,CACF,EACA,CAAC,CAAE,OAAAV,EAAQ,UAAAW,EAAW,kBAAAP,EAAmB,CAAA,CAE7C,CAUO,SAASR,EAA8B,CAC5C,QAAAgB,EACA,gBAAAC,CACF,EAA2B,CAClB,OAAAH,EAAA,oBACL,CACE,CAAE,KAAM,YAAa,KAAM,SAAU,EACrC,CAAE,KAAM,UAAW,KAAM,iBAAkB,CAC7C,EACA,CAACE,EAASC,CAAe,CAAA,CAE7B"}
1
+ {"version":3,"file":"SignerValidator.cjs","sources":["../../src/Validators/SignerValidator.ts"],"sourcesContent":["import {\n readSignerValidatorHashSignerData,\n readSignerValidatorSigners,\n signerValidatorAbi,\n simulateSignerValidatorSetAuthorized,\n simulateSignerValidatorSetValidatorCaller,\n simulateSignerValidatorValidate,\n writeSignerValidatorSetAuthorized,\n writeSignerValidatorSetValidatorCaller,\n writeSignerValidatorValidate,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/validators/SignerValidator.sol/SignerValidator.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n type PrivateKeyAccount,\n encodeAbiParameters,\n} from 'viem';\nimport { SignerValidator as SignerValidatorBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { signerValidatorAbi };\n\n/**\n * Object reprentation of a {@link SignerValidator} initialization payload\n *\n * @export\n * @interface SignerValidatorPayload\n * @typedef {SignerValidatorPayload}\n */\nexport interface SignerValidatorPayload {\n /**\n * The list of authorized signers. The first address in the list will be the initial owner of the contract.\n *\n * @type {Address[]}\n */\n signers: Address[];\n /**\n * The authorized caller of the {@link prepareSignerValidator} function\n * @type {Address}\n */\n validatorCaller: Address;\n}\n\n/**\n * Description placeholder\n *\n * @export\n * @interface SignerValidatorValidatePayload\n * @typedef {SignerValidatorValidatePayload}\n */\nexport interface SignerValidatorValidatePayload {\n /**\n * The ID of the boost.\n *\n * @type {bigint}\n */\n boostId: bigint;\n /**\n * The ID of the incentive.\n *\n * @type {bigint}\n */\n incentiveId: bigint;\n /**\n * The address of the claimant.\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The claim data.\n *\n * @type {Hex}\n */\n claimData: Hex;\n}\n\n/**\n * Object reprentation of a {@link SignerValidator} initialization payload\n *\n * @export\n * @interface SignerValidatorPayload\n * @typedef {SignerValidatorPayload}\n */\nexport interface SignerValidatorPayload {\n /**\n * The list of authorized signers. The first address in the list will be the initial owner of the contract.\n *\n * @type {Address[]}\n */\n signers: Address[];\n /**\n * The authorized caller of the {@link prepareSignerValidator} function\n * @type {Address}\n */\n validatorCaller: Address;\n}\n\n/**\n * Description placeholder\n *\n * @export\n * @interface SignerValidatorValidatePayload\n * @typedef {SignerValidatorValidatePayload}\n */\nexport interface SignerValidatorValidatePayload {\n /**\n * The ID of the boost.\n *\n * @type {bigint}\n */\n boostId: bigint;\n /**\n * The ID of the incentive.\n *\n * @type {bigint}\n */\n incentiveId: bigint;\n /**\n * The address of the claimant.\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The claim data.\n *\n * @type {Hex}\n */\n claimData: Hex;\n}\n\n/**\n * Signer Validator Claim Data Payload\n *\n * @export\n * @interface SignerValidatorClaimDataParams\n * @typedef {SignerValidatorClaimDataParams}\n */\nexport interface SignerValidatorClaimDataParams {\n /**\n * The signer with which to sign the input\n *\n * @type {{\n * account: Address;\n * key: Hex;\n * privateKey: PrivateKeyAccount;\n * }}\n */\n signer: {\n account: Address;\n key: Hex;\n privateKey: PrivateKeyAccount;\n };\n /**\n * The encoded data to provide the underlying incentive. You can use {@link prepareAllowListIncentivePayload}, {@link prepareCGDAIncentivePayload}, {@link prepareERC20IncentivePayload}, {@link prepareERC1155IncentivePayload}, or {@link preparePointsIncentivePayload}\n *\n * @type {Hex}\n */\n incentiveData: Hex;\n /**\n * The chain id to target\n *\n * @type {number}\n */\n chainId: number;\n /**\n * The address of the validator\n *\n * @type {Address}\n */\n validator: Address;\n /**\n * The total number of incentives on the Boost\n *\n * @type {number}\n */\n incentiveQuantity: number;\n /**\n * The address of the claimant\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The ID of the boost\n *\n * @type {bigint}\n */\n boostId: bigint;\n}\n\n/**\n * Object representation of a {@link SignerValidatorInputParams} initialization payload\n *\n * @export\n * @interface SignerValidatorInputParams\n * @typedef {SignerValidatorInputParams}\n */\nexport interface SignerValidatorInputParams {\n /**\n * The signer address.\n *\n * @type {Address}\n */\n signer: Address;\n\n /**\n * The signature data.\n *\n * @type {string}\n */\n signature: Hex;\n\n /**\n * The total number of incentives on the Boost\n *\n * @type {number}\n */\n incentiveQuantity: number;\n}\n\n/**\n * Object representing the payload for signing before validaton.\n *\n * @export\n * @interface SignerValidatorSignaturePayload\n * @typedef {SignerValidatorSignaturePayload}\n */\nexport interface SignerValidatorSignaturePayload {\n /**\n * The ID of the boost.\n *\n * @type {bigint}\n */\n boostId: bigint;\n /**\n * The ID of the incentive.\n *\n * @type {number}\n */\n incentiveQuantity: number;\n /**\n * The address of the claimant.\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The claim data.\n *\n * @type {Hex}\n */\n incentiveData: Hex;\n}\n\n/**\n * A generic `viem.Log` event with support for `BoostCore` event types.\n *\n * @export\n * @typedef {SignerValidatorLog}\n * @template {ContractEventName<\n * typeof signerValidatorAbi\n * >} [event=ContractEventName<typeof signerValidatorAbi>]\n */\nexport type SignerValidatorLog<\n event extends ContractEventName<\n typeof signerValidatorAbi\n > = ContractEventName<typeof signerValidatorAbi>,\n> = GenericLog<typeof signerValidatorAbi, event>;\n\n/**\n * A simple implementation of a Validator that verifies a given signature and checks the recovered address against a set of authorized signers\n *\n * @export\n * @class SignerValidator\n * @typedef {SignerValidator}\n * @extends {DeployableTarget<SignerValidatorPayload>}\n */\nexport class SignerValidator extends DeployableTarget<\n SignerValidatorPayload,\n typeof signerValidatorAbi\n> {\n /**\n * @inheritdoc\n *\n * @public\n * @readonly\n * @type {*}\n */\n public override readonly abi = signerValidatorAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n 31337: import.meta.env.VITE_SIGNER_VALIDATOR_BASE,\n ...(SignerValidatorBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.VALIDATOR;\n\n /**\n * The set of authorized signers\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>}\n */\n public async signers(address: Address, params?: ReadParams) {\n return await readSignerValidatorSigners(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Retrieve the hash and signer data for a given hash\n *\n * @public\n * @async\n * @param {SignerValidatorSignaturePayload} payload\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex>}\n */\n public async hashSignerData(\n payload: SignerValidatorSignaturePayload,\n params?: ReadParams,\n ) {\n return await readSignerValidatorHashSignerData(this._config, {\n address: this.assertValidAddress(),\n args: [\n payload.boostId,\n payload.incentiveQuantity,\n payload.claimant,\n payload.incentiveData,\n ],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Validate that the action has been completed successfully. The data payload is expected to be a tuple of (address signer, bytes32 hash, bytes signature). The signature is expected to be a valid ECDSA or EIP-1271 signature of a unique hash by an authorized signer.\n *\n * @public\n * @async\n * @param {SignerValidatorValidatePayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the action has been validated based on the data payload\n */\n protected async validate(\n payload: SignerValidatorValidatePayload,\n params?: WriteParams,\n ) {\n return await this.awaitResult(this.validateRaw(payload, params));\n }\n\n /**\n * Validate that the action has been completed successfully. The data payload is expected to be a tuple of (address signer, bytes32 hash, bytes signature). The signature is expected to be a valid ECDSA or EIP-1271 signature of a unique hash by an authorized signer.\n *\n * @public\n * @async\n * @param {SignerValidatorValidatePayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the action has been validated based on the data payload\n */\n protected async validateRaw(\n payload: SignerValidatorValidatePayload,\n params?: WriteParams,\n ) {\n const { request, result } = await simulateSignerValidatorValidate(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [\n payload.boostId,\n payload.incentiveId,\n payload.claimant,\n payload.claimData,\n ],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorValidate(this._config, request);\n return { hash, result };\n }\n\n /**\n * Set the authorized status of a signer\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of signers to update\n * @param {boolean[]} allowed - The authorized status of each signer\n * @param {?WriteParams} [params]\n * @returns {Promise<void>}\n */\n public async setAuthorized(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams,\n ) {\n return await this.awaitResult(\n this.setAuthorizedRaw(addresses, allowed, params),\n );\n }\n\n /**\n * Set the authorized status of a signer\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of signers to update\n * @param {boolean[]} allowed - The authorized status of each signer\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async setAuthorizedRaw(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams,\n ) {\n const { request, result } = await simulateSignerValidatorSetAuthorized(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [addresses, allowed],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorSetAuthorized(this._config, request);\n return { hash, result };\n }\n\n /**\n * Update the authorized caller of the validator function\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async setValidatorCallerRaw(address: Address, params?: WriteParams) {\n const { request, result } = await simulateSignerValidatorSetValidatorCaller(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [address],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorSetValidatorCaller(\n this._config,\n request,\n );\n return { hash, result };\n }\n\n /**\n * Update the authorized caller of the validator function\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?WriteParams} [params]\n * @returns {Promise<void>}\n */\n public async setValidatorCaller(address: Address, params?: WriteParams) {\n return await this.awaitResult(this.setValidatorCallerRaw(address, params));\n }\n\n /**\n * Properly encodes the data needed to claim\n *\n * @public\n * @async\n * @param {SignerValidatorClaimDataParams} params\n * @returns {Promise<Hex>}\n */\n public async encodeClaimData(\n params: Omit<SignerValidatorClaimDataParams, 'validator'>,\n ): Promise<Hex> {\n return await prepareSignerValidatorClaimDataPayload({\n ...params,\n validator: this.assertValidAddress(),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?SignerValidatorPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: SignerValidatorPayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: signerValidatorAbi,\n bytecode: bytecode as Hex,\n args: [prepareSignerValidatorPayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Signer Validator Claim Data Payload Preparation\n *\n * @export\n * @async\n * @param {SignerValidatorClaimDataParams} param0\n * @param {{ account: Address; key: Hex; privateKey: PrivateKeyAccount; }} param0.signer\n * @param {Hex} param0.incentiveData\n * @param {number} param0.chainId\n * @param {Address} param0.validator\n * @param {number} param0.incentiveQuantity\n * @param {Address} param0.claimant\n * @param {bigint} param0.boostId\n * @returns {Promise<Hex>}\n */\nexport async function prepareSignerValidatorClaimDataPayload({\n signer,\n incentiveData,\n chainId,\n validator,\n incentiveQuantity,\n claimant,\n boostId,\n}: SignerValidatorClaimDataParams): Promise<Hex> {\n const trustedSignature = await signer.privateKey.signTypedData({\n domain: {\n name: 'SignerValidator',\n version: '1',\n chainId: chainId,\n verifyingContract: validator,\n },\n types: {\n SignerValidatorData: [\n { name: 'boostId', type: 'uint256' },\n { name: 'incentiveQuantity', type: 'uint8' },\n { name: 'claimant', type: 'address' },\n { name: 'incentiveData', type: 'bytes' },\n ],\n },\n primaryType: 'SignerValidatorData' as const,\n message: {\n boostId,\n incentiveQuantity,\n claimant,\n incentiveData: incentiveData,\n },\n });\n\n // Prepare the claim data payload using the new helper\n const validatorData = prepareSignerValidatorInputParams({\n signer: signer.account,\n signature: trustedSignature,\n incentiveQuantity, // Adjust incentive quantity as necessary\n });\n\n const boostClaimDataPayload = encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'BoostClaimData',\n components: [\n { type: 'bytes', name: 'validatorData' },\n { type: 'bytes', name: 'incentiveData' },\n ],\n },\n ],\n [{ validatorData, incentiveData }],\n );\n\n return boostClaimDataPayload;\n}\n\n/**\n * Given a {@link SignerValidatorInputParams}, properly encode the initialization payload.\n *\n * @param {SignerValidatorInputParams} param0\n * @param {Address} param0.signer\n * @param {Hex} param0.signature\n * @param {number} param0.incentiveQuantity\n * @returns {Hex}\n */\nexport function prepareSignerValidatorInputParams({\n signer,\n signature,\n incentiveQuantity,\n}: SignerValidatorInputParams) {\n return encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'SignerValidatorInputParams',\n components: [\n { type: 'address', name: 'signer' },\n { type: 'bytes', name: 'signature' },\n { type: 'uint8', name: 'incentiveQuantity' },\n ],\n },\n ],\n [{ signer, signature, incentiveQuantity }],\n );\n}\n\n/**\n * Given a {@link SignerValidatorPayload}, properly encode the initialization payload.\n *\n * @param {SignerValidatorPayload} param0\n * @param {Address[]} param0.signers\n * @param {Address} param0.validatorCaller\n * @returns {Hex}\n */\nexport function prepareSignerValidatorPayload({\n signers,\n validatorCaller,\n}: SignerValidatorPayload) {\n return encodeAbiParameters(\n [\n { type: 'address[]', name: 'signers' },\n { type: 'address', name: 'validatorCaller' },\n ],\n [signers, validatorCaller],\n );\n}\n"],"names":["_SignerValidator","DeployableTarget","signerValidatorAbi","address","params","readSignerValidatorSigners","payload","readSignerValidatorHashSignerData","request","result","simulateSignerValidatorValidate","writeSignerValidatorValidate","addresses","allowed","simulateSignerValidatorSetAuthorized","writeSignerValidatorSetAuthorized","simulateSignerValidatorSetValidatorCaller","writeSignerValidatorSetValidatorCaller","prepareSignerValidatorClaimDataPayload","_payload","_options","options","bytecode","prepareSignerValidatorPayload","SignerValidatorBases","RegistryType","SignerValidator","signer","incentiveData","chainId","validator","incentiveQuantity","claimant","boostId","trustedSignature","validatorData","prepareSignerValidatorInputParams","encodeAbiParameters","signature","signers","validatorCaller"],"mappings":"24XAmSaA,EAAN,MAAMA,UAAwBC,EAAAA,gBAGnC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAWL,KAAyB,IAAMC,GAAA,CA8B/B,MAAa,QAAQC,EAAkBC,EAAqB,CACnD,OAAA,MAAMC,EAAAA,GAA2B,KAAK,QAAS,CACpD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACF,CAAO,EAEd,GAAIC,CAAA,CACL,CACH,CAWA,MAAa,eACXE,EACAF,EACA,CACO,OAAA,MAAMG,EAAAA,GAAkC,KAAK,QAAS,CAC3D,QAAS,KAAK,mBAAmB,EACjC,KAAM,CACJD,EAAQ,QACRA,EAAQ,kBACRA,EAAQ,SACRA,EAAQ,aACV,EAEA,GAAIF,CAAA,CACL,CACH,CAWA,MAAgB,SACdE,EACAF,EACA,CACA,OAAO,MAAM,KAAK,YAAY,KAAK,YAAYE,EAASF,CAAM,CAAC,CACjE,CAWA,MAAgB,YACdE,EACAF,EACA,CACA,KAAM,CAAE,QAAAI,EAAS,OAAAC,CAAO,EAAI,MAAMC,EAAA,GAChC,KAAK,QACL,CACE,QAAS,KAAK,mBAAmB,EACjC,KAAM,CACJJ,EAAQ,QACRA,EAAQ,YACRA,EAAQ,SACRA,EAAQ,SACV,EACA,GAAG,KAAK,wBAAwB,EAEhC,GAAIF,CACN,CAAA,EAGK,MAAA,CAAE,KADI,MAAMO,EAA6B,GAAA,KAAK,QAASH,CAAO,EACtD,OAAAC,EACjB,CAYA,MAAa,cACXG,EACAC,EACAT,EACA,CACA,OAAO,MAAM,KAAK,YAChB,KAAK,iBAAiBQ,EAAWC,EAAST,CAAM,CAAA,CAEpD,CAYA,MAAa,iBACXQ,EACAC,EACAT,EACA,CACA,KAAM,CAAE,QAAAI,EAAS,OAAAC,C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are class SignerValidator extends DeployableTarget<SignerValidatorPay
646
646
  * @param {?WriteParams} [params]
647
647
  * @returns {Promise<boolean>} - True if the action has been validated based on the data payload
648
648
  */
649
- protected validateRaw(payload: SignerValidatorValidatePayload, params?: ReadParams): Promise<{
649
+ protected validateRaw(payload: SignerValidatorValidatePayload, params?: WriteParams): Promise<{
650
650
  hash: `0x${string}`;
651
651
  result: boolean;
652
652
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"SignerValidator.d.ts","sourceRoot":"","sources":["../../src/Validators/SignerValidator.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,kBAAkB,EAOnB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,GAAG,EACR,KAAK,iBAAiB,EAEvB,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EACL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,YAAY,EACZ,KAAK,WAAW,EACjB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAE9B;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB;;;OAGG;IACH,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,8BAA8B;IAC7C;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,SAAS,EAAE,GAAG,CAAC;CAChB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,OAAO,EAAE,O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CAAC,GACxD,OAAO,CAAC,GAAG,CAAC;IAOf;;;;;;;OAOG;IACa,eAAe,CAC7B,QAAQ,CAAC,EAAE,sBAAsB,EACjC,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,uBAAuB;CAY3B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,sCAAsC,CAAC,EAC3D,MAAM,EACN,aAAa,EACb,OAAO,EACP,SAAS,EACT,iBAAiB,EACjB,QAAQ,EACR,OAAO,GACR,EAAE,8BAA8B,GAAG,OAAO,CAAC,GAAG,CAAC,CA+C/C;AAED;;;;;;;;GAQG;AACH,wBAAgB,iCAAiC,CAAC,EAChD,MAAM,EACN,SAAS,EACT,iBAAiB,GAClB,EAAE,0BAA0B,iBAe5B;AAED;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAAC,EAC5C,OAAO,EACP,eAAe,GAChB,EAAE,sBAAsB,iBAQxB"}
@@ -1,6 +1,6 @@
1
- import { _ as r, bp as u, bq as h, br as y, bs as m, bt as p, bu as g, bv as w, bw as A } from "../generated-pJZHmRCK.js";
1
+ import { _ as r, bq as u, br as h, bs as y, bt as m, bu as p, bv as g, bw as w, bx as A } from "../generated-CElkFqkY.js";
2
2
  import { encodeAbiParameters as s } from "viem";
3
- import { d as v } from "../deployments-DqjtOTUr.js";
3
+ import { d as v } from "../deployments-3RHH-eW7.js";
4
4
  import { DeployableTarget as D } from "../Deployable/DeployableTarget.js";
5
5
  import { RegistryType as V } from "../utils.js";
6
6
  const C = "0x610120604052348015610010575f80fd5b50306080524660a0525f60c081905260e081905261010052610030610035565b610096565b63409feecd19805460018116156100535763f92ee8a95f526004601cfd5b8160c01c808260011c14610091578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b60805160a05160c05160e0516101005161167d6100c45f395f50505f50505f50505f50505f505061167d5ff3fe6080604052600436106100ef575f3560e01c8063736c0d5b11610087578063d3de6e7511610057578063d3de6e7514610293578063f04e283e146102c0578063f2fde38b146102d3578063fee81cf4146102e6575f80fd5b8063736c0d5b146101cc57806384b0196e146101fa5780638da5cb5b14610221578063a1d2756f14610274575f80fd5b8063439fab91116100c2578063439fab911461018a57806354d1f13d146101a9578063703b6900146101b1578063715018a6146101c4575f80fd5b806301ffc9a7146100f3578063256929621461012757806328d6183b146101315780634359d28a1461016b575b5f80fd5b3480156100fe575f80fd5b5061011261010d366004610ecb565b610317565b60405190151581526020015b60405180910390f35b61012f610372565b005b34801561013c575f80fd5b506040517fb8ce7b2200000000000000000000000000000000000000000000000000000000815260200161011e565b348015610176575f80fd5b5061012f610185366004610f52565b6103bf565b348015610195575f80fd5b5061012f6101a4366004610ffc565b6104bb565b61012f61068c565b6101126101bf36600461105c565b6106c5565b61012f610851565b3480156101d7575f80fd5b506101126101e63660046110c1565b5f6020819052908152604090205460ff1681565b348015610205575f80fd5b5061020e610864565b60405161011e9796959493929190611128565b34801561022c575f80fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275460405173ffffffffffffffffffffffffffffffffffffffff909116815260200161011e565b34801561027f575f80fd5b5061012f61028e3660046110c1565b61090c565b34801561029e575f80fd5b506102b26102ad366004611331565b61095b565b60405190815260200161011e565b61012f6102ce3660046110c1565b6109ee565b61012f6102e13660046110c1565b610a2b565b3480156102f1575f80fd5b506102b26103003660046110c1565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fb8ce7b2200000000000000000000000000000000000000000000000000000000148061036c575061036c82610a51565b92915050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b6103c7610aa6565b828114610400576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b838110156104b45782828281811061041c5761041c611399565b905060200201602081019061043191906113c6565b5f8087878581811061044557610445611399565b905060200201602081019061045a91906110c1565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f2080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101610402565b5050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf601132805460038255801561050c5760018160011c14303b106105035763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f8061051b848601866113f5565b91509150610541825f8151811061053457610534611399565b6020026020010151610adb565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161790555f5b82518110156106065760015f808584815181106105a2576105a2611399565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040015f2080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101610583565b5060405173ffffffffffffffffffffffffffffffffffffffff821681527f8098ebafc4f95fe5a577ff9be7c88d4445b6ef0acf915dad2b538c81b0384d7c9060200160405180910390a150508015610687576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b6002545f9073ffffffffffffffffffffffffffffffffffffffff163314610718576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610725838501856114bc565b90505f815f015180602001905181019061073f919061157c565b90505f61075689836040015189866020015161095b565b905087826040015160ff16116107ae5760408083015190517f17c66bc700000000000000000000000000000000000000000000000000000000815260ff90911660048201526024810189905260440160405180910390fd5b815173ffffffffffffffffffffffffffffffffffffffff165f9081526020819052604090205460ff1661080d576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108196001828a610b3e565b602082015182516108449173ffffffffffffffffffffffffffffffffffffffff909116908390610bcc565b9998505050505050505050565b610859610aa6565b6108625f610cd7565b565b7f0f000000000000000000000000000000000000000000000000000000000000006060805f8080836108fa604080518082018252600f81527f5369676e657256616c696461746f7200000000000000000000000000000000006020808301919091528251808401909352600183527f31000000000000000000000000000000000000000000000000000000000000009083015291565b97989097965046955030945091925090565b610914610aa6565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b8051602080830191909120604080517ffea51d5bd45bcd3c2ecc3679b43a3b80b0bd0923f8c16f822455b8cdecd9852f93810193909352820186905260ff8516606083015273ffffffffffffffffffffffffffffffffffffffff8416608083015260a08201525f906109e59060c00160405160208183030381529060405280519060200120610d3c565b95945050505050565b6109f6610aa6565b63389a75e1600c52805f526020600c208054421115610a1c57636f5e88185f526004601cfd5b5f9055610a2881610cd7565b50565b610a33610aa6565b8060601b610a4857637448fbae5f526004601cfd5b610a2881610cd7565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f5912b89c00000000000000000000000000000000000000000000000000000000148061036c575061036c82610d68565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610862576382b429005f526004601cfd5b73ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b7f3f57fc5c000000000000000000000000000000000000000000000000000000007f4de1225a000000000000000000000000000000000000000000000000000000006007831115610b9557815f528260045260245ffd5b84602052835f5260405f206001841b81541880851c6001166001188015610bc257835f528560045260245ffd5b5090555050505050565b73ffffffffffffffffffffffffffffffffffffffff909216915f8315610cd057604051835f5260208301516040526040835103610c45576040830151601b8160ff1c016020528060011b60011c606052506020600160805f60015afa805186183d1517610c4357505f606052604052506001610cd0565b505b6041835103610c885760608301515f1a60205260408301516060526020600160805f60015afa805186183d1517610c8657505f606052604052506001610cd0565b505b5f60605280604052631626ba7e60e01b808252846004830152602482016040815284516020018060448501828860045afa505060208160443d01858a5afa9051909114169150505b9392505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f610d45610dfe565b6719010000000000005f908152601a91909152603a928352604260182092525090565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d00000000000000000000000000000000000000000000000000000000148061036c57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461036c565b5f805f80610e70604080518082018252600f81527f5369676e657256616c696461746f7200000000000000000000000000000000006020808301919091528251808401909352600183527f31000000000000000000000000000000000000000000000000000000000000009083015291565b8151602092830120815191830191909120604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8152938401929092529082015246606082015230608082015260a09020949350505050565b5f60208284031215610edb575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610cd0575f80fd5b5f8083601f840112610f1a575f80fd5b50813567ffffffffffffffff811115610f31575f80fd5b6020830191508360208260051b8501011115610f4b575f80fd5b9250929050565b5f805f8060408587031215610f65575f80fd5b843567ffffffffffffffff811115610f7b575f80fd5b610f8787828801610f0a565b909550935050602085013567ffffffffffffffff811115610fa6575f80fd5b610fb287828801610f0a565b95989497509550505050565b5f8083601f840112610fce575f80fd5b50813567ffffffffffffffff811115610fe5575f80fd5b602083019150836020828501011115610f4b575f80fd5b5f806020838503121561100d575f80fd5b823567ffffffffffffffff811115611023575f80fd5b61102f85828601610fbe565b90969095509350505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610a28575f80fd5b5f805f805f60808688031215611070575f80fd5b853594506020860135935060408601356110898161103b565b9250606086013567ffffffffffffffff8111156110a4575f80fd5b6110b088828901610fbe565b969995985093965092949392505050565b5f602082840312156110d1575f80fd5b8135610cd08161103b565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b7fff000000000000000000000000000000000000000000000000000000000000008816815260e060208201525f61116260e08301896110dc565b828103604084015261117481896110dc565b6060840188905273ffffffffffffffffffffffffffffffffffffffff8716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b818110156111d65783518352602093840193909201916001016111b8565b50909b9a5050505050505050505050565b60ff81168114610a28575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040516060810167ffffffffffffffff81118282101715611245576112456111f5565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611292576112926111f5565b604052919050565b5f67ffffffffffffffff8211156112b3576112b36111f5565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b5f82601f8301126112ee575f80fd5b81356113016112fc8261129a565b61124b565b818152846020838601011115611315575f80fd5b816020850160208301375f918101602001919091529392505050565b5f805f8060808587031215611344575f80fd5b843593506020850135611356816111e7565b925060408501356113668161103b565b9150606085013567ffffffffffffffff811115611381575f80fd5b61138d878288016112df565b91505092959194509250565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f602082840312156113d6575f80fd5b81358015158114610cd0575f80fd5b80356113f08161103b565b919050565b5f8060408385031215611406575f80fd5b823567ffffffffffffffff81111561141c575f80fd5b8301601f8101851361142c575f80fd5b803567ffffffffffffffff811115611446576114466111f5565b8060051b6114566020820161124b565b91825260208184018101929081019088841115611471575f80fd5b6020850194505b8385101561149f578435925061148d8361103b565b82825260209485019490910190611478565b80965050505050506114b3602084016113e5565b90509250929050565b5f602082840312156114cc575f80fd5b813567ffffffffffffffff8111156114e2575f80fd5b8201604081850312156114f3575f80fd5b6040805190810167ffffffffffffffff81118282101715611516576115166111f5565b604052813567ffffffffffffffff81111561152f575f80fd5b61153b868285016112df565b825250602082013567ffffffffffffffff811115611557575f80fd5b611563868285016112df565b602083015250949350505050565b80516113f0816111e7565b5f6020828403121561158c575f80fd5b815167ffffffffffffffff8111156115a2575f80fd5b8201606081850312156115b3575f80fd5b6115bb611222565b81516115c68161103b565b8152602082015167ffffffffffffffff8111156115e1575f80fd5b8201601f810186136115f1575f80fd5b80516115ff6112fc8261129a565b818152876020838501011115611613575f80fd5b8160208401602083015e5f6020838301015280602085015250505061163a60408301611571565b604082015294935050505056fea264697066735822122032bca89fce2f3bb99b837cc5cdf14197bc0e5dc59150ba871f24c9de6291396864736f6c634300081a0033", c = class c extends D {
@@ -1 +1 @@
1
- {"version":3,"file":"SignerValidator.js","sources":["../../src/Validators/SignerValidator.ts"],"sourcesContent":["import {\n readSignerValidatorHashSignerData,\n readSignerValidatorSigners,\n signerValidatorAbi,\n simulateSignerValidatorSetAuthorized,\n simulateSignerValidatorSetValidatorCaller,\n simulateSignerValidatorValidate,\n writeSignerValidatorSetAuthorized,\n writeSignerValidatorSetValidatorCaller,\n writeSignerValidatorValidate,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/validators/SignerValidator.sol/SignerValidator.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n type PrivateKeyAccount,\n encodeAbiParameters,\n} from 'viem';\nimport { SignerValidator as SignerValidatorBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { signerValidatorAbi };\n\n/**\n * Object reprentation of a {@link SignerValidator} initialization payload\n *\n * @export\n * @interface SignerValidatorPayload\n * @typedef {SignerValidatorPayload}\n */\nexport interface SignerValidatorPayload {\n /**\n * The list of authorized signers. The first address in the list will be the initial owner of the contract.\n *\n * @type {Address[]}\n */\n signers: Address[];\n /**\n * The authorized caller of the {@link prepareSignerValidator} function\n * @type {Address}\n */\n validatorCaller: Address;\n}\n\n/**\n * Description placeholder\n *\n * @export\n * @interface SignerValidatorValidatePayload\n * @typedef {SignerValidatorValidatePayload}\n */\nexport interface SignerValidatorValidatePayload {\n /**\n * The ID of the boost.\n *\n * @type {bigint}\n */\n boostId: bigint;\n /**\n * The ID of the incentive.\n *\n * @type {bigint}\n */\n incentiveId: bigint;\n /**\n * The address of the claimant.\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The claim data.\n *\n * @type {Hex}\n */\n claimData: Hex;\n}\n\n/**\n * Object reprentation of a {@link SignerValidator} initialization payload\n *\n * @export\n * @interface SignerValidatorPayload\n * @typedef {SignerValidatorPayload}\n */\nexport interface SignerValidatorPayload {\n /**\n * The list of authorized signers. The first address in the list will be the initial owner of the contract.\n *\n * @type {Address[]}\n */\n signers: Address[];\n /**\n * The authorized caller of the {@link prepareSignerValidator} function\n * @type {Address}\n */\n validatorCaller: Address;\n}\n\n/**\n * Description placeholder\n *\n * @export\n * @interface SignerValidatorValidatePayload\n * @typedef {SignerValidatorValidatePayload}\n */\nexport interface SignerValidatorValidatePayload {\n /**\n * The ID of the boost.\n *\n * @type {bigint}\n */\n boostId: bigint;\n /**\n * The ID of the incentive.\n *\n * @type {bigint}\n */\n incentiveId: bigint;\n /**\n * The address of the claimant.\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The claim data.\n *\n * @type {Hex}\n */\n claimData: Hex;\n}\n\n/**\n * Signer Validator Claim Data Payload\n *\n * @export\n * @interface SignerValidatorClaimDataParams\n * @typedef {SignerValidatorClaimDataParams}\n */\nexport interface SignerValidatorClaimDataParams {\n /**\n * The signer with which to sign the input\n *\n * @type {{\n * account: Address;\n * key: Hex;\n * privateKey: PrivateKeyAccount;\n * }}\n */\n signer: {\n account: Address;\n key: Hex;\n privateKey: PrivateKeyAccount;\n };\n /**\n * The encoded data to provide the underlying incentive. You can use {@link prepareAllowListIncentivePayload}, {@link prepareCGDAIncentivePayload}, {@link prepareERC20IncentivePayload}, {@link prepareERC1155IncentivePayload}, or {@link preparePointsIncentivePayload}\n *\n * @type {Hex}\n */\n incentiveData: Hex;\n /**\n * The chain id to target\n *\n * @type {number}\n */\n chainId: number;\n /**\n * The address of the validator\n *\n * @type {Address}\n */\n validator: Address;\n /**\n * The total number of incentives on the Boost\n *\n * @type {number}\n */\n incentiveQuantity: number;\n /**\n * The address of the claimant\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The ID of the boost\n *\n * @type {bigint}\n */\n boostId: bigint;\n}\n\n/**\n * Object representation of a {@link SignerValidatorInputParams} initialization payload\n *\n * @export\n * @interface SignerValidatorInputParams\n * @typedef {SignerValidatorInputParams}\n */\nexport interface SignerValidatorInputParams {\n /**\n * The signer address.\n *\n * @type {Address}\n */\n signer: Address;\n\n /**\n * The signature data.\n *\n * @type {string}\n */\n signature: Hex;\n\n /**\n * The total number of incentives on the Boost\n *\n * @type {number}\n */\n incentiveQuantity: number;\n}\n\n/**\n * Object representing the payload for signing before validaton.\n *\n * @export\n * @interface SignerValidatorSignaturePayload\n * @typedef {SignerValidatorSignaturePayload}\n */\nexport interface SignerValidatorSignaturePayload {\n /**\n * The ID of the boost.\n *\n * @type {bigint}\n */\n boostId: bigint;\n /**\n * The ID of the incentive.\n *\n * @type {number}\n */\n incentiveQuantity: number;\n /**\n * The address of the claimant.\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The claim data.\n *\n * @type {Hex}\n */\n incentiveData: Hex;\n}\n\n/**\n * A generic `viem.Log` event with support for `BoostCore` event types.\n *\n * @export\n * @typedef {SignerValidatorLog}\n * @template {ContractEventName<\n * typeof signerValidatorAbi\n * >} [event=ContractEventName<typeof signerValidatorAbi>]\n */\nexport type SignerValidatorLog<\n event extends ContractEventName<\n typeof signerValidatorAbi\n > = ContractEventName<typeof signerValidatorAbi>,\n> = GenericLog<typeof signerValidatorAbi, event>;\n\n/**\n * A simple implementation of a Validator that verifies a given signature and checks the recovered address against a set of authorized signers\n *\n * @export\n * @class SignerValidator\n * @typedef {SignerValidator}\n * @extends {DeployableTarget<SignerValidatorPayload>}\n */\nexport class SignerValidator extends DeployableTarget<\n SignerValidatorPayload,\n typeof signerValidatorAbi\n> {\n /**\n * @inheritdoc\n *\n * @public\n * @readonly\n * @type {*}\n */\n public override readonly abi = signerValidatorAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n 31337: import.meta.env.VITE_SIGNER_VALIDATOR_BASE,\n ...(SignerValidatorBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.VALIDATOR;\n\n /**\n * The set of authorized signers\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>}\n */\n public async signers(address: Address, params?: ReadParams) {\n return await readSignerValidatorSigners(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Retrieve the hash and signer data for a given hash\n *\n * @public\n * @async\n * @param {SignerValidatorSignaturePayload} payload\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex>}\n */\n public async hashSignerData(\n payload: SignerValidatorSignaturePayload,\n params?: ReadParams,\n ) {\n return await readSignerValidatorHashSignerData(this._config, {\n address: this.assertValidAddress(),\n args: [\n payload.boostId,\n payload.incentiveQuantity,\n payload.claimant,\n payload.incentiveData,\n ],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Validate that the action has been completed successfully. The data payload is expected to be a tuple of (address signer, bytes32 hash, bytes signature). The signature is expected to be a valid ECDSA or EIP-1271 signature of a unique hash by an authorized signer.\n *\n * @public\n * @async\n * @param {SignerValidatorValidatePayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the action has been validated based on the data payload\n */\n protected async validate(\n payload: SignerValidatorValidatePayload,\n params?: WriteParams,\n ) {\n return await this.awaitResult(this.validateRaw(payload, params));\n }\n\n /**\n * Validate that the action has been completed successfully. The data payload is expected to be a tuple of (address signer, bytes32 hash, bytes signature). The signature is expected to be a valid ECDSA or EIP-1271 signature of a unique hash by an authorized signer.\n *\n * @public\n * @async\n * @param {SignerValidatorValidatePayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the action has been validated based on the data payload\n */\n protected async validateRaw(\n payload: SignerValidatorValidatePayload,\n params?: ReadParams,\n ) {\n const { request, result } = await simulateSignerValidatorValidate(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [\n payload.boostId,\n payload.incentiveId,\n payload.claimant,\n payload.claimData,\n ],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorValidate(this._config, request);\n return { hash, result };\n }\n\n /**\n * Set the authorized status of a signer\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of signers to update\n * @param {boolean[]} allowed - The authorized status of each signer\n * @param {?WriteParams} [params]\n * @returns {Promise<void>}\n */\n public async setAuthorized(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams,\n ) {\n return await this.awaitResult(\n this.setAuthorizedRaw(addresses, allowed, params),\n );\n }\n\n /**\n * Set the authorized status of a signer\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of signers to update\n * @param {boolean[]} allowed - The authorized status of each signer\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async setAuthorizedRaw(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams,\n ) {\n const { request, result } = await simulateSignerValidatorSetAuthorized(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [addresses, allowed],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorSetAuthorized(this._config, request);\n return { hash, result };\n }\n\n /**\n * Update the authorized caller of the validator function\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async setValidatorCallerRaw(address: Address, params?: WriteParams) {\n const { request, result } = await simulateSignerValidatorSetValidatorCaller(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [address],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorSetValidatorCaller(\n this._config,\n request,\n );\n return { hash, result };\n }\n\n /**\n * Update the authorized caller of the validator function\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?WriteParams} [params]\n * @returns {Promise<void>}\n */\n public async setValidatorCaller(address: Address, params?: WriteParams) {\n return await this.awaitResult(this.setValidatorCallerRaw(address, params));\n }\n\n /**\n * Properly encodes the data needed to claim\n *\n * @public\n * @async\n * @param {SignerValidatorClaimDataParams} params\n * @returns {Promise<Hex>}\n */\n public async encodeClaimData(\n params: Omit<SignerValidatorClaimDataParams, 'validator'>,\n ): Promise<Hex> {\n return await prepareSignerValidatorClaimDataPayload({\n ...params,\n validator: this.assertValidAddress(),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?SignerValidatorPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: SignerValidatorPayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: signerValidatorAbi,\n bytecode: bytecode as Hex,\n args: [prepareSignerValidatorPayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Signer Validator Claim Data Payload Preparation\n *\n * @export\n * @async\n * @param {SignerValidatorClaimDataParams} param0\n * @param {{ account: Address; key: Hex; privateKey: PrivateKeyAccount; }} param0.signer\n * @param {Hex} param0.incentiveData\n * @param {number} param0.chainId\n * @param {Address} param0.validator\n * @param {number} param0.incentiveQuantity\n * @param {Address} param0.claimant\n * @param {bigint} param0.boostId\n * @returns {Promise<Hex>}\n */\nexport async function prepareSignerValidatorClaimDataPayload({\n signer,\n incentiveData,\n chainId,\n validator,\n incentiveQuantity,\n claimant,\n boostId,\n}: SignerValidatorClaimDataParams): Promise<Hex> {\n const trustedSignature = await signer.privateKey.signTypedData({\n domain: {\n name: 'SignerValidator',\n version: '1',\n chainId: chainId,\n verifyingContract: validator,\n },\n types: {\n SignerValidatorData: [\n { name: 'boostId', type: 'uint256' },\n { name: 'incentiveQuantity', type: 'uint8' },\n { name: 'claimant', type: 'address' },\n { name: 'incentiveData', type: 'bytes' },\n ],\n },\n primaryType: 'SignerValidatorData' as const,\n message: {\n boostId,\n incentiveQuantity,\n claimant,\n incentiveData: incentiveData,\n },\n });\n\n // Prepare the claim data payload using the new helper\n const validatorData = prepareSignerValidatorInputParams({\n signer: signer.account,\n signature: trustedSignature,\n incentiveQuantity, // Adjust incentive quantity as necessary\n });\n\n const boostClaimDataPayload = encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'BoostClaimData',\n components: [\n { type: 'bytes', name: 'validatorData' },\n { type: 'bytes', name: 'incentiveData' },\n ],\n },\n ],\n [{ validatorData, incentiveData }],\n );\n\n return boostClaimDataPayload;\n}\n\n/**\n * Given a {@link SignerValidatorInputParams}, properly encode the initialization payload.\n *\n * @param {SignerValidatorInputParams} param0\n * @param {Address} param0.signer\n * @param {Hex} param0.signature\n * @param {number} param0.incentiveQuantity\n * @returns {Hex}\n */\nexport function prepareSignerValidatorInputParams({\n signer,\n signature,\n incentiveQuantity,\n}: SignerValidatorInputParams) {\n return encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'SignerValidatorInputParams',\n components: [\n { type: 'address', name: 'signer' },\n { type: 'bytes', name: 'signature' },\n { type: 'uint8', name: 'incentiveQuantity' },\n ],\n },\n ],\n [{ signer, signature, incentiveQuantity }],\n );\n}\n\n/**\n * Given a {@link SignerValidatorPayload}, properly encode the initialization payload.\n *\n * @param {SignerValidatorPayload} param0\n * @param {Address[]} param0.signers\n * @param {Address} param0.validatorCaller\n * @returns {Hex}\n */\nexport function prepareSignerValidatorPayload({\n signers,\n validatorCaller,\n}: SignerValidatorPayload) {\n return encodeAbiParameters(\n [\n { type: 'address[]', name: 'signers' },\n { type: 'address', name: 'validatorCaller' },\n ],\n [signers, validatorCaller],\n );\n}\n"],"names":["_SignerValidator","DeployableTarget","signerValidatorAbi","address","params","readSignerValidatorSigners","payload","readSignerValidatorHashSignerData","request","result","simulateSignerValidatorValidate","writeSignerValidatorValidate","addresses","allowed","simulateSignerValidatorSetAuthorized","writeSignerValidatorSetAuthorized","simulateSignerValidatorSetValidatorCaller","writeSignerValidatorSetValidatorCaller","prepareSignerValidatorClaimDataPayload","_payload","_options","options","bytecode","prepareSignerValidatorPayload","SignerValidatorBases","RegistryType","SignerValidator","signer","incentiveData","chainId","validator","incentiveQuantity","claimant","boostId","trustedSignature","validatorData","prepareSignerValidatorInputParams","encodeAbiParameters","signature","signers","validatorCaller"],"mappings":";;;;;kpXAmSaA,IAAN,MAAMA,UAAwBC,EAGnC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAWL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA8B/B,MAAa,QAAQC,GAAkBC,GAAqB;AACnD,WAAA,MAAMC,EAA2B,KAAK,SAAS;AAAA,MACpD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAACF,CAAO;AAAA;AAAA,MAEd,GAAIC;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAa,eACXE,GACAF,GACA;AACO,WAAA,MAAMG,EAAkC,KAAK,SAAS;AAAA,MAC3D,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM;AAAA,QACJD,EA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EAAkC;AAAA,EAChD,QAAAT;AAAA,EACA,WAAAW;AAAA,EACA,mBAAAP;AACF,GAA+B;AACtB,SAAAM;AAAA,IACL;AAAA,MACE;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,YAAY;AAAA,UACV,EAAE,MAAM,WAAW,MAAM,SAAS;AAAA,UAClC,EAAE,MAAM,SAAS,MAAM,YAAY;AAAA,UACnC,EAAE,MAAM,SAAS,MAAM,oBAAoB;AAAA,QAC7C;AAAA,MACF;AAAA,IACF;AAAA,IACA,CAAC,EAAE,QAAAV,GAAQ,WAAAW,GAAW,mBAAAP,GAAmB;AAAA,EAAA;AAE7C;AAUO,SAASR,EAA8B;AAAA,EAC5C,SAAAgB;AAAA,EACA,iBAAAC;AACF,GAA2B;AAClB,SAAAH;AAAA,IACL;AAAA,MACE,EAAE,MAAM,aAAa,MAAM,UAAU;AAAA,MACrC,EAAE,MAAM,WAAW,MAAM,kBAAkB;AAAA,IAC7C;AAAA,IACA,CAACE,GAASC,CAAe;AAAA,EAAA;AAE7B;"}
1
+ {"version":3,"file":"SignerValidator.js","sources":["../../src/Validators/SignerValidator.ts"],"sourcesContent":["import {\n readSignerValidatorHashSignerData,\n readSignerValidatorSigners,\n signerValidatorAbi,\n simulateSignerValidatorSetAuthorized,\n simulateSignerValidatorSetValidatorCaller,\n simulateSignerValidatorValidate,\n writeSignerValidatorSetAuthorized,\n writeSignerValidatorSetValidatorCaller,\n writeSignerValidatorValidate,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/validators/SignerValidator.sol/SignerValidator.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n type PrivateKeyAccount,\n encodeAbiParameters,\n} from 'viem';\nimport { SignerValidator as SignerValidatorBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { signerValidatorAbi };\n\n/**\n * Object reprentation of a {@link SignerValidator} initialization payload\n *\n * @export\n * @interface SignerValidatorPayload\n * @typedef {SignerValidatorPayload}\n */\nexport interface SignerValidatorPayload {\n /**\n * The list of authorized signers. The first address in the list will be the initial owner of the contract.\n *\n * @type {Address[]}\n */\n signers: Address[];\n /**\n * The authorized caller of the {@link prepareSignerValidator} function\n * @type {Address}\n */\n validatorCaller: Address;\n}\n\n/**\n * Description placeholder\n *\n * @export\n * @interface SignerValidatorValidatePayload\n * @typedef {SignerValidatorValidatePayload}\n */\nexport interface SignerValidatorValidatePayload {\n /**\n * The ID of the boost.\n *\n * @type {bigint}\n */\n boostId: bigint;\n /**\n * The ID of the incentive.\n *\n * @type {bigint}\n */\n incentiveId: bigint;\n /**\n * The address of the claimant.\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The claim data.\n *\n * @type {Hex}\n */\n claimData: Hex;\n}\n\n/**\n * Object reprentation of a {@link SignerValidator} initialization payload\n *\n * @export\n * @interface SignerValidatorPayload\n * @typedef {SignerValidatorPayload}\n */\nexport interface SignerValidatorPayload {\n /**\n * The list of authorized signers. The first address in the list will be the initial owner of the contract.\n *\n * @type {Address[]}\n */\n signers: Address[];\n /**\n * The authorized caller of the {@link prepareSignerValidator} function\n * @type {Address}\n */\n validatorCaller: Address;\n}\n\n/**\n * Description placeholder\n *\n * @export\n * @interface SignerValidatorValidatePayload\n * @typedef {SignerValidatorValidatePayload}\n */\nexport interface SignerValidatorValidatePayload {\n /**\n * The ID of the boost.\n *\n * @type {bigint}\n */\n boostId: bigint;\n /**\n * The ID of the incentive.\n *\n * @type {bigint}\n */\n incentiveId: bigint;\n /**\n * The address of the claimant.\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The claim data.\n *\n * @type {Hex}\n */\n claimData: Hex;\n}\n\n/**\n * Signer Validator Claim Data Payload\n *\n * @export\n * @interface SignerValidatorClaimDataParams\n * @typedef {SignerValidatorClaimDataParams}\n */\nexport interface SignerValidatorClaimDataParams {\n /**\n * The signer with which to sign the input\n *\n * @type {{\n * account: Address;\n * key: Hex;\n * privateKey: PrivateKeyAccount;\n * }}\n */\n signer: {\n account: Address;\n key: Hex;\n privateKey: PrivateKeyAccount;\n };\n /**\n * The encoded data to provide the underlying incentive. You can use {@link prepareAllowListIncentivePayload}, {@link prepareCGDAIncentivePayload}, {@link prepareERC20IncentivePayload}, {@link prepareERC1155IncentivePayload}, or {@link preparePointsIncentivePayload}\n *\n * @type {Hex}\n */\n incentiveData: Hex;\n /**\n * The chain id to target\n *\n * @type {number}\n */\n chainId: number;\n /**\n * The address of the validator\n *\n * @type {Address}\n */\n validator: Address;\n /**\n * The total number of incentives on the Boost\n *\n * @type {number}\n */\n incentiveQuantity: number;\n /**\n * The address of the claimant\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The ID of the boost\n *\n * @type {bigint}\n */\n boostId: bigint;\n}\n\n/**\n * Object representation of a {@link SignerValidatorInputParams} initialization payload\n *\n * @export\n * @interface SignerValidatorInputParams\n * @typedef {SignerValidatorInputParams}\n */\nexport interface SignerValidatorInputParams {\n /**\n * The signer address.\n *\n * @type {Address}\n */\n signer: Address;\n\n /**\n * The signature data.\n *\n * @type {string}\n */\n signature: Hex;\n\n /**\n * The total number of incentives on the Boost\n *\n * @type {number}\n */\n incentiveQuantity: number;\n}\n\n/**\n * Object representing the payload for signing before validaton.\n *\n * @export\n * @interface SignerValidatorSignaturePayload\n * @typedef {SignerValidatorSignaturePayload}\n */\nexport interface SignerValidatorSignaturePayload {\n /**\n * The ID of the boost.\n *\n * @type {bigint}\n */\n boostId: bigint;\n /**\n * The ID of the incentive.\n *\n * @type {number}\n */\n incentiveQuantity: number;\n /**\n * The address of the claimant.\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The claim data.\n *\n * @type {Hex}\n */\n incentiveData: Hex;\n}\n\n/**\n * A generic `viem.Log` event with support for `BoostCore` event types.\n *\n * @export\n * @typedef {SignerValidatorLog}\n * @template {ContractEventName<\n * typeof signerValidatorAbi\n * >} [event=ContractEventName<typeof signerValidatorAbi>]\n */\nexport type SignerValidatorLog<\n event extends ContractEventName<\n typeof signerValidatorAbi\n > = ContractEventName<typeof signerValidatorAbi>,\n> = GenericLog<typeof signerValidatorAbi, event>;\n\n/**\n * A simple implementation of a Validator that verifies a given signature and checks the recovered address against a set of authorized signers\n *\n * @export\n * @class SignerValidator\n * @typedef {SignerValidator}\n * @extends {DeployableTarget<SignerValidatorPayload>}\n */\nexport class SignerValidator extends DeployableTarget<\n SignerValidatorPayload,\n typeof signerValidatorAbi\n> {\n /**\n * @inheritdoc\n *\n * @public\n * @readonly\n * @type {*}\n */\n public override readonly abi = signerValidatorAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n 31337: import.meta.env.VITE_SIGNER_VALIDATOR_BASE,\n ...(SignerValidatorBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.VALIDATOR;\n\n /**\n * The set of authorized signers\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>}\n */\n public async signers(address: Address, params?: ReadParams) {\n return await readSignerValidatorSigners(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Retrieve the hash and signer data for a given hash\n *\n * @public\n * @async\n * @param {SignerValidatorSignaturePayload} payload\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex>}\n */\n public async hashSignerData(\n payload: SignerValidatorSignaturePayload,\n params?: ReadParams,\n ) {\n return await readSignerValidatorHashSignerData(this._config, {\n address: this.assertValidAddress(),\n args: [\n payload.boostId,\n payload.incentiveQuantity,\n payload.claimant,\n payload.incentiveData,\n ],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Validate that the action has been completed successfully. The data payload is expected to be a tuple of (address signer, bytes32 hash, bytes signature). The signature is expected to be a valid ECDSA or EIP-1271 signature of a unique hash by an authorized signer.\n *\n * @public\n * @async\n * @param {SignerValidatorValidatePayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the action has been validated based on the data payload\n */\n protected async validate(\n payload: SignerValidatorValidatePayload,\n params?: WriteParams,\n ) {\n return await this.awaitResult(this.validateRaw(payload, params));\n }\n\n /**\n * Validate that the action has been completed successfully. The data payload is expected to be a tuple of (address signer, bytes32 hash, bytes signature). The signature is expected to be a valid ECDSA or EIP-1271 signature of a unique hash by an authorized signer.\n *\n * @public\n * @async\n * @param {SignerValidatorValidatePayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the action has been validated based on the data payload\n */\n protected async validateRaw(\n payload: SignerValidatorValidatePayload,\n params?: WriteParams,\n ) {\n const { request, result } = await simulateSignerValidatorValidate(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [\n payload.boostId,\n payload.incentiveId,\n payload.claimant,\n payload.claimData,\n ],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorValidate(this._config, request);\n return { hash, result };\n }\n\n /**\n * Set the authorized status of a signer\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of signers to update\n * @param {boolean[]} allowed - The authorized status of each signer\n * @param {?WriteParams} [params]\n * @returns {Promise<void>}\n */\n public async setAuthorized(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams,\n ) {\n return await this.awaitResult(\n this.setAuthorizedRaw(addresses, allowed, params),\n );\n }\n\n /**\n * Set the authorized status of a signer\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of signers to update\n * @param {boolean[]} allowed - The authorized status of each signer\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async setAuthorizedRaw(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams,\n ) {\n const { request, result } = await simulateSignerValidatorSetAuthorized(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [addresses, allowed],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorSetAuthorized(this._config, request);\n return { hash, result };\n }\n\n /**\n * Update the authorized caller of the validator function\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async setValidatorCallerRaw(address: Address, params?: WriteParams) {\n const { request, result } = await simulateSignerValidatorSetValidatorCaller(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [address],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorSetValidatorCaller(\n this._config,\n request,\n );\n return { hash, result };\n }\n\n /**\n * Update the authorized caller of the validator function\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?WriteParams} [params]\n * @returns {Promise<void>}\n */\n public async setValidatorCaller(address: Address, params?: WriteParams) {\n return await this.awaitResult(this.setValidatorCallerRaw(address, params));\n }\n\n /**\n * Properly encodes the data needed to claim\n *\n * @public\n * @async\n * @param {SignerValidatorClaimDataParams} params\n * @returns {Promise<Hex>}\n */\n public async encodeClaimData(\n params: Omit<SignerValidatorClaimDataParams, 'validator'>,\n ): Promise<Hex> {\n return await prepareSignerValidatorClaimDataPayload({\n ...params,\n validator: this.assertValidAddress(),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?SignerValidatorPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: SignerValidatorPayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: signerValidatorAbi,\n bytecode: bytecode as Hex,\n args: [prepareSignerValidatorPayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Signer Validator Claim Data Payload Preparation\n *\n * @export\n * @async\n * @param {SignerValidatorClaimDataParams} param0\n * @param {{ account: Address; key: Hex; privateKey: PrivateKeyAccount; }} param0.signer\n * @param {Hex} param0.incentiveData\n * @param {number} param0.chainId\n * @param {Address} param0.validator\n * @param {number} param0.incentiveQuantity\n * @param {Address} param0.claimant\n * @param {bigint} param0.boostId\n * @returns {Promise<Hex>}\n */\nexport async function prepareSignerValidatorClaimDataPayload({\n signer,\n incentiveData,\n chainId,\n validator,\n incentiveQuantity,\n claimant,\n boostId,\n}: SignerValidatorClaimDataParams): Promise<Hex> {\n const trustedSignature = await signer.privateKey.signTypedData({\n domain: {\n name: 'SignerValidator',\n version: '1',\n chainId: chainId,\n verifyingContract: validator,\n },\n types: {\n SignerValidatorData: [\n { name: 'boostId', type: 'uint256' },\n { name: 'incentiveQuantity', type: 'uint8' },\n { name: 'claimant', type: 'address' },\n { name: 'incentiveData', type: 'bytes' },\n ],\n },\n primaryType: 'SignerValidatorData' as const,\n message: {\n boostId,\n incentiveQuantity,\n claimant,\n incentiveData: incentiveData,\n },\n });\n\n // Prepare the claim data payload using the new helper\n const validatorData = prepareSignerValidatorInputParams({\n signer: signer.account,\n signature: trustedSignature,\n incentiveQuantity, // Adjust incentive quantity as necessary\n });\n\n const boostClaimDataPayload = encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'BoostClaimData',\n components: [\n { type: 'bytes', name: 'validatorData' },\n { type: 'bytes', name: 'incentiveData' },\n ],\n },\n ],\n [{ validatorData, incentiveData }],\n );\n\n return boostClaimDataPayload;\n}\n\n/**\n * Given a {@link SignerValidatorInputParams}, properly encode the initialization payload.\n *\n * @param {SignerValidatorInputParams} param0\n * @param {Address} param0.signer\n * @param {Hex} param0.signature\n * @param {number} param0.incentiveQuantity\n * @returns {Hex}\n */\nexport function prepareSignerValidatorInputParams({\n signer,\n signature,\n incentiveQuantity,\n}: SignerValidatorInputParams) {\n return encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'SignerValidatorInputParams',\n components: [\n { type: 'address', name: 'signer' },\n { type: 'bytes', name: 'signature' },\n { type: 'uint8', name: 'incentiveQuantity' },\n ],\n },\n ],\n [{ signer, signature, incentiveQuantity }],\n );\n}\n\n/**\n * Given a {@link SignerValidatorPayload}, properly encode the initialization payload.\n *\n * @param {SignerValidatorPayload} param0\n * @param {Address[]} param0.signers\n * @param {Address} param0.validatorCaller\n * @returns {Hex}\n */\nexport function prepareSignerValidatorPayload({\n signers,\n validatorCaller,\n}: SignerValidatorPayload) {\n return encodeAbiParameters(\n [\n { type: 'address[]', name: 'signers' },\n { type: 'address', name: 'validatorCaller' },\n ],\n [signers, validatorCaller],\n );\n}\n"],"names":["_SignerValidator","DeployableTarget","signerValidatorAbi","address","params","readSignerValidatorSigners","payload","readSignerValidatorHashSignerData","request","result","simulateSignerValidatorValidate","writeSignerValidatorValidate","addresses","allowed","simulateSignerValidatorSetAuthorized","writeSignerValidatorSetAuthorized","simulateSignerValidatorSetValidatorCaller","writeSignerValidatorSetValidatorCaller","prepareSignerValidatorClaimDataPayload","_payload","_options","options","bytecode","prepareSignerValidatorPayload","SignerValidatorBases","RegistryType","SignerValidator","signer","incentiveData","chainId","validator","incentiveQuantity","claimant","boostId","trustedSignature","validatorData","prepareSignerValidatorInputParams","encodeAbiParameters","signature","signers","validatorCaller"],"mappings":";;;;;kpXAmSaA,IAAN,MAAMA,UAAwBC,EAGnC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAWL,KAAyB,M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AA,MACA,UAAAC;AAAA,MACA,eAAAJ;AAAA,IACF;AAAA,EAAA,CACD,GAGKO,IAAgBC,EAAkC;AAAA,IACtD,QAAQT,EAAO;AAAA,IACf,WAAWO;AAAA,IACX,mBAAAH;AAAA;AAAA,EAAA,CACD;AAgBM,SAduBM;AAAA,IAC5B;AAAA,MACE;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,YAAY;AAAA,UACV,EAAE,MAAM,SAAS,MAAM,gBAAgB;AAAA,UACvC,EAAE,MAAM,SAAS,MAAM,gBAAgB;AAAA,QACzC;AAAA,MACF;AAAA,IACF;AAAA,IACA,CAAC,EAAE,eAAAF,GAAe,eAAAP,GAAe;AAAA,EAAA;AAIrC;AAWO,SAASQ,EAAkC;AAAA,EAChD,QAAAT;AAAA,EACA,WAAAW;AAAA,EACA,mBAAAP;AACF,GAA+B;AACtB,SAAAM;AAAA,IACL;AAAA,MACE;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,YAAY;AAAA,UACV,EAAE,MAAM,WAAW,MAAM,SAAS;AAAA,UAClC,EAAE,MAAM,SAAS,MAAM,YAAY;AAAA,UACnC,EAAE,MAAM,SAAS,MAAM,oBAAoB;AAAA,QAC7C;AAAA,MACF;AAAA,IACF;AAAA,IACA,CAAC,EAAE,QAAAV,GAAQ,WAAAW,GAAW,mBAAAP,GAAmB;AAAA,EAAA;AAE7C;AAUO,SAASR,EAA8B;AAAA,EAC5C,SAAAgB;AAAA,EACA,iBAAAC;AACF,GAA2B;AAClB,SAAAH;AAAA,IACL;AAAA,MACE,EAAE,MAAM,aAAa,MAAM,UAAU;AAAA,MACrC,EAAE,MAAM,WAAW,MAAM,kBAAkB;AAAA,IAC7C;AAAA,IACA,CAACE,GAASC,CAAe;AAAA,EAAA;AAE7B;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../generated-DgXPUgXl.cjs"),c=require("../componentInterfaces-D7r9xJmt.cjs"),s=require("@wagmi/core"),l=require("viem"),m=require("../errors.cjs"),f=require("./LimitedSignerValidator.cjs"),n=require("./SignerValidator.cjs"),t={[c.ASignerValidator]:n.SignerValidator};async function u(e,r,i){const a=await s.readContract(e.config,{abi:d.Te,functionName:"getComponentInterface",address:r,...i}),o=t[a];if(!o)throw new m.InvalidComponentInterfaceError(Object.keys(t),a);return new o(e,r)}const g={MAINNET:"0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480",TESTNET:"0xd63167e9db11B108940b2E8236581F961f33f396"};function C(e){return l.decodeAbiParameters([{type:"tuple",name:"BoostClaimData",components:[{type:"bytes",name:"validatorData"},{type:"bytes",name:"incentiveData"}]}],e)[0]}exports.LimitedSignerValidator=f.LimitedSignerValidator;exports.SignerValidator=n.SignerValidator;exports.BoostValidatorEOA=g;exports.ValidatorByComponentInterface=t;exports.decodeClaimData=C;exports.validatorFromAddress=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../generated-BPiHi7W2.cjs"),c=require("../componentInterfaces-Cm4Zfn1v.cjs"),s=require("@wagmi/core"),l=require("viem"),m=require("../errors.cjs"),f=require("./LimitedSignerValidator.cjs"),n=require("./SignerValidator.cjs"),t={[c.ASignerValidator]:n.SignerValidator};async function u(e,r,i){const a=await s.readContract(e.config,{abi:d.Te,functionName:"getComponentInterface",address:r,...i}),o=t[a];if(!o)throw new m.InvalidComponentInterfaceError(Object.keys(t),a);return new o(e,r)}const g={MAINNET:"0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480",TESTNET:"0xd63167e9db11B108940b2E8236581F961f33f396"};function C(e){return l.decodeAbiParameters([{type:"tuple",name:"BoostClaimData",components:[{type:"bytes",name:"validatorData"},{type:"bytes",name:"incentiveData"}]}],e)[0]}exports.LimitedSignerValidator=f.LimitedSignerValidator;exports.SignerValidator=n.SignerValidator;exports.BoostValidatorEOA=g;exports.ValidatorByComponentInterface=t;exports.decodeClaimData=C;exports.validatorFromAddress=u;
2
2
  //# sourceMappingURL=Validator.cjs.map
@@ -1,5 +1,5 @@
1
- import { T as i } from "../generated-pJZHmRCK.js";
2
- import { a as m } from "../componentInterfaces-PR3ijhgZ.js";
1
+ import { T as i } from "../generated-CElkFqkY.js";
2
+ import { a as m } from "../componentInterfaces-5Ezh3Pvx.js";
3
3
  import { readContract as f } from "@wagmi/core";
4
4
  import { decodeAbiParameters as c } from "viem";
5
5
  import { InvalidComponentInterfaceError as d } from "../errors.js";
@@ -0,0 +1,19 @@
1
+ const e = "0xc2c281ec", n = "0x53cf8555", a = "0x7cc1d5bb", t = "0x56586338", c = "0xf60c99c9", s = "0x52b8e45c", i = "0x90318111", o = "0x7687b0ed", A = "0x5fbfaa4e", d = "0xde98bbf0", x = "0xa2dceadb", b = "0x0d36a40d", g = "0xb8ce7b22", l = "0x1392d798", r = "0x3d30a22c";
2
+ export {
3
+ o as A,
4
+ g as a,
5
+ l as b,
6
+ r as c,
7
+ A as d,
8
+ d as e,
9
+ x as f,
10
+ b as g,
11
+ a as h,
12
+ c as i,
13
+ t as j,
14
+ e as k,
15
+ n as l,
16
+ i as m,
17
+ s as n
18
+ };
19
+ //# sourceMappingURL=componentInterfaces-5Ezh3Pvx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"componentInterfaces-5Ezh3Pvx.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,2 @@
1
+ "use strict";const e="0xc2c281ec",n="0x53cf8555",t="0x7cc1d5bb",i="0x56586338",c="0xf60c99c9",a="0x52b8e45c",A="0x90318111",s="0x7687b0ed",d="0x5fbfaa4e",o="0xde98bbf0",g="0xa2dceadb",l="0x0d36a40d",r="0xb8ce7b22",v="0x1392d798",b="0x3d30a22c";exports.AAllowListIncentive=e;exports.ACGDAIncentive=n;exports.AERC20Incentive=t;exports.AERC20PeggedIncentive=i;exports.AERC20PeggedVariableCriteriaIncentive=c;exports.AERC20VariableCriteriaIncentive=a;exports.AERC20VariableIncentive=A;exports.AEventAction=s;exports.AManagedBudget=d;exports.AManagedBudgetWithFees=o;exports.AManagedBudgetWithFeesV2=g;exports.APointsIncentive=l;exports.ASignerValidator=r;exports.ASimpleAllowList=v;exports.ASimpleDenyList=b;
2
+ //# sourceMappingURL=componentInterfaces-Cm4Zfn1v.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"componentInterfaces-Cm4Zfn1v.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -103,10 +103,10 @@ export {
103
103
  f as b,
104
104
  b as c,
105
105
  D as d,
106
- C as e,
107
- A as f,
106
+ A as e,
107
+ C as f,
108
108
  t as g,
109
109
  n as h,
110
110
  a as i
111
111
  };
112
- //# sourceMappingURL=deployments-DqjtOTUr.js.map
112
+ //# sourceMappingURL=deployments-3RHH-eW7.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"deployments-DqjtOTUr.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"deployments-3RHH-eW7.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/errors.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("viem");class i extends Error{constructor(){super('No "BoostCreated" log was emitted from which to extract boostId')}}class d extends Error{constructor(){super("Attempted to call contract method without providing an address")}}class c extends Error{constructor(r){super("Attempted to deploy a contract that already has an address configured"),this.address=r}}class l extends Error{constructor(){super("Implementing class did not properly override the `buildParameters` method")}}class u extends Error{constructor(){super("Expected an an owner to be provided in configuration or an account to exist on Wagmi config.")}}class p extends Error{constructor(){super("Expected a valid Wagmi configuration to be available either on Deployable, or as argument to deploy.")}}class E extends Error{constructor(){super("Expected a valid payload to be available either on Deployable or as argument to deploy.")}}class h extends Error{constructor(r){super("Expected a contract address to exist on receipt.",{cause:r}),this.receipt=r}}class g extends Error{constructor(r,o){super("Address provided does not match any expected protocol interface",{cause:{expected:r,received:o}}),this.expected=[],this.received=a.zeroHash,this.expected=r,this.received=o}}class m extends Error{constructor(r,o){super(`Parameter is not transparently stored onchain. Parameter ${r} in event ${o.name} cannot be used in an action`,{cause:o}),this.event=o,this.input_param_idx=r}}class v extends Error{constructor(r){super("Did not provide a valid FungibleTransferPayload or ERC1155 transfer payload.",{cause:r}),this.received=r}}class y extends Error{constructor(r){super(`Budget needs to explicitly authorize ${r}. You can retrieve this value from BoostCore.address`)}}class b extends Error{constructor(){super("Budgets must be preinitialized before being used with a new Boost")}}class x extends Error{constructor(r){super(`Incentive not cloneable: ${r.constructor.name}`)}}class I extends Error{constructor(){super("Must supply at least one action step")}}class f extends Error{constructor(){super("Cannot supply more than 4 action steps with current protocol version")}}class C extends Error{constructor(r){super(`No known ABI for given signature: ${r}`)}}class t extends Error{constructor(r,{fieldValue:o,criteria:n,...s}){switch(super(r),this.fieldValue=o,this.criteria=n,!0){case"log"in s:this.log=s.log;break;case"decodedArgs"in s:this.decodedArgs=s.decodedArgs}}}class A extends t{constructor(r){super("Decoded Args are malformed; Check which params are indexed",r)}}class D extends t{constructor(r){super("Field value is undefined",r)}}class N extends t{constructor(r){super("Numerical comparisons cannot be used with non-numerical criteria",r)}}class w extends Error{constructor(r,o){super(`Failed to decode function data: ${o.message}`),this.name="FunctionDataDecodeError",this.abi=r,this.originalError=o}}class P extends t{constructor(r){super("Filter can only be used with bytes or string field type",r)}}class F extends t{constructor(r){super("Invalid FilterType provided",r)}}class B extends Error{constructor(){super("Provided Wagmi configuration does not define `chainId` property with which to target protocol contracts"),this.name="NoConnectedChainIdError"}}class M extends Error{constructor(r,o){super(`Provided Wagmi configuration supplied a "chainId" where protocol is not deployed, provided: ${r}, but valid chains are: ${o}`),this.name="InvalidProtocolChainIdError"}}class T extends Error{constructor(r,o="Unable to fetch Incentive Criteria from contract"){super(o+(r?`: ${r.message}`:"")),this.name="IncentiveCriteriaNotFoundError"}}class U extends Error{constructor(r,o=`No logs found for event signature ${r}`){super(o),this.name="NoMatchingLogsError"}}class $ extends Error{constructor(r="unknown",o=`Invalid criteria type ${r}`){super(o),this.name="InvalidCriteriaTypeError"}}class z extends Error{constructor(r="Issue decoding args"){super(r),this.name="DecodedArgsError"}}class V extends Error{constructor(r){super(`Boost with not found with id: ${r}`),this.id=r}}class k extends Error{constructor(r,o){super(r||`Failed to decode tuple: ${o}`),this.tupleIndex=o??-1}}class S extends Error{constructor(r,o){super(r||`Failed to encode tuple: ${o}`),this.tupleIndex=o??-1}}exports.BoostCoreNoIdentifierEmitted=i;exports.BoostNotFoundError=V;exports.BudgetMustAuthorizeBoostCore=y;exports.ContractAddressRequiredError=d;exports.DecodedArgsError=z;exports.DecodedArgsMalformedError=A;exports.DeployableAlreadyDeployedError=c;exports.DeployableBuildParametersUnspecifiedError=l;exports.DeployableMissingPayloadError=E;exports.DeployableUnknownOwnerProvidedError=u;exports.DeployableWagmiConfigurationRequiredError=p;exports.FieldActionValidationError=t;exports.FieldValueNotComparableError=P;exports.FieldValueUndefinedError=D;exports.FunctionDataDecodeError=w;exports.IncentiveCriteriaNotFoundError=T;exports.IncentiveNotCloneableError=x;exports.InvalidComponentInterfaceError=g;exports.InvalidCriteriaTypeError=$;exports.InvalidNumericalCriteriaError=N;exports.InvalidProtocolChainIdError=M;exports.InvalidTupleDecodingError=k;exports.InvalidTupleEncodingError=S;exports.MustInitializeBudgetError=b;exports.NoConnectedChainIdError=B;exports.NoContractAddressUponReceiptError=h;exports.NoEventActionStepsProvidedError=I;exports.NoMatchingLogsError=U;exports.TooManyEventActionStepsProvidedError=f;exports.UnknownTransferPayloadSupplied=v;exports.UnparseableAbiParamError=m;exports.UnrecognizedFilterTypeError=F;exports.ValidationAbiMissingError=C;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("viem");class i extends Error{constructor(){super('No "BoostCreated" log was emitted from which to extract boostId')}}class d extends Error{constructor(){super("Attempted to call contract method without providing an address")}}class c extends Error{constructor(r){super("Attempted to deploy a contract that already has an address configured"),this.address=r}}class l extends Error{constructor(){super("Implementing class did not properly override the `buildParameters` method")}}class u extends Error{constructor(){super("Expected an an owner to be provided in configuration or an account to exist on Wagmi config.")}}class p extends Error{constructor(){super("Expected a valid Wagmi configuration to be available either on Deployable, or as argument to deploy.")}}class E extends Error{constructor(){super("Expected a valid payload to be available either on Deployable or as argument to deploy.")}}class h extends Error{constructor(r){super("Expected a contract address to exist on receipt.",{cause:r}),this.receipt=r}}class g extends Error{constructor(r,o){super("Address provided does not match any expected protocol interface",{cause:{expected:r,received:o}}),this.expected=[],this.received=a.zeroHash,this.expected=r,this.received=o}}class m extends Error{constructor(r,o){super(`Parameter is not transparently stored onchain. Parameter ${r} in event ${o.name} cannot be used in an action`,{cause:o}),this.event=o,this.input_param_idx=r}}class v extends Error{constructor(r){super("Did not provide a valid FungibleTransferPayload or ERC1155 transfer payload.",{cause:r}),this.received=r}}class y extends Error{constructor(r){super(`Budget needs to explicitly authorize ${r}. You can retrieve this value from BoostCore.address`)}}class b extends Error{constructor(){super("Budgets must be preinitialized before being used with a new Boost")}}class x extends Error{constructor(r){super(`Incentive not cloneable: ${r.constructor.name}`)}}class I extends Error{constructor(){super("Must supply at least one action step")}}class f extends Error{constructor(){super("Cannot supply more than 4 action steps with current protocol version")}}class C extends Error{constructor(r){super(`No known ABI for given signature: ${r}`)}}class t extends Error{constructor(r,{fieldValue:o,criteria:n,...s}){switch(super(r),this.fieldValue=o,this.criteria=n,!0){case"log"in s:this.log=s.log;break;case"decodedArgs"in s:this.decodedArgs=s.decodedArgs}}}class A extends t{constructor(r){super("Decoded Args are malformed; Check which params are indexed",r)}}class D extends t{constructor(r){super("Field value is undefined",r)}}class N extends t{constructor(r){super("Numerical comparisons cannot be used with non-numerical criteria",r)}}class P extends Error{constructor(r,o){super(`Failed to decode function data: ${o.message}`),this.name="FunctionDataDecodeError",this.abi=r,this.originalError=o}}class w extends t{constructor(r){super("Filter can only be used with bytes or string field type",r)}}class F extends t{constructor(r){super("Invalid FilterType provided",r)}}class B extends Error{constructor(){super("Provided Wagmi configuration does not define `chainId` property with which to target protocol contracts"),this.name="NoConnectedChainIdError"}}class M extends Error{constructor(r,o){super(`Provided Wagmi configuration supplied a "chainId" where protocol is not deployed, provided: ${r}, but valid chains are: ${o}`),this.name="InvalidProtocolChainIdError"}}class T extends Error{constructor(r,o="Unable to fetch Incentive Criteria from contract"){super(o+(r?`: ${r.message}`:"")),this.name="IncentiveCriteriaNotFoundError"}}class U extends Error{constructor(r,o=`No logs found for event signature ${r}`){super(o),this.name="NoMatchingLogsError"}}class $ extends Error{constructor(r="unknown",o=`Invalid criteria type ${r}`){super(o),this.name="InvalidCriteriaTypeError"}}class z extends Error{constructor(r="Issue decoding args"){super(r),this.name="DecodedArgsError"}}class V extends Error{constructor(r){super(`Boost not found with id: ${r}`),this.id=r}}class k extends Error{constructor(r,o){super(r||`Failed to decode tuple: ${o}`),this.tupleIndex=o??-1}}class S extends Error{constructor(r,o){super(r||`Failed to encode tuple: ${o}`),this.tupleIndex=o??-1}}exports.BoostCoreNoIdentifierEmitted=i;exports.BoostNotFoundError=V;exports.BudgetMustAuthorizeBoostCore=y;exports.ContractAddressRequiredError=d;exports.DecodedArgsError=z;exports.DecodedArgsMalformedError=A;exports.DeployableAlreadyDeployedError=c;exports.DeployableBuildParametersUnspecifiedError=l;exports.DeployableMissingPayloadError=E;exports.DeployableUnknownOwnerProvidedError=u;exports.DeployableWagmiConfigurationRequiredError=p;exports.FieldActionValidationError=t;exports.FieldValueNotComparableError=w;exports.FieldValueUndefinedError=D;exports.FunctionDataDecodeError=P;exports.IncentiveCriteriaNotFoundError=T;exports.IncentiveNotCloneableError=x;exports.InvalidComponentInterfaceError=g;exports.InvalidCriteriaTypeError=$;exports.InvalidNumericalCriteriaError=N;exports.InvalidProtocolChainIdError=M;exports.InvalidTupleDecodingError=k;exports.InvalidTupleEncodingError=S;exports.MustInitializeBudgetError=b;exports.NoConnectedChainIdError=B;exports.NoContractAddressUponReceiptError=h;exports.NoEventActionStepsProvidedError=I;exports.NoMatchingLogsError=U;exports.TooManyEventActionStepsProvidedError=f;exports.UnknownTransferPayloadSupplied=v;exports.UnparseableAbiParamError=m;exports.UnrecognizedFilterTypeError=F;exports.ValidationAbiMissingError=C;
2
2
  //# sourceMappingURL=errors.cjs.map