Video Demo
https://drive.google.com/file/d/1h4xOlEqg1Wb1I0P4itntBjSysAYJtAZl/preview
Clone the repository
git clone https://github.com/therealharpaljadeja/cross-chain-lens.gitInstall Dependencies
npm installCreate a .env file for environment variables (see .env.example)
PRIVATE_KEY - Private key of the account which will own the profile and create the post
THIRDWEB_API_KEY - ThirdWeb API key for using ThirdWeb IPFS gateway
In order to make cross chain calls, you need to deploy Relayer on the source chain and Receiver on the destination chain
To deploy the LensProtocolRelayer on Celo Testnet (Alfajores) use the following command:
npx hardhat run scripts/deployRelayer.ts --network alfajoresTo deploy the LensProtocolReceiver on the Polygon Testnet (Mumbai) use the following command:
npx hardhat run scripts/deployReceiver.ts --network mumbai-
Create Lens Profile
Using the script
crosschaincreateprofile.tsyou can create Lens profiles!Update the script with the
username,profilePictureof choice (can also edit details aboutFollowNFT)To create the profile use the following command:
npx hardhat run scripts/crosschaincreateprofile.ts --network alfajores
-
Create Lens Post (postWithSig)
Using the script
createpost/index.tsyou can create Lens posts!You can edit the post metadata by editing the
createpost/buildPublicationMetadata.tsfileTo create the post use the following command:
npx hardhat run scripts/createpost/index.ts --network alfajores
The above command might fail if the ThirdWeb IPFS gateway resolves the url slowly! Just try again.
Open for contributions!
Harpalsinh Jadeja - Email - Twitter - Telegram
Create Issue