Browse Source

Add usage docs to ERC20 Snapshot (#1639)

Leo Arias 6 years ago
parent
commit
fc17a1d9f5
1 changed files with 5 additions and 0 deletions
  1. 5 0
      contracts/drafts/ERC20Snapshot.sol

+ 5 - 0
contracts/drafts/ERC20Snapshot.sol

@@ -11,6 +11,11 @@ import "../token/ERC20/ERC20.sol";
  * https://github.com/Giveth/minime/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol
  * When a snapshot is made, the balances and totalSupply at the time of the snapshot are recorded for later
  * access.
+ *
+ * To make a snapshot, call the `snapshot` function, which will emit the `Snapshot` event and return a snapshot id.
+ * To get the total supply from a snapshot, call the function `totalSupplyAt` with the snapshot id.
+ * To get the balance of an account from a snapshot, call the `balanceOfAt` function with the snapshot id and the
+ * account address.
  * @author Validity Labs AG <info@validitylabs.org>
  */
 contract ERC20Snapshot is ERC20 {