shunkakinoki / madfi-sponsor-module

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


A Lens Reference Module that enables real-time monetization of your content.

Frontend repo:

Forked lens repo (for local dev):

Attempt at adding to LenHub updatePostWithSig(): imthatcarlos/lens-protocol#1


first - clone and install lens-protocol repo, then create a symlink

git clone
npm link

then clone this repo and link

nvm use
npm link lens-protocol

compile contracts

yarn compile

deploy contracts

yarn deploy:mumbai

local lens protocol setup

  1. clone my forked lens repo (branch: feature/madfi-sponsor-module)

  2. spin up the docker container with their contracts env, and run hardhat node in there

export USERID=root && docker-compose build && docker-compose run -p 8545:8545 contracts-env bash


npx hardhat node
  1. find the docker container name with docker ps and run another bash session
export USERID=root && docker exec -it <docker-container-name> bash
  1. deploy their contracts npm run compile && npm run full-deploy-local

  2. come back here and deploy the superfluid protocol + sponsor module yarn compile && npx hardhat deploy-superfluid --network docker && yarn deploy:docker

  3. back in the docker container, whitelist the deployed sponsor module with npx hardhat whitelist-sponsor-module --network localhost

  4. assuming that worked, you have to unpause the lens protocol with npx hardhat unpause --network localhost

  5. back in this repo, you can create a profile (make sure to set some ENV variables defined .env.template) by running npx hardhat create-profile --network docker. also create another profile for the sponsor by changing the handle and using the signer for sponsor (line 24 in create-profile.ts)

  6. finally, create a post and attach our deployed SponsorModule as the reference module npx hardhat create-post --network docker

  7. create a money stream between the sponsor and the user for the user's latest publication, and then the sponsor attempts to mirror it npx hardhat create-mirror --network docker

ezoic increase your site revenue



Language:TypeScript 56.4%Language:JavaScript 23.6%Language:Solidity 20.0%