|
| 1 | +# ChatterPay Contracts Overview |
| 2 | + |
| 3 | +## Summary |
| 4 | + |
| 5 | +These smart contracts collectively create a robust ecosystem for wallet management, token price feeds, and NFT handling. They provide flexibility, upgradeability, and security by implementing key features like account abstraction, secure wallet deployment, NFT minting, and real-time price data management. The system allows for efficient wallet creation, management of user operations, and the minting of original and copy NFTs, all while ensuring that transaction fees and external data feeds are properly handled. |
| 6 | + |
| 7 | +## Contracts List: |
| 8 | + |
| 9 | +1. [**ChatterPay.sol**](../../src/L2/ChatterPay.sol) |
| 10 | +Core wallet contract for ChatterPay, handling user operations, token transfers, and transaction fee management. |
| 11 | + |
| 12 | +2. [**ChatterPayPaymaster.sol**](../../src/L2/ChatterPayPaymaster.sol) |
| 13 | +Fee manager contract that ensures transaction fees are paid on behalf of users, supporting the account abstraction model of ChatterPay. |
| 14 | + |
| 15 | +3. [**ChatterPayNFT.sol**](../../src/L2/ChatterPayNFT.sol) |
| 16 | +Manages the minting of original NFTs and their associated copies, with controls for copy limits and owner management. |
| 17 | + |
| 18 | +4. [**ChatterPayVault.sol**](../../src/L2/ChatterPayNFT.sol) |
| 19 | +Handles secure storage and management of assets within the ChatterPay ecosystem, providing vault services for users. |
| 20 | + |
| 21 | +5. [**ChatterPayWalletFactory.sol**](../../src/L2/ChatterPayWalletFactory.sol) |
| 22 | +A wallet factory contract that creates proxy wallets for users, tracks proxies, and allows for updates to wallet implementations. |
| 23 | + |
| 24 | +6. [**ChatterPayWalletProxy.sol**](../../src/L2/ChatterPayWalletProxy.sol) |
| 25 | +A proxy contract for ChatterPay wallets, allowing for upgradeable wallet functionality using [ERC-1967 Proxy](https://docs.openzeppelin.com/contracts/4.x/api/proxy#ERC1967Proxy), and providing a method to retrieve the current wallet implementation. |
| 26 | + |
| 27 | +7. [**SimpleSwap.sol**](../../src/L2/SimpleSwap.sol) |
| 28 | +Implements a simple token swapping mechanism, allowing users to swap between supported tokens within the ChatterPay ecosystem. |
| 29 | + |
| 30 | +8. [**USDT.sol**](../../src/L2/USDT.sol) |
| 31 | +A contract representing the USDT (Tether) token on Layer 2, enabling stablecoin transactions within the ChatterPay platform. |
| 32 | + |
| 33 | +9. [**WETH.sol**](../../src/L2/WETH.sol) |
| 34 | +A contract for wrapping and unwrapping ETH as WETH (Wrapped Ether), allowing users to interact with ETH as an ERC-20 token in the ChatterPay ecosystem. |
| 35 | + |
| 36 | +10. [**PackedUserOperation.sol**](../../src/L2/utils/PackedUserOperation.sol) |
| 37 | +Defines the structure for user operations, including details like gas limits, fees, and operation signatures, enabling flexible interaction with the wallet system. |
| 38 | + |
| 39 | +11. [**L1Keystore.sol**](../../src/Ethereum/L1Keystore.sol) |
| 40 | +Stores wallet data on Layer 1, managing user accounts, wallet registrations, and key-value storage, with access control for key updates. |
| 41 | + |
| 42 | +12. [**TokensPriceFeeds.sol**](../../src/Ethereum/TokensPriceFeeds.sol) |
| 43 | +Reads and manages token price feeds (ETH/USD, BTC/USD) from external proxy contracts, ensuring the data is up-to-date and valid. |
| 44 | + |
| 45 | + |
| 46 | +Representation of Chatterpay's Smart Contracts Flow: |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | +[Here](./contracts-details.md) you can see a detailed breakdown of the provided smart contracts used for ChatterPay. |
0 commit comments