I am trying to see smart contract creations from opcodes in transaction traces with debug_traceTransaction
. But traces of transactions that created contracts do not seem to include the CREATE
opcode.
Example:
CryptoKitties’ core contract is: 0x06012c8cf97BEaD5deAe237070F9587f8E7A266d
It was created with this transaction: 0x691f348ef11e9ef95d540a2da2c5f38e36072619aa44db0827e1b8a276f120f4
I would expect to see the creation of the contract in the transaction trace indicated by the CREATE
or CREATE2
opcode according to the Yellow Paper pp. 37f (https://ethereum.github.io/yellowpaper/paper.pdf).
The Python code I am using is:
from web3 import Web3
tx= "0x691f348ef11e9ef95d540a2da2c5f38e36072619aa44db0827e1b8a276f120f4"
web3 = Web3.HTTPProvider("endpoint")
trace = web3.make_request('debug_traceTransaction', [tx])
The output trace is fairly long but does not include CREATE
or CREATE2
.
Am I using the wrong transaction or the wrong debug trace?
How do I find the trace with the CREATE
or CREATE2
opcode (e.g., for CryptoKitties' core contract)?