Simple extendable smart account implementations (Smarter Accounts
or NANI
). v1.2.3
Built with the Foundry testing suite and Solady solidity optimizations, this codebase demonstrates contemporary and efficient account abstractions through a representative implementation (Account
, v1.2.3
) and factory that deploys related ERC1967
minimal proxies with UUPS
upgradeability. As such, Accounts
users can upgrade into any account implementation at any time from their NANI wallet, such as Kernel
or Coinbase, while the latest version of NANI
Accounts
will be maintained and deployed here.
All Accounts
support the following standards: ERC173
, EIP712
, ERC1271
, ERC1822
, ERC1967
, ERC2098
, ERC4337
, ERC5267
, ERC6492
, ERC7582
Currently, Accounts
is the most optimized smart account implementation available to the public with a companion user interface on nani.ooo
. Incentives are designed for participation in testing and development. Governance of the Accounts
implementation and interface models is also introduced in v1.2.3
.
Run: curl -L https://foundry.paradigm.xyz | bash && source ~/.bashrc && foundryup
Build the foundry project with forge build
. Run contract tests with forge test
. Measure gas fees with forge snapshot
. Format code with forge fmt
.
v1.2.3
Chain | Factory | Implementation | Commit |
---|---|---|---|
Ethereum, Arbitrum / Nova, Optimism, Base, Zora, Blast, Gnosis, Polygon / zkEVM, BNB, Avalanche & testnets | 0x0000000000009f1E546FC4A8F68eB98031846cb8 | 0x0000000000002259DC557B2D35A3Bbbf3A70eB75 | ffe035982fc03887895bafde845ad17490063cdc |
Utilizes ERC7582
minimal modular account interface.
JointValidator: 0x000000000000D3D2b2980A7BC509018E4d88e947
Add joint owners to your smart account with full concurrent rights
RecoveryValidator: 0x000000000000a78fB292191473E51Dd34700c43D
Add backups to your smart account (can set time delay and m/n scheme)
PaymentValidator: 0x00000000000032CD4FAE890F90e61e6864e44aa7
Add payment plans and delegate token transfer permissions (e.g., invoice agents)
PermitValidator: 0x000000000000ab6c9FF3ed50AC4BAF2a20890835
Add arbitrary permissions within the Permit structure (e.g., voting and swapping rights)
RemoteValidator: 0x0000000000159aAFCA7067005E28665a28B5B4cf
Add simple scheduled transactions sequence (e.g., DCA) or other 'remote' agent operations
token-weighted ownership (simulates multisig m/n and DAO voting)
token-bound ownership (NFTs are owners, i.e., "my Milady is my key")
hard checks for smart accounts (i.e., "can't spend more than 0.1 ETH")
magic paymaster: stake ETH and use Lido yield to sponsor transactions
fund smart accounts and give moloch-style refunds to contributors
translate text commands into onchain calldata (text-to-tx)
check community models and verified function calls (agent helper)
onchain knowledge base with DAO governance of topics (embeddings)
incentivized testing and model training; community AI alignment
- Points: 0x00000000007f7396897bf90B00e96EaE4B71d055
- Token: 0x000000000000C6A645b0E51C9eCAA4CA580Ed8e8
- Votes: 0x00000000F7000067ED10710A342eC0D09a734Bee
- DAO: 0xDa000000000000d2885F108500803dfBAaB2f2aA
lib
├─ forge-std — https://github.com/foundry-rs/forge-std
├─ solady — https://github.com/vectorized/solady
src
├─ Account — Account Contract
├─ Accounts - Factory Contract
test
└─ Account.t - Test Contract
These smart contracts and testing suite are being provided as is. No guarantee, representation or warranty is being made, express or implied, as to the safety or correctness of anything provided herein or through related user interfaces. This repository and related code have not been audited and as such there can be no assurance anything will work as intended, and users may experience delays, failures, errors, omissions, loss of transmitted information or loss of funds. The creators are not liable for any of the foregoing. Users should proceed with caution and use at their own risk.
See LICENSE for more details.