git.delta.rocks / unique-network / refs/commits / 5562dabdb63f

difftreelog

chore add docs

Grigoriy Simonov2022-08-11parent: #fc40628.patch.diff
in: master

2 files changed

modifiedpallets/fungible/CHANGELOG.mddiffbeforeafterboth
22
3All notable changes to this project will be documented in this file.3All notable changes to this project will be documented in this file.
44
5
6## [0.1.5] - 2022-08-29
7
8### Added
9
10 - Implementation of `mint` and `mint_bulk` methods for ERC20 API.
11
5## [v0.1.4] - 2022-08-2412## [v0.1.4] - 2022-08-24
613
7### Change14### Change
modifiedpallets/fungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/fungible/src/erc.rs
+++ b/pallets/fungible/src/erc.rs
@@ -131,6 +131,9 @@
 
 #[solidity_interface(name = "ERC20Mintable")]
 impl<T: Config> FungibleHandle<T> {
+	/// Mint tokens for `to` account.
+	/// @param to account that will receive minted tokens
+	/// @param amount amount of tokens to mint
 	#[weight(<SelfWeightOf<T>>::create_item())]
 	fn mint(&mut self, caller: caller, to: address, amount: uint256) -> Result<bool> {
 		let caller = T::CrossAccountId::from_eth(caller);
@@ -147,6 +150,11 @@
 
 #[solidity_interface(name = "ERC20UniqueExtensions")]
 impl<T: Config> FungibleHandle<T> {
+	/// 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(<SelfWeightOf<T>>::burn_from())]
 	fn burn_from(&mut self, caller: caller, from: address, amount: uint256) -> Result<bool> {
 		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(<SelfWeightOf<T>>::create_multiple_items_ex(amounts.len() as u32))]
 	fn mint_bulk(&mut self, caller: caller, amounts: Vec<(address, uint256)>) -> Result<bool> {
 		let caller = T::CrossAccountId::from_eth(caller);