-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
56eb32c
commit 8d7e7bc
Showing
2 changed files
with
35 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.20; | ||
|
||
import { Script, console } from "forge-std/Script.sol"; | ||
|
||
import { Names } from "../../src/names/Names.sol"; | ||
|
||
contract DeployNames is Script { | ||
function setUp() external {} | ||
|
||
function run() external { | ||
uint256 deployerPrivateKey = vm.envUint("DEPLOYER_PRIVATE_KEY"); | ||
uint256 superAdminPrivateKey = vm.envUint("SUPER_ADMIN_PRIVATE_KEY"); | ||
|
||
address deployer = vm.addr(deployerPrivateKey); | ||
address superAdmin = vm.addr(superAdminPrivateKey); | ||
|
||
console.log("Deployer address:", deployer); | ||
console.log("Super Admin address:", superAdmin); | ||
|
||
vm.startBroadcast(deployerPrivateKey); | ||
|
||
Names names = new Names(superAdmin); | ||
console.log("Names contract address:", address(names)); | ||
|
||
vm.stopBroadcast(); | ||
|
||
vm.startBroadcast(superAdminPrivateKey); | ||
|
||
names.mintName("admin"); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} |
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