-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #427 from primitivefinance/develop
Nightly Build to Production
- Loading branch information
Showing
19 changed files
with
346 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
import React from 'react' | ||
import Link from 'next/link' | ||
import styled from 'styled-components' | ||
import { | ||
NAME_FOR_SPECIFICATION, | ||
DESCRIPTION_FOR_SPECIFICATION, | ||
SPECIFICATIONS, | ||
} from '@/constants/specifications' | ||
import { ETHERSCAN_MAINNET } from '@/constants/index' | ||
import { Grid, Col, Row } from 'react-styled-flexboxgrid' | ||
import CheckIcon from '@material-ui/icons/Check' | ||
import LaunchIcon from '@material-ui/icons/Launch' | ||
import WarningIcon from '@material-ui/icons/Warning' | ||
|
||
import IconButton from '@/components/IconButton' | ||
import Button from '@/components/Button' | ||
import Tooltip from '@/components/Tooltip' | ||
import Box from '@/components/Box' | ||
import Table from '@/components/Table' | ||
import TableBody from '@/components/TableBody' | ||
import TableCell from '@/components/TableCell' | ||
import TableRow from '@/components/TableRow' | ||
import LitContainer from '@/components/LitContainer' | ||
import Spacer from '@/components/Spacer' | ||
|
||
const FaqTable: React.FC = () => { | ||
const headers = [ | ||
{ | ||
name: 'Contract Specifications', | ||
}, | ||
{ | ||
name: 'Description', | ||
}, | ||
] | ||
return ( | ||
<> | ||
<StyledTitle>Smart Contract Specification</StyledTitle> | ||
<Spacer /> | ||
<LitContainer> | ||
<StyledTableBody> | ||
<TableRow isHead> | ||
{headers.map((header, index) => { | ||
return <TableCell key={header.name}>{header.name}</TableCell> | ||
})} | ||
</TableRow> | ||
<StyledDiv /> | ||
<Spacer size="sm" /> | ||
{SPECIFICATIONS.map((specification, i) => { | ||
return ( | ||
<> | ||
<TableRow key={i} isHead> | ||
<TableCell> | ||
<StyledSub>{specification.name}</StyledSub> | ||
</TableCell> | ||
<TableCell> | ||
<StyledSub>{specification.description}</StyledSub> | ||
</TableCell> | ||
</TableRow> | ||
<Spacer size="sm" /> | ||
</> | ||
) | ||
})} | ||
</StyledTableBody> | ||
<Spacer /> | ||
<Spacer /> | ||
</LitContainer> | ||
</> | ||
) | ||
} | ||
|
||
const StyledDiv = styled.div` | ||
border: 1px solid ${(props) => props.theme.color.grey[600]}; | ||
` | ||
|
||
const StyledTableBody = styled(TableBody)` | ||
width: 50em; | ||
` | ||
const StyledLink = styled.a` | ||
color: white; | ||
text-decoration: none; | ||
width: 30%; | ||
` | ||
const StyledSub = styled.h4` | ||
color: white; | ||
` | ||
const StyledCol = styled(Col)` | ||
margin: 0.5em; | ||
overflow: visible; | ||
` | ||
const StyledARef = styled.a` | ||
color: ${(props) => props.theme.color.grey[400]}; | ||
text-decoration: none; | ||
&:hover { | ||
color: ${(props) => props.theme.color.white}; | ||
} | ||
` | ||
const StyledTitle = styled.h2` | ||
color: white; | ||
font-weight: bold; | ||
` | ||
export default FaqTable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
export interface SpecificationMetaData { | ||
description: string | ||
name: string | ||
id: string | ||
} | ||
|
||
export const NAME_FOR_SPECIFICATION: { [key: string]: string } = { | ||
deployer: 'Deployed By', | ||
assets: 'Assets', | ||
strikes: 'Strikes', | ||
expiration: 'Expirations', | ||
exercise: `Exercise Style`, | ||
settlement: `Settlement Value`, | ||
mulitplier: 'Mulitplier', | ||
margin: 'Margin/Collateral', | ||
fees: 'Fees', | ||
voting: 'Voting', | ||
votingPower: 'Voting Power', | ||
} | ||
|
||
export const DESCRIPTION_FOR_SPECIFICATION: { [key: string]: string } = { | ||
deployer: | ||
'Anyone can use the Primitive Protocol to deploy option smart contracts.', | ||
assets: 'Underlying / Dai, Dai / Underlying', | ||
strikes: 'Strikes will often be out-of-the-money on deployment.', | ||
expiration: 'Fridays at 8:00:00 UTC.', | ||
exercise: `American options with manual | ||
exercising and physical settlement. Options must be manually exercised, which requires action on behalf of the user before expiry.`, | ||
settlement: 'The underlying tokens', | ||
mulitplier: `There is a 1 multiplier for calls, and a 1 / strikePrice multiplier for puts. `, | ||
margin: `100%. For each 1 call option, 1 underlying token must be provided as collateral. For each 1 put option, 1 Dai must be provided as collateral.`, | ||
fees: `No fees are taken from the Primitive protocol. There is a 0.30% fee per swap for using Uniswap.`, | ||
voting: `New market proposals are submitted on Wednesdays before a series expires on Friday.`, | ||
votingPower: `Voting power is determined by the balance of LP tokens in the series which expires on the closest Friday.`, | ||
} | ||
|
||
export const SPECIFICATIONS: SpecificationMetaData[] = Object.keys( | ||
NAME_FOR_SPECIFICATION | ||
).map( | ||
(key): SpecificationMetaData => { | ||
return { | ||
name: NAME_FOR_SPECIFICATION[key], | ||
description: DESCRIPTION_FOR_SPECIFICATION[key], | ||
id: key, | ||
} | ||
} | ||
) |
Oops, something went wrong.
2c4ea1c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: