FunPay is an application designed for users to make payments, investments, and disbursements using cryptocurrencies. The application is deployed on the FON Smart Chain platform.
To test this app, you'll need to install the Metamask wallet and exchange FON or any token on Hieswap
Demo: FunPay dApp
Smart Contract: FunPay Smart Contract
- Deposit.
- Create batch recurring payments.
- Create batch onetime payments.
- Manage Address book.
- Create invoice.
- Withdraw
- Cancel payment.
- Transfer payment.
- Pay invoice.
- Cancel/Reject/Pause/Active invoice.
- Show user's sent payments.
- Show user's received payments.
- View all invoices.
- Upload .csv.
- Manage user permissions for payments.
- Reports & Statistics.
- Pause payment.
- Create invoice with recurring payement options.
- Payment SDK.
- Frontend (UI/UX): use NextJS and Chakra UI framework.
- Offchain DB: use Mongo DB.
- Smart contract interaction: use EthersJS to send transactions.
- Wallet Connector: use Metamask API to connect wallet.
We use Solidity and Hardhat to develop smart contracts. For the front-end development, we use NextJS and EthersJS.
To understand source code, you should have basic knowlege of:
- FON smart chain mainnet.
- Solidity
- Hardhat
- NodeJS
- React
- Next JS
- Wagmi
- Linux commands.
Step 1: Install Dev environment
- Install NodeJS (16+)
- Install VisualCode studio.
- Install Solidity & Hardhat addons for VisualCode.
Step 2: Install libraries
- Go to each folder
cd frontend
->npm i
cd contracts
->npm i
Step 3: Deploy smart contracts
Go to folder: cd contracts
- Deploy contracts:
- Use:
npx hardhat deploy-contract --network fsc --show-stack-traces
- Use:
- Verify contracts:
- Use:
npx hardhat verify --network fsc {contract address}
- Use:
- To test smart contracts
- Use
npx hardhat test
.
- Use
Step 4: Setup .env
Setup ENV file in each folder: Frontend, Contracts.
cp .env.example .env
and change variable values.
- To run Backend and Frontend applications in Production mode, use this command:
npm run build
andpm2 run npm --name "your app name" -- run start
We welcome any ideas or suggestions to help us make FunPay better. Please do not hesitate to contact us via email at [email protected].
This package is released under the BSL 1.1 License.