Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
akwritescode committed Jan 11, 2022
0 parents commit 75026ed
Show file tree
Hide file tree
Showing 386 changed files with 95,711 additions and 0 deletions.
152 changes: 152 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
version: 2.1
orbs:
coveralls: coveralls/[email protected]
node: circleci/[email protected]

workflows:
build-test-report:
jobs:
- checkout-and-install
- compile:
requires:
- checkout-and-install
- lint:
requires:
- compile
- unit-test-contracts:
requires:
- compile
- coverage:
requires:
- compile
context: BUILD_KEYS
- contract-size:
requires:
- compile
- deploy-test:
requires:
- compile

jobs:
checkout-and-install:
working_directory: ~/squeeth/packages/hardhat
docker:
- image: circleci/node:16.6.0
steps:
- checkout:
path: ~/squeeth
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- run:
name: Install packages
command: yarn install
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- node_modules
- save_cache:
key: squeeth-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/squeeth

compile:
working_directory: ~/squeeth/packages/hardhat
docker:
- image: circleci/node:16.6.0
steps:
- checkout:
path: ~/squeeth
- restore_cache:
key: squeeth-{{ .Environment.CIRCLE_SHA1 }}
- run:
name: Compile Contracts
command: npx hardhat compile
- save_cache:
key: typechain-cache-{{ .Environment.CIRCLE_SHA1 }}
paths:
- typechain
- save_cache:
key: artifacts-cache-{{ .Environment.CIRCLE_SHA1 }}
paths:
- artifacts

lint:
working_directory: ~/squeeth/packages/hardhat
docker:
- image: circleci/node:16.6.0
steps:
- checkout:
path: ~/squeeth
- restore_cache:
key: squeeth-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
key: typechain-cache-{{ .Environment.CIRCLE_SHA1 }}
- run:
name: Lint
command: yarn lint:check

unit-test-contracts:
working_directory: ~/squeeth/packages/hardhat
docker:
- image: circleci/node:16.6.0
steps:
- checkout:
path: ~/squeeth
- restore_cache:
key: squeeth-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
key: typechain-cache-{{ .Environment.CIRCLE_SHA1 }}
- run:
name: Unit tests
command: yarn test

deploy-test:
working_directory: ~/squeeth/packages/hardhat
docker:
- image: circleci/node:16.6.0
steps:
- checkout:
path: ~/squeeth
- restore_cache:
key: squeeth-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
key: typechain-cache-{{ .Environment.CIRCLE_SHA1 }}
- run:
name: Deploy
command: npx hardhat deploy --network hardhat

coverage:
working_directory: ~/squeeth/packages/hardhat
docker:
- image: circleci/node:16.6.0
steps:
- checkout:
path: ~/squeeth
- restore_cache:
key: squeeth-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
key: typechain-cache-{{ .Environment.CIRCLE_SHA1 }}
- run:
name: Coverage
command: yarn coverage
- coveralls/upload:
path_to_lcov: ./coverage/lcov.info
- store_artifacts:
path: /coverage
- store_artifacts:
path: /coverage.json

contract-size:
working_directory: ~/squeeth/packages/hardhat
docker:
- image: circleci/node:16.6.0
steps:
- checkout:
path: ~/squeeth
- restore_cache:
key: squeeth-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
key: artifacts-cache-{{ .Environment.CIRCLE_SHA1 }}
- run:
name: Check Contracts Size
command: npx hardhat size-contracts
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[packages/**.js{,x}]
indent_style = space
indent_size = 2

[*.{sol,yul}]
indent_style = space
indent_size = 4
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: ""
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: ""
assignees: ""
---

**Please describe the problem you're having.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context or screenshots about the feature request here.
25 changes: 25 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Task:

## Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Document update

## How Has This Been Tested

Please describe how to test to verify the changes. Provide instructions so we can reproduce.

## Checklist

- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] My changes generate no new warnings
- [ ] Added video recordings if it is a UI change
14 changes: 14 additions & 0 deletions .github/workflows/check-code.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# name: 'check-code-in-diff'
# on: [push, pull_request]

# jobs:
# check-code-in-diff:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v1
# - uses: patcito/[email protected]
# with:
# branch: master
# notify_issue: true
# title: Code diff check
# token: ${{ secrets.GITHUB_TOKEN }}
50 changes: 50 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
packages/subgraph/subgraph.yaml
packages/subgraph/generated
packages/subgraph/abis/*
packages/hardhat/*.txt
**/aws.json

# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
**/node_modules
packages/hardhat/artifacts*
packages/hardhat/typechain*
# ignore localhost, but keep other deployment record on git
packages/hardhat/deployments/localhost
packages/react-app/src/contracts/*
!packages/react-app/src/contracts/external_contracts.js
packages/hardhat/cache*
packages/hardhat/coverage.json
packages/hardhat/coverage/

packages/**/data

packages/subgraph/config/config.json
tenderly.yaml

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
coverage

# production
build

# misc
.DS_Store
.env*

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

.idea

#Local vscode folder
.vscode

# Local Netlify folder
.netlify
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[submodule "packages/services/arbitrum"]
path = packages/services/arbitrum
url = https://github.com/OffchainLabs/arbitrum
branch = master
[submodule "packages/services/optimism"]
path = packages/services/optimism
url = https://github.com/ethereum-optimism/optimism
branch = regenesis/0.4.0
28 changes: 28 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
tasks:
- name: App
init: >
yarn &&
gp sync-done install
command: REACT_APP_PROVIDER=$(gp url 8545) yarn start
- name: Chain
init: gp sync-await install
command: yarn chain
openMode: split-right
- name: Deployment
init: gp sync-await install
command: yarn deploy
openMode: split-right
ports:
- port: 3000
onOpen: open-preview
- port: 8545
onOpen: ignore
github:
prebuilds:
pullRequestsFromForks: true
addComment: true
vscode:
extensions:
- dbaeumer.vscode-eslint
- esbenp.prettier-vscode
- juanblanco.solidity
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
5 changes: 5 additions & 0 deletions .huskyrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"hooks": {
"pre-commit": "lint-staged"
}
}
5 changes: 5 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"packages/hardhat/**/*.+(js|ts|json|sol)": [
"yarn lint-contracts"
]
}
Loading

0 comments on commit 75026ed

Please sign in to comment.