0

A few months ago I deployed a test ERC20 token, called 2BC, to the Ethereum Kovan testnet.

This token can be found here: https://kovan.etherscan.io/token/0x938736ab99c0a46bbf8fe7fb06e6f0974902d581

Yesterday, I deployed a new ERC20 token, called BREV, to the Polygon mainnet.

This token can be found here: https://polygonscan.com/token/0x938736ab99c0a46bbf8fe7fb06e6f0974902d581

How on earth do these two tokens have the same contract address?

David Callanan
  • 792
  • 6
  • 20
  • because you have the same nonce on the Owner's account on both networks – Nulik Aug 18 '21 at 01:38
  • @Nulik Does it not also depend on the code of the smart contract? – David Callanan Aug 18 '21 at 10:23
  • **/* no /* . – Nulik Aug 18 '21 at 17:33
  • As said by Nulik if the networks use the same rules as Ethereum then the contract's address follows a formula that depends on parameters that a user can control, like address, nonce, init bytecode, etc. – Ismael Aug 21 '21 at 16:22
  • @Ismael Would the init byte code not be different for two tokens with different names? – David Callanan Aug 22 '21 at 18:24
  • @DavidCallanan Read the first answer https://ethereum.stackexchange.com/a/761 from the duplicate question. The init bytecode is the constructor, and it is used by CREATE2 opcode to calculate the address. – Ismael Aug 22 '21 at 23:01

0 Answers0