How get nonce of smart contract account with JSON RPC function? (Number of new smart contract accounts created by a smart contract account?)
eth_getTransactionCount only for EXTERNAL accounts so won't work right?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
Why do you believe
eth_getTransactionCount is only for externally owned accounts? In general, Ethereum differentiates very little between accounts with associated code (smart contracts) and externally owned accounts (EOA).
eth_getTransactionCount will get you the correct nonce for any account. Note that smart contracts start with a nonce of 1 (read this for some nuance), so that's what you'll see for newly deployed contracts. So you may want to subtract 1 if you're actually wondering how many smart contracts a given contract has created.