Skip to content

Commit fcfec7f

Browse files
authored
Merge pull request #143 from OpenST/develop
Merging develop to release-0.10.0
2 parents 62b995d + 0921cc8 commit fcfec7f

92 files changed

Lines changed: 4052 additions & 1311 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,31 @@
22

33
## Version 0.10.0
44

5-
* Update PricerRule ABI/BIN with PricerRule:convertPayCurrencyToToken fix ([126](https://github.com/OpenSTFoundation/openst.js/pull/126))
6-
* PricerRule integration test and cleanup ([#114](https://github.com/OpenSTFoundation/openst.js/pull/114))
7-
* ProxyFactory address refactoring from createCompanyWallet method ([#113](https://github.com/OpenSTFoundation/openst.js/pull/113)
8-
* Integration with mosaic.js npm ([#109](https://github.com/OpenSTFoundation/openst.js/pull/109))
9-
* Docker Geth Integration: Using docker geth ([#108](https://github.com/OpenSTFoundation/openst.js/pull/108))
10-
* Delayed Recovery Module Setup ([#107](https://github.com/OpenSTFoundation/openst.js/pull/107))
11-
* Remove license from top of JS files ([#106](https://github.com/OpenSTFoundation/openst.js/pull/106))
12-
* MultiSig Operation: Logout all sessions ([104](https://github.com/OpenSTFoundation/openst.js/pull/104))
13-
* WalletOperations Test: Remove tokenRulesAddress while creating TokenHolder instance ([#91](https://github.com/OpenSTFoundation/openst.js/pull/91))
14-
* Remove pre commit hook from package.json which generates webpack ([#88](https://github.com/OpenSTFoundation/openst.js/pull/88))
15-
* Fix version to 0 in SignEIP1077Extension.js ([#87](https://github.com/OpenSTFoundation/openst.js/pull/87))
16-
* Wallet operations cleanup and refactoring ([#79](https://github.com/OpenSTFoundation/openst.js/pull/79))
17-
* Multisig operations : Change threshold ([#78](https://github.com/OpenSTFoundation/openst.js/pull/78))
18-
* Added multisig wallet operations ([#74](https://github.com/OpenSTFoundation/openst.js/pull/74))
19-
* Parse payCurrencyCode to bytes in PricerRule deployment ([#71](https://github.com/OpenSTFoundation/openst.js/pull/71))
20-
* User setup: Company to User Implementation ([#68](https://github.com/OpenSTFoundation/openst.js/pull/68))
21-
* Direct transfer of tokens using TokenRules contract ([#67](https://github.com/OpenSTFoundation/openst.js/pull/67))
22-
* Rule setup: Pricer rule setup and interaction ([#66](https://github.com/OpenSTFoundation/openst.js/pull/66))
23-
* Rename _createUserWallet to _createUserWalletRawTx ([#64](https://github.com/OpenSTFoundation/openst.js/pull/64))
24-
* Updated params _createUserWallet ([#61](https://github.com/OpenSTFoundation/openst.js/pull/61))
25-
* TokenRules : Rules registration framework for registration of rules getter to fetch registered rules ([#60](https://github.com/OpenSTFoundation/openst.js/pull/60))
26-
* Updated index.js to expose setup libraries ([#57](https://github.com/OpenSTFoundation/openst.js/pull/57))
27-
* User setup : Implement createUserWallet ([#55](https://github.com/OpenSTFoundation/openst.js/pull/55))
28-
* Interaction for MultiSig and TokenHolder master copy deployment ([#53](https://github.com/OpenSTFoundation/openst.js/pull/53))
29-
* Interaction for TokenRules deployment ([#51](https://github.com/OpenSTFoundation/openst.js/issues/51))
5+
* Deprecation of setup and helper files ([141](https://github.com/openst/openst.js/pull/141))
6+
* ABIs and BINs are now accessed as a dependency on openst-contracts ([137](https://github.com/openst/openst.js/pull/137))
7+
* Update PricerRule ABI/BIN with PricerRule:convertPayCurrencyToToken fix ([126](https://github.com/openst/openst.js/pull/126))
8+
* Recovery contract interaction fixes ([#116](https://github.com/openst/openst.js/pull/116))
9+
* PricerRule integration test and cleanup ([#114](https://github.com/openst/openst.js/pull/114))
10+
* ProxyFactory address refactoring from createCompanyWallet method ([#113](https://github.com/openst/openst.js/pull/113)
11+
* Integration with mosaic.js npm ([#109](https://github.com/openst/openst.js/pull/109))
12+
* Docker Geth Integration: Using docker geth ([#108](https://github.com/openst/openst.js/pull/108))
13+
* Delayed Recovery Module Setup ([#107](https://github.com/openst/openst.js/pull/107))
14+
* Remove license from top of JS files ([#106](https://github.com/openst/openst.js/pull/106))
15+
* MultiSig Operation: Logout all sessions ([104](https://github.com/openst/openst.js/pull/104))
16+
* WalletOperations Test: Remove tokenRulesAddress while creating TokenHolder instance ([#91](https://github.com/openst/openst.js/pull/91))
17+
* Remove pre commit hook from package.json which generates webpack ([#88](https://github.com/openst/openst.js/pull/88))
18+
* Fix version to 0 in SignEIP1077Extension.js ([#87](https://github.com/openst/openst.js/pull/87))
19+
* Wallet operations cleanup and refactoring ([#79](https://github.com/openst/openst.js/pull/79))
20+
* Multisig operations : Change threshold ([#78](https://github.com/openst/openst.js/pull/78))
21+
* Added multisig wallet operations ([#74](https://github.com/openst/openst.js/pull/74))
22+
* Parse payCurrencyCode to bytes in PricerRule deployment ([#71](https://github.com/openst/openst.js/pull/71))
23+
* User setup: Company to User Implementation ([#68](https://github.com/openst/openst.js/pull/68))
24+
* Direct transfer of tokens using TokenRules contract ([#67](https://github.com/openst/openst.js/pull/67))
25+
* Rule setup: Pricer rule setup and interaction ([#66](https://github.com/openst/openst.js/pull/66))
26+
* Rename _createUserWallet to _createUserWalletRawTx ([#64](https://github.com/openst/openst.js/pull/64))
27+
* Updated params _createUserWallet ([#61](https://github.com/openst/openst.js/pull/61))
28+
* TokenRules : Rules registration framework for registration of rules getter to fetch registered rules ([#60](https://github.com/openst/openst.js/pull/60))
29+
* Updated index.js to expose setup libraries ([#57](https://github.com/openst/openst.js/pull/57))
30+
* User setup : Implement createUserWallet ([#55](https://github.com/openst/openst.js/pull/55))
31+
* Interaction for MultiSig and TokenHolder master copy deployment ([#53](https://github.com/openst/openst.js/pull/53))
32+
* Interaction for TokenRules deployment ([#51](https://github.com/openst/openst.js/issues/51))

README.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@ OpenST.js
22
============
33

44
OpenST is a framework for building token economies. OpenST supports interactions with openst-contracts.
5+
It requires [openst-contracts](https://github.com/openst/openst-contracts) for ABIs and BINs of contracts.
56

6-
![Build master](https://img.shields.io/travis/OpenSTFoundation/openst.js/master.svg?label=build%20master&style=flat)
7-
![Build develop](https://img.shields.io/travis/OpenSTFoundation/openst.js/develop.svg?label=build%20develop&style=flat)
8-
![npm version](https://img.shields.io/npm/v/@openstfoundation/openst.js.svg?style=flat)
7+
![Build master](https://img.shields.io/travis/openst/openst.js/master.svg?label=build%20master&style=flat)
8+
![Build develop](https://img.shields.io/travis/openst/openst.js/develop.svg?label=build%20develop&style=flat)
9+
![npm version](https://img.shields.io/npm/v/@openst/openst.js.svg?style=flat)
910
![Discuss on Discourse](https://img.shields.io/discourse/https/discuss.openst.org/topics.svg?style=flat)
10-
![Chat on Gitter](https://img.shields.io/gitter/room/OpenSTFoundation/SimpleToken.svg?style=flat)
11+
![Chat on Gitter](https://img.shields.io/gitter/room/openst/SimpleToken.svg?style=flat)
1112

1213
## Setup
1314
This library assumes that nodejs and geth are installed and running. To install OpenST.js in your project using npm:
1415

1516
```bash
16-
$ npm install @openstfoundation/openst.js --save
17+
$ npm install @openst/openst.js --save
1718
```
1819

1920
The code works for Ethereum Byzantium and Petersburg.
@@ -22,16 +23,10 @@ The code works for Ethereum Byzantium and Petersburg.
2223

2324
```js
2425
// Creating OpenST.js object
25-
const OpenST = require('@openstfoundation/openst.js');
26+
const OpenST = require('@openst/openst.js');
2627

2728
```
2829

29-
For deployment of Organization contract, Mosaic object is needed.
30-
```js
31-
// Create Mosaic object
32-
const Mosaic = require('@openstfoundation/mosaic.js');
33-
```
34-
3530
## Deploying contracts
3631

3732
## Constants
@@ -66,7 +61,7 @@ const gas = '7500000';
6661
An Organization contract serves as an on-chain access control mechanism by assigning roles to a set of addresses.
6762

6863
```js
69-
const { Organization } = Mosaic.ContractInteract;
64+
const { Organization } = OpenST.ContractInteract;
7065
const organizationOwner = '0xaabb1122....................';
7166
const admin = '0xaabb1122....................';
7267
const orgConfig = {
@@ -76,9 +71,14 @@ const orgConfig = {
7671
workers: [worker],
7772
workerExpirationHeight: '200000000' // This is the block height for when the the worker is set to expire.
7873
};
74+
const txOptions = {
75+
gasPrice: '0x3B9ACA00',
76+
from : deployerAddress,
77+
gas: '7500000', // This is an optional parameter, if not passed gas will be estimated.
78+
};
7979
let organizationContractInstance;
8080
let organizationAddress;
81-
Organization.setup(web3Provider, orgConfig).then(function(instance){
81+
Organization.setup(web3Provider, orgConfig, txOptions).then(function(instance){
8282
organizationContractInstance = instance;
8383
organizationAddress = organizationContractInstance.address;
8484
});
@@ -359,7 +359,7 @@ tokenHolder.executeRule(tokenRulesAddress, directTransferCallData, nonce, vrs.r,
359359

360360
## Setup of PriceOracle
361361

362-
Make sure PriceOracle contract is already deployed. Refer [PriceOracle](https://github.com/OpenSTFoundation/ost-price-oracle) npm for setup of PriceOracle contract.
362+
Make sure PriceOracle contract is already deployed. Refer [PriceOracle](https://github.com/openst/ost-price-oracle) npm for setup of PriceOracle contract.
363363

364364
## Payment through PricerRule contract
365365

@@ -467,13 +467,13 @@ openst.js comes with an abi-bin provider for managing abi(s) and bin(s).
467467

468468
The abiBinProvider provides abi(s) and bin(s) for the following contracts:
469469

470-
* [TokenHolder](https://github.com/OpenSTFoundation/openst-contracts/blob/0.10.0-alpha.1/contracts/token/TokenHolder.sol) (TokenHolder contract deployed on UtilityChain)
471-
* [TokenRules](https://github.com/OpenSTFoundation/openst-contracts/blob/0.10.0-alpha.1/contracts/token/TokenRules.sol) (TokenRules contract deployed on UtilityChain)
472-
* [PricerRule](https://github.com/OpenSTFoundation/openst-contracts/blob/0.10.0-alpha.1/contracts/rules/PricerRule.sol) (PricerRule is a rule contract deployed on UtilityChain)
473-
* [GnosisSafe](https://github.com/gnosis/safe-contracts/blob/v0.1.0/contracts/GnosisSafe.sol) (MultiSignature wallet with support for confirmations using signed messages)
474-
* [DelayedRecoveryModule](https://github.com/OpenSTFoundation/openst-contracts/blob/0.10.0-alpha.1/contracts/gnosis_safe_modules/DelayedRecoveryModule.sol) (Allows to replace an owner without Safe confirmations)
475-
* [CreateAndAddModules](https://github.com/gnosis/safe-contracts/blob/v0.1.0/contracts/libraries/CreateAndAddModules.sol) (Allows to create and add multiple module in one transaction)
476-
* [UserWalletFactory](https://github.com/OpenSTFoundation/openst-contracts/blob/0.10.0-alpha.1/contracts/proxies/UserWalletFactory.sol) (Creates proxy for GnosisSafe, TokenHolder and DelayedRecoveryModule)
470+
* [TokenHolder](https://github.com/openst/openst-contracts/blob/0.10.0-alpha.1/contracts/token/TokenHolder.sol) (TokenHolder contract deployed on UtilityChain)
471+
* [TokenRules](https://github.com/openst/openst-contracts/blob/0.10.0-alpha.1/contracts/token/TokenRules.sol) (TokenRules contract deployed on UtilityChain)
472+
* [PricerRule](https://github.com/openst/openst-contracts/blob/0.10.0-alpha.1/contracts/rules/PricerRule.sol) (PricerRule is a rule contract deployed on UtilityChain)
473+
* [GnosisSafe](https://github.com/gnosis/safe-contracts/blob/v0.10.0/contracts/GnosisSafe.sol) (MultiSignature wallet with support for confirmations using signed messages)
474+
* [DelayedRecoveryModule](https://github.com/openst/openst-contracts/blob/0.10.0-alpha.1/contracts/gnosis_safe_modules/DelayedRecoveryModule.sol) (Allows to replace an owner without Safe confirmations)
475+
* [CreateAndAddModules](https://github.com/gnosis/safe-contracts/blob/v0.10.0/contracts/libraries/CreateAndAddModules.sol) (Allows to create and add multiple module in one transaction)
476+
* [UserWalletFactory](https://github.com/openst/openst-contracts/blob/0.10.0-alpha.1/contracts/proxies/UserWalletFactory.sol) (Creates proxy for GnosisSafe, TokenHolder and DelayedRecoveryModule)
477477

478478
```js
479479

contracts/abi/CreateAndAddModules.abi

Lines changed: 0 additions & 1 deletion
This file was deleted.

contracts/abi/DelayedRecoveryModule.abi

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)