mirror of
https://github.com/getwax/bundler.git
synced 2026-01-09 15:47:56 -05:00
pkg cleanpup
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"dist/src",
|
||||
"src",
|
||||
"README.md"
|
||||
],
|
||||
"scripts": {
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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
|
||||
@@ -4,8 +4,8 @@
|
||||
"main": "./dist/src/index.js",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"dist/*",
|
||||
"contracts/*",
|
||||
"dist",
|
||||
"src",
|
||||
"README.md"
|
||||
],
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user