Giter Site home page Giter Site logo

interest-earner-user-interface's Introduction

Interest Earner User Interface (UI)

What does it do?

Interacts with the interest earner smart contract, which allows users to stake and unstake tokens.

How do end users interact with the interest earner UI

Users simply load the page, (the user's account details are automatically pre-filled in the address input box)

Staking tokens

The user then simply types in the amount of tokens they would like to stake

The user then clicks the "Stake Tokens" button

Unstaking tokens

The user clicks the "Unstake Tokens" button

Where is the interest earner smart contract

The interest earner smart contract is deployed on the Ethereum mainnet and then this UI source code is updated with the interest earner contract's ABI, deployment address and so forth. This interest earner UI instantiates the staking contract in order to interact and transfer tokens to end users and so forth.

How to deploy this UI

Clone this repository

git clone [email protected]:second-state/interest-earner-user-interface.git

ABI and address of interest earner contract

Paste the ABI into the interest_earner_abi.json file and the address of the interest earner contract's successfully deployed contract instance into the interest_earner_contract_address.json file.

Contract address of ERC20 contract (NOT staking contract)

Paste the ABI into the erc20_abi.json file and the address of the ERC20's successfully deployed contract instance into the erc20_contract_address.json file.

Installing

Then simply type

npm install

Running

Run on local

To run on local system, type

node server.js

The site will then be hosted at http://localhost/

GitHub pages

To publish/deploy on GitHub pages, simply type

npm run deploy

The site will then be hosted to https://second-state.github.io/interest-earner-user-interface/html/index.html

Usage

Just browse to the URL where the UI is hosted and ensure that your MetaMask wallet is configured to run on the same network (where the contracts are deployed). Default is Ethereum mainnet.

Screen Shot 2022-03-12 at 2 08 53 pm

interest-earner-user-interface's People

Contributors

tpmccallum avatar

Stargazers

 avatar

Watchers

Michael Yuan avatar James Cloos avatar hydai avatar  avatar  avatar

interest-earner-user-interface's Issues

Replace text

At present there is a message which says Rn-stake
Find and replace with Re-stake

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.