Add Kovan testnet

This commit is contained in:
Vadim 2019-04-26 14:12:22 +03:00
parent 4bce9ec0e6
commit 93b5344e74
25 changed files with 191 additions and 36 deletions

38
package-lock.json generated
View File

@ -12567,14 +12567,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.17",
"resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.17.tgz",
@ -14121,8 +14113,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": {
@ -14520,16 +14523,6 @@
}
}
},
"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",
@ -14781,11 +14774,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",

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14">
<path fill="#8ce1d7" fill-rule="evenodd" d="M13 10a1 1 0 0 1-1-1V2H5a1 1 0 0 1 0-2h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1zm-3-5v8a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1zM8 6H2v6h6V6z"/>
</svg>

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 KiB

View File

@ -25,6 +25,12 @@ $sw-ButtonDownload-height: 44px !default;
@include button-shadow($xdai-orange);
}
&#{ & }-kovan {
background-color: $kovan-cyan;
@include button-focus-active-hover($kovan-cyan);
@include button-shadow($kovan-cyan);
}
.ky-Keys_Block & {
margin-top: auto;

View File

@ -25,6 +25,12 @@ $sw-ButtonGenerate-height: 44px !default;
@include button-shadow($xdai-orange);
}
&#{ & }-kovan {
background-color: $kovan-cyan;
@include button-focus-active-hover($kovan-cyan);
@include button-shadow($kovan-cyan);
}
.hm-Home & {
width: 100%;

View File

@ -21,6 +21,10 @@
&#{ & }-dai {
background-color: $xdai-gray;
}
&#{ & }-kovan {
background-color: $kovan-cyan;
}
}
.sw-Footer_Content {

View File

@ -20,6 +20,10 @@
&#{ & }-dai {
background-color: $xdai-gray;
}
&#{ & }-kovan {
background-color: $kovan-cyan;
}
}
.sw-Header_Content {

View File

@ -10,6 +10,10 @@ $ky-Keys-gap: 40px;
#{ $property }: $sokol-cyan;
}
&#{ & }-kovan {
#{ $property }: $kovan-cyan;
}
}
@mixin keys-color-variants($property) {
@ -109,6 +113,10 @@ $ky-Keys-gap: 40px;
background-image: url('#{ $base-images-path }/Keys/dai.svg');
}
&#{ & }-kovan {
background-image: url('#{ $base-images-path }/Keys/kovan.svg');
}
.ky-Keys_HashContainer & {
margin-left: 3px;
margin-top: -4px;

View File

@ -22,6 +22,10 @@
&#{ & }-dai {
background-color: rgba($xdai-orange, 0.5);
}
&#{ & }-kovan {
background-color: rgba($kovan-cyan, 0.5);
}
}
.ld-Loading_Animation {

View File

@ -0,0 +1,20 @@
.sw-LogoKovan {
display: block;
text-decoration: none;
.sw-Header & {
height: 30px;
width: 178px;
}
.sw-Footer & {
height: 26px;
}
}
.sw-LogoKovan_Image {
display: block;
height: 100%;
width: 100%;
}

View File

@ -28,4 +28,8 @@
&#{ & }-dai {
@include image-retina('#{ $base-images-path }/MainImage/dai/image', 'png');
}
&#{ & }-kovan {
@include image-retina('#{ $base-images-path }/MainImage/kovan/image', 'png');
}
}

View File

@ -14,5 +14,6 @@
@import "LogoDai";
@import "LogoPOA";
@import "LogoSokol";
@import "LogoKovan";
@import "MainImage";
@import "SocialIcons";

View File

@ -1,6 +1,7 @@
// brand colors
$poa-purple: #5a2da5;
$sokol-cyan: #8ce1d7;
$kovan-cyan: #8ce1d7;
$xdai-orange: #fec042;
$xdai-gray: #f2f6f8;

View File

@ -658,6 +658,13 @@ body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {
background-color: #feaf0f; }
.sw-ButtonDownload.sw-ButtonDownload-dai[disabled]:focus, .sw-ButtonDownload.sw-ButtonDownload-dai[disabled].active, .sw-ButtonDownload.sw-ButtonDownload-dai[disabled]:hover {
background-color: #fec042; }
.sw-ButtonDownload.sw-ButtonDownload-kovan {
background-color: #8ce1d7;
box-shadow: 0 5px 10px 0 rgba(140, 225, 215, 0.3); }
.sw-ButtonDownload.sw-ButtonDownload-kovan:focus, .sw-ButtonDownload.sw-ButtonDownload-kovan:active, .sw-ButtonDownload.sw-ButtonDownload-kovan:hover {
background-color: #64d6c9; }
.sw-ButtonDownload.sw-ButtonDownload-kovan[disabled]:focus, .sw-ButtonDownload.sw-ButtonDownload-kovan[disabled].active, .sw-ButtonDownload.sw-ButtonDownload-kovan[disabled]:hover {
background-color: #8ce1d7; }
.ky-Keys_Block .sw-ButtonDownload {
margin-top: auto; }
@media (min-width: 992px) {
@ -722,6 +729,13 @@ body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {
background-color: #feaf0f; }
.sw-ButtonGenerate.sw-ButtonGenerate-dai[disabled]:focus, .sw-ButtonGenerate.sw-ButtonGenerate-dai[disabled].active, .sw-ButtonGenerate.sw-ButtonGenerate-dai[disabled]:hover {
background-color: #fec042; }
.sw-ButtonGenerate.sw-ButtonGenerate-kovan {
background-color: #8ce1d7;
box-shadow: 0 5px 10px 0 rgba(140, 225, 215, 0.3); }
.sw-ButtonGenerate.sw-ButtonGenerate-kovan:focus, .sw-ButtonGenerate.sw-ButtonGenerate-kovan:active, .sw-ButtonGenerate.sw-ButtonGenerate-kovan:hover {
background-color: #64d6c9; }
.sw-ButtonGenerate.sw-ButtonGenerate-kovan[disabled]:focus, .sw-ButtonGenerate.sw-ButtonGenerate-kovan[disabled].active, .sw-ButtonGenerate.sw-ButtonGenerate-kovan[disabled]:hover {
background-color: #8ce1d7; }
.hm-Home .sw-ButtonGenerate {
width: 100%; }
@media (min-width: 768px) {
@ -760,6 +774,8 @@ body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {
background-color: #8ce1d7; }
.sw-Footer.sw-Footer-dai {
background-color: #f2f6f8; }
.sw-Footer.sw-Footer-kovan {
background-color: #8ce1d7; }
.sw-Footer_Content {
max-width: 100%;
@ -814,6 +830,8 @@ body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {
background-color: #8ce1d7; }
.sw-Header.sw-Header-dai {
background-color: #f2f6f8; }
.sw-Header.sw-Header-kovan {
background-color: #8ce1d7; }
.sw-Header_Content {
max-width: 100%;
@ -935,6 +953,8 @@ body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {
border-color: #5a2da5; }
.ky-Keys_Block.ky-Keys_Block-sokol {
border-color: #8ce1d7; }
.ky-Keys_Block.ky-Keys_Block-kovan {
border-color: #8ce1d7; }
.ky-Keys_BlockTitle {
color: #333;
@ -947,6 +967,8 @@ body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {
color: #5a2da5; }
.ky-Keys_BlockTitle.ky-Keys_BlockTitle-sokol {
color: #8ce1d7; }
.ky-Keys_BlockTitle.ky-Keys_BlockTitle-kovan {
color: #8ce1d7; }
.ky-Keys_BlockTitle.ky-Keys_BlockTitle-dai {
color: #333; }
@ -966,6 +988,8 @@ body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {
color: #5a2da5; }
.ky-Keys_Hash.ky-Keys_Hash-sokol {
color: #8ce1d7; }
.ky-Keys_Hash.ky-Keys_Hash-kovan {
color: #8ce1d7; }
.ky-Keys_Hash.ky-Keys_Hash-dai {
color: #333; }
@ -983,6 +1007,8 @@ body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {
background-image: url("../../assets/images/Keys/sokol.svg"); }
.ky-Keys_Copy.ky-Keys_Copy-dai {
background-image: url("../../assets/images/Keys/dai.svg"); }
.ky-Keys_Copy.ky-Keys_Copy-kovan {
background-image: url("../../assets/images/Keys/kovan.svg"); }
.ky-Keys_HashContainer .ky-Keys_Copy {
margin-left: 3px;
margin-top: -4px; }
@ -1033,6 +1059,8 @@ body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {
color: #5a2da5; }
.ky-Keys_Warning.ky-Keys_Warning-sokol {
color: #8ce1d7; }
.ky-Keys_Warning.ky-Keys_Warning-kovan {
color: #8ce1d7; }
.ky-Keys_Warning.ky-Keys_Warning-dai {
color: #333; }
@ -1047,6 +1075,9 @@ body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {
.ky-Keys_WarningIconPath.ky-Keys_WarningIconPath-sokol {
fill: #8ce1d7; }
.ky-Keys_WarningIconPath.ky-Keys_WarningIconPath-kovan {
fill: #8ce1d7; }
.ky-Keys_WarningIconPath.ky-Keys_WarningIconPath-dai {
fill: #fec042; }
@ -1068,6 +1099,8 @@ body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {
background-color: rgba(140, 225, 215, 0.5); }
.ld-Loading.ld-Loading-dai {
background-color: rgba(254, 192, 66, 0.5); }
.ld-Loading.ld-Loading-kovan {
background-color: rgba(140, 225, 215, 0.5); }
.ld-Loading_Animation {
display: flex;
@ -1152,6 +1185,20 @@ body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {
height: 100%;
width: 100%; }
.sw-LogoKovan {
display: block;
text-decoration: none; }
.sw-Header .sw-LogoKovan {
height: 30px;
width: 178px; }
.sw-Footer .sw-LogoKovan {
height: 26px; }
.sw-LogoKovan_Image {
display: block;
height: 100%;
width: 100%; }
.hm-MainImage {
align-items: center;
display: flex;
@ -1202,6 +1249,14 @@ body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {
@media (-webkit-min-device-pixel-ratio: 3), (-moz-min-device-pixel-ratio: 3), (min-resolution: 288dpi), (min-resolution: 3dppx) {
.hm-MainImage_Img.hm-MainImage_Img-dai {
background-image: url("../../assets/images/MainImage/dai/image@3x.png"); } }
.hm-MainImage_Img.hm-MainImage_Img-kovan {
background-image: url("../../assets/images/MainImage/kovan/image.png"); }
@media (-webkit-min-device-pixel-ratio: 2), (-moz-min-device-pixel-ratio: 2), (min-resolution: 192dpi), (min-resolution: 2dppx) {
.hm-MainImage_Img.hm-MainImage_Img-kovan {
background-image: url("../../assets/images/MainImage/kovan/image@2x.png"); } }
@media (-webkit-min-device-pixel-ratio: 3), (-moz-min-device-pixel-ratio: 3), (min-resolution: 288dpi), (min-resolution: 3dppx) {
.hm-MainImage_Img.hm-MainImage_Img-kovan {
background-image: url("../../assets/images/MainImage/kovan/image@3x.png"); } }
.ft-SocialIcons {
align-items: center;

View File

@ -2,12 +2,14 @@ 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,
kovan: kovanLogo,
dai: xDaiLogo
}[networkBranch] || poaLogo
)

View File

@ -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

View File

@ -1,14 +1,16 @@
import React from 'react'
import { LogoPOA } from '../LogoPOA'
import { LogoSokol } from '../LogoSokol'
import { LogoKovan } from '../LogoKovan'
import { LogoDai } from '../LogoDai'
export const Logo = ({ href = null, extraClass = '', networkBranch = '' }) => {
switch (networkBranch) {
case 'sokol':
return <LogoSokol href={href} extraClass={extraClass} />
case 'kovan':
return <LogoKovan href={href} extraClass={extraClass} />
case 'dai':
case 'dai-test':
return <LogoDai href={href} extraClass={extraClass} />
case 'poa':
default:

View File

@ -1,10 +1,10 @@
import React from 'react'
import logoSokol from './logo.svg'
import logoDai from './logo.svg'
export const LogoDai = ({ href = null, extraClass = '' }) => {
return (
<a href={href} className={`sw-LogoDai ${extraClass}`}>
<img className="sw-LogoDai_Image" src={logoSokol} alt="" />
<img className="sw-LogoDai_Image" src={logoDai} alt="" />
</a>
)
}

View File

@ -0,0 +1,10 @@
import React from 'react'
import logoKovan from './logo.svg'
export const LogoKovan = ({ href = null, extraClass = '' }) => {
return (
<a href={href} className={`sw-LogoKovan ${extraClass}`}>
<img className="sw-LogoKovan_Image" src={logoKovan} alt="" />
</a>
)
}

View File

@ -0,0 +1,32 @@
<svg
height="26"
width="151"
xmlns="http://www.w3.org/2000/svg"
>
<defs>
<style type="text/css">
@import url('https://fonts.googleapis.com/css?family=Nunito:400');
text {
font-family: "Nunito", sans-serif;
}
</style>
</defs>
<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.078l.003-.015H0V5.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"
/>
<text
fill="#FFF"
font-family="Nunito"
font-size="14"
font-weight="300"
x="47"
y="17"
>Ceremony App</text>
<path
fill="#FFF"
fill-rule="evenodd"
d="M150 0a1 1 0 0 1 1 1v24a1 1 0 0 1-2 0V1a1 1 0 0 1 1-1z"
/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -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'
)
}

View File

@ -10,6 +10,11 @@ constants.userDeniedTransactionPattern = 'User denied transaction'
constants.baseURL = '/poa-dapps-keys-generation'
constants.NETWORKS = {
'42': {
NAME: 'Kovan',
BRANCH: 'kovan',
TESTNET: true
},
'77': {
NAME: 'Sokol',
BRANCH: 'sokol',
@ -20,11 +25,6 @@ constants.NETWORKS = {
BRANCH: 'core',
TESTNET: false
},
'79': {
NAME: 'Dai-Test',
BRANCH: 'dai-test',
TESTNET: true
},
'100': {
NAME: 'Dai',
BRANCH: 'dai',

View File

@ -12,7 +12,7 @@ export default class KeysManager {
this.instance = new web3.eth.Contract(KeysManagerAbi, KEYS_MANAGER_ADDRESS)
const networkName = constants.NETWORKS[netId].NAME.toLowerCase()
if (networkName === 'dai-test' || networkName === 'dai') {
if (networkName === 'dai') {
this.gasPrice = web3.utils.toWei('0', 'gwei')
} else {
this.gasPrice = web3.utils.toWei('2', 'gwei')