-
Notifications
You must be signed in to change notification settings - Fork 7
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 #48 from Polymarket/feat/protocol-contracts
Feat/adapt client to new contracts
- Loading branch information
Showing
59 changed files
with
3,150 additions
and
3,621 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,24 +1,29 @@ | ||
module.exports = { | ||
parserOptions: { | ||
"project": "./tsconfig.json", | ||
"tsconfigRootDir": __dirname, | ||
"sourceType": "module" | ||
}, | ||
rules: { | ||
"no-console": "off", | ||
"no-case-declarations": "off", | ||
"no-await-in-loop": "off", | ||
"import/prefer-default-export": "off", | ||
"no-underscore-dangle" : "off", | ||
"import/no-extraneous-dependencies": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"no-restricted-syntax": "off" | ||
}, | ||
root: true, | ||
parser: '@typescript-eslint/parser', | ||
plugins: [ | ||
'@typescript-eslint', | ||
], | ||
extends: "airbnb-base-typescript-prettier" | ||
}; | ||
root: true, | ||
plugins: ["@typescript-eslint", "unused-imports"], | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier", | ||
], | ||
parserOptions: { | ||
"project": "./tsconfig.json", | ||
"tsconfigRootDir": __dirname, | ||
"sourceType": "module" | ||
}, | ||
rules: { | ||
"@typescript-eslint/member-ordering": "error", | ||
"lines-between-class-members": "off", | ||
"padding-line-between-statements": "error", | ||
"no-unused-vars": "off", | ||
"max-len": ["error", { code: 100 }], | ||
"max-depth": ["error", 3], | ||
"max-lines-per-function": "off", | ||
"max-params": ["error", 6], | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-unused-vars": "off", | ||
"unused-imports/no-unused-imports": "error", | ||
"unused-imports/no-unused-vars": 0, | ||
}, | ||
}; | ||
|
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.editorconfig | ||
.eslintignore | ||
.eslintrc.js | ||
.github/workflows/workflow.yaml | ||
.prettierignore | ||
.prettierrc.json | ||
Makefile | ||
tsconfig.json | ||
|
||
src | ||
tests | ||
examples |
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 |
---|---|---|
@@ -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
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
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
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
Oops, something went wrong.