Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jianoaix committed Nov 13, 2023
0 parents commit 0e8fd8d
Show file tree
Hide file tree
Showing 578 changed files with 102,144 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/go/.devcontainer/base.Dockerfile

# [Choice] Go version (use -bullseye variants on local arm64/Apple Silicon): 1, 1.19, 1.18, 1-bullseye, 1.19-bullseye, 1.18-bullseye, 1-buster, 1.19-buster, 1.18-buster
ARG VARIANT="1-1.21-bullseye"
FROM mcr.microsoft.com/vscode/devcontainers/go:${VARIANT}

# [Choice] Node.js version: none, lts/*, 18, 16, 14
ARG NODE_VERSION="none"
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi

# Install geth
RUN echo "deb http://ppa.launchpad.net/ethereum/ethereum/ubuntu bionic main\n" \
"deb-src http://ppa.launchpad.net/ethereum/ethereum/ubuntu bionic main" > /etc/apt/sources.list.d/ethereum-bioinc.list \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 2A518C819BE37D2C2031944D1C52189C923F6CA9 \
&& apt-get update \
&& apt-get -y install ethereum

# [Optional] Uncomment this section to install additional OS packages.
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends netcat \
&& apt-get -y install protobuf-compiler

# [Optional] Uncomment the next lines to use go get to install anything else you need
# USER vscode
# RUN go get -x <your-dependency-or-tool>

# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
RUN yarn global add @graphprotocol/[email protected]

61 changes: 61 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/go
{
"name": "Go",
"build": {
"dockerfile": "Dockerfile",
"args": {
// Update the VARIANT arg to pick a version of Go: 1, 1.19, 1.18
// Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local arm64/Apple Silicon.
"VARIANT": "1-1.21-bullseye",
// Options
"NODE_VERSION": "lts/*"
}
},
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],

// Configure tool-specific properties.
"customizations": {
// Configure access control to other repositories
"codespaces": {
"repositories": {
"Layr-Labs/*": {
"permissions": "write-all"
}
}
},
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"go.toolsManagement.checkForUpdates": "local",
"go.useLanguageServer": true,
"go.gopath": "/go"
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"golang.Go",
"NomicFoundation.hardhat-solidity"
]
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "chmod +x ./.devcontainer/install.sh && bash ./.devcontainer/install.sh",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
"features": {
"ghcr.io/devcontainers/features/aws-cli:1": {
"version": "latest"
},
"ghcr.io/devcontainers/features/docker-in-docker:1": {
"version": "latest"
}
}
}
12 changes: 12 additions & 0 deletions .devcontainer/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Install foundry
curl -L https://foundry.paradigm.xyz | bash
~/.foundry/bin/foundryup

# Install go dependencies
go install github.com/onsi/ginkgo/v2/[email protected]
go install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest
go install google.golang.org/protobuf/cmd/[email protected]
go install google.golang.org/grpc/cmd/[email protected]
# go install github.com/mikefarah/yq/v4@latest

# yarn global add @graphprotocol/[email protected]
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
testdata
data
bin
./contracts/out
./contracts/cache
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "🐞 Bug Report"
title: "[Bug]: <Title>"
description: Something with EigenDA is not working as expected
labels: [bug, triage]
body:
- type: markdown
attributes:
value: |
Thank you for reporting the problem!
Please make sure what you are reporting is a bug with environment and reproducible steps.
- type: textarea
attributes:
label: What happened + What you expected to happen
description: Describe 1. the bug 2. expected behavior 3. useful information (e.g., logs)
placeholder: >
Please provide the context in which the problem occurred and explain what happened. Further,
please also explain why you think the behaviour is erroneous.
validations:
required: true

- type: textarea
attributes:
label: Versions / Dependencies
description: Please specify the versions of EigenDA, golang, OS and context of your machine.
placeholder: >
Please specify the versions and dependencies.
validations:
required: true

- type: textarea
attributes:
label: How to reproduce
description: >
Please provide steps or code snippet to reproduce the issue.
placeholder: >
Please provide steps or a short code snippet (less than 50 lines if possible) that can be copy-pasted to reproduce the issue.
validations:
required: true

- type: dropdown
attributes:
label: Issue Severity
description: |
How does this issue affect your experience?
multiple: false
options:
- "Low: It annoys or frustrates me."
- "Medium: It is a significant difficulty but I can work around it."
- "High: It blocks me from completing my task."
validations:
required: false
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "📃 Documentation Request"
description: Suggest improvements, additions, or revisions to EigenDA documentation
title: "[Documentation]: <Title>"
labels: [docs, triage]
body:
- type: markdown
attributes:
value: |
Thank you for helping us improve the EigenDA documentation!
- type: textarea
attributes:
label: Documentation.
description: Explain which part of the documents is lacking.
placeholder: |
Type here.
validations:
required: true
- type: textarea
attributes:
label: Additional information.
description: Tell us anything else you think we should know.
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "⚡ Enhancement Request"
description: Something could be better.
title: "[Enhancement]: <Title>"
labels: [enhancement, triage]
body:
- type: markdown
attributes:
value: |
Something could be better?
If your request is about a net new feature please use the Feature Request template.
Enhancements are tagged `enhancement`.
- type: textarea
attributes:
label: Use case and current behavior
description: The context in which the feature is used and what is achieved.
placeholder: |
Type here.
validations:
required: true
- type: textarea
attributes:
label: Enhancement
description: Which enhancement is required and what is the new output?
validations:
required: true
- type: textarea
attributes:
label: Solution proposal
description: Any idea on the how?
validations:
required: false
- type: textarea
attributes:
label: Additional Information
description: Any useful additional information?
validations:
required: false
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: "⚡ Feature Request"
description: Suggest a new feature
title: "[Feature]: <Title>"
labels: [feature, triage]
body:
- type: markdown
attributes:
value: |
Thank you for finding the time to propose a new feature!
We really appreciate the community efforts to improve EigenDA.
Please search the issue list first as there is a chance that someone else has had the same idea.
If you find a similar request, add a thumbs-up to vote for it and optionally add a comment to be part of the conversation.
- type: textarea
attributes:
label: Description
description: A description of your feature
validations:
required: true

- type: textarea
attributes:
label: Use case
description: >
Describe the context in which the feature will be used and what is achieved when the feature is used.
This will help us understand and prioritize the feature request.
placeholder: >
Rather than telling us how you might implement this feature, try to take a
step back and describe what you are trying to achieve.
validations:
required: true

- type: textarea
attributes:
label: Solution proposal
description: You have an idea on how to implement the feature? Please share it with us.
placeholder: |
Type here.
validations:
required: false
- type: textarea
attributes:
label: Additional Information
description: Any useful additional info?
validations:
required: false
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "🙋 Question"
description: Ask a question or request support for using EigenDA
title: "[Question]: <Title>"
labels: [question, triage]
body:
- type: markdown
attributes:
value: |
The GitHub issue tracker is not for questions.
- If you have a question, please try asking it on <TBD>
- Our Docs: <TBD>
- type: textarea
attributes:
label: Question.
description: Ask your question.
58 changes: 58 additions & 0 deletions .github/actions/test-coverage/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: 'Go coverage report'
description: 'This action updates adds an HTML coverage report and SVG badge to your wiki'
branding:
color: blue
icon: award

inputs:
report:
description: Generate an HTML coverage report.
default: true
chart:
description: Generate a coverage over time chart.
default: false
amend:
description: Amend wiki, avoiding spurious commits.
default: false
go-version:
description: The Go version to download (if necessary) and use.
default: '1.21'

runs:
using: "composite"
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Checkout wiki
uses: actions/checkout@v3
with:
repository: ${{github.repository}}.wiki
token: ${{ github.token }}
path: ./.github/wiki/

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{inputs.go-version}}

- name: Generate coverage report
shell: bash
env:
INPUT_CHART: ${{inputs.chart}}
INPUT_REPORT: ${{inputs.report}}
run: |
${{github.action_path}}/coverage.sh ./.github/wiki/
- name: Push to wiki
shell: bash
run: |
cd ./.github/wiki/
git add --all
git diff-index --quiet HEAD && exit
git config --local user.name "GitHub Action"
git config --local user.email "[email protected]"
git remote set-url --push origin https://${{ github.token }}@github.com/Layr-Labs/eigenda.wiki.git
test ${{inputs.amend}} == "true" && \
git commit --amend --no-edit && git push --force-with-lease || \
git commit -m "Update coverage" && git push https://${{ github.token }}@github.com/Layr-Labs/eigenda.wiki.git
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
16 changes: 16 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Why are these changes needed?

<!-- Please give a short summary of the change and the problem this solves. -->

## Related issue number

<!-- For example: "Closes #1234" -->

## Checks

- [ ] I've made sure the lint is passing in this PR.
- [ ] I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
- Testing Strategy
- [ ] Unit tests
- [ ] Integration tests
- [ ] This PR is not tested :(
Loading

0 comments on commit 0e8fd8d

Please sign in to comment.