
We built a platform for Web3 builders to source Smart Contracts and solidity libraries, but we found that many smart contracts lack documentation or lack the details needed to easily use them.
Cookbook will do solidity documentation for you
Introducing: Autogenerated documentation
As contracts are added, any missing documentation is automatically generated using GPT3. This fills in any gaps and makes understanding the underlying code much easier when using Cookbook.
createSplit(uint32[] ,uint32, address) :
This function creates a new split contract, which is a type of wallet contract that allows multiple users to share ownership of a single wallet. The function takes in an array of addresses (accounts), an array of uint32s (percentAllocations), a uint32 (distributorFee), and an address (controller). It first calculates a hash of the split using the _hashSplit() function, which is used to ensure that the split is unique. If the controller address is 0, then the split is cloned deterministically using the walletImplementation address and the splitHash. If the controller address is not 0, then the split is cloned using the walletImplementation address and the controller address is set to the controller address provided. The splitHash is then stored in the splits mapping and an event is emitted to indicate that the split has been created. (autogenerated documentation)
See full example here: https://www.cookbook.dev/contracts/on-chain-income-splitter-and-distributor