-
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.
Merge pull request #70 from smart-transaction/refactor/faucet-auth-an…
…d-delay Refactor: Faucet auth and delay
- Loading branch information
Showing
5 changed files
with
51 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.26; | ||
|
||
import "forge-std/Script.sol"; | ||
import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol"; | ||
|
||
contract UpgradeFaucet is Script { | ||
function run() external returns (address, address) { | ||
uint256 deployerPrivateKey = vm.envUint("DEPLOYER_KEY"); | ||
address proxyAddress = vm.evmAddress("PROXY"); | ||
vm.startBroadcast(deployerPrivateKey); | ||
// Upgrade the upgradeable contract | ||
Upgrades.upgradeProxy(proxyAddress, "FaucetV1.sol", ""); | ||
|
||
// Get the implementation address | ||
address implementationAddress = Upgrades.getImplementationAddress(proxyAddress); | ||
|
||
vm.stopBroadcast(); | ||
|
||
return (implementationAddress, proxyAddress); | ||
} | ||
} |
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
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 @@ | ||
#!/bin/bash | ||
|
||
# Get the contract name | ||
CONTRACT=$1 | ||
|
||
# Get contract address | ||
ADDRESS=$2 | ||
|
||
# TODO: Add conditional logic for constructor arguments and make ot modular with other explorers | ||
|
||
source .env | ||
forge verify-contract --rpc-url $LESTNET_RPC $ADDRESS $CONTRACT --verifier blockscout --verifier-url $LESTNET_API_KEY |