# Tips Pallet
### Config
1. `pallet_tips` uses the following `pallet_treasury` config types:
- `type RejectOrigin` (`slash_tip`).
```
impl pallet_tips::Config for Runtime {
type Event = Event;
type DataDepositPerByte = DataDepositPerByte;
type MaximumReasonLength = MaximumReasonLength;
type Tippers = Elections;
type TipCountdown = TipCountdown;
type TipFindersFee = TipFindersFee;
type TipReportDepositBase = TipReportDepositBase;
type WeightInfo = pallet_tips::weights::SubstrateWeight<Runtime>;
}
```
### Extrinsics
1. [`report_awesome(origin, reason, who)`](https://github.com/paritytech/substrate/blob/master/frame/tips/src/lib.rs#L238)
* Report something worthy of a tip and register for a finders fee.
* `origin` (`finder`) can be anyone.
* `reason` is the reason for the (`UTF-8`).
* `who` is an account which should be credited for the tip.
* Check for `AlreadyKnown` tips.
* `finder` must reserve deposit an amount.
2. [`retract_tip(origin, hash)`](https://github.com/paritytech/substrate/blob/master/frame/tips/src/lib.rs#L295)
* Retract a previous (finders fee registered) report.
* `origin` must be the tip's `finder`.
* `hash` must exist.
* `finder` original deposit will be unreserved.
3. [`tip_new(origin, reason, who, tip_value)`](https://github.com/paritytech/substrate/blob/master/frame/tips/src/lib.rs#L333)
* Give a tip for something new; no finder's fee will be taken.
* `origin` must be in `T::Tippers`.
* Check for `AlreadyKnown` tips.
4. [`tip(origin, hash, tip_value)`](https://github.com/paritytech/substrate/blob/master/frame/tips/src/lib.rs#L387)
* Declare or redeclare an amount to tip for a particular reason.
* `origin` must be in `T::Tippers`.
* Add a new `(tipper, tip_value)` to the tip.
* If the number of tippers is a majority, set the tip to be closed.
5. [`close_tip(origin, hash)`](https://github.com/paritytech/substrate/blob/master/frame/tips/src/lib.rs#L420)
* Close and payout a tip.
* `origin` can be anyone.
* `tip.closes` must have a value (`BlockNumber`).
* The current `BlockNumber` must be `>=` than `tip.closes`.
* Remove tip's reason from `Reasons`.
* Remove tip from `Tips`.
6. [`slash_tip(origin, hash)`](https://github.com/paritytech/substrate/blob/master/frame/tips/src/lib.rs#L446)
* Remove and slash an already-open tip.
* `origin` must be in `T::RejectOrigin`.
* The finder's deposit is slashed.
* Remove tip's reason from `Reasons`.
---