-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from Polymarket/feat/protocol-contracts
Feat/adapt utils to new contracts
- Loading branch information
Showing
41 changed files
with
4,947 additions
and
9,740 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[{src,scripts,tests}/**.{ts,js}] | ||
indent_style = space | ||
indent_size = 4 | ||
quote_type = single | ||
|
||
[*.json] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.yaml] | ||
indent_style = space | ||
indent_size = 2 | ||
quote_type = single |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ coverage | |
jest.config.ts | ||
.eslintrc.js | ||
test | ||
src/model/ierc1155.ts | ||
src/model/ierc1155.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Build, Lint, and Test | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
|
||
jobs: | ||
build-lint-test: | ||
name: Build, Lint, and Test | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: yarn --frozen-lockfile | ||
- run: yarn lint | ||
- run: yarn build | ||
- run: yarn test | ||
|
||
all-jobs-pass: | ||
name: All jobs pass | ||
runs-on: ubuntu-20.04 | ||
needs: | ||
- build-lint-test | ||
steps: | ||
- run: echo "success" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.github | ||
CHANGELOG.md | ||
coverage | ||
coverage | ||
node_modules | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
{ | ||
"tabWidth": 4, | ||
"bracketSpacing": false, | ||
"singleQuote": true | ||
"editorconfig": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.PHONY: build | ||
build: | ||
@echo "Building ts code..." | ||
rm -rf dist | ||
tsc --module commonjs | ||
|
||
.PHONY: test | ||
test: | ||
yarn nyc -a \ | ||
--reporter=html \ | ||
--reporter=text mocha './tests' \ | ||
--require esm \ | ||
--require jsdom-global/register \ | ||
--require ts-node/register 'tests/**/*.test.ts' \ | ||
--require tsconfig-paths/register \ | ||
--timeout 10000 \ | ||
--exit | ||
|
||
.PHONY: lint | ||
lint: | ||
@echo "Linting code..." | ||
./node_modules/.bin/eslint ./src --ext .js,.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,71 @@ | ||
{ | ||
"name": "@polymarket/order-utils", | ||
"version": "1.2.15", | ||
"description": "Typescript utility for creating orders for Polymarket's CLOB", | ||
"author": "Liam Kovatch <[email protected]>", | ||
"homepage": "https://github.com/Polymarket/clob-order-utils", | ||
"license": "MIT", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"engines": { | ||
"node": ">=8", | ||
"npm": ">=5" | ||
"name": "@polymarket/order-utils", | ||
"version": "1.3.0", | ||
"description": "Typescript utility for creating orders for Polymarket's CLOB", | ||
"author": "Liam Kovatch <[email protected]>", | ||
"homepage": "https://github.com/Polymarket/clob-order-utils", | ||
"license": "MIT", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"engines": { | ||
"node": ">=8", | ||
"npm": ">=5" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://[email protected]/Polymarket/clob-order-utils.git" | ||
}, | ||
"contributors": [ | ||
{ | ||
"name": "Liam Kovatch", | ||
"url": "https://github.com/L-Kov" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://git@github.com/Polymarket/clob-order-utils.git" | ||
{ | ||
"name": "Jonathan Amenechi", | ||
"url": "https://github.com/JonathanAmenechi" | ||
}, | ||
"contributors": [ | ||
{ | ||
"name": "Liam Kovatch", | ||
"url": "https://github.com/L-Kov" | ||
}, | ||
{ | ||
"name": "Jonathan Amenechi", | ||
"url": "https://github.com/JonathanAmenechi" | ||
} | ||
], | ||
"scripts": { | ||
"build": "tsc --module commonjs", | ||
"test": "npx jest", | ||
"postbuild": "cp package.json dist && cp README.md dist && cp -R docs", | ||
"lint": "eslint ./src --ext .js,.ts", | ||
"ci-pipeline": "yarn run lint && yarn run test && yarn run typecheck" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.13.16", | ||
"@babel/preset-env": "^7.13.15", | ||
"@babel/preset-typescript": "^7.13.0", | ||
"@ethersproject/abstract-signer": "^5.4.5", | ||
"@ethersproject/bignumber": "^5.4.5", | ||
"@typechain/ethers-v5": "^8.0.5", | ||
"@typechain/hardhat": "^3.0.0", | ||
"@types/jest": "^28.1.6", | ||
"@types/prompts": "^2.0.12", | ||
"@typescript-eslint/eslint-plugin": "4", | ||
"babel-jest": "^26.6.3", | ||
"eslint": "7", | ||
"eslint-config-prettier": "^8.2.0", | ||
"eslint-config-standard-with-typescript": "^20.0.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-node": "11", | ||
"eslint-plugin-promise": "4", | ||
"eslint-plugin-unused-imports": "^1.1.1", | ||
"eth-sig-util": "^3.0.1", | ||
"ethers": "^5.5.2", | ||
"ethers-eip712": "^0.2.0", | ||
"husky": "^6.0.0", | ||
"istanbul-badges-readme": "^1.2.1", | ||
"jest": "^28.1.3", | ||
"lint-staged": "^10.5.4", | ||
"prettier": "^2.2.1", | ||
"standard-version": "^9.2.0", | ||
"ts-loader": "^9.0.2", | ||
"ts-mockito": "^2.6.1", | ||
"ts-node": "^9.1.1", | ||
"tslib": "^2.2.0", | ||
"typescript": "^4.2.4", | ||
"web3": "^2.0.0-alpha.1", | ||
"@types/mocha": "^9.1.1", | ||
"ts-jest": "^28.0.7" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/Polymarket/clob-order-utils/issues" | ||
{ | ||
"name": "Rodrigo Calvo", | ||
"url": "https://github.com/poly-rodr" | ||
} | ||
], | ||
"scripts": { | ||
"build": "make build", | ||
"test": "make test", | ||
"lint": "make lint", | ||
"postbuild": "cp package.json dist && cp README.md dist" | ||
}, | ||
"dependencies": { | ||
"@metamask/eth-sig-util": "^5.0.0", | ||
"ethers": "^5.7.1" | ||
}, | ||
"devDependencies": { | ||
"@types/chai": "^4.3.3", | ||
"@types/mocha": "^9.1.1", | ||
"@types/node": "^18.7.18", | ||
"@typescript-eslint/eslint-plugin": "^5.37.0", | ||
"@typescript-eslint/parser": "^5.37.0", | ||
"chai": "^4.3.6", | ||
"eslint": "^8.23.1", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-config-standard-with-typescript": "^23.0.0", | ||
"eslint-plugin-import": "^2.26.0", | ||
"eslint-plugin-n": "^15.2.5", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-promise": "^6.0.1", | ||
"eslint-plugin-unused-imports": "^2.0.0", | ||
"esm": "^3.2.25", | ||
"jsdom": "^20.0.0", | ||
"jsdom-global": "^3.0.2", | ||
"mocha": "^10.0.0", | ||
"nyc": "^15.1.0", | ||
"prettier": "^2.7.1", | ||
"ts-mocha": "^10.0.0", | ||
"ts-node": "^10.9.1", | ||
"tslib": "^2.4.0", | ||
"typescript": "^4.8.3" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/Polymarket/clob-order-utils/issues" | ||
} | ||
} |
Oops, something went wrong.