difftreelog
feat impl total_suppy
in: master
1 file changed
pallets/balances-adapter/src/erc.rsdiffbeforeafterboth58 fn balance_of(&self, owner: Address) -> Result<U256> {58 fn balance_of(&self, owner: Address) -> Result<U256> {59 // self.consume_store_reads(1)?;59 // self.consume_store_reads(1)?;60 let owner = T::CrossAccountId::from_eth(owner);60 let owner = T::CrossAccountId::from_eth(owner);61 let a = <T as Config>::Currency::free_balance(owner.as_sub());61 let balance = <T as Config>::Currency::free_balance(owner.as_sub());62 Ok(a.into())62 Ok(balance.into())63 }63 }646465 fn decimals(&self) -> Result<u8> {65 fn decimals(&self) -> Result<u8> {767677 fn total_supply(&self) -> Result<U256> {77 fn total_supply(&self) -> Result<U256> {78 // self.consume_store_reads(1)?;78 // self.consume_store_reads(1)?;79 // Ok(<TotalSupply<T>>::get(self.id).into())80 todo!()79 let total = <T as Config>::Currency::total_issuance();80 Ok(total.into())81 }81 }828283 // #[weight(<SelfWeightOf<T>>::transfer())]83 // #[weight(<SelfWeightOf<T>>::transfer())]