pkg cleanpup

This commit is contained in:
Dror Tirosh
2023-05-08 10:52:33 +03:00
parent 3d849b35c4
commit e055a4fa82
5 changed files with 6 additions and 29 deletions

View File

@@ -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";

View File

@@ -5,6 +5,7 @@
"license": "MIT",
"files": [
"dist/src",
"src",
"README.md"
],
"scripts": {

View File

@@ -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')

View File

@@ -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

View File

@@ -4,8 +4,8 @@
"main": "./dist/src/index.js",
"license": "MIT",
"files": [
"dist/*",
"contracts/*",
"dist",
"src",
"README.md"
],
"scripts": {