Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
kumaryash90 committed May 7, 2024
1 parent a0029f8 commit d655157
Show file tree
Hide file tree
Showing 899 changed files with 138,501 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# EditorConfig http://EditorConfig.org

# top-most EditorConfig file
root = true

# All files
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.sol]
indent_size = 4
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PRIVATE_KEY=

ALCHEMY_KEY=

SCAN_API_KEY=
13 changes: 13 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# folders
artifacts/
build/
cache/
coverage/
dist/
lib/
node_modules/
typechain/

# files
.solcover.js
coverage.json
21 changes: 21 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
extends:
- "eslint:recommended"
- "plugin:@typescript-eslint/eslint-recommended"
- "plugin:@typescript-eslint/recommended"
- "prettier"
parser: "@typescript-eslint/parser"
parserOptions:
project: "tsconfig.json"
plugins:
- "@typescript-eslint"
root: true
rules:
"@typescript-eslint/no-floating-promises":
- error
- ignoreIIFE: true
ignoreVoid: true
"@typescript-eslint/no-inferrable-types": "off"
"@typescript-eslint/no-unused-vars":
- warn
- argsIgnorePattern: _
varsIgnorePattern: _
61 changes: 61 additions & 0 deletions .gas-snapshot
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
AABenchmarkPrepare:test_prepareBenchmarkFile() (gas: 2926370)
AccountBenchmarkTest:test_state_accountReceivesNativeTokens() (gas: 11037)
AccountBenchmarkTest:test_state_addAndWithdrawDeposit() (gas: 83332)
AccountBenchmarkTest:test_state_contractMetadata() (gas: 56507)
AccountBenchmarkTest:test_state_createAccount_viaEntrypoint() (gas: 432040)
AccountBenchmarkTest:test_state_createAccount_viaFactory() (gas: 334122)
AccountBenchmarkTest:test_state_executeBatchTransaction() (gas: 39874)
AccountBenchmarkTest:test_state_executeBatchTransaction_viaAccountSigner() (gas: 392782)
AccountBenchmarkTest:test_state_executeBatchTransaction_viaEntrypoint() (gas: 82915)
AccountBenchmarkTest:test_state_executeTransaction() (gas: 35735)
AccountBenchmarkTest:test_state_executeTransaction_viaAccountSigner() (gas: 378632)
AccountBenchmarkTest:test_state_executeTransaction_viaEntrypoint() (gas: 75593)
AccountBenchmarkTest:test_state_receiveERC1155NFT() (gas: 39343)
AccountBenchmarkTest:test_state_receiveERC721NFT() (gas: 78624)
AccountBenchmarkTest:test_state_transferOutsNativeTokens() (gas: 81713)
AirdropERC1155BenchmarkTest:test_benchmark_airdropERC1155_airdrop() (gas: 38083572)
AirdropERC20BenchmarkTest:test_benchmark_airdropERC20_airdrop() (gas: 32068413)
AirdropERC721BenchmarkTest:test_benchmark_airdropERC721_airdrop() (gas: 41912536)
DropERC1155BenchmarkTest:test_benchmark_dropERC1155_claim() (gas: 185032)
DropERC1155BenchmarkTest:test_benchmark_dropERC1155_lazyMint() (gas: 123913)
DropERC1155BenchmarkTest:test_benchmark_dropERC1155_setClaimConditions_five_conditions() (gas: 492121)
DropERC20BenchmarkTest:test_benchmark_dropERC20_claim() (gas: 230505)
DropERC20BenchmarkTest:test_benchmark_dropERC20_setClaimConditions_five_conditions() (gas: 500858)
DropERC721BenchmarkTest:test_benchmark_dropERC721_claim_five_tokens() (gas: 210967)
DropERC721BenchmarkTest:test_benchmark_dropERC721_lazyMint() (gas: 124540)
DropERC721BenchmarkTest:test_benchmark_dropERC721_lazyMint_for_delayed_reveal() (gas: 226149)
DropERC721BenchmarkTest:test_benchmark_dropERC721_reveal() (gas: 13732)
DropERC721BenchmarkTest:test_benchmark_dropERC721_setClaimConditions_five_conditions() (gas: 500494)
EditionStakeBenchmarkTest:test_benchmark_editionStake_claimRewards() (gas: 65081)
EditionStakeBenchmarkTest:test_benchmark_editionStake_stake() (gas: 185144)
EditionStakeBenchmarkTest:test_benchmark_editionStake_withdraw() (gas: 46364)
MultiwrapBenchmarkTest:test_benchmark_multiwrap_unwrap() (gas: 88950)
MultiwrapBenchmarkTest:test_benchmark_multiwrap_wrap() (gas: 473462)
NFTStakeBenchmarkTest:test_benchmark_nftStake_claimRewards() (gas: 68287)
NFTStakeBenchmarkTest:test_benchmark_nftStake_stake_five_tokens() (gas: 539145)
NFTStakeBenchmarkTest:test_benchmark_nftStake_withdraw() (gas: 38076)
PackBenchmarkTest:test_benchmark_pack_addPackContents() (gas: 219188)
PackBenchmarkTest:test_benchmark_pack_createPack() (gas: 1412868)
PackBenchmarkTest:test_benchmark_pack_openPack() (gas: 141860)
PackVRFDirectBenchmarkTest:test_benchmark_packvrf_createPack() (gas: 1379604)
PackVRFDirectBenchmarkTest:test_benchmark_packvrf_openPack() (gas: 119953)
PackVRFDirectBenchmarkTest:test_benchmark_packvrf_openPackAndClaimRewards() (gas: 3621)
SignatureDropBenchmarkTest:test_benchmark_signatureDrop_claim_five_tokens() (gas: 140517)
SignatureDropBenchmarkTest:test_benchmark_signatureDrop_lazyMint() (gas: 124311)
SignatureDropBenchmarkTest:test_benchmark_signatureDrop_lazyMint_for_delayed_reveal() (gas: 225891)
SignatureDropBenchmarkTest:test_benchmark_signatureDrop_reveal() (gas: 10647)
SignatureDropBenchmarkTest:test_benchmark_signatureDrop_setClaimConditions() (gas: 73699)
TokenERC1155BenchmarkTest:test_benchmark_tokenERC1155_burn() (gas: 5728)
TokenERC1155BenchmarkTest:test_benchmark_tokenERC1155_mintTo() (gas: 122286)
TokenERC1155BenchmarkTest:test_benchmark_tokenERC1155_mintWithSignature_pay_with_ERC20() (gas: 267175)
TokenERC1155BenchmarkTest:test_benchmark_tokenERC1155_mintWithSignature_pay_with_native_token() (gas: 296172)
TokenERC20BenchmarkTest:test_benchmark_tokenERC20_mintTo() (gas: 118586)
TokenERC20BenchmarkTest:test_benchmark_tokenERC20_mintWithSignature_pay_with_ERC20() (gas: 183032)
TokenERC20BenchmarkTest:test_benchmark_tokenERC20_mintWithSignature_pay_with_native_token() (gas: 207694)
TokenERC721BenchmarkTest:test_benchmark_tokenERC721_burn() (gas: 8954)
TokenERC721BenchmarkTest:test_benchmark_tokenERC721_mintTo() (gas: 151552)
TokenERC721BenchmarkTest:test_benchmark_tokenERC721_mintWithSignature_pay_with_ERC20() (gas: 262344)
TokenERC721BenchmarkTest:test_benchmark_tokenERC721_mintWithSignature_pay_with_native_token() (gas: 286914)
TokenStakeBenchmarkTest:test_benchmark_tokenStake_claimRewards() (gas: 67554)
TokenStakeBenchmarkTest:test_benchmark_tokenStake_stake() (gas: 177180)
TokenStakeBenchmarkTest:test_benchmark_tokenStake_withdraw() (gas: 47396)
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.sol linguist-language=Solidity
22 changes: 22 additions & 0 deletions .github/composite-actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "Install"
description: "Sets up Node.js and runs install"

runs:
using: composite
steps:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: "https://registry.npmjs.org"
cache: "yarn"

- name: Install dependencies
shell: bash
run: yarn

- name: Setup lcov
shell: bash
run: |
sudo apt update
sudo apt install -y lcov
17 changes: 17 additions & 0 deletions .github/workflows/dispatch_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Dispatch Doc Generation

on:
push:
branches:
- main

jobs:
dispatch:
runs-on: ubuntu-latest
steps:
- name: Repository Dispatch
uses: peter-evans/[email protected]
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
repository: thirdweb-dev/docs
event-type: generate-docs
37 changes: 37 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This is a basic workflow to help you get started with Actions

name: Solhint Lint

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
pull_request:
branches: [main]

# cancel previous runs if new commits are pushed to the branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
lint:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 25

- name: Setup Project
uses: ./.github/composite-actions/setup

- name: Run Lint
run: yarn lint
36 changes: 36 additions & 0 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This is a basic workflow to help you get started with Actions

name: Prettier Formatting

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
pull_request:
branches: [main]

# cancel previous runs if new commits are pushed to the branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# This workflow contains a single job called "build"
lint:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 25

- name: Setup Project
uses: ./.github/composite-actions/setup

- name: Run Prettier
run: yarn prettier:contracts
47 changes: 47 additions & 0 deletions .github/workflows/slither.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Slither Analysis

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

# cancel previous runs if new commits are pushed to the branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
analyze:
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 25
node-version: 18

- name: Setup Project
uses: ./.github/composite-actions/setup

- name: Install Foundry
uses: onbjerg/foundry-toolchain@v1
with:
version: nightly

- name: Run Slither
uses: crytic/[email protected]
continue-on-error: true
id: slither
with:
sarif: results.sarif
slither-args: --foundry-out-directory artifacts_forge

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ steps.slither.outputs.sarif }}
52 changes: 52 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This is a basic workflow to help you get started with Actions

name: Tests

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
pull_request:
branches: [main]

# cancel previous runs if new commits are pushed to the branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
test:
# The type of runner that the job will run on
# 16 core paid runner
runs-on: ubuntu-latest-16

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 25
node-version: 18

- name: Setup Project
uses: ./.github/composite-actions/setup

- name: Install Foundry
uses: onbjerg/foundry-toolchain@v1
with:
version: nightly
- name: Run coverage and tests
run: |
forge coverage --report lcov
lcov --remove lcov.info -o lcov.info 'src/test/**'
lcov --remove lcov.info -o lcov.info 'contracts/external-deps/**'
lcov --remove lcov.info -o lcov.info 'contracts/eip/**'
forge test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
files: ./lcov.info,
Loading

0 comments on commit d655157

Please sign in to comment.