Adding features to an existing web3.0 website. -- 2

Job ID: 36735864

Budget: ₹2,000 – ₹6,000 INR

Adding features:
1. add a separate page, accessed only by admin, by using userid and password, wherein the admin can switch on and off the deposit, withdraw and development fund modules.

When at the newly created admin page, if admin switch off say deposit module, the deFi should pop up a window, saying, system is upgrading, please come back later and check again..

And if at the newly created page, if admin switch on the module, it should work as it is working as of now.

Same popup should pop on all 3 module viz deposit, withdraw and development fund module if that particular function is switched on by the admin. Otherwise if that function is switched off, it should work as intended, which is working as of now.

2. When Deposit button is clicked for re-deposit, do not accept the funds instead check for total income withdrawn so far from the smart contract read module > totalRevenue and compare it with contract read module > maxDeposit figure, check contract balance, in following cases do as follows:

1. if totalRevenue is =>3 times, and contract balance is below 100k usdt, terminate the remaining code and stop him with popup, saying, your maximum withdrawl limit reached, please register and deposit a fresh id... Othrerwise let the remaining code run and let him deposit and withraw.

2. if totalRevenue is =>2 times, and contract balance is below 25k usdt, terminate the remaining code and stop him with popup, saying, your maximum withdrawl limit reached, please register and deposit a fresh id... Othrerwise let the remaining code run and let him deposit and withraw.

3. if totalRevenue is =>1 times, and contract balance is below 10k usdt, terminate the remaining code and stop him with popup, saying, your maximum withdrawl limit reached, please register and deposit a fresh id... Othrerwise let the remaining code run and let him deposit and withraw.

What I wanted to achieve?
1. If contract balance is above 100k, let everybody deposit and withraw
2. If contract balance is belove 100k, and the user has already earned 3 times of his investment stop him further.
3. If contract balance is belove 25k, and the user has already earned 2 times of his investment stop him further.
4. If contract balance is belove 10k, and the user has already recovered his investment stop him further.

I have codebase at github. Written in React. Till the point you understand the code, logics used and you start and finish your coding on top of it, you will have to do following thing:

In withdraw and development fund module create an small error, so that withdraw and develpoment fund module does not work in front end, it should display default error of metamask. And publish it to the main sssglobal server.
Right now the url of this is as follows:

https://sssglobal.space/dapp?ref=0x4xxxxx

Second create a folder on the server named dap and publish the now working website there, so whenever if I wish to allow somebody to use the correct website, I can share the new url and access the blockchain through Frontend.

The new url could be something like this:

https://sssglobal.space/dap?ref=0x4xxxxx

The changes in url is very minimal instead of dapp it is dap now.

The small error could be just remove = sign from => development fund module and same thing you could do in withdraw module.
Related categories: HTML AngularJS React.js API React Native