Video Demo
https://drive.google.com/file/d/1h4xOlEqg1Wb1I0P4itntBjSysAYJtAZl/preview
Clone the repository
git clone https://github.com/therealharpaljadeja/cross-chain-lens.git
Install Dependencies
npm install
Create 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 alfajores
To 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.ts
you can create Lens profiles!Update the script with the
username
,profilePicture
of 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.ts
you can create Lens posts!You can edit the post metadata by editing the
createpost/buildPublicationMetadata.ts
fileTo 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