Skip to content
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

[email protected]:Setland34/contracts.git #30

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
48 changes: 48 additions & 0 deletions .github/workflows/gem-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Ruby Gem

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

jobs:
build:
name: Build + Publish
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4
- name: Set up Ruby 2.6
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
# uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
with:
ruby-version: 2.6.x

- name: Publish to GPR
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
env:
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
OWNER: ${{ github.repository_owner }}

- name: Publish to RubyGems
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
66 changes: 66 additions & 0 deletions .github/workflows/generator-generic-ossf-slsa3-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# This workflow lets you generate SLSA provenance file for your project.
# The generation satisfies level 3 for the provenance requirements - see https://slsa.dev/spec/v0.1/requirements
# The project is an initiative of the OpenSSF (openssf.org) and is developed at
# https://github.com/slsa-framework/slsa-github-generator.
# The provenance file can be verified using https://github.com/slsa-framework/slsa-verifier.
# For more information about SLSA and how it improves the supply-chain, visit slsa.dev.

name: SLSA generic generator
on:
workflow_dispatch:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
outputs:
digests: ${{ steps.hash.outputs.digests }}

steps:
- uses: actions/checkout@v4

# ========================================================
#
# Step 1: Build your artifacts.
#
# ========================================================
- name: Build artifacts
run: |
# These are some amazing artifacts.
echo "artifact1" > artifact1
echo "artifact2" > artifact2

# ========================================================
#
# Step 2: Add a step to generate the provenance subjects
# as shown below. Update the sha256 sum arguments
# to include all binaries that you generate
# provenance for.
#
# ========================================================
- name: Generate subject for provenance
id: hash
run: |
set -euo pipefail

# List the artifacts the provenance will refer to.
files=$(ls artifact*)
# Generate the subjects (base64 encoded).
echo "hashes=$(sha256sum $files | base64 -w0)" >> "${GITHUB_OUTPUT}"

provenance:
needs: [build]
permissions:
actions: read # To read the workflow path.
id-token: write # To sign the provenance.
contents: write # To add assets to a release.
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
with:
base64-subjects: "${{ needs.build.outputs.digests }}"
upload-assets: true # Optional: Upload to a new release
36 changes: 36 additions & 0 deletions .github/workflows/npm-publish-github-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm test

publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
75 changes: 75 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
- name: Add & Commit
# You may pin to the exact commit or the version.
# uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5
uses: EndBug/[email protected]
with:
# Arguments for the git add command
add: # optional, default is .
# The name of the user that will be displayed as the author of the commit
author_name: # optional
# The email of the user that will be displayed as the author of the commit
author_email: # optional
# Additional arguments for the git commit command
commit: # optional
# The name of the custom committer you want to use
committer_name: # optional
# The email of the custom committer you want to use
committer_email: # optional
# The directory where your repository is located. You should use actions/checkout first to set it up
cwd: # optional, default is .
# How the action should fill missing author name or email.
default_author: # optional, default is github_actor
# Arguments for the git fetch command (if 'false', the action won't fetch the repo)
fetch: # optional, default is --tags --force
# The message for the commit
message: # optional
# The name of the branch to create.
new_branch: # optional
# The way the action should handle pathspec errors from the add and remove commands.
pathspec_error_handling: # optional, default is ignore
# Arguments for the git pull command. By default, the action does not pull.
pull: # optional
# Whether to push the commit and, if any, its tags to the repo. It can also be used to set the git push arguments (more info in the README)
push: # optional, default is true
# Arguments for the git rm command
remove: # optional
# Arguments for the git tag command (the tag name always needs to be the first word not preceded by a hyphen)
tag: # optional
# Arguments for the git push --tags command (any additional argument will be added after --tags)
tag_push: # optional
# The token used to make requests to the GitHub API. It's NOT used to make commits and should not be changed.
github_token: # optional, default is ${{ github.token }}

34 changes: 34 additions & 0 deletions .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Python Package using Conda

on: [push]

jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda env update --file environment.yml --name base
- name: Lint with flake8
run: |
conda install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
conda install pytest
pytest
28 changes: 28 additions & 0 deletions .github/workflows/webpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: NodeJS with Webpack

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

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Build
run: |
npm install
npx webpack
21 changes: 21 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Security Policy

## Supported Versions

Use this section to tell people about which versions of your project are
currently being supported with security updates.

| Version | Supported |
| ------- | ------------------ |
| 5.1.x | :white_check_mark: |
| 5.0.x | :x: |
| 4.0.x | :white_check_mark: |
| < 4.0 | :x: |

## Reporting a Vulnerability

Use this section to tell people how to report a vulnerability.

Tell them where to go, how often they can expect to get an update on a
reported vulnerability, what to expect if the vulnerability is accepted or
declined, etc.
5 changes: 3 additions & 2 deletions cache/fuzz/failures
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
#
# It is recommended to check this file in to source control so that
# everyone who runs the test benefits from these saved cases.
cc d14fc5025cb2d33a5b5d61ecf33657f8f679c3197bf86dcaa338007a95a43334 # shrinks to 0x7037b393000000000000000000000000000000000000000000000000000000000000007a0000000000000000000000003d9e6aa57f58768370b10a80da478b81186f3c00
cc e96264774c3f741dfdbba3cafffdbcc5936eb5d1e45f56c6fd15230a4c1e4105 # shrinks to 0x2820dd8c00000000000000000000000000000000000000000000000000000000f57c57d30000000000000000000000000000000000000000000000000000000000000e1600000000000000000000000000000000000000000000000000000000000027610000000000000000000000000000000000000000000000000000000000001d61
[7,6]cc d14fc5025cb2d33a5b5d61ecf33657f8f679c3197bf86dcaa338007a95a43334 # shrinks to 0x7037b393000000000000000000000000000000000000000000000000000000000000007a0000000000000000000000003d9e6aa57f58768370b10a80da478b81186f3c00
[8,6]cc e96264774c3f741dfdbba3cafffdbcc5936eb5d1e45f56c6fd15230a4c1e4105 # shrinks to 0x2820dd8c00000000000000000000000000000000000000000000000000000000f57c57d30000000000000000000000000000000000000000000000000000000000000e1600000000000000000000000000000000000000000000000000000000000027610000000000000000000000000000000000000000000000000000000000001d61
[8,8]+d14fc5025cb2d33a5b5d61ecf33657f8f679c3197bf86dcaa338007a95a43334cc e96264774c3f741dfdbba3cafffdbcc5936eb5d1e45f56c6fd15230a4c1e4105 # shrinks to 0x2820dd8c00000000000000000000000000000000000000000000000000000000f57c57d30000000000000000000000000000000000000000000000000000000000000e1600000000000000000000000000000000000000000000000000000000000027610000000000000000000000000000000000000000000000000000000000001d61
cc a90aab57ca3e69b735ee63d71a01e83590c46ade233d5c9525e4c5be17895920 # shrinks to 0xc4ff4f50000000000000000000000000000000000000000000000000000000000000363300000000000000000000000000000000000000000000000000000000f851a4410000000000000000000000000000000000000000000000000000000000002437000000000000000000000000d91e2fbbbe99db1c4432a98c17af45d139bdfeb6
cc bacc431436ed2b13f267b7a8453634f9267b78e4f930171adfa33fbf16728c8b # shrinks to 0x3b342cc100000000000000000000000000000000000000000000000000000000000065640000000000000000000000000000000000000000000000000000000000004864
cc ed334007822cdccbb527aaba797de78a53f64d5482eeca58dd1a052138e14b48 # shrinks to 0x238c99d9000000000000000000000000000000000000000000000000000000006f2d5a4100000000000000000000000020f8237697c0078f83d0ae0f6816d18b43014e4c0000000000000000000000001d8612c3ee3da50aaf7893df3ac35d3de8d93298
Expand Down
1 change: 1 addition & 0 deletions contracts/private keys
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Loading