Skip to content

Commit a4080e9

Browse files
Merge pull request #47 from jcam1/develop
Release 2024-08-27 00:12:03 +0900
2 parents 6cec26c + 0f47ae5 commit a4080e9

File tree

8 files changed

+31
-27
lines changed

8 files changed

+31
-27
lines changed

.github/workflows/check.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,14 @@ jobs:
7272
runs-on: ubuntu-latest
7373
defaults:
7474
run:
75-
working-directory: ./
75+
working-directory: ./packages/v1
7676
timeout-minutes: 5
7777
steps:
7878
- uses: actions/checkout@v4
7979
- uses: ./.github/actions/install-dependencies
8080
- name: Compile
81-
run: |
82-
yarn workspace @jpyc/sdk-core run compile
83-
yarn workspace @jpyc/sdk-v1 run compile:sdk
81+
run: yarn run compile
8482
- name: Lint
85-
run: yarn workspace @jpyc/sdk-v1 run lint:dry-run
83+
run: yarn run lint:dry-run
8684
- name: Format
87-
run: yarn workspace @jpyc/sdk-v1 run format:dry-run
85+
run: yarn run format:dry-run

.github/workflows/publish.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,13 @@ jobs:
9595
runs-on: ubuntu-latest
9696
defaults:
9797
run:
98-
working-directory: ./
98+
working-directory: ./packages/v1
9999
timeout-minutes: 5
100100
steps:
101101
- uses: actions/checkout@v4
102102
- uses: ./.github/actions/install-dependencies
103103
- name: Build package
104-
run: |
105-
yarn workspace @jpyc/sdk-core run compile
106-
yarn workspace @jpyc/sdk-v1 run compile:sdk
104+
run: yarn run compile
107105
- uses: ./.github/actions/publish-package
108106
with:
109107
working-directory: ./packages/v1

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
],
88
"repository": "https://github.com/jcam1/sdks.git",
99
"license": "MIT",
10-
"version": "1.6.0",
10+
"version": "1.7.0",
1111
"engines": {
1212
"node": "^20.12.0",
1313
"yarn": "^1.22.22"

packages/core/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The following commands are available as yarn scripts for local development & tes
1212
| Command | Description |
1313
| ---------------: | :---------------------------------------------------- |
1414
| `docs` | Generate Markdown documents from TSDoc-style comments |
15-
| `compile` | Compile (transpile) TypeScript files |
15+
| `compile` | Compile (transpile) SDK |
1616
| `lint` | Run Eslint |
1717
| `lint:dry-run` | Run Eslint without fixing |
1818
| `format` | Run Prettier |

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Core SDK for JPYC protocol",
44
"repository": "https://github.com/jcam1/sdks.git",
55
"license": "MIT",
6-
"version": "1.3.0",
6+
"version": "1.4.0",
77
"publishConfig": {
88
"access": "public"
99
},

packages/v1/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ The following commands are available as yarn scripts for local development & tes
9191
| `lint:dry-run` | Run Eslint without fixing |
9292
| `format` | Run Prettier |
9393
| `format:dry-run` | Run Prettier without fixing |
94-
| `compile:sdk` | Compile (transpile) TypeScript files |
94+
| `compile` | Compile (transpile) SDK |
9595
| `compile:contracts` | Compile contracts |
9696
| `clean` | Delete contract artifacts |
9797
| `node` | Run hardhat network & node locally |

packages/v1/examples/README.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,44 @@
22

33
We provide code examples that use JPYC V1 SDK as an interface to locally-deployed `JPYCv2` contracts. Please read and follow the instructions below to learn how to set up local environment as well as how to run our code examples.
44

5-
### 1. Run Local Network
5+
> [!NOTE]
6+
> Please run the following commands in `/packages/v1` directory.
67
7-
Run the following command to start running local Hardhat network and its accompanying node.
8+
### 1. Build Packages
9+
10+
The first thing to do is to build packages.
11+
12+
```sh
13+
$ yarn run compile
14+
```
15+
16+
### 2. Run Local Network
17+
18+
Start running local Hardhat network and its accompanying node.
819

920
```sh
1021
$ yarn run node
1122
```
1223

13-
### 2. Deploy Contracts
24+
### 3. Deploy Contracts
1425

1526
**Open a different window** and run the following command to deploy JPYCv2 contracts to the local network. Once successfully deployed, a new directory will be created, and you can find deployed contract addresses at `/packages/v1/ignition/deployments/chain-31337/deployed_addresses.json`.
1627

1728
```sh
1829
$ yarn run deploy
1930
```
2031

21-
### 3. Set Environment Variables
32+
### 4. Set Environment Variables
2233

23-
Run the following commands, and edit the generated `.env` file accordingly. Set `LOCAL_PROXY_ADDRESS` to the value of `JPYCV2Module#FiatTokenV1` at [here](../ignition/deployments/chain-31337/deployed_addresses.json). See [here](../README.md/) for more details.
34+
Run the following commands and edit the generated `.env` file accordingly. Set `LOCAL_PROXY_ADDRESS` to the value of `JPYCV2Module#FiatTokenV1` at [here](../ignition/deployments/chain-31337/deployed_addresses.json). See [here](../README.md/) for more details.
2435

2536
```sh
26-
# cd into this directory
27-
$ cd /packages/v1
28-
# copy `.env.example` to `.env`
2937
$ yarn run env
3038
```
3139

32-
### 4. Run Code Examples
40+
### 5. Run Code Examples
3341

34-
Run the following commands to execute our code examples.
42+
Finally, let's execute our code examples!
3543

3644
| Command | Description |
3745
| ----------------------------: | :------------------------------------------------------ |

packages/v1/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "SDK v1 for JPYC v2 protocol",
44
"repository": "https://github.com/jcam1/sdks.git",
55
"license": "MIT",
6-
"version": "1.1.0",
6+
"version": "1.2.0",
77
"publishConfig": {
88
"access": "public"
99
},
@@ -23,11 +23,11 @@
2323
"lint:dry-run": "eslint ./src",
2424
"format": "prettier --write .",
2525
"format:dry-run": "prettier --check .",
26-
"compile:sdk": "tsc",
26+
"compile": "yarn workspace @jpyc/sdk-core run compile && tsc",
2727
"compile:contracts": "hardhat compile",
2828
"clean": "hardhat clean",
2929
"node": "hardhat node",
30-
"deploy": "rm -r ignition/deployments && hardhat run ./scripts/deployments.ts --network localhost",
30+
"deploy": "rm -f -r ignition/deployments && hardhat run ./scripts/deployments.ts --network localhost",
3131
"mint": "hardhat run ./examples/mint.ts --network localhost",
3232
"total-supply": "hardhat run ./examples/total-supply.ts --network localhost",
3333
"transfer": "hardhat run ./examples/transfer.ts --network localhost",

0 commit comments

Comments
 (0)