-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* NonceUtils initial commit * Add SessionUtils * Add read gap nonce hook * Fix error names and add session tests * Add comments to SessionUtils * Patch lazy octopus require main modolue upgradable * Deploy session utils script * Deploy contract on networks * Commit factory build * Push Solidity version to 0.8.14 * Remove visivility of constructors * Implement native gapNonce and noNonce * Adapt tests to updated hardhat * Fix benchmark * Fix test coverage * Test special nonce types * Add tests for special nonce types * Replace string errors with type errors * Reduce gas costs using unchecked * Extend ModuleAuthUpgradable for ModuleIgnoreAuthUpgradable * Extend ModuleCalls for ModuleIgnoreNonceCalls * Compute subdigest during signature validation * Add alternative signature encoding schemas * Add support for signatures without chainId * Better signature dispatcher * Decode signatures without memory copy * Fix coverage tests * Update ts-node * Alternative signature dispatcher * Implement updateImageHash for ModuleAuthFixed * Fix benchmark runner * Recover signatures prefixed with lazy octops transactions * Fix lazy octopus prefixed signatures subdigest * Simplify tests * Remove unused contracts * Simplify repo and uncommit artifacts * wip chained signatures * better chained signatures * Cleanup libbytes and remove out of bounds checks * Fix github actions * Sequence merkle signatures (#146) * initial implementation recursive merkle signatures * Implement merkle signature encoding and decoding * Use merkle and legacy encoding, given size of config * Better benchmarker report * Optimize hash tree nodes * Fix new compiler warnings * Fix old compiler warnings * Optimize and simplify signature reading * Fix test to avoid generating wallets without signers * v2 - foundry changes (#147) * Remove subDigest from ModuleAuth * Remove unused LibBytes methods * Add foundry tests * Add foundry tests for utils * Add Foundry tests for SequenceBaseSig * Add SequenceDynamicSig tests * SequenceChainedSig tests and fixes * Add SubModuleNonceTest tests * Implementation and calls tests * Add more long array tests * Foundry tests * Fix implementation foundry test * ModuleCalls gas golfing * Keep transactions in calldata * Reduce runs github ci * Push to Solidity 0.8.16 * V2 - better signatures (#148) * Add ModuleExtraAuth * Foundry tests for module extra auth * Add ModuleStaticAuth module * Add ModuleStaticAuth foundry tests * Simplify ModuleExtraAuth * Add ModuleStaticMerkleAuth module * Bound chainId and heavy tests * Bound big foundry test * Move static subdigest signing to imageHash * Implement EIP-5719 (#149) * V2 better signatures (#150) * Add ModuleExtraAuth * Foundry tests for module extra auth * Add ModuleStaticAuth module * Add ModuleStaticAuth foundry tests * Simplify ModuleExtraAuth * Add ModuleStaticMerkleAuth module * Bound chainId and heavy tests * Bound big foundry test * Move static subdigest signing to imageHash * Add base EIP-4337 implementation (#151) * Push Solidity to 0.8.17 * V2 simplify (#152) * Remove EIP-4337 support * Remove alternative nonce types * V2 - 3 bytes size for signatures (#153) * Add readUint24 utility function * Use uint24 for chained signature size * Use 3 bytes for dynamic signature * Use 3 bytes for signature branchs * LibString * GuestModule * MainModule * SequenceBaseSig * SequenceNoChainIdSig * thershold -> threshold * Amend SignatureValidator comments * minor v2 changes (#157) * GuestModule: DelegateCallNotAllowed() -> DelegateCallNotAllowed(uint256 _index) * NotEnoughGas: add transaction index * ModuleStaticAuth: check static digests first * reuse SubModuleNonce constants * Integrate checkpoint into imagehash (#154) * Embed checkpoint in imageHash * Fix setImplementation match wallet test * Fix checkpoint order on tests * thershold -> threshold Co-authored-by: William Hua <[email protected]> * Minor renames (#158) * imagehash -> image hash * typehash -> type hash * sub digest -> subdigest * leaf -> node * compare directly * whitespace * developpers -> developers * joinAddrAndWeight -> leafForAddressAndWeight * ImageHashNode | ConfigLeaf -> ConfigTopology * fix unnecessary casts * iddle -> idle * Converter -> Convertor * mainmodule -> main module * fix incorrect comments * V2 nested configs (#155) * V2 - convenience Auth + IPFS (#159) * Implement nested signature part * Fix foundry test for invalid sig type * Add tests for nested wallet configs * Add tests for unique leafs * Add ipfs + imageHash convenience method * Update hardhat * deploy contracts using EIP-2470 * Delete unused contract * Use node v18 for ci * Move v1 audits to v1 folder * Add onlyDelegatecall module * Fix comments * Remove redundant static auth * Foundry test fixes * Update outdated arcadeum comments * Better Tx executed events * Deploy new version * Fix type GuestModule comment * Update to Solidity 0.8.18 * erc-165 tests: remove duplicate IModuleHooks, add IModuleAuth (#165) * Comments and formatting * Add docs for ModuleAuth * MainModuleGasEstimation: simulateExecute (#167) * V2 - Consensys audit fixes (#168) * Fix right padded hooks selector issue * Fix multicall blockNumber wrong value * Revert isValidSignature if wrong signature length * Emit events when changing hooks * Revert if factory failed to deploy wallet * Remove unused imports and fix solhint * Implement ERC165 missing modules * Remove duplicated decodeNonce code * Move gas-estimation modules to subdir * Remove outdated experimental pragma * Fix foundry test * Revert contract creation if deploy failed * Deploy new contracts on some chains * Deploy Sequence v2 contracts * fix: requireNonExpired inclusion (#170) * Hooks (#169) * Hook implements IERC223Receiver * Add IERC777Receiver * Test stability (#171) * Bump forge deps * Improve test stability * Fix foundry test edge cases * Add v2 audit reports --------- Co-authored-by: William Hua <[email protected]> Co-authored-by: Ignacio Mazzara <[email protected]> Co-authored-by: Michael Standen <[email protected]>
- Loading branch information
1 parent
38e0719
commit 4683828
Showing
508 changed files
with
26,497 additions
and
46,364 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
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
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,3 @@ | ||
[submodule "lib/forge-std"] | ||
path = lib/forge-std | ||
url = https://github.com/foundry-rs/forge-std |
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
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
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
2 changes: 1 addition & 1 deletion
2
src/contracts/interfaces/IERC1271Wallet.sol → contracts/interfaces/IERC1271Wallet.sol
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
2 changes: 1 addition & 1 deletion
2
...interfaces/receivers/IERC1155Receiver.sol → ...interfaces/receivers/IERC1155Receiver.sol
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
2 changes: 1 addition & 1 deletion
2
.../interfaces/receivers/IERC223Receiver.sol → .../interfaces/receivers/IERC223Receiver.sol
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
2 changes: 1 addition & 1 deletion
2
.../interfaces/receivers/IERC721Receiver.sol → .../interfaces/receivers/IERC721Receiver.sol
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
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,6 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity 0.8.18; | ||
|
||
interface IERC777Receiver { | ||
function tokensReceived(address, address, address, uint256, bytes calldata, bytes calldata) external; | ||
} |
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,9 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity 0.8.18; | ||
|
||
|
||
contract AlwaysRevertMock { | ||
fallback() external payable { | ||
revert("AlwaysRevertMock#fallback: ALWAYS_REVERT"); | ||
} | ||
} |
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
2 changes: 1 addition & 1 deletion
2
src/contracts/mocks/DelegateCallMock.sol → contracts/mocks/DelegateCallMock.sol
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
2 changes: 1 addition & 1 deletion
2
src/contracts/mocks/ERC165CheckerMock.sol → contracts/mocks/ERC165CheckerMock.sol
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
2 changes: 1 addition & 1 deletion
2
src/contracts/mocks/GasBurnerMock.sol → contracts/mocks/GasBurnerMock.sol
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity 0.7.6; | ||
pragma solidity 0.8.18; | ||
|
||
|
||
contract GasBurnerMock { | ||
|
2 changes: 1 addition & 1 deletion
2
src/contracts/mocks/HookCallerMock.sol → contracts/mocks/HookCallerMock.sol
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
2 changes: 1 addition & 1 deletion
2
src/contracts/mocks/HookMock.sol → contracts/mocks/HookMock.sol
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity 0.7.6; | ||
pragma solidity 0.8.18; | ||
|
||
|
||
contract HookMock { | ||
|
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 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity 0.8.18; | ||
|
||
import "../utils/LibBytes.sol"; | ||
|
||
|
||
contract LibBytesImpl { | ||
using LibBytes for bytes; | ||
|
||
function readBytes32( | ||
bytes calldata data, | ||
uint256 index | ||
) external pure returns ( | ||
bytes32 a | ||
) { | ||
return LibBytes.readBytes32(data, index); | ||
} | ||
|
||
function readUint8( | ||
bytes calldata data, | ||
uint256 index | ||
) external pure returns ( | ||
uint8 a | ||
) { | ||
return LibBytes.readUint8(data, index); | ||
} | ||
|
||
function readUint32( | ||
bytes calldata data, | ||
uint256 index | ||
) external pure returns ( | ||
uint32 a | ||
) { | ||
return LibBytes.readUint32(data, index); | ||
} | ||
} |
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,48 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity 0.8.18; | ||
|
||
import "../utils/LibBytesPointer.sol"; | ||
|
||
|
||
contract LibBytesPointerImpl { | ||
using LibBytesPointer for bytes; | ||
|
||
function readFirstUint16( | ||
bytes calldata data | ||
) external pure returns ( | ||
uint16 a, | ||
uint256 newPointer | ||
) { | ||
return LibBytesPointer.readFirstUint16(data); | ||
} | ||
|
||
function readUint16( | ||
bytes calldata data, | ||
uint256 index | ||
) external pure returns ( | ||
uint16 a, | ||
uint256 newPointer | ||
) { | ||
return LibBytesPointer.readUint16(data, index); | ||
} | ||
|
||
function readUint24( | ||
bytes calldata data, | ||
uint256 index | ||
) external pure returns ( | ||
uint24 a, | ||
uint256 newPointer | ||
) { | ||
return LibBytesPointer.readUint24(data, index); | ||
} | ||
|
||
function readUint64( | ||
bytes calldata data, | ||
uint256 index | ||
) external pure returns ( | ||
uint64 a, | ||
uint256 newPointer | ||
) { | ||
return LibBytesPointer.readUint64(data, index); | ||
} | ||
} |
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,25 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity 0.8.18; | ||
|
||
import "../utils/LibString.sol"; | ||
|
||
|
||
contract LibStringImp { | ||
using LibString for string; | ||
|
||
function prefixBase32(string calldata data) external pure returns (string memory) { | ||
return LibString.prefixBase32(data); | ||
} | ||
|
||
function prefixHexadecimal(string calldata data) external pure returns (string memory) { | ||
return LibString.prefixHexadecimal(data); | ||
} | ||
|
||
function bytesToBase32(bytes calldata data) external pure returns (string memory) { | ||
return LibString.bytesToBase32(data); | ||
} | ||
|
||
function bytesToHexadecimal(bytes calldata data) external pure returns (string memory) { | ||
return LibString.bytesToHexadecimal(data); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
src/contracts/mocks/ModuleMock.sol → contracts/mocks/ModuleMock.sol
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity 0.7.6; | ||
pragma solidity 0.8.18; | ||
|
||
|
||
contract ModuleMock { | ||
|
Oops, something went wrong.