Skip to content

Commit d4c662a

Browse files
Merge pull request #171 from lens-protocol/misc/local-network
misc: Local Network setup
2 parents b50ab9f + a73551b commit d4c662a

File tree

4 files changed

+44
-14
lines changed

4 files changed

+44
-14
lines changed

addresses.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,30 @@
248248
"ProfileCreationProxy": "0x8de25afc4B37e0AdBb58caf3dF06fAf419455404",
249249
"Treasury": "0x648Ddb72d51B5f1849586f6Fd2a95E70754A126A"
250250
},
251+
"local": {
252+
"testnet": true,
253+
"chainId": 31337,
254+
"network": "local",
255+
"LensProfilesGuardianTimelock": 300,
256+
"LensHandlesGuardianTimelock": 300,
257+
"Currencies": [],
258+
"Modules": {
259+
"v1": {
260+
"collect": [],
261+
"follow": [],
262+
"reference": []
263+
},
264+
"v2": {
265+
"follow": [],
266+
"act": [],
267+
"collect": [],
268+
"reference": []
269+
}
270+
},
271+
"TreasuryFee": 500,
272+
"ProfileRoyaltyFee": 500,
273+
"HandleRoyaltyFee": 500
274+
},
251275
"example": {
252276
"testnet": true,
253277
"chainId": 69,

foundry.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ via_ir = true
4545
polygon = "${POLYGON_RPC_URL}"
4646
mumbai = "${MUMBAI_RPC_URL}"
4747
amoy = "${AMOY_RPC_URL}"
48+
local = "${LOCAL_RPC_URL}"
4849

4950
[fuzz]
5051
runs = 50

script/DeployFreshLensV2.s.sol

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -404,19 +404,6 @@ contract DeployFreshLensV2 is Script, ForkManagement, ArrayHelpers {
404404

405405
publicActProxy = new PublicActProxy({lensHub: address(hub)});
406406
_logDeployedAddress(address(publicActProxy), 'PublicActProxy');
407-
408-
if (isTestnet) {
409-
// Add PublicActProxy as a delegatedExecutor of anonymousProfileId
410-
hub.changeDelegatedExecutorsConfig(
411-
anonymousProfileId,
412-
_toAddressArray(address(publicActProxy)),
413-
_toBoolArray(true)
414-
);
415-
console.log('PublicActProxy added as DelegatedExecutor of AnonymousProfileId: %s', address(publicActProxy));
416-
} else {
417-
console.log('Skipping governance actions for mainnet');
418-
console.log('Add PublicActProxy as DelegatedExecutor of AnonymousProfileId manually!');
419-
}
420407
}
421408

422409
// TODO: Use from test/ContractAddresses?
@@ -549,6 +536,22 @@ contract DeployFreshLensV2 is Script, ForkManagement, ArrayHelpers {
549536

550537
vm.startBroadcast(deployer.ownerPk);
551538
{
539+
if (isTestnet) {
540+
// Add PublicActProxy as a delegatedExecutor of anonymousProfileId
541+
hub.changeDelegatedExecutorsConfig(
542+
anonymousProfileId,
543+
_toAddressArray(address(publicActProxy)),
544+
_toBoolArray(true)
545+
);
546+
console.log(
547+
'PublicActProxy added as DelegatedExecutor of AnonymousProfileId: %s',
548+
address(publicActProxy)
549+
);
550+
} else {
551+
console.log('Skipping governance actions for mainnet');
552+
console.log('Add PublicActProxy as DelegatedExecutor of AnonymousProfileId manually!');
553+
}
554+
552555
// Deploy governance and proxy-admin controllable-by-contract contracts, and transfer ownership.
553556
governanceContract = new Governance(address(hub), governance.owner);
554557
_logDeployedAddress(address(governanceContract), 'GovernanceContract');

script/run.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ if [[ "$CONFIRMATION" == "y" || "$CONFIRMATION" == "Y" ]]
8686
catapulta script script/$SCRIPT_NAME.s.sol --chain $NETWORK --sig $CALLDATA --legacy --skip test --ffi --slow --skip-git
8787
exit 0
8888
else
89-
forge script script/$SCRIPT_NAME.s.sol:$SCRIPT_NAME --sig $CALLDATA --rpc-url $NETWORK -vv --skip test --ffi --slow --broadcast --verify
89+
forge script script/$SCRIPT_NAME.s.sol:$SCRIPT_NAME --sig $CALLDATA --rpc-url $NETWORK -vv --skip test --ffi --slow --broadcast
90+
# `--verify` temporarily removed because of Foundry issues. You can add it back or verify manually later.
91+
# forge script script/$SCRIPT_NAME.s.sol:$SCRIPT_NAME --sig $CALLDATA --rpc-url $NETWORK -vv --skip test --ffi --slow --broadcast --verify
9092
fi
9193

9294
else

0 commit comments

Comments
 (0)