Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
5d17cfb
started separating vault and token
iChristwin Dec 6, 2024
6bf541b
added submodule for superchain solaxy
iChristwin Dec 7, 2024
98bbe62
updated submodule
iChristwin Dec 7, 2024
47aa387
changed the ticker
iChristwin Dec 10, 2024
67d5967
re-merged vault and token
iChristwin Dec 11, 2024
ee7a9a0
added update to deps
iChristwin Dec 11, 2024
371cb4b
fixing openzeppelin
iChristwin Dec 11, 2024
267c4b1
forge install: openzeppelin-contracts
iChristwin Dec 11, 2024
efaf30e
minor change to .gitmodules file
iChristwin Dec 11, 2024
10a3b1b
bringing back tests
iChristwin Dec 12, 2024
fc9a76f
minor refactor
iChristwin Jan 17, 2025
adb2f09
refactored and fixed comments
iChristwin Jan 18, 2025
da84229
removed constant fee address now compute tip address from erc6551
iChristwin Jan 21, 2025
c10c2e3
renamed variable
iChristwin Jan 22, 2025
a16c046
renamed private function variables
iChristwin Jan 22, 2025
f03bfbd
refactored private withdraw function
iChristwin Jan 23, 2025
2598b1d
switched to soldeer for deps and started testing
iChristwin Jan 23, 2025
eb8ed33
adding test driven changes
iChristwin Jan 23, 2025
b97c0fb
all tests passing locally starting fuzz on gh-workflow
iChristwin Jan 23, 2025
34c0f55
fixed build issue with gh-workflow
iChristwin Jan 23, 2025
7c2f648
nothing to see here just retrying workflow
iChristwin Jan 23, 2025
13ae5f7
trying to catch an upload test logs
iChristwin Jan 23, 2025
20a819d
trying to fix upload artifact
iChristwin Jan 23, 2025
67f5f75
trying fix again
iChristwin Jan 23, 2025
4e7003b
try another fix
iChristwin Jan 24, 2025
e221a96
another test run
iChristwin Jan 24, 2025
f0f92c4
trying to fix fuzz test
iChristwin Jan 24, 2025
adfc7e6
all test working as expected now
iChristwin Jan 24, 2025
8b5305f
minor change
iChristwin Jan 24, 2025
f0ae0dd
increase margin of error in fuzz
iChristwin Jan 24, 2025
6ef010c
added more test checks
iChristwin Jan 24, 2025
6b47afd
cleaning up imports
iChristwin Jan 24, 2025
eb7a12a
disabling test work flow on this branch. likely next test is PR to main
iChristwin Jan 24, 2025
94086cc
minor change to test comment
iChristwin Jan 24, 2025
3580bae
removed unused import
iChristwin Jan 24, 2025
e4bd436
re adding testFail to allow test to pass on gh
iChristwin Jan 25, 2025
61f53b4
added reentrancy protection
iChristwin Jan 30, 2025
534082b
removed unneeded
iChristwin Jan 30, 2025
e9ed591
substituted the use of m3ter account with m3ter holder
iChristwin Feb 1, 2025
97c2a94
fix some issue in invariant rest
iChristwin Feb 1, 2025
15e3c29
trying to fix invariant test again
iChristwin Feb 1, 2025
bdfe935
minimized inconsistency checks to only total balances of assets and s…
iChristwin Feb 1, 2025
ce4ffa7
prettifying code
iChristwin Feb 1, 2025
cc855f9
removed unneeded supply check
iChristwin Feb 1, 2025
e770c51
minor changes to tests
iChristwin Feb 1, 2025
1e42cb5
changed the nft address
iChristwin Feb 1, 2025
dff7018
fixed invariant condition
iChristwin Feb 1, 2025
c47b59d
renaming test
iChristwin Feb 1, 2025
3b783d3
major changes to the fee formulas
iChristwin Feb 4, 2025
b9c9f1f
added test cases
iChristwin Feb 4, 2025
3ed44df
fixed invariant test
iChristwin Feb 4, 2025
bcd5c9a
made more changes to call graph
iChristwin Feb 5, 2025
ef9c72d
I just realized the perfect names were right in front of me all along 😂
iChristwin Feb 5, 2025
d779ef7
some gas optimizations
iChristwin Feb 5, 2025
4aa47ff
updated pragma solidity
iChristwin Feb 5, 2025
3643055
used interface trick for M3ter balance and added comment explaining t…
iChristwin Feb 7, 2025
506f630
minor change to comments
iChristwin Feb 8, 2025
54b0924
readding zero checks for safety
iChristwin Feb 8, 2025
d47b629
switched to solady
iChristwin Feb 8, 2025
415f325
minor change to comment
iChristwin Feb 9, 2025
1a1ddec
changed balance change logic
iChristwin Feb 9, 2025
21547fd
simplified formula implementations
iChristwin Feb 9, 2025
4f9d467
fixed issue with deposit function
iChristwin Feb 9, 2025
d87e39b
minor refactor
iChristwin Feb 9, 2025
5424c0c
minor changes to test
iChristwin Feb 9, 2025
59783af
refactored test; _dump requires m3ter
iChristwin Feb 10, 2025
fc6f7a5
minor change to documentation comments
iChristwin Feb 10, 2025
ed2c8ed
fixed solady import for hardhat, switched to use require
iChristwin Feb 18, 2025
fe54b6d
following up
iChristwin Feb 18, 2025
84c125c
fixed safe* function calls
iChristwin Feb 18, 2025
b89459a
fixed issue breaking safeRedem test
iChristwin Feb 18, 2025
32c3d50
fixed minor format
iChristwin Feb 18, 2025
9c0301b
gas report
iChristwin Feb 18, 2025
11ec6a4
fixed safeMint
iChristwin Feb 21, 2025
d3ee777
Changed M3ter requirement for dump
iChristwin Mar 23, 2025
6080ff3
Update README.md
iChristwin Mar 27, 2025
2dae561
Merge branch 'main' into dev-2.0
iChristwin Sep 27, 2025
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
14 changes: 8 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: test

on:
push:
branches: [ "main" ]
branches: [ "dev-2.0" ]
pull_request:
branches: [ "main" ]

Expand All @@ -18,21 +18,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1.2.0
uses: foundry-rs/foundry-toolchain@v1.3.1
with:
version: nightly
version: stable

- name: Run Forge build
run: |
forge --version
forge soldeer install
forge build --sizes
id: build

- name: Run Forge tests
run: |
forge test -vvvv
forge test -vvv --gas-report
id: test

- name: Run snapshot
run: forge snapshot
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,10 @@ docs/
.env

# IDE
.deps/
.vscode/
.prettierrc.json
src/artifacts/

# foundry
dependencies/
12 changes: 3 additions & 9 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
[submodule "lib/prb-math"]
path = lib/prb-math
url = https://github.com/paulRBerg/prb-math
[submodule "src/L2/Superchain"]
path = src/L2/Superchain
url = git@github.com:M3tering/SuperchainSolaxy.git
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,23 @@ Read our Contribution Guidelines for details. Join us in making Solaxy better!
### Project Layout
The project is filed in the following directory structure:
```
├── lib/ # Project dependencies stored as git submodules
├── dependencies/ # Project dependencies stored
├── script/ # Foundry testing scripts
├── src/ # Contains the Solidity smart contract files
│ ├── Interfaces/ # Contract interfaces for Solaxy
├── test/ # Solidity tests for Foundry
```

### How to Install Dependencies
Soldeer is used for managing and installing the dependencies for this repo, rather that the default Foundry approach of using git submodules. Simply run `forge soldeer install` to stepup any missing dependencies. See [Foundry book](https://book.getfoundry.sh/projects/soldeer).

### How to Run Tests
1. Ensure you have Foundry installed: See [Foundry book](https://book.getfoundry.sh/getting-started/installation)
1. Download or clone the project repository
1. Navigate to the project directory in your terminal.
1. Run `forge test -vvv` to execute tests on a fork of IoTeX mainnet,
1. Install all dependencies: See my section on
[How to Install Dependencies](#how-to-install-dependencies)
1. Run `forge test -vvv` to execute tests on a fork of Ethereum mainnet,

### License
This project is licensed under the [MIT License](README.md).
21 changes: 15 additions & 6 deletions foundry.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
[profile.default]
src = "src"
out = "out"
libs = ["lib"]
optimizer = true
optimizer-runs = 1000
solc-version = "0.8.24"
solc-version = "0.8.28"
libs = ["dependencies"]

remappings = [
"@prb/math@4.0.2/=lib/prb-math/",
"@openzeppelin/contracts@5.0.2/=lib/openzeppelin-contracts/contracts/"
"solady/=dependencies/solady-0.1.7/",
"forge-std/=dependencies/forge-std-1.9.5/src/",
"@prb/math@4.1.0/=dependencies/@prb-math-4.1.0/",
]

[soldeer]
remappings_generate = false
remappings_location = "config"

[dependencies]
forge-std = "1.9.5"
solady = "0.1.7"
"@prb-math" = "4.1.0"

[rpc_endpoints]
gnosis-mainnet = "https://gnosis-rpc.publicnode.com"
chiado-testnet = "https://rpc.chiadochain.net"
ethereum-mainnet = "https://gateway.tenderly.co/public/mainnet"

[fuzz]
seed = "0x544D"
Expand Down
134 changes: 0 additions & 134 deletions lib/forge-std/.github/workflows/ci.yml

This file was deleted.

29 changes: 0 additions & 29 deletions lib/forge-std/.github/workflows/sync.yml

This file was deleted.

4 changes: 0 additions & 4 deletions lib/forge-std/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions lib/forge-std/.gitmodules

This file was deleted.

Loading
Loading