ERC-20 like Standard for Polkadot

As noted here, we should standardize external callers into the Polkadot ecosystem via XCM messages, which can be processed locally and return data. Thus, the ERC-20 standard should not live at a pallet or runtime-api level, but at the XCM level.

Common runtime-API

Common pallet at index x in the Call enum.

Not needed if we use XCM.

As for “intra-chain” standardization, I don’t we need or should force anything here. The internals of a blockchain (and any smart contract) should entirely be a black box. Since a blockchain or contract entirely understands how its internals work, we should give them maximum freedom to make decisions at that level.

As for the suggested API, pretty hard to disagree with anything as this is just the existing ERC-20 standard, however I think it is a miss not to include some kind of reference to locked tokens in the API, since this quite standard in the world of staking. Perhaps, as simple as just exposing a spendable_balance api, then balance - spendable_balance is some opaquely locked amount of tokens the user owns, but does not have free access to.