A simple Solidity smart contract that allows splitting received funds among multiple receivers according to their basis points.
Note: This was an experiment in conversational programming with GPT-4. All code is generated by GPT. You can read the entire conversatioin by opening the conversation.mht
file in the project root.
- Receive funds sent to the contract
- Set payment receivers with basis points
- Withdraw the entire balance stored in the contract and split it among the receivers according to their basis points
- Only the contract owner can set receivers and call the withdraw function
- Clone the repository:
git clone https://github.com/your-username/payment-splitter.git
- Change to the project directory:
cd payment-splitter
- Install dependencies:
yarn
To deploy the contract to a local development network, run: npx hardhat run scripts/deploy.js --network localhost
To run the tests, execute the following command: npx hardhat test
- Solidity - The smart contract programming language
- Hardhat - The development and testing framework
- OpenZeppelin Contracts - For reusable smart contract components
This project is licensed under the MIT License - see the LICENSE file for details.