0

I would like to know if I can infer an ABI for contracts that have the same bytecode. If both have the same bytecode can I assume their ABI will be the same?

1 Answer 1

1

The bytecode is what runs the EVM. A simple contract would look like this:

608060405234801561001057600080fd5b506101f4806100206000396000f3fe60806040526004361061003b5760003560e01c806360fe47b1146100405780636d4ce63c1461007f575b600080fd5b34801561004c57600080fd5b506100556100d0565b6040518082815260200191505060405180910390f35b6100706100e5565b005b60006020819052908152604090205460ff1681565b6000805490509056fea165627a7a723058203dcd3f1c7a2f2d9b7ed8d580aaf44c30f03111814a35c3fb3dceee130bdc2f2b0029

In principle, the same bytecode will be associated with the ABI generated at the same time. Therefore, for each deployment we have a unique bytecode - ABI equivalent pair.

Two contracts with the same bytecode would then be the same.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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