Skip to content

NaniDAO/accounts

Repository files navigation

Simple extendable smart account implementations (Smarter Accounts or NANI).

Built with the Foundry testing suite and Solady solidity optimizations, this codebase demonstrates contemporary and efficient account abstractions through a representative implementation (Account, v1.1.1) 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.

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.1.1

Chain Factory Implementation Commit
Ethereum, Arbitrum / Nova, Optimism, Base, Zora, Blast, Gnosis, Polygon / zkEVM, BNB, Avalanche & testnets 0x0000000000008dd2574908774527FD6DA397d75B 0x0000000000009909E101c0DAa5337332b01d38c6 62e6273586d89aaf1fbab7524d5d1d692b2b6b69

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)

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 Lido yield to sponsor transactions

Finance:

fund smart accounts and give moloch-style refunds to contributors

Agency:

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

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.