@boostxyz/sdk 5.5.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Actions/Action.cjs +1 -1
- package/dist/Actions/Action.js +3 -3
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.cjs.map +1 -1
- package/dist/Actions/EventAction.d.ts +2 -1
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +95 -90
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.js +2 -2
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
- package/dist/AllowLists/SimpleAllowList.js +24 -24
- package/dist/AllowLists/SimpleAllowList.js.map +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.js +3 -3
- package/dist/Auth/PassthroughAuth.cjs +1 -1
- package/dist/Auth/PassthroughAuth.cjs.map +1 -1
- package/dist/Auth/PassthroughAuth.js +14 -14
- package/dist/Boost.cjs.map +1 -1
- package/dist/Boost.js.map +1 -1
- package/dist/BoostCore.cjs +2 -2
- package/dist/BoostCore.cjs.map +1 -1
- package/dist/BoostCore.d.ts +247 -0
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +421 -259
- package/dist/BoostCore.js.map +1 -1
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.cjs.map +1 -1
- package/dist/BoostRegistry.js +43 -43
- package/dist/BoostRegistry.js.map +1 -1
- package/dist/Budget-DMbfdTom.cjs +2 -0
- package/dist/{Budget-AoNx7uFd.cjs.map → Budget-DMbfdTom.cjs.map} +1 -1
- package/dist/Budget-DO6sGTIR.js +463 -0
- package/dist/{Budget-DYIV9iNK.js.map → Budget-DO6sGTIR.js.map} +1 -1
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.js +2 -2
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.cjs.map +1 -1
- package/dist/Budgets/ManagedBudget.js +53 -53
- package/dist/Budgets/ManagedBudgetWithFees.d.ts +26 -0
- package/dist/Budgets/ManagedBudgetWithFees.d.ts.map +1 -1
- package/dist/Deployable/DeployableTarget.cjs +1 -1
- package/dist/Deployable/DeployableTarget.js +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.js +15 -15
- package/dist/Incentive-Boviez4z.js +1036 -0
- package/dist/Incentive-Boviez4z.js.map +1 -0
- package/dist/Incentive-wM4zizTH.cjs +2 -0
- package/dist/Incentive-wM4zizTH.cjs.map +1 -0
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
- package/dist/Incentives/AllowListIncentive.d.ts +9 -1
- package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
- package/dist/Incentives/AllowListIncentive.js +64 -47
- package/dist/Incentives/AllowListIncentive.js.map +1 -1
- package/dist/Incentives/CGDAIncentive.cjs +1 -1
- package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
- package/dist/Incentives/CGDAIncentive.d.ts +12 -1
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
- package/dist/Incentives/CGDAIncentive.js +64 -33
- package/dist/Incentives/CGDAIncentive.js.map +1 -1
- package/dist/Incentives/ERC20Incentive.cjs +1 -1
- package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
- package/dist/Incentives/ERC20Incentive.d.ts +37 -1
- package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.js +73 -49
- package/dist/Incentives/ERC20Incentive.js.map +1 -1
- package/dist/Incentives/ERC20PeggedIncentive.d.ts +35 -0
- package/dist/Incentives/ERC20PeggedIncentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.d.ts +35 -0
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts +25 -0
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.js +24 -24
- package/dist/Incentives/ERC20VariableCriteriaIncentive.js.map +1 -1
- package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableIncentive.cjs.map +1 -1
- package/dist/Incentives/ERC20VariableIncentive.d.ts +35 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20VariableIncentive.js +55 -38
- package/dist/Incentives/ERC20VariableIncentive.js.map +1 -1
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.d.ts +25 -0
- package/dist/Incentives/Incentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.js +2 -2
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.cjs.map +1 -1
- package/dist/Incentives/PointsIncentive.d.ts +8 -0
- package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
- package/dist/Incentives/PointsIncentive.js +50 -28
- package/dist/Incentives/PointsIncentive.js.map +1 -1
- package/dist/SimpleDenyList-CW4RwwRw.js +133 -0
- package/dist/{SimpleDenyList-ByAr4X1r.js.map → SimpleDenyList-CW4RwwRw.js.map} +1 -1
- package/dist/SimpleDenyList-Cybtz7AK.cjs +2 -0
- package/dist/{SimpleDenyList-CsRXJPwm.cjs.map → SimpleDenyList-Cybtz7AK.cjs.map} +1 -1
- package/dist/Validators/LimitedSignerValidator.cjs +1 -1
- package/dist/Validators/LimitedSignerValidator.cjs.map +1 -1
- package/dist/Validators/LimitedSignerValidator.js +33 -33
- package/dist/Validators/LimitedSignerValidator.js.map +1 -1
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.cjs.map +1 -1
- package/dist/Validators/SignerValidator.js +26 -26
- package/dist/Validators/SignerValidator.js.map +1 -1
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.js +3 -3
- package/dist/deployments-CIXw_WKk.cjs +2 -0
- package/dist/deployments-CIXw_WKk.cjs.map +1 -0
- package/dist/{deployments-D0fs26TV.js → deployments-DqjtOTUr.js} +47 -47
- package/dist/{deployments-D0fs26TV.js.map → deployments-DqjtOTUr.js.map} +1 -1
- package/dist/deployments.json +24 -24
- package/dist/generated-DgXPUgXl.cjs +3 -0
- package/dist/generated-DgXPUgXl.cjs.map +1 -0
- package/dist/{generated-Cyvr_Tjx.js → generated-pJZHmRCK.js} +728 -459
- package/dist/generated-pJZHmRCK.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +34 -34
- package/package.json +1 -1
- package/src/Actions/EventAction.ts +25 -6
- package/src/BoostCore.test.ts +124 -2
- package/src/BoostCore.ts +227 -0
- package/src/Incentives/AllowListIncentive.ts +17 -0
- package/src/Incentives/CGDAIncentive.ts +31 -0
- package/src/Incentives/ERC20Incentive.ts +27 -0
- package/src/Incentives/ERC20PeggedIncentive.ts +18 -0
- package/src/Incentives/ERC20PeggedVariableCriteriaIncentive.ts +26 -0
- package/src/Incentives/ERC20VariableIncentive.ts +18 -0
- package/src/Incentives/PointsIncentive.ts +22 -0
- package/dist/Budget-AoNx7uFd.cjs +0 -2
- package/dist/Budget-DYIV9iNK.js +0 -463
- package/dist/Incentive-BbkfwGOb.cjs +0 -2
- package/dist/Incentive-BbkfwGOb.cjs.map +0 -1
- package/dist/Incentive-qlnv5kQB.js +0 -991
- package/dist/Incentive-qlnv5kQB.js.map +0 -1
- package/dist/SimpleDenyList-ByAr4X1r.js +0 -133
- package/dist/SimpleDenyList-CsRXJPwm.cjs +0 -2
- package/dist/deployments-DoIOqxco.cjs +0 -2
- package/dist/deployments-DoIOqxco.cjs.map +0 -1
- package/dist/generated-Cyvr_Tjx.js.map +0 -1
- package/dist/generated-DtYPHhtX.cjs +0 -3
- package/dist/generated-DtYPHhtX.cjs.map +0 -1
package/src/BoostCore.ts
CHANGED
|
@@ -12,11 +12,15 @@ import {
|
|
|
12
12
|
simulateBoostCoreCreateBoost,
|
|
13
13
|
simulateBoostCoreSetCreateBoostAuth,
|
|
14
14
|
simulateBoostCoreSetProtocolFeeReceiver,
|
|
15
|
+
simulateBoostCoreTopupIncentiveFromBudget,
|
|
16
|
+
simulateBoostCoreTopupIncentiveFromSender,
|
|
15
17
|
writeBoostCoreClaimIncentive,
|
|
16
18
|
writeBoostCoreClaimIncentiveFor,
|
|
17
19
|
writeBoostCoreCreateBoost,
|
|
18
20
|
writeBoostCoreSetCreateBoostAuth,
|
|
19
21
|
writeBoostCoreSetProtocolFeeReceiver,
|
|
22
|
+
writeBoostCoreTopupIncentiveFromBudget,
|
|
23
|
+
writeBoostCoreTopupIncentiveFromSender,
|
|
20
24
|
} from '@boostxyz/evm';
|
|
21
25
|
import { bytecode } from '@boostxyz/evm/artifacts/contracts/BoostCore.sol/BoostCore.json';
|
|
22
26
|
import {
|
|
@@ -24,6 +28,7 @@ import {
|
|
|
24
28
|
getAccount,
|
|
25
29
|
getChains,
|
|
26
30
|
getTransactionReceipt,
|
|
31
|
+
readContract,
|
|
27
32
|
waitForTransactionReceipt,
|
|
28
33
|
} from '@wagmi/core';
|
|
29
34
|
import { createWriteContract } from '@wagmi/core/codegen';
|
|
@@ -31,6 +36,8 @@ import {
|
|
|
31
36
|
type Address,
|
|
32
37
|
type ContractEventName,
|
|
33
38
|
type Hex,
|
|
39
|
+
decodeAbiParameters,
|
|
40
|
+
encodeAbiParameters,
|
|
34
41
|
encodePacked,
|
|
35
42
|
keccak256,
|
|
36
43
|
parseEventLogs,
|
|
@@ -1654,4 +1661,224 @@ export class BoostCore extends Deployable<
|
|
|
1654
1661
|
...this.optionallyAttachAccount(options.account),
|
|
1655
1662
|
};
|
|
1656
1663
|
}
|
|
1664
|
+
/**
|
|
1665
|
+
* Prepares and executes a top-up from a Budget, specifying the net top-up amount
|
|
1666
|
+
* that should land in the incentive (the protocol fee is added automatically).
|
|
1667
|
+
*
|
|
1668
|
+
* @public
|
|
1669
|
+
* @async
|
|
1670
|
+
* @param {bigint} boostId The ID of the Boost
|
|
1671
|
+
* @param {bigint} incentiveId The ID of the incentive within that Boost
|
|
1672
|
+
* @param {any} topupPayload A typed struct for the incentive’s top-up parameters
|
|
1673
|
+
* @param {Address} [budget] Optional override budget address (otherwise uses the Boost’s budget)
|
|
1674
|
+
* @param {?WriteParams} [params] Additional transaction overrides
|
|
1675
|
+
* @returns {Promise<{ hash: Hex; result: void }>} The transaction hash and simulation result
|
|
1676
|
+
*/
|
|
1677
|
+
public async topupIncentiveFromBudgetPreFee(
|
|
1678
|
+
boostId: bigint,
|
|
1679
|
+
incentiveId: bigint,
|
|
1680
|
+
topupAmount: bigint,
|
|
1681
|
+
budget?: Address,
|
|
1682
|
+
params?: WriteParams,
|
|
1683
|
+
) {
|
|
1684
|
+
const boost = await this.getBoost(boostId, params);
|
|
1685
|
+
if (incentiveId >= boost.incentives.length) {
|
|
1686
|
+
throw new Error(`Incentive ID ${incentiveId} out of range`);
|
|
1687
|
+
}
|
|
1688
|
+
const incentive = boost.incentives[Number(incentiveId)];
|
|
1689
|
+
if (!incentive) {
|
|
1690
|
+
throw new Error(`Incentive with ID ${incentiveId} not found`);
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
const incentiveData = await incentive.getTopupPayload(topupAmount);
|
|
1694
|
+
|
|
1695
|
+
if (!(topupAmount > 0)) {
|
|
1696
|
+
throw new Error('Top-up amount must be greater than zero');
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
return await this.topupIncentiveFromBudgetRaw(
|
|
1700
|
+
boostId,
|
|
1701
|
+
incentiveId,
|
|
1702
|
+
incentiveData,
|
|
1703
|
+
budget,
|
|
1704
|
+
params,
|
|
1705
|
+
);
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1708
|
+
/**
|
|
1709
|
+
* Prepares and executes a top-up from a Budget, specifying the entire total tokens
|
|
1710
|
+
* (incentive + fee) you want to disburse. We'll back-calculate how many tokens land
|
|
1711
|
+
* in the incentive.
|
|
1712
|
+
*
|
|
1713
|
+
* @public
|
|
1714
|
+
* @async
|
|
1715
|
+
* @param {bigint} boostId The ID of the Boost
|
|
1716
|
+
* @param {bigint} incentiveId The ID of the incentive within that Boost
|
|
1717
|
+
* @param {any} topupPayload A typed struct for the incentive’s top-up parameters
|
|
1718
|
+
* @param {bigint} totalAmount The total tokens to disburse
|
|
1719
|
+
* @param {Address} [budget] Optional override budget address
|
|
1720
|
+
* @param {?WriteParams} [params] Additional transaction overrides
|
|
1721
|
+
* @returns {Promise<{ hash: Hex; result: void }>}
|
|
1722
|
+
*/
|
|
1723
|
+
public async topupIncentiveFromBudgetPostFee(
|
|
1724
|
+
boostId: bigint,
|
|
1725
|
+
incentiveId: bigint,
|
|
1726
|
+
totalAmount: bigint,
|
|
1727
|
+
budget?: Address,
|
|
1728
|
+
params?: WriteParams,
|
|
1729
|
+
) {
|
|
1730
|
+
const feeBps = await this.protocolFee(params);
|
|
1731
|
+
const topupAmount =
|
|
1732
|
+
(totalAmount * FEE_DENOMINATOR) / (FEE_DENOMINATOR + feeBps);
|
|
1733
|
+
return this.topupIncentiveFromBudgetPreFee(
|
|
1734
|
+
boostId,
|
|
1735
|
+
incentiveId,
|
|
1736
|
+
topupAmount,
|
|
1737
|
+
budget,
|
|
1738
|
+
params,
|
|
1739
|
+
);
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
/**
|
|
1743
|
+
* Prepares and executes a top-up from the caller (msg.sender), specifying the net top-up
|
|
1744
|
+
* to land in the incentive. We'll add the protocol fee on top automatically.
|
|
1745
|
+
*
|
|
1746
|
+
* @public
|
|
1747
|
+
* @async
|
|
1748
|
+
* @param {bigint} boostId The ID of the Boost
|
|
1749
|
+
* @param {bigint} incentiveId The ID of the incentive within that Boost
|
|
1750
|
+
* @param {any} topupPayload A typed struct for the incentive’s top-up parameters
|
|
1751
|
+
* @param {?WriteParams} [params]
|
|
1752
|
+
* @returns {Promise<{ hash: Hex; result: void }>}
|
|
1753
|
+
*/
|
|
1754
|
+
public async topupIncentiveFromSenderPreFee(
|
|
1755
|
+
boostId: bigint,
|
|
1756
|
+
incentiveId: bigint,
|
|
1757
|
+
topupAmount: bigint,
|
|
1758
|
+
params?: WriteParams,
|
|
1759
|
+
) {
|
|
1760
|
+
const boost = await this.getBoost(boostId, params);
|
|
1761
|
+
if (incentiveId >= boost.incentives.length) {
|
|
1762
|
+
throw new Error(`Incentive ID ${incentiveId} out of range`);
|
|
1763
|
+
}
|
|
1764
|
+
const incentive = boost.incentives[Number(incentiveId)];
|
|
1765
|
+
if (!incentive) {
|
|
1766
|
+
throw new Error(`Incentive with ID ${incentiveId} not found`);
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
if (!(topupAmount > 0)) {
|
|
1770
|
+
throw new Error('Top-up amount must be greater than zero');
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1773
|
+
const incentiveData = await incentive.getTopupPayload(topupAmount);
|
|
1774
|
+
|
|
1775
|
+
return await this.topupIncentiveFromSenderRaw(
|
|
1776
|
+
boostId,
|
|
1777
|
+
incentiveId,
|
|
1778
|
+
incentiveData,
|
|
1779
|
+
params,
|
|
1780
|
+
);
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
/**
|
|
1784
|
+
* Prepares and executes a top-up from the caller (msg.sender), specifying the total
|
|
1785
|
+
* tokens you’re willing to provide (including fee). We'll back-calculate the net
|
|
1786
|
+
* top-up for the incentive.
|
|
1787
|
+
*
|
|
1788
|
+
* @public
|
|
1789
|
+
* @async
|
|
1790
|
+
* @param {bigint} boostId The ID of the Boost
|
|
1791
|
+
* @param {bigint} incentiveId The ID of the incentive within that Boost
|
|
1792
|
+
* @param {any} topupPayload A typed struct for the incentive’s top-up parameters
|
|
1793
|
+
* @param {bigint} totalAmount The entire tokens (top-up + fee)
|
|
1794
|
+
* @param {?WriteParams} [params]
|
|
1795
|
+
* @returns {Promise<{ hash: Hex; result: void }>}
|
|
1796
|
+
*/
|
|
1797
|
+
public async topupIncentiveFromSenderPostFee(
|
|
1798
|
+
boostId: bigint,
|
|
1799
|
+
incentiveId: bigint,
|
|
1800
|
+
totalAmount: bigint,
|
|
1801
|
+
params?: WriteParams,
|
|
1802
|
+
) {
|
|
1803
|
+
const feeBps = await this.protocolFee(params);
|
|
1804
|
+
const topupAmount =
|
|
1805
|
+
(totalAmount * FEE_DENOMINATOR) / (FEE_DENOMINATOR + feeBps);
|
|
1806
|
+
|
|
1807
|
+
return this.topupIncentiveFromSenderPreFee(
|
|
1808
|
+
boostId,
|
|
1809
|
+
incentiveId,
|
|
1810
|
+
topupAmount,
|
|
1811
|
+
params,
|
|
1812
|
+
);
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
/**
|
|
1816
|
+
* A lower-level function that actually calls `topupIncentiveFromSender` on-chain,
|
|
1817
|
+
* passing the final total. The contract modifies its internal logic to split net top-up vs. fee.
|
|
1818
|
+
*
|
|
1819
|
+
* @private
|
|
1820
|
+
* @param {bigint} boostId
|
|
1821
|
+
* @param {bigint} incentiveId
|
|
1822
|
+
* @param {Hex} preflightData The raw ABudget.Transfer data from preflight
|
|
1823
|
+
* @param {?WriteParams} [params]
|
|
1824
|
+
* @returns {Promise<{ hash: Hex; result: void }>}
|
|
1825
|
+
*/
|
|
1826
|
+
private async topupIncentiveFromSenderRaw(
|
|
1827
|
+
boostId: bigint,
|
|
1828
|
+
incentiveId: bigint,
|
|
1829
|
+
preflightData: Hex,
|
|
1830
|
+
params?: WriteParams,
|
|
1831
|
+
) {
|
|
1832
|
+
const { request, result } = await simulateBoostCoreTopupIncentiveFromSender(
|
|
1833
|
+
this._config,
|
|
1834
|
+
{
|
|
1835
|
+
...this.optionallyAttachAccount(),
|
|
1836
|
+
...(params as object),
|
|
1837
|
+
address: this.assertValidAddress(),
|
|
1838
|
+
args: [boostId, incentiveId, preflightData],
|
|
1839
|
+
},
|
|
1840
|
+
);
|
|
1841
|
+
const hash = await writeBoostCoreTopupIncentiveFromSender(
|
|
1842
|
+
this._config,
|
|
1843
|
+
request,
|
|
1844
|
+
);
|
|
1845
|
+
return { hash, result };
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
/**
|
|
1849
|
+
* A lower-level function that actually calls `topupIncentiveFromBudget` on-chain,
|
|
1850
|
+
* passing the preflight data plus the final total. The contract itself modifies
|
|
1851
|
+
* the amount to (topup + fee).
|
|
1852
|
+
*
|
|
1853
|
+
* @private
|
|
1854
|
+
* @param {bigint} boostId
|
|
1855
|
+
* @param {bigint} incentiveId
|
|
1856
|
+
* @param {Hex} preflightData The raw ABudget.Transfer (encoded) from preflight
|
|
1857
|
+
* @param {Address} [budget] Optional override for the budget
|
|
1858
|
+
* @param {?WriteParams} [params]
|
|
1859
|
+
* @returns {Promise<{ hash: Hex; result: void }>}
|
|
1860
|
+
*/
|
|
1861
|
+
private async topupIncentiveFromBudgetRaw(
|
|
1862
|
+
boostId: bigint,
|
|
1863
|
+
incentiveId: bigint,
|
|
1864
|
+
preflightData: Hex,
|
|
1865
|
+
budget?: Address,
|
|
1866
|
+
params?: WriteParams,
|
|
1867
|
+
) {
|
|
1868
|
+
// e.g. run "simulate + write" pattern
|
|
1869
|
+
const { request, result } = await simulateBoostCoreTopupIncentiveFromBudget(
|
|
1870
|
+
this._config,
|
|
1871
|
+
{
|
|
1872
|
+
...this.optionallyAttachAccount(),
|
|
1873
|
+
...(params as object),
|
|
1874
|
+
address: this.assertValidAddress(),
|
|
1875
|
+
args: [boostId, incentiveId, preflightData, budget ?? zeroAddress],
|
|
1876
|
+
},
|
|
1877
|
+
);
|
|
1878
|
+
const hash = await writeBoostCoreTopupIncentiveFromBudget(
|
|
1879
|
+
this._config,
|
|
1880
|
+
request,
|
|
1881
|
+
);
|
|
1882
|
+
return { hash, result };
|
|
1883
|
+
}
|
|
1657
1884
|
}
|
|
@@ -330,6 +330,23 @@ export class AllowListIncentive extends DeployableTarget<
|
|
|
330
330
|
};
|
|
331
331
|
}
|
|
332
332
|
|
|
333
|
+
/**
|
|
334
|
+
* Generates a top-up payload for the AllowListIncentive contract.
|
|
335
|
+
*
|
|
336
|
+
* @public
|
|
337
|
+
* @param {bigint} netAmount The net number of slots to be added to the allowlist.
|
|
338
|
+
* @returns {Hex} The ABI-encoded top-up payload.
|
|
339
|
+
*/
|
|
340
|
+
public getTopupPayload(netAmount: bigint): Hex {
|
|
341
|
+
return encodeAbiParameters(
|
|
342
|
+
[
|
|
343
|
+
{ type: 'address', name: 'allowList' },
|
|
344
|
+
{ type: 'uint256', name: 'limit' },
|
|
345
|
+
],
|
|
346
|
+
[this.payload?.allowList ?? zeroHash, netAmount],
|
|
347
|
+
);
|
|
348
|
+
}
|
|
349
|
+
|
|
333
350
|
/**
|
|
334
351
|
* Builds the claim data for the AllowListIncentive.
|
|
335
352
|
*
|
|
@@ -482,6 +482,37 @@ export class CGDAIncentive extends DeployableTarget<
|
|
|
482
482
|
return encodeAbiParameters([{ type: 'uint256' }], [amount]);
|
|
483
483
|
}
|
|
484
484
|
|
|
485
|
+
/**
|
|
486
|
+
* Generates a top-up payload for the CGDAIncentive contract.
|
|
487
|
+
*
|
|
488
|
+
* In this approach, we treat a "top-up" as incrementing the existing `totalBudget`
|
|
489
|
+
* in the incentive by `netAmount`. The entire payload is re-encoded with the updated budget.
|
|
490
|
+
*
|
|
491
|
+
* @public
|
|
492
|
+
* @param {bigint} netAmount The additional tokens to add to `totalBudget`.
|
|
493
|
+
* @returns {Hex} The ABI-encoded, updated CGDAIncentive payload.
|
|
494
|
+
*/
|
|
495
|
+
public async getTopupPayload(netAmount: bigint): Promise<Hex> {
|
|
496
|
+
return encodeAbiParameters(
|
|
497
|
+
[
|
|
498
|
+
{ type: 'address', name: 'asset' },
|
|
499
|
+
{ type: 'uint256', name: 'initialReward' },
|
|
500
|
+
{ type: 'uint256', name: 'rewardDecay' },
|
|
501
|
+
{ type: 'uint256', name: 'rewardBoost' },
|
|
502
|
+
{ type: 'uint256', name: 'totalBudget' },
|
|
503
|
+
{ type: 'address', name: 'manager' },
|
|
504
|
+
],
|
|
505
|
+
[
|
|
506
|
+
(await this.asset()) ?? zeroHash,
|
|
507
|
+
this.payload?.initialReward ?? 0n,
|
|
508
|
+
this.payload?.rewardDecay ?? 0n,
|
|
509
|
+
this.payload?.rewardBoost ?? 0n,
|
|
510
|
+
netAmount,
|
|
511
|
+
this.payload?.manager ?? zeroHash,
|
|
512
|
+
],
|
|
513
|
+
);
|
|
514
|
+
}
|
|
515
|
+
|
|
485
516
|
/**
|
|
486
517
|
* Builds the claim data for the CGDAIncentive.
|
|
487
518
|
*
|
|
@@ -502,6 +502,33 @@ export class ERC20Incentive extends DeployableTarget<
|
|
|
502
502
|
return encodeAbiParameters([{ type: 'uint256' }], [amount]);
|
|
503
503
|
}
|
|
504
504
|
|
|
505
|
+
/**
|
|
506
|
+
* A helper that composes a typed "top-up" parameter object
|
|
507
|
+
* given a net top-up amount. You can name it whatever you like
|
|
508
|
+
* (e.g. topupParamsFromNetAmount, getTopupPayload, etc.).
|
|
509
|
+
*
|
|
510
|
+
* @public
|
|
511
|
+
* @param {bigint} netAmount The net top-up tokens the user wants to add
|
|
512
|
+
* @param {?WriteParams} [params] (optional) if you need them
|
|
513
|
+
* @returns {Hex} the ABI-encoded data for top-up
|
|
514
|
+
*/
|
|
515
|
+
public async getTopupPayload(netAmount: bigint): Promise<Hex> {
|
|
516
|
+
// 1. Build a typed object matching your `ERC20IncentivePayload`.
|
|
517
|
+
// For example, you might want to increment `limit` by `netAmount`,
|
|
518
|
+
// or set `reward = netAmount`. That’s up to your logic:
|
|
519
|
+
const asset = await this.asset();
|
|
520
|
+
const typed: ERC20IncentivePayload = {
|
|
521
|
+
asset: asset || zeroAddress,
|
|
522
|
+
strategy: StrategyType.POOL, // e.g. StrategyType.POOL
|
|
523
|
+
reward: 1n, // store net top-up as the "reward"
|
|
524
|
+
limit: netAmount, // or maybe add netAmount to existing limit
|
|
525
|
+
manager: this.payload?.manager || zeroAddress,
|
|
526
|
+
};
|
|
527
|
+
|
|
528
|
+
// 2. Encode it with your existing `prepareERC20IncentivePayload(...)`.
|
|
529
|
+
return prepareERC20IncentivePayload(typed);
|
|
530
|
+
}
|
|
531
|
+
|
|
505
532
|
/**
|
|
506
533
|
* Builds the claim data for the ERC20Incentive.
|
|
507
534
|
*
|
|
@@ -478,6 +478,24 @@ export class ERC20PeggedIncentive extends DeployableTarget<
|
|
|
478
478
|
[rewardAmount],
|
|
479
479
|
);
|
|
480
480
|
}
|
|
481
|
+
/**
|
|
482
|
+
* Generates a top-up payload for the ERC20PeggedIncentive contract by incrementing
|
|
483
|
+
* the existing `limit` field by `netAmount`. The entire payload is then re-encoded
|
|
484
|
+
* via `prepareERC20PeggedIncentivePayload(...)`.
|
|
485
|
+
*
|
|
486
|
+
* @public
|
|
487
|
+
* @param {bigint} netAmount - The additional limit to add to this incentive.
|
|
488
|
+
* @returns {Hex} The ABI-encoded payload with the updated `limit`.
|
|
489
|
+
*/
|
|
490
|
+
public async getTopupPayload(netAmount: bigint): Promise<Hex> {
|
|
491
|
+
return prepareERC20PeggedIncentivePayload({
|
|
492
|
+
asset: (await this.asset()) ?? zeroAddress,
|
|
493
|
+
peg: this.payload?.peg ?? zeroAddress,
|
|
494
|
+
reward: this.payload?.reward ?? 0n,
|
|
495
|
+
limit: netAmount,
|
|
496
|
+
manager: this.payload?.manager ?? zeroAddress,
|
|
497
|
+
});
|
|
498
|
+
}
|
|
481
499
|
|
|
482
500
|
/**
|
|
483
501
|
* Decodes claim data for the ERC20PeggedIncentive, returning the claim amount.
|
|
@@ -613,6 +613,32 @@ export class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<
|
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
615
|
|
|
616
|
+
/**
|
|
617
|
+
* Generates a top-up payload for the ERC20PeggedIncentive contract by incrementing
|
|
618
|
+
* the existing `limit` field by `netAmount`. The entire payload is then re-encoded
|
|
619
|
+
* via `prepareERC20PeggedIncentivePayload(...)`.
|
|
620
|
+
*
|
|
621
|
+
* @public
|
|
622
|
+
* @param {bigint} netAmount - The additional limit to add to this incentive.
|
|
623
|
+
* @returns {Hex} The ABI-encoded payload with the updated `limit`.
|
|
624
|
+
*/
|
|
625
|
+
public async getTopupPayload(netAmount: bigint): Promise<Hex> {
|
|
626
|
+
return prepareERC20PeggedVariableCriteriaIncentivePayload({
|
|
627
|
+
asset: (await this.asset()) ?? zeroAddress,
|
|
628
|
+
peg: this.payload?.peg ?? zeroAddress,
|
|
629
|
+
reward: this.payload?.reward ?? 0n,
|
|
630
|
+
limit: netAmount,
|
|
631
|
+
maxReward: this.payload?.maxReward ?? 0n,
|
|
632
|
+
manager: this.payload?.manager ?? zeroAddress,
|
|
633
|
+
criteria: this.payload?.criteria ?? {
|
|
634
|
+
criteriaType: 0,
|
|
635
|
+
signature: zeroAddress,
|
|
636
|
+
fieldIndex: 0,
|
|
637
|
+
targetContract: zeroAddress,
|
|
638
|
+
},
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
|
|
616
642
|
/**
|
|
617
643
|
* @inheritdoc
|
|
618
644
|
*
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
type Hex,
|
|
23
23
|
decodeAbiParameters,
|
|
24
24
|
encodeAbiParameters,
|
|
25
|
+
zeroAddress,
|
|
25
26
|
} from 'viem';
|
|
26
27
|
import { ERC20VariableIncentive as ERC20VariableIncentiveBases } from '../../dist/deployments.json';
|
|
27
28
|
import type {
|
|
@@ -394,6 +395,23 @@ export class ERC20VariableIncentive<
|
|
|
394
395
|
]);
|
|
395
396
|
return limit - totalClaimed;
|
|
396
397
|
}
|
|
398
|
+
/**
|
|
399
|
+
* Generates a top-up payload for the ERC20PeggedIncentive contract by incrementing
|
|
400
|
+
* the existing `limit` field by `netAmount`. The entire payload is then re-encoded
|
|
401
|
+
* via `prepareERC20PeggedIncentivePayload(...)`.
|
|
402
|
+
*
|
|
403
|
+
* @public
|
|
404
|
+
* @param {bigint} netAmount - The additional limit to add to this incentive.
|
|
405
|
+
* @returns {Hex} The ABI-encoded payload with the updated `limit`.
|
|
406
|
+
*/
|
|
407
|
+
public async getTopupPayload(netAmount: bigint): Promise<Hex> {
|
|
408
|
+
return prepareERC20VariableIncentivePayload({
|
|
409
|
+
asset: (await this.asset()) as Address,
|
|
410
|
+
reward: netAmount,
|
|
411
|
+
manager: zeroAddress,
|
|
412
|
+
limit: 1n,
|
|
413
|
+
});
|
|
414
|
+
}
|
|
397
415
|
|
|
398
416
|
/**
|
|
399
417
|
* Builds the claim data for the ERC20VariableIncentive.
|
|
@@ -348,6 +348,28 @@ export class PointsIncentive extends DeployableTarget<
|
|
|
348
348
|
};
|
|
349
349
|
}
|
|
350
350
|
|
|
351
|
+
/**
|
|
352
|
+
* Generates a top-up payload for the PointsIncentive contract.
|
|
353
|
+
*
|
|
354
|
+
* @public
|
|
355
|
+
* @param {bigint} netAmount The net reward amount to be added to the incentive.
|
|
356
|
+
* @returns {Hex} The ABI-encoded top-up payload.
|
|
357
|
+
*/
|
|
358
|
+
public getTopupPayload(netAmount: bigint): Hex {
|
|
359
|
+
return encodeAbiParameters(
|
|
360
|
+
[
|
|
361
|
+
{ type: 'address', name: 'venue' },
|
|
362
|
+
{ type: 'bytes4', name: 'selector' },
|
|
363
|
+
{ type: 'uint256', name: 'amount' },
|
|
364
|
+
],
|
|
365
|
+
[
|
|
366
|
+
this.payload?.venue ?? zeroHash,
|
|
367
|
+
this.payload?.selector ?? zeroHash,
|
|
368
|
+
netAmount,
|
|
369
|
+
],
|
|
370
|
+
);
|
|
371
|
+
}
|
|
372
|
+
|
|
351
373
|
/**
|
|
352
374
|
* Builds the claim data for the PointsIncentive.
|
|
353
375
|
*
|
package/dist/Budget-AoNx7uFd.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const d=require("./generated-DtYPHhtX.cjs"),u=require("./componentInterfaces-D7r9xJmt.cjs"),l=require("@wagmi/core"),g=require("./errors.cjs"),r=require("./Budgets/ManagedBudget.cjs"),t=require("viem"),A=require("./deployments-DoIOqxco.cjs"),p=require("./Deployable/DeployableTargetWithRBAC.cjs"),m=require("./utils.cjs"),R="0x6080604052348015600e575f80fd5b50601b602b60201b60201c565b6027602b60201b60201c565b60bc565b5f6038609360201b60201c565b90508054600181161560515763f92ee8a95f526004601cfd5b8160c01c808260011c14608e578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b614ba6806100c95f395ff3fe60806040526004361061025f575f3560e01c8063715018a611610143578063dcc21361116100b5578063f8724aba11610079578063f8724aba14610946578063f9a802c314610982578063fa4ca9b1146109be578063fe56e232146109fa578063fe9fbb8014610a22578063fee81cf414610a5e57610266565b8063dcc2136114610880578063ec87621c146108a8578063f04e283e146108d2578063f23a6e61146108ee578063f2fde38b1461092a57610266565b8063b300579311610107578063b30057931461072b578063bc197c8114610768578063be4994f8146107a4578063c6004a3a146107cc578063d2514e8414610808578063d8c12d221461084457610266565b8063715018a61461066757806375b238fc14610671578063774c33ab1461069b5780638da5cb5b146106d7578063a6f7f5d61461070157610266565b80634359d28a116101dc5780634a4ee7b1116101a05780634a4ee7b11461055d578063514e62fc1461057957806354d1f13d146105b5578063578bcf35146105bf5780635aef467a146105fb57806361400c991461062b57610266565b80634359d28a1461046d578063439fab911461049557806343cc96e1146104bd578063451cc191146104e5578063474f5a441461052157610266565b80631c10893f116102235780631c10893f146103a55780631cd64df4146103c157806325692962146103fd57806328d6183b146104075780632de948071461043157610266565b806301ffc9a71461029857806310098ad5146102d457806314135ce014610310578063183a4f6e1461034c578063185832a31461036857610266565b3661026657005b6040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3480156102a3575f80fd5b506102be60048036038101906102b991906133d9565b610a9a565b6040516102cb919061341e565b60405180910390f35b3480156102df575f80fd5b506102fa60048036038101906102f59190613491565b610aab565b60405161030791906134d4565b60405180910390f35b34801561031b575f80fd5b5061033660048036038101906103319190613491565b610b04565b60405161034391906134d4565b60405180910390f35b61036660048036038101906103619190613517565b610b19565b005b348015610373575f80fd5b5061038e600480360381019061038991906135a3565b610b26565b60405161039c929190613636565b60405180910390f35b6103bf60048036038101906103ba919061365d565b610b51565b005b3480156103cc575f80fd5b506103e760048036038101906103e2919061365d565b610b67565b6040516103f4919061341e565b60405180910390f35b610405610b7d565b005b348015610412575f80fd5b5061041b610bce565b60405161042891906136aa565b60405180910390f35b34801561043c575f80fd5b5061045760048036038101906104529190613491565b610bf5565b60405161046491906134d4565b60405180910390f35b348015610478575f80fd5b50610493600480360381019061048e919061376d565b610c0e565b005b3480156104a0575f80fd5b506104bb60048036038101906104b691906137eb565b610d1c565b005b3480156104c8575f80fd5b506104e360048036038101906104de9190613836565b610efe565b005b3480156104f0575f80fd5b5061050b600480360381019061050691906137eb565b61131d565b60405161051891906134d4565b60405180910390f35b34801561052c575f80fd5b50610547600480360381019061054291906137eb565b611324565b60405161055491906134d4565b60405180910390f35b6105776004803603810190610572919061365d565b61151d565b005b348015610584575f80fd5b5061059f600480360381019061059a919061365d565b611533565b6040516105ac919061341e565b60405180910390f35b6105bd61154a565b005b3480156105ca575f80fd5b506105e560048036038101906105e09190613491565b611583565b6040516105f291906134d4565b60405180910390f35b610615600480360381019061061091906137eb565b6115c9565b604051610622919061341e565b60405180910390f35b348015610636575f80fd5b50610651600480360381019061064c91906138c9565b611939565b60405161065e919061341e565b60405180910390f35b61066f61199d565b005b34801561067c575f80fd5b506106856119b0565b60405161069291906134d4565b60405180910390f35b3480156106a6575f80fd5b506106c160048036038101906106bc919061365d565b6119b5565b6040516106ce91906134d4565b60405180910390f35b3480156106e2575f80fd5b506106eb611a0b565b6040516106f89190613914565b60405180910390f35b34801561070c575f80fd5b50610715611a33565b60405161072291906134d4565b60405180910390f35b348015610736575f80fd5b50610751600480360381019061074c91906135a3565b611a39565b60405161075f929190613636565b60405180910390f35b348015610773575f80fd5b5061078e60048036038101906107899190613982565b611bf7565b60405161079b91906136aa565b60405180910390f35b3480156107af575f80fd5b506107ca60048036038101906107c59190613a59565b611c0e565b005b3480156107d7575f80fd5b506107f260048036038101906107ed9190613491565b611cc4565b6040516107ff91906134d4565b60405180910390f35b348015610813575f80fd5b5061082e60048036038101906108299190613491565b611cd9565b60405161083b91906134d4565b60405180910390f35b34801561084f575f80fd5b5061086a60048036038101906108659190613491565b611d7a565b60405161087791906134d4565b60405180910390f35b34801561088b575f80fd5b506108a660048036038101906108a19190613a59565b611d8f565b005b3480156108b3575f80fd5b506108bc611e45565b6040516108c991906134d4565b60405180910390f35b6108ec60048036038101906108e79190613491565b611e4a565b005b3480156108f9575f80fd5b50610914600480360381019061090f9190613ad7565b611e88565b60405161092191906136aa565b60405180910390f35b610944600480360381019061093f9190613491565b611e9d565b005b348015610951575f80fd5b5061096c6004803603810190610967919061365d565b611ec6565b60405161097991906134d4565b60405180910390f35b34801561098d575f80fd5b506109a860048036038101906109a3919061365d565b611f48565b6040516109b591906134d4565b60405180910390f35b3480156109c9575f80fd5b506109e460048036038101906109df91906137eb565b612021565b6040516109f1919061341e565b60405180910390f35b348015610a05575f80fd5b50610a206004803603810190610a1b9190613517565b6123fc565b005b348015610a2d575f80fd5b50610a486004803603810190610a439190613491565b61248e565b604051610a55919061341e565b60405180910390f35b348015610a69575f80fd5b50610a846004803603810190610a7f9190613491565b6124e1565b604051610a9191906134d4565b60405180910390f35b5f610aa4826124fa565b9050919050565b5f60045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054610af383612573565b610afd9190613b9a565b9050919050565b6004602052805f5260405f205f915090505481565b610b2333826125de565b50565b5f80610b358787878787611a39565b8092508193505050610b478484610efe565b9550959350505050565b610b596125ed565b610b638282612624565b5050565b5f8182610b7385610bf5565b1614905092915050565b5f610b86612634565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7fde98bbf000000000000000000000000000000000000000000000000000000000905090565b5f638b78c6d8600c52815f526020600c20549050919050565b6002610c198161263e565b828290508585905014610c58576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85859050811015610d14575f848483818110610c7957610c78613bcd565b5b9050602002016020810190610c8e9190613c24565b90506001151581151503610cd357610cce878784818110610cb257610cb1613bcd565b5b9050602002016020810190610cc79190613491565b6001612624565b610d06565b610d05878784818110610ce957610ce8613bcd565b5b9050602002016020810190610cfe9190613491565b60016125de565b5b508080600101915050610c5a565b505050505050565b5f610d25612673565b90508054600382558015610d575760018160011c14303b10610d4e5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f8383810190610d689190613f0c565b9050610d76815f015161269c565b5f5b816020015151811015610dd857610dcb82602001518281518110610d9f57610d9e613bcd565b5b602002602001015183604001518381518110610dbe57610dbd613bcd565b5b6020026020010151612772565b8080600101915050610d78565b505f81602001515103610e20576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1790613fad565b60405180910390fd5b80602001515f81518110610e3757610e36613bcd565b5b60200260200101515f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080606001516001819055507f74f254e69f1d1aa50fbf15b184112c15530415ac9f4b4bf2b75778c6befd09788160600151604051610ebb91906134d4565b60405180910390a1508015610ef9576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166313c8e2de846040518263ffffffff1660e01b8152600401610f5891906134d4565b5f60405180830381865afa158015610f72573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610f9a919061430b565b90505f81608001518381518110610fb457610fb3613bcd565b5b602002602001015190508073ffffffffffffffffffffffffffffffffffffffff166301ffc9a77f7cc1d5bb000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b815260040161101791906136aa565b602060405180830381865afa158015611032573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110569190614366565b15611153575f8173ffffffffffffffffffffffffffffffffffffffff1663dcc59b6f6040518163ffffffff1660e01b81526004016020604051808303815f875af11580156110a6573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110ca9190614391565b90505f8273ffffffffffffffffffffffffffffffffffffffff1663a4d66daf6040518163ffffffff1660e01b81526004016020604051808303815f875af1158015611117573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061113b9190614391565b905061114a86868685856127b3565b50505050611319565b8073ffffffffffffffffffffffffffffffffffffffff166301ffc9a77f90318111000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b81526004016111ac91906136aa565b602060405180830381865afa1580156111c7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111eb9190614366565b156112e7575f8173ffffffffffffffffffffffffffffffffffffffff1663d54ad2a16040518163ffffffff1660e01b81526004016020604051808303815f875af115801561123b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061125f9190614391565b90505f8273ffffffffffffffffffffffffffffffffffffffff1663a4d66daf6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156112ab573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112cf9190614391565b90506112de86868685856127b3565b50505050611319565b6040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b5f92915050565b5f60026113308161263e565b5f84848101906113409190614520565b90505f80600281111561135657611355614567565b5b825f0151600281111561136c5761136b614567565b5b148061139f57506001600281111561138757611386614567565b5b825f0151600281111561139d5761139c614567565b5b145b156113fe575f82606001518060200190518101906113bd91906145cd565b90506113f2836020015184604001515f845f0151146113df57835f01516113ed565b6113ec8660200151610aab565b5b612ac8565b805f0151915050611510565b60028081111561141157611410614567565b5b825f0151600281111561142757611426614567565b5b03611505575f826060015180602001905181019061144591906146f1565b90506114f883602001518460400151835f01515f85602001511461146d5784602001516114ee565b866020015173ffffffffffffffffffffffffffffffffffffffff1662fdd58e30875f01516040518363ffffffff1660e01b81526004016114ae929190614738565b602060405180830381865afa1580156114c9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114ed9190614391565b5b8560400151612c8e565b806020015191505061150f565b8093505050611516565b5b80935050505b5092915050565b6115256125ed565b61152f82826125de565b5050565b5f808261153f85610bf5565b161415905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b5f60055f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b5f8083838101906115da9190614520565b90505f60028111156115ef576115ee614567565b5b815f0151600281111561160557611604614567565b5b0361167b575f816060015180602001905181019061162391906145cd565b9050805f01513414611675578160200151815f01516040517fcece04c500000000000000000000000000000000000000000000000000000000815260040161166c929190614738565b60405180910390fd5b5061192d565b6001600281111561168f5761168e614567565b5b815f015160028111156116a5576116a4614567565b5b03611780575f81606001518060200190518101906116c391906145cd565b90506116fd826040015130835f0151856020015173ffffffffffffffffffffffffffffffffffffffff16612eba909392919063ffffffff16565b805f015161172e30846020015173ffffffffffffffffffffffffffffffffffffffff16612f1490919063ffffffff16565b101561177a578160200151815f01516040517fcece04c5000000000000000000000000000000000000000000000000000000008152600401611771929190614738565b60405180910390fd5b5061192c565b60028081111561179357611792614567565b5b815f015160028111156117a9576117a8614567565b5b03611922575f81606001518060200190518101906117c791906146f1565b9050816020015173ffffffffffffffffffffffffffffffffffffffff1663f242432a836040015130845f0151856020015186604001516040518663ffffffff1660e01b815260040161181d9594939291906147b1565b5f604051808303815f87803b158015611834575f80fd5b505af1158015611846573d5f803e3d5ffd5b505050508060200151826020015173ffffffffffffffffffffffffffffffffffffffff1662fdd58e30845f01516040518363ffffffff1660e01b8152600401611890929190614738565b602060405180830381865afa1580156118ab573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118cf9190614391565b101561191c57816020015181602001516040517fcece04c5000000000000000000000000000000000000000000000000000000008152600401611913929190614738565b60405180910390fd5b5061192b565b5f915050611933565b5b5b60019150505b92915050565b5f805f90505b83839050811015611991576119778484838181106119605761195f613bcd565b5b90506020028101906119729190614815565b612021565b611984575f915050611997565b808060010191505061193f565b50600190505b92915050565b6119a56125ed565b6119ae5f612f47565b565b600281565b5f60065f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8381526020019081526020015f2054905092915050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b60015481565b5f80611a443361248e565b611a7a576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60405180604001604052803073ffffffffffffffffffffffffffffffffffffffff16815260200188888080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f8201169050808301925050505050505081525090505f8890505f808273ffffffffffffffffffffffffffffffffffffffff1663dd98558c85604051602001611b1e9190614908565b6040516020818303038152906040528a8a6040518463ffffffff1660e01b8152600401611b4d93929190614928565b60408051808303815f875af1158015611b68573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b8c9190614964565b915091508160055f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254611bdc9190613b9a565b92505081905550818195509550505050509550959350505050565b5f63bc197c8160e01b905098975050505050505050565b6002611c198161263e565b828290508585905014611c58576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85859050811015611cbc57611caf868683818110611c7b57611c7a613bcd565b5b9050602002016020810190611c909190613491565b858584818110611ca357611ca2613bcd565b5b90506020020135612624565b8080600101915050611c5a565b505050505050565b6003602052805f5260405f205f915090505481565b5f60045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205460055f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054611d5f84610aab565b611d6991906149a2565b611d7391906149a2565b9050919050565b6002602052805f5260405f205f915090505481565b6002611d9a8161263e565b828290508585905014611dd9576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85859050811015611e3d57611e30868683818110611dfc57611dfb613bcd565b5b9050602002016020810190611e119190613491565b858584818110611e2457611e23613bcd565b5b905060200201356125de565b8080600101915050611ddb565b505050505050565b600181565b611e526125ed565b63389a75e1600c52805f526020600c208054421115611e7857636f5e88185f526004601cfd5b5f815550611e8581612f47565b50565b5f63f23a6e6160e01b90509695505050505050565b611ea56125ed565b8060601b611eba57637448fbae5f526004601cfd5b611ec381612f47565b50565b5f8273ffffffffffffffffffffffffffffffffffffffff1662fdd58e30846040518363ffffffff1660e01b8152600401611f01929190614738565b602060405180830381865afa158015611f1c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611f409190614391565b905092915050565b5f60065f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8381526020019081526020015f20548373ffffffffffffffffffffffffffffffffffffffff1662fdd58e30856040518363ffffffff1660e01b8152600401611fd0929190614738565b602060405180830381865afa158015611feb573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061200f9190614391565b61201991906149a2565b905092915050565b5f61202b3361248e565b612061576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f83838101906120719190614520565b90506001600281111561208757612086614567565b5b815f0151600281111561209d5761209c614567565b5b14806120cf57505f60028111156120b7576120b6614567565b5b815f015160028111156120cd576120cc614567565b5b145b1561229e575f81606001518060200190518101906120ed91906145cd565b90505f612710600154835f015161210491906149d5565b61210e9190614a43565b90505f61211e8460200151610aab565b90508082845f015161213091906149a2565b11156121895783602001518183855f015161214b91906149a2565b6040517f5c54305e00000000000000000000000000000000000000000000000000000000815260040161218093929190614a73565b60405180910390fd5b8160025f866040015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508160045f866020015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461221f91906149a2565b92505081905550825f015160055f866020015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461227991906149a2565b9250508190555061229684602001518560400151855f0151612ac8565b5050506123f0565b6002808111156122b1576122b0614567565b5b815f015160028111156122c7576122c6614567565b5b036123e6575f81606001518060200190518101906122e591906146f1565b90505f826020015173ffffffffffffffffffffffffffffffffffffffff1662fdd58e30845f01516040518363ffffffff1660e01b8152600401612329929190614738565b602060405180830381865afa158015612344573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906123689190614391565b905080826020015111156123bf5782602001518183602001516040517f5c54305e0000000000000000000000000000000000000000000000000000000081526004016123b693929190614a73565b60405180910390fd5b6123df83602001518460400151845f015185602001518660400151612c8e565b50506123ef565b5f9150506123f6565b5b60019150505b92915050565b60026124078161263e565b61271082111561244c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161244390614af2565b60405180910390fd5b816001819055507f74f254e69f1d1aa50fbf15b184112c15530415ac9f4b4bf2b75778c6befd09788260405161248291906134d4565b60405180910390a15050565b5f8173ffffffffffffffffffffffffffffffffffffffff166124ae611a0b565b73ffffffffffffffffffffffffffffffffffffffff1614806124da57506124d9826002600117611533565b5b9050919050565b5f63389a75e1600c52815f526020600c20549050919050565b5f7fde98bbf0000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061256c575061256b8261300d565b5b9050919050565b5f8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146125d5576125d0308373ffffffffffffffffffffffffffffffffffffffff16612f1490919063ffffffff16565b6125d7565b475b9050919050565b6125e982825f613156565b5050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314612622576382b429005f526004601cfd5b565b61263082826001613156565b5050565b5f6202a300905090565b638b78c6d81954331461267057638b78c6d8600c52335f52806020600c20541661266f576382b429005f526004601cfd5b5b50565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b6126a46131ae565b1561271c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278054156126de57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35061276f565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b5f836080015185815181106127cb576127ca613bcd565b5b602002602001015190505f60025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490505f60035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490505f8185878561286691906149d5565b6128709190614a43565b61287a9190613b9a565b9050808261288891906149a2565b60035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505f8473ffffffffffffffffffffffffffffffffffffffff166338d52e0f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612913573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129379190614b10565b90505f8860e0015190508260045f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461298d9190613b9a565b925050819055505f83036129cd576040517fb2e783cd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8483856129da91906149a2565b03612a605760025f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f905560035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f90555b8073ffffffffffffffffffffffffffffffffffffffff168a8c7ff44ff640e648077f3acc130c6ce75240070e8c40adc85b0feeeec28d9dd921b486604051612aa891906134d4565b60405180910390a4612abb828285612ac8565b5050505050505050505050565b3068929eee149b4bd212685403612ae65763ab143c065f526004601cfd5b3068929eee149b4bd21268555f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612b66578282826040517fbf182be8000000000000000000000000000000000000000000000000000000008152600401612b5d93929190614b3b565b60405180910390fd5b612b6f83610aab565b811115612bbf5782612b8084610aab565b826040517f5c54305e000000000000000000000000000000000000000000000000000000008152600401612bb693929190614a73565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612c0157612bfc82826131b2565b612c2d565b612c2c82828573ffffffffffffffffffffffffffffffffffffffff166131cf9092919063ffffffff16565b5b8273ffffffffffffffffffffffffffffffffffffffff167fad4a9acf26d8bba7a8cf1a41160d59be042ee554578e256c98d2ab74cdd435428383604051612c75929190614738565b60405180910390a23868929eee149b4bd2126855505050565b3068929eee149b4bd212685403612cac5763ab143c065f526004601cfd5b3068929eee149b4bd21268555f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603612d2c578484836040517fbf182be8000000000000000000000000000000000000000000000000000000008152600401612d2393929190614b3b565b60405180910390fd5b612d368584611ec6565b821115612d875784612d488685611ec6565b836040517f5c54305e000000000000000000000000000000000000000000000000000000008152600401612d7e93929190614a73565b60405180910390fd5b8160065f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8581526020019081526020015f205f828254612de291906149a2565b925050819055508473ffffffffffffffffffffffffffffffffffffffff1663f242432a30868686866040518663ffffffff1660e01b8152600401612e2a9594939291906147b1565b5f604051808303815f87803b158015612e41575f80fd5b505af1158015612e53573d5f803e3d5ffd5b505050508473ffffffffffffffffffffffffffffffffffffffff167fad4a9acf26d8bba7a8cf1a41160d59be042ee554578e256c98d2ab74cdd435428584604051612e9f929190614738565b60405180910390a23868929eee149b4bd21268555050505050565b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af13d1560015f51141716612f0557637939f4245f526004601cfd5b5f606052806040525050505050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b612f4f6131ae565b15612fb4577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b821781555061300a565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f7f5fbfaa4e000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806130d757507f4e2312e0000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061313f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061314f575061314e82613218565b5b9050919050565b638b78c6d8600c52825f526020600c2080548381178361317857848216821890505b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f90565b5f385f3884865af16131cb5763b12d13eb5f526004601cfd5b5050565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af13d1560015f5114171661320f576390b8ec185f526004601cfd5b5f603452505050565b5f7fe49cedd7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061328a575061328982613291565b5b9050919050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061330357506133028261330a565b5b9050919050565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6133b881613384565b81146133c2575f80fd5b50565b5f813590506133d3816133af565b92915050565b5f602082840312156133ee576133ed61337c565b5b5f6133fb848285016133c5565b91505092915050565b5f8115159050919050565b61341881613404565b82525050565b5f6020820190506134315f83018461340f565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61346082613437565b9050919050565b61347081613456565b811461347a575f80fd5b50565b5f8135905061348b81613467565b92915050565b5f602082840312156134a6576134a561337c565b5b5f6134b38482850161347d565b91505092915050565b5f819050919050565b6134ce816134bc565b82525050565b5f6020820190506134e75f8301846134c5565b92915050565b6134f6816134bc565b8114613500575f80fd5b50565b5f81359050613511816134ed565b92915050565b5f6020828403121561352c5761352b61337c565b5b5f61353984828501613503565b91505092915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261356357613562613542565b5b8235905067ffffffffffffffff8111156135805761357f613546565b5b60208301915083600182028301111561359c5761359b61354a565b5b9250929050565b5f805f805f608086880312156135bc576135bb61337c565b5b5f6135c98882890161347d565b955050602086013567ffffffffffffffff8111156135ea576135e9613380565b5b6135f68882890161354e565b9450945050604061360988828901613503565b925050606061361a88828901613503565b9150509295509295909350565b61363081613456565b82525050565b5f6040820190506136495f8301856134c5565b6136566020830184613627565b9392505050565b5f80604083850312156136735761367261337c565b5b5f6136808582860161347d565b925050602061369185828601613503565b9150509250929050565b6136a481613384565b82525050565b5f6020820190506136bd5f83018461369b565b92915050565b5f8083601f8401126136d8576136d7613542565b5b8235905067ffffffffffffffff8111156136f5576136f4613546565b5b6020830191508360208202830111156137115761371061354a565b5b9250929050565b5f8083601f84011261372d5761372c613542565b5b8235905067ffffffffffffffff81111561374a57613749613546565b5b6020830191508360208202830111156137665761376561354a565b5b9250929050565b5f805f80604085870312156137855761378461337c565b5b5f85013567ffffffffffffffff8111156137a2576137a1613380565b5b6137ae878288016136c3565b9450945050602085013567ffffffffffffffff8111156137d1576137d0613380565b5b6137dd87828801613718565b925092505092959194509250565b5f80602083850312156138015761380061337c565b5b5f83013567ffffffffffffffff81111561381e5761381d613380565b5b61382a8582860161354e565b92509250509250929050565b5f806040838503121561384c5761384b61337c565b5b5f61385985828601613503565b925050602061386a85828601613503565b9150509250929050565b5f8083601f84011261388957613888613542565b5b8235905067ffffffffffffffff8111156138a6576138a5613546565b5b6020830191508360208202830111156138c2576138c161354a565b5b9250929050565b5f80602083850312156138df576138de61337c565b5b5f83013567ffffffffffffffff8111156138fc576138fb613380565b5b61390885828601613874565b92509250509250929050565b5f6020820190506139275f830184613627565b92915050565b5f8083601f84011261394257613941613542565b5b8235905067ffffffffffffffff81111561395f5761395e613546565b5b60208301915083602082028301111561397b5761397a61354a565b5b9250929050565b5f805f805f805f8060a0898b03121561399e5761399d61337c565b5b5f6139ab8b828c0161347d565b98505060206139bc8b828c0161347d565b975050604089013567ffffffffffffffff8111156139dd576139dc613380565b5b6139e98b828c0161392d565b9650965050606089013567ffffffffffffffff811115613a0c57613a0b613380565b5b613a188b828c0161392d565b9450945050608089013567ffffffffffffffff811115613a3b57613a3a613380565b5b613a478b828c0161354e565b92509250509295985092959890939650565b5f805f8060408587031215613a7157613a7061337c565b5b5f85013567ffffffffffffffff811115613a8e57613a8d613380565b5b613a9a878288016136c3565b9450945050602085013567ffffffffffffffff811115613abd57613abc613380565b5b613ac98782880161392d565b925092505092959194509250565b5f805f805f8060a08789031215613af157613af061337c565b5b5f613afe89828a0161347d565b9650506020613b0f89828a0161347d565b9550506040613b2089828a01613503565b9450506060613b3189828a01613503565b935050608087013567ffffffffffffffff811115613b5257613b51613380565b5b613b5e89828a0161354e565b92509250509295509295509295565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f613ba4826134bc565b9150613baf836134bc565b9250828203905081811115613bc757613bc6613b6d565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b613c0381613404565b8114613c0d575f80fd5b50565b5f81359050613c1e81613bfa565b92915050565b5f60208284031215613c3957613c3861337c565b5b5f613c4684828501613c10565b91505092915050565b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b613c9982613c53565b810181811067ffffffffffffffff82111715613cb857613cb7613c63565b5b80604052505050565b5f613cca613373565b9050613cd68282613c90565b919050565b5f80fd5b5f67ffffffffffffffff821115613cf957613cf8613c63565b5b602082029050602081019050919050565b5f613d1c613d1784613cdf565b613cc1565b90508083825260208201905060208402830185811115613d3f57613d3e61354a565b5b835b81811015613d685780613d54888261347d565b845260208401935050602081019050613d41565b5050509392505050565b5f82601f830112613d8657613d85613542565b5b8135613d96848260208601613d0a565b91505092915050565b5f67ffffffffffffffff821115613db957613db8613c63565b5b602082029050602081019050919050565b5f613ddc613dd784613d9f565b613cc1565b90508083825260208201905060208402830185811115613dff57613dfe61354a565b5b835b81811015613e285780613e148882613503565b845260208401935050602081019050613e01565b5050509392505050565b5f82601f830112613e4657613e45613542565b5b8135613e56848260208601613dca565b91505092915050565b5f60808284031215613e7457613e73613c4f565b5b613e7e6080613cc1565b90505f613e8d8482850161347d565b5f83015250602082013567ffffffffffffffff811115613eb057613eaf613cdb565b5b613ebc84828501613d72565b602083015250604082013567ffffffffffffffff811115613ee057613edf613cdb565b5b613eec84828501613e32565b6040830152506060613f0084828501613503565b60608301525092915050565b5f60208284031215613f2157613f2061337c565b5b5f82013567ffffffffffffffff811115613f3e57613f3d613380565b5b613f4a84828501613e5f565b91505092915050565b5f82825260208201905092915050565b7f6e6f20636f726520636f6e7472616374207365740000000000000000000000005f82015250565b5f613f97601483613f53565b9150613fa282613f63565b602082019050919050565b5f6020820190508181035f830152613fc481613f8b565b9050919050565b5f613fd582613456565b9050919050565b613fe581613fcb565b8114613fef575f80fd5b50565b5f8151905061400081613fdc565b92915050565b5f61401082613456565b9050919050565b61402081614006565b811461402a575f80fd5b50565b5f8151905061403b81614017565b92915050565b5f61404b82613456565b9050919050565b61405b81614041565b8114614065575f80fd5b50565b5f8151905061407681614052565b92915050565b5f61408682613437565b9050919050565b5f6140978261407c565b9050919050565b6140a78161408d565b81146140b1575f80fd5b50565b5f815190506140c28161409e565b92915050565b5f67ffffffffffffffff8211156140e2576140e1613c63565b5b602082029050602081019050919050565b5f6140fd82613456565b9050919050565b61410d816140f3565b8114614117575f80fd5b50565b5f8151905061412881614104565b92915050565b5f61414061413b846140c8565b613cc1565b905080838252602082019050602084028301858111156141635761416261354a565b5b835b8181101561418c5780614178888261411a565b845260208401935050602081019050614165565b5050509392505050565b5f82601f8301126141aa576141a9613542565b5b81516141ba84826020860161412e565b91505092915050565b5f67ffffffffffffffff82169050919050565b6141df816141c3565b81146141e9575f80fd5b50565b5f815190506141fa816141d6565b92915050565b5f8151905061420e816134ed565b92915050565b5f8151905061422281613467565b92915050565b5f610100828403121561423e5761423d613c4f565b5b614249610100613cc1565b90505f61425884828501613ff2565b5f83015250602061426b8482850161402d565b602083015250604061427f84828501614068565b6040830152506060614293848285016140b4565b606083015250608082015167ffffffffffffffff8111156142b7576142b6613cdb565b5b6142c384828501614196565b60808301525060a06142d7848285016141ec565b60a08301525060c06142eb84828501614200565b60c08301525060e06142ff84828501614214565b60e08301525092915050565b5f602082840312156143205761431f61337c565b5b5f82015167ffffffffffffffff81111561433d5761433c613380565b5b61434984828501614228565b91505092915050565b5f8151905061436081613bfa565b92915050565b5f6020828403121561437b5761437a61337c565b5b5f61438884828501614352565b91505092915050565b5f602082840312156143a6576143a561337c565b5b5f6143b384828501614200565b91505092915050565b600381106143c8575f80fd5b50565b5f813590506143d9816143bc565b92915050565b5f80fd5b5f67ffffffffffffffff8211156143fd576143fc613c63565b5b61440682613c53565b9050602081019050919050565b828183375f83830152505050565b5f61443361442e846143e3565b613cc1565b90508281526020810184848401111561444f5761444e6143df565b5b61445a848285614413565b509392505050565b5f82601f83011261447657614475613542565b5b8135614486848260208601614421565b91505092915050565b5f608082840312156144a4576144a3613c4f565b5b6144ae6080613cc1565b90505f6144bd848285016143cb565b5f8301525060206144d08482850161347d565b60208301525060406144e48482850161347d565b604083015250606082013567ffffffffffffffff81111561450857614507613cdb565b5b61451484828501614462565b60608301525092915050565b5f602082840312156145355761453461337c565b5b5f82013567ffffffffffffffff81111561455257614551613380565b5b61455e8482850161448f565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b5f602082840312156145a9576145a8613c4f565b5b6145b36020613cc1565b90505f6145c284828501614200565b5f8301525092915050565b5f602082840312156145e2576145e161337c565b5b5f6145ef84828501614594565b91505092915050565b8281835e5f83830152505050565b5f614618614613846143e3565b613cc1565b905082815260208101848484011115614634576146336143df565b5b61463f8482856145f8565b509392505050565b5f82601f83011261465b5761465a613542565b5b815161466b848260208601614606565b91505092915050565b5f6060828403121561468957614688613c4f565b5b6146936060613cc1565b90505f6146a284828501614200565b5f8301525060206146b584828501614200565b602083015250604082015167ffffffffffffffff8111156146d9576146d8613cdb565b5b6146e584828501614647565b60408301525092915050565b5f602082840312156147065761470561337c565b5b5f82015167ffffffffffffffff81111561472357614722613380565b5b61472f84828501614674565b91505092915050565b5f60408201905061474b5f830185613627565b61475860208301846134c5565b9392505050565b5f81519050919050565b5f82825260208201905092915050565b5f6147838261475f565b61478d8185614769565b935061479d8185602086016145f8565b6147a681613c53565b840191505092915050565b5f60a0820190506147c45f830188613627565b6147d16020830187613627565b6147de60408301866134c5565b6147eb60608301856134c5565b81810360808301526147fd8184614779565b90509695505050505050565b5f80fd5b5f80fd5b5f80fd5b5f808335600160200384360303811261483157614830614809565b5b80840192508235915067ffffffffffffffff8211156148535761485261480d565b5b60208301925060018202360383131561486f5761486e614811565b5b509250929050565b61488081613456565b82525050565b5f82825260208201905092915050565b5f6148a08261475f565b6148aa8185614886565b93506148ba8185602086016145f8565b6148c381613c53565b840191505092915050565b5f604083015f8301516148e35f860182614877565b50602083015184820360208601526148fb8282614896565b9150508091505092915050565b5f6020820190508181035f83015261492081846148ce565b905092915050565b5f6060820190508181035f8301526149408186614779565b905061494f60208301856134c5565b61495c60408301846134c5565b949350505050565b5f806040838503121561497a5761497961337c565b5b5f61498785828601614200565b925050602061499885828601614214565b9150509250929050565b5f6149ac826134bc565b91506149b7836134bc565b92508282019050808211156149cf576149ce613b6d565b5b92915050565b5f6149df826134bc565b91506149ea836134bc565b92508282026149f8816134bc565b91508282048414831517614a0f57614a0e613b6d565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f614a4d826134bc565b9150614a58836134bc565b925082614a6857614a67614a16565b5b828204905092915050565b5f606082019050614a865f830186613627565b614a9360208301856134c5565b614aa060408301846134c5565b949350505050565b7f4665652063616e6e6f74206578636565642031303025000000000000000000005f82015250565b5f614adc601683613f53565b9150614ae782614aa8565b602082019050919050565b5f6020820190508181035f830152614b0981614ad0565b9050919050565b5f60208284031215614b2557614b2461337c565b5b5f614b3284828501614214565b91505092915050565b5f606082019050614b4e5f830186613627565b614b5b6020830185613627565b614b6860408301846134c5565b94935050505056fea264697066735822122010039560c98564ce71066efbd572ac9a2f813f6807e924ef36bff6c0e41844c064736f6c634300081a0033",o=class o extends p.DeployableTargetWithRBAC{constructor(){super(...arguments),this.abi=d.o}async allocate(f,b){return await this.awaitResult(this.allocateRaw(f,b))}async allocateRaw(f,b){const{request:a,result:e}=await d.mE(this._config,{address:this.assertValidAddress(),args:[r.prepareTransfer(f)],...this.optionallyAttachAccount(),...b});return{hash:await d.QC(this._config,a),result:e}}async clawback(f,b){return await this.awaitResult(this.clawbackRaw(f,b))}async clawbackRaw(f,b){const{request:a,result:e}=await d.fE(this._config,{address:this.assertValidAddress(),args:[r.prepareTransfer(f)],...this.optionallyAttachAccount(),...b});return{hash:await d.KC(this._config,a),result:e}}async clawbackFromTarget(f,b,a,e,c){return await this.awaitResult(this.clawbackFromTargetRaw(f,b,a,e,c))}async clawbackFromTargetRaw(f,b,a,e,c){const{request:s,result:y}=await d.vE(this._config,{address:this.assertValidAddress(),args:[f,b,BigInt(a),BigInt(e)],...this.optionallyAttachAccount(),...c});return{hash:await d.XC(this._config,s),result:y}}async disburse(f,b){return await this.awaitResult(this.disburseRaw(f,b))}async disburseRaw(f,b){const{request:a,result:e}=await d.TE(this._config,{address:this.assertValidAddress(),args:[r.prepareTransfer(f)],...this.optionallyAttachAccount(),...b});return{hash:await d.eE(this._config,a),result:e}}async disburseBatch(f,b){return await this.awaitResult(this.disburseBatchRaw(f,b))}async disburseBatchRaw(f,b){const{request:a,result:e}=await d.AE(this._config,{address:this.assertValidAddress(),args:[f.map(r.prepareTransfer)],...this.optionallyAttachAccount(),...b});return{hash:await d.tE(this._config,a),result:e}}async payManagementFee(f,b,a){return await this.awaitResult(this.payManagementFeeRaw(f,b,a))}async payManagementFeeRaw(f,b,a){const{request:e,result:c}=await d.Lz(this._config,{address:this.assertValidAddress(),args:[f,b],...this.optionallyAttachAccount(),...a});return{hash:await d.vz(this._config,e),result:c}}async setManagementFee(f,b){return await this.awaitResult(this.setManagementFeeRaw(f,b))}async setManagementFeeRaw(f,b){const{request:a,result:e}=await d.jz(this._config,{address:this.assertValidAddress(),args:[f],...this.optionallyAttachAccount(),...b});return{hash:await d.Mz(this._config,a),result:e}}async managementFee(f){return await d.JE(this._config,{address:this.assertValidAddress(),args:[],...f})}owner(f){return d.GC(this._config,{address:this.assertValidAddress(),args:[],...f})}total(f=t.zeroAddress,b,a){return d.jC(this._config,{address:this.assertValidAddress(),args:b?[f,b]:[f],...a})}available(f=t.zeroAddress,b,a){return d.SC(this._config,{address:this.assertValidAddress(),args:b?[f,b]:[f],...a})}distributed(f=t.zeroAddress,b,a){return d.FC(this._config,{address:this.assertValidAddress(),args:b?[f,b]:[f],...a})}buildParameters(f,b){var c;const[a,e]=this.validateDeploymentConfig(f,b);if(!a.owner||a.owner===t.zeroAddress){const s=e.account?e.account.address:e.config?l.getAccount(e.config).address:(c=this._account)==null?void 0:c.address;if(s)a.owner=s;else throw new g.DeployableUnknownOwnerProvidedError}return{abi:d.o,bytecode:R,args:[w(a)],...this.optionallyAttachAccount(e.account)}}};o.bases={31337:void 0,...A.ManagedBudgetWithFees},o.registryType=m.RegistryType.BUDGET;let i=o;const w=({owner:n,authorized:f,roles:b,managementFee:a})=>t.encodeAbiParameters(t.parseAbiParameters(["ManagedBudgetWithFeesPayload payload","struct ManagedBudgetWithFeesPayload { address owner; address[] authorized; uint256[] roles; uint256 managementFee; }"]),[{owner:n,authorized:f,roles:b,managementFee:a}]),h={[u.AManagedBudget]:r.ManagedBudget,[u.AManagedBudgetWithFees]:i};async function B(n,f,b){const a=await l.readContract(n.config,{abi:d.T,functionName:"getComponentInterface",address:f,...b}),e=h[a];if(!e)throw new g.InvalidComponentInterfaceError(Object.keys(h),a);return new e(n,f)}exports.BudgetByComponentInterface=h;exports.ManagedBudgetWithFees=i;exports.budgetFromAddress=B;exports.prepareManagedBudgetWithFeesPayload=w;
|
|
2
|
-
//# sourceMappingURL=Budget-AoNx7uFd.cjs.map
|