-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add computeCreateAddress helper function in Script (#109)
- Loading branch information
1 parent
6f3b43c
commit 914702a
Showing
2 changed files
with
37 additions
and
0 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,12 @@ | ||
// SPDX-License-Identifier: Unlicense | ||
pragma solidity >=0.7.0 <0.9.0; | ||
|
||
import "../Test.sol"; | ||
|
||
contract ScriptTest is Test | ||
{ | ||
function testGenerateCorrectAddress() external { | ||
address creation = computeCreateAddress(0x6C9FC64A53c1b71FB3f9Af64d1ae3A4931A5f4E9, 14); | ||
assertEq(creation, 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45); | ||
} | ||
} |