Sankalp Sharma
Sankalp Sharma

Reputation: 33

In which cases a transaction may have 0x00 as the destination address in ethereum?

Looking at decoded transactions in Ethereum for some of the contracts I can see that the destination address is always 0x00.

Are all transactions with destination(to) address 0x00 signify contract deployments? Are there any cases where the destination address may be 0x00?

Upvotes: 1

Views: 2179

Answers (1)

Petr Hejda
Petr Hejda

Reputation: 43521

0x00 (also known as the zero address) is not the contract deployment address. Contract deployment happens when you omit the to field of the transaction - not when you set it to the zero address.


Sending ETH to the 0x00 address

It's possible to send there ETH, and it's mostly considered as burning the ETH. There's no way to "make your ETH dissapear"and lower the total supply, but you can effectively "throw them away" by sending them to the 0x00 address.

There is no publicly known private key to this address, but if once someone finds it, they would have access to all ETH that this address owns.


With tokens, it's a bit more complicated. You need to distinguish between the actual transfer and emiting the Transfer event.

Simply how tokens on the Ethereum work: The address itself doesn't have any data stating how many of which tokens it owns. This information is held in the token contract... Example: Your address owns 1 USDT. This information is not stored on your address, it's stored in the USDT contract.

Sending tokens to the 0x00 address

So you can practically call the transfer() function of the token contract, and transfer your tokens to the 0x00 address. The contract will then do the calculation, decrease your balance, and increase the balance of the 0x00 address.

Note: Some contract developers have implemented a check that forbids you to send tokens to the zero address. Reasons behind this decision may vary - my reason why I do it is to mitigate the risk of losing the sender's tokens when the sender doesn't specify any recepient by mistake (and the default value of 0x00 is then used).

Emiting the Transfer() event showing token burn

The ERC-20 standard says that if the transfer() call is successful, the contract should also emit the Transfer() event with arguments address from, address to, and uint256 amount.

Most contract developers also emit the event when you're minting or burning tokens. Again, reasons may vary, but my reason is that if you do (emit the event on minting and burning), Etherscan recalculates the total supply of the token.

Example values for the event when 0x123123123 is burning 1000 tokens (without decimals, to simplify), would be: Transfer(0x123123123, 0x0, 1000)


So to recap, it's possible to send ETH to the 0x00 address, it's possible to send there some tokens. But the most common case that you see in the blockchain data is just emiting the event of burning the tokens.

Upvotes: 1

Related Questions