# facets wiki
2 weeks
40
40
80*3 = 240
100*240=24,000
80*2 = 160
100*160=16,000
## Milestones
---
### Milestone 1 - Facets.wiki Web App
---
The objective is to implement and deploy the basic functionality of the diamond pattern inspector web app with database, frontend, backend rewritten in rust.
duration: 2 weeks
| Start | End | hours | cost |
| -------- | -------- | -------- | -------- |
| May 8, 2023 | May 22, 2023 | 240 | 15,000 USD |
## Developer 1 - Back end
Gian Marco Alarcon
[linkedin](www.linkedin.com)
### Ticket 1. Backend Design
| Time | cost per hour | cost |
| -------- | -------- | -------- |
| 24 hours | 100 USD | 2,400 USD |
At this stage : a new backend design will be made, targeting production, a better structure for the code and an out-of-the box code runnable backend.
#### Scope :
- Use [draw.io](http://draw.io) to create the new structure of the backend
- make a plan of development of the backend in rust
- clean up the code in the repo
- have a clear README of the backend
### Ticket 2 Backend Development
| Time | cost per hour | cost |
| -------- | -------- | -------- |
| 56 hours | 100 USD | 5,600 USD |
##### Summary:
At this stage : the new server with its design will be rewritten in rust. a github workflow will be setup for further testing and development and it will be online.
#### Scope :
- a fully working backend in rust
- a server deployed online
- a server that meets the design from phase 1
- a clear README and out-of-the-box setup for the repo
#### Notes:
- all functionalities match existing facets.wiki page
## Developer 2: Smart Contracts
Carlos Ramos
[linkedin](www.linkedin.com)
### Ticket 3: Smart Contarcts Improvement / Clean up
| Time | cost per hour | cost |
| -------- | -------- | -------- |
| 40 hours | 100 USD | 4,000 USD |
#### Summary:
At this stage : a new smart contract repo template for diamonds will be created with a clear README and setup instructions.
#### Scope :
- clean up previous code of smart contracts repo
- create a clean project for basic diamond development and deployment using hardhat and foundry
### Ticket 4: Research
| Time | cost per hour | cost |
| -------- | -------- | -------- |
| 40 hours | 100 USD | 4,000 USD |
#### Summary:
At this stage, different research will be conducted to see whether some features can be added into [facets.wiki](http://facets.wiki) , the features are listed below
#### Scope :
- Get storage slots and variables from diamonds
- combining ABIs from facets
- being able to see the storage data of a diamond just like in etherscan
- Allow “forced edits” of eternal storage by admin(s)
## Developer 3: Web app
Konrad Gnat
[linkedin](www.linkedin.com)
### Ticket 5: Front end design improvements
| Time | cost per hour | cost |
| -------- | -------- | -------- |
| 16 hours | 100 USD | 1,600 USD |
#### Summary:
There will be a wide research and design brainstorming on how can we improve the app looks. There will be a out of the box frontend and good instructions on how to run it
#### Scope :
- create new figma design
- light + dark mode
- create a new logo
- better color schemes
- research on better design patterns
- research on better UX
### Ticket 6: Front end development
| Time | cost per hour | cost |
| -------- | -------- | -------- |
| 64 hours | 100 USD | 6,400 USD |
#### Summary:
At this stage : the UI will be cleaned up, some components will be restructured for easier development in the future. a workflow will be implemented in github for further PRs and Issues.
#### Scope :
- have a fully working frontend out of the box
- have a clear README on how to start the frontend
- have a github workflow check for future versions
- have a frontend that matches our new design
- have stable version thats deployed and available online
---
### Milestone 2 - CLI
---
The objective is to generate a CLI that will set up a foundry / hardhat project for developers to write their own facets and deploy without worrying about the setup
duration: 2 weeks
Developer 1
Smart Contracts
Carlos
Developer 2
Back end Rust
Gian
Developer 3
Front end React
Konrad
Acceptance Criteria:
- feature: search facets
- upload facet from address
- support for multiple networks
- polygon, mainnet, arbitrum, optimisim, avalanche
-
---
### Milestone 3
duration: 2 weeks
Developer 1
Smart Contracts
Carlos
Developer 2
Back end Rust
Gian
Developer 3
Front end React
Konrad
---
## Other Hackathon Ideas
1. Account Abstraction Chrome Extension Wallet
## strategy
1. Build out facets.wiki
2. after 1-2 months bulid account abstraction features, using the existing work as foundation (CLI, web app tool)
## features list
- add facet functions, after aproval of more than one admin with a multi sig
- DAO approving adding facets through voting mechanism, exacuted on chain after vote
- deploy from the app
- multiple network support
- load diamond - be able to deploy diamond with parameters, add and remove facets *key feature*
- empty, with parameters
- deploy from the app
- tells youwhere it's at, address
- add facets from db and interact with them
- in any network, testnet, mainnet
- download ABI is important *key feature*
- combine ABIs from different facets
- one ABI file for whole diamond system
- remove one facet and ABI is updated
- using facets from DB, we have the ABI's there
- we combine all ABIs from user
- we delete/add functions with search, it's a json file
- new design, light + dark mode
- research new design - 6 hours 0.5 days
- landing page + home page, dashboard, upload page, facets search + list page, logo, color scheme, theme elements
- create figma - 8 hours 1 days
- to be used as reference
- reusable themes, components, fonts, color pallete
- update web app front end - 12 hours 1.5 days
- create reusable components
## meeting with Leon
- consider simple how to tutorial
- to tutorial of creating a new facet
- tutorial to update a facet
- template for starter package
- letting users deploy empty diamonds and facets
- check storage, add/remove functions, do transactions
- look at moralis, thirdweb, ipfs website
- they have a lot of documentation, visuals
- wiki part can emphasise that
- education in general
- missing in the space, where we can fit in
- put the repo in game 7
- more high level, make it a wiki
- focus on education
- CLI - talk to users, get user feedback
- approach: throw out content aroudn education, get a feel for what people need, build around that
- ask what people are building
# notes
1. eternal storage
- displays not on etherscan
- only displays abi
- need to combine ABI from different facets
- and using ethers provider getStorageAt
- pass contract storage and index
- can calculate all the ABI's and facets
- you can see the data in the contract
2. be able to modify the admin of the contract
- if facet is modifying one parameter
- addmin can call a function can reset this parameter
- eternal storage are using bytes to reference position on storage of contract
- you can set a function that can set bytes on some parameters on
- something like setBytes
- pass index of facets where it's located
- pass bytes and pass value
- storage related to that facets, the value is going to be edited
3. CLI
- when you do npx hardhat, use typescript, other predefined facets
- choose basic diamond, basic facet, pre add some facets, gives out of the box hardhat or foundary folder
- they (game 7) have CLI for summon repository
- in hackathons - prompts user the CLI or update it and improve
- 'create your own facet using our own CLI' - our prompt
5. have a hardhat template
- currently we have POC
- clone from GitHub and deploy and add facets
- make it very intuitive
6. have a foundary template
7. on front end side - improvements
- we have history of changes
- add revert function
- server side:
- can rewrite server in RUST
8. Long term
- account abstraction
- migrate to other ecosystem, StarkNet
1. eternal storage
- displays not on etherscan
- only displays abi
- need to combine ABI from different facets
- and using ethers provider getStorageAt
- pass contract storage and index
- can calculate all the ABI's and facets
- you can see the data in the contract
2. be able to modify the admin of the contract
- if facet is modifying one parameter
- addmin can call a function can reset this parameter
- eternal storage are using bytes to reference position on storage of contract
- you can set a function that can set bytes on some parameters on
- something like setBytes
- pass index of facets where it's located
- pass bytes and pass value
- storage related to that facets, the value is going to be edited
3. CLI
- when you do npx hardhat, use typescript, other predefined facets
- choose basic diamond, basic facet, pre add some facets, gives out of the box hardhat or foundary folder
- they (game 7) have CLI for summon repository
- in hackathons - prompts user the CLI or update it and improve
- 'create your own facet using our own CLI' - our prompt
5. have a hardhat template
- currently we have POC
- clone from GitHub and deploy and add facets
- make it very intuitive
6. have a foundary template
7. on front end side - improvements
- we have history of changes
- add revert function
- server side:
- can rewrite server in RUST
8. Long term
- account abstraction
- migrate to other ecosystem, StarkNet