Merge branch 'development' into supportEIP1193Providers
* development: Demonstrate calling contracts with tuple arrays (#1615) removed default meta tags in public/index.html fixed linting issue updated documentTitle component added metadata for pages (incomplete) fixed title comment-out removed react-document-title in favor of using react-helmet for consistency and bug fix
This commit is contained in:
commit
b51038b9e7
@ -57,7 +57,6 @@
|
||||
"rc-slider": "^8.6.3",
|
||||
"react": "^16.5.2",
|
||||
"react-copy-to-clipboard": "^5.0.0",
|
||||
"react-document-title": "^2.0.3",
|
||||
"react-dom": "^16.5.2",
|
||||
"react-flickity-component": "^3.1.0",
|
||||
"react-headroom": "2.2.2",
|
||||
|
@ -3,16 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="description" content="An Open Protocol For Decentralized Exchange On The Ethereum Blockchain" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="0x" />
|
||||
<meta
|
||||
property="og:description"
|
||||
content="An Open Protocol For Decentralized Exchange On The Ethereum Blockchain"
|
||||
/>
|
||||
<meta property="og:image" content="/images/og_image.png" />
|
||||
<meta name="google-site-verification" content="0wu9KbpKgGXUhUboLQw-MGtAHJHQ67rMFQN8KrX5I1s" />
|
||||
<title>0x: The Protocol for Trading Tokens</title>
|
||||
<link rel="icon" type="image/png" href="/images/favicon/favicon-2-32x32.png" sizes="32x32" />
|
||||
<link rel="icon" type="image/png" href="/images/favicon/favicon-2-16x16.png" sizes="16x16" />
|
||||
<link rel="stylesheet" href="/css/material-design-iconic-font.min.css" />
|
||||
|
15
packages/website/ts/components/document_title.tsx
Normal file
15
packages/website/ts/components/document_title.tsx
Normal file
@ -0,0 +1,15 @@
|
||||
import * as React from 'react';
|
||||
import { Helmet } from 'react-helmet';
|
||||
|
||||
import { DocumentMetadata } from '../utils/document_meta_constants';
|
||||
|
||||
export interface DocumentTitleProps extends DocumentMetadata {}
|
||||
|
||||
export const DocumentTitle: React.StatelessComponent<DocumentTitleProps> = ({ title, description }) => (
|
||||
<Helmet>
|
||||
<title>{title}</title>
|
||||
<meta name="description" content={description} />
|
||||
<meta property="og:title" content={title} />
|
||||
<meta property="og:description" content={description} />
|
||||
</Helmet>
|
||||
);
|
@ -2,7 +2,6 @@ import { colors, Link } from '@0x/react-shared';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import * as DocumentTitle from 'react-document-title';
|
||||
import { Route, RouteComponentProps, Switch } from 'react-router-dom';
|
||||
|
||||
import { Blockchain } from 'ts/blockchain';
|
||||
@ -234,7 +233,6 @@ export class Portal extends React.Component<PortalProps, PortalState> {
|
||||
return (
|
||||
<Container>
|
||||
<MetaTags title={DOCUMENT_TITLE} description={DOCUMENT_DESCRIPTION} />
|
||||
<DocumentTitle title={DOCUMENT_TITLE} />
|
||||
<TopBar
|
||||
userAddress={this.props.userAddress}
|
||||
networkId={this.props.networkId}
|
||||
|
@ -133,7 +133,6 @@ render(
|
||||
<Route path={WebsitePaths.Portal} component={LazyPortal} />
|
||||
<Route path={WebsitePaths.FAQ} component={FAQ as any} />
|
||||
<Route path={WebsitePaths.Wiki} component={Wiki as any} />
|
||||
|
||||
<Route
|
||||
path={`${WebsitePaths.ZeroExJs}/:version?`}
|
||||
component={LazyZeroExJSDocumentation}
|
||||
|
@ -1,9 +1,9 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import DocumentTitle from 'react-document-title';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { AboutPageLayout } from 'ts/components/aboutPageLayout';
|
||||
import { DocumentTitle } from 'ts/components/document_title';
|
||||
import { Link } from 'ts/components/link';
|
||||
import { Column, FlexWrap, Section } from 'ts/components/newLayout';
|
||||
import { Heading, Paragraph } from 'ts/components/text';
|
||||
@ -12,6 +12,7 @@ import { colors } from 'ts/style/colors';
|
||||
import { WebsiteBackendJobInfo } from 'ts/types';
|
||||
import { backendClient } from 'ts/utils/backend_client';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
import { documentConstants } from 'ts/utils/document_meta_constants';
|
||||
|
||||
const OPEN_POSITIONS_HASH = 'positions';
|
||||
|
||||
@ -104,7 +105,7 @@ export class NextAboutJobs extends React.Component<NextAboutJobsProps, NextAbout
|
||||
linkLabel="Our mission and values"
|
||||
href={constants.URL_MISSION_AND_VALUES_BLOG_POST}
|
||||
>
|
||||
<DocumentTitle title="Jobs at 0x" />
|
||||
<DocumentTitle {...documentConstants.JOBS} />
|
||||
<Section bgColor="#F3F6F4" isFlex={true} maxWidth="1170px" wrapWidth="100%">
|
||||
<Column maxWidth="442px">
|
||||
<Heading size="medium" marginBottom="30px">
|
||||
|
@ -1,14 +1,15 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import DocumentTitle from 'react-document-title';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { AboutPageLayout } from 'ts/components/aboutPageLayout';
|
||||
import { Definition } from 'ts/components/definition';
|
||||
import { DocumentTitle } from 'ts/components/document_title';
|
||||
import { Image } from 'ts/components/image';
|
||||
import { Column, Section } from 'ts/components/newLayout';
|
||||
import { Heading } from 'ts/components/text';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
import { documentConstants } from 'ts/utils/document_meta_constants';
|
||||
|
||||
const values = [
|
||||
{
|
||||
@ -38,7 +39,7 @@ export const NextAboutMission = () => (
|
||||
linkLabel="Our mission and values"
|
||||
href={constants.URL_MISSION_AND_VALUES_BLOG_POST}
|
||||
>
|
||||
<DocumentTitle title="Our Mission - 0x" />
|
||||
<DocumentTitle {...documentConstants.ABOUT} />
|
||||
<Section isFullWidth={true} isPadded={false}>
|
||||
<FullWidthImage>
|
||||
<Image src="/images/about/about-office.png" alt="0x Offices" isCentered={true} />
|
||||
|
@ -1,12 +1,13 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import DocumentTitle from 'react-document-title';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { AboutPageLayout } from 'ts/components/aboutPageLayout';
|
||||
import { Button } from 'ts/components/button';
|
||||
import { DocumentTitle } from 'ts/components/document_title';
|
||||
import { Column, FlexWrap } from 'ts/components/newLayout';
|
||||
import { Paragraph } from 'ts/components/text';
|
||||
import { documentConstants } from 'ts/utils/document_meta_constants';
|
||||
|
||||
interface HighlightProps {
|
||||
logo: string;
|
||||
@ -66,7 +67,7 @@ export const NextAboutPress = () => (
|
||||
</>
|
||||
}
|
||||
>
|
||||
<DocumentTitle title="Press Highlights - 0x" />
|
||||
<DocumentTitle {...documentConstants.PRESS} />
|
||||
</AboutPageLayout>
|
||||
);
|
||||
|
||||
|
@ -1,14 +1,15 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import DocumentTitle from 'react-document-title';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { colors } from 'ts/style/colors';
|
||||
|
||||
import { AboutPageLayout } from 'ts/components/aboutPageLayout';
|
||||
import { DocumentTitle } from 'ts/components/document_title';
|
||||
import { Column, Section } from 'ts/components/newLayout';
|
||||
import { Heading, Paragraph } from 'ts/components/text';
|
||||
import { WebsitePaths } from 'ts/types';
|
||||
import { documentConstants } from 'ts/utils/document_meta_constants';
|
||||
|
||||
interface TeamMember {
|
||||
name: string;
|
||||
@ -194,7 +195,7 @@ export const NextAboutTeam = () => (
|
||||
linkLabel="Join the team"
|
||||
to={WebsitePaths.AboutJobs}
|
||||
>
|
||||
<DocumentTitle title="Our Team - 0x" />
|
||||
<DocumentTitle {...documentConstants.TEAM} />
|
||||
<Section maxWidth="1170px" wrapWidth="100%" isFlex={true} flexBreakpoint="900px">
|
||||
<Column>
|
||||
<Heading size="medium">0x Team</Heading>
|
||||
|
@ -4,11 +4,13 @@ import * as React from 'react';
|
||||
import { Banner } from 'ts/components/banner';
|
||||
import { Button } from 'ts/components/button';
|
||||
import { CenteredDefinition } from 'ts/components/centeredDefinition';
|
||||
import { DocumentTitle } from 'ts/components/document_title';
|
||||
import { Hero } from 'ts/components/hero';
|
||||
import { ModalContact, ModalContactType } from 'ts/components/modals/modal_contact';
|
||||
import { FlexWrap, Section } from 'ts/components/newLayout';
|
||||
import { SiteWrap } from 'ts/components/siteWrap';
|
||||
import { Heading } from 'ts/components/text';
|
||||
import { documentConstants } from 'ts/utils/document_meta_constants';
|
||||
|
||||
export interface CreditsProps {}
|
||||
|
||||
@ -24,6 +26,7 @@ export class Credits extends React.Component<CreditsProps> {
|
||||
public render(): React.ReactNode {
|
||||
return (
|
||||
<SiteWrap theme="light">
|
||||
<DocumentTitle {...documentConstants.INFRASTRUCTURE_CREDITS} />
|
||||
<Hero
|
||||
maxWidth="865px"
|
||||
maxWidthHeading="765px"
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { colors, constants as sharedConstants, utils as sharedUtils } from '@0x/react-shared';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import DocumentTitle from 'react-document-title';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import { DocumentTitle } from 'ts/components/document_title';
|
||||
import { DocsLogo } from 'ts/components/documentation/docs_logo';
|
||||
import { DocsTopBar } from 'ts/components/documentation/docs_top_bar';
|
||||
import { Container } from 'ts/components/ui/container';
|
||||
@ -10,6 +10,7 @@ import { Dispatcher } from 'ts/redux/dispatcher';
|
||||
import { media } from 'ts/style/media';
|
||||
import { styled } from 'ts/style/theme';
|
||||
import { BrowserType, OperatingSystemType, ScreenWidths } from 'ts/types';
|
||||
import { documentConstants } from 'ts/utils/document_meta_constants';
|
||||
import { Translate } from 'ts/utils/translate';
|
||||
import { utils } from 'ts/utils/utils';
|
||||
|
||||
@ -140,7 +141,7 @@ export class DevelopersPage extends React.Component<DevelopersPageProps, Develop
|
||||
colors.white
|
||||
} 50%, ${colors.white} 100%)`}
|
||||
>
|
||||
<DocumentTitle title="0x Docs" />
|
||||
<DocumentTitle {...documentConstants.DOCS} />
|
||||
<Helmet>
|
||||
<link rel="stylesheet" href="/css/github-gist.css" />
|
||||
</Helmet>
|
||||
|
@ -1,16 +1,17 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import DocumentTitle from 'react-document-title';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { colors } from 'ts/style/colors';
|
||||
|
||||
import { Button } from 'ts/components/button';
|
||||
import { DocumentTitle } from 'ts/components/document_title';
|
||||
import { Icon } from 'ts/components/icon';
|
||||
import { Column, Section, WrapGrid } from 'ts/components/newLayout';
|
||||
import { SiteWrap } from 'ts/components/siteWrap';
|
||||
import { Heading, Paragraph } from 'ts/components/text';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
import { documentConstants } from 'ts/utils/document_meta_constants';
|
||||
|
||||
interface BenefitProps {
|
||||
title: string;
|
||||
@ -55,7 +56,7 @@ const benefits: BenefitProps[] = [
|
||||
|
||||
export const NextEcosystem = () => (
|
||||
<SiteWrap theme="light">
|
||||
<DocumentTitle title="Ecosystem Acceleration Program: Jumpstart your Business on 0x" />
|
||||
<DocumentTitle {...documentConstants.ECOSYSTEM_PROGRAM} />
|
||||
<Section isTextCentered={true}>
|
||||
<Column>
|
||||
<Heading size="medium" isCentered={true}>
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { colors, Styles } from '@0x/react-shared';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import * as DocumentTitle from 'react-document-title';
|
||||
import { DocumentTitle } from 'ts/components/document_title';
|
||||
import { Footer } from 'ts/components/old_footer';
|
||||
import { TopBar } from 'ts/components/top_bar/top_bar';
|
||||
import { Question } from 'ts/pages/faq/question';
|
||||
@ -9,6 +9,7 @@ import { Dispatcher } from 'ts/redux/dispatcher';
|
||||
import { FAQQuestion, FAQSection, WebsitePaths } from 'ts/types';
|
||||
import { configs } from 'ts/utils/configs';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
import { documentConstants } from 'ts/utils/document_meta_constants';
|
||||
import { Translate } from 'ts/utils/translate';
|
||||
|
||||
export interface FAQProps {
|
||||
@ -412,7 +413,7 @@ export class FAQ extends React.Component<FAQProps, FAQState> {
|
||||
public render(): React.ReactNode {
|
||||
return (
|
||||
<div>
|
||||
<DocumentTitle title="0x FAQ" />
|
||||
<DocumentTitle {...documentConstants.FAQ} />
|
||||
<TopBar blockchainIsLoaded={false} location={this.props.location} translate={this.props.translate} />
|
||||
<div id="faq" className="mx-auto max-width-4 pt4" style={{ color: colors.grey800 }}>
|
||||
<h1 className="center" style={{ ...styles.thin }}>
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import DocumentTitle from 'react-document-title';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { Banner } from 'ts/components/banner';
|
||||
import { Button } from 'ts/components/button';
|
||||
import { DocumentTitle } from 'ts/components/document_title';
|
||||
import { ModalContact } from 'ts/components/modals/modal_contact';
|
||||
import { Column, FlexWrap, Section } from 'ts/components/newLayout';
|
||||
import { SiteWrap } from 'ts/components/siteWrap';
|
||||
@ -17,6 +17,7 @@ import { VoteInfo, VoteValue } from 'ts/pages/governance/vote_form';
|
||||
import { VoteStats } from 'ts/pages/governance/vote_stats';
|
||||
import { colors } from 'ts/style/colors';
|
||||
import { configs } from 'ts/utils/configs';
|
||||
import { documentConstants } from 'ts/utils/document_meta_constants';
|
||||
import { utils } from 'ts/utils/utils';
|
||||
|
||||
interface LabelInterface {
|
||||
@ -109,7 +110,7 @@ export class Governance extends React.Component {
|
||||
const { isVoteReceived, tally } = this.state;
|
||||
return (
|
||||
<SiteWrap theme="dark">
|
||||
<DocumentTitle title="Governance Vote - 0x" />
|
||||
<DocumentTitle {...documentConstants.VOTE} />
|
||||
<Section maxWidth="1170px" isFlex={true}>
|
||||
<Column width="55%" maxWidth="560px">
|
||||
<Countdown deadline={proposalData.votingDeadline} />
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { utils as sharedUtils } from '@0x/react-shared';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import DocumentTitle from 'react-document-title';
|
||||
import styled, { keyframes } from 'styled-components';
|
||||
|
||||
import { Banner } from 'ts/components/banner';
|
||||
import { Button } from 'ts/components/button';
|
||||
import { Definition } from 'ts/components/definition';
|
||||
import { DocumentTitle } from 'ts/components/document_title';
|
||||
import { Hero } from 'ts/components/hero';
|
||||
import { Section, SectionProps } from 'ts/components/newLayout';
|
||||
import { SiteWrap } from 'ts/components/siteWrap';
|
||||
@ -14,6 +14,7 @@ import { Heading, Paragraph } from 'ts/components/text';
|
||||
import { Configurator } from 'ts/pages/instant/configurator';
|
||||
import { colors } from 'ts/style/colors';
|
||||
import { WebsitePaths } from 'ts/types';
|
||||
import { documentConstants } from 'ts/utils/document_meta_constants';
|
||||
import { utils } from 'ts/utils/utils';
|
||||
|
||||
import { ModalContact } from '../components/modals/modal_contact';
|
||||
@ -88,7 +89,7 @@ export class Next0xInstant extends React.Component<Props> {
|
||||
public render(): React.ReactNode {
|
||||
return (
|
||||
<SiteWrap>
|
||||
<DocumentTitle title="0x Instant: Quick and secure crypto purchasing" />
|
||||
<DocumentTitle {...documentConstants.INSTANT} />
|
||||
<Hero
|
||||
title="Introducing 0x Instant"
|
||||
description="A free and flexible way to offer simple crypto purchasing in any app or website"
|
||||
|
@ -1,6 +1,6 @@
|
||||
import * as React from 'react';
|
||||
import DocumentTitle from 'react-document-title';
|
||||
|
||||
import { DocumentTitle } from 'ts/components/document_title';
|
||||
import { SectionLandingAbout } from 'ts/components/sections/landing/about';
|
||||
import { SectionLandingClients } from 'ts/components/sections/landing/clients';
|
||||
import { SectionLandingCta } from 'ts/components/sections/landing/cta';
|
||||
@ -8,6 +8,7 @@ import { SectionLandingHero } from 'ts/components/sections/landing/hero';
|
||||
import { SiteWrap } from 'ts/components/siteWrap';
|
||||
|
||||
import { ModalContact } from 'ts/components/modals/modal_contact';
|
||||
import { documentConstants } from 'ts/utils/document_meta_constants';
|
||||
|
||||
interface Props {
|
||||
theme: {
|
||||
@ -24,7 +25,7 @@ export class NextLanding extends React.Component<Props> {
|
||||
public render(): React.ReactNode {
|
||||
return (
|
||||
<SiteWrap theme="dark">
|
||||
<DocumentTitle title="0x: The protocol for trading tokens on Ethereum" />
|
||||
<DocumentTitle {...documentConstants.LANDING} />
|
||||
<SectionLandingHero />
|
||||
<SectionLandingAbout />
|
||||
<SectionLandingClients />
|
||||
|
@ -1,17 +1,15 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import DocumentTitle from 'react-document-title';
|
||||
|
||||
import { Hero } from 'ts/components/hero';
|
||||
|
||||
import { Banner } from 'ts/components/banner';
|
||||
import { Button } from 'ts/components/button';
|
||||
import { Definition } from 'ts/components/definition';
|
||||
import { DocumentTitle } from 'ts/components/document_title';
|
||||
import { Hero } from 'ts/components/hero';
|
||||
import { Icon } from 'ts/components/icon';
|
||||
import { SiteWrap } from 'ts/components/siteWrap';
|
||||
|
||||
import { Section } from 'ts/components/newLayout';
|
||||
import { SiteWrap } from 'ts/components/siteWrap';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
import { documentConstants } from 'ts/utils/document_meta_constants';
|
||||
|
||||
import { ModalContact } from '../components/modals/modal_contact';
|
||||
|
||||
@ -36,7 +34,7 @@ export class NextLaunchKit extends React.Component {
|
||||
public render(): React.ReactNode {
|
||||
return (
|
||||
<SiteWrap theme="dark">
|
||||
<DocumentTitle title="0x Launch Kit: Launch a relayer in under a minute" />
|
||||
<DocumentTitle {...documentConstants.LAUNCH_KIT} />
|
||||
<Hero
|
||||
isLargeTitle={false}
|
||||
isFullWidth={false}
|
||||
|
@ -5,12 +5,14 @@ import * as React from 'react';
|
||||
import { Banner } from 'ts/components/banner';
|
||||
import { Button } from 'ts/components/button';
|
||||
import { Action, Definition } from 'ts/components/definition';
|
||||
import { DocumentTitle } from 'ts/components/document_title';
|
||||
import { Hero } from 'ts/components/hero';
|
||||
import { ModalContact, ModalContactType } from 'ts/components/modals/modal_contact';
|
||||
import { Section } from 'ts/components/newLayout';
|
||||
import { SiteWrap } from 'ts/components/siteWrap';
|
||||
import { colors } from 'ts/style/colors';
|
||||
import { WebsitePaths } from 'ts/types';
|
||||
import { documentConstants } from 'ts/utils/document_meta_constants';
|
||||
|
||||
interface OfferData {
|
||||
icon: string;
|
||||
@ -66,6 +68,7 @@ export class NextMarketMaker extends React.Component<NextMarketMakerProps> {
|
||||
public render(): React.ReactNode {
|
||||
return (
|
||||
<SiteWrap theme="light">
|
||||
<DocumentTitle {...documentConstants.MARKET_MAKER_PROGRAM} />
|
||||
<Hero
|
||||
maxWidth="865px"
|
||||
maxWidthHeading="715px"
|
||||
|
@ -1,17 +1,18 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import DocumentTitle from 'react-document-title';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { Button } from 'ts/components/button';
|
||||
import { DocumentTitle } from 'ts/components/document_title';
|
||||
import { Column, Section } from 'ts/components/newLayout';
|
||||
import { SiteWrap } from 'ts/components/siteWrap';
|
||||
import { Heading, Paragraph } from 'ts/components/text';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
import { documentConstants } from 'ts/utils/document_meta_constants';
|
||||
|
||||
export const VotePlaceholder = () => (
|
||||
<SiteWrap>
|
||||
<DocumentTitle title="0x Vote" />
|
||||
<DocumentTitle {...documentConstants.VOTE} />
|
||||
<Section isTextCentered={true} isPadded={true} padding="150px 0px">
|
||||
<Column>
|
||||
<Heading size="medium" isCentered={true}>
|
||||
|
@ -1,17 +1,18 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import DocumentTitle from 'react-document-title';
|
||||
import ScrollableAnchor, { configureAnchors } from 'react-scrollable-anchor';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { Banner } from 'ts/components/banner';
|
||||
import { Button } from 'ts/components/button';
|
||||
import { Definition } from 'ts/components/definition';
|
||||
import { DocumentTitle } from 'ts/components/document_title';
|
||||
import { Hero } from 'ts/components/hero';
|
||||
import { Column, Section, WrapSticky } from 'ts/components/newLayout';
|
||||
import { SiteWrap } from 'ts/components/siteWrap';
|
||||
import { Slide, Slider } from 'ts/components/slider/slider';
|
||||
import { Heading } from 'ts/components/text';
|
||||
import { documentConstants } from 'ts/utils/document_meta_constants';
|
||||
|
||||
import { ModalContact } from '../components/modals/modal_contact';
|
||||
|
||||
@ -99,7 +100,7 @@ export class NextWhy extends React.Component {
|
||||
);
|
||||
return (
|
||||
<SiteWrap theme="dark">
|
||||
<DocumentTitle title="Features & Benefits - 0x" />
|
||||
<DocumentTitle {...documentConstants.WHY} />
|
||||
<Hero
|
||||
title="The exchange layer for the crypto economy"
|
||||
description="The world's assets are becoming tokenized on public blockchains. 0x Protocol is free, open-source infrastructure that developers and businesses utilize to build products that enable the purchasing and trading of crypto tokens."
|
||||
|
89
packages/website/ts/utils/document_meta_constants.tsx
Normal file
89
packages/website/ts/utils/document_meta_constants.tsx
Normal file
@ -0,0 +1,89 @@
|
||||
export interface DocumentMetadata {
|
||||
title: string;
|
||||
description: string;
|
||||
keywords: string;
|
||||
}
|
||||
|
||||
export const documentConstants: { [s: string]: DocumentMetadata } = {
|
||||
LANDING: {
|
||||
title: '0x: Powering the decentralized exchange of tokens on Ethereum',
|
||||
description:
|
||||
'0x is an open protocol that enables the peer-to-peer exchange of assets on the Ethereum blockchain.',
|
||||
keywords: '',
|
||||
},
|
||||
WHY: {
|
||||
title: '0x: Features and Benefits',
|
||||
description:
|
||||
'0x Protocol is free, open-source infrastructure that developers and businesses utilize to build products that enable the purchasing and trading of crypto tokens.',
|
||||
keywords: '',
|
||||
},
|
||||
INSTANT: {
|
||||
title: '0x Instant: Quick and secure crypto purchasing',
|
||||
description: 'A free and flexible way to offer simple crypto purchasing in any app or website.',
|
||||
keywords: '',
|
||||
},
|
||||
LAUNCH_KIT: {
|
||||
title: '0x Launch Kit: Launch a relayer in under a minute',
|
||||
description: 'Launch Kit includes a set of tools and documentation to build a relayer on 0x.',
|
||||
keywords: '',
|
||||
},
|
||||
ABOUT: {
|
||||
title: '0x: Our Mission and Values',
|
||||
description:
|
||||
'As more assets become tokenized, 0x provides the critical exchange layer in a new financial stack that is more efficient, transparent, and equitable than any system in the past.',
|
||||
keywords: '',
|
||||
},
|
||||
TEAM: {
|
||||
title: '0x: Our Team',
|
||||
description:
|
||||
'The 0x Core Team is passionate about accelerating the adoption decentralized technology and believe in its potential to be an equalizing force in the world. Join us and do the most impactful work of your life.',
|
||||
keywords: '',
|
||||
},
|
||||
PRESS: {
|
||||
title: '0x: Press Highlights',
|
||||
description: '0x has been featured in major publications such as Forbes, Fortune, VentureBeat, and TechCrunch.',
|
||||
keywords: '',
|
||||
},
|
||||
JOBS: {
|
||||
title: 'Jobs at 0x',
|
||||
description:
|
||||
'Join us in building infrastructure upon which the exchange of all tokenized assets will take place.',
|
||||
keywords: '',
|
||||
},
|
||||
ECOSYSTEM_PROGRAM: {
|
||||
title: '0x Ecosystem Acceleration Program: Jumpstart your Business on 0x',
|
||||
description:
|
||||
'The Ecosystem Acceleration Program gives teams access to a variety of services including funding, dedicated technical support, and recruiting assistance.',
|
||||
keywords: '',
|
||||
},
|
||||
MARKET_MAKER_PROGRAM: {
|
||||
title: '0x Market Maker Program: Bring liquidity to the markets of the future',
|
||||
description:
|
||||
'The Market Making Program provides a set of resources that help onboard MMs to bring liquidity to the 0x network. The Program includes tutorials, monetary incentives, and 1:1 support from the 0x team.',
|
||||
keywords: '',
|
||||
},
|
||||
INFRASTRUCTURE_CREDITS: {
|
||||
title: '0x Infrastructure Credits: Earn credits for your business on 0x',
|
||||
description:
|
||||
'0x has teamed up with a variety of service providers to offer free credits for any project working on 0x in a full-time capacity.',
|
||||
keywords: '',
|
||||
},
|
||||
DOCS: {
|
||||
title: '0x Documentation',
|
||||
description:
|
||||
'0x Protocol is free, open-source infrastructure that developers and businesses utilize to build products that enable the purchasing and trading of crypto tokens.',
|
||||
keywords: '',
|
||||
},
|
||||
FAQ: {
|
||||
title: '0x FAQs: Frequently Asked Questions',
|
||||
description:
|
||||
'0x Protocol is free, open-source infrastructure that developers and businesses utilize to build products that enable the purchasing and trading of crypto tokens.',
|
||||
keywords: '',
|
||||
},
|
||||
VOTE: {
|
||||
title: '0x Governance: Vote on ZEIPs with ZRX',
|
||||
description:
|
||||
'0x is an open protocol that is governed by its users. Cast your votes with ZRX on 0x Improvement Proposals.',
|
||||
keywords: '',
|
||||
},
|
||||
};
|
@ -63,3 +63,55 @@ def test_get_order_info():
|
||||
|
||||
assert isinstance(order_info.order_taker_asset_filled_amount, int)
|
||||
assert order_info.order_taker_asset_filled_amount == 0
|
||||
|
||||
|
||||
def test_get_orders_info():
|
||||
"""Demonstrate Exchange.getOrderInfo()."""
|
||||
order: Order = {
|
||||
"makerAddress": "0x0000000000000000000000000000000000000000",
|
||||
"takerAddress": "0x0000000000000000000000000000000000000000",
|
||||
"feeRecipientAddress": "0x0000000000000000000000000000000000000000",
|
||||
"senderAddress": "0x0000000000000000000000000000000000000000",
|
||||
"makerAssetAmount": 1000000000000000000,
|
||||
"takerAssetAmount": 1000000000000000000,
|
||||
"makerFee": 0,
|
||||
"takerFee": 0,
|
||||
"expirationTimeSeconds": 12345,
|
||||
"salt": 12345,
|
||||
"makerAssetData": (b"\x00") * 20,
|
||||
"takerAssetData": (b"\x00") * 20,
|
||||
}
|
||||
|
||||
web3_instance = Web3(Web3.HTTPProvider("http://127.0.0.1:8545"))
|
||||
|
||||
# false positive from pylint: disable=no-member
|
||||
contract_address = NETWORK_TO_ADDRESSES[
|
||||
NetworkId(int(web3_instance.net.version))
|
||||
].exchange
|
||||
|
||||
assert_valid(
|
||||
order_to_jsdict(order, exchange_address=contract_address),
|
||||
"/orderSchema",
|
||||
)
|
||||
|
||||
# false positive from pylint: disable=no-member
|
||||
exchange: datatypes.Contract = web3_instance.eth.contract(
|
||||
address=to_checksum_address(contract_address),
|
||||
abi=zero_ex.contract_artifacts.abi_by_name("Exchange"),
|
||||
)
|
||||
|
||||
orders_info = exchange.call().getOrdersInfo([order])
|
||||
|
||||
for order_info in orders_info:
|
||||
order_info = OrderInfo(*order_info)
|
||||
assert isinstance(order_info.order_status, int)
|
||||
assert order_info.order_status == 4
|
||||
|
||||
assert isinstance(order_info.order_hash, bytes)
|
||||
assert order_info.order_hash.hex() == generate_order_hash_hex(
|
||||
order,
|
||||
exchange_address=NETWORK_TO_ADDRESSES[NetworkId.GANACHE].exchange,
|
||||
)
|
||||
|
||||
assert isinstance(order_info.order_taker_asset_filled_amount, int)
|
||||
assert order_info.order_taker_asset_filled_amount == 0
|
||||
|
@ -168,12 +168,12 @@ setup(
|
||||
"0x-contract-addresses",
|
||||
"0x-contract-artifacts",
|
||||
"0x-json-schemas",
|
||||
"0x-web3",
|
||||
"eth-abi",
|
||||
"eth_utils",
|
||||
"hypothesis>=3.31.2", # HACK! this is web3's dependency!
|
||||
# above works around https://github.com/ethereum/web3.py/issues/1179
|
||||
"mypy_extensions",
|
||||
"web3",
|
||||
],
|
||||
extras_require={
|
||||
"dev": [
|
||||
|
Loading…
x
Reference in New Issue
Block a user