Skip to content

Commit

Permalink
Merge branch 'main' into nollie0107-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
nollie0107 authored Aug 11, 2023
2 parents ab40266 + 6aa4229 commit 6f78ea7
Show file tree
Hide file tree
Showing 469 changed files with 30,298 additions and 124,068 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/eventindexer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Eventindexer

on:
push:
branches: [main, alpha-2]
branches: [main]
paths:
- "packages/eventindexer/**"
pull_request:
Expand All @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.21.0
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
Expand All @@ -26,7 +26,7 @@ jobs:

# Optional: working directory, useful for monorepos
working-directory: ./packages/eventindexer
args: --config=.golangci.yml
args: --config=.golangci.yml --timeout=4m

test:
runs-on: ubuntu-latest
Expand All @@ -40,7 +40,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ">=1.19.0"
go-version: ">=1.21.0"

- name: eventindexer - Unit Tests
working-directory: ./packages/eventindexer
Expand Down Expand Up @@ -96,4 +96,4 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
PACKAGE=eventindexer
PACKAGE=eventindexer
1 change: 1 addition & 0 deletions .github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
deps
eventindexer
fork-diff
pos-dashboard
protocol
relayer
starter-dapp
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/protocol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ jobs:
# directory: ./packages/protocol/coverage
# flags: protocol

- name: protocol - Generate contract documentation
run: pnpm -F protocol export:docs
# - name: protocol - Generate contract documentation
# run: pnpm -F protocol export:docs

- name: protocol - Commit contract documentation
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Add auto-generated contract documentation
file_pattern: "**/*.md"
# - name: protocol - Commit contract documentation
# uses: stefanzweifel/git-auto-commit-action@v4
# with:
# commit_message: Add auto-generated contract documentation
# file_pattern: "**/*.md"
8 changes: 4 additions & 4 deletions .github/workflows/relayer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Relayer

on:
push:
branches: [main, alpha-2]
branches: [main]
paths:
- "packages/relayer/**"
pull_request:
Expand All @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.21.0
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
Expand All @@ -26,7 +26,7 @@ jobs:

# Optional: working directory, useful for monorepos
working-directory: ./packages/relayer
args: --config=.golangci.yml
args: --config=.golangci.yml --timeout=4m

test:
runs-on: ubuntu-latest
Expand All @@ -40,7 +40,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ">=1.19.0"
go-version: "1.21.0"

- name: relayer - Unit Tests
working-directory: ./packages/relayer
Expand Down
140 changes: 128 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
**Table of contents:**

- [Make a contribution](#make-a-contribution)
- [Claim a Taiko Contributor GitPOAP](#claim-a-taiko-contributor-gitpoap)
- [Coding standards](#coding-standards)
- [Documentation standards](#documentation-standards)

Expand All @@ -14,16 +13,14 @@ Here are some ways you can contribute:
- Open a new issue [here](https://github.com/taikoxyz/taiko-mono/issues) (please check the issue does not already exist).
- Work on an existing issue (check out the [good first issues list](https://github.com/orgs/taikoxyz/projects/9/views/31) on our public project board).

> Check out the [coding standards](#coding-standards) and [documentation standards](#documentation-standards) before you start working on a pull request.
Please comment on the issue that you're interested in working on. Also, check out the [coding standards](#coding-standards) and [documentation standards](#documentation-standards) before you start working on the pull request.

## Claim a Taiko Contributor GitPOAP

A Taiko Contributor GitPOAP is rewarded to anyone that merges in a pull request to one of Taiko's GitHub repositories (you can see which repositories here: [2023 Taiko Contributor GitPOAP](https://www.gitpoap.io/gp/893)).

After your pull request is merged, a bot will automatically leave a comment with instructions to receive your GitPOAP. You only receive a Taiko Contributor GitPOAP for the first pull request you merge in a given year.
Once the pull request is merged to one of Taiko's GitHub repositories (you can see which repositories here: [2023 Taiko Contributor GitPOAP](https://www.gitpoap.io/gp/893)), you will be automatically awarded a Taiko Contributor GitPOAP. Opening a good new issue (not a spam issue) is also eligible for a GitPOAP, just leave a comment and we will manually invoke a GitHub bot that will send the GitPOAP.

## Coding standards

This section describes our coding standards at Taiko.

### Pull requests

Specify the scope of your change with a [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/) in the PR title (for example, `feat(scope): description of feature`). This will be squashed and merged into the `main` branch. You can find the full list of allowed scopes [here](https://github.com/taikoxyz/taiko-mono/blob/main/.github/workflows/lint-pr.yml#L19).
Expand All @@ -36,20 +33,139 @@ For example, `feat(scope): description of feature` should only impact the `scope

Follow the [NatSpec format](https://docs.soliditylang.org/en/latest/natspec-format.html) for documenting smart contract source code. Please adhere to a few additional standards:

- Choose `/** */` over `///` for multi-line NatSpec comments to save column space.
- Omit the usage of `@notice` and let the compiler automatically pick it up to save column space.
- For example: `/** @notice This is a notice */` becomes `/** This is a notice */`.
#### Multi-line comments

Choose `/** */` over `///` for multi-line NatSpec comments to save column space.

#### Notice tag

Omit the usage of `@notice` and let the compiler automatically pick it up to save column space. For example, this:

```
/// @notice This is a notice.
```

becomes this:

```
/// This is a notice.
```

#### Annotation indentation

For multi-line annotations, do not "align". For example, this is **wrong**:

```
/**
* Here is a comment.
* @param someParam Here is a long parameter blah blah blah
* and I wrap it to here.
* @return someThing Here is a long return parameter blah
* and I wrap it to here.
*/
```

This is **correct**:

```
/**
* Here is a comment.
* @param someParam Here is a long parameter blah blah blah
* and I wrap it to here.
* @return someThing Here is a long return parameter blah
* and I wrap it to here.
*/
```

#### Extra line breaks

Use extra line breaks as you see fit. By default, do not use them unless it improves the readability.

This is **preferred**:

```
/**
* Here is a comment.
* @param someParam Here is a long parameter blah blah blah
* and I wrap it to here.
* @return someThing Here is a long return parameter blah
* and I wrap it to here.
*/
```

This is also **okay**:

```
/**
* Here is a comment.
*
* @param someParam Here is a long parameter blah blah blah
* and I wrap it to here.
* @return someThing Here is a long return parameter blah
* and I wrap it to here.
*/
```

#### Additional comments

You can use additional comments with `//`. These can be above what it is describing **or** to the side. Try to remain consistent in what you are commenting. Do not use `/* */`. You can align comments on the side or not, whichever improves readability.

This is **correct**:

```
struct Some {
// This is foo
uint256 foo;
uint256 bar; // This is bar
}
```

This is **wrong**:

```
struct Some {
uint256 foo; /* This is foo */
}
```

#### Periods

Periods are optional for comments, but recommended if it's a proper sentence. However, remain consistent in whatever file or section you are commenting.

This is **correct**:

```
struct Some {
// This is foo
uint256 foo;
}
```

This is **wrong**:

```
struct Some {
// This is foo.
uint256 foo;
// This is bar
uint256 bar;
}
```

## Documentation standards

Use the [Microsoft Writing Style Guide](https://learn.microsoft.com/en-us/style-guide/welcome/) as a base point of reference for writing style.
This section describes our documentation standards at Taiko.

### Philosophy
### Philosophies

- Create the minimum viable documentation.
- Don't repeat yourself, use links to existing documentation or inherit it.
- Keep documentation close to what it's describing (for example, in the source code).

### Writing style

Use the [Microsoft Writing Style Guide](https://learn.microsoft.com/en-us/style-guide/welcome/) as a base point of reference for writing style. Generally, don't worry too much about things like typos. What's more important is following the basic [philosophies](#philosophies) outlined above and following structural standards for highly readable and minimal documentation.

### Creating content

If you are interested in creating some content (video, blog post, tweet thread, visuals, etc.), you are absolutely free to do so. It's useful to get a peer review on these, if you need a peer review please reach out to the community / team on the [Taiko Discord](https://discord.gg/taikoxyz).
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19.3 as builder
FROM golang:1.21.0 as builder

ARG PACKAGE=eventindexer

Expand Down
27 changes: 14 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/taikoxyz/taiko-mono

go 1.19
go 1.21

require (
github.com/buildkite/terminal-to-html/v3 v3.8.0
Expand All @@ -15,13 +15,15 @@ require (
github.com/labstack/echo/v4 v4.9.1
github.com/labstack/gommon v0.4.0
github.com/morkid/paginate v1.1.6
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/pkg/errors v0.9.1
github.com/pressly/goose v2.7.0+incompatible
github.com/pressly/goose/v3 v3.7.0
github.com/prometheus/client_golang v1.14.0
github.com/shopspring/decimal v1.3.1
github.com/sirupsen/logrus v1.9.0
github.com/stretchr/testify v1.8.4
github.com/testcontainers/testcontainers-go v0.15.0
github.com/testcontainers/testcontainers-go v0.21.0
golang.org/x/sync v0.1.0
gopkg.in/go-playground/assert.v1 v1.2.1
gopkg.in/yaml.v3 v3.0.1
Expand All @@ -34,23 +36,22 @@ require (
require (
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/Microsoft/hcsshim v0.9.6 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230518184743-7afd39499903 // indirect
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect
github.com/acomagu/bufpipe v1.0.4 // indirect
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/containerd/cgroups v1.0.4 // indirect
github.com/containerd/containerd v1.6.18 // indirect
github.com/containerd/containerd v1.6.19 // indirect
github.com/cpuguy83/dockercfg v0.3.1 // indirect
github.com/deckarep/golang-set/v2 v2.1.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect
github.com/docker/distribution v2.8.2+incompatible // indirect
github.com/docker/docker v20.10.17+incompatible // indirect
github.com/docker/docker v24.0.5-0.20230714235725-36e9e796c6fc+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
Expand Down Expand Up @@ -80,19 +81,19 @@ require (
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.16.3 // indirect
github.com/leodido/go-urn v1.2.0 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/microcosm-cc/bluemonday v1.0.20 // indirect
github.com/moby/sys/mount v0.3.3 // indirect
github.com/moby/sys/mountinfo v0.6.2 // indirect
github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae // indirect
github.com/moby/patternmatcher v0.5.0 // indirect
github.com/moby/sys/sequential v0.5.0 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/morkid/gocache v1.0.0 // indirect
github.com/neko-neko/echo-logrus/v2 v2.0.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect
github.com/opencontainers/image-spec v1.1.0-rc2 // indirect
github.com/opencontainers/runc v1.1.5 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
Expand All @@ -108,8 +109,8 @@ require (
github.com/valyala/fasthttp v1.44.0 // indirect
github.com/valyala/fasttemplate v1.2.1 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
go.opencensus.io v0.23.0 // indirect
golang.org/x/crypto v0.9.0 // indirect
golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
Expand Down
Loading

0 comments on commit 6f78ea7

Please sign in to comment.