Added index and documentation
This commit is contained in:
parent
7355f73de8
commit
fbe2bc0b3b
|
@ -37,7 +37,7 @@ nodemon src/service.js
|
|||
```
|
||||
|
||||
## Test DApp
|
||||
To run the test dapp, use `embark run` and then browse `http://localhost:8000/identity.html`.
|
||||
To run the test dapp, use `embark run` and then browse `http://localhost:8000/index.html`.
|
||||
|
||||
The gas relayer service needs to be running, and configured correctly to process the transactions. Things to take in account are: the account used in embark, and the contract addresses.
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ import TextField from '@material-ui/core/TextField';
|
|||
import config from '../config';
|
||||
import web3 from 'Embark/web3';
|
||||
import {withStyles} from '@material-ui/core/styles';
|
||||
import { Typography } from '@material-ui/core';
|
||||
const styles = theme => ({
|
||||
root: {
|
||||
width: '100%',
|
||||
|
@ -155,6 +156,11 @@ class ApproveAndCallGasRelayed extends Component {
|
|||
render(){
|
||||
const {classes} = this.props;
|
||||
return <div>
|
||||
<Card className={classes.card}>
|
||||
<CardContent>
|
||||
<b>This functionality is used when a Identity will invoke a contract function that requires a transfer of Tokens</b>
|
||||
</CardContent>
|
||||
</Card>
|
||||
{ this.state.transactionError && <MySnackbarContentWrapper variant="error" message={this.state.transactionError} /> }
|
||||
<Card className={classes.card}>
|
||||
<CardHeader title="1. Transaction Data" />
|
||||
|
|
|
@ -94,7 +94,7 @@ class Body extends Component {
|
|||
return <Fragment>
|
||||
<Tabs value={tab} onChange={this.handleChange}>
|
||||
<Tab label="Transfer SNT" />
|
||||
<Tab label="????" />
|
||||
<Tab label="Execute" />
|
||||
</Tabs>
|
||||
{tab === 0 && <Container><TransferSNT clearMessages={this.clearMessages} web3={web3js} kid={kid} skid={skid} nonce={nonce} /></Container>}
|
||||
{tab === 1 && <Container>TODO</Container>}
|
||||
|
|
|
@ -157,6 +157,11 @@ class CallGasRelayed extends Component {
|
|||
render(){
|
||||
const {classes} = this.props;
|
||||
return <div>
|
||||
<Card className={classes.card}>
|
||||
<CardContent>
|
||||
<b>This functionality is used when a Identity will invoke a contract function or transfer ether without paying fees </b>
|
||||
</CardContent>
|
||||
</Card>
|
||||
{ this.state.transactionError && <MySnackbarContentWrapper variant="error" message={this.state.transactionError} /> }
|
||||
<Card className={classes.card}>
|
||||
<CardHeader title="1. Transaction Data" />
|
||||
|
|
|
@ -144,6 +144,11 @@ class TransferSNT extends Component {
|
|||
render(){
|
||||
const {classes} = this.props;
|
||||
return <div>
|
||||
<Card className={classes.card}>
|
||||
<CardContent>
|
||||
<b>This functionality is used for SNT transfers without paying eth fees</b>
|
||||
</CardContent>
|
||||
</Card>
|
||||
{ this.state.transactionError && <MySnackbarContentWrapper variant="error" message={this.state.transactionError} /> }
|
||||
<Card className={classes.card}>
|
||||
<CardHeader title="1. Transaction Data" />
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h3>Gas Relayer Demos</h3>
|
||||
<p>The following demos are available:</p>
|
||||
<ul>
|
||||
<li><a href="./identity.html">identity.html</a></li>
|
||||
<li><a href="./sntcontroller.html">sntcontroller.html</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"contracts": ["contracts/**"],
|
||||
"app": {
|
||||
"index.html": "app/index.html",
|
||||
"js/identity.js": ["app/identity.js"],
|
||||
"identity.html": "app/identity.html",
|
||||
"js/sntcontroller.js": ["app/sntcontroller.js"],
|
||||
|
|
Loading…
Reference in New Issue