diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..4b17d38 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,29 @@ +name: Bug report +description: Create a report to help us improve +title: 'Bug: ' +labels: ['type: bug'] + +body: + - type: textarea + id: steps + attributes: + label: Describe the bug and the steps to reproduce it + placeholder: | + 1. Go to '...' + 2. Click on '....' + 3. Scroll down to '....' + 4. See error + validations: + required: true + + - type: textarea + id: expected + attributes: + label: What's the expected behavior? + + - type: textarea + id: environment + attributes: + label: What version of the libraries are you using? + placeholder: | + - OnchainKit: [e.g. 0.2.x] diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..93c6ac0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Base Discord + url: https://base.org/discord + about: The official Base Discord community. diff --git a/.github/ISSUE_TEMPLATE/documentation_request.yml b/.github/ISSUE_TEMPLATE/documentation_request.yml new file mode 100644 index 0000000..6fd6052 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation_request.yml @@ -0,0 +1,16 @@ +name: Documentation request +description: Suggest a documentation for this project +title: 'Documentation Request: ' +labels: ['type: documentation'] + +body: + - type: markdown + attributes: + value: | + This issue form is for documentation requests only! + If you've found a bug, please use [bug_report](/new?template=bug_report.yml) + - type: textarea + id: problem + attributes: + label: Is your documentation request related to a problem? Please describe. + description: A clear and concise description of what the problem is. Ex. It's not clear when [...] diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..6f3faf5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,17 @@ +name: Feature request +description: Suggest an idea for this project +title: 'Feature Request: ' +labels: ['type: enhancement'] + +body: + - type: textarea + id: solution + attributes: + label: Describe the solution you'd like + validations: + required: true + + - type: textarea + id: alternatives + attributes: + label: Describe alternatives you've considered. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..d160ffb --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,5 @@ +**What changed? Why?** + +**Notes to reviewers** + +**How has it been tested?** diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml new file mode 100644 index 0000000..9ce97a1 --- /dev/null +++ b/.github/actions/setup/action.yml @@ -0,0 +1,18 @@ +name: Setup +runs: + using: composite + steps: + - uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + registry-url: https://registry.npmjs.org + cache: yarn + + # For provenance https://docs.npmjs.com/generating-provenance-statements#prerequisites + - name: Install npm 9.5 + run: npm install -g npm@^9.5.0 + shell: bash + + - name: Install node modules + run: yarn install --frozen-lockfile + shell: bash diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..b32b9f1 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,30 @@ +name: Template Build +on: + push: + branches: ['main'] + pull_request: + branches: ['main'] +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Template Install dependencies + run: npm install + + - name: Template Test Build + # When fails, please check your build + run: | + npm run build diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..9d227c5 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,28 @@ +name: Template Check +on: + push: + branches: ['main'] + pull_request: + branches: ['main'] +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Template Install dependencies + run: npm install + + - name: Template Check + run: npm run ci:check diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..a4a74fa --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,28 @@ +name: Template Format +on: + push: + branches: ['main'] + pull_request: + branches: ['main'] +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Template Install dependencies + run: npm install + + - name: Template Format + run: npm run ci:format diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..9645e7f --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,28 @@ +name: Template Lint +on: + push: + branches: ['main'] + pull_request: + branches: ['main'] +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Template Install dependencies + run: npm install + + - name: Template Lint + run: npm run ci:lint diff --git a/.github/workflows/salus-scan.yml b/.github/workflows/salus-scan.yml new file mode 100644 index 0000000..5975f12 --- /dev/null +++ b/.github/workflows/salus-scan.yml @@ -0,0 +1,14 @@ +name: Salus Security Scan + +on: [pull_request, push] + +jobs: + scan: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Salus Scan + id: salus_scan + uses: federacy/scan-action@0.1.4 + with: + active_scanners: "\n - PatternSearch\n - Semgrep\n - Trufflehog" diff --git a/LICENSE b/LICENSE index 8c97955..b636bb3 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 Leonardo Zizzamia +Copyright (c) 2024 Coinbase Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal