I'm trying to send Quantstamp (QSP) to Binance offline, using MyEtherWallet. In mew's offline helper... when I paste in the signed transaction (into the online MEW, as received by offline version of mew) it keeps saying receiver is the QSP contract address - not the binance address (as supplied to me by Binance). The sender is correct (my mew wallet) - but not the receiver. Is that supposed to happen?
QSP is an ERC-20 token. Token transactions work a bit differently than regular Ether transactions. To transfer a token, you send a (0 Ether) transaction to the token contract, with data that specifies the value of tokens to send, and the address where you want to send the tokens to. If you take a look at a token transaction on Etherscan.io for example, you will see that the "To" address is the token contract.
A token transaction can look something like this:
- Address: 0x99ea4db9ee77acd40b119bd1dc4e33e1c070b80d (QSP contract)
- Value: 0 Ether
The data consists of three parts:
- The first 4 bytes (or 8 hexadecimal characters) specify the function of the contract to call. In this case
0xa9059cbb, which is the
transfer(address,uint256)function. This is also called the function signature or selector.
- The address where to send the tokens to. This is the next 32 bytes after the function signature, in this case
0x4bbeeb066ed09b7aed07bf39eee0460dfa261520(removing the zeroes at the start).
- The number of tokens to send. This is the last 32 bytes of the data, which is
1000000000000000000in this case. QSP has 18 decimals, so this is equla to 1 QSP.