# polymath-core_v2

> Polymath Network Core Smart Contracts v2

Latest version **0.3.0** (published 2018-04-02) · MIT license · 21 weekly downloads

## Install

```sh
npm install polymath-core_v2
pnpm add polymath-core_v2
yarn add polymath-core_v2
bun add polymath-core_v2
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2018-04-02 |
| First published | 2018-03-20 |
| Weekly downloads | 21 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 12 |
| Unpacked size | 6.3 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 334 |
| Author | Polymath Inc |
| Maintainers | bakii_agl |
| Keywords | smart, contracts, solidity, token, securityToken, ERC20, ST20 |

## Links

- npm: https://www.npmjs.com/package/polymath-core_v2
- Repository: https://github.com/PolymathNetwork/polymath-core_v2
- Homepage: https://github.com/PolymathNetwork/polymath-core_v2#readme
- Issues: https://github.com/PolymathNetwork/polymath-core_v2/issues
- npm.io page: https://npm.io/package/polymath-core_v2

## Dependencies (12)

- [web3](https://npm.io/package/web3.md) ^1.0.0-beta.33
- [bignumber.js](https://npm.io/package/bignumber.js.md) ^6.0.0
- [readline-sync](https://npm.io/package/readline-sync.md) ^1.4.9
- [babel-polyfill](https://npm.io/package/babel-polyfill.md) 6.26.0
- [babel-register](https://npm.io/package/babel-register.md) 6.26.0
- [truffle-contract](https://npm.io/package/truffle-contract.md) ^3.0.4
- [zeppelin-solidity](https://npm.io/package/zeppelin-solidity.md) 1.7.0
- [babel-preset-es2015](https://npm.io/package/babel-preset-es2015.md) 6.24.1
- [babel-preset-stage-2](https://npm.io/package/babel-preset-stage-2.md) 6.24.1
- [babel-preset-stage-3](https://npm.io/package/babel-preset-stage-3.md) 6.24.1
- [truffle-hdwallet-provider](https://npm.io/package/truffle-hdwallet-provider.md) 0.0.3
- [truffle-hdwallet-provider-privkey](https://npm.io/package/truffle-hdwallet-provider-privkey.md) ^0.1.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.3.0 (latest) — 2018-04-02
- 0.2.0 — 2018-03-26
- 0.1.7 — 2018-03-25
- 0.1.6 — 2018-03-22
- 0.1.5 — 2018-03-20
- 0.1.4 — 2018-03-20
- 0.1.3 — 2018-03-20
- 0.1.2 — 2018-03-20
- 0.1.1 — 2018-03-20

## README

[![Build Status](https://travis-ci.com/PolymathNetwork/polymath-core_v2.svg?token=rqsL7PsbwLxrskjYAHpq&branch=master)](https://travis-ci.com/PolymathNetwork/polymath-core_v2)
<a href="https://t.me/polymathnetwork"><img src="https://img.shields.io/badge/50k+-telegram-blue.svg" target="_blank"></a>

![Polymath](Polymath.png)

# Polymath core v2

The polymath core smart contracts provide a system for launching regulatory
compliant securities tokens on a decentralized blockchain.

# Polymath Core Smart Contracts
## Ropsten

- TickerRegistry:
- SecurityTokenRegistry:
- ModuleRegistry:

## Setup

The smart contracts are written in [Solidity][solidity] and tested/deployed
using [Truffle][truffle] version 4.1.0. The new version of Truffle doesn't
require testrpc to be installed separately so you can just do use the following:

```bash
# Install Truffle package globally:
$ npm install -g truffle

# Install local node dependencies:
$ npm install
```

## Testing

To test the code simply run:

```
$ npm run test
```

# Setting up Polymath Network

1. Deploy ModuleRegistry. ModuleRegistry keeps track of all available modules that add new functionalities to
Polymath-based security tokens.

2. Deploy GeneralTransferManagerFactory. This module allows the use of a general TransferManager for newly issued security tokens. The General Transfer Manager gives STs the ability to have their transfers restricted by using an on-chain whitelist.

3. Add the GeneralTransferManagerFactory module to ModuleRegistry by calling `ModuleRegistry.registerModule()`.

4. Deploy TickerRegistry. This contract handles the registration of unique token symbols. Issuers first have to claim their token symbol through the TickerRegistry. If it's available they will be able to deploy a ST with the same symbol for a set number of days before the registration expires.

5. Deploy SecurityTokenRegistry. This contract is responsible for deploying new Security Tokens. STs should always be deployed by using the SecurityTokenRegistry.

## Deploying Security Token Offerings (Only Network Admin)

Security Token Offerings (STOs) grant STs the ability to be distributed in an initial offering. Polymath offers a few out-of-the-box STO models for issuers to select from and, as the platform evolves, 3rd party developers will be able to create their own offerings and make them available to the network.

As an example, we've included a CappedSTO and CappedSTOFactory contracts.

In order to create a new STO, developers first have to create an STO Factory contract which will be responsible for instantiating STOs as Issuers select them. Each STO Factory has an STO contract attached to it, which will be instantiated for each Security Token that wants to use that particular STO.

To make an STO available for Issuers, first, deploy the STO Factory and take note of its address. Then, call `moduleRegistry.registerModule(STO Factory address);`

Once the STO Factory has been registered to the Module Registry, issuers will be able to see it on the Polymath dApp and they will be able to add it as a module of the ST.

# Using the CLI ST-20 Generator

The CLI ST-20 Generator is a wizard-like script that will guide you in the creation and deployment of the ST-20 token.

To use it, make sure you are connected to a full-node (or locally to Ganache-cli).
1. Edit demo/ST20Generator.js to make sure it's pointing to the correct contract addresses
2. On your terminal, run the following command: `node demo/ST20Generator`
3. Follow the Command-line prompts

### Styleguide

The polymath-core repo follows the style guide overviewed here:
http://solidity.readthedocs.io/en/develop/style-guide.html

[polymath]: https://polymath.network
[ethereum]: https://www.ethereum.org/
[solidity]: https://solidity.readthedocs.io/en/develop/
[truffle]: http://truffleframework.com/
[testrpc]: https://github.com/ethereumjs/testrpc

---
_Source: https://npm.io/package/polymath-core_v2 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
