A simulation project about blockchain technology.
SPH_Solidity is decentralized system for starting a campaign to support indie/startup projects using tokens in the blockchain.
It highlights transparency, accountability, and reliability in making sure that the donations are going to the right individuals and organizations.
- Chevy
- John
- Jason
- Wylen
- Arden
- Keno
- Kent
Note: Make sure to have yarn
installed globally. If not, run:
npm install --global yarn
yarn --version
- Clone repository
[email protected]:framgia/sph-solidity.git
- Create .env file
cp .env.example fe/.env
cp .env.example smart_contract/.env
- Update .env files
API_URL =
CONTRACT_ADDRESS =
- Install dependencies
- In root directory:
npm install
- In
fe
directory:
npm install
- In
smart_contract
directory:
npm install
Nuxt: http://localhost:3000
npm run nuxt:dev
Hardhat: http://127.0.0.1:8545/
npm run hardhat:compile
npm run hardhat:node
In another terminal, run this command:
npm run hardhat:deploy-local
Set the returned contract address to environment variable CONTRACT_ADDRESS
npm run hardhat:interact-local
Hardhat + Alchemy: https://eth-sepolia.g.alchemy.com/v2/KPjBlFd432ifoUNi8UKzGcq-uL1OhX31
npm run hardhat:compile
Update smart_contract/.env file
API_URL = "https://eth-sepolia.g.alchemy.com/v2/KPjBlFd432ifoUNi8UKzGcq-uL1OhX31"
USER_KEY = <your metamask private key>
Deploy in Sepolia test network
npm run hardhat:deploy-sepolia
Set the returned contract address to environment variable CONTRACT_ADDRESS
npm run hardhat:interact-local
Nuxt
npm run nuxt:eslint
npm run nuxt:prettier
Hardhat
npm run hardhat:solhint
npm run hardhat:prettier
Nuxt
- Build the application for production:
npm run build
- Locally preview production build:
npm run preview
- Download Link -> https://metamask.io/download/
- Once installed, create an account.
-
Click the MetaMask extension then click the
Show/hide
link. (See image below) -
After that, make sure to turn on the
Show test networks
. (See image below) -
Once done, Click again the MetaMask extension and select from
Ethereum Mainnet
toSepolia test network
. (See image below)
-
Go to Sepolia Faucet -> https://sepoliafaucet.com/
-
Log in using your Alchemy account, you can use your Google account when you sign up at Alchemy
-
Once you logged in, copy your Sepolia Address in your MetaMask wallet and paste it into the Sepoli Faucet then click
Send Me ETH
to claim your0.5
ETH
- Local -> http://localhost:3000/
- Hosted -> https://sph-solidity-fe.vercel.app/