diff --git a/packages/bundler/contracts/Import.sol b/packages/bundler/contracts/Import.sol index 689cf37..ad91787 100644 --- a/packages/bundler/contracts/Import.sol +++ b/packages/bundler/contracts/Import.sol @@ -3,5 +3,4 @@ pragma solidity ^0.8.0; // import contracts to get their type info. import "@account-abstraction/utils/contracts/test/SampleRecipient.sol"; -import "@account-abstraction/utils/contracts/test/SingletonFactory.sol"; import "@account-abstraction/contracts/samples/SimpleAccountFactory.sol"; diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 349de99..98bdda2 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -5,6 +5,7 @@ "license": "MIT", "files": [ "dist/src", + "src", "README.md" ], "scripts": { diff --git a/packages/sdk/src/BaseAccountAPI.ts b/packages/sdk/src/BaseAccountAPI.ts index ef68a86..d5026b2 100644 --- a/packages/sdk/src/BaseAccountAPI.ts +++ b/packages/sdk/src/BaseAccountAPI.ts @@ -126,6 +126,9 @@ export abstract class BaseAccountAPI { try { await this.entryPointView.callStatic.getSenderAddress(initCode) } catch (e: any) { + if (e.errorArgs == null) { + throw e + } return e.errorArgs.sender } throw new Error('must handle revert') diff --git a/packages/utils/contracts/test/SingletonFactory.sol b/packages/utils/contracts/test/SingletonFactory.sol deleted file mode 100644 index 9a2fab5..0000000 --- a/packages/utils/contracts/test/SingletonFactory.sol +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-License-Identifier: CC0-1.0 -pragma solidity ^0.8.15; - -/** - * @title Singleton Factory (EIP-2470) - * @notice Exposes CREATE2 (EIP-1014) to deploy bytecode on deterministic addresses based on initialization code and salt. - * @author Ricardo Guilherme Schmidt (Status Research & Development GmbH) - */ -contract SingletonFactory { - /** - * @notice Deploys `_initCode` using `_salt` for defining the deterministic address. - * @param _initCode Initialization code. - * @param _salt Arbitrary value to modify resulting address. - * @return createdContract Created contract address. - */ - function deploy(bytes memory _initCode, bytes32 _salt) - public - returns (address payable createdContract) - { - assembly { - createdContract := create2(0, add(_initCode, 0x20), mload(_initCode), _salt) - } - } -} -// IV is a value changed to generate the vanity address. -// IV: 6583047 diff --git a/packages/utils/package.json b/packages/utils/package.json index 21dfd92..4536ecb 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -4,8 +4,8 @@ "main": "./dist/src/index.js", "license": "MIT", "files": [ - "dist/*", - "contracts/*", + "dist", + "src", "README.md" ], "scripts": {