@boostxyz/sdk 0.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -0
- package/README.md +7 -0
- package/dist/Actions/Action.cjs +1 -0
- package/dist/Actions/Action.d.ts +31 -0
- package/dist/Actions/Action.d.ts.map +1 -0
- package/dist/Actions/Action.js +27 -0
- package/dist/Actions/ContractAction.d.ts +327 -0
- package/dist/Actions/ContractAction.d.ts.map +1 -0
- package/dist/Actions/ERC721MintAction.d.ts +486 -0
- package/dist/Actions/ERC721MintAction.d.ts.map +1 -0
- package/dist/Actions/EventAction.cjs +1 -0
- package/dist/Actions/EventAction.d.ts +433 -0
- package/dist/Actions/EventAction.d.ts.map +1 -0
- package/dist/Actions/EventAction.js +211 -0
- package/dist/AllowLists/AllowList.cjs +1 -0
- package/dist/AllowLists/AllowList.d.ts +33 -0
- package/dist/AllowLists/AllowList.d.ts.map +1 -0
- package/dist/AllowLists/AllowList.js +28 -0
- package/dist/AllowLists/SimpleAllowList.cjs +1 -0
- package/dist/AllowLists/SimpleAllowList.d.ts +452 -0
- package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -0
- package/dist/AllowLists/SimpleAllowList.js +138 -0
- package/dist/AllowLists/SimpleDenyList.cjs +1 -0
- package/dist/AllowLists/SimpleDenyList.d.ts +306 -0
- package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -0
- package/dist/AllowLists/SimpleDenyList.js +202 -0
- package/dist/Auth/Auth.cjs +1 -0
- package/dist/Auth/Auth.d.ts +10 -0
- package/dist/Auth/Auth.d.ts.map +1 -0
- package/dist/Auth/Auth.js +4 -0
- package/dist/Auth/PassthroughAuth.cjs +1 -0
- package/dist/Auth/PassthroughAuth.d.ts +51 -0
- package/dist/Auth/PassthroughAuth.d.ts.map +1 -0
- package/dist/Auth/PassthroughAuth.js +38 -0
- package/dist/Boost.cjs +1 -0
- package/dist/Boost.d.ts +142 -0
- package/dist/Boost.d.ts.map +1 -0
- package/dist/Boost.js +15 -0
- package/dist/BoostCore.cjs +2 -0
- package/dist/BoostCore.d.ts +460 -0
- package/dist/BoostCore.d.ts.map +1 -0
- package/dist/BoostCore.js +1105 -0
- package/dist/BoostRegistry.cjs +1 -0
- package/dist/BoostRegistry.d.ts +229 -0
- package/dist/BoostRegistry.d.ts.map +1 -0
- package/dist/BoostRegistry.js +250 -0
- package/dist/Budgets/Budget.cjs +1 -0
- package/dist/Budgets/Budget.d.ts +31 -0
- package/dist/Budgets/Budget.d.ts.map +1 -0
- package/dist/Budgets/Budget.js +27 -0
- package/dist/Budgets/ManagedBudget.cjs +1 -0
- package/dist/Budgets/ManagedBudget.d.ts +1065 -0
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -0
- package/dist/Budgets/ManagedBudget.js +498 -0
- package/dist/Budgets/SimpleBudget.d.ts +793 -0
- package/dist/Budgets/SimpleBudget.d.ts.map +1 -0
- package/dist/Budgets/VestingBudget.d.ts +726 -0
- package/dist/Budgets/VestingBudget.d.ts.map +1 -0
- package/dist/Deployable/Contract.cjs +1 -0
- package/dist/Deployable/Contract.d.ts +125 -0
- package/dist/Deployable/Contract.d.ts.map +1 -0
- package/dist/Deployable/Contract.js +149 -0
- package/dist/Deployable/Deployable.cjs +1 -0
- package/dist/Deployable/Deployable.d.ts +155 -0
- package/dist/Deployable/Deployable.d.ts.map +1 -0
- package/dist/Deployable/Deployable.js +124 -0
- package/dist/Deployable/DeployableTarget.cjs +1 -0
- package/dist/Deployable/DeployableTarget.d.ts +115 -0
- package/dist/Deployable/DeployableTarget.d.ts.map +1 -0
- package/dist/Deployable/DeployableTarget.js +128 -0
- package/dist/Incentives/AllowListIncentive.cjs +1 -0
- package/dist/Incentives/AllowListIncentive.d.ts +483 -0
- package/dist/Incentives/AllowListIncentive.d.ts.map +1 -0
- package/dist/Incentives/AllowListIncentive.js +188 -0
- package/dist/Incentives/CGDAIncentive.cjs +1 -0
- package/dist/Incentives/CGDAIncentive.d.ts +560 -0
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -0
- package/dist/Incentives/CGDAIncentive.js +249 -0
- package/dist/Incentives/ERC1155Incentive.d.ts +652 -0
- package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20Incentive.cjs +1 -0
- package/dist/Incentives/ERC20Incentive.d.ts +622 -0
- package/dist/Incentives/ERC20Incentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20Incentive.js +292 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts +545 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -0
- package/dist/Incentives/Incentive.cjs +1 -0
- package/dist/Incentives/Incentive.d.ts +39 -0
- package/dist/Incentives/Incentive.d.ts.map +1 -0
- package/dist/Incentives/Incentive.js +280 -0
- package/dist/Incentives/PointsIncentive.cjs +1 -0
- package/dist/Incentives/PointsIncentive.d.ts +615 -0
- package/dist/Incentives/PointsIncentive.d.ts.map +1 -0
- package/dist/Incentives/PointsIncentive.js +197 -0
- package/dist/Validators/SignerValidator.cjs +1 -0
- package/dist/Validators/SignerValidator.d.ts +452 -0
- package/dist/Validators/SignerValidator.d.ts.map +1 -0
- package/dist/Validators/SignerValidator.js +167 -0
- package/dist/Validators/Validator.cjs +1 -0
- package/dist/Validators/Validator.d.ts +31 -0
- package/dist/Validators/Validator.d.ts.map +1 -0
- package/dist/Validators/Validator.js +25 -0
- package/dist/errors.cjs +1 -0
- package/dist/errors.d.ts +257 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +161 -0
- package/dist/generated-BaaleHW-.cjs +2 -0
- package/dist/generated-x_abr3Yv.js +6228 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1355 -0
- package/dist/utils.cjs +1 -0
- package/dist/utils.d.ts +1454 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +643 -0
- package/package.json +197 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import { ac as t, ad as i, ae as n, af as o, ag as h, ah as l, ai as y, aj as u, ak as g, al as m, am as w, an as p, ao as A, ap as V } from "../generated-x_abr3Yv.js";
|
|
2
|
+
import { DeployableTarget as _ } from "../Deployable/DeployableTarget.js";
|
|
3
|
+
import { RegistryType as R, prepareClaimPayload as s, prepareCGDAIncentivePayload as B } from "../utils.js";
|
|
4
|
+
const x = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b611cb4806100bd5f395ff3fe608060405260043610610129575f3560e01c8063715018a6116100aa578063c884ef831161006e578063c884ef831461038c578063db09da12146103c8578063dcc59b6f14610404578063f04e283e1461042e578063f2fde38b1461044a578063fee81cf41461046657610129565b8063715018a6146102c557806375ef18d0146102cf5780638da5cb5b146102fc578063bb1757cf14610326578063c78da39a1461036257610129565b806338d52e0f116100f157806338d52e0f146101f1578063439fab911461021b578063474f5a44146102435780634e7165a21461027f57806354d1f13d146102bb57610129565b806301ffc9a71461012d57806307621eca14610169578063228cb7331461019357806325692962146101bd57806328d6183b146101c7575b5f80fd5b348015610138575f80fd5b50610153600480360381019061014e9190611267565b6104a2565b60405161016091906112ac565b60405180910390f35b348015610174575f80fd5b5061017d61051b565b60405161018a91906112dd565b60405180910390f35b34801561019e575f80fd5b506101a76105c5565b6040516101b491906112dd565b60405180910390f35b6101c56105cb565b005b3480156101d2575f80fd5b506101db61061c565b6040516101e89190611305565b60405180910390f35b3480156101fc575f80fd5b50610205610643565b604051610212919061135d565b60405180910390f35b348015610226575f80fd5b50610241600480360381019061023c91906113d7565b610668565b005b34801561024e575f80fd5b50610269600480360381019061026491906113d7565b610890565b60405161027691906112ac565b60405180910390f35b34801561028a575f80fd5b506102a560048036038101906102a091906113d7565b6109b9565b6040516102b29190611492565b60405180910390f35b6102c3610a89565b005b6102cd610ac2565b005b3480156102da575f80fd5b506102e3610ad5565b6040516102f394939291906114b2565b60405180910390f35b348015610307575f80fd5b50610310610af2565b60405161031d919061135d565b60405180910390f35b348015610331575f80fd5b5061034c6004803603810190610347919061151f565b610b1a565b60405161035991906112ac565b60405180910390f35b34801561036d575f80fd5b50610376610ca6565b60405161038391906112dd565b60405180910390f35b348015610397575f80fd5b506103b260048036038101906103ad919061157c565b610cac565b6040516103bf91906112ac565b60405180910390f35b3480156103d3575f80fd5b506103ee60048036038101906103e9919061151f565b610cc9565b6040516103fb91906112ac565b60405180910390f35b34801561040f575f80fd5b50610418610cdc565b60405161042591906112dd565b60405180910390f35b6104486004803603810190610443919061157c565b610ce1565b005b610464600480360381019061045f919061157c565b610d1f565b005b348015610471575f80fd5b5061048c6004803603810190610487919061157c565b610d48565b60405161049991906112dd565b60405180910390f35b5f7fa39e44d9000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610514575061051382610d61565b5b9050919050565b5f806004600201544261052e91906115d4565b90505f61057b3060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dda90919063ffffffff16565b90505f610e10600460010154846105929190611607565b61059c9190611675565b6004600301546105ac91906116a5565b90508181116105bb57806105bd565b815b935050505090565b60015481565b5f6105d4610e0d565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7fa39e44d900000000000000000000000000000000000000000000000000000000905090565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f610671610e17565b905080546003825580156106a35760018160011c14303b1061069a5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f83838101906106b4919061180b565b90505f6106e330835f015173ffffffffffffffffffffffffffffffffffffffff16610dda90919063ffffffff16565b9050816080015181101561073957815f01518183608001516040517f5c54305e00000000000000000000000000000000000000000000000000000000815260040161073093929190611836565b60405180910390fd5b5f8260200151148061074e57505f8260400151145b8061075c57505f8260600151145b8061076e575081602001518260800151105b156107a5576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815f015160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060405180608001604052808360400151815260200183606001518152602001428152602001836020015181525060045f820151815f0155602082015181600101556040820151816002015560608201518160030155905050816080015160088190555061085433610e40565b5050801561088b576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f610899610f16565b5f83838101906108a99190611984565b90505f81602001518060200190518101906108c491906119df565b9050610915825f01518260035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f4d9092919063ffffffff16565b815f015173ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d360035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16845f01518460405160200161098993929190611a6f565b6040516020818303038152906040526040516109a59190611492565b60405180910390a260019250505092915050565b60605f83838101906109cb919061180b565b90506040518060800160405280600160028111156109ec576109eb611aab565b5b8152602001825f015173ffffffffffffffffffffffffffffffffffffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff16815260200160405180602001604052808460800151815250604051602001610a4f9190611b01565b604051602081830303815290604052815250604051602001610a719190611c17565b60405160208183030381529060405291505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610aca610f16565b610ad35f610f96565b565b6004805f0154908060010154908060020154908060030154905084565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b5f610b23610f16565b610b2c8461105c565b610b62576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80815480929190610b7390611c37565b91905055505f610b8161051b565b90504260046002018190555060045f01548111610ba25760045f0154610bb3565b60045f015481610bb291906115d4565b5b600460030181905550610c08858260035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f4d9092919063ffffffff16565b8473ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d360035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff168784604051602001610c7693929190611a6f565b604051602081830303815290604052604051610c929190611492565b60405180910390a260019150509392505050565b60085481565b6002602052805f5260405f205f915054906101000a900460ff1681565b5f610cd38461105c565b90509392505050565b5f5481565b610ce9610f16565b63389a75e1600c52805f526020600c208054421115610d0f57636f5e88185f526004601cfd5b5f815550610d1c81610f96565b50565b610d27610f16565b8060601b610d3c57637448fbae5f526004601cfd5b610d4581610f96565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7f5970a689000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610dd35750610dd28261111b565b5b9050919050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b5f6202a300905090565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610e48611194565b15610ec0577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610e8257630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610f13565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610f4b576382b429005f526004601cfd5b565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af13d1560015f51141716610f8d576390b8ec185f526004601cfd5b5f603452505050565b610f9e611194565b15611003577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550611059565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f8061106661051b565b90505f811180156110c05750806110bd3060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dda90919063ffffffff16565b10155b8015611113575060025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b915050919050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061118d575061118c82611198565b5b9050919050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61124681611212565b8114611250575f80fd5b50565b5f813590506112618161123d565b92915050565b5f6020828403121561127c5761127b61120a565b5b5f61128984828501611253565b91505092915050565b5f8115159050919050565b6112a681611292565b82525050565b5f6020820190506112bf5f83018461129d565b92915050565b5f819050919050565b6112d7816112c5565b82525050565b5f6020820190506112f05f8301846112ce565b92915050565b6112ff81611212565b82525050565b5f6020820190506113185f8301846112f6565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6113478261131e565b9050919050565b6113578161133d565b82525050565b5f6020820190506113705f83018461134e565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261139757611396611376565b5b8235905067ffffffffffffffff8111156113b4576113b361137a565b5b6020830191508360018202830111156113d0576113cf61137e565b5b9250929050565b5f80602083850312156113ed576113ec61120a565b5b5f83013567ffffffffffffffff81111561140a5761140961120e565b5b61141685828601611382565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61146482611422565b61146e818561142c565b935061147e81856020860161143c565b6114878161144a565b840191505092915050565b5f6020820190508181035f8301526114aa818461145a565b905092915050565b5f6080820190506114c55f8301876112ce565b6114d260208301866112ce565b6114df60408301856112ce565b6114ec60608301846112ce565b95945050505050565b6114fe8161133d565b8114611508575f80fd5b50565b5f81359050611519816114f5565b92915050565b5f805f604084860312156115365761153561120a565b5b5f6115438682870161150b565b935050602084013567ffffffffffffffff8111156115645761156361120e565b5b61157086828701611382565b92509250509250925092565b5f602082840312156115915761159061120a565b5b5f61159e8482850161150b565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6115de826112c5565b91506115e9836112c5565b9250828203905081811115611601576116006115a7565b5b92915050565b5f611611826112c5565b915061161c836112c5565b925082820261162a816112c5565b91508282048414831517611641576116406115a7565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f61167f826112c5565b915061168a836112c5565b92508261169a57611699611648565b5b828204905092915050565b5f6116af826112c5565b91506116ba836112c5565b92508282019050808211156116d2576116d16115a7565b5b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6117128261144a565b810181811067ffffffffffffffff82111715611731576117306116dc565b5b80604052505050565b5f611743611201565b905061174f8282611709565b919050565b5f80fd5b611761816112c5565b811461176b575f80fd5b50565b5f8135905061177c81611758565b92915050565b5f60a08284031215611797576117966116d8565b5b6117a160a061173a565b90505f6117b08482850161150b565b5f8301525060206117c38482850161176e565b60208301525060406117d78482850161176e565b60408301525060606117eb8482850161176e565b60608301525060806117ff8482850161176e565b60808301525092915050565b5f60a082840312156118205761181f61120a565b5b5f61182d84828501611782565b91505092915050565b5f6060820190506118495f83018661134e565b61185660208301856112ce565b61186360408301846112ce565b949350505050565b5f80fd5b5f67ffffffffffffffff821115611889576118886116dc565b5b6118928261144a565b9050602081019050919050565b828183375f83830152505050565b5f6118bf6118ba8461186f565b61173a565b9050828152602081018484840111156118db576118da61186b565b5b6118e684828561189f565b509392505050565b5f82601f83011261190257611901611376565b5b81356119128482602086016118ad565b91505092915050565b5f604082840312156119305761192f6116d8565b5b61193a604061173a565b90505f6119498482850161150b565b5f83015250602082013567ffffffffffffffff81111561196c5761196b611754565b5b611978848285016118ee565b60208301525092915050565b5f602082840312156119995761199861120a565b5b5f82013567ffffffffffffffff8111156119b6576119b561120e565b5b6119c28482850161191b565b91505092915050565b5f815190506119d981611758565b92915050565b5f602082840312156119f4576119f361120a565b5b5f611a01848285016119cb565b91505092915050565b5f8160601b9050919050565b5f611a2082611a0a565b9050919050565b5f611a3182611a16565b9050919050565b611a49611a448261133d565b611a27565b82525050565b5f819050919050565b611a69611a64826112c5565b611a4f565b82525050565b5f611a7a8286611a38565b601482019150611a8a8285611a38565b601482019150611a9a8284611a58565b602082019150819050949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b611ae1816112c5565b82525050565b602082015f820151611afb5f850182611ad8565b50505050565b5f602082019050611b145f830184611ae7565b92915050565b60038110611b2b57611b2a611aab565b5b50565b5f819050611b3b82611b1a565b919050565b5f611b4a82611b2e565b9050919050565b611b5a81611b40565b82525050565b611b698161133d565b82525050565b5f82825260208201905092915050565b5f611b8982611422565b611b938185611b6f565b9350611ba381856020860161143c565b611bac8161144a565b840191505092915050565b5f608083015f830151611bcc5f860182611b51565b506020830151611bdf6020860182611b60565b506040830151611bf26040860182611b60565b5060608301518482036060860152611c0a8282611b7f565b9150508091505092915050565b5f6020820190508181035f830152611c2f8184611bb7565b905092915050565b5f611c41826112c5565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611c7357611c726115a7565b5b60018201905091905056fea2646970667358221220f0478dd581ba0cfa3a9d6a7f556e0a4408663709607484acfcb56fa9be89d7cd64736f6c634300081a0033", c = class c extends _ {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments), this.abi = t;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The incentive's owner.
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
* @async
|
|
13
|
+
* @param {?ReadParams<typeof cgdaIncentiveAbi, 'owner'>} [params]
|
|
14
|
+
* @returns {unknown}
|
|
15
|
+
*/
|
|
16
|
+
async owner(f) {
|
|
17
|
+
return i(this._config, {
|
|
18
|
+
address: this.assertValidAddress(),
|
|
19
|
+
args: [],
|
|
20
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
21
|
+
...f
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The number of claims that have been made
|
|
26
|
+
*
|
|
27
|
+
* @public
|
|
28
|
+
* @async
|
|
29
|
+
* @param {?ReadParams<typeof cgdaIncentiveAbi, 'claims'>} [params]
|
|
30
|
+
* @returns {Promise<bigint>}
|
|
31
|
+
*/
|
|
32
|
+
async claims(f) {
|
|
33
|
+
return n(this._config, {
|
|
34
|
+
address: this.assertValidAddress(),
|
|
35
|
+
args: [],
|
|
36
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
37
|
+
...f
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The reward amount issued for each claim
|
|
42
|
+
*
|
|
43
|
+
* @public
|
|
44
|
+
* @async
|
|
45
|
+
* @param {?ReadParams<typeof allowListIncentiveAbi, 'reward'>} [params]
|
|
46
|
+
* @returns {Promise<bigint>}
|
|
47
|
+
*/
|
|
48
|
+
async reward(f) {
|
|
49
|
+
return o(this._config, {
|
|
50
|
+
address: this.assertValidAddress(),
|
|
51
|
+
args: [],
|
|
52
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
53
|
+
...f
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Get the claim status for a user
|
|
58
|
+
*
|
|
59
|
+
* @public
|
|
60
|
+
* @async
|
|
61
|
+
* @param {Address} address
|
|
62
|
+
* @param {?ReadParams<typeof cgdaIncentiveAbi, 'claimed'>} [params]
|
|
63
|
+
* @returns {Promise<boolean>}
|
|
64
|
+
*/
|
|
65
|
+
async claimed(f, b) {
|
|
66
|
+
return h(this._config, {
|
|
67
|
+
address: this.assertValidAddress(),
|
|
68
|
+
args: [f],
|
|
69
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
70
|
+
...b
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The CGDA-like token used for the incentive
|
|
75
|
+
*
|
|
76
|
+
* @public
|
|
77
|
+
* @async
|
|
78
|
+
* @param {?ReadParams<typeof cgdaIncentiveAbi, 'asset'>} [params]
|
|
79
|
+
* @returns {unknown}
|
|
80
|
+
*/
|
|
81
|
+
async asset(f) {
|
|
82
|
+
return l(this._config, {
|
|
83
|
+
address: this.assertValidAddress(),
|
|
84
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
85
|
+
...f
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* The configuration parameters for the CGDAIncentive
|
|
90
|
+
*
|
|
91
|
+
* @public
|
|
92
|
+
* @async
|
|
93
|
+
* @param {?ReadParams<typeof cgdaIncentiveAbi, 'cgdaParams'>} [params]
|
|
94
|
+
* @returns {Promise<CGDAParameters>}
|
|
95
|
+
*/
|
|
96
|
+
async cgdaParams(f) {
|
|
97
|
+
const [b, a, d, e] = await y(this._config, {
|
|
98
|
+
address: this.assertValidAddress(),
|
|
99
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
100
|
+
...f
|
|
101
|
+
});
|
|
102
|
+
return {
|
|
103
|
+
rewardDecay: b,
|
|
104
|
+
rewardBoost: a,
|
|
105
|
+
lastClaimTime: d,
|
|
106
|
+
currentReward: e
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* The total budget of the incentive
|
|
111
|
+
*
|
|
112
|
+
* @public
|
|
113
|
+
* @async
|
|
114
|
+
* @param {?ReadParams<typeof cgdaIncentiveAbi, 'totalBudget'>} [params]
|
|
115
|
+
* @returns {Promise<bigint>}
|
|
116
|
+
*/
|
|
117
|
+
async totalBudget(f) {
|
|
118
|
+
return u(this._config, {
|
|
119
|
+
address: this.assertValidAddress(),
|
|
120
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
121
|
+
...f
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Claim the incentive
|
|
126
|
+
*
|
|
127
|
+
* @public
|
|
128
|
+
* @async
|
|
129
|
+
* @param {ClaimPayload} payload
|
|
130
|
+
* @param {?WriteParams<typeof cgdaIncentiveAbi, 'claim'>} [params]
|
|
131
|
+
* @returns {Promise<boolean>} - Returns true if successfully claimed
|
|
132
|
+
*/
|
|
133
|
+
async claim(f, b) {
|
|
134
|
+
return this.awaitResult(this.claimRaw(f, b));
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Claim the incentive
|
|
138
|
+
*
|
|
139
|
+
* @public
|
|
140
|
+
* @async
|
|
141
|
+
* @param {ClaimPayload} payload
|
|
142
|
+
* @param {?WriteParams<typeof cgdaIncentiveAbi, 'claim'>} [params]
|
|
143
|
+
* @returns {Promise<boolean>} - Returns true if successfully claimed
|
|
144
|
+
*/
|
|
145
|
+
async claimRaw(f, b) {
|
|
146
|
+
const { request: a, result: d } = await g(this._config, {
|
|
147
|
+
address: this.assertValidAddress(),
|
|
148
|
+
args: [s(f)],
|
|
149
|
+
...this.optionallyAttachAccount(),
|
|
150
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
151
|
+
...b
|
|
152
|
+
});
|
|
153
|
+
return { hash: await m(this._config, a), result: d };
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Clawback assets from the incentive
|
|
157
|
+
*
|
|
158
|
+
* @public
|
|
159
|
+
* @async
|
|
160
|
+
* @param {ClaimPayload} payload
|
|
161
|
+
* @param {?WriteParams<typeof cgdaIncentiveAbi, 'clawback'>} [params]
|
|
162
|
+
* @returns {Promise<boolean>} - True if the assets were successfully clawbacked
|
|
163
|
+
*/
|
|
164
|
+
async clawback(f, b) {
|
|
165
|
+
return this.awaitResult(this.clawbackRaw(f, b));
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Clawback assets from the incentive
|
|
169
|
+
*
|
|
170
|
+
* @public
|
|
171
|
+
* @async
|
|
172
|
+
* @param {ClaimPayload} payload
|
|
173
|
+
* @param {?WriteParams<typeof cgdaIncentiveAbi, 'clawback'>} [params]
|
|
174
|
+
* @returns {Promise<boolean>} - True if the assets were successfully clawbacked
|
|
175
|
+
*/
|
|
176
|
+
async clawbackRaw(f, b) {
|
|
177
|
+
const { request: a, result: d } = await w(
|
|
178
|
+
this._config,
|
|
179
|
+
{
|
|
180
|
+
address: this.assertValidAddress(),
|
|
181
|
+
args: [s(f)],
|
|
182
|
+
...this.optionallyAttachAccount(),
|
|
183
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
184
|
+
...b
|
|
185
|
+
}
|
|
186
|
+
);
|
|
187
|
+
return { hash: await p(this._config, a), result: d };
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Check if an incentive is claimable
|
|
191
|
+
*
|
|
192
|
+
* @public
|
|
193
|
+
* @async
|
|
194
|
+
* @param {ClaimPayload} payload
|
|
195
|
+
* @param {?ReadParams<typeof cgdaIncentiveAbi, 'isClaimable'>} [params]
|
|
196
|
+
* @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload
|
|
197
|
+
*/
|
|
198
|
+
async isClaimable(f, b) {
|
|
199
|
+
return A(this._config, {
|
|
200
|
+
address: this.assertValidAddress(),
|
|
201
|
+
args: [s(f)],
|
|
202
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
203
|
+
...b
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Calculates the current reward based on the time since the last claim.
|
|
208
|
+
* 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.
|
|
209
|
+
* 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)`
|
|
210
|
+
*
|
|
211
|
+
* @public
|
|
212
|
+
* @async
|
|
213
|
+
* @param {?ReadParams<typeof cgdaIncentiveAbi, 'currentReward'>} [params]
|
|
214
|
+
* @returns {Promise<bigint>} - The current reward
|
|
215
|
+
*/
|
|
216
|
+
async currentReward(f) {
|
|
217
|
+
return V(this._config, {
|
|
218
|
+
address: this.assertValidAddress(),
|
|
219
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
220
|
+
...f
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* @inheritdoc
|
|
225
|
+
*
|
|
226
|
+
* @public
|
|
227
|
+
* @param {?CGDAIncentivePayload} [_payload]
|
|
228
|
+
* @param {?DeployableOptions} [_options]
|
|
229
|
+
* @returns {GenericDeployableParams}
|
|
230
|
+
*/
|
|
231
|
+
buildParameters(f, b) {
|
|
232
|
+
const [a, d] = this.validateDeploymentConfig(
|
|
233
|
+
f,
|
|
234
|
+
b
|
|
235
|
+
);
|
|
236
|
+
return {
|
|
237
|
+
abi: t,
|
|
238
|
+
bytecode: x,
|
|
239
|
+
args: [B(a)],
|
|
240
|
+
...this.optionallyAttachAccount(d.account)
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
c.base = "0x147c3aBFF7Ab7867B206A8c652Cd59D3BE41Dc3E", c.registryType = R.INCENTIVE;
|
|
245
|
+
let r = c;
|
|
246
|
+
export {
|
|
247
|
+
r as CGDAIncentive,
|
|
248
|
+
t as cgdaIncentiveAbi
|
|
249
|
+
};
|