@owlprotocol/contracts-account-abstraction
Version:
ERC4337 Account Abstraction support for deploying relevant smart contracts and interacting with UserOps.
32 lines (31 loc) • 1.81 kB
JavaScript
var import_codegen = require("@owlprotocol/viem-utils/codegen");
var import_account_abstraction = require("viem/account-abstraction");
var import_constants = require("../constants.js");
(0, import_codegen.hardhatArtifactsExport)(
"./src/artifacts",
"./cache",
[
//EntryPoint Simulation Contracts
//TODO: hardhatArtifactsExport caching doesn't work anymore 'EntryPoint', 'IEntryPoint' getting recompiled
"artifacts/contracts/**/*.json",
//Optimized re-builds with 1000000 runs + viaIR + yul optimizer
//We specify contracts explicitly (to exclude any other contracts that might get re-compiled)
"artifacts/@account-abstraction/contracts/samples/SimpleAccount.sol/SimpleAccount.json",
"artifacts/@account-abstraction/contracts/samples/SimpleAccountFactory.sol/SimpleAccountFactory.json",
"artifacts/@account-abstraction/contracts/samples/VerifyingPaymaster.sol/VerifyingPaymaster.json",
"artifacts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol/ERC1967Proxy.json",
//Cached official builds so we can get official entrypoint address
"node_modules/@account-abstraction/contracts/artifacts/EntryPoint.json",
"node_modules/@account-abstraction/contracts/artifacts/IEntryPoint.json",
"node_modules/@account-abstraction/contracts/artifacts/EntryPointSimulation.json",
"node_modules/@account-abstraction/contracts/artifacts/IEntryPointSimulation.json"
],
(0, import_codegen.getArtifactImplementationFactory)({
//Deployed using vanity salt
Entrypoint: import_account_abstraction.entryPoint07Address,
//Deployed using EntryPoint address
SimpleAccountFactory: import_constants.SIMPLE_ACCOUNT_FACTORY_ADDRESS,
//Deployed using SimpleAccountFactory + 0
SimpleAccount: import_constants.SIMPLE_ACCOUNT_IMPLEMENTATION_ADDRESS
})
);