|
@ -14,51 +14,55 @@ yarn lint |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
## Migrate contracts |
|
|
## Migrate contracts |
|
|
Define the host and port of the blockchain in use. |
|
|
Default host and port values of the blockchain are: |
|
|
Default values are: |
|
|
|
|
|
|
|
|
|
|
|
| host | port | |
|
|
| host | port | |
|
|
|---|---| |
|
|
|---|---| |
|
|
| 127.0.0.1 | 8545 | |
|
|
| 127.0.0.1 | 8545 | |
|
|
|
|
|
|
|
|
|
|
|
Migrate (using the development network by default): |
|
|
|
|
|
```shell script |
|
|
|
|
|
yarn migrate |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
### Setting different host and port values |
|
|
|
|
|
Define the host and port of the blockchain in use. |
|
|
|
|
|
|
|
|
Linux: |
|
|
Linux: |
|
|
```shell script |
|
|
```shell script |
|
|
export DEVELOP_CHAIN_HOST="127.0.0.1" |
|
|
export CHAIN_HOST="127.0.0.1" |
|
|
export DEVELOP_CHAIN_PORT="7545" |
|
|
export CHAIN_PORT="7545" |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
Windows: |
|
|
Windows: |
|
|
```shell script |
|
|
```shell script |
|
|
SET DEVELOP_CHAIN_HOST="127.0.0.1" |
|
|
SET CHAIN_HOST="127.0.0.1" |
|
|
SET DEVELOP_CHAIN_PORT="7545" |
|
|
SET CHAIN_PORT="7545" |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
Migrate (using the development network here, change if necessary): |
|
|
Migrate using the `env` network : |
|
|
```shell script |
|
|
```shell script |
|
|
yarn migrate --network develop |
|
|
yarn _migrate --network env |
|
|
``` |
|
|
``` |
|
|
|
|
|
**Notice the underscore `_` suffix in the script name. This is not a mistake.** |
|
|
|
|
|
|
|
|
## Test contracts |
|
|
## Test contracts |
|
|
Define the host and port of the blockchain in use. |
|
|
Default host and port values of the blockchain are: |
|
|
Default values are: |
|
|
|
|
|
|
|
|
|
|
|
| host | port | |
|
|
| host | port | |
|
|
|---|---| |
|
|
|---|---| |
|
|
| 127.0.0.1 | 8546 | |
|
|
| 127.0.0.1 | 8546 | |
|
|
|
|
|
|
|
|
Linux: |
|
|
|
|
|
```shell script |
|
|
|
|
|
TEST_CHAIN_HOST="127.0.0.1" |
|
|
|
|
|
TEST_CHAIN_PORT="7545" |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
Windows: |
|
|
Test: |
|
|
```shell script |
|
|
```shell script |
|
|
SET TEST_CHAIN_HOST="127.0.0.1" |
|
|
yarn test |
|
|
SET TEST_CHAIN_PORT="7545" |
|
|
|
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
### Setting different host and port values |
|
|
|
|
|
Define the host and port of the blockchain in use like above. |
|
|
|
|
|
|
|
|
Test: |
|
|
Test: |
|
|
```shell script |
|
|
```shell script |
|
|
yarn test |
|
|
yarn test --network env |
|
|
``` |
|
|
``` |
|
|