Skip to content

Commit

Permalink
Migrate to Lens v3
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoginth committed Dec 6, 2024
1 parent ef31cd3 commit c0d2ac0
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 49 deletions.
1 change: 0 additions & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"next": "^15.0.4",
"next-axiom": "^1.5.1",
"next-themes": "^0.4.3",
"party-js": "^2.2.0",
"plur": "^5.1.0",
"plyr-react": "^5.3.0",
"prosekit": "^0.10.4",
Expand Down
6 changes: 0 additions & 6 deletions packages/data/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,7 @@ export const LENS_API_URL = getEnvConfig().lensApiEndpoint;
export const HEY_API_URL = IS_PRODUCTION
? "https://api.hey.xyz"
: "http://localhost:4784";
export const GRAPH = getEnvConfig().graph;
export const LENS_HANDLES = getEnvConfig().lensHandles;
export const TOKEN_HANDLE_REGISTRY = getEnvConfig().tokenHandleRegistry;
export const HEY_LENS_SIGNUP = getEnvConfig().heyLensSignup;
export const DEFAULT_COLLECT_TOKEN = getEnvConfig().defaultCollectToken;
export const PERMISSIONLESS_CREATOR = getEnvConfig().permissionlessCreator;
export const HEY_TIPPING = getEnvConfig().heyTipping;

export const IS_MAINNET = LENS_API_URL === LensEndpoint.Mainnet;
export const ADDRESS_PLACEHOLDER = "0x03Ba3...7EF";
Expand Down
16 changes: 2 additions & 14 deletions packages/data/contracts.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
export enum MainnetContracts {
DefaultToken = "0x3d2bD0e15829AA5C362a4144FdF4A1112fa29B5c",
HeyLensSignup = "0x4b8845ACb8148dE64D1D99Cf27A3890a91F55E53",
HeyTipping = "0xCFeB907551c3C7E4Df2627B2Ed3D0C782702785B",
LensHandles = "0xe7E7EaD361f3AaCD73A61A9bD6C10cA17F38E945",
Graph = "0x9e7085a6cc3A02F6026817997cE44B26Ba4Df557",
PermissionlessCreator = "0x0b5e6100243f793e480DE6088dE6bA70aA9f3872",
TokenHandleRegistry = "0xD4F2F33680FCCb36748FA9831851643781608844"
DefaultToken = "0x3d2bD0e15829AA5C362a4144FdF4A1112fa29B5c"
}

export enum TestnetContracts {
DefaultToken = "0x3d2bD0e15829AA5C362a4144FdF4A1112fa29B5c",
HeyLensSignup = "0x82Bcb5DA51c6F3D0Ce942bDBEbb0B8A7774d62e8",
HeyTipping = "0xAadeC94DCD26555F464455d309a5E896f78cC65f",
LensHandles = "0xf6fDD7932219D64f267E4BfaF8d19774526d31D9",
Graph = "0x9e7085a6cc3A02F6026817997cE44B26Ba4Df557",
PermissionlessCreator = "0x36440da1D98FF46637f0b98AAA082bc77977B49B",
TokenHandleRegistry = "0x24360dc6Af3c0b37baA8B0aaDD5BcA11C1a1389A"
DefaultToken = "0x3d2bD0e15829AA5C362a4144FdF4A1112fa29B5c"
}
22 changes: 2 additions & 20 deletions packages/data/utils/getEnvConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,18 @@ import LensEndpoint from "../lens-endpoints";

const getEnvConfig = (): {
defaultCollectToken: string;
heyLensSignup: `0x${string}`;
heyTipping: `0x${string}`;
lensApiEndpoint: string;
lensHandles: `0x${string}`;
graph: `0x${string}`;
permissionlessCreator?: `0x${string}`;
tokenHandleRegistry: `0x${string}`;
} => {
switch (LENS_NETWORK) {
case "testnet":
return {
defaultCollectToken: TestnetContracts.DefaultToken,
heyLensSignup: TestnetContracts.HeyLensSignup,
heyTipping: TestnetContracts.HeyTipping,
lensApiEndpoint: LensEndpoint.Testnet,
lensHandles: TestnetContracts.LensHandles,
graph: TestnetContracts.Graph,
permissionlessCreator: TestnetContracts.PermissionlessCreator,
tokenHandleRegistry: TestnetContracts.TokenHandleRegistry
lensApiEndpoint: LensEndpoint.Testnet
};
default:
return {
defaultCollectToken: MainnetContracts.DefaultToken,
heyLensSignup: MainnetContracts.HeyLensSignup,
heyTipping: MainnetContracts.HeyTipping,
lensApiEndpoint: LensEndpoint.Mainnet,
lensHandles: MainnetContracts.LensHandles,
graph: MainnetContracts.Graph,
permissionlessCreator: MainnetContracts.PermissionlessCreator,
tokenHandleRegistry: MainnetContracts.TokenHandleRegistry
lensApiEndpoint: LensEndpoint.Mainnet
};
}
};
Expand Down
8 changes: 0 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c0d2ac0

Please sign in to comment.