Skip to content

RaekwonIII/superfluid-devrel-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Superfluid DevRel Assignment

This project aims to demonstrate the capabilities of Superfluid protocol. It contains a simple smart contract with one function (two in reality...) that use Superfluid CFA library and its Supertokens.

The contract's method(s) use the getFlowInfo to verify if a certain address, provided as an argument, has an active flow towards vitalik.eth. The difference between the two functions is that one uses ENS' on-chain name resolver to resolve vitalik.eth, while the other one is more generic and accepts an additional parameter.

Environment variables

Look at .env.example file, create a copy of it, named .env and fill in the empty variables. For this project, an Infura account was used, but any other RPC url would do.

Deploy

To deploy the contract to Mumbai testnet, make sure to have enough funds and run the command:

npx hardhat run scripts/deploy.js --network mumbai

Note: if you want to deploy on a different network, modify hardhat.config.js by adding a new network configuration

Additional scripts

To interact with the on-chain contract, try running these commands:

npx hardhat run scripts/checkNonExistingStream.js --network mumbai
npx hardhat run scripts/checkExistingStream.js --network mumbai

And play around with sender or vitalik addresses, if you want to verify a stream existence between different addresses.

Tests

A test has been written for this, but at the moment of writing this README, a library error prevents from executing them

Frontend

This project contains a small frontend as well, written in Next.js and located in the lens-donator subfolder. For instructions regarding the frontend itself, see its README.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors