-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update of Subgraph
saucerswap-v2
code for newer version (#89)
Signed-off-by: Alfredo Gutierrez <[email protected]>
- Loading branch information
1 parent
ceb2fe8
commit 50f10ae
Showing
43 changed files
with
5,817 additions
and
7,692 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,51 @@ | ||
name: SaucerSwap V2 Subgraph | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-and-test: | ||
name: build-and-test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18.x' | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- uses: actions/cache@v2 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: yarn-${{ hashFiles('**/subgraphs/saucerswap/v2/yarn.lock') }} | ||
restore-keys: | | ||
yarn- | ||
- name: Install dependencies | ||
working-directory: subgraphs/saucerswap/v2 | ||
run: yarn install | ||
|
||
- name: Build project | ||
working-directory: subgraphs/saucerswap/v2 | ||
run: yarn build | ||
|
||
- name: Build Docker | ||
working-directory: subgraphs/saucerswap/v2 | ||
run: yarn build:docker | ||
|
||
- name: Test | ||
working-directory: subgraphs/saucerswap/v2 | ||
run: yarn test:no-tty |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
require('@uniswap/eslint-config/load') | ||
|
||
module.exports = { | ||
extends: ['@uniswap/eslint-config/node'], | ||
rules: { | ||
'@typescript-eslint/no-inferrable-types': 'off', | ||
'import/no-unused-modules': 'off', | ||
'@typescript-eslint/no-restricted-imports': 'off', | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' }, | ||
], | ||
'@typescript-eslint/no-this-alias': [ | ||
'error', | ||
{ | ||
allowDestructuring: true, // Allow `const { props, state } = this`; false by default | ||
allowedNames: [ | ||
'self', // Allow `const self= this`; `[]` by default | ||
], | ||
}, | ||
], | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/ban-types': [ | ||
'error', | ||
{ | ||
types: { | ||
// Allow BigInt (uppercase) | ||
BigInt: false, | ||
}, | ||
}, | ||
], | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['tests/**/*.ts'], | ||
settings: { | ||
jest: { | ||
version: 26, | ||
}, | ||
// jest is added as a plugin in our org's eslint config, but we use | ||
// matchstick, and this would crash when linting matchstick files. | ||
'disable/plugins': ['jest'], | ||
}, | ||
}, | ||
], | ||
} |
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 |
---|---|---|
|
@@ -3,4 +3,6 @@ node_modules/ | |
src/types/ | ||
.DS_STORE | ||
yarn-error.log | ||
generated/ | ||
tests/.bin/ | ||
tests/.docker/ | ||
tests/.latest.json |
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,6 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true, | ||
"printWidth": 120 | ||
"semi": false, | ||
"singleQuote": true, | ||
"printWidth": 120, | ||
"trailingComma": "all" | ||
} |
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,21 @@ | ||
# copied from https://github.com/LimeChain/demo-subgraph/blob/main/Dockerfile | ||
|
||
FROM --platform=linux/x86_64 ubuntu:22.04 | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
ENV ARGS="" | ||
|
||
RUN apt update \ | ||
&& apt install -y sudo curl postgresql postgresql-contrib | ||
|
||
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - \ | ||
&& sudo apt-get install -y nodejs | ||
|
||
RUN curl -OL https://github.com/LimeChain/matchstick/releases/download/0.6.0/binary-linux-22 \ | ||
&& chmod a+x binary-linux-22 | ||
|
||
RUN mkdir matchstick | ||
WORKDIR /matchstick | ||
|
||
CMD ../binary-linux-22 ${ARGS} |
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 |
---|---|---|
|
@@ -84,7 +84,7 @@ | |
"outputs": [ | ||
{ | ||
"name": "", | ||
"type": "uint8" | ||
"type": "uint32" | ||
} | ||
], | ||
"payable": false, | ||
|
Oops, something went wrong.