These days, many big internet companies including Google, Facebook, Microsoft and Amazon are controlling the internet. For Starups, in my opinion, using Blockchain technology is the best way to compete with those giant internet companies because the major companies have the most money, computing power and all the data, and the Blockchain technology can be the solutions for all these problems. This is why I started to look up this technology and this may help the next generation of the Artificial Intelligenc.
Problem Statement
This project, EtherMembership, is the solution for the membership plans on Ethereum Blockchain. Currently, many websites are getting donations through PayPal and the websites’ mananger should check and manually give the contributors some benefits. With this Ethereum Smart Contract, the manager do not need to do that and even though the contributors do not have bank accounts and live in non-PayPal service contries, they can contribute ethereum to the owner. Therefore, the mananger could monetize their values easily. Furthermore, they do not need to make their own website again because this is just going to be the second database for their website.
A brief explanation of EtherMembership
This Ethermembership would be the third-party app for anyone’s membership plans. The managers of their websites just need to make the link to our app. This means that even if they do not know about web3.js and solidity, they can manange the ethereum based membership. Only they need to do is to make API to retrieve the data from ethermembership. The data would contain members’ wallet address, their email or id in the website and the amount of ether they contributed so far. After they retrieve the data, the members of their website will get the grade according to the minimum contribution for membership plans.
Smart Contract
- MembershipFactory Contract
This factory contract helps to make a memebership contract and the creator of the membership contract gets control of the contract.
- Membership Contract
Each memebership contract will store the members’ information, transection history and the url of the manager’s website.
- How these two contracts are connected
Our site would be the main page of EtherMembership app and in this manin site, the managers can make their own contract with the url of their site.
Front-End
1) Main Page
This page retrieves all the deployed memebership contracts from the factory contract. In here, you can creat a new memebership contract and browse existing membership contracts.
2) Create a new membership contract
The owner of sites can make their own membership contracts here and they need to pay some gas for this. The url should be the root of their REST API and the contract address of their membership will be sent to “url/new” as “cid”.
For the manager of the contract now have their own contract address and their users can contribute some ether through “Main/memberships/:address”. In this example, it is “http://localhost:8000/memberships/:address”.
3) Register, Contribute, and Collect
- Register
When users register their id or email of the site, they also can contribute their ether with some gas, so that users do not need to waste their gas.
- Contribute more
After users registered their id in the contract, they can contribute more if they want to. Moreover, users can see how much ether they contributed as well when they come to the this page again according to their metamask account.
- Collect
The manager will have a different view here with contract balance and collect button. When they click the collect button, all the registered user information will be sent to the website server. As a result, the server of their website will update their database according to the minimum ether for the memebership plans.
More information on Ethermembership
All the installation process and more information will be in ethermembership.