-
Notifications
You must be signed in to change notification settings - Fork 502
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a0029f8
commit d655157
Showing
899 changed files
with
138,501 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
PRIVATE_KEY= | ||
|
||
ALCHEMY_KEY= | ||
|
||
SCAN_API_KEY= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: _ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.sol linguist-language=Solidity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
Oops, something went wrong.