├── .gitignore ├── README.md ├── _redirects ├── netlify.toml ├── package-lock.json ├── package.json ├── public ├── favicon.ico ├── favicon.png ├── images │ ├── .DS_Store │ ├── EarnLogo.svg │ ├── Group 3.png │ ├── actionCardCompoundLoan.png │ ├── actionCardDAI.png │ ├── actionCardETHiBTC.png │ ├── actionCardETHsBTC.png │ ├── actionCardEth.png │ ├── actionCardEthWbtc.png │ ├── actionCardFulcrum.png │ ├── actionCardKNC.png │ ├── actionCardLong4xBTC.png │ ├── actionCardWbtc.png │ ├── actionCardiETHsBTC.png │ ├── actionCardsBTCsXAU.png │ ├── actionCardsXAU.png │ ├── actionCardsXTZ.png │ ├── actionCardsbtc.png │ ├── approved.svg │ ├── buildonethereum.png │ ├── bzx.svg │ ├── bzxlogo.svg │ ├── compound 2.svg │ ├── compound.svg │ ├── dDAILogo.svg │ ├── daiIcon.svg │ ├── ddailogo.png │ ├── discord.svg │ ├── dydx.png │ ├── dydx.svg │ ├── eaBoth.png │ ├── earn-logo.svg │ ├── ethBG01.png │ ├── ethBG02.jpg │ ├── ethlong4x.png │ ├── ethshort4x.png │ ├── favicon16.png │ ├── favicon32.png │ ├── fulcrum.svg │ ├── hamburger.svg │ ├── icons │ │ ├── 0x.png │ │ ├── blackmoon.png │ │ ├── dai.png │ │ ├── erc20.svg │ │ ├── eth.png │ │ ├── eth.svg │ │ ├── kyber.png │ │ ├── loopring.png │ │ ├── mana.png │ │ └── odem.png │ ├── kyber.svg │ ├── little_arrow.png │ ├── logo.svg │ ├── maker.svg │ ├── notificationIcon.svg │ ├── pending.svg │ ├── r_dai.png │ ├── recap_CompoundDAI.png │ ├── recap_DAI.png │ ├── recap_ETH.png │ ├── recap_FulcrumDAI.png │ ├── recap_KNC.png │ ├── recap_earhBTCETH.png │ ├── recap_sBTC.png │ ├── recap_sBTCiETH.png │ ├── recap_sXAU.png │ ├── recap_sXAUsBTC.png │ ├── recap_sXTZ.png │ ├── recap_wBTC.png │ ├── rejected.svg │ ├── synthetix.png │ ├── telegram.svg │ ├── uniswap.svg │ ├── wallet.svg │ └── winner.png ├── index.html ├── logo192.png ├── logo512.png ├── manifest.json └── robots.txt ├── src ├── App │ ├── global.scss │ ├── index.js │ └── styles.css ├── Untitled-1 ├── Wallet.js ├── class │ ├── .DS_Store │ ├── Rx.js │ ├── artifacts │ │ ├── BaseRecipe.json │ │ ├── BuyEthRecipe.json │ │ ├── BuyPTokenRecipe.json │ │ ├── BuySynthRecipe.json │ │ ├── BuyTokenRecipe.json │ │ ├── CompoundRepayRecipe.json │ │ ├── DCA.json │ │ ├── DDAI.json │ │ ├── DDAIEvents.json │ │ ├── DDAIGSNBouncer.json │ │ ├── ICEToken.json │ │ ├── ICToken.json │ │ ├── IDDAI.json │ │ ├── IKyberNetwork.json │ │ ├── IMakerFeed.json │ │ ├── IMoneyMarket.json │ │ ├── IPToken.json │ │ ├── IPriceFeed.json │ │ ├── ISynthetix.json │ │ ├── ISynthetixDepot.json │ │ ├── MockCEToken.json │ │ ├── MockCToken.json │ │ ├── MockDai.json │ │ ├── MockIToken.json │ │ ├── MockKyberNetwork.json │ │ ├── MockRecipe.json │ │ ├── MockSnx.json │ │ ├── MockSynthetix.json │ │ ├── MockToken.json │ │ └── MockUSDFeed.json │ ├── config.js │ ├── ddai.js │ ├── models │ │ └── actions.js │ └── utils.js ├── components │ ├── Avatar.js │ ├── BackgroundImage.js │ ├── BackgroundImage.scss │ ├── CardAPR.js │ ├── CardAction.js │ ├── CardAmount.js │ ├── CardEarned.js │ ├── CardInvestmentAmount.js │ ├── CardInvestmentToken.js │ ├── CardOneButton.js │ ├── CardRecap.js │ ├── CardReward.js │ ├── CardSelectRecipe.js │ ├── CardSelectedRecipe.js │ ├── CardTwoButtons.js │ ├── CenteredColumns.js │ ├── Clients.js │ ├── Clients.scss │ ├── ClientsSection.js │ ├── ConnectW3Button.js │ ├── Contact.js │ ├── ContactForm.js │ ├── ContactSection.js │ ├── ContactSection.scss │ ├── Conversation.js │ ├── Footer.js │ ├── Footer.scss │ ├── FormField.js │ ├── FormStatus.js │ ├── HeroSection.js │ ├── If.js │ ├── InvestMoreDAI.js │ ├── KyberWinner.js │ ├── LinkButton.js │ ├── Logo.js │ ├── Navbar.js │ ├── NavbarContainer.js │ ├── NotificationCard.js │ ├── NotificationDb.js │ ├── NotificationIcon.js │ ├── NotificationsDrawer.js │ ├── PageHeading.js │ ├── PrimaryButton.js │ ├── SecondaryButton.js │ ├── Section.js │ ├── Section.scss │ ├── SectionButton.js │ ├── SectionHeader.js │ ├── SectionHeader.scss │ ├── SimpleSnackbar.js │ ├── Testimonials.js │ ├── Testimonials.scss │ ├── TestimonialsSection.js │ ├── TotBalance.js │ ├── Warning.js │ ├── Web3Button.js │ └── index.js ├── config.js ├── containers │ ├── ActionCardContainer.js │ ├── CardContainer.js │ ├── CardContainerTest.js │ └── HeaderContainer.js ├── context │ └── index.js ├── history.js ├── images │ ├── actionCardEth.png │ ├── bzx.svg │ ├── compound.svg │ ├── dydx.png │ ├── dydx.svg │ ├── earn-logo.svg │ ├── ethBG01.png │ ├── ethBG02.jpg │ ├── favicon.ico │ ├── hamburger.svg │ ├── icons │ │ ├── 0x.png │ │ ├── blackmoon.png │ │ ├── dai.png │ │ ├── erc20.svg │ │ ├── eth.png │ │ ├── eth.svg │ │ ├── kyber.png │ │ ├── loopring.png │ │ ├── mana.png │ │ └── odem.png │ ├── little_arrow.png │ ├── logo.svg │ ├── maker.svg │ ├── notificationIcon.svg │ ├── r_dai.png │ ├── uniswap.svg │ └── wallet.svg ├── index.css ├── index.js ├── logo.svg ├── mixpanel.js ├── pages │ ├── deposit │ │ └── index.js │ ├── invest │ │ └── index.js │ ├── landing │ │ └── index.js │ ├── overview │ │ └── index.js │ ├── recipes │ │ └── index.js │ ├── test │ │ └── index.js │ └── withdraw │ │ └── index.js ├── react-app-env.d.ts ├── routes.js └── util │ ├── analytics.js │ ├── auth.js │ ├── contact.js │ └── router.js ├── tsconfig.json └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | 33 | # node.js 34 | # 35 | node_modules/ 36 | npm-debug.log 37 | yarn-error.log 38 | 39 | # BUCK 40 | buck-out/ 41 | \.buckd/ 42 | *.keystore 43 | 44 | # fastlane 45 | # 46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 47 | # screenshots whenever they are needed. 48 | # For more information about the recommended setup visit: 49 | # https://docs.fastlane.tools/best-practices/source-control/ 50 | 51 | */fastlane/report.xml 52 | */fastlane/Preview.html 53 | */fastlane/screenshots 54 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 2 | 3 | ## Available Scripts 4 | 5 | In the project directory, you can run: 6 | 7 | ### `npm start` 8 | 9 | Runs the app in the development mode.
10 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 11 | 12 | The page will reload if you make edits.
13 | You will also see any lint errors in the console. 14 | 15 | ### `npm test` 16 | 17 | Launches the test runner in the interactive watch mode.
18 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 19 | 20 | ### `npm run build` 21 | 22 | Builds the app for production to the `build` folder.
23 | It correctly bundles React in production mode and optimizes the build for the best performance. 24 | 25 | The build is minified and the filenames include the hashes.
26 | Your app is ready to be deployed! 27 | 28 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 29 | 30 | ### `npm run eject` 31 | 32 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!** 33 | 34 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 35 | 36 | Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. 37 | 38 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. 39 | 40 | ## Learn More 41 | 42 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 43 | 44 | To learn React, check out the [React documentation](https://reactjs.org/). 45 | -------------------------------------------------------------------------------- /_redirects: -------------------------------------------------------------------------------- 1 | # These rules will change if you change your site’s custom domains or HTTPS settings 2 | 3 | # Redirect default Netlify subdomain to primary domain 4 | https://ddai.netlify.com/* https://ddai.dexwallet.io/:splat 301! 5 | https://www.ddai.netlify.com/* https://ddai.dexwallet.io/:splat 301! -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | functions = "functions" 3 | publish = "build" 4 | [[redirects]] 5 | from = "/*" 6 | to = "/index.html" 7 | status = 200 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ui", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@material-ui/core": "^4.5.1", 7 | "@material-ui/icons": "^4.5.1", 8 | "@material/react-snackbar": "^0.15.0", 9 | "@types/jest": "24.0.18", 10 | "@types/node": "12.7.4", 11 | "@types/react": "16.9.2", 12 | "@types/react-dom": "16.9.0", 13 | "airtable": "^0.7.2", 14 | "bignumber.js": "^9.0.0", 15 | "bulma": "^0.8.0", 16 | "eth-dexcore-js": "^0.1.11", 17 | "history": "^4.10.1", 18 | "mixpanel-browser": "^2.30.1", 19 | "node-sass": "^4.13.0", 20 | "react": "^16.9.0", 21 | "react-dom": "^16.9.0", 22 | "react-rainbow-components": "^1.4.0", 23 | "react-router-dom": "^5.0.1", 24 | "react-scripts": "3.1.1", 25 | "react-text-loop": "^2.1.1", 26 | "styled-components": "^4.4.0", 27 | "typescript": "3.5.3" 28 | }, 29 | "scripts": { 30 | "start": "react-scripts start", 31 | "build": "react-scripts build", 32 | "test": "react-scripts test", 33 | "eject": "react-scripts eject" 34 | }, 35 | "browserslist": { 36 | "production": [ 37 | ">0.2%", 38 | "not dead", 39 | "not op_mini all" 40 | ], 41 | "development": [ 42 | "last 1 chrome version", 43 | "last 1 firefox version", 44 | "last 1 safari version" 45 | ] 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/favicon.ico -------------------------------------------------------------------------------- /public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/favicon.png -------------------------------------------------------------------------------- /public/images/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/.DS_Store -------------------------------------------------------------------------------- /public/images/Group 3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/Group 3.png -------------------------------------------------------------------------------- /public/images/actionCardCompoundLoan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/actionCardCompoundLoan.png -------------------------------------------------------------------------------- /public/images/actionCardDAI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/actionCardDAI.png -------------------------------------------------------------------------------- /public/images/actionCardETHiBTC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/actionCardETHiBTC.png -------------------------------------------------------------------------------- /public/images/actionCardETHsBTC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/actionCardETHsBTC.png -------------------------------------------------------------------------------- /public/images/actionCardEth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/actionCardEth.png -------------------------------------------------------------------------------- /public/images/actionCardEthWbtc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/actionCardEthWbtc.png -------------------------------------------------------------------------------- /public/images/actionCardFulcrum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/actionCardFulcrum.png -------------------------------------------------------------------------------- /public/images/actionCardKNC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/actionCardKNC.png -------------------------------------------------------------------------------- /public/images/actionCardLong4xBTC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/actionCardLong4xBTC.png -------------------------------------------------------------------------------- /public/images/actionCardWbtc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/actionCardWbtc.png -------------------------------------------------------------------------------- /public/images/actionCardiETHsBTC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/actionCardiETHsBTC.png -------------------------------------------------------------------------------- /public/images/actionCardsBTCsXAU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/actionCardsBTCsXAU.png -------------------------------------------------------------------------------- /public/images/actionCardsXAU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/actionCardsXAU.png -------------------------------------------------------------------------------- /public/images/actionCardsXTZ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/actionCardsXTZ.png -------------------------------------------------------------------------------- /public/images/actionCardsbtc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/actionCardsbtc.png -------------------------------------------------------------------------------- /public/images/approved.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Group 9 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /public/images/buildonethereum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/buildonethereum.png -------------------------------------------------------------------------------- /public/images/compound 2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | compound-logo 5 | Created with Sketch. 6 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /public/images/compound.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | compound-logo 5 | Created with Sketch. 6 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /public/images/daiIcon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | asset_DAI-34acd5c0f939280ac76c19e6ab6f608c Copy 8 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /public/images/ddailogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/ddailogo.png -------------------------------------------------------------------------------- /public/images/discord.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | discord 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /public/images/dydx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/dydx.png -------------------------------------------------------------------------------- /public/images/dydx.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | dydx 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /public/images/eaBoth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/eaBoth.png -------------------------------------------------------------------------------- /public/images/ethBG01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/ethBG01.png -------------------------------------------------------------------------------- /public/images/ethBG02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/ethBG02.jpg -------------------------------------------------------------------------------- /public/images/ethlong4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/ethlong4x.png -------------------------------------------------------------------------------- /public/images/ethshort4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/ethshort4x.png -------------------------------------------------------------------------------- /public/images/favicon16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/favicon16.png -------------------------------------------------------------------------------- /public/images/favicon32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/favicon32.png -------------------------------------------------------------------------------- /public/images/hamburger.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Artboard 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /public/images/icons/0x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/icons/0x.png -------------------------------------------------------------------------------- /public/images/icons/blackmoon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/icons/blackmoon.png -------------------------------------------------------------------------------- /public/images/icons/dai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/icons/dai.png -------------------------------------------------------------------------------- /public/images/icons/eth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/icons/eth.png -------------------------------------------------------------------------------- /public/images/icons/eth.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Artboard 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /public/images/icons/kyber.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/icons/kyber.png -------------------------------------------------------------------------------- /public/images/icons/loopring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/icons/loopring.png -------------------------------------------------------------------------------- /public/images/icons/mana.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/icons/mana.png -------------------------------------------------------------------------------- /public/images/icons/odem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/icons/odem.png -------------------------------------------------------------------------------- /public/images/little_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/little_arrow.png -------------------------------------------------------------------------------- /public/images/notificationIcon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | noun_notification_2139043 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /public/images/pending.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Group 5 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /public/images/r_dai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/r_dai.png -------------------------------------------------------------------------------- /public/images/recap_CompoundDAI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/recap_CompoundDAI.png -------------------------------------------------------------------------------- /public/images/recap_DAI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/recap_DAI.png -------------------------------------------------------------------------------- /public/images/recap_ETH.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/recap_ETH.png -------------------------------------------------------------------------------- /public/images/recap_FulcrumDAI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/recap_FulcrumDAI.png -------------------------------------------------------------------------------- /public/images/recap_KNC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/recap_KNC.png -------------------------------------------------------------------------------- /public/images/recap_earhBTCETH.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/recap_earhBTCETH.png -------------------------------------------------------------------------------- /public/images/recap_sBTC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/recap_sBTC.png -------------------------------------------------------------------------------- /public/images/recap_sBTCiETH.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/recap_sBTCiETH.png -------------------------------------------------------------------------------- /public/images/recap_sXAU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/recap_sXAU.png -------------------------------------------------------------------------------- /public/images/recap_sXAUsBTC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/recap_sXAUsBTC.png -------------------------------------------------------------------------------- /public/images/recap_sXTZ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/recap_sXTZ.png -------------------------------------------------------------------------------- /public/images/recap_wBTC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/recap_wBTC.png -------------------------------------------------------------------------------- /public/images/rejected.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Group 7 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /public/images/synthetix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/synthetix.png -------------------------------------------------------------------------------- /public/images/telegram.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | telegram 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /public/images/wallet.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Wallet 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /public/images/winner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/images/winner.png -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | Earn dDai - Interest with smart DeFi recipes 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/public/logo512.png -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | -------------------------------------------------------------------------------- /src/App/global.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | // COLORS 4 | $primary: #F00093; 5 | $info: rgb(77, 77, 77); 6 | $success: #23D160; 7 | $warning: #FFDD57; 8 | $danger: #FF3860; 9 | $light: #F5F5F5; 10 | $dark: #000000; 11 | 12 | // TEXT 13 | $text: #000000; 14 | $link: #3273DC; 15 | $body-family: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", 16 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 17 | "Helvetica", "Arial", sans-serif; 18 | $title-family: false; 19 | $button-family: false; 20 | 21 | // BREAKPOINTS 22 | $gap: 32px; 23 | $tablet: 769px; 24 | $desktop: 960px + (2 * $gap); 25 | $widescreen: 1152px + (2 * $gap); 26 | $fullhd: 1344px + (2 * $gap); 27 | $widescreen-enabled: true; 28 | $fullhd-enabled: false; 29 | 30 | // LAYOUT 31 | $section-padding: 3rem 0rem; 32 | $section-padding-medium: 6rem 0rem; 33 | $section-padding-large: 9rem 0rem; 34 | 35 | // SEE DOCS FOR MORE: 36 | // https://bit.ly/30UvE5O 37 | 38 | // IMPORT BULMA 39 | @import "~bulma/bulma.sass"; 40 | 41 | // IMPORT FONT AWESOME 42 | @import url("https://use.fontawesome.com/releases/v5.10.1/css/all.css"); 43 | 44 | body { 45 | background-color: #ffffff; 46 | } 47 | 48 | -------------------------------------------------------------------------------- /src/App/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from "react"; 2 | import { HeaderContainer } from "../components"; 3 | import Routes from "../routes"; 4 | import { Context, ContextDefaults } from "../context"; 5 | import Wallet from '../Wallet'; 6 | import "./global.scss"; 7 | import "./styles.css"; 8 | import history from '../history'; 9 | import { Router } from "react-router-dom"; 10 | 11 | import DB from '../class/models/actions'; 12 | 13 | class App extends Component { 14 | 15 | constructor(props) { 16 | super(props); 17 | this.state = { 18 | context: { 19 | ...ContextDefaults, 20 | setRecipe: this.setRecipe, 21 | toggleNotificationsDrawer: this.toggleNotificationsDrawer, 22 | closeNotificationsDrawer: this.closeNotificationsDrawer, 23 | selectedRecipe: "", 24 | logs: [] 25 | } 26 | } 27 | } 28 | 29 | componentDidMount() { 30 | Wallet.Rx.subscribe((action, data) => { 31 | this.refresh(); 32 | }); 33 | 34 | setInterval(() => { 35 | this.refresh() 36 | }, 2000); 37 | } 38 | 39 | async refresh() { 40 | if(!Wallet.ddai) return; 41 | DB.account = Wallet.getAddress(); 42 | 43 | const data = await Wallet.ddai.getState(); 44 | await DB.fetchAll( ); 45 | this.setState((prevState) => ({ 46 | context: { 47 | ...prevState.context, 48 | DDAI: data, 49 | transactions: Wallet.Rx.poolMap, 50 | logs: DB.data, 51 | // selectedRecipe: data.Recipe 52 | } 53 | })) 54 | } 55 | 56 | setRecipe = (recipe) => { 57 | this.setState((prevState) => ({ 58 | context:{ 59 | ...prevState.context, 60 | selectedRecipe: recipe 61 | } 62 | })) 63 | } 64 | 65 | closeNotificationsDrawer = () => { 66 | this.setState((prevState => ({ 67 | context:{ 68 | ...prevState.context, 69 | notificationDrawerOpen: false 70 | } 71 | }))) 72 | } 73 | 74 | toggleNotificationsDrawer = () => { 75 | this.setState((prevState => ({ 76 | context:{ 77 | ...prevState.context, 78 | notificationDrawerOpen: !prevState.context.notificationDrawerOpen 79 | } 80 | }))) 81 | } 82 | 83 | render() { 84 | return ( 85 | 86 |
87 | 88 |
89 | 90 | 91 |
92 |
93 |
94 |
95 | ); 96 | } 97 | } 98 | App.propTypes = {}; 99 | 100 | export default App; 101 | -------------------------------------------------------------------------------- /src/App/styles.css: -------------------------------------------------------------------------------- 1 | /* Generic CSS */ 2 | 3 | 4 | body { 5 | margin: 0; 6 | padding: 0; 7 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", 8 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 9 | sans-serif; 10 | -webkit-font-smoothing: antialiased; 11 | -moz-osx-font-smoothing: grayscale; 12 | } 13 | 14 | code { 15 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", 16 | monospace; 17 | } 18 | 19 | 20 | * { 21 | -webkit-font-smoothing: antialiased; 22 | -moz-osx-font-smoothing: grayscale; 23 | text-decoration: none !important; 24 | } 25 | 26 | @import url("https://fonts.googleapis.com/css?family=Roboto+Mono:300,400,700&display=swap"); 27 | 28 | :root { 29 | --almost-black: #0a0a0a; 30 | --light-black: #797979; 31 | --almost-white: #f2f2f2; 32 | --white: #ffffff; 33 | --text-big: 1.3rem; 34 | --text-medium: 1rem; 35 | --text-prettysmall: 0.9rem; 36 | --text-small: 0.8rem; 37 | --text-big-mobile: 1.1rem; 38 | --text-medium-mobile: 0.9rem; 39 | --main-font: "Roboto Mono", monospace; 40 | --font-main-button: 1rem; 41 | } 42 | 43 | html, 44 | body { 45 | margin: 0; 46 | font-family: var(--main-font); 47 | font-weight: 300; 48 | } 49 | 50 | a { 51 | color: var(--almost-black); 52 | opacity: 1; 53 | } 54 | 55 | a:hover { 56 | opacity: 0.6; 57 | } 58 | 59 | button { 60 | cursor: pointer; 61 | } -------------------------------------------------------------------------------- /src/Untitled-1: -------------------------------------------------------------------------------- 1 | MacBook-Pro-van-Mick-3:migrations mickdegraaf$ yarn migrate:using-env 2 | yarn run v1.15.2 3 | $ USE_CONFIG=1 yarn migrate 4 | $ ts-node ./src/run.ts 5 | Starting Migrations 6 | Using DAI deployed at: 0xC4375B7De8af5a38a93548eb8453a498222C4fF2 7 | Deployed MockRep at: 0x917d6fa9af3c1b0cf75da59fbee859bcc353072c 8 | Using Fulcrum IDAI deployed at: 0xA1e58F3B1927743393b25f261471E1f2D3D9f0F6 9 | Deployed mockCDai at: 0x6b35a9136c8725547c0c6609a4b750c3cc69b0b8 10 | Deployed mockCEth at: 0x888f83ec4b084f77384a5d3782a36d4cb9665037 11 | Deployed mockCrep at: 0x33d77e422b0613cae24bf47db497c6d33221cf18 12 | Using Kyber network deployed at: 0x692f391bCc85cefCe8C237C01e1f636BbD70EA4D 13 | Deployed DDAI at: 0x9ee09f6564a5241508029f9451558dd58d3b957b 14 | Deployed CompoundRepayRecipe at: 0x4c917fcf98fe4dd9d3638e5285f4e725e3b63905 15 | Deployed MockRecipe: 0x572610cb3d00063fb59bb58807069003284228d6 16 | Deployed BuyTokenRecipe: 0xdd7abc70d52032ec0960cac6e7d9acf42f9acbfb 17 | Deployed buyPTokenRecipe: 0xfa60c27d0f894df8f1cf3b919be49099b09e6cac 18 | Deployed BuySynthRecipe: 0x12e9dab2980635b0037751679cd364b93b969de3 19 | ✨ Done in 58.79s. 20 | MacBook-Pro-van-Mick-3:migrations mickdegraaf$ -------------------------------------------------------------------------------- /src/Wallet.js: -------------------------------------------------------------------------------- 1 | import { EthereumHDWallet } from 'eth-dexcore-js'; 2 | import DDAI from './class/ddai' 3 | import Rx from './class/Rx'; 4 | 5 | const wallet = new EthereumHDWallet(); 6 | 7 | wallet.Rx = new Rx(wallet); 8 | wallet.addPlugin('ddai', DDAI); 9 | 10 | window.Wallet = wallet; 11 | 12 | 13 | export { wallet as default } -------------------------------------------------------------------------------- /src/class/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dexlab-io/ddai-frontend/518f8bdbafd56e29c68004093abcb8a5e038ede8/src/class/.DS_Store -------------------------------------------------------------------------------- /src/class/Rx.js: -------------------------------------------------------------------------------- 1 | import find from 'lodash/find'; 2 | import { Transaction } from 'eth-dexcore-js'; 3 | 4 | class Rx { 5 | 6 | static TX_STATES = { 7 | BROADCASTED: 'Broadcasted', 8 | MINED: 'Mined', 9 | }; 10 | 11 | static ACTIONS = { 12 | TX_BROADCASTED: '[TransactionPool] Tx Broadcasted', 13 | TX_MINED: '[TransactionPool] Tx Mined', 14 | }; 15 | 16 | constructor(wallet) { 17 | this.W = wallet; 18 | this.poolMap = []; 19 | this.isPolling = false; 20 | this.interval = 2000; 21 | this.handle = null; 22 | this.listeners = []; 23 | } 24 | 25 | async checkPending() { 26 | console.log('Checking....', this.poolMap.filter( t => t.statusInternal !== Rx.TX_STATES.MINED )) 27 | this.poolMap 28 | // .filter( t => t.statusInternal !== Rx.TX_STATES.MINED ) 29 | .forEach( async (tx, index) => { 30 | if(tx.statusInternal == Rx.TX_STATES.MINED) { 31 | return; 32 | } 33 | // We need full tx data so we both get the receipt and the tx 34 | // TODO get this data in parallel 35 | const resp = await this.W.web3.eth.getTransactionReceipt(tx.hash); 36 | const resp2 = await this.W.web3.eth.getTransaction(tx.hash); 37 | tx = { 38 | ...tx, 39 | ...resp, 40 | ...resp2 41 | }; 42 | if(resp != null && resp.blockNumber > 0) { 43 | tx.statusInternal = Rx.TX_STATES.MINED; 44 | this.notify(Rx.ACTIONS.TX_MINED, tx); 45 | this.shouldStop(); 46 | } 47 | this.poolMap[index] = tx; 48 | }); 49 | } 50 | 51 | startPoller() { 52 | if(this.handle) return; 53 | 54 | this.checkPending(); 55 | this.handle = setInterval(this.checkPending.bind(this), this.interval); 56 | } 57 | 58 | subscribe(listener) { 59 | this.listeners.push(listener); 60 | 61 | /** 62 | * Subscribe should return an unsubscribe function 63 | */ 64 | return function unsubscribe() { 65 | const index = this.listeners.indexOf(listener); 66 | this.listeners.splice(index, 1); 67 | }; 68 | } 69 | 70 | notify( action, tx ) { 71 | this.listeners.forEach( (l) => { 72 | l(action, tx); 73 | }, this); 74 | } 75 | 76 | shouldStop() { 77 | if(this.poolMap.filter( t => t.statusInternal !== Rx.TX_STATES.MINED ).length === 0) { 78 | clearInterval(this.handle); 79 | this.handle = null; 80 | } 81 | } 82 | 83 | get(txHash) { 84 | return find(this.poolMap, {'hash': txHash}); 85 | } 86 | 87 | getAll() { 88 | return this.poolMap; 89 | } 90 | 91 | addFromModel(tx) { 92 | if(tx.hash && this.get(tx.hash)) return; 93 | 94 | tx.statusInternal = Rx.TX_STATES.BROADCASTED 95 | 96 | this.poolMap.push(tx); 97 | this.notify(Rx.ACTIONS.TX_BROADCASTED, tx); 98 | 99 | this.startPoller(); 100 | } 101 | 102 | add(txHash, label="Unknown Tx") { 103 | if(this.get(txHash)) return; 104 | 105 | const tx = Transaction.build({ 106 | statusInternal: Rx.TX_STATES.BROADCASTED, 107 | hash: txHash, 108 | label: label 109 | }); 110 | 111 | this.poolMap.push(tx); 112 | this.notify(Rx.ACTIONS.TX_BROADCASTED, tx); 113 | 114 | this.startPoller(); 115 | } 116 | 117 | async waitForTx(txHash) { 118 | return new Promise((resolve, reject) => { 119 | this.add(txHash); 120 | this.subscribe( (tx) => { 121 | if(tx.hash === txHash && tx.statusInternal === Rx.TX_STATES.MINED){ 122 | resolve(tx); 123 | } 124 | }) 125 | } 126 | ); 127 | } 128 | } 129 | 130 | export default Rx; -------------------------------------------------------------------------------- /src/class/artifacts/DDAIEvents.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": "2.0.0", 3 | "contractName": "DDAIEvents", 4 | "compilerOutput": { 5 | "abi": [], 6 | "evm": { 7 | "bytecode": { 8 | "linkReferences": {}, 9 | "object": "0x6080604052348015600f57600080fd5b50603e80601d6000396000f3fe6080604052600080fdfea265627a7a72315820d08dfa3e2ed4df42baa0a3416ef729625e28e4ef46b118d75ac19fe92ab81bde64736f6c634300050b0032", 10 | "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x3E DUP1 PUSH1 0x1D PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG2 PUSH6 0x627A7A723158 KECCAK256 0xd0 DUP14 STATICCALL RETURNDATACOPY 0x2e 0xd4 0xdf TIMESTAMP 0xba LOG0 LOG3 COINBASE PUSH15 0xF729625E28E4EF46B118D75AC19FE9 0x2a 0xb8 SHL 0xde PUSH5 0x736F6C6343 STOP SDIV SIGNEXTEND STOP ORIGIN ", 11 | "sourceMap": "34:28:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;34:28:0;;;;;;;" 12 | } 13 | } 14 | }, 15 | "sources": { 16 | "DDAI/DDAIEvents.sol": { 17 | "id": 0 18 | } 19 | }, 20 | "sourceCodes": { 21 | "DDAI/DDAIEvents.sol": "pragma solidity >=0.4.21 <0.6.0;\n\ncontract DDAIEvents {\n \n}" 22 | }, 23 | "sourceTreeHashHex": "0xa563113c8ecf3f21035e999d99fd50a3bd6da7683ac5d058747e231043d7a90a", 24 | "compiler": { 25 | "name": "solc", 26 | "version": "soljson-v0.5.11+commit.c082d0b4.js", 27 | "settings": { 28 | "optimizer": { 29 | "enabled": false 30 | }, 31 | "outputSelection": { 32 | "*": { 33 | "*": [ 34 | "abi", 35 | "evm.bytecode.object" 36 | ] 37 | } 38 | }, 39 | "remappings": [] 40 | } 41 | }, 42 | "networks": {} 43 | } -------------------------------------------------------------------------------- /src/class/artifacts/ICEToken.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": "2.0.0", 3 | "contractName": "ICEToken", 4 | "compilerOutput": { 5 | "abi": [ 6 | { 7 | "constant": false, 8 | "inputs": [ 9 | { 10 | "internalType": "address", 11 | "name": "_borrower", 12 | "type": "address" 13 | } 14 | ], 15 | "name": "repayBorrowBehalf", 16 | "outputs": [], 17 | "payable": true, 18 | "stateMutability": "payable", 19 | "type": "function" 20 | } 21 | ], 22 | "evm": { 23 | "bytecode": { 24 | "linkReferences": {}, 25 | "object": "0x", 26 | "opcodes": "", 27 | "sourceMap": "" 28 | }, 29 | "deployedBytecode": { 30 | "linkReferences": {}, 31 | "object": "0x", 32 | "opcodes": "", 33 | "sourceMap": "" 34 | } 35 | } 36 | }, 37 | "sources": { 38 | "interfaces/ICEToken.sol": { 39 | "id": 18 40 | } 41 | }, 42 | "sourceCodes": { 43 | "interfaces/ICEToken.sol": "pragma solidity >=0.4.21 <0.6.0;\n\n// ICE ICE BABY Seperated this from ICToken to allow for repayBorrowBehalf.value()() without compiling errors\ninterface ICEToken {\n function repayBorrowBehalf(address _borrower) external payable;\n}" 44 | }, 45 | "sourceTreeHashHex": "0xe0929c0b6e75753bfb63f657f5810d952917deb7d480d0e5ac4fcff138909c70", 46 | "compiler": { 47 | "name": "solc", 48 | "version": "soljson-v0.5.12+commit.7709ece9.js", 49 | "settings": { 50 | "optimizer": { 51 | "enabled": false 52 | }, 53 | "outputSelection": { 54 | "*": { 55 | "*": [ 56 | "abi", 57 | "evm.bytecode.object", 58 | "evm.bytecode.sourceMap", 59 | "evm.deployedBytecode.object", 60 | "evm.deployedBytecode.sourceMap" 61 | ] 62 | } 63 | }, 64 | "remappings": [ 65 | "openzeppelin-solidity=/Users/mickdegraaf/DDAI/node_modules/openzeppelin-solidity" 66 | ] 67 | } 68 | }, 69 | "networks": {} 70 | } -------------------------------------------------------------------------------- /src/class/artifacts/ICToken.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": "2.0.0", 3 | "contractName": "ICToken", 4 | "compilerOutput": { 5 | "abi": [ 6 | { 7 | "constant": true, 8 | "inputs": [ 9 | { 10 | "internalType": "address", 11 | "name": "_account", 12 | "type": "address" 13 | } 14 | ], 15 | "name": "borrowBalanceCurrent", 16 | "outputs": [ 17 | { 18 | "internalType": "uint256", 19 | "name": "", 20 | "type": "uint256" 21 | } 22 | ], 23 | "payable": false, 24 | "stateMutability": "view", 25 | "type": "function" 26 | }, 27 | { 28 | "constant": false, 29 | "inputs": [ 30 | { 31 | "internalType": "address", 32 | "name": "_borrower", 33 | "type": "address" 34 | }, 35 | { 36 | "internalType": "uint256", 37 | "name": "_repayAmount", 38 | "type": "uint256" 39 | } 40 | ], 41 | "name": "repayBorrowBehalf", 42 | "outputs": [ 43 | { 44 | "internalType": "uint256", 45 | "name": "", 46 | "type": "uint256" 47 | } 48 | ], 49 | "payable": false, 50 | "stateMutability": "nonpayable", 51 | "type": "function" 52 | }, 53 | { 54 | "constant": true, 55 | "inputs": [], 56 | "name": "underlying", 57 | "outputs": [ 58 | { 59 | "internalType": "address", 60 | "name": "", 61 | "type": "address" 62 | } 63 | ], 64 | "payable": false, 65 | "stateMutability": "view", 66 | "type": "function" 67 | } 68 | ], 69 | "evm": { 70 | "bytecode": { 71 | "linkReferences": {}, 72 | "object": "0x", 73 | "opcodes": "", 74 | "sourceMap": "" 75 | }, 76 | "deployedBytecode": { 77 | "linkReferences": {}, 78 | "object": "0x", 79 | "opcodes": "", 80 | "sourceMap": "" 81 | } 82 | } 83 | }, 84 | "sources": { 85 | "interfaces/ICToken.sol": { 86 | "id": 19 87 | } 88 | }, 89 | "sourceCodes": { 90 | "interfaces/ICToken.sol": "\npragma solidity >=0.4.21 <0.6.0;\n\ninterface ICToken {\n function repayBorrowBehalf(address _borrower, uint _repayAmount) external returns(uint256);\n function underlying() external view returns(address);\n function borrowBalanceCurrent(address _account) external view returns(uint256);\n}" 91 | }, 92 | "sourceTreeHashHex": "0xaa32812d70b041da2cf26454799b249587f3854666fc5c80abd54953369c203a", 93 | "compiler": { 94 | "name": "solc", 95 | "version": "soljson-v0.5.12+commit.7709ece9.js", 96 | "settings": { 97 | "optimizer": { 98 | "enabled": false 99 | }, 100 | "outputSelection": { 101 | "*": { 102 | "*": [ 103 | "abi", 104 | "evm.bytecode.object", 105 | "evm.bytecode.sourceMap", 106 | "evm.deployedBytecode.object", 107 | "evm.deployedBytecode.sourceMap" 108 | ] 109 | } 110 | }, 111 | "remappings": [ 112 | "openzeppelin-solidity=/Users/mickdegraaf/DDAI/node_modules/openzeppelin-solidity" 113 | ] 114 | } 115 | }, 116 | "networks": {} 117 | } -------------------------------------------------------------------------------- /src/class/artifacts/IKyberNetwork.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": "2.0.0", 3 | "contractName": "IKyberNetwork", 4 | "compilerOutput": { 5 | "abi": [ 6 | { 7 | "constant": false, 8 | "inputs": [ 9 | { 10 | "internalType": "address", 11 | "name": "src", 12 | "type": "address" 13 | }, 14 | { 15 | "internalType": "uint256", 16 | "name": "srcAmount", 17 | "type": "uint256" 18 | }, 19 | { 20 | "internalType": "address", 21 | "name": "dest", 22 | "type": "address" 23 | }, 24 | { 25 | "internalType": "address payable", 26 | "name": "destAddress", 27 | "type": "address" 28 | }, 29 | { 30 | "internalType": "uint256", 31 | "name": "maxDestAmount", 32 | "type": "uint256" 33 | }, 34 | { 35 | "internalType": "uint256", 36 | "name": "minConversionRate", 37 | "type": "uint256" 38 | }, 39 | { 40 | "internalType": "address", 41 | "name": "walletId", 42 | "type": "address" 43 | } 44 | ], 45 | "name": "trade", 46 | "outputs": [ 47 | { 48 | "internalType": "uint256", 49 | "name": "", 50 | "type": "uint256" 51 | } 52 | ], 53 | "payable": true, 54 | "stateMutability": "payable", 55 | "type": "function" 56 | } 57 | ], 58 | "evm": { 59 | "bytecode": { 60 | "linkReferences": {}, 61 | "object": "0x", 62 | "opcodes": "", 63 | "sourceMap": "" 64 | }, 65 | "deployedBytecode": { 66 | "linkReferences": {}, 67 | "object": "0x", 68 | "opcodes": "", 69 | "sourceMap": "" 70 | } 71 | } 72 | }, 73 | "sources": { 74 | "interfaces/IKyberNetwork.sol": { 75 | "id": 21 76 | } 77 | }, 78 | "sourceCodes": { 79 | "interfaces/IKyberNetwork.sol": "pragma solidity >=0.4.21 <0.6.0;\n\ninterface IKyberNetwork {\n\n function trade(\n address src,\n uint srcAmount,\n address dest,\n address payable destAddress,\n uint maxDestAmount,\n uint minConversionRate,\n address walletId\n ) external payable returns(uint256);\n}" 80 | }, 81 | "sourceTreeHashHex": "0x69da2b36bb0182bad32cdbfec0f1686cd5ab34d89419965d1f55acf9b688d92c", 82 | "compiler": { 83 | "name": "solc", 84 | "version": "soljson-v0.5.12+commit.7709ece9.js", 85 | "settings": { 86 | "optimizer": { 87 | "enabled": false 88 | }, 89 | "outputSelection": { 90 | "*": { 91 | "*": [ 92 | "abi", 93 | "evm.bytecode.object", 94 | "evm.bytecode.sourceMap", 95 | "evm.deployedBytecode.object", 96 | "evm.deployedBytecode.sourceMap" 97 | ] 98 | } 99 | }, 100 | "remappings": [ 101 | "openzeppelin-solidity=/Users/mickdegraaf/DDAI/node_modules/openzeppelin-solidity" 102 | ] 103 | } 104 | }, 105 | "networks": {} 106 | } -------------------------------------------------------------------------------- /src/class/artifacts/IMakerFeed.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": "2.0.0", 3 | "contractName": "IMakerFeed", 4 | "compilerOutput": { 5 | "abi": [ 6 | { 7 | "constant": true, 8 | "inputs": [], 9 | "name": "read", 10 | "outputs": [ 11 | { 12 | "internalType": "bytes32", 13 | "name": "", 14 | "type": "bytes32" 15 | } 16 | ], 17 | "payable": false, 18 | "stateMutability": "view", 19 | "type": "function" 20 | } 21 | ], 22 | "evm": { 23 | "bytecode": { 24 | "linkReferences": {}, 25 | "object": "0x", 26 | "opcodes": "", 27 | "sourceMap": "" 28 | } 29 | } 30 | }, 31 | "sources": { 32 | "interfaces/IMakerFeed.sol": { 33 | "id": 21 34 | } 35 | }, 36 | "sourceCodes": { 37 | "interfaces/IMakerFeed.sol": "pragma solidity >=0.4.21 <0.6.0;\npragma experimental ABIEncoderV2;\n\ninterface IMakerFeed {\n function read() external view returns(bytes32);\n}" 38 | }, 39 | "sourceTreeHashHex": "0x132393d7eddacc035ec0b10bd29d8051060a79d8bffbde0bd192349e68c31af3", 40 | "compiler": { 41 | "name": "solc", 42 | "version": "soljson-v0.5.11+commit.c082d0b4.js", 43 | "settings": { 44 | "optimizer": { 45 | "enabled": false 46 | }, 47 | "outputSelection": { 48 | "*": { 49 | "*": [ 50 | "abi", 51 | "evm.bytecode.object" 52 | ] 53 | } 54 | }, 55 | "remappings": [ 56 | "openzeppelin-solidity=/Users/mickdegraaf/DDAI/node_modules/openzeppelin-solidity" 57 | ] 58 | } 59 | }, 60 | "networks": {} 61 | } -------------------------------------------------------------------------------- /src/class/artifacts/IMoneyMarket.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": "2.0.0", 3 | "contractName": "IMoneyMarket", 4 | "compilerOutput": { 5 | "abi": [ 6 | { 7 | "constant": true, 8 | "inputs": [ 9 | { 10 | "internalType": "address", 11 | "name": "_owner", 12 | "type": "address" 13 | } 14 | ], 15 | "name": "assetBalanceOf", 16 | "outputs": [ 17 | { 18 | "internalType": "uint256", 19 | "name": "", 20 | "type": "uint256" 21 | } 22 | ], 23 | "payable": false, 24 | "stateMutability": "view", 25 | "type": "function" 26 | }, 27 | { 28 | "constant": false, 29 | "inputs": [ 30 | { 31 | "internalType": "address", 32 | "name": "receiver", 33 | "type": "address" 34 | }, 35 | { 36 | "internalType": "uint256", 37 | "name": "burnAmount", 38 | "type": "uint256" 39 | } 40 | ], 41 | "name": "burn", 42 | "outputs": [ 43 | { 44 | "internalType": "uint256", 45 | "name": "loanAmountPaid", 46 | "type": "uint256" 47 | } 48 | ], 49 | "payable": false, 50 | "stateMutability": "nonpayable", 51 | "type": "function" 52 | }, 53 | { 54 | "constant": false, 55 | "inputs": [], 56 | "name": "claimLoanToken", 57 | "outputs": [ 58 | { 59 | "internalType": "uint256", 60 | "name": "claimedAmount", 61 | "type": "uint256" 62 | } 63 | ], 64 | "payable": false, 65 | "stateMutability": "nonpayable", 66 | "type": "function" 67 | }, 68 | { 69 | "constant": false, 70 | "inputs": [ 71 | { 72 | "internalType": "address", 73 | "name": "receiver", 74 | "type": "address" 75 | }, 76 | { 77 | "internalType": "uint256", 78 | "name": "depositAmount", 79 | "type": "uint256" 80 | } 81 | ], 82 | "name": "mint", 83 | "outputs": [ 84 | { 85 | "internalType": "uint256", 86 | "name": "mintAmount", 87 | "type": "uint256" 88 | } 89 | ], 90 | "payable": false, 91 | "stateMutability": "nonpayable", 92 | "type": "function" 93 | }, 94 | { 95 | "constant": true, 96 | "inputs": [], 97 | "name": "supplyInterestRate", 98 | "outputs": [ 99 | { 100 | "internalType": "uint256", 101 | "name": "", 102 | "type": "uint256" 103 | } 104 | ], 105 | "payable": false, 106 | "stateMutability": "view", 107 | "type": "function" 108 | }, 109 | { 110 | "constant": true, 111 | "inputs": [], 112 | "name": "tokenPrice", 113 | "outputs": [ 114 | { 115 | "internalType": "uint256", 116 | "name": "price", 117 | "type": "uint256" 118 | } 119 | ], 120 | "payable": false, 121 | "stateMutability": "view", 122 | "type": "function" 123 | } 124 | ], 125 | "evm": { 126 | "bytecode": { 127 | "linkReferences": {}, 128 | "object": "0x", 129 | "opcodes": "", 130 | "sourceMap": "" 131 | }, 132 | "deployedBytecode": { 133 | "linkReferences": {}, 134 | "object": "0x", 135 | "opcodes": "", 136 | "sourceMap": "" 137 | } 138 | } 139 | }, 140 | "sources": { 141 | "interfaces/IMoneyMarket.sol": { 142 | "id": 22 143 | } 144 | }, 145 | "sourceCodes": { 146 | "interfaces/IMoneyMarket.sol": "pragma solidity >=0.4.21 <0.6.0;\n\ninterface IMoneyMarket {\n function mint(address receiver, uint256 depositAmount) external returns (uint256 mintAmount);\n\n function burn(\n address receiver,\n uint256 burnAmount)\n external\n returns (uint256 loanAmountPaid);\n\n function claimLoanToken()\n external\n returns (uint256 claimedAmount);\n\n // function donateAsset(\n // address tokenAddress)\n // external\n // returns (bool);\n\n function assetBalanceOf(\n address _owner)\n external\n view\n returns (uint256);\n\n function tokenPrice()\n external\n view\n returns (uint256 price);\n\n function supplyInterestRate()\n external\n view\n returns (uint256);\n}" 147 | }, 148 | "sourceTreeHashHex": "0x4a31ae1f5b24e19e84f0a03d707277f4fa2aa74382575dd6c36263516e5a2626", 149 | "compiler": { 150 | "name": "solc", 151 | "version": "soljson-v0.5.12+commit.7709ece9.js", 152 | "settings": { 153 | "optimizer": { 154 | "enabled": false 155 | }, 156 | "outputSelection": { 157 | "*": { 158 | "*": [ 159 | "abi", 160 | "evm.bytecode.object", 161 | "evm.bytecode.sourceMap", 162 | "evm.deployedBytecode.object", 163 | "evm.deployedBytecode.sourceMap" 164 | ] 165 | } 166 | }, 167 | "remappings": [ 168 | "openzeppelin-solidity=/Users/mickdegraaf/DDAI/node_modules/openzeppelin-solidity" 169 | ] 170 | } 171 | }, 172 | "networks": {} 173 | } -------------------------------------------------------------------------------- /src/class/artifacts/IPToken.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": "2.0.0", 3 | "contractName": "IPToken", 4 | "compilerOutput": { 5 | "abi": [ 6 | { 7 | "constant": false, 8 | "inputs": [ 9 | { 10 | "internalType": "address", 11 | "name": "_receiver", 12 | "type": "address" 13 | }, 14 | { 15 | "internalType": "address", 16 | "name": "_depositTokenAddress", 17 | "type": "address" 18 | }, 19 | { 20 | "internalType": "uint256", 21 | "name": "_depositAmount", 22 | "type": "uint256" 23 | }, 24 | { 25 | "internalType": "uint256", 26 | "name": "_maxPriceAllowed", 27 | "type": "uint256" 28 | } 29 | ], 30 | "name": "mintWithToken", 31 | "outputs": [ 32 | { 33 | "internalType": "uint256", 34 | "name": "", 35 | "type": "uint256" 36 | } 37 | ], 38 | "payable": false, 39 | "stateMutability": "nonpayable", 40 | "type": "function" 41 | } 42 | ], 43 | "evm": { 44 | "bytecode": { 45 | "linkReferences": {}, 46 | "object": "0x", 47 | "opcodes": "", 48 | "sourceMap": "" 49 | }, 50 | "deployedBytecode": { 51 | "linkReferences": {}, 52 | "object": "0x", 53 | "opcodes": "", 54 | "sourceMap": "" 55 | } 56 | } 57 | }, 58 | "sources": { 59 | "interfaces/IPToken.sol": { 60 | "id": 23 61 | } 62 | }, 63 | "sourceCodes": { 64 | "interfaces/IPToken.sol": "pragma solidity >=0.4.21 <0.6.0;\n\ninterface IPToken {\n\n function mintWithToken(\n address _receiver,\n address _depositTokenAddress,\n uint256 _depositAmount,\n uint256 _maxPriceAllowed\n )\n external\n returns (uint256);\n\n}" 65 | }, 66 | "sourceTreeHashHex": "0xef1f44b78636632d377c9000862e131b1c53d84a00820a0b12bb698022aa4c14", 67 | "compiler": { 68 | "name": "solc", 69 | "version": "soljson-v0.5.12+commit.7709ece9.js", 70 | "settings": { 71 | "optimizer": { 72 | "enabled": false 73 | }, 74 | "outputSelection": { 75 | "*": { 76 | "*": [ 77 | "abi", 78 | "evm.bytecode.object", 79 | "evm.bytecode.sourceMap", 80 | "evm.deployedBytecode.object", 81 | "evm.deployedBytecode.sourceMap" 82 | ] 83 | } 84 | }, 85 | "remappings": [ 86 | "openzeppelin-solidity=/Users/mickdegraaf/DDAI/node_modules/openzeppelin-solidity" 87 | ] 88 | } 89 | }, 90 | "networks": {} 91 | } -------------------------------------------------------------------------------- /src/class/artifacts/IPriceFeed.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": "2.0.0", 3 | "contractName": "IPriceFeed", 4 | "compilerOutput": { 5 | "abi": [ 6 | { 7 | "constant": true, 8 | "inputs": [], 9 | "name": "read", 10 | "outputs": [ 11 | { 12 | "internalType": "bytes32", 13 | "name": "", 14 | "type": "bytes32" 15 | } 16 | ], 17 | "payable": false, 18 | "stateMutability": "view", 19 | "type": "function" 20 | } 21 | ], 22 | "evm": { 23 | "bytecode": { 24 | "linkReferences": {}, 25 | "object": "0x", 26 | "opcodes": "", 27 | "sourceMap": "" 28 | }, 29 | "deployedBytecode": { 30 | "linkReferences": {}, 31 | "object": "0x", 32 | "opcodes": "", 33 | "sourceMap": "" 34 | } 35 | } 36 | }, 37 | "sources": { 38 | "interfaces/IPriceFeed.sol": { 39 | "id": 24 40 | } 41 | }, 42 | "sourceCodes": { 43 | "interfaces/IPriceFeed.sol": "pragma solidity >=0.4.21 <0.6.0;\n\ninterface IPriceFeed {\n function read() external view returns(bytes32);\n}" 44 | }, 45 | "sourceTreeHashHex": "0x5ea133596d7534338c5d456edbe4b97c5aafcd4f7efede475e4f3b42ac5a3f4b", 46 | "compiler": { 47 | "name": "solc", 48 | "version": "soljson-v0.5.12+commit.7709ece9.js", 49 | "settings": { 50 | "optimizer": { 51 | "enabled": false 52 | }, 53 | "outputSelection": { 54 | "*": { 55 | "*": [ 56 | "abi", 57 | "evm.bytecode.object", 58 | "evm.bytecode.sourceMap", 59 | "evm.deployedBytecode.object", 60 | "evm.deployedBytecode.sourceMap" 61 | ] 62 | } 63 | }, 64 | "remappings": [ 65 | "openzeppelin-solidity=/Users/mickdegraaf/DDAI/node_modules/openzeppelin-solidity" 66 | ] 67 | } 68 | }, 69 | "networks": {} 70 | } -------------------------------------------------------------------------------- /src/class/artifacts/ISynthetix.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": "2.0.0", 3 | "contractName": "ISynthetix", 4 | "compilerOutput": { 5 | "abi": [ 6 | { 7 | "constant": false, 8 | "inputs": [ 9 | { 10 | "internalType": "bytes4", 11 | "name": "_sourceCurrencyKey", 12 | "type": "bytes4" 13 | }, 14 | { 15 | "internalType": "uint256", 16 | "name": "_sourceAmount", 17 | "type": "uint256" 18 | }, 19 | { 20 | "internalType": "bytes4", 21 | "name": "_destinationCurrencyKey", 22 | "type": "bytes4" 23 | }, 24 | { 25 | "internalType": "address", 26 | "name": "_destinationAddress", 27 | "type": "address" 28 | } 29 | ], 30 | "name": "exchange", 31 | "outputs": [ 32 | { 33 | "internalType": "bool", 34 | "name": "", 35 | "type": "bool" 36 | } 37 | ], 38 | "payable": false, 39 | "stateMutability": "nonpayable", 40 | "type": "function" 41 | } 42 | ], 43 | "evm": { 44 | "bytecode": { 45 | "linkReferences": {}, 46 | "object": "0x", 47 | "opcodes": "", 48 | "sourceMap": "" 49 | }, 50 | "deployedBytecode": { 51 | "linkReferences": {}, 52 | "object": "0x", 53 | "opcodes": "", 54 | "sourceMap": "" 55 | } 56 | } 57 | }, 58 | "sources": { 59 | "interfaces/ISynthetix.sol": { 60 | "id": 25 61 | } 62 | }, 63 | "sourceCodes": { 64 | "interfaces/ISynthetix.sol": "pragma solidity >=0.4.21 <0.6.0;\n\ncontract ISynthetix {\n function exchange(\n bytes4 _sourceCurrencyKey,\n uint256 _sourceAmount,\n bytes4 _destinationCurrencyKey,\n address _destinationAddress\n ) external returns (bool);\n}" 65 | }, 66 | "sourceTreeHashHex": "0x515c6bccbd3b7f08b98d50771520b1ddbff5af72a4d4d3c0eece2cce56e32292", 67 | "compiler": { 68 | "name": "solc", 69 | "version": "soljson-v0.5.12+commit.7709ece9.js", 70 | "settings": { 71 | "optimizer": { 72 | "enabled": false 73 | }, 74 | "outputSelection": { 75 | "*": { 76 | "*": [ 77 | "abi", 78 | "evm.bytecode.object", 79 | "evm.bytecode.sourceMap", 80 | "evm.deployedBytecode.object", 81 | "evm.deployedBytecode.sourceMap" 82 | ] 83 | } 84 | }, 85 | "remappings": [ 86 | "openzeppelin-solidity=/Users/mickdegraaf/DDAI/node_modules/openzeppelin-solidity" 87 | ] 88 | } 89 | }, 90 | "networks": {} 91 | } -------------------------------------------------------------------------------- /src/class/artifacts/ISynthetixDepot.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": "2.0.0", 3 | "contractName": "ISynthetixDepot", 4 | "compilerOutput": { 5 | "abi": [ 6 | { 7 | "constant": false, 8 | "inputs": [], 9 | "name": "exchangeEtherForSynths", 10 | "outputs": [ 11 | { 12 | "internalType": "uint256", 13 | "name": "", 14 | "type": "uint256" 15 | } 16 | ], 17 | "payable": true, 18 | "stateMutability": "payable", 19 | "type": "function" 20 | } 21 | ], 22 | "evm": { 23 | "bytecode": { 24 | "linkReferences": {}, 25 | "object": "0x", 26 | "opcodes": "", 27 | "sourceMap": "" 28 | }, 29 | "deployedBytecode": { 30 | "linkReferences": {}, 31 | "object": "0x", 32 | "opcodes": "", 33 | "sourceMap": "" 34 | } 35 | } 36 | }, 37 | "sources": { 38 | "interfaces/ISynthetixDepot.sol": { 39 | "id": 26 40 | } 41 | }, 42 | "sourceCodes": { 43 | "interfaces/ISynthetixDepot.sol": "pragma solidity >=0.4.21 <0.6.0;\n\ninterface ISynthetixDepot {\n function exchangeEtherForSynths() external payable returns (uint256); // Returns the number of Synths (sUSD) received\n}" 44 | }, 45 | "sourceTreeHashHex": "0xc108f55baf23db54adc5fe246ae7dbd7aa0362781c86c5a37a25a72ff3c7b610", 46 | "compiler": { 47 | "name": "solc", 48 | "version": "soljson-v0.5.12+commit.7709ece9.js", 49 | "settings": { 50 | "optimizer": { 51 | "enabled": false 52 | }, 53 | "outputSelection": { 54 | "*": { 55 | "*": [ 56 | "abi", 57 | "evm.bytecode.object", 58 | "evm.bytecode.sourceMap", 59 | "evm.deployedBytecode.object", 60 | "evm.deployedBytecode.sourceMap" 61 | ] 62 | } 63 | }, 64 | "remappings": [ 65 | "openzeppelin-solidity=/Users/mickdegraaf/DDAI/node_modules/openzeppelin-solidity" 66 | ] 67 | } 68 | }, 69 | "networks": {} 70 | } -------------------------------------------------------------------------------- /src/class/config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | vehicles: [ 3 | {label: '', component: ''} 4 | ] 5 | } -------------------------------------------------------------------------------- /src/class/utils.js: -------------------------------------------------------------------------------- 1 | export default class U { 2 | static formatFiat = (value, separator=',', decimal='.') => { 3 | if(!value) return; 4 | try { 5 | const values = value.toString().replace(/^-/, '').split('.'); 6 | const dollars = values[0]; 7 | const cents = values[1]; 8 | const groups = /(\d)(?=(\d{3})+\b)/g; 9 | return '#'.replace('#', `${dollars.replace(groups, '$1' + separator)}${cents ? decimal + cents : ''}`) 10 | } catch(e) { 11 | console.error(e); 12 | return value; 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/components/Avatar.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | function Avatar(props) { 4 | const { image, size, alt, ...otherProps } = props; 5 | 6 | return ( 7 |
8 | {alt} 9 |
10 | ); 11 | } 12 | 13 | export default Avatar; 14 | -------------------------------------------------------------------------------- /src/components/BackgroundImage.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import "./BackgroundImage.scss"; 3 | 4 | function BackgroundImage(props) { 5 | return ( 6 |
13 | ); 14 | } 15 | 16 | export default BackgroundImage; 17 | -------------------------------------------------------------------------------- /src/components/BackgroundImage.scss: -------------------------------------------------------------------------------- 1 | .BackgroundImage { 2 | content: ""; 3 | background-image: var(--image); 4 | background-position: center center; 5 | background-size: cover; 6 | opacity: var(--opacity); 7 | top: 0; 8 | left: 0; 9 | bottom: 0; 10 | right: 0; 11 | position: absolute; 12 | z-index: 0; 13 | } 14 | -------------------------------------------------------------------------------- /src/components/CardAPR.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import styled from "styled-components"; 3 | 4 | const RowContainer = styled.span` 5 | display: flex; 6 | justify-content: space-between; 7 | width: 100%; 8 | padding: 2% 0; 9 | `; 10 | const Left = styled.span` 11 | display: flex; 12 | flex-grow: 1; 13 | text-align: left; 14 | font-weight: 700; 15 | align-items: center; 16 | `; 17 | 18 | const Right = styled.span` 19 | display: flex; 20 | flex-grow: 3; 21 | flex-direction: row-reverse; 22 | padding: 1.5% 0; 23 | align-items: center; 24 | font-weight: 700; 25 | color: #3bc5a6; 26 | `; 27 | 28 | const Rates = { 29 | currentRate: "15.2%" 30 | }; 31 | 32 | const CardAPR = props => { 33 | return ( 34 | 35 | APR 36 | {props.currentRate}% 37 | 38 | ); 39 | }; 40 | 41 | CardAPR.defaultProps = { 42 | currentRate: 0 43 | } 44 | 45 | export default CardAPR; 46 | -------------------------------------------------------------------------------- /src/components/CardAction.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import styled from "styled-components"; 3 | import PropTypes from "prop-types"; 4 | 5 | const Container = styled.div` 6 | width: 47%; 7 | margin: 1%; 8 | display: flex; 9 | flex-direction: column; 10 | justify-content: space-between; 11 | align-items: center; 12 | font-size: var(--text-prettysmall); 13 | padding: 1% 2%; 14 | border-radius: 10px; 15 | background-color: #fff; 16 | border: 1px solid #827f7f; 17 | flex: 0 0 auto; 18 | min-height: 270px; 19 | 20 | @media (max-width: 800px) { 21 | width: 100%; 22 | margin: 2% 0; 23 | display: flex; 24 | flex: 0 0 auto; 25 | flex-direction: column; 26 | font-size: var(--text-prettysmall); 27 | border-radius: 10px; 28 | background-color: var(--white); 29 | height: auto; 30 | padding: 3% 3% 1% 3%; 31 | 32 | } 33 | `; 34 | 35 | const Heading = styled.h1` 36 | font-size: var(--text-big); 37 | text-align: center; 38 | margin-bottom: 10px; 39 | font-weight: 700; 40 | @media (max-width: 800px) { 41 | font-size: var(--text-big-mobile); 42 | } 43 | `; 44 | 45 | const SubHeading = styled.h2` 46 | font-size: var(--text-medium); 47 | font-weight: 300; 48 | margin-top: -10px; 49 | text-align: center; 50 | word-wrap: break-word; 51 | 52 | @media (max-width: 800px) { 53 | font-size: var(--text-medium-mobile); 54 | font-weight: 300; 55 | margin-top: -10px; 56 | } 57 | `; 58 | 59 | const BoldGreen = styled.span` 60 | font-weight: 700; 61 | color: #2edfb7; 62 | `; 63 | 64 | const ColorfulButton = styled.button` 65 | width: 100%; 66 | padding: 4% 10%; 67 | background-color: #000; 68 | color: #fff; 69 | text-align: center; 70 | font-size: var(--font-main-button); 71 | font-weight: 700; 72 | border-radius: 5px; 73 | margin: 0 0 10px 0; 74 | border: none; 75 | transition-property: background-color, color; 76 | transition-duration: 0.3s; 77 | 78 | :hover { 79 | opacity: 0.8; 80 | color: #fff; 81 | cursor: pointer; 82 | } 83 | 84 | :focus { 85 | outline: none; 86 | } 87 | 88 | :disabled { 89 | pointer-events: none; 90 | } 91 | 92 | @media (max-width: 800px) { 93 | display: flex; 94 | width: 100%; 95 | justify-content: center; 96 | margin: 2%; 97 | } 98 | `; 99 | 100 | const Image = styled.img` 101 | width: 292px; 102 | text-align: center; 103 | margin-bottom: 6%; 104 | @media (max-width: 800px) { 105 | width: 50%; 106 | } 107 | `; 108 | 109 | const CardAction = props => { 110 | return ( 111 | 112 | {props.heading} 113 | {props.subheading} 114 | 115 | { 123 | if (props.disabled) { 124 | alert("Recipe disabled for this network"); 125 | } else if (props.selected) { 126 | alert(`It's already selected :)`); 127 | } else { 128 | props.onPress(); 129 | } 130 | }} 131 | > 132 | {props.disabled ? "DISABLED" : props.selected ? "Selected" : "Select"} 133 | 134 | 135 | ); 136 | }; 137 | 138 | export default CardAction; 139 | -------------------------------------------------------------------------------- /src/components/CardAmount.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import styled from "styled-components"; 3 | import { cta } from "../mixpanel"; 4 | 5 | 6 | const RowContainer = styled.span` 7 | width: 100%; 8 | display: flex; 9 | justify-content: space-between; 10 | padding: 2% 0; 11 | @media (max-width: 800px) { 12 | flex-direction: column; 13 | } 14 | `; 15 | const Left = styled.span` 16 | display: flex; 17 | flex-grow: 1; 18 | text-align: left; 19 | font-weight: 700; 20 | align-items: center; 21 | `; 22 | 23 | const Right = styled.span` 24 | display: flex; 25 | flex-grow: 3; 26 | flex-direction: row-reverse; 27 | padding: 1.5% 0; 28 | align-items: center; 29 | `; 30 | 31 | const Form = styled.form` 32 | display: flex; 33 | justify-content: space-between; 34 | align-items: center; 35 | border: 1px solid #e0e0e0; 36 | border-radius: 5px; 37 | background-color: #f2f2f2; 38 | text-align: right; 39 | width: 100%; 40 | 41 | @media (max-width: 800px) { 42 | width: 80%; 43 | display: flex; 44 | flex-grow: 2; 45 | justify-content: space-between; 46 | align-items: center; 47 | border: 1px solid #e0e0e0; 48 | border-radius: 5px; 49 | background-color: #f2f2f2; 50 | text-align: right; 51 | } 52 | `; 53 | 54 | const Input = styled.input` 55 | display: flex; 56 | width: 74%; 57 | background-color: #f2f2f2; 58 | padding: 20px 15px 25px; 59 | border: none; 60 | font-size: var(--text-prettysmall); 61 | 62 | ::placeholder, 63 | ::-webkit-input-placeholder { 64 | font-family: var(--main-font); 65 | font-weight: 300; 66 | color: var(--light-black); 67 | } 68 | 69 | :focus { 70 | outline: none; 71 | } 72 | 73 | :focus::placeholder { 74 | color: transparent; 75 | } 76 | `; 77 | 78 | const ButtonMax = styled.button` 79 | display: flex; 80 | height: 30px; 81 | background: #000; 82 | color: white; 83 | font-size: var(--text-small); 84 | width: 20%; 85 | padding: 2% 3% 2% 6%; 86 | margin: 0 3% 0 1%; 87 | font-weight: 300; 88 | border-radius: 2px; 89 | transition-property: background-color; 90 | transition-duration: 0.3s; 91 | 92 | :hover { 93 | background-color: #505050; 94 | } 95 | 96 | :focus { 97 | outline: none; 98 | } 99 | `; 100 | 101 | const CardAmount = props => { 102 | return ( 103 | 104 | Amount 105 | 106 |
107 | 113 | { 115 | cta({ 116 | position: "invest", 117 | type: "button", 118 | label: "MAX" 119 | }); 120 | props.onChange({ target: { value: props.maxValue } }); 121 | e.preventDefault(); 122 | }} 123 | > 124 | MAX 125 | 126 |
127 |
128 |
129 | ); 130 | }; 131 | 132 | CardAmount.defaultProps = { 133 | onChange: () => {}, 134 | maxValue: 0, 135 | amount: 0 136 | }; 137 | 138 | export default CardAmount; 139 | -------------------------------------------------------------------------------- /src/components/CardEarned.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import styled from "styled-components"; 3 | 4 | const RowContainer = styled.span` 5 | display: flex; 6 | justify-content: space-between; 7 | width: 100%; 8 | padding: 2% 0; 9 | @media (max-width: 800px) { 10 | margin-top:20px; 11 | } 12 | `; 13 | const Left = styled.span` 14 | display: flex; 15 | text-align: left; 16 | font-weight: 700; 17 | align-items: center; 18 | max-width: 40%; 19 | `; 20 | 21 | const Right = styled.span` 22 | display: flex; 23 | flex-direction: row-reverse; 24 | padding: 1.5% 0; 25 | align-items: center; 26 | font-size: 18px; 27 | max-width: 50%; 28 | @media (max-width: 800px) { 29 | padding: 0; 30 | font-size: 19px; 31 | padding: 0; 32 | } 33 | `; 34 | 35 | const CardEarned = props => { 36 | return ( 37 | 38 | Earned so far 39 | {parseFloat(props.investmentTokenAmount).toFixed(2)} dDAI 40 | 41 | ); 42 | }; 43 | 44 | CardEarned.defaultProps = { 45 | investmentTokenAmount: 0 46 | } 47 | 48 | export default CardEarned; 49 | -------------------------------------------------------------------------------- /src/components/CardInvestmentAmount.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import styled from "styled-components"; 3 | 4 | const RowContainer = styled.span` 5 | display: flex; 6 | justify-content: space-between; 7 | width: 100%; 8 | padding: 2% 0; 9 | `; 10 | const Left = styled.span` 11 | display: flex; 12 | flex-grow: 1; 13 | text-align: left; 14 | font-weight: 700; 15 | align-items: center; 16 | `; 17 | 18 | const Right = styled.span` 19 | display: flex; 20 | flex-grow: 3; 21 | flex-direction: row-reverse; 22 | padding: 1.5% 0; 23 | align-items: center; 24 | `; 25 | 26 | const CardInvestmentAmount = props => { 27 | return ( 28 | 29 | Investment Amount 30 | {props.investmentTokenAmount} dDAI 31 | 32 | ); 33 | }; 34 | 35 | CardInvestmentAmount.defaultProps = { 36 | investmentTokenAmount: 0 37 | } 38 | 39 | export default CardInvestmentAmount; 40 | -------------------------------------------------------------------------------- /src/components/CardInvestmentToken.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import styled from "styled-components"; 3 | 4 | const RowContainer = styled.span` 5 | display: flex; 6 | justify-content: space-between; 7 | width: 100%; 8 | padding: 2% 0; 9 | `; 10 | const Left = styled.span` 11 | display: flex; 12 | flex-grow: 1; 13 | text-align: left; 14 | font-weight: 700; 15 | align-items: center; 16 | `; 17 | 18 | const Right = styled.span` 19 | display: flex; 20 | flex-grow: 3; 21 | flex-direction: row-reverse; 22 | padding: 1.5% 0; 23 | align-items: center; 24 | `; 25 | 26 | const CardInvestmentToken = props => { 27 | return ( 28 | 29 | Investment Token 30 | {props.investmentTokenAmount} dDAI 31 | 32 | ); 33 | }; 34 | 35 | CardInvestmentToken.defaultProps = { 36 | investmentTokenAmount: 0 37 | } 38 | 39 | export default CardInvestmentToken; 40 | -------------------------------------------------------------------------------- /src/components/CardOneButton.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import styled from "styled-components"; 3 | import PropTypes from 'prop-types'; 4 | import PrimaryButton from "./PrimaryButton"; 5 | 6 | const RowContainer = styled.span` 7 | display: flex; 8 | justify-content: space-between; 9 | width: 100%; 10 | padding: 2% 0; 11 | `; 12 | 13 | const CardOneButton = props => { 14 | return ( 15 | 16 | {props.label} 17 | 18 | ); 19 | }; 20 | 21 | CardOneButton.propTypes = { 22 | onPress: PropTypes.func, 23 | label: PropTypes.string 24 | }; 25 | 26 | CardOneButton.defaultProps = { 27 | onPress: () => alert('Clicked'), 28 | label: 'INVEST', 29 | isDisabled: false, 30 | }; 31 | 32 | export default CardOneButton; 33 | -------------------------------------------------------------------------------- /src/components/CardRecap.js: -------------------------------------------------------------------------------- 1 | import React, { useContext } from "react"; 2 | import styled from "styled-components"; 3 | import { CardInvestmentToken, IF } from "../components"; 4 | import CardAPR from "../components/CardAPR"; 5 | import CardEarned from "../components/CardEarned"; 6 | import CardInvestmentAmount from "./CardInvestmentAmount"; 7 | import CardReward from "./CardReward"; 8 | import CardTwoButtons from "./CardTwoButtons"; 9 | import { Context } from "../context"; 10 | import SecondaryButton from "./SecondaryButton"; 11 | import InvestMoreDAI from "./InvestMoreDAI"; 12 | import { useHistory } from "react-router-dom"; 13 | import { cta } from "../mixpanel"; 14 | 15 | 16 | const Center = styled.div` 17 | margin: 0 auto; 18 | `; 19 | const Container = styled.div` 20 | margin: 1% 6%; 21 | display: flex; 22 | flex-direction: column; 23 | font-size: var(--text-prettysmall); 24 | padding: 1% 2%; 25 | border-radius: 10px; 26 | border: 1px solid #827f7f; 27 | background-color: var(--white); 28 | flex: 0 0 auto; 29 | 30 | @media (max-width: 800px) { 31 | margin: 2%; 32 | padding: 1% 5%; 33 | display: flex; 34 | flex: 0 0 auto; 35 | flex-direction: column; 36 | font-size: var(--text-prettysmall); 37 | border-radius: 10px; 38 | background-color: var(--white); 39 | } 40 | `; 41 | 42 | const CardRecap = (props) => { 43 | const context = useContext(Context); 44 | const history = useHistory(); 45 | const DDAI = context.DDAI; 46 | 47 | return ( 48 |
49 |
50 | { 51 | cta({ 52 | position: "overview", 53 | to: "/recipes", 54 | type: "button", 55 | label: "Change recipe" 56 | }); 57 | history.push("/recipes") 58 | }}/> 59 |
60 | 61 | 62 | Loading ⏳ 63 | 64 | 65 | 66 | 67 | 68 | { 71 | cta({ 72 | position: "overview", 73 | type: "button", 74 | label: "Claim Interest" 75 | }); 76 | props.onClaimInterest() 77 | }} 78 | secondButtonText="Withdraw" 79 | onSecondPress={ () => { 80 | cta({ 81 | position: "overview", 82 | to: "/withdraw", 83 | type: "button", 84 | label: "Withdraw" 85 | }); 86 | history.push("/withdraw") 87 | }}/> 88 | 89 | { 90 | cta({ 91 | position: "overview", 92 | to: "/invest-more", 93 | type: "button", 94 | label: "Invest more DAI" 95 | }); 96 | history.push("/invest-more"); 97 | }} /> 98 | 99 |
100 | ); 101 | }; 102 | 103 | export default CardRecap; 104 | -------------------------------------------------------------------------------- /src/components/CardReward.js: -------------------------------------------------------------------------------- 1 | import React, { useContext } from "react"; 2 | import styled from "styled-components"; 3 | import { Link } from "react-router-dom"; 4 | import { Context } from "../context"; 5 | import CONF from '../config'; 6 | import { cta } from "../mixpanel"; 7 | 8 | const config = CONF[CONF.selectedNetwork]; 9 | 10 | 11 | const RowContainer = styled.span` 12 | display: flex; 13 | justify-content: space-between; 14 | width: 100%; 15 | padding: 2% 0; 16 | @media (max-width: 800px) { 17 | } 18 | `; 19 | const Left = styled.span` 20 | display: flex; 21 | text-align: left; 22 | font-weight: 700; 23 | align-items: center; 24 | max-width: 40%; 25 | `; 26 | 27 | const Right = styled.span` 28 | display: flex; 29 | flex-direction: row-reverse; 30 | padding: 1.5% 0; 31 | align-items: center; 32 | font-size: 18px; 33 | max-width: 50%; 34 | @media (max-width: 800px) { 35 | padding: 0; 36 | font-size: 19px; 37 | padding: 0; 38 | } 39 | `; 40 | 41 | const Image = styled.img` 42 | height: 35px; 43 | `; 44 | 45 | const ButtonSmall = styled.button` 46 | padding: 3% 7%; 47 | background-color: #000; 48 | color: #fff; 49 | text-align: center; 50 | font-size: var(--font-small); 51 | font-weight: 700; 52 | border-radius: 2px; 53 | margin: 0; 54 | border: none; 55 | transition-property: background-color, color; 56 | transition-duration: 0.3s; 57 | margin-left: 2%; 58 | cursor: pointer; 59 | 60 | 61 | :hover { 62 | opacity: 0.8; 63 | color: #fff; 64 | cursor:pointer; 65 | 66 | } 67 | 68 | :focus { 69 | outline: none; 70 | } 71 | 72 | @media (max-width: 800px) { 73 | display: flex; 74 | justify-content: center; 75 | margin: 2% 0 2% 2%; 76 | } 77 | `; 78 | 79 | const CardReward = props => { 80 | const context = useContext(Context); 81 | console.log(context); 82 | 83 | return ( 84 | 85 | Earning Reward in {context.selectedRecipe} 86 | 87 | { 88 | cta({ 89 | position: "overview", 90 | to: "/recipes", 91 | type: "button", 92 | label: "Change recipe" 93 | }); 94 | } } 95 | style={{color: "inherit"}} to="/recipes">Change 96 | 97 | 98 | 99 | ); 100 | }; 101 | 102 | 103 | export default CardReward; 104 | -------------------------------------------------------------------------------- /src/components/CardSelectRecipe.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import styled from "styled-components"; 3 | import CONF from '../config' 4 | 5 | const RowContainer = styled.span` 6 | width: 100%; 7 | display: flex; 8 | justify-content: space-between; 9 | padding: 2% 0; 10 | `; 11 | const Left = styled.span` 12 | display: flex; 13 | flex-grow: 1; 14 | text-align: left; 15 | font-weight: 700; 16 | align-items: center; 17 | `; 18 | 19 | const Right = styled.span` 20 | display: flex; 21 | flex-grow: 3; 22 | flex-direction: row-reverse; 23 | padding: 1.5% 0; 24 | align-items: center; 25 | `; 26 | 27 | const Form = styled.form` 28 | background-color: #f2f2f2; 29 | border: none; 30 | padding: 6% 3%; 31 | width: 100px; 32 | 33 | @media (max-width: 800px) { 34 | background-color: rgb(255, 255, 255); 35 | border: none; 36 | padding: 6% 0; 37 | max-width: 100px; 38 | } 39 | `; 40 | 41 | const Select = styled.select` 42 | border: 0px solid #f2f2f2; 43 | border-radius: 5px; 44 | background-color: #f2f2f2; 45 | text-align: right; 46 | width: 100px; 47 | font-size: var(--text-prettysmall); 48 | 49 | :focus { 50 | outline: none; 51 | } 52 | `; 53 | 54 | const Option = styled.option` 55 | background-repeat: no-repeat; 56 | background-position: cover; 57 | padding-left: 0px; 58 | `; 59 | 60 | const CardSelectRecipe = props => { 61 | return ( 62 | 63 | Earning Reward 64 | 65 |
66 | 69 |
70 |
71 |
72 | ); 73 | }; 74 | 75 | CardSelectRecipe.defaultProps = { 76 | options: CONF[CONF.selectedNetwork].allowedOutputTokens, 77 | onChange: () => {} 78 | }; 79 | 80 | 81 | export default CardSelectRecipe; 82 | -------------------------------------------------------------------------------- /src/components/CardSelectedRecipe.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import styled from "styled-components"; 3 | 4 | const RowContainer = styled.span` 5 | display: flex; 6 | justify-content: space-between; 7 | width: 100%; 8 | padding: 2% 0; 9 | `; 10 | const Left = styled.span` 11 | display: flex; 12 | flex-grow: 1; 13 | text-align: left; 14 | font-weight: 700; 15 | align-items: center; 16 | `; 17 | 18 | const Right = styled.span` 19 | display: flex; 20 | flex-grow: 3; 21 | flex-direction: row-reverse; 22 | padding: 1.5% 0; 23 | align-items: center; 24 | font-weight: 700; 25 | `; 26 | 27 | const Rates = { 28 | currentRate: "15.2%" 29 | }; 30 | 31 | const CardSelectedRecipe = props => { 32 | return ( 33 | 34 | Selected Recipe 35 | {props.selectedRecipe} 36 | 37 | ); 38 | }; 39 | 40 | CardSelectedRecipe.defaultProps = { 41 | selectedRecipe: "ETH" 42 | } 43 | 44 | export default CardSelectedRecipe; 45 | -------------------------------------------------------------------------------- /src/components/CardTwoButtons.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import styled from "styled-components"; 3 | import PrimaryButton from "./PrimaryButton"; 4 | 5 | const RowContainer = styled.span` 6 | display: flex; 7 | justify-content: space-between; 8 | width: 100%; 9 | padding: 2% 0; 10 | `; 11 | 12 | const ButtonSpacer = styled.span` 13 | width: 4%; 14 | `; 15 | 16 | const CardTwoButtons = props => { 17 | return ( 18 | 19 | {props.firstButtonText} 20 | 21 | {props.secondButtonText} 22 | 23 | ); 24 | }; 25 | 26 | export default CardTwoButtons; 27 | -------------------------------------------------------------------------------- /src/components/CenteredColumns.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | function CenteredColumns(props) { 4 | return ( 5 |
6 | {props.children} 7 |
8 | ); 9 | } 10 | 11 | export default CenteredColumns; 12 | -------------------------------------------------------------------------------- /src/components/Clients.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import "./Clients.scss"; 3 | 4 | function Clients(props) { 5 | return ( 6 |
7 | {props.items.map((item, index) => ( 8 |
9 |
10 | {item.name} 11 |
12 |
13 | ))} 14 |
15 | ); 16 | } 17 | 18 | export default Clients; 19 | -------------------------------------------------------------------------------- /src/components/Clients.scss: -------------------------------------------------------------------------------- 1 | .Clients { 2 | &__logo { 3 | margin: 0 12px; 4 | img { 5 | // Removes extra space under image 6 | vertical-align: bottom; 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/components/ClientsSection.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Section from "./Section"; 3 | import SectionHeader from "./SectionHeader"; 4 | import Clients from "./Clients"; 5 | 6 | function ClientsSection(props) { 7 | return ( 8 |
9 |
10 | 16 | 50 |
51 |
52 | ); 53 | } 54 | 55 | export default ClientsSection; 56 | -------------------------------------------------------------------------------- /src/components/ConnectW3Button.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import styled from "styled-components"; 3 | import PropTypes from "prop-types"; 4 | import { cta } from "../mixpanel"; 5 | 6 | 7 | const Web3Button = styled.button` 8 | display: flex; 9 | flex-direction: row; 10 | align-items: center; 11 | background-color: #000; 12 | padding: 18px; 13 | 14 | /* display: inline-block; 15 | padding: 10%; */ 16 | border-radius: 4px; 17 | transition-property: background-color, color; 18 | transition-duration: 0.3s; 19 | text-align: center; 20 | background: #F00093; 21 | border: solid 1px #fff; 22 | color: #fff; 23 | 24 | :hover { 25 | background-color: #000; 26 | color: #fff; 27 | } 28 | 29 | :focus { 30 | outline: none; 31 | } 32 | 33 | @media (max-width: 800px) { 34 | display: flex; 35 | justify-content: center; 36 | width: 100%; 37 | margin: 0; 38 | } 39 | `; 40 | 41 | const ConnectedMetamask = styled.span` 42 | display: flex; 43 | align-items: center; 44 | font-weight: 700; 45 | `; 46 | 47 | const ConnectW3Button = props => { 48 | return ( 49 | { 50 | cta({ 51 | position: "navbar", 52 | to: "Metamask", 53 | type: "button", 54 | label: "Connect Metamask" 55 | }); 56 | props.onPress() 57 | }}> 58 | 59 | Connect Metamask 60 | 61 | 62 | ); 63 | }; 64 | 65 | ConnectW3Button.propTypes = { 66 | onPress: PropTypes.func 67 | }; 68 | 69 | ConnectW3Button.defaultProps = { 70 | onPress: () => alert("Clicked") 71 | }; 72 | 73 | export default ConnectW3Button; 74 | -------------------------------------------------------------------------------- /src/components/Contact.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import ContactForm from "./ContactForm"; 3 | import contact from "./../util/contact.js"; 4 | 5 | function Contact(props) { 6 | const [status, setStatus] = useState(); 7 | 8 | const onSubmit = ({ name, email, message }) => { 9 | setStatus({ type: "pending" }); 10 | 11 | contact.submit({ name, email, message }).then(() => { 12 | setStatus({ 13 | type: "success", 14 | message: "Your message has been sent! We'll get back to you soon." 15 | }); 16 | }); 17 | }; 18 | return ( 19 | 26 | ); 27 | } 28 | 29 | export default Contact; 30 | -------------------------------------------------------------------------------- /src/components/ContactForm.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import FormStatus from "./FormStatus"; 3 | import FormField from "./FormField"; 4 | import SectionButton from "./SectionButton"; 5 | 6 | function ContactForm(props) { 7 | // State for input values 8 | const [name, setName] = useState(""); 9 | const [email, setEmail] = useState(""); 10 | const [message, setMessage] = useState(""); 11 | 12 | // Whether to show errors 13 | // We set to true if they submit and there are errors. 14 | // We only show errors after they submit because 15 | // it's annoying to see errors while typing. 16 | const [showErrors, setShowErrors] = useState(false); 17 | 18 | // Error array we'll populate 19 | let errors = []; 20 | 21 | // Function for fetching error for a field 22 | const getError = field => { 23 | return errors.find(e => e.field === field); 24 | }; 25 | 26 | // Function to see if field is empty 27 | const isEmpty = val => val.trim() === ""; 28 | 29 | // Add error if email empty 30 | if (isEmpty(email)) { 31 | errors.push({ 32 | field: "email", 33 | message: "Please enter an email" 34 | }); 35 | } 36 | 37 | // Add error if message empty 38 | if (isEmpty(message)) { 39 | errors.push({ 40 | field: "message", 41 | message: "Please enter a message" 42 | }); 43 | } 44 | 45 | // Add error if name shown and empty 46 | if (props.showNameField) { 47 | if (isEmpty(name)) { 48 | errors.push({ 49 | field: "name", 50 | message: "Please enter your name" 51 | }); 52 | } 53 | } 54 | 55 | // Handle form submission 56 | const handleSubmit = e => { 57 | // If field errors then show them 58 | if (errors.length) { 59 | setShowErrors(true); 60 | } else { 61 | // Otherwise call onSubmit with form data 62 | if (props.onSubmit) { 63 | props.onSubmit({ 64 | name, 65 | email, 66 | message 67 | }); 68 | } 69 | } 70 | }; 71 | 72 | return ( 73 | <> 74 | {props.status && props.status.message && ( 75 | 76 | )} 77 | 78 |
{ 80 | e.preventDefault(); 81 | handleSubmit(); 82 | }} 83 | > 84 |
85 |
86 | {props.showNameField && ( 87 | setName(value)} 93 | /> 94 | )} 95 | 96 | setEmail(value)} 102 | /> 103 |
104 |
105 |
106 |
107 | setMessage(value)} 113 | /> 114 |
115 |
116 |
117 |
118 |
119 |
120 | 129 | {props.buttonText} 130 | 131 |
132 |
133 |
134 |
135 |
136 | 137 | ); 138 | } 139 | 140 | export default ContactForm; 141 | -------------------------------------------------------------------------------- /src/components/ContactSection.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Section from "./Section"; 3 | import SectionHeader from "./SectionHeader"; 4 | import Contact from "./Contact"; 5 | import "./ContactSection.scss"; 6 | 7 | function ContactSection(props) { 8 | return ( 9 |
10 |
11 | 17 | 22 |
23 |
24 | ); 25 | } 26 | 27 | export default ContactSection; 28 | -------------------------------------------------------------------------------- /src/components/ContactSection.scss: -------------------------------------------------------------------------------- 1 | .ContactSection { 2 | &__container { 3 | max-width: 850px; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/components/Footer.scss: -------------------------------------------------------------------------------- 1 | .FooterComponent { 2 | &__container { 3 | .menu-label { 4 | font-size: 1.275rem; 5 | font-weight: 600; 6 | text-transform: none; 7 | letter-spacing: 0; 8 | color: inherit; 9 | &.menu-label:not(:last-child) { 10 | margin-bottom: 0.6rem; 11 | } 12 | } 13 | 14 | .menu-list { 15 | margin-left: -0.75rem; 16 | //font-size: 1.1em; 17 | img { 18 | display: inline-block; 19 | vertical-align: middle; 20 | margin-right: 0.8rem; 21 | } 22 | // Slightly transparent hover background 23 | // makes it look good on any section background. 24 | a:hover { 25 | background-color: rgba(0, 0, 0, 0.05); 26 | } 27 | } 28 | } 29 | 30 | &__logo { 31 | width: 130px; 32 | } 33 | 34 | &__description { 35 | margin-top: 1rem; 36 | } 37 | 38 | &__copywrite { 39 | margin-top: 1rem; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/components/FormField.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | function FormField(props) { 4 | return ( 5 |
6 |
7 | {props.type === "textarea" && ( 8 |