Skip to content

Commit

Permalink
Merge pull request #2 from kaleido-io/initial
Browse files Browse the repository at this point in the history
Initial contribution
  • Loading branch information
peterbroadhurst authored May 26, 2022
2 parents 4f1b359 + 4f319e2 commit 48a1ab6
Show file tree
Hide file tree
Showing 69 changed files with 5,193 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/node_modules
**/coverage
**/.nyc_output
firefly-evmconnect
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
root = true

[*.{yaml,yml,json}]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.go licensefile=.githooks/license-maintainer/LICENSE-go
1 change: 0 additions & 1 deletion .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ repository:
private: false
allow_squash_merge: true
allow_merge_commit: true
allow_rebase_merge: true
43 changes: 43 additions & 0 deletions .github/workflows/docker_main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Docker Main Build

on:
push:
branches:
- main

jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set build tag
id: build_tag_generator
run: |
RELEASE_TAG=$(curl https://api.github.com/repos/hyperledger/firefly-evmconnect/releases/latest -s | jq .tag_name -r)
BUILD_TAG=$RELEASE_TAG-$(date +"%Y%m%d")-$GITHUB_RUN_NUMBER
echo ::set-output name=BUILD_TAG::$BUILD_TAG
- name: Build
run: |
make BUILD_VERSION="${GITHUB_REF##*/}" DOCKER_ARGS="\
--label commit=$GITHUB_SHA \
--label build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
--label tag=${{ steps.build_tag_generator.outputs.BUILD_TAG }} \
--tag ghcr.io/hyperledger/firefly-evmconnect:${{ steps.build_tag_generator.outputs.BUILD_TAG }}" \
docker
- name: Tag release
run: docker tag ghcr.io/hyperledger/firefly-evmconnect:${{ steps.build_tag_generator.outputs.BUILD_TAG }} ghcr.io/hyperledger/firefly-evmconnect:head

- name: Push docker image
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
docker push ghcr.io/hyperledger/firefly-evmconnect:${{ steps.build_tag_generator.outputs.BUILD_TAG }}
- name: Push head tag
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
docker push ghcr.io/hyperledger/firefly-evmconnect:head
37 changes: 37 additions & 0 deletions .github/workflows/docker_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Docker Release Build

on:
release:
types: [released, prereleased]

jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Build
run: |
make BUILD_VERSION="${GITHUB_REF##*/}" DOCKER_ARGS="\
--label commit=$GITHUB_SHA \
--label build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
--label tag=${GITHUB_REF##*/} \
--tag ghcr.io/hyperledger/firefly-evmconnect:${GITHUB_REF##*/}" \
docker
- name: Tag release
if: github.event.action == 'released'
run: docker tag ghcr.io/hyperledger/firefly-evmconnect:${GITHUB_REF##*/} ghcr.io/hyperledger/firefly-evmconnect:latest

- name: Push docker image
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
docker push ghcr.io/hyperledger/firefly-evmconnect:${GITHUB_REF##*/}
- name: Push latest tag
if: github.event.action == 'released'
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
docker push ghcr.io/hyperledger/firefly-evmconnect:latest
28 changes: 28 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Go

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17

- name: Build and Test
run: make

- name: Upload coverage
run: bash <(curl -s https://codecov.io/bash)

6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
**/*.jar
firefly-evmconnect
coverage.txt
**/debug.test
.DS_Store
__debug*
60 changes: 60 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
run:
tests: false
skip-dirs:
- "mocks"
linters-settings:
golint: {}
gocritic:
enabled-checks: []
disabled-checks:
- regexpMust
goheader:
values:
regexp:
COMPANY: .*
template: |-
Copyright © {{ YEAR }} {{ COMPANY }}
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
linters:
disable-all: false
enable:
- bodyclose
- deadcode
- depguard
- dogsled
- errcheck
- goconst
- gocritic
- gocyclo
- gofmt
- goheader
- goimports
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
- misspell
- nakedret
- revive
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
49 changes: 49 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"go.formatFlags": [
"-s"
],
"go.lintTool": "golangci-lint",
"cSpell.words": [
"btcec",
"ccache",
"Debugf",
"dklen",
"ethsigner",
"ethtypes",
"evmconnect",
"ffcapi",
"ffconnector",
"ffconnectormocks",
"FFCPI",
"ffcserver",
"ffcservermocks",
"ffresty",
"fftypes",
"GJSON",
"httpserver",
"hyperledger",
"Infof",
"jsonrpcmocks",
"Kaleido",
"kdfparams",
"Keccak",
"keystorev",
"logrus",
"Nowarn",
"resty",
"rpcbackendmocks",
"secp",
"signerconfig",
"signermsgs",
"sigs",
"stretchr",
"Tracef",
"ufixed",
"unmarshalled",
"unmarshalling",
"Vyper",
"Warnf",
"wsclient"
],
"go.testTimeout": "10s"
}
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Changelog

The changelog will be updated on the next release
[FireFly EVM Connector Releases](https://github.com/hyperledger/firefly-evmconnect/releases)
4 changes: 4 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SPDX-License-Identifier: Apache-2.0

# FireFly Core Maintainers
* @peterbroadhurst @nguyer @awrichar
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ Please review the Hyperledger [Code of
Conduct](https://wiki.hyperledger.org/community/hyperledger-project-code-of-conduct)
before participating. It is important that we keep things civil.

<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ Please visit the
[contributors guide](https://labs.hyperledger.org/firefly/contributors/contributors.html) in the
docs to learn how to make contributions to this exciting project.

<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM golang:1.17-buster AS builder
ARG BUILD_VERSION
ENV BUILD_VERSION=${BUILD_VERSION}
ADD . /evmconnect
WORKDIR /evmconnect
RUN make

FROM debian:buster-slim
WORKDIR /evmconnect
RUN apt update -y \
&& apt install -y curl jq \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /evmconnect/firefly-evmconnect /usr/bin/evmconnect

ENTRYPOINT [ "/usr/bin/evmconnect" ]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
52 changes: 52 additions & 0 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Maintainers

The following is the list of current maintainers this repo:

| Name | GitHub | Email | LFID |
| ----------------- | --------------- | ---------------------------- | ----------------- |
| Peter Broadhurst | peterbroadhurst | peter.broadhurst@kaleido.io | peterbroadhurst |
| Nicko Guyer | nguyer | nicko.guyer@kaleido.io | nguyer |
| Andrew Richardson | awrichar | andrew.richardson@kaleido.io | Andrew.Richardson |


This list is to be kept up to date as maintainers are added or removed.

# Expectations of Maintainers

Maintainers are expected to regularly:

- Make contributions to FireFly code repositories including code or documentation
- Review pull requests
- Investigate open GitHub issues
- Participate in Community Calls

# Becoming a Maintainer

The FireFly Project welcomes and encourages people to become maintainers of the project if they are interested and meet the following criteria:

## Criteria for becoming a member

- Expressed interest and commitment to meet the expectations of a maintainer for at least 6 months
- A consistent track record of contributions to FireFly code repositories which could be:
- Enhancements
- Bug fixes
- Tests
- Documentation
- A consistent track record of helpful code reviews on FireFly code repositories
- Regular participation in Community Calls
- A demonstrated interest and aptitude in thought leadership within the FireFly Project
- Sponsorship from an existing maintainer

There is no specific quantity of contributions or pull requests, or a specific time period over which the candidate must prove their track record. This will be left up to the discretion of the existing maintainers.

## Process for becoming a maintainer

Once the above criteria have been met, the sponsoring maintainer shall propose the addition of the new maintainer at a public Community Call. Existing maintainers shall vote at the next public Community Call whether the new maintainer should be added or not. Proxy votes may be submitted via email _before_ the meeting. A simple majority of the existing maintainers is required for the vote to pass.

## Maintainer resignation

While maintainers are expected in good faith to be committed to the project for a significant period of time, they are under no binding obligation to do so. Maintainers may resign at any time for any reason. If a maintainer wishes to resign they shall open a pull request to update the maintainers list removing themselves from the list.

## Maintainer inactivity

If a maintainer has remained inactive (not meeting the expectations of a maintainer) for a period of time (at least several months), an email should be sent to that maintainer noting their inactivity and asking if they still wish to be a maintainer. If they continue to be inactive after being notified via email, an existing maintainer may propose to remove the inactive maintainer at a public Community Call. Existing maintainers shall vote at the next public Community Call whether the inactive maintainer should be removed or not. Proxy votes may be submitted via email _before_ the meeting. A simple majority of the existing maintainers is required for the vote to pass.
Loading

0 comments on commit 48a1ab6

Please sign in to comment.