1

According to how contract address is computed my 1st and 129th transaction as a contract deployment should have the same address. What would happen if I was to deploy them in that order?

I already tried with ganache but it refuses to send more than 128 transactions.

  • Can you explain why you think the 1st and 129th transaction would have the same address? That might help to formulate an answer. – user19510 Apr 18 '18 at 17:45
  • @smarx I figured out I was missing some knowledge about RLP which led me to a wrong assumption. Please see my answer bellow. – Timofey Solonin Apr 18 '18 at 18:14
1

I just tried in Ganache and able to create the same contract 2nd time on 128th block with different contract address.

SENDER ADDRESS
0xd23c8582A66f4a1e4696CCc3D6B085721123A8A9
CREATED CONTRACT ADDRESS
0xA826e724031d9698FB24e3C881Bebe55F1EB8F39
CONTRACT CREATION
VALUE
0.00 ETH
GAS USED
2282348
GAS PRICE
1
GAS LIMIT
2282348
MINED IN BLOCK
128

-

SENDER ADDRESS
0xd23c8582A66f4a1e4696CCc3D6B085721123A8A9
CREATED CONTRACT ADDRESS
0x6F2014378e4D34382CF93D906762FF2d12CdB769
CONTRACT CREATION
VALUE
0.00 ETH
GAS USED
2282348
GAS PRICE
1
GAS LIMIT
2282348
MINED IN BLOCK
1
| improve this answer | |
  • Sorry, I guess I really meant 129th. I corrected my question. – Timofey Solonin Apr 18 '18 at 15:52
  • Let me fire back my ganache!! – Matheswaran Kanagarajan Apr 18 '18 at 15:53
  • 1
    SENDER ADDRESS 0xd23c8582A66f4a1e4696CCc3D6B085721123A8A9 CREATED CONTRACT ADDRESS 0x6F2014378e4D34382CF93D906762FF2d12CdB769 CONTRACT CREATION VALUE 0.00 ETH GAS USED 2282348 GAS PRICE 1 GAS LIMIT 2282348 **MINED IN BLOCK 1** SENDER ADDRESS 0xd23c8582A66f4a1e4696CCc3D6B085721123A8A9 CREATED CONTRACT ADDRESS 0xe54ff25e548d9D3A14C426c333aBE7E15CBFDE1B CONTRACT CREATION VALUE 0.00 ETH GAS USED 2282348 GAS PRICE 1 GAS LIMIT 2282348 **MINED IN BLOCK 129** It's created!! – Matheswaran Kanagarajan Apr 18 '18 at 15:55
  • I wonder why it doesn't deploy for me and how the contract address gets computed in this case. – Timofey Solonin Apr 18 '18 at 15:58
0

The reason I believed 1st and 129th transaction should have the same address is because I missed a constraint on my RLP implementation. This caused number 128 to be encoded incorrectly as 0x80 instead of 0x8180 which caused me to believe 1st and 129th transaction should have the same address.

Since I was using my implementation of transaction signing it also obviously didn't work past 128th transaction on ganache.

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.