Skip to content

vokkantthakkar/PayableWallet

Repository files navigation

PayableWallet

This is an implimentation of a paywall using Metamask. On subsribing to the website, you will get a "SUB" non fungible token for 0.0001 Ether. This token is coded in the standard ERC 721 standard and is therefore non transferable.

Instructions

Clone the repository. Ensure you have node and npm installed. Install the Metamask Chrome Extension. Install web3 using the command:

npm install web3 --save

Install Express to run the server:

npm install express --save

Finally, use this command to start on localhost:3300:

node server.js

The smart contract is deployed using Remix IDE on the Goerli Test Network. If you are deploying your own contract instance change the following parameters in the index.js file: var contractAddress = '0x2f9B0A57C01fb9bd3CF29D4D0e16F5f71aCEDb18'; //Enter your deployed contract address here

var abi = [...] //Enter your abi here

Screenshots

1

Checks whether or not you have metamask installed.

2

Connects to your account

3

Approving a transaction to the mint function to give the msg.sender a SUB token, with which he can "access" the content on the website at any later time

The road ahead

Contains two smart contracts. One is to integrate DAI stablecoin into the system and use it as an ERC 20 token for payments, instead of an exceptionally volatile currency like ether. Further the second smart contract leverages all the DAI stored and gives it to the compound protocol, where one can invest DAI.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published