Skip to content

Commit

Permalink
Update README with instructions for getting started.
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyclemson committed Nov 12, 2020
1 parent 1e4b9ed commit c1d8ed6
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 14 deletions.
59 changes: 46 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,67 @@
# Core prototype

Repo for Boson Protocol prototype of the core exchange mechanism

## Install
Install dependencies from project root folder:
```
$ npm install @openzeppelin/contracts truffle-assertions ethers
```
## Getting started

Migrations are using HDWalletProvider, install it if you need it:
```
$ npm install @truffle/hdwallet-provider
Note: all commands below are run from the project root.

To install dependencies:

```shell script
npm install
````

To compile all contracts:

```shell script
npm run compile
```

## Contracts initialization
[Migrations script](./migrations/2_deploy_contracts.js) for Truffle also does this initialization:
To run the unit tests:

1. Ensure Ethereum is running locally on port 8545. This can be achieved using
Ganache, `ganache-cli` or `etherlime ganache`.
1. Copy your 12 word mnemonic to `.secret`. Create the file if it doesn't
already exist.
1. Execute the unit tests:
```shell script
npm run test:unit
```
Note: currently, the unit test suite will fail the second time it is run against
the same Ethereum instance. As a reuls, you'll need to reset between test runs.

To run the integration tests, follow the instructions in
[`testUserInteractions/README.md](testUserInteractions/README.md).
## Contracts initialization
[Migrations script](./migrations/2_deploy_contracts.js) for Truffle also does
this initialization:
- ERC1155ERC721.setApprovalForAll(contractVoucherKernel.address, 'true')
- ERC1155ERC721.setVoucherKernelAddress(contractVoucherKernel.address)
- VoucherKernel.setCashierAddress(contractCashier.address)
## Deployed contracts
Contract are deployed on Kovan testnet at addresses:
Contracts are deployed on Kovan testnet at addresses:
ERC1155ERC721: 0xF3aA8eB3812303F6c86c136557bC23E48d634B58
VoucherKernel: 0x1806312211bd1521430C953683038d6263580feE
Cashier: 0xaaf749c8e6e37b51410F1810ADcAEED18d0C166F
The frontend is currently pointing to Kovan deployment.
Contract are also deployed on Ropsten testnet at addresses:
Contract are also deployed on Ropsten testnet at addresses:
ERC1155ERC721: 0xe7028d66222aD1AfEB0098956347A6284443bd16
VoucherKernel: 0xa93f95bf0039CE30957b77A6638e2e273598D576
Cashier: 0x014b8baF57bA77FaE23075aa93c2B768eeb440bD
## Progress
See the project board at [https://github.com/bosonprotocol/bsn-core-prototype/projects/2](https://github.com/bosonprotocol/bsn-core-prototype/projects/2).
See the project board at
[https://github.com/bosonprotocol/bsn-core-prototype/projects/2](https://github.com/bosonprotocol/bsn-core-prototype/projects/2).
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"scripts": {
"compile": "etherlime compile",
"test": "truffle test"
"test:unit": "truffle test"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit c1d8ed6

Please sign in to comment.