@boostxyz/sdk 0.0.0-alpha.2 → 0.0.0-alpha.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (271) hide show
  1. package/dist/Actions/Action.cjs +2 -1
  2. package/dist/Actions/Action.cjs.map +1 -0
  3. package/dist/Actions/Action.d.ts +1 -1
  4. package/dist/Actions/Action.d.ts.map +1 -1
  5. package/dist/Actions/Action.js +14 -12
  6. package/dist/Actions/Action.js.map +1 -0
  7. package/dist/Actions/ContractAction.d.ts +57 -14
  8. package/dist/Actions/ContractAction.d.ts.map +1 -1
  9. package/dist/Actions/ERC721MintAction.d.ts +50 -23
  10. package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
  11. package/dist/Actions/EventAction.cjs +2 -1
  12. package/dist/Actions/EventAction.cjs.map +1 -0
  13. package/dist/Actions/EventAction.d.ts +405 -36
  14. package/dist/Actions/EventAction.d.ts.map +1 -1
  15. package/dist/Actions/EventAction.js +15 -209
  16. package/dist/Actions/EventAction.js.map +1 -0
  17. package/dist/AllowLists/AllowList.cjs +2 -1
  18. package/dist/AllowLists/AllowList.cjs.map +1 -0
  19. package/dist/AllowLists/AllowList.d.ts +6 -5
  20. package/dist/AllowLists/AllowList.d.ts.map +1 -1
  21. package/dist/AllowLists/AllowList.js +46 -22
  22. package/dist/AllowLists/AllowList.js.map +1 -0
  23. package/dist/AllowLists/OpenAllowList.d.ts +423 -0
  24. package/dist/AllowLists/OpenAllowList.d.ts.map +1 -0
  25. package/dist/AllowLists/SimpleAllowList.cjs +2 -1
  26. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -0
  27. package/dist/AllowLists/SimpleAllowList.d.ts +124 -40
  28. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
  29. package/dist/AllowLists/SimpleAllowList.js +77 -77
  30. package/dist/AllowLists/SimpleAllowList.js.map +1 -0
  31. package/dist/AllowLists/SimpleDenyList.cjs +2 -1
  32. package/dist/AllowLists/SimpleDenyList.cjs.map +1 -0
  33. package/dist/AllowLists/SimpleDenyList.d.ts +234 -13
  34. package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
  35. package/dist/AllowLists/SimpleDenyList.js +12 -200
  36. package/dist/AllowLists/SimpleDenyList.js.map +1 -0
  37. package/dist/Auth/Auth.cjs +1 -0
  38. package/dist/Auth/Auth.cjs.map +1 -0
  39. package/dist/Auth/Auth.js +1 -0
  40. package/dist/Auth/Auth.js.map +1 -0
  41. package/dist/Auth/PassthroughAuth.cjs +2 -1
  42. package/dist/Auth/PassthroughAuth.cjs.map +1 -0
  43. package/dist/Auth/PassthroughAuth.js +5 -4
  44. package/dist/Auth/PassthroughAuth.js.map +1 -0
  45. package/dist/Boost.cjs +2 -1
  46. package/dist/Boost.cjs.map +1 -0
  47. package/dist/Boost.d.ts +111 -1
  48. package/dist/Boost.d.ts.map +1 -1
  49. package/dist/Boost.js +140 -5
  50. package/dist/Boost.js.map +1 -0
  51. package/dist/BoostCore-3-U1xTQN.cjs +3 -0
  52. package/dist/BoostCore-3-U1xTQN.cjs.map +1 -0
  53. package/dist/BoostCore-DVGBUr2y.js +1477 -0
  54. package/dist/BoostCore-DVGBUr2y.js.map +1 -0
  55. package/dist/BoostCore.cjs +2 -2
  56. package/dist/BoostCore.cjs.map +1 -0
  57. package/dist/BoostCore.d.ts +166 -43
  58. package/dist/BoostCore.d.ts.map +1 -1
  59. package/dist/BoostCore.js +30 -1103
  60. package/dist/BoostCore.js.map +1 -0
  61. package/dist/BoostRegistry.cjs +2 -1
  62. package/dist/BoostRegistry.cjs.map +1 -0
  63. package/dist/BoostRegistry.d.ts +64 -23
  64. package/dist/BoostRegistry.d.ts.map +1 -1
  65. package/dist/BoostRegistry.js +162 -88
  66. package/dist/BoostRegistry.js.map +1 -0
  67. package/dist/Budgets/Budget.cjs +2 -1
  68. package/dist/Budgets/Budget.cjs.map +1 -0
  69. package/dist/Budgets/Budget.d.ts +1 -1
  70. package/dist/Budgets/Budget.d.ts.map +1 -1
  71. package/dist/Budgets/Budget.js +15 -13
  72. package/dist/Budgets/Budget.js.map +1 -0
  73. package/dist/Budgets/ManagedBudget.cjs +2 -1
  74. package/dist/Budgets/ManagedBudget.cjs.map +1 -0
  75. package/dist/Budgets/ManagedBudget.d.ts +78 -188
  76. package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
  77. package/dist/Budgets/ManagedBudget.js +86 -286
  78. package/dist/Budgets/ManagedBudget.js.map +1 -0
  79. package/dist/Budgets/VestingBudget.d.ts +243 -87
  80. package/dist/Budgets/VestingBudget.d.ts.map +1 -1
  81. package/dist/Deployable/Contract.cjs +2 -1
  82. package/dist/Deployable/Contract.cjs.map +1 -0
  83. package/dist/Deployable/Contract.d.ts +4 -5
  84. package/dist/Deployable/Contract.d.ts.map +1 -1
  85. package/dist/Deployable/Contract.js +7 -8
  86. package/dist/Deployable/Contract.js.map +1 -0
  87. package/dist/Deployable/Deployable.cjs +1 -0
  88. package/dist/Deployable/Deployable.cjs.map +1 -0
  89. package/dist/Deployable/Deployable.d.ts +9 -3
  90. package/dist/Deployable/Deployable.d.ts.map +1 -1
  91. package/dist/Deployable/Deployable.js +10 -5
  92. package/dist/Deployable/Deployable.js.map +1 -0
  93. package/dist/Deployable/DeployableTarget.cjs +2 -1
  94. package/dist/Deployable/DeployableTarget.cjs.map +1 -0
  95. package/dist/Deployable/DeployableTarget.d.ts +16 -15
  96. package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
  97. package/dist/Deployable/DeployableTarget.js +49 -42
  98. package/dist/Deployable/DeployableTarget.js.map +1 -0
  99. package/dist/Deployable/DeployableTargetWithRBAC.cjs +2 -0
  100. package/dist/Deployable/DeployableTargetWithRBAC.cjs.map +1 -0
  101. package/dist/Deployable/DeployableTargetWithRBAC.d.ts +179 -0
  102. package/dist/Deployable/DeployableTargetWithRBAC.d.ts.map +1 -0
  103. package/dist/Deployable/DeployableTargetWithRBAC.js +222 -0
  104. package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -0
  105. package/dist/EventAction-CIPqmAoP.js +1450 -0
  106. package/dist/EventAction-CIPqmAoP.js.map +1 -0
  107. package/dist/EventAction-d-oeqZQs.cjs +2 -0
  108. package/dist/EventAction-d-oeqZQs.cjs.map +1 -0
  109. package/dist/Incentive-Bp8Sez7M.js +298 -0
  110. package/dist/Incentive-Bp8Sez7M.js.map +1 -0
  111. package/dist/Incentive-Djnzseoj.cjs +2 -0
  112. package/dist/Incentive-Djnzseoj.cjs.map +1 -0
  113. package/dist/Incentives/AllowListIncentive.cjs +2 -1
  114. package/dist/Incentives/AllowListIncentive.cjs.map +1 -0
  115. package/dist/Incentives/AllowListIncentive.d.ts +49 -19
  116. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
  117. package/dist/Incentives/AllowListIncentive.js +50 -34
  118. package/dist/Incentives/AllowListIncentive.js.map +1 -0
  119. package/dist/Incentives/CGDAIncentive.cjs +2 -1
  120. package/dist/Incentives/CGDAIncentive.cjs.map +1 -0
  121. package/dist/Incentives/CGDAIncentive.d.ts +118 -22
  122. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
  123. package/dist/Incentives/CGDAIncentive.js +67 -42
  124. package/dist/Incentives/CGDAIncentive.js.map +1 -0
  125. package/dist/Incentives/ERC1155Incentive.d.ts +99 -38
  126. package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
  127. package/dist/Incentives/ERC20Incentive.cjs +2 -1
  128. package/dist/Incentives/ERC20Incentive.cjs.map +1 -0
  129. package/dist/Incentives/ERC20Incentive.d.ts +73 -29
  130. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
  131. package/dist/Incentives/ERC20Incentive.js +71 -48
  132. package/dist/Incentives/ERC20Incentive.js.map +1 -0
  133. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts +523 -0
  134. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -0
  135. package/dist/Incentives/ERC20VariableIncentive.d.ts +65 -28
  136. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  137. package/dist/Incentives/Incentive.cjs +2 -1
  138. package/dist/Incentives/Incentive.cjs.map +1 -0
  139. package/dist/Incentives/Incentive.d.ts +4 -7
  140. package/dist/Incentives/Incentive.d.ts.map +1 -1
  141. package/dist/Incentives/Incentive.js +17 -278
  142. package/dist/Incentives/Incentive.js.map +1 -0
  143. package/dist/Incentives/PointsIncentive.cjs +2 -1
  144. package/dist/Incentives/PointsIncentive.cjs.map +1 -0
  145. package/dist/Incentives/PointsIncentive.d.ts +65 -21
  146. package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
  147. package/dist/Incentives/PointsIncentive.js +57 -36
  148. package/dist/Incentives/PointsIncentive.js.map +1 -0
  149. package/dist/SimpleDenyList-BwfNjRsg.cjs +2 -0
  150. package/dist/SimpleDenyList-BwfNjRsg.cjs.map +1 -0
  151. package/dist/SimpleDenyList-Cn5WpNn0.js +132 -0
  152. package/dist/SimpleDenyList-Cn5WpNn0.js.map +1 -0
  153. package/dist/Validators/SignerValidator.cjs +2 -1
  154. package/dist/Validators/SignerValidator.cjs.map +1 -0
  155. package/dist/Validators/SignerValidator.d.ts +310 -17
  156. package/dist/Validators/SignerValidator.d.ts.map +1 -1
  157. package/dist/Validators/SignerValidator.js +165 -36
  158. package/dist/Validators/SignerValidator.js.map +1 -0
  159. package/dist/Validators/Validator.cjs +2 -1
  160. package/dist/Validators/Validator.cjs.map +1 -0
  161. package/dist/Validators/Validator.d.ts +2 -2
  162. package/dist/Validators/Validator.d.ts.map +1 -1
  163. package/dist/Validators/Validator.js +12 -10
  164. package/dist/Validators/Validator.js.map +1 -0
  165. package/dist/claiming.cjs +2 -0
  166. package/dist/claiming.cjs.map +1 -0
  167. package/dist/claiming.d.ts +43 -0
  168. package/dist/claiming.d.ts.map +1 -0
  169. package/dist/claiming.js +17 -0
  170. package/dist/claiming.js.map +1 -0
  171. package/dist/componentInterfaces-D09mhzxO.cjs +2 -0
  172. package/dist/componentInterfaces-D09mhzxO.cjs.map +1 -0
  173. package/dist/componentInterfaces-RXBMI5yH.js +14 -0
  174. package/dist/componentInterfaces-RXBMI5yH.js.map +1 -0
  175. package/dist/deployments-BM42vImE.js +43 -0
  176. package/dist/deployments-BM42vImE.js.map +1 -0
  177. package/dist/deployments-CMdF5uEC.cjs +2 -0
  178. package/dist/deployments-CMdF5uEC.cjs.map +1 -0
  179. package/dist/deployments.json +41 -0
  180. package/dist/errors.cjs +2 -1
  181. package/dist/errors.cjs.map +1 -0
  182. package/dist/errors.d.ts +403 -1
  183. package/dist/errors.d.ts.map +1 -1
  184. package/dist/errors.js +285 -39
  185. package/dist/errors.js.map +1 -0
  186. package/dist/generated-B0tk-c9b.cjs +3 -0
  187. package/dist/generated-B0tk-c9b.cjs.map +1 -0
  188. package/dist/{generated-x_abr3Yv.js → generated-B7VaSah4.js} +2058 -2541
  189. package/dist/generated-B7VaSah4.js.map +1 -0
  190. package/dist/index.cjs +2 -1
  191. package/dist/index.cjs.map +1 -0
  192. package/dist/index.d.ts +10 -9
  193. package/dist/index.d.ts.map +1 -1
  194. package/dist/index.js +143 -1353
  195. package/dist/index.js.map +1 -0
  196. package/dist/transfers.cjs +2 -0
  197. package/dist/transfers.cjs.map +1 -0
  198. package/dist/transfers.d.ts +198 -0
  199. package/dist/transfers.d.ts.map +1 -0
  200. package/dist/transfers.js +84 -0
  201. package/dist/transfers.js.map +1 -0
  202. package/dist/utils.cjs +2 -1
  203. package/dist/utils.cjs.map +1 -0
  204. package/dist/utils.d.ts +26 -1350
  205. package/dist/utils.d.ts.map +1 -1
  206. package/dist/utils.js +38 -636
  207. package/dist/utils.js.map +1 -0
  208. package/package.json +37 -11
  209. package/src/Actions/Action.test.ts +79 -0
  210. package/src/Actions/Action.ts +61 -0
  211. package/src/Actions/ContractAction.test.ts +197 -0
  212. package/src/Actions/ContractAction.ts +300 -0
  213. package/src/Actions/ERC721MintAction.test.ts +112 -0
  214. package/src/Actions/ERC721MintAction.ts +291 -0
  215. package/src/Actions/EventAction.test.ts +787 -0
  216. package/src/Actions/EventAction.ts +1214 -0
  217. package/src/AllowLists/AllowList.test.ts +64 -0
  218. package/src/AllowLists/AllowList.ts +62 -0
  219. package/src/AllowLists/OpenAllowList.test.ts +40 -0
  220. package/src/AllowLists/OpenAllowList.ts +45 -0
  221. package/src/AllowLists/SimpleAllowList.test.ts +52 -0
  222. package/src/AllowLists/SimpleAllowList.ts +262 -0
  223. package/src/AllowLists/SimpleDenyList.test.ts +52 -0
  224. package/src/AllowLists/SimpleDenyList.ts +250 -0
  225. package/src/Auth/Auth.ts +11 -0
  226. package/src/Auth/PassthroughAuth.test.ts +12 -0
  227. package/src/Auth/PassthroughAuth.ts +80 -0
  228. package/src/Boost.ts +309 -0
  229. package/src/BoostCore.test.ts +827 -0
  230. package/src/BoostCore.ts +1447 -0
  231. package/src/BoostRegistry.ts +543 -0
  232. package/src/Budgets/Budget.test.ts +27 -0
  233. package/src/Budgets/Budget.ts +60 -0
  234. package/src/Budgets/ManagedBudget.test.ts +217 -0
  235. package/src/Budgets/ManagedBudget.ts +534 -0
  236. package/src/Budgets/VestingBudget.test.ts +123 -0
  237. package/src/Budgets/VestingBudget.ts +530 -0
  238. package/src/Deployable/Contract.ts +228 -0
  239. package/src/Deployable/Deployable.ts +250 -0
  240. package/src/Deployable/DeployableTarget.ts +234 -0
  241. package/src/Deployable/DeployableTargetWithRBAC.ts +323 -0
  242. package/src/Incentives/AllowListIncentive.test.ts +143 -0
  243. package/src/Incentives/AllowListIncentive.ts +336 -0
  244. package/src/Incentives/CGDAIncentive.test.ts +132 -0
  245. package/src/Incentives/CGDAIncentive.ts +470 -0
  246. package/src/Incentives/ERC1155Incentive.test.ts +87 -0
  247. package/src/Incentives/ERC1155Incentive.ts +465 -0
  248. package/src/Incentives/ERC20Incentive.test.ts +130 -0
  249. package/src/Incentives/ERC20Incentive.ts +484 -0
  250. package/src/Incentives/ERC20VariableCriteriaIncentive.test.ts +184 -0
  251. package/src/Incentives/ERC20VariableCriteriaIncentive.ts +309 -0
  252. package/src/Incentives/ERC20VariableIncentive.test.ts +136 -0
  253. package/src/Incentives/ERC20VariableIncentive.ts +422 -0
  254. package/src/Incentives/Incentive.test.ts +92 -0
  255. package/src/Incentives/Incentive.ts +86 -0
  256. package/src/Incentives/PointsIncentive.test.ts +139 -0
  257. package/src/Incentives/PointsIncentive.ts +367 -0
  258. package/src/Validators/SignerValidator.test.ts +159 -0
  259. package/src/Validators/SignerValidator.ts +683 -0
  260. package/src/Validators/Validator.test.ts +21 -0
  261. package/src/Validators/Validator.ts +55 -0
  262. package/src/claiming.ts +56 -0
  263. package/src/errors.ts +844 -0
  264. package/src/index.test.ts +122 -0
  265. package/src/index.ts +58 -0
  266. package/src/transfers.ts +284 -0
  267. package/src/utils.test.ts +44 -0
  268. package/src/utils.ts +247 -0
  269. package/dist/Budgets/SimpleBudget.d.ts +0 -793
  270. package/dist/Budgets/SimpleBudget.d.ts.map +0 -1
  271. package/dist/generated-BaaleHW-.cjs +0 -2
@@ -1,793 +0,0 @@
1
- import { simpleBudgetAbi } from '@boostxyz/evm';
2
- import { type Address, type ContractEventName } from 'viem';
3
- import type { DeployableOptions, GenericDeployableParams } from '../Deployable/Deployable';
4
- import { DeployableTarget } from '../Deployable/DeployableTarget';
5
- import { type ERC1155TransferPayload, type FungibleTransferPayload, type GenericLog, type ReadParams, RegistryType, type SimpleBudgetPayload, type WriteParams } from '../utils';
6
- export { simpleBudgetAbi };
7
- export type { ERC1155TransferPayload, FungibleTransferPayload, SimpleBudgetPayload, };
8
- /**
9
- * A generic `viem.Log` event with support for `SimpleBudget` event types.
10
- *
11
- * @export
12
- * @typedef {SimpleBudgetLog}
13
- * @template {ContractEventName<typeof simpleBudgetAbi>} [event=ContractEventName<
14
- * typeof simpleBudgetAbi
15
- * >]
16
- */
17
- export type SimpleBudgetLog<event extends ContractEventName<typeof simpleBudgetAbi> = ContractEventName<typeof simpleBudgetAbi>> = GenericLog<typeof simpleBudgetAbi, event>;
18
- /**
19
- * Typeguard to determine if a transfer payload is a Fungible Transfer
20
- *
21
- * @export
22
- * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
23
- * @returns {transfer is FungibleTransferPayload}
24
- */
25
- export declare function isFungibleTransfer(transfer: FungibleTransferPayload | ERC1155TransferPayload): transfer is FungibleTransferPayload;
26
- /**
27
- * Typeguard to determine if a transfer payload is an ERC1155 Transfer
28
- *
29
- * @export
30
- * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
31
- * @returns {transfer is ERC1155TransferPayload}
32
- */
33
- export declare function isERC1155TransferPayload(transfer: FungibleTransferPayload | ERC1155TransferPayload): transfer is ERC1155TransferPayload;
34
- /**
35
- * Given either a Fungible transfer, or ERC1155 transfer, will properly encode parameters for transfers, claims, disbursements, allocations, etc.
36
- *
37
- * @export
38
- * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
39
- * @returns {*}
40
- * @throws {@link UnknownTransferPayloadSupplied}
41
- */
42
- export declare function prepareTransfer(transfer: FungibleTransferPayload | ERC1155TransferPayload): `0x${string}`;
43
- /**
44
- * A minimal budget implementation that simply holds and distributes tokens (ERC20-like and native)
45
- * This type of budget supports ETH, ERC20, and ERC1155 assets only
46
- *
47
- * @export
48
- * @class SimpleBudget
49
- * @typedef {SimpleBudget}
50
- * @extends {DeployableTarget<SimpleBudgetPayload>}
51
- */
52
- export declare class SimpleBudget extends DeployableTarget<SimpleBudgetPayload, typeof simpleBudgetAbi> {
53
- readonly abi: readonly [{
54
- readonly type: "constructor";
55
- readonly inputs: readonly [];
56
- readonly stateMutability: "nonpayable";
57
- }, {
58
- readonly type: "error";
59
- readonly inputs: readonly [];
60
- readonly name: "AlreadyInitialized";
61
- }, {
62
- readonly type: "error";
63
- readonly inputs: readonly [];
64
- readonly name: "CloneAlreadyInitialized";
65
- }, {
66
- readonly type: "error";
67
- readonly inputs: readonly [];
68
- readonly name: "InitializerNotImplemented";
69
- }, {
70
- readonly type: "error";
71
- readonly inputs: readonly [{
72
- readonly name: "asset";
73
- readonly internalType: "address";
74
- readonly type: "address";
75
- }, {
76
- readonly name: "available";
77
- readonly internalType: "uint256";
78
- readonly type: "uint256";
79
- }, {
80
- readonly name: "required";
81
- readonly internalType: "uint256";
82
- readonly type: "uint256";
83
- }];
84
- readonly name: "InsufficientFunds";
85
- }, {
86
- readonly type: "error";
87
- readonly inputs: readonly [{
88
- readonly name: "asset";
89
- readonly internalType: "address";
90
- readonly type: "address";
91
- }, {
92
- readonly name: "amount";
93
- readonly internalType: "uint256";
94
- readonly type: "uint256";
95
- }];
96
- readonly name: "InvalidAllocation";
97
- }, {
98
- readonly type: "error";
99
- readonly inputs: readonly [];
100
- readonly name: "InvalidInitialization";
101
- }, {
102
- readonly type: "error";
103
- readonly inputs: readonly [];
104
- readonly name: "InvalidInitializationData";
105
- }, {
106
- readonly type: "error";
107
- readonly inputs: readonly [];
108
- readonly name: "LengthMismatch";
109
- }, {
110
- readonly type: "error";
111
- readonly inputs: readonly [];
112
- readonly name: "NewOwnerIsZeroAddress";
113
- }, {
114
- readonly type: "error";
115
- readonly inputs: readonly [];
116
- readonly name: "NoHandoverRequest";
117
- }, {
118
- readonly type: "error";
119
- readonly inputs: readonly [];
120
- readonly name: "NotImplemented";
121
- }, {
122
- readonly type: "error";
123
- readonly inputs: readonly [];
124
- readonly name: "NotInitializing";
125
- }, {
126
- readonly type: "error";
127
- readonly inputs: readonly [];
128
- readonly name: "Reentrancy";
129
- }, {
130
- readonly type: "error";
131
- readonly inputs: readonly [{
132
- readonly name: "asset";
133
- readonly internalType: "address";
134
- readonly type: "address";
135
- }, {
136
- readonly name: "to";
137
- readonly internalType: "address";
138
- readonly type: "address";
139
- }, {
140
- readonly name: "amount";
141
- readonly internalType: "uint256";
142
- readonly type: "uint256";
143
- }];
144
- readonly name: "TransferFailed";
145
- }, {
146
- readonly type: "error";
147
- readonly inputs: readonly [];
148
- readonly name: "Unauthorized";
149
- }, {
150
- readonly type: "event";
151
- readonly anonymous: false;
152
- readonly inputs: readonly [{
153
- readonly name: "account";
154
- readonly internalType: "address";
155
- readonly type: "address";
156
- readonly indexed: true;
157
- }, {
158
- readonly name: "isAuthorized";
159
- readonly internalType: "bool";
160
- readonly type: "bool";
161
- readonly indexed: false;
162
- }];
163
- readonly name: "Authorized";
164
- }, {
165
- readonly type: "event";
166
- readonly anonymous: false;
167
- readonly inputs: readonly [{
168
- readonly name: "asset";
169
- readonly internalType: "address";
170
- readonly type: "address";
171
- readonly indexed: true;
172
- }, {
173
- readonly name: "to";
174
- readonly internalType: "address";
175
- readonly type: "address";
176
- readonly indexed: false;
177
- }, {
178
- readonly name: "amount";
179
- readonly internalType: "uint256";
180
- readonly type: "uint256";
181
- readonly indexed: false;
182
- }];
183
- readonly name: "Distributed";
184
- }, {
185
- readonly type: "event";
186
- readonly anonymous: false;
187
- readonly inputs: readonly [{
188
- readonly name: "version";
189
- readonly internalType: "uint64";
190
- readonly type: "uint64";
191
- readonly indexed: false;
192
- }];
193
- readonly name: "Initialized";
194
- }, {
195
- readonly type: "event";
196
- readonly anonymous: false;
197
- readonly inputs: readonly [{
198
- readonly name: "pendingOwner";
199
- readonly internalType: "address";
200
- readonly type: "address";
201
- readonly indexed: true;
202
- }];
203
- readonly name: "OwnershipHandoverCanceled";
204
- }, {
205
- readonly type: "event";
206
- readonly anonymous: false;
207
- readonly inputs: readonly [{
208
- readonly name: "pendingOwner";
209
- readonly internalType: "address";
210
- readonly type: "address";
211
- readonly indexed: true;
212
- }];
213
- readonly name: "OwnershipHandoverRequested";
214
- }, {
215
- readonly type: "event";
216
- readonly anonymous: false;
217
- readonly inputs: readonly [{
218
- readonly name: "oldOwner";
219
- readonly internalType: "address";
220
- readonly type: "address";
221
- readonly indexed: true;
222
- }, {
223
- readonly name: "newOwner";
224
- readonly internalType: "address";
225
- readonly type: "address";
226
- readonly indexed: true;
227
- }];
228
- readonly name: "OwnershipTransferred";
229
- }, {
230
- readonly type: "fallback";
231
- readonly stateMutability: "payable";
232
- }, {
233
- readonly type: "function";
234
- readonly inputs: readonly [{
235
- readonly name: "data_";
236
- readonly internalType: "bytes";
237
- readonly type: "bytes";
238
- }];
239
- readonly name: "allocate";
240
- readonly outputs: readonly [{
241
- readonly name: "";
242
- readonly internalType: "bool";
243
- readonly type: "bool";
244
- }];
245
- readonly stateMutability: "payable";
246
- }, {
247
- readonly type: "function";
248
- readonly inputs: readonly [{
249
- readonly name: "asset_";
250
- readonly internalType: "address";
251
- readonly type: "address";
252
- }];
253
- readonly name: "available";
254
- readonly outputs: readonly [{
255
- readonly name: "";
256
- readonly internalType: "uint256";
257
- readonly type: "uint256";
258
- }];
259
- readonly stateMutability: "view";
260
- }, {
261
- readonly type: "function";
262
- readonly inputs: readonly [{
263
- readonly name: "asset_";
264
- readonly internalType: "address";
265
- readonly type: "address";
266
- }, {
267
- readonly name: "tokenId_";
268
- readonly internalType: "uint256";
269
- readonly type: "uint256";
270
- }];
271
- readonly name: "available";
272
- readonly outputs: readonly [{
273
- readonly name: "";
274
- readonly internalType: "uint256";
275
- readonly type: "uint256";
276
- }];
277
- readonly stateMutability: "view";
278
- }, {
279
- readonly type: "function";
280
- readonly inputs: readonly [];
281
- readonly name: "cancelOwnershipHandover";
282
- readonly outputs: readonly [];
283
- readonly stateMutability: "payable";
284
- }, {
285
- readonly type: "function";
286
- readonly inputs: readonly [{
287
- readonly name: "data_";
288
- readonly internalType: "bytes";
289
- readonly type: "bytes";
290
- }];
291
- readonly name: "clawback";
292
- readonly outputs: readonly [{
293
- readonly name: "";
294
- readonly internalType: "bool";
295
- readonly type: "bool";
296
- }];
297
- readonly stateMutability: "nonpayable";
298
- }, {
299
- readonly type: "function";
300
- readonly inputs: readonly [{
301
- readonly name: "pendingOwner";
302
- readonly internalType: "address";
303
- readonly type: "address";
304
- }];
305
- readonly name: "completeOwnershipHandover";
306
- readonly outputs: readonly [];
307
- readonly stateMutability: "payable";
308
- }, {
309
- readonly type: "function";
310
- readonly inputs: readonly [{
311
- readonly name: "data_";
312
- readonly internalType: "bytes";
313
- readonly type: "bytes";
314
- }];
315
- readonly name: "disburse";
316
- readonly outputs: readonly [{
317
- readonly name: "";
318
- readonly internalType: "bool";
319
- readonly type: "bool";
320
- }];
321
- readonly stateMutability: "nonpayable";
322
- }, {
323
- readonly type: "function";
324
- readonly inputs: readonly [{
325
- readonly name: "data_";
326
- readonly internalType: "bytes[]";
327
- readonly type: "bytes[]";
328
- }];
329
- readonly name: "disburseBatch";
330
- readonly outputs: readonly [{
331
- readonly name: "";
332
- readonly internalType: "bool";
333
- readonly type: "bool";
334
- }];
335
- readonly stateMutability: "nonpayable";
336
- }, {
337
- readonly type: "function";
338
- readonly inputs: readonly [{
339
- readonly name: "asset_";
340
- readonly internalType: "address";
341
- readonly type: "address";
342
- }];
343
- readonly name: "distributed";
344
- readonly outputs: readonly [{
345
- readonly name: "";
346
- readonly internalType: "uint256";
347
- readonly type: "uint256";
348
- }];
349
- readonly stateMutability: "view";
350
- }, {
351
- readonly type: "function";
352
- readonly inputs: readonly [{
353
- readonly name: "asset_";
354
- readonly internalType: "address";
355
- readonly type: "address";
356
- }, {
357
- readonly name: "tokenId_";
358
- readonly internalType: "uint256";
359
- readonly type: "uint256";
360
- }];
361
- readonly name: "distributed";
362
- readonly outputs: readonly [{
363
- readonly name: "";
364
- readonly internalType: "uint256";
365
- readonly type: "uint256";
366
- }];
367
- readonly stateMutability: "view";
368
- }, {
369
- readonly type: "function";
370
- readonly inputs: readonly [];
371
- readonly name: "getComponentInterface";
372
- readonly outputs: readonly [{
373
- readonly name: "";
374
- readonly internalType: "bytes4";
375
- readonly type: "bytes4";
376
- }];
377
- readonly stateMutability: "pure";
378
- }, {
379
- readonly type: "function";
380
- readonly inputs: readonly [{
381
- readonly name: "data_";
382
- readonly internalType: "bytes";
383
- readonly type: "bytes";
384
- }];
385
- readonly name: "initialize";
386
- readonly outputs: readonly [];
387
- readonly stateMutability: "nonpayable";
388
- }, {
389
- readonly type: "function";
390
- readonly inputs: readonly [{
391
- readonly name: "account_";
392
- readonly internalType: "address";
393
- readonly type: "address";
394
- }];
395
- readonly name: "isAuthorized";
396
- readonly outputs: readonly [{
397
- readonly name: "";
398
- readonly internalType: "bool";
399
- readonly type: "bool";
400
- }];
401
- readonly stateMutability: "view";
402
- }, {
403
- readonly type: "function";
404
- readonly inputs: readonly [{
405
- readonly name: "";
406
- readonly internalType: "address";
407
- readonly type: "address";
408
- }, {
409
- readonly name: "";
410
- readonly internalType: "address";
411
- readonly type: "address";
412
- }, {
413
- readonly name: "";
414
- readonly internalType: "uint256[]";
415
- readonly type: "uint256[]";
416
- }, {
417
- readonly name: "";
418
- readonly internalType: "uint256[]";
419
- readonly type: "uint256[]";
420
- }, {
421
- readonly name: "";
422
- readonly internalType: "bytes";
423
- readonly type: "bytes";
424
- }];
425
- readonly name: "onERC1155BatchReceived";
426
- readonly outputs: readonly [{
427
- readonly name: "";
428
- readonly internalType: "bytes4";
429
- readonly type: "bytes4";
430
- }];
431
- readonly stateMutability: "pure";
432
- }, {
433
- readonly type: "function";
434
- readonly inputs: readonly [{
435
- readonly name: "";
436
- readonly internalType: "address";
437
- readonly type: "address";
438
- }, {
439
- readonly name: "";
440
- readonly internalType: "address";
441
- readonly type: "address";
442
- }, {
443
- readonly name: "";
444
- readonly internalType: "uint256";
445
- readonly type: "uint256";
446
- }, {
447
- readonly name: "";
448
- readonly internalType: "uint256";
449
- readonly type: "uint256";
450
- }, {
451
- readonly name: "";
452
- readonly internalType: "bytes";
453
- readonly type: "bytes";
454
- }];
455
- readonly name: "onERC1155Received";
456
- readonly outputs: readonly [{
457
- readonly name: "";
458
- readonly internalType: "bytes4";
459
- readonly type: "bytes4";
460
- }];
461
- readonly stateMutability: "pure";
462
- }, {
463
- readonly type: "function";
464
- readonly inputs: readonly [];
465
- readonly name: "owner";
466
- readonly outputs: readonly [{
467
- readonly name: "result";
468
- readonly internalType: "address";
469
- readonly type: "address";
470
- }];
471
- readonly stateMutability: "view";
472
- }, {
473
- readonly type: "function";
474
- readonly inputs: readonly [{
475
- readonly name: "pendingOwner";
476
- readonly internalType: "address";
477
- readonly type: "address";
478
- }];
479
- readonly name: "ownershipHandoverExpiresAt";
480
- readonly outputs: readonly [{
481
- readonly name: "result";
482
- readonly internalType: "uint256";
483
- readonly type: "uint256";
484
- }];
485
- readonly stateMutability: "view";
486
- }, {
487
- readonly type: "function";
488
- readonly inputs: readonly [{
489
- readonly name: "";
490
- readonly internalType: "bytes";
491
- readonly type: "bytes";
492
- }];
493
- readonly name: "reconcile";
494
- readonly outputs: readonly [{
495
- readonly name: "";
496
- readonly internalType: "uint256";
497
- readonly type: "uint256";
498
- }];
499
- readonly stateMutability: "nonpayable";
500
- }, {
501
- readonly type: "function";
502
- readonly inputs: readonly [];
503
- readonly name: "renounceOwnership";
504
- readonly outputs: readonly [];
505
- readonly stateMutability: "payable";
506
- }, {
507
- readonly type: "function";
508
- readonly inputs: readonly [];
509
- readonly name: "requestOwnershipHandover";
510
- readonly outputs: readonly [];
511
- readonly stateMutability: "payable";
512
- }, {
513
- readonly type: "function";
514
- readonly inputs: readonly [{
515
- readonly name: "account_";
516
- readonly internalType: "address[]";
517
- readonly type: "address[]";
518
- }, {
519
- readonly name: "authorized_";
520
- readonly internalType: "bool[]";
521
- readonly type: "bool[]";
522
- }];
523
- readonly name: "setAuthorized";
524
- readonly outputs: readonly [];
525
- readonly stateMutability: "nonpayable";
526
- }, {
527
- readonly type: "function";
528
- readonly inputs: readonly [{
529
- readonly name: "interfaceId";
530
- readonly internalType: "bytes4";
531
- readonly type: "bytes4";
532
- }];
533
- readonly name: "supportsInterface";
534
- readonly outputs: readonly [{
535
- readonly name: "";
536
- readonly internalType: "bool";
537
- readonly type: "bool";
538
- }];
539
- readonly stateMutability: "view";
540
- }, {
541
- readonly type: "function";
542
- readonly inputs: readonly [{
543
- readonly name: "asset_";
544
- readonly internalType: "address";
545
- readonly type: "address";
546
- }];
547
- readonly name: "total";
548
- readonly outputs: readonly [{
549
- readonly name: "";
550
- readonly internalType: "uint256";
551
- readonly type: "uint256";
552
- }];
553
- readonly stateMutability: "view";
554
- }, {
555
- readonly type: "function";
556
- readonly inputs: readonly [{
557
- readonly name: "asset_";
558
- readonly internalType: "address";
559
- readonly type: "address";
560
- }, {
561
- readonly name: "tokenId_";
562
- readonly internalType: "uint256";
563
- readonly type: "uint256";
564
- }];
565
- readonly name: "total";
566
- readonly outputs: readonly [{
567
- readonly name: "";
568
- readonly internalType: "uint256";
569
- readonly type: "uint256";
570
- }];
571
- readonly stateMutability: "view";
572
- }, {
573
- readonly type: "function";
574
- readonly inputs: readonly [{
575
- readonly name: "newOwner";
576
- readonly internalType: "address";
577
- readonly type: "address";
578
- }];
579
- readonly name: "transferOwnership";
580
- readonly outputs: readonly [];
581
- readonly stateMutability: "payable";
582
- }, {
583
- readonly type: "receive";
584
- readonly stateMutability: "payable";
585
- }];
586
- /**
587
- * @inheritdoc
588
- *
589
- * @public
590
- * @static
591
- * @type {Address}
592
- */
593
- static base: Address;
594
- /**
595
- * @inheritdoc
596
- *
597
- * @public
598
- * @static
599
- * @type {RegistryType}
600
- */
601
- static registryType: RegistryType;
602
- /**
603
- * Allocates assets to the budget.
604
- * The caller must have already approved the contract to transfer the asset
605
- * If the asset transfer fails, the allocation will revert
606
- *
607
- * @public
608
- * @async
609
- * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
610
- * @param {?WriteParams<typeof simpleBudgetAbi, 'allocate'>} [params]
611
- * @returns {Promise<boolean>} - True if the allocation was successful
612
- */
613
- allocate(transfer: FungibleTransferPayload | ERC1155TransferPayload, params?: WriteParams<typeof simpleBudgetAbi, 'allocate'>): Promise<boolean>;
614
- /**
615
- * Allocates assets to the budget.
616
- * The caller must have already approved the contract to transfer the asset
617
- * If the asset transfer fails, the allocation will revert
618
- *
619
- * @public
620
- * @async
621
- * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
622
- * @param {?WriteParams<typeof simpleBudgetAbi, 'allocate'>} [params]
623
- * @returns {Promise<boolean>} - True if the allocation was successful
624
- */
625
- allocateRaw(transfer: FungibleTransferPayload | ERC1155TransferPayload, params?: WriteParams<typeof simpleBudgetAbi, 'allocate'>): Promise<{
626
- hash: `0x${string}`;
627
- result: boolean;
628
- }>;
629
- /**
630
- * Clawbacks assets from the budget.
631
- * Only the owner can directly clawback assets from the budget
632
- * If the amount is zero, the entire balance of the asset will be transferred to the receiver
633
- * If the asset transfer fails, the reclamation will revert
634
- *
635
- * @public
636
- * @async
637
- * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
638
- * @param {?WriteParams<typeof simpleBudgetAbi, 'clawback'>} [params]
639
- * @returns {Promise<boolean>} - True if the request was successful
640
- */
641
- clawback(transfer: FungibleTransferPayload | ERC1155TransferPayload, params?: WriteParams<typeof simpleBudgetAbi, 'clawback'>): Promise<boolean>;
642
- /**
643
- * Clawbacks assets from the budget.
644
- * Only the owner can directly clawback assets from the budget
645
- * If the amount is zero, the entire balance of the asset will be transferred to the receiver
646
- * If the asset transfer fails, the reclamation will revert
647
- *
648
- * @public
649
- * @async
650
- * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
651
- * @param {?WriteParams<typeof simpleBudgetAbi, 'clawback'>} [params]
652
- * @returns {Promise<boolean>} - True if the request was successful
653
- */
654
- clawbackRaw(transfer: FungibleTransferPayload | ERC1155TransferPayload, params?: WriteParams<typeof simpleBudgetAbi, 'clawback'>): Promise<{
655
- hash: `0x${string}`;
656
- result: boolean;
657
- }>;
658
- /**
659
- * Disburses assets from the budget to a single recipient
660
- * If the asset transfer fails, the disbursement will revert
661
- *
662
- * @public
663
- * @async
664
- * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
665
- * @param {?WriteParams<typeof simpleBudgetAbi, 'disburse'>} [params]
666
- * @returns {Promise<boolean>} - True if the disbursement was successful
667
- */
668
- disburse(transfer: FungibleTransferPayload | ERC1155TransferPayload, params?: WriteParams<typeof simpleBudgetAbi, 'disburse'>): Promise<boolean>;
669
- /**
670
- * Disburses assets from the budget to a single recipient
671
- * If the asset transfer fails, the disbursement will revert
672
- *
673
- * @public
674
- * @async
675
- * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
676
- * @param {?WriteParams<typeof simpleBudgetAbi, 'disburse'>} [params]
677
- * @returns {Promise<boolean>} - True if the disbursement was successful
678
- */
679
- disburseRaw(transfer: FungibleTransferPayload | ERC1155TransferPayload, params?: WriteParams<typeof simpleBudgetAbi, 'disburse'>): Promise<{
680
- hash: `0x${string}`;
681
- result: boolean;
682
- }>;
683
- /**
684
- * Disburses assets from the budget to multiple recipients
685
- *
686
- * @public
687
- * @async
688
- * @param {Array<FungibleTransferPayload | ERC1155TransferPayload>} transfers
689
- * @param {?WriteParams<typeof simpleBudgetAbi, 'disburseBatch'>} [params]
690
- * @returns {Promise<boolean>} - True if all disbursements were successful
691
- */
692
- disburseBatch(transfers: Array<FungibleTransferPayload | ERC1155TransferPayload>, params?: WriteParams<typeof simpleBudgetAbi, 'disburseBatch'>): Promise<boolean>;
693
- /**
694
- * Disburses assets from the budget to multiple recipients
695
- *
696
- * @public
697
- * @async
698
- * @param {Array<FungibleTransferPayload | ERC1155TransferPayload>} transfers
699
- * @param {?WriteParams<typeof simpleBudgetAbi, 'disburseBatch'>} [params]
700
- * @returns {Promise<boolean>} - True if all disbursements were successful
701
- */
702
- disburseBatchRaw(transfers: Array<FungibleTransferPayload | ERC1155TransferPayload>, params?: WriteParams<typeof simpleBudgetAbi, 'disburseBatch'>): Promise<{
703
- hash: `0x${string}`;
704
- result: boolean;
705
- }>;
706
- /**
707
- * Set the authorized status of the given accounts
708
- * The mechanism for managing authorization is left to the implementing contract
709
- *
710
- * @public
711
- * @async
712
- * @param {Address[]} addresses - The accounts to authorize or deauthorize
713
- * @param {boolean[]} allowed - The authorization status for the given accounts
714
- * @param {?WriteParams<typeof simpleBudgetAbi, 'setAuthorized'>} [params]
715
- * @returns {Promise<void>}
716
- */
717
- setAuthorized(addresses: Address[], allowed: boolean[], params?: WriteParams<typeof simpleBudgetAbi, 'setAuthorized'>): Promise<void>;
718
- /**
719
- * Set the authorized status of the given accounts
720
- * The mechanism for managing authorization is left to the implementing contract
721
- *
722
- * @public
723
- * @async
724
- * @param {Address[]} addresses - The accounts to authorize or deauthorize
725
- * @param {boolean[]} allowed - The authorization status for the given accounts
726
- * @param {?WriteParams<typeof simpleBudgetAbi, 'setAuthorized'>} [params]
727
- * @returns {Promise<void>}
728
- */
729
- setAuthorizedRaw(addresses: Address[], allowed: boolean[], params?: WriteParams<typeof simpleBudgetAbi, 'setAuthorized'>): Promise<{
730
- hash: `0x${string}`;
731
- result: void;
732
- }>;
733
- /**
734
- * Check if the given account is authorized to use the budget
735
- *
736
- * @public
737
- * @param {Address} account
738
- * @param {?ReadParams<typeof simpleBudgetAbi, 'isAuthorized'>} [params]
739
- * @returns {Promise<boolean>} - True if the account is authorized
740
- */
741
- isAuthorized(account: Address, params?: ReadParams<typeof simpleBudgetAbi, 'isAuthorized'>): Promise<boolean>;
742
- /**
743
- * Get the owner of the budget
744
- *
745
- * @public
746
- * @param {?ReadParams<typeof simpleBudgetAbi, 'owner'>} [params]
747
- * @returns {Promise<Address>}
748
- */
749
- owner(params?: ReadParams<typeof simpleBudgetAbi, 'owner'>): Promise<`0x${string}`>;
750
- /**
751
- * Get the total amount of assets allocated to the budget, including any that have been distributed
752
- * If a tokenId is provided, get the total amount of ERC1155 assets allocated to the budget, including any that have been distributed
753
- *
754
- * @public
755
- * @param {Address} asset - The address of the asset
756
- * @param {?(bigint | undefined)} [tokenId] - The ID of the token
757
- * @param {?ReadParams<typeof simpleBudgetAbi, 'total'>} [params]
758
- * @returns {Promise<bigint>} - The total amount of assets
759
- */
760
- total(asset: Address, tokenId?: bigint | undefined, params?: ReadParams<typeof simpleBudgetAbi, 'total'>): Promise<never>;
761
- /**
762
- * Get the amount of assets available for distribution from the budget.
763
- * If a tokenId is provided, get the amount of ERC1155 assets available for distribution from the budget
764
- *
765
- * @public
766
- * @param {Address} asset
767
- * @param {?(bigint | undefined)} [tokenId]
768
- * @param {?ReadParams<typeof simpleBudgetAbi, 'available'>} [params]
769
- * @returns {Promise<bigint>} - The amount of assets available
770
- */
771
- available(asset: Address, tokenId?: bigint | undefined, params?: ReadParams<typeof simpleBudgetAbi, 'available'>): Promise<never>;
772
- /**
773
- * Get the amount of assets that have been distributed from the budget.
774
- * If a tokenId is provided, get the amount of ERC1155 assets that have been distributed from the budget
775
- *
776
- * @public
777
- * @param {Address} asset
778
- * @param {?(bigint | undefined)} [tokenId]
779
- * @param {?ReadParams<typeof simpleBudgetAbi, 'distributed'>} [params]
780
- * @returns {Promise<bigint>} - The amount of assets distributed
781
- */
782
- distributed(asset: Address, tokenId?: bigint | undefined, params?: ReadParams<typeof simpleBudgetAbi, 'distributed'>): Promise<never>;
783
- /**
784
- * @inheritdoc
785
- *
786
- * @public
787
- * @param {?SimpleBudgetPayload} [_payload]
788
- * @param {?DeployableOptions} [_options]
789
- * @returns {GenericDeployableParams}
790
- */
791
- buildParameters(_payload?: SimpleBudgetPayload, _options?: DeployableOptions): GenericDeployableParams;
792
- }
793
- //# sourceMappingURL=SimpleBudget.d.ts.map