From eca42d93aa19ad18688395490814acb8d37ecb05 Mon Sep 17 00:00:00 2001 From: Sam McCord Date: Wed, 11 Sep 2024 15:08:18 -0600 Subject: [PATCH] chore(sdk): remove omitted interfaces from root export, docs --- .nvmrc | 1 + packages/cli/src/commands/deploy.ts | 35 +++++++++++++---------------- packages/sdk/src/index.test.ts | 11 ++++----- packages/sdk/src/index.ts | 11 ++++----- packages/sdk/test/helpers.ts | 12 +++++----- 5 files changed, 34 insertions(+), 36 deletions(-) create mode 100644 .nvmrc diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..56e0edfc --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +>=22 diff --git a/packages/cli/src/commands/deploy.ts b/packages/cli/src/commands/deploy.ts index 15abae49..efca05ec 100644 --- a/packages/cli/src/commands/deploy.ts +++ b/packages/cli/src/commands/deploy.ts @@ -18,20 +18,15 @@ import { BoostCore, BoostRegistry, CGDAIncentive, - ContractAction, type DeployableOptions, ERC20Incentive, ERC20VariableIncentive, - ERC721MintAction, - ERC1155Incentive, EventAction, ManagedBudget, PointsIncentive, SignerValidator, SimpleAllowList, - SimpleBudget, SimpleDenyList, - VestingBudget, getDeployedContractAddress, } from '@boostxyz/sdk'; import { createConfig, deployContract } from '@wagmi/core'; @@ -228,12 +223,12 @@ export const deploy: Command = async function deploy(opts) { ); const bases = { - ContractAction: class TContractAction extends ContractAction { - public static override base = contractActionBase; - }, - ERC721MintAction: class TERC721MintAction extends ERC721MintAction { - public static override base = erc721MintActionBase; - }, + // ContractAction: class TContractAction extends ContractAction { + // public static override base = contractActionBase; + // }, + // ERC721MintAction: class TERC721MintAction extends ERC721MintAction { + // public static override base = erc721MintActionBase; + // }, EventAction: class TEventAction extends EventAction { public static override base = eventActionBase; }, @@ -243,15 +238,15 @@ export const deploy: Command = async function deploy(opts) { SimpleDenyList: class TSimpleDenyList extends SimpleDenyList { public static override base = simpleDenyListBase; }, - SimpleBudget: class TSimpleBudget extends SimpleBudget { - public static override base = simpleBudgetBase; - }, + // SimpleBudget: class TSimpleBudget extends SimpleBudget { + // public static override base = simpleBudgetBase; + // }, ManagedBudget: class TSimpleBudget extends ManagedBudget { public static override base = managedBudgetBase; }, - VestingBudget: class TVestingBudget extends VestingBudget { - public static override base = vestingBudgetBase; - }, + // VestingBudget: class TVestingBudget extends VestingBudget { + // public static override base = vestingBudgetBase; + // }, AllowListIncentive: class TAllowListIncentive extends AllowListIncentive { public static override base = allowListIncentiveBase; }, @@ -264,9 +259,9 @@ export const deploy: Command = async function deploy(opts) { ERC20VariableIncentive: class TERC20VariableIncentive extends ERC20VariableIncentive { public static override base = erc20VariableIncentiveBase; }, - ERC1155Incentive: class TERC1155Incentive extends ERC1155Incentive { - public static override base = erc1155IncentiveBase; - }, + // ERC1155Incentive: class TERC1155Incentive extends ERC1155Incentive { + // public static override base = erc1155IncentiveBase; + // }, PointsIncentive: class TPointsIncentive extends PointsIncentive { public static override base = pointsIncentiveBase; }, diff --git a/packages/sdk/src/index.test.ts b/packages/sdk/src/index.test.ts index a856c825..338a604f 100644 --- a/packages/sdk/src/index.test.ts +++ b/packages/sdk/src/index.test.ts @@ -9,16 +9,17 @@ describe('sdk exports', () => { // interfaces expect(SDK.PassthroughAuth).toBeDefined(); - expect(SDK.ContractAction).toBeDefined(); - expect(SDK.ERC721MintAction).toBeDefined(); + // expect(SDK.ContractAction).toBeDefined(); + // expect(SDK.ERC721MintAction).toBeDefined(); expect(SDK.SimpleAllowList).toBeDefined(); expect(SDK.SimpleDenyList).toBeDefined(); - expect(SDK.SimpleBudget).toBeDefined(); - expect(SDK.VestingBudget).toBeDefined(); + expect(SDK.ManagedBudget).toBeDefined(); + // expect(SDK.SimpleBudget).toBeDefined(); + // expect(SDK.VestingBudget).toBeDefined(); expect(SDK.AllowListIncentive).toBeDefined(); expect(SDK.CGDAIncentive).toBeDefined(); expect(SDK.ERC20Incentive).toBeDefined(); - expect(SDK.ERC1155Incentive).toBeDefined(); + // expect(SDK.ERC1155Incentive).toBeDefined(); expect(SDK.PointsIncentive).toBeDefined(); expect(SDK.SignerValidator).toBeDefined(); diff --git a/packages/sdk/src/index.ts b/packages/sdk/src/index.ts index 543568ec..0af842ba 100644 --- a/packages/sdk/src/index.ts +++ b/packages/sdk/src/index.ts @@ -12,8 +12,8 @@ export * from './Auth/PassthroughAuth'; // Actions export * from './Actions/Action'; -export * from './Actions/ContractAction'; -export * from './Actions/ERC721MintAction'; +// export * from './Actions/ContractAction'; +// export * from './Actions/ERC721MintAction'; export * from './Actions/EventAction'; // AllowLists @@ -25,8 +25,9 @@ export * from './AllowLists/SimpleDenyList'; // Budgets export * from './Budgets/Budget'; -export * from './Budgets/SimpleBudget'; -export * from './Budgets/VestingBudget'; +// export * from './Budgets/SimpleBudget'; +// export * from './Budgets/VestingBudget'; +export * from './Budgets/ManagedBudget'; // Deployable @@ -39,7 +40,7 @@ export * from './Deployable/DeployableTarget'; export * from './Incentives/AllowListIncentive'; export * from './Incentives/CGDAIncentive'; export * from './Incentives/ERC20Incentive'; -export * from './Incentives/ERC1155Incentive'; +// export * from './Incentives/ERC1155Incentive'; export * from './Incentives/Incentive'; export * from './Incentives/PointsIncentive'; diff --git a/packages/sdk/test/helpers.ts b/packages/sdk/test/helpers.ts index 92fb0a8d..4bf91fb9 100644 --- a/packages/sdk/test/helpers.ts +++ b/packages/sdk/test/helpers.ts @@ -29,22 +29,21 @@ import { BoostCore, type Budget, CGDAIncentive, - ContractAction, type CreateBoostPayload, ERC20Incentive, ERC20VariableIncentive, - ERC721MintAction, EventAction, ManagedBudget, PointsIncentive, SignerValidator, SimpleAllowList, - SimpleBudget, SimpleDenyList, - VestingBudget, } from '../src'; +import { ContractAction } from '../src/Actions/ContractAction'; +import { ERC721MintAction } from '../src/Actions/ERC721MintAction'; import { BoostRegistry } from '../src/BoostRegistry'; import { ManagedBudgetRoles } from '../src/Budgets/ManagedBudget'; +import { VestingBudget } from '../src/Budgets/VestingBudget'; import { ERC1155Incentive } from '../src/Incentives/ERC1155Incentive'; import { type ActionStep, @@ -54,6 +53,7 @@ import { SignatureType, getDeployedContractAddress, } from '../src/utils'; +import { SimpleBudget } from './../src/Budgets/SimpleBudget'; import type { DeployableOptions } from './../src/Deployable/Deployable'; import { MockERC20 } from './MockERC20'; import { MockERC721 } from './MockERC721'; @@ -186,8 +186,8 @@ export async function deployFixtures( const managedBudgetBase = await getDeployedContractAddress( config, deployContract(config, { - abi: SimpleBudgetArtifact.abi, - bytecode: SimpleBudgetArtifact.bytecode as Hex, + abi: ManagedBudgetArtifact.abi, + bytecode: ManagedBudgetArtifact.bytecode as Hex, account, }), );