Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8214b80
chore : fix nexus proxy deployment in the script
Nov 27, 2025
b267355
fix issue, add tests
Dec 1, 2025
18df6fb
chore : add events and errors declarations
Dec 1, 2025
61ed87b
chore : restore memory pointers
Dec 1, 2025
473365c
will be added via PR
Dec 1, 2025
0ec7801
chore : comm
Dec 1, 2025
8eb4034
chore: resolve merge conflicts
Dec 1, 2025
9690b10
chore : try nightly
Dec 1, 2025
51d7391
chore : rm export profile
Dec 1, 2025
57f0e9d
chore : add events and errors declarations
Dec 2, 2025
20f4e91
Merge pull request #15 from bcnmy/fix/l1-l2-events-errors
filmakarov Dec 2, 2025
37c0c3a
Merge pull request #14 from bcnmy/fix/h-1-incorrect-assembly-hashing
filmakarov Dec 2, 2025
3a62c20
proper restore ptr
Dec 2, 2025
e40a661
Merge pull request #16 from bcnmy/fix/l3-restore-pointers
filmakarov Dec 2, 2025
93adf7f
fix stx typehash
Dec 4, 2025
8dea408
fix: meeUserOp and SuperTx typehashes
Dec 4, 2025
e24e750
chore: change salts and improve deployment script
Dec 15, 2025
fc2d0f9
test: fix postop pm gas limit in tests
Dec 15, 2025
9eda19d
test: fix postop pm gas limit in tests
Dec 15, 2025
98dcd40
Merge pull request #11 from bcnmy/release/v2.2.1
filmakarov Dec 15, 2025
dd34a35
chore : fix link
Dec 15, 2025
6c28f0b
chore : fix deploy info link
Dec 15, 2025
4e78d71
chore: add ss deployment scripts
Dec 19, 2025
d5c6406
chore: polish scripts
Dec 19, 2025
1f8118c
Merge pull request #17 from bcnmy/feat/add-ss-deployment-scripts
filmakarov Dec 19, 2025
b9c7b57
merge dev
Feb 20, 2026
581a39c
chore: regenerate lockfile
Feb 20, 2026
c63a2d6
chore: lockfile
Feb 20, 2026
2cfc34c
fix deps
Feb 20, 2026
75ea5f7
chore: fix case
Feb 20, 2026
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
4 changes: 2 additions & 2 deletions .github/workflows/foundry-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: stable
version: nightly

- name: Setup pnpm
uses: pnpm/action-setup@v3
Expand All @@ -39,7 +39,7 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Run Forge tests
run: export FOUNDRY_PROFILE="via-ir" && pnpm test
run: pnpm test
env:
FOUNDRY_PROFILE: ci
RPC_84532: https://sepolia.base.org
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ temp

# dependencies
node_modules/
.pnpm-store/
/lib/

# env
Expand Down Expand Up @@ -49,3 +50,5 @@ script/deploy/deploy-logs/precalc/*.log
!script/deploy/deploy-logs/build/.gitkeep
!script/deploy/deploy-logs/precalc/.gitkeep

# Debug scripts
script/debug
3 changes: 2 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node-linker=hoisted
node-linker=hoisted
store-dir=~/.pnpm-store
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @biconomy/mee-contracts
event Module# @biconomy/mee-contracts

## 1.1.0
- MEE K1 Validator 1.1.0
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,5 @@ $ pnpm test
```

### Deployments
See [`script/deploy/README.MD`](script/deploy/README.MD) to learn how to deploy the stx contracts to your chain.
- Open any of the `deploy/vx.x.x` baranches
- Read `script/deploy/README.MD` to learn how to deploy the stx contracts to your chain.
Binary file added audit/2025-11-26-Pashov-security-review.pdf
Binary file not shown.
1 change: 1 addition & 0 deletions contracts/composability/ComposableExecutionLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ library ComposableExecutionLib {
error InvalidOutputParamFetcherType();
error InvalidConstraintType();
error InvalidSetOfInputParams(string message);
error ComposableExecutionFailed();

// Process the input parameters and return the composed calldata
function processInputs(
Expand Down
2 changes: 1 addition & 1 deletion contracts/composability/ComposableStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ contract ComposableStorage {
function getNamespace(address account, address _caller) public pure returns (bytes32 result) {
assembly {
mstore(0x00, account)
mstore(0x14, _caller)
mstore(0x20, shl(96, _caller))
result := keccak256(0x0c, 0x28)
}
}
Expand Down
10 changes: 10 additions & 0 deletions contracts/interfaces/nexus/INexusEventsAndErrors.sol
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,14 @@ interface INexusEventsAndErrors {

/// @notice Error thrown when the provided signature is invalid.
error InvalidSignature();

/// @notice Thrown when there is an attempt to remove the last validator.
error CanNotRemoveLastValidator();

/// @notice Error thrown when the `r` component of the PREP signature restores as invalid.
error InvalidPREP();

/// @notice Event emitted when a PREP is initialized.
/// @param r The `r` component of the PREP signature.
event PREPInitialized(bytes32 r);
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,13 @@ interface IModuleManagerEventsAndErrors {

/// @notice Error thrown when the default validator is already installed.
error DefaultValidatorAlreadyInstalled();

/// @notice Error thrown when the validator is not installed.
error ValidatorNotInstalled();

/// @notice Error thrown when the enable mode signature is invalid.
error EnableModeSigError();

/// @notice Error thrown when a fallback handler is not installed for a given selector.
error MissingFallbackHandler(bytes4 selector);
}
4 changes: 2 additions & 2 deletions contracts/lib/stx-validator/HashLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ library HashLib {
itemIndex := calldataload(add(packedSignatureData.offset, 0x20))
let u := calldataload(add(packedSignatureData.offset, 0x40)) // local offset of the array of hashes
let s := add(packedSignatureData.offset, u) // global offset of the array of hashes
itemHashes.offset := add(s, 0x20) // account for 20 bytes length
itemHashes.offset := add(s, 0x20) // account for 32 bytes length
itemHashes.length := calldataload(s) // get the length
u := calldataload(add(packedSignatureData.offset, sub(STATIC_HEAD_LENGTH, 0x20))) // load local offset of
// the
// signature
s := add(packedSignatureData.offset, u) // global offset of the signature
signature.offset := add(s, 0x20) // account for 20 bytes length
signature.offset := add(s, 0x20) // account for 32 bytes length
signature.length := calldataload(s) // get the length
}
}
Expand Down
2 changes: 2 additions & 0 deletions contracts/lib/util/EcdsaHelperLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ library EcdsaHelperLib {
mstore(add(ptr, 0x02), domainSeparator)
mstore(add(ptr, 0x22), structHash)
digest := keccak256(ptr, 0x42)
// restore free memory ptr
mstore(0x40, add(ptr, 0x42))
}
}
}
2 changes: 2 additions & 0 deletions contracts/nexus/Nexus.sol
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,8 @@ contract Nexus is INexus, BaseAccount, ExecutionHelper, ModuleManager, UUPSUpgra
let ptr := mload(0x40)
calldatacopy(ptr, initData.offset, initData.length)
initDataHash := keccak256(ptr, initData.length)
// restore free memory ptr
mstore(0x40, add(ptr, initData.length))
}
// Make sure the account has not been already initialized
// Means relay can not re-initialize the account
Expand Down
2 changes: 2 additions & 0 deletions contracts/nexus/base/ModuleManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,8 @@ abstract contract ModuleManager is Storage, EIP712, IModuleManager {

// Hash the entire struct
structHash := keccak256(ptr, 0xa0)
// restore free memory ptr
mstore(0x40, add(add(ptr, 0xa0), initData.length))
}
return structHash;
}
Expand Down
2 changes: 2 additions & 0 deletions contracts/node-pm/NodePaymasterFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ contract NodePaymasterFactory {
mstore(add(ptr, 0x15), index)
mstore(add(ptr, 0x35), initCodeHash)
predictedAddress := keccak256(ptr, 0x55)
// restore free memory ptr
mstore(0x40, add(ptr, 0x55))
}
/// forge-lint:disable-next-line(unsafe-typecast)
return payable(address(uint160(predictedAddress)));
Expand Down
3 changes: 0 additions & 3 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,6 @@
worldchain = { key = "${ETHERSCAN_API_KEY}", url = "https://api.etherscan.io/api", chain = "480"}
worldchain-sepolia = { key = "${ETHERSCAN_API_KEY}", url = "https://api.etherscan.io/api", chain = "4801"}

# FLUENT
# fluent-testnet = { key = "", url = "", chain = "20994"}

# MONAD
# monad = { key = "", url = "", chain = "143"}
monad-testnet = { key = "${ETHERSCAN_API_KEY}", url = "https://api.etherscan.io/api", chain = "10143"}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stx-contracts",
"version": "2.2.0",
"version": "3.0.0",
"description": "Smart contracts that enable supertransactions on Biconomy's modular execution environment.",
"repository": "github:bcnmy/stx-contracts",
"author": {
Expand Down Expand Up @@ -39,7 +39,7 @@
"dependencies": {
"account-abstraction": "eth-infinitism/account-abstraction#v0.7.0",
"@erc7579/enumerablemap4337": "erc7579/enumerablemap",
"@erc7579/implementation": "erc7579/erc7579-implementation#v0.0.2",
"@erc7579/implementation": "github:erc7579/erc7579-implementation",
"forge-std": "foundry-rs/forge-std#v1.11.0",
"solady": "vectorized/solady#v0.1.26",
"solidity-bytes-utils": "GNSPS/solidity-bytes-utils#v0.8.4",
Expand Down
Loading
Loading