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

contracts #4

Merged
merged 50 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
581b8c7
Prepare repo
ScreamingHawk Apr 30, 2023
7207fe7
Add linting
ScreamingHawk Apr 30, 2023
699e1b5
Add build script
ScreamingHawk May 10, 2023
098bd64
Base token implementations
ScreamingHawk May 1, 2023
214cbbb
Add CI
ScreamingHawk Jun 7, 2023
3416682
Add ERC20 base token
ScreamingHawk Jun 7, 2023
4250608
Update build scripts
ScreamingHawk Jun 7, 2023
58672df
Fix linting
ScreamingHawk Jun 7, 2023
e3e6139
Hash salt with sender for security
ScreamingHawk Jun 7, 2023
2abb414
Abstract ERC2981 control
ScreamingHawk Jun 7, 2023
304f1c5
Keep init rules consistent
ScreamingHawk Jun 7, 2023
2bc9bfd
Variable naming convention update
ScreamingHawk Jun 8, 2023
194ec58
Add READMEs
ScreamingHawk Jun 8, 2023
a35815a
Add deploy script
ScreamingHawk Jun 8, 2023
8de75f4
Variable names
ScreamingHawk Jun 19, 2023
59f4483
Add ERC1155Sale base implementation
ScreamingHawk May 1, 2023
691ff2b
ERC1155 Admin minting
ScreamingHawk May 2, 2023
65e36b8
Withdraw tests
ScreamingHawk May 2, 2023
ab5749b
Add ERC721 Sale
ScreamingHawk May 2, 2023
0b74bac
Add supply cap to sale contracts
ScreamingHawk May 3, 2023
c720869
Add ERCXXXSale interfaces
ScreamingHawk May 5, 2023
5952135
Use a proxy for ERC721Sale deployments
ScreamingHawk May 7, 2023
86979ec
Use factory for ERC1155Sale
ScreamingHawk May 7, 2023
41a2fca
Fix docstring
ScreamingHawk May 15, 2023
601de95
Fix forge non-contracts
ScreamingHawk May 16, 2023
dd033c2
Add ERC1155Packed
ScreamingHawk May 16, 2023
404fcaf
Remove Packed
ScreamingHawk Jun 19, 2023
1641f4f
Use ERC1155Token as a base
ScreamingHawk Jun 19, 2023
9fb5283
Use ERC721Token as a base
ScreamingHawk Jun 19, 2023
969856c
Variable naming
ScreamingHawk Jun 21, 2023
5dd4f4f
Use WithdrawControlled for Sale contracts
ScreamingHawk Jun 26, 2023
930e9af
Use minter pattern for ERC20
ScreamingHawk Jun 27, 2023
6b8ebea
Fix tests
ScreamingHawk Jun 28, 2023
5b7f945
Align order of params
ScreamingHawk Jun 28, 2023
b16bad6
Rearrange folder structure
ScreamingHawk Jun 28, 2023
d243bd5
Add merkle allowlist to ERC1155Sale
ScreamingHawk Jun 30, 2023
15abbd7
Add merkle allowlist to ERC721Sale
ScreamingHawk Jun 30, 2023
eeda959
Increase default fuzz runs
ScreamingHawk Jun 30, 2023
f2ff1c0
Update interface pattern
ScreamingHawk Jul 2, 2023
c14efbb
Tidy interfaces and comments
ScreamingHawk Jul 2, 2023
6745d50
Add SequenceProxyFactory
ScreamingHawk Jul 25, 2023
5aeac62
Migrate to use Sequence Proxy Factory
ScreamingHawk Jul 26, 2023
572a35a
Update READMEs
ScreamingHawk Aug 3, 2023
7c77d51
Update deploy script
ScreamingHawk Sep 24, 2023
aca6b92
make sure metadata output is included in forge build
acrylix Oct 12, 2023
0fb4a7b
Merge pull request #6 from 0xsequence/build-fix
ScreamingHawk Oct 12, 2023
c74c1af
Fix typo in build script
ScreamingHawk Oct 30, 2023
461112a
Add ability to change contract name symbol for erc20 721
ScreamingHawk Oct 30, 2023
25093e6
Add royalty to deployment function
ScreamingHawk Oct 31, 2023
e031790
Salt is a hash of input params
ScreamingHawk Oct 31, 2023
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
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PRIVATE_KEY=
RPC_URL=
FACTORY_OWNER=
23 changes: 23 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: true,
},

extends: [
'eslint:recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:@typescript-eslint/recommended',
'prettier',
],
plugins: ['@typescript-eslint', 'simple-import-sort'],

rules: {
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
},

ignorePatterns: ['dist', 'node_modules'],
}
103 changes: 103 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@

on: [push]

name: ci

jobs:
install:
name: Install dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-node@v1
with:
node-version: 18
- uses: actions/cache@master
id: yarn-cache
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/yarn.lock') }}
- run: yarn install --network-concurrency 1
if: ${{ steps.yarn-cache.outputs.cache-hit != 'true' }}

lint-sol:
name: Solidity lint
runs-on: ubuntu-latest
needs: [install]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-node@v1
with:
node-version: 18
- uses: actions/cache@master
id: yarn-cache
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/yarn.lock') }}

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

- name: Run linting
run: yarn lint:sol

foundry-tests:
name: Foundry tests
runs-on: ubuntu-latest
needs: [install]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-node@v1
with:
node-version: 18
- uses: actions/cache@master
id: yarn-cache
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/yarn.lock') }}

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

- name: Run tests
run: FOUNDRY_FUZZ_RUNS=1024 forge test -vvv

# coverage:
# name: Coverage
# runs-on: ubuntu-latest
# needs: [install]
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: recursive
# - uses: actions/setup-node@v1
# with:
# node-version: 18
# - uses: actions/cache@master
# id: yarn-cache
# with:
# path: |
# node_modules
# */*/node_modules
# key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/yarn.lock') }}
# - run: yarn coverage || true
# - name: Coveralls
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Forge
out/
cache/

# Ignore .DS_Store files on macOS
.DS_Store

# Yarn
node_modules/
yarn-error.log

# Env vars
.env
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "lib/murky"]
path = lib/murky
url = https://github.com/dmfxyz/murky
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint-staged
6 changes: 6 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
arrowParens: 'avoid',
semi: false,
singleQuote: true,
trailingComma: 'all',
}
8 changes: 8 additions & 0 deletions .solhint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": ["solhint:recommended"],
"rules": {
"compiler-version": ["error", "^0.8.17"],
"func-visibility": ["warn", { "ignoreConstructors": true }],
"reason-string": ["warn", { "maxLength": 96 }]
}
}
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"editor.formatOnSave": true,
"[solidity]": {
"editor.defaultFormatter": "JuanBlanco.solidity"
},
"solidity.formatter": "forge",
"solidity.compileUsingRemoteVersion": "v0.8.17"
}
Loading