Skip to content

Commit

Permalink
Merge pull request #126 from Airstack-xyz/feature/lens_v2_deployment
Browse files Browse the repository at this point in the history
Added deployment related changes for lens v2 premigration
  • Loading branch information
0xsarvesh authored Oct 26, 2023
2 parents 9bf50c6 + 8467e16 commit 9cfab0d
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 79 deletions.
2 changes: 1 addition & 1 deletion airstack-modules/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"build:package": "tsc",
"lint": "eslint . --ext .ts",
"test": "echo \"Error: no test specified\" && exit 1",
"publish": "npm publish --tag alpha --access public",
"publish": "npm publish --tag latest --access public",
"build": "npm run build:package && npm pack"
},
"bin": {
Expand Down
14 changes: 7 additions & 7 deletions lens_v2/package-lock.json

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

4 changes: 2 additions & 2 deletions lens_v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"name": "lens-subgraph",
"license": "MIT",
"scripts": {
"codegen": "graph codegen",
"codegen": "npx @airstack/subgraph-generator social --version v2.0.0 --slug lens_v2_polygon --name lens && graph codegen",
"build": "graph build",
"test": "graph test"
},
"dependencies": {
"@airstack/subgraph-generator": "file:../airstack-modules/airstack-subgraph-generator-1.0.0-alpha.3.tgz",
"@airstack/subgraph-generator": "1.0.0-alpha.8",
"@graphprotocol/graph-cli": "^0.47.0",
"@graphprotocol/graph-ts": "^0.29.3",
"@protofire/subgraph-toolkit": "^0.1.2"
Expand Down
3 changes: 1 addition & 2 deletions lens_v2/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Address } from "@graphprotocol/graph-ts"
// id for lensInfo entity
export const LENSHUB_ADDRESS = Address.fromHexString("0xC1E77eE73403B8a7478884915aA599932A677870")
export const LENSPERIPHERY_ADDRESS = Address.fromHexString("0xD5037d72877808cdE7F669563e9389930AF404E8")
export const LENSHUB_ADDRESS = Address.fromHexString("0xdb46d1dc155634fbc732f92e853b10b288ad5a1d")
6 changes: 3 additions & 3 deletions lens_v2/src/mappings/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ADDRESS_ZERO, integer, ZERO_ADDRESS } from "@protofire/subgraph-toolkit"
import { Address, BigInt, log } from "@graphprotocol/graph-ts"
import { DefaultProfileSet, ProfileCreated, ProfileImageURISet, Transfer, ProfileMetadataSet as ProfileMetadataSetV1 } from "../../generated/LensHub/LensHub"
import { ProfileMetadataSet as ProfileMetadataSetV2 } from "../../generated/LensPeriphery/LensPeriphery"
import { ProfileMetadataSet as ProfileMetadataSetV2 } from "../../generated/LensPeriphery/LensPeriphery"
import * as airstack from "../../modules/airstack/social/social"
import { LENSHUB_ADDRESS, LENSPERIPHERY_ADDRESS } from "../constants"
import { LENSHUB_ADDRESS } from "../constants"
import { BIG_INT_ZERO, BIGINT_ONE } from "../../modules/airstack/common"
import {
TransferEntity,
Expand Down Expand Up @@ -57,7 +57,7 @@ export function handleProfileCreated(event: ProfileCreated): void {
ADDRESS_ZERO,
to.toHexString(),
profileId.toString(),
LENSHUB_ADDRESS.toHexString(),
event.address.toHexString(),
to.toHexString(),
new Array<airstack.social.AirExtraData>(),
event.params.handle,
Expand Down
128 changes: 64 additions & 64 deletions lens_v2/subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ schema:
dataSources:
- kind: ethereum
name: LensHub
network: mumbai
network: matic
source:
address: '0xC1E77eE73403B8a7478884915aA599932A677870'
address: '0xdb46d1dc155634fbc732f92e853b10b288ad5a1d'
abi: LensHub
startBlock: 40185861
startBlock: 28384641
mapping:
kind: ethereum/events
apiVersion: 0.0.7
Expand Down Expand Up @@ -39,11 +39,11 @@ dataSources:
file: ./src/mappings/index.ts
- kind: ethereum
name: LensPeriphery
network: mumbai
network: matic
source:
address: '0xD5037d72877808cdE7F669563e9389930AF404E8'
address: '0xeff187b4190E551FC25a7fA4dFC6cf7fDeF7194f'
abi: LensPeriphery
startBlock: 26267723
startBlock: 28384670
mapping:
kind: ethereum/events
apiVersion: 0.0.7
Expand All @@ -64,61 +64,61 @@ dataSources:
- event: ProfileMetadataSet(indexed uint256,string,uint256)
handler: handleProfileMetadataSetV1
file: ./src/mappings/index.ts
- kind: ethereum
name: LensHandle
network: mumbai
source:
address: '0xc3a1fabd7f8d290f7b0C45AA88af6e9c9E267843'
abi: LensHandle
startBlock: 40185868
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- AirBlock
- AirMeta
- AirEntityCounter
- AirAccount
- AirExtra
- AirUser
- AirProfile
- AirUserRegisteredTransaction
abis:
- name: LensHandle
file: ./abis/LensHandle.json
eventHandlers:
- event: Transfer(indexed address,indexed address,indexed uint256)
handler: handleTransfer
- event: HandleMinted(string,string,uint256,address,uint256)
handler: handleHandleMinted
file: ./src/lens-handle.ts
- kind: ethereum
name: TokenHandleRegistry
network: mumbai
source:
address: '0x9cD0d07AB772e42ed3497DD379360daBcD94352A'
abi: TokenHandleRegistry
startBlock: 40185878
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- AirBlock
- AirMeta
- AirEntityCounter
- AirAccount
- AirExtra
- AirUser
- AirProfile
- AirUserRegisteredTransaction
abis:
- name: TokenHandleRegistry
file: ./abis/TokenHandleRegistry.json
eventHandlers:
- event: HandleLinked((uint256,address),(uint256,address),address,uint256)
handler: handleHandleLinked
- event: HandleUnlinked((uint256,address),(uint256,address),address,uint256)
handler: handleHandleUnlinked
file: ./src/token-handle-registry.ts
# - kind: ethereum
# name: LensHandle
# network: matic
# source:
# address: '0xc3a1fabd7f8d290f7b0C45AA88af6e9c9E267843'
# abi: LensHandle
# startBlock: 40185868
# mapping:
# kind: ethereum/events
# apiVersion: 0.0.7
# language: wasm/assemblyscript
# entities:
# - AirBlock
# - AirMeta
# - AirEntityCounter
# - AirAccount
# - AirExtra
# - AirUser
# - AirProfile
# - AirUserRegisteredTransaction
# abis:
# - name: LensHandle
# file: ./abis/LensHandle.json
# eventHandlers:
# - event: Transfer(indexed address,indexed address,indexed uint256)
# handler: handleTransfer
# - event: HandleMinted(string,string,uint256,address,uint256)
# handler: handleHandleMinted
# file: ./src/lens-handle.ts
# - kind: ethereum
# name: TokenHandleRegistry
# network: matic
# source:
# address: '0x9cD0d07AB772e42ed3497DD379360daBcD94352A'
# abi: TokenHandleRegistry
# startBlock: 40185878
# mapping:
# kind: ethereum/events
# apiVersion: 0.0.7
# language: wasm/assemblyscript
# entities:
# - AirBlock
# - AirMeta
# - AirEntityCounter
# - AirAccount
# - AirExtra
# - AirUser
# - AirProfile
# - AirUserRegisteredTransaction
# abis:
# - name: TokenHandleRegistry
# file: ./abis/TokenHandleRegistry.json
# eventHandlers:
# - event: HandleLinked((uint256,address),(uint256,address),address,uint256)
# handler: handleHandleLinked
# - event: HandleUnlinked((uint256,address),(uint256,address),address,uint256)
# handler: handleHandleUnlinked
# file: ./src/token-handle-registry.ts

0 comments on commit 9cfab0d

Please sign in to comment.