Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
264 commits
Select commit Hold shift + click to select a range
eed028f
organized CharacterModules and Buttons
OokamiKitsune Sep 28, 2023
57a8eaf
Consolidated NFT components
OokamiKitsune Sep 28, 2023
6567106
Fixed import
OokamiKitsune Sep 28, 2023
faf0b37
Added index file exports to components
OokamiKitsune Oct 3, 2023
b56c39e
added a messy profile page to test export char
tippi-fifestarr Nov 28, 2023
edc0db6
fixed UnrulyPage
tippi-fifestarr Nov 29, 2023
55fec99
Update Readme.md
tippi-fifestarr Nov 30, 2023
069555b
cleaned up the character stats
tippi-fifestarr Dec 1, 2023
04a48b2
Merge pull request #5 from tippi-fifestarr/Cleaned
tippi-fifestarr Dec 1, 2023
7fc3a31
dedragonbornification
tippi-fifestarr Dec 1, 2023
d1d7bbc
alert the prompt
tippi-fifestarr Dec 1, 2023
a2409ba
added Ceptor Club ID
tippi-fifestarr Dec 2, 2023
ab3a161
added quickstart guide
tippi-fifestarr Dec 2, 2023
86144b6
added mailingList to User
alank101 Dec 2, 2023
29258b3
fixed env.sample and updated readme
tippi-fifestarr Dec 2, 2023
26a1b29
update solc version
EmanHerawy Dec 2, 2023
51a2ff4
add dice contract from https://github.com/DnDnDiffusion/contracts/blo…
EmanHerawy Dec 2, 2023
843de27
add ceptor contract and fix compilation issues
EmanHerawy Dec 2, 2023
4dd8fa9
added variables needed into .env.sample
alank101 Dec 2, 2023
d61588e
Add CCID and uploadpage files
airecr Dec 3, 2023
cd2a23e
Adjust upload page
airecr Dec 3, 2023
8cb6d35
Adjust upload page
airecr Dec 3, 2023
e26f05d
Merge pull request #3 from ceptor-club/games-dev
alank101 Dec 3, 2023
d7b589b
Add promtoftheweek FE from repository
Dec 3, 2023
c79f851
Merge pull request #6 from tippi-fifestarr/dedragonbornicfication
tippi-fifestarr Dec 3, 2023
6c26ae8
Merge branch 'tech-dev' of https://github.com/ceptor-club/Ceptor-Tech…
tippi-fifestarr Dec 3, 2023
ece13a0
add Prompt from old contracts
EmanHerawy Dec 4, 2023
3dde193
fix OZ new update
EmanHerawy Dec 4, 2023
8c8e1f2
modified rest call structure and tested image gen
tippi-fifestarr Dec 4, 2023
9c82066
fmt
EmanHerawy Dec 4, 2023
68f4838
add week timestamp
EmanHerawy Dec 4, 2023
5dda5ca
ad mint nft support for POW
EmanHerawy Dec 4, 2023
3c62489
updated readme files with db connections
alank101 Dec 4, 2023
dfa71ca
Add explorer component to PotW page, add polygonzkevm api
Dec 4, 2023
3f8da11
Add countdown
Dec 4, 2023
af2ab4b
fix styling of NFT card popup
Dec 4, 2023
b05cc0d
Add typescript
Dec 4, 2023
8daa575
Add Winner Of the week to top of the page
Dec 4, 2023
049e20b
clean up types and move getting serversideproperties to own file
Dec 4, 2023
e7fc09f
Update README.md
tippi-fifestarr Dec 4, 2023
e7430f4
Add timer contract with basic requirement for timer
EmanHerawy Dec 5, 2023
7928b6d
extend Timer in Dice contract, move ACL logic to Timer and override s…
EmanHerawy Dec 5, 2023
6b390c3
change timer mechanism
EmanHerawy Dec 5, 2023
330604e
add burn timer support
EmanHerawy Dec 5, 2023
611d9fb
set up dice work flow
Dec 5, 2023
3aa485d
Merge branch 'dice-fe' into tech-dev
Dec 5, 2023
56444b5
init deployer script
EmanHerawy Dec 5, 2023
8aa01c5
add deploy script deice, ceptor and prompt contracts
EmanHerawy Dec 5, 2023
3198848
update readme with steps needed to setup and deploy contracts with fo…
EmanHerawy Dec 5, 2023
816256d
deploy to polygonMumbai
EmanHerawy Dec 5, 2023
2f4c2f4
fix dice flow forntend design
Dec 5, 2023
d7ba6ce
fix background for mid part
Dec 5, 2023
50d9e60
fix names
EmanHerawy Dec 6, 2023
e03b05b
add fisrt draft of reward with chainlink function support
EmanHerawy Dec 6, 2023
a907deb
add code doc
EmanHerawy Dec 6, 2023
f67837d
add code doc
EmanHerawy Dec 6, 2023
328c6ce
add cde doc
EmanHerawy Dec 6, 2023
e3fa14e
add contract interaction to free-dice file
Dec 6, 2023
a044855
add contract interaction to buy-dice file
Dec 6, 2023
ac832c7
add pages to navbar
Dec 6, 2023
1a9b525
add burn dice functionality
Dec 6, 2023
17111bb
Merge pull request #5 from ceptor-club/origin/tech-dev/chainlink-func…
EmanHerawy Dec 6, 2023
6ce8d30
added contracts, deleted yarnlock, modded promptGen and improved char…
tippi-fifestarr Dec 7, 2023
bb29334
add small and big bag buttons
Dec 7, 2023
d1aaa2a
fix serverside props rendering
Dec 8, 2023
6a50fa9
move potw to weekly challenge and update styling
Dec 8, 2023
9fde96f
update route and colors
Dec 8, 2023
9c0ea29
add button to change networks
Dec 8, 2023
30d7fdb
add addresses fle for all contract addresses
Dec 8, 2023
6a3b640
add api endpoints
Dec 8, 2023
8814cbc
replace hardcoded values with env variables
Dec 8, 2023
82125dd
Committing changes to frontend/pages/uploadpage.jsx
airecr Dec 8, 2023
a73ca26
Merge branch 'tippi-changes' into Aire_frontend
airecr Dec 8, 2023
7ae128c
add contract addresses deployed on mumbai
EmanHerawy Dec 8, 2023
6873e19
fix styling for NFT card
Dec 8, 2023
c354551
add drafted serverless function
EmanHerawy Dec 8, 2023
79335ef
Add a popup for network options and wallet connect to CCID page
airecr Dec 8, 2023
8a7ae88
updated contracts a little
tippi-fifestarr Dec 8, 2023
f701161
add hardhat support to be able to deploy Reward.sol
EmanHerawy Dec 9, 2023
81cd2ad
add simulate script
EmanHerawy Dec 9, 2023
d7438b0
update source
EmanHerawy Dec 9, 2023
94fe574
let get winner be called with new week prompt
EmanHerawy Dec 9, 2023
2298376
add burnDie page
airecr Dec 9, 2023
069e9bb
deploy to sepolia
EmanHerawy Dec 9, 2023
ccd257a
update reward amount
EmanHerawy Dec 9, 2023
2be35ab
remove w3Modal components
Dec 9, 2023
4b547c8
updated getImages, CCID readme, and added loading progress
tippi-fifestarr Dec 9, 2023
0f96bad
Adjust pages
airecr Dec 9, 2023
631570e
Merge remote-tracking branch 'origin/tech-dev' into tech-CCID
Dec 9, 2023
04740eb
updated readme
tippi-fifestarr Dec 9, 2023
d1a8373
Merge branch 'tech-CCID' of https://github.com/ceptor-club/Ceptor-Tec…
tippi-fifestarr Dec 9, 2023
069901b
Merge pull request #13 from ceptor-club/tech-CCID
GigaHierz Dec 9, 2023
a62b6de
Some changes to burnDie page
airecr Dec 9, 2023
197e5b8
Merge pull request #12 from ceptor-club/origin/tech-dev/chainlink-fun…
EmanHerawy Dec 9, 2023
7a790a4
Update .env
airecr Dec 9, 2023
049a012
Update files
airecr Dec 9, 2023
f5db4e4
Merge tech-dev into aire-frontend
airecr Dec 9, 2023
54ce468
Resolve merge conflict in package.json
airecr Dec 9, 2023
39ddaca
updated smartcontracts
tippi-fifestarr Dec 9, 2023
661b68a
add contract calls
Dec 9, 2023
ee5354d
add contract addresses in sepolia
EmanHerawy Dec 9, 2023
3618e5c
fix smart contract calls
Dec 9, 2023
f69b8ed
Resolve merge conflicts in pages/_app.js
airecr Dec 9, 2023
dd0bd5f
Resolve merge conflicts in styles/globals.css
airecr Dec 9, 2023
e9854b1
not fully tested PriceCheckerFUJI, returns in 18 decimals for player …
tippi-fifestarr Dec 9, 2023
f5bb03b
Merge branch 'tech-dev' of github.com:ceptor-club/Ceptor-Tech into te…
EmanHerawy Dec 9, 2023
d5b373e
fix pragma and incorrect import . comment out code for Undeclared ide…
EmanHerawy Dec 9, 2023
54d1690
added RegisterQuick, it compiles, needs testing
tippi-fifestarr Dec 9, 2023
82e9001
code refactor step 1
EmanHerawy Dec 9, 2023
b2e508b
add all COW submissions
Dec 10, 2023
8bf0f45
ccip receive from 2 chains is supported now
EmanHerawy Dec 10, 2023
0893ce3
fix address for network when undefined
Dec 10, 2023
605be7a
merge registration with price feed support
EmanHerawy Dec 10, 2023
7fc99cc
mint some dice for new player
EmanHerawy Dec 10, 2023
39c19eb
add example avatars
Dec 10, 2023
5fb3c08
add alerts for when the wallet is not connected
Dec 10, 2023
b609a35
add deployment script
EmanHerawy Dec 10, 2023
8c5ac2f
cleanup: move no longer used contract to archive folder
EmanHerawy Dec 10, 2023
a666068
style Nav bar
Dec 10, 2023
2bdd02b
style prompt input for weekly challenge
Dec 10, 2023
fa6ac06
Add generate Button
Dec 10, 2023
f2ba3f9
fix broken logic in ceptor
EmanHerawy Dec 10, 2023
0c3109a
update post deployment script
EmanHerawy Dec 10, 2023
7a64f68
add rainbow wallet connect button and chain button
Dec 10, 2023
41ed886
add read dice stat of user function to burn dice page
Dec 10, 2023
759a78a
input mockdata for list
Dec 10, 2023
2addefe
Update and beautify pages
airecr Dec 10, 2023
01da760
style NFT Modal and add new import structure
Dec 10, 2023
17b0af0
organize imports, remove unused
Dec 10, 2023
d9599b6
fix built errors
Dec 10, 2023
9f82a0c
deploy and verify on sepolia
EmanHerawy Dec 10, 2023
c366432
update addresses in fe
EmanHerawy Dec 10, 2023
f226be3
Merge branch 'tech-dev' of github.com:ceptor-club/Ceptor-Tech into te…
EmanHerawy Dec 10, 2023
9a6e20e
forge fmt
EmanHerawy Dec 10, 2023
342ceeb
Merge pull request #19 from ceptor-club/tech-CCID
EmanHerawy Dec 10, 2023
587ba50
renamed for spelling
tippi-fifestarr Dec 10, 2023
d6d4b0d
Merge branch 'tech-CCID' of https://github.com/ceptor-club/Ceptor-Tec…
tippi-fifestarr Dec 10, 2023
b276d50
spelling fix
tippi-fifestarr Dec 10, 2023
57afc2c
add script for token setup
EmanHerawy Dec 10, 2023
d8875cb
Merge pull request #20 from ceptor-club/tech-CCID
EmanHerawy Dec 10, 2023
aadb9c5
update abis and fix key in addresses
Dec 10, 2023
7764743
fix tokenID type from string to number
Dec 10, 2023
5964784
Add connect wallet in CCID, Add condition with upload PFP and username
airecr Dec 10, 2023
cd0b603
Merge tech-dev
airecr Dec 10, 2023
904c2e5
clena up env.sample
Dec 10, 2023
02e0f7e
add logic so nav bar is not shown on homepage
Dec 10, 2023
6c85efa
Update files
airecr Dec 9, 2023
1b90cf5
fix build
Dec 10, 2023
6aa91c5
updated readme
tippi-fifestarr Dec 9, 2023
95f8973
updated smartcontracts
tippi-fifestarr Dec 9, 2023
81b863f
not fully tested PriceCheckerFUJI, returns in 18 decimals for player …
tippi-fifestarr Dec 9, 2023
a843f05
add drafted serverless function
EmanHerawy Dec 8, 2023
b7705a2
add hardhat support to be able to deploy Reward.sol
EmanHerawy Dec 9, 2023
4131ea1
add simulate script
EmanHerawy Dec 9, 2023
3d04f4b
update source
EmanHerawy Dec 9, 2023
97a6e55
let get winner be called with new week prompt
EmanHerawy Dec 9, 2023
0cb1120
deploy to sepolia
EmanHerawy Dec 9, 2023
630415e
update reward amount
EmanHerawy Dec 9, 2023
b9a98a4
fix pragma and incorrect import . comment out code for Undeclared ide…
EmanHerawy Dec 9, 2023
55e5362
added RegisterQuick, it compiles, needs testing
tippi-fifestarr Dec 9, 2023
cc4a48b
code refactor step 1
EmanHerawy Dec 9, 2023
4ab958b
ccip receive from 2 chains is supported now
EmanHerawy Dec 10, 2023
e007b2c
merge registration with price feed support
EmanHerawy Dec 10, 2023
cebd22b
mint some dice for new player
EmanHerawy Dec 10, 2023
c16d312
add deployment script
EmanHerawy Dec 10, 2023
a94d05a
cleanup: move no longer used contract to archive folder
EmanHerawy Dec 10, 2023
f0176dd
fix broken logic in ceptor
EmanHerawy Dec 10, 2023
cd86c0c
update post deployment script
EmanHerawy Dec 10, 2023
491f33e
deploy and verify on sepolia
EmanHerawy Dec 10, 2023
48d13bc
update addresses in fe
EmanHerawy Dec 10, 2023
fcb6e44
add contract calls
Dec 9, 2023
8e55a33
fix smart contract calls
Dec 9, 2023
dc324aa
add all COW submissions
Dec 10, 2023
cd14933
fix address for network when undefined
Dec 10, 2023
470bdf4
add example avatars
Dec 10, 2023
4463bec
add alerts for when the wallet is not connected
Dec 10, 2023
5905d78
style Nav bar
Dec 10, 2023
afeb2af
style prompt input for weekly challenge
Dec 10, 2023
5f1828b
Add generate Button
Dec 10, 2023
95746aa
add rainbow wallet connect button and chain button
Dec 10, 2023
776fb10
add read dice stat of user function to burn dice page
Dec 10, 2023
e4035e3
input mockdata for list
Dec 10, 2023
eb32482
style NFT Modal and add new import structure
Dec 10, 2023
8b82a22
organize imports, remove unused
Dec 10, 2023
7128458
fix built errors
Dec 10, 2023
d32e577
forge fmt
EmanHerawy Dec 10, 2023
52e6b0a
add script for token setup
EmanHerawy Dec 10, 2023
aa38c1c
renamed for spelling
tippi-fifestarr Dec 10, 2023
f5fcd8a
spelling fix
tippi-fifestarr Dec 10, 2023
b68be5f
update abis and fix key in addresses
Dec 10, 2023
312e8ea
fix tokenID type from string to number
Dec 10, 2023
bb20167
clena up env.sample
Dec 10, 2023
6e2c747
add logic so nav bar is not shown on homepage
Dec 10, 2023
6e09f8b
fix build
Dec 10, 2023
1dfb07b
fix hydration error
Dec 10, 2023
18eb264
delete duplicated nftpage
airecr Dec 10, 2023
4c016b7
Merge branch 'tech-dev' into aire-frontend
airecr Dec 10, 2023
6438a76
refactor
EmanHerawy Dec 10, 2023
69236bb
create ICeptorClubID interface
EmanHerawy Dec 10, 2023
4ef09fb
profile doesn't allow build
airecr Dec 10, 2023
39fa7f6
add new temp deployment
EmanHerawy Dec 10, 2023
4703726
move CCID to components
Dec 10, 2023
ac3c739
remove generate button
Dec 10, 2023
2444105
update ceptor club address
EmanHerawy Dec 10, 2023
274c000
fix registeration issues and add first draft for the flow
EmanHerawy Dec 10, 2023
56dad22
add title to nftpage
Dec 11, 2023
b5f7877
move walletconnect button
Dec 11, 2023
62185a5
add new chain selection button, rename upload page to chooseUser page
Dec 11, 2023
29527d6
game master flow added
EmanHerawy Dec 11, 2023
ab20bdc
fix build
Dec 11, 2023
fc0e9c5
Merge branch 'tech-dev' into aire-frontend
Dec 11, 2023
76bf826
new deployment on sepolia
EmanHerawy Dec 11, 2023
08b90c5
Merge pull request #26 from ceptor-club/flow-script
EmanHerawy Dec 11, 2023
e44f3c5
Update README.md
tippi-fifestarr Dec 11, 2023
7d3c038
refactor
EmanHerawy Dec 10, 2023
12922d9
create ICeptorClubID interface
EmanHerawy Dec 10, 2023
e564da5
add new temp deployment
EmanHerawy Dec 10, 2023
1029958
update ceptor club address
EmanHerawy Dec 10, 2023
18a5aa6
fix registeration issues and add first draft for the flow
EmanHerawy Dec 10, 2023
6022c01
add function call to register player and gamemaster
Dec 11, 2023
453dfe4
update naming of component to fit guide
Dec 11, 2023
cc2311e
add styling and change route for user flow
Dec 11, 2023
4bd97f3
add burn function to burnDieStart
Dec 11, 2023
c02fb56
change route for user flow
Dec 11, 2023
3c7e990
deployed to fuji
EmanHerawy Dec 11, 2023
3ca0a7b
new deployment
EmanHerawy Dec 11, 2023
df7c4bf
Merge branch 'aire-frontend' into tech-dev
Dec 11, 2023
9c1db3a
update readme
Dec 11, 2023
d283f95
update readme
Dec 11, 2023
801fe13
fix build
Dec 11, 2023
abcf765
add deployed addresses on zkEVTestnet
Dec 11, 2023
01f0023
Merge branch 'tech-dev'
Dec 11, 2023
feac2f9
Update README.md
tippi-fifestarr Dec 11, 2023
205b022
Update README.md
tippi-fifestarr Dec 11, 2023
9348875
Update README.md
tippi-fifestarr Dec 11, 2023
7973636
Update README.md
tippi-fifestarr Dec 11, 2023
1ad0205
remove left over merge code
Dec 11, 2023
d2afb50
Merge branch 'main' into tech-dev
Dec 11, 2023
0a3d7b5
Merge branch 'tech-dev' of github.com:ceptor-club/Ceptor-Tech into fl…
EmanHerawy Dec 11, 2023
e103b73
update readme
EmanHerawy Dec 11, 2023
7650b91
Merge pull request #27 from ceptor-club/flow-script
EmanHerawy Dec 11, 2023
397057a
fix typo
EmanHerawy Dec 11, 2023
6016438
Added Games team to readme
tippi-fifestarr Dec 11, 2023
2d239aa
fix miner issue in the timer, deploy and verify contract , test end t…
EmanHerawy Dec 12, 2023
80c62ce
Merge branch 'tech-dev' of github.com:ceptor-club/Ceptor-Tech into te…
EmanHerawy Dec 12, 2023
f08a8c4
last contract version deployed on sepolia
EmanHerawy Dec 12, 2023
896a805
contract are deployed and verified on fujji
EmanHerawy Dec 12, 2023
85ca9e3
contract are deployed and verified on mumbai
EmanHerawy Dec 12, 2023
aaaae47
update ccid on mumbai
EmanHerawy Dec 12, 2023
d7c83bb
deploy to zkevm , chainlink is not supported there
EmanHerawy Dec 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/cache
/out
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "smart_contracts/lib/forge-std"]
path = smart_contracts/lib/forge-std
url = https://github.com/foundry-rs/forge-std
path = smart_contracts/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "smart_contracts/lib/openzeppelin-contracts"]
path = smart_contracts/lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
path = smart_contracts/lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
6 changes: 6 additions & 0 deletions .gitmodules.orig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "smart_contracts/lib/forge-std"]
path = smart_contracts/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "smart_contracts/lib/openzeppelin-contracts"]
path = smart_contracts/lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
167 changes: 153 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Ceptor Club Tech Team - Constellation - A CHAINLINK HACKATHON | NOV 8 – DEC 10

Todo:
- [ ] Provide a quick start guide for judges (update, based on ETHChicago readme)

- [x] Provide a quick start guide for devs and judges
- [x] Explain the 3 teams (Art + Tech + Games) and how they work together
- [ ] High level overview of Ceptor Club and our goal for this hackathon / future
- [ ] Onboard all 3 teams to this repo
- [x] High level [overview of Ceptor Club and our goal for this hackathon](https://docs.google.com/document/d/1tzb8Nj6E7Tyr8YrIWLrJBskozBuCecXe3IotgcpygKo/edit?usp=sharing) / future
- [x] Onboard all 3 teams to this repo
- [ ] Add Art, Tech, and Games pages to the navbar and front-end.

### We are providing a unified codebase for all 3 teams and clear documentation for the judges:
Expand All @@ -19,29 +20,167 @@ Each team will have their own narrative, demo video, internal page and readme li

- Tippi (Product Owner and CCID/CCIP Developer)
- Eman (Chainlink Developer Expert -- Functions, Automation, VRF)
- Alica (PM and Designer)
- Amy (Executive Producer)
- Lena (Web3 Fullstack with a heart of gold)
- Aire (Front-end support)

### Ceptor Art (Artour)

> Team Art (Artour) will support overall branding and help with our demo videos/team narratives, in addition to creating an end-to-end session zero experience following character creation. They are making sure our app and images generation looks good.

- Michael Finney
- Melinda McClimans
- Spencer Kinney
- leomofthings.eth (Front End Development)
- Michael Finney (Design & Video)
- Melinda McClimans (Product & Research)
- Spencer Kinney (Engineer)
- Sam Yeh (boy wonder, and unofficial mascot -- creator of the AI prompt battler)
- Creatjve (Branding and Wizards Hat)

Link to readme:

### Ceptor Games

> Team Games will make sure our overall project is fun and usable. They are building a couple small games and activities: Improved character creation and fun quiz, rollable 3D Big Dice, AI Prompt Battler, to make our app more “sticky.”

- Sam Yeh
- Jason A
- Vince
- Alan Barry
- Nadia
- leomofthings.eth (Updating the Quiz UI)
- Jason A (Team Lead and D20 Smart Contract)
- Vince Lindsey (Scheduling UI & fullstack jr dev)
- Alan Barry (Backend engineer and early-riser)
- Nadia (3D modeling of Rollable D20)

Link to readme:
[Link to GAMES readme](https://github.com/ceptor-club/Ceptor-Tech/blob/temp2/README-GAMES.md), **temp2 is Games Team's prod branch.**

# Getting Started

1. Clone this directory

`git clone https://github.com/ceptor-club/Ceptor-Tech.git`

2. It will create three folders: `backend` and `frontend` (and `smart_contracts`).

## 🧑‍💻 Let's Setup Frontend First

1. Go to frontend folder

`cd frontend`

2. Install dependencies

`npm install`

3. Clone .env.sample to .env

`cp .env.sample .env`

4. Setting up .env variables

- Setting up Network and Chain Id

- `NEXT_PUBLIC_NETWORK=goerli`
- `NEXT_PUBLIC_CHAIN_ID=5`

- Setting up Alchemy API Key

- Go to [Alchemy Dashboard](https://dashboard.alchemy.com/) and create an account(if you don't have one already)
- Create a new project based on your `NEXT_PUBLIC_NETWORK` variable and copy the API Key
- Paste the API Key in `.env` file as `NEXT_PUBLIC_ALCHEMY_KEY=https://eth-goerli.g.alchemy.com/v2/4nxF5nQMK20uGJinU_sample`

- Setting up WALLETCONNECT_PROJECT_ID for wallet authentication -

- Go to [WalletConnect Dashboard](https://cloud.walletconnect.com/app) and create an account(if you don't have one already)
- Create a new project and copy the API Key
- Paste the API Key in `.env` file as `NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=f88d2c49_sample`

- Setting up OPENAI_API_KEY (optional)

- Go to [OpenAI Dashboard](https://platform.openai.com/account/api-keys) and create an account(if you don't have one already)
- Create a new project and copy the API Key
- Paste the API Key in `.env` file as `NEXT_PUBLIC_OPENAI_API_KEY=sk-<34f34qw_sample>`

- Setting up NFT.storage api for storing images on IPFS

- Go to [NFT.storage Dashboard](https://nft.storage/) and create an account(if you don't have one already)
- Create a new project and copy the API Key
- Paste the API Key in `.env` file as `NEXT_PUBLIC_NFT_STORAGE=eyJhbGciOiJIUzI1NiIsI_sample`

5. Run the frontend

`npm run dev`

6. Open [http://localhost:3000](http://localhost:3000) with your browser to see the result and enjoy!

`Need to setup backend now to see the full functionality of the frontend, if already setup then skip to step 7`

7. Check that the back-end API is functioning by uploading the fastcharacter.com sheet pdf and generating an image.

## 🖥️ Let's Setup smart contract

1. Go to Backend folder

`cd smart_contracts`

2. Install all the dependencies

`npm install`
`forge install`

3. Clone .env.example to .env

`cp .env.example .env`

4. Setting up .env variables

- PRIVATE_KEY=
- ETHEREUM_SEPOLIA_RPC_URL=
- AVALANCHE_FUJI_RPC_URL=

5. to compile the smart contract
`forge compile`
6. to deploy the smart contract
`forge script ./script/deployer.sol -vvv --rpc-url ethereumSepolia --broadcast --sig "deployAll()" `
`forge script ./script/deployer2.sol -vvv --rpc-url polygonZKEVM --broadcast --sig "deployAll(uint8,uint8,uint8,address)" -- 0 2 4 0xB1eB539E7E845991F2915967f96838025277804C`
`npx hardhat deploy --network sepolia `
`forge script ./script/deployer.sol -vvv --rpc-url polygonMumbai --broadcast --sig "postDeploy(address,address,address,address,address)" -- 0x557d4b0a566613f344E2F5a9bc4FC52F6897B372 0xB4e5136F4BADDdF23a720A14a6a0D0d60A5ee9ee 0xf965217a040cc52354d55ed6D41112bb5f9Bf9D2 0x359A9d940692e09a318C1D690eb1cEDBBBb7E03f 0x45DB01904b51857F6279FE9006De25bf6dE8d136 `
where addresses are in the following order address prompt, address dice, address ceptor , address ccid,address reward

## 🖥️ Let's Setup Backend

1. Go to Backend folder

`cd backend`

2. Install all the dependencies

`npm install`

3. Clone .env.example to .env

`cp .env.example .env`

4. Setting up .env variables

- For ALCHEMY_API_KEY use the same key as in frontend
- Setup API_KEY="testKey" for Socket io connections
- Setup DB_CONN_STRING=mongodb+srv://verinta:BFWmxukoOsNdIx4x@ceptorclub.rq4oohp.mongodb.net/ for db connection

5. Renable CORS object

6. Run the backend

`npm run dev`

# Learn More

## **🛠️ MongoDB Setup: Endpoints for user creation and lookup!**

Put the connection string: `mongodb+srv://ceptorclub:dajfMXIwMzwM8ssI@ceptor.pgtoahq.mongodb.net/?retryWrites=true&w=majority` into mongodb compass and see the db

GET /user?wallet=<wallet0x> will give you the user
POST /user with

```
{
name: "blap",
email: "sldkfjh@klfj.com",
wallet: "0x12373fn...",
whatever: "else we want to save about users as we go (no, not images)"
}
```
6 changes: 3 additions & 3 deletions backend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ PORT=4000
# General
#=============================================
# mainnet/goerli etc.
ETH_NETWORK=goerli
ETH_NETWORK=sepolia
FRONTEND_URL=http://localhost:3000

API_KEY=

ALCHEMY_API_KEY=

SD_API_ENDPOINT=
SD_API_ENDPOINT=https://stable-diffusion10.p.rapidapi.com/generate-image


#=============================================
# MongoDB
#=============================================
DB_CONN_STRING=

DB_COLLECTION=users
DB_COLLECTION=users, characterData, submission
DB_NAME=CeptorClub
4 changes: 3 additions & 1 deletion backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@

npm-debug.log*
yarn-debug.log*
yarn-error.log*
yarn-error.log*

package-lock.json
8 changes: 4 additions & 4 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ frontend with sockets in context ready to be used: https://github.com/DnDnDiffus

> interested in seeing what parts of the front-end are connecting to the sockets?
>
> See the front-end above for relevant code in **utils/socketContext** and **components/GenerateButton.jsx**
> See the front-end above for relevant code in **utils/socketContext** and **components/Buttons/GenerateButton.jsx**

## installation

1. npm install
2. create a .env with the proper variables
3. reenable the cors object
2. create a .env with the proper variables (SD_ENDPOINT: https://stable-diffusion10.p.rapidapi.com/generate-image) _thanks to Team Art (Spencer!)_
3. reenable the cors object (maybe)
4. npm run dev

## other stuff
Expand All @@ -27,7 +27,7 @@ You need to run the backend in conjunction with the frontend to get this to work

## Now also has endpoints for user creation and lookup!

you can put `mongodb+srv://ceptorclub:dajfMXIwMzwM8ssI@ceptor.pgtoahq.mongodb.net/?retryWrites=true&w=majority` into mongodb compass and see the db
you can put `mongodb+srv://verinta:BFWmxukoOsNdIx4x@ceptorclub.rq4oohp.mongodb.net/` into mongodb compass and see the db

GET /user?wallet=<wallet0x> will give you the user
POST /user with
Expand Down
2 changes: 1 addition & 1 deletion backend/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ io.on("connection", (socket: any) => {

server.listen(process.env.PORT, () =>
console.log(`Server Running on ${process.env.PORT}`)
);
);
2 changes: 1 addition & 1 deletion backend/src/utils/getImages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ export async function getImages(data: any) {
return error;
});
return imagesData;
}
}
2 changes: 1 addition & 1 deletion backend/src/utils/mongo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ export async function getUser(wallet: string) {
console.error(error)
return error
}
}
}
18 changes: 13 additions & 5 deletions frontend/.env.sample
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
# IMAGE GENERATION KEYS
SD_API_ENDPOINT=

OPENAI_API_KEY=

# NEXT KEYS
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=

NEXT_PUBLIC_NFT_STORAGE=
NEXT_PUBLIC_API_BASE_URL=https://ceptor-backend-staging.up.railway.app
# NEXT_PUBLIC_API_BASE_URL=http://localhost:4000
NEXT_PUBLIC_NETWORK_ID=5
NEXT_PUBLIC_NETWORK=sepolia
NEXT_PUBLIC_API_KEY=
PUBLIC_IMAGE_URL=https://github.com/ceptor-club/Ceptor-Tech/tree/tech-dev/frontend/public/images/avatars/

# API KEYS
ALCHEMY_API_KEY=

NEXT_PUBLIC_NETWORK_ID=
NEXT_PUBLIC_NETWORK=
ALCHEMY_SEPOLIA_API_KEY=
ALCHEMY_GOERLI_API_KEY=
ALCHEMY_POLYGON_ZKEVM_API_KEY=
AVALANCHE_API_KEY=https://api.avax.network/ext/bc/C/rpc
4 changes: 3 additions & 1 deletion frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ notes
next-env.d.ts

.vscode
.history
.history
package-lock.json

7 changes: 7 additions & 0 deletions frontend/components/Buttons/AdvancedButton.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { CLIENT_STATIC_FILES_RUNTIME_AMP } from 'next/dist/shared/lib/constants';

const AdvancedButton = ({ advanced, setAdvanced }) => {
return <></>;
};

export default AdvancedButton;
Loading