mirror of
https://github.com/lens-protocol/core.git
synced 2026-01-08 21:58:06 -05:00
53 lines
1.4 KiB
Solidity
53 lines
1.4 KiB
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity ^0.8.13;
|
|
|
|
import {ForkManagement} from 'script/helpers/ForkManagement.sol';
|
|
import 'forge-std/Script.sol';
|
|
|
|
contract BlankScriptTemplate is Script, ForkManagement {
|
|
using stdJson for string;
|
|
|
|
struct LensAccount {
|
|
uint256 ownerPk;
|
|
address owner;
|
|
uint256 profileId;
|
|
}
|
|
|
|
LensAccount deployer;
|
|
LensAccount governance;
|
|
LensAccount proxyAdmin;
|
|
|
|
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('\n- - - DEPLOYER: %s', deployer.owner);
|
|
(governance.owner, governance.ownerPk) = deriveRememberKey(mnemonic, 1);
|
|
console.log('\n- - - GOVERNANCE: %s', governance.owner);
|
|
(proxyAdmin.owner, proxyAdmin.ownerPk) = deriveRememberKey(mnemonic, 2);
|
|
console.log('\n- - - PROXYADMIN: %s', proxyAdmin.owner);
|
|
|
|
console.log('\n');
|
|
|
|
console.log('Current block:', block.number);
|
|
}
|
|
|
|
function run(string memory targetEnv_) external {
|
|
targetEnv = targetEnv_;
|
|
loadJson();
|
|
checkNetworkParams();
|
|
loadBaseAddresses();
|
|
loadPrivateKeys();
|
|
}
|
|
}
|