@boostxyz/sdk 0.0.0-alpha.12 → 0.0.0-alpha.13
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 +2 -2
- package/dist/Actions/ContractAction.d.ts.map +1 -1
- package/dist/Actions/ERC721MintAction.d.ts +2 -2
- 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 +2 -2
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +47 -43
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.js +2 -2
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
- package/dist/AllowLists/SimpleAllowList.d.ts +2 -2
- package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleAllowList.js +23 -19
- package/dist/AllowLists/SimpleAllowList.js.map +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.d.ts +2 -2
- package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleDenyList.js +6 -5
- package/dist/AllowLists/SimpleDenyList.js.map +1 -1
- package/dist/Auth/PassthroughAuth.cjs +1 -1
- package/dist/Auth/PassthroughAuth.js +1 -1
- package/dist/BoostCore.cjs +2 -2
- package/dist/BoostCore.cjs.map +1 -1
- package/dist/BoostCore.d.ts +27 -5
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +438 -347
- 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 +26 -5
- package/dist/BoostRegistry.d.ts.map +1 -1
- package/dist/BoostRegistry.js +125 -64
- 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 +2 -2
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
- package/dist/Budgets/ManagedBudget.js +41 -37
- package/dist/Budgets/ManagedBudget.js.map +1 -1
- package/dist/Budgets/SimpleBudget.d.ts +2 -2
- package/dist/Budgets/SimpleBudget.d.ts.map +1 -1
- package/dist/Budgets/VestingBudget.d.ts +2 -2
- package/dist/Budgets/VestingBudget.d.ts.map +1 -1
- package/dist/Deployable/DeployableTarget.cjs +1 -1
- package/dist/Deployable/DeployableTarget.cjs.map +1 -1
- package/dist/Deployable/DeployableTarget.d.ts +6 -6
- package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
- package/dist/Deployable/DeployableTarget.js +22 -17
- 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 +2 -2
- package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
- package/dist/Incentives/AllowListIncentive.js +17 -13
- 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 +14 -2
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
- package/dist/Incentives/CGDAIncentive.js +27 -23
- package/dist/Incentives/CGDAIncentive.js.map +1 -1
- package/dist/Incentives/ERC1155Incentive.d.ts +2 -2
- 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 +2 -2
- package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.js +17 -13
- package/dist/Incentives/ERC20Incentive.js.map +1 -1
- package/dist/Incentives/ERC20VariableIncentive.d.ts +2 -2
- 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 +32 -28
- 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 +2 -2
- package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
- package/dist/Incentives/PointsIncentive.js +13 -9
- package/dist/Incentives/PointsIncentive.js.map +1 -1
- package/dist/{SimpleDenyList-IJ9Ipya7.js → SimpleDenyList-C21O9Yfi.js} +23 -19
- package/dist/SimpleDenyList-C21O9Yfi.js.map +1 -0
- package/dist/SimpleDenyList-DeJRKD2D.cjs +2 -0
- package/dist/{SimpleDenyList-IJ9Ipya7.js.map → SimpleDenyList-DeJRKD2D.cjs.map} +1 -1
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.cjs.map +1 -1
- package/dist/Validators/SignerValidator.d.ts +2 -2
- package/dist/Validators/SignerValidator.d.ts.map +1 -1
- package/dist/Validators/SignerValidator.js +18 -14
- package/dist/Validators/SignerValidator.js.map +1 -1
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.js +1 -1
- package/dist/deployments-BvFcK_eR.js +40 -0
- package/dist/deployments-BvFcK_eR.js.map +1 -0
- package/dist/deployments-Ho4PnGCS.cjs +2 -0
- package/dist/deployments-Ho4PnGCS.cjs.map +1 -0
- package/dist/deployments.json +38 -0
- package/dist/errors.cjs +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +6 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +70 -54
- package/dist/errors.js.map +1 -1
- package/dist/{generated-HGddZXHJ.js → generated-LpgSHrH0.js} +130 -90
- package/dist/generated-LpgSHrH0.js.map +1 -0
- package/dist/generated-tq_HLZJ0.cjs +3 -0
- package/dist/generated-tq_HLZJ0.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +113 -109
- package/dist/utils.cjs +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.ts +25 -11
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +38 -23
- package/dist/utils.js.map +1 -1
- package/package.json +6 -5
- package/src/Actions/ContractAction.ts +5 -3
- package/src/Actions/ERC721MintAction.ts +5 -3
- package/src/Actions/EventAction.ts +6 -2
- package/src/AllowLists/AllowList.test.ts +1 -1
- package/src/AllowLists/SimpleAllowList.ts +6 -3
- package/src/AllowLists/SimpleDenyList.ts +6 -3
- package/src/BoostCore.test.ts +31 -91
- package/src/BoostCore.ts +137 -34
- package/src/BoostRegistry.ts +89 -21
- package/src/Budgets/ManagedBudget.ts +6 -4
- package/src/Budgets/SimpleBudget.ts +4 -3
- package/src/Budgets/VestingBudget.ts +4 -3
- package/src/Deployable/DeployableTarget.ts +22 -11
- package/src/Incentives/AllowListIncentive.ts +6 -3
- package/src/Incentives/CGDAIncentive.ts +6 -3
- package/src/Incentives/ERC1155Incentive.ts +4 -3
- package/src/Incentives/ERC20Incentive.ts +6 -3
- package/src/Incentives/ERC20VariableIncentive.ts +6 -3
- package/src/Incentives/PointsIncentive.ts +6 -3
- package/src/Validators/SignerValidator.ts +6 -3
- package/src/errors.ts +17 -1
- package/src/utils.ts +60 -11
- package/dist/SimpleDenyList-CqT0BMP7.cjs +0 -2
- package/dist/SimpleDenyList-CqT0BMP7.cjs.map +0 -1
- package/dist/generated-HGddZXHJ.js.map +0 -1
- package/dist/generated-wKBNvm48.cjs +0 -3
- package/dist/generated-wKBNvm48.cjs.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
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;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../generated-tq_HLZJ0.cjs"),o=require("viem"),l=require("../deployments-Ho4PnGCS.cjs"),y=require("../Deployable/DeployableTarget.cjs"),t=require("../claiming.cjs"),u=require("../utils.cjs"),h="0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b611d63806100bd5f395ff3fe608060405260043610610129575f3560e01c8063715018a6116100aa578063c884ef831161006e578063c884ef831461038c578063db09da12146103c8578063dcc59b6f14610404578063f04e283e1461042e578063f2fde38b1461044a578063fee81cf41461046657610129565b8063715018a6146102c557806375ef18d0146102cf5780638da5cb5b146102fc578063bb1757cf14610326578063c78da39a1461036257610129565b806338d52e0f116100f157806338d52e0f146101f1578063439fab911461021b578063474f5a44146102435780634e7165a21461027f57806354d1f13d146102bb57610129565b806301ffc9a71461012d57806307621eca14610169578063228cb7331461019357806325692962146101bd57806328d6183b146101c7575b5f80fd5b348015610138575f80fd5b50610153600480360381019061014e91906112c7565b6104a2565b604051610160919061130c565b60405180910390f35b348015610174575f80fd5b5061017d61051b565b60405161018a919061133d565b60405180910390f35b34801561019e575f80fd5b506101a76105c5565b6040516101b4919061133d565b60405180910390f35b6101c56105cb565b005b3480156101d2575f80fd5b506101db61061c565b6040516101e89190611365565b60405180910390f35b3480156101fc575f80fd5b50610205610643565b60405161021291906113bd565b60405180910390f35b348015610226575f80fd5b50610241600480360381019061023c9190611437565b610668565b005b34801561024e575f80fd5b5061026960048036038101906102649190611437565b610890565b604051610276919061130c565b60405180910390f35b34801561028a575f80fd5b506102a560048036038101906102a09190611437565b6109b9565b6040516102b291906114f2565b60405180910390f35b6102c3610a89565b005b6102cd610ac2565b005b3480156102da575f80fd5b506102e3610ad5565b6040516102f39493929190611512565b60405180910390f35b348015610307575f80fd5b50610310610af2565b60405161031d91906113bd565b60405180910390f35b348015610331575f80fd5b5061034c6004803603810190610347919061157f565b610b1a565b604051610359919061130c565b60405180910390f35b34801561036d575f80fd5b50610376610d06565b604051610383919061133d565b60405180910390f35b348015610397575f80fd5b506103b260048036038101906103ad91906115dc565b610d0c565b6040516103bf919061130c565b60405180910390f35b3480156103d3575f80fd5b506103ee60048036038101906103e9919061157f565b610d29565b6040516103fb919061130c565b60405180910390f35b34801561040f575f80fd5b50610418610d3c565b604051610425919061133d565b60405180910390f35b610448600480360381019061044391906115dc565b610d41565b005b610464600480360381019061045f91906115dc565b610d7f565b005b348015610471575f80fd5b5061048c600480360381019061048791906115dc565b610da8565b604051610499919061133d565b60405180910390f35b5f7fa39e44d9000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610514575061051382610dc1565b5b9050919050565b5f806004600201544261052e9190611634565b90505f61057b3060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610e3a90919063ffffffff16565b90505f610e10600460010154846105929190611667565b61059c91906116d5565b6004600301546105ac9190611705565b90508181116105bb57806105bd565b815b935050505090565b60015481565b5f6105d4610e6d565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7fa39e44d900000000000000000000000000000000000000000000000000000000905090565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f610671610e77565b905080546003825580156106a35760018160011c14303b1061069a5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f83838101906106b4919061186b565b90505f6106e330835f015173ffffffffffffffffffffffffffffffffffffffff16610e3a90919063ffffffff16565b9050816080015181101561073957815f01518183608001516040517f5c54305e00000000000000000000000000000000000000000000000000000000815260040161073093929190611896565b60405180910390fd5b5f8260200151148061074e57505f8260400151145b8061075c57505f8260600151145b8061076e575081602001518260800151105b156107a5576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815f015160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060405180608001604052808360400151815260200183606001518152602001428152602001836020015181525060045f820151815f0155602082015181600101556040820151816002015560608201518160030155905050816080015160088190555061085433610ea0565b5050801561088b576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f610899610f76565b5f83838101906108a991906119e4565b90505f81602001518060200190518101906108c49190611a3f565b9050610915825f01518260035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610fad9092919063ffffffff16565b815f015173ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d360035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16845f01518460405160200161098993929190611acf565b6040516020818303038152906040526040516109a591906114f2565b60405180910390a260019250505092915050565b60605f83838101906109cb919061186b565b90506040518060800160405280600160028111156109ec576109eb611b0b565b5b8152602001825f015173ffffffffffffffffffffffffffffffffffffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff16815260200160405180602001604052808460800151815250604051602001610a4f9190611b61565b604051602081830303815290604052815250604051602001610a719190611c77565b60405160208183030381529060405291505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610aca610f76565b610ad35f610ff6565b565b6004805f0154908060010154908060020154908060030154905084565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b5f610b23610f76565b610b2c846110bc565b610b6d57836040517f4139d81d000000000000000000000000000000000000000000000000000000008152600401610b649190611cba565b60405180910390fd5b600160025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505f80815480929190610bd390611ce6565b91905055505f610be161051b565b90504260046002018190555060045f01548111610c025760045f0154610c13565b60045f015481610c129190611634565b5b600460030181905550610c68858260035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610fad9092919063ffffffff16565b8473ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d360035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff168784604051602001610cd693929190611acf565b604051602081830303815290604052604051610cf291906114f2565b60405180910390a260019150509392505050565b60085481565b6002602052805f5260405f205f915054906101000a900460ff1681565b5f610d33846110bc565b90509392505050565b5f5481565b610d49610f76565b63389a75e1600c52805f526020600c208054421115610d6f57636f5e88185f526004601cfd5b5f815550610d7c81610ff6565b50565b610d87610f76565b8060601b610d9c57637448fbae5f526004601cfd5b610da581610ff6565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7f5970a689000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610e335750610e328261117b565b5b9050919050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b5f6202a300905090565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610ea86111f4565b15610f20577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610ee257630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610f73565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610fab576382b429005f526004601cfd5b565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af13d1560015f51141716610fed576390b8ec185f526004601cfd5b5f603452505050565b610ffe6111f4565b15611063577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b82178155506110b9565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f806110c661051b565b90505f8111801561112057508061111d3060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610e3a90919063ffffffff16565b10155b8015611173575060025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b915050919050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806111ed57506111ec826111f8565b5b9050919050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6112a681611272565b81146112b0575f80fd5b50565b5f813590506112c18161129d565b92915050565b5f602082840312156112dc576112db61126a565b5b5f6112e9848285016112b3565b91505092915050565b5f8115159050919050565b611306816112f2565b82525050565b5f60208201905061131f5f8301846112fd565b92915050565b5f819050919050565b61133781611325565b82525050565b5f6020820190506113505f83018461132e565b92915050565b61135f81611272565b82525050565b5f6020820190506113785f830184611356565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6113a78261137e565b9050919050565b6113b78161139d565b82525050565b5f6020820190506113d05f8301846113ae565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126113f7576113f66113d6565b5b8235905067ffffffffffffffff811115611414576114136113da565b5b6020830191508360018202830111156114305761142f6113de565b5b9250929050565b5f806020838503121561144d5761144c61126a565b5b5f83013567ffffffffffffffff81111561146a5761146961126e565b5b611476858286016113e2565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f6114c482611482565b6114ce818561148c565b93506114de81856020860161149c565b6114e7816114aa565b840191505092915050565b5f6020820190508181035f83015261150a81846114ba565b905092915050565b5f6080820190506115255f83018761132e565b611532602083018661132e565b61153f604083018561132e565b61154c606083018461132e565b95945050505050565b61155e8161139d565b8114611568575f80fd5b50565b5f8135905061157981611555565b92915050565b5f805f604084860312156115965761159561126a565b5b5f6115a38682870161156b565b935050602084013567ffffffffffffffff8111156115c4576115c361126e565b5b6115d0868287016113e2565b92509250509250925092565b5f602082840312156115f1576115f061126a565b5b5f6115fe8482850161156b565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61163e82611325565b915061164983611325565b925082820390508181111561166157611660611607565b5b92915050565b5f61167182611325565b915061167c83611325565b925082820261168a81611325565b915082820484148315176116a1576116a0611607565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6116df82611325565b91506116ea83611325565b9250826116fa576116f96116a8565b5b828204905092915050565b5f61170f82611325565b915061171a83611325565b925082820190508082111561173257611731611607565b5b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611772826114aa565b810181811067ffffffffffffffff821117156117915761179061173c565b5b80604052505050565b5f6117a3611261565b90506117af8282611769565b919050565b5f80fd5b6117c181611325565b81146117cb575f80fd5b50565b5f813590506117dc816117b8565b92915050565b5f60a082840312156117f7576117f6611738565b5b61180160a061179a565b90505f6118108482850161156b565b5f830152506020611823848285016117ce565b6020830152506040611837848285016117ce565b604083015250606061184b848285016117ce565b606083015250608061185f848285016117ce565b60808301525092915050565b5f60a082840312156118805761187f61126a565b5b5f61188d848285016117e2565b91505092915050565b5f6060820190506118a95f8301866113ae565b6118b6602083018561132e565b6118c3604083018461132e565b949350505050565b5f80fd5b5f67ffffffffffffffff8211156118e9576118e861173c565b5b6118f2826114aa565b9050602081019050919050565b828183375f83830152505050565b5f61191f61191a846118cf565b61179a565b90508281526020810184848401111561193b5761193a6118cb565b5b6119468482856118ff565b509392505050565b5f82601f830112611962576119616113d6565b5b813561197284826020860161190d565b91505092915050565b5f604082840312156119905761198f611738565b5b61199a604061179a565b90505f6119a98482850161156b565b5f83015250602082013567ffffffffffffffff8111156119cc576119cb6117b4565b5b6119d88482850161194e565b60208301525092915050565b5f602082840312156119f9576119f861126a565b5b5f82013567ffffffffffffffff811115611a1657611a1561126e565b5b611a228482850161197b565b91505092915050565b5f81519050611a39816117b8565b92915050565b5f60208284031215611a5457611a5361126a565b5b5f611a6184828501611a2b565b91505092915050565b5f8160601b9050919050565b5f611a8082611a6a565b9050919050565b5f611a9182611a76565b9050919050565b611aa9611aa48261139d565b611a87565b82525050565b5f819050919050565b611ac9611ac482611325565b611aaf565b82525050565b5f611ada8286611a98565b601482019150611aea8285611a98565b601482019150611afa8284611ab8565b602082019150819050949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b611b4181611325565b82525050565b602082015f820151611b5b5f850182611b38565b50505050565b5f602082019050611b745f830184611b47565b92915050565b60038110611b8b57611b8a611b0b565b5b50565b5f819050611b9b82611b7a565b919050565b5f611baa82611b8e565b9050919050565b611bba81611ba0565b82525050565b611bc98161139d565b82525050565b5f82825260208201905092915050565b5f611be982611482565b611bf38185611bcf565b9350611c0381856020860161149c565b611c0c816114aa565b840191505092915050565b5f608083015f830151611c2c5f860182611bb1565b506020830151611c3f6020860182611bc0565b506040830151611c526040860182611bc0565b5060608301518482036060860152611c6a8282611bdf565b9150508091505092915050565b5f6020820190508181035f830152611c8f8184611c17565b905092915050565b50565b5f611ca55f8361148c565b9150611cb082611c97565b5f82019050919050565b5f604082019050611ccd5f8301846113ae565b8181036020830152611cde81611c9a565b905092915050565b5f611cf082611325565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611d2257611d21611607565b5b60018201905091905056fea2646970667358221220996d0d5fbf9c0d3678da4b638e9510f94fadf42eb0e8c030e6ccc172bd24e06564736f6c634300081a0033",c=class c extends y.DeployableTarget{constructor(){super(...arguments),this.abi=a.v}async owner(f){return await a._y(this._config,{address:this.assertValidAddress(),args:[],...f})}async claims(f){return await a.xy(this._config,{address:this.assertValidAddress(),args:[],...f})}async reward(f){return await a.ky(this._config,{address:this.assertValidAddress(),args:[],...f})}async claimed(f,b){return await a.By(this._config,{address:this.assertValidAddress(),args:[f],...b})}async asset(f){return await a.Ry(this._config,{address:this.assertValidAddress(),...f})}async cgdaParams(f){const[b,e,d,s]=await a.zy(this._config,{address:this.assertValidAddress(),...f});return{rewardDecay:b,rewardBoost:e,lastClaimTime:d,currentReward:s}}async totalBudget(f){return await a.Py(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.Yy(this._config,{address:this.assertValidAddress(),args:[t.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...b});return{hash:await a.Gy(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.ed(this._config,{address:this.assertValidAddress(),args:[t.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...b});return{hash:await a.Zy(this._config,e),result:d}}async isClaimable(f,b){return await a.Vy(this._config,{address:this.assertValidAddress(),args:[t.prepareClaimPayload(f)],...b})}async currentReward(f){return await a.Sy(this._config,{address:this.assertValidAddress(),...f})}buildParameters(f,b){const[e,d]=this.validateDeploymentConfig(f,b);return{abi:a.v,bytecode:h,args:[i(e)],...this.optionallyAttachAccount(d.account)}}};c.bases={...l.CGDAIncentive,31337:"0x47d4cF86829cAf2e410E7D08005e37b51B8c19A4"},c.registryType=u.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 {\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,GAAA,CA2B/B,MAAa,MAAMC,EAAuD,CACjE,OAAA,MAAMC,EAAAA,GAAuB,KAAK,QAAS,CAChD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAID,CAAA,CACL,CACH,CAUA,MAAa,OAAOA,EAAwD,CACnE,OAAA,MAAME,EAAAA,GAAwB,KAAK,QAAS,CACjD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIF,CAAA,CACL,CACH,CAUA,MAAa,OAAOA,EAAwD,CACnE,OAAA,MAAMG,EAAAA,GAAwB,KAAK,QAAS,CACjD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIH,CAAA,CACL,CACH,CAWA,MAAa,QACXI,EACAJ,EACA,CACO,OAAA,MAAMK,EAAAA,GAAyB,KAAK,QAAS,CAClD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACD,CAAO,EAEd,GAAIJ,CAAA,CACL,CACH,CAUA,MAAa,MAAMA,EAAuD,CACjE,OAAA,MAAMM,EAAAA,GAAuB,KAAK,QAAS,CAChD,QAAS,KAAK,mBAAmB,EAEjC,GAAIN,CAAA,CACL,CACH,CAUA,MAAa,WACXA,EACyB,CACnB,KAAA,CAACO,EAAaC,EAAaC,EAAeC,CAAa,EAC3D,MAAMC,EAAAA,GAA4B,KAAK,QAAS,CAC9C,QAAS,KAAK,mBAAmB,EAEjC,GAAIX,CAAA,CACL,EACI,MAAA,CACL,Y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,CACxD,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,EAA4Bd,CAAO,CAAC,EAC3C,GAAG,KAAK,wBAAwBY,EAAQ,OAAO,CAAA,CAEnD,CACF,EAjSyB5B,EAAA,KAAgB,6CASvCA,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
|
+
{"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 { CGDAIncentive as CGDAIncentiveBases } from '../../dist/deployments.json';\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 {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(CGDAIncentiveBases as Record<number, Address>),\n 31337: import.meta.env.VITE_CGDA_INCENTIVE_BASE,\n };\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","CGDAIncentiveBases","RegistryType","CGDAIncentive","asset","initialReward","totalBudget","encodeAbiParameters"],"mappings":"s2eAyIaA,EAAN,MAAMA,UAAsBC,EAAAA,gBAGjC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC,GAAA,CA6B/B,MAAa,MAAMC,EAAuD,CACjE,OAAA,MAAMC,EAAAA,GAAuB,KAAK,QAAS,CAChD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAID,CAAA,CACL,CACH,CAUA,MAAa,OAAOA,EAAwD,CACnE,OAAA,MAAME,EAAAA,GAAwB,KAAK,QAAS,CACjD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIF,CAAA,CACL,CACH,CAUA,MAAa,OAAOA,EAAwD,CACnE,OAAA,MAAMG,EAAAA,GAAwB,KAAK,QAAS,CACjD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIH,CAAA,CACL,CACH,CAWA,MAAa,QACXI,EACAJ,EACA,CACO,OAAA,MAAMK,EAAAA,GAAyB,KAAK,QAAS,CAClD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACD,CAAO,EAEd,GAAIJ,CAAA,CACL,CACH,CAUA,MAAa,MAAMA,EAAuD,CACjE,OAAA,MAAMM,EAAAA,GAAuB,KAAK,QAAS,CAChD,QAAS,KAAK,mBAAmB,EAEjC,GAAIN,CAAA,CACL,CACH,CAUA,MAAa,WACXA,EACyB,CACnB,KAAA,CAACO,EAAaC,EAAaC,EAAeC,CAAa,EAC3D,MA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AC,EAEnC,GAAIb,CAAA,CACL,CACH,CAYA,MAAa,cACXA,EACA,CACO,OAAA,MAAMsB,EAAAA,GAA+B,KAAK,QAAS,CACxD,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,EAA4Bd,CAAO,CAAC,EAC3C,GAAG,KAAK,wBAAwBY,EAAQ,OAAO,CAAA,CAEnD,CACF,EAnSE5B,EAAuB,MAAiC,CACtD,GAAI+B,EAAA,cACJ,MAAO,4CAAA,EAST/B,EAAuB,aAA6BgC,EAAa,aAAA,UAvB5D,IAAMC,EAANjC,EA4TA,SAAS8B,EAA4B,CAC1C,MAAAI,EACA,cAAAC,EACA,YAAAzB,EACA,YAAAC,EACA,YAAAyB,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,EAAezB,EAAaC,EAAayB,CAAW,CAAA,CAEhE"}
|
|
@@ -109,6 +109,18 @@ export declare class CGDAIncentive extends DeployableTarget<CGDAIncentivePayload
|
|
|
109
109
|
readonly type: "error";
|
|
110
110
|
readonly inputs: readonly [];
|
|
111
111
|
readonly name: "ClaimFailed";
|
|
112
|
+
}, {
|
|
113
|
+
readonly type: "error";
|
|
114
|
+
readonly inputs: readonly [{
|
|
115
|
+
readonly name: "caller";
|
|
116
|
+
readonly internalType: "address";
|
|
117
|
+
readonly type: "address";
|
|
118
|
+
}, {
|
|
119
|
+
readonly name: "data";
|
|
120
|
+
readonly internalType: "bytes";
|
|
121
|
+
readonly type: "bytes";
|
|
122
|
+
}];
|
|
123
|
+
readonly name: "ClaimFailed";
|
|
112
124
|
}, {
|
|
113
125
|
readonly type: "error";
|
|
114
126
|
readonly inputs: readonly [];
|
|
@@ -477,9 +489,9 @@ export declare class CGDAIncentive extends DeployableTarget<CGDAIncentivePayload
|
|
|
477
489
|
*
|
|
478
490
|
* @public
|
|
479
491
|
* @static
|
|
480
|
-
* @type {Address}
|
|
492
|
+
* @type {Record<number, Address>}
|
|
481
493
|
*/
|
|
482
|
-
static
|
|
494
|
+
static bases: Record<number, Address>;
|
|
483
495
|
/**
|
|
484
496
|
* @inheritdoc
|
|
485
497
|
*
|
|
@@ -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,EACL,KAAK,OAAO,EACZ,KAAK,iBAAiB,EAGvB,MAAM,MAAM,CAAC;
|
|
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;AAEd,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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AY,EACrB,MAAM,CAAC,EAAE,WAAW,CAAC,OAAO,gBAAgB,EAAE,UAAU,CAAC;IAK3D;;;;;;;;OAQG;IACU,WAAW,CACtB,OAAO,EAAE,YAAY,EACrB,MAAM,CAAC,EAAE,WAAW,CAAC,OAAO,gBAAgB,EAAE,UAAU,CAAC;;;;IAgB3D;;;;;;;;OAQG;IACU,WAAW,CACtB,OAAO,EAAE,YAAY,EACrB,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,gBAAgB,EAAE,aAAa,CAAC;IAU7D;;;;;;;;;OASG;IACU,aAAa,CACxB,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,gBAAgB,EAAE,eAAe,CAAC;IAS/D;;;;;;;OAOG;IACa,eAAe,CAC7B,QAAQ,CAAC,EAAE,oBAAoB,EAC/B,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,uBAAuB;CAY3B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CAAC,EAC1C,KAAK,EACL,aAAa,EACb,WAAW,EACX,WAAW,EACX,WAAW,GACZ,EAAE,oBAAoB,iBAWtB"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { v as t, aa as n, ab as o, ac as h, ad as l, ae as y, af as u, ag as w, ah as
|
|
2
|
-
import { encodeAbiParameters as
|
|
3
|
-
import {
|
|
1
|
+
import { v as t, aa as n, ab as o, ac as h, ad as l, ae as y, af as u, ag as w, ah as m, ai as g, aj as p, ak as A, al as V, am as _ } from "../generated-LpgSHrH0.js";
|
|
2
|
+
import { encodeAbiParameters as R } from "viem";
|
|
3
|
+
import { C as B } from "../deployments-BvFcK_eR.js";
|
|
4
|
+
import { DeployableTarget as P } from "../Deployable/DeployableTarget.js";
|
|
4
5
|
import { prepareClaimPayload as s } from "../claiming.js";
|
|
5
|
-
import { RegistryType as
|
|
6
|
-
const P = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b611cb4806100bd5f395ff3fe608060405260043610610129575f3560e01c8063715018a6116100aa578063c884ef831161006e578063c884ef831461038c578063db09da12146103c8578063dcc59b6f14610404578063f04e283e1461042e578063f2fde38b1461044a578063fee81cf41461046657610129565b8063715018a6146102c557806375ef18d0146102cf5780638da5cb5b146102fc578063bb1757cf14610326578063c78da39a1461036257610129565b806338d52e0f116100f157806338d52e0f146101f1578063439fab911461021b578063474f5a44146102435780634e7165a21461027f57806354d1f13d146102bb57610129565b806301ffc9a71461012d57806307621eca14610169578063228cb7331461019357806325692962146101bd57806328d6183b146101c7575b5f80fd5b348015610138575f80fd5b50610153600480360381019061014e9190611267565b6104a2565b60405161016091906112ac565b60405180910390f35b348015610174575f80fd5b5061017d61051b565b60405161018a91906112dd565b60405180910390f35b34801561019e575f80fd5b506101a76105c5565b6040516101b491906112dd565b60405180910390f35b6101c56105cb565b005b3480156101d2575f80fd5b506101db61061c565b6040516101e89190611305565b60405180910390f35b3480156101fc575f80fd5b50610205610643565b604051610212919061135d565b60405180910390f35b348015610226575f80fd5b50610241600480360381019061023c91906113d7565b610668565b005b34801561024e575f80fd5b50610269600480360381019061026491906113d7565b610890565b60405161027691906112ac565b60405180910390f35b34801561028a575f80fd5b506102a560048036038101906102a091906113d7565b6109b9565b6040516102b29190611492565b60405180910390f35b6102c3610a89565b005b6102cd610ac2565b005b3480156102da575f80fd5b506102e3610ad5565b6040516102f394939291906114b2565b60405180910390f35b348015610307575f80fd5b50610310610af2565b60405161031d919061135d565b60405180910390f35b348015610331575f80fd5b5061034c6004803603810190610347919061151f565b610b1a565b60405161035991906112ac565b60405180910390f35b34801561036d575f80fd5b50610376610ca6565b60405161038391906112dd565b60405180910390f35b348015610397575f80fd5b506103b260048036038101906103ad919061157c565b610cac565b6040516103bf91906112ac565b60405180910390f35b3480156103d3575f80fd5b506103ee60048036038101906103e9919061151f565b610cc9565b6040516103fb91906112ac565b60405180910390f35b34801561040f575f80fd5b50610418610cdc565b60405161042591906112dd565b60405180910390f35b6104486004803603810190610443919061157c565b610ce1565b005b610464600480360381019061045f919061157c565b610d1f565b005b348015610471575f80fd5b5061048c6004803603810190610487919061157c565b610d48565b60405161049991906112dd565b60405180910390f35b5f7fa39e44d9000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610514575061051382610d61565b5b9050919050565b5f806004600201544261052e91906115d4565b90505f61057b3060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dda90919063ffffffff16565b90505f610e10600460010154846105929190611607565b61059c9190611675565b6004600301546105ac91906116a5565b90508181116105bb57806105bd565b815b935050505090565b60015481565b5f6105d4610e0d565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7fa39e44d900000000000000000000000000000000000000000000000000000000905090565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f610671610e17565b905080546003825580156106a35760018160011c14303b1061069a5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f83838101906106b4919061180b565b90505f6106e330835f015173ffffffffffffffffffffffffffffffffffffffff16610dda90919063ffffffff16565b9050816080015181101561073957815f01518183608001516040517f5c54305e00000000000000000000000000000000000000000000000000000000815260040161073093929190611836565b60405180910390fd5b5f8260200151148061074e57505f8260400151145b8061075c57505f8260600151145b8061076e575081602001518260800151105b156107a5576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815f015160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060405180608001604052808360400151815260200183606001518152602001428152602001836020015181525060045f820151815f0155602082015181600101556040820151816002015560608201518160030155905050816080015160088190555061085433610e40565b5050801561088b576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f610899610f16565b5f83838101906108a99190611984565b90505f81602001518060200190518101906108c491906119df565b9050610915825f01518260035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f4d9092919063ffffffff16565b815f015173ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d360035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16845f01518460405160200161098993929190611a6f565b6040516020818303038152906040526040516109a59190611492565b60405180910390a260019250505092915050565b60605f83838101906109cb919061180b565b90506040518060800160405280600160028111156109ec576109eb611aab565b5b8152602001825f015173ffffffffffffffffffffffffffffffffffffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff16815260200160405180602001604052808460800151815250604051602001610a4f9190611b01565b604051602081830303815290604052815250604051602001610a719190611c17565b60405160208183030381529060405291505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610aca610f16565b610ad35f610f96565b565b6004805f0154908060010154908060020154908060030154905084565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b5f610b23610f16565b610b2c8461105c565b610b62576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80815480929190610b7390611c37565b91905055505f610b8161051b565b90504260046002018190555060045f01548111610ba25760045f0154610bb3565b60045f015481610bb291906115d4565b5b600460030181905550610c08858260035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f4d9092919063ffffffff16565b8473ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d360035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff168784604051602001610c7693929190611a6f565b604051602081830303815290604052604051610c929190611492565b60405180910390a260019150509392505050565b60085481565b6002602052805f5260405f205f915054906101000a900460ff1681565b5f610cd38461105c565b90509392505050565b5f5481565b610ce9610f16565b63389a75e1600c52805f526020600c208054421115610d0f57636f5e88185f526004601cfd5b5f815550610d1c81610f96565b50565b610d27610f16565b8060601b610d3c57637448fbae5f526004601cfd5b610d4581610f96565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7f5970a689000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610dd35750610dd28261111b565b5b9050919050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b5f6202a300905090565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610e48611194565b15610ec0577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610e8257630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610f13565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610f4b576382b429005f526004601cfd5b565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af13d1560015f51141716610f8d576390b8ec185f526004601cfd5b5f603452505050565b610f9e611194565b15611003577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550611059565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f8061106661051b565b90505f811180156110c05750806110bd3060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dda90919063ffffffff16565b10155b8015611113575060025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b915050919050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061118d575061118c82611198565b5b9050919050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61124681611212565b8114611250575f80fd5b50565b5f813590506112618161123d565b92915050565b5f6020828403121561127c5761127b61120a565b5b5f61128984828501611253565b91505092915050565b5f8115159050919050565b6112a681611292565b82525050565b5f6020820190506112bf5f83018461129d565b92915050565b5f819050919050565b6112d7816112c5565b82525050565b5f6020820190506112f05f8301846112ce565b92915050565b6112ff81611212565b82525050565b5f6020820190506113185f8301846112f6565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6113478261131e565b9050919050565b6113578161133d565b82525050565b5f6020820190506113705f83018461134e565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261139757611396611376565b5b8235905067ffffffffffffffff8111156113b4576113b361137a565b5b6020830191508360018202830111156113d0576113cf61137e565b5b9250929050565b5f80602083850312156113ed576113ec61120a565b5b5f83013567ffffffffffffffff81111561140a5761140961120e565b5b61141685828601611382565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61146482611422565b61146e818561142c565b935061147e81856020860161143c565b6114878161144a565b840191505092915050565b5f6020820190508181035f8301526114aa818461145a565b905092915050565b5f6080820190506114c55f8301876112ce565b6114d260208301866112ce565b6114df60408301856112ce565b6114ec60608301846112ce565b95945050505050565b6114fe8161133d565b8114611508575f80fd5b50565b5f81359050611519816114f5565b92915050565b5f805f604084860312156115365761153561120a565b5b5f6115438682870161150b565b935050602084013567ffffffffffffffff8111156115645761156361120e565b5b61157086828701611382565b92509250509250925092565b5f602082840312156115915761159061120a565b5b5f61159e8482850161150b565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6115de826112c5565b91506115e9836112c5565b9250828203905081811115611601576116006115a7565b5b92915050565b5f611611826112c5565b915061161c836112c5565b925082820261162a816112c5565b91508282048414831517611641576116406115a7565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f61167f826112c5565b915061168a836112c5565b92508261169a57611699611648565b5b828204905092915050565b5f6116af826112c5565b91506116ba836112c5565b92508282019050808211156116d2576116d16115a7565b5b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6117128261144a565b810181811067ffffffffffffffff82111715611731576117306116dc565b5b80604052505050565b5f611743611201565b905061174f8282611709565b919050565b5f80fd5b611761816112c5565b811461176b575f80fd5b50565b5f8135905061177c81611758565b92915050565b5f60a08284031215611797576117966116d8565b5b6117a160a061173a565b90505f6117b08482850161150b565b5f8301525060206117c38482850161176e565b60208301525060406117d78482850161176e565b60408301525060606117eb8482850161176e565b60608301525060806117ff8482850161176e565b60808301525092915050565b5f60a082840312156118205761181f61120a565b5b5f61182d84828501611782565b91505092915050565b5f6060820190506118495f83018661134e565b61185660208301856112ce565b61186360408301846112ce565b949350505050565b5f80fd5b5f67ffffffffffffffff821115611889576118886116dc565b5b6118928261144a565b9050602081019050919050565b828183375f83830152505050565b5f6118bf6118ba8461186f565b61173a565b9050828152602081018484840111156118db576118da61186b565b5b6118e684828561189f565b509392505050565b5f82601f83011261190257611901611376565b5b81356119128482602086016118ad565b91505092915050565b5f604082840312156119305761192f6116d8565b5b61193a604061173a565b90505f6119498482850161150b565b5f83015250602082013567ffffffffffffffff81111561196c5761196b611754565b5b611978848285016118ee565b60208301525092915050565b5f602082840312156119995761199861120a565b5b5f82013567ffffffffffffffff8111156119b6576119b561120e565b5b6119c28482850161191b565b91505092915050565b5f815190506119d981611758565b92915050565b5f602082840312156119f4576119f361120a565b5b5f611a01848285016119cb565b91505092915050565b5f8160601b9050919050565b5f611a2082611a0a565b9050919050565b5f611a3182611a16565b9050919050565b611a49611a448261133d565b611a27565b82525050565b5f819050919050565b611a69611a64826112c5565b611a4f565b82525050565b5f611a7a8286611a38565b601482019150611a8a8285611a38565b601482019150611a9a8284611a58565b602082019150819050949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b611ae1816112c5565b82525050565b602082015f820151611afb5f850182611ad8565b50505050565b5f602082019050611b145f830184611ae7565b92915050565b60038110611b2b57611b2a611aab565b5b50565b5f819050611b3b82611b1a565b919050565b5f611b4a82611b2e565b9050919050565b611b5a81611b40565b82525050565b611b698161133d565b82525050565b5f82825260208201905092915050565b5f611b8982611422565b611b938185611b6f565b9350611ba381856020860161143c565b611bac8161144a565b840191505092915050565b5f608083015f830151611bcc5f860182611b51565b506020830151611bdf6020860182611b60565b506040830151611bf26040860182611b60565b5060608301518482036060860152611c0a8282611b7f565b9150508091505092915050565b5f6020820190508181035f830152611c2f8184611bb7565b905092915050565b5f611c41826112c5565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611c7357611c726115a7565b5b60018201905091905056fea2646970667358221220f0478dd581ba0cfa3a9d6a7f556e0a4408663709607484acfcb56fa9be89d7cd64736f6c634300081a0033", e = class e extends B {
|
|
6
|
+
import { RegistryType as k } from "../utils.js";
|
|
7
|
+
const x = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b611d63806100bd5f395ff3fe608060405260043610610129575f3560e01c8063715018a6116100aa578063c884ef831161006e578063c884ef831461038c578063db09da12146103c8578063dcc59b6f14610404578063f04e283e1461042e578063f2fde38b1461044a578063fee81cf41461046657610129565b8063715018a6146102c557806375ef18d0146102cf5780638da5cb5b146102fc578063bb1757cf14610326578063c78da39a1461036257610129565b806338d52e0f116100f157806338d52e0f146101f1578063439fab911461021b578063474f5a44146102435780634e7165a21461027f57806354d1f13d146102bb57610129565b806301ffc9a71461012d57806307621eca14610169578063228cb7331461019357806325692962146101bd57806328d6183b146101c7575b5f80fd5b348015610138575f80fd5b50610153600480360381019061014e91906112c7565b6104a2565b604051610160919061130c565b60405180910390f35b348015610174575f80fd5b5061017d61051b565b60405161018a919061133d565b60405180910390f35b34801561019e575f80fd5b506101a76105c5565b6040516101b4919061133d565b60405180910390f35b6101c56105cb565b005b3480156101d2575f80fd5b506101db61061c565b6040516101e89190611365565b60405180910390f35b3480156101fc575f80fd5b50610205610643565b60405161021291906113bd565b60405180910390f35b348015610226575f80fd5b50610241600480360381019061023c9190611437565b610668565b005b34801561024e575f80fd5b5061026960048036038101906102649190611437565b610890565b604051610276919061130c565b60405180910390f35b34801561028a575f80fd5b506102a560048036038101906102a09190611437565b6109b9565b6040516102b291906114f2565b60405180910390f35b6102c3610a89565b005b6102cd610ac2565b005b3480156102da575f80fd5b506102e3610ad5565b6040516102f39493929190611512565b60405180910390f35b348015610307575f80fd5b50610310610af2565b60405161031d91906113bd565b60405180910390f35b348015610331575f80fd5b5061034c6004803603810190610347919061157f565b610b1a565b604051610359919061130c565b60405180910390f35b34801561036d575f80fd5b50610376610d06565b604051610383919061133d565b60405180910390f35b348015610397575f80fd5b506103b260048036038101906103ad91906115dc565b610d0c565b6040516103bf919061130c565b60405180910390f35b3480156103d3575f80fd5b506103ee60048036038101906103e9919061157f565b610d29565b6040516103fb919061130c565b60405180910390f35b34801561040f575f80fd5b50610418610d3c565b604051610425919061133d565b60405180910390f35b610448600480360381019061044391906115dc565b610d41565b005b610464600480360381019061045f91906115dc565b610d7f565b005b348015610471575f80fd5b5061048c600480360381019061048791906115dc565b610da8565b604051610499919061133d565b60405180910390f35b5f7fa39e44d9000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610514575061051382610dc1565b5b9050919050565b5f806004600201544261052e9190611634565b90505f61057b3060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610e3a90919063ffffffff16565b90505f610e10600460010154846105929190611667565b61059c91906116d5565b6004600301546105ac9190611705565b90508181116105bb57806105bd565b815b935050505090565b60015481565b5f6105d4610e6d565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7fa39e44d900000000000000000000000000000000000000000000000000000000905090565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f610671610e77565b905080546003825580156106a35760018160011c14303b1061069a5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f83838101906106b4919061186b565b90505f6106e330835f015173ffffffffffffffffffffffffffffffffffffffff16610e3a90919063ffffffff16565b9050816080015181101561073957815f01518183608001516040517f5c54305e00000000000000000000000000000000000000000000000000000000815260040161073093929190611896565b60405180910390fd5b5f8260200151148061074e57505f8260400151145b8061075c57505f8260600151145b8061076e575081602001518260800151105b156107a5576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815f015160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060405180608001604052808360400151815260200183606001518152602001428152602001836020015181525060045f820151815f0155602082015181600101556040820151816002015560608201518160030155905050816080015160088190555061085433610ea0565b5050801561088b576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f610899610f76565b5f83838101906108a991906119e4565b90505f81602001518060200190518101906108c49190611a3f565b9050610915825f01518260035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610fad9092919063ffffffff16565b815f015173ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d360035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16845f01518460405160200161098993929190611acf565b6040516020818303038152906040526040516109a591906114f2565b60405180910390a260019250505092915050565b60605f83838101906109cb919061186b565b90506040518060800160405280600160028111156109ec576109eb611b0b565b5b8152602001825f015173ffffffffffffffffffffffffffffffffffffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff16815260200160405180602001604052808460800151815250604051602001610a4f9190611b61565b604051602081830303815290604052815250604051602001610a719190611c77565b60405160208183030381529060405291505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610aca610f76565b610ad35f610ff6565b565b6004805f0154908060010154908060020154908060030154905084565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b5f610b23610f76565b610b2c846110bc565b610b6d57836040517f4139d81d000000000000000000000000000000000000000000000000000000008152600401610b649190611cba565b60405180910390fd5b600160025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505f80815480929190610bd390611ce6565b91905055505f610be161051b565b90504260046002018190555060045f01548111610c025760045f0154610c13565b60045f015481610c129190611634565b5b600460030181905550610c68858260035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610fad9092919063ffffffff16565b8473ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d360035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff168784604051602001610cd693929190611acf565b604051602081830303815290604052604051610cf291906114f2565b60405180910390a260019150509392505050565b60085481565b6002602052805f5260405f205f915054906101000a900460ff1681565b5f610d33846110bc565b90509392505050565b5f5481565b610d49610f76565b63389a75e1600c52805f526020600c208054421115610d6f57636f5e88185f526004601cfd5b5f815550610d7c81610ff6565b50565b610d87610f76565b8060601b610d9c57637448fbae5f526004601cfd5b610da581610ff6565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7f5970a689000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610e335750610e328261117b565b5b9050919050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b5f6202a300905090565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610ea86111f4565b15610f20577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610ee257630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610f73565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610fab576382b429005f526004601cfd5b565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af13d1560015f51141716610fed576390b8ec185f526004601cfd5b5f603452505050565b610ffe6111f4565b15611063577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b82178155506110b9565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f806110c661051b565b90505f8111801561112057508061111d3060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610e3a90919063ffffffff16565b10155b8015611173575060025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b915050919050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806111ed57506111ec826111f8565b5b9050919050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6112a681611272565b81146112b0575f80fd5b50565b5f813590506112c18161129d565b92915050565b5f602082840312156112dc576112db61126a565b5b5f6112e9848285016112b3565b91505092915050565b5f8115159050919050565b611306816112f2565b82525050565b5f60208201905061131f5f8301846112fd565b92915050565b5f819050919050565b61133781611325565b82525050565b5f6020820190506113505f83018461132e565b92915050565b61135f81611272565b82525050565b5f6020820190506113785f830184611356565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6113a78261137e565b9050919050565b6113b78161139d565b82525050565b5f6020820190506113d05f8301846113ae565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126113f7576113f66113d6565b5b8235905067ffffffffffffffff811115611414576114136113da565b5b6020830191508360018202830111156114305761142f6113de565b5b9250929050565b5f806020838503121561144d5761144c61126a565b5b5f83013567ffffffffffffffff81111561146a5761146961126e565b5b611476858286016113e2565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f6114c482611482565b6114ce818561148c565b93506114de81856020860161149c565b6114e7816114aa565b840191505092915050565b5f6020820190508181035f83015261150a81846114ba565b905092915050565b5f6080820190506115255f83018761132e565b611532602083018661132e565b61153f604083018561132e565b61154c606083018461132e565b95945050505050565b61155e8161139d565b8114611568575f80fd5b50565b5f8135905061157981611555565b92915050565b5f805f604084860312156115965761159561126a565b5b5f6115a38682870161156b565b935050602084013567ffffffffffffffff8111156115c4576115c361126e565b5b6115d0868287016113e2565b92509250509250925092565b5f602082840312156115f1576115f061126a565b5b5f6115fe8482850161156b565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61163e82611325565b915061164983611325565b925082820390508181111561166157611660611607565b5b92915050565b5f61167182611325565b915061167c83611325565b925082820261168a81611325565b915082820484148315176116a1576116a0611607565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6116df82611325565b91506116ea83611325565b9250826116fa576116f96116a8565b5b828204905092915050565b5f61170f82611325565b915061171a83611325565b925082820190508082111561173257611731611607565b5b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611772826114aa565b810181811067ffffffffffffffff821117156117915761179061173c565b5b80604052505050565b5f6117a3611261565b90506117af8282611769565b919050565b5f80fd5b6117c181611325565b81146117cb575f80fd5b50565b5f813590506117dc816117b8565b92915050565b5f60a082840312156117f7576117f6611738565b5b61180160a061179a565b90505f6118108482850161156b565b5f830152506020611823848285016117ce565b6020830152506040611837848285016117ce565b604083015250606061184b848285016117ce565b606083015250608061185f848285016117ce565b60808301525092915050565b5f60a082840312156118805761187f61126a565b5b5f61188d848285016117e2565b91505092915050565b5f6060820190506118a95f8301866113ae565b6118b6602083018561132e565b6118c3604083018461132e565b949350505050565b5f80fd5b5f67ffffffffffffffff8211156118e9576118e861173c565b5b6118f2826114aa565b9050602081019050919050565b828183375f83830152505050565b5f61191f61191a846118cf565b61179a565b90508281526020810184848401111561193b5761193a6118cb565b5b6119468482856118ff565b509392505050565b5f82601f830112611962576119616113d6565b5b813561197284826020860161190d565b91505092915050565b5f604082840312156119905761198f611738565b5b61199a604061179a565b90505f6119a98482850161156b565b5f83015250602082013567ffffffffffffffff8111156119cc576119cb6117b4565b5b6119d88482850161194e565b60208301525092915050565b5f602082840312156119f9576119f861126a565b5b5f82013567ffffffffffffffff811115611a1657611a1561126e565b5b611a228482850161197b565b91505092915050565b5f81519050611a39816117b8565b92915050565b5f60208284031215611a5457611a5361126a565b5b5f611a6184828501611a2b565b91505092915050565b5f8160601b9050919050565b5f611a8082611a6a565b9050919050565b5f611a9182611a76565b9050919050565b611aa9611aa48261139d565b611a87565b82525050565b5f819050919050565b611ac9611ac482611325565b611aaf565b82525050565b5f611ada8286611a98565b601482019150611aea8285611a98565b601482019150611afa8284611ab8565b602082019150819050949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b611b4181611325565b82525050565b602082015f820151611b5b5f850182611b38565b50505050565b5f602082019050611b745f830184611b47565b92915050565b60038110611b8b57611b8a611b0b565b5b50565b5f819050611b9b82611b7a565b919050565b5f611baa82611b8e565b9050919050565b611bba81611ba0565b82525050565b611bc98161139d565b82525050565b5f82825260208201905092915050565b5f611be982611482565b611bf38185611bcf565b9350611c0381856020860161149c565b611c0c816114aa565b840191505092915050565b5f608083015f830151611c2c5f860182611bb1565b506020830151611c3f6020860182611bc0565b506040830151611c526040860182611bc0565b5060608301518482036060860152611c6a8282611bdf565b9150508091505092915050565b5f6020820190508181035f830152611c8f8184611c17565b905092915050565b50565b5f611ca55f8361148c565b9150611cb082611c97565b5f82019050919050565b5f604082019050611ccd5f8301846113ae565b8181036020830152611cde81611c9a565b905092915050565b5f611cf082611325565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611d2257611d21611607565b5b60018201905091905056fea2646970667358221220996d0d5fbf9c0d3678da4b638e9510f94fadf42eb0e8c030e6ccc172bd24e06564736f6c634300081a0033", d = class d extends P {
|
|
7
8
|
constructor() {
|
|
8
9
|
super(...arguments), this.abi = t;
|
|
9
10
|
}
|
|
@@ -96,7 +97,7 @@ const P = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
96
97
|
* @returns {Promise<CGDAParameters>}
|
|
97
98
|
*/
|
|
98
99
|
async cgdaParams(f) {
|
|
99
|
-
const [b, a,
|
|
100
|
+
const [b, a, e, c] = await u(this._config, {
|
|
100
101
|
address: this.assertValidAddress(),
|
|
101
102
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
102
103
|
...f
|
|
@@ -104,7 +105,7 @@ const P = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
104
105
|
return {
|
|
105
106
|
rewardDecay: b,
|
|
106
107
|
rewardBoost: a,
|
|
107
|
-
lastClaimTime:
|
|
108
|
+
lastClaimTime: e,
|
|
108
109
|
currentReward: c
|
|
109
110
|
};
|
|
110
111
|
}
|
|
@@ -145,14 +146,14 @@ const P = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
145
146
|
* @returns {Promise<boolean>} - Returns true if successfully claimed
|
|
146
147
|
*/
|
|
147
148
|
async claimRaw(f, b) {
|
|
148
|
-
const { request: a, result:
|
|
149
|
+
const { request: a, result: e } = await m(this._config, {
|
|
149
150
|
address: this.assertValidAddress(),
|
|
150
151
|
args: [s(f)],
|
|
151
152
|
...this.optionallyAttachAccount(),
|
|
152
153
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
153
154
|
...b
|
|
154
155
|
});
|
|
155
|
-
return { hash: await
|
|
156
|
+
return { hash: await g(this._config, a), result: e };
|
|
156
157
|
}
|
|
157
158
|
/**
|
|
158
159
|
* Clawback assets from the incentive
|
|
@@ -176,7 +177,7 @@ const P = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
176
177
|
* @returns {Promise<boolean>} - True if the assets were successfully clawbacked
|
|
177
178
|
*/
|
|
178
179
|
async clawbackRaw(f, b) {
|
|
179
|
-
const { request: a, result:
|
|
180
|
+
const { request: a, result: e } = await p(
|
|
180
181
|
this._config,
|
|
181
182
|
{
|
|
182
183
|
address: this.assertValidAddress(),
|
|
@@ -186,7 +187,7 @@ const P = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
186
187
|
...b
|
|
187
188
|
}
|
|
188
189
|
);
|
|
189
|
-
return { hash: await A(this._config, a), result:
|
|
190
|
+
return { hash: await A(this._config, a), result: e };
|
|
190
191
|
}
|
|
191
192
|
/**
|
|
192
193
|
* Check if an incentive is claimable
|
|
@@ -216,7 +217,7 @@ const P = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
216
217
|
* @returns {Promise<bigint>} - The current reward
|
|
217
218
|
*/
|
|
218
219
|
async currentReward(f) {
|
|
219
|
-
return await
|
|
220
|
+
return await _(this._config, {
|
|
220
221
|
address: this.assertValidAddress(),
|
|
221
222
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
222
223
|
...f
|
|
@@ -231,28 +232,31 @@ const P = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
231
232
|
* @returns {GenericDeployableParams}
|
|
232
233
|
*/
|
|
233
234
|
buildParameters(f, b) {
|
|
234
|
-
const [a,
|
|
235
|
+
const [a, e] = this.validateDeploymentConfig(
|
|
235
236
|
f,
|
|
236
237
|
b
|
|
237
238
|
);
|
|
238
239
|
return {
|
|
239
240
|
abi: t,
|
|
240
|
-
bytecode:
|
|
241
|
-
args: [
|
|
242
|
-
...this.optionallyAttachAccount(
|
|
241
|
+
bytecode: x,
|
|
242
|
+
args: [C(a)],
|
|
243
|
+
...this.optionallyAttachAccount(e.account)
|
|
243
244
|
};
|
|
244
245
|
}
|
|
245
246
|
};
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
247
|
+
d.bases = {
|
|
248
|
+
...B,
|
|
249
|
+
31337: "0x47d4cF86829cAf2e410E7D08005e37b51B8c19A4"
|
|
250
|
+
}, d.registryType = k.INCENTIVE;
|
|
251
|
+
let r = d;
|
|
252
|
+
function C({
|
|
249
253
|
asset: i,
|
|
250
254
|
initialReward: f,
|
|
251
255
|
rewardDecay: b,
|
|
252
256
|
rewardBoost: a,
|
|
253
|
-
totalBudget:
|
|
257
|
+
totalBudget: e
|
|
254
258
|
}) {
|
|
255
|
-
return
|
|
259
|
+
return R(
|
|
256
260
|
[
|
|
257
261
|
{ type: "address", name: "asset" },
|
|
258
262
|
{ type: "uint256", name: "initialReward" },
|
|
@@ -260,12 +264,12 @@ function T({
|
|
|
260
264
|
{ type: "uint256", name: "rewardBoost" },
|
|
261
265
|
{ type: "uint256", name: "totalBudget" }
|
|
262
266
|
],
|
|
263
|
-
[i, f, b, a,
|
|
267
|
+
[i, f, b, a, e]
|
|
264
268
|
);
|
|
265
269
|
}
|
|
266
270
|
export {
|
|
267
271
|
r as CGDAIncentive,
|
|
268
272
|
t as cgdaIncentiveAbi,
|
|
269
|
-
|
|
273
|
+
C as prepareCGDAIncentivePayload
|
|
270
274
|
};
|
|
271
275
|
//# sourceMappingURL=CGDAIncentive.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CGDAIncentive.js","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":";;;;;kvdAwIaA,IAAN,MAAMA,UAAsBC,EAGjC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA2B/B,MAAa,MAAMC,GAAuD;AACjE,WAAA,MAAMC,EAAuB,KAAK,SAAS;AAAA,MAChD,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,OAAOA,GAAwD;AACnE,WAAA,MAAME,EAAwB,KAAK,SAAS;AAAA,MACjD,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,OAAOA,GAAwD;AACnE,WAAA,MAAMG,EAAwB,KAAK,SAAS;AAAA,MACjD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAIH;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAA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AACO,WAAA,MAAMsB,EAA+B,KAAK,SAAS;AAAA,MACxD,SAAS,KAAK,mBAAmB;AAAA;AAAA,MAEjC,GAAItB;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUgB,gBACduB,GACAC,GACyB;AACzB,UAAM,CAACX,GAASY,CAAO,IAAI,KAAK;AAAA,MAC9BF;AAAA,MACAC;AAAA,IAAA;AAEK,WAAA;AAAA,MACL,KAAKzB;AAAAA,MACL,UAAA2B;AAAA,MACA,MAAM,CAACC,EAA4Bd,CAAO,CAAC;AAAA,MAC3C,GAAG,KAAK,wBAAwBY,EAAQ,OAAO;AAAA,IAAA;AAAA,EAEnD;AACF;AAjSyB5B,EAAA,OAAgB,8CASvCA,EAAuB,eAA6B+B,EAAa;AArB5D,IAAMC,IAANhC;AA0TA,SAAS8B,EAA4B;AAAA,EAC1C,OAAAG;AAAA,EACA,eAAAC;AAAA,EACA,aAAAxB;AAAA,EACA,aAAAC;AAAA,EACA,aAAAwB;AACF,GAAyB;AAChB,SAAAC;AAAA,IACL;AAAA,MACE,EAAE,MAAM,WAAW,MAAM,QAAQ;AAAA,MACjC,EAAE,MAAM,WAAW,MAAM,gBAAgB;AAAA,MACzC,EAAE,MAAM,WAAW,MAAM,cAAc;AAAA,MACvC,EAAE,MAAM,WAAW,MAAM,cAAc;AAAA,MACvC,EAAE,MAAM,WAAW,MAAM,cAAc;AAAA,IACzC;AAAA,IACA,CAACH,GAAOC,GAAexB,GAAaC,GAAawB,CAAW;AAAA,EAAA;AAEhE;"}
|
|
1
|
+
{"version":3,"file":"CGDAIncentive.js","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 { CGDAIncentive as CGDAIncentiveBases } from '../../dist/deployments.json';\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 {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(CGDAIncentiveBases as Record<number, Address>),\n 31337: import.meta.env.VITE_CGDA_INCENTIVE_BASE,\n };\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","CGDAIncentiveBases","RegistryType","CGDAIncentive","asset","initialReward","totalBudget","encodeAbiParameters"],"mappings":";;;;;;gleAyIaA,IAAN,MAAMA,UAAsBC,EAGjC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA6B/B,MAAa,MAAMC,GAAuD;AACjE,WAAA,MAAMC,EAAuB,KAAK,SAAS;AAAA,MAChD,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,OAAOA,GAAwD;AACnE,WAAA,MAAME,EAAwB,KAAK,SAAS;AAAA,MACjD,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,OAAOA,GAAwD;AACnE,WAAA,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get<ERC1155IncentiveP
|
|
|
538
538
|
*
|
|
539
539
|
* @public
|
|
540
540
|
* @static
|
|
541
|
-
* @type {Address}
|
|
541
|
+
* @type {Record<number, Address>}
|
|
542
542
|
*/
|
|
543
|
-
static
|
|
543
|
+
static bases: Record<number, Address>;
|
|
544
544
|
/**
|
|
545
545
|
* @inheritdoc
|
|
546
546
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ERC1155Incentive.d.ts","sourceRoot":"","sources":["../../src/Incentives/ERC1155Incentive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAepB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,GAAG,EAGT,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,YAAY,EAElB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,YAAY,EACZ,KAAK,WAAW,EACjB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B;;;;;GAKG;AACH,oBAAY,mBAAmB;IAC7B,IAAI,IAAI;IACR,IAAI,IAAI;CACT;AAED;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;OAIG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,QAAQ,EAAE,mBAAmB,CAAC;IAC9B;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,SAAS,EAAE,GAAG,CAAC;CAChB;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,mBAAmB,CAC7B,KAA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