@boostxyz/sdk 0.0.0-alpha.10
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.
- package/LICENSE +674 -0
- package/README.md +7 -0
- package/dist/Actions/Action.cjs +2 -0
- package/dist/Actions/Action.cjs.map +1 -0
- package/dist/Actions/Action.d.ts +31 -0
- package/dist/Actions/Action.d.ts.map +1 -0
- package/dist/Actions/Action.js +29 -0
- package/dist/Actions/Action.js.map +1 -0
- package/dist/Actions/ContractAction.d.ts +370 -0
- package/dist/Actions/ContractAction.d.ts.map +1 -0
- package/dist/Actions/ERC721MintAction.d.ts +513 -0
- package/dist/Actions/ERC721MintAction.d.ts.map +1 -0
- package/dist/Actions/EventAction.cjs +2 -0
- package/dist/Actions/EventAction.cjs.map +1 -0
- package/dist/Actions/EventAction.d.ts +694 -0
- package/dist/Actions/EventAction.d.ts.map +1 -0
- package/dist/Actions/EventAction.js +491 -0
- package/dist/Actions/EventAction.js.map +1 -0
- package/dist/AllowLists/AllowList.cjs +2 -0
- package/dist/AllowLists/AllowList.cjs.map +1 -0
- package/dist/AllowLists/AllowList.d.ts +32 -0
- package/dist/AllowLists/AllowList.d.ts.map +1 -0
- package/dist/AllowLists/AllowList.js +30 -0
- package/dist/AllowLists/AllowList.js.map +1 -0
- package/dist/AllowLists/SimpleAllowList.cjs +2 -0
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -0
- package/dist/AllowLists/SimpleAllowList.d.ts +481 -0
- package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -0
- package/dist/AllowLists/SimpleAllowList.js +154 -0
- package/dist/AllowLists/SimpleAllowList.js.map +1 -0
- package/dist/AllowLists/SimpleDenyList.cjs +2 -0
- package/dist/AllowLists/SimpleDenyList.cjs.map +1 -0
- package/dist/AllowLists/SimpleDenyList.d.ts +335 -0
- package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -0
- package/dist/AllowLists/SimpleDenyList.js +115 -0
- package/dist/AllowLists/SimpleDenyList.js.map +1 -0
- package/dist/Auth/Auth.cjs +2 -0
- package/dist/Auth/Auth.cjs.map +1 -0
- package/dist/Auth/Auth.d.ts +10 -0
- package/dist/Auth/Auth.d.ts.map +1 -0
- package/dist/Auth/Auth.js +5 -0
- package/dist/Auth/Auth.js.map +1 -0
- package/dist/Auth/PassthroughAuth.cjs +2 -0
- package/dist/Auth/PassthroughAuth.cjs.map +1 -0
- package/dist/Auth/PassthroughAuth.d.ts +51 -0
- package/dist/Auth/PassthroughAuth.d.ts.map +1 -0
- package/dist/Auth/PassthroughAuth.js +39 -0
- package/dist/Auth/PassthroughAuth.js.map +1 -0
- package/dist/Boost.cjs +2 -0
- package/dist/Boost.cjs.map +1 -0
- package/dist/Boost.d.ts +234 -0
- package/dist/Boost.d.ts.map +1 -0
- package/dist/Boost.js +162 -0
- package/dist/Boost.js.map +1 -0
- package/dist/BoostCore.cjs +3 -0
- package/dist/BoostCore.cjs.map +1 -0
- package/dist/BoostCore.d.ts +498 -0
- package/dist/BoostCore.d.ts.map +1 -0
- package/dist/BoostCore.js +1153 -0
- package/dist/BoostCore.js.map +1 -0
- package/dist/BoostRegistry.cjs +2 -0
- package/dist/BoostRegistry.cjs.map +1 -0
- package/dist/BoostRegistry.d.ts +243 -0
- package/dist/BoostRegistry.d.ts.map +1 -0
- package/dist/BoostRegistry.js +262 -0
- package/dist/BoostRegistry.js.map +1 -0
- package/dist/Budgets/Budget.cjs +2 -0
- package/dist/Budgets/Budget.cjs.map +1 -0
- package/dist/Budgets/Budget.d.ts +31 -0
- package/dist/Budgets/Budget.d.ts.map +1 -0
- package/dist/Budgets/Budget.js +29 -0
- package/dist/Budgets/Budget.js.map +1 -0
- package/dist/Budgets/ManagedBudget.cjs +2 -0
- package/dist/Budgets/ManagedBudget.cjs.map +1 -0
- package/dist/Budgets/ManagedBudget.d.ts +1103 -0
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -0
- package/dist/Budgets/ManagedBudget.js +516 -0
- package/dist/Budgets/ManagedBudget.js.map +1 -0
- package/dist/Budgets/SimpleBudget.d.ts +824 -0
- package/dist/Budgets/SimpleBudget.d.ts.map +1 -0
- package/dist/Budgets/VestingBudget.d.ts +778 -0
- package/dist/Budgets/VestingBudget.d.ts.map +1 -0
- package/dist/Deployable/Contract.cjs +2 -0
- package/dist/Deployable/Contract.cjs.map +1 -0
- package/dist/Deployable/Contract.d.ts +125 -0
- package/dist/Deployable/Contract.d.ts.map +1 -0
- package/dist/Deployable/Contract.js +150 -0
- package/dist/Deployable/Contract.js.map +1 -0
- package/dist/Deployable/Deployable.cjs +2 -0
- package/dist/Deployable/Deployable.cjs.map +1 -0
- package/dist/Deployable/Deployable.d.ts +161 -0
- package/dist/Deployable/Deployable.d.ts.map +1 -0
- package/dist/Deployable/Deployable.js +131 -0
- package/dist/Deployable/Deployable.js.map +1 -0
- package/dist/Deployable/DeployableTarget.cjs +2 -0
- package/dist/Deployable/DeployableTarget.cjs.map +1 -0
- package/dist/Deployable/DeployableTarget.d.ts +116 -0
- package/dist/Deployable/DeployableTarget.d.ts.map +1 -0
- package/dist/Deployable/DeployableTarget.js +132 -0
- package/dist/Deployable/DeployableTarget.js.map +1 -0
- package/dist/Incentives/AllowListIncentive.cjs +2 -0
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -0
- package/dist/Incentives/AllowListIncentive.d.ts +513 -0
- package/dist/Incentives/AllowListIncentive.d.ts.map +1 -0
- package/dist/Incentives/AllowListIncentive.js +201 -0
- package/dist/Incentives/AllowListIncentive.js.map +1 -0
- package/dist/Incentives/CGDAIncentive.cjs +2 -0
- package/dist/Incentives/CGDAIncentive.cjs.map +1 -0
- package/dist/Incentives/CGDAIncentive.d.ts +644 -0
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -0
- package/dist/Incentives/CGDAIncentive.js +271 -0
- package/dist/Incentives/CGDAIncentive.js.map +1 -0
- package/dist/Incentives/ERC1155Incentive.d.ts +713 -0
- package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20Incentive.cjs +2 -0
- package/dist/Incentives/ERC20Incentive.cjs.map +1 -0
- package/dist/Incentives/ERC20Incentive.d.ts +666 -0
- package/dist/Incentives/ERC20Incentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20Incentive.js +312 -0
- package/dist/Incentives/ERC20Incentive.js.map +1 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts +582 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -0
- package/dist/Incentives/Incentive.cjs +2 -0
- package/dist/Incentives/Incentive.cjs.map +1 -0
- package/dist/Incentives/Incentive.d.ts +36 -0
- package/dist/Incentives/Incentive.d.ts.map +1 -0
- package/dist/Incentives/Incentive.js +299 -0
- package/dist/Incentives/Incentive.js.map +1 -0
- package/dist/Incentives/PointsIncentive.cjs +2 -0
- package/dist/Incentives/PointsIncentive.cjs.map +1 -0
- package/dist/Incentives/PointsIncentive.d.ts +659 -0
- package/dist/Incentives/PointsIncentive.d.ts.map +1 -0
- package/dist/Incentives/PointsIncentive.js +215 -0
- package/dist/Incentives/PointsIncentive.js.map +1 -0
- package/dist/Validators/SignerValidator.cjs +2 -0
- package/dist/Validators/SignerValidator.cjs.map +1 -0
- package/dist/Validators/SignerValidator.d.ts +745 -0
- package/dist/Validators/SignerValidator.d.ts.map +1 -0
- package/dist/Validators/SignerValidator.js +293 -0
- package/dist/Validators/SignerValidator.js.map +1 -0
- package/dist/Validators/Validator.cjs +2 -0
- package/dist/Validators/Validator.cjs.map +1 -0
- package/dist/Validators/Validator.d.ts +31 -0
- package/dist/Validators/Validator.d.ts.map +1 -0
- package/dist/Validators/Validator.js +27 -0
- package/dist/Validators/Validator.js.map +1 -0
- package/dist/claiming.cjs +2 -0
- package/dist/claiming.cjs.map +1 -0
- package/dist/claiming.d.ts +43 -0
- package/dist/claiming.d.ts.map +1 -0
- package/dist/claiming.js +17 -0
- package/dist/claiming.js.map +1 -0
- package/dist/componentInterfaces-CKCBwG16.cjs +2 -0
- package/dist/componentInterfaces-CKCBwG16.cjs.map +1 -0
- package/dist/componentInterfaces-DYkaxBda.js +13 -0
- package/dist/componentInterfaces-DYkaxBda.js.map +1 -0
- package/dist/errors.cjs +2 -0
- package/dist/errors.cjs.map +1 -0
- package/dist/errors.d.ts +441 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +262 -0
- package/dist/errors.js.map +1 -0
- package/dist/generated-BDeDiaCK.js +4625 -0
- package/dist/generated-BDeDiaCK.js.map +1 -0
- package/dist/generated-wKBNvm48.cjs +3 -0
- package/dist/generated-wKBNvm48.cjs.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +113 -0
- package/dist/index.js.map +1 -0
- package/dist/transfers.cjs +2 -0
- package/dist/transfers.cjs.map +1 -0
- package/dist/transfers.d.ts +198 -0
- package/dist/transfers.d.ts.map +1 -0
- package/dist/transfers.js +84 -0
- package/dist/transfers.js.map +1 -0
- package/dist/utils.cjs +2 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.d.ts +116 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +30 -0
- package/dist/utils.js.map +1 -0
- package/package.json +211 -0
- package/src/Actions/Action.test.ts +75 -0
- package/src/Actions/Action.ts +61 -0
- package/src/Actions/ContractAction.test.ts +197 -0
- package/src/Actions/ContractAction.ts +301 -0
- package/src/Actions/ERC721MintAction.test.ts +112 -0
- package/src/Actions/ERC721MintAction.ts +292 -0
- package/src/Actions/EventAction.test.ts +205 -0
- package/src/Actions/EventAction.ts +811 -0
- package/src/AllowLists/AllowList.test.ts +64 -0
- package/src/AllowLists/AllowList.ts +60 -0
- package/src/AllowLists/SimpleAllowList.test.ts +52 -0
- package/src/AllowLists/SimpleAllowList.ts +284 -0
- package/src/AllowLists/SimpleDenyList.test.ts +52 -0
- package/src/AllowLists/SimpleDenyList.ts +227 -0
- package/src/Auth/Auth.ts +11 -0
- package/src/Auth/PassthroughAuth.test.ts +12 -0
- package/src/Auth/PassthroughAuth.ts +80 -0
- package/src/Boost.ts +290 -0
- package/src/BoostCore.test.ts +773 -0
- package/src/BoostCore.ts +1261 -0
- package/src/BoostRegistry.ts +467 -0
- package/src/Budgets/Budget.test.ts +27 -0
- package/src/Budgets/Budget.ts +61 -0
- package/src/Budgets/ManagedBudget.test.ts +154 -0
- package/src/Budgets/ManagedBudget.ts +796 -0
- package/src/Budgets/SimpleBudget.test.ts +152 -0
- package/src/Budgets/SimpleBudget.ts +564 -0
- package/src/Budgets/VestingBudget.test.ts +123 -0
- package/src/Budgets/VestingBudget.ts +602 -0
- package/src/Deployable/Contract.ts +229 -0
- package/src/Deployable/Deployable.ts +250 -0
- package/src/Deployable/DeployableTarget.ts +223 -0
- package/src/Incentives/AllowListIncentive.test.ts +143 -0
- package/src/Incentives/AllowListIncentive.ts +334 -0
- package/src/Incentives/CGDAIncentive.test.ts +132 -0
- package/src/Incentives/CGDAIncentive.ts +468 -0
- package/src/Incentives/ERC1155Incentive.test.ts +87 -0
- package/src/Incentives/ERC1155Incentive.ts +466 -0
- package/src/Incentives/ERC20Incentive.test.ts +130 -0
- package/src/Incentives/ERC20Incentive.ts +482 -0
- package/src/Incentives/ERC20VariableIncentive.test.ts +136 -0
- package/src/Incentives/ERC20VariableIncentive.ts +420 -0
- package/src/Incentives/Incentive.test.ts +92 -0
- package/src/Incentives/Incentive.ts +85 -0
- package/src/Incentives/PointsIncentive.test.ts +139 -0
- package/src/Incentives/PointsIncentive.ts +365 -0
- package/src/Validators/SignerValidator.test.ts +159 -0
- package/src/Validators/SignerValidator.ts +681 -0
- package/src/Validators/Validator.test.ts +21 -0
- package/src/Validators/Validator.ts +55 -0
- package/src/claiming.ts +56 -0
- package/src/errors.ts +542 -0
- package/src/index.test.ts +40 -0
- package/src/index.ts +53 -0
- package/src/transfers.ts +284 -0
- package/src/utils.test.ts +44 -0
- package/src/utils.ts +198 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./BoostRegistry.cjs"),a=require("./BoostCore.cjs"),p=require("./Boost.cjs"),c=require("./Actions/Action.cjs"),o=require("./Actions/EventAction.cjs"),y=require("./AllowLists/AllowList.cjs"),l=require("./AllowLists/SimpleAllowList.cjs"),u=require("./AllowLists/SimpleDenyList.cjs"),A=require("./Budgets/Budget.cjs"),t=require("./Budgets/ManagedBudget.cjs"),m=require("./Deployable/Deployable.cjs"),P=require("./Deployable/Contract.cjs"),S=require("./Deployable/DeployableTarget.cjs"),E=require("./Incentives/AllowListIncentive.cjs"),g=require("./Incentives/CGDAIncentive.cjs"),v=require("./Incentives/ERC20Incentive.cjs"),s=require("./Incentives/Incentive.cjs"),C=require("./Incentives/PointsIncentive.cjs"),n=require("./Validators/SignerValidator.cjs"),I=require("./Validators/Validator.cjs"),e=require("./errors.cjs"),i=require("./utils.cjs"),B=require("./Auth/PassthroughAuth.cjs"),r=require("./generated-wKBNvm48.cjs");exports.BOOST_REGISTRY_ADDRESS=d.BOOST_REGISTRY_ADDRESS;exports.BoostRegistry=d.BoostRegistry;exports.BOOST_CORE_ADDRESS=a.BOOST_CORE_ADDRESS;exports.BOOST_CORE_CLAIM_FEE=a.BOOST_CORE_CLAIM_FEE;exports.BoostCore=a.BoostCore;exports.Boost=p.Boost;exports.prepareBoostPayload=p.prepareBoostPayload;exports.ActionByComponentInterface=c.ActionByComponentInterface;exports.actionFromAddress=c.actionFromAddress;exports.EventAction=o.EventAction;exports.FilterType=o.FilterType;exports.PrimitiveType=o.PrimitiveType;exports.SignatureType=o.SignatureType;exports.isEventActionPayloadSimple=o.isEventActionPayloadSimple;exports.prepareEventActionPayload=o.prepareEventActionPayload;exports.AllowListByComponentInterface=y.AllowListByComponentInterface;exports.allowListFromAddress=y.allowListFromAddress;exports.LIST_MANAGER_ROLE=l.LIST_MANAGER_ROLE;exports.SimpleAllowList=l.SimpleAllowList;exports.prepareSimpleAllowListPayload=l.prepareSimpleAllowListPayload;exports.SimpleDenyList=u.SimpleDenyList;exports.prepareSimpleDenyListPayload=u.prepareSimpleDenyListPayload;exports.BudgetByComponentInterface=A.BudgetByComponentInterface;exports.budgetFromAddress=A.budgetFromAddress;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=m.Deployable;exports.Contract=P.Contract;exports.DeployableTarget=S.DeployableTarget;exports.AllowListIncentive=E.AllowListIncentive;exports.prepareAllowListIncentivePayload=E.prepareAllowListIncentivePayload;exports.CGDAIncentive=g.CGDAIncentive;exports.prepareCGDAIncentivePayload=g.prepareCGDAIncentivePayload;exports.ERC20Incentive=v.ERC20Incentive;exports.prepareERC20IncentivePayload=v.prepareERC20IncentivePayload;exports.ERC20VariableIncentive=s.ERC20VariableIncentive;exports.IncentiveByComponentInterface=s.IncentiveByComponentInterface;exports.incentiveFromAddress=s.incentiveFromAddress;exports.PointsIncentive=C.PointsIncentive;exports.preparePointsIncentivePayload=C.preparePointsIncentivePayload;exports.SignerValidator=n.SignerValidator;exports.prepareSignerValidatorClaimDataPayload=n.prepareSignerValidatorClaimDataPayload;exports.prepareSignerValidatorInputParams=n.prepareSignerValidatorInputParams;exports.prepareSignerValidatorPayload=n.prepareSignerValidatorPayload;exports.ValidatorByComponentInterface=I.ValidatorByComponentInterface;exports.validatorFromAddress=I.validatorFromAddress;exports.BoostCoreNoIdentifierEmitted=e.BoostCoreNoIdentifierEmitted;exports.BudgetMustAuthorizeBoostCore=e.BudgetMustAuthorizeBoostCore;exports.ContractAddressRequiredError=e.ContractAddressRequiredError;exports.DeployableAlreadyDeployedError=e.DeployableAlreadyDeployedError;exports.DeployableBuildParametersUnspecifiedError=e.DeployableBuildParametersUnspecifiedError;exports.DeployableMissingPayloadError=e.DeployableMissingPayloadError;exports.DeployableUnknownOwnerProvidedError=e.DeployableUnknownOwnerProvidedError;exports.DeployableWagmiConfigurationRequiredError=e.DeployableWagmiConfigurationRequiredError;exports.EventActionValidationError=e.EventActionValidationError;exports.FieldValueNotComparableError=e.FieldValueNotComparableError;exports.FieldValueUndefinedError=e.FieldValueUndefinedError;exports.IncentiveNotCloneableError=e.IncentiveNotCloneableError;exports.InvalidComponentInterfaceError=e.InvalidComponentInterfaceError;exports.InvalidNumericalCriteriaError=e.InvalidNumericalCriteriaError;exports.MustInitializeBudgetError=e.MustInitializeBudgetError;exports.NoContractAddressUponReceiptError=e.NoContractAddressUponReceiptError;exports.NoEventActionStepsProvidedError=e.NoEventActionStepsProvidedError;exports.TooManyEventActionStepsProvidedError=e.TooManyEventActionStepsProvidedError;exports.UnknownTransferPayloadSupplied=e.UnknownTransferPayloadSupplied;exports.UnrecognizedFilterTypeError=e.UnrecognizedFilterTypeError;exports.RegistryType=i.RegistryType;exports.awaitResult=i.awaitResult;exports.bytes4=i.bytes4;exports.getDeployedContractAddress=i.getDeployedContractAddress;exports.PassthroughAuth=B.PassthroughAuth;exports.allowListIncentiveAbi=r.A;exports.boostCoreAbi=r.c;exports.boostRegistryAbi=r.ee;exports.cgdaIncentiveAbi=r.v;exports.erc20IncentiveAbi=r.f;exports.managedBudgetAbi=r.p;exports.passthroughAuthAbi=r.ze;exports.pointsIncentiveAbi=r.l;exports.signerValidatorAbi=r.M;exports.simpleAllowListAbi=r.T;exports.simpleDenyListAbi=r.S;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export * from './BoostRegistry';
|
|
2
|
+
export * from './BoostCore';
|
|
3
|
+
export * from './Boost';
|
|
4
|
+
export * from './Actions/Action';
|
|
5
|
+
export * from './Actions/EventAction';
|
|
6
|
+
export * from './AllowLists/AllowList';
|
|
7
|
+
export * from './AllowLists/SimpleAllowList';
|
|
8
|
+
export * from './AllowLists/SimpleDenyList';
|
|
9
|
+
export * from './Budgets/Budget';
|
|
10
|
+
export * from './Budgets/ManagedBudget';
|
|
11
|
+
export * from './Deployable/Deployable';
|
|
12
|
+
export * from './Deployable/Contract';
|
|
13
|
+
export * from './Deployable/DeployableTarget';
|
|
14
|
+
export * from './Incentives/AllowListIncentive';
|
|
15
|
+
export * from './Incentives/CGDAIncentive';
|
|
16
|
+
export * from './Incentives/ERC20Incentive';
|
|
17
|
+
export * from './Incentives/Incentive';
|
|
18
|
+
export * from './Incentives/PointsIncentive';
|
|
19
|
+
export * from './Validators/SignerValidator';
|
|
20
|
+
export * from './Validators/Validator';
|
|
21
|
+
export * from './errors';
|
|
22
|
+
export * from './utils';
|
|
23
|
+
export * from './Auth/Auth';
|
|
24
|
+
export * from './Auth/PassthroughAuth';
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AAIxB,cAAc,kBAAkB,CAAC;AAGjC,cAAc,uBAAuB,CAAC;AAItC,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAI5C,cAAc,kBAAkB,CAAC;AAGjC,cAAc,yBAAyB,CAAC;AAIxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAI9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAE5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAI7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AAIvC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AAIxB,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { BOOST_REGISTRY_ADDRESS as o, BoostRegistry as t } from "./BoostRegistry.js";
|
|
2
|
+
import { BOOST_CORE_ADDRESS as i, BOOST_CORE_CLAIM_FEE as n, BoostCore as p } from "./BoostCore.js";
|
|
3
|
+
import { Boost as s, prepareBoostPayload as d } from "./Boost.js";
|
|
4
|
+
import { ActionByComponentInterface as A, actionFromAddress as y } from "./Actions/Action.js";
|
|
5
|
+
import { EventAction as f, FilterType as E, PrimitiveType as g, SignatureType as v, isEventActionPayloadSimple as I, prepareEventActionPayload as C } from "./Actions/EventAction.js";
|
|
6
|
+
import { AllowListByComponentInterface as b, allowListFromAddress as x } from "./AllowLists/AllowList.js";
|
|
7
|
+
import { LIST_MANAGER_ROLE as S, SimpleAllowList as B, prepareSimpleAllowListPayload as R } from "./AllowLists/SimpleAllowList.js";
|
|
8
|
+
import { SimpleDenyList as T, prepareSimpleDenyListPayload as L } from "./AllowLists/SimpleDenyList.js";
|
|
9
|
+
import { BudgetByComponentInterface as F, budgetFromAddress as M } from "./Budgets/Budget.js";
|
|
10
|
+
import { ManagedBudget as V, ManagedBudgetRoles as _, isERC1155TransferPayload as h, isFungibleTransfer as N, prepareManagedBudgetPayload as U, prepareTransfer as z } from "./Budgets/ManagedBudget.js";
|
|
11
|
+
import { Deployable as k } from "./Deployable/Deployable.js";
|
|
12
|
+
import { Contract as W } from "./Deployable/Contract.js";
|
|
13
|
+
import { DeployableTarget as j } from "./Deployable/DeployableTarget.js";
|
|
14
|
+
import { AllowListIncentive as J, prepareAllowListIncentivePayload as K } from "./Incentives/AllowListIncentive.js";
|
|
15
|
+
import { CGDAIncentive as X, prepareCGDAIncentivePayload as Z } from "./Incentives/CGDAIncentive.js";
|
|
16
|
+
import { ERC20Incentive as ee, prepareERC20IncentivePayload as re } from "./Incentives/ERC20Incentive.js";
|
|
17
|
+
import { ERC20VariableIncentive as te, IncentiveByComponentInterface as ae, incentiveFromAddress as ie } from "./Incentives/Incentive.js";
|
|
18
|
+
import { PointsIncentive as pe, preparePointsIncentivePayload as le } from "./Incentives/PointsIncentive.js";
|
|
19
|
+
import { SignerValidator as de, prepareSignerValidatorClaimDataPayload as me, prepareSignerValidatorInputParams as Ae, prepareSignerValidatorPayload as ye } from "./Validators/SignerValidator.js";
|
|
20
|
+
import { ValidatorByComponentInterface as fe, validatorFromAddress as Ee } from "./Validators/Validator.js";
|
|
21
|
+
import { BoostCoreNoIdentifierEmitted as ve, BudgetMustAuthorizeBoostCore as Ie, ContractAddressRequiredError as Ce, DeployableAlreadyDeployedError as ue, DeployableBuildParametersUnspecifiedError as be, DeployableMissingPayloadError as xe, DeployableUnknownOwnerProvidedError as Pe, DeployableWagmiConfigurationRequiredError as Se, EventActionValidationError as Be, FieldValueNotComparableError as Re, FieldValueUndefinedError as De, IncentiveNotCloneableError as Te, InvalidComponentInterfaceError as Le, InvalidNumericalCriteriaError as we, MustInitializeBudgetError as Fe, NoContractAddressUponReceiptError as Me, NoEventActionStepsProvidedError as Oe, TooManyEventActionStepsProvidedError as Ve, UnknownTransferPayloadSupplied as _e, UnrecognizedFilterTypeError as he } from "./errors.js";
|
|
22
|
+
import { RegistryType as Ue, awaitResult as ze, bytes4 as Ge, getDeployedContractAddress as ke } from "./utils.js";
|
|
23
|
+
import { PassthroughAuth as We } from "./Auth/PassthroughAuth.js";
|
|
24
|
+
import { A as je, c as He, e as Je, v as Ke, f as Qe, p as Xe, z as Ze, l as $e, M as er, T as rr, S as or } from "./generated-BDeDiaCK.js";
|
|
25
|
+
export {
|
|
26
|
+
A as ActionByComponentInterface,
|
|
27
|
+
b as AllowListByComponentInterface,
|
|
28
|
+
J as AllowListIncentive,
|
|
29
|
+
i as BOOST_CORE_ADDRESS,
|
|
30
|
+
n as BOOST_CORE_CLAIM_FEE,
|
|
31
|
+
o as BOOST_REGISTRY_ADDRESS,
|
|
32
|
+
s as Boost,
|
|
33
|
+
p as BoostCore,
|
|
34
|
+
ve as BoostCoreNoIdentifierEmitted,
|
|
35
|
+
t as BoostRegistry,
|
|
36
|
+
F as BudgetByComponentInterface,
|
|
37
|
+
Ie as BudgetMustAuthorizeBoostCore,
|
|
38
|
+
X as CGDAIncentive,
|
|
39
|
+
W as Contract,
|
|
40
|
+
Ce as ContractAddressRequiredError,
|
|
41
|
+
k as Deployable,
|
|
42
|
+
ue as DeployableAlreadyDeployedError,
|
|
43
|
+
be as DeployableBuildParametersUnspecifiedError,
|
|
44
|
+
xe as DeployableMissingPayloadError,
|
|
45
|
+
j as DeployableTarget,
|
|
46
|
+
Pe as DeployableUnknownOwnerProvidedError,
|
|
47
|
+
Se as DeployableWagmiConfigurationRequiredError,
|
|
48
|
+
ee as ERC20Incentive,
|
|
49
|
+
te as ERC20VariableIncentive,
|
|
50
|
+
f as EventAction,
|
|
51
|
+
Be as EventActionValidationError,
|
|
52
|
+
Re as FieldValueNotComparableError,
|
|
53
|
+
De as FieldValueUndefinedError,
|
|
54
|
+
E as FilterType,
|
|
55
|
+
ae as IncentiveByComponentInterface,
|
|
56
|
+
Te as IncentiveNotCloneableError,
|
|
57
|
+
Le as InvalidComponentInterfaceError,
|
|
58
|
+
we as InvalidNumericalCriteriaError,
|
|
59
|
+
S as LIST_MANAGER_ROLE,
|
|
60
|
+
V as ManagedBudget,
|
|
61
|
+
_ as ManagedBudgetRoles,
|
|
62
|
+
Fe as MustInitializeBudgetError,
|
|
63
|
+
Me as NoContractAddressUponReceiptError,
|
|
64
|
+
Oe as NoEventActionStepsProvidedError,
|
|
65
|
+
We as PassthroughAuth,
|
|
66
|
+
pe as PointsIncentive,
|
|
67
|
+
g as PrimitiveType,
|
|
68
|
+
Ue as RegistryType,
|
|
69
|
+
v as SignatureType,
|
|
70
|
+
de as SignerValidator,
|
|
71
|
+
B as SimpleAllowList,
|
|
72
|
+
T as SimpleDenyList,
|
|
73
|
+
Ve as TooManyEventActionStepsProvidedError,
|
|
74
|
+
_e as UnknownTransferPayloadSupplied,
|
|
75
|
+
he as UnrecognizedFilterTypeError,
|
|
76
|
+
fe as ValidatorByComponentInterface,
|
|
77
|
+
y as actionFromAddress,
|
|
78
|
+
x as allowListFromAddress,
|
|
79
|
+
je as allowListIncentiveAbi,
|
|
80
|
+
ze as awaitResult,
|
|
81
|
+
He as boostCoreAbi,
|
|
82
|
+
Je as boostRegistryAbi,
|
|
83
|
+
M as budgetFromAddress,
|
|
84
|
+
Ge as bytes4,
|
|
85
|
+
Ke as cgdaIncentiveAbi,
|
|
86
|
+
Qe as erc20IncentiveAbi,
|
|
87
|
+
ke as getDeployedContractAddress,
|
|
88
|
+
ie as incentiveFromAddress,
|
|
89
|
+
h as isERC1155TransferPayload,
|
|
90
|
+
I as isEventActionPayloadSimple,
|
|
91
|
+
N as isFungibleTransfer,
|
|
92
|
+
Xe as managedBudgetAbi,
|
|
93
|
+
Ze as passthroughAuthAbi,
|
|
94
|
+
$e as pointsIncentiveAbi,
|
|
95
|
+
K as prepareAllowListIncentivePayload,
|
|
96
|
+
d as prepareBoostPayload,
|
|
97
|
+
Z as prepareCGDAIncentivePayload,
|
|
98
|
+
re as prepareERC20IncentivePayload,
|
|
99
|
+
C as prepareEventActionPayload,
|
|
100
|
+
U as prepareManagedBudgetPayload,
|
|
101
|
+
le as preparePointsIncentivePayload,
|
|
102
|
+
me as prepareSignerValidatorClaimDataPayload,
|
|
103
|
+
Ae as prepareSignerValidatorInputParams,
|
|
104
|
+
ye as prepareSignerValidatorPayload,
|
|
105
|
+
R as prepareSimpleAllowListPayload,
|
|
106
|
+
L as prepareSimpleDenyListPayload,
|
|
107
|
+
z as prepareTransfer,
|
|
108
|
+
er as signerValidatorAbi,
|
|
109
|
+
rr as simpleAllowListAbi,
|
|
110
|
+
or as simpleDenyListAbi,
|
|
111
|
+
Ee as validatorFromAddress
|
|
112
|
+
};
|
|
113
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("viem");var n=(e=>(e[e.ETH=0]="ETH",e[e.ERC20=1]="ERC20",e[e.ERC1155=2]="ERC1155",e))(n||{});const p=({assetType:e,address:r,target:t,data:s})=>a.encodeAbiParameters([{type:"uint8",name:"assetType"},{type:"address",name:"asset"},{type:"address",name:"target"},{type:"bytes",name:"data"}],[e,r,t,s]);function d({tokenId:e,amount:r}){return a.encodeAbiParameters(a.parseAbiParameters(["ERC1155Payload payload","struct ERC1155Payload { uint256 tokenId; uint256 amount; bytes data; }"]),[{tokenId:e,amount:r,data:"0x"}])}function o({tokenId:e,amount:r,asset:t,target:s}){return a.encodeAbiParameters(a.parseAbiParameters(["Transfer request","struct Transfer { uint8 assetType; address asset; address target; bytes data; }"]),[{assetType:2,asset:t,data:d({tokenId:e,amount:r}),target:s}])}function u({amount:e}){return a.encodeAbiParameters(a.parseAbiParameters(["FungiblePayload payload","struct FungiblePayload { uint256 amount; }"]),[{amount:e}])}function i({amount:e,asset:r,target:t}){return a.encodeAbiParameters(a.parseAbiParameters(["Transfer request","struct Transfer { uint8 assetType; address asset; address target; bytes data; }"]),[{assetType:r==a.zeroAddress?0:1,asset:r,data:u({amount:e}),target:t}])}exports.AssetType=n;exports.prepareERC1155Payload=d;exports.prepareERC1155Transfer=o;exports.prepareFungiblePayload=u;exports.prepareFungibleTransfer=i;exports.prepareTransferPayload=p;
|
|
2
|
+
//# sourceMappingURL=transfers.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transfers.cjs","sources":["../src/transfers.ts"],"sourcesContent":["import {\n type Address,\n type Hex,\n encodeAbiParameters,\n parseAbiParameters,\n zeroAddress,\n} from 'viem';\n\n/**\n * The various types of assets supported in Budgets and Incentives.\n *\n * @export\n * @enum {number}\n */\nexport enum AssetType {\n ETH,\n ERC20,\n ERC1155,\n}\n\n/**\n * Object representation of a generic `Transfer` struct.\n *\n * @export\n * @interface TransferPayload\n * @typedef {TransferPayload}\n */\nexport interface TransferPayload {\n /**\n * The type of the asset being transferred.\n *\n * @type {AssetType}\n */\n assetType: AssetType;\n /**\n * The address of the asset to transfer, zero address for ETH.\n *\n * @type {Address}\n */\n address: Address;\n /**\n * The account from which to transfer the assets.\n *\n * @type {Address}\n */\n target: Address;\n /**\n * An encoded {@link FungiblePayload}, use {@link prepareFungiblePayload} to construct.\n *\n * @type {Hex}\n */\n data: Hex;\n}\n\n/**\n * Encodes parameters for transferring the transfer of Fungible and ERC1155 assets, used for {@link Budget} operations.\n * Typically you'd use {@link prepareFungibleTransfer} or {@link prepareERC1155Transfer}\n *\n * @param {TransferPayload} param0\n * @param {AssetType} param0.assetType - The asset type being transferred.\n * @param {Address} param0.address - The address of the asset, use zero address for ETH transfers.\n * @param {Address} param0.target - The address of the account being transferred from\n * @param {Hex} param0.data - Use {@link prepareFungiblePayload} to properly encode an amount to transfer\n * @returns {Hex}\n */\nexport const prepareTransferPayload = ({\n assetType,\n address,\n target,\n data,\n}: TransferPayload) => {\n return encodeAbiParameters(\n [\n { type: 'uint8', name: 'assetType' },\n { type: 'address', name: 'asset' },\n { type: 'address', name: 'target' },\n { type: 'bytes', name: 'data' },\n ],\n [assetType, address, target, data],\n );\n};\n\n/**\n * Object representation of\n *\n * @export\n * @interface ERC1155Payload\n * @typedef {ERC1155Payload}\n */\nexport interface ERC1155Payload {\n /**\n * The ERC1155 token ID for the incentive\n *\n * @type {bigint}\n */\n tokenId: bigint;\n /**\n * The amount to transfer\n *\n * @type {bigint}\n */\n amount: bigint;\n}\n\n/**\n * Given a token ID and amount, properly encode a `ERC1155Incentive.ERC1155Payload` for use with {@link ERC1155Incentive} initialization.\n *\n * @export\n * @param {ERC1155Payload} param0\n * @param {bigint} param0.tokenId - The ERC1155 token ID for the incentive\n * @param {bigint} param0.amount - The amount to transfer\n * @returns {Hex}\n */\nexport function prepareERC1155Payload({ tokenId, amount }: ERC1155Payload) {\n return encodeAbiParameters(\n parseAbiParameters([\n 'ERC1155Payload payload',\n 'struct ERC1155Payload { uint256 tokenId; uint256 amount; bytes data; }',\n ]),\n [{ tokenId, amount, data: '0x' }],\n );\n}\n\n/**\n * An object representation of the `Budget.Transfer` contract struct for transfers of ERC1155 assets.\n *\n * @export\n * @interface ERC1155TransferPayload\n * @typedef {ERC1155TransferPayload}\n */\nexport interface ERC1155TransferPayload {\n /**\n * The token ID to transfer\n *\n * @type {bigint}\n */\n tokenId: bigint;\n /**\n * The amount to transfer\n *\n * @type {bigint}\n */\n amount: bigint;\n /**\n * The address of the asset to target\n *\n * @type {Address}\n */\n asset: Address;\n /**\n * The account to transfer from\n *\n * @type {Address}\n */\n target: Address;\n}\n\n/**\n * Encodes parameters for transferring the transfer of ERC1155 assets, used for {@link Budget} operations.\n * The caller must have already approved the contract to transfer the asset.\n *\n * @export\n * @param {ERC1155TransferPayload} param0\n * @param {bigint} param0.tokenId - The token ID to transfer\n * @param {bigint} param0.amount - The amount to transfer\n * @param {Address} param0.asset - The address of the asset to target\n * @param {Address} param0.target - The account to transfer from\n * @returns {Hex}\n */\nexport function prepareERC1155Transfer({\n tokenId,\n amount,\n asset,\n target,\n}: ERC1155TransferPayload) {\n return encodeAbiParameters(\n parseAbiParameters([\n 'Transfer request',\n 'struct Transfer { uint8 assetType; address asset; address target; bytes data; }',\n ]),\n [\n {\n assetType: AssetType.ERC1155,\n asset,\n data: prepareERC1155Payload({ tokenId, amount }),\n target,\n },\n ],\n );\n}\n\n/**\n * An object representation of the `FungiblePayload` struct\n *\n * @export\n * @interface FungiblePayload\n * @typedef {FungiblePayload}\n */\nexport interface FungiblePayload {\n /**\n * The amount being transferred\n *\n * @type {bigint}\n */\n amount: bigint;\n}\n\n/**\n * Encodes an amount for the `FungiblePayload` struct\n *\n * @export\n * @param {FungiblePayload} param0\n * @param {bigint} param0.amount - The amount being transferred\n * @returns {*}\n */\nexport function prepareFungiblePayload({ amount }: FungiblePayload) {\n return encodeAbiParameters(\n parseAbiParameters([\n 'FungiblePayload payload',\n 'struct FungiblePayload { uint256 amount; }',\n ]),\n [{ amount }],\n );\n}\n\n/**\n * An object representation of the `Budget.Transfer` contract struct for transfers of fungible assets.\n *\n * @export\n * @interface FungibleTransferPayload\n * @typedef {FungibleTransferPayload}\n */\nexport interface FungibleTransferPayload {\n /**\n * The amount to transfer\n *\n * @type {bigint}\n */\n amount: bigint;\n /**\n * The address of the asset. Use zero address for ETH transfers.\n *\n * @type {Address}\n */\n asset: Address;\n /**\n * The account to transfer from\n *\n * @type {Address}\n */\n target: Address;\n}\n\n/**\n * Encodes parameters for a Fungible transfer, used for Budget allocations.\n * The caller must have already approved the contract to transfer the asset.\n *\n * @export\n * @param {FungibleTransferPayload} param0\n * @param {bigint} param0.amount - The amount to transfer\n * @param {Address} param0.asset - The address of the asset. Use zero address for ETH transfers.\n * @param {Address} param0.target - The account to transfer from\n * @returns {Hex}\n */\nexport function prepareFungibleTransfer({\n amount,\n asset,\n target,\n}: FungibleTransferPayload) {\n return encodeAbiParameters(\n parseAbiParameters([\n 'Transfer request',\n 'struct Transfer { uint8 assetType; address asset; address target; bytes data; }',\n ]),\n [\n {\n assetType: asset == zeroAddress ? AssetType.ETH : AssetType.ERC20,\n asset,\n data: prepareFungiblePayload({ amount }),\n target,\n },\n ],\n );\n}\n"],"names":["AssetType","AssetType2","prepareTransferPayload","assetType","address","target","data","encodeAbiParameters","prepareERC1155Payload","tokenId","amount","parseAbiParameters","prepareERC1155Transfer","asset","prepareFungiblePayload","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E,UAAWE,GAASG,cAAc,EAAgB,EAClD,MAAAH,EACA,KAAMC,EAAuB,CAAE,OAAAJ,EAAQ,EACvC,OAAAL,CACF,CACF,CAAA,CAEJ"}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { type Address, type Hex } from 'viem';
|
|
2
|
+
/**
|
|
3
|
+
* The various types of assets supported in Budgets and Incentives.
|
|
4
|
+
*
|
|
5
|
+
* @export
|
|
6
|
+
* @enum {number}
|
|
7
|
+
*/
|
|
8
|
+
export declare enum AssetType {
|
|
9
|
+
ETH = 0,
|
|
10
|
+
ERC20 = 1,
|
|
11
|
+
ERC1155 = 2
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Object representation of a generic `Transfer` struct.
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface TransferPayload
|
|
18
|
+
* @typedef {TransferPayload}
|
|
19
|
+
*/
|
|
20
|
+
export interface TransferPayload {
|
|
21
|
+
/**
|
|
22
|
+
* The type of the asset being transferred.
|
|
23
|
+
*
|
|
24
|
+
* @type {AssetType}
|
|
25
|
+
*/
|
|
26
|
+
assetType: AssetType;
|
|
27
|
+
/**
|
|
28
|
+
* The address of the asset to transfer, zero address for ETH.
|
|
29
|
+
*
|
|
30
|
+
* @type {Address}
|
|
31
|
+
*/
|
|
32
|
+
address: Address;
|
|
33
|
+
/**
|
|
34
|
+
* The account from which to transfer the assets.
|
|
35
|
+
*
|
|
36
|
+
* @type {Address}
|
|
37
|
+
*/
|
|
38
|
+
target: Address;
|
|
39
|
+
/**
|
|
40
|
+
* An encoded {@link FungiblePayload}, use {@link prepareFungiblePayload} to construct.
|
|
41
|
+
*
|
|
42
|
+
* @type {Hex}
|
|
43
|
+
*/
|
|
44
|
+
data: Hex;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Encodes parameters for transferring the transfer of Fungible and ERC1155 assets, used for {@link Budget} operations.
|
|
48
|
+
* Typically you'd use {@link prepareFungibleTransfer} or {@link prepareERC1155Transfer}
|
|
49
|
+
*
|
|
50
|
+
* @param {TransferPayload} param0
|
|
51
|
+
* @param {AssetType} param0.assetType - The asset type being transferred.
|
|
52
|
+
* @param {Address} param0.address - The address of the asset, use zero address for ETH transfers.
|
|
53
|
+
* @param {Address} param0.target - The address of the account being transferred from
|
|
54
|
+
* @param {Hex} param0.data - Use {@link prepareFungiblePayload} to properly encode an amount to transfer
|
|
55
|
+
* @returns {Hex}
|
|
56
|
+
*/
|
|
57
|
+
export declare const prepareTransferPayload: ({ assetType, address, target, data, }: TransferPayload) => `0x${string}`;
|
|
58
|
+
/**
|
|
59
|
+
* Object representation of
|
|
60
|
+
*
|
|
61
|
+
* @export
|
|
62
|
+
* @interface ERC1155Payload
|
|
63
|
+
* @typedef {ERC1155Payload}
|
|
64
|
+
*/
|
|
65
|
+
export interface ERC1155Payload {
|
|
66
|
+
/**
|
|
67
|
+
* The ERC1155 token ID for the incentive
|
|
68
|
+
*
|
|
69
|
+
* @type {bigint}
|
|
70
|
+
*/
|
|
71
|
+
tokenId: bigint;
|
|
72
|
+
/**
|
|
73
|
+
* The amount to transfer
|
|
74
|
+
*
|
|
75
|
+
* @type {bigint}
|
|
76
|
+
*/
|
|
77
|
+
amount: bigint;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Given a token ID and amount, properly encode a `ERC1155Incentive.ERC1155Payload` for use with {@link ERC1155Incentive} initialization.
|
|
81
|
+
*
|
|
82
|
+
* @export
|
|
83
|
+
* @param {ERC1155Payload} param0
|
|
84
|
+
* @param {bigint} param0.tokenId - The ERC1155 token ID for the incentive
|
|
85
|
+
* @param {bigint} param0.amount - The amount to transfer
|
|
86
|
+
* @returns {Hex}
|
|
87
|
+
*/
|
|
88
|
+
export declare function prepareERC1155Payload({ tokenId, amount }: ERC1155Payload): `0x${string}`;
|
|
89
|
+
/**
|
|
90
|
+
* An object representation of the `Budget.Transfer` contract struct for transfers of ERC1155 assets.
|
|
91
|
+
*
|
|
92
|
+
* @export
|
|
93
|
+
* @interface ERC1155TransferPayload
|
|
94
|
+
* @typedef {ERC1155TransferPayload}
|
|
95
|
+
*/
|
|
96
|
+
export interface ERC1155TransferPayload {
|
|
97
|
+
/**
|
|
98
|
+
* The token ID to transfer
|
|
99
|
+
*
|
|
100
|
+
* @type {bigint}
|
|
101
|
+
*/
|
|
102
|
+
tokenId: bigint;
|
|
103
|
+
/**
|
|
104
|
+
* The amount to transfer
|
|
105
|
+
*
|
|
106
|
+
* @type {bigint}
|
|
107
|
+
*/
|
|
108
|
+
amount: bigint;
|
|
109
|
+
/**
|
|
110
|
+
* The address of the asset to target
|
|
111
|
+
*
|
|
112
|
+
* @type {Address}
|
|
113
|
+
*/
|
|
114
|
+
asset: Address;
|
|
115
|
+
/**
|
|
116
|
+
* The account to transfer from
|
|
117
|
+
*
|
|
118
|
+
* @type {Address}
|
|
119
|
+
*/
|
|
120
|
+
target: Address;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Encodes parameters for transferring the transfer of ERC1155 assets, used for {@link Budget} operations.
|
|
124
|
+
* The caller must have already approved the contract to transfer the asset.
|
|
125
|
+
*
|
|
126
|
+
* @export
|
|
127
|
+
* @param {ERC1155TransferPayload} param0
|
|
128
|
+
* @param {bigint} param0.tokenId - The token ID to transfer
|
|
129
|
+
* @param {bigint} param0.amount - The amount to transfer
|
|
130
|
+
* @param {Address} param0.asset - The address of the asset to target
|
|
131
|
+
* @param {Address} param0.target - The account to transfer from
|
|
132
|
+
* @returns {Hex}
|
|
133
|
+
*/
|
|
134
|
+
export declare function prepareERC1155Transfer({ tokenId, amount, asset, target, }: ERC1155TransferPayload): `0x${string}`;
|
|
135
|
+
/**
|
|
136
|
+
* An object representation of the `FungiblePayload` struct
|
|
137
|
+
*
|
|
138
|
+
* @export
|
|
139
|
+
* @interface FungiblePayload
|
|
140
|
+
* @typedef {FungiblePayload}
|
|
141
|
+
*/
|
|
142
|
+
export interface FungiblePayload {
|
|
143
|
+
/**
|
|
144
|
+
* The amount being transferred
|
|
145
|
+
*
|
|
146
|
+
* @type {bigint}
|
|
147
|
+
*/
|
|
148
|
+
amount: bigint;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Encodes an amount for the `FungiblePayload` struct
|
|
152
|
+
*
|
|
153
|
+
* @export
|
|
154
|
+
* @param {FungiblePayload} param0
|
|
155
|
+
* @param {bigint} param0.amount - The amount being transferred
|
|
156
|
+
* @returns {*}
|
|
157
|
+
*/
|
|
158
|
+
export declare function prepareFungiblePayload({ amount }: FungiblePayload): `0x${string}`;
|
|
159
|
+
/**
|
|
160
|
+
* An object representation of the `Budget.Transfer` contract struct for transfers of fungible assets.
|
|
161
|
+
*
|
|
162
|
+
* @export
|
|
163
|
+
* @interface FungibleTransferPayload
|
|
164
|
+
* @typedef {FungibleTransferPayload}
|
|
165
|
+
*/
|
|
166
|
+
export interface FungibleTransferPayload {
|
|
167
|
+
/**
|
|
168
|
+
* The amount to transfer
|
|
169
|
+
*
|
|
170
|
+
* @type {bigint}
|
|
171
|
+
*/
|
|
172
|
+
amount: bigint;
|
|
173
|
+
/**
|
|
174
|
+
* The address of the asset. Use zero address for ETH transfers.
|
|
175
|
+
*
|
|
176
|
+
* @type {Address}
|
|
177
|
+
*/
|
|
178
|
+
asset: Address;
|
|
179
|
+
/**
|
|
180
|
+
* The account to transfer from
|
|
181
|
+
*
|
|
182
|
+
* @type {Address}
|
|
183
|
+
*/
|
|
184
|
+
target: Address;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Encodes parameters for a Fungible transfer, used for Budget allocations.
|
|
188
|
+
* The caller must have already approved the contract to transfer the asset.
|
|
189
|
+
*
|
|
190
|
+
* @export
|
|
191
|
+
* @param {FungibleTransferPayload} param0
|
|
192
|
+
* @param {bigint} param0.amount - The amount to transfer
|
|
193
|
+
* @param {Address} param0.asset - The address of the asset. Use zero address for ETH transfers.
|
|
194
|
+
* @param {Address} param0.target - The account to transfer from
|
|
195
|
+
* @returns {Hex}
|
|
196
|
+
*/
|
|
197
|
+
export declare function prepareFungibleTransfer({ amount, asset, target, }: FungibleTransferPayload): `0x${string}`;
|
|
198
|
+
//# sourceMappingURL=transfers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transfers.d.ts","sourceRoot":"","sources":["../src/transfers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,GAAG,EAIT,MAAM,MAAM,CAAC;AAEd;;;;;GAKG;AACH,oBAAY,SAAS;IACnB,GAAG,IAAA;IACH,KAAK,IAAA;IACL,OAAO,IAAA;CACR;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,SAAS,EAAE,SAAS,CAAC;IACrB;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,IAAI,EAAE,GAAG,CAAC;CACX;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,0CAKhC,eAAe,kBAUjB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,cAAc,iBAQxE;AAED;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,OAAO,EACP,MAAM,EACN,KAAK,EACL,MAAM,GACP,EAAE,sBAAsB,iBAexB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,MAAM,EAAE,EAAE,eAAe,iBAQjE;AAED;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,MAAM,EACN,KAAK,EACL,MAAM,GACP,EAAE,uBAAuB,iBAezB"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { encodeAbiParameters as t, parseAbiParameters as n, zeroAddress as d } from "viem";
|
|
2
|
+
var u = /* @__PURE__ */ ((a) => (a[a.ETH = 0] = "ETH", a[a.ERC20 = 1] = "ERC20", a[a.ERC1155 = 2] = "ERC1155", a))(u || {});
|
|
3
|
+
const y = ({
|
|
4
|
+
assetType: a,
|
|
5
|
+
address: e,
|
|
6
|
+
target: r,
|
|
7
|
+
data: s
|
|
8
|
+
}) => t(
|
|
9
|
+
[
|
|
10
|
+
{ type: "uint8", name: "assetType" },
|
|
11
|
+
{ type: "address", name: "asset" },
|
|
12
|
+
{ type: "address", name: "target" },
|
|
13
|
+
{ type: "bytes", name: "data" }
|
|
14
|
+
],
|
|
15
|
+
[a, e, r, s]
|
|
16
|
+
);
|
|
17
|
+
function o({ tokenId: a, amount: e }) {
|
|
18
|
+
return t(
|
|
19
|
+
n([
|
|
20
|
+
"ERC1155Payload payload",
|
|
21
|
+
"struct ERC1155Payload { uint256 tokenId; uint256 amount; bytes data; }"
|
|
22
|
+
]),
|
|
23
|
+
[{ tokenId: a, amount: e, data: "0x" }]
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
function l({
|
|
27
|
+
tokenId: a,
|
|
28
|
+
amount: e,
|
|
29
|
+
asset: r,
|
|
30
|
+
target: s
|
|
31
|
+
}) {
|
|
32
|
+
return t(
|
|
33
|
+
n([
|
|
34
|
+
"Transfer request",
|
|
35
|
+
"struct Transfer { uint8 assetType; address asset; address target; bytes data; }"
|
|
36
|
+
]),
|
|
37
|
+
[
|
|
38
|
+
{
|
|
39
|
+
assetType: 2,
|
|
40
|
+
asset: r,
|
|
41
|
+
data: o({ tokenId: a, amount: e }),
|
|
42
|
+
target: s
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
function p({ amount: a }) {
|
|
48
|
+
return t(
|
|
49
|
+
n([
|
|
50
|
+
"FungiblePayload payload",
|
|
51
|
+
"struct FungiblePayload { uint256 amount; }"
|
|
52
|
+
]),
|
|
53
|
+
[{ amount: a }]
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
function f({
|
|
57
|
+
amount: a,
|
|
58
|
+
asset: e,
|
|
59
|
+
target: r
|
|
60
|
+
}) {
|
|
61
|
+
return t(
|
|
62
|
+
n([
|
|
63
|
+
"Transfer request",
|
|
64
|
+
"struct Transfer { uint8 assetType; address asset; address target; bytes data; }"
|
|
65
|
+
]),
|
|
66
|
+
[
|
|
67
|
+
{
|
|
68
|
+
assetType: e == d ? 0 : 1,
|
|
69
|
+
asset: e,
|
|
70
|
+
data: p({ amount: a }),
|
|
71
|
+
target: r
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
export {
|
|
77
|
+
u as AssetType,
|
|
78
|
+
o as prepareERC1155Payload,
|
|
79
|
+
l as prepareERC1155Transfer,
|
|
80
|
+
p as prepareFungiblePayload,
|
|
81
|
+
f as prepareFungibleTransfer,
|
|
82
|
+
y as prepareTransferPayload
|
|
83
|
+
};
|
|
84
|
+
//# sourceMappingURL=transfers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transfers.js","sources":["../src/transfers.ts"],"sourcesContent":["import {\n type Address,\n type Hex,\n encodeAbiParameters,\n parseAbiParameters,\n zeroAddress,\n} from 'viem';\n\n/**\n * The various types of assets supported in Budgets and Incentives.\n *\n * @export\n * @enum {number}\n */\nexport enum AssetType {\n ETH,\n ERC20,\n ERC1155,\n}\n\n/**\n * Object representation of a generic `Transfer` struct.\n *\n * @export\n * @interface TransferPayload\n * @typedef {TransferPayload}\n */\nexport interface TransferPayload {\n /**\n * The type of the asset being transferred.\n *\n * @type {AssetType}\n */\n assetType: AssetType;\n /**\n * The address of the asset to transfer, zero address for ETH.\n *\n * @type {Address}\n */\n address: Address;\n /**\n * The account from which to transfer the assets.\n *\n * @type {Address}\n */\n target: Address;\n /**\n * An encoded {@link FungiblePayload}, use {@link prepareFungiblePayload} to construct.\n *\n * @type {Hex}\n */\n data: Hex;\n}\n\n/**\n * Encodes parameters for transferring the transfer of Fungible and ERC1155 assets, used for {@link Budget} operations.\n * Typically you'd use {@link prepareFungibleTransfer} or {@link prepareERC1155Transfer}\n *\n * @param {TransferPayload} param0\n * @param {AssetType} param0.assetType - The asset type being transferred.\n * @param {Address} param0.address - The address of the asset, use zero address for ETH transfers.\n * @param {Address} param0.target - The address of the account being transferred from\n * @param {Hex} param0.data - Use {@link prepareFungiblePayload} to properly encode an amount to transfer\n * @returns {Hex}\n */\nexport const prepareTransferPayload = ({\n assetType,\n address,\n target,\n data,\n}: TransferPayload) => {\n return encodeAbiParameters(\n [\n { type: 'uint8', name: 'assetType' },\n { type: 'address', name: 'asset' },\n { type: 'address', name: 'target' },\n { type: 'bytes', name: 'data' },\n ],\n [assetType, address, target, data],\n );\n};\n\n/**\n * Object representation of\n *\n * @export\n * @interface ERC1155Payload\n * @typedef {ERC1155Payload}\n */\nexport interface ERC1155Payload {\n /**\n * The ERC1155 token ID for the incentive\n *\n * @type {bigint}\n */\n tokenId: bigint;\n /**\n * The amount to transfer\n *\n * @type {bigint}\n */\n amount: bigint;\n}\n\n/**\n * Given a token ID and amount, properly encode a `ERC1155Incentive.ERC1155Payload` for use with {@link ERC1155Incentive} initialization.\n *\n * @export\n * @param {ERC1155Payload} param0\n * @param {bigint} param0.tokenId - The ERC1155 token ID for the incentive\n * @param {bigint} param0.amount - The amount to transfer\n * @returns {Hex}\n */\nexport function prepareERC1155Payload({ tokenId, amount }: ERC1155Payload) {\n return encodeAbiParameters(\n parseAbiParameters([\n 'ERC1155Payload payload',\n 'struct ERC1155Payload { uint256 tokenId; uint256 amount; bytes data; }',\n ]),\n [{ tokenId, amount, data: '0x' }],\n );\n}\n\n/**\n * An object representation of the `Budget.Transfer` contract struct for transfers of ERC1155 assets.\n *\n * @export\n * @interface ERC1155TransferPayload\n * @typedef {ERC1155TransferPayload}\n */\nexport interface ERC1155TransferPayload {\n /**\n * The token ID to transfer\n *\n * @type {bigint}\n */\n tokenId: bigint;\n /**\n * The amount to transfer\n *\n * @type {bigint}\n */\n amount: bigint;\n /**\n * The address of the asset to target\n *\n * @type {Address}\n */\n asset: Address;\n /**\n * The account to transfer from\n *\n * @type {Address}\n */\n target: Address;\n}\n\n/**\n * Encodes parameters for transferring the transfer of ERC1155 assets, used for {@link Budget} operations.\n * The caller must have already approved the contract to transfer the asset.\n *\n * @export\n * @param {ERC1155TransferPayload} param0\n * @param {bigint} param0.tokenId - The token ID to transfer\n * @param {bigint} param0.amount - The amount to transfer\n * @param {Address} param0.asset - The address of the asset to target\n * @param {Address} param0.target - The account to transfer from\n * @returns {Hex}\n */\nexport function prepareERC1155Transfer({\n tokenId,\n amount,\n asset,\n target,\n}: ERC1155TransferPayload) {\n return encodeAbiParameters(\n parseAbiParameters([\n 'Transfer request',\n 'struct Transfer { uint8 assetType; address asset; address target; bytes data; }',\n ]),\n [\n {\n assetType: AssetType.ERC1155,\n asset,\n data: prepareERC1155Payload({ tokenId, amount }),\n target,\n },\n ],\n );\n}\n\n/**\n * An object representation of the `FungiblePayload` struct\n *\n * @export\n * @interface FungiblePayload\n * @typedef {FungiblePayload}\n */\nexport interface FungiblePayload {\n /**\n * The amount being transferred\n *\n * @type {bigint}\n */\n amount: bigint;\n}\n\n/**\n * Encodes an amount for the `FungiblePayload` struct\n *\n * @export\n * @param {FungiblePayload} param0\n * @param {bigint} param0.amount - The amount being transferred\n * @returns {*}\n */\nexport function prepareFungiblePayload({ amount }: FungiblePayload) {\n return encodeAbiParameters(\n parseAbiParameters([\n 'FungiblePayload payload',\n 'struct FungiblePayload { uint256 amount; }',\n ]),\n [{ amount }],\n );\n}\n\n/**\n * An object representation of the `Budget.Transfer` contract struct for transfers of fungible assets.\n *\n * @export\n * @interface FungibleTransferPayload\n * @typedef {FungibleTransferPayload}\n */\nexport interface FungibleTransferPayload {\n /**\n * The amount to transfer\n *\n * @type {bigint}\n */\n amount: bigint;\n /**\n * The address of the asset. Use zero address for ETH transfers.\n *\n * @type {Address}\n */\n asset: Address;\n /**\n * The account to transfer from\n *\n * @type {Address}\n */\n target: Address;\n}\n\n/**\n * Encodes parameters for a Fungible transfer, used for Budget allocations.\n * The caller must have already approved the contract to transfer the asset.\n *\n * @export\n * @param {FungibleTransferPayload} param0\n * @param {bigint} param0.amount - The amount to transfer\n * @param {Address} param0.asset - The address of the asset. Use zero address for ETH transfers.\n * @param {Address} param0.target - The account to transfer from\n * @returns {Hex}\n */\nexport function prepareFungibleTransfer({\n amount,\n asset,\n target,\n}: FungibleTransferPayload) {\n return encodeAbiParameters(\n parseAbiParameters([\n 'Transfer request',\n 'struct Transfer { uint8 assetType; address asset; address target; bytes data; }',\n ]),\n [\n {\n assetType: asset == zeroAddress ? AssetType.ETH : AssetType.ERC20,\n asset,\n data: prepareFungiblePayload({ amount }),\n target,\n },\n ],\n );\n}\n"],"names":["AssetType","AssetType2","prepareTransferPayload","assetType","address","target","data","encodeAbiParameters","prepareERC1155Payload","tokenId","amount","parseAbiParameters","prepareERC1155Transfer","asset","prepare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AA,CACD;AAAA,IACD,CAAC,EAAE,QAAAD,EAAA,CAAQ;AAAA,EAAA;AAEf;AAyCO,SAASK,EAAwB;AAAA,EACtC,QAAAL;AAAA,EACA,OAAAG;AAAA,EACA,QAAAR;AACF,GAA4B;AACnB,SAAAE;AAAA,IACLI,EAAmB;AAAA,MACjB;AAAA,MACA;AAAA,IAAA,CACD;AAAA,IACD;AAAA,MACE;AAAA,QACE,WAAWE,KAASG,IAAc,IAAgB;AAAA,QAClD,OAAAH;AAAA,QACA,MAAMC,EAAuB,EAAE,QAAAJ,GAAQ;AAAA,QACvC,QAAAL;AAAA,MACF;AAAA,IACF;AAAA,EAAA;AAEJ;"}
|
package/dist/utils.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@wagmi/core"),e=require("viem"),i=require("./errors.cjs");function d(t){return e.slice(e.isHex(t)?e.keccak256(t):e.keccak256(e.toHex(t)),0,4)}async function u(t,a,c){const r=await o.waitForTransactionReceipt(t,{...c,hash:await a});if(!r.contractAddress)throw new i.NoContractAddressUponReceiptError(r);return r.contractAddress}async function A(t,a,c){const{hash:r,result:s}=await a;return await o.waitForTransactionReceipt(t,{...c,hash:r}),s}var n=(t=>(t[t.ACTION=0]="ACTION",t[t.ALLOW_LIST=1]="ALLOW_LIST",t[t.BUDGET=2]="BUDGET",t[t.INCENTIVE=3]="INCENTIVE",t[t.VALIDATOR=4]="VALIDATOR",t))(n||{});exports.RegistryType=n;exports.awaitResult=A;exports.bytes4=d;exports.getDeployedContractAddress=u;
|
|
2
|
+
//# sourceMappingURL=utils.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.cjs","sources":["../src/utils.ts"],"sourcesContent":["import {\n type Config,\n type ReadContractParameters,\n type WatchContractEventParameters,\n type WriteContractParameters,\n waitForTransactionReceipt,\n} from '@wagmi/core';\nimport type { ExtractAbiEvent } from 'abitype';\nimport type {\n Abi,\n AbiEvent,\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 { NoContractAddressUponReceiptError } from './errors';\n\nexport type Overwrite<T, U> = Pick<T, Exclude<keyof T, keyof U>> & U;\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<\n abi extends Abi,\n functionName extends ContractFunctionName<abi>,\n> = Partial<\n Omit<\n WriteContractParameters<abi, functionName>,\n 'address' | 'args' | 'functionName' | 'abi'\n >\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<\n abi extends Abi,\n functionName extends ContractFunctionName<abi>,\n> = Partial<\n Omit<\n ReadContractParameters<abi, functionName>,\n 'address' | 'args' | 'functionName' | 'abi'\n >\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 {unknown}\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 * 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"],"names":["bytes4","input","slice","isHex","keccak256","toHex","getDeployedContractAddress","config","hash","waitParams","receipt","waitForTransactionReceipt","NoContractAddressUponReceiptError","awaitResult","hashPromise","result","RegistryType"],"mappings":"2JA2HO,SAASA,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,CAQY,IAAAC,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"}
|
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { type Config, type ReadContractParameters, type WatchContractEventParameters, type WriteContractParameters } from '@wagmi/core';
|
|
2
|
+
import type { ExtractAbiEvent } from 'abitype';
|
|
3
|
+
import type { Abi, AbiEvent, ContractEventName, ContractFunctionName, GetLogsParameters, Hash, Log, WaitForTransactionReceiptParameters } from 'viem';
|
|
4
|
+
export type Overwrite<T, U> = Pick<T, Exclude<keyof T, keyof U>> & U;
|
|
5
|
+
/**
|
|
6
|
+
* Helper type that encapsulates common writeContract parameters without fields like `abi`, `args`, `functionName`, `address` that are expected to be provided the SDK.
|
|
7
|
+
* See (writeContract)[https://viem.sh/docs/contract/writeContract]
|
|
8
|
+
*
|
|
9
|
+
* @export
|
|
10
|
+
* @typedef {WriteParams}
|
|
11
|
+
* @template {Abi} abi
|
|
12
|
+
* @template {ContractFunctionName<abi>} functionName
|
|
13
|
+
*/
|
|
14
|
+
export type WriteParams<abi extends Abi, functionName extends ContractFunctionName<abi>> = Partial<Omit<WriteContractParameters<abi, functionName>, 'address' | 'args' | 'functionName' | 'abi'>>;
|
|
15
|
+
/**
|
|
16
|
+
* Helper type that encapsulates common readContract parameters without fields like `abi`, `args`, `functionName`, `address` that are expected to be provided the SDK.
|
|
17
|
+
* See (readContract)[https://viem.sh/docs/contract/readContract]
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
20
|
+
* @typedef {ReadParams}
|
|
21
|
+
* @template {Abi} abi
|
|
22
|
+
* @template {ContractFunctionName<abi>} functionName
|
|
23
|
+
*/
|
|
24
|
+
export type ReadParams<abi extends Abi, functionName extends ContractFunctionName<abi>> = Partial<Omit<ReadContractParameters<abi, functionName>, 'address' | 'args' | 'functionName' | 'abi'>>;
|
|
25
|
+
/**
|
|
26
|
+
* Helper type that encapsulates common `watchContractEvent` parameters without fields like `address`, and `abi` that are expected to be provided the SDK.
|
|
27
|
+
* See (watchContractEvent)[https://wagmi.sh/core/api/actions/watchContractEvent]
|
|
28
|
+
*
|
|
29
|
+
* @export
|
|
30
|
+
* @typedef {WatchParams}
|
|
31
|
+
* @template {Abi} abi
|
|
32
|
+
* @template {ContractEventName<abi> | undefined} [eventName=undefined]
|
|
33
|
+
*/
|
|
34
|
+
export type WatchParams<abi extends Abi, eventName extends ContractEventName<abi> | undefined = undefined> = Partial<Omit<WatchContractEventParameters<abi, eventName>, 'address' | 'abi'>>;
|
|
35
|
+
/**
|
|
36
|
+
* Helper type that encapsulates common `getLogs` parameters without fields like `address` that are expected to be provided the SDK.
|
|
37
|
+
* See (getLogs)[https://viem.sh/docs/actions/public/getLogs#getlogs]
|
|
38
|
+
*
|
|
39
|
+
* @export
|
|
40
|
+
* @typedef {GetLogsParams}
|
|
41
|
+
* @template {Abi} abi
|
|
42
|
+
* @template {ContractEventName<abi>} event
|
|
43
|
+
* @template {ExtractAbiEvent<abi, event>} [abiEvent=ExtractAbiEvent<abi, event>]
|
|
44
|
+
* @template {| readonly AbiEvent[]
|
|
45
|
+
* | readonly unknown[]
|
|
46
|
+
* | undefined} [abiEvents=abiEvent extends AbiEvent ? [abiEvent] : undefined]
|
|
47
|
+
*/
|
|
48
|
+
export type GetLogsParams<abi extends Abi, event extends ContractEventName<abi>, abiEvent extends ExtractAbiEvent<abi, event> = ExtractAbiEvent<abi, event>, abiEvents extends readonly AbiEvent[] | readonly unknown[] | undefined = abiEvent extends AbiEvent ? [abiEvent] : undefined> = Partial<Omit<GetLogsParameters<abiEvent, abiEvents>, 'address'>> & {
|
|
49
|
+
chainId?: number | undefined;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* A generic `viem.Log` event with typed `args` support via a given `Abi` and `ContractEventName`
|
|
53
|
+
*
|
|
54
|
+
* @export
|
|
55
|
+
* @typedef {GenericLog}
|
|
56
|
+
* @template {Abi} abi
|
|
57
|
+
* @template {ContractEventName<abi>} [event=ContractEventName<abi>]
|
|
58
|
+
*/
|
|
59
|
+
export type GenericLog<abi extends Abi, event extends ContractEventName<abi> = ContractEventName<abi>> = Log<bigint, number, false, ExtractAbiEvent<abi, event>, false>;
|
|
60
|
+
/**
|
|
61
|
+
* Helper utility to convert a string to a `bytes4` type
|
|
62
|
+
*
|
|
63
|
+
* @export
|
|
64
|
+
* @param {string} input
|
|
65
|
+
* @returns {Hex}
|
|
66
|
+
*/
|
|
67
|
+
export declare function bytes4(input: string): `0x${string}`;
|
|
68
|
+
/**
|
|
69
|
+
* Utility function to wait for a transaction receipt, and extract the contractAddress
|
|
70
|
+
*
|
|
71
|
+
* @export
|
|
72
|
+
* @async
|
|
73
|
+
* @param {WagmiConfig} config - [Wagmi Configuration](https://wagmi.sh/core/api/createConfig)
|
|
74
|
+
* @param {Promise<Hash>} hash - A transaction hash promise
|
|
75
|
+
* @param {?Omit<WaitForTransactionReceiptParameters, 'hash'>} [waitParams] - @see {@link WaitForTransactionReceiptParameters}
|
|
76
|
+
* @returns {unknown}
|
|
77
|
+
* @throws {@link NoContractAddressUponReceiptError} if no `contractAddress` exists after the transaction has been received
|
|
78
|
+
*/
|
|
79
|
+
export declare function getDeployedContractAddress(config: Config, hash: Promise<Hash>, waitParams?: Omit<WaitForTransactionReceiptParameters, 'hash'>): Promise<`0x${string}`>;
|
|
80
|
+
/**
|
|
81
|
+
* Utility type to encapsulate a transaction hash, and the simulated result prior to submitting the transaction.
|
|
82
|
+
*
|
|
83
|
+
* @export
|
|
84
|
+
* @typedef {HashAndSimulatedResult}
|
|
85
|
+
* @template [T=unknown]
|
|
86
|
+
*/
|
|
87
|
+
export type HashAndSimulatedResult<T = unknown> = {
|
|
88
|
+
hash: Hash;
|
|
89
|
+
result: T;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Helper function to wait for a transaction receipt given a hash promise.
|
|
93
|
+
*
|
|
94
|
+
* @export
|
|
95
|
+
* @async
|
|
96
|
+
* @template [Result=unknown]
|
|
97
|
+
* @param {WagmiConfig} config
|
|
98
|
+
* @param {Promise<HashAndSimulatedResult<Result>>} hashPromise
|
|
99
|
+
* @param {?Omit<WaitForTransactionReceiptParameters, 'hash'>} [waitParams]
|
|
100
|
+
* @returns {Promise<Result>}
|
|
101
|
+
*/
|
|
102
|
+
export declare function awaitResult<Result = unknown>(config: Config, hashPromise: Promise<HashAndSimulatedResult<Result>>, waitParams?: Omit<WaitForTransactionReceiptParameters, 'hash'>): Promise<Result>;
|
|
103
|
+
/**
|
|
104
|
+
* Enum encapsulating all the different types of targets used in the Boost V2 Protocol.
|
|
105
|
+
*
|
|
106
|
+
* @export
|
|
107
|
+
* @enum {number}
|
|
108
|
+
*/
|
|
109
|
+
export declare enum RegistryType {
|
|
110
|
+
ACTION = 0,
|
|
111
|
+
ALLOW_LIST = 1,
|
|
112
|
+
BUDGET = 2,
|
|
113
|
+
INCENTIVE = 3,
|
|
114
|
+
VALIDATOR = 4
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AA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