@boostxyz/sdk 0.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -0
- package/README.md +7 -0
- package/dist/Actions/Action.cjs +2 -0
- package/dist/Actions/Action.cjs.map +1 -0
- package/dist/Actions/Action.d.ts +31 -0
- package/dist/Actions/Action.d.ts.map +1 -0
- package/dist/Actions/Action.js +29 -0
- package/dist/Actions/Action.js.map +1 -0
- package/dist/Actions/ContractAction.d.ts +370 -0
- package/dist/Actions/ContractAction.d.ts.map +1 -0
- package/dist/Actions/ERC721MintAction.d.ts +513 -0
- package/dist/Actions/ERC721MintAction.d.ts.map +1 -0
- package/dist/Actions/EventAction.cjs +2 -0
- package/dist/Actions/EventAction.cjs.map +1 -0
- package/dist/Actions/EventAction.d.ts +694 -0
- package/dist/Actions/EventAction.d.ts.map +1 -0
- package/dist/Actions/EventAction.js +491 -0
- package/dist/Actions/EventAction.js.map +1 -0
- package/dist/AllowLists/AllowList.cjs +2 -0
- package/dist/AllowLists/AllowList.cjs.map +1 -0
- package/dist/AllowLists/AllowList.d.ts +32 -0
- package/dist/AllowLists/AllowList.d.ts.map +1 -0
- package/dist/AllowLists/AllowList.js +30 -0
- package/dist/AllowLists/AllowList.js.map +1 -0
- package/dist/AllowLists/SimpleAllowList.cjs +2 -0
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -0
- package/dist/AllowLists/SimpleAllowList.d.ts +481 -0
- package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -0
- package/dist/AllowLists/SimpleAllowList.js +154 -0
- package/dist/AllowLists/SimpleAllowList.js.map +1 -0
- package/dist/AllowLists/SimpleDenyList.cjs +2 -0
- package/dist/AllowLists/SimpleDenyList.cjs.map +1 -0
- package/dist/AllowLists/SimpleDenyList.d.ts +335 -0
- package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -0
- package/dist/AllowLists/SimpleDenyList.js +115 -0
- package/dist/AllowLists/SimpleDenyList.js.map +1 -0
- package/dist/Auth/Auth.cjs +2 -0
- package/dist/Auth/Auth.cjs.map +1 -0
- package/dist/Auth/Auth.d.ts +10 -0
- package/dist/Auth/Auth.d.ts.map +1 -0
- package/dist/Auth/Auth.js +5 -0
- package/dist/Auth/Auth.js.map +1 -0
- package/dist/Auth/PassthroughAuth.cjs +2 -0
- package/dist/Auth/PassthroughAuth.cjs.map +1 -0
- package/dist/Auth/PassthroughAuth.d.ts +51 -0
- package/dist/Auth/PassthroughAuth.d.ts.map +1 -0
- package/dist/Auth/PassthroughAuth.js +39 -0
- package/dist/Auth/PassthroughAuth.js.map +1 -0
- package/dist/Boost.cjs +2 -0
- package/dist/Boost.cjs.map +1 -0
- package/dist/Boost.d.ts +234 -0
- package/dist/Boost.d.ts.map +1 -0
- package/dist/Boost.js +162 -0
- package/dist/Boost.js.map +1 -0
- package/dist/BoostCore.cjs +3 -0
- package/dist/BoostCore.cjs.map +1 -0
- package/dist/BoostCore.d.ts +498 -0
- package/dist/BoostCore.d.ts.map +1 -0
- package/dist/BoostCore.js +1153 -0
- package/dist/BoostCore.js.map +1 -0
- package/dist/BoostRegistry.cjs +2 -0
- package/dist/BoostRegistry.cjs.map +1 -0
- package/dist/BoostRegistry.d.ts +243 -0
- package/dist/BoostRegistry.d.ts.map +1 -0
- package/dist/BoostRegistry.js +262 -0
- package/dist/BoostRegistry.js.map +1 -0
- package/dist/Budgets/Budget.cjs +2 -0
- package/dist/Budgets/Budget.cjs.map +1 -0
- package/dist/Budgets/Budget.d.ts +31 -0
- package/dist/Budgets/Budget.d.ts.map +1 -0
- package/dist/Budgets/Budget.js +29 -0
- package/dist/Budgets/Budget.js.map +1 -0
- package/dist/Budgets/ManagedBudget.cjs +2 -0
- package/dist/Budgets/ManagedBudget.cjs.map +1 -0
- package/dist/Budgets/ManagedBudget.d.ts +1103 -0
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -0
- package/dist/Budgets/ManagedBudget.js +516 -0
- package/dist/Budgets/ManagedBudget.js.map +1 -0
- package/dist/Budgets/SimpleBudget.d.ts +824 -0
- package/dist/Budgets/SimpleBudget.d.ts.map +1 -0
- package/dist/Budgets/VestingBudget.d.ts +778 -0
- package/dist/Budgets/VestingBudget.d.ts.map +1 -0
- package/dist/Deployable/Contract.cjs +2 -0
- package/dist/Deployable/Contract.cjs.map +1 -0
- package/dist/Deployable/Contract.d.ts +125 -0
- package/dist/Deployable/Contract.d.ts.map +1 -0
- package/dist/Deployable/Contract.js +150 -0
- package/dist/Deployable/Contract.js.map +1 -0
- package/dist/Deployable/Deployable.cjs +2 -0
- package/dist/Deployable/Deployable.cjs.map +1 -0
- package/dist/Deployable/Deployable.d.ts +161 -0
- package/dist/Deployable/Deployable.d.ts.map +1 -0
- package/dist/Deployable/Deployable.js +131 -0
- package/dist/Deployable/Deployable.js.map +1 -0
- package/dist/Deployable/DeployableTarget.cjs +2 -0
- package/dist/Deployable/DeployableTarget.cjs.map +1 -0
- package/dist/Deployable/DeployableTarget.d.ts +116 -0
- package/dist/Deployable/DeployableTarget.d.ts.map +1 -0
- package/dist/Deployable/DeployableTarget.js +132 -0
- package/dist/Deployable/DeployableTarget.js.map +1 -0
- package/dist/Incentives/AllowListIncentive.cjs +2 -0
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -0
- package/dist/Incentives/AllowListIncentive.d.ts +513 -0
- package/dist/Incentives/AllowListIncentive.d.ts.map +1 -0
- package/dist/Incentives/AllowListIncentive.js +201 -0
- package/dist/Incentives/AllowListIncentive.js.map +1 -0
- package/dist/Incentives/CGDAIncentive.cjs +2 -0
- package/dist/Incentives/CGDAIncentive.cjs.map +1 -0
- package/dist/Incentives/CGDAIncentive.d.ts +644 -0
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -0
- package/dist/Incentives/CGDAIncentive.js +271 -0
- package/dist/Incentives/CGDAIncentive.js.map +1 -0
- package/dist/Incentives/ERC1155Incentive.d.ts +713 -0
- package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20Incentive.cjs +2 -0
- package/dist/Incentives/ERC20Incentive.cjs.map +1 -0
- package/dist/Incentives/ERC20Incentive.d.ts +666 -0
- package/dist/Incentives/ERC20Incentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20Incentive.js +312 -0
- package/dist/Incentives/ERC20Incentive.js.map +1 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts +582 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -0
- package/dist/Incentives/Incentive.cjs +2 -0
- package/dist/Incentives/Incentive.cjs.map +1 -0
- package/dist/Incentives/Incentive.d.ts +36 -0
- package/dist/Incentives/Incentive.d.ts.map +1 -0
- package/dist/Incentives/Incentive.js +299 -0
- package/dist/Incentives/Incentive.js.map +1 -0
- package/dist/Incentives/PointsIncentive.cjs +2 -0
- package/dist/Incentives/PointsIncentive.cjs.map +1 -0
- package/dist/Incentives/PointsIncentive.d.ts +659 -0
- package/dist/Incentives/PointsIncentive.d.ts.map +1 -0
- package/dist/Incentives/PointsIncentive.js +215 -0
- package/dist/Incentives/PointsIncentive.js.map +1 -0
- package/dist/Validators/SignerValidator.cjs +2 -0
- package/dist/Validators/SignerValidator.cjs.map +1 -0
- package/dist/Validators/SignerValidator.d.ts +745 -0
- package/dist/Validators/SignerValidator.d.ts.map +1 -0
- package/dist/Validators/SignerValidator.js +293 -0
- package/dist/Validators/SignerValidator.js.map +1 -0
- package/dist/Validators/Validator.cjs +2 -0
- package/dist/Validators/Validator.cjs.map +1 -0
- package/dist/Validators/Validator.d.ts +31 -0
- package/dist/Validators/Validator.d.ts.map +1 -0
- package/dist/Validators/Validator.js +27 -0
- package/dist/Validators/Validator.js.map +1 -0
- package/dist/claiming.cjs +2 -0
- package/dist/claiming.cjs.map +1 -0
- package/dist/claiming.d.ts +43 -0
- package/dist/claiming.d.ts.map +1 -0
- package/dist/claiming.js +17 -0
- package/dist/claiming.js.map +1 -0
- package/dist/componentInterfaces-CKCBwG16.cjs +2 -0
- package/dist/componentInterfaces-CKCBwG16.cjs.map +1 -0
- package/dist/componentInterfaces-DYkaxBda.js +13 -0
- package/dist/componentInterfaces-DYkaxBda.js.map +1 -0
- package/dist/errors.cjs +2 -0
- package/dist/errors.cjs.map +1 -0
- package/dist/errors.d.ts +441 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +262 -0
- package/dist/errors.js.map +1 -0
- package/dist/generated-BDeDiaCK.js +4625 -0
- package/dist/generated-BDeDiaCK.js.map +1 -0
- package/dist/generated-wKBNvm48.cjs +3 -0
- package/dist/generated-wKBNvm48.cjs.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +113 -0
- package/dist/index.js.map +1 -0
- package/dist/transfers.cjs +2 -0
- package/dist/transfers.cjs.map +1 -0
- package/dist/transfers.d.ts +198 -0
- package/dist/transfers.d.ts.map +1 -0
- package/dist/transfers.js +84 -0
- package/dist/transfers.js.map +1 -0
- package/dist/utils.cjs +2 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.d.ts +116 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +30 -0
- package/dist/utils.js.map +1 -0
- package/package.json +211 -0
- package/src/Actions/Action.test.ts +75 -0
- package/src/Actions/Action.ts +61 -0
- package/src/Actions/ContractAction.test.ts +197 -0
- package/src/Actions/ContractAction.ts +301 -0
- package/src/Actions/ERC721MintAction.test.ts +112 -0
- package/src/Actions/ERC721MintAction.ts +292 -0
- package/src/Actions/EventAction.test.ts +205 -0
- package/src/Actions/EventAction.ts +811 -0
- package/src/AllowLists/AllowList.test.ts +64 -0
- package/src/AllowLists/AllowList.ts +60 -0
- package/src/AllowLists/SimpleAllowList.test.ts +52 -0
- package/src/AllowLists/SimpleAllowList.ts +284 -0
- package/src/AllowLists/SimpleDenyList.test.ts +52 -0
- package/src/AllowLists/SimpleDenyList.ts +227 -0
- package/src/Auth/Auth.ts +11 -0
- package/src/Auth/PassthroughAuth.test.ts +12 -0
- package/src/Auth/PassthroughAuth.ts +80 -0
- package/src/Boost.ts +290 -0
- package/src/BoostCore.test.ts +773 -0
- package/src/BoostCore.ts +1261 -0
- package/src/BoostRegistry.ts +467 -0
- package/src/Budgets/Budget.test.ts +27 -0
- package/src/Budgets/Budget.ts +61 -0
- package/src/Budgets/ManagedBudget.test.ts +154 -0
- package/src/Budgets/ManagedBudget.ts +796 -0
- package/src/Budgets/SimpleBudget.test.ts +152 -0
- package/src/Budgets/SimpleBudget.ts +564 -0
- package/src/Budgets/VestingBudget.test.ts +123 -0
- package/src/Budgets/VestingBudget.ts +602 -0
- package/src/Deployable/Contract.ts +229 -0
- package/src/Deployable/Deployable.ts +250 -0
- package/src/Deployable/DeployableTarget.ts +223 -0
- package/src/Incentives/AllowListIncentive.test.ts +143 -0
- package/src/Incentives/AllowListIncentive.ts +334 -0
- package/src/Incentives/CGDAIncentive.test.ts +132 -0
- package/src/Incentives/CGDAIncentive.ts +468 -0
- package/src/Incentives/ERC1155Incentive.test.ts +87 -0
- package/src/Incentives/ERC1155Incentive.ts +466 -0
- package/src/Incentives/ERC20Incentive.test.ts +130 -0
- package/src/Incentives/ERC20Incentive.ts +482 -0
- package/src/Incentives/ERC20VariableIncentive.test.ts +136 -0
- package/src/Incentives/ERC20VariableIncentive.ts +420 -0
- package/src/Incentives/Incentive.test.ts +92 -0
- package/src/Incentives/Incentive.ts +85 -0
- package/src/Incentives/PointsIncentive.test.ts +139 -0
- package/src/Incentives/PointsIncentive.ts +365 -0
- package/src/Validators/SignerValidator.test.ts +159 -0
- package/src/Validators/SignerValidator.ts +681 -0
- package/src/Validators/Validator.test.ts +21 -0
- package/src/Validators/Validator.ts +55 -0
- package/src/claiming.ts +56 -0
- package/src/errors.ts +542 -0
- package/src/index.test.ts +40 -0
- package/src/index.ts +53 -0
- package/src/transfers.ts +284 -0
- package/src/utils.test.ts +44 -0
- package/src/utils.ts +198 -0
package/dist/Boost.js
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { zeroAddress as H, encodeAbiParameters as U, parseAbiParameters as N } from "viem";
|
|
2
|
+
var O = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, E = { exports: {} };
|
|
3
|
+
(function(h, l) {
|
|
4
|
+
(function(g, w) {
|
|
5
|
+
h.exports = w(g, 1), l.LibZip = h.exports.LibZip, l.ERC1967Factory = h.exports.ERC1967Factory;
|
|
6
|
+
})(typeof window < "u" ? window : O, function(g, w) {
|
|
7
|
+
var y = {}, c = {};
|
|
8
|
+
y.LibZip = c;
|
|
9
|
+
function x(t) {
|
|
10
|
+
if ((typeof t == "string" || t instanceof String) && (t = t.match(/^[\s\uFEFF\xA0]*(0[Xx])?([0-9A-Fa-f]*)[\s\uFEFF\xA0]*$/))) {
|
|
11
|
+
if (t[2].length % 2)
|
|
12
|
+
throw new Error("Hex string length must be a multiple of 2.");
|
|
13
|
+
return t[2];
|
|
14
|
+
}
|
|
15
|
+
throw new Error("Data must be a hex string.");
|
|
16
|
+
}
|
|
17
|
+
function b(t) {
|
|
18
|
+
return (t | 256).toString(16).slice(1);
|
|
19
|
+
}
|
|
20
|
+
function m(t, r) {
|
|
21
|
+
return parseInt(t.substr(r, 2), 16);
|
|
22
|
+
}
|
|
23
|
+
function L(t) {
|
|
24
|
+
for (var r = [], e = 0; e < t.length; e += 2)
|
|
25
|
+
r.push(m(t, e));
|
|
26
|
+
return r;
|
|
27
|
+
}
|
|
28
|
+
function P(t) {
|
|
29
|
+
for (var r = "0x", e = 0; e < t.length; r += b(t[e++]))
|
|
30
|
+
;
|
|
31
|
+
return r;
|
|
32
|
+
}
|
|
33
|
+
c.flzCompress = function(t) {
|
|
34
|
+
var r = L(x(t)), e = r.length - 4, n = [], i = [], a = 0, o = 2, s = 0, f, v, S, p, z, u, F, Z, T, D;
|
|
35
|
+
function A(d) {
|
|
36
|
+
return r[d] | r[++d] << 8 | r[++d] << 16;
|
|
37
|
+
}
|
|
38
|
+
function B(d) {
|
|
39
|
+
return 2654435769 * d >> 19 & 8191;
|
|
40
|
+
}
|
|
41
|
+
function R(d, j) {
|
|
42
|
+
for (; d >= 32; )
|
|
43
|
+
for (i[s++] = 31, f = 32; f--; d--)
|
|
44
|
+
i[s++] = r[j++];
|
|
45
|
+
if (d)
|
|
46
|
+
for (i[s++] = d - 1; d--; )
|
|
47
|
+
i[s++] = r[j++];
|
|
48
|
+
}
|
|
49
|
+
for (; o < e - 9; ) {
|
|
50
|
+
do
|
|
51
|
+
F = n[S = B(v = A(o))] || 0, z = (p = (n[S] = o) - F) < 8192 ? A(F) : 16777216;
|
|
52
|
+
while (o < e - 9 && o++ && v != z);
|
|
53
|
+
if (o >= e - 9)
|
|
54
|
+
break;
|
|
55
|
+
for (--o > a && R(o - a, a), u = 0, Z = F + 3, T = o + 3, D = e - T; u < D; u++)
|
|
56
|
+
D *= r[Z + u] === r[T + u];
|
|
57
|
+
for (o += u, --p; u > 262; u -= 262)
|
|
58
|
+
i[s++] = 224 + (p >> 8), i[s++] = 253, i[s++] = p & 255;
|
|
59
|
+
u < 7 ? (i[s++] = (u << 5) + (p >> 8), i[s++] = p & 255) : (i[s++] = 224 + (p >> 8), i[s++] = u - 7, i[s++] = p & 255), n[B(A(o))] = o++, n[B(A(o))] = o++, a = o;
|
|
60
|
+
}
|
|
61
|
+
return R(e + 4 - a, a), P(i);
|
|
62
|
+
}, c.flzDecompress = function(t) {
|
|
63
|
+
for (var r = L(x(t)), e = 0, n = 0, i, a, o, s, f = []; e < r.length; )
|
|
64
|
+
if (o = r[e] >> 5)
|
|
65
|
+
for (a = 256 * (r[e] & 31) + r[e + 2 - (o = o < 7)], i = o ? 2 + (r[e] >> 5) : 9 + r[e + 1], e = e + 3 - o, s = n - a - 1; i--; )
|
|
66
|
+
f[n++] = f[s++];
|
|
67
|
+
else
|
|
68
|
+
for (i = 1 + r[e++]; i--; )
|
|
69
|
+
f[n++] = r[e++];
|
|
70
|
+
return P(f);
|
|
71
|
+
}, c.cdCompress = function(t) {
|
|
72
|
+
t = x(t);
|
|
73
|
+
var r = "0x", e = 0, n = 0, i = 0, a;
|
|
74
|
+
function o(f) {
|
|
75
|
+
r += b((r.length < 4 * 2 + 2) * 255 ^ f);
|
|
76
|
+
}
|
|
77
|
+
function s(f, v) {
|
|
78
|
+
o(0), o(v - 1 + f * 128);
|
|
79
|
+
}
|
|
80
|
+
for (; i < t.length; i += 2) {
|
|
81
|
+
if (a = m(t, i), !a) {
|
|
82
|
+
n && (s(1, n), n = 0), ++e === 128 && (s(0, 128), e = 0);
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
if (a === 255) {
|
|
86
|
+
e && (s(0, e), e = 0), ++n === 32 && (s(1, 32), n = 0);
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
n && (s(1, n), n = 0), e && (s(0, e), e = 0), o(a);
|
|
90
|
+
}
|
|
91
|
+
return n && (s(1, n), n = 0), e && (s(0, e), e = 0), r;
|
|
92
|
+
}, c.cdDecompress = function(t) {
|
|
93
|
+
t = x(t);
|
|
94
|
+
for (var r = "0x", e = 0, n, i, a; e < t.length; ) {
|
|
95
|
+
if (i = (e < 4 * 2) * 255 ^ m(t, e), e += 2, !i) {
|
|
96
|
+
for (i = (e < 4 * 2) * 255 ^ m(t, e), a = (i & 127) + 1, e += 2, n = 0; n < a; ++n)
|
|
97
|
+
r += b((i >> 7 && n < 32) * 255);
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
r += b(i);
|
|
101
|
+
}
|
|
102
|
+
return r;
|
|
103
|
+
};
|
|
104
|
+
var C = {};
|
|
105
|
+
return y.ERC1967Factory = C, C.address = "0x0000000000006396FF2a80c067f99B3d2Ab4Df24", C.abi = JSON.parse('[{0:[],1:"DeploymentFailed"96"SaltDoesNotStartWithCaller"96"Unauthorized"96"UpgradeFailed",2:3959790,9791],1:"AdminChanged",2:10959790,9792,9791],1:"Deployed",2:10959790,9792],1:"Upgraded",2:10},{0:[{90],1:"adminOf",12:[{9199{0:[{90,{91],1:"changeAdmin",12:[],13:"nonpayable",2:15},{0:[{92,{91],1:"deploy",12:[{9098,{0:[{92,{91,{94],1:"deployAndCall",12:[{9098,{0:[{92,{91,{93],1:"deployDeterministic",12:[{9098,{0:[{92,{91,{93,{94],1:"deployDeterministicAndCall",12:[{9098,{0:[],1:"initCodeHash",12:[{6:19,1:"result",2:19}99{0:[{93],1:"predictDeterministicAddress",12:[{6:7,1:"predicted",2:7}99{0:[{90,{92],1:"upgrade",12:[98,{0:[{90,{92,{94],1:"upgradeAndCall",12:[98]'.replace(/9\d/g, function(t) {
|
|
106
|
+
return ["6:7,1:8,2:7}", "6:7,1:9,2:7}", "6:7,1:11,2:7}", "6:19,1:20,2:19}", "6:17,1:18,2:17}", "},{4:false,0:[", ",2:3},{0:[],1:", "{5:true,", "],13:16,2:15}", "],13:14,2:15},"][t - 90];
|
|
107
|
+
}).replace(/\d+/g, function(t) {
|
|
108
|
+
return '"' + "inputs,name,type,error,anonymous,indexed,internalType,address,proxy,admin,event,implementation,outputs,stateMutability,view,function,payable,bytes,data,bytes32,salt".split(",")[t] + '"';
|
|
109
|
+
})), w || (g.solady = y), y;
|
|
110
|
+
});
|
|
111
|
+
})(E, E.exports);
|
|
112
|
+
var k = E.exports;
|
|
113
|
+
class G {
|
|
114
|
+
/**
|
|
115
|
+
* Creates an instance of Boost.
|
|
116
|
+
*
|
|
117
|
+
* @constructor
|
|
118
|
+
* @param {BoostConfig} config
|
|
119
|
+
*/
|
|
120
|
+
constructor(l) {
|
|
121
|
+
this.id = l.id, this.budget = l.budget, this.action = l.action, this.validator = l.validator, this.allowList = l.allowList, this.incentives = l.incentives, this.protocolFee = l.protocolFee || 0n, this.referralFee = l.referralFee || 0n, this.maxParticipants = l.maxParticipants || 0n, this.owner = l.owner || H;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
function I({
|
|
125
|
+
budget: h,
|
|
126
|
+
action: l,
|
|
127
|
+
validator: g,
|
|
128
|
+
allowList: w,
|
|
129
|
+
incentives: y,
|
|
130
|
+
protocolFee: c = 0n,
|
|
131
|
+
referralFee: x = 0n,
|
|
132
|
+
maxParticipants: b = 0n,
|
|
133
|
+
owner: m
|
|
134
|
+
}) {
|
|
135
|
+
return k.LibZip.cdCompress(
|
|
136
|
+
U(
|
|
137
|
+
N([
|
|
138
|
+
"BoostPayload payload",
|
|
139
|
+
"struct BoostPayload { address budget; Target action; Target validator; Target allowList; Target[] incentives; uint64 protocolFee; uint64 referralFee; uint256 maxParticipants; address owner; }",
|
|
140
|
+
"struct Target { bool isBase; address instance; bytes parameters; }"
|
|
141
|
+
]),
|
|
142
|
+
[
|
|
143
|
+
{
|
|
144
|
+
budget: h,
|
|
145
|
+
action: l,
|
|
146
|
+
validator: g,
|
|
147
|
+
allowList: w,
|
|
148
|
+
incentives: y,
|
|
149
|
+
protocolFee: c,
|
|
150
|
+
referralFee: x,
|
|
151
|
+
maxParticipants: b,
|
|
152
|
+
owner: m
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
)
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
export {
|
|
159
|
+
G as Boost,
|
|
160
|
+
I as prepareBoostPayload
|
|
161
|
+
};
|
|
162
|
+
//# sourceMappingURL=Boost.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Boost.js","sources":["../../../node_modules/.pnpm/solady@0.0.208/node_modules/solady/js/solady.js","../src/Boost.ts"],"sourcesContent":["/**\n * Accompanying JavaScript library for Solady.\n *\n * To install:\n * \n * ```\n * npm install solady\n * ```\n *\n * Module exports:\n * \n * - `LibZip`\n * - `flzCompress(data)`: Compresses hex encoded data with FastLZ.\n * - `flzDecompress(data)`: Decompresses hex encoded data with FastLZ.\n * - `cdCompress(data)`: Compresses hex encoded calldata.\n * - `cdDecompress(data)`: Decompresses hex encoded calldata.\n * \n * - `ERC1967Factory`\n * - `address`: Canonical address of Solady's ERC1967Factory.\n * - `abi`: ABI of Solady's ERC1967Factory.\n *\n * @module solady\n */\n(function(global, factory) {\n\n \"use strict\";\n\n if (typeof module === \"object\" && typeof module.exports === \"object\") {\n module.exports = factory(global, 1);\n if (typeof exports === \"object\") {\n exports.LibZip = module.exports.LibZip;\n exports.ERC1967Factory = module.exports.ERC1967Factory;\n }\n } else {\n factory(global);\n }\n\n})(typeof window !== \"undefined\" ? window : this, function(window, noGlobal) {\n\n \"use strict\";\n\n var solady = {};\n\n /*============================================================*/\n /* LibZip Operations */\n /*============================================================*/\n\n // See: https://github.com/vectorized/solady/blob/main/src/utils/LibZip.sol\n\n /**\n * FastLZ and calldata compression / decompression functions.\n * @namespace\n * @alias module:solady.LibZip\n */\n var LibZip = {};\n\n solady.LibZip = LibZip;\n\n function hexString(data) {\n if (typeof data === \"string\" || data instanceof String) {\n if (data = data.match(/^[\\s\\uFEFF\\xA0]*(0[Xx])?([0-9A-Fa-f]*)[\\s\\uFEFF\\xA0]*$/)) {\n if (data[2].length % 2) {\n throw new Error(\"Hex string length must be a multiple of 2.\");\n }\n return data[2];\n }\n }\n throw new Error(\"Data must be a hex string.\");\n }\n\n function byteToString(b) {\n return (b | 0x100).toString(16).slice(1);\n }\n\n function parseByte(data, i) {\n return parseInt(data.substr(i, 2), 16);\n }\n\n function hexToBytes(data) {\n var a = [], i = 0;\n for (; i < data.length; i += 2) a.push(parseByte(data, i));\n return a;\n }\n\n function bytesToHex(a) {\n var o = \"0x\", i = 0;\n for (; i < a.length; o += byteToString(a[i++])) ;\n return o;\n }\n\n /**\n * Compresses hex encoded data with the FastLZ LZ77 algorithm.\n * @param {string} data A hex encoded string representing the original data.\n * @returns {string} The compressed result as a hex encoded string.\n */\n LibZip.flzCompress = function(data) {\n var ib = hexToBytes(hexString(data)), b = ib.length - 4;\n var ht = [], ob = [], a = 0, i = 2, o = 0, j, s, h, d, c, l, r, p, q, e;\n\n function u24(i) {\n return ib[i] | (ib[++i] << 8) | (ib[++i] << 16);\n }\n\n function hash(x) {\n return ((2654435769 * x) >> 19) & 8191;\n }\n\n function literals(r, s) {\n while (r >= 32) for (ob[o++] = 31, j = 32; j--; r--) ob[o++] = ib[s++];\n if (r) for (ob[o++] = r - 1; r--; ) ob[o++] = ib[s++];\n }\n\n while (i < b - 9) {\n do {\n r = ht[h = hash(s = u24(i))] || 0;\n c = (d = (ht[h] = i) - r) < 8192 ? u24(r) : 0x1000000;\n } while (i < b - 9 && i++ && s != c);\n if (i >= b - 9) break;\n if (--i > a) literals(i - a, a);\n for (l = 0, p = r + 3, q = i + 3, e = b - q; l < e; l++) e *= ib[p + l] === ib[q + l];\n i += l;\n for (--d; l > 262; l -= 262) ob[o++] = 224 + (d >> 8), ob[o++] = 253, ob[o++] = d & 255;\n if (l < 7) ob[o++] = (l << 5) + (d >> 8), ob[o++] = d & 255;\n else ob[o++] = 224 + (d >> 8), ob[o++] = l - 7, ob[o++] = d & 255;\n ht[hash(u24(i))] = i++, ht[hash(u24(i))] = i++, a = i;\n }\n literals(b + 4 - a, a);\n return bytesToHex(ob);\n }\n\n /**\n * Decompresses hex encoded data with the FastLZ LZ77 algorithm.\n * @param {string} data A hex encoded string representing the compressed data.\n * @returns {string} The decompressed result as a hex encoded string.\n */\n LibZip.flzDecompress = function(data) {\n var ib = hexToBytes(hexString(data)), i = 0, o = 0, l, f, t, r, h, ob = [];\n while (i < ib.length) {\n if (!(t = ib[i] >> 5)) {\n for (l = 1 + ib[i++]; l--;) ob[o++] = ib[i++];\n } else {\n f = 256 * (ib[i] & 31) + ib[i + 2 - (t = t < 7)];\n l = t ? 2 + (ib[i] >> 5) : 9 + ib[i + 1];\n i = i + 3 - t;\n r = o - f - 1;\n while (l--) ob[o++] = ob[r++];\n }\n }\n return bytesToHex(ob);\n }\n\n /**\n * Compresses hex encoded calldata.\n * @param {string} data A hex encoded string representing the original data.\n * @returns {string} The compressed result as a hex encoded string.\n */\n LibZip.cdCompress = function(data) {\n data = hexString(data);\n var o = \"0x\", z = 0, y = 0, i = 0, c;\n\n function pushByte(b) {\n o += byteToString(((o.length < 4 * 2 + 2) * 0xff) ^ b);\n }\n\n function rle(v, d) {\n pushByte(0x00);\n pushByte(d - 1 + v * 0x80);\n }\n\n for (; i < data.length; i += 2) {\n c = parseByte(data, i);\n if (!c) {\n if (y) rle(1, y), y = 0;\n if (++z === 0x80) rle(0, 0x80), z = 0;\n continue;\n }\n if (c === 0xff) {\n if (z) rle(0, z), z = 0;\n if (++y === 0x20) rle(1, 0x20), y = 0;\n continue;\n }\n if (y) rle(1, y), y = 0;\n if (z) rle(0, z), z = 0;\n pushByte(c);\n }\n if (y) rle(1, y), y = 0;\n if (z) rle(0, z), z = 0;\n return o;\n }\n\n /**\n * Decompresses hex encoded calldata.\n * @param {string} data A hex encoded string representing the compressed data.\n * @returns {string} The decompressed result as a hex encoded string.\n */\n LibZip.cdDecompress = function(data) {\n data = hexString(data);\n var o = \"0x\", i = 0, j, c, s;\n\n while (i < data.length) {\n c = ((i < 4 * 2) * 0xff) ^ parseByte(data, i);\n i += 2;\n if (!c) {\n c = ((i < 4 * 2) * 0xff) ^ parseByte(data, i);\n s = (c & 0x7f) + 1;\n i += 2;\n for (j = 0; j < s; ++j) o += byteToString((c >> 7 && j < 32) * 0xff);\n continue;\n }\n o += byteToString(c);\n }\n return o;\n }\n\n /*============================================================*/\n /* ERC1967Factory */\n /*============================================================*/\n\n // See: https://github.com/vectorized/solady/blob/main/src/utils/ERC1967Factory.sol\n\n /**\n * ERC1967Factory canonical address and ABI.\n * @namespace\n * @alias module:solady.ERC1967Factory\n */\n var ERC1967Factory = {};\n\n solady.ERC1967Factory = ERC1967Factory;\n\n /**\n * Canonical address of Solady's ERC1967Factory.\n * @type {string}\n */\n ERC1967Factory.address = \"0x0000000000006396FF2a80c067f99B3d2Ab4Df24\";\n\n /**\n * ABI of Solady's ERC1967Factory.\n * @type {Object}\n */\n ERC1967Factory.abi = JSON.parse('[{0:[],1:\"DeploymentFailed\"96\"SaltDoesNotStartWithCaller\"96\"Unauthorized\"96\"UpgradeFailed\",2:3959790,9791],1:\"AdminChanged\",2:10959790,9792,9791],1:\"Deployed\",2:10959790,9792],1:\"Upgraded\",2:10},{0:[{90],1:\"adminOf\",12:[{9199{0:[{90,{91],1:\"changeAdmin\",12:[],13:\"nonpayable\",2:15},{0:[{92,{91],1:\"deploy\",12:[{9098,{0:[{92,{91,{94],1:\"deployAndCall\",12:[{9098,{0:[{92,{91,{93],1:\"deployDeterministic\",12:[{9098,{0:[{92,{91,{93,{94],1:\"deployDeterministicAndCall\",12:[{9098,{0:[],1:\"initCodeHash\",12:[{6:19,1:\"result\",2:19}99{0:[{93],1:\"predictDeterministicAddress\",12:[{6:7,1:\"predicted\",2:7}99{0:[{90,{92],1:\"upgrade\",12:[98,{0:[{90,{92,{94],1:\"upgradeAndCall\",12:[98]'.replace(/9\\d/g, function (m) { return [\"6:7,1:8,2:7}\",\"6:7,1:9,2:7}\",\"6:7,1:11,2:7}\",\"6:19,1:20,2:19}\",\"6:17,1:18,2:17}\",\"},{4:false,0:[\",\",2:3},{0:[],1:\",\"{5:true,\",\"],13:16,2:15}\",\"],13:14,2:15},\"][m-90] }).replace(/\\d+/g, function (m) { return '\"' + (\"inputs,name,type,error,anonymous,indexed,internalType,address,proxy,admin,event,implementation,outputs,stateMutability,view,function,payable,bytes,data,bytes32,salt\".split(\",\")[m]) + '\"' }));\n\n /*--------------------------- END ----------------------------*/\n\n if (typeof define === \"function\" && define.amd) {\n define(\"solady\", [], function() {\n return solady\n });\n }\n\n if (!noGlobal) {\n window.solady = solady;\n }\n\n return solady;\n});\n","import { LibZip } from 'solady';\nimport {\n type Address,\n type Hex,\n encodeAbiParameters,\n parseAbiParameters,\n zeroAddress,\n} from 'viem';\nimport type { Action } from './Actions/Action';\nimport type { AllowList } from './AllowLists/AllowList';\nimport type { Budget } from './Budgets/Budget';\nimport type { Incentive } from './Incentives/Incentive';\nimport type { Validator } from './Validators/Validator';\n\n/**\n * Configuration used to instantiate a `Boost` instance.\n *\n * @export\n * @interface BoostPayload\n * @typedef {BoostPayload}\n */\nexport interface BoostConfig {\n /**\n *\n * @type {bigint}\n */\n id: bigint;\n /**\n *\n * @type {Budget}\n */\n budget: Budget;\n /**\n *\n * @type {Action}\n */\n action: Action;\n /**\n *\n * @type {Validator}\n */\n validator: Validator;\n /**\n *\n * @type {AllowList}\n */\n allowList: AllowList;\n /**\n *\n * @type {Array<Incentive>}\n */\n incentives: Array<Incentive>;\n /**\n *\n * @type {?bigint}\n */\n protocolFee?: bigint;\n /**\n *\n * @type {?bigint}\n */\n referralFee?: bigint;\n /**\n *\n * @type {?bigint}\n */\n maxParticipants?: bigint;\n /**\n *\n * @type {?Address}\n */\n owner?: Address;\n}\n\n/**\n * A struct representing a single Boost. Typically you would not construct this directly, rather get an instance from `BoostCore.createBoost` or `BoostCore.getBoost`\n *\n * @export\n * @class Boost\n * @typedef {Boost}\n */\nexport class Boost {\n /**\n *\n * @readonly\n * @type {bigint}\n */\n readonly id: bigint;\n /**\n *\n * @readonly\n * @type {Budget}\n */\n readonly budget: Budget;\n /**\n *\n * @readonly\n * @type {Action}\n */\n readonly action: Action;\n /**\n *\n * @readonly\n * @type {Validator}\n */\n readonly validator: Validator;\n /**\n *\n * @readonly\n * @type {AllowList}\n */\n readonly allowList: AllowList;\n /**\n *\n * @readonly\n * @type {Array<Incentive>}\n */\n readonly incentives: Array<Incentive>;\n /**\n *\n * @readonly\n * @type {bigint}\n */\n readonly protocolFee: bigint;\n /**\n *\n * @readonly\n * @type {bigint}\n */\n readonly referralFee: bigint;\n /**\n *\n * @readonly\n * @type {bigint}\n */\n readonly maxParticipants: bigint;\n /**\n *\n * @readonly\n * @type {Address}\n */\n readonly owner: Address;\n\n /**\n * Creates an instance of Boost.\n *\n * @constructor\n * @param {BoostConfig} config\n */\n constructor(config: BoostConfig) {\n this.id = config.id;\n this.budget = config.budget;\n this.action = config.action;\n this.validator = config.validator;\n this.allowList = config.allowList;\n this.incentives = config.incentives;\n this.protocolFee = config.protocolFee || 0n;\n this.referralFee = config.referralFee || 0n;\n this.maxParticipants = config.maxParticipants || 0n;\n this.owner = config.owner || zeroAddress;\n }\n}\n\n/**\n * Object representation of `BoostLib.Target` struct. Used for low level Boost creation operations.\n * This is used to pass the base contract and its initialization parameters in an efficient manner\n *\n * @export\n * @typedef {Target}\n */\nexport type Target = {\n isBase: boolean;\n instance: Address;\n parameters: Hex;\n};\n\n/**\n * Object representation of `BoostCore.InitPayload` struct.\n *\n * @export\n * @interface BoostPayload\n * @typedef {BoostPayload}\n */\nexport interface BoostPayload {\n /**\n * Address to valid budget.\n *\n * @type {Address}\n */\n budget: Address;\n /**\n * Target for existing action, or base with initialization payload.\n *\n * @type {Target}\n */\n action: Target;\n /**\n * Target for existing validator, or base with initialization payload.\n *\n * @type {Target}\n */\n validator: Target;\n /**\n * Target for existing allowList, or base with initialization payload.\n *\n * @type {Target}\n */\n allowList: Target;\n /**\n * Targets for new incentives, with initialization payloads.\n *\n * @type {Target[]}\n */\n incentives: Target[];\n /**\n * The base protocol fee (in bps)\n *\n * @type {?bigint}\n */\n protocolFee?: bigint;\n /**\n * The base referral fee (in bps)\n *\n * @type {?bigint}\n */\n referralFee?: bigint;\n /**\n * Optional maximum amount of participants in the Boost.\n *\n * @type {?bigint}\n */\n maxParticipants?: bigint;\n /**\n * The owner of the Boost.\n *\n * @type {Address}\n */\n owner: Address;\n}\n\n/**\n * Given a valid {@link BoostPayload}, properly encode and compress the payload for use with `createBoost`\n *\n * @export\n * @param {BoostPayload} param0\n * @param {Address} param0.budget - Address to valid budget.\n * @param {Target} param0.action - Target for existing action, or base with initialization payload.\n * @param {Target} param0.validator - Target for existing validator, or base with initialization payload.\n * @param {Target} param0.allowList - Target for existing allowList, or base with initialization payload.\n * @param {Target[]} param0.incentives - Targets for new incentives, with initialization payloads.\n * @param {bigint} [param0.protocolFee=0n] - The base protocol fee (in bps)\n * @param {bigint} [param0.referralFee=0n] - The base referral fee (in bps)\n * @param {bigint} [param0.maxParticipants=0n] - Optional maximum amount of participants in the Boost.\n * @param {Address} param0.owner - The owner of the Boost.\n * @returns {Hex}\n */\nexport function prepareBoostPayload({\n budget,\n action,\n validator,\n allowList,\n incentives,\n protocolFee = 0n,\n referralFee = 0n,\n maxParticipants = 0n,\n owner,\n}: BoostPayload): Hex {\n return LibZip.cdCompress(\n encodeAbiParameters(\n parseAbiParameters([\n 'BoostPayload payload',\n 'struct BoostPayload { address budget; Target action; Target validator; Target allowList; Target[] incentives; uint64 protocolFee; uint64 referralFee; uint256 maxParticipants; address owner; }',\n 'struct Target { bool isBase; address instance; bytes parameters; }',\n ]),\n [\n {\n budget,\n action,\n validator,\n allowList,\n incentives,\n protocolFee,\n referralFee,\n maxParticipants,\n owner,\n },\n ],\n ),\n ) as Hex;\n}\n"],"names":["global","factory","module","exports","this","window","noGlobal","solady","LibZip","hexString","data","byteToString","b","parseByte","i","hexToBytes","a","bytesToHex","o","ib","ht","ob","j","s","h","d","c","l","r","p","q","e","u24","hash","x","literals","f","t","z","y","pushByte","rle","v","ERC1967Factory","m","Boost","config","zeroAddress","prepareBoostPayload","budget","action","validator","allowList","incentives","protocolFee","referralFee","maxParticipants","owner","encodeAbiParameters","parseAbiParameters"],"mappings":";;;AAuBA,GAAC,SAASA,GAAQC,GAAS;AAKnB,IAAAC,YAAiBD,EAAQD,GAAQ,CAAC,GAE9BG,WAAiBD,EAAO,QAAQ,QAChCC,mBAAyBD,EAAO,QAAQ;AAAA,EAMpD,GAAG,OAAO,SAAW,MAAc,SAASE,GAAM,SAASC,GAAQC,GAAU;AAIzE,QAAIC,IAAS,CAAA,GAaTC,IAAS,CAAA;AAEb,IAAAD,EAAO,SAASC;AAEhB,aAASC,EAAUC,GAAM;AACrB,WAAI,OAAOA,KAAS,YAAYA,aAAgB,YACxCA,IAAOA,EAAK,MAAM,wDAAwD,IAAG;AAC7E,YAAIA,EAAK,CAAC,EAAE,S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AE,QAAQ,QAAQ,SAAUA,GAAG;AAAE,aAAO,MAAO,uKAAuK,MAAM,GAAG,EAAEA,CAAC,IAAK;AAAA,IAAK,CAAA,CAAC,GAUxnCtC,MACDD,EAAO,SAASE,IAGbA;AAAA,EACX,CAAC;;;AC7KM,MAAMsC,EAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAoEjB,YAAYC,GAAqB;AAC/B,SAAK,KAAKA,EAAO,IACjB,KAAK,SAASA,EAAO,QACrB,KAAK,SAASA,EAAO,QACrB,KAAK,YAAYA,EAAO,WACxB,KAAK,YAAYA,EAAO,WACxB,KAAK,aAAaA,EAAO,YACpB,KAAA,cAAcA,EAAO,eAAe,IACpC,KAAA,cAAcA,EAAO,eAAe,IACpC,KAAA,kBAAkBA,EAAO,mBAAmB,IAC5C,KAAA,QAAQA,EAAO,SAASC;AAAA,EAC/B;AACF;AA+FO,SAASC,EAAoB;AAAA,EAClC,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,aAAAC,IAAc;AAAA,EACd,iBAAAC,IAAkB;AAAA,EAClB,OAAAC;AACF,GAAsB;AACpB,SAAOjD,EAAO,OAAA;AAAA,IACZkD;AAAA,MACEC,EAAmB;AAAA,QACjB;AAAA,QACA;AAAA,QACA;AAAA,MAAA,CACD;AAAA,MACD;AAAA,QACE;AAAA,UACE,QAAAV;AAAA,UACA,QAAAC;AAAA,UACA,WAAAC;AAAA,UACA,WAAAC;AAAA,UACA,YAAAC;AAAA,UACA,aAAAC;AAAA,UACA,aAAAC;AAAA,UACA,iBAAAC;AAAA,UACA,OAAAC;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EAAA;AAEJ;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./generated-wKBNvm48.cjs"),L=require("@wagmi/core"),r=require("viem"),Q=require("./Actions/Action.cjs"),J=require("./Actions/EventAction.cjs"),K=require("./AllowLists/AllowList.cjs"),X=require("./AllowLists/SimpleAllowList.cjs"),Y=require("./AllowLists/SimpleDenyList.cjs"),Z=require("./Auth/PassthroughAuth.cjs"),D=require("./Boost.cjs"),ff=require("./Budgets/Budget.cjs"),ef=require("./Budgets/ManagedBudget.cjs"),af=require("./Deployable/Deployable.cjs"),bf=require("./Incentives/AllowListIncentive.cjs"),tf=require("./Incentives/CGDAIncentive.cjs"),sf=require("./Incentives/ERC20Incentive.cjs"),O=require("./Incentives/Incentive.cjs"),cf=require("./Incentives/PointsIncentive.cjs"),nf=require("./Validators/SignerValidator.cjs"),rf=require("./Validators/Validator.cjs"),y=require("./errors.cjs"),M=require("viem/actions"),V=require("viem/utils"),df="0x60806040526544364c5bb0006004556103e860055f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506103e8600560086101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555034801561006e575f80fd5b506040516135683803806135688339818101604052810190610090919061029f565b61009f3361012660201b60201c565b8160015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506102dd565b61013461020260201b60201c565b156101ac577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392780541561016e57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3506101ff565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b5f90565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102338261020a565b9050919050565b5f61024482610229565b9050919050565b6102548161023a565b811461025e575f80fd5b50565b5f8151905061026f8161024b565b92915050565b61027e81610229565b8114610288575f80fd5b50565b5f8151905061029981610275565b92915050565b5f80604083850312156102b5576102b4610206565b5b5f6102c285828601610261565b92505060206102d38582860161028b565b9150509250929050565b61327e806102ea5f395ff3fe60806040526004361061014a575f3560e01c8063892b97f8116100b5578063d73792a91161006e578063d73792a9146103d0578063e21ff731146103fa578063eccc19a614610436578063f04e283e1461045e578063f2fde38b1461047a578063fee81cf4146104965761014a565b8063892b97f8146102e45780638da5cb5b1461030c5780638fe4f5231461033657806399d32fc414610352578063a92647dc1461037c578063b0e21e8a146103a65761014a565b806354d1f13d1161010757806354d1f13d146102365780635edb9eb014610240578063715018a61461026a578063730f9c57146102745780637b1039991461029057806384ae2bc6146102ba5761014a565b806313c8e2de1461014e578063256929621461018a5780632e75ab501461019457806339a51be5146101bc57806343bc42d3146101e657806346877b1a1461020e575b5f80fd5b348015610159575f80fd5b50610174600480360381019061016f91906122d2565b6104d2565b60405161018191906125c3565b60405180910390f35b6101926107ac565b005b34801561019f575f80fd5b506101ba60048036038101906101b591906122d2565b6107fd565b005b3480156101c7575f80fd5b506101d061080f565b6040516101dd91906125f2565b60405180910390f35b3480156101f1575f80fd5b5061020c60048036038101906102079190612635565b610834565b005b348015610219575f80fd5b50610234600480360381019061022f919061268a565b610867565b005b61023e6108b2565b005b34801561024b575f80fd5b506102546108eb565b60405161026191906126c4565b60405180910390f35b6102726108f6565b005b61028e6004803603810190610289919061273e565b610909565b005b34801561029b575f80fd5b506102a4610b9a565b6040516102b191906127f4565b60405180910390f35b3480156102c5575f80fd5b506102ce610bbf565b6040516102db919061281c565b60405180910390f35b3480156102ef575f80fd5b5061030a60048036038101906103059190612635565b610bd9565b005b348015610317575f80fd5b50610320610c0d565b60405161032d91906125f2565b60405180910390f35b610350600480360381019061034b9190612835565b610c35565b005b34801561035d575f80fd5b50610366610c4a565b60405161037391906126c4565b60405180910390f35b348015610387575f80fd5b50610390610c50565b60405161039d91906128d9565b60405180910390f35b3480156103b1575f80fd5b506103ba610c75565b6040516103c7919061281c565b60405180910390f35b3480156103db575f80fd5b506103e4610c8e565b6040516103f1919061281c565b60405180910390f35b348015610405575f80fd5b50610420600480360381019061041b91906128f2565b610c94565b60405161042d91906125c3565b60405180910390f35b348015610441575f80fd5b5061045c6004803603810190610457919061268a565b61164f565b005b6104786004803603810190610473919061268a565b61169a565b005b610494600480360381019061048f919061268a565b6116d8565b005b3480156104a1575f80fd5b506104bc60048036038101906104b7919061268a565b611701565b6040516104c991906126c4565b60405180910390f35b6104da612126565b5f82815481106104ed576104ec61293d565b5b905f5260205f209060080201604051806101200160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600382015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600482018054806020026020016040519081016040528092919081815260200182805480156106da57602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610691575b50505050508152602001600582015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016005820160089054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160068201548152602001600782015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050919050565b5f6107b561171a565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b610805611724565b8060048190555050565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61083c611724565b8060055f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050565b61086f611724565b8060035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b5f8080549050905090565b6108fe611724565b6109075f61175b565b565b3068929eee149b4bd2126854036109275763ab143c065f526004601cfd5b3068929eee149b4bd21268555f8087815481106109475761094661293d565b5b905f5260205f20906008020190506004543410156109a2575f346004546040517f5c54305e0000000000000000000000000000000000000000000000000000000081526004016109999392919061296a565b60405180910390fd5b6109ac8186611821565b806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663703b690088888588886040518663ffffffff1660e01b8152600401610a109594939291906129f9565b6020604051808303815f875af1158015610a2c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a509190612a7a565b610a86576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806004018681548110610a9c57610a9b61293d565b5b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bb1757cf8386866040518463ffffffff1660e01b8152600401610b0093929190612aa5565b6020604051808303815f875af1158015610b1c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b409190612a7a565b610b85578184846040517f4139d81d000000000000000000000000000000000000000000000000000000008152600401610b7c93929190612aa5565b60405180910390fd5b503868929eee149b4bd2126855505050505050565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560089054906101000a900467ffffffffffffffff1681565b610be1611724565b80600560086101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b610c43858585858533610909565b5050505050565b60045481565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055f9054906101000a900467ffffffffffffffff1681565b61271081565b610c9c612126565b335f73ffffffffffffffffffffffffffffffffffffffff1660025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614158015610d90575060025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fe9fbb80826040518263ffffffff1660e01b8152600401610d4f91906125f2565b602060405180830381865afa158015610d6a573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d8e9190612a7a565b155b15610dc7576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3068929eee149b4bd212685403610de55763ab143c065f526004601cfd5b3068929eee149b4bd21268555f610e3e85858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f8201169050808301925050505050505061198f565b806020019051810190610e519190612f35565b9050610e5f815f0151611a28565b5f8060018160018154018082558091505003905f5260205f2090600802019050816101000151816007015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550815f0151816003015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160a0015160055f9054906101000a900467ffffffffffffffff16610f309190612fa9565b816005015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508160c00151600560089054906101000a900467ffffffffffffffff16610f7f9190612fa9565b8160050160086101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508160e001518160060181905550610fe67fe67157950000000000000000000000000000000000000000000000000000000083602001516001611b03565b815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506110567fe2089f790000000000000000000000000000000000000000000000000000000083606001516001611b03565b816002015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506110a88260800151835f0151611b25565b8160040190805190602001906110bf9291906121ec565b505f73ffffffffffffffffffffffffffffffffffffffff1682604001516020015173ffffffffffffffffffffffffffffffffffffffff16146111305761112b7f5912b89c0000000000000000000000000000000000000000000000000000000083604001516001611b03565b611219565b805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166301ffc9a77f5912b89c000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b81526004016111ab919061301e565b602060405180830381865afa1580156111c6573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111ea9190612a7a565b6111f4575f611218565b805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff165b5b816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16816007015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660015f805490506112de9190613037565b7f116812d3ad4507d72f2c428b63246d594ca055a1dc119394285504c23d1f34cd8460040180549050856001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16866002015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16876003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051611383949392919061306a565b60405180910390a480604051806101200160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600382015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016004820180548060200260200160405190810160405280929190818152602001828054801561156d57602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611524575b50505050508152602001600582015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016005820160089054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160068201548152602001600782015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525050935050503868929eee149b4bd21268555092915050565b611657611724565b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6116a2611724565b63389a75e1600c52805f526020600c2080544211156116c857636f5e88185f526004601cfd5b5f8155506116d58161175b565b50565b6116e0611724565b8060601b6116f557637448fbae5f526004601cfd5b6116fe8161175b565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f6202a300905090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314611759576382b429005f526004601cfd5b565b611763611eef565b156117c8577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b821781555061181e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f600454031561198b575f60045490505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146118e7575f61271067ffffffffffffffff168460050160089054906101000a900467ffffffffffffffff1667ffffffffffffffff166004546118a291906130ad565b6118ac919061311b565b905080826118ba9190613037565b91506118e5818473ffffffffffffffffffffffffffffffffffffffff16611ef390919063ffffffff16565b505b61193f6002826118f7919061311b565b846007015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611ef390919063ffffffff16565b6119894760035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611ef390919063ffffffff16565b505b5050565b6060815115611a235760405190506020810160048301805184518501811983525b80861015611a09576001860195508551601f1a806119f9576001870196508651601f1a5f198652607f81116119e757600181013887395b6001607f821601860195505050611a04565b808553600185019450505b6119b0565b81835260208501840385525f845260208401604052505050505b919050565b611a527fea5ad34e0000000000000000000000000000000000000000000000000000000082611f10565b8073ffffffffffffffffffffffffffffffffffffffff1663fe9fbb80336040518263ffffffff1660e01b8152600401611a8b91906125f2565b602060405180830381865afa158015611aa6573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611aca9190612a7a565b611b00576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b5f611b12848460200151611f10565b611b1c8383612007565b90509392505050565b6060825167ffffffffffffffff811115611b4257611b41612ad9565b5b604051908082528060200260200182016040528015611b705781602001602082028036833780820191505090505b5090505f5b8351811015611ee857611bc67f5970a68900000000000000000000000000000000000000000000000000000000858381518110611bb557611bb461293d565b5b602002602001015160200151611f10565b838181518110611bd957611bd861293d565b5b60200260200101515f0151611c65577f5970a68900000000000000000000000000000000000000000000000000000000848281518110611c1c57611c1b61293d565b5b6020026020010151602001516040517fe1c44448000000000000000000000000000000000000000000000000000000008152600401611c5c92919061314b565b60405180910390fd5b611caa7f5970a68900000000000000000000000000000000000000000000000000000000858381518110611c9c57611c9b61293d565b5b60200260200101515f611b03565b828281518110611cbd57611cbc61293d565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505f828281518110611d0b57611d0a61293d565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16634e7165a2868481518110611d4157611d4061293d565b5b6020026020010151604001516040518263ffffffff1660e01b8152600401611d6991906131b4565b5f60405180830381865afa158015611d83573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190611dab91906131d4565b90505f815114611e3c578373ffffffffffffffffffffffffffffffffffffffff1663fa4ca9b1826040518263ffffffff1660e01b8152600401611dee91906131b4565b6020604051808303815f875af1158015611e0a573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e2e9190612a7a565b611e3b57611e3a61321b565b5b5b828281518110611e4f57611e4e61293d565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1663439fab91868481518110611e8557611e8461293d565b5b6020026020010151604001516040518263ffffffff1660e01b8152600401611ead91906131b4565b5f604051808303815f87803b158015611ec4575f80fd5b505af1158015611ed6573d5f803e3d5ffd5b50505050508080600101915050611b75565b5092915050565b5f90565b5f385f3884865af1611f0c5763b12d13eb5f526004601cfd5b5050565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480611fbf57508073ffffffffffffffffffffffffffffffffffffffff166301ffc9a7836040518263ffffffff1660e01b8152600401611f7e919061301e565b602060405180830381865afa158015611f99573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fbd9190612a7a565b155b156120035781816040517fe1c44448000000000000000000000000000000000000000000000000000000008152600401611ffa92919061314b565b60405180910390fd5b5050565b5f825f015161201a57826020015161203e565b61203d836020015173ffffffffffffffffffffffffffffffffffffffff166120c3565b5b9050825f0151801561204d5750815b156120bd578073ffffffffffffffffffffffffffffffffffffffff1663439fab9184604001516040518263ffffffff1660e01b815260040161208f91906131b4565b5f604051808303815f87803b1580156120a6575f80fd5b505af11580156120b8573d5f803e3d5ffd5b505050505b92915050565b5f6120ce5f836120d5565b9050919050565b5f6c5af43d3d93803e602a57fd5bf36021528160145273602c3d8160093d39f33d3d3d3d363d3d37363d735f526035600c84f090508061211c5763301164255f526004601cfd5b5f60215292915050565b6040518061012001604052805f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff168152602001606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020015f81526020015f73ffffffffffffffffffffffffffffffffffffffff1681525090565b828054828255905f5260205f20908101928215612262579160200282015b82811115612261578251825f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509160200191906001019061220a565b5b50905061226f9190612273565b5090565b5b8082111561228a575f815f905550600101612274565b5090565b5f604051905090565b5f80fd5b5f80fd5b5f819050919050565b6122b18161229f565b81146122bb575f80fd5b50565b5f813590506122cc816122a8565b92915050565b5f602082840312156122e7576122e6612297565b5b5f6122f4848285016122be565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f61233f61233a612335846122fd565b61231c565b6122fd565b9050919050565b5f61235082612325565b9050919050565b5f61236182612346565b9050919050565b61237181612357565b82525050565b5f61238182612346565b9050919050565b61239181612377565b82525050565b5f6123a182612346565b9050919050565b6123b181612397565b82525050565b5f6123c182612325565b9050919050565b5f6123d2826123b7565b9050919050565b6123e2816123c8565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f61241b82612346565b9050919050565b61242b81612411565b82525050565b5f61243c8383612422565b60208301905092915050565b5f602082019050919050565b5f61245e826123e8565b61246881856123f2565b935061247383612402565b805f5b838110156124a357815161248a8882612431565b975061249583612448565b925050600181019050612476565b5085935050505092915050565b5f67ffffffffffffffff82169050919050565b6124cc816124b0565b82525050565b6124db8161229f565b82525050565b5f6124eb826122fd565b9050919050565b6124fb816124e1565b82525050565b5f61012083015f8301516125175f860182612368565b50602083015161252a6020860182612388565b50604083015161253d60408601826123a8565b50606083015161255060608601826123d9565b50608083015184820360808601526125688282612454565b91505060a083015161257d60a08601826124c3565b5060c083015161259060c08601826124c3565b5060e08301516125a360e08601826124d2565b506101008301516125b86101008601826124f2565b508091505092915050565b5f6020820190508181035f8301526125db8184612501565b905092915050565b6125ec816124e1565b82525050565b5f6020820190506126055f8301846125e3565b92915050565b612614816124b0565b811461261e575f80fd5b50565b5f8135905061262f8161260b565b92915050565b5f6020828403121561264a57612649612297565b5b5f61265784828501612621565b91505092915050565b612669816124e1565b8114612673575f80fd5b50565b5f8135905061268481612660565b92915050565b5f6020828403121561269f5761269e612297565b5b5f6126ac84828501612676565b91505092915050565b6126be8161229f565b82525050565b5f6020820190506126d75f8301846126b5565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126126fe576126fd6126dd565b5b8235905067ffffffffffffffff81111561271b5761271a6126e1565b5b602083019150836001820283011115612737576127366126e5565b5b9250929050565b5f805f805f8060a0878903121561275857612757612297565b5b5f61276589828a016122be565b965050602061277689828a016122be565b955050604061278789828a01612676565b945050606087013567ffffffffffffffff8111156127a8576127a761229b565b5b6127b489828a016126e9565b935093505060806127c789828a01612676565b9150509295509295509295565b5f6127de82612346565b9050919050565b6127ee816127d4565b82525050565b5f6020820190506128075f8301846127e5565b92915050565b612816816124b0565b82525050565b5f60208201905061282f5f83018461280d565b92915050565b5f805f805f6080868803121561284e5761284d612297565b5b5f61285b888289016122be565b955050602061286c888289016122be565b945050604061287d88828901612676565b935050606086013567ffffffffffffffff81111561289e5761289d61229b565b5b6128aa888289016126e9565b92509250509295509295909350565b5f6128c382612346565b9050919050565b6128d3816128b9565b82525050565b5f6020820190506128ec5f8301846128ca565b92915050565b5f806020838503121561290857612907612297565b5b5f83013567ffffffffffffffff8111156129255761292461229b565b5b612931858286016126e9565b92509250509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f60608201905061297d5f8301866125e3565b61298a60208301856126b5565b61299760408301846126b5565b949350505050565b5f82825260208201905092915050565b828183375f83830152505050565b5f601f19601f8301169050919050565b5f6129d8838561299f565b93506129e58385846129af565b6129ee836129bd565b840190509392505050565b5f608082019050612a0c5f8301886126b5565b612a1960208301876126b5565b612a2660408301866125e3565b8181036060830152612a398184866129cd565b90509695505050505050565b5f8115159050919050565b612a5981612a45565b8114612a63575f80fd5b50565b5f81519050612a7481612a50565b92915050565b5f60208284031215612a8f57612a8e612297565b5b5f612a9c84828501612a66565b91505092915050565b5f604082019050612ab85f8301866125e3565b8181036020830152612acb8184866129cd565b9050949350505050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b612b0f826129bd565b810181811067ffffffffffffffff82111715612b2e57612b2d612ad9565b5b80604052505050565b5f612b4061228e565b9050612b4c8282612b06565b919050565b5f80fd5b5f612b5f826122fd565b9050919050565b5f612b7082612b55565b9050919050565b612b8081612b66565b8114612b8a575f80fd5b50565b5f81519050612b9b81612b77565b92915050565b5f81519050612baf81612660565b92915050565b5f80fd5b5f67ffffffffffffffff821115612bd357612bd2612ad9565b5b612bdc826129bd565b9050602081019050919050565b8281835e5f83830152505050565b5f612c09612c0484612bb9565b612b37565b905082815260208101848484011115612c2557612c24612bb5565b5b612c30848285612be9565b509392505050565b5f82601f830112612c4c57612c4b6126dd565b5b8151612c5c848260208601612bf7565b91505092915050565b5f60608284031215612c7a57612c79612ad5565b5b612c846060612b37565b90505f612c9384828501612a66565b5f830152506020612ca684828501612ba1565b602083015250604082015167ffffffffffffffff811115612cca57612cc9612b51565b5b612cd684828501612c38565b60408301525092915050565b5f67ffffffffffffffff821115612cfc57612cfb612ad9565b5b602082029050602081019050919050565b5f612d1f612d1a84612ce2565b612b37565b90508083825260208201905060208402830185811115612d4257612d416126e5565b5b835b81811015612d8957805167ffffffffffffffff811115612d6757612d666126dd565b5b808601612d748982612c65565b85526020850194505050602081019050612d44565b5050509392505050565b5f82601f830112612da757612da66126dd565b5b8151612db7848260208601612d0d565b91505092915050565b5f81519050612dce8161260b565b92915050565b5f81519050612de2816122a8565b92915050565b5f6101208284031215612dfe57612dfd612ad5565b5b612e09610120612b37565b90505f612e1884828501612b8d565b5f83015250602082015167ffffffffffffffff811115612e3b57612e3a612b51565b5b612e4784828501612c65565b602083015250604082015167ffffffffffffffff811115612e6b57612e6a612b51565b5b612e7784828501612c65565b604083015250606082015167ffffffffffffffff811115612e9b57612e9a612b51565b5b612ea784828501612c65565b606083015250608082015167ffffffffffffffff811115612ecb57612eca612b51565b5b612ed784828501612d93565b60808301525060a0612eeb84828501612dc0565b60a08301525060c0612eff84828501612dc0565b60c08301525060e0612f1384828501612dd4565b60e083015250610100612f2884828501612ba1565b6101008301525092915050565b5f60208284031215612f4a57612f49612297565b5b5f82015167ffffffffffffffff811115612f6757612f6661229b565b5b612f7384828501612de8565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f612fb3826124b0565b9150612fbe836124b0565b9250828201905067ffffffffffffffff811115612fde57612fdd612f7c565b5b92915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61301881612fe4565b82525050565b5f6020820190506130315f83018461300f565b92915050565b5f6130418261229f565b915061304c8361229f565b925082820390508181111561306457613063612f7c565b5b92915050565b5f60808201905061307d5f8301876126b5565b61308a60208301866125e3565b61309760408301856125e3565b6130a460608301846125e3565b95945050505050565b5f6130b78261229f565b91506130c28361229f565b92508282026130d08161229f565b915082820484148315176130e7576130e6612f7c565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6131258261229f565b91506131308361229f565b9250826131405761313f6130ee565b5b828204905092915050565b5f60408201905061315e5f83018561300f565b61316b60208301846125e3565b9392505050565b5f81519050919050565b5f61318682613172565b613190818561299f565b93506131a0818560208601612be9565b6131a9816129bd565b840191505092915050565b5f6020820190508181035f8301526131cc818461317c565b905092915050565b5f602082840312156131e9576131e8612297565b5b5f82015167ffffffffffffffff8111156132065761320561229b565b5b61321284828501612c38565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52600160045260245ffdfea2646970667358221220fb22934e0d9f7a8e32d07cd1f2621ea36204627afface45e5bc80aab6122bb7d64736f6c634300081a0033";function N(b){const e=b.state.current,f=b.state.connections.get(e),a=f==null?void 0:f.accounts,s=a==null?void 0:a[0],t=b.chains.find(d=>d.id===(f==null?void 0:f.chainId)),c=b.state.status;switch(c){case"connected":return{address:s,addresses:a,chain:t,chainId:f==null?void 0:f.chainId,connector:f==null?void 0:f.connector,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:c};case"reconnecting":return{address:s,addresses:a,chain:t,chainId:f==null?void 0:f.chainId,connector:f==null?void 0:f.connector,isConnected:!!s,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:c};case"connecting":return{address:s,addresses:a,chain:t,chainId:f==null?void 0:f.chainId,connector:f==null?void 0:f.connector,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:c};case"disconnected":return{address:void 0,addresses:void 0,chain:void 0,chainId:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:c}}}function of(b){return b.state.chainId}function x(b,e,f){const a=b[e.name];if(typeof a=="function")return a;const s=b[f];return typeof s=="function"?s:t=>e(b,t)}const uf="2.13.0",lf=()=>`@wagmi/core@${uf}`;var j=function(b,e,f,a){if(f==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?b!==e||!a:!e.has(b))throw new TypeError("Cannot read private member from an object whose class did not declare it");return f==="m"?a:f==="a"?a.call(b):a?a.value:e.get(b)},P,$;class A extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return lf()}constructor(e,f={}){var t;super(),P.add(this),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiCoreError"});const a=f.cause instanceof A?f.cause.details:(t=f.cause)!=null&&t.message?f.cause.message:f.details,s=f.cause instanceof A&&f.cause.docsPath||f.docsPath;this.message=[e||"An error occurred.","",...f.metaMessages?[...f.metaMessages,""]:[],...s?[`Docs: ${this.docsBaseUrl}${s}.html${f.docsSlug?`#${f.docsSlug}`:""}`]:[],...a?[`Details: ${a}`]:[],`Version: ${this.version}`].join(`
|
|
2
|
+
`),f.cause&&(this.cause=f.cause),this.details=a,this.docsPath=s,this.metaMessages=f.metaMessages,this.shortMessage=e}walk(e){return j(this,P,"m",$).call(this,this,e)}}P=new WeakSet,$=function b(e,f){return f!=null&&f(e)?e:e.cause?j(this,P,"m",b).call(this,e.cause,f):e};class hf extends A{constructor(){super("Connector not connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotConnectedError"})}}class gf extends A{constructor({address:e,connector:f}){super(`Account "${e}" not found for connector "${f.name}".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAccountNotFoundError"})}}class wf extends A{constructor({connectionChainId:e,connectorChainId:f}){super(`The current chain of the connector (id: ${f}) does not match the connection's chain (id: ${e}).`,{metaMessages:[`Current Chain ID: ${f}`,`Expected Chain ID: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorChainMismatchError"})}}async function T(b,e={}){let f;if(e.connector){const{connector:n}=e,[l,m]=await Promise.all([n.getAccounts(),n.getChainId()]);f={accounts:l,chainId:m,connector:n}}else f=b.state.connections.get(b.state.current);if(!f)throw new hf;const a=e.chainId??f.chainId,s=await f.connector.getChainId();if(s!==f.chainId)throw new wf({connectionChainId:f.chainId,connectorChainId:s});const t=f.connector;if(t.getClient)return t.getClient({chainId:a});const c=V.parseAccount(e.account??f.accounts[0]);c.address=V.getAddress(c.address);const d=b.chains.find(n=>n.id===a),i=await f.connector.getProvider({chainId:a});if(e.account&&!f.accounts.some(n=>n.toLowerCase()===c.address.toLowerCase()))throw new gf({address:c.address,connector:t});return r.createClient({account:c,chain:d,name:"Connector Client",transport:n=>r.custom(i)({...n,retryCount:0})})}async function mf(b,e){const{abi:f,chainId:a,connector:s,...t}=e;let c;e.account?c=e.account:c=(await T(b,{chainId:a,connector:s})).account;const d=b.getClient({chainId:a}),i=x(d,M.simulateContract,"simulateContract"),{result:n,request:l}=await i({...t,abi:f,account:c});return{chainId:d.chain.id,result:n,request:{__mode:"prepared",...l,chainId:a}}}async function H(b,e){const{account:f,chainId:a,connector:s,__mode:t,...c}=e;let d;typeof f=="object"&&f.type==="local"?d=b.getClient({chainId:a}):d=await T(b,{account:f,chainId:a,connector:s});const{connector:i}=N(b);let n;if(t==="prepared"||i!=null&&i.supportsSimulation)n=c;else{const{request:v}=await mf(b,{...c,account:f,chainId:a});n=v}return await x(d,M.writeContract,"writeContract")({...n,...f?{account:f}:{},chain:a?{id:a}:null})}function Af(b){return b.address!==void 0&&typeof b.address=="object"?(e,f)=>{var c;const a=of(e),s=N(e);let t;return f.chainId?t=f.chainId:f.account&&f.account===s.address||f.account===void 0?t=s.chainId:t=a,H(e,{...f,...b.functionName?{functionName:b.functionName}:{},address:t?(c=b.address)==null?void 0:c[t]:void 0,abi:b.abi})}:(e,f)=>H(e,{...f,...b.address?{address:b.address}:{},...b.functionName?{functionName:b.functionName}:{},abi:b.abi})}const vf=r.parseEther("0.000075"),G="0x0561e8fB1EFD614eb905CB93D548Bb217Ad07B92";function yf(b){return b.address}function Cf(b){return b.registryAddress&&b.protocolFeeReceiver}class pf extends af.Deployable{constructor({config:e,account:f,...a}){yf(a)&&a.address?super({account:f,config:e},a.address):Cf(a)?super({account:f,config:e},[a.registryAddress,a.protocolFeeReceiver]):super({account:f,config:e},G),this.abi=o.c}async createBoost(e,f){var S;const a=this.assertValidAddress(),[s,t]=this.validateDeploymentConfig(e,f);let{budget:c,action:d,validator:i,allowList:n,incentives:l,protocolFee:m=0n,referralFee:v=0n,maxParticipants:E=0n,owner:w}=s;const R=Af({abi:o.c,functionName:"createBoost",address:this.address});if(!w&&(w=((S=this._account)==null?void 0:S.address)||L.getAccount(t.config).address||r.zeroAddress,w===r.zeroAddress))throw new y.DeployableUnknownOwnerProvidedError;let z=r.zeroAddress;if(c.address){if(z=c.address,!await c.isAuthorized(a))throw new y.BudgetMustAuthorizeBoostCore(a)}else throw new y.MustInitializeBudgetError;let C={instance:r.zeroAddress,isBase:!0,parameters:r.zeroHash};if(d.address){const u=d.address===d.base||d.isBase;C={isBase:u,instance:d.address,parameters:u&&d.buildParameters(void 0,t).args.at(0)||r.zeroHash}}else C.parameters=d.buildParameters(void 0,t).args.at(0)||r.zeroHash,C.instance=d.base;let p={instance:r.zeroAddress,isBase:!0,parameters:r.zeroHash};if(i.address){const u=i.address===i.base||i.isBase;p={isBase:u,instance:i.address,parameters:u&&i.buildParameters({signers:[w],validatorCaller:a},t).args.at(0)||r.zeroHash}}else p.parameters=i.buildParameters({signers:[w],validatorCaller:a},t).args.at(0)||r.zeroHash,p.instance=i.base;let _={instance:r.zeroAddress,isBase:!0,parameters:r.zeroHash};if(n.address){const u=n.address===n.base||n.isBase;_={isBase:u,instance:n.address,parameters:r.zeroHash}}else _.parameters=n.buildParameters(void 0,t).args.at(0)||r.zeroHash,_.instance=n.base;let I=l.map(()=>({instance:r.zeroAddress,isBase:!0,parameters:r.zeroHash}));for(let u=0;u<l.length;u++){const h=l.at(u);if(h.address){const q=h.address===h.base||h.isBase;if(!q)throw new y.IncentiveNotCloneableError(h);I[u]={isBase:q,instance:h.address,parameters:q&&h.buildParameters(void 0,t).args.at(0)||r.zeroHash}}else I[u].parameters=h.buildParameters(void 0,t).args.at(0)||r.zeroHash,I[u].instance=h.base}const U={budget:z,action:C,validator:p,allowList:_,incentives:I,protocolFee:m,referralFee:v,maxParticipants:E,owner:w},W=await R(t.config,{args:[D.prepareBoostPayload(U)],...this.optionallyAttachAccount(t.account)}),k=await L.waitForTransactionReceipt(t.config,{hash:W}),B=r.parseEventLogs({abi:o.c,eventName:"BoostCreated",logs:k.logs}).at(0);let F=0n;if(!B)throw new y.BoostCoreNoIdentifierEmitted;F=B==null?void 0:B.args.boostIndex;const g=await this.readBoost(F);return new D.Boost({id:F,budget:c.at(g.budget),action:d.at(g.action),validator:i.at(g.validator),allowList:n.at(g.allowList),incentives:l.map((u,h)=>u.at(g.incentives.at(h))),protocolFee:g.protocolFee,referralFee:g.referralFee,maxParticipants:g.maxParticipants,owner:g.owner})}async claimIncentive(e,f,a,s,t){return await this.awaitResult(this.claimIncentiveRaw(e,f,a,s,t))}async claimIncentiveRaw(e,f,a,s,t){const{request:c,result:d}=await o.Wl(this._config,{address:this.assertValidAddress(),args:[e,f,a,s],...this.optionallyAttachAccount(),...t});return{hash:await o.Hl(this._config,c),result:d}}async claimIncentiveFor(e,f,a,s,t,c){return await this.awaitResult(this.claimIncentiveForRaw(e,f,a,s,t,c))}async claimIncentiveForRaw(e,f,a,s,t,c){const{request:d,result:i}=await o.Ql(this._config,{address:this.assertValidAddress(),args:[e,f,a,s,t],...this.optionallyAttachAccount(),...c});return{hash:await o.Vl(this._config,d),result:i}}async readBoost(e,f){return await o.gl(this._config,{address:this.assertValidAddress(),args:[e],...this.optionallyAttachAccount(),...f})}async getBoost(e,f){let a;typeof e=="string"?a=BigInt(e):a=e;const{protocolFee:s,referralFee:t,maxParticipants:c,owner:d,...i}=await this.readBoost(a,f),n={config:this._config,account:this._account},[l,m,v,E,w]=await Promise.all([Q.actionFromAddress(n,i.action),ff.budgetFromAddress(n,i.budget),rf.validatorFromAddress(n,i.validator),K.allowListFromAddress(n,i.allowList),Promise.all(i.incentives.map(R=>O.incentiveFromAddress(n,R)))]);return new D.Boost({id:a,action:l,budget:m,validator:v,allowList:E,incentives:w,protocolFee:s,referralFee:t,maxParticipants:c,owner:d})}async getBoostCount(e){return await o.Ml(this._config,{address:this.assertValidAddress(),args:[],...this.optionallyAttachAccount(),...e})}async isAuthorized(e,f){const a=await this.createBoostAuth();return o.pv(this._config,{address:a,args:[e],...this.optionallyAttachAccount(),...f})}async createBoostAuth(e){return await o.hl(this._config,{address:this.assertValidAddress(),args:[],...this.optionallyAttachAccount(),...e})}async setCreateBoostAuth(e,f){return await this.awaitResult(this.setCreateBoostAuthRaw(e.assertValidAddress(),{...f}))}async setCreateBoostAuthRaw(e,f){const{request:a,result:s}=await o.ty(this._config,{address:this.assertValidAddress(),args:[e],...this.optionallyAttachAccount(),...f});return{hash:await o.Pl(this._config,a),result:s}}async protocolFee(e){return await o.El(this._config,{address:this.assertValidAddress(),args:[],...this.optionallyAttachAccount(),...e})}async protocolFeeReceiver(e){return await o.Rl(this._config,{address:this.assertValidAddress(),args:[],...this.optionallyAttachAccount(),...e})}async setProcolFeeReceiver(e,f){return await this.awaitResult(this.setProcolFeeReceiverRaw(e,{...f}))}async setProcolFeeReceiverRaw(e,f){const{request:a,result:s}=await o.ay(this._config,{address:this.assertValidAddress(),args:[e],...this.optionallyAttachAccount(),...f});return{hash:await o.Ul(this._config,a),result:s}}async claimFee(e){return await o.Nl(this._config,{address:this.assertValidAddress(),args:[],...this.optionallyAttachAccount(),...e})}async setClaimFee(e,f){return await this.awaitResult(this.setClaimFeeRaw(e,f))}async setClaimFeeRaw(e,f){const{request:a,result:s}=await o.ey(this._config,{address:this.assertValidAddress(),args:[e],...this.optionallyAttachAccount(),...f});return{hash:await o.Dl(this._config,a),result:s}}PassthroughAuth(e){return new Z.PassthroughAuth({config:this._config,account:this._account},e)}EventAction(e,f){return new J.EventAction({config:this._config,account:this._account},e,f)}SimpleAllowList(e,f){return new X.SimpleAllowList({config:this._config,account:this._account},e,f)}SimpleDenyList(e,f){return new Y.SimpleDenyList({config:this._config,account:this._account},e,f)}ManagedBudget(e){return new ef.ManagedBudget({config:this._config,account:this._account},e)}AllowListIncentive(e){return new bf.AllowListIncentive({config:this._config,account:this._account},e)}CGDAIncentive(e){return new tf.CGDAIncentive({config:this._config,account:this._account},e)}ERC20Incentive(e){return new sf.ERC20Incentive({config:this._config,account:this._account},e)}PointsIncentive(e){return new cf.PointsIncentive({config:this._config,account:this._account},e)}SignerValidator(e,f){return new nf.SignerValidator({config:this._config,account:this._account},e,f)}ERC20VariableIncentive(e,f){return new O.ERC20VariableIncentive({config:this._config,account:this._account},e,f)}buildParameters(e,f){const[a,s]=this.validateDeploymentConfig(e,f);return{abi:o.c,bytecode:df,args:a,...this.optionallyAttachAccount(s.account)}}}exports.boostCoreAbi=o.c;exports.BOOST_CORE_ADDRESS=G;exports.BOOST_CORE_CLAIM_FEE=vf;exports.BoostCore=pf;
|
|
3
|
+
//# sourceMappingURL=BoostCore.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoostCore.cjs","sources":["../../../node_modules/.pnpm/@wagmi+core@2.13.0_react@18.3.0_typescript@5.3.3_viem@2.9.27/node_modules/@wagmi/core/dist/esm/actions/getAccount.js","../../../node_modules/.pnpm/@wagmi+core@2.13.0_react@18.3.0_typescript@5.3.3_viem@2.9.27/node_modules/@wagmi/core/dist/esm/actions/getChainId.js","../../../node_modules/.pnpm/@wagmi+core@2.13.0_react@18.3.0_typescript@5.3.3_viem@2.9.27/node_modules/@wagmi/core/dist/esm/utils/getAction.js","../../../node_modules/.pnpm/@wagmi+core@2.13.0_react@18.3.0_typescript@5.3.3_viem@2.9.27/node_modules/@wagmi/core/dist/esm/version.js","../../../node_modules/.pnpm/@wagmi+core@2.13.0_react@18.3.0_typescript@5.3.3_viem@2.9.27/node_modules/@wagmi/core/dist/esm/utils/getVersion.js","../../../node_modules/.pnpm/@wagmi+core@2.13.0_react@18.3.0_typescript@5.3.3_viem@2.9.27/node_modules/@wagmi/core/dist/esm/errors/base.js","../../../node_modules/.pnpm/@wagmi+core@2.13.0_react@18.3.0_typescript@5.3.3_viem@2.9.27/node_modules/@wagmi/core/dist/esm/errors/config.js","../../../node_modules/.pnpm/@wagmi+core@2.13.0_react@18.3.0_typescript@5.3.3_viem@2.9.27/node_modules/@wagmi/core/dist/esm/actions/getConnectorClient.js","../../../node_modules/.pnpm/@wagmi+core@2.13.0_react@18.3.0_typescript@5.3.3_viem@2.9.27/node_modules/@wagmi/core/dist/esm/actions/simulateContract.js","../../../node_modules/.pnpm/@wagmi+core@2.13.0_react@18.3.0_typescript@5.3.3_viem@2.9.27/node_modules/@wagmi/core/dist/esm/actions/writeContract.js","../../../node_modules/.pnpm/@wagmi+core@2.13.0_react@18.3.0_typescript@5.3.3_viem@2.9.27/node_modules/@wagmi/core/dist/esm/actions/codegen/createWriteContract.js","../src/BoostCore.ts"],"sourcesContent":["/** https://wagmi.sh/core/api/actions/getAccount */\nexport function getAccount(config) {\n const uid = config.state.current;\n const connection = config.state.connections.get(uid);\n const addresses = connection?.accounts;\n const address = addresses?.[0];\n const chain = config.chains.find((chain) => chain.id === connection?.chainId);\n const status = config.state.status;\n switch (status) {\n case 'connected':\n return {\n address: address,\n addresses: addresses,\n chain,\n chainId: connection?.chainId,\n connector: connection?.connector,\n isConnected: true,\n isConnecting: false,\n isDisconnected: false,\n isReconnecting: false,\n status,\n };\n case 'reconnecting':\n return {\n address,\n addresses,\n chain,\n chainId: connection?.chainId,\n connector: connection?.connector,\n isConnected: !!address,\n isConnecting: false,\n isDisconnected: false,\n isReconnecting: true,\n status,\n };\n case 'connecting':\n return {\n address,\n addresses,\n chain,\n chainId: connection?.chainId,\n connector: connection?.connector,\n isConnected: false,\n isConnecting: true,\n isDisconnected: false,\n isReconnecting: false,\n status,\n };\n case 'disconnected':\n return {\n address: undefined,\n addresses: undefined,\n chain: undefined,\n chainId: undefined,\n connector: undefined,\n isConnected: false,\n isConnecting: false,\n isDisconnected: true,\n isReconnecting: false,\n status,\n };\n }\n}\n//# sourceMappingURL=getAccount.js.map","/** https://wagmi.sh/core/api/actions/getChainId */\nexport function getChainId(config) {\n return config.state.chainId;\n}\n//# sourceMappingURL=getChainId.js.map","/**\n * Retrieves and returns an action from the client (if exists), and falls\n * back to the tree-shakable action.\n *\n * Useful for extracting overridden actions from a client (ie. if a consumer\n * wants to override the `sendTransaction` implementation).\n */\nexport function getAction(client, actionFn, \n// Some minifiers drop `Function.prototype.name`, or replace it with short letters,\n// meaning that `actionFn.name` will not always work. For that case, the consumer\n// needs to pass the name explicitly.\nname) {\n const action_implicit = client[actionFn.name];\n if (typeof action_implicit === 'function')\n return action_implicit;\n const action_explicit = client[name];\n if (typeof action_explicit === 'function')\n return action_explicit;\n return (params) => actionFn(client, params);\n}\n//# sourceMappingURL=getAction.js.map","export const version = '2.13.0';\n//# sourceMappingURL=version.js.map","import { version } from '../version.js';\nexport const getVersion = () => `@wagmi/core@${version}`;\n//# sourceMappingURL=getVersion.js.map","var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _BaseError_instances, _BaseError_walk;\nimport { getVersion } from '../utils/getVersion.js';\nexport class BaseError extends Error {\n get docsBaseUrl() {\n return 'https://wagmi.sh/core';\n }\n get version() {\n return getVersion();\n }\n constructor(shortMessage, options = {}) {\n super();\n _BaseError_instances.add(this);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"metaMessages\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'WagmiCoreError'\n });\n const details = options.cause instanceof BaseError\n ? options.cause.details\n : options.cause?.message\n ? options.cause.message\n : options.details;\n const docsPath = options.cause instanceof BaseError\n ? options.cause.docsPath || options.docsPath\n : options.docsPath;\n this.message = [\n shortMessage || 'An error occurred.',\n '',\n ...(options.metaMessages ? [...options.metaMessages, ''] : []),\n ...(docsPath\n ? [\n `Docs: ${this.docsBaseUrl}${docsPath}.html${options.docsSlug ? `#${options.docsSlug}` : ''}`,\n ]\n : []),\n ...(details ? [`Details: ${details}`] : []),\n `Version: ${this.version}`,\n ].join('\\n');\n if (options.cause)\n this.cause = options.cause;\n this.details = details;\n this.docsPath = docsPath;\n this.metaMessages = options.metaMessages;\n this.shortMessage = shortMessage;\n }\n walk(fn) {\n return __classPrivateFieldGet(this, _BaseError_instances, \"m\", _BaseError_walk).call(this, this, fn);\n }\n}\n_BaseError_instances = new WeakSet(), _BaseError_walk = function _BaseError_walk(err, fn) {\n if (fn?.(err))\n return err;\n if (err.cause)\n return __classPrivateFieldGet(this, _BaseError_instances, \"m\", _BaseError_walk).call(this, err.cause, fn);\n return err;\n};\n//# sourceMappingURL=base.js.map","import { BaseError } from './base.js';\nexport class ChainNotConfiguredError extends BaseError {\n constructor() {\n super('Chain not configured.');\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ChainNotConfiguredError'\n });\n }\n}\nexport class ConnectorAlreadyConnectedError extends BaseError {\n constructor() {\n super('Connector already connected.');\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ConnectorAlreadyConnectedError'\n });\n }\n}\nexport class ConnectorNotConnectedError extends BaseError {\n constructor() {\n super('Connector not connected.');\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ConnectorNotConnectedError'\n });\n }\n}\nexport class ConnectorNotFoundError extends BaseError {\n constructor() {\n super('Connector not found.');\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ConnectorNotFoundError'\n });\n }\n}\nexport class ConnectorAccountNotFoundError extends BaseError {\n constructor({ address, connector, }) {\n super(`Account \"${address}\" not found for connector \"${connector.name}\".`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ConnectorAccountNotFoundError'\n });\n }\n}\nexport class ConnectorChainMismatchError extends BaseError {\n constructor({ connectionChainId, connectorChainId, }) {\n super(`The current chain of the connector (id: ${connectorChainId}) does not match the connection's chain (id: ${connectionChainId}).`, {\n metaMessages: [\n `Current Chain ID: ${connectorChainId}`,\n `Expected Chain ID: ${connectionChainId}`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ConnectorChainMismatchError'\n });\n }\n}\n//# sourceMappingURL=config.js.map","import { createClient, custom, } from 'viem';\nimport { getAddress, parseAccount } from 'viem/utils';\nimport { ConnectorAccountNotFoundError, ConnectorChainMismatchError, ConnectorNotConnectedError, } from '../errors/config.js';\n/** https://wagmi.sh/core/api/actions/getConnectorClient */\nexport async function getConnectorClient(config, parameters = {}) {\n // Get connection\n let connection;\n if (parameters.connector) {\n const { connector } = parameters;\n const [accounts, chainId] = await Promise.all([\n connector.getAccounts(),\n connector.getChainId(),\n ]);\n connection = {\n accounts: accounts,\n chainId,\n connector,\n };\n }\n else\n connection = config.state.connections.get(config.state.current);\n if (!connection)\n throw new ConnectorNotConnectedError();\n const chainId = parameters.chainId ?? connection.chainId;\n // Check connector using same chainId as connection\n const connectorChainId = await connection.connector.getChainId();\n if (connectorChainId !== connection.chainId)\n throw new ConnectorChainMismatchError({\n connectionChainId: connection.chainId,\n connectorChainId,\n });\n const connector = connection.connector;\n if (connector.getClient)\n return connector.getClient({ chainId });\n // Default using `custom` transport\n const account = parseAccount(parameters.account ?? connection.accounts[0]);\n account.address = getAddress(account.address); // TODO: Checksum address as part of `parseAccount`?\n const chain = config.chains.find((chain) => chain.id === chainId);\n const provider = (await connection.connector.getProvider({ chainId }));\n // If account was provided, check that it exists on the connector\n if (parameters.account &&\n !connection.accounts.some((x) => x.toLowerCase() === account.address.toLowerCase()))\n throw new ConnectorAccountNotFoundError({\n address: account.address,\n connector,\n });\n return createClient({\n account,\n chain,\n name: 'Connector Client',\n transport: (opts) => custom(provider)({ ...opts, retryCount: 0 }),\n });\n}\n//# sourceMappingURL=getConnectorClient.js.map","import { simulateContract as viem_simulateContract, } from 'viem/actions';\nimport { getAction } from '../utils/getAction.js';\nimport { getConnectorClient, } from './getConnectorClient.js';\n/** https://wagmi.sh/core/api/actions/simulateContract */\nexport async function simulateContract(config, parameters) {\n const { abi, chainId, connector, ...rest } = parameters;\n let account;\n if (parameters.account)\n account = parameters.account;\n else {\n const connectorClient = await getConnectorClient(config, {\n chainId,\n connector,\n });\n account = connectorClient.account;\n }\n const client = config.getClient({ chainId });\n const action = getAction(client, viem_simulateContract, 'simulateContract');\n const { result, request } = await action({ ...rest, abi, account });\n return {\n chainId: client.chain.id,\n result,\n request: { __mode: 'prepared', ...request, chainId },\n };\n}\n//# sourceMappingURL=simulateContract.js.map","import { writeContract as viem_writeContract, } from 'viem/actions';\nimport { getAction } from '../utils/getAction.js';\nimport { getAccount } from './getAccount.js';\nimport { getConnectorClient, } from './getConnectorClient.js';\nimport { simulateContract, } from './simulateContract.js';\n/** https://wagmi.sh/core/api/actions/writeContract */\nexport async function writeContract(config, parameters) {\n const { account, chainId, connector, __mode, ...rest } = parameters;\n let client;\n if (typeof account === 'object' && account.type === 'local')\n client = config.getClient({ chainId });\n else\n client = await getConnectorClient(config, { account, chainId, connector });\n const { connector: activeConnector } = getAccount(config);\n let request;\n if (__mode === 'prepared' || activeConnector?.supportsSimulation)\n request = rest;\n else {\n const { request: simulateRequest } = await simulateContract(config, {\n ...rest,\n account,\n chainId,\n });\n request = simulateRequest;\n }\n const action = getAction(client, viem_writeContract, 'writeContract');\n const hash = await action({\n ...request,\n ...(account ? { account } : {}),\n chain: chainId ? { id: chainId } : null,\n });\n return hash;\n}\n//# sourceMappingURL=writeContract.js.map","import { getAccount } from '../getAccount.js';\nimport { getChainId } from '../getChainId.js';\nimport { writeContract, } from '../writeContract.js';\nexport function createWriteContract(c) {\n if (c.address !== undefined && typeof c.address === 'object')\n return (config, parameters) => {\n const configChainId = getChainId(config);\n const account = getAccount(config);\n let chainId;\n if (parameters.chainId)\n chainId = parameters.chainId;\n else if (parameters\n .account &&\n parameters\n .account === account.address)\n chainId = account.chainId;\n else if (parameters\n .account === undefined)\n chainId = account.chainId;\n else\n chainId = configChainId;\n return writeContract(config, {\n ...parameters,\n ...(c.functionName ? { functionName: c.functionName } : {}),\n address: chainId ? c.address?.[chainId] : undefined,\n abi: c.abi,\n });\n };\n return (config, parameters) => {\n return writeContract(config, {\n ...parameters,\n ...(c.address ? { address: c.address } : {}),\n ...(c.functionName ? { functionName: c.functionName } : {}),\n abi: c.abi,\n });\n };\n}\n//# sourceMappingURL=createWriteContract.js.map","import {\n boostCoreAbi,\n type iAuthAbi,\n readBoostCoreClaimFee,\n readBoostCoreCreateBoostAuth,\n readBoostCoreGetBoost,\n readBoostCoreGetBoostCount,\n readBoostCoreProtocolFee,\n readBoostCoreProtocolFeeReceiver,\n readIAuthIsAuthorized,\n simulateBoostCoreClaimIncentive,\n simulateBoostCoreClaimIncentiveFor,\n simulateBoostCoreSetClaimFee,\n simulateBoostCoreSetCreateBoostAuth,\n simulateBoostCoreSetProtocolFeeReceiver,\n writeBoostCoreClaimIncentive,\n writeBoostCoreClaimIncentiveFor,\n writeBoostCoreSetClaimFee,\n writeBoostCoreSetCreateBoostAuth,\n writeBoostCoreSetProtocolFeeReceiver,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/BoostCore.sol/BoostCore.json';\nimport { getAccount, waitForTransactionReceipt } from '@wagmi/core';\nimport { createWriteContract } from '@wagmi/core/codegen';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n parseEther,\n parseEventLogs,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport { type Action, actionFromAddress } from './Actions/Action';\nimport { EventAction, type EventActionPayload } from './Actions/EventAction';\nimport { type AllowList, allowListFromAddress } from './AllowLists/AllowList';\nimport {\n SimpleAllowList,\n type SimpleAllowListPayload,\n} from './AllowLists/SimpleAllowList';\nimport {\n SimpleDenyList,\n type SimpleDenyListPayload,\n} from './AllowLists/SimpleDenyList';\nimport { type Auth, PassthroughAuth } from './Auth/Auth';\nimport {\n Boost,\n type BoostPayload,\n type Target,\n prepareBoostPayload,\n} from './Boost';\nimport { type Budget, budgetFromAddress } from './Budgets/Budget';\nimport {\n ManagedBudget,\n type ManagedBudgetPayload,\n} from './Budgets/ManagedBudget';\nimport {\n Deployable,\n type DeployableOptions,\n type DeployablePayloadOrAddress,\n type GenericDeployableParams,\n} from './Deployable/Deployable';\nimport {\n AllowListIncentive,\n type AllowListIncentivePayload,\n} from './Incentives/AllowListIncentive';\nimport {\n CGDAIncentive,\n type CGDAIncentivePayload,\n} from './Incentives/CGDAIncentive';\nimport {\n ERC20Incentive,\n type ERC20IncentivePayload,\n} from './Incentives/ERC20Incentive';\nimport type { ERC20VariableIncentivePayload } from './Incentives/ERC20VariableIncentive';\nimport {\n ERC20VariableIncentive,\n type Incentive,\n incentiveFromAddress,\n} from './Incentives/Incentive';\nimport {\n PointsIncentive,\n type PointsIncentivePayload,\n} from './Incentives/PointsIncentive';\nimport {\n SignerValidator,\n type SignerValidatorPayload,\n} from './Validators/SignerValidator';\nimport { type Validator, validatorFromAddress } from './Validators/Validator';\nimport {\n BoostCoreNoIdentifierEmitted,\n BudgetMustAuthorizeBoostCore,\n DeployableUnknownOwnerProvidedError,\n IncentiveNotCloneableError,\n MustInitializeBudgetError,\n} from './errors';\nimport type { GenericLog, ReadParams, WriteParams } from './utils';\n\nexport { boostCoreAbi };\n\n/**\n * The fee (in wei) required to claim each incentive, must be provided for the `claimIncentive` transaction\n *\n * @type {bigint}\n */\nexport const BOOST_CORE_CLAIM_FEE = parseEther('0.000075');\n\n/**\n * The fixed address for the deployed Boost Core.\n * By default, `new BoostCore` will use this address if not otherwise provided.\n *\n * @type {Address}\n */\nexport const BOOST_CORE_ADDRESS: Address = import.meta.env\n .VITE_BOOST_CORE_ADDRESS;\n\n/**\n * A generic `viem.Log` event with support for `BoostCore` event types.\n *\n * @export\n * @typedef {BoostCoreLog}\n * @template {ContractEventName<typeof boostCoreAbi>} [event=ContractEventName<\n * typeof boostCoreAbi\n * >]\n */\nexport type BoostCoreLog<\n event extends ContractEventName<typeof boostCoreAbi> = ContractEventName<\n typeof boostCoreAbi\n >,\n> = GenericLog<typeof boostCoreAbi, event>;\n\n/**\n * Boost Core instantiation options for a custom deployed instance.\n *\n * @export\n * @interface BoostCoreDeployedOptions\n * @typedef {BoostCoreDeployedOptions}\n * @extends {DeployableOptions}\n */\nexport interface BoostCoreDeployedOptions extends DeployableOptions {\n /**\n * The address of a deployed, custom Boost Core contract.\n *\n * @type {?Address}\n */\n address?: Address;\n}\n\n/**\n * Typeguard to determine if a user is supplying a custom address for a Boost Core contract.\n *\n * @param {*} opts\n * @returns {opts is BoostCoreDeployedOptions}\n */\n// biome-ignore lint/suspicious/noExplicitAny: type guard\nfunction isBoostCoreDeployed(opts: any): opts is BoostCoreDeployedOptions {\n return opts.address;\n}\n\n/**\n * Boost Core instantiation options when a user intends to deploy a new instance of Boost Core, setting their own registry address and protocol fee receiver.\n *\n * @export\n * @interface BoostCoreOptionsWithPayload\n * @typedef {BoostCoreOptionsWithPayload}\n * @extends {DeployableOptions}\n */\nexport interface BoostCoreOptionsWithPayload extends DeployableOptions {\n /**\n * The address of a deployed Boost Registry contract.\n *\n * @type {Address}\n */\n registryAddress: Address;\n /**\n * The address to send fees.\n *\n * @type {Address}\n */\n protocolFeeReceiver: Address;\n}\n\n/**\n * Typeguard to determine if a user is intending to deploy a new instance of the Boost Core contracts with {@link BoostCoreOptionsWithPayload}.\n *\n * @param {*} opts\n * @returns {opts is BoostCoreOptionsWithPayload}\n */\n// biome-ignore lint/suspicious/noExplicitAny: type guard\nfunction isBoostCoreDeployable(opts: any): opts is BoostCoreOptionsWithPayload {\n return opts.registryAddress && opts.protocolFeeReceiver;\n}\n\n/**\n * A union representing both of the valid Boost Core instantiation parameters.\n *\n * @export\n * @typedef {BoostCoreConfig}\n */\nexport type BoostCoreConfig =\n | BoostCoreDeployedOptions\n | BoostCoreOptionsWithPayload;\n\n/**\n * The interface required to create a new Boost.\n *\n * @export\n * @typedef {CreateBoostPayload}\n */\nexport type CreateBoostPayload = {\n budget: Budget;\n action: Action;\n validator: Validator;\n allowList: AllowList;\n incentives: Array<Incentive>;\n protocolFee?: bigint;\n referralFee?: bigint;\n maxParticipants?: bigint;\n owner?: Address;\n};\n\n/**\n * The core contract for the Boost protocol. Used to create and retrieve deployed Boosts.\n *\n * @export\n * @class BoostCore\n * @typedef {BoostCore}\n * @extends {Deployable<[Address, Address]>}\n */\nexport class BoostCore extends Deployable<\n [Address, Address],\n typeof boostCoreAbi\n> {\n /**\n * Creates an instance of BoostCore.\n *\n * @constructor\n * @param {BoostCoreConfig} param0\n * @param {Config} param0.config\n * @param {?Account} [param0.account]\n * @param {({ address?: Address; } | { registryAddress: Address; protocolFeeReceiver: Address; })} param0....options\n */\n constructor({ config, account, ...options }: BoostCoreConfig) {\n if (isBoostCoreDeployed(options) && options.address) {\n super({ account, config }, options.address);\n } else if (isBoostCoreDeployable(options)) {\n super({ account, config }, [\n options.registryAddress,\n options.protocolFeeReceiver,\n ]);\n } else {\n super({ account, config }, BOOST_CORE_ADDRESS);\n }\n //@ts-expect-error I can't set this property on the class because for some reason it takes super out of constructor scope?\n this.abi = boostCoreAbi;\n }\n /**\n * Create a new Boost.\n *\n * @public\n * @async\n * @param {CreateBoostPayload} _boostPayload\n * @param {?DeployableOptions} [_options]\n * @returns {Boost}\n */\n public async createBoost(\n _boostPayload: CreateBoostPayload,\n _options?: DeployableOptions,\n ) {\n const coreAddress = this.assertValidAddress();\n const [payload, options] =\n this.validateDeploymentConfig<CreateBoostPayload>(\n _boostPayload,\n _options,\n );\n\n let {\n budget,\n action,\n validator,\n allowList,\n incentives,\n protocolFee = 0n,\n referralFee = 0n,\n maxParticipants = 0n,\n owner,\n } = payload;\n\n const boostFactory = createWriteContract({\n abi: boostCoreAbi,\n functionName: 'createBoost',\n address: this.address,\n });\n\n if (!owner) {\n owner =\n this._account?.address ||\n getAccount(options.config).address ||\n zeroAddress;\n if (owner === zeroAddress) {\n throw new DeployableUnknownOwnerProvidedError();\n }\n }\n\n let budgetPayload: BoostPayload['budget'] = zeroAddress;\n if (budget.address) {\n budgetPayload = budget.address;\n if (!(await budget.isAuthorized(coreAddress))) {\n throw new BudgetMustAuthorizeBoostCore(coreAddress);\n }\n } else {\n throw new MustInitializeBudgetError();\n }\n\n // if we're supplying an address, it could be a pre-initialized target\n // if base is explicitly set to false, then it will not be initialized, and it will be referenced as is if it implements interface correctly\n let actionPayload: BoostPayload['action'] = {\n instance: zeroAddress,\n isBase: true,\n parameters: zeroHash,\n };\n if (action.address) {\n const isBase = action.address === action.base || action.isBase;\n actionPayload = {\n isBase: isBase,\n instance: action.address,\n parameters: isBase\n ? action.buildParameters(undefined, options).args.at(0) || zeroHash\n : zeroHash,\n };\n } else {\n actionPayload.parameters =\n action.buildParameters(undefined, options).args.at(0) || zeroHash;\n actionPayload.instance = action.base;\n }\n\n let validatorPayload: BoostPayload['validator'] = {\n instance: zeroAddress,\n isBase: true,\n parameters: zeroHash,\n };\n if (validator.address) {\n const isBase = validator.address === validator.base || validator.isBase;\n validatorPayload = {\n isBase: isBase,\n instance: validator.address,\n parameters: isBase\n ? validator\n .buildParameters(\n {\n signers: [owner],\n validatorCaller: coreAddress,\n },\n options,\n )\n .args.at(0) || zeroHash\n : zeroHash,\n };\n } else {\n validatorPayload.parameters =\n validator\n .buildParameters(\n {\n signers: [owner],\n validatorCaller: coreAddress,\n },\n options,\n )\n .args.at(0) || zeroHash;\n validatorPayload.instance = validator.base;\n }\n\n let allowListPayload: BoostPayload['allowList'] = {\n instance: zeroAddress,\n isBase: true,\n parameters: zeroHash,\n };\n if (allowList.address) {\n const isBase = allowList.address === allowList.base || allowList.isBase;\n allowListPayload = {\n isBase: isBase,\n instance: allowList.address,\n parameters: isBase\n ? zeroHash // allowList.buildParameters(undefined, options).args.at(0) || zeroHash\n : zeroHash,\n };\n } else {\n allowListPayload.parameters =\n allowList.buildParameters(undefined, options).args.at(0) || zeroHash;\n allowListPayload.instance = allowList.base;\n }\n\n let incentivesPayloads: Array<Target> = incentives.map(() => ({\n instance: zeroAddress,\n isBase: true,\n parameters: zeroHash,\n }));\n for (let i = 0; i < incentives.length; i++) {\n // biome-ignore lint/style/noNonNullAssertion: this will never be undefined\n const incentive = incentives.at(i)!;\n if (incentive.address) {\n const isBase = incentive.address === incentive.base || incentive.isBase;\n if (!isBase) throw new IncentiveNotCloneableError(incentive);\n incentivesPayloads[i] = {\n isBase: isBase,\n instance: incentive.address,\n parameters: isBase\n ? incentive.buildParameters(undefined, options).args.at(0) ||\n zeroHash\n : zeroHash,\n };\n } else {\n // biome-ignore lint/style/noNonNullAssertion: this will never be undefined\n incentivesPayloads[i]!.parameters =\n incentive.buildParameters(undefined, options).args.at(0) || zeroHash;\n // biome-ignore lint/style/noNonNullAssertion: this will never be undefined\n incentivesPayloads[i]!.instance = incentive.base;\n }\n }\n\n const onChainPayload = {\n budget: budgetPayload,\n action: actionPayload,\n validator: validatorPayload,\n allowList: allowListPayload,\n incentives: incentivesPayloads,\n protocolFee,\n referralFee,\n maxParticipants,\n owner,\n };\n\n const boostHash = await boostFactory(options.config, {\n args: [prepareBoostPayload(onChainPayload)],\n ...this.optionallyAttachAccount(options.account),\n });\n const receipt = await waitForTransactionReceipt(options.config, {\n hash: boostHash,\n });\n const boostCreatedLog = parseEventLogs({\n abi: boostCoreAbi,\n eventName: 'BoostCreated',\n logs: receipt.logs,\n }).at(0);\n let boostId = 0n;\n if (!boostCreatedLog) throw new BoostCoreNoIdentifierEmitted();\n boostId = boostCreatedLog?.args.boostIndex;\n const boost = await this.readBoost(boostId);\n return new Boost({\n id: boostId,\n budget: budget.at(boost.budget),\n action: action.at(boost.action),\n validator: validator.at(boost.validator),\n allowList: allowList.at(boost.allowList),\n incentives: incentives.map((incentive, i) =>\n // biome-ignore lint/style/noNonNullAssertion: this will never be undefined\n incentive.at(boost.incentives.at(i)!),\n ),\n protocolFee: boost.protocolFee,\n referralFee: boost.referralFee,\n maxParticipants: boost.maxParticipants,\n owner: boost.owner,\n });\n }\n\n /**\n * Claims one incentive from a given `Boost` by `boostId` and `incentiveId`\n *\n * @public\n * @async\n * @param {bigint} boostId\n * @param {bigint} incentiveId\n * @param {Address} address\n * @param {Hex} data\n * @param {?WriteParams<typeof boostCoreAbi, 'claimIncentive'>} [params]\n * @returns {unknown}\n */\n public async claimIncentive(\n boostId: bigint,\n incentiveId: bigint,\n address: Address,\n data: Hex,\n params?: WriteParams<typeof boostCoreAbi, 'claimIncentive'>,\n ) {\n return await this.awaitResult(\n this.claimIncentiveRaw(boostId, incentiveId, address, data, params),\n );\n }\n\n /**\n * Claim an incentive for a Boost\n *\n * @public\n * @async\n * @param {bigint} boostId - The ID of the Boost\n * @param {bigint} incentiveId - The ID of the Incentive\n * @param {Address} referrer - The address of the referrer (if any)\n * @param {Hex} data- The data for the claim\n * @param {?WriteParams<typeof boostCoreAbi, 'claimIncentive'>} [params]\n * @returns {unknown}\n */\n public async claimIncentiveRaw(\n boostId: bigint,\n incentiveId: bigint,\n referrer: Address,\n data: Hex,\n params?: WriteParams<typeof boostCoreAbi, 'claimIncentive'>,\n ) {\n const { request, result } = await simulateBoostCoreClaimIncentive(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [boostId, incentiveId, referrer, data],\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 writeBoostCoreClaimIncentive(this._config, request);\n return { hash, result };\n }\n\n /**\n * Claims one incentive for a given `Boost` on behalf of another user by `boostId` and `incentiveId`\n *\n * @public\n * @async\n * @param {bigint} boostId\n * @param {bigint} incentiveId\n * @param {Address} referrer\n * @param {Hex} data\n * @param {Address} claimant\n * @param {?WriteParams<typeof boostCoreAbi, 'claimIncentiveFor'>} [params]\n * @returns {unknown}\n */\n public async claimIncentiveFor(\n boostId: bigint,\n incentiveId: bigint,\n referrer: Address,\n data: Hex,\n claimant: Address,\n params?: WriteParams<typeof boostCoreAbi, 'claimIncentiveFor'>,\n ) {\n return await this.awaitResult(\n this.claimIncentiveForRaw(\n boostId,\n incentiveId,\n referrer,\n data,\n claimant,\n params,\n ),\n );\n }\n\n /**\n * Claim an incentive for a Boost on behalf of another user\n *\n * @public\n * @async\n * @param {bigint} boostId - The ID of the Boost\n * @param {bigint} incentiveId - The ID of the Incentive\n * @param {Address} referrer - The address of the referrer (if any)\n * @param {Hex} data - The data for the claim\n * @param {Address} claimant - The address of the user eligible for the incentive payout\n * @param {?WriteParams<typeof boostCoreAbi, 'claimIncentiveFor'>} [params]\n * @returns {unknown}\n */\n public async claimIncentiveForRaw(\n boostId: bigint,\n incentiveId: bigint,\n referrer: Address,\n data: Hex,\n claimant: Address,\n params?: WriteParams<typeof boostCoreAbi, 'claimIncentiveFor'>,\n ) {\n const { request, result } = await simulateBoostCoreClaimIncentiveFor(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [boostId, incentiveId, referrer, data, claimant],\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 writeBoostCoreClaimIncentiveFor(this._config, request);\n return { hash, result };\n }\n\n /**\n * Get a Boost by index, will return the raw on chain representation of a Boost.\n *\n * @public\n * @async\n * @param {bigint} id\n * @param {?ReadParams<typeof boostCoreAbi, 'getBoost'>} [params]\n * @returns {unknown}\n */\n public async readBoost(\n id: bigint,\n params?: ReadParams<typeof boostCoreAbi, 'getBoost'>,\n ) {\n return await readBoostCoreGetBoost(this._config, {\n address: this.assertValidAddress(),\n args: [id],\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\n /**\n * Get a Boost by index, will return a new {@link Boost} with correct target implementations instantiated, ie `(await core.getBoost(0n)).allowList instanceof SimpleAllowList` vs `SimpleDenyList`\n *\n * @public\n * @async\n * @param {(string | bigint)} _id\n * @param {?ReadParams<typeof boostCoreAbi, 'getBoost'>} [params]\n * @returns {unknown}\n */\n public async getBoost(\n _id: string | bigint,\n params?: ReadParams<typeof boostCoreAbi, 'getBoost'>,\n ) {\n let id: bigint;\n if (typeof _id === 'string') {\n id = BigInt(_id);\n } else id = _id;\n const {\n protocolFee,\n referralFee,\n maxParticipants,\n owner,\n ...boostPayload\n } = await this.readBoost(id, params);\n const options: DeployableOptions = {\n config: this._config,\n account: this._account,\n };\n const [action, budget, validator, allowList, incentives] =\n await Promise.all([\n actionFromAddress(options, boostPayload.action),\n budgetFromAddress(options, boostPayload.budget),\n validatorFromAddress(options, boostPayload.validator),\n allowListFromAddress(options, boostPayload.allowList),\n Promise.all(\n boostPayload.incentives.map((incentiveAddress) =>\n incentiveFromAddress(options, incentiveAddress),\n ),\n ),\n ]);\n return new Boost({\n id,\n action,\n budget,\n validator,\n allowList,\n incentives,\n protocolFee,\n referralFee,\n maxParticipants,\n owner,\n });\n }\n\n /**\n * Retrieve the total number of deployed Boosts\n *\n * @public\n * @async\n * @param {?ReadParams<typeof boostCoreAbi, 'getBoostCount'>} [params]\n * @returns {Promise<bigint>}\n */\n public async getBoostCount(\n params?: ReadParams<typeof boostCoreAbi, 'getBoostCount'>,\n ) {\n return await readBoostCoreGetBoostCount(this._config, {\n address: this.assertValidAddress(),\n args: [],\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\n /**\n * Checks if an address is authorized\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams<typeof boostCoreAbi, 'createBoostAuth'> &\n * ReadParams<typeof iAuthAbi, 'isAuthorized'>} [params]\n * @returns {Promise<boolean>}\n */\n public async isAuthorized(\n address: Address,\n params?: ReadParams<typeof boostCoreAbi, 'createBoostAuth'> &\n ReadParams<typeof iAuthAbi, 'isAuthorized'>,\n ) {\n const auth = await this.createBoostAuth();\n return readIAuthIsAuthorized(this._config, {\n address: auth,\n args: [address],\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\n /**\n * Retrieve the address of the current creation auth provider.\n *\n * @public\n * @async\n * @param {?ReadParams<typeof boostCoreAbi, 'createBoostAuth'>} [params]\n * @returns {unknown}\n */\n public async createBoostAuth(\n params?: ReadParams<typeof boostCoreAbi, 'createBoostAuth'>,\n ) {\n return await readBoostCoreCreateBoostAuth(this._config, {\n address: this.assertValidAddress(),\n args: [],\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\n /**\n * Replace the current auth scheme.\n *\n * @public\n * @async\n * @param {Auth} auth\n * @param {?WriteParams<typeof boostCoreAbi, 'setCreateBoostAuth'>} [params]\n * @returns {unknown}\n */\n public async setCreateBoostAuth(\n auth: Auth,\n params?: WriteParams<typeof boostCoreAbi, 'setCreateBoostAuth'>,\n ) {\n return await this.awaitResult(\n this.setCreateBoostAuthRaw(auth.assertValidAddress(), {\n ...params,\n }),\n );\n }\n\n /**\n * Set the createBoostAuth address\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?WriteParams<typeof boostCoreAbi, 'setCreateBoostAuth'>} [params]\n * @returns {unknown}\n */\n public async setCreateBoostAuthRaw(\n address: Address,\n params?: WriteParams<typeof boostCoreAbi, 'setCreateBoostAuth'>,\n ) {\n const { request, result } = await simulateBoostCoreSetCreateBoostAuth(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [address],\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 writeBoostCoreSetCreateBoostAuth(this._config, request);\n return { hash, result };\n }\n\n /**\n * Get the protocol fee.\n *\n * @public\n * @async\n * @param {?ReadParams<typeof boostCoreAbi, 'protocolFee'>} [params]\n * @returns {unknown}\n */\n public async protocolFee(\n params?: ReadParams<typeof boostCoreAbi, 'protocolFee'>,\n ) {\n return await readBoostCoreProtocolFee(this._config, {\n address: this.assertValidAddress(),\n args: [],\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\n /**\n * Get the protocol fee receiver.\n *\n * @public\n * @async\n * @param {?ReadParams<typeof boostCoreAbi, 'protocolFeeReceiver'>} [params]\n * @returns {unknown}\n */\n public async protocolFeeReceiver(\n params?: ReadParams<typeof boostCoreAbi, 'protocolFeeReceiver'>,\n ) {\n return await readBoostCoreProtocolFeeReceiver(this._config, {\n address: this.assertValidAddress(),\n args: [],\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\n /**\n * Set the protocol fee receiver address. This function is only callable by the owner.\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?WriteParams<typeof boostCoreAbi, 'setProtocolFeeReceiver'>} [params]\n * @returns {unknown}\n */\n public async setProcolFeeReceiver(\n address: Address,\n params?: WriteParams<typeof boostCoreAbi, 'setProtocolFeeReceiver'>,\n ) {\n return await this.awaitResult(\n this.setProcolFeeReceiverRaw(address, {\n ...params,\n }),\n );\n }\n\n /**\n * Set the protocol fee receiver address. This function is only callable by the owner.\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?WriteParams<typeof boostCoreAbi, 'setProtocolFeeReceiver'>} [params]\n * @returns {unknown}\n */\n public async setProcolFeeReceiverRaw(\n address: Address,\n params?: WriteParams<typeof boostCoreAbi, 'setProtocolFeeReceiver'>,\n ) {\n const { request, result } = await simulateBoostCoreSetProtocolFeeReceiver(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [address],\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 writeBoostCoreSetProtocolFeeReceiver(\n this._config,\n request,\n );\n return { hash, result };\n }\n\n /**\n * Get the claim fee.\n *\n * @public\n * @async\n * @param {?ReadParams<typeof boostCoreAbi, 'claimFee'>} [params]\n * @returns {unknown}\n */\n public async claimFee(params?: ReadParams<typeof boostCoreAbi, 'claimFee'>) {\n return await readBoostCoreClaimFee(this._config, {\n address: this.assertValidAddress(),\n args: [],\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\n /**\n * Sets the claim fee.\n *\n * @public\n * @async\n * @param {bigint} claimFee\n * @param {?WriteParams<typeof boostCoreAbi, 'setClaimFee'>} [params]\n * @returns {unknown}\n */\n public async setClaimFee(\n claimFee: bigint,\n params?: WriteParams<typeof boostCoreAbi, 'setClaimFee'>,\n ) {\n return await this.awaitResult(this.setClaimFeeRaw(claimFee, params));\n }\n\n /**\n * Sets the claim fee.\n *\n * @public\n * @async\n * @param {bigint} claimFee\n * @param {?WriteParams<typeof boostCoreAbi, 'setClaimFee'>} [params]\n * @returns {unknown}\n */\n public async setClaimFeeRaw(\n claimFee: bigint,\n params?: WriteParams<typeof boostCoreAbi, 'setClaimFee'>,\n ) {\n const { request, result } = await simulateBoostCoreSetClaimFee(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [claimFee],\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 writeBoostCoreSetClaimFee(this._config, request);\n return { hash, result };\n }\n\n /**\n * Bound {@link PassthroughAuth} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const auth = core.PassthroughAuth('0x') // is roughly equivalent to\n * const auth = new PassthroughAuth({ config: core._config, account: core._account }, '0x')\n * ```\n * @param {Address} address\n * @returns {PassthroughAuth}\n */\n PassthroughAuth(address?: Address) {\n return new PassthroughAuth(\n { config: this._config, account: this._account },\n address,\n );\n }\n\n // /**\n // * Bound {@link ContractAction} constructor that reuses the same configuration as the Boost Core instance.\n // *\n // * @example\n // * ```ts\n // * const action = core.ContractAction('0x') // is roughly equivalent to\n // * const action = new ContractAction({ config: core._config, account: core._account }, '0x')\n // * ```\n // * @param {DeployablePayloadOrAddress<ContractActionPayload>} options\n // * @param {?boolean} [isBase]\n // * @returns {ContractAction}\n // */\n // ContractAction(\n // options: DeployablePayloadOrAddress<ContractActionPayload>,\n // isBase?: boolean,\n // ) {\n // return new ContractAction(\n // { config: this._config, account: this._account },\n // options,\n // isBase,\n // );\n // }\n\n /**\n * Bound {@link EventAction} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const action = core.EventAction('0x') // is roughly equivalent to\n * const action = new EventAction({ config: core._config, account: core._account }, '0x')\n */\n EventAction(\n options: DeployablePayloadOrAddress<EventActionPayload>,\n isBase?: boolean,\n ) {\n return new EventAction(\n { config: this._config, account: this._account },\n options,\n isBase,\n );\n }\n // /**\n // * Bound {@link ERC721MintAction} constructor that reuses the same configuration as the Boost Core instance.\n // *\n // * @example\n // * ```ts\n // * const action = core.ERC721MintAction('0x') // is roughly equivalent to\n // * const action = new ERC721MintAction({ config: core._config, account: core._account }, '0x')\n // * ```\n // * @param {DeployablePayloadOrAddress<ERC721MintActionPayload>} options\n // * @param {?boolean} [isBase]\n // * @returns {ERC721MintAction}\n // */\n // ERC721MintAction(\n // options: DeployablePayloadOrAddress<ERC721MintActionPayload>,\n // isBase?: boolean,\n // ) {\n // return new ERC721MintAction(\n // { config: this._config, account: this._account },\n // options,\n // isBase,\n // );\n // }\n /**\n * Bound {@link SimpleAllowList} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const list = core.SimpleAllowList('0x') // is roughly equivalent to\n * const list = new SimpleAllowList({ config: core._config, account: core._account }, '0x')\n * ```\n * @param {DeployablePayloadOrAddress<SimpleAllowListPayload>} options\n * @param {?boolean} [isBase]\n * @returns {SimpleAllowList}\n */\n SimpleAllowList(\n options: DeployablePayloadOrAddress<SimpleAllowListPayload>,\n isBase?: boolean,\n ) {\n return new SimpleAllowList(\n { config: this._config, account: this._account },\n options,\n isBase,\n );\n }\n /**\n * Bound {@link SimpleDenyList} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const list = core.SimpleDenyList('0x') // is roughly equivalent to\n * const list = new SimpleDenyList({ config: core._config, account: core._account }, '0x')\n * ```\n * @param {DeployablePayloadOrAddress<SimpleDenyListPayload>} options\n * @param {?boolean} [isBase]\n * @returns {SimpleDenyList}\n */\n SimpleDenyList(\n options: DeployablePayloadOrAddress<SimpleDenyListPayload>,\n isBase?: boolean,\n ) {\n return new SimpleDenyList(\n { config: this._config, account: this._account },\n options,\n isBase,\n );\n }\n // /**\n // * Bound {@link SimpleBudget} constructor that reuses the same configuration as the Boost Core instance.\n // *\n // * @example\n // * ```ts\n // * const budget = core.SimpleBudget('0x') // is roughly equivalent to\n // * const budget = new SimpleBudget({ config: core._config, account: core._account }, '0x')\n // * ```\n // * @param {DeployablePayloadOrAddress<SimpleBudgetPayload>} options\n // * @returns {SimpleBudget}\n // */\n // SimpleBudget(options: DeployablePayloadOrAddress<SimpleBudgetPayload>) {\n // return new SimpleBudget(\n // { config: this._config, account: this._account },\n // options,\n // );\n // }\n /**\n * Bound {@link ManagedBudget} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const budget = core.ManagedBudget('0x') // is roughly equivalent to\n * const budget = new ManagedBudget({ config: core._config, account: core._account }, '0x')\n * ```\n * @param {DeployablePayloadOrAddress<ManagedBudgetPayload>} options\n * @returns {ManagedBudget}\n */\n ManagedBudget(options: DeployablePayloadOrAddress<ManagedBudgetPayload>) {\n return new ManagedBudget(\n { config: this._config, account: this._account },\n options,\n );\n }\n // /**\n // * Bound {@link VestingBudget} constructor that reuses the same configuration as the Boost Core instance.\n // *\n // * @example\n // * ```ts\n // * const budget = core.VestingBudget('0x') // is roughly equivalent to\n // * const budget = new VestingBudget({ config: core._config, account: core._account }, '0x')\n // * ```\n // * @param {DeployablePayloadOrAddress<VestingBudgetPayload>} options\n // * @returns {VestingBudget}\n // */\n // VestingBudget(options: DeployablePayloadOrAddress<VestingBudgetPayload>) {\n // return new VestingBudget(\n // { config: this._config, account: this._account },\n // options,\n // );\n // }\n /**\n * Bound {@link AllowListIncentive} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const incentive = core.AllowListIncentive({ ... }) // is roughly equivalent to\n * const incentive = new AllowListIncentive({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {DeployablePayloadOrAddress<VestingBudgetPayload>} options\n * @returns {VestingBudget}\n */\n AllowListIncentive(options: AllowListIncentivePayload) {\n return new AllowListIncentive(\n { config: this._config, account: this._account },\n options,\n );\n }\n /**\n * Bound {@link CGDAIncentive} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const incentive = core.CGDAIncentive({ ... }) // is roughly equivalent to\n * const incentive = new CGDAIncentive({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {CGDAIncentivePayload} options\n * @returns {CGDAIncentive}\n */\n CGDAIncentive(options: CGDAIncentivePayload) {\n return new CGDAIncentive(\n { config: this._config, account: this._account },\n options,\n );\n }\n /**\n * Bound {@link ERC20Incentive} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const incentive = core.ERC20Incentive({ ... }) // is roughly equivalent to\n * const incentive = new ERC20Incentive({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {ERC20IncentivePayload} options\n * @returns {ERC20Incentive}\n */\n ERC20Incentive(options: ERC20IncentivePayload) {\n return new ERC20Incentive(\n { config: this._config, account: this._account },\n options,\n );\n }\n // /**\n // * Temporarily disabled until low level ABI encoding bugs are resolved\n // * Bound {@link ERC1155Incentive} constructor that reuses the same configuration as the Boost Core instance.\n // *\n // * @experimental\n // * @example\n // * ```ts\n // * const incentive = core.ERC1155Incentive({ ... }) // is roughly equivalent to\n // * const incentive = new ERC1155Incentive({ config: core._config, account: core._account }, { ... })\n // * ```\n // * @param {ERC1155IncentivePayload} options\n // * @returns {ERC1155Incentive}\n // */\n // ERC1155Incentive(options: ERC1155IncentivePayload) {\n // return new ERC1155Incentive(\n // { config: this._config, account: this._account },\n // options,\n // );\n // }\n /**\n * Bound {@link PointsIncentive} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const incentive = core.PointsIncentive({ ... }) // is roughly equivalent to\n * const incentive = new PointsIncentive({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {PointsIncentivePayload} options\n * @returns {PointsIncentive}\n */\n PointsIncentive(options: PointsIncentivePayload) {\n return new PointsIncentive(\n { config: this._config, account: this._account },\n options,\n );\n }\n /**\n * Bound {@link SignerValidator} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const validator = core.SignerValidator({ ... }) // is roughly equivalent to\n * const validator = new SignerValidator({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {DeployablePayloadOrAddress<SignerValidatorPayload>} options\n * @param {?boolean} [isBase]\n * @returns {SignerValidator}\n */\n SignerValidator(\n options: DeployablePayloadOrAddress<SignerValidatorPayload>,\n isBase?: boolean,\n ) {\n return new SignerValidator(\n { config: this._config, account: this._account },\n options,\n isBase,\n );\n }\n /**\n * Bound {@link ERC20VariableIncentive} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const validator = core.ERC20VariableIncentive({ ... }) // is roughly equivalent to\n * const validator = new ERC20VariableIncentive({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {DeployablePayloadOrAddress<ERC20VariableIncentivePayload>} options\n * @param {?boolean} [isBase]\n * @returns {ERC20VariableIncentive}\n */\n ERC20VariableIncentive(\n options: DeployablePayloadOrAddress<ERC20VariableIncentivePayload>,\n isBase?: boolean,\n ) {\n return new ERC20VariableIncentive(\n { config: this._config, account: this._account },\n options,\n isBase,\n );\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?[Address, Address]} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: [Address, Address],\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: boostCoreAbi,\n bytecode: bytecode as Hex,\n args: payload,\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n"],"names":["getAccount","config","uid","connection","addresses","address","chain","status","getChainId","getAction","client","actionFn","name","action_implicit","action_explicit","params","version","getVersion","__classPrivateFieldGet","receiver","state","kind","f","_BaseError_instances","_BaseError_walk","BaseError","shortMessage","options","details","_a","docsPath","fn","err","ConnectorNotConnectedError","ConnectorAccountNotFoundError","connector","ConnectorChainMismatchError","connectionChainId","connectorChainId","getConnectorClient","parameters","accounts","chainId","account","parseAccount","getAddress","provider","x","createClient","opts","custom","simulateContract","abi","rest","action","viem_simulateContract","result","request","writeContract","__mode","activeConnector","simulateRequest","viem_writeContract","createWriteContract","c","configChainId","BOOST_CORE_CLAIM_FEE","parseEther","BOOST_CORE_ADDRESS","isBoostCoreDeployed","isBoostCoreDeployable","BoostCore","Deployable","boostCoreAbi","_boostPayload","_options","coreAddress","payload","budget","validator","allowList","incentives","protocolFee","referralFee","maxParticipants","owner","boostFactory","zeroAddress","DeployableUnknownOwnerProvidedError","budgetPayload","BudgetMustAuthorizeBoostCore","MustInitializeBudgetError","actionPayload","zeroHash","isBase","validatorPayload","allowListPayload","incentivesPayloads","i","incentive","IncentiveNotCloneableError","onChainPayload","boostHash","prepareBoostPayload","receipt","waitForTransactionReceipt","boostCreatedLog","parseEventLogs","boostId","BoostCoreNoIdentifierEmitted","boost","Boost","incentiveId","data","referrer","simulateBoostCoreClaimIncentive","writeBoostCoreClaimIncentive","claimant","simulateBoostCoreClaimIncentiveFor","writeBoostCoreClaimIncentiveFor","id","readBoostCoreGetBoost","_id","boostPayload","actionFromAddress","budgetFromAddress","validatorFromAddress","allowListFromAddress","incentiveAddress","incentiveFromAddress","readBoostCoreGetBoostCount","auth","readIAuthIsAuthorized","readBoostCoreCreateBoostAuth","simulateBoostCoreSetCreateBoostAuth","writeBoostCoreSetCreateBoostAuth","readBoostCoreProtocolFee","readBoostCoreProtocolFeeReceiver","simulateBoostCoreSetProtocolFeeReceiver","writeBoostCoreSetProtocolFeeReceiver","readBoostCoreClaimFee","claimFee","simulateBoostCoreSetClaimFee","writeBoostCoreSetClaimFee","PassthroughAuth","EventAction","SimpleAllowList","SimpleDenyList","ManagedBudget","AllowListIncentive","CGDAIncentive","ERC20Incentive","PointsIncentive","SignerValidator","ERC20VariableIncentive","_payload","bytecode"],"mappings":"2o3BACO,SAASA,EAAWC,EAAQ,CAC/B,MAAMC,EAAMD,EAAO,MAAM,QACnBE,EAAaF,EAAO,MAAM,YAAY,IAAIC,CAAG,EAC7CE,EAAYD,GAAA,YAAAA,EAAY,SACxBE,EAAUD,GAAA,YAAAA,EAAY,GACtBE,EAAQL,EAAO,OAAO,KAAMK,GAAUA,EAAM,MAAOH,GAAA,YAAAA,EAAY,QAAO,EACtEI,EAASN,EAAO,MAAM,OAC5B,OAAQM,EAAM,CACV,IAAK,YACD,MAAO,CACH,QAASF,EACT,UAAWD,EACX,MAAAE,EACA,QAASH,GAAA,YAAAA,EAAY,QACrB,UAA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