Skip to content

Commit

Permalink
chore: rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
avasisht23 committed Dec 1, 2023
1 parent 4873496 commit 67f7418
Showing 1 changed file with 62 additions and 62 deletions.
124 changes: 62 additions & 62 deletions packages/accounts/src/msca/plugins/multi-owner.ts
Original file line number Diff line number Diff line change
@@ -1,170 +1,170 @@
import { type GetFunctionArgs, encodeFunctionData } from 'viem'
import type { Plugin } from './types'
import type { BaseSmartContractAccount } from '@alchemy/aa-core'
import { type GetFunctionArgs, encodeFunctionData } from "viem";
import type { Plugin } from "./types";
import type { BaseSmartContractAccount } from "@alchemy/aa-core";

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ERC6900PluginGen: This file is auto-generated by plugingen
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

const MultiOwnerPlugin_ = {
meta: {
name: 'Multi Owner Plugin',
version: '1.0.0',
name: "Multi Owner Plugin",
version: "1.0.0",
},
accountDecorators: (account: BaseSmartContractAccount) => ({
encodeUpdateOwnersData: ({
args,
}: GetFunctionArgs<
typeof MultiOwnerPluginExecutionFunctionAbi,
'updateOwners'
"updateOwners"
>) => {
return encodeFunctionData({
abi: MultiOwnerPluginExecutionFunctionAbi,
functionName: 'updateOwners',
functionName: "updateOwners",
args,
})
});
},

encodeOwnersData: () => {
return encodeFunctionData({
abi: MultiOwnerPluginExecutionFunctionAbi,
functionName: 'owners',
})
functionName: "owners",
});
},

readOwners: async () => {
return account.rpcProvider.readContract({
address: await account.getAddress(),
abi: MultiOwnerPluginExecutionFunctionAbi,
functionName: 'owners',
})
functionName: "owners",
});
},

encodeIsOwnerData: ({
args,
}: GetFunctionArgs<
typeof MultiOwnerPluginExecutionFunctionAbi,
'isOwner'
"isOwner"
>) => {
return encodeFunctionData({
abi: MultiOwnerPluginExecutionFunctionAbi,
functionName: 'isOwner',
functionName: "isOwner",
args,
})
});
},

readIsOwner: async ({
args,
}: GetFunctionArgs<
typeof MultiOwnerPluginExecutionFunctionAbi,
'isOwner'
"isOwner"
>) => {
return account.rpcProvider.readContract({
address: await account.getAddress(),
abi: MultiOwnerPluginExecutionFunctionAbi,
functionName: 'isOwner',
functionName: "isOwner",
args,
})
});
},

encodeEip712DomainData: () => {
return encodeFunctionData({
abi: MultiOwnerPluginExecutionFunctionAbi,
functionName: 'eip712Domain',
})
functionName: "eip712Domain",
});
},

readEip712Domain: async () => {
return account.rpcProvider.readContract({
address: await account.getAddress(),
abi: MultiOwnerPluginExecutionFunctionAbi,
functionName: 'eip712Domain',
})
functionName: "eip712Domain",
});
},

encodeIsValidSignatureData: ({
args,
}: GetFunctionArgs<
typeof MultiOwnerPluginExecutionFunctionAbi,
'isValidSignature'
"isValidSignature"
>) => {
return encodeFunctionData({
abi: MultiOwnerPluginExecutionFunctionAbi,
functionName: 'isValidSignature',
functionName: "isValidSignature",
args,
})
});
},

readIsValidSignature: async ({
args,
}: GetFunctionArgs<
typeof MultiOwnerPluginExecutionFunctionAbi,
'isValidSignature'
"isValidSignature"
>) => {
return account.rpcProvider.readContract({
address: await account.getAddress(),
abi: MultiOwnerPluginExecutionFunctionAbi,
functionName: 'isValidSignature',
functionName: "isValidSignature",
args,
})
});
},
}),
}
};

export const MultiOwnerPlugin: Plugin<
ReturnType<(typeof MultiOwnerPlugin_)['accountDecorators']>
> = MultiOwnerPlugin_
ReturnType<(typeof MultiOwnerPlugin_)["accountDecorators"]>
> = MultiOwnerPlugin_;

export const MultiOwnerPluginExecutionFunctionAbi = [
{
stateMutability: 'nonpayable',
type: 'function',
stateMutability: "nonpayable",
type: "function",
inputs: [
{ name: 'ownersToAdd', internalType: 'address[]', type: 'address[]' },
{ name: 'ownersToRemove', internalType: 'address[]', type: 'address[]' },
{ name: "ownersToAdd", internalType: "address[]", type: "address[]" },
{ name: "ownersToRemove", internalType: "address[]", type: "address[]" },
],
name: 'updateOwners',
name: "updateOwners",
outputs: [],
},
{
stateMutability: 'view',
type: 'function',
stateMutability: "view",
type: "function",
inputs: [],
name: 'owners',
outputs: [{ name: '', internalType: 'address[]', type: 'address[]' }],
name: "owners",
outputs: [{ name: "", internalType: "address[]", type: "address[]" }],
},
{
stateMutability: 'view',
type: 'function',
stateMutability: "view",
type: "function",
inputs: [
{ name: 'ownerToCheck', internalType: 'address', type: 'address' },
{ name: "ownerToCheck", internalType: "address", type: "address" },
],
name: 'isOwner',
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
name: "isOwner",
outputs: [{ name: "", internalType: "bool", type: "bool" }],
},
{
stateMutability: 'view',
type: 'function',
stateMutability: "view",
type: "function",
inputs: [],
name: 'eip712Domain',
name: "eip712Domain",
outputs: [
{ name: 'fields', internalType: 'bytes1', type: 'bytes1' },
{ name: 'name', internalType: 'string', type: 'string' },
{ name: 'version', internalType: 'string', type: 'string' },
{ name: 'chainId', internalType: 'uint256', type: 'uint256' },
{ name: 'verifyingContract', internalType: 'address', type: 'address' },
{ name: 'salt', internalType: 'bytes32', type: 'bytes32' },
{ name: 'extensions', internalType: 'uint256[]', type: 'uint256[]' },
{ name: "fields", internalType: "bytes1", type: "bytes1" },
{ name: "name", internalType: "string", type: "string" },
{ name: "version", internalType: "string", type: "string" },
{ name: "chainId", internalType: "uint256", type: "uint256" },
{ name: "verifyingContract", internalType: "address", type: "address" },
{ name: "salt", internalType: "bytes32", type: "bytes32" },
{ name: "extensions", internalType: "uint256[]", type: "uint256[]" },
],
},
{
stateMutability: 'view',
type: 'function',
stateMutability: "view",
type: "function",
inputs: [
{ name: 'digest', internalType: 'bytes32', type: 'bytes32' },
{ name: 'signature', internalType: 'bytes', type: 'bytes' },
{ name: "digest", internalType: "bytes32", type: "bytes32" },
{ name: "signature", internalType: "bytes", type: "bytes" },
],
name: 'isValidSignature',
outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
name: "isValidSignature",
outputs: [{ name: "", internalType: "bytes4", type: "bytes4" }],
},
] as const
] as const;

0 comments on commit 67f7418

Please sign in to comment.