1

I've got a contract which one of his functions creates a new contract in the following manner: (Solidity)

function createCarrier()
public
{
    P2Carrier newCarrier = new P2Carrier(msg.sender);
    emit contractCreated(address(newCarrier));
}

I've deployed this to Rinkeby TestNet. When making a transaction to call this function (from android using web3j, and infura as http provider) The event is emitted, but when I look for the address emitted in the event, There is nothing there (using rinkeby.etherscan.io). also, I can see the transaction sent to call the function in etherscan, but I cant see any additional contract creation transaction.

you can see the contract info and transaction here: https://rinkeby.etherscan.io/address/0x7ca846b6d52ccec650187e5ed8e793701de4d00e

Any ideas what's wrong?

Thanks.

0

The contract is being created. The geth debug trace shows the CREATE opcode and storing of the code.

Additionally, if you call getCode on geth for one of the deployed addresses (from this tx's log), you get some code back. Here's the Etherscan API call for that

It looks like Etherscan is just not indexing the contract correctly when deployed from another contract on Rinkeby, I'm not sure why. I know it does it for ropsten and the mainnet. Try using ropsten if you really must see it on etherscan.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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