How do you check if a transaction is interacting with a smart contract or deploying smart contract itself (transactions, deployed bytecode, Ethereum)?

The Ethereum's json RPC api has a format with fields like for ex - from, to, data, value, gas, gasprice… etc.

When the value of ‘to’ field is missing or empty, and there is ‘data’ field, the request is about deploying a smart contract.

When the value of ‘to’ field is present, and there is ‘data’ field, the request is about calling a function of a smart contract.

Project home               Q&A home

    Send us an email        Instagram - Decentralized Web        Twitter - Decentralized Web        Telegram - Decentralized Web        Tik-tok - Decentralized Web

Go To Top               Become a User - start getting rewards