difftreelog
chore add docs
in: master
2 files changed
pallets/fungible/CHANGELOG.mddiffbeforeafterboth1# Change Log23All notable changes to this project will be documented in this file.45## [v0.1.4] - 2022-08-2467### Change8 - Add bound `AsRef<[u8; 32]>` to `T::CrossAccountId`.910<!-- bureaucrate goes here -->11## [v0.1.3] 2022-08-161213### Other changes1415- build: Upgrade polkadot to v0.9.27 2c498572636f2b34d53b1c51b7283a761a7dc90a1617- build: Upgrade polkadot to v0.9.26 85515e54c4ca1b82a2630034e55dcc804c643bf81819- refactor: Switch to new prefix removal methods 26734e9567589d75cdd99e404eabf11d5a97d9752021New methods allows to call `remove_prefix` with limit multiple times22in the same block23However, we don't use prefix removal limits, so upgrade is24straightforward2526Upstream-Change: https://github.com/paritytech/substrate/pull/114902728- build: Upgrade polkadot to v0.9.25 cdfb9bdc7b205ff1b5134f034ef9973d769e5e6b2930## [0.1.2] - 2022-08-043132### Fixed3334 - Issue with ItemCreated event containing total supply of tokens instead minted amount3536## [0.1.1] - 2022-07-143738### Added3940 - Implementation of RPC method `token_owners` returning 10 owners in no particular order.41 This was an internal request to improve the web interface and support fractionalization event.pallets/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);