Skip to content

Commit

Permalink
misc: use yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
abarmat committed Apr 30, 2021
1 parent 7e9adca commit 69a4cd4
Show file tree
Hide file tree
Showing 12 changed files with 12,146 additions and 24,558 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/npmtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- shell: bash
- run: yarn install --non-interactive --frozen-lockfile
env:
NPM_TOKEN: ${{secrets.npm_token}}
run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > ~/.npmrc
- run: npm i
- run: npm run build --if-present
- run: npm test
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
- run: yarn test
16 changes: 8 additions & 8 deletions DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cli/cli.ts --help
For convenience, the script can also be used as a hardhat command with `hardhat migrate` and it can be also run with:

```
npm run deploy
yarn deploy
```

The **migrate** command will:
Expand All @@ -27,22 +27,22 @@ The **migrate** command will:
The script accepts multiple parameters that allow to override default values, print the available options with:

```
npm run deploy -- --help
yarn deploy -- --help
```

NOTE: Please run `npm run build` at least once before running migrate as this command relies on artifacts produced in the compilation process.
NOTE: Please run `yarn build` at least once before running migrate as this command relies on artifacts produced in the compilation process.

### Networks

By default, `npm run deploy` will deploy the contracts to a localhost instance of a development network.
By default, `yarn deploy` will deploy the contracts to a localhost instance of a development network.

To deploy to a different network execute:

```
npm run deploy -- --network {networkName}
yarn deploy -- --network {networkName}
# Example
npm run deploy -- --network kovan
yarn deploy -- --network kovan
```

The network must be configured in the `hardhat.config.ts` as explained in https://hardhat.org/config.
Expand All @@ -56,7 +56,7 @@ A configuration file called `graph.config.yml` contains the parameters needed to
You can use a different set of configuration options by specifying the file location in the command line:

```
npm run deploy -- --graph-config another-graph.config.yml
yarn deploy -- --graph-config another-graph.config.yml
```

Rules:
Expand Down Expand Up @@ -102,7 +102,7 @@ Some contracts require the address from previously deployed contracts. For that
### Deploying a new testnet

1. Make sure contracts are up to date as you please.
2. `npm run deploy-rinkeby` to deploy to Rinkeby. This will create new contracts with new addresses in `addresses.json`.
2. `yarn deploy-rinkeby` to deploy to Rinkeby. This will create new contracts with new addresses in `addresses.json`.
3. Update the `package.json` and `package-lock.json` files with the new package version and publish a new npm package with `npm publish`. You can dry-run the files to be uploaded by running `npm publish --dry-run`.
4. Merge this update into master, branch off and save for whatever version of the testnet is going on, and then tag this on the github repo, pointing to your branch (ex. at `testnet-phase-1` branch). This way we can always get the contract code for testnet, while continuing to do work on mainnet.
5. Pull the updated package into the subgraph, and other apps that depend on the package.json.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Testing is done with the following stack:
- Typescript
- Ethers

To test all files, use `npm run test`. To test a single file run:
To test all files, use `yarn test`. To test a single file run:
`npx hardhat test test/<FILE_NAME>.ts`.

### Contract addresses
Expand Down
2 changes: 1 addition & 1 deletion cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ PROVIDER_URL="http://localhost:8545"
Also, run the following to create the proper typescript bindings for each contract:

```sh
npm run build
yarn build
```

## Usage
Expand Down
Loading

0 comments on commit 69a4cd4

Please sign in to comment.