0

I have deployed the same Smart Contract twice on the Ropsten Testnet using Truffle (i.e. truffle migrate --compile-all --reset --network ropsten). The second deployment generated a new contract address, different than the initial one. If I use the web3 command smartContractName.address, the second address is returned.

I was wondering what happen to the first Smart Contract deployed at the initial address? Is it still accessible somehow? What would happen if I did the same on Mainnet (besides costing me real ETHs, of course)? Is the behaviour identical?

2
  • 1
    That deployed contract will be there as well. There is not overriding or deleting the previous one.
    – Emrah
    Apr 12 at 1:05
  • Thank you @blockByblock This is what I had assumed. However, upon calling smartContractName.address, the new address is returned? Is the blockchain designed to return only the latest address in such cases?
    – JF0001
    Apr 12 at 1:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.