Skip to content
Verified contractPartial

ReplaySafeSplit

Address0xaa1a6e3e6ef20068f7f8d8c835d2d22fd5116444
Balance

0 ETH

 

Transactions

322,217

 

Compiler

solc 0.3.5-nightly.2016.7.19

 

Same code

18 more contracts

 

Details

Compiler
solc 0.3.5-nightly.2016.7.19+commit.427deb43
Language
solidity
Optimization
Yes, 200 runs
License
Not stated
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
1,920,419
Creation transaction
0x63ba2a013f…b3389a7fe4

ReplaySafeSplit.sol

// Recovered by EthereumHistory (ethereumhistory.com) -sw
contract AmIOnTheFork {
    function forked() constant returns(bool);
}

contract ReplaySafeSplit {
    // Fork oracle to use
    AmIOnTheFork amIOnTheFork = AmIOnTheFork(0x2bd2326c993dfaef84f696526064ff22eba5b362);

    // Splits the funds into 2 addresses
    function split(address targetFork, address targetNoFork) returns(bool) {
        if (amIOnTheFork.forked() && targetFork.send(msg.value)) {
            return true;
        } else if (!amIOnTheFork.forked() && targetNoFork.send(msg.value)) {
            return true;
        }
        throw; // don't accept value transfer, otherwise it would be trapped.
    }

    // Reject value transfers.
    function() {
        throw;
    }
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": true
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.