Code for the Thesis work "Study and implementation of a platform for restaurants selling personalized culinary experiences"
🧪 This repo contain all the code to deploy the project.
⚙️ Started from the Scaffold-ETH 2 template. Built using NextJS, RainbowKit, Foudnry, Wagmi, and Typescript.
Before you begin, you need to install the following tools:
- Node (v18 LTS)
- Yarn (v1 or v2+)
- Git
- Foundryup
To get started, follow the steps below:
- Clone this repo & install dependencies
git clone https://github.com/scaffold-eth/scaffold-eth-2.git
cd scaffold-eth-2
yarn install
foundryup
-
Create your
.env
file insidepackages/foundry
, you can edit from.env.example
: -
Run a local network in the first terminal:
yarn chain
This command starts a local Ethereum network using Anvil in Foundry. The network runs on your local machine and can be used for testing and development. You can customize the network configuration in foundry.toml
- On a second terminal, deploy the test contract:
yarn deploy
This command deploys run a script in typescript which ask what do you want to deploy. Based on your decision the correct script in packages/foundry/script/
is used to deploy the contracts to the network.
- On a third terminal, start your NextJS app:
yarn start
Visit your app on: http://localhost:3000
. You can interact with ui in the frontend.
Run smart contract test with yarn foundry:test
Once you are ready to deploy your smart contracts, there are a few things you need to adjust.
- Select the network
By default, yarn deploy
will ask on which network you want to deplot the contracts.
- Generate a new account or add one to deploy the contract(s) from. Additionally you will need to add your Alchemy API key. Rename
.env.example
to.env
and fill the required keys.
ALCHEMY_API_KEY="",
CHAIN_PRIVATE_KEY=""
- Deploy your smart contract(s)
Run the command below to deploy the smart contract and select the target network. Make sure to have some funds in your deployer account to pay for the transaction.
yarn deploy
- Deploy and verify your smart contract(s)
You can deploy & verify your smart contract on Etherscan by reply y
when the script ask if you want to verify:
Do you want to verify the contracts? (y/N):
We welcome contributions to Scaffold-ETH 2!
Please see CONTRIBUTING.MD for more information and guidelines for contributing to Scaffold-ETH 2.