Skip to content

Commit

Permalink
misc: Metadata placeholders removed in deployment scripts and Differe…
Browse files Browse the repository at this point in the history
…nt Locks added for each primitive
  • Loading branch information
vicnaum committed Jan 31, 2025
1 parent 0beb4d4 commit bd3dabb
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 23 deletions.
12 changes: 9 additions & 3 deletions deploy/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { deployLensPrimitives, deployLensAccessControl, deployLensActionHub } fr
import { deployRules } from './deployRules';
import { deployActions } from './deployActions';
import { generateEnvFile } from './lensUtils';
import { deployBeacons, deployProxyAdminLock, deployAccessControlLock } from './deployProxyStuff';
import { deployBeacons, deployLock } from './deployProxyStuff';
import { getWallet, LOCAL_RICH_WALLETS } from './utils';

async function deploy() {
Expand Down Expand Up @@ -76,8 +76,14 @@ async function deploy() {
}
console.log('\n-------------------------------------------------------------------\n\n');

await deployProxyAdminLock(proxyAdminLockOwner ?? deployerAddress);
await deployAccessControlLock(accessControlLockOwner ?? deployerAddress);
await deployLock("AppLock", proxyAdminLockOwner ?? deployerAddress);
await deployLock("AccountLock", proxyAdminLockOwner ?? deployerAddress);
await deployLock("FeedLock", proxyAdminLockOwner ?? deployerAddress);
await deployLock("GraphLock", proxyAdminLockOwner ?? deployerAddress);
await deployLock("GroupLock", proxyAdminLockOwner ?? deployerAddress);
await deployLock("NamespaceLock", proxyAdminLockOwner ?? deployerAddress);
await deployLock("AccessControlLock", accessControlLockOwner ?? deployerAddress);

await deployImplementations(DEPLOYING_MIGRATION);
await deployBeacons(beaconOwner ?? deployerAddress);
await deployFactories(rulesOwner ?? deployerAddress, factoriesProxyOwner ?? LOCAL_RICH_WALLETS[1].address, DEPLOYING_MIGRATION);
Expand Down
14 changes: 7 additions & 7 deletions deploy/deployFactories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { ZeroAddress } from 'ethers';


export default async function deployFactories(rulesOwner: string, factoriesProxyOwner: string, DEPLOYING_MIGRATION: boolean): Promise<void> {
const metadataURI = 'https://lens.dev/metadata'; // TODO: Change this to the actual metadata URI
const metadataURI = '';

const factories: ContractInfo[] = [
// Factories
Expand All @@ -26,7 +26,7 @@ export default async function deployFactories(rulesOwner: string, factoriesProxy
contractType: ContractType.Factory,
constructorArguments: [
loadContractAddressFromAddressBook('AccountBeacon'),
loadContractAddressFromAddressBook('ProxyAdminLock'),
loadContractAddressFromAddressBook('AccountLock'),
],
},
{
Expand All @@ -35,7 +35,7 @@ export default async function deployFactories(rulesOwner: string, factoriesProxy
contractType: ContractType.Factory,
constructorArguments: [
loadContractAddressFromAddressBook('AppBeacon'),
loadContractAddressFromAddressBook('ProxyAdminLock'),
loadContractAddressFromAddressBook('AppLock'),
],
},
{
Expand All @@ -44,7 +44,7 @@ export default async function deployFactories(rulesOwner: string, factoriesProxy
contractType: ContractType.Factory,
constructorArguments: [
loadContractAddressFromAddressBook('FeedBeacon'),
loadContractAddressFromAddressBook('ProxyAdminLock'),
loadContractAddressFromAddressBook('FeedLock'),
],
},
{
Expand All @@ -53,7 +53,7 @@ export default async function deployFactories(rulesOwner: string, factoriesProxy
contractType: ContractType.Factory,
constructorArguments: [
loadContractAddressFromAddressBook('GraphBeacon'),
loadContractAddressFromAddressBook('ProxyAdminLock'),
loadContractAddressFromAddressBook('GraphLock'),
],
},
{
Expand All @@ -62,7 +62,7 @@ export default async function deployFactories(rulesOwner: string, factoriesProxy
contractType: ContractType.Factory,
constructorArguments: [
loadContractAddressFromAddressBook('GroupBeacon'),
loadContractAddressFromAddressBook('ProxyAdminLock'),
loadContractAddressFromAddressBook('GroupLock'),
],
},
{
Expand All @@ -71,7 +71,7 @@ export default async function deployFactories(rulesOwner: string, factoriesProxy
contractType: ContractType.Factory,
constructorArguments: [
loadContractAddressFromAddressBook('NamespaceBeacon'),
loadContractAddressFromAddressBook('ProxyAdminLock'),
loadContractAddressFromAddressBook('NamespaceLock'),
],
}]

Expand Down
15 changes: 3 additions & 12 deletions deploy/deployProxyStuff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,9 @@ import {
loadContractAddressFromAddressBook,
} from './lensUtils';

export async function deployProxyAdminLock(lockOwner: string): Promise<void> {
const proxyAdminLock = await deployLensContract({
name: 'ProxyAdminLock',
contractName: 'Lock',
contractType: ContractType.Aux,
constructorArguments: [lockOwner, true],
});
}

export async function deployAccessControlLock(lockOwner: string): Promise<void> {
const accessControlLock = await deployLensContract({
name: 'AccessControlLock',
export async function deployLock(lockType: string, lockOwner: string): Promise<void> {
const lock = await deployLensContract({
name: lockType,
contractName: 'Lock',
contractType: ContractType.Aux,
constructorArguments: [lockOwner, true],
Expand Down
2 changes: 1 addition & 1 deletion deploy/deployRules.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { deployLensContract, ContractType, ContractInfo } from './lensUtils';

export async function deployRules(rulesOwner: string): Promise<void> {
const metadataURI = 'https://lens.dev/metadata'; // TODO: Change this to the actual metadata URI
const metadataURI = '';
const contracts: ContractInfo[] = [
// Feed Rules
{
Expand Down

0 comments on commit bd3dabb

Please sign in to comment.