Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
98965e2
feat: add new erc6909-based version
sscovil Aug 13, 2025
65e81ec
wip: add purchase with erc-20 contract extension
sscovil Aug 15, 2025
3b9fbc8
feat: make base + purchase extensions pausable
sscovil Aug 17, 2025
2850d9e
feat: add access manager role
sscovil Aug 18, 2025
9b9a308
feat: enable override on max balance records
sscovil Aug 18, 2025
985ecc0
test: add array size check after tokens expire
sscovil Aug 18, 2025
2493efb
refactor: move non-transferable token logic into base contract
sscovil Aug 19, 2025
d728a7d
feat: add method to suspend purchase of tokens
sscovil Aug 19, 2025
04ec8e7
feat: suspendTokenPrice does nothing if token is not set
sscovil Aug 19, 2025
1665a41
feat: provide a more modular ERC-1155 implementation
sscovil Aug 19, 2025
0ad5131
test: clean up test coverage
sscovil Aug 19, 2025
5a6f0ec
Merge branches 'erc1155' and 'erc6909' into erc1155-and-erc6909
sscovil Aug 20, 2025
dc8b84c
chore: add code coverage and docs to GH Actions
sscovil Aug 20, 2025
328e5ab
feat: do nothing on update if zero amount or self-transfer
sscovil Aug 20, 2025
4398495
refactor: rename priceIsSet and ttlIsSet to match other is- methods
sscovil Aug 20, 2025
6093055
feat: revert on transfer to self or zero address
sscovil Aug 20, 2025
b2d5655
chore: move core update method logic to base contracts
sscovil Aug 20, 2025
42a0015
refactor: split price and ttl out from access control
sscovil Aug 21, 2025
9ceb863
refactor: split price and ttl out from access control
sscovil Aug 21, 2025
71d6726
feat: replace old EVMAuth contract with new variants
sscovil Aug 21, 2025
46018c7
refactor: greatly reduce code duplication
sscovil Aug 22, 2025
2c1da8c
feat: make contracts upgradeable
sscovil Aug 25, 2025
2fe36a3
refactor: eliminate redundant code
sscovil Aug 25, 2025
ec04e5e
fix: mint tokens after purchase
sscovil Aug 26, 2025
fc33593
docs: add detailed docs with class diagrams
sscovil Aug 26, 2025
cce31b7
docs: update heading levels
sscovil Aug 26, 2025
5065812
fix: make removeERC20PaymentToken methods public
sscovil Aug 26, 2025
7369101
docs: move feature matrix above class diagrams
sscovil Aug 26, 2025
8a919c3
docs: rearrange sections
sscovil Aug 26, 2025
8159510
docs: update table columns
sscovil Aug 26, 2025
56b4c7a
docs: update overview
sscovil Aug 26, 2025
c2a3324
docs: update overview
sscovil Aug 26, 2025
505e14a
docs: naming convention description
sscovil Aug 26, 2025
0f96337
docs: remove When to Choose Which section
sscovil Aug 26, 2025
03a3867
docs: clean up token standards comparison
sscovil Aug 26, 2025
e50d9de
docs: improve token standards comparison
sscovil Aug 26, 2025
f08017d
docs: move class diagrams to end of doc
sscovil Aug 26, 2025
b19c681
docs: improve token standards comparison
sscovil Aug 26, 2025
3f941f8
docs: improve token standards comparison
sscovil Aug 26, 2025
6339b1d
feat: unified token configuration
sscovil Aug 27, 2025
6ec1a82
refactor: simplify token config
sscovil Aug 27, 2025
88cdbf8
docs: update class diagrams
sscovil Aug 27, 2025
b16033c
refactor: clean up event and error names
sscovil Aug 27, 2025
93e58d0
test: add test coverage
sscovil Aug 27, 2025
b8687a6
test: improve test coverage
sscovil Aug 27, 2025
4bb69f1
test: add abstract BaseUpgradeTest to reduce boilerplate
sscovil Aug 28, 2025
0457d74
test: cleanup upgrade test harness and test func names
sscovil Aug 28, 2025
9df61b0
test: further improve upgrade test harness
sscovil Aug 28, 2025
e556add
test: further improve test harness and add tests
sscovil Aug 28, 2025
7b4725d
refactor: simplify contract structure to avoid initialization hell
sscovil Sep 3, 2025
61c489f
fix: make data storage private, not internal
sscovil Sep 4, 2025
c745441
feat: use storage location per EIP-7201
sscovil Sep 4, 2025
8b91a7d
feat: support both native and ERC-20 purchases + use EIP-7201
sscovil Sep 4, 2025
225556b
feat: use storage location per EIP-7201
sscovil Sep 4, 2025
d7c5203
docs: update and organize documentation
sscovil Sep 4, 2025
b7081b5
docs: ensure all class diagrams are accurate
sscovil Sep 4, 2025
86a6220
feat: remove token supply extensions
sscovil Sep 4, 2025
050ba76
docs: improve and standardize doc blocks
sscovil Sep 5, 2025
462f9e7
docs: add info about generatic docs site locally
sscovil Sep 5, 2025
519b78a
docs: update test commands to automatically use ffi flag
sscovil Sep 5, 2025
8cfd01e
docs: include lib directory in generated docs site
sscovil Sep 5, 2025
132e57b
docs: consolidate main docs into a single README file
sscovil Sep 5, 2025
1e0ce2b
docs: add mermaid markdown plugin to docs site via GH Actions
sscovil Sep 5, 2025
e360bff
docs: use full repo URLs in README.md so links work on docs site
sscovil Sep 5, 2025
6cb6ea7
test: add test coverage
sscovil Sep 7, 2025
88aceb6
test: more code coverage
sscovil Sep 7, 2025
acbde3f
test: add more code coverage
sscovil Sep 7, 2025
d598117
fix: update ephemeral token balance records on mint/burn/transfer
sscovil Sep 7, 2025
5b3a723
feat: use shared update logic for balance records
sscovil Sep 7, 2025
39a4e15
test: add more test coverage
sscovil Sep 7, 2025
bcdc2e9
test: add more test coverage
sscovil Sep 8, 2025
5a17b1f
refactor: rename abstract methods for clarity
sscovil Sep 8, 2025
46b716b
feat: add deployment scripts
sscovil Sep 8, 2025
60553b3
docs: add docs for deployment scripts
sscovil Sep 8, 2025
7c202b6
feat: remove single token property setters to reduce contract sizes
sscovil Sep 8, 2025
54e1830
docs: add instructions for deploying to Anvil locally
sscovil Sep 8, 2025
95d59b7
fix: add public pause/unpause methods
sscovil Sep 9, 2025
fcbb1c8
feat: grant roles on initialization
sscovil Sep 9, 2025
3fdcbb3
feat: improve deployment script process
sscovil Sep 9, 2025
9a5e4c1
docs: reference cast command cheat sheet in both README files
sscovil Sep 9, 2025
86f0110
docs: add intro to cast commands doc
sscovil Sep 9, 2025
e9e2e5c
chore: skip scripts in code coverage report
sscovil Sep 9, 2025
5d54c1f
test: add more test coverage
sscovil Sep 9, 2025
cc26ab4
test: add purchase coverage
sscovil Sep 9, 2025
e40d78f
docs: clean up test code
sscovil Sep 10, 2025
05de6f9
test: add more test coverage
sscovil Sep 10, 2025
058f5d4
chore: gitignore scripts other than the ones included
sscovil Sep 10, 2025
a8d9358
chore: gitignore scripts other than the ones included
sscovil Sep 10, 2025
9d80197
chore: gitignore scripts other than the ones included
sscovil Sep 10, 2025
574b142
feat: increase default max balance records to 100
sscovil Sep 10, 2025
33066b7
fix: add missing modifiers and remaining test coverage
sscovil Sep 10, 2025
3761d92
docs: add setup instructions to deployment docs
sscovil Sep 10, 2025
f372f4e
docs: use https://sepolia.base.org env var in examples
sscovil Sep 10, 2025
7c47451
feat: add contract bytecode and abi files
sscovil Sep 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
29 changes: 14 additions & 15 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000000
RPC_URL=https://rpc.testnet.radiustech.xyz
ACCOUNT_ADDRESS=
PRIVATE_KEY=
ETHERSCAN_API_KEY=

APP_NAME=MyApp
APP_VERSION=1
APP_METADATA_URI=http://www.example.com/auth/token/{id}.json
RPC=http://localhost:8545

TOKEN_ID=0
TOKEN_ACTIVE=true
TOKEN_TRANSFERABLE=true
TOKEN_BURNABLE=true
TOKEN_PRICE=1000000000
TOKEN_TTL=3600
BASE_SEPOLIA=https://sepolia.base.org
RADIUS_TESTNET=https://rpc.testnet.radiustech.xyz
SEPOLIA=https://ethereum-sepolia-rpc.publicnode.com

CONTRACT_ADDRESS=0x0000000000000000000000000000000000000000
ACCOUNT_ADDRESS=0x0000000000000000000000000000000000000000
TOKEN_AMOUNT=1
PAYMENT_AMOUNT=1000000000
DEFAULT_ADMIN_ROLE=0x0000000000000000000000000000000000000000000000000000000000000000
MINTER_ROLE=0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6
BURNER_ROLE=0x3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a848
TOKEN_MANAGER_ROLE=0x74f7a545c65c11839a48d7453738b30c295408df2d944516167556759ddc6d06
ACCESS_MANAGER_ROLE=0x46f3eccdd88dd62792ae8eed1be7b9b658477566c49fd85b0d08cf44261c9208
TREASURER_ROLE=0x3496e2e73c4d42b75d702e60d9e48102720b8691234415963a5a857b86425d07
UPGRADE_MANAGER_ROLE=0xa76ace73a908083d89af9ff88e5b4f7cadb3591a80631063f68b695fda726db5
49 changes: 49 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy Docs
on:
push:
branches: [main]

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
steps:
- uses: actions/checkout@v4

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

- name: Generate docs
run: forge doc --build --include

- name: Install and configure mdbook-mermaid
run: |
cargo install mdbook-mermaid
mdbook-mermaid install docs/

# Add preprocessor config to generated book.toml
cat >> docs/book.toml << 'EOF'

[preprocessor.mermaid]
command = "mdbook-mermaid"

[output.html]
additional-js = ["mermaid.min.js", "mermaid-init.js"]
EOF

# Rebuild with mermaid support
cd docs && mdbook build

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: ./docs/book

- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
7 changes: 6 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,10 @@ jobs:

- name: Run Forge tests
run: |
forge test -vvv
forge coverage --no-match-coverage ".(t|s).sol" -vvv --report lcov --lcov-version 2.2
id: test

- name: Upload results to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,17 @@ docs/
.env*
!.env.example

# Custom scripts
script/*.s.sol
!script/BaseDeploy.s.sol
!script/ExampleDeploy.s.sol
!script/Upgrade.s.sol

# JetBrains IDEs
.idea/

# Dependencies
lib/

# Coverage reports
lcov.info
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/openzeppelin/openzeppelin-contracts
[submodule "lib/openzeppelin-contracts-upgradeable"]
path = lib/openzeppelin-contracts-upgradeable
url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable
[submodule "lib/openzeppelin-foundry-upgrades"]
path = lib/openzeppelin-foundry-upgrades
url = https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades
Loading
Loading