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
131131
132#[solidity_interface(name = "ERC20Mintable")]132#[solidity_interface(name = "ERC20Mintable")]
133impl<T: Config> FungibleHandle<T> {133impl<T: Config> FungibleHandle<T> {
134 /// Mint tokens for `to` account.
135 /// @param to account that will receive minted tokens
136 /// @param amount amount of tokens to mint
134 #[weight(<SelfWeightOf<T>>::create_item())]137 #[weight(<SelfWeightOf<T>>::create_item())]
135 fn mint(&mut self, caller: caller, to: address, amount: uint256) -> Result<bool> {138 fn mint(&mut self, caller: caller, to: address, amount: uint256) -> Result<bool> {
136 let caller = T::CrossAccountId::from_eth(caller);139 let caller = T::CrossAccountId::from_eth(caller);
147150
148#[solidity_interface(name = "ERC20UniqueExtensions")]151#[solidity_interface(name = "ERC20UniqueExtensions")]
149impl<T: Config> FungibleHandle<T> {152impl<T: Config> FungibleHandle<T> {
153 /// Burn tokens from account
154 /// @dev Function that burns an `amount` of the tokens of a given account,
155 /// deducting from the sender's allowance for said account.
156 /// @param from The account whose tokens will be burnt.
157 /// @param amount The amount that will be burnt.
150 #[weight(<SelfWeightOf<T>>::burn_from())]158 #[weight(<SelfWeightOf<T>>::burn_from())]
151 fn burn_from(&mut self, caller: caller, from: address, amount: uint256) -> Result<bool> {159 fn burn_from(&mut self, caller: caller, from: address, amount: uint256) -> Result<bool> {
152 let caller = T::CrossAccountId::from_eth(caller);160 let caller = T::CrossAccountId::from_eth(caller);
161 Ok(true)169 Ok(true)
162 }170 }
163171
172 /// Mint tokens for multiple accounts.
173 /// @param amounts array of pairs of account address and amount
164 #[weight(<SelfWeightOf<T>>::create_multiple_items_ex(amounts.len() as u32))]174 #[weight(<SelfWeightOf<T>>::create_multiple_items_ex(amounts.len() as u32))]
165 fn mint_bulk(&mut self, caller: caller, amounts: Vec<(address, uint256)>) -> Result<bool> {175 fn mint_bulk(&mut self, caller: caller, amounts: Vec<(address, uint256)>) -> Result<bool> {
166 let caller = T::CrossAccountId::from_eth(caller);176 let caller = T::CrossAccountId::from_eth(caller);