https://github.com/rybla/forohtoo-splitter-contract
A contract for the Forohtoo blogging framework that splits a transaction between two addresses.
https://github.com/rybla/forohtoo-splitter-contract
Last synced: 9 months ago
JSON representation
A contract for the Forohtoo blogging framework that splits a transaction between two addresses.
- Host: GitHub
- URL: https://github.com/rybla/forohtoo-splitter-contract
- Owner: rybla
- Created: 2025-08-17T01:30:12.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-17T03:31:17.000Z (11 months ago)
- Last Synced: 2025-08-17T03:31:25.889Z (11 months ago)
- Language: TypeScript
- Size: 24.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# forohtoo-splitter-contract
The basic idea of this contract is the following: Anyone can send USDC and an address to the contract; the contract keeps some of the USDC and sends the rest of it to the specified address.
In more details:
- The contract specifies a fixed `payout_rate: uint` which corresponds to a percent from `0` to `100`.
- The contract deployer can withdraw money from this contract at any time.
- Anyone can send a transaction to this contract with an amount of USDC and an address.
- When this contract recieves an `amount` of USDC and an `address`, it computes `payout_amount = (payout_rate * amount) / 100`. Then the contract sends `payout_amount` to the `address`.
## Contributing
The script `build.sh` must run without any warnings or errors before changes may be comitted.
```sh
./build.sh
```