@boostxyz/sdk 0.0.0-alpha.7 → 0.0.0-alpha.9
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/dist/Actions/Action.cjs +1 -1
- package/dist/Actions/Action.js +1 -1
- package/dist/Actions/ContractAction.d.ts +46 -3
- package/dist/Actions/ContractAction.d.ts.map +1 -1
- package/dist/Actions/ERC721MintAction.d.ts +37 -10
- package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.cjs.map +1 -1
- package/dist/Actions/EventAction.d.ts +257 -11
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +249 -82
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.d.ts +2 -2
- package/dist/AllowLists/AllowList.js +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
- package/dist/AllowLists/SimpleAllowList.d.ts +33 -4
- package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleAllowList.js +52 -37
- package/dist/AllowLists/SimpleAllowList.js.map +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs.map +1 -1
- package/dist/AllowLists/SimpleDenyList.d.ts +31 -2
- package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleDenyList.js +41 -129
- package/dist/AllowLists/SimpleDenyList.js.map +1 -1
- package/dist/Auth/PassthroughAuth.cjs +1 -1
- package/dist/Auth/PassthroughAuth.cjs.map +1 -1
- package/dist/Auth/PassthroughAuth.js +4 -4
- package/dist/Auth/PassthroughAuth.js.map +1 -1
- package/dist/Boost.cjs +1 -1
- package/dist/Boost.cjs.map +1 -1
- package/dist/Boost.d.ts +93 -1
- package/dist/Boost.d.ts.map +1 -1
- package/dist/Boost.js +151 -5
- package/dist/Boost.js.map +1 -1
- package/dist/BoostCore.cjs +2 -2
- package/dist/BoostCore.cjs.map +1 -1
- package/dist/BoostCore.d.ts +45 -7
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +352 -305
- package/dist/BoostCore.js.map +1 -1
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.cjs.map +1 -1
- package/dist/BoostRegistry.d.ts +18 -4
- package/dist/BoostRegistry.d.ts.map +1 -1
- package/dist/BoostRegistry.js +36 -25
- package/dist/BoostRegistry.js.map +1 -1
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.js +1 -1
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.cjs.map +1 -1
- package/dist/Budgets/ManagedBudget.d.ts +40 -2
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
- package/dist/Budgets/ManagedBudget.js +53 -36
- package/dist/Budgets/ManagedBudget.js.map +1 -1
- package/dist/Budgets/SimpleBudget.d.ts +33 -2
- package/dist/Budgets/SimpleBudget.d.ts.map +1 -1
- package/dist/Budgets/VestingBudget.d.ts +54 -2
- package/dist/Budgets/VestingBudget.d.ts.map +1 -1
- package/dist/Deployable/Contract.cjs +1 -1
- package/dist/Deployable/Contract.cjs.map +1 -1
- package/dist/Deployable/Contract.js +1 -1
- package/dist/Deployable/Contract.js.map +1 -1
- package/dist/Deployable/Deployable.cjs.map +1 -1
- package/dist/Deployable/Deployable.d.ts +8 -2
- package/dist/Deployable/Deployable.d.ts.map +1 -1
- package/dist/Deployable/Deployable.js +6 -0
- package/dist/Deployable/Deployable.js.map +1 -1
- package/dist/Deployable/DeployableTarget.cjs +1 -1
- package/dist/Deployable/DeployableTarget.cjs.map +1 -1
- package/dist/Deployable/DeployableTarget.d.ts +4 -3
- package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
- package/dist/Deployable/DeployableTarget.js +31 -28
- package/dist/Deployable/DeployableTarget.js.map +1 -1
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
- package/dist/Incentives/AllowListIncentive.d.ts +35 -5
- package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
- package/dist/Incentives/AllowListIncentive.js +33 -21
- package/dist/Incentives/AllowListIncentive.js.map +1 -1
- package/dist/Incentives/CGDAIncentive.cjs +1 -1
- package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
- package/dist/Incentives/CGDAIncentive.d.ts +89 -5
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
- package/dist/Incentives/CGDAIncentive.js +44 -23
- package/dist/Incentives/CGDAIncentive.js.map +1 -1
- package/dist/Incentives/ERC1155Incentive.d.ts +67 -6
- package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.cjs +1 -1
- package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
- package/dist/Incentives/ERC20Incentive.d.ts +49 -5
- package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.js +46 -27
- package/dist/Incentives/ERC20Incentive.js.map +1 -1
- package/dist/Incentives/ERC20VariableIncentive.d.ts +42 -5
- package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.cjs.map +1 -1
- package/dist/Incentives/Incentive.js +48 -32
- package/dist/Incentives/Incentive.js.map +1 -1
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.cjs.map +1 -1
- package/dist/Incentives/PointsIncentive.d.ts +49 -5
- package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
- package/dist/Incentives/PointsIncentive.js +38 -21
- package/dist/Incentives/PointsIncentive.js.map +1 -1
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.cjs.map +1 -1
- package/dist/Validators/SignerValidator.d.ts +298 -5
- package/dist/Validators/SignerValidator.d.ts.map +1 -1
- package/dist/Validators/SignerValidator.js +151 -26
- package/dist/Validators/SignerValidator.js.map +1 -1
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.js +1 -1
- 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/errors.cjs +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +15 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +30 -21
- package/dist/errors.js.map +1 -1
- package/dist/{generated-DGpIVcv5.js → generated-57_Kffpz.js} +293 -282
- package/dist/generated-57_Kffpz.js.map +1 -0
- package/dist/{generated-Cd-Fe7W7.cjs → generated-wKBNvm48.cjs} +3 -3
- package/dist/generated-wKBNvm48.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +108 -124
- 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 +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.ts +2 -1371
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +26 -653
- package/dist/utils.js.map +1 -1
- package/package.json +17 -3
- package/src/Actions/Action.test.ts +5 -4
- package/src/Actions/ContractAction.test.ts +4 -6
- package/src/Actions/ContractAction.ts +73 -10
- package/src/Actions/ERC721MintAction.test.ts +2 -2
- package/src/Actions/ERC721MintAction.ts +70 -16
- package/src/Actions/EventAction.test.ts +43 -17
- package/src/Actions/EventAction.ts +451 -26
- package/src/AllowLists/SimpleAllowList.ts +51 -7
- package/src/AllowLists/SimpleDenyList.ts +47 -109
- package/src/Auth/PassthroughAuth.ts +1 -1
- package/src/Boost.ts +136 -1
- package/src/BoostCore.test.ts +4 -11
- package/src/BoostCore.ts +114 -45
- package/src/BoostRegistry.ts +39 -21
- package/src/Budgets/ManagedBudget.ts +69 -16
- package/src/Budgets/SimpleBudget.ts +57 -14
- package/src/Budgets/VestingBudget.ts +79 -9
- package/src/Deployable/Contract.ts +1 -1
- package/src/Deployable/Deployable.ts +8 -2
- package/src/Deployable/DeployableTarget.ts +19 -6
- package/src/Incentives/AllowListIncentive.test.ts +2 -5
- package/src/Incentives/AllowListIncentive.ts +59 -15
- package/src/Incentives/CGDAIncentive.test.ts +3 -7
- package/src/Incentives/CGDAIncentive.ts +123 -19
- package/src/Incentives/ERC1155Incentive.test.ts +2 -13
- package/src/Incentives/ERC1155Incentive.ts +104 -22
- package/src/Incentives/ERC20Incentive.test.ts +6 -17
- package/src/Incentives/ERC20Incentive.ts +86 -21
- package/src/Incentives/ERC20VariableIncentive.test.ts +4 -24
- package/src/Incentives/ERC20VariableIncentive.ts +71 -19
- package/src/Incentives/Incentive.test.ts +1 -1
- package/src/Incentives/PointsIncentive.test.ts +3 -6
- package/src/Incentives/PointsIncentive.ts +79 -17
- package/src/Validators/SignerValidator.test.ts +3 -7
- package/src/Validators/SignerValidator.ts +422 -13
- package/src/claiming.ts +56 -0
- package/src/errors.ts +19 -1
- package/src/index.ts +10 -7
- package/src/transfers.ts +284 -0
- package/src/utils.ts +3 -2052
- package/dist/generated-Cd-Fe7W7.cjs.map +0 -1
- package/dist/generated-DGpIVcv5.js.map +0 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { A as c, Y as r, Z as
|
|
1
|
+
import { A as c, Y as r, Z as o, a0 as n, a1 as l, a2 as h, a3 as u, a4 as m, a5 as p, a6 as g } from "../generated-57_Kffpz.js";
|
|
2
|
+
import { encodeAbiParameters as y } from "viem";
|
|
2
3
|
import "@wagmi/core";
|
|
3
|
-
import "
|
|
4
|
-
import { SimpleAllowList as p } from "../AllowLists/SimpleAllowList.js";
|
|
4
|
+
import { SimpleAllowList as w } from "../AllowLists/SimpleAllowList.js";
|
|
5
5
|
import "../AllowLists/SimpleDenyList.js";
|
|
6
|
-
import { DeployableTarget as
|
|
7
|
-
import {
|
|
8
|
-
const V = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b611791806100bd5f395ff3fe60806040526004361061011e575f3560e01c806387b9d25c1161009f578063db09da1211610063578063db09da1214610390578063dcc59b6f146103cc578063f04e283e146103f6578063f2fde38b14610412578063fee81cf41461042e5761011e565b806387b9d25c1461029a5780638da5cb5b146102c4578063a4d66daf146102ee578063bb1757cf14610318578063c884ef83146103545761011e565b8063439fab91116100e6578063439fab91146101e6578063474f5a441461020e5780634e7165a21461024a57806354d1f13d14610286578063715018a6146102905761011e565b806301ffc9a71461012257806307621eca1461015e578063228cb7331461018857806325692962146101b257806328d6183b146101bc575b5f80fd5b34801561012d575f80fd5b5061014860048036038101906101439190610fa9565b61046a565b6040516101559190610fee565b60405180910390f35b348015610169575f80fd5b506101726104e3565b60405161017f919061101f565b60405180910390f35b348015610193575f80fd5b5061019c6104ec565b6040516101a9919061101f565b60405180910390f35b6101ba6104f2565b005b3480156101c7575f80fd5b506101d0610543565b6040516101dd9190611047565b60405180910390f35b3480156101f1575f80fd5b5061020c600480360381019061020791906110c1565b61056a565b005b348015610219575f80fd5b50610234600480360381019061022f91906110c1565b61064a565b6040516102419190610fee565b60405180910390f35b348015610255575f80fd5b50610270600480360381019061026b91906110c1565b61067d565b60405161027d919061117c565b60405180910390f35b61028e6106d4565b005b61029861070d565b005b3480156102a5575f80fd5b506102ae610720565b6040516102bb9190611216565b60405180910390f35b3480156102cf575f80fd5b506102d8610745565b6040516102e5919061124f565b60405180910390f35b3480156102f9575f80fd5b5061030261076d565b60405161030f919061101f565b60405180910390f35b348015610323575f80fd5b5061033e60048036038101906103399190611292565b610773565b60405161034b9190610fee565b60405180910390f35b34801561035f575f80fd5b5061037a600480360381019061037591906112ef565b610918565b6040516103879190610fee565b60405180910390f35b34801561039b575f80fd5b506103b660048036038101906103b19190611292565b610935565b6040516103c39190610fee565b60405180910390f35b3480156103d7575f80fd5b506103e0610a3a565b6040516103ed919061101f565b60405180910390f35b610410600480360381019061040b91906112ef565b610a3f565b005b61042c600480360381019061042791906112ef565b610a7d565b005b348015610439575f80fd5b50610454600480360381019061044f91906112ef565b610aa6565b604051610461919061101f565b60405180910390f35b5f7f0a466e6f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806104dc57506104db82610abf565b5b9050919050565b5f600154905090565b60015481565b5f6104fb610b38565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7f0a466e6f00000000000000000000000000000000000000000000000000000000905090565b5f610573610b42565b905080546003825580156105a55760018160011c14303b1061059c5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f83838101906105b69190611448565b90506105c133610b6b565b805f015160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060200151600481905550508015610645576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f6040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60605f67ffffffffffffffff8111156106995761069861131e565b5b6040519080825280601f01601f1916602001820160405280156106cb5781602001600182028036833780820191505090505b50905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610715610c41565b61071e5f610c78565b565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b60045481565b5f61077c610c41565b6004545f80815480929190610790906114a0565b919050551015806107e7575060025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff165b1561081e576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505f8061087e86610d3e565b9150915060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633abb060483836040518363ffffffff1660e01b81526004016108de929190611655565b5f604051808303815f87803b1580156108f5575f80fd5b505af1158015610907573d5f803e3d5ffd5b505050506001925050509392505050565b6002602052805f5260405f205f915054906101000a900460ff1681565b5f6004545f5410801561098f575060025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b8015610a31575060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e3f756de856040518263ffffffff1660e01b81526004016109f091906116ad565b602060405180830381865afa158015610a0b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a2f9190611703565b155b90509392505050565b5f5481565b610a47610c41565b63389a75e1600c52805f526020600c208054421115610a6d57636f5e88185f526004601cfd5b5f815550610a7a81610c78565b50565b610a85610c41565b8060601b610a9a57637448fbae5f526004601cfd5b610aa381610c78565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7f5970a689000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b315750610b3082610e5d565b5b9050919050565b5f6202a300905090565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610b73610ed6565b15610beb577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610bad57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610c3e565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610c76576382b429005f526004601cfd5b565b610c80610ed6565b15610ce5577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550610d3b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b6060805f600167ffffffffffffffff811115610d5d57610d5c61131e565b5b604051908082528060200260200182016040528015610d8b5781602001602082028036833780820191505090505b5090505f600167ffffffffffffffff811115610daa57610da961131e565b5b604051908082528060200260200182016040528015610dd85781602001602082028036833780820191505090505b50905084825f81518110610def57610dee61172e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001815f81518110610e3e57610e3d61172e565b5b6020026020010190151590811515815250508181935093505050915091565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610ecf5750610ece82610eda565b5b9050919050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610f8881610f54565b8114610f92575f80fd5b50565b5f81359050610fa381610f7f565b92915050565b5f60208284031215610fbe57610fbd610f4c565b5b5f610fcb84828501610f95565b91505092915050565b5f8115159050919050565b610fe881610fd4565b82525050565b5f6020820190506110015f830184610fdf565b92915050565b5f819050919050565b61101981611007565b82525050565b5f6020820190506110325f830184611010565b92915050565b61104181610f54565b82525050565b5f60208201905061105a5f830184611038565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261108157611080611060565b5b8235905067ffffffffffffffff81111561109e5761109d611064565b5b6020830191508360018202830111156110ba576110b9611068565b5b9250929050565b5f80602083850312156110d7576110d6610f4c565b5b5f83013567ffffffffffffffff8111156110f4576110f3610f50565b5b6111008582860161106c565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61114e8261110c565b6111588185611116565b9350611168818560208601611126565b61117181611134565b840191505092915050565b5f6020820190508181035f8301526111948184611144565b905092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f6111de6111d96111d48461119c565b6111bb565b61119c565b9050919050565b5f6111ef826111c4565b9050919050565b5f611200826111e5565b9050919050565b611210816111f6565b82525050565b5f6020820190506112295f830184611207565b92915050565b5f6112398261119c565b9050919050565b6112498161122f565b82525050565b5f6020820190506112625f830184611240565b92915050565b6112718161122f565b811461127b575f80fd5b50565b5f8135905061128c81611268565b92915050565b5f805f604084860312156112a9576112a8610f4c565b5b5f6112b68682870161127e565b935050602084013567ffffffffffffffff8111156112d7576112d6610f50565b5b6112e38682870161106c565b92509250509250925092565b5f6020828403121561130457611303610f4c565b5b5f6113118482850161127e565b91505092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61135482611134565b810181811067ffffffffffffffff821117156113735761137261131e565b5b80604052505050565b5f611385610f43565b9050611391828261134b565b919050565b5f6113a08261122f565b9050919050565b6113b081611396565b81146113ba575f80fd5b50565b5f813590506113cb816113a7565b92915050565b6113da81611007565b81146113e4575f80fd5b50565b5f813590506113f5816113d1565b92915050565b5f604082840312156114105761140f61131a565b5b61141a604061137c565b90505f611429848285016113bd565b5f83015250602061143c848285016113e7565b60208301525092915050565b5f6040828403121561145d5761145c610f4c565b5b5f61146a848285016113fb565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6114aa82611007565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036114dc576114db611473565b5b600182019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6115198161122f565b82525050565b5f61152a8383611510565b60208301905092915050565b5f602082019050919050565b5f61154c826114e7565b61155681856114f1565b935061156183611501565b805f5b83811015611591578151611578888261151f565b975061158383611536565b925050600181019050611564565b5085935050505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6115d081610fd4565b82525050565b5f6115e183836115c7565b60208301905092915050565b5f602082019050919050565b5f6116038261159e565b61160d81856115a8565b9350611618836115b8565b805f5b8381101561164857815161162f88826115d6565b975061163a836115ed565b92505060018101905061161b565b5085935050505092915050565b5f6040820190508181035f83015261166d8185611542565b9050818103602083015261168181846115f9565b90509392505050565b50565b5f6116985f83611116565b91506116a38261168a565b5f82019050919050565b5f6040820190506116c05f830184611240565b81810360208301526116d18161168d565b905092915050565b6116e281610fd4565b81146116ec575f80fd5b50565b5f815190506116fd816116d9565b92915050565b5f6020828403121561171857611717610f4c565b5b5f611725848285016116ef565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffdfea26469706673582212208bc630e11c065de18b61496283ea93bb882211261a2de5178b91a410f78a5c9a64736f6c634300081a0033", a = class a extends y {
|
|
6
|
+
import { DeployableTarget as A } from "../Deployable/DeployableTarget.js";
|
|
7
|
+
import { prepareClaimPayload as s } from "../claiming.js";
|
|
8
|
+
import { RegistryType as V } from "../utils.js";
|
|
9
|
+
const _ = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b611791806100bd5f395ff3fe60806040526004361061011e575f3560e01c806387b9d25c1161009f578063db09da1211610063578063db09da1214610390578063dcc59b6f146103cc578063f04e283e146103f6578063f2fde38b14610412578063fee81cf41461042e5761011e565b806387b9d25c1461029a5780638da5cb5b146102c4578063a4d66daf146102ee578063bb1757cf14610318578063c884ef83146103545761011e565b8063439fab91116100e6578063439fab91146101e6578063474f5a441461020e5780634e7165a21461024a57806354d1f13d14610286578063715018a6146102905761011e565b806301ffc9a71461012257806307621eca1461015e578063228cb7331461018857806325692962146101b257806328d6183b146101bc575b5f80fd5b34801561012d575f80fd5b5061014860048036038101906101439190610fa9565b61046a565b6040516101559190610fee565b60405180910390f35b348015610169575f80fd5b506101726104e3565b60405161017f919061101f565b60405180910390f35b348015610193575f80fd5b5061019c6104ec565b6040516101a9919061101f565b60405180910390f35b6101ba6104f2565b005b3480156101c7575f80fd5b506101d0610543565b6040516101dd9190611047565b60405180910390f35b3480156101f1575f80fd5b5061020c600480360381019061020791906110c1565b61056a565b005b348015610219575f80fd5b50610234600480360381019061022f91906110c1565b61064a565b6040516102419190610fee565b60405180910390f35b348015610255575f80fd5b50610270600480360381019061026b91906110c1565b61067d565b60405161027d919061117c565b60405180910390f35b61028e6106d4565b005b61029861070d565b005b3480156102a5575f80fd5b506102ae610720565b6040516102bb9190611216565b60405180910390f35b3480156102cf575f80fd5b506102d8610745565b6040516102e5919061124f565b60405180910390f35b3480156102f9575f80fd5b5061030261076d565b60405161030f919061101f565b60405180910390f35b348015610323575f80fd5b5061033e60048036038101906103399190611292565b610773565b60405161034b9190610fee565b60405180910390f35b34801561035f575f80fd5b5061037a600480360381019061037591906112ef565b610918565b6040516103879190610fee565b60405180910390f35b34801561039b575f80fd5b506103b660048036038101906103b19190611292565b610935565b6040516103c39190610fee565b60405180910390f35b3480156103d7575f80fd5b506103e0610a3a565b6040516103ed919061101f565b60405180910390f35b610410600480360381019061040b91906112ef565b610a3f565b005b61042c600480360381019061042791906112ef565b610a7d565b005b348015610439575f80fd5b50610454600480360381019061044f91906112ef565b610aa6565b604051610461919061101f565b60405180910390f35b5f7f0a466e6f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806104dc57506104db82610abf565b5b9050919050565b5f600154905090565b60015481565b5f6104fb610b38565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7f0a466e6f00000000000000000000000000000000000000000000000000000000905090565b5f610573610b42565b905080546003825580156105a55760018160011c14303b1061059c5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f83838101906105b69190611448565b90506105c133610b6b565b805f015160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060200151600481905550508015610645576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f6040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60605f67ffffffffffffffff8111156106995761069861131e565b5b6040519080825280601f01601f1916602001820160405280156106cb5781602001600182028036833780820191505090505b50905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610715610c41565b61071e5f610c78565b565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b60045481565b5f61077c610c41565b6004545f80815480929190610790906114a0565b919050551015806107e7575060025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff165b1561081e576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505f8061087e86610d3e565b9150915060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633abb060483836040518363ffffffff1660e01b81526004016108de929190611655565b5f604051808303815f87803b1580156108f5575f80fd5b505af1158015610907573d5f803e3d5ffd5b505050506001925050509392505050565b6002602052805f5260405f205f915054906101000a900460ff1681565b5f6004545f5410801561098f575060025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b8015610a31575060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e3f756de856040518263ffffffff1660e01b81526004016109f091906116ad565b602060405180830381865afa158015610a0b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a2f9190611703565b155b90509392505050565b5f5481565b610a47610c41565b63389a75e1600c52805f526020600c208054421115610a6d57636f5e88185f526004601cfd5b5f815550610a7a81610c78565b50565b610a85610c41565b8060601b610a9a57637448fbae5f526004601cfd5b610aa381610c78565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7f5970a689000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b315750610b3082610e5d565b5b9050919050565b5f6202a300905090565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610b73610ed6565b15610beb577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610bad57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610c3e565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610c76576382b429005f526004601cfd5b565b610c80610ed6565b15610ce5577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550610d3b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b6060805f600167ffffffffffffffff811115610d5d57610d5c61131e565b5b604051908082528060200260200182016040528015610d8b5781602001602082028036833780820191505090505b5090505f600167ffffffffffffffff811115610daa57610da961131e565b5b604051908082528060200260200182016040528015610dd85781602001602082028036833780820191505090505b50905084825f81518110610def57610dee61172e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001815f81518110610e3e57610e3d61172e565b5b6020026020010190151590811515815250508181935093505050915091565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610ecf5750610ece82610eda565b5b9050919050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610f8881610f54565b8114610f92575f80fd5b50565b5f81359050610fa381610f7f565b92915050565b5f60208284031215610fbe57610fbd610f4c565b5b5f610fcb84828501610f95565b91505092915050565b5f8115159050919050565b610fe881610fd4565b82525050565b5f6020820190506110015f830184610fdf565b92915050565b5f819050919050565b61101981611007565b82525050565b5f6020820190506110325f830184611010565b92915050565b61104181610f54565b82525050565b5f60208201905061105a5f830184611038565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261108157611080611060565b5b8235905067ffffffffffffffff81111561109e5761109d611064565b5b6020830191508360018202830111156110ba576110b9611068565b5b9250929050565b5f80602083850312156110d7576110d6610f4c565b5b5f83013567ffffffffffffffff8111156110f4576110f3610f50565b5b6111008582860161106c565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61114e8261110c565b6111588185611116565b9350611168818560208601611126565b61117181611134565b840191505092915050565b5f6020820190508181035f8301526111948184611144565b905092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f6111de6111d96111d48461119c565b6111bb565b61119c565b9050919050565b5f6111ef826111c4565b9050919050565b5f611200826111e5565b9050919050565b611210816111f6565b82525050565b5f6020820190506112295f830184611207565b92915050565b5f6112398261119c565b9050919050565b6112498161122f565b82525050565b5f6020820190506112625f830184611240565b92915050565b6112718161122f565b811461127b575f80fd5b50565b5f8135905061128c81611268565b92915050565b5f805f604084860312156112a9576112a8610f4c565b5b5f6112b68682870161127e565b935050602084013567ffffffffffffffff8111156112d7576112d6610f50565b5b6112e38682870161106c565b92509250509250925092565b5f6020828403121561130457611303610f4c565b5b5f6113118482850161127e565b91505092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61135482611134565b810181811067ffffffffffffffff821117156113735761137261131e565b5b80604052505050565b5f611385610f43565b9050611391828261134b565b919050565b5f6113a08261122f565b9050919050565b6113b081611396565b81146113ba575f80fd5b50565b5f813590506113cb816113a7565b92915050565b6113da81611007565b81146113e4575f80fd5b50565b5f813590506113f5816113d1565b92915050565b5f604082840312156114105761140f61131a565b5b61141a604061137c565b90505f611429848285016113bd565b5f83015250602061143c848285016113e7565b60208301525092915050565b5f6040828403121561145d5761145c610f4c565b5b5f61146a848285016113fb565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6114aa82611007565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036114dc576114db611473565b5b600182019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6115198161122f565b82525050565b5f61152a8383611510565b60208301905092915050565b5f602082019050919050565b5f61154c826114e7565b61155681856114f1565b935061156183611501565b805f5b83811015611591578151611578888261151f565b975061158383611536565b925050600181019050611564565b5085935050505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6115d081610fd4565b82525050565b5f6115e183836115c7565b60208301905092915050565b5f602082019050919050565b5f6116038261159e565b61160d81856115a8565b9350611618836115b8565b805f5b8381101561164857815161162f88826115d6565b975061163a836115ed565b92505060018101905061161b565b5085935050505092915050565b5f6040820190508181035f83015261166d8185611542565b9050818103602083015261168181846115f9565b90509392505050565b50565b5f6116985f83611116565b91506116a38261168a565b5f82019050919050565b5f6040820190506116c05f830184611240565b81810360208301526116d18161168d565b905092915050565b6116e281610fd4565b81146116ec575f80fd5b50565b5f815190506116fd816116d9565b92915050565b5f6020828403121561171857611717610f4c565b5b5f611725848285016116ef565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffdfea26469706673582212208bc630e11c065de18b61496283ea93bb882211261a2de5178b91a410f78a5c9a64736f6c634300081a0033", a = class a extends A {
|
|
9
10
|
constructor() {
|
|
10
11
|
super(...arguments), this.abi = c;
|
|
11
12
|
}
|
|
@@ -18,7 +19,7 @@ const V = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
18
19
|
* @returns {unknown}
|
|
19
20
|
*/
|
|
20
21
|
async owner(f) {
|
|
21
|
-
return r(this._config, {
|
|
22
|
+
return await r(this._config, {
|
|
22
23
|
address: this.assertValidAddress(),
|
|
23
24
|
args: [],
|
|
24
25
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
@@ -34,7 +35,7 @@ const V = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
34
35
|
* @returns {Promise<bigint>}
|
|
35
36
|
*/
|
|
36
37
|
async claims(f) {
|
|
37
|
-
return
|
|
38
|
+
return await o(this._config, {
|
|
38
39
|
address: this.assertValidAddress(),
|
|
39
40
|
args: [],
|
|
40
41
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
@@ -50,7 +51,7 @@ const V = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
50
51
|
* @returns {Promise<bigint>}
|
|
51
52
|
*/
|
|
52
53
|
async reward(f) {
|
|
53
|
-
return
|
|
54
|
+
return await n(this._config, {
|
|
54
55
|
address: this.assertValidAddress(),
|
|
55
56
|
args: [],
|
|
56
57
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
@@ -67,7 +68,7 @@ const V = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
67
68
|
* @returns {Promise<boolean>}
|
|
68
69
|
*/
|
|
69
70
|
async claimed(f, b) {
|
|
70
|
-
return
|
|
71
|
+
return await l(this._config, {
|
|
71
72
|
address: this.assertValidAddress(),
|
|
72
73
|
args: [f],
|
|
73
74
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
@@ -83,12 +84,12 @@ const V = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
83
84
|
* @returns {Promise<SimpleAllowList>}
|
|
84
85
|
*/
|
|
85
86
|
async allowList(f) {
|
|
86
|
-
const b = await
|
|
87
|
+
const b = await h(this._config, {
|
|
87
88
|
address: this.assertValidAddress(),
|
|
88
89
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
89
90
|
...f
|
|
90
91
|
});
|
|
91
|
-
return new
|
|
92
|
+
return new w(
|
|
92
93
|
{ config: this._config, account: this._account },
|
|
93
94
|
b
|
|
94
95
|
);
|
|
@@ -102,7 +103,7 @@ const V = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
102
103
|
* @returns {unknown}
|
|
103
104
|
*/
|
|
104
105
|
async limit(f) {
|
|
105
|
-
return
|
|
106
|
+
return await u(this._config, {
|
|
106
107
|
address: this.assertValidAddress(),
|
|
107
108
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
108
109
|
...f
|
|
@@ -118,7 +119,7 @@ const V = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
118
119
|
* @returns {Promise<true>} - return true if successful, otherwise revert
|
|
119
120
|
*/
|
|
120
121
|
async claim(f, b) {
|
|
121
|
-
return this.awaitResult(this.claimRaw(f, b));
|
|
122
|
+
return await this.awaitResult(this.claimRaw(f, b));
|
|
122
123
|
}
|
|
123
124
|
/**
|
|
124
125
|
* Claim a slot on the {@link SimpleAllowList}
|
|
@@ -130,7 +131,7 @@ const V = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
130
131
|
* @returns {Promise<true>} - return true if successful, otherwise revert
|
|
131
132
|
*/
|
|
132
133
|
async claimRaw(f, b) {
|
|
133
|
-
const { request: e, result: d } = await
|
|
134
|
+
const { request: e, result: d } = await m(
|
|
134
135
|
this._config,
|
|
135
136
|
{
|
|
136
137
|
address: this.assertValidAddress(),
|
|
@@ -140,7 +141,7 @@ const V = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
140
141
|
...b
|
|
141
142
|
}
|
|
142
143
|
);
|
|
143
|
-
return { hash: await
|
|
144
|
+
return { hash: await p(this._config, e), result: d };
|
|
144
145
|
}
|
|
145
146
|
/**
|
|
146
147
|
* Check if an incentive is claimable
|
|
@@ -152,7 +153,7 @@ const V = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
152
153
|
* @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload
|
|
153
154
|
*/
|
|
154
155
|
async isClaimable(f, b) {
|
|
155
|
-
return
|
|
156
|
+
return await g(this._config, {
|
|
156
157
|
address: this.assertValidAddress(),
|
|
157
158
|
args: [s(f)],
|
|
158
159
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
@@ -174,16 +175,27 @@ const V = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
174
175
|
);
|
|
175
176
|
return {
|
|
176
177
|
abi: c,
|
|
177
|
-
bytecode:
|
|
178
|
-
args: [
|
|
178
|
+
bytecode: _,
|
|
179
|
+
args: [P(e)],
|
|
179
180
|
...this.optionallyAttachAccount(d.account)
|
|
180
181
|
};
|
|
181
182
|
}
|
|
182
183
|
};
|
|
183
|
-
a.base = "
|
|
184
|
+
a.base = "0x8d80dfac4927387E6819B76b850aF50d2E29835a", a.registryType = V.INCENTIVE;
|
|
184
185
|
let t = a;
|
|
186
|
+
const P = ({
|
|
187
|
+
allowList: i,
|
|
188
|
+
limit: f
|
|
189
|
+
}) => y(
|
|
190
|
+
[
|
|
191
|
+
{ type: "address", name: "allowList" },
|
|
192
|
+
{ type: "uint256", name: "limit" }
|
|
193
|
+
],
|
|
194
|
+
[i, f]
|
|
195
|
+
);
|
|
185
196
|
export {
|
|
186
197
|
t as AllowListIncentive,
|
|
187
|
-
c as allowListIncentiveAbi
|
|
198
|
+
c as allowListIncentiveAbi,
|
|
199
|
+
P as prepareAllowListIncentivePayload
|
|
188
200
|
};
|
|
189
201
|
//# sourceMappingURL=AllowListIncentive.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AllowListIncentive.js","sources":["../../src/Incentives/AllowListIncentive.ts"],"sourcesContent":["import {\n allowListIncentiveAbi,\n readAllowListIncentiveAllowList,\n readAllowListIncentiveClaimed,\n readAllowListIncentiveClaims,\n readAllowListIncentiveIsClaimable,\n readAllowListIncentiveLimit,\n readAllowListIncentiveOwner,\n readAllowListIncentiveReward,\n simulateAllowListIncentiveClaim,\n writeAllowListIncentiveClaim,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/AllowListIncentive.sol/AllowListIncentive.json';\nimport type { Address, ContractEventName, Hex } from 'viem';\nimport { SimpleAllowList } from '../AllowLists/AllowList';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport {\n type AllowListIncentivePayload,\n type ClaimPayload,\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n prepareAllowListIncentivePayload,\n prepareClaimPayload,\n} from '../utils';\n\nexport { allowListIncentiveAbi };\nexport type { AllowListIncentivePayload };\n\n/**\n * A generic `viem.Log` event with support for `AllowListIncentive` event types.\n *\n * @export\n * @typedef {AllowListIncentiveLog}\n * @template {ContractEventName<\n * typeof allowListIncentiveAbi\n * >} [event=ContractEventName<typeof allowListIncentiveAbi>]\n */\nexport type AllowListIncentiveLog<\n event extends ContractEventName<\n typeof allowListIncentiveAbi\n > = ContractEventName<typeof allowListIncentiveAbi>,\n> = GenericLog<typeof allowListIncentiveAbi, event>;\n\n/**\n * An incentive implementation that grants the claimer a slot on an {SimpleAllowList}\n * In order for any claim to be successful:\n * - The claimer must not already be on the allow list; and\n * - The maximum number of claims must not have been reached; and\n * - This contract must be authorized to modify the allow list\n *\n * @export\n * @class AllowListIncentive\n * @typedef {AllowListIncentive}\n * @extends {DeployableTarget<AllowListIncentivePayload>}\n */\nexport class AllowListIncentive extends DeployableTarget<\n AllowListIncentivePayload,\n typeof allowListIncentiveAbi\n> {\n public override readonly abi = allowListIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Address}\n */\n public static override base: Address = import.meta.env\n .VITE_ALLOWLIST_INCENTIVE_BASE;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.INCENTIVE;\n\n /**\n * The owner of the allowList\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'owner'>} [params]\n * @returns {unknown}\n */\n public async owner(\n params?: ReadParams<typeof allowListIncentiveAbi, 'owner'>,\n ) {\n return readAllowListIncentiveOwner(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'claims'>} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(\n params?: ReadParams<typeof allowListIncentiveAbi, 'claims'>,\n ) {\n return readAllowListIncentiveClaims(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The reward amount issued for each claim\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'reward'>} [params]\n * @returns {Promise<bigint>}\n */\n public async reward(\n params?: ReadParams<typeof allowListIncentiveAbi, 'reward'>,\n ) {\n return readAllowListIncentiveReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the claim status for a user\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'claimed'>} [params]\n * @returns {Promise<boolean>}\n */\n public async claimed(\n address: Address,\n params?: ReadParams<typeof allowListIncentiveAbi, 'claimed'>,\n ) {\n return readAllowListIncentiveClaimed(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The {@link SimpleAllowList} contract\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'allowList'>} [params]\n * @returns {Promise<SimpleAllowList>}\n */\n public async allowList(\n params?: ReadParams<typeof allowListIncentiveAbi, 'allowList'>,\n ): Promise<SimpleAllowList> {\n const address = await readAllowListIncentiveAllowList(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n return new SimpleAllowList(\n { config: this._config, account: this._account },\n address,\n );\n }\n\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'limit'>} [params]\n * @returns {unknown}\n */\n public async limit(\n params?: ReadParams<typeof allowListIncentiveAbi, 'limit'>,\n ) {\n return readAllowListIncentiveLimit(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Claim a slot on the {@link SimpleAllowList}\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?WriteParams<typeof allowListIncentiveAbi, 'claim'>} [params]\n * @returns {Promise<true>} - return true if successful, otherwise revert\n */\n public async claim(\n payload: Pick<ClaimPayload, 'target'>,\n params?: WriteParams<typeof allowListIncentiveAbi, 'claim'>,\n ) {\n return this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim a slot on the {@link SimpleAllowList}\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?WriteParams<typeof allowListIncentiveAbi, 'claim'>} [params]\n * @returns {Promise<true>} - return true if successful, otherwise revert\n */\n public async claimRaw(\n payload: Pick<ClaimPayload, 'target'>,\n params?: WriteParams<typeof allowListIncentiveAbi, 'claim'>,\n ) {\n const { request, result } = await simulateAllowListIncentiveClaim(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeAllowListIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'isClaimable'>} [params]\n * @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload\n */\n public async isClaimable(\n payload: Pick<ClaimPayload, 'target'>,\n params?: ReadParams<typeof allowListIncentiveAbi, 'isClaimable'>,\n ) {\n return readAllowListIncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?AllowListIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: AllowListIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: allowListIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [prepareAllowListIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n"],"names":["_AllowListIncentive","DeployableTarget","allowListIncentiveAbi","params","readAllowListIncentiveOwner","readAllowListIncentiveClaims","readAllowListIncentiveReward","address","readAllowListIncentiveClaimed","readAllowListIncentiveAllowList","SimpleAllowList","readAllowListIncentiveLimit","payload","request","result","simulateAllowListIncentiveClaim","prepareClaimPayload","writeAllowListIncentiveClaim","readAllowListIncentiveIsClaimable","_payload","_options","options","bytecode","prepareAllowListIncentivePayload","RegistryType","AllowListIncentive"],"mappings":";;;;;;;4qYA6DaA,IAAN,MAAMA,UAA2BC,EAGtC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA2B/B,MAAa,MACXC,GACA;AACO,WAAAC,EAA4B,KAAK,SAAS;AAAA,MAC/C,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAID;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,OACXA,GACA;AACO,WAAAE,EAA6B,KAAK,SAAS;AAAA,MAChD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAIF;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,OACXA,GACA;AACO,WAAAG,EAA6B,KAAK,SAAS;AAAA,MAChD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAIH;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAa,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AC;EACjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAa,YACXF,GACAT,GACA;AACO,WAAAe,EAAkC,KAAK,SAAS;AAAA,MACrD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAACF,EAAoBJ,CAAO,CAAC;AAAA;AAAA,MAEnC,GAAIT;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUgB,gBACdgB,GACAC,GACyB;AACzB,UAAM,CAACR,GAASS,CAAO,IAAI,KAAK;AAAA,MAC9BF;AAAA,MACAC;AAAA,IAAA;AAEK,WAAA;AAAA,MACL,KAAKlB;AAAAA,MACL,UAAAoB;AAAA,MACA,MAAM,CAACC,EAAiCX,CAAO,CAAC;AAAA,MAChD,GAAG,KAAK,wBAAwBS,EAAQ,OAAO;AAAA,IAAA;AAAA,EAEnD;AACF;AAxNyBrB,EAAA,OAAgB,8CASvCA,EAAuB,eAA6BwB,EAAa;AArB5D,IAAMC,IAANzB;"}
|
|
1
|
+
{"version":3,"file":"AllowListIncentive.js","sources":["../../src/Incentives/AllowListIncentive.ts"],"sourcesContent":["import {\n allowListIncentiveAbi,\n readAllowListIncentiveAllowList,\n readAllowListIncentiveClaimed,\n readAllowListIncentiveClaims,\n readAllowListIncentiveIsClaimable,\n readAllowListIncentiveLimit,\n readAllowListIncentiveOwner,\n readAllowListIncentiveReward,\n simulateAllowListIncentiveClaim,\n writeAllowListIncentiveClaim,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/AllowListIncentive.sol/AllowListIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n} from 'viem';\nimport { SimpleAllowList } from '../AllowLists/AllowList';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport { type ClaimPayload, prepareClaimPayload } from '../claiming';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { allowListIncentiveAbi };\n\n/**\n * The object representation of a `AllowListIncentive.InitPayload`\n *\n * @export\n * @interface AllowListIncentivePayload\n * @typedef {AllowListIncentivePayload}\n */\nexport interface AllowListIncentivePayload {\n /**\n * The address to the allowlist to add claimers to.\n *\n * @type {Address}\n */\n allowList: Address;\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @type {bigint}\n */\n limit: bigint;\n}\n\n/**\n * A generic `viem.Log` event with support for `AllowListIncentive` event types.\n *\n * @export\n * @typedef {AllowListIncentiveLog}\n * @template {ContractEventName<\n * typeof allowListIncentiveAbi\n * >} [event=ContractEventName<typeof allowListIncentiveAbi>]\n */\nexport type AllowListIncentiveLog<\n event extends ContractEventName<\n typeof allowListIncentiveAbi\n > = ContractEventName<typeof allowListIncentiveAbi>,\n> = GenericLog<typeof allowListIncentiveAbi, event>;\n\n/**\n * An incentive implementation that grants the claimer a slot on an {SimpleAllowList}\n * In order for any claim to be successful:\n * - The claimer must not already be on the allow list; and\n * - The maximum number of claims must not have been reached; and\n * - This contract must be authorized to modify the allow list\n *\n * @export\n * @class AllowListIncentive\n * @typedef {AllowListIncentive}\n * @extends {DeployableTarget<AllowListIncentivePayload>}\n */\nexport class AllowListIncentive extends DeployableTarget<\n AllowListIncentivePayload,\n typeof allowListIncentiveAbi\n> {\n public override readonly abi = allowListIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Address}\n */\n public static override base: Address = import.meta.env\n .VITE_ALLOWLIST_INCENTIVE_BASE;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.INCENTIVE;\n\n /**\n * The owner of the allowList\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'owner'>} [params]\n * @returns {unknown}\n */\n public async owner(\n params?: ReadParams<typeof allowListIncentiveAbi, 'owner'>,\n ) {\n return await readAllowListIncentiveOwner(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'claims'>} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(\n params?: ReadParams<typeof allowListIncentiveAbi, 'claims'>,\n ) {\n return await readAllowListIncentiveClaims(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The reward amount issued for each claim\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'reward'>} [params]\n * @returns {Promise<bigint>}\n */\n public async reward(\n params?: ReadParams<typeof allowListIncentiveAbi, 'reward'>,\n ) {\n return await readAllowListIncentiveReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the claim status for a user\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'claimed'>} [params]\n * @returns {Promise<boolean>}\n */\n public async claimed(\n address: Address,\n params?: ReadParams<typeof allowListIncentiveAbi, 'claimed'>,\n ) {\n return await readAllowListIncentiveClaimed(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The {@link SimpleAllowList} contract\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'allowList'>} [params]\n * @returns {Promise<SimpleAllowList>}\n */\n public async allowList(\n params?: ReadParams<typeof allowListIncentiveAbi, 'allowList'>,\n ): Promise<SimpleAllowList> {\n const address = await readAllowListIncentiveAllowList(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n return new SimpleAllowList(\n { config: this._config, account: this._account },\n address,\n );\n }\n\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'limit'>} [params]\n * @returns {unknown}\n */\n public async limit(\n params?: ReadParams<typeof allowListIncentiveAbi, 'limit'>,\n ) {\n return await readAllowListIncentiveLimit(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Claim a slot on the {@link SimpleAllowList}\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?WriteParams<typeof allowListIncentiveAbi, 'claim'>} [params]\n * @returns {Promise<true>} - return true if successful, otherwise revert\n */\n protected async claim(\n payload: Pick<ClaimPayload, 'target'>,\n params?: WriteParams<typeof allowListIncentiveAbi, 'claim'>,\n ) {\n return await this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim a slot on the {@link SimpleAllowList}\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?WriteParams<typeof allowListIncentiveAbi, 'claim'>} [params]\n * @returns {Promise<true>} - return true if successful, otherwise revert\n */\n protected async claimRaw(\n payload: Pick<ClaimPayload, 'target'>,\n params?: WriteParams<typeof allowListIncentiveAbi, 'claim'>,\n ) {\n const { request, result } = await simulateAllowListIncentiveClaim(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeAllowListIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'isClaimable'>} [params]\n * @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload\n */\n public async isClaimable(\n payload: Pick<ClaimPayload, 'target'>,\n params?: ReadParams<typeof allowListIncentiveAbi, 'isClaimable'>,\n ) {\n return await readAllowListIncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?AllowListIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: AllowListIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: allowListIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [prepareAllowListIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Given a {@link AllowListIncentivePayload}, properly encode a `AllowListIncentive.InitPayload` for use with {@link AllowListIncentive} initialization.\n *\n * @param {AllowListIncentivePayload} param0\n * @param {Address} param0.allowList - The address to the allowlist to add claimers to.\n * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)\n * @returns {Hex}\n */\nexport const prepareAllowListIncentivePayload = ({\n allowList,\n limit,\n}: AllowListIncentivePayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'allowList' },\n { type: 'uint256', name: 'limit' },\n ],\n [allowList, limit],\n );\n};\n"],"names":["_AllowListIncentive","DeployableTarget","allowListIncentiveAbi","params","readAllowListIncentiveOwner","readAllowListIncentiveClaims","readAllowListIncentiveReward","address","readAllowListIncentiveClaimed","readAllowListIncentiveAllowList","SimpleAllowList","readAllowListIncentiveLimit","payload","request","result","simulateAllowListIncentiveClaim","prepareClaimPayload","writeAllowListIncentiveClaim","readAllowListIncentiveIsClaimable","_payload","_options","options","bytecode","prepareAllowListIncentivePayload","RegistryType","AllowListIncentive","allowList","limit","encodeAbiParameters"],"mappings":";;;;;;;;4qYAoFaA,IAAN,MAAMA,UAA2BC,EAGtC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA2B/B,MAAa,MACXC,GACA;AACO,WAAA,MAAMC,EAA4B,KAAK,SAAS;AAAA,MACrD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAID;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,OACXA,GACA;AACO,WAAA,MAAME,EAA6B,KAAK,SAAS;AAAA,MACtD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAIF;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,OACXA,GACA;AACO,WAAA,MAAMG,EAA6B,KAAK,SAAS;AAAA,MACtD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAIH;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAa,QACXI,GACAJ,GACA;AACO,WAAA,MAAMK,EAA8B,KAAK,SAAS;AAAA,MACvD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAACD,CA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GACA;AACO,WAAA,MAAMe,EAAkC,KAAK,SAAS;AAAA,MAC3D,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAACF,EAAoBJ,CAAO,CAAC;AAAA;AAAA,MAEnC,GAAIT;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUgB,gBACdgB,GACAC,GACyB;AACzB,UAAM,CAACR,GAASS,CAAO,IAAI,KAAK;AAAA,MAC9BF;AAAA,MACAC;AAAA,IAAA;AAEK,WAAA;AAAA,MACL,KAAKlB;AAAAA,MACL,UAAAoB;AAAA,MACA,MAAM,CAACC,EAAiCX,CAAO,CAAC;AAAA,MAChD,GAAG,KAAK,wBAAwBS,EAAQ,OAAO;AAAA,IAAA;AAAA,EAEnD;AACF;AAxNyBrB,EAAA,OAAgB,8CASvCA,EAAuB,eAA6BwB,EAAa;AArB5D,IAAMC,IAANzB;AA8OA,MAAMuB,IAAmC,CAAC;AAAA,EAC/C,WAAAG;AAAA,EACA,OAAAC;AACF,MACSC;AAAA,EACL;AAAA,IACE,EAAE,MAAM,WAAW,MAAM,YAAY;AAAA,IACrC,EAAE,MAAM,WAAW,MAAM,QAAQ;AAAA,EACnC;AAAA,EACA,CAACF,GAAWC,CAAK;AAAA;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../generated-Cd-Fe7W7.cjs"),i=require("../Deployable/DeployableTarget.cjs"),c=require("../utils.cjs"),n="0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b611cb4806100bd5f395ff3fe608060405260043610610129575f3560e01c8063715018a6116100aa578063c884ef831161006e578063c884ef831461038c578063db09da12146103c8578063dcc59b6f14610404578063f04e283e1461042e578063f2fde38b1461044a578063fee81cf41461046657610129565b8063715018a6146102c557806375ef18d0146102cf5780638da5cb5b146102fc578063bb1757cf14610326578063c78da39a1461036257610129565b806338d52e0f116100f157806338d52e0f146101f1578063439fab911461021b578063474f5a44146102435780634e7165a21461027f57806354d1f13d146102bb57610129565b806301ffc9a71461012d57806307621eca14610169578063228cb7331461019357806325692962146101bd57806328d6183b146101c7575b5f80fd5b348015610138575f80fd5b50610153600480360381019061014e9190611267565b6104a2565b60405161016091906112ac565b60405180910390f35b348015610174575f80fd5b5061017d61051b565b60405161018a91906112dd565b60405180910390f35b34801561019e575f80fd5b506101a76105c5565b6040516101b491906112dd565b60405180910390f35b6101c56105cb565b005b3480156101d2575f80fd5b506101db61061c565b6040516101e89190611305565b60405180910390f35b3480156101fc575f80fd5b50610205610643565b604051610212919061135d565b60405180910390f35b348015610226575f80fd5b50610241600480360381019061023c91906113d7565b610668565b005b34801561024e575f80fd5b50610269600480360381019061026491906113d7565b610890565b60405161027691906112ac565b60405180910390f35b34801561028a575f80fd5b506102a560048036038101906102a091906113d7565b6109b9565b6040516102b29190611492565b60405180910390f35b6102c3610a89565b005b6102cd610ac2565b005b3480156102da575f80fd5b506102e3610ad5565b6040516102f394939291906114b2565b60405180910390f35b348015610307575f80fd5b50610310610af2565b60405161031d919061135d565b60405180910390f35b348015610331575f80fd5b5061034c6004803603810190610347919061151f565b610b1a565b60405161035991906112ac565b60405180910390f35b34801561036d575f80fd5b50610376610ca6565b60405161038391906112dd565b60405180910390f35b348015610397575f80fd5b506103b260048036038101906103ad919061157c565b610cac565b6040516103bf91906112ac565b60405180910390f35b3480156103d3575f80fd5b506103ee60048036038101906103e9919061151f565b610cc9565b6040516103fb91906112ac565b60405180910390f35b34801561040f575f80fd5b50610418610cdc565b60405161042591906112dd565b60405180910390f35b6104486004803603810190610443919061157c565b610ce1565b005b610464600480360381019061045f919061157c565b610d1f565b005b348015610471575f80fd5b5061048c6004803603810190610487919061157c565b610d48565b60405161049991906112dd565b60405180910390f35b5f7fa39e44d9000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610514575061051382610d61565b5b9050919050565b5f806004600201544261052e91906115d4565b90505f61057b3060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dda90919063ffffffff16565b90505f610e10600460010154846105929190611607565b61059c9190611675565b6004600301546105ac91906116a5565b90508181116105bb57806105bd565b815b935050505090565b60015481565b5f6105d4610e0d565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7fa39e44d900000000000000000000000000000000000000000000000000000000905090565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f610671610e17565b905080546003825580156106a35760018160011c14303b1061069a5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f83838101906106b4919061180b565b90505f6106e330835f015173ffffffffffffffffffffffffffffffffffffffff16610dda90919063ffffffff16565b9050816080015181101561073957815f01518183608001516040517f5c54305e00000000000000000000000000000000000000000000000000000000815260040161073093929190611836565b60405180910390fd5b5f8260200151148061074e57505f8260400151145b8061075c57505f8260600151145b8061076e575081602001518260800151105b156107a5576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815f015160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060405180608001604052808360400151815260200183606001518152602001428152602001836020015181525060045f820151815f0155602082015181600101556040820151816002015560608201518160030155905050816080015160088190555061085433610e40565b5050801561088b576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f610899610f16565b5f83838101906108a99190611984565b90505f81602001518060200190518101906108c491906119df565b9050610915825f01518260035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f4d9092919063ffffffff16565b815f015173ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d360035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16845f01518460405160200161098993929190611a6f565b6040516020818303038152906040526040516109a59190611492565b60405180910390a260019250505092915050565b60605f83838101906109cb919061180b565b90506040518060800160405280600160028111156109ec576109eb611aab565b5b8152602001825f015173ffffffffffffffffffffffffffffffffffffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff16815260200160405180602001604052808460800151815250604051602001610a4f9190611b01565b604051602081830303815290604052815250604051602001610a719190611c17565b60405160208183030381529060405291505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610aca610f16565b610ad35f610f96565b565b6004805f0154908060010154908060020154908060030154905084565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b5f610b23610f16565b610b2c8461105c565b610b62576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80815480929190610b7390611c37565b91905055505f610b8161051b565b90504260046002018190555060045f01548111610ba25760045f0154610bb3565b60045f015481610bb291906115d4565b5b600460030181905550610c08858260035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f4d9092919063ffffffff16565b8473ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d360035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff168784604051602001610c7693929190611a6f565b604051602081830303815290604052604051610c929190611492565b60405180910390a260019150509392505050565b60085481565b6002602052805f5260405f205f915054906101000a900460ff1681565b5f610cd38461105c565b90509392505050565b5f5481565b610ce9610f16565b63389a75e1600c52805f526020600c208054421115610d0f57636f5e88185f526004601cfd5b5f815550610d1c81610f96565b50565b610d27610f16565b8060601b610d3c57637448fbae5f526004601cfd5b610d4581610f96565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7f5970a689000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610dd35750610dd28261111b565b5b9050919050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b5f6202a300905090565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610e48611194565b15610ec0577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610e8257630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610f13565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610f4b576382b429005f526004601cfd5b565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af13d1560015f51141716610f8d576390b8ec185f526004601cfd5b5f603452505050565b610f9e611194565b15611003577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550611059565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f8061106661051b565b90505f811180156110c05750806110bd3060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dda90919063ffffffff16565b10155b8015611113575060025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b915050919050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061118d575061118c82611198565b5b9050919050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61124681611212565b8114611250575f80fd5b50565b5f813590506112618161123d565b92915050565b5f6020828403121561127c5761127b61120a565b5b5f61128984828501611253565b91505092915050565b5f8115159050919050565b6112a681611292565b82525050565b5f6020820190506112bf5f83018461129d565b92915050565b5f819050919050565b6112d7816112c5565b82525050565b5f6020820190506112f05f8301846112ce565b92915050565b6112ff81611212565b82525050565b5f6020820190506113185f8301846112f6565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6113478261131e565b9050919050565b6113578161133d565b82525050565b5f6020820190506113705f83018461134e565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261139757611396611376565b5b8235905067ffffffffffffffff8111156113b4576113b361137a565b5b6020830191508360018202830111156113d0576113cf61137e565b5b9250929050565b5f80602083850312156113ed576113ec61120a565b5b5f83013567ffffffffffffffff81111561140a5761140961120e565b5b61141685828601611382565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61146482611422565b61146e818561142c565b935061147e81856020860161143c565b6114878161144a565b840191505092915050565b5f6020820190508181035f8301526114aa818461145a565b905092915050565b5f6080820190506114c55f8301876112ce565b6114d260208301866112ce565b6114df60408301856112ce565b6114ec60608301846112ce565b95945050505050565b6114fe8161133d565b8114611508575f80fd5b50565b5f81359050611519816114f5565b92915050565b5f805f604084860312156115365761153561120a565b5b5f6115438682870161150b565b935050602084013567ffffffffffffffff8111156115645761156361120e565b5b61157086828701611382565b92509250509250925092565b5f602082840312156115915761159061120a565b5b5f61159e8482850161150b565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6115de826112c5565b91506115e9836112c5565b9250828203905081811115611601576116006115a7565b5b92915050565b5f611611826112c5565b915061161c836112c5565b925082820261162a816112c5565b91508282048414831517611641576116406115a7565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f61167f826112c5565b915061168a836112c5565b92508261169a57611699611648565b5b828204905092915050565b5f6116af826112c5565b91506116ba836112c5565b92508282019050808211156116d2576116d16115a7565b5b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6117128261144a565b810181811067ffffffffffffffff82111715611731576117306116dc565b5b80604052505050565b5f611743611201565b905061174f8282611709565b919050565b5f80fd5b611761816112c5565b811461176b575f80fd5b50565b5f8135905061177c81611758565b92915050565b5f60a08284031215611797576117966116d8565b5b6117a160a061173a565b90505f6117b08482850161150b565b5f8301525060206117c38482850161176e565b60208301525060406117d78482850161176e565b60408301525060606117eb8482850161176e565b60608301525060806117ff8482850161176e565b60808301525092915050565b5f60a082840312156118205761181f61120a565b5b5f61182d84828501611782565b91505092915050565b5f6060820190506118495f83018661134e565b61185660208301856112ce565b61186360408301846112ce565b949350505050565b5f80fd5b5f67ffffffffffffffff821115611889576118886116dc565b5b6118928261144a565b9050602081019050919050565b828183375f83830152505050565b5f6118bf6118ba8461186f565b61173a565b9050828152602081018484840111156118db576118da61186b565b5b6118e684828561189f565b509392505050565b5f82601f83011261190257611901611376565b5b81356119128482602086016118ad565b91505092915050565b5f604082840312156119305761192f6116d8565b5b61193a604061173a565b90505f6119498482850161150b565b5f83015250602082013567ffffffffffffffff81111561196c5761196b611754565b5b611978848285016118ee565b60208301525092915050565b5f602082840312156119995761199861120a565b5b5f82013567ffffffffffffffff8111156119b6576119b561120e565b5b6119c28482850161191b565b91505092915050565b5f815190506119d981611758565b92915050565b5f602082840312156119f4576119f361120a565b5b5f611a01848285016119cb565b91505092915050565b5f8160601b9050919050565b5f611a2082611a0a565b9050919050565b5f611a3182611a16565b9050919050565b611a49611a448261133d565b611a27565b82525050565b5f819050919050565b611a69611a64826112c5565b611a4f565b82525050565b5f611a7a8286611a38565b601482019150611a8a8285611a38565b601482019150611a9a8284611a58565b602082019150819050949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b611ae1816112c5565b82525050565b602082015f820151611afb5f850182611ad8565b50505050565b5f602082019050611b145f830184611ae7565b92915050565b60038110611b2b57611b2a611aab565b5b50565b5f819050611b3b82611b1a565b919050565b5f611b4a82611b2e565b9050919050565b611b5a81611b40565b82525050565b611b698161133d565b82525050565b5f82825260208201905092915050565b5f611b8982611422565b611b938185611b6f565b9350611ba381856020860161143c565b611bac8161144a565b840191505092915050565b5f608083015f830151611bcc5f860182611b51565b506020830151611bdf6020860182611b60565b506040830151611bf26040860182611b60565b5060608301518482036060860152611c0a8282611b7f565b9150508091505092915050565b5f6020820190508181035f830152611c2f8184611bb7565b905092915050565b5f611c41826112c5565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611c7357611c726115a7565b5b60018201905091905056fea2646970667358221220f0478dd581ba0cfa3a9d6a7f556e0a4408663709607484acfcb56fa9be89d7cd64736f6c634300081a0033",s=class s extends i.DeployableTarget{constructor(){super(...arguments),this.abi=b.v}async owner(f){return b.Vy(this._config,{address:this.assertValidAddress(),args:[],...f})}async claims(f){return b.By(this._config,{address:this.assertValidAddress(),args:[],...f})}async reward(f){return b.Ly(this._config,{address:this.assertValidAddress(),args:[],...f})}async claimed(f,a){return b.zy(this._config,{address:this.assertValidAddress(),args:[f],...a})}async asset(f){return b.Ey(this._config,{address:this.assertValidAddress(),...f})}async cgdaParams(f){const[a,d,e,t]=await b.Ry(this._config,{address:this.assertValidAddress(),...f});return{rewardDecay:a,rewardBoost:d,lastClaimTime:e,currentReward:t}}async totalBudget(f){return b.Dy(this._config,{address:this.assertValidAddress(),...f})}async claim(f,a){return this.awaitResult(this.claimRaw(f,a))}async claimRaw(f,a){const{request:d,result:e}=await b.Xy(this._config,{address:this.assertValidAddress(),args:[c.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...a});return{hash:await b.Uy(this._config,d),result:e}}async clawback(f,a){return this.awaitResult(this.clawbackRaw(f,a))}async clawbackRaw(f,a){const{request:d,result:e}=await b.Yy(this._config,{address:this.assertValidAddress(),args:[c.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...a});return{hash:await b.Gy(this._config,d),result:e}}async isClaimable(f,a){return b.Hy(this._config,{address:this.assertValidAddress(),args:[c.prepareClaimPayload(f)],...a})}async currentReward(f){return b.xy(this._config,{address:this.assertValidAddress(),...f})}buildParameters(f,a){const[d,e]=this.validateDeploymentConfig(f,a);return{abi:b.v,bytecode:n,args:[c.prepareCGDAIncentivePayload(d)],...this.optionallyAttachAccount(e.account)}}};s.base="0x147c3aBFF7Ab7867B206A8c652Cd59D3BE41Dc3E",s.registryType=c.RegistryType.INCENTIVE;let r=s;exports.cgdaIncentiveAbi=b.v;exports.CGDAIncentive=r;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../generated-wKBNvm48.cjs"),o=require("viem"),l=require("../Deployable/DeployableTarget.cjs"),t=require("../claiming.cjs"),y=require("../utils.cjs"),u="0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b611cb4806100bd5f395ff3fe608060405260043610610129575f3560e01c8063715018a6116100aa578063c884ef831161006e578063c884ef831461038c578063db09da12146103c8578063dcc59b6f14610404578063f04e283e1461042e578063f2fde38b1461044a578063fee81cf41461046657610129565b8063715018a6146102c557806375ef18d0146102cf5780638da5cb5b146102fc578063bb1757cf14610326578063c78da39a1461036257610129565b806338d52e0f116100f157806338d52e0f146101f1578063439fab911461021b578063474f5a44146102435780634e7165a21461027f57806354d1f13d146102bb57610129565b806301ffc9a71461012d57806307621eca14610169578063228cb7331461019357806325692962146101bd57806328d6183b146101c7575b5f80fd5b348015610138575f80fd5b50610153600480360381019061014e9190611267565b6104a2565b60405161016091906112ac565b60405180910390f35b348015610174575f80fd5b5061017d61051b565b60405161018a91906112dd565b60405180910390f35b34801561019e575f80fd5b506101a76105c5565b6040516101b491906112dd565b60405180910390f35b6101c56105cb565b005b3480156101d2575f80fd5b506101db61061c565b6040516101e89190611305565b60405180910390f35b3480156101fc575f80fd5b50610205610643565b604051610212919061135d565b60405180910390f35b348015610226575f80fd5b50610241600480360381019061023c91906113d7565b610668565b005b34801561024e575f80fd5b50610269600480360381019061026491906113d7565b610890565b60405161027691906112ac565b60405180910390f35b34801561028a575f80fd5b506102a560048036038101906102a091906113d7565b6109b9565b6040516102b29190611492565b60405180910390f35b6102c3610a89565b005b6102cd610ac2565b005b3480156102da575f80fd5b506102e3610ad5565b6040516102f394939291906114b2565b60405180910390f35b348015610307575f80fd5b50610310610af2565b60405161031d919061135d565b60405180910390f35b348015610331575f80fd5b5061034c6004803603810190610347919061151f565b610b1a565b60405161035991906112ac565b60405180910390f35b34801561036d575f80fd5b50610376610ca6565b60405161038391906112dd565b60405180910390f35b348015610397575f80fd5b506103b260048036038101906103ad919061157c565b610cac565b6040516103bf91906112ac565b60405180910390f35b3480156103d3575f80fd5b506103ee60048036038101906103e9919061151f565b610cc9565b6040516103fb91906112ac565b60405180910390f35b34801561040f575f80fd5b50610418610cdc565b60405161042591906112dd565b60405180910390f35b6104486004803603810190610443919061157c565b610ce1565b005b610464600480360381019061045f919061157c565b610d1f565b005b348015610471575f80fd5b5061048c6004803603810190610487919061157c565b610d48565b60405161049991906112dd565b60405180910390f35b5f7fa39e44d9000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610514575061051382610d61565b5b9050919050565b5f806004600201544261052e91906115d4565b90505f61057b3060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dda90919063ffffffff16565b90505f610e10600460010154846105929190611607565b61059c9190611675565b6004600301546105ac91906116a5565b90508181116105bb57806105bd565b815b935050505090565b60015481565b5f6105d4610e0d565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7fa39e44d900000000000000000000000000000000000000000000000000000000905090565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f610671610e17565b905080546003825580156106a35760018160011c14303b1061069a5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f83838101906106b4919061180b565b90505f6106e330835f015173ffffffffffffffffffffffffffffffffffffffff16610dda90919063ffffffff16565b9050816080015181101561073957815f01518183608001516040517f5c54305e00000000000000000000000000000000000000000000000000000000815260040161073093929190611836565b60405180910390fd5b5f8260200151148061074e57505f8260400151145b8061075c57505f8260600151145b8061076e575081602001518260800151105b156107a5576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815f015160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060405180608001604052808360400151815260200183606001518152602001428152602001836020015181525060045f820151815f0155602082015181600101556040820151816002015560608201518160030155905050816080015160088190555061085433610e40565b5050801561088b576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f610899610f16565b5f83838101906108a99190611984565b90505f81602001518060200190518101906108c491906119df565b9050610915825f01518260035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f4d9092919063ffffffff16565b815f015173ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d360035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16845f01518460405160200161098993929190611a6f565b6040516020818303038152906040526040516109a59190611492565b60405180910390a260019250505092915050565b60605f83838101906109cb919061180b565b90506040518060800160405280600160028111156109ec576109eb611aab565b5b8152602001825f015173ffffffffffffffffffffffffffffffffffffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff16815260200160405180602001604052808460800151815250604051602001610a4f9190611b01565b604051602081830303815290604052815250604051602001610a719190611c17565b60405160208183030381529060405291505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610aca610f16565b610ad35f610f96565b565b6004805f0154908060010154908060020154908060030154905084565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b5f610b23610f16565b610b2c8461105c565b610b62576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80815480929190610b7390611c37565b91905055505f610b8161051b565b90504260046002018190555060045f01548111610ba25760045f0154610bb3565b60045f015481610bb291906115d4565b5b600460030181905550610c08858260035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f4d9092919063ffffffff16565b8473ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d360035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff168784604051602001610c7693929190611a6f565b604051602081830303815290604052604051610c929190611492565b60405180910390a260019150509392505050565b60085481565b6002602052805f5260405f205f915054906101000a900460ff1681565b5f610cd38461105c565b90509392505050565b5f5481565b610ce9610f16565b63389a75e1600c52805f526020600c208054421115610d0f57636f5e88185f526004601cfd5b5f815550610d1c81610f96565b50565b610d27610f16565b8060601b610d3c57637448fbae5f526004601cfd5b610d4581610f96565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7f5970a689000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610dd35750610dd28261111b565b5b9050919050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b5f6202a300905090565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610e48611194565b15610ec0577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610e8257630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610f13565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610f4b576382b429005f526004601cfd5b565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af13d1560015f51141716610f8d576390b8ec185f526004601cfd5b5f603452505050565b610f9e611194565b15611003577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550611059565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f8061106661051b565b90505f811180156110c05750806110bd3060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dda90919063ffffffff16565b10155b8015611113575060025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b915050919050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061118d575061118c82611198565b5b9050919050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61124681611212565b8114611250575f80fd5b50565b5f813590506112618161123d565b92915050565b5f6020828403121561127c5761127b61120a565b5b5f61128984828501611253565b91505092915050565b5f8115159050919050565b6112a681611292565b82525050565b5f6020820190506112bf5f83018461129d565b92915050565b5f819050919050565b6112d7816112c5565b82525050565b5f6020820190506112f05f8301846112ce565b92915050565b6112ff81611212565b82525050565b5f6020820190506113185f8301846112f6565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6113478261131e565b9050919050565b6113578161133d565b82525050565b5f6020820190506113705f83018461134e565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261139757611396611376565b5b8235905067ffffffffffffffff8111156113b4576113b361137a565b5b6020830191508360018202830111156113d0576113cf61137e565b5b9250929050565b5f80602083850312156113ed576113ec61120a565b5b5f83013567ffffffffffffffff81111561140a5761140961120e565b5b61141685828601611382565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61146482611422565b61146e818561142c565b935061147e81856020860161143c565b6114878161144a565b840191505092915050565b5f6020820190508181035f8301526114aa818461145a565b905092915050565b5f6080820190506114c55f8301876112ce565b6114d260208301866112ce565b6114df60408301856112ce565b6114ec60608301846112ce565b95945050505050565b6114fe8161133d565b8114611508575f80fd5b50565b5f81359050611519816114f5565b92915050565b5f805f604084860312156115365761153561120a565b5b5f6115438682870161150b565b935050602084013567ffffffffffffffff8111156115645761156361120e565b5b61157086828701611382565b92509250509250925092565b5f602082840312156115915761159061120a565b5b5f61159e8482850161150b565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6115de826112c5565b91506115e9836112c5565b9250828203905081811115611601576116006115a7565b5b92915050565b5f611611826112c5565b915061161c836112c5565b925082820261162a816112c5565b91508282048414831517611641576116406115a7565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f61167f826112c5565b915061168a836112c5565b92508261169a57611699611648565b5b828204905092915050565b5f6116af826112c5565b91506116ba836112c5565b92508282019050808211156116d2576116d16115a7565b5b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6117128261144a565b810181811067ffffffffffffffff82111715611731576117306116dc565b5b80604052505050565b5f611743611201565b905061174f8282611709565b919050565b5f80fd5b611761816112c5565b811461176b575f80fd5b50565b5f8135905061177c81611758565b92915050565b5f60a08284031215611797576117966116d8565b5b6117a160a061173a565b90505f6117b08482850161150b565b5f8301525060206117c38482850161176e565b60208301525060406117d78482850161176e565b60408301525060606117eb8482850161176e565b60608301525060806117ff8482850161176e565b60808301525092915050565b5f60a082840312156118205761181f61120a565b5b5f61182d84828501611782565b91505092915050565b5f6060820190506118495f83018661134e565b61185660208301856112ce565b61186360408301846112ce565b949350505050565b5f80fd5b5f67ffffffffffffffff821115611889576118886116dc565b5b6118928261144a565b9050602081019050919050565b828183375f83830152505050565b5f6118bf6118ba8461186f565b61173a565b9050828152602081018484840111156118db576118da61186b565b5b6118e684828561189f565b509392505050565b5f82601f83011261190257611901611376565b5b81356119128482602086016118ad565b91505092915050565b5f604082840312156119305761192f6116d8565b5b61193a604061173a565b90505f6119498482850161150b565b5f83015250602082013567ffffffffffffffff81111561196c5761196b611754565b5b611978848285016118ee565b60208301525092915050565b5f602082840312156119995761199861120a565b5b5f82013567ffffffffffffffff8111156119b6576119b561120e565b5b6119c28482850161191b565b91505092915050565b5f815190506119d981611758565b92915050565b5f602082840312156119f4576119f361120a565b5b5f611a01848285016119cb565b91505092915050565b5f8160601b9050919050565b5f611a2082611a0a565b9050919050565b5f611a3182611a16565b9050919050565b611a49611a448261133d565b611a27565b82525050565b5f819050919050565b611a69611a64826112c5565b611a4f565b82525050565b5f611a7a8286611a38565b601482019150611a8a8285611a38565b601482019150611a9a8284611a58565b602082019150819050949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b611ae1816112c5565b82525050565b602082015f820151611afb5f850182611ad8565b50505050565b5f602082019050611b145f830184611ae7565b92915050565b60038110611b2b57611b2a611aab565b5b50565b5f819050611b3b82611b1a565b919050565b5f611b4a82611b2e565b9050919050565b611b5a81611b40565b82525050565b611b698161133d565b82525050565b5f82825260208201905092915050565b5f611b8982611422565b611b938185611b6f565b9350611ba381856020860161143c565b611bac8161144a565b840191505092915050565b5f608083015f830151611bcc5f860182611b51565b506020830151611bdf6020860182611b60565b506040830151611bf26040860182611b60565b5060608301518482036060860152611c0a8282611b7f565b9150508091505092915050565b5f6020820190508181035f830152611c2f8184611bb7565b905092915050565b5f611c41826112c5565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611c7357611c726115a7565b5b60018201905091905056fea2646970667358221220f0478dd581ba0cfa3a9d6a7f556e0a4408663709607484acfcb56fa9be89d7cd64736f6c634300081a0033",c=class c extends l.DeployableTarget{constructor(){super(...arguments),this.abi=a.v}async owner(f){return await a.Vy(this._config,{address:this.assertValidAddress(),args:[],...f})}async claims(f){return await a.By(this._config,{address:this.assertValidAddress(),args:[],...f})}async reward(f){return await a.Ly(this._config,{address:this.assertValidAddress(),args:[],...f})}async claimed(f,b){return await a.zy(this._config,{address:this.assertValidAddress(),args:[f],...b})}async asset(f){return await a.Ey(this._config,{address:this.assertValidAddress(),...f})}async cgdaParams(f){const[b,e,d,s]=await a.Ry(this._config,{address:this.assertValidAddress(),...f});return{rewardDecay:b,rewardBoost:e,lastClaimTime:d,currentReward:s}}async totalBudget(f){return await a.Dy(this._config,{address:this.assertValidAddress(),...f})}async claim(f,b){return await this.awaitResult(this.claimRaw(f,b))}async claimRaw(f,b){const{request:e,result:d}=await a.Xy(this._config,{address:this.assertValidAddress(),args:[t.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...b});return{hash:await a.Uy(this._config,e),result:d}}async clawback(f,b){return await this.awaitResult(this.clawbackRaw(f,b))}async clawbackRaw(f,b){const{request:e,result:d}=await a.Yy(this._config,{address:this.assertValidAddress(),args:[t.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...b});return{hash:await a.Gy(this._config,e),result:d}}async isClaimable(f,b){return await a.Hy(this._config,{address:this.assertValidAddress(),args:[t.prepareClaimPayload(f)],...b})}async currentReward(f){return await a.xy(this._config,{address:this.assertValidAddress(),...f})}buildParameters(f,b){const[e,d]=this.validateDeploymentConfig(f,b);return{abi:a.v,bytecode:u,args:[i(e)],...this.optionallyAttachAccount(d.account)}}};c.base="0x47d4cF86829cAf2e410E7D08005e37b51B8c19A4",c.registryType=y.RegistryType.INCENTIVE;let r=c;function i({asset:n,initialReward:f,rewardDecay:b,rewardBoost:e,totalBudget:d}){return o.encodeAbiParameters([{type:"address",name:"asset"},{type:"uint256",name:"initialReward"},{type:"uint256",name:"rewardDecay"},{type:"uint256",name:"rewardBoost"},{type:"uint256",name:"totalBudget"}],[n,f,b,e,d])}exports.cgdaIncentiveAbi=a.v;exports.CGDAIncentive=r;exports.prepareCGDAIncentivePayload=i;
|
|
2
2
|
//# sourceMappingURL=CGDAIncentive.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CGDAIncentive.cjs","sources":["../../src/Incentives/CGDAIncentive.ts"],"sourcesContent":["import {\n cgdaIncentiveAbi,\n readCgdaIncentiveAsset,\n readCgdaIncentiveCgdaParams,\n readCgdaIncentiveClaimed,\n readCgdaIncentiveClaims,\n readCgdaIncentiveCurrentReward,\n readCgdaIncentiveIsClaimable,\n readCgdaIncentiveOwner,\n readCgdaIncentiveReward,\n readCgdaIncentiveTotalBudget,\n simulateCgdaIncentiveClaim,\n simulateCgdaIncentiveClawback,\n writeCgdaIncentiveClaim,\n writeCgdaIncentiveClawback,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/CGDAIncentive.sol/CGDAIncentive.json';\nimport type { Address, ContractEventName, Hex } from 'viem';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport {\n type CGDAIncentivePayload,\n type CGDAParameters,\n type ClaimPayload,\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n prepareCGDAIncentivePayload,\n prepareClaimPayload,\n} from '../utils';\n\nexport { cgdaIncentiveAbi };\nexport type { CGDAIncentivePayload };\n\n/**\n * A generic `viem.Log` event with support for `CGDAIncentive` event types.\n *\n * @export\n * @typedef {CGDAIncentiveLog}\n * @template {ContractEventName<typeof cgdaIncentiveAbi>} [event=ContractEventName<\n * typeof cgdaIncentiveAbi\n * >]\n */\nexport type CGDAIncentiveLog<\n event extends ContractEventName<typeof cgdaIncentiveAbi> = ContractEventName<\n typeof cgdaIncentiveAbi\n >,\n> = GenericLog<typeof cgdaIncentiveAbi, event>;\n\n/**\n * Continuous Gradual Dutch Auction Incentive.\n * An CGDA incentive implementation with reward amounts adjusting dynamically based on claim volume.\n *\n * @export\n * @class CGDAIncentive\n * @typedef {CGDAIncentive}\n * @extends {DeployableTarget<CGDAIncentivePayload>}\n */\nexport class CGDAIncentive extends DeployableTarget<\n CGDAIncentivePayload,\n typeof cgdaIncentiveAbi\n> {\n public override readonly abi = cgdaIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Address}\n */\n public static override base: Address = import.meta.env\n .VITE_CGDA_INCENTIVE_BASE;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.INCENTIVE;\n\n /**\n * The incentive's owner.\n *\n * @public\n * @async\n * @param {?ReadParams<typeof cgdaIncentiveAbi, 'owner'>} [params]\n * @returns {unknown}\n */\n public async owner(params?: ReadParams<typeof cgdaIncentiveAbi, 'owner'>) {\n return readCgdaIncentiveOwner(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams<typeof cgdaIncentiveAbi, 'claims'>} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(params?: ReadParams<typeof cgdaIncentiveAbi, 'claims'>) {\n return readCgdaIncentiveClaims(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The reward amount issued for each claim\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'reward'>} [params]\n * @returns {Promise<bigint>}\n */\n public async reward(params?: ReadParams<typeof cgdaIncentiveAbi, 'reward'>) {\n return readCgdaIncentiveReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the claim status for a user\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams<typeof cgdaIncentiveAbi, 'claimed'>} [params]\n * @returns {Promise<boolean>}\n */\n public async claimed(\n address: Address,\n params?: ReadParams<typeof cgdaIncentiveAbi, 'claimed'>,\n ) {\n return readCgdaIncentiveClaimed(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The CGDA-like token used for the incentive\n *\n * @public\n * @async\n * @param {?ReadParams<typeof cgdaIncentiveAbi, 'asset'>} [params]\n * @returns {unknown}\n */\n public async asset(params?: ReadParams<typeof cgdaIncentiveAbi, 'asset'>) {\n return readCgdaIncentiveAsset(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The configuration parameters for the CGDAIncentive\n *\n * @public\n * @async\n * @param {?ReadParams<typeof cgdaIncentiveAbi, 'cgdaParams'>} [params]\n * @returns {Promise<CGDAParameters>}\n */\n public async cgdaParams(\n params?: ReadParams<typeof cgdaIncentiveAbi, 'cgdaParams'>,\n ): Promise<CGDAParameters> {\n const [rewardDecay, rewardBoost, lastClaimTime, currentReward] =\n await readCgdaIncentiveCgdaParams(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n return {\n rewardDecay,\n rewardBoost,\n lastClaimTime,\n currentReward,\n };\n }\n\n /**\n * The total budget of the incentive\n *\n * @public\n * @async\n * @param {?ReadParams<typeof cgdaIncentiveAbi, 'totalBudget'>} [params]\n * @returns {Promise<bigint>}\n */\n public async totalBudget(\n params?: ReadParams<typeof cgdaIncentiveAbi, 'totalBudget'>,\n ) {\n return readCgdaIncentiveTotalBudget(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams<typeof cgdaIncentiveAbi, 'claim'>} [params]\n * @returns {Promise<boolean>} - Returns true if successfully claimed\n */\n public async claim(\n payload: ClaimPayload,\n params?: WriteParams<typeof cgdaIncentiveAbi, 'claim'>,\n ) {\n return this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams<typeof cgdaIncentiveAbi, 'claim'>} [params]\n * @returns {Promise<boolean>} - Returns true if successfully claimed\n */\n public async claimRaw(\n payload: ClaimPayload,\n params?: WriteParams<typeof cgdaIncentiveAbi, 'claim'>,\n ) {\n const { request, result } = await simulateCgdaIncentiveClaim(this._config, {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n const hash = await writeCgdaIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Clawback assets from the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams<typeof cgdaIncentiveAbi, 'clawback'>} [params]\n * @returns {Promise<boolean>} - True if the assets were successfully clawbacked\n */\n public async clawback(\n payload: ClaimPayload,\n params?: WriteParams<typeof cgdaIncentiveAbi, 'clawback'>,\n ) {\n return this.awaitResult(this.clawbackRaw(payload, params));\n }\n\n /**\n * Clawback assets from the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams<typeof cgdaIncentiveAbi, 'clawback'>} [params]\n * @returns {Promise<boolean>} - True if the assets were successfully clawbacked\n */\n public async clawbackRaw(\n payload: ClaimPayload,\n params?: WriteParams<typeof cgdaIncentiveAbi, 'clawback'>,\n ) {\n const { request, result } = await simulateCgdaIncentiveClawback(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeCgdaIncentiveClawback(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?ReadParams<typeof cgdaIncentiveAbi, 'isClaimable'>} [params]\n * @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload\n */\n public async isClaimable(\n payload: ClaimPayload,\n params?: ReadParams<typeof cgdaIncentiveAbi, 'isClaimable'>,\n ) {\n return readCgdaIncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Calculates the current reward based on the time since the last claim.\n * The reward is calculated based on the time since the last claim, the available budget, and the reward parameters. It increases linearly over time in the absence of claims, with each hour adding `rewardBoost` to the current reward, up to the available budget.\n * For example, if there is one claim in the first hour, then no claims for three hours, the claimable reward would be `initialReward - rewardDecay + (rewardBoost * 3)`\n *\n * @public\n * @async\n * @param {?ReadParams<typeof cgdaIncentiveAbi, 'currentReward'>} [params]\n * @returns {Promise<bigint>} - The current reward\n */\n public async currentReward(\n params?: ReadParams<typeof cgdaIncentiveAbi, 'currentReward'>,\n ) {\n return readCgdaIncentiveCurrentReward(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?CGDAIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: CGDAIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: cgdaIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [prepareCGDAIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n"],"names":["_CGDAIncentive","DeployableTarget","cgdaIncentiveAbi","params","readCgdaIncentiveOwner","readCgdaIncentiveClaims","readCgdaIncentiveReward","address","readCgdaIncentiveClaimed","readCgdaIncentiveAsset","rewardDecay","rewardBoost","lastClaimTime","currentReward","readCgdaIncentiveCgdaParams","readCgdaIncentiveTotalBudget","payload","request","result","simulateCgdaIncentiveClaim","prepareClaimPayload","writeCgdaIncentiveClaim","simulateCgdaIncentiveClawback","writeCgdaIncentiveClawback","readCgdaIncentiveIsClaimable","readCgdaIncentiveCurrentReward","_payload","_options","options","bytecode","prepareCGDAIncentivePayload","RegistryType","CGDAIncentive"],"mappings":"g7dA8DaA,EAAN,MAAMA,UAAsBC,EAAAA,gBAGjC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC,GAAA,CA2B/B,MAAa,MAAMC,EAAuD,CACjE,OAAAC,EAAA,GAAuB,KAAK,QAAS,CAC1C,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAID,CAAA,CACL,CACH,CAUA,MAAa,OAAOA,EAAwD,CACnE,OAAAE,EAAA,GAAwB,KAAK,QAAS,CAC3C,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIF,CAAA,CACL,CACH,CAUA,MAAa,OAAOA,EAAwD,CACnE,OAAAG,EAAA,GAAwB,KAAK,QAAS,CAC3C,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIH,CAAA,CACL,CACH,CAWA,MAAa,QACXI,EACAJ,EACA,CACO,OAAAK,EAAA,GAAyB,KAAK,QAAS,CAC5C,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACD,CAAO,EAEd,GAAIJ,CAAA,CACL,CACH,CAUA,MAAa,MAAMA,EAAuD,CACjE,OAAAM,EAAA,GAAuB,KAAK,QAAS,CAC1C,QAAS,KAAK,mBAAmB,EAEjC,GAAIN,CAAA,CACL,CACH,CAUA,MAAa,WACXA,EACyB,CACnB,KAAA,CAACO,EAAaC,EAAaC,EAAeC,CAAa,EAC3D,MAAMC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ACH,CAYA,MAAa,cACXA,EACA,CACO,OAAAsB,EAAA,GAA+B,KAAK,QAAS,CAClD,QAAS,KAAK,mBAAmB,EAEjC,GAAItB,CAAA,CACL,CACH,CAUgB,gBACduB,EACAC,EACyB,CACzB,KAAM,CAACX,EAASY,CAAO,EAAI,KAAK,yBAC9BF,EACAC,CAAA,EAEK,MAAA,CACL,IAAKzB,EAAA,EACL,SAAA2B,EACA,KAAM,CAACC,8BAA4Bd,CAAO,CAAC,EAC3C,GAAG,KAAK,wBAAwBY,EAAQ,OAAO,CAAA,CAEnD,CACF,EAjSyB5B,EAAA,KAAgB,6CASvCA,EAAuB,aAA6B+B,EAAa,aAAA,UArB5D,IAAMC,EAANhC"}
|
|
1
|
+
{"version":3,"file":"CGDAIncentive.cjs","sources":["../../src/Incentives/CGDAIncentive.ts"],"sourcesContent":["import {\n cgdaIncentiveAbi,\n readCgdaIncentiveAsset,\n readCgdaIncentiveCgdaParams,\n readCgdaIncentiveClaimed,\n readCgdaIncentiveClaims,\n readCgdaIncentiveCurrentReward,\n readCgdaIncentiveIsClaimable,\n readCgdaIncentiveOwner,\n readCgdaIncentiveReward,\n readCgdaIncentiveTotalBudget,\n simulateCgdaIncentiveClaim,\n simulateCgdaIncentiveClawback,\n writeCgdaIncentiveClaim,\n writeCgdaIncentiveClawback,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/CGDAIncentive.sol/CGDAIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n} from 'viem';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport { type ClaimPayload, prepareClaimPayload } from '../claiming';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { cgdaIncentiveAbi };\n\n/**\n * The object representation of a `CGDAIncentive.InitPayload`\n *\n * @export\n * @interface CGDAIncentivePayload\n * @typedef {CGDAIncentivePayload}\n */\nexport interface CGDAIncentivePayload {\n /**\n * The address of the ERC20-like token\n *\n * @type {Address}\n */\n asset: Address;\n /**\n * The initial reward amount\n *\n * @type {bigint}\n */\n initialReward: bigint;\n /**\n * The amount to subtract from the current reward after each claim\n *\n * @type {bigint}\n */\n rewardDecay: bigint;\n /**\n * The amount by which the reward increases for each hour without a claim (continuous linear increase)\n *\n * @type {bigint}\n */\n rewardBoost: bigint;\n /**\n * The total budget for the incentive\n *\n * @type {bigint}\n */\n totalBudget: bigint;\n}\n\n/**\n * The configuration parameters for the CGDAIncentive\n *\n * @export\n * @interface CGDAParameters\n * @typedef {CGDAParameters}\n */\nexport interface CGDAParameters {\n /**\n * The amount to subtract from the current reward after each claim\n *\n * @type {bigint}\n */\n rewardDecay: bigint;\n /**\n * The amount by which the reward increases for each hour without a claim (continuous linear increase)\n *\n * @type {bigint}\n */\n rewardBoost: bigint;\n /**\n * The timestamp of the last claim\n *\n * @type {bigint}\n */\n lastClaimTime: bigint;\n /**\n * The current reward amount\n *\n * @type {bigint}\n */\n currentReward: bigint;\n}\n\n/**\n * A generic `viem.Log` event with support for `CGDAIncentive` event types.\n *\n * @export\n * @typedef {CGDAIncentiveLog}\n * @template {ContractEventName<typeof cgdaIncentiveAbi>} [event=ContractEventName<\n * typeof cgdaIncentiveAbi\n * >]\n */\nexport type CGDAIncentiveLog<\n event extends ContractEventName<typeof cgdaIncentiveAbi> = ContractEventName<\n typeof cgdaIncentiveAbi\n >,\n> = GenericLog<typeof cgdaIncentiveAbi, event>;\n\n/**\n * Continuous Gradual Dutch Auction Incentive.\n * An CGDA incentive implementation with reward amounts adjusting dynamically based on claim volume.\n *\n * @export\n * @class CGDAIncentive\n * @typedef {CGDAIncentive}\n * @extends {DeployableTarget<CGDAIncentivePayload>}\n */\nexport class CGDAIncentive extends DeployableTarget<\n CGDAIncentivePayload,\n typeof cgdaIncentiveAbi\n> {\n public override readonly abi = cgdaIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Address}\n */\n public static override base: Address = import.meta.env\n .VITE_CGDA_INCENTIVE_BASE;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.INCENTIVE;\n\n /**\n * The incentive's owner.\n *\n * @public\n * @async\n * @param {?ReadParams<typeof cgdaIncentiveAbi, 'owner'>} [params]\n * @returns {unknown}\n */\n public async owner(params?: ReadParams<typeof cgdaIncentiveAbi, 'owner'>) {\n return await readCgdaIncentiveOwner(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams<typeof cgdaIncentiveAbi, 'claims'>} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(params?: ReadParams<typeof cgdaIncentiveAbi, 'claims'>) {\n return await readCgdaIncentiveClaims(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The reward amount issued for each claim\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'reward'>} [params]\n * @returns {Promise<bigint>}\n */\n public async reward(params?: ReadParams<typeof cgdaIncentiveAbi, 'reward'>) {\n return await readCgdaIncentiveReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the claim status for a user\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams<typeof cgdaIncentiveAbi, 'claimed'>} [params]\n * @returns {Promise<boolean>}\n */\n public async claimed(\n address: Address,\n params?: ReadParams<typeof cgdaIncentiveAbi, 'claimed'>,\n ) {\n return await readCgdaIncentiveClaimed(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The CGDA-like token used for the incentive\n *\n * @public\n * @async\n * @param {?ReadParams<typeof cgdaIncentiveAbi, 'asset'>} [params]\n * @returns {unknown}\n */\n public async asset(params?: ReadParams<typeof cgdaIncentiveAbi, 'asset'>) {\n return await readCgdaIncentiveAsset(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The configuration parameters for the CGDAIncentive\n *\n * @public\n * @async\n * @param {?ReadParams<typeof cgdaIncentiveAbi, 'cgdaParams'>} [params]\n * @returns {Promise<CGDAParameters>}\n */\n public async cgdaParams(\n params?: ReadParams<typeof cgdaIncentiveAbi, 'cgdaParams'>,\n ): Promise<CGDAParameters> {\n const [rewardDecay, rewardBoost, lastClaimTime, currentReward] =\n await readCgdaIncentiveCgdaParams(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n return {\n rewardDecay,\n rewardBoost,\n lastClaimTime,\n currentReward,\n };\n }\n\n /**\n * The total budget of the incentive\n *\n * @public\n * @async\n * @param {?ReadParams<typeof cgdaIncentiveAbi, 'totalBudget'>} [params]\n * @returns {Promise<bigint>}\n */\n public async totalBudget(\n params?: ReadParams<typeof cgdaIncentiveAbi, 'totalBudget'>,\n ) {\n return await readCgdaIncentiveTotalBudget(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams<typeof cgdaIncentiveAbi, 'claim'>} [params]\n * @returns {Promise<boolean>} - Returns true if successfully claimed\n */\n protected async claim(\n payload: ClaimPayload,\n params?: WriteParams<typeof cgdaIncentiveAbi, 'claim'>,\n ) {\n return await this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams<typeof cgdaIncentiveAbi, 'claim'>} [params]\n * @returns {Promise<boolean>} - Returns true if successfully claimed\n */\n protected async claimRaw(\n payload: ClaimPayload,\n params?: WriteParams<typeof cgdaIncentiveAbi, 'claim'>,\n ) {\n const { request, result } = await simulateCgdaIncentiveClaim(this._config, {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n const hash = await writeCgdaIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Clawback assets from the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams<typeof cgdaIncentiveAbi, 'clawback'>} [params]\n * @returns {Promise<boolean>} - True if the assets were successfully clawbacked\n */\n public async clawback(\n payload: ClaimPayload,\n params?: WriteParams<typeof cgdaIncentiveAbi, 'clawback'>,\n ) {\n return await this.awaitResult(this.clawbackRaw(payload, params));\n }\n\n /**\n * Clawback assets from the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams<typeof cgdaIncentiveAbi, 'clawback'>} [params]\n * @returns {Promise<boolean>} - True if the assets were successfully clawbacked\n */\n public async clawbackRaw(\n payload: ClaimPayload,\n params?: WriteParams<typeof cgdaIncentiveAbi, 'clawback'>,\n ) {\n const { request, result } = await simulateCgdaIncentiveClawback(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeCgdaIncentiveClawback(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?ReadParams<typeof cgdaIncentiveAbi, 'isClaimable'>} [params]\n * @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload\n */\n public async isClaimable(\n payload: ClaimPayload,\n params?: ReadParams<typeof cgdaIncentiveAbi, 'isClaimable'>,\n ) {\n return await readCgdaIncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Calculates the current reward based on the time since the last claim.\n * The reward is calculated based on the time since the last claim, the available budget, and the reward parameters. It increases linearly over time in the absence of claims, with each hour adding `rewardBoost` to the current reward, up to the available budget.\n * For example, if there is one claim in the first hour, then no claims for three hours, the claimable reward would be `initialReward - rewardDecay + (rewardBoost * 3)`\n *\n * @public\n * @async\n * @param {?ReadParams<typeof cgdaIncentiveAbi, 'currentReward'>} [params]\n * @returns {Promise<bigint>} - The current reward\n */\n public async currentReward(\n params?: ReadParams<typeof cgdaIncentiveAbi, 'currentReward'>,\n ) {\n return await readCgdaIncentiveCurrentReward(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?CGDAIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: CGDAIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: cgdaIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [prepareCGDAIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Given a {@link CGDAIncentivePayload}, properly encode a `CGDAIncentive.InitPayload` for use with {@link CGDAIncentive} initialization.\n *\n * @param {CGDAIncentivePayload} param0\n * @param {Address} param0.asset - The address of the ERC20-like token\n * @param {bigint} param0.initialReward - The initial reward amount\n * @param {bigint} param0.rewardDecay - The amount to subtract from the current reward after each claim\n * @param {bigint} param0.rewardBoost - The amount by which the reward increases for each hour without a claim (continuous linear increase)\n * @param {bigint} param0.totalBudget - The total budget for the incentive\n * @returns {Hex}\n */\nexport function prepareCGDAIncentivePayload({\n asset,\n initialReward,\n rewardDecay,\n rewardBoost,\n totalBudget,\n}: CGDAIncentivePayload) {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'asset' },\n { type: 'uint256', name: 'initialReward' },\n { type: 'uint256', name: 'rewardDecay' },\n { type: 'uint256', name: 'rewardBoost' },\n { type: 'uint256', name: 'totalBudget' },\n ],\n [asset, initialReward, rewardDecay, rewardBoost, totalBudget],\n );\n}\n"],"names":["_CGDAIncentive","DeployableTarget","cgdaIncentiveAbi","params","readCgdaIncentiveOwner","readCgdaIncentiveClaims","readCgdaIncentiveReward","address","readCgdaIncentiveClaimed","readCgdaIncentiveAsset","rewardDecay","rewardBoost","lastClaimTime","currentReward","readCgdaIncentiveCgdaParams","readCgdaIncentiveTotalBudget","payload","request","result","simulateCgdaIncentiveClaim","prepareClaimPayload","writeCgdaIncentiveClaim","simulateCgdaIncentiveClawback","writeCgdaIncentiveClawback","readCgdaIncentiveIsClaimable","readCgdaIncentiveCurrentReward","_payload","_options","options","bytecode","prepareCGDAIncentivePayload","RegistryType","CGDAIncentive","asset","initialReward","totalBudget","encodeAbiParameters"],"mappings":"+9dAwIaA,EAAN,MAAMA,UAAsBC,EAAAA,gBAGjC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC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EAAuB,aAA6B+B,EAAa,aAAA,UArB5D,IAAMC,EAANhC,EA0TA,SAAS8B,EAA4B,CAC1C,MAAAG,EACA,cAAAC,EACA,YAAAxB,EACA,YAAAC,EACA,YAAAwB,CACF,EAAyB,CAChB,OAAAC,EAAA,oBACL,CACE,CAAE,KAAM,UAAW,KAAM,OAAQ,EACjC,CAAE,KAAM,UAAW,KAAM,eAAgB,EACzC,CAAE,KAAM,UAAW,KAAM,aAAc,EACvC,CAAE,KAAM,UAAW,KAAM,aAAc,EACvC,CAAE,KAAM,UAAW,KAAM,aAAc,CACzC,EACA,CAACH,EAAOC,EAAexB,EAAaC,EAAawB,CAAW,CAAA,CAEhE"}
|
|
@@ -1,10 +1,82 @@
|
|
|
1
1
|
import { cgdaIncentiveAbi } from '@boostxyz/evm';
|
|
2
|
-
import type
|
|
2
|
+
import { type Address, type ContractEventName } from 'viem';
|
|
3
3
|
import type { DeployableOptions, GenericDeployableParams } from '../Deployable/Deployable';
|
|
4
4
|
import { DeployableTarget } from '../Deployable/DeployableTarget';
|
|
5
|
-
import { type
|
|
5
|
+
import { type ClaimPayload } from '../claiming';
|
|
6
|
+
import { type GenericLog, type ReadParams, RegistryType, type WriteParams } from '../utils';
|
|
6
7
|
export { cgdaIncentiveAbi };
|
|
7
|
-
|
|
8
|
+
/**
|
|
9
|
+
* The object representation of a `CGDAIncentive.InitPayload`
|
|
10
|
+
*
|
|
11
|
+
* @export
|
|
12
|
+
* @interface CGDAIncentivePayload
|
|
13
|
+
* @typedef {CGDAIncentivePayload}
|
|
14
|
+
*/
|
|
15
|
+
export interface CGDAIncentivePayload {
|
|
16
|
+
/**
|
|
17
|
+
* The address of the ERC20-like token
|
|
18
|
+
*
|
|
19
|
+
* @type {Address}
|
|
20
|
+
*/
|
|
21
|
+
asset: Address;
|
|
22
|
+
/**
|
|
23
|
+
* The initial reward amount
|
|
24
|
+
*
|
|
25
|
+
* @type {bigint}
|
|
26
|
+
*/
|
|
27
|
+
initialReward: bigint;
|
|
28
|
+
/**
|
|
29
|
+
* The amount to subtract from the current reward after each claim
|
|
30
|
+
*
|
|
31
|
+
* @type {bigint}
|
|
32
|
+
*/
|
|
33
|
+
rewardDecay: bigint;
|
|
34
|
+
/**
|
|
35
|
+
* The amount by which the reward increases for each hour without a claim (continuous linear increase)
|
|
36
|
+
*
|
|
37
|
+
* @type {bigint}
|
|
38
|
+
*/
|
|
39
|
+
rewardBoost: bigint;
|
|
40
|
+
/**
|
|
41
|
+
* The total budget for the incentive
|
|
42
|
+
*
|
|
43
|
+
* @type {bigint}
|
|
44
|
+
*/
|
|
45
|
+
totalBudget: bigint;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The configuration parameters for the CGDAIncentive
|
|
49
|
+
*
|
|
50
|
+
* @export
|
|
51
|
+
* @interface CGDAParameters
|
|
52
|
+
* @typedef {CGDAParameters}
|
|
53
|
+
*/
|
|
54
|
+
export interface CGDAParameters {
|
|
55
|
+
/**
|
|
56
|
+
* The amount to subtract from the current reward after each claim
|
|
57
|
+
*
|
|
58
|
+
* @type {bigint}
|
|
59
|
+
*/
|
|
60
|
+
rewardDecay: bigint;
|
|
61
|
+
/**
|
|
62
|
+
* The amount by which the reward increases for each hour without a claim (continuous linear increase)
|
|
63
|
+
*
|
|
64
|
+
* @type {bigint}
|
|
65
|
+
*/
|
|
66
|
+
rewardBoost: bigint;
|
|
67
|
+
/**
|
|
68
|
+
* The timestamp of the last claim
|
|
69
|
+
*
|
|
70
|
+
* @type {bigint}
|
|
71
|
+
*/
|
|
72
|
+
lastClaimTime: bigint;
|
|
73
|
+
/**
|
|
74
|
+
* The current reward amount
|
|
75
|
+
*
|
|
76
|
+
* @type {bigint}
|
|
77
|
+
*/
|
|
78
|
+
currentReward: bigint;
|
|
79
|
+
}
|
|
8
80
|
/**
|
|
9
81
|
* A generic `viem.Log` event with support for `CGDAIncentive` event types.
|
|
10
82
|
*
|
|
@@ -489,7 +561,7 @@ export declare class CGDAIncentive extends DeployableTarget<CGDAIncentivePayload
|
|
|
489
561
|
* @param {?WriteParams<typeof cgdaIncentiveAbi, 'claim'>} [params]
|
|
490
562
|
* @returns {Promise<boolean>} - Returns true if successfully claimed
|
|
491
563
|
*/
|
|
492
|
-
claim(payload: ClaimPayload, params?: WriteParams<typeof cgdaIncentiveAbi, 'claim'>): Promise<boolean>;
|
|
564
|
+
protected claim(payload: ClaimPayload, params?: WriteParams<typeof cgdaIncentiveAbi, 'claim'>): Promise<boolean>;
|
|
493
565
|
/**
|
|
494
566
|
* Claim the incentive
|
|
495
567
|
*
|
|
@@ -499,7 +571,7 @@ export declare class CGDAIncentive extends DeployableTarget<CGDAIncentivePayload
|
|
|
499
571
|
* @param {?WriteParams<typeof cgdaIncentiveAbi, 'claim'>} [params]
|
|
500
572
|
* @returns {Promise<boolean>} - Returns true if successfully claimed
|
|
501
573
|
*/
|
|
502
|
-
claimRaw(payload: ClaimPayload, params?: WriteParams<typeof cgdaIncentiveAbi, 'claim'>): Promise<{
|
|
574
|
+
protected claimRaw(payload: ClaimPayload, params?: WriteParams<typeof cgdaIncentiveAbi, 'claim'>): Promise<{
|
|
503
575
|
hash: `0x${string}`;
|
|
504
576
|
result: boolean;
|
|
505
577
|
}>;
|
|
@@ -557,4 +629,16 @@ export declare class CGDAIncentive extends DeployableTarget<CGDAIncentivePayload
|
|
|
557
629
|
*/
|
|
558
630
|
buildParameters(_payload?: CGDAIncentivePayload, _options?: DeployableOptions): GenericDeployableParams;
|
|
559
631
|
}
|
|
632
|
+
/**
|
|
633
|
+
* Given a {@link CGDAIncentivePayload}, properly encode a `CGDAIncentive.InitPayload` for use with {@link CGDAIncentive} initialization.
|
|
634
|
+
*
|
|
635
|
+
* @param {CGDAIncentivePayload} param0
|
|
636
|
+
* @param {Address} param0.asset - The address of the ERC20-like token
|
|
637
|
+
* @param {bigint} param0.initialReward - The initial reward amount
|
|
638
|
+
* @param {bigint} param0.rewardDecay - The amount to subtract from the current reward after each claim
|
|
639
|
+
* @param {bigint} param0.rewardBoost - The amount by which the reward increases for each hour without a claim (continuous linear increase)
|
|
640
|
+
* @param {bigint} param0.totalBudget - The total budget for the incentive
|
|
641
|
+
* @returns {Hex}
|
|
642
|
+
*/
|
|
643
|
+
export declare function prepareCGDAIncentivePayload({ asset, initialReward, rewardDecay, rewardBoost, totalBudget, }: CGDAIncentivePayload): `0x${string}`;
|
|
560
644
|
//# sourceMappingURL=CGDAIncentive.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CGDAIncentive.d.ts","sourceRoot":"","sources":["../../src/Incentives/CGDAIncentive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAcjB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"CGDAIncentive.d.ts","sourceRoot":"","sources":["../../src/Incentives/CGDAIncentive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAcjB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,iBAAiB,EAGvB,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,KAAK,YAAY,EAAuB,MAAM,aAAa,CAAC;AACrE,OAAO,EACL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,YAAY,EACZ,KAAK,WAAW,EACjB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;O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