Skip to content

Migration frax subgraph #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Ethereum/ethereum-frax/.eslintignore
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file isn't necessary in the public repository

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build/
generated/
node_modules/
5 changes: 5 additions & 0 deletions Ethereum/ethereum-frax/.eslintrc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file isn't necessary in the public repository

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": ["plugin:@typescript-eslint/recommended", "prettier", "prettier/@typescript-eslint"]
}
33 changes: 33 additions & 0 deletions Ethereum/ethereum-frax/.github/workflows/cli-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "CLI deploy"

on:
workflow_dispatch:
inputs:
projectName:
description: "Project name"
required: true
type: string
jobs:
deploy:
name: CLI Deploy
runs-on: ubuntu-latest
environment:
name: DEPLOYMENT
env:
SUBQL_ACCESS_TOKEN: ${{ secrets.SUBQL_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 16
- run: yarn
- name: Codegen
run: yarn codegen
- name: Version
run: npx subql --version
- name: repo
run: echo ${{github.repository}}
- name: Publish and Deploy
run: |
sh .github/workflows/scripts/publish-deploy.sh -o ${{github.repository}} -p ${{github.event.inputs.projectName}}
24 changes: 24 additions & 0 deletions Ethereum/ethereum-frax/.github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: PR
on:
pull_request:
paths-ignore:
- ".github/workflows/**"
jobs:
pr:
name: pr
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 16
- run: yarn
- name: Codegen
run: yarn codegen
- name: Build
run: yarn build
- name: Install subql-node-ethereum
run: yarn global add @subql/node-ethereum
- name: Run tests with Subquery Node
run: subql-node-ethereum test -f ${{ github.workspace }}
14 changes: 14 additions & 0 deletions Ethereum/ethereum-frax/.github/workflows/scripts/publish-deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

while getopts p:o: flag
do
case "${flag}" in
p) PROJECTNAME=${OPTARG};;
o) ORG=${OPTARG};;
*) echo "Usage: $0 [-p projectname] [-o org]" && exit 1;;
esac
done

IPFSCID=$(npx subql publish -o -f .)

npx subql deployment:deploy -d --ipfsCID="$IPFSCID" --projectName="${PROJECTNAME}" --org="${ORG%/*}"
60 changes: 60 additions & 0 deletions Ethereum/ethereum-frax/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# These are some examples of commonly ignored file patterns.
# You should customize this list as applicable to your project.
# Learn more about .gitignore:
# https://www.atlassian.com/git/tutorials/saving-changes/gitignore

# Node artifact files
node_modules/
dist/

# lock files
yarn.lock
package-lock.json

# Compiled Java class files
*.class

# Compiled Python bytecode
*.py[cod]

# Log files
*.log

# Package files
*.jar

# Generated files
target/
dist/
src/types
project.yaml

# JetBrains IDE
.idea/

# Unit test reports
TEST*.xml

# Generated by MacOS
.DS_Store

# Generated by Windows
Thumbs.db

# Applications
*.app
*.exe
*.war

# Large media files
*.mp4
*.tiff
*.avi
*.flv
*.mov
*.wmv

.data
.yarn

.DS_Store
14 changes: 14 additions & 0 deletions Ethereum/ethereum-frax/HELPFUL_QUERIES.txt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider relocating this to the designated section in README.md (refer to other examples for guidance)

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
pairs(first: 30) {
nodes {
token0 {
symbol
}
token1 {
symbol
}
token0Price
token1Price
}
}
}
Loading