finance.adoc 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  1. :github-icon: pass:[<svg class="icon"><use href="#github-icon"/></svg>]
  2. :PaymentSplitter: pass:normal[xref:finance.adoc#PaymentSplitter[`PaymentSplitter`]]
  3. :VestingWallet: pass:normal[xref:finance.adoc#VestingWallet[`VestingWallet`]]
  4. :xref-PaymentSplitter-constructor-address---uint256---: xref:finance.adoc#PaymentSplitter-constructor-address---uint256---
  5. :xref-PaymentSplitter-receive--: xref:finance.adoc#PaymentSplitter-receive--
  6. :xref-PaymentSplitter-totalShares--: xref:finance.adoc#PaymentSplitter-totalShares--
  7. :xref-PaymentSplitter-totalReleased--: xref:finance.adoc#PaymentSplitter-totalReleased--
  8. :xref-PaymentSplitter-totalReleased-contract-IERC20-: xref:finance.adoc#PaymentSplitter-totalReleased-contract-IERC20-
  9. :xref-PaymentSplitter-shares-address-: xref:finance.adoc#PaymentSplitter-shares-address-
  10. :xref-PaymentSplitter-released-address-: xref:finance.adoc#PaymentSplitter-released-address-
  11. :xref-PaymentSplitter-released-contract-IERC20-address-: xref:finance.adoc#PaymentSplitter-released-contract-IERC20-address-
  12. :xref-PaymentSplitter-payee-uint256-: xref:finance.adoc#PaymentSplitter-payee-uint256-
  13. :xref-PaymentSplitter-releasable-address-: xref:finance.adoc#PaymentSplitter-releasable-address-
  14. :xref-PaymentSplitter-releasable-contract-IERC20-address-: xref:finance.adoc#PaymentSplitter-releasable-contract-IERC20-address-
  15. :xref-PaymentSplitter-release-address-payable-: xref:finance.adoc#PaymentSplitter-release-address-payable-
  16. :xref-PaymentSplitter-release-contract-IERC20-address-: xref:finance.adoc#PaymentSplitter-release-contract-IERC20-address-
  17. :xref-PaymentSplitter-PayeeAdded-address-uint256-: xref:finance.adoc#PaymentSplitter-PayeeAdded-address-uint256-
  18. :xref-PaymentSplitter-PaymentReleased-address-uint256-: xref:finance.adoc#PaymentSplitter-PaymentReleased-address-uint256-
  19. :xref-PaymentSplitter-ERC20PaymentReleased-contract-IERC20-address-uint256-: xref:finance.adoc#PaymentSplitter-ERC20PaymentReleased-contract-IERC20-address-uint256-
  20. :xref-PaymentSplitter-PaymentReceived-address-uint256-: xref:finance.adoc#PaymentSplitter-PaymentReceived-address-uint256-
  21. :xref-VestingWallet-constructor-address-uint64-uint64-: xref:finance.adoc#VestingWallet-constructor-address-uint64-uint64-
  22. :xref-VestingWallet-receive--: xref:finance.adoc#VestingWallet-receive--
  23. :xref-VestingWallet-beneficiary--: xref:finance.adoc#VestingWallet-beneficiary--
  24. :xref-VestingWallet-start--: xref:finance.adoc#VestingWallet-start--
  25. :xref-VestingWallet-duration--: xref:finance.adoc#VestingWallet-duration--
  26. :xref-VestingWallet-released--: xref:finance.adoc#VestingWallet-released--
  27. :xref-VestingWallet-released-address-: xref:finance.adoc#VestingWallet-released-address-
  28. :xref-VestingWallet-releasable--: xref:finance.adoc#VestingWallet-releasable--
  29. :xref-VestingWallet-releasable-address-: xref:finance.adoc#VestingWallet-releasable-address-
  30. :xref-VestingWallet-release--: xref:finance.adoc#VestingWallet-release--
  31. :xref-VestingWallet-release-address-: xref:finance.adoc#VestingWallet-release-address-
  32. :xref-VestingWallet-vestedAmount-uint64-: xref:finance.adoc#VestingWallet-vestedAmount-uint64-
  33. :xref-VestingWallet-vestedAmount-address-uint64-: xref:finance.adoc#VestingWallet-vestedAmount-address-uint64-
  34. :xref-VestingWallet-_vestingSchedule-uint256-uint64-: xref:finance.adoc#VestingWallet-_vestingSchedule-uint256-uint64-
  35. :xref-VestingWallet-EtherReleased-uint256-: xref:finance.adoc#VestingWallet-EtherReleased-uint256-
  36. :xref-VestingWallet-ERC20Released-address-uint256-: xref:finance.adoc#VestingWallet-ERC20Released-address-uint256-
  37. = Finance
  38. [.readme-notice]
  39. NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/finance
  40. This directory includes primitives for financial systems:
  41. - {PaymentSplitter} allows to split Ether and ERC20 payments among a group of accounts. The sender does not need to be
  42. aware that the assets will be split in this way, since it is handled transparently by the contract. The split can be
  43. in equal parts or in any other arbitrary proportion.
  44. - {VestingWallet} handles the vesting of Ether and ERC20 tokens for a given beneficiary. Custody of multiple tokens can
  45. be given to this contract, which will release the token to the beneficiary following a given, customizable, vesting
  46. schedule.
  47. == Contracts
  48. :PayeeAdded: pass:normal[xref:#PaymentSplitter-PayeeAdded-address-uint256-[`++PayeeAdded++`]]
  49. :PaymentReleased: pass:normal[xref:#PaymentSplitter-PaymentReleased-address-uint256-[`++PaymentReleased++`]]
  50. :ERC20PaymentReleased: pass:normal[xref:#PaymentSplitter-ERC20PaymentReleased-contract-IERC20-address-uint256-[`++ERC20PaymentReleased++`]]
  51. :PaymentReceived: pass:normal[xref:#PaymentSplitter-PaymentReceived-address-uint256-[`++PaymentReceived++`]]
  52. :constructor: pass:normal[xref:#PaymentSplitter-constructor-address---uint256---[`++constructor++`]]
  53. :receive: pass:normal[xref:#PaymentSplitter-receive--[`++receive++`]]
  54. :totalShares: pass:normal[xref:#PaymentSplitter-totalShares--[`++totalShares++`]]
  55. :totalReleased: pass:normal[xref:#PaymentSplitter-totalReleased--[`++totalReleased++`]]
  56. :totalReleased: pass:normal[xref:#PaymentSplitter-totalReleased-contract-IERC20-[`++totalReleased++`]]
  57. :shares: pass:normal[xref:#PaymentSplitter-shares-address-[`++shares++`]]
  58. :released: pass:normal[xref:#PaymentSplitter-released-address-[`++released++`]]
  59. :released: pass:normal[xref:#PaymentSplitter-released-contract-IERC20-address-[`++released++`]]
  60. :payee: pass:normal[xref:#PaymentSplitter-payee-uint256-[`++payee++`]]
  61. :releasable: pass:normal[xref:#PaymentSplitter-releasable-address-[`++releasable++`]]
  62. :releasable: pass:normal[xref:#PaymentSplitter-releasable-contract-IERC20-address-[`++releasable++`]]
  63. :release: pass:normal[xref:#PaymentSplitter-release-address-payable-[`++release++`]]
  64. :release: pass:normal[xref:#PaymentSplitter-release-contract-IERC20-address-[`++release++`]]
  65. [.contract]
  66. [[PaymentSplitter]]
  67. === `++PaymentSplitter++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.5/contracts/finance/PaymentSplitter.sol[{github-icon},role=heading-link]
  68. [.hljs-theme-light.nopadding]
  69. ```solidity
  70. import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
  71. ```
  72. This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware
  73. that the Ether will be split in this way, since it is handled transparently by the contract.
  74. The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each
  75. account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim
  76. an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the
  77. time of contract deployment and can't be updated thereafter.
  78. `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the
  79. accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}
  80. function.
  81. NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and
  82. tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you
  83. to run tests before sending real value to this contract.
  84. [.contract-index]
  85. .Functions
  86. --
  87. * {xref-PaymentSplitter-constructor-address---uint256---}[`++constructor(payees, shares_)++`]
  88. * {xref-PaymentSplitter-receive--}[`++receive()++`]
  89. * {xref-PaymentSplitter-totalShares--}[`++totalShares()++`]
  90. * {xref-PaymentSplitter-totalReleased--}[`++totalReleased()++`]
  91. * {xref-PaymentSplitter-totalReleased-contract-IERC20-}[`++totalReleased(token)++`]
  92. * {xref-PaymentSplitter-shares-address-}[`++shares(account)++`]
  93. * {xref-PaymentSplitter-released-address-}[`++released(account)++`]
  94. * {xref-PaymentSplitter-released-contract-IERC20-address-}[`++released(token, account)++`]
  95. * {xref-PaymentSplitter-payee-uint256-}[`++payee(index)++`]
  96. * {xref-PaymentSplitter-releasable-address-}[`++releasable(account)++`]
  97. * {xref-PaymentSplitter-releasable-contract-IERC20-address-}[`++releasable(token, account)++`]
  98. * {xref-PaymentSplitter-release-address-payable-}[`++release(account)++`]
  99. * {xref-PaymentSplitter-release-contract-IERC20-address-}[`++release(token, account)++`]
  100. --
  101. [.contract-index]
  102. .Events
  103. --
  104. * {xref-PaymentSplitter-PayeeAdded-address-uint256-}[`++PayeeAdded(account, shares)++`]
  105. * {xref-PaymentSplitter-PaymentReleased-address-uint256-}[`++PaymentReleased(to, amount)++`]
  106. * {xref-PaymentSplitter-ERC20PaymentReleased-contract-IERC20-address-uint256-}[`++ERC20PaymentReleased(token, to, amount)++`]
  107. * {xref-PaymentSplitter-PaymentReceived-address-uint256-}[`++PaymentReceived(from, amount)++`]
  108. --
  109. [.contract-item]
  110. [[PaymentSplitter-constructor-address---uint256---]]
  111. ==== `[.contract-item-name]#++constructor++#++(address[] payees, uint256[] shares_)++` [.item-kind]#public#
  112. Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at
  113. the matching position in the `shares` array.
  114. All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
  115. duplicates in `payees`.
  116. [.contract-item]
  117. [[PaymentSplitter-receive--]]
  118. ==== `[.contract-item-name]#++receive++#++()++` [.item-kind]#external#
  119. The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully
  120. reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the
  121. reliability of the events, and not the actual splitting of Ether.
  122. To learn more about this see the Solidity documentation for
  123. https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback
  124. functions].
  125. [.contract-item]
  126. [[PaymentSplitter-totalShares--]]
  127. ==== `[.contract-item-name]#++totalShares++#++() → uint256++` [.item-kind]#public#
  128. Getter for the total shares held by payees.
  129. [.contract-item]
  130. [[PaymentSplitter-totalReleased--]]
  131. ==== `[.contract-item-name]#++totalReleased++#++() → uint256++` [.item-kind]#public#
  132. Getter for the total amount of Ether already released.
  133. [.contract-item]
  134. [[PaymentSplitter-totalReleased-contract-IERC20-]]
  135. ==== `[.contract-item-name]#++totalReleased++#++(contract IERC20 token) → uint256++` [.item-kind]#public#
  136. Getter for the total amount of `token` already released. `token` should be the address of an IERC20
  137. contract.
  138. [.contract-item]
  139. [[PaymentSplitter-shares-address-]]
  140. ==== `[.contract-item-name]#++shares++#++(address account) → uint256++` [.item-kind]#public#
  141. Getter for the amount of shares held by an account.
  142. [.contract-item]
  143. [[PaymentSplitter-released-address-]]
  144. ==== `[.contract-item-name]#++released++#++(address account) → uint256++` [.item-kind]#public#
  145. Getter for the amount of Ether already released to a payee.
  146. [.contract-item]
  147. [[PaymentSplitter-released-contract-IERC20-address-]]
  148. ==== `[.contract-item-name]#++released++#++(contract IERC20 token, address account) → uint256++` [.item-kind]#public#
  149. Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an
  150. IERC20 contract.
  151. [.contract-item]
  152. [[PaymentSplitter-payee-uint256-]]
  153. ==== `[.contract-item-name]#++payee++#++(uint256 index) → address++` [.item-kind]#public#
  154. Getter for the address of the payee number `index`.
  155. [.contract-item]
  156. [[PaymentSplitter-releasable-address-]]
  157. ==== `[.contract-item-name]#++releasable++#++(address account) → uint256++` [.item-kind]#public#
  158. Getter for the amount of payee's releasable Ether.
  159. [.contract-item]
  160. [[PaymentSplitter-releasable-contract-IERC20-address-]]
  161. ==== `[.contract-item-name]#++releasable++#++(contract IERC20 token, address account) → uint256++` [.item-kind]#public#
  162. Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an
  163. IERC20 contract.
  164. [.contract-item]
  165. [[PaymentSplitter-release-address-payable-]]
  166. ==== `[.contract-item-name]#++release++#++(address payable account)++` [.item-kind]#public#
  167. Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the
  168. total shares and their previous withdrawals.
  169. [.contract-item]
  170. [[PaymentSplitter-release-contract-IERC20-address-]]
  171. ==== `[.contract-item-name]#++release++#++(contract IERC20 token, address account)++` [.item-kind]#public#
  172. Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their
  173. percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20
  174. contract.
  175. [.contract-item]
  176. [[PaymentSplitter-PayeeAdded-address-uint256-]]
  177. ==== `[.contract-item-name]#++PayeeAdded++#++(address account, uint256 shares)++` [.item-kind]#event#
  178. [.contract-item]
  179. [[PaymentSplitter-PaymentReleased-address-uint256-]]
  180. ==== `[.contract-item-name]#++PaymentReleased++#++(address to, uint256 amount)++` [.item-kind]#event#
  181. [.contract-item]
  182. [[PaymentSplitter-ERC20PaymentReleased-contract-IERC20-address-uint256-]]
  183. ==== `[.contract-item-name]#++ERC20PaymentReleased++#++(contract IERC20 indexed token, address to, uint256 amount)++` [.item-kind]#event#
  184. [.contract-item]
  185. [[PaymentSplitter-PaymentReceived-address-uint256-]]
  186. ==== `[.contract-item-name]#++PaymentReceived++#++(address from, uint256 amount)++` [.item-kind]#event#
  187. :EtherReleased: pass:normal[xref:#VestingWallet-EtherReleased-uint256-[`++EtherReleased++`]]
  188. :ERC20Released: pass:normal[xref:#VestingWallet-ERC20Released-address-uint256-[`++ERC20Released++`]]
  189. :constructor: pass:normal[xref:#VestingWallet-constructor-address-uint64-uint64-[`++constructor++`]]
  190. :receive: pass:normal[xref:#VestingWallet-receive--[`++receive++`]]
  191. :beneficiary: pass:normal[xref:#VestingWallet-beneficiary--[`++beneficiary++`]]
  192. :start: pass:normal[xref:#VestingWallet-start--[`++start++`]]
  193. :duration: pass:normal[xref:#VestingWallet-duration--[`++duration++`]]
  194. :released: pass:normal[xref:#VestingWallet-released--[`++released++`]]
  195. :released: pass:normal[xref:#VestingWallet-released-address-[`++released++`]]
  196. :releasable: pass:normal[xref:#VestingWallet-releasable--[`++releasable++`]]
  197. :releasable: pass:normal[xref:#VestingWallet-releasable-address-[`++releasable++`]]
  198. :release: pass:normal[xref:#VestingWallet-release--[`++release++`]]
  199. :release: pass:normal[xref:#VestingWallet-release-address-[`++release++`]]
  200. :vestedAmount: pass:normal[xref:#VestingWallet-vestedAmount-uint64-[`++vestedAmount++`]]
  201. :vestedAmount: pass:normal[xref:#VestingWallet-vestedAmount-address-uint64-[`++vestedAmount++`]]
  202. :_vestingSchedule: pass:normal[xref:#VestingWallet-_vestingSchedule-uint256-uint64-[`++_vestingSchedule++`]]
  203. [.contract]
  204. [[VestingWallet]]
  205. === `++VestingWallet++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.5/contracts/finance/VestingWallet.sol[{github-icon},role=heading-link]
  206. [.hljs-theme-light.nopadding]
  207. ```solidity
  208. import "@openzeppelin/contracts/finance/VestingWallet.sol";
  209. ```
  210. This contract handles the vesting of Eth and ERC20 tokens for a given beneficiary. Custody of multiple tokens
  211. can be given to this contract, which will release the token to the beneficiary following a given vesting schedule.
  212. The vesting schedule is customizable through the {vestedAmount} function.
  213. Any token transferred to this contract will follow the vesting schedule as if they were locked from the beginning.
  214. Consequently, if the vesting has already started, any amount of tokens sent to this contract will (at least partly)
  215. be immediately releasable.
  216. [.contract-index]
  217. .Functions
  218. --
  219. * {xref-VestingWallet-constructor-address-uint64-uint64-}[`++constructor(beneficiaryAddress, startTimestamp, durationSeconds)++`]
  220. * {xref-VestingWallet-receive--}[`++receive()++`]
  221. * {xref-VestingWallet-beneficiary--}[`++beneficiary()++`]
  222. * {xref-VestingWallet-start--}[`++start()++`]
  223. * {xref-VestingWallet-duration--}[`++duration()++`]
  224. * {xref-VestingWallet-released--}[`++released()++`]
  225. * {xref-VestingWallet-released-address-}[`++released(token)++`]
  226. * {xref-VestingWallet-releasable--}[`++releasable()++`]
  227. * {xref-VestingWallet-releasable-address-}[`++releasable(token)++`]
  228. * {xref-VestingWallet-release--}[`++release()++`]
  229. * {xref-VestingWallet-release-address-}[`++release(token)++`]
  230. * {xref-VestingWallet-vestedAmount-uint64-}[`++vestedAmount(timestamp)++`]
  231. * {xref-VestingWallet-vestedAmount-address-uint64-}[`++vestedAmount(token, timestamp)++`]
  232. * {xref-VestingWallet-_vestingSchedule-uint256-uint64-}[`++_vestingSchedule(totalAllocation, timestamp)++`]
  233. --
  234. [.contract-index]
  235. .Events
  236. --
  237. * {xref-VestingWallet-EtherReleased-uint256-}[`++EtherReleased(amount)++`]
  238. * {xref-VestingWallet-ERC20Released-address-uint256-}[`++ERC20Released(token, amount)++`]
  239. --
  240. [.contract-item]
  241. [[VestingWallet-constructor-address-uint64-uint64-]]
  242. ==== `[.contract-item-name]#++constructor++#++(address beneficiaryAddress, uint64 startTimestamp, uint64 durationSeconds)++` [.item-kind]#public#
  243. Set the beneficiary, start timestamp and vesting duration of the vesting wallet.
  244. [.contract-item]
  245. [[VestingWallet-receive--]]
  246. ==== `[.contract-item-name]#++receive++#++()++` [.item-kind]#external#
  247. The contract should be able to receive Eth.
  248. [.contract-item]
  249. [[VestingWallet-beneficiary--]]
  250. ==== `[.contract-item-name]#++beneficiary++#++() → address++` [.item-kind]#public#
  251. Getter for the beneficiary address.
  252. [.contract-item]
  253. [[VestingWallet-start--]]
  254. ==== `[.contract-item-name]#++start++#++() → uint256++` [.item-kind]#public#
  255. Getter for the start timestamp.
  256. [.contract-item]
  257. [[VestingWallet-duration--]]
  258. ==== `[.contract-item-name]#++duration++#++() → uint256++` [.item-kind]#public#
  259. Getter for the vesting duration.
  260. [.contract-item]
  261. [[VestingWallet-released--]]
  262. ==== `[.contract-item-name]#++released++#++() → uint256++` [.item-kind]#public#
  263. Amount of eth already released
  264. [.contract-item]
  265. [[VestingWallet-released-address-]]
  266. ==== `[.contract-item-name]#++released++#++(address token) → uint256++` [.item-kind]#public#
  267. Amount of token already released
  268. [.contract-item]
  269. [[VestingWallet-releasable--]]
  270. ==== `[.contract-item-name]#++releasable++#++() → uint256++` [.item-kind]#public#
  271. Getter for the amount of releasable eth.
  272. [.contract-item]
  273. [[VestingWallet-releasable-address-]]
  274. ==== `[.contract-item-name]#++releasable++#++(address token) → uint256++` [.item-kind]#public#
  275. Getter for the amount of releasable `token` tokens. `token` should be the address of an
  276. IERC20 contract.
  277. [.contract-item]
  278. [[VestingWallet-release--]]
  279. ==== `[.contract-item-name]#++release++#++()++` [.item-kind]#public#
  280. Release the native token (ether) that have already vested.
  281. Emits a {EtherReleased} event.
  282. [.contract-item]
  283. [[VestingWallet-release-address-]]
  284. ==== `[.contract-item-name]#++release++#++(address token)++` [.item-kind]#public#
  285. Release the tokens that have already vested.
  286. Emits a {ERC20Released} event.
  287. [.contract-item]
  288. [[VestingWallet-vestedAmount-uint64-]]
  289. ==== `[.contract-item-name]#++vestedAmount++#++(uint64 timestamp) → uint256++` [.item-kind]#public#
  290. Calculates the amount of ether that has already vested. Default implementation is a linear vesting curve.
  291. [.contract-item]
  292. [[VestingWallet-vestedAmount-address-uint64-]]
  293. ==== `[.contract-item-name]#++vestedAmount++#++(address token, uint64 timestamp) → uint256++` [.item-kind]#public#
  294. Calculates the amount of tokens that has already vested. Default implementation is a linear vesting curve.
  295. [.contract-item]
  296. [[VestingWallet-_vestingSchedule-uint256-uint64-]]
  297. ==== `[.contract-item-name]#++_vestingSchedule++#++(uint256 totalAllocation, uint64 timestamp) → uint256++` [.item-kind]#internal#
  298. Virtual implementation of the vesting formula. This returns the amount vested, as a function of time, for
  299. an asset given its total historical allocation.
  300. [.contract-item]
  301. [[VestingWallet-EtherReleased-uint256-]]
  302. ==== `[.contract-item-name]#++EtherReleased++#++(uint256 amount)++` [.item-kind]#event#
  303. [.contract-item]
  304. [[VestingWallet-ERC20Released-address-uint256-]]
  305. ==== `[.contract-item-name]#++ERC20Released++#++(address indexed token, uint256 amount)++` [.item-kind]#event#