Skip to content

NaniDAO/accounts

Repository files navigation

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.

Getting Started

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.

Deployments

v1.2.3

Chain Factory Implementation Commit
Ethereum, Arbitrum / Nova, Optimism, Base, Zora, Blast, Gnosis, Polygon / zkEVM, BNB, Avalanche & testnets 0x0000000000009f1E546FC4A8F68eB98031846cb8 0x0000000000002259DC557B2D35A3Bbbf3A70eB75 ffe035982fc03887895bafde845ad17490063cdc

Set hard 'rug' limits for ETH txs

Utilizes ERC7582 minimal modular account interface.

Add joint owners to your smart account with full concurrent rights

Add backups to your smart account (can set time delay and m/n scheme)

Add payment plans and delegate token transfer permissions (e.g., invoice agents)

Add arbitrary permissions within the Permit structure (e.g., voting and swapping rights)

Add simple scheduled transactions sequence (e.g., DCA) or other 'remote' agent operations

Plugin Owners:

token-weighted ownership (simulates multisig m/n and DAO voting)

token-bound ownership (NFTs are owners, i.e., "my Milady is my key")

Plugin Guards:

hard checks for smart accounts (i.e., "can't spend more than 0.1 ETH")

Paymaster:

magic paymaster: stake ETH and use DeFi yield to sponsor transactions

Blueprint

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

Disclaimer

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.

License

See LICENSE for more details.