mirror of
https://github.com/lens-protocol/core.git
synced 2026-01-09 14:18:04 -05:00
misc: Blank script template added
This commit is contained in:
46
script/BlankScriptTemplate.s.sol
Normal file
46
script/BlankScriptTemplate.s.sol
Normal file
@@ -0,0 +1,46 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.8.13;
|
||||
|
||||
import {ForkManagement} from 'script/helpers/ForkManagement.sol';
|
||||
import 'forge-std/Script.sol';
|
||||
|
||||
contract RedeployCollectActionModule is Script, ForkManagement {
|
||||
using stdJson for string;
|
||||
|
||||
struct LensAccount {
|
||||
uint256 ownerPk;
|
||||
address owner;
|
||||
uint256 profileId;
|
||||
}
|
||||
|
||||
LensAccount _deployer;
|
||||
|
||||
string mnemonic;
|
||||
|
||||
function loadPrivateKeys() internal {
|
||||
if (isEnvSet('MNEMONIC')) {
|
||||
mnemonic = vm.envString('MNEMONIC');
|
||||
}
|
||||
|
||||
if (bytes(mnemonic).length == 0) {
|
||||
revert('Missing mnemonic');
|
||||
}
|
||||
|
||||
console.log('\n');
|
||||
|
||||
(_deployer.owner, _deployer.ownerPk) = deriveRememberKey(mnemonic, 0);
|
||||
console.log('Deployer address: %s', address(_deployer.owner));
|
||||
|
||||
console.log('\n');
|
||||
|
||||
console.log('Current block:', block.number);
|
||||
}
|
||||
|
||||
function run(string memory targetEnv_) external {
|
||||
targetEnv = targetEnv_;
|
||||
loadJson();
|
||||
checkNetworkParams();
|
||||
loadBaseAddresses();
|
||||
loadPrivateKeys();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user