I am trying to instantiate contracts via the geth console.

Here are the instructions I am running:

var bytecode = "0x6003600501600202600055"
var createTx = eth.sendTransaction({ from: eth.accounts[0], data: bytecode })
var created = eth.getTransactionReceipt(createTx).contractAddress

When I run the last line, I get the following:

TypeError: Cannot access member 'contractAddress' of null
    at <anonymous>:1:15

I would appreciate any pointers on how to resolve this


1 Answer 1


Your transaction receipt is null, that's the reason you‘re getting cannot access member of null.

You have to wait until the transaction is included in a block. Then you will have the receipt. And if you had an create transaction (to = 0x0), then contractAddress will be available in the transaction receipt.

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.