Skip to content

Commit

Permalink
Merge pull request #665 from PolymathNetwork/release
Browse files Browse the repository at this point in the history
Release 2.3.0
  • Loading branch information
remon-nashid authored Nov 12, 2019
2 parents 21662e2 + e6ad3ce commit 7bd2159
Show file tree
Hide file tree
Showing 25 changed files with 240 additions and 71 deletions.
1 change: 1 addition & 0 deletions packages/new-polymath-issuer/config/.env.local
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ PORT=3000
PUBLIC_URL=http://localhost:3000
POLYMATH_REGISTRY_ADDRESS_LOCAL=0x9FBDa871d559710256a2502A2517b794B482Db40
POLYMATH_REGISTRY_ADDRESS_KOVAN=0x577cf8c535f9c814e74d07197d94a3ea10bc0714
POLYMATH_REGISTRY_ADDRESS_GOERLI=0x7e3c8aF98538Ba19A10Dfc7E8F5469a76998b0f0
NETWORK_WS_PROVIDER_LOCAL=ws://localhost:8545
DEPLOYMENT_STAGE=local
1 change: 1 addition & 0 deletions packages/new-polymath-issuer/config/.env.required.local
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ POLYMATH_OFFCHAIN_URL=
PORT=
POLYMATH_REGISTRY_ADDRESS_LOCAL=
POLYMATH_REGISTRY_ADDRESS_KOVAN=
POLYMATH_REGISTRY_ADDRESS_GOERLI=
NETWORK_WS_PROVIDER_LOCAL=
DEPLOYMENT_STAGE=
PUBLIC_URL=
2 changes: 2 additions & 0 deletions packages/new-polymath-issuer/config/.env.tests
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ POLYMATH_OFFCHAIN_URL=https://foo.com
PORT=1234
POLYMATH_REGISTRY_ADDRESS_LOCAL=1234
POLYMATH_REGISTRY_ADDRESS_KOVAN=5678
POLYMATH_REGISTRY_ADDRESS_GOERLI=6543
NETWORK_WS_PROVIDER_KOVAN=wss://kovanwsproviderurl.com
NETWORK_WS_PROVIDER_GOERLI=wss://goerliwsproviderurl.com
NETWORK_WS_PROVIDER_LOCAL=wss://localwsproviderurl.com
DEPLOYMENT_STAGE=local
PUBLIC_URL=https://foo.com
14 changes: 14 additions & 0 deletions packages/new-polymath-issuer/src/constants/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ export const POLYMATH_REGISTRY_ADDRESS_LOCAL = process.env
.POLYMATH_REGISTRY_ADDRESS_LOCAL as string;
export const POLYMATH_REGISTRY_ADDRESS_KOVAN = process.env
.POLYMATH_REGISTRY_ADDRESS_KOVAN as string;
export const POLYMATH_REGISTRY_ADDRESS_GOERLI = process.env
.POLYMATH_REGISTRY_ADDRESS_GOERLI as string;
export const WS_PROVIDER_LOCAL = process.env
.NETWORK_WS_PROVIDER_LOCAL as string;
export const WS_PROVIDER_KOVAN = process.env
.NETWORK_WS_PROVIDER_LOCAL as string;
export const WS_PROVIDER_GOERLI = process.env
.NETWORK_WS_PROVIDER_LOCAL as string;
export const WS_PROVIDER_MAINNET = process.env
.NETWORK_WS_PROVIDER_LOCAL as string;

Expand All @@ -17,6 +21,7 @@ interface NetworkConfig {
}

let kovanConfig: NetworkConfig = {};
let goerliConfig: NetworkConfig = {};
let localConfig: NetworkConfig = {};

if (POLYMATH_REGISTRY_ADDRESS_KOVAN) {
Expand All @@ -27,6 +32,14 @@ if (POLYMATH_REGISTRY_ADDRESS_KOVAN) {
},
};
}
if (POLYMATH_REGISTRY_ADDRESS_GOERLI) {
goerliConfig = {
[constants.NetworkIds.Goerli]: {
polymathRegistryAddress: POLYMATH_REGISTRY_ADDRESS_GOERLI,
wsProviderUrl: WS_PROVIDER_GOERLI,
},
};
}
if (POLYMATH_REGISTRY_ADDRESS_LOCAL) {
localConfig = {
[constants.NetworkIds.Local]: {
Expand All @@ -38,5 +51,6 @@ if (POLYMATH_REGISTRY_ADDRESS_LOCAL) {

export const POLY_CLIENT_PARAMS = {
...kovanConfig,
...goerliConfig,
...localConfig,
};
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ const Step3Base: FC<Props> = ({

const isTestNet = [
constants.NetworkIds.Kovan,
constants.NetworkIds.Goerli,
constants.NetworkIds.Local,
constants.NetworkIds.LocalVm,
].includes(networkId);
Expand Down
1 change: 1 addition & 0 deletions packages/new-polymath-sdk/src/LowLevel/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ export enum NetworkIds {
Local = 15,
LocalVm = 16,
Kovan = 42,
Goerli = 5,
Mainnet = 1,
Ropsten = 3,
Rinkeby = 4,
Expand Down
12 changes: 12 additions & 0 deletions packages/new-polymath-shared/src/constants/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export enum NetworkIds {
Local = 15,
LocalVm = 16,
Kovan = 42,
Goerli = 5,
Mainnet = 1,
Ropsten = 3,
Rinkeby = 4,
Expand All @@ -13,6 +14,7 @@ export const EtherscanSubdomains: {
[key: number]: string;
} = {
[NetworkIds.Kovan]: 'kovan',
[NetworkIds.Goerli]: 'goerli',
[NetworkIds.Ropsten]: 'ropsten',
[NetworkIds.Mainnet]: '',
[NetworkIds.Local]: 'localhost',
Expand Down Expand Up @@ -43,6 +45,16 @@ export const TokenAddresses: {
[types.Tokens.Usdc]: '0xB06d72a24df50D4E2cAC133B320c5E7DE3ef94cB',
[types.Tokens.Usdt]: '0xB06d72a24df50D4E2cAC133B320c5E7DE3ef94cB',
},
// Dai, USDT and Poly has a proper contract address. The rest are not deployed
// to Goerli yet so we're using USDT address for them, instead.
[NetworkIds.Goerli]: {
[types.Tokens.Dai]: '0x73967c6a0904aa032c103b4104747e88c566b1a2',
[types.Tokens.Poly]: '0x5af7f19575c1b0638994158e1137698701a18c67',
[types.Tokens.Gusd]: '0x5af7f19575c1b0638994158e1137698701a18c67',
[types.Tokens.Pax]: '0x5af7f19575c1b0638994158e1137698701a18c67',
[types.Tokens.Usdc]: '0x5af7f19575c1b0638994158e1137698701a18c67',
[types.Tokens.Usdt]: '0x509ee0d083ddf8ac028f2a56731412edd63223b9',
},
[NetworkIds.Mainnet]: {
[types.Tokens.Dai]: '0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359',
[types.Tokens.Poly]: '0x9992ec3cf6a55b00978cddf2b27bc6882d88d1ec',
Expand Down
3 changes: 3 additions & 0 deletions packages/polymath-investor/.env.local
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Blockchain node URLs
# ------------------------------------------------------------------------------
# * REACT_APP_NETWORK_KOVAN_WS: Kovan node's websocket url
# * REACT_APP_NETWORK_GOERLI_WS: Goerli node's websocket url
# * REACT_APP_NETWORK_MAIN_WS: Mainnet node's websocket url
# * REACT_APP_NETWORK_LOCAL_WS: Local blockchain network's url
# * REACT_APP_NODE_WS: Legacy env variable used to override websocket url to
Expand All @@ -13,6 +14,8 @@
# contract for the local network
# * REACT_APP_POLYMATH_REGISTRY_ADDRESS_KOVAN: address of the polymath registry
# contract for the kovan network
# * REACT_APP_POLYMATH_REGISTRY_ADDRESS_GOERLI: address of the polymath registry
# contract for the goerli network
# * REACT_APP_POLYMATH_REGISTRY_ADDRESS_MAINNET: address of the polymath registry
# contract for the mainnet network
#
Expand Down
1 change: 1 addition & 0 deletions packages/polymath-investor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
You can set the following env vars inside a `.env` file on the package's root

`REACT_APP_NETWORK_KOVAN_WS`: To connect to Kovan locally
`REACT_APP_NETWORK_GOERLI_WS`: To connect to Goerli locally
`REACT_APP_NETWORK_MAIN_WS`: To connect to the Mainnet locally
5 changes: 3 additions & 2 deletions packages/polymath-investor/src/RouteLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Loading } from 'carbon-components-react';
import { MetamaskStatus } from '@polymathnetwork/ui';
import {
KOVAN_NETWORK_ID,
GOERLI_NETWORK_ID,
MAINNET_NETWORK_ID,
} from '@polymathnetwork/shared/constants';
import EthNetworkWrapper from '@polymathnetwork/ui/components/EthNetworkWrapper';
Expand All @@ -22,11 +23,11 @@ type Props = {

class RouteLoader extends Component<Props> {
render() {
const networks = [MAINNET_NETWORK_ID, KOVAN_NETWORK_ID];
const networks = [MAINNET_NETWORK_ID, KOVAN_NETWORK_ID, GOERLI_NETWORK_ID];
return (
<EthNetworkWrapper
loading={<Loading />}
guide={<MetamaskStatus networks="Mainnet or Kovan" />}
guide={<MetamaskStatus networks="Mainnet, Kovan or Goerli" />}
networks={networks}
>
{renderRoutes(routes)}
Expand Down
6 changes: 4 additions & 2 deletions packages/polymath-issuer/.env.local
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Blockchain node URLs
# ------------------------------------------------------------------------------
# * REACT_APP_NETWORK_KOVAN_WS: Kovan node's websocket url
# * REACT_APP_NETWORK_GOERLI_WS: Goerli node's websocket url
# * REACT_APP_NETWORK_MAIN_WS: Mainnet node's websocket url
# * REACT_APP_NETWORK_LOCAL_WS: Local blockchain network's url
# * REACT_APP_NETWORK_LOCALVM_WS: LocalVM blockchain network's url (used for
Expand All @@ -13,8 +14,8 @@
# ------------------------------------------------------------------------------
# * REACT_APP_POLYMATH_REGISTRY_ADDRESS_LOCAL: address of the polymath registry
# contract for the local network
# * REACT_APP_POLYMATH_REGISTRY_ADDRESS_KOVAN: address of the polymath registry
# contract for the kovan network
# * REACT_APP_POLYMATH_REGISTRY_ADDRESS_GOERLI: address of the polymath registry
# contract for the goerli network
# * REACT_APP_POLYMATH_REGISTRY_ADDRESS_MAINNET: address of the polymath registry
# contract for the mainnet network
#
Expand All @@ -40,4 +41,5 @@ REACT_APP_POLYMATH_OFFCHAIN_ADDRESS=http://localhost:3001
REACT_APP_POLYMATH_REGISTRY_ADDRESS_LOCAL=0x9FBDa871d559710256a2502A2517b794B482Db40
REACT_APP_DEPLOYMENT_STAGE=local
REACT_APP_POLYMATH_REGISTRY_ADDRESS_KOVAN=0x5b215a7d39ee305ad28da29bf2f0425c6c2a00b3
REACT_APP_POLYMATH_REGISTRY_ADDRESS_GOERLI=0x7e3c8aF98538Ba19A10Dfc7E8F5469a76998b0f0
REACT_APP_ALLOW_GANACHE_ONLY=false
1 change: 1 addition & 0 deletions packages/polymath-issuer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
You can set the following env vars inside a `.env` file on the package's root

`REACT_APP_NETWORK_KOVAN_WS`: To connect to Kovan locally
`REACT_APP_NETWORK_GOERLI_WS`: To connect to Goerli locally
`REACT_APP_NETWORK_MAIN_WS`: To connect to the Mainnet locally
`REACT_APP_ALLOW_GANACHE_ONLY`: Allows usage of ganache without Metamask when running in local stage

Expand Down
2 changes: 1 addition & 1 deletion packages/polymath-issuer/src/components/ProtectedPages.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class ProtectedPages extends Component<Props> {
Loading={<Loading />}
errorRender={({ networkError, onRequestAuth }) => (
<MetamaskStatus
networks="Mainnet or Kovan"
networks="Mainnet, Kovan or Goerli"
status={networkError}
onRequestAuth={onRequestAuth}
/>
Expand Down
5 changes: 3 additions & 2 deletions packages/polymath-issuer/src/components/Root.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
import {
MAINNET_NETWORK_ID,
KOVAN_NETWORK_ID,
GOERLI_NETWORK_ID,
EtherscanSubdomains,
} from '@polymathnetwork/shared/constants';
import { ModalTransactionQueue } from '@polymathnetwork/new-issuer/components/ModalTransactionQueue';
Expand Down Expand Up @@ -65,7 +66,7 @@ class Root extends Component<Props> {
render() {
const { routes, location, transactionLinkSubdomain } = this.props;
const isUnsupportedBrowser = !isChrome && !isFirefox && !isOpera;
const networks = [MAINNET_NETWORK_ID, KOVAN_NETWORK_ID];
const networks = [MAINNET_NETWORK_ID, GOERLI_NETWORK_ID, KOVAN_NETWORK_ID];

// FIXME @RafaelVidaurre: Remove this hack, only used for temporary maintenance mode
if (window.location.pathname === '/maintenance') {
Expand All @@ -92,7 +93,7 @@ class Root extends Component<Props> {
Loading={<Loading />}
errorRender={({ networkError, onRequestAuth }) => (
<MetamaskStatus
networks="Mainnet or Kovan"
networks="Mainnet, Kovan or Goerli"
status={networkError}
onRequestAuth={onRequestAuth}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -596,11 +596,12 @@ class CompliancePage extends Component<Props, State> {
<Grid>
<Grid.Row gridGap="0px">
<Grid.Col gridSpan={9}>
<h1 className="pui-h1">Token Whitelist</h1>
<h1 className="pui-h1">Token Compliance</h1>
<h3 className="pui-h3">
Whitelisted addresses may hold, buy, or sell the security token
and may participate into the STO. <br /> Security token buy/sell
operations may be subject to restrictions.
Manage compliance requirements of your tokens. You can import
and export your whitelist, manage ownership percentages, add 3rd
party whitelist managers, and manage approval of token transfers
between wallets.
</h3>
</Grid.Col>
<Grid.Col style={{ alignSelf: 'center' }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ class ImportWhitelistModal extends Component<Props> {
className="whitelist-import-modal"
>
<Modal.Header>Import Whitelist</Modal.Header>
<InlineNotification
hideCloseButton
title="We've updated our .CSV format to make it easier for you to manage your investor list. Please see the sample .CSV below for more details."
subtitle=""
kind="warning"
/>
<h4 className="pui-h4">
Add multiple addresses to the whitelist by uploading a comma separated
.CSV file.{' '}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,12 @@ class MintTokens extends Component<Props> {
shareholders, affiliates or for your reserve.
</h3>
<br />
<InlineNotification
hideCloseButton
title="We've updated our .CSV format to make it easier for you to mint tokens to your investors. Please see the sample .CSV below for more details."
subtitle=""
kind="warning"
/>
<h4 className="pui-h4">
Before you proceed, please check with your Advisor how your tokens
should be distributed. Also, note that the ETH Addresses to which
Expand Down
4 changes: 4 additions & 0 deletions packages/polymath-offchain/.env.local
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
# for cross-browser testing)
# * WEB3_NETWORK_LOCAL_WS: LOCAL URL for the web3 WebsocketProvider
# * WEB3_NETWORK_KOVAN_WS: KOVAN URL for the web3 WebsocketProvider
# * WEB3_NETWORK_GOERLI_WS: GOERLI URL for the web3 WebsocketProvider
# * WEB3_NETWORK_MAINNET_WS: MAINNET URL for the web3 WebsocketProvider
# * POLYMATH_REGISTRY_ADDRESS_LOCAL: Address of the deployed PolymathRegistry
# in the local blockchain
# * POLYMATH_REGISTRY_ADDRESS_KOVAN: Address of the deployed PolymathRegistry
# in the Kovan testnet
# * POLYMATH_REGISTRY_ADDRESS_GOERLI: Address of the deployed PolymathRegistry
# in the Goerli testnet
# * POLYMATH_REGISTRY_ADDRESS_MAINNET: Address of the deployed PolymathRegistry
# in Mainnet
#
Expand Down Expand Up @@ -38,6 +41,7 @@
WEB3_NETWORK_LOCAL_WS="ws://localhost:8545"
POLYMATH_REGISTRY_ADDRESS_LOCAL="0x9FBDa871d559710256a2502A2517b794B482Db40"
POLYMATH_REGISTRY_ADDRESS_KOVAN=0x5b215a7d39ee305ad28da29bf2f0425c6c2a00b3
POLYMATH_REGISTRY_ADDRESS_GOERLI=0x7e3c8aF98538Ba19A10Dfc7E8F5469a76998b0f0

PORT="3001"
CRITICAL_RETRIES="5"
Expand Down
2 changes: 2 additions & 0 deletions packages/polymath-offchain/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ Depending on the deployment stage, you will have to set one or more of the follo
`WEB3_NETWORK_LOCAL_WS`: LOCAL URL for the web3 WebsocketProvider (mandatory in local, optional in staging and production)
`WEB3_NETWORK_LOCALVM_WS`: LOCAL VM URL for the web3 WebSocketProvider (used for cross-browser testing, optional in all stages. If this is set then `WEB3_NETWORK_LOCAL_WS` cannot be set and vice-versa)
`WEB3_NETWORK_KOVAN_WS`: KOVAN URL for the web3 WebsocketProvider (optional in local, mandatory in staging and production)
`WEB3_NETWORK_GOERLI_WS`: GOERLI URL for the web3 WebsocketProvider (optional in local, mandatory in staging and production)
`WEB3_NETWORK_MAINNET_WS`: MAINNET URL for the web3 WebsocketProvider (unused in local and staging, mandatory in production)

`POLYMATH_REGISTRY_ADDRESS_LOCAL`: Address of the deployed PolymathRegistry in the local blockchain (mandatory in local, optional in staging and production)
`POLYMATH_REGISTRY_ADDRESS_KOVAN`: Address of the deployed PolymathRegistry in the Kovan testnet (optional in local, mandatory in staging and production)
`POLYMATH_REGISTRY_ADDRESS_GOERLI`: Address of the deployed PolymathRegistry in the Goerli testnet (optional in local, mandatory in staging and production)
`POLYMATH_REGISTRY_ADDRESS_MAINNET`: Address of the deployed PolymathRegistry in Mainnet (unused in local and staging, mandatory in production)

`PORT`: Web server's port
Expand Down
Loading

0 comments on commit 7bd2159

Please sign in to comment.