Skip to content

Commit 135a0b5

Browse files
committed
Merge remote-tracking branch 'original/main'
2 parents df8561b + aa0d95d commit 135a0b5

File tree

934 files changed

+239599
-17854
lines changed

Some content is hidden

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

934 files changed

+239599
-17854
lines changed

.DS_Store

-6 KB
Binary file not shown.

.github/CODEOWNERS

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
v4-client-cpp/ @asnefedovv @dydxprotocol/eng
2-
v4-client-py/ @kaloureyes3 @dydxprotocol/eng
3-
v4-client-py-v2/ @samtin0x @therustmonk @piwonskp @dydxprotocol/eng
1+
# Order is important. The last matching pattern has the most precedence.
42

5-
* @dydxprotocol/eng
3+
* @dydxprotocol/engineering
4+
5+
/v4-client-py-deprecated/ @dydxprotocol/engineering @dydxprotocol/foundation @dydxprotocol/nethermind
6+
/v4-client-py-v2/ @dydxprotocol/engineering @dydxprotocol/foundation @dydxprotocol/nethermind
7+
/v4-client-rs/ @dydxprotocol/engineering @dydxprotocol/foundation @dydxprotocol/nethermind

.github/workflows/commitlint.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: "Conventional PR Title"
2+
on:
3+
pull_request:
4+
types: ['opened', 'edited', 'reopened', 'synchronize']
5+
paths:
6+
- 'v4-client-js/**'
7+
- 'v4-client-rs/**'
8+
jobs:
9+
conventional-pr-title:
10+
runs-on: ubuntu-latest
11+
defaults:
12+
run:
13+
working-directory: ./v4-client-js
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v3
17+
18+
- name: Use Node.js 20.8.1
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: 20.8.1
22+
registry-url: https://registry.npmjs.org
23+
cache: "npm"
24+
cache-dependency-path: '**/package-lock.json'
25+
26+
- name: Install dependencies
27+
run: |
28+
npm install @commitlint/config-conventional
29+
30+
- name: Lint PR Title
31+
run: |
32+
echo "${PR_TITLE}" | npx commitlint --config commitlint.config.js
33+
env:
34+
PR_TITLE: '${{ github.event.pull_request.title }}'
35+

.github/workflows/js-lint-build-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
- name: Check out repository code
2121
uses: actions/checkout@v3
2222

23-
- name: Use Node.js 16
23+
- name: Use Node.js 20.8.1
2424
uses: actions/setup-node@v3
2525
with:
26-
node-version: 16
26+
node-version: 20.8.1
2727
registry-url: https://registry.npmjs.org
2828
cache: "npm"
2929
cache-dependency-path: '**/package-lock.json'

.github/workflows/js-publish.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Npm
2929
uses: actions/setup-node@v3
3030
with:
31-
node-version: 16
31+
node-version: 20.8.1
3232
registry-url: https://registry.npmjs.org
3333
cache: "npm"
3434
cache-dependency-path: '**/package-lock.json'
@@ -38,7 +38,10 @@ jobs:
3838
env:
3939
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_READ }}
4040

41-
- name: Publish
42-
run: ./scripts/publish-if-not-exists.sh
41+
# Run semantic-release to automatically bump the version based on PR title
42+
- name: Run semantic-release
43+
run: npm run release
4344
env:
4445
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_WRITE }}
46+
47+
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: "[v4-client-rs] Build, Fmt, Clippy, Audit, & Test"
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'v4-client-rs/**'
7+
push:
8+
paths:
9+
- 'v4-client-rs/**'
10+
branches:
11+
- main
12+
- "release/*"
13+
14+
jobs:
15+
test:
16+
runs-on: ubuntu-latest
17+
defaults:
18+
run:
19+
working-directory: ./v4-client-rs
20+
21+
steps:
22+
- name: Checkout source code
23+
uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 1
26+
27+
- name: Install protoc # for dev dependencies only
28+
run: sudo apt install -y protobuf-compiler
29+
30+
- name: Build
31+
run: cargo build
32+
33+
- name: Check formatting
34+
run: cargo fmt -- --check
35+
36+
- name: Linter
37+
shell: bash
38+
run: cargo clippy -- -D warnings
39+
40+
- name: Install audit
41+
shell: bash
42+
run: cargo install cargo-deny
43+
44+
- name: Security audit, licenses
45+
shell: bash
46+
run: cargo deny check licenses advisories sources
47+
48+
- name: Test
49+
run: cargo test

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.idea
2+
**/.DS_Store

.gitmodules

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
[submodule "v4-client-cpp"]
22
path = v4-client-cpp
33
url = https://github.com/asnefedovv/dydx-v4-client-cpp
4+
[submodule "dydxprotocol"]
5+
path = dydxjs/packages/dydxjs/proto/dydxprotocol-src
6+
url = [email protected]:dydxprotocol/v4-chain.git
7+
[submodule "noble-cctp"]
8+
path = dydxjs/packages/dydxjs/proto/noble-cctp-src
9+
url = [email protected]:circlefin/noble-cctp.git
10+
[submodule "slinky"]
11+
path = dydxjs/packages/dydxjs/proto/slinky-src
12+
url = [email protected]:skip-mev/slinky.git

README.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,57 @@ Python client for dYdX Chain. Developed and maintained by the Nethermind team.
2222
- [Saul M.](https://github.com/samtin0x)
2323
- [Piotr P.](https://github.com/piwonskp)
2424

25+
## v4-client-rs
26+
Rust client for dYdX Chain. Developed and maintained by the Nethermind team.
27+
- [Emanuel V.](https://github.com/v0-e)
28+
- [Denis K.](https://github.com/therustmonk)
29+
- [Maksim R.](https://github.com/maksimryndin)
30+
2531
## v4-client-cpp (Third Party Client)
2632
To pull the latest C++ client, run `git submodule update --init --recursive`
2733

34+
Please note the C++ client only works on Linux.
35+
2836
This client was originally developed and open-sourced through a grant by the dYdX Grants Trust — an
2937
unaffiliated and independent third-party from dYdX Trading Inc.
3038

3139
The original client can be found [here](https://github.com/asnefedovv/dydx-v4-client-cpp).
3240

41+
## dydxjs
42+
<b>dydxjs</b> is a Typescript library for interacting with dYdX chain and other Cosmos blockchains. It makes it easy to compose and broadcast dYdX and Cosmos messages, with all of the proto and amino encoding handled for you.<br/>
43+
<i>Note: This library provides the low-level interfaces to compose and send transactions. It is recommended to install `v4-client-js` for a simpler developer experience.</i>
44+
3345
# Third-party Clients
3446

35-
By clicking the above links to third-party clients, you will leave the dYdX Trading Inc. (“dYdX”) GitHub repository and join repositories made available by third parties, which are independent from and unaffiliated with dYdX. dYdX is not responsible for any action taken or content on third-party repositories.
47+
By clicking the above links to third-party clients, you will leave the dYdX Trading Inc. (“dYdX”) GitHub repository and join repositories made available by third parties, which are independent from and unaffiliated with dYdX. dYdX is not responsible for any action taken or content on third-party repositories.
48+
49+
# Contributing
50+
51+
## We use [Conventional Commits](https://github.com/conventional-changelog/commitlint)
52+
We use a commit-msg hook to check if your commit messages meet the conventional commit format.
53+
54+
In general the pattern looks like this:
55+
56+
`type(scope?): subject` #scope is optional; multiple scopes are supported (current delimiter options: "/", "\" and ",")
57+
58+
### Real world examples can look like this:
59+
`chore: run tests on travis ci`
60+
`fix(server): send cors headers`
61+
`feat(blog): add comment section`
62+
63+
Common types according to commitlint-config-conventional can be:
64+
65+
build
66+
chore
67+
ci
68+
docs
69+
feat
70+
fix
71+
perf
72+
refactor
73+
revert
74+
style
75+
test
76+
77+
## Any contributions you make will be under the same License
78+
When you submit code changes, your submissions are understood to be under the same [License](https://github.com/dydxprotocol/v4-web/blob/master/LICENSE) that covers the project.

dydxjs/.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

0 commit comments

Comments
 (0)