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

docs: update README for 0.8.0 #210

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
50 changes: 42 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,53 @@
# ERC-6900 Reference Implementation

Reference implementation for [ERC-6900](https://eips.ethereum.org/EIPS/eip-6900).
[![tg_badge]][tg_link]

The implementation includes an upgradable modular account with 5 modules (`SingleSignerValidationModule`, `TokenReceiverModule`, `AllowlistModule`, `ERC20TokenLimitModule`, and `NativeTokenLimitModule`). It is compliant with the latest version of ERC-6900.
[tg_badge]: https://img.shields.io/endpoint?color=neon&logo=telegram&label=chat&url=https://mogyo.ro/quart-apis/tgmembercount?chat_id=modular_account_standards
[tg_link]: https://t.me/modular_account_standards

## Important callouts
Reference implementation for [ERC-6900](https://eips.ethereum.org/EIPS/eip-6900).

- **Not audited and SHOULD NOT be used in production**.
- Not optimized in both deployments and execution. We’ve explicitly removed some optimizations in favor of clarity.
This repository contains the contracts below which are compliant with the latest version of ERC-6900. They are not optimized in both deployments and execution. We’ve explicitly removed some optimizations in favor of clarity.

> [!IMPORTANT]
> Unless otherwise stated, these contracts are not audited and SHOULD NOT be used in production.

- Reference account implementations
- [ReferenceModularAccount](src/account/ReferenceModularAccount.sol): A simple ERC-6900 compatible account.
- [SemiModularAccount](src/account/SemiModularAccount.sol): An ERC-6900 account that includes a fallback validation mechanism.
- Factory
- [AccountFactory](src/account/AccountFactory.sol): Deploys both account types.
- ERC-6900 interfaces: [src/interfaces](src/interfaces/)
- Helpers
- [CollectReturnData](src/helpers/CollectReturnData.sol)
- [Constants](src/helpers/Constants.sol): ✅ Audited ([reports](https://github.com/alchemyplatform/modular-account/tree/develop/audits))
- [EmptyCalldataSlice](src/helpers/EmptyCalldataSlice.sol): ✅ Audited ([reports](https://github.com/alchemyplatform/modular-account/tree/develop/audits))
- [ValidationResHelpers](src/helpers/ValidationResHelpers.sol)
- Libraries
- [HookConfigLib](src/libraries/HookConfigLib.sol): ✅ Audited ([reports](https://github.com/alchemyplatform/modular-account/tree/develop/audits))
- [KnownSelectorsLib](src/libraries/KnownSelectorsLib.sol)
- [ModuleEntityLib](src/libraries/ModuleEntityLib.sol): ✅ Audited ([reports](https://github.com/alchemyplatform/modular-account/tree/develop/audits))
- [ModuleStorageLib](src/libraries/ModuleStorageLib.sol)
- [SparseCalldataSegmentLib](src/libraries/SparseCalldataSegmentLib.sol): ✅ Audited ([reports](https://github.com/alchemyplatform/modular-account/tree/develop/audits))
- [ValidationConfigLib](src/libraries/ValidationConfigLib.sol): ✅ Audited ([reports](https://github.com/alchemyplatform/modular-account/tree/develop/audits))
- ERC-6900 compatible modules
- Validation modules:
- [SingleSignerValidationModule](src/modules/validation/SingleSignerValidationModule.sol): Enables validation for a single signer (EOA or contract).
- Permission-enforcing hook modules:
- [AllowlistModule](src/modules/permissions/AllowlistModule.sol): Enforces address/selector allowlists.
- [ERC20TokenLimitModule](src/modules/permissions/ERC20TokenLimitModule.sol): Enforces ERC-20 spend limits.
- [NativeTokenLimitModule](src/modules/permissions/NativeTokenLimitModule.sol): Enforces native token spend limits.
- Execution modules:
- [TokenReceiverModule](src/modules/TokenReceiverModule.sol): Allows the account to receive ERC-721 and ERC-1155 tokens.
- Module utilities
- [ModuleEIP712](src/modules/ModuleEIP712.sol): ✅ Audited ([reports](https://github.com/alchemyplatform/modular-account/tree/develop/audits))
- [ReplaySafeWrapper](src/modules/ReplaySafeWrapper.sol): ✅ Audited ([reports](https://github.com/alchemyplatform/modular-account/tree/develop/audits))

## Development

Anyone is welcome to submit feedback and/or PRs to improve code.
Anyone is welcome to submit feedback and/or PRs to improve the code. For standard improvement proposals and discussions, join us at https://github.com/erc6900/resources/issues or [Ethereum Magicians](https://ethereum-magicians.org/t/erc-6900-modular-smart-contract-accounts-and-plugins/13885).

### Testing
## Testing

The default Foundry profile can be used to compile (without IR) and test the entire project. The default profile should be used when generating coverage and debugging.

Expand All @@ -29,7 +63,7 @@ FOUNDRY_PROFILE=optimized-build forge build
FOUNDRY_PROFILE=optimized-test forge test -vvv
```

## Integration testing
### Integration testing

The reference implementation provides a sample factory and deploy script for the factory, account implementation, and the demo validation module `SingleSignerValidationModule`. This is not audited nor intended for production use. Limitations set by the GPLv3 license apply.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@erc6900/reference-implementation",
"version": "0.8.0-rc.7",
"version": "0.8.0",
"devDependencies": {
"pnpm": "^8.7.5",
"solhint": "^3.6.2"
Expand Down
Loading
Loading