Add Kovan testnet
This commit is contained in:
parent
9f7bfb7b2f
commit
c8c19e83fc
|
@ -5,6 +5,7 @@
|
|||
- Core POA network (RPC endpoint: `https://core.poa.network`)
|
||||
- xDai chain (RPC endpoint: `https://dai.poa.network`)
|
||||
- Sokol testnet (RPC endpoint: `https://sokol.poa.network`)
|
||||
- Kovan testnet (RPC endpoint: `https://kovan.infura.io/`)
|
||||
|
||||
## Supported browsers
|
||||
|
||||
|
@ -23,7 +24,7 @@ Please check related posts in wiki [Governance Overview](https://github.com/poan
|
|||
## Configuration
|
||||
Governance DApp is configured with [POA Network governance contracts](https://github.com/poanetwork/poa-network-consensus-contracts)
|
||||
|
||||
There are contracts' addresses for [sokol](https://github.com/poanetwork/poa-chain-spec/blob/sokol/contracts.json) and [core](https://github.com/poanetwork/poa-chain-spec/blob/core/contracts.json).
|
||||
There are contracts' addresses for [Sokol](https://github.com/poanetwork/poa-chain-spec/blob/sokol/contracts.json), [Core](https://github.com/poanetwork/poa-chain-spec/blob/core/contracts.json), [xDai](https://github.com/poanetwork/poa-chain-spec/blob/dai/contracts.json), and [Kovan](https://github.com/poanetwork/poa-chain-spec/blob/kovan/contracts.json).
|
||||
|
||||
|
||||
## Building from source
|
||||
|
|
|
@ -12726,14 +12726,6 @@
|
|||
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
|
||||
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
|
||||
},
|
||||
"typedarray-to-buffer": {
|
||||
"version": "3.1.5",
|
||||
"resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
|
||||
"integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
|
||||
"requires": {
|
||||
"is-typedarray": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"ua-parser-js": {
|
||||
"version": "0.7.19",
|
||||
"resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.19.tgz",
|
||||
|
@ -13757,8 +13749,19 @@
|
|||
"integrity": "sha1-fecPG4Py3jZHZ3IVa+z+9uNRbrM=",
|
||||
"requires": {
|
||||
"underscore": "1.8.3",
|
||||
"web3-core-helpers": "1.0.0-beta.34",
|
||||
"websocket": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2"
|
||||
"web3-core-helpers": "1.0.0-beta.34"
|
||||
},
|
||||
"dependencies": {
|
||||
"websocket": {
|
||||
"version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2",
|
||||
"from": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2",
|
||||
"requires": {
|
||||
"debug": "^2.2.0",
|
||||
"nan": "^2.3.3",
|
||||
"typedarray-to-buffer": "^3.1.2",
|
||||
"yaeti": "^0.0.6"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"web3-shh": {
|
||||
|
@ -14404,16 +14407,6 @@
|
|||
"source-map": "~0.6.1"
|
||||
}
|
||||
},
|
||||
"websocket": {
|
||||
"version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2",
|
||||
"from": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",
|
||||
"requires": {
|
||||
"debug": "^2.2.0",
|
||||
"nan": "^2.3.3",
|
||||
"typedarray-to-buffer": "^3.1.2",
|
||||
"yaeti": "^0.0.6"
|
||||
}
|
||||
},
|
||||
"websocket-driver": {
|
||||
"version": "0.7.0",
|
||||
"resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz",
|
||||
|
@ -14641,11 +14634,6 @@
|
|||
"resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
|
||||
"integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE="
|
||||
},
|
||||
"yaeti": {
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz",
|
||||
"integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc="
|
||||
},
|
||||
"yallist": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
|
||||
|
|
|
@ -85,11 +85,6 @@ class App extends Component {
|
|||
return 'All'
|
||||
}
|
||||
|
||||
getNetIdClass() {
|
||||
const { netId } = this.props.contractsStore
|
||||
return netId in constants.NETWORKS && constants.NETWORKS[netId].TESTNET ? constants.SOKOL : ''
|
||||
}
|
||||
|
||||
isNewBallotPage() {
|
||||
return `${constants.rootPath}/new` === this.props.location.pathname
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14">
|
||||
<path fill="#ffffff" fill-rule="evenodd" d="M13.711 13.711a1.01 1.01 0 0 1-1.427 0l-1.97-1.97A6.444 6.444 0 0 1 6.5 13 6.5 6.5 0 1 1 13 6.5c0 1.43-.476 2.741-1.259 3.814l1.97 1.97a1.01 1.01 0 0 1 0 1.427zM6.5 2a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 326 B |
|
@ -53,4 +53,10 @@
|
|||
background-color: rgba($xdai-orange, 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
&#{ & }-kovan {
|
||||
&:before {
|
||||
background-color: rgba($kovan-cyan, 0.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
.sokol & {
|
||||
color: $sokol-cyan;
|
||||
}
|
||||
.kovan & {
|
||||
color: $kovan-cyan;
|
||||
}
|
||||
}
|
||||
|
||||
.color-danger {
|
||||
|
@ -28,6 +31,9 @@
|
|||
.sokol & {
|
||||
color: $sokol-danger-color;
|
||||
}
|
||||
.kovan & {
|
||||
color: $kovan-danger-color;
|
||||
}
|
||||
}
|
||||
|
||||
.color-success {
|
||||
|
@ -35,4 +41,7 @@
|
|||
.sokol & {
|
||||
color: $sokol-cyan;
|
||||
}
|
||||
.kovan & {
|
||||
color: $kovan-cyan;
|
||||
}
|
||||
}
|
|
@ -66,4 +66,8 @@
|
|||
color: $xdai-orange;
|
||||
}
|
||||
|
||||
&#{ & }-kovan {
|
||||
color: $kovan-cyan;
|
||||
}
|
||||
|
||||
}
|
|
@ -44,4 +44,13 @@ $sw-ButtonAddBallot-height: 44px;
|
|||
background-color: lighten($xdai-orange, 5%);
|
||||
}
|
||||
}
|
||||
|
||||
&#{ & }-kovan {
|
||||
background-color: $kovan-cyan;
|
||||
color: #fff;
|
||||
|
||||
&:hover {
|
||||
background-color: darken($kovan-cyan, 5%);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -43,6 +43,15 @@
|
|||
}
|
||||
}
|
||||
|
||||
&#{ & }-kovan {
|
||||
background-color: $kovan-cyan;
|
||||
|
||||
&:active,
|
||||
&:hover {
|
||||
background-color: darken($kovan-cyan, 10%);
|
||||
}
|
||||
}
|
||||
|
||||
&#{ & }-cancel {
|
||||
&,
|
||||
&:active,
|
||||
|
|
|
@ -28,6 +28,10 @@
|
|||
border-color: $xdai-gray;
|
||||
}
|
||||
|
||||
&#{ & }-kovan {
|
||||
border-color: $kovan-cyan;
|
||||
}
|
||||
|
||||
@media (min-width: $breakpoint-md) {
|
||||
width: auto;
|
||||
}
|
||||
|
@ -52,4 +56,8 @@
|
|||
.sw-ButtonLoadMore-dai & {
|
||||
color: $xdai-gray;
|
||||
}
|
||||
|
||||
.sw-ButtonLoadMore-kovan & {
|
||||
color: $kovan-cyan;
|
||||
}
|
||||
}
|
|
@ -74,6 +74,25 @@ $sw-ButtonNewBallot-height: 36px;
|
|||
}
|
||||
}
|
||||
|
||||
&#{ & }-kovan {
|
||||
background-color: #fff;
|
||||
box-shadow: 0 5px 10px 0 rgba($kovan-cyan, 0.3);
|
||||
color: $kovan-cyan;
|
||||
|
||||
&:active,
|
||||
&:hover {
|
||||
background-color: darken(#fff, 5%);
|
||||
}
|
||||
|
||||
&.active {
|
||||
&,
|
||||
&:active,
|
||||
&:hover {
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.active {
|
||||
cursor: pointer;
|
||||
pointer-events: none;
|
||||
|
|
|
@ -118,4 +118,31 @@
|
|||
}
|
||||
}
|
||||
|
||||
&#{ & }-negative#{ & }-kovan {
|
||||
background-color: $voting-negative-kovan;
|
||||
box-shadow: 0 5px 10px 0 rgba($voting-negative-kovan, 0.3);
|
||||
|
||||
&:hover {
|
||||
background-color: darken($voting-negative-kovan, 10%);
|
||||
}
|
||||
}
|
||||
|
||||
&#{ & }-neutral#{ & }-kovan {
|
||||
background-color: $voting-neutral-kovan;
|
||||
box-shadow: 0 5px 10px 0 rgba($voting-neutral-kovan, 0.3);
|
||||
|
||||
&:hover {
|
||||
background-color: darken($voting-neutral-kovan, 10%);
|
||||
}
|
||||
}
|
||||
|
||||
&#{ & }-positive#{ & }-kovan {
|
||||
background-color: $voting-positive-kovan;
|
||||
box-shadow: 0 5px 10px 0 rgba($voting-positive-kovan, 0.3);
|
||||
|
||||
&:hover {
|
||||
background-color: darken($voting-positive-kovan, 10%);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -22,6 +22,10 @@
|
|||
&#{ & }-dai {
|
||||
background-color: $xdai-gray;
|
||||
}
|
||||
|
||||
&#{ & }-kovan {
|
||||
background-color: $kovan-cyan;
|
||||
}
|
||||
}
|
||||
|
||||
.sw-Footer_Content {
|
||||
|
|
|
@ -25,4 +25,10 @@
|
|||
color: $xdai-orange;
|
||||
}
|
||||
}
|
||||
|
||||
&#{ & }-kovan {
|
||||
a {
|
||||
color: $kovan-cyan;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -32,6 +32,10 @@
|
|||
background-color: $xdai-gray;
|
||||
}
|
||||
|
||||
&#{ & }-kovan {
|
||||
background-color: $kovan-cyan;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.sw-Header_Content {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@mixin path-colors($parent-class: '', $fill-core: #fff, $fill-sokol: #fff, $fill-dai: #fff) {
|
||||
@mixin path-colors($parent-class: '', $fill-core: #fff, $fill-sokol: #fff, $fill-dai: #fff, $fill-kovan: #fff) {
|
||||
|
||||
#{ $parent-class } &#{ & }-core {
|
||||
fill: $fill-core;
|
||||
|
@ -12,6 +12,10 @@
|
|||
fill: $fill-dai;
|
||||
}
|
||||
|
||||
#{ $parent-class } &#{ & }-kovan {
|
||||
fill: $fill-kovan;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.sw-IconAdd {
|
||||
|
@ -26,7 +30,7 @@
|
|||
|
||||
.sw-IconAdd_Path {
|
||||
|
||||
@include path-colors('.sw-ButtonNewBallot', #fff, $sokol-cyan, #fff);
|
||||
@include path-colors('.sw-ButtonNewBallot', #fff, $sokol-cyan, #fff, $kovan-cyan);
|
||||
|
||||
@include path-colors('.sw-ButtonAddBallot');
|
||||
|
||||
|
|
|
@ -11,6 +11,10 @@
|
|||
fill: #fff;
|
||||
}
|
||||
|
||||
&#{ & }-kovan {
|
||||
fill: #fff;
|
||||
}
|
||||
|
||||
.sw-ButtonFinalize-danger & {
|
||||
fill: #fff !important;
|
||||
}
|
||||
|
|
|
@ -11,6 +11,10 @@
|
|||
fill: $xdai-gray-dark;
|
||||
}
|
||||
|
||||
&#{ & }-kovan {
|
||||
fill: $kovan-cyan;
|
||||
}
|
||||
|
||||
.sw-ButtonLoadMore:hover & {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
|
|
@ -19,4 +19,8 @@
|
|||
&#{ & }-dai {
|
||||
fill: $xdai-menu-icon-color;
|
||||
}
|
||||
|
||||
&#{ & }-kovan {
|
||||
fill: $kovan-menu-icon-color;
|
||||
}
|
||||
}
|
|
@ -72,6 +72,16 @@
|
|||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.frm-KeysTypes_Radio:checked + &#{ & }-kovan {
|
||||
&,
|
||||
&:hover {
|
||||
background-color: $kovan-cyan;
|
||||
border-color: $kovan-cyan;
|
||||
box-shadow: 0 5px 10px 0 rgba($kovan-cyan, 0.3);
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.frm-KeysTypes_Radio {
|
||||
|
|
|
@ -22,6 +22,10 @@
|
|||
&#{ & }-dai {
|
||||
background-color: rgba($xdai-orange, 0.5);
|
||||
}
|
||||
|
||||
&#{ & }-kovan {
|
||||
background-color: rgba($kovan-cyan, 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
.ld-Loading_Animation {
|
||||
|
|
|
@ -14,4 +14,8 @@
|
|||
&#{ & }-dai {
|
||||
background-color: $xdai-gray-darker;
|
||||
}
|
||||
|
||||
&#{ & }-kovan {
|
||||
background-color: $kovan-cyan-darker;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,6 +72,19 @@
|
|||
}
|
||||
}
|
||||
|
||||
&#{ & }-kovan {
|
||||
color: #fff;
|
||||
|
||||
&:active,
|
||||
&.active {
|
||||
background-color: darken($kovan-cyan-darker, 10%);
|
||||
|
||||
@media (min-width: $breakpoint-md) {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.hd-MobileMenuLinks & {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
|
|
|
@ -50,4 +50,12 @@
|
|||
background-color: $xdai-orange;
|
||||
}
|
||||
}
|
||||
|
||||
&#{ & }-kovan#{ & }-active {
|
||||
color: $kovan-cyan;
|
||||
|
||||
&::before {
|
||||
background-color: $kovan-cyan;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -21,6 +21,9 @@
|
|||
&#{ & }-dai {
|
||||
background-color: $xdai-gray-darker;
|
||||
}
|
||||
&#{ & }-kovan {
|
||||
background-color: $kovan-cyan-darker;
|
||||
}
|
||||
}
|
||||
|
||||
.sw-SearchBar_Content {
|
||||
|
@ -68,4 +71,8 @@
|
|||
@include input-color(rgba(51, 51, 51, 0.5), #333);
|
||||
background-image: url('#{ $base-images-path }/SearchBar/dai.svg');
|
||||
}
|
||||
&#{ & }-kovan {
|
||||
@include input-color(rgba(255, 255, 255, 0.5), #fff);
|
||||
background-image: url('#{ $base-images-path }/SearchBar/kovan.svg');
|
||||
}
|
||||
}
|
|
@ -51,6 +51,18 @@
|
|||
&#{ & }-positive#{ & }-dai {
|
||||
background-color: $voting-positive-dai;
|
||||
}
|
||||
|
||||
&#{ & }-negative#{ & }-kovan {
|
||||
background-color: $voting-negative-kovan;
|
||||
}
|
||||
|
||||
&#{ & }-neutral#{ & }-kovan {
|
||||
background-color: $voting-neutral-kovan;
|
||||
}
|
||||
|
||||
&#{ & }-positive#{ & }-kovan {
|
||||
background-color: $voting-positive-kovan;
|
||||
}
|
||||
}
|
||||
|
||||
.vt-VoteProgressBar_Votes {
|
||||
|
|
|
@ -10,4 +10,8 @@
|
|||
&#{ & }-dai {
|
||||
fill: $xdai-menu-icon-color;
|
||||
}
|
||||
|
||||
&#{ & }-kovan {
|
||||
fill: $kovan-menu-icon-color;
|
||||
}
|
||||
}
|
|
@ -20,6 +20,12 @@ $xdai-gray: #f2f6f8;
|
|||
$xdai-gray-dark: #333;
|
||||
$xdai-menu-icon-color: #333;
|
||||
|
||||
$kovan-cyan: #6ac9b9;
|
||||
$kovan-cyan-darker: #41b19e;
|
||||
$kovan-freeze-color: #50bbda;
|
||||
$kovan-danger-color: #f24c67;
|
||||
$kovan-menu-icon-color: #fff;
|
||||
|
||||
// colors
|
||||
$gray-text-color: #333;
|
||||
|
||||
|
@ -84,5 +90,9 @@ $voting-negative-dai: #f21b57;
|
|||
$voting-neutral-dai: #50bbda;
|
||||
$voting-positive-dai: #60db97;
|
||||
|
||||
$voting-negative-kovan: #f24c67;
|
||||
$voting-neutral-kovan: #50bbda;
|
||||
$voting-positive-kovan: #6ac9b9;
|
||||
|
||||
// grid stuff
|
||||
$base-grid-gap: 30px;
|
File diff suppressed because one or more lines are too long
|
@ -2,13 +2,15 @@ import React from 'react'
|
|||
import xDaiLogo from './xdai.svg'
|
||||
import poaLogo from './core.svg'
|
||||
import sokolLogo from './sokol.svg'
|
||||
import kovanLogo from './kovan.svg'
|
||||
|
||||
const getLogoSrc = networkBranch => {
|
||||
return (
|
||||
{
|
||||
core: poaLogo,
|
||||
sokol: sokolLogo,
|
||||
dai: xDaiLogo
|
||||
dai: xDaiLogo,
|
||||
kovan: kovanLogo
|
||||
}[networkBranch] || poaLogo
|
||||
)
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38 26">
|
||||
<path fill="#FFF" fill-rule="evenodd" d="M36.528 20H24.272c-.167 0-.334-.028-.499-.068l.018.068h-5.287l-1.607-5.969H.969A.96.96 0 0 1 0 13.078c0-.005.003-.01.003-.016H0V5.906C0 4.853.86 4 1.922 4l.016.002V4h30.275c1.061 0 2.153.855 2.437 1.91l3.285 12.18c.285 1.055-.345 1.91-1.407 1.91zM7.723 6.866H3.361l1.169 4.298h4.362L7.723 6.866zm7.209 0h-4.361l1.169 4.298h4.361l-1.169-4.298zm11.743 10.985h1.923l-.517-1.911h-1.922l.516 1.911zm5.201-10.985h-8.17l2.194 8.119h8.171l-2.195-8.119zm2.453 9.074h-1.922l.516 1.911h1.923l-.517-1.911zm-33.61.047v-.05h12.969v.003h1.557L16.342 20H1.938v-.002L1.922 20A1.914 1.914 0 0 1 0 18.094v-1.188h.005c0-.006-.005-.01-.005-.015 0-.439.308-.793.719-.904z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 766 B |
|
@ -9,7 +9,8 @@ const getIconBackgroundColor = networkBranch => {
|
|||
{
|
||||
dai: '#e3e7e9',
|
||||
poa: '#fff',
|
||||
sokol: '#fff'
|
||||
sokol: '#fff',
|
||||
kovan: '#fff'
|
||||
}[networkBranch] || '#fff'
|
||||
)
|
||||
}
|
||||
|
@ -19,7 +20,8 @@ const getIconColor = networkBranch => {
|
|||
{
|
||||
dai: '#333',
|
||||
poa: '#5c34a2',
|
||||
sokol: '#6ac9b9'
|
||||
sokol: '#6ac9b9',
|
||||
kovan: '#6ac9b9'
|
||||
}[networkBranch] || '#5c34a2'
|
||||
)
|
||||
}
|
||||
|
|
|
@ -54,8 +54,15 @@ constants.navigationData = [
|
|||
constants.SOKOL = 'sokol'
|
||||
constants.CORE = 'core'
|
||||
constants.DAI = 'dai'
|
||||
constants.KOVAN = 'kovan'
|
||||
|
||||
constants.NETWORKS = {
|
||||
'42': {
|
||||
NAME: 'Kovan',
|
||||
RPC: 'https://kovan.infura.io/',
|
||||
BRANCH: constants.KOVAN,
|
||||
TESTNET: true
|
||||
},
|
||||
'77': {
|
||||
NAME: 'Sokol',
|
||||
RPC: 'https://sokol.poa.network',
|
||||
|
|
Loading…
Reference in New Issue