Commit edf70955 authored by Hayden Adams's avatar Hayden Adams

update to web3@1.0

parent 731b3168
......@@ -5,11 +5,11 @@
"private": true,
"dependencies": {
"ramda": "^0.25.0",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react": "^16.1.1",
"react-dom": "^16.1.1",
"react-scripts": "1.0.14",
"react-web3": "^0.4.3",
"web3": "^1.0.0-beta.23"
"web3": "^1.0.0-beta.26"
},
"scripts": {
"start": "react-scripts start",
......
......@@ -6,7 +6,7 @@ library SafeMath {
/// @dev Multiplies a times b
function mul(uint256 a, uint256 b)
internal
constant
pure
returns (uint256)
{
uint256 c = a * b;
......@@ -17,7 +17,7 @@ library SafeMath {
/// @dev Divides a by b
function div(uint256 a, uint256 b)
internal
constant
pure
returns (uint256)
{
// assert(b > 0); // Solidity automatically throws when dividing by 0
......@@ -29,7 +29,7 @@ library SafeMath {
/// @dev Subtracts a from b
function sub(uint256 a, uint256 b)
internal
constant
pure
returns (uint256)
{
assert(b <= a);
......@@ -39,7 +39,7 @@ library SafeMath {
/// @dev Adds a to b
function add(uint256 a, uint256 b)
internal
constant
pure
returns (uint256)
{
uint256 c = a + b;
......
......@@ -7,67 +7,6 @@
font-family: Optima, sans-serif;
}
.title {
position: fixed;
font-size: 10vh;
margin-top: 1vh;
margin-left: 2vh;
float: left;
text-shadow: 3px 3px 10px #f29ae1;
color: rgb(220, 173, 247);
font-weight: bold;
-webkit-text-stroke-width: 1px;
-webkit-text-stroke-color: rgb(180, 81, 179);
}.title:hover{
color: rgb(122, 251, 255);
text-shadow: 3px 3px 10px #2daae0;
font-weight: bold;
-webkit-text-stroke-width: 2px;
-webkit-text-stroke-color: rgb(22, 177, 210);
}
/* entire container, keeps perspective */
.titled-container {
perspective: 1000px;
}
/* flip the pane when hovered */
.titled-container:hover .title, .titled-container.hover .title {
transform: rotateX(180deg);
}
.titled-container, .front, .back {
width: 1vh;
height: 0.1vh;
}
/* flip speed goes here */
.title {
transition: 1s;
transform-style: preserve-3d;
position: relative;
}
/* hide back of pane during swap */
.front, .back {
backface-visibility: hidden;
position: absolute;
top: 0;
left: 0;
}
/* front pane, placed above back */
.front {
z-index: 2;
/* for firefox 31 */
transform: rotateX(0deg);
}
/* back, initially hidden pane */
.back {
transform: rotateX(180deg);
}
.noICO {
position:fixed;
top:3vh;
......@@ -265,38 +204,6 @@
/*border-color: rgb(122, 251, 255);*/
}
.instructions {
position: fixed;
background-color: rgba(0,0,0,0.4);
bottom: 1vh;
border-radius: 15px;
border: 1px solid rgb(180, 81, 179);
color: rgb(122, 251, 255);
text-shadow: 2px 2px 10px #2daae0;
margin-left: 35vw;
margin-right: 1vw;
-webkit-transition-duration: 0.4s;
transition-duration: 0.4s;
} .instructions:hover{
color: rgb(216, 169, 236);
text-shadow: 1px 1px 5px #ff69f0;
}
.instructions-title {
text-align: left;
padding-left: 40px;
padding-top: 10px;
font-size: 22px;
}
.instructions-text {
font-size: 15px;
padding-top: 10px;
text-align: left;
padding-left: 25px;
padding-right: 15px;
}
a:visited {
color: rgb(122, 251, 255);
}
......@@ -309,8 +216,3 @@ a:hover {
color: rgb(216, 169, 236);
text-shadow: 1px 1px 5px #ff69f0;
}
.instructions-link {
padding-top: 14px;
text-align: left;
}
This diff is collapsed.
.instructions {
position: fixed;
background-color: rgba(0,0,0,0.4);
bottom: 1vh;
border-radius: 15px;
border: 1px solid rgb(180, 81, 179);
color: rgb(122, 251, 255);
text-shadow: 2px 2px 10px #2daae0;
margin-left: 35vw;
margin-right: 1vw;
-webkit-transition-duration: 0.4s;
transition-duration: 0.4s;
} .instructions:hover{
color: rgb(216, 169, 236);
text-shadow: 1px 1px 5px #ff69f0;
}
.instructions-title {
text-align: left;
padding-left: 40px;
padding-top: 10px;
font-size: 22px;
}
.instructions-text {
font-size: 15px;
padding-top: 10px;
text-align: left;
padding-left: 25px;
padding-right: 15px;
}
.instructions-link {
padding-top: 14px;
text-align: left;
}
import React, { Component } from 'react';
import './Instructions.css';
class Instructions extends Component{
render() {
return (
<div className="instructions">
<div className="instructions-title">Instructions and Stuff</div>
<div className="instructions-text">
1) Add UNI test token address to MetaMask (first time only)<br/>
&nbsp;&nbsp;&nbsp;&nbsp;Token Address: <i>0xca9901076d02f89794262869aad1340bd45d8489</i><br/><br/>
2) Check that MetaMask is connected to the Rinkeby Testnet<br/><br/>
3) You can now buy UNI test tokens with ETH! Visit the&nbsp;
<span className="instructions-link"><a href= "https://faucet.rinkeby.io/">Rinkeby faucet</a></span> to aquire testnet ETH <br/><br/>
4) To buy ETH with UNI you must approve the Uniswap smart contract to transfer UNI tokens on your behalf. Click the "Approve" button now! (first time only)<br/><br/>
5) Rate is variable based on token availiblity, enter number of tokens to see rate and cost.<br/><br/>
6) This is a proof-of-concept for a decentralized Market Maker exchange. Stay tuned for token-to-token pairs, the ability to become a Market Creator and collect fees,
and a Mainet launch! :) <br/> <br/>
7) This demo was hastily programmed by a single developer <i>(Hi, my name is Hayden!)</i>. Please reach out to me with any questions, comments, complaints, or bug reports.<br/><br/>
&nbsp;&nbsp;Email: hayden@uniswap.io &nbsp;&nbsp;
<span className="instructions-link"><a href= "https://github.com/haydenadams/uniswap">GitHub: https://github.com/haydenadams/uniswap<br/></a></span>
&nbsp;&nbsp;ETH Address: 0x4779721CaC18A46DbCF148f2Dd7A8E6cc1F90078<br/><br/>
</div>
</div>
);
}
}
export default Instructions;
.title {
position: fixed;
font-size: 10vh;
margin-top: 1vh;
margin-left: 2vh;
float: left;
text-shadow: 3px 3px 10px #f29ae1;
color: rgb(220, 173, 247);
font-weight: bold;
-webkit-text-stroke-width: 1px;
-webkit-text-stroke-color: rgb(180, 81, 179);
}.title:hover{
color: rgb(122, 251, 255);
text-shadow: 3px 3px 10px #2daae0;
font-weight: bold;
-webkit-text-stroke-width: 2px;
-webkit-text-stroke-color: rgb(22, 177, 210);
}
/* entire container, keeps perspective */
.titled-container {
perspective: 1000px;
}
/* flip the pane when hovered */
.titled-container:hover .title, .titled-container.hover .title {
transform: rotateX(180deg);
}
.titled-container, .front, .back {
width: 1vh;
height: 0.1vh;
}
/* flip speed goes here */
.title {
transition: 1s;
transform-style: preserve-3d;
position: relative;
}
/* hide back of pane during swap */
.front, .back {
backface-visibility: hidden;
position: absolute;
top: 0;
left: 0;
}
/* front pane, placed above back */
.front {
z-index: 2;
/* for firefox 31 */
transform: rotateX(0deg);
}
/* back, initially hidden pane */
.back {
transform: rotateX(180deg);
}
import React, { Component } from 'react';
import './Title.css';
class Title extends Component{
render() {
return (
<div className="titled-container">
<div className="title">
<div className="front">UNISWAP</div>
<div className="back">UNISWAP</div>
</div>
</div>
);
}
}
export default Title;
import React from 'react';
import ReactDOM from 'react-dom';
import { Web3Provider } from 'react-web3';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import { Web3Provider } from 'react-web3';
{/*
ReactDOM.render(
<Web3Provider>
<App />
</Web3Provider>, document.getElementById('root'));
registerServiceWorker();
<App />
</Web3Provider>, document.getElementById('root')
);
*/}
ReactDOM.render(
<App />, document.getElementById('root')
);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment