-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
28 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
//SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
interface ICreate2Factory { | ||
/// @notice create2 deploy a contract | ||
/// @dev So long the same salt, creationCode is used, the contract will be deployed at the same address on other chain | ||
function deploy(bytes32 salt, bytes memory creationCode) external payable returns (address deployed); | ||
|
||
/// @notice compute the create2 address based on salt, bytecodeHash | ||
function computeAddress(bytes32 salt, bytes32 bytecodeHash) external view returns (address); | ||
|
||
/// @notice execute a call on a deployed contract | ||
/// @dev used in scenario where contract owner is create2Factory and we need to transfer ownership | ||
function execute(address target, bytes calldata data) external payable; | ||
|
||
/// @notice set user as whitelisted | ||
function setWhitelistUser(address user, bool isWhiteList) external; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters