1

I deployed an exactly same contract to both ETH and ETC. And I could see the contract doesn't work correctly only on ETC.

contract ContractA {
    ContractB public BB;

    // Common
    constructor () public {
        BB = ContractB(msg.sender);
    }

    function () public payable {
        require(msg.value > 0);

        BB.destination().transfer(msg.value);
        BB.logDeposit(msg.sender, msg.value);
    }
}

It seems that it fails on the line BB.destination().transfer(msg.value);. I think reading destination() works and then it fails when it tries transferring.

I suspect that the OPCODEs for those chains are different, but couldn't get any clue.

2

At the moment ETC does not have certain new opcodes that solidity assumes exist. To compile contracts for ETC you need to use Solidity version <=0.4.19.

Come January/February 2019 we should expect that ETC will upgrade and become opcode compatible with current versions of Solidity. Longer term there are other solutions that will be implemented.

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.