From 5562dabdb63ff1fa436d5fe1371716197c22c409 Mon Sep 17 00:00:00 2001 From: Grigoriy Simonov Date: Thu, 11 Aug 2022 09:44:22 +0000 Subject: [PATCH] chore: add docs --- --- a/pallets/fungible/CHANGELOG.md +++ b/pallets/fungible/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. + +## [0.1.5] - 2022-08-29 + +### Added + + - Implementation of `mint` and `mint_bulk` methods for ERC20 API. + ## [v0.1.4] - 2022-08-24 ### Change --- a/pallets/fungible/src/erc.rs +++ b/pallets/fungible/src/erc.rs @@ -131,6 +131,9 @@ #[solidity_interface(name = "ERC20Mintable")] impl FungibleHandle { + /// Mint tokens for `to` account. + /// @param to account that will receive minted tokens + /// @param amount amount of tokens to mint #[weight(>::create_item())] fn mint(&mut self, caller: caller, to: address, amount: uint256) -> Result { let caller = T::CrossAccountId::from_eth(caller); @@ -147,6 +150,11 @@ #[solidity_interface(name = "ERC20UniqueExtensions")] impl FungibleHandle { + /// Burn tokens from account + /// @dev Function that burns an `amount` of the tokens of a given account, + /// deducting from the sender's allowance for said account. + /// @param from The account whose tokens will be burnt. + /// @param amount The amount that will be burnt. #[weight(>::burn_from())] fn burn_from(&mut self, caller: caller, from: address, amount: uint256) -> Result { let caller = T::CrossAccountId::from_eth(caller); @@ -161,6 +169,8 @@ Ok(true) } + /// Mint tokens for multiple accounts. + /// @param amounts array of pairs of account address and amount #[weight(>::create_multiple_items_ex(amounts.len() as u32))] fn mint_bulk(&mut self, caller: caller, amounts: Vec<(address, uint256)>) -> Result { let caller = T::CrossAccountId::from_eth(caller); -- gitstuff