substrate-erc20-multi icon indicating copy to clipboard operation
substrate-erc20-multi copied to clipboard

SAMPLE: Implementation of a multi-erc20 token Substrate runtime.

Results 7 substrate-erc20-multi issues
Sort by recently updated
recently updated
newest added
trafficstars

fixes #13 Based on changes in #12. I suggest merging #12 before merging this.

When calling `_transfer()` ```rust fn _transfer( token_id: u32, from: T::AccountId, to: T::AccountId, value: T::TokenBalance, ); ``` If `from == to`, tokens are duplicated. ## To reproduce Run the tests added...

Adds a few tests focusing on transfer functionality (does not test transfer_from/approve or events). One of the tests fails. That's because there is a bug in `transfer()` that allows token...

Updates the project to depend on substrate 2.0 (3ba0f2a2). Code copied from https://github.com/substrate-developer-hub/substrate-node-template/commit/3abe9654b566c7ec89830a05354e3c8ee7340229.

In current state `transfer_from` executes against an `Allowance` entry with `to` as the spender side , which is wrong. The spender side should be verified against the sender of the...

IIUC `transfer_from` needs to notify everyone about the changed allowance after some of it is spent. Presently, the amount used in the `Approval` event is the transaction amount instead of...

In `transfer_from` the allowance subtraction happens before `_transfer` gets the chance to check that `from` has sufficient token funds. As a result the following erroneous scenario is possible: * Alice...