Skip to content

Commit

Permalink
feat: msca plugingen to generate subfolders for each plugin (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
denniswon authored and moldy530 committed Jan 8, 2024
1 parent b254d8a commit 760a47c
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions packages/accounts/scripts/plugingen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ export function plugingen({

const imports = dedent`
import { type Address, type GetFunctionArgs, encodeFunctionData } from "viem";
import type { Plugin } from "./types";
import type { IMSCA } from "../builder";
import type { Plugin } from "../types";
import type { IMSCA } from "../../builder";
import type { ISmartAccountProvider, SupportedTransports, UserOperationOverrides } from "@alchemy/aa-core";
`;

Expand Down
6 changes: 3 additions & 3 deletions packages/accounts/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ export { type Plugin } from "./msca/plugins/types.js";
export {
MultiOwnerPlugin,
MultiOwnerPluginExecutionFunctionAbi,
} from "./msca/plugins/multi-owner.js";
} from "./msca/plugins/multi-owner/plugin.js";
export {
SessionKeyPlugin,
SessionKeyPluginExecutionFunctionAbi,
} from "./msca/plugins/session-key.js";
} from "./msca/plugins/session-key/plugin.js";
export {
TokenReceiverPlugin,
TokenReceiverPluginExecutionFunctionAbi,
} from "./msca/plugins/token-receiver.js";
} from "./msca/plugins/token-receiver/plugin.js";
4 changes: 2 additions & 2 deletions packages/accounts/src/msca/multi-owner-account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import { MultiOwnerMSCAFactoryAbi } from "./abis/MultiOwnerMSCAFactory.js";
import { MultiOwnerTokenReceiverMSCAFactoryAbi } from "./abis/MultiOwnerTokenReceiverMSCAFactory.js";
import { accountLoupeDecorators } from "./account-loupe/decorator.js";
import { MSCABuilder, StandardExecutor } from "./builder.js";
import { MultiOwnerPlugin } from "./plugins/multi-owner.js";
import { TokenReceiverPlugin } from "./plugins/token-receiver.js";
import { MultiOwnerPlugin } from "./plugins/multi-owner/plugin.js";
import { TokenReceiverPlugin } from "./plugins/token-receiver/plugin.js";

export const createMultiOwnerMSCASchema = <
TTransport extends SupportedTransports = Transport
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type Address, type GetFunctionArgs, encodeFunctionData } from "viem";
import type { Plugin } from "./types";
import type { IMSCA } from "../builder";
import type { Plugin } from "../types";
import type { IMSCA } from "../../builder";
import type {
ISmartAccountProvider,
SupportedTransports,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type Address, type GetFunctionArgs, encodeFunctionData } from "viem";
import type { Plugin } from "./types";
import type { IMSCA } from "../builder";
import type { Plugin } from "../types";
import type { IMSCA } from "../../builder";
import type {
ISmartAccountProvider,
SupportedTransports,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type Address, type GetFunctionArgs, encodeFunctionData } from "viem";
import type { Plugin } from "./types";
import type { IMSCA } from "../builder";
import type { Plugin } from "../types";
import type { IMSCA } from "../../builder";
import type {
ISmartAccountProvider,
SupportedTransports,
Expand Down
2 changes: 1 addition & 1 deletion packages/accounts/wagmi.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default defineConfig(
pluginConfigs.map((config) => ({
out: `./src/msca/plugins/${kebabCase(
config.name.replaceAll(pluginRegEx, "")
)}.ts`,
)}/plugin.ts`,
contracts: [
{
name: config.name,
Expand Down

0 comments on commit 760a47c

Please sign in to comment.