@boostxyz/sdk 5.2.0 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/README.md +10 -0
  2. package/dist/Actions/Action.cjs +1 -1
  3. package/dist/Actions/Action.js +1 -1
  4. package/dist/Actions/EventAction.cjs +1 -1
  5. package/dist/Actions/EventAction.cjs.map +1 -1
  6. package/dist/Actions/EventAction.d.ts +82 -38
  7. package/dist/Actions/EventAction.d.ts.map +1 -1
  8. package/dist/Actions/EventAction.js +437 -297
  9. package/dist/Actions/EventAction.js.map +1 -1
  10. package/dist/AllowLists/AllowList.cjs +1 -1
  11. package/dist/AllowLists/AllowList.js +2 -2
  12. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  13. package/dist/AllowLists/SimpleAllowList.js +2 -2
  14. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  15. package/dist/AllowLists/SimpleDenyList.js +3 -3
  16. package/dist/Auth/PassthroughAuth.cjs +1 -1
  17. package/dist/Auth/PassthroughAuth.js +1 -1
  18. package/dist/BoostCore.cjs +2 -2
  19. package/dist/BoostCore.cjs.map +1 -1
  20. package/dist/BoostCore.d.ts +42 -1
  21. package/dist/BoostCore.d.ts.map +1 -1
  22. package/dist/BoostCore.js +360 -318
  23. package/dist/BoostCore.js.map +1 -1
  24. package/dist/BoostRegistry.cjs +1 -1
  25. package/dist/BoostRegistry.js +2 -2
  26. package/dist/{Budget-N0YEfSt2.cjs → Budget-AoNx7uFd.cjs} +2 -2
  27. package/dist/{Budget-N0YEfSt2.cjs.map → Budget-AoNx7uFd.cjs.map} +1 -1
  28. package/dist/{Budget-C0SMvfEl.js → Budget-DYIV9iNK.js} +3 -3
  29. package/dist/{Budget-C0SMvfEl.js.map → Budget-DYIV9iNK.js.map} +1 -1
  30. package/dist/Budgets/Budget.cjs +1 -1
  31. package/dist/Budgets/Budget.js +2 -2
  32. package/dist/Budgets/ManagedBudget.cjs +1 -1
  33. package/dist/Budgets/ManagedBudget.js +2 -2
  34. package/dist/Deployable/DeployableTarget.cjs +1 -1
  35. package/dist/Deployable/DeployableTarget.js +1 -1
  36. package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
  37. package/dist/Deployable/DeployableTargetWithRBAC.js +2 -2
  38. package/dist/Incentive-BbkfwGOb.cjs +2 -0
  39. package/dist/Incentive-BbkfwGOb.cjs.map +1 -0
  40. package/dist/{Incentive-BwRH0A6j.js → Incentive-qlnv5kQB.js} +203 -124
  41. package/dist/Incentive-qlnv5kQB.js.map +1 -0
  42. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  43. package/dist/Incentives/AllowListIncentive.js +3 -3
  44. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  45. package/dist/Incentives/CGDAIncentive.js +2 -2
  46. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  47. package/dist/Incentives/ERC20Incentive.js +6 -6
  48. package/dist/Incentives/ERC20PeggedIncentive.d.ts +10 -1
  49. package/dist/Incentives/ERC20PeggedIncentive.d.ts.map +1 -1
  50. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.d.ts +16 -4
  51. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.d.ts.map +1 -1
  52. package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +1 -1
  53. package/dist/Incentives/ERC20VariableCriteriaIncentive.js +2 -2
  54. package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
  55. package/dist/Incentives/ERC20VariableIncentive.js +2 -2
  56. package/dist/Incentives/Incentive.cjs +1 -1
  57. package/dist/Incentives/Incentive.js +2 -2
  58. package/dist/Incentives/PointsIncentive.cjs +1 -1
  59. package/dist/Incentives/PointsIncentive.js +2 -2
  60. package/dist/{SimpleDenyList-B8QeJthf.js → SimpleDenyList-ByAr4X1r.js} +3 -3
  61. package/dist/{SimpleDenyList-B8QeJthf.js.map → SimpleDenyList-ByAr4X1r.js.map} +1 -1
  62. package/dist/{SimpleDenyList-DIb4xX3j.cjs → SimpleDenyList-CsRXJPwm.cjs} +2 -2
  63. package/dist/{SimpleDenyList-DIb4xX3j.cjs.map → SimpleDenyList-CsRXJPwm.cjs.map} +1 -1
  64. package/dist/Validators/LimitedSignerValidator.cjs +1 -1
  65. package/dist/Validators/LimitedSignerValidator.js +2 -2
  66. package/dist/Validators/SignerValidator.cjs +1 -1
  67. package/dist/Validators/SignerValidator.js +2 -2
  68. package/dist/Validators/Validator.cjs +1 -1
  69. package/dist/Validators/Validator.js +1 -1
  70. package/dist/{deployments-COxshLqt.js → deployments-D0fs26TV.js} +16 -16
  71. package/dist/{deployments-COxshLqt.js.map → deployments-D0fs26TV.js.map} +1 -1
  72. package/dist/{deployments-BGpr4ppG.cjs → deployments-DoIOqxco.cjs} +2 -2
  73. package/dist/deployments-DoIOqxco.cjs.map +1 -0
  74. package/dist/deployments.json +3 -3
  75. package/dist/errors.cjs +1 -1
  76. package/dist/errors.cjs.map +1 -1
  77. package/dist/errors.d.ts +40 -0
  78. package/dist/errors.d.ts.map +1 -1
  79. package/dist/errors.js +42 -16
  80. package/dist/errors.js.map +1 -1
  81. package/dist/{generated-ClbO_ULI.js → generated-Cyvr_Tjx.js} +446 -438
  82. package/dist/generated-Cyvr_Tjx.js.map +1 -0
  83. package/dist/{generated-CRD9XfOT.cjs → generated-DtYPHhtX.cjs} +2 -2
  84. package/dist/generated-DtYPHhtX.cjs.map +1 -0
  85. package/dist/index.cjs +1 -1
  86. package/dist/index.js +160 -155
  87. package/dist/utils.cjs +1 -1
  88. package/dist/utils.cjs.map +1 -1
  89. package/dist/utils.js +367 -19
  90. package/dist/utils.js.map +1 -1
  91. package/package.json +1 -1
  92. package/src/Actions/EventAction.test.ts +285 -3
  93. package/src/Actions/EventAction.ts +402 -124
  94. package/src/BoostCore.test.ts +51 -3
  95. package/src/BoostCore.ts +73 -0
  96. package/src/Incentives/ERC20PeggedIncentive.ts +33 -4
  97. package/src/Incentives/ERC20PeggedVariableCriteriaIncentive.test.ts +67 -25
  98. package/src/Incentives/ERC20PeggedVariableCriteriaIncentive.ts +89 -7
  99. package/src/errors.ts +50 -0
  100. package/dist/Incentive-BwRH0A6j.js.map +0 -1
  101. package/dist/Incentive-CZw_hu64.cjs +0 -2
  102. package/dist/Incentive-CZw_hu64.cjs.map +0 -1
  103. package/dist/deployments-BGpr4ppG.cjs.map +0 -1
  104. package/dist/generated-CRD9XfOT.cjs.map +0 -1
  105. package/dist/generated-ClbO_ULI.js.map +0 -1
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("./BoostRegistry.cjs"),l=require("./BoostCore.cjs"),A=require("./Boost.cjs"),u=require("./Actions/Action.cjs"),a=require("./Actions/EventAction.cjs"),g=require("./AllowLists/AllowList.cjs"),y=require("./AllowLists/SimpleAllowList.cjs"),I=require("./SimpleDenyList-DIb4xX3j.cjs"),d=require("./Budget-N0YEfSt2.cjs"),t=require("./Budgets/ManagedBudget.cjs"),D=require("./Deployable/Deployable.cjs"),T=require("./Deployable/Contract.cjs"),V=require("./Deployable/DeployableTarget.cjs"),P=require("./Deployable/DeployableTargetWithRBAC.cjs"),v=require("./Incentives/AllowListIncentive.cjs"),R=require("./Incentives/CGDAIncentive.cjs"),S=require("./Incentives/ERC20Incentive.cjs"),o=require("./Incentive-CZw_hu64.cjs"),m=require("./Incentives/ERC20VariableIncentive.cjs"),C=require("./Incentives/ERC20VariableCriteriaIncentive.cjs"),b=require("./Incentives/PointsIncentive.cjs"),s=require("./Validators/SignerValidator.cjs"),p=require("./Validators/LimitedSignerValidator.cjs"),c=require("./Validators/Validator.cjs"),e=require("./errors.cjs"),i=require("./utils.cjs"),B=require("./claiming.cjs"),n=require("./transfers.cjs"),F=require("./Auth/PassthroughAuth.cjs"),r=require("./generated-CRD9XfOT.cjs");exports.BOOST_REGISTRY_ADDRESS=E.BOOST_REGISTRY_ADDRESS;exports.BOOST_REGISTRY_ADDRESSES=E.BOOST_REGISTRY_ADDRESSES;exports.BoostRegistry=E.BoostRegistry;exports.BOOST_CORE_ADDRESS=l.BOOST_CORE_ADDRESS;exports.BOOST_CORE_ADDRESSES=l.BOOST_CORE_ADDRESSES;exports.BoostCore=l.BoostCore;exports.FEE_DENOMINATOR=l.FEE_DENOMINATOR;exports.Boost=A.Boost;exports.prepareBoostPayload=A.prepareBoostPayload;exports.ActionByComponentInterface=u.ActionByComponentInterface;exports.actionFromAddress=u.actionFromAddress;exports.EventAction=a.EventAction;exports.FilterType=a.FilterType;exports.PrimitiveType=a.PrimitiveType;exports.SignatureType=a.SignatureType;exports.anyActionParameter=a.anyActionParameter;exports.isEventActionPayloadSimple=a.isEventActionPayloadSimple;exports.prepareEventActionPayload=a.prepareEventActionPayload;exports.transactionSenderClaimant=a.transactionSenderClaimant;exports.AllowListByComponentInterface=g.AllowListByComponentInterface;exports.OpenAllowList=g.OpenAllowList;exports.allowListFromAddress=g.allowListFromAddress;exports.LIST_MANAGER_ROLE=y.LIST_MANAGER_ROLE;exports.SimpleAllowList=y.SimpleAllowList;exports.prepareSimpleAllowListPayload=y.prepareSimpleAllowListPayload;exports.SimpleDenyList=I.SimpleDenyList;exports.prepareSimpleDenyListPayload=I.prepareSimpleDenyListPayload;exports.BudgetByComponentInterface=d.BudgetByComponentInterface;exports.ManagedBudgetWithFees=d.ManagedBudgetWithFees;exports.budgetFromAddress=d.budgetFromAddress;exports.prepareManagedBudgetWithFeesPayload=d.prepareManagedBudgetWithFeesPayload;exports.ManagedBudget=t.ManagedBudget;exports.ManagedBudgetRoles=t.ManagedBudgetRoles;exports.isERC1155TransferPayload=t.isERC1155TransferPayload;exports.isFungibleTransfer=t.isFungibleTransfer;exports.prepareManagedBudgetPayload=t.prepareManagedBudgetPayload;exports.prepareTransfer=t.prepareTransfer;exports.Deployable=D.Deployable;exports.Contract=T.Contract;exports.DeployableTarget=V.DeployableTarget;exports.DeployableTargetWithRBAC=P.DeployableTargetWithRBAC;exports.Roles=P.Roles;exports.AllowListIncentive=v.AllowListIncentive;exports.prepareAllowListIncentivePayload=v.prepareAllowListIncentivePayload;exports.CGDAIncentive=R.CGDAIncentive;exports.prepareCGDAIncentivePayload=R.prepareCGDAIncentivePayload;exports.ERC20Incentive=S.ERC20Incentive;exports.prepareERC20IncentivePayload=S.prepareERC20IncentivePayload;exports.ERC20PeggedIncentive=o.ERC20PeggedIncentive;exports.ERC20PeggedVariableCriteriaIncentive=o.ERC20PeggedVariableCriteriaIncentive;exports.IncentiveByComponentInterface=o.IncentiveByComponentInterface;exports.incentiveFromAddress=o.incentiveFromAddress;exports.prepareERC20PeggedIncentivePayload=o.prepareERC20PeggedIncentivePayload;exports.prepareERC20PeggedVariableCriteriaIncentivePayload=o.prepareERC20PeggedVariableCriteriaIncentivePayload;exports.ERC20VariableIncentive=m.ERC20VariableIncentive;exports.prepareERC20VariableIncentivePayload=m.prepareERC20VariableIncentivePayload;exports.ERC20VariableCriteriaIncentive=C.ERC20VariableCriteriaIncentive;exports.gasRebateIncentiveCriteria=C.gasRebateIncentiveCriteria;exports.prepareERC20VariableCriteriaIncentivePayload=C.prepareERC20VariableCriteriaIncentivePayload;exports.PointsIncentive=b.PointsIncentive;exports.preparePointsIncentivePayload=b.preparePointsIncentivePayload;exports.SignerValidator=s.SignerValidator;exports.prepareSignerValidatorClaimDataPayload=s.prepareSignerValidatorClaimDataPayload;exports.prepareSignerValidatorInputParams=s.prepareSignerValidatorInputParams;exports.prepareSignerValidatorPayload=s.prepareSignerValidatorPayload;exports.LimitedSignerValidator=p.LimitedSignerValidator;exports.prepareLimitedSignerValidatorClaimDataPayload=p.prepareLimitedSignerValidatorClaimDataPayload;exports.prepareLimitedSignerValidatorInputParams=p.prepareLimitedSignerValidatorInputParams;exports.prepareLimitedSignerValidatorPayload=p.prepareLimitedSignerValidatorPayload;exports.BoostValidatorEOA=c.BoostValidatorEOA;exports.ValidatorByComponentInterface=c.ValidatorByComponentInterface;exports.decodeClaimData=c.decodeClaimData;exports.validatorFromAddress=c.validatorFromAddress;exports.BoostCoreNoIdentifierEmitted=e.BoostCoreNoIdentifierEmitted;exports.BoostNotFoundError=e.BoostNotFoundError;exports.BudgetMustAuthorizeBoostCore=e.BudgetMustAuthorizeBoostCore;exports.ContractAddressRequiredError=e.ContractAddressRequiredError;exports.DecodedArgsError=e.DecodedArgsError;exports.DecodedArgsMalformedError=e.DecodedArgsMalformedError;exports.DeployableAlreadyDeployedError=e.DeployableAlreadyDeployedError;exports.DeployableBuildParametersUnspecifiedError=e.DeployableBuildParametersUnspecifiedError;exports.DeployableMissingPayloadError=e.DeployableMissingPayloadError;exports.DeployableUnknownOwnerProvidedError=e.DeployableUnknownOwnerProvidedError;exports.DeployableWagmiConfigurationRequiredError=e.DeployableWagmiConfigurationRequiredError;exports.FieldActionValidationError=e.FieldActionValidationError;exports.FieldValueNotComparableError=e.FieldValueNotComparableError;exports.FieldValueUndefinedError=e.FieldValueUndefinedError;exports.FunctionDataDecodeError=e.FunctionDataDecodeError;exports.IncentiveCriteriaNotFoundError=e.IncentiveCriteriaNotFoundError;exports.IncentiveNotCloneableError=e.IncentiveNotCloneableError;exports.InvalidComponentInterfaceError=e.InvalidComponentInterfaceError;exports.InvalidCriteriaTypeError=e.InvalidCriteriaTypeError;exports.InvalidNumericalCriteriaError=e.InvalidNumericalCriteriaError;exports.InvalidProtocolChainIdError=e.InvalidProtocolChainIdError;exports.MustInitializeBudgetError=e.MustInitializeBudgetError;exports.NoConnectedChainIdError=e.NoConnectedChainIdError;exports.NoContractAddressUponReceiptError=e.NoContractAddressUponReceiptError;exports.NoEventActionStepsProvidedError=e.NoEventActionStepsProvidedError;exports.NoMatchingLogsError=e.NoMatchingLogsError;exports.TooManyEventActionStepsProvidedError=e.TooManyEventActionStepsProvidedError;exports.UnknownTransferPayloadSupplied=e.UnknownTransferPayloadSupplied;exports.UnparseableAbiParamError=e.UnparseableAbiParamError;exports.UnrecognizedFilterTypeError=e.UnrecognizedFilterTypeError;exports.ValidationAbiMissingError=e.ValidationAbiMissingError;exports.CheatCodes=i.CheatCodes;exports.RegistryType=i.RegistryType;exports.TRANSFER_SIGNATURE=i.TRANSFER_SIGNATURE;exports.assertValidAddressByChainId=i.assertValidAddressByChainId;exports.awaitResult=i.awaitResult;exports.bytes4=i.bytes4;exports.getDeployedContractAddress=i.getDeployedContractAddress;exports.getErc20Balance=i.getErc20Balance;exports.StrategyType=B.StrategyType;exports.prepareClaimPayload=B.prepareClaimPayload;exports.AssetType=n.AssetType;exports.prepareERC1155Payload=n.prepareERC1155Payload;exports.prepareERC1155Transfer=n.prepareERC1155Transfer;exports.prepareFungiblePayload=n.prepareFungiblePayload;exports.prepareFungibleTransfer=n.prepareFungibleTransfer;exports.prepareTransferPayload=n.prepareTransferPayload;exports.PassthroughAuth=F.PassthroughAuth;exports.allowListIncentiveAbi=r.B;exports.boostCoreAbi=r.I;exports.boostRegistryAbi=r.ce;exports.cgdaIncentiveAbi=r.A;exports.erc20IncentiveAbi=r.f;exports.erc20PeggedIncentiveAbi=r.v;exports.erc20PeggedVariableCriteriaIncentiveAbi=r.l;exports.erc20VariableCriteriaIncentiveAbi=r.d;exports.erc20VariableIncentiveAbi=r.g;exports.limitedSignerValidatorAbi=r.V;exports.managedBudgetAbi=r.w;exports.managedBudgetWithFeesAbi=r.o;exports.passthroughAuthAbi=r.We;exports.pointsIncentiveAbi=r.N;exports.rbacAbi=r.H;exports.signerValidatorAbi=r.k;exports.simpleAllowListAbi=r.C;exports.simpleDenyListAbi=r.E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("./BoostRegistry.cjs"),d=require("./BoostCore.cjs"),C=require("./Boost.cjs"),u=require("./Actions/Action.cjs"),a=require("./Actions/EventAction.cjs"),g=require("./AllowLists/AllowList.cjs"),y=require("./AllowLists/SimpleAllowList.cjs"),I=require("./SimpleDenyList-CsRXJPwm.cjs"),l=require("./Budget-AoNx7uFd.cjs"),o=require("./Budgets/ManagedBudget.cjs"),B=require("./Deployable/Deployable.cjs"),T=require("./Deployable/Contract.cjs"),V=require("./Deployable/DeployableTarget.cjs"),v=require("./Deployable/DeployableTargetWithRBAC.cjs"),P=require("./Incentives/AllowListIncentive.cjs"),R=require("./Incentives/CGDAIncentive.cjs"),S=require("./Incentives/ERC20Incentive.cjs"),t=require("./Incentive-BbkfwGOb.cjs"),m=require("./Incentives/ERC20VariableIncentive.cjs"),A=require("./Incentives/ERC20VariableCriteriaIncentive.cjs"),b=require("./Incentives/PointsIncentive.cjs"),s=require("./Validators/SignerValidator.cjs"),p=require("./Validators/LimitedSignerValidator.cjs"),c=require("./Validators/Validator.cjs"),e=require("./errors.cjs"),i=require("./utils.cjs"),D=require("./claiming.cjs"),n=require("./transfers.cjs"),F=require("./Auth/PassthroughAuth.cjs"),r=require("./generated-DtYPHhtX.cjs");exports.BOOST_REGISTRY_ADDRESS=E.BOOST_REGISTRY_ADDRESS;exports.BOOST_REGISTRY_ADDRESSES=E.BOOST_REGISTRY_ADDRESSES;exports.BoostRegistry=E.BoostRegistry;exports.BOOST_CORE_ADDRESS=d.BOOST_CORE_ADDRESS;exports.BOOST_CORE_ADDRESSES=d.BOOST_CORE_ADDRESSES;exports.BoostCore=d.BoostCore;exports.FEE_DENOMINATOR=d.FEE_DENOMINATOR;exports.Boost=C.Boost;exports.prepareBoostPayload=C.prepareBoostPayload;exports.ActionByComponentInterface=u.ActionByComponentInterface;exports.actionFromAddress=u.actionFromAddress;exports.EventAction=a.EventAction;exports.FilterType=a.FilterType;exports.PrimitiveType=a.PrimitiveType;exports.SignatureType=a.SignatureType;exports.anyActionParameter=a.anyActionParameter;exports.decodeAndReorderLogArgs=a.decodeAndReorderLogArgs;exports.isEventActionPayloadSimple=a.isEventActionPayloadSimple;exports.packFieldIndexes=a.packFieldIndexes;exports.prepareEventActionPayload=a.prepareEventActionPayload;exports.transactionSenderClaimant=a.transactionSenderClaimant;exports.unpackFieldIndexes=a.unpackFieldIndexes;exports.AllowListByComponentInterface=g.AllowListByComponentInterface;exports.OpenAllowList=g.OpenAllowList;exports.allowListFromAddress=g.allowListFromAddress;exports.LIST_MANAGER_ROLE=y.LIST_MANAGER_ROLE;exports.SimpleAllowList=y.SimpleAllowList;exports.prepareSimpleAllowListPayload=y.prepareSimpleAllowListPayload;exports.SimpleDenyList=I.SimpleDenyList;exports.prepareSimpleDenyListPayload=I.prepareSimpleDenyListPayload;exports.BudgetByComponentInterface=l.BudgetByComponentInterface;exports.ManagedBudgetWithFees=l.ManagedBudgetWithFees;exports.budgetFromAddress=l.budgetFromAddress;exports.prepareManagedBudgetWithFeesPayload=l.prepareManagedBudgetWithFeesPayload;exports.ManagedBudget=o.ManagedBudget;exports.ManagedBudgetRoles=o.ManagedBudgetRoles;exports.isERC1155TransferPayload=o.isERC1155TransferPayload;exports.isFungibleTransfer=o.isFungibleTransfer;exports.prepareManagedBudgetPayload=o.prepareManagedBudgetPayload;exports.prepareTransfer=o.prepareTransfer;exports.Deployable=B.Deployable;exports.Contract=T.Contract;exports.DeployableTarget=V.DeployableTarget;exports.DeployableTargetWithRBAC=v.DeployableTargetWithRBAC;exports.Roles=v.Roles;exports.AllowListIncentive=P.AllowListIncentive;exports.prepareAllowListIncentivePayload=P.prepareAllowListIncentivePayload;exports.CGDAIncentive=R.CGDAIncentive;exports.prepareCGDAIncentivePayload=R.prepareCGDAIncentivePayload;exports.ERC20Incentive=S.ERC20Incentive;exports.prepareERC20IncentivePayload=S.prepareERC20IncentivePayload;exports.ERC20PeggedIncentive=t.ERC20PeggedIncentive;exports.ERC20PeggedVariableCriteriaIncentive=t.ERC20PeggedVariableCriteriaIncentive;exports.IncentiveByComponentInterface=t.IncentiveByComponentInterface;exports.incentiveFromAddress=t.incentiveFromAddress;exports.prepareERC20PeggedIncentivePayload=t.prepareERC20PeggedIncentivePayload;exports.prepareERC20PeggedVariableCriteriaIncentivePayload=t.prepareERC20PeggedVariableCriteriaIncentivePayload;exports.ERC20VariableIncentive=m.ERC20VariableIncentive;exports.prepareERC20VariableIncentivePayload=m.prepareERC20VariableIncentivePayload;exports.ERC20VariableCriteriaIncentive=A.ERC20VariableCriteriaIncentive;exports.gasRebateIncentiveCriteria=A.gasRebateIncentiveCriteria;exports.prepareERC20VariableCriteriaIncentivePayload=A.prepareERC20VariableCriteriaIncentivePayload;exports.PointsIncentive=b.PointsIncentive;exports.preparePointsIncentivePayload=b.preparePointsIncentivePayload;exports.SignerValidator=s.SignerValidator;exports.prepareSignerValidatorClaimDataPayload=s.prepareSignerValidatorClaimDataPayload;exports.prepareSignerValidatorInputParams=s.prepareSignerValidatorInputParams;exports.prepareSignerValidatorPayload=s.prepareSignerValidatorPayload;exports.LimitedSignerValidator=p.LimitedSignerValidator;exports.prepareLimitedSignerValidatorClaimDataPayload=p.prepareLimitedSignerValidatorClaimDataPayload;exports.prepareLimitedSignerValidatorInputParams=p.prepareLimitedSignerValidatorInputParams;exports.prepareLimitedSignerValidatorPayload=p.prepareLimitedSignerValidatorPayload;exports.BoostValidatorEOA=c.BoostValidatorEOA;exports.ValidatorByComponentInterface=c.ValidatorByComponentInterface;exports.decodeClaimData=c.decodeClaimData;exports.validatorFromAddress=c.validatorFromAddress;exports.BoostCoreNoIdentifierEmitted=e.BoostCoreNoIdentifierEmitted;exports.BoostNotFoundError=e.BoostNotFoundError;exports.BudgetMustAuthorizeBoostCore=e.BudgetMustAuthorizeBoostCore;exports.ContractAddressRequiredError=e.ContractAddressRequiredError;exports.DecodedArgsError=e.DecodedArgsError;exports.DecodedArgsMalformedError=e.DecodedArgsMalformedError;exports.DeployableAlreadyDeployedError=e.DeployableAlreadyDeployedError;exports.DeployableBuildParametersUnspecifiedError=e.DeployableBuildParametersUnspecifiedError;exports.DeployableMissingPayloadError=e.DeployableMissingPayloadError;exports.DeployableUnknownOwnerProvidedError=e.DeployableUnknownOwnerProvidedError;exports.DeployableWagmiConfigurationRequiredError=e.DeployableWagmiConfigurationRequiredError;exports.FieldActionValidationError=e.FieldActionValidationError;exports.FieldValueNotComparableError=e.FieldValueNotComparableError;exports.FieldValueUndefinedError=e.FieldValueUndefinedError;exports.FunctionDataDecodeError=e.FunctionDataDecodeError;exports.IncentiveCriteriaNotFoundError=e.IncentiveCriteriaNotFoundError;exports.IncentiveNotCloneableError=e.IncentiveNotCloneableError;exports.InvalidComponentInterfaceError=e.InvalidComponentInterfaceError;exports.InvalidCriteriaTypeError=e.InvalidCriteriaTypeError;exports.InvalidNumericalCriteriaError=e.InvalidNumericalCriteriaError;exports.InvalidProtocolChainIdError=e.InvalidProtocolChainIdError;exports.InvalidTupleDecodingError=e.InvalidTupleDecodingError;exports.InvalidTupleEncodingError=e.InvalidTupleEncodingError;exports.MustInitializeBudgetError=e.MustInitializeBudgetError;exports.NoConnectedChainIdError=e.NoConnectedChainIdError;exports.NoContractAddressUponReceiptError=e.NoContractAddressUponReceiptError;exports.NoEventActionStepsProvidedError=e.NoEventActionStepsProvidedError;exports.NoMatchingLogsError=e.NoMatchingLogsError;exports.TooManyEventActionStepsProvidedError=e.TooManyEventActionStepsProvidedError;exports.UnknownTransferPayloadSupplied=e.UnknownTransferPayloadSupplied;exports.UnparseableAbiParamError=e.UnparseableAbiParamError;exports.UnrecognizedFilterTypeError=e.UnrecognizedFilterTypeError;exports.ValidationAbiMissingError=e.ValidationAbiMissingError;exports.CheatCodes=i.CheatCodes;exports.RegistryType=i.RegistryType;exports.TRANSFER_SIGNATURE=i.TRANSFER_SIGNATURE;exports.assertValidAddressByChainId=i.assertValidAddressByChainId;exports.awaitResult=i.awaitResult;exports.bytes4=i.bytes4;exports.getDeployedContractAddress=i.getDeployedContractAddress;exports.getErc20Balance=i.getErc20Balance;exports.StrategyType=D.StrategyType;exports.prepareClaimPayload=D.prepareClaimPayload;exports.AssetType=n.AssetType;exports.prepareERC1155Payload=n.prepareERC1155Payload;exports.prepareERC1155Transfer=n.prepareERC1155Transfer;exports.prepareFungiblePayload=n.prepareFungiblePayload;exports.prepareFungibleTransfer=n.prepareFungibleTransfer;exports.prepareTransferPayload=n.prepareTransferPayload;exports.PassthroughAuth=F.PassthroughAuth;exports.allowListIncentiveAbi=r.B;exports.boostCoreAbi=r.I;exports.boostRegistryAbi=r.ce;exports.cgdaIncentiveAbi=r.A;exports.erc20IncentiveAbi=r.f;exports.erc20PeggedIncentiveAbi=r.v;exports.erc20PeggedVariableCriteriaIncentiveAbi=r.l;exports.erc20VariableCriteriaIncentiveAbi=r.d;exports.erc20VariableIncentiveAbi=r.g;exports.limitedSignerValidatorAbi=r.V;exports.managedBudgetAbi=r.w;exports.managedBudgetWithFeesAbi=r.o;exports.passthroughAuthAbi=r.We;exports.pointsIncentiveAbi=r.N;exports.rbacAbi=r.H;exports.signerValidatorAbi=r.k;exports.simpleAllowListAbi=r.C;exports.simpleDenyListAbi=r.E;
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -1,172 +1,177 @@
1
- import { BOOST_REGISTRY_ADDRESS as a, BOOST_REGISTRY_ADDRESSES as o, BoostRegistry as t } from "./BoostRegistry.js";
2
- import { BOOST_CORE_ADDRESS as n, BOOST_CORE_ADDRESSES as d, BoostCore as p, FEE_DENOMINATOR as l } from "./BoostCore.js";
1
+ import { BOOST_REGISTRY_ADDRESS as a, BOOST_REGISTRY_ADDRESSES as o, BoostRegistry as i } from "./BoostRegistry.js";
2
+ import { BOOST_CORE_ADDRESS as n, BOOST_CORE_ADDRESSES as d, BoostCore as l, FEE_DENOMINATOR as p } from "./BoostCore.js";
3
3
  import { Boost as c, prepareBoostPayload as m } from "./Boost.js";
4
4
  import { ActionByComponentInterface as g, actionFromAddress as A } from "./Actions/Action.js";
5
- import { EventAction as C, FilterType as I, PrimitiveType as b, SignatureType as f, anyActionParameter as P, isEventActionPayloadSimple as v, prepareEventActionPayload as R, transactionSenderClaimant as S } from "./Actions/EventAction.js";
6
- import { AllowListByComponentInterface as B, OpenAllowList as D, allowListFromAddress as x } from "./AllowLists/AllowList.js";
7
- import { LIST_MANAGER_ROLE as V, SimpleAllowList as F, prepareSimpleAllowListPayload as L } from "./AllowLists/SimpleAllowList.js";
8
- import { S as N, p as O } from "./SimpleDenyList-B8QeJthf.js";
9
- import { B as w, M as _, b as U, p as G } from "./Budget-C0SMvfEl.js";
10
- import { ManagedBudget as k, ManagedBudgetRoles as z, isERC1155TransferPayload as q, isFungibleTransfer as Y, prepareManagedBudgetPayload as H, prepareTransfer as j } from "./Budgets/ManagedBudget.js";
11
- import { Deployable as K } from "./Deployable/Deployable.js";
12
- import { Contract as X } from "./Deployable/Contract.js";
13
- import { DeployableTarget as $ } from "./Deployable/DeployableTarget.js";
14
- import { DeployableTargetWithRBAC as re, Roles as ae } from "./Deployable/DeployableTargetWithRBAC.js";
15
- import { AllowListIncentive as te, prepareAllowListIncentivePayload as ie } from "./Incentives/AllowListIncentive.js";
16
- import { CGDAIncentive as de, prepareCGDAIncentivePayload as pe } from "./Incentives/CGDAIncentive.js";
17
- import { ERC20Incentive as se, prepareERC20IncentivePayload as ce } from "./Incentives/ERC20Incentive.js";
18
- import { E as Ee, a as ge, I as Ae, i as ye, p as Ce, b as Ie } from "./Incentive-BwRH0A6j.js";
19
- import { ERC20VariableIncentive as fe, prepareERC20VariableIncentivePayload as Pe } from "./Incentives/ERC20VariableIncentive.js";
20
- import { ERC20VariableCriteriaIncentive as Re, gasRebateIncentiveCriteria as Se, prepareERC20VariableCriteriaIncentivePayload as ue } from "./Incentives/ERC20VariableCriteriaIncentive.js";
21
- import { PointsIncentive as De, preparePointsIncentivePayload as xe } from "./Incentives/PointsIncentive.js";
22
- import { SignerValidator as Ve, prepareSignerValidatorClaimDataPayload as Fe, prepareSignerValidatorInputParams as Le, prepareSignerValidatorPayload as he } from "./Validators/SignerValidator.js";
23
- import { LimitedSignerValidator as Oe, prepareLimitedSignerValidatorClaimDataPayload as Me, prepareLimitedSignerValidatorInputParams as we, prepareLimitedSignerValidatorPayload as _e } from "./Validators/LimitedSignerValidator.js";
24
- import { BoostValidatorEOA as Ge, ValidatorByComponentInterface as We, decodeClaimData as ke, validatorFromAddress as ze } from "./Validators/Validator.js";
25
- import { BoostCoreNoIdentifierEmitted as Ye, BoostNotFoundError as He, BudgetMustAuthorizeBoostCore as je, ContractAddressRequiredError as Je, DecodedArgsError as Ke, DecodedArgsMalformedError as Qe, DeployableAlreadyDeployedError as Xe, DeployableBuildParametersUnspecifiedError as Ze, DeployableMissingPayloadError as $e, DeployableUnknownOwnerProvidedError as er, DeployableWagmiConfigurationRequiredError as rr, FieldActionValidationError as ar, FieldValueNotComparableError as or, FieldValueUndefinedError as tr, FunctionDataDecodeError as ir, IncentiveCriteriaNotFoundError as nr, IncentiveNotCloneableError as dr, InvalidComponentInterfaceError as pr, InvalidCriteriaTypeError as lr, InvalidNumericalCriteriaError as sr, InvalidProtocolChainIdError as cr, MustInitializeBudgetError as mr, NoConnectedChainIdError as Er, NoContractAddressUponReceiptError as gr, NoEventActionStepsProvidedError as Ar, NoMatchingLogsError as yr, TooManyEventActionStepsProvidedError as Cr, UnknownTransferPayloadSupplied as Ir, UnparseableAbiParamError as br, UnrecognizedFilterTypeError as fr, ValidationAbiMissingError as Pr } from "./errors.js";
26
- import { CheatCodes as Rr, RegistryType as Sr, TRANSFER_SIGNATURE as ur, assertValidAddressByChainId as Br, awaitResult as Dr, bytes4 as xr, getDeployedContractAddress as Tr, getErc20Balance as Vr } from "./utils.js";
27
- import { StrategyType as Lr, prepareClaimPayload as hr } from "./claiming.js";
28
- import { AssetType as Or, prepareERC1155Payload as Mr, prepareERC1155Transfer as wr, prepareFungiblePayload as _r, prepareFungibleTransfer as Ur, prepareTransferPayload as Gr } from "./transfers.js";
29
- import { PassthroughAuth as kr } from "./Auth/PassthroughAuth.js";
30
- import { B as qr, I as Yr, c as Hr, A as jr, f as Jr, v as Kr, l as Qr, d as Xr, g as Zr, V as $r, w as ea, o as ra, W as aa, N as oa, H as ta, k as ia, C as na, E as da } from "./generated-ClbO_ULI.js";
5
+ import { EventAction as C, FilterType as I, PrimitiveType as b, SignatureType as f, anyActionParameter as v, decodeAndReorderLogArgs as P, isEventActionPayloadSimple as R, packFieldIndexes as S, prepareEventActionPayload as u, transactionSenderClaimant as B, unpackFieldIndexes as x } from "./Actions/EventAction.js";
6
+ import { AllowListByComponentInterface as T, OpenAllowList as V, allowListFromAddress as F } from "./AllowLists/AllowList.js";
7
+ import { LIST_MANAGER_ROLE as h, SimpleAllowList as N, prepareSimpleAllowListPayload as O } from "./AllowLists/SimpleAllowList.js";
8
+ import { S as w, p as _ } from "./SimpleDenyList-ByAr4X1r.js";
9
+ import { B as G, M as W, b as k, p as z } from "./Budget-DYIV9iNK.js";
10
+ import { ManagedBudget as Y, ManagedBudgetRoles as H, isERC1155TransferPayload as j, isFungibleTransfer as J, prepareManagedBudgetPayload as K, prepareTransfer as Q } from "./Budgets/ManagedBudget.js";
11
+ import { Deployable as Z } from "./Deployable/Deployable.js";
12
+ import { Contract as ee } from "./Deployable/Contract.js";
13
+ import { DeployableTarget as ae } from "./Deployable/DeployableTarget.js";
14
+ import { DeployableTargetWithRBAC as ie, Roles as te } from "./Deployable/DeployableTargetWithRBAC.js";
15
+ import { AllowListIncentive as de, prepareAllowListIncentivePayload as le } from "./Incentives/AllowListIncentive.js";
16
+ import { CGDAIncentive as se, prepareCGDAIncentivePayload as ce } from "./Incentives/CGDAIncentive.js";
17
+ import { ERC20Incentive as Ee, prepareERC20IncentivePayload as ge } from "./Incentives/ERC20Incentive.js";
18
+ import { E as ye, a as Ce, I as Ie, i as be, p as fe, b as ve } from "./Incentive-qlnv5kQB.js";
19
+ import { ERC20VariableIncentive as Re, prepareERC20VariableIncentivePayload as Se } from "./Incentives/ERC20VariableIncentive.js";
20
+ import { ERC20VariableCriteriaIncentive as Be, gasRebateIncentiveCriteria as xe, prepareERC20VariableCriteriaIncentivePayload as De } from "./Incentives/ERC20VariableCriteriaIncentive.js";
21
+ import { PointsIncentive as Ve, preparePointsIncentivePayload as Fe } from "./Incentives/PointsIncentive.js";
22
+ import { SignerValidator as he, prepareSignerValidatorClaimDataPayload as Ne, prepareSignerValidatorInputParams as Oe, prepareSignerValidatorPayload as Me } from "./Validators/SignerValidator.js";
23
+ import { LimitedSignerValidator as _e, prepareLimitedSignerValidatorClaimDataPayload as Ue, prepareLimitedSignerValidatorInputParams as Ge, prepareLimitedSignerValidatorPayload as We } from "./Validators/LimitedSignerValidator.js";
24
+ import { BoostValidatorEOA as ze, ValidatorByComponentInterface as qe, decodeClaimData as Ye, validatorFromAddress as He } from "./Validators/Validator.js";
25
+ import { BoostCoreNoIdentifierEmitted as Je, BoostNotFoundError as Ke, BudgetMustAuthorizeBoostCore as Qe, ContractAddressRequiredError as Xe, DecodedArgsError as Ze, DecodedArgsMalformedError as $e, DeployableAlreadyDeployedError as er, DeployableBuildParametersUnspecifiedError as rr, DeployableMissingPayloadError as ar, DeployableUnknownOwnerProvidedError as or, DeployableWagmiConfigurationRequiredError as ir, FieldActionValidationError as tr, FieldValueNotComparableError as nr, FieldValueUndefinedError as dr, FunctionDataDecodeError as lr, IncentiveCriteriaNotFoundError as pr, IncentiveNotCloneableError as sr, InvalidComponentInterfaceError as cr, InvalidCriteriaTypeError as mr, InvalidNumericalCriteriaError as Er, InvalidProtocolChainIdError as gr, InvalidTupleDecodingError as Ar, InvalidTupleEncodingError as yr, MustInitializeBudgetError as Cr, NoConnectedChainIdError as Ir, NoContractAddressUponReceiptError as br, NoEventActionStepsProvidedError as fr, NoMatchingLogsError as vr, TooManyEventActionStepsProvidedError as Pr, UnknownTransferPayloadSupplied as Rr, UnparseableAbiParamError as Sr, UnrecognizedFilterTypeError as ur, ValidationAbiMissingError as Br } from "./errors.js";
26
+ import { CheatCodes as Dr, RegistryType as Tr, TRANSFER_SIGNATURE as Vr, assertValidAddressByChainId as Fr, awaitResult as Lr, bytes4 as hr, getDeployedContractAddress as Nr, getErc20Balance as Or } from "./utils.js";
27
+ import { StrategyType as wr, prepareClaimPayload as _r } from "./claiming.js";
28
+ import { AssetType as Gr, prepareERC1155Payload as Wr, prepareERC1155Transfer as kr, prepareFungiblePayload as zr, prepareFungibleTransfer as qr, prepareTransferPayload as Yr } from "./transfers.js";
29
+ import { PassthroughAuth as jr } from "./Auth/PassthroughAuth.js";
30
+ import { B as Kr, I as Qr, c as Xr, A as Zr, f as $r, v as ea, l as ra, d as aa, g as oa, V as ia, w as ta, o as na, W as da, N as la, H as pa, k as sa, C as ca, E as ma } from "./generated-Cyvr_Tjx.js";
31
31
  export {
32
32
  g as ActionByComponentInterface,
33
- B as AllowListByComponentInterface,
34
- te as AllowListIncentive,
35
- Or as AssetType,
33
+ T as AllowListByComponentInterface,
34
+ de as AllowListIncentive,
35
+ Gr as AssetType,
36
36
  n as BOOST_CORE_ADDRESS,
37
37
  d as BOOST_CORE_ADDRESSES,
38
38
  a as BOOST_REGISTRY_ADDRESS,
39
39
  o as BOOST_REGISTRY_ADDRESSES,
40
40
  c as Boost,
41
- p as BoostCore,
42
- Ye as BoostCoreNoIdentifierEmitted,
43
- He as BoostNotFoundError,
44
- t as BoostRegistry,
45
- Ge as BoostValidatorEOA,
46
- w as BudgetByComponentInterface,
47
- je as BudgetMustAuthorizeBoostCore,
48
- de as CGDAIncentive,
49
- Rr as CheatCodes,
50
- X as Contract,
51
- Je as ContractAddressRequiredError,
52
- Ke as DecodedArgsError,
53
- Qe as DecodedArgsMalformedError,
54
- K as Deployable,
55
- Xe as DeployableAlreadyDeployedError,
56
- Ze as DeployableBuildParametersUnspecifiedError,
57
- $e as DeployableMissingPayloadError,
58
- $ as DeployableTarget,
59
- re as DeployableTargetWithRBAC,
60
- er as DeployableUnknownOwnerProvidedError,
61
- rr as DeployableWagmiConfigurationRequiredError,
62
- se as ERC20Incentive,
63
- Ee as ERC20PeggedIncentive,
64
- ge as ERC20PeggedVariableCriteriaIncentive,
65
- Re as ERC20VariableCriteriaIncentive,
66
- fe as ERC20VariableIncentive,
41
+ l as BoostCore,
42
+ Je as BoostCoreNoIdentifierEmitted,
43
+ Ke as BoostNotFoundError,
44
+ i as BoostRegistry,
45
+ ze as BoostValidatorEOA,
46
+ G as BudgetByComponentInterface,
47
+ Qe as BudgetMustAuthorizeBoostCore,
48
+ se as CGDAIncentive,
49
+ Dr as CheatCodes,
50
+ ee as Contract,
51
+ Xe as ContractAddressRequiredError,
52
+ Ze as DecodedArgsError,
53
+ $e as DecodedArgsMalformedError,
54
+ Z as Deployable,
55
+ er as DeployableAlreadyDeployedError,
56
+ rr as DeployableBuildParametersUnspecifiedError,
57
+ ar as DeployableMissingPayloadError,
58
+ ae as DeployableTarget,
59
+ ie as DeployableTargetWithRBAC,
60
+ or as DeployableUnknownOwnerProvidedError,
61
+ ir as DeployableWagmiConfigurationRequiredError,
62
+ Ee as ERC20Incentive,
63
+ ye as ERC20PeggedIncentive,
64
+ Ce as ERC20PeggedVariableCriteriaIncentive,
65
+ Be as ERC20VariableCriteriaIncentive,
66
+ Re as ERC20VariableIncentive,
67
67
  C as EventAction,
68
- l as FEE_DENOMINATOR,
69
- ar as FieldActionValidationError,
70
- or as FieldValueNotComparableError,
71
- tr as FieldValueUndefinedError,
68
+ p as FEE_DENOMINATOR,
69
+ tr as FieldActionValidationError,
70
+ nr as FieldValueNotComparableError,
71
+ dr as FieldValueUndefinedError,
72
72
  I as FilterType,
73
- ir as FunctionDataDecodeError,
74
- Ae as IncentiveByComponentInterface,
75
- nr as IncentiveCriteriaNotFoundError,
76
- dr as IncentiveNotCloneableError,
77
- pr as InvalidComponentInterfaceError,
78
- lr as InvalidCriteriaTypeError,
79
- sr as InvalidNumericalCriteriaError,
80
- cr as InvalidProtocolChainIdError,
81
- V as LIST_MANAGER_ROLE,
82
- Oe as LimitedSignerValidator,
83
- k as ManagedBudget,
84
- z as ManagedBudgetRoles,
85
- _ as ManagedBudgetWithFees,
86
- mr as MustInitializeBudgetError,
87
- Er as NoConnectedChainIdError,
88
- gr as NoContractAddressUponReceiptError,
89
- Ar as NoEventActionStepsProvidedError,
90
- yr as NoMatchingLogsError,
91
- D as OpenAllowList,
92
- kr as PassthroughAuth,
93
- De as PointsIncentive,
73
+ lr as FunctionDataDecodeError,
74
+ Ie as IncentiveByComponentInterface,
75
+ pr as IncentiveCriteriaNotFoundError,
76
+ sr as IncentiveNotCloneableError,
77
+ cr as InvalidComponentInterfaceError,
78
+ mr as InvalidCriteriaTypeError,
79
+ Er as InvalidNumericalCriteriaError,
80
+ gr as InvalidProtocolChainIdError,
81
+ Ar as InvalidTupleDecodingError,
82
+ yr as InvalidTupleEncodingError,
83
+ h as LIST_MANAGER_ROLE,
84
+ _e as LimitedSignerValidator,
85
+ Y as ManagedBudget,
86
+ H as ManagedBudgetRoles,
87
+ W as ManagedBudgetWithFees,
88
+ Cr as MustInitializeBudgetError,
89
+ Ir as NoConnectedChainIdError,
90
+ br as NoContractAddressUponReceiptError,
91
+ fr as NoEventActionStepsProvidedError,
92
+ vr as NoMatchingLogsError,
93
+ V as OpenAllowList,
94
+ jr as PassthroughAuth,
95
+ Ve as PointsIncentive,
94
96
  b as PrimitiveType,
95
- Sr as RegistryType,
96
- ae as Roles,
97
+ Tr as RegistryType,
98
+ te as Roles,
97
99
  f as SignatureType,
98
- Ve as SignerValidator,
99
- F as SimpleAllowList,
100
- N as SimpleDenyList,
101
- Lr as StrategyType,
102
- ur as TRANSFER_SIGNATURE,
103
- Cr as TooManyEventActionStepsProvidedError,
104
- Ir as UnknownTransferPayloadSupplied,
105
- br as UnparseableAbiParamError,
106
- fr as UnrecognizedFilterTypeError,
107
- Pr as ValidationAbiMissingError,
108
- We as ValidatorByComponentInterface,
100
+ he as SignerValidator,
101
+ N as SimpleAllowList,
102
+ w as SimpleDenyList,
103
+ wr as StrategyType,
104
+ Vr as TRANSFER_SIGNATURE,
105
+ Pr as TooManyEventActionStepsProvidedError,
106
+ Rr as UnknownTransferPayloadSupplied,
107
+ Sr as UnparseableAbiParamError,
108
+ ur as UnrecognizedFilterTypeError,
109
+ Br as ValidationAbiMissingError,
110
+ qe as ValidatorByComponentInterface,
109
111
  A as actionFromAddress,
110
- x as allowListFromAddress,
111
- qr as allowListIncentiveAbi,
112
- P as anyActionParameter,
113
- Br as assertValidAddressByChainId,
114
- Dr as awaitResult,
115
- Yr as boostCoreAbi,
116
- Hr as boostRegistryAbi,
117
- U as budgetFromAddress,
118
- xr as bytes4,
119
- jr as cgdaIncentiveAbi,
120
- ke as decodeClaimData,
121
- Jr as erc20IncentiveAbi,
122
- Kr as erc20PeggedIncentiveAbi,
123
- Qr as erc20PeggedVariableCriteriaIncentiveAbi,
124
- Xr as erc20VariableCriteriaIncentiveAbi,
125
- Zr as erc20VariableIncentiveAbi,
126
- Se as gasRebateIncentiveCriteria,
127
- Tr as getDeployedContractAddress,
128
- Vr as getErc20Balance,
129
- ye as incentiveFromAddress,
130
- q as isERC1155TransferPayload,
131
- v as isEventActionPayloadSimple,
132
- Y as isFungibleTransfer,
133
- $r as limitedSignerValidatorAbi,
134
- ea as managedBudgetAbi,
135
- ra as managedBudgetWithFeesAbi,
136
- aa as passthroughAuthAbi,
137
- oa as pointsIncentiveAbi,
138
- ie as prepareAllowListIncentivePayload,
112
+ F as allowListFromAddress,
113
+ Kr as allowListIncentiveAbi,
114
+ v as anyActionParameter,
115
+ Fr as assertValidAddressByChainId,
116
+ Lr as awaitResult,
117
+ Qr as boostCoreAbi,
118
+ Xr as boostRegistryAbi,
119
+ k as budgetFromAddress,
120
+ hr as bytes4,
121
+ Zr as cgdaIncentiveAbi,
122
+ P as decodeAndReorderLogArgs,
123
+ Ye as decodeClaimData,
124
+ $r as erc20IncentiveAbi,
125
+ ea as erc20PeggedIncentiveAbi,
126
+ ra as erc20PeggedVariableCriteriaIncentiveAbi,
127
+ aa as erc20VariableCriteriaIncentiveAbi,
128
+ oa as erc20VariableIncentiveAbi,
129
+ xe as gasRebateIncentiveCriteria,
130
+ Nr as getDeployedContractAddress,
131
+ Or as getErc20Balance,
132
+ be as incentiveFromAddress,
133
+ j as isERC1155TransferPayload,
134
+ R as isEventActionPayloadSimple,
135
+ J as isFungibleTransfer,
136
+ ia as limitedSignerValidatorAbi,
137
+ ta as managedBudgetAbi,
138
+ na as managedBudgetWithFeesAbi,
139
+ S as packFieldIndexes,
140
+ da as passthroughAuthAbi,
141
+ la as pointsIncentiveAbi,
142
+ le as prepareAllowListIncentivePayload,
139
143
  m as prepareBoostPayload,
140
- pe as prepareCGDAIncentivePayload,
141
- hr as prepareClaimPayload,
142
- Mr as prepareERC1155Payload,
143
- wr as prepareERC1155Transfer,
144
- ce as prepareERC20IncentivePayload,
145
- Ce as prepareERC20PeggedIncentivePayload,
146
- Ie as prepareERC20PeggedVariableCriteriaIncentivePayload,
147
- ue as prepareERC20VariableCriteriaIncentivePayload,
148
- Pe as prepareERC20VariableIncentivePayload,
149
- R as prepareEventActionPayload,
150
- _r as prepareFungiblePayload,
151
- Ur as prepareFungibleTransfer,
152
- Me as prepareLimitedSignerValidatorClaimDataPayload,
153
- we as prepareLimitedSignerValidatorInputParams,
154
- _e as prepareLimitedSignerValidatorPayload,
155
- H as prepareManagedBudgetPayload,
156
- G as prepareManagedBudgetWithFeesPayload,
157
- xe as preparePointsIncentivePayload,
158
- Fe as prepareSignerValidatorClaimDataPayload,
159
- Le as prepareSignerValidatorInputParams,
160
- he as prepareSignerValidatorPayload,
161
- L as prepareSimpleAllowListPayload,
162
- O as prepareSimpleDenyListPayload,
163
- j as prepareTransfer,
164
- Gr as prepareTransferPayload,
165
- ta as rbacAbi,
166
- ia as signerValidatorAbi,
167
- na as simpleAllowListAbi,
168
- da as simpleDenyListAbi,
169
- S as transactionSenderClaimant,
170
- ze as validatorFromAddress
144
+ ce as prepareCGDAIncentivePayload,
145
+ _r as prepareClaimPayload,
146
+ Wr as prepareERC1155Payload,
147
+ kr as prepareERC1155Transfer,
148
+ ge as prepareERC20IncentivePayload,
149
+ fe as prepareERC20PeggedIncentivePayload,
150
+ ve as prepareERC20PeggedVariableCriteriaIncentivePayload,
151
+ De as prepareERC20VariableCriteriaIncentivePayload,
152
+ Se as prepareERC20VariableIncentivePayload,
153
+ u as prepareEventActionPayload,
154
+ zr as prepareFungiblePayload,
155
+ qr as prepareFungibleTransfer,
156
+ Ue as prepareLimitedSignerValidatorClaimDataPayload,
157
+ Ge as prepareLimitedSignerValidatorInputParams,
158
+ We as prepareLimitedSignerValidatorPayload,
159
+ K as prepareManagedBudgetPayload,
160
+ z as prepareManagedBudgetWithFeesPayload,
161
+ Fe as preparePointsIncentivePayload,
162
+ Ne as prepareSignerValidatorClaimDataPayload,
163
+ Oe as prepareSignerValidatorInputParams,
164
+ Me as prepareSignerValidatorPayload,
165
+ O as prepareSimpleAllowListPayload,
166
+ _ as prepareSimpleDenyListPayload,
167
+ Q as prepareTransfer,
168
+ Yr as prepareTransferPayload,
169
+ pa as rbacAbi,
170
+ sa as signerValidatorAbi,
171
+ ca as simpleAllowListAbi,
172
+ ma as simpleDenyListAbi,
173
+ B as transactionSenderClaimant,
174
+ x as unpackFieldIndexes,
175
+ He as validatorFromAddress
171
176
  };
172
177
  //# sourceMappingURL=index.js.map
package/dist/utils.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@wagmi/core"),s=require("viem"),r=require("./errors.cjs"),c={abi:{"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef":{name:"Transfer",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256",indexed:!0}]},"Transfer(address indexed,address indexed,uint256 indexed)":{name:"Transfer",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256",indexed:!0}]},"0xb362243af1e2070d7d5bf8d713f2e0fab64203f1b71462afbe20572909788c5e":{name:"Purchased",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256",indexed:!0},{type:"uint256"},{type:"uint256"}]},"Purchased(address indexed,address indexed,uint256 indexed,uint256,uint256)":{name:"Purchased",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256",indexed:!0},{type:"uint256"},{type:"uint256"}]},"0x69e37f151eb98a09618ddaa80c8cfaf1ce5996867c489f45b555b412271ebf27":{name:"NameRegistered",type:"event",inputs:[{type:"string"},{type:"bytes32",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"NameRegistered(string,bytes32 indexed,address indexed,uint256,uint256,uint256)":{name:"NameRegistered",type:"event",inputs:[{type:"string"},{type:"bytes32",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"0x0667086d08417333ce63f40d5bc2ef6fd330e25aaaf317b7c489541f8fe600fa":{name:"NameRegistered",type:"event",inputs:[{type:"string"},{type:"bytes32",indexed:!0},{type:"address",indexed:!0},{type:"uint256"}]},"NameRegistered(string,bytes32 indexed,address indexed,uint256)":{name:"NameRegistered",type:"event",inputs:[{type:"string"},{type:"bytes32",indexed:!0},{type:"address",indexed:!0},{type:"uint256"}]},"0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f":{name:"DelegateChanged",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0}]},"DelegateChanged(address indexed,address indexed,address indexed)":{name:"DelegateChanged",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0}]},"0xe00361d207b252a464323eb23d45d42583e391f2031acdd2e9fa36efddd43cb0":{name:"SwappedV3",type:"event",inputs:[{type:"bytes16"},{type:"address"},{type:"uint256"},{type:"address"},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"SwappedV3(bytes16,address,uint256,address,address indexed,address indexed,address indexed,uint256,uint256,uint256)":{name:"SwappedV3",type:"event",inputs:[{type:"bytes16"},{type:"address"},{type:"uint256"},{type:"address"},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"0xb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4":{name:"VoteCast",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint256"},{type:"uint8"},{type:"uint256"},{type:"string"}]},"VoteCast(address indexed,uint256,uint8,uint256,string)":{name:"VoteCast",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint256"},{type:"uint8"},{type:"uint256"},{type:"string"}]},"0x7ac572687bf4e66a8514fc2ec464fc2644c78bcb1d80a225fc51a33e0ee38bfa":{name:"Minted",type:"event",inputs:[{type:"uint8"},{type:"address"},{type:"uint256"},{type:"uint256"}]},"Minted(uint8,address,uint256,uint256)":{name:"Minted",type:"event",inputs:[{type:"uint8"},{type:"address"},{type:"uint256"},{type:"uint256"}]},"0x2a29f7402bd32f0e4bbe17d44be064f7f64d96ee174ed7cb27936d869bf9a888":{name:"Minted",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint8"},{type:"uint8"},{type:"address",indexed:!0},{type:"tuple",components:[{type:"uint32"},{type:"uint256"},{type:"address"},{type:"uint32"},{type:"uint32"},{type:"uint32"},{type:"address"},{type:"bool"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},{type:"uint256",indexed:!0}]},"Minted(address indexed,uint8,uint8,address indexed,(uint32,uint256,address,uint32,uint32,uint32,address,bool,uint256,uint256,uint256,uint256,uint256),uint256 indexed)":{name:"Minted",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint8"},{type:"uint8"},{type:"address",indexed:!0},{type:"tuple",components:[{type:"uint32"},{type:"uint256"},{type:"address"},{type:"uint32"},{type:"uint32"},{type:"uint32"},{type:"address"},{type:"bool"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},{type:"uint256",indexed:!0}]},"0xc773e203af3f3079b18c21f98bb8d8ccd2fea097d631d448df89de4edbe7a2a8":{name:"ZoraTimedSaleStrategyRewards",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint256",indexed:!0},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"}]},"ZoraTimedSaleStrategyRewards(address indexed,uint256 indexed,address,uint256,address,uint256,address,uint256,address,uint256,address,uint256)":{name:"ZoraTimedSaleStrategyRewards",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint256",indexed:!0},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"}]},"0x0f29bbf4ce25d2346bbeb8a898e24e5d6d7d1d19bb895e71faecac833b259547":{name:"BoostClaimed",type:"event",inputs:[{type:"uint256",indexed:!0},{type:"uint256",indexed:!0},{type:"address",indexed:!0},{type:"address"},{type:"bytes"}]},"BoostClaimed(uint256 indexed,uint256 indexed,address indexed,address,bytes)":{name:"BoostClaimed",type:"event",inputs:[{type:"uint256",indexed:!0},{type:"uint256",indexed:!0},{type:"address",indexed:!0},{type:"address"},{type:"bytes"}]},"0x116812d3ad4507d72f2c428b63246d594ca055a1dc119394285504c23d1f34cd":{name:"BoostCreated",type:"event",inputs:[{type:"uint256",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"address"},{type:"address"},{type:"address"}]},"BoostCreated(uint256 indexed,address indexed,address indexed,uint256,address,address,address)":{name:"BoostCreated",type:"event",inputs:[{type:"uint256",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"address"},{type:"address"},{type:"address"}]},"0x72d6b4b5ad0fb12b8a7bb3bcb60edd774c096403d611437859c156ecb3c03a36":{name:"SecondaryBuy",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"}]},"SecondaryBuy(address indexed,address indexed,address indexed,uint256,uint256)":{name:"SecondaryBuy",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"}]},"0x6779abc30cb1bfb05c1170de8e2ef5828c19a2590043d2fd9579d945929fd8a4":{name:"CoopTokenBuy",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"CoopTokenBuy(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)":{name:"CoopTokenBuy",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"0xeb3adfe7d8294092cd6b0e7ce95ed01c11d3c5d5d3dc1fecdeb87de43c5e40b2":{name:"CoopTokenSell",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"CoopTokenSell(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)":{name:"CoopTokenSell",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"0xd5468362e31bdcdc9884e72dcf3b00f9d46086067621224b7cb759308d597c6c":{name:"CoopTokenFees",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"CoopTokenFees(address indexed,address indexed,address indexed,address,uint256,uint256,uint256,uint256)":{name:"CoopTokenFees",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"0x883a883a9ea847654d33471b1e5fb2dea76a2cfc86a6cc7da6c14102800e4d0b":{name:"InfoIndexed",type:"event",inputs:[{type:"address",indexed:!0},{type:"string",indexed:!0}]},"InfoIndexed(address indexed,string indexed)":{name:"InfoIndexed",type:"event",inputs:[{type:"address",indexed:!0},{type:"string",indexed:!0}]},"0xe46343e36b0721f173bdc76b8f25c08b04f417df09c27e1e83ba1980007fef8c":{name:"Info",type:"event",inputs:[{type:"address"},{type:"string"}]},"Info(address,string)":{name:"Info",type:"event",inputs:[{type:"address"},{type:"string"}]}},selectors:{"Transfer(address indexed,address indexed,uint256 indexed)":"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef","0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef":"Transfer(address indexed,address indexed,uint256 indexed)","Purchased(address indexed,address indexed,uint256 indexed,uint256,uint256)":"0xb362243af1e2070d7d5bf8d713f2e0fab64203f1b71462afbe20572909788c5e","0xb362243af1e2070d7d5bf8d713f2e0fab64203f1b71462afbe20572909788c5e":"Purchased(address indexed,address indexed,uint256 indexed,uint256,uint256)","NameRegistered(string,bytes32 indexed,address indexed,uint256,uint256,uint256)":"0x69e37f151eb98a09618ddaa80c8cfaf1ce5996867c489f45b555b412271ebf27","0x69e37f151eb98a09618ddaa80c8cfaf1ce5996867c489f45b555b412271ebf27":"NameRegistered(string,bytes32 indexed,address indexed,uint256,uint256,uint256)","NameRegistered(string,bytes32 indexed,address indexed,uint256)":"0x0667086d08417333ce63f40d5bc2ef6fd330e25aaaf317b7c489541f8fe600fa","0x0667086d08417333ce63f40d5bc2ef6fd330e25aaaf317b7c489541f8fe600fa":"NameRegistered(string,bytes32 indexed,address indexed,uint256)","DelegateChanged(address indexed,address indexed,address indexed)":"0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f","0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f":"DelegateChanged(address indexed,address indexed,address indexed)","SwappedV3(bytes16,address,uint256,address,address indexed,address indexed,address indexed,uint256,uint256,uint256)":"0xe00361d207b252a464323eb23d45d42583e391f2031acdd2e9fa36efddd43cb0","0xe00361d207b252a464323eb23d45d42583e391f2031acdd2e9fa36efddd43cb0":"SwappedV3(bytes16,address,uint256,address,address indexed,address indexed,address indexed,uint256,uint256,uint256)","VoteCast(address indexed,uint256,uint8,uint256,string)":"0xb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4","0xb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4":"VoteCast(address indexed,uint256,uint8,uint256,string)","Minted(uint8,address,uint256,uint256)":"0x7ac572687bf4e66a8514fc2ec464fc2644c78bcb1d80a225fc51a33e0ee38bfa","0x7ac572687bf4e66a8514fc2ec464fc2644c78bcb1d80a225fc51a33e0ee38bfa":"Minted(uint8,address,uint256,uint256)","Minted(address indexed,uint8,uint8,address indexed,(uint32,uint256,address,uint32,uint32,uint32,address,bool,uint256,uint256,uint256,uint256,uint256),uint256 indexed)":"0x2a29f7402bd32f0e4bbe17d44be064f7f64d96ee174ed7cb27936d869bf9a888","0x2a29f7402bd32f0e4bbe17d44be064f7f64d96ee174ed7cb27936d869bf9a888":"Minted(address indexed,uint8,uint8,address indexed,(uint32,uint256,address,uint32,uint32,uint32,address,bool,uint256,uint256,uint256,uint256,uint256),uint256 indexed)","ZoraTimedSaleStrategyRewards(address indexed,uint256 indexed,address,uint256,address,uint256,address,uint256,address,uint256,address,uint256)":"0xc773e203af3f3079b18c21f98bb8d8ccd2fea097d631d448df89de4edbe7a2a8","0xc773e203af3f3079b18c21f98bb8d8ccd2fea097d631d448df89de4edbe7a2a8":"ZoraTimedSaleStrategyRewards(address indexed,uint256 indexed,address,uint256,address,uint256,address,uint256,address,uint256,address,uint256)","BoostClaimed(uint256 indexed,uint256 indexed,address indexed,address,bytes)":"0x0f29bbf4ce25d2346bbeb8a898e24e5d6d7d1d19bb895e71faecac833b259547","0x0f29bbf4ce25d2346bbeb8a898e24e5d6d7d1d19bb895e71faecac833b259547":"BoostClaimed(uint256 indexed,uint256 indexed,address indexed,address,bytes)","BoostCreated(uint256 indexed,address indexed,address indexed,uint256,address,address,address)":"0x116812d3ad4507d72f2c428b63246d594ca055a1dc119394285504c23d1f34cd","0x116812d3ad4507d72f2c428b63246d594ca055a1dc119394285504c23d1f34cd":"BoostCreated(uint256 indexed,address indexed,address indexed,uint256,address,address,address)","SecondaryBuy(address indexed,address indexed,address indexed,uint256,uint256)":"0x72d6b4b5ad0fb12b8a7bb3bcb60edd774c096403d611437859c156ecb3c03a36","0x72d6b4b5ad0fb12b8a7bb3bcb60edd774c096403d611437859c156ecb3c03a36":"SecondaryBuy(address indexed,address indexed,address indexed,uint256,uint256)","CoopTokenBuy(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)":"0x6779abc30cb1bfb05c1170de8e2ef5828c19a2590043d2fd9579d945929fd8a4","0x6779abc30cb1bfb05c1170de8e2ef5828c19a2590043d2fd9579d945929fd8a4":"CoopTokenBuy(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)","CoopTokenSell(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)":"0xeb3adfe7d8294092cd6b0e7ce95ed01c11d3c5d5d3dc1fecdeb87de43c5e40b2","0xeb3adfe7d8294092cd6b0e7ce95ed01c11d3c5d5d3dc1fecdeb87de43c5e40b2":"CoopTokenSell(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)","CoopTokenFees(address indexed,address indexed,address indexed,address,uint256,uint256,uint256,uint256)":"0xd5468362e31bdcdc9884e72dcf3b00f9d46086067621224b7cb759308d597c6c","0xd5468362e31bdcdc9884e72dcf3b00f9d46086067621224b7cb759308d597c6c":"CoopTokenFees(address indexed,address indexed,address indexed,address,uint256,uint256,uint256,uint256)","InfoIndexed(address indexed,string indexed)":"0x883a883a9ea847654d33471b1e5fb2dea76a2cfc86a6cc7da6c14102800e4d0b","0x883a883a9ea847654d33471b1e5fb2dea76a2cfc86a6cc7da6c14102800e4d0b":"InfoIndexed(address indexed,string indexed)","Info(address,string)":"0xe46343e36b0721f173bdc76b8f25c08b04f417df09c27e1e83ba1980007fef8c","0xe46343e36b0721f173bdc76b8f25c08b04f417df09c27e1e83ba1980007fef8c":"Info(address,string)"}};var p=(e=>(e[e.ACTION=0]="ACTION",e[e.ALLOW_LIST=1]="ALLOW_LIST",e[e.BUDGET=2]="BUDGET",e[e.INCENTIVE=3]="INCENTIVE",e[e.VALIDATOR=4]="VALIDATOR",e))(p||{}),y=(e=>(e[e.ANY_ACTION_PARAM=255]="ANY_ACTION_PARAM",e[e.TX_SENDER_CLAIMANT=255]="TX_SENDER_CLAIMANT",e[e.GAS_REBATE_INCENTIVE=255]="GAS_REBATE_INCENTIVE",e))(y||{});const x=c.selectors["Transfer(address indexed,address indexed,uint256 indexed)"];function b(e){return s.slice(s.isHex(e)?s.keccak256(e):s.keccak256(s.toHex(e)),0,4)}async function f(e,t,n){const d=await a.waitForTransactionReceipt(e,{...n,hash:await t});if(!d.contractAddress)throw new r.NoContractAddressUponReceiptError(d);return d.contractAddress}async function o(e,t,n){const{hash:d,result:i}=await t;return await a.waitForTransactionReceipt(e,{...n,hash:d}),i}function m(e,t,n){let d;const i=a.getChainId(e);if(i&&t[i]&&(d=i),n!==void 0?t[n]&&(d=n):i!==void 0&&t[i]&&(d=i),d===void 0){const u=a.getAccount(e);u.chainId!==void 0&&t[u.chainId]&&(d=u.chainId)}if(d===void 0&&(d=11155111),!t[d])throw new r.InvalidProtocolChainIdError(d,Object.keys(t).map(Number));return{chainId:d,address:t[d]}}async function g(e,t,n,d){return await a.readContract(e,{...d,functionName:"balanceOf",address:t,args:[n],abi:[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],stateMutability:"view",type:"function"}]})}exports.CheatCodes=y;exports.RegistryType=p;exports.TRANSFER_SIGNATURE=x;exports.assertValidAddressByChainId=m;exports.awaitResult=o;exports.bytes4=b;exports.getDeployedContractAddress=f;exports.getErc20Balance=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@wagmi/core"),s=require("viem"),r=require("./errors.cjs"),x={abi:{"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef":{name:"Transfer",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256",indexed:!0}]},"Transfer(address indexed,address indexed,uint256 indexed)":{name:"Transfer",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256",indexed:!0}]},"0xb362243af1e2070d7d5bf8d713f2e0fab64203f1b71462afbe20572909788c5e":{name:"Purchased",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256",indexed:!0},{type:"uint256"},{type:"uint256"}]},"Purchased(address indexed,address indexed,uint256 indexed,uint256,uint256)":{name:"Purchased",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256",indexed:!0},{type:"uint256"},{type:"uint256"}]},"0x69e37f151eb98a09618ddaa80c8cfaf1ce5996867c489f45b555b412271ebf27":{name:"NameRegistered",type:"event",inputs:[{type:"string"},{type:"bytes32",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"NameRegistered(string,bytes32 indexed,address indexed,uint256,uint256,uint256)":{name:"NameRegistered",type:"event",inputs:[{type:"string"},{type:"bytes32",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"0x0667086d08417333ce63f40d5bc2ef6fd330e25aaaf317b7c489541f8fe600fa":{name:"NameRegistered",type:"event",inputs:[{type:"string"},{type:"bytes32",indexed:!0},{type:"address",indexed:!0},{type:"uint256"}]},"NameRegistered(string,bytes32 indexed,address indexed,uint256)":{name:"NameRegistered",type:"event",inputs:[{type:"string"},{type:"bytes32",indexed:!0},{type:"address",indexed:!0},{type:"uint256"}]},"0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f":{name:"DelegateChanged",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0}]},"DelegateChanged(address indexed,address indexed,address indexed)":{name:"DelegateChanged",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0}]},"0xe00361d207b252a464323eb23d45d42583e391f2031acdd2e9fa36efddd43cb0":{name:"SwappedV3",type:"event",inputs:[{type:"bytes16"},{type:"address"},{type:"uint256"},{type:"address"},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"SwappedV3(bytes16,address,uint256,address,address indexed,address indexed,address indexed,uint256,uint256,uint256)":{name:"SwappedV3",type:"event",inputs:[{type:"bytes16"},{type:"address"},{type:"uint256"},{type:"address"},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"0xb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4":{name:"VoteCast",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint256"},{type:"uint8"},{type:"uint256"},{type:"string"}]},"VoteCast(address indexed,uint256,uint8,uint256,string)":{name:"VoteCast",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint256"},{type:"uint8"},{type:"uint256"},{type:"string"}]},"0x7ac572687bf4e66a8514fc2ec464fc2644c78bcb1d80a225fc51a33e0ee38bfa":{name:"Minted",type:"event",inputs:[{type:"uint8"},{type:"address"},{type:"uint256"},{type:"uint256"}]},"Minted(uint8,address,uint256,uint256)":{name:"Minted",type:"event",inputs:[{type:"uint8"},{type:"address"},{type:"uint256"},{type:"uint256"}]},"0x2a29f7402bd32f0e4bbe17d44be064f7f64d96ee174ed7cb27936d869bf9a888":{name:"Minted",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint8"},{type:"uint8"},{type:"address",indexed:!0},{type:"tuple",components:[{type:"uint32"},{type:"uint256"},{type:"address"},{type:"uint32"},{type:"uint32"},{type:"uint32"},{type:"address"},{type:"bool"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},{type:"uint256",indexed:!0}]},"Minted(address indexed,uint8,uint8,address indexed,(uint32,uint256,address,uint32,uint32,uint32,address,bool,uint256,uint256,uint256,uint256,uint256),uint256 indexed)":{name:"Minted",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint8"},{type:"uint8"},{type:"address",indexed:!0},{type:"tuple",components:[{type:"uint32"},{type:"uint256"},{type:"address"},{type:"uint32"},{type:"uint32"},{type:"uint32"},{type:"address"},{type:"bool"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},{type:"uint256",indexed:!0}]},"0xc773e203af3f3079b18c21f98bb8d8ccd2fea097d631d448df89de4edbe7a2a8":{name:"ZoraTimedSaleStrategyRewards",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint256",indexed:!0},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"}]},"ZoraTimedSaleStrategyRewards(address indexed,uint256 indexed,address,uint256,address,uint256,address,uint256,address,uint256,address,uint256)":{name:"ZoraTimedSaleStrategyRewards",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint256",indexed:!0},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"}]},"0x0f29bbf4ce25d2346bbeb8a898e24e5d6d7d1d19bb895e71faecac833b259547":{name:"BoostClaimed",type:"event",inputs:[{type:"uint256",indexed:!0},{type:"uint256",indexed:!0},{type:"address",indexed:!0},{type:"address"},{type:"bytes"}]},"BoostClaimed(uint256 indexed,uint256 indexed,address indexed,address,bytes)":{name:"BoostClaimed",type:"event",inputs:[{type:"uint256",indexed:!0},{type:"uint256",indexed:!0},{type:"address",indexed:!0},{type:"address"},{type:"bytes"}]},"0x116812d3ad4507d72f2c428b63246d594ca055a1dc119394285504c23d1f34cd":{name:"BoostCreated",type:"event",inputs:[{type:"uint256",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"address"},{type:"address"},{type:"address"}]},"BoostCreated(uint256 indexed,address indexed,address indexed,uint256,address,address,address)":{name:"BoostCreated",type:"event",inputs:[{type:"uint256",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"address"},{type:"address"},{type:"address"}]},"0x72d6b4b5ad0fb12b8a7bb3bcb60edd774c096403d611437859c156ecb3c03a36":{name:"SecondaryBuy",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"}]},"SecondaryBuy(address indexed,address indexed,address indexed,uint256,uint256)":{name:"SecondaryBuy",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"}]},"0x6779abc30cb1bfb05c1170de8e2ef5828c19a2590043d2fd9579d945929fd8a4":{name:"CoopTokenBuy",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"CoopTokenBuy(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)":{name:"CoopTokenBuy",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"0x49c4606c4f7f601127761fb65a512e6bca424f62b165476cf1cfdfa51772a6ab":{name:"WowTokenBuy",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"WowTokenBuy(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)":{name:"WowTokenBuy",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"0xeb3adfe7d8294092cd6b0e7ce95ed01c11d3c5d5d3dc1fecdeb87de43c5e40b2":{name:"CoopTokenSell",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"CoopTokenSell(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)":{name:"CoopTokenSell",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"0x0693c83d190a3d36d2ed6c3ac51b1335d2a3588d96f3f3601c8b1e780d0f952a":{name:"WowTokenSell",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"WowTokenSell(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)":{name:"WowTokenSell",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"0xd5468362e31bdcdc9884e72dcf3b00f9d46086067621224b7cb759308d597c6c":{name:"CoopTokenFees",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"CoopTokenFees(address indexed,address indexed,address indexed,address,uint256,uint256,uint256,uint256)":{name:"CoopTokenFees",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"0xf349fe0373a901f0506d5343f4a872f385a7f0c26371d7b9e6bf5584b69d75fc":{name:"WowTokenFees",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"WowTokenFees(address indexed,address indexed,address indexed,address,uint256,uint256,uint256,uint256)":{name:"WowTokenFees",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"0x3be2a577c218a9e2fca79115ab0381630afc182ee832bcad4011c37d323b4843":{name:"CoopTokenTransfer",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"CoopTokenTransfer(address indexed,address indexed,uint256,uint256,uint256,uint256)":{name:"CoopTokenTransfer",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"0xd19736ba1cd2ffc8c99f90d6c6163e59274d333c89e471cd6668d93849835ac5":{name:"WowTokenTransfer",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"WowTokenTransfer(address indexed,address indexed,uint256,uint256,uint256,uint256)":{name:"WowTokenTransfer",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"0x883a883a9ea847654d33471b1e5fb2dea76a2cfc86a6cc7da6c14102800e4d0b":{name:"InfoIndexed",type:"event",inputs:[{type:"address",indexed:!0},{type:"string",indexed:!0}]},"InfoIndexed(address indexed,string indexed)":{name:"InfoIndexed",type:"event",inputs:[{type:"address",indexed:!0},{type:"string",indexed:!0}]},"0xe46343e36b0721f173bdc76b8f25c08b04f417df09c27e1e83ba1980007fef8c":{name:"Info",type:"event",inputs:[{type:"address"},{type:"string"}]},"Info(address,string)":{name:"Info",type:"event",inputs:[{type:"address"},{type:"string"}]}},selectors:{"Transfer(address indexed,address indexed,uint256 indexed)":"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef","0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef":"Transfer(address indexed,address indexed,uint256 indexed)","Purchased(address indexed,address indexed,uint256 indexed,uint256,uint256)":"0xb362243af1e2070d7d5bf8d713f2e0fab64203f1b71462afbe20572909788c5e","0xb362243af1e2070d7d5bf8d713f2e0fab64203f1b71462afbe20572909788c5e":"Purchased(address indexed,address indexed,uint256 indexed,uint256,uint256)","NameRegistered(string,bytes32 indexed,address indexed,uint256,uint256,uint256)":"0x69e37f151eb98a09618ddaa80c8cfaf1ce5996867c489f45b555b412271ebf27","0x69e37f151eb98a09618ddaa80c8cfaf1ce5996867c489f45b555b412271ebf27":"NameRegistered(string,bytes32 indexed,address indexed,uint256,uint256,uint256)","NameRegistered(string,bytes32 indexed,address indexed,uint256)":"0x0667086d08417333ce63f40d5bc2ef6fd330e25aaaf317b7c489541f8fe600fa","0x0667086d08417333ce63f40d5bc2ef6fd330e25aaaf317b7c489541f8fe600fa":"NameRegistered(string,bytes32 indexed,address indexed,uint256)","DelegateChanged(address indexed,address indexed,address indexed)":"0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f","0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f":"DelegateChanged(address indexed,address indexed,address indexed)","SwappedV3(bytes16,address,uint256,address,address indexed,address indexed,address indexed,uint256,uint256,uint256)":"0xe00361d207b252a464323eb23d45d42583e391f2031acdd2e9fa36efddd43cb0","0xe00361d207b252a464323eb23d45d42583e391f2031acdd2e9fa36efddd43cb0":"SwappedV3(bytes16,address,uint256,address,address indexed,address indexed,address indexed,uint256,uint256,uint256)","VoteCast(address indexed,uint256,uint8,uint256,string)":"0xb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4","0xb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4":"VoteCast(address indexed,uint256,uint8,uint256,string)","Minted(uint8,address,uint256,uint256)":"0x7ac572687bf4e66a8514fc2ec464fc2644c78bcb1d80a225fc51a33e0ee38bfa","0x7ac572687bf4e66a8514fc2ec464fc2644c78bcb1d80a225fc51a33e0ee38bfa":"Minted(uint8,address,uint256,uint256)","Minted(address indexed,uint8,uint8,address indexed,(uint32,uint256,address,uint32,uint32,uint32,address,bool,uint256,uint256,uint256,uint256,uint256),uint256 indexed)":"0x2a29f7402bd32f0e4bbe17d44be064f7f64d96ee174ed7cb27936d869bf9a888","0x2a29f7402bd32f0e4bbe17d44be064f7f64d96ee174ed7cb27936d869bf9a888":"Minted(address indexed,uint8,uint8,address indexed,(uint32,uint256,address,uint32,uint32,uint32,address,bool,uint256,uint256,uint256,uint256,uint256),uint256 indexed)","ZoraTimedSaleStrategyRewards(address indexed,uint256 indexed,address,uint256,address,uint256,address,uint256,address,uint256,address,uint256)":"0xc773e203af3f3079b18c21f98bb8d8ccd2fea097d631d448df89de4edbe7a2a8","0xc773e203af3f3079b18c21f98bb8d8ccd2fea097d631d448df89de4edbe7a2a8":"ZoraTimedSaleStrategyRewards(address indexed,uint256 indexed,address,uint256,address,uint256,address,uint256,address,uint256,address,uint256)","BoostClaimed(uint256 indexed,uint256 indexed,address indexed,address,bytes)":"0x0f29bbf4ce25d2346bbeb8a898e24e5d6d7d1d19bb895e71faecac833b259547","0x0f29bbf4ce25d2346bbeb8a898e24e5d6d7d1d19bb895e71faecac833b259547":"BoostClaimed(uint256 indexed,uint256 indexed,address indexed,address,bytes)","BoostCreated(uint256 indexed,address indexed,address indexed,uint256,address,address,address)":"0x116812d3ad4507d72f2c428b63246d594ca055a1dc119394285504c23d1f34cd","0x116812d3ad4507d72f2c428b63246d594ca055a1dc119394285504c23d1f34cd":"BoostCreated(uint256 indexed,address indexed,address indexed,uint256,address,address,address)","SecondaryBuy(address indexed,address indexed,address indexed,uint256,uint256)":"0x72d6b4b5ad0fb12b8a7bb3bcb60edd774c096403d611437859c156ecb3c03a36","0x72d6b4b5ad0fb12b8a7bb3bcb60edd774c096403d611437859c156ecb3c03a36":"SecondaryBuy(address indexed,address indexed,address indexed,uint256,uint256)","CoopTokenBuy(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)":"0x6779abc30cb1bfb05c1170de8e2ef5828c19a2590043d2fd9579d945929fd8a4","0x6779abc30cb1bfb05c1170de8e2ef5828c19a2590043d2fd9579d945929fd8a4":"CoopTokenBuy(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)","WowTokenBuy(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)":"0x49c4606c4f7f601127761fb65a512e6bca424f62b165476cf1cfdfa51772a6ab","0x49c4606c4f7f601127761fb65a512e6bca424f62b165476cf1cfdfa51772a6ab":"WowTokenBuy(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)","CoopTokenSell(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)":"0xeb3adfe7d8294092cd6b0e7ce95ed01c11d3c5d5d3dc1fecdeb87de43c5e40b2","0xeb3adfe7d8294092cd6b0e7ce95ed01c11d3c5d5d3dc1fecdeb87de43c5e40b2":"CoopTokenSell(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)","WowTokenSell(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)":"0x0693c83d190a3d36d2ed6c3ac51b1335d2a3588d96f3f3601c8b1e780d0f952a","0x0693c83d190a3d36d2ed6c3ac51b1335d2a3588d96f3f3601c8b1e780d0f952a":"WowTokenSell(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)","CoopTokenFees(address indexed,address indexed,address indexed,address,uint256,uint256,uint256,uint256)":"0xd5468362e31bdcdc9884e72dcf3b00f9d46086067621224b7cb759308d597c6c","0xd5468362e31bdcdc9884e72dcf3b00f9d46086067621224b7cb759308d597c6c":"CoopTokenFees(address indexed,address indexed,address indexed,address,uint256,uint256,uint256,uint256)","WowTokenFees(address indexed,address indexed,address indexed,address,uint256,uint256,uint256,uint256)":"0xf349fe0373a901f0506d5343f4a872f385a7f0c26371d7b9e6bf5584b69d75fc","0xf349fe0373a901f0506d5343f4a872f385a7f0c26371d7b9e6bf5584b69d75fc":"WowTokenFees(address indexed,address indexed,address indexed,address,uint256,uint256,uint256,uint256)","CoopTokenTransfer(address indexed,address indexed,uint256,uint256,uint256,uint256)":"0x3be2a577c218a9e2fca79115ab0381630afc182ee832bcad4011c37d323b4843","0x3be2a577c218a9e2fca79115ab0381630afc182ee832bcad4011c37d323b4843":"CoopTokenTransfer(address indexed,address indexed,uint256,uint256,uint256,uint256)","WowTokenTransfer(address indexed,address indexed,uint256,uint256,uint256,uint256)":"0xd19736ba1cd2ffc8c99f90d6c6163e59274d333c89e471cd6668d93849835ac5","0xd19736ba1cd2ffc8c99f90d6c6163e59274d333c89e471cd6668d93849835ac5":"WowTokenTransfer(address indexed,address indexed,uint256,uint256,uint256,uint256)","InfoIndexed(address indexed,string indexed)":"0x883a883a9ea847654d33471b1e5fb2dea76a2cfc86a6cc7da6c14102800e4d0b","0x883a883a9ea847654d33471b1e5fb2dea76a2cfc86a6cc7da6c14102800e4d0b":"InfoIndexed(address indexed,string indexed)","Info(address,string)":"0xe46343e36b0721f173bdc76b8f25c08b04f417df09c27e1e83ba1980007fef8c","0xe46343e36b0721f173bdc76b8f25c08b04f417df09c27e1e83ba1980007fef8c":"Info(address,string)"}};var p=(e=>(e[e.ACTION=0]="ACTION",e[e.ALLOW_LIST=1]="ALLOW_LIST",e[e.BUDGET=2]="BUDGET",e[e.INCENTIVE=3]="INCENTIVE",e[e.VALIDATOR=4]="VALIDATOR",e))(p||{}),y=(e=>(e[e.ANY_ACTION_PARAM=255]="ANY_ACTION_PARAM",e[e.TX_SENDER_CLAIMANT=255]="TX_SENDER_CLAIMANT",e[e.GAS_REBATE_INCENTIVE=255]="GAS_REBATE_INCENTIVE",e))(y||{});const c=x.selectors["Transfer(address indexed,address indexed,uint256 indexed)"];function f(e){return s.slice(s.isHex(e)?s.keccak256(e):s.keccak256(s.toHex(e)),0,4)}async function b(e,t,n){const d=await a.waitForTransactionReceipt(e,{...n,hash:await t});if(!d.contractAddress)throw new r.NoContractAddressUponReceiptError(d);return d.contractAddress}async function o(e,t,n){const{hash:d,result:i}=await t;return await a.waitForTransactionReceipt(e,{...n,hash:d}),i}function T(e,t,n){let d;const i=a.getChainId(e);if(i&&t[i]&&(d=i),n!==void 0?t[n]&&(d=n):i!==void 0&&t[i]&&(d=i),d===void 0){const u=a.getAccount(e);u.chainId!==void 0&&t[u.chainId]&&(d=u.chainId)}if(d===void 0&&(d=11155111),!t[d])throw new r.InvalidProtocolChainIdError(d,Object.keys(t).map(Number));return{chainId:d,address:t[d]}}async function m(e,t,n,d){return await a.readContract(e,{...d,functionName:"balanceOf",address:t,args:[n],abi:[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],stateMutability:"view",type:"function"}]})}exports.CheatCodes=y;exports.RegistryType=p;exports.TRANSFER_SIGNATURE=c;exports.assertValidAddressByChainId=T;exports.awaitResult=o;exports.bytes4=f;exports.getDeployedContractAddress=b;exports.getErc20Balance=m;
2
2
  //# sourceMappingURL=utils.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.cjs","sources":["../src/utils.ts"],"sourcesContent":["import { events } from '@boostxyz/signatures';\nimport {\n type Config,\n type ReadContractParameters,\n type SimulateContractParameters,\n type WatchContractEventParameters,\n getAccount,\n getChainId,\n readContract,\n waitForTransactionReceipt,\n} from '@wagmi/core';\nimport type { ExtractAbiEvent } from 'abitype';\nimport type {\n Abi,\n AbiEvent,\n Address,\n ContractEventName,\n ContractFunctionName,\n GetLogsParameters,\n Hash,\n Hex,\n Log,\n WaitForTransactionReceiptParameters,\n} from 'viem';\nimport { isHex, keccak256, slice, toHex } from 'viem';\nimport {\n InvalidProtocolChainIdError,\n NoContractAddressUponReceiptError,\n} from './errors';\n\nexport type Overwrite<T, U> = Pick<T, Exclude<keyof T, keyof U>> & U;\n\n/**\n * Enum encapsulating all the different types of targets used in the Boost V2 Protocol.\n *\n * @export\n * @enum {number}\n */\nexport enum RegistryType {\n ACTION = 0,\n ALLOW_LIST = 1,\n BUDGET = 2,\n INCENTIVE = 3,\n VALIDATOR = 4,\n}\n\n/**\n * Enum encapsulating all the different cheat codes for criteria modules.\n * An Event Action action step criteria with a `fieldIndex` set to `CheatCodes.ANY_ACTION_PARAM`, fieldType set to `PrimitiveType.BYTES`, and `filterType` set to `FilterType.EQUAL` will always return true when validating the field, regardless of inputs\n * An Event Action `ActionClaimant` with a `fieldIndex` set to `CheatCodes.TX_SENDER_CLAIMANT`, will always validate with the sender of a given transaction.\n *\n *\n * @export\n * @enum {number}\n */\nexport enum CheatCodes {\n /* An Event Action action step criteria with a `fieldIndex` set to `CheatCodes.ANY_ACTION_PARAM`, fieldType set to `PrimitiveType.BYTES`, and `filterType` set to `FilterType.EQUAL` will always return true when validating the field, regardless of inputs */\n ANY_ACTION_PARAM = 255,\n /* An Event Action `ActionClaimant` with a `fieldIndex` set to `CheatCodes.TX_SENDER_CLAIMANT`, will always validate with the sender of a given transaction. */\n TX_SENDER_CLAIMANT = 255,\n /* For use with `ERC20VariableCriteriaIncentive`, if the criteria's `fieldIndex` is set to `CheatCodes.GAS_REBATE_INCENTIVE`, will claim an incentive amount equal to the transaction's gas used. */\n GAS_REBATE_INCENTIVE = 255,\n}\n\n/**\n * The signature for the Transfer event for both ERC20 and ERC721.\n *\n * @type {Hex}\n */\nexport const TRANSFER_SIGNATURE = events.selectors[\n 'Transfer(address indexed,address indexed,uint256 indexed)'\n] as Hex;\n\n/**\n * Helper type that encapsulates common writeContract parameters without fields like `abi`, `args`, `functionName`, `address` that are expected to be provided the SDK.\n * See (writeContract)[https://viem.sh/docs/contract/writeContract]\n *\n * @export\n * @typedef {WriteParams}\n * @template {Abi} abi\n * @template {ContractFunctionName<abi>} functionName\n */\nexport type WriteParams = Partial<\n Omit<SimulateContractParameters, 'address' | 'args' | 'functionName' | 'abi'>\n>;\n\n/**\n * Helper type that encapsulates common readContract parameters without fields like `abi`, `args`, `functionName`, `address` that are expected to be provided the SDK.\n * See (readContract)[https://viem.sh/docs/contract/readContract]\n *\n * @export\n * @typedef {ReadParams}\n * @template {Abi} abi\n * @template {ContractFunctionName<abi>} functionName\n */\nexport type ReadParams = Partial<\n Omit<ReadContractParameters, 'address' | 'args' | 'functionName' | 'abi'>\n>;\n\n/**\n * Helper type that encapsulates common `watchContractEvent` parameters without fields like `address`, and `abi` that are expected to be provided the SDK.\n * See (watchContractEvent)[https://wagmi.sh/core/api/actions/watchContractEvent]\n *\n * @export\n * @typedef {WatchParams}\n * @template {Abi} abi\n * @template {ContractEventName<abi> | undefined} [eventName=undefined]\n */\nexport type WatchParams<\n abi extends Abi,\n eventName extends ContractEventName<abi> | undefined = undefined,\n> = Partial<\n Omit<WatchContractEventParameters<abi, eventName>, 'address' | 'abi'>\n>;\n\n/**\n * Helper type that encapsulates common `getLogs` parameters without fields like `address` that are expected to be provided the SDK.\n * See (getLogs)[https://viem.sh/docs/actions/public/getLogs#getlogs]\n *\n * @export\n * @typedef {GetLogsParams}\n * @template {Abi} abi\n * @template {ContractEventName<abi>} event\n * @template {ExtractAbiEvent<abi, event>} [abiEvent=ExtractAbiEvent<abi, event>]\n * @template {| readonly AbiEvent[]\n * | readonly unknown[]\n * | undefined} [abiEvents=abiEvent extends AbiEvent ? [abiEvent] : undefined]\n */\nexport type GetLogsParams<\n abi extends Abi,\n event extends ContractEventName<abi>,\n abiEvent extends ExtractAbiEvent<abi, event> = ExtractAbiEvent<abi, event>,\n abiEvents extends\n | readonly AbiEvent[]\n | readonly unknown[]\n | undefined = abiEvent extends AbiEvent ? [abiEvent] : undefined,\n> = Partial<Omit<GetLogsParameters<abiEvent, abiEvents>, 'address'>> & {\n chainId?: number | undefined;\n};\n\n/**\n * A generic `viem.Log` event with typed `args` support via a given `Abi` and `ContractEventName`\n *\n * @export\n * @typedef {GenericLog}\n * @template {Abi} abi\n * @template {ContractEventName<abi>} [event=ContractEventName<abi>]\n */\nexport type GenericLog<\n abi extends Abi,\n event extends ContractEventName<abi> = ContractEventName<abi>,\n> = Log<bigint, number, false, ExtractAbiEvent<abi, event>, false>;\n\n/**\n * Helper utility to convert a string to a `bytes4` type\n *\n * @export\n * @param {string} input\n * @returns {Hex}\n */\nexport function bytes4(input: string) {\n return slice(isHex(input) ? keccak256(input) : keccak256(toHex(input)), 0, 4);\n}\n\n/**\n * Utility function to wait for a transaction receipt, and extract the contractAddress\n *\n * @export\n * @async\n * @param {WagmiConfig} config - [Wagmi Configuration](https://wagmi.sh/core/api/createConfig)\n * @param {Promise<Hash>} hash - A transaction hash promise\n * @param {?Omit<WaitForTransactionReceiptParameters, 'hash'>} [waitParams] - @see {@link WaitForTransactionReceiptParameters}\n * @returns {Promise<Address>}\n * @throws {@link NoContractAddressUponReceiptError} if no `contractAddress` exists after the transaction has been received\n */\nexport async function getDeployedContractAddress(\n config: Config,\n hash: Promise<Hash>,\n waitParams?: Omit<WaitForTransactionReceiptParameters, 'hash'>,\n) {\n const receipt = await waitForTransactionReceipt(config, {\n ...waitParams,\n hash: await hash,\n });\n if (!receipt.contractAddress)\n throw new NoContractAddressUponReceiptError(receipt);\n return receipt.contractAddress;\n}\n\n/**\n * Utility type to encapsulate a transaction hash, and the simulated result prior to submitting the transaction.\n *\n * @export\n * @typedef {HashAndSimulatedResult}\n * @template [T=unknown]\n */\nexport type HashAndSimulatedResult<T = unknown> = { hash: Hash; result: T };\n\n/**\n * Helper function to wait for a transaction receipt given a hash promise.\n *\n * @export\n * @async\n * @template [Result=unknown]\n * @param {WagmiConfig} config\n * @param {Promise<HashAndSimulatedResult<Result>>} hashPromise\n * @param {?Omit<WaitForTransactionReceiptParameters, 'hash'>} [waitParams]\n * @returns {Promise<Result>}\n */\nexport async function awaitResult<Result = unknown>(\n config: Config,\n hashPromise: Promise<HashAndSimulatedResult<Result>>,\n waitParams?: Omit<WaitForTransactionReceiptParameters, 'hash'>,\n): Promise<Result> {\n const { hash, result } = await hashPromise;\n await waitForTransactionReceipt(config, {\n ...waitParams,\n hash,\n });\n return result;\n}\n\n/**\n * Given a wagmi config and a map of chain id's to addresses, determine an address/chainId combo that maps to the currently connected chain id, or throw a typed error.\n *\n * @export\n * @param {Config} config\n * @param {Record<string, Address>} addressByChainId\n * @param {number} desiredChainId\n * @returns {{ chainId: number, address: Address }}\n * @throws {@link InvalidProtocolChainIdError}\n */\nexport function assertValidAddressByChainId(\n config: Config,\n addressByChainId: Record<number, Address>,\n desiredChainId?: number,\n): { chainId: number; address: Address } {\n let chainId: number | undefined = undefined;\n\n const wagmiChainId = getChainId(config);\n if (wagmiChainId && addressByChainId[wagmiChainId]) chainId = wagmiChainId;\n // if manually providing a chain id for some contract operation, try to use it\n if (desiredChainId !== undefined) {\n if (addressByChainId[desiredChainId]) chainId = desiredChainId;\n } else if (wagmiChainId !== undefined) {\n // otherwise if we can get the current chain id off the connected account and it matches one of ours, use it\n if (addressByChainId[wagmiChainId]) chainId = wagmiChainId;\n }\n // chainId is still undefined, try to get chain id off viem client\n if (chainId === undefined) {\n const wagmiAccount = getAccount(config);\n if (wagmiAccount.chainId !== undefined) {\n // otherwise if we can get the current chain id off the connected account and it matches one of ours, use it\n if (addressByChainId[wagmiAccount.chainId])\n chainId = wagmiAccount.chainId;\n }\n }\n // if chainId is STILL undefined, use our default addresses\n // TODO: update this when on prod network\n if (chainId === undefined) chainId = Number(__DEFAULT_CHAIN_ID__);\n if (!addressByChainId[chainId])\n throw new InvalidProtocolChainIdError(\n chainId,\n Object.keys(addressByChainId).map(Number),\n );\n // biome-ignore lint/style/noNonNullAssertion: this type should be narrowed by the above statement but isn't?\n return { chainId, address: addressByChainId[chainId]! };\n}\n\n/**\n * Check an ERC20's balance for a given asset and\n *\n * @public\n * @async\n * @param {Config} [config]\n * @param {Address} [asset]\n * @param {Address} [owner]\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - The erc20 balance\n */\nexport async function getErc20Balance(\n config: Config,\n asset: Address,\n owner: Address,\n params?: ReadParams,\n) {\n return await readContract(config, {\n ...params,\n functionName: 'balanceOf',\n address: asset,\n args: [owner],\n abi: [\n {\n constant: true,\n inputs: [\n {\n name: '_owner',\n type: 'address',\n },\n ],\n name: 'balanceOf',\n outputs: [\n {\n name: 'balance',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n ],\n });\n}\n"],"names":["RegistryType","CheatCodes","TRANSFER_SIGNATURE","events","bytes4","input","slice","isHex","keccak256","toHex","getDeployedContractAddress","config","hash","waitParams","receipt","waitForTransactionReceipt","NoContractAddressUponReceiptError","awaitResult","hashPromise","result","assertValidAddressByChainId","addressByChainId","desiredChainId","chainId","wagmiChainId","getChainId","wagmiAccount","getAccount","InvalidProtocolChainIdError","getErc20Balance","asset","owner","params","readContract"],"mappings":"q0dAsCY,IAAAA,GAAAA,IACVA,EAAAA,EAAA,OAAS,CAAT,EAAA,SACAA,EAAAA,EAAA,WAAa,CAAb,EAAA,aACAA,EAAAA,EAAA,OAAS,CAAT,EAAA,SACAA,EAAAA,EAAA,UAAY,CAAZ,EAAA,YACAA,EAAAA,EAAA,UAAY,CAAZ,EAAA,YALUA,IAAAA,GAAA,CAAA,CAAA,EAiBAC,GAAAA,IAEVA,EAAAA,EAAA,iBAAmB,GAAnB,EAAA,mBAEAA,EAAAA,EAAA,mBAAqB,GAArB,EAAA,qBAEAA,EAAAA,EAAA,qBAAuB,GAAvB,EAAA,uBANUA,IAAAA,GAAA,CAAA,CAAA,EAcC,MAAAC,EAAqBC,EAAO,UACvC,2DACF,EAyFO,SAASC,EAAOC,EAAe,CACpC,OAAOC,EAAM,MAAAC,EAAA,MAAMF,CAAK,EAAIG,EAAU,UAAAH,CAAK,EAAIG,EAAA,UAAUC,EAAM,MAAAJ,CAAK,CAAC,EAAG,EAAG,CAAC,CAC9E,CAasB,eAAAK,EACpBC,EACAC,EACAC,EACA,CACM,MAAAC,EAAU,MAAMC,EAAA,0BAA0BJ,EAAQ,CACtD,GAAGE,EACH,KAAM,MAAMD,CAAA,CACb,EACD,GAAI,CAACE,EAAQ,gBACL,MAAA,IAAIE,EAAAA,kCAAkCF,CAAO,EACrD,OAAOA,EAAQ,eACjB,CAsBsB,eAAAG,EACpBN,EACAO,EACAL,EACiB,CACjB,KAAM,CAAE,KAAAD,EAAM,OAAAO,CAAO,EAAI,MAAMD,EAC/B,aAAMH,EAAAA,0BAA0BJ,EAAQ,CACtC,GAAGE,EACH,KAAAD,CAAA,CACD,EACMO,CACT,CAYgB,SAAAC,EACdT,EACAU,EACAC,EACuC,CACvC,IAAIC,EAEE,MAAAC,EAAeC,aAAWd,CAAM,EAUtC,GATIa,GAAgBH,EAAiBG,CAAY,IAAaD,EAAAC,GAE1DF,IAAmB,OACjBD,EAAiBC,CAAc,IAAaC,EAAAD,GACvCE,IAAiB,QAEtBH,EAAiBG,CAAY,IAAaD,EAAAC,GAG5CD,IAAY,OAAW,CACnB,MAAAG,EAAeC,aAAWhB,CAAM,EAClCe,EAAa,UAAY,QAEvBL,EAAiBK,EAAa,OAAO,IACvCH,EAAUG,EAAa,QAE7B,CAII,GADAH,IAAY,SAAqBA,EAAO,UACxC,CAACF,EAAiBE,CAAO,EAC3B,MAAM,IAAIK,EAAA,4BACRL,EACA,OAAO,KAAKF,CAAgB,EAAE,IAAI,MAAM,CAAA,EAG5C,MAAO,CAAE,QAAAE,EAAS,QAASF,EAAiBE,CAAO,CAAG,CACxD,CAaA,eAAsBM,EACpBlB,EACAmB,EACAC,EACAC,EACA,CACO,OAAA,MAAMC,eAAatB,EAAQ,CAChC,GAAGqB,EACH,aAAc,YACd,QAASF,EACT,KAAM,CAACC,CAAK,EACZ,IAAK,CACH,CACE,SAAU,GACV,OAAQ,CACN,CACE,KAAM,SACN,KAAM,SACR,CACF,EACA,KAAM,YACN,QAAS,CACP,CACE,KAAM,UACN,KAAM,SACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,CACF,CAAA,CACD,CACH"}
1
+ {"version":3,"file":"utils.cjs","sources":["../src/utils.ts"],"sourcesContent":["import { events } from '@boostxyz/signatures';\nimport {\n type Config,\n type ReadContractParameters,\n type SimulateContractParameters,\n type WatchContractEventParameters,\n getAccount,\n getChainId,\n readContract,\n waitForTransactionReceipt,\n} from '@wagmi/core';\nimport type { ExtractAbiEvent } from 'abitype';\nimport type {\n Abi,\n AbiEvent,\n Address,\n ContractEventName,\n ContractFunctionName,\n GetLogsParameters,\n Hash,\n Hex,\n Log,\n WaitForTransactionReceiptParameters,\n} from 'viem';\nimport { isHex, keccak256, slice, toHex } from 'viem';\nimport {\n InvalidProtocolChainIdError,\n NoContractAddressUponReceiptError,\n} from './errors';\n\nexport type Overwrite<T, U> = Pick<T, Exclude<keyof T, keyof U>> & U;\n\n/**\n * Enum encapsulating all the different types of targets used in the Boost V2 Protocol.\n *\n * @export\n * @enum {number}\n */\nexport enum RegistryType {\n ACTION = 0,\n ALLOW_LIST = 1,\n BUDGET = 2,\n INCENTIVE = 3,\n VALIDATOR = 4,\n}\n\n/**\n * Enum encapsulating all the different cheat codes for criteria modules.\n * An Event Action action step criteria with a `fieldIndex` set to `CheatCodes.ANY_ACTION_PARAM`, fieldType set to `PrimitiveType.BYTES`, and `filterType` set to `FilterType.EQUAL` will always return true when validating the field, regardless of inputs\n * An Event Action `ActionClaimant` with a `fieldIndex` set to `CheatCodes.TX_SENDER_CLAIMANT`, will always validate with the sender of a given transaction.\n *\n *\n * @export\n * @enum {number}\n */\nexport enum CheatCodes {\n /* An Event Action action step criteria with a `fieldIndex` set to `CheatCodes.ANY_ACTION_PARAM`, fieldType set to `PrimitiveType.BYTES`, and `filterType` set to `FilterType.EQUAL` will always return true when validating the field, regardless of inputs */\n ANY_ACTION_PARAM = 255,\n /* An Event Action `ActionClaimant` with a `fieldIndex` set to `CheatCodes.TX_SENDER_CLAIMANT`, will always validate with the sender of a given transaction. */\n TX_SENDER_CLAIMANT = 255,\n /* For use with `ERC20VariableCriteriaIncentive`, if the criteria's `fieldIndex` is set to `CheatCodes.GAS_REBATE_INCENTIVE`, will claim an incentive amount equal to the transaction's gas used. */\n GAS_REBATE_INCENTIVE = 255,\n}\n\n/**\n * The signature for the Transfer event for both ERC20 and ERC721.\n *\n * @type {Hex}\n */\nexport const TRANSFER_SIGNATURE = events.selectors[\n 'Transfer(address indexed,address indexed,uint256 indexed)'\n] as Hex;\n\n/**\n * Helper type that encapsulates common writeContract parameters without fields like `abi`, `args`, `functionName`, `address` that are expected to be provided the SDK.\n * See (writeContract)[https://viem.sh/docs/contract/writeContract]\n *\n * @export\n * @typedef {WriteParams}\n * @template {Abi} abi\n * @template {ContractFunctionName<abi>} functionName\n */\nexport type WriteParams = Partial<\n Omit<SimulateContractParameters, 'address' | 'args' | 'functionName' | 'abi'>\n>;\n\n/**\n * Helper type that encapsulates common readContract parameters without fields like `abi`, `args`, `functionName`, `address` that are expected to be provided the SDK.\n * See (readContract)[https://viem.sh/docs/contract/readContract]\n *\n * @export\n * @typedef {ReadParams}\n * @template {Abi} abi\n * @template {ContractFunctionName<abi>} functionName\n */\nexport type ReadParams = Partial<\n Omit<ReadContractParameters, 'address' | 'args' | 'functionName' | 'abi'>\n>;\n\n/**\n * Helper type that encapsulates common `watchContractEvent` parameters without fields like `address`, and `abi` that are expected to be provided the SDK.\n * See (watchContractEvent)[https://wagmi.sh/core/api/actions/watchContractEvent]\n *\n * @export\n * @typedef {WatchParams}\n * @template {Abi} abi\n * @template {ContractEventName<abi> | undefined} [eventName=undefined]\n */\nexport type WatchParams<\n abi extends Abi,\n eventName extends ContractEventName<abi> | undefined = undefined,\n> = Partial<\n Omit<WatchContractEventParameters<abi, eventName>, 'address' | 'abi'>\n>;\n\n/**\n * Helper type that encapsulates common `getLogs` parameters without fields like `address` that are expected to be provided the SDK.\n * See (getLogs)[https://viem.sh/docs/actions/public/getLogs#getlogs]\n *\n * @export\n * @typedef {GetLogsParams}\n * @template {Abi} abi\n * @template {ContractEventName<abi>} event\n * @template {ExtractAbiEvent<abi, event>} [abiEvent=ExtractAbiEvent<abi, event>]\n * @template {| readonly AbiEvent[]\n * | readonly unknown[]\n * | undefined} [abiEvents=abiEvent extends AbiEvent ? [abiEvent] : undefined]\n */\nexport type GetLogsParams<\n abi extends Abi,\n event extends ContractEventName<abi>,\n abiEvent extends ExtractAbiEvent<abi, event> = ExtractAbiEvent<abi, event>,\n abiEvents extends\n | readonly AbiEvent[]\n | readonly unknown[]\n | undefined = abiEvent extends AbiEvent ? [abiEvent] : undefined,\n> = Partial<Omit<GetLogsParameters<abiEvent, abiEvents>, 'address'>> & {\n chainId?: number | undefined;\n};\n\n/**\n * A generic `viem.Log` event with typed `args` support via a given `Abi` and `ContractEventName`\n *\n * @export\n * @typedef {GenericLog}\n * @template {Abi} abi\n * @template {ContractEventName<abi>} [event=ContractEventName<abi>]\n */\nexport type GenericLog<\n abi extends Abi,\n event extends ContractEventName<abi> = ContractEventName<abi>,\n> = Log<bigint, number, false, ExtractAbiEvent<abi, event>, false>;\n\n/**\n * Helper utility to convert a string to a `bytes4` type\n *\n * @export\n * @param {string} input\n * @returns {Hex}\n */\nexport function bytes4(input: string) {\n return slice(isHex(input) ? keccak256(input) : keccak256(toHex(input)), 0, 4);\n}\n\n/**\n * Utility function to wait for a transaction receipt, and extract the contractAddress\n *\n * @export\n * @async\n * @param {WagmiConfig} config - [Wagmi Configuration](https://wagmi.sh/core/api/createConfig)\n * @param {Promise<Hash>} hash - A transaction hash promise\n * @param {?Omit<WaitForTransactionReceiptParameters, 'hash'>} [waitParams] - @see {@link WaitForTransactionReceiptParameters}\n * @returns {Promise<Address>}\n * @throws {@link NoContractAddressUponReceiptError} if no `contractAddress` exists after the transaction has been received\n */\nexport async function getDeployedContractAddress(\n config: Config,\n hash: Promise<Hash>,\n waitParams?: Omit<WaitForTransactionReceiptParameters, 'hash'>,\n) {\n const receipt = await waitForTransactionReceipt(config, {\n ...waitParams,\n hash: await hash,\n });\n if (!receipt.contractAddress)\n throw new NoContractAddressUponReceiptError(receipt);\n return receipt.contractAddress;\n}\n\n/**\n * Utility type to encapsulate a transaction hash, and the simulated result prior to submitting the transaction.\n *\n * @export\n * @typedef {HashAndSimulatedResult}\n * @template [T=unknown]\n */\nexport type HashAndSimulatedResult<T = unknown> = { hash: Hash; result: T };\n\n/**\n * Helper function to wait for a transaction receipt given a hash promise.\n *\n * @export\n * @async\n * @template [Result=unknown]\n * @param {WagmiConfig} config\n * @param {Promise<HashAndSimulatedResult<Result>>} hashPromise\n * @param {?Omit<WaitForTransactionReceiptParameters, 'hash'>} [waitParams]\n * @returns {Promise<Result>}\n */\nexport async function awaitResult<Result = unknown>(\n config: Config,\n hashPromise: Promise<HashAndSimulatedResult<Result>>,\n waitParams?: Omit<WaitForTransactionReceiptParameters, 'hash'>,\n): Promise<Result> {\n const { hash, result } = await hashPromise;\n await waitForTransactionReceipt(config, {\n ...waitParams,\n hash,\n });\n return result;\n}\n\n/**\n * Given a wagmi config and a map of chain id's to addresses, determine an address/chainId combo that maps to the currently connected chain id, or throw a typed error.\n *\n * @export\n * @param {Config} config\n * @param {Record<string, Address>} addressByChainId\n * @param {number} desiredChainId\n * @returns {{ chainId: number, address: Address }}\n * @throws {@link InvalidProtocolChainIdError}\n */\nexport function assertValidAddressByChainId(\n config: Config,\n addressByChainId: Record<number, Address>,\n desiredChainId?: number,\n): { chainId: number; address: Address } {\n let chainId: number | undefined = undefined;\n\n const wagmiChainId = getChainId(config);\n if (wagmiChainId && addressByChainId[wagmiChainId]) chainId = wagmiChainId;\n // if manually providing a chain id for some contract operation, try to use it\n if (desiredChainId !== undefined) {\n if (addressByChainId[desiredChainId]) chainId = desiredChainId;\n } else if (wagmiChainId !== undefined) {\n // otherwise if we can get the current chain id off the connected account and it matches one of ours, use it\n if (addressByChainId[wagmiChainId]) chainId = wagmiChainId;\n }\n // chainId is still undefined, try to get chain id off viem client\n if (chainId === undefined) {\n const wagmiAccount = getAccount(config);\n if (wagmiAccount.chainId !== undefined) {\n // otherwise if we can get the current chain id off the connected account and it matches one of ours, use it\n if (addressByChainId[wagmiAccount.chainId])\n chainId = wagmiAccount.chainId;\n }\n }\n // if chainId is STILL undefined, use our default addresses\n // TODO: update this when on prod network\n if (chainId === undefined) chainId = Number(__DEFAULT_CHAIN_ID__);\n if (!addressByChainId[chainId])\n throw new InvalidProtocolChainIdError(\n chainId,\n Object.keys(addressByChainId).map(Number),\n );\n // biome-ignore lint/style/noNonNullAssertion: this type should be narrowed by the above statement but isn't?\n return { chainId, address: addressByChainId[chainId]! };\n}\n\n/**\n * Check an ERC20's balance for a given asset and\n *\n * @public\n * @async\n * @param {Config} [config]\n * @param {Address} [asset]\n * @param {Address} [owner]\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - The erc20 balance\n */\nexport async function getErc20Balance(\n config: Config,\n asset: Address,\n owner: Address,\n params?: ReadParams,\n) {\n return await readContract(config, {\n ...params,\n functionName: 'balanceOf',\n address: asset,\n args: [owner],\n abi: [\n {\n constant: true,\n inputs: [\n {\n name: '_owner',\n type: 'address',\n },\n ],\n name: 'balanceOf',\n outputs: [\n {\n name: 'balance',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n ],\n });\n}\n"],"names":["RegistryType","CheatCodes","TRANSFER_SIGNATURE","events","bytes4","input","slice","isHex","keccak256","toHex","getDeployedContractAddress","config","hash","waitParams","receipt","waitForTransactionReceipt","NoContractAddressUponReceiptError","awaitResult","hashPromise","result","assertValidAddressByChainId","addressByChainId","desiredChainId","chainId","wagmiChainId","getChainId","wagmiAccount","getAccount","InvalidProtocolChainIdError","getErc20Balance","asset","owner","params","readContract"],"mappings":"49mBAsCY,IAAAA,GAAAA,IACVA,EAAAA,EAAA,OAAS,CAAT,EAAA,SACAA,EAAAA,EAAA,WAAa,CAAb,EAAA,aACAA,EAAAA,EAAA,OAAS,CAAT,EAAA,SACAA,EAAAA,EAAA,UAAY,CAAZ,EAAA,YACAA,EAAAA,EAAA,UAAY,CAAZ,EAAA,YALUA,IAAAA,GAAA,CAAA,CAAA,EAiBAC,GAAAA,IAEVA,EAAAA,EAAA,iBAAmB,GAAnB,EAAA,mBAEAA,EAAAA,EAAA,mBAAqB,GAArB,EAAA,qBAEAA,EAAAA,EAAA,qBAAuB,GAAvB,EAAA,uBANUA,IAAAA,GAAA,CAAA,CAAA,EAcC,MAAAC,EAAqBC,EAAO,UACvC,2DACF,EAyFO,SAASC,EAAOC,EAAe,CACpC,OAAOC,EAAM,MAAAC,EAAA,MAAMF,CAAK,EAAIG,EAAU,UAAAH,CAAK,EAAIG,EAAA,UAAUC,EAAM,MAAAJ,CAAK,CAAC,EAAG,EAAG,CAAC,CAC9E,CAasB,eAAAK,EACpBC,EACAC,EACAC,EACA,CACM,MAAAC,EAAU,MAAMC,EAAA,0BAA0BJ,EAAQ,CACtD,GAAGE,EACH,KAAM,MAAMD,CAAA,CACb,EACD,GAAI,CAACE,EAAQ,gBACL,MAAA,IAAIE,EAAAA,kCAAkCF,CAAO,EACrD,OAAOA,EAAQ,eACjB,CAsBsB,eAAAG,EACpBN,EACAO,EACAL,EACiB,CACjB,KAAM,CAAE,KAAAD,EAAM,OAAAO,CAAO,EAAI,MAAMD,EAC/B,aAAMH,EAAAA,0BAA0BJ,EAAQ,CACtC,GAAGE,EACH,KAAAD,CAAA,CACD,EACMO,CACT,CAYgB,SAAAC,EACdT,EACAU,EACAC,EACuC,CACvC,IAAIC,EAEE,MAAAC,EAAeC,aAAWd,CAAM,EAUtC,GATIa,GAAgBH,EAAiBG,CAAY,IAAaD,EAAAC,GAE1DF,IAAmB,OACjBD,EAAiBC,CAAc,IAAaC,EAAAD,GACvCE,IAAiB,QAEtBH,EAAiBG,CAAY,IAAaD,EAAAC,GAG5CD,IAAY,OAAW,CACnB,MAAAG,EAAeC,aAAWhB,CAAM,EAClCe,EAAa,UAAY,QAEvBL,EAAiBK,EAAa,OAAO,IACvCH,EAAUG,EAAa,QAE7B,CAII,GADAH,IAAY,SAAqBA,EAAO,UACxC,CAACF,EAAiBE,CAAO,EAC3B,MAAM,IAAIK,EAAA,4BACRL,EACA,OAAO,KAAKF,CAAgB,EAAE,IAAI,MAAM,CAAA,EAG5C,MAAO,CAAE,QAAAE,EAAS,QAASF,EAAiBE,CAAO,CAAG,CACxD,CAaA,eAAsBM,EACpBlB,EACAmB,EACAC,EACAC,EACA,CACO,OAAA,MAAMC,eAAatB,EAAQ,CAChC,GAAGqB,EACH,aAAc,YACd,QAASF,EACT,KAAM,CAACC,CAAK,EACZ,IAAK,CACH,CACE,SAAU,GACV,OAAQ,CACN,CACE,KAAM,SACN,KAAM,SACR,CACF,EACA,KAAM,YACN,QAAS,CACP,CACE,KAAM,UACN,KAAM,SACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,CACF,CAAA,CACD,CACH"}