From 4f76604c91176ece4d3af8977ff04c973a8ee375 Mon Sep 17 00:00:00 2001 From: horsefacts <109845214+horsefacts@users.noreply.github.com> Date: Mon, 24 Jul 2023 16:58:35 -0700 Subject: [PATCH] chore(FnameResolver): add deploy script (#260) --- .env.example | 3 +++ script/FnameResolver.s.sol | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 script/FnameResolver.s.sol diff --git a/.env.example b/.env.example index a0a25a41..9d8b0bff 100644 --- a/.env.example +++ b/.env.example @@ -1,7 +1,10 @@ STORAGE_RENT_PRICE_FEED_ADDRESS= STORAGE_RENT_UPTIME_FEED_ADDRESS= +STORAGE_RENT_ROLE_ADMIN_ADDRESS= STORAGE_RENT_VAULT_ADDRESS= STORAGE_RENT_ADMIN_ADDRESS= STORAGE_RENT_OPERATOR_ADDRESS= STORAGE_RENT_TREASURER_ADDRESS= ID_REGISTRY_OWNER_ADDRESS= +FNAME_RESOLVER_SERVER_URI= +FNAME_RESOLVER_SIGNER_ADDRESS= diff --git a/script/FnameResolver.s.sol b/script/FnameResolver.s.sol new file mode 100644 index 00000000..b16a6216 --- /dev/null +++ b/script/FnameResolver.s.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity 0.8.19; + +import "forge-std/Script.sol"; + +import {FnameResolver} from "../src/FnameResolver.sol"; + +contract FnameResolverScript is Script { + bytes32 internal constant CREATE2_SALT = "fc"; + + function run() public { + string memory serverURI = vm.envString("FNAME_RESOLVER_SERVER_URL"); + address signer = vm.envAddress("FNAME_RESOLVER_SIGNER_ADDRESS"); + + vm.broadcast(); + new FnameResolver{ salt: CREATE2_SALT }( + serverURI, + signer + ); + } +}