mirror of
https://github.com/lens-protocol/core.git
synced 2026-01-10 14:48:15 -05:00
47 lines
1.1 KiB
Solidity
47 lines
1.1 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;
|
|
|
|
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();
|
|
}
|
|
}
|