24 lines
1.1 KiB
Solidity
24 lines
1.1 KiB
Solidity
|
|
// SPDX-License-Identifier: MIT
|
||
|
|
pragma solidity ^0.8.19;
|
||
|
|
|
||
|
|
import {Script, console} from "forge-std/Script.sol";
|
||
|
|
import {AddressMapperEmpty} from "../contracts/utils/AddressMapperEmpty.sol";
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @title DeployAddressMapperOtherChain
|
||
|
|
* @notice Deploy AddressMapperEmpty (no initial mappings) for use on chains other than 138 (e.g. Cronos, BSC).
|
||
|
|
* @dev After deploy, add config/smart-contracts-master.json "mapper" for that chainId with this address.
|
||
|
|
*/
|
||
|
|
contract DeployAddressMapperOtherChain is Script {
|
||
|
|
function run() external {
|
||
|
|
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
|
||
|
|
address deployer = vm.addr(deployerPrivateKey);
|
||
|
|
console.log("Deploying AddressMapperEmpty (other chain) with deployer:", vm.toString(deployer));
|
||
|
|
vm.startBroadcast(deployerPrivateKey);
|
||
|
|
AddressMapperEmpty mapper = new AddressMapperEmpty();
|
||
|
|
console.log("AddressMapperEmpty deployed at:", vm.toString(address(mapper)));
|
||
|
|
vm.stopBroadcast();
|
||
|
|
console.log("\nNext: set config/smart-contracts-master.json chains[chainId].mapper to this address.");
|
||
|
|
}
|
||
|
|
}
|