Skip to content

Commit bfa1ead

Browse files
committed
gitpkg
0 parents  commit bfa1ead

Some content is hidden

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

68 files changed

+2221
-0
lines changed

CHANGELOG.json

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
[
2+
{
3+
"version": "1.4.0",
4+
"changes": [
5+
{
6+
"note": "Added Nerve",
7+
"pr": 181
8+
}
9+
],
10+
"timestamp": 1617311315
11+
},
12+
{
13+
"timestamp": 1616005394,
14+
"version": "1.3.1",
15+
"changes": [
16+
{
17+
"note": "Dependencies updated"
18+
}
19+
]
20+
},
21+
{
22+
"version": "1.3.0",
23+
"changes": [
24+
{
25+
"note": "Add VIP utils",
26+
"pr": 127
27+
},
28+
{
29+
"note": "Add `DodoV2` and `Linkswap` BridgeSource",
30+
"pr": 152
31+
}
32+
],
33+
"timestamp": 1614141718
34+
},
35+
{
36+
"version": "1.2.0",
37+
"changes": [
38+
{
39+
"note": "Update transformer utils for V4 FQT",
40+
"pr": 104
41+
}
42+
],
43+
"timestamp": 1612950500
44+
},
45+
{
46+
"version": "1.1.5",
47+
"changes": [
48+
{
49+
"note": "Use `Web3Wrapper.signTypedDataAsync()` instead of removed `Web3Wrapper.signTypedDataV4Async()`",
50+
"pr": 124
51+
}
52+
],
53+
"timestamp": 1611648096
54+
},
55+
{
56+
"timestamp": 1610510890,
57+
"version": "1.1.4",
58+
"changes": [
59+
{
60+
"note": "Dependencies updated"
61+
}
62+
]
63+
},
64+
{
65+
"timestamp": 1609802516,
66+
"version": "1.1.3",
67+
"changes": [
68+
{
69+
"note": "Dependencies updated"
70+
}
71+
]
72+
},
73+
{
74+
"timestamp": 1608692071,
75+
"version": "1.1.2",
76+
"changes": [
77+
{
78+
"note": "Dependencies updated"
79+
}
80+
]
81+
},
82+
{
83+
"timestamp": 1608245516,
84+
"version": "1.1.1",
85+
"changes": [
86+
{
87+
"note": "Dependencies updated"
88+
}
89+
]
90+
},
91+
{
92+
"version": "1.1.0",
93+
"changes": [
94+
{
95+
"note": "Add the `MetaTransaction` class for EP mtxs",
96+
"pr": 90
97+
}
98+
],
99+
"timestamp": 1608149382
100+
},
101+
{
102+
"timestamp": 1607485227,
103+
"version": "1.0.1",
104+
"changes": [
105+
{
106+
"note": "Dependencies updated"
107+
}
108+
]
109+
},
110+
{
111+
"version": "1.0.0",
112+
"changes": [
113+
{
114+
"note": "Package created",
115+
"pr": 76
116+
}
117+
]
118+
}
119+
]

CHANGELOG.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<!--
2+
changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
3+
Edit the package's CHANGELOG.json file only.
4+
-->
5+
6+
CHANGELOG
7+
8+
## v1.4.0 - _April 1, 2021_
9+
10+
* Added Nerve (#181)
11+
12+
## v1.3.1 - _March 17, 2021_
13+
14+
* Dependencies updated
15+
16+
## v1.3.0 - _February 24, 2021_
17+
18+
* Add VIP utils (#127)
19+
* Add `DodoV2` and `Linkswap` BridgeSource (#152)
20+
21+
## v1.2.0 - _February 10, 2021_
22+
23+
* Update transformer utils for V4 FQT (#104)
24+
25+
## v1.1.5 - _January 26, 2021_
26+
27+
* Use `Web3Wrapper.signTypedDataAsync()` instead of removed `Web3Wrapper.signTypedDataV4Async()` (#124)
28+
29+
## v1.1.4 - _January 13, 2021_
30+
31+
* Dependencies updated
32+
33+
## v1.1.3 - _January 4, 2021_
34+
35+
* Dependencies updated
36+
37+
## v1.1.2 - _December 23, 2020_
38+
39+
* Dependencies updated
40+
41+
## v1.1.1 - _December 17, 2020_
42+
43+
* Dependencies updated
44+
45+
## v1.1.0 - _December 16, 2020_
46+
47+
* Add the `MetaTransaction` class for EP mtxs (#90)
48+
49+
## v1.0.1 - _December 9, 2020_
50+
51+
* Dependencies updated
52+
53+
## v1.0.0 - _Invalid date_
54+
55+
* Package created (#76)

README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
## @0x/protocol-utils
2+
3+
0x protocol-related utilities for the V4/Exchange Proxy constellation of contracts, with tooling related to:
4+
5+
- Limit orders
6+
- Rfq orders
7+
- Transformers
8+
- Signatures
9+
- EIP712 hashing
10+
11+
### Read the [Documentation](https://0x.org/docs/protocol/protocol-utils).
12+
13+
## Installation
14+
15+
```bash
16+
yarn add @0x/protocol-utils
17+
```
18+
19+
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
20+
21+
```json
22+
"compilerOptions": {
23+
"typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"],
24+
}
25+
```
26+
27+
## Contributing
28+
29+
We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.
30+
31+
Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.
32+
33+
### Install dependencies
34+
35+
If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:
36+
37+
```bash
38+
yarn config set workspaces-experimental true
39+
```
40+
41+
Then install dependencies
42+
43+
```bash
44+
yarn install
45+
```
46+
47+
### Build
48+
49+
To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
50+
51+
```bash
52+
PKG=@0x/protocol-utils yarn build
53+
```
54+
55+
Or continuously rebuild on change:
56+
57+
```bash
58+
PKG=@0x/protocol-utils yarn watch
59+
```
60+
61+
### Clean
62+
63+
```bash
64+
yarn clean
65+
```
66+
67+
### Lint
68+
69+
```bash
70+
yarn lint
71+
```

lib/src/constants.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { BigNumber } from '@0x/utils';
2+
export declare const ETH_TOKEN_ADDRESS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
3+
export declare const ZERO: BigNumber;
4+
//# sourceMappingURL=constants.d.ts.map

lib/src/constants.d.ts.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/constants.js

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/constants.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/eip712_utils.d.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
export interface EIP712Domain {
2+
name: string;
3+
version: string;
4+
chainId: number;
5+
verifyingContract: string;
6+
}
7+
export declare type EIP712_STRUCT_ABI = Array<{
8+
type: string;
9+
name: string;
10+
}>;
11+
export declare const EIP712_DOMAIN_PARAMETERS: {
12+
name: string;
13+
type: string;
14+
}[];
15+
/**
16+
* Create an exchange proxy EIP712 domain.
17+
*/
18+
export declare function createExchangeProxyEIP712Domain(chainId?: number, verifyingContract?: string): EIP712Domain;
19+
/**
20+
* Get the hash of the exchange proxy EIP712 domain.
21+
*/
22+
export declare function getExchangeProxyEIP712DomainHash(chainId?: number, verifyingContract?: string): string;
23+
/**
24+
* Compute a complete EIP712 hash given a struct hash.
25+
*/
26+
export declare function getExchangeProxyEIP712Hash(structHash: string, chainId?: number, verifyingContract?: string): string;
27+
/**
28+
* Compute the type hash of an EIP712 struct given its ABI.
29+
*/
30+
export declare function getTypeHash(structName: string, abi: EIP712_STRUCT_ABI): string;
31+
//# sourceMappingURL=eip712_utils.d.ts.map

lib/src/eip712_utils.d.ts.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/eip712_utils.js

Lines changed: 51 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)