From 79021a392cf53008c74a0d193c25855c44959cdb Mon Sep 17 00:00:00 2001 From: Sanjay Sirangi Date: Sun, 15 Sep 2024 05:58:19 +0530 Subject: [PATCH] =?UTF-8?q?=E2=9C=8D=F0=9F=8F=BBadd:=20added=20diagram=20t?= =?UTF-8?q?o=20Diamond.sol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contracts/Diamond.sol | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/contracts/Diamond.sol b/contracts/Diamond.sol index a756817..277fc03 100644 --- a/contracts/Diamond.sol +++ b/contracts/Diamond.sol @@ -3,6 +3,25 @@ pragma solidity ^0.8.0; import { IDiamond } from "./interfaces/IDiamond.sol"; +/* + + +------------------------------------+ + | Diamond.sol | + +------------------------------------+ + /|\ + | msg.sig (function selector) + | + +---------+--------------------+-------------------------+ + | | | + +----------------------+ +-------------------+ +--------------------+ + | OwnershipFacet | | TokenFacet | | OtherFacet (future) | + +----------------------+ +-------------------+ +--------------------+ + | - transferOwnership()| | - mint() | | - someOtherFunc() | + | - getOwner() | | - transfer() | | - etc... | + +-----------------------+ | - balanceOf() | +---------------------+ + +-------------------+ +*/ + contract Diamond { // A mapping to store which facet handles which function selectors mapping(bytes4 => address) public facets;