Skip to content
Verified contractPartial

Trade

Address0x14b93eb6e80ea575276efbabc5a89452c096d9e2
Balance

0 ETH

 

Transactions

5

 

Compiler

solc 0.2.2

 

Same code

72 more contracts

 

Details

Compiler
solc 0.2.2+commit.ef92f566
Language
solidity
Optimization
Yes, 200 runs
License
Not stated
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
1,044,752
Creation transaction
0x6239ae9fbb…4a2e346bc8
Main copy (most transactions)
0xaf69d70d…9f7e2842

Trade.sol

// Recovered by EthereumHistory (ethereumhistory.com) -sw
contract Trade {
    enum Status { S0, S1, S2, S3, S4 }
    struct Entry { address who; uint64 time; Status status; }
    address constant pA = 0x40563c8a47996ba3e9afd51cef23070a9fd35d75;
    address constant pB = 0xf9968bbbadf98cd736f7737f468dbbb6c9d3e62d;
    address constant pC = 0xef2be808c8cd2533f11db5f0098ce6ed65d92bb8;
    address constant pD = 0x68e3a9240341cfd21a0993fe73c82df93cbf1620;
    address owner;
    address a1;
    uint64 b1;
    uint64 c2;
    uint64 d2;
    uint64 e2;
    uint64 f2;
    uint64 g3;
    Status status;
    uint8 h3;
    Entry[] history;

    function Trade(uint8 _h3, uint64 _b1, uint64 _c2, uint64 _d2, uint64 _e2, uint64 _f2, uint64 _g3) {
        owner = msg.sender;
        status = Status.S0;
        h3 = _h3;
        a1 = 0x6b62228ee04f62799e722448669e1fe21f007f91;
        b1 = _b1;
        c2 = _c2;
        d2 = _d2;
        e2 = _e2;
        f2 = _f2;
        g3 = _g3;
    }

    function order_received() {
        if (pD == msg.sender) status = Status.S1;
        c2 = uint64(now * 1000);
        history.push(Entry(msg.sender, uint64(now * 1000), Status.S1));
    }

    function share_transfered(uint64 x) {
        if (pC == msg.sender) {
            d2 = e2 * x;
            status = Status.S2;
            c2 = uint64(now * 1000);
            history.push(Entry(msg.sender, uint64(now * 1000), Status.S2));
        }
    }

    function cash_transfered() {
        if ((msg.sender == pB && h3 == 1) || (pA == msg.sender && h3 == 0)) {
            status = Status.S3;
            c2 = uint64(now * 1000);
            history.push(Entry(msg.sender, uint64(now * 1000), Status.S3));
        }
    }

    function cash_received() {
        if ((pA == msg.sender && h3 == 1) || (msg.sender == pB && h3 == 0)) {
            status = Status.S4;
            c2 = uint64(now * 1000);
            history.push(Entry(msg.sender, uint64(now * 1000), Status.S4));
        }
    }

    function kill() { suicide(owner); }

    function getStatus() returns (uint) { return uint(status); }

    function get() returns (Status s, address a, uint64 b, uint64 c, uint64 d, uint64 e, string v, uint h, uint64 f, uint64 g) {
        a = a1; b = b1; c = c2; d = d2; e = e2; f = f2; g = g3; s = status; h = h3; v = "1.0.2";
    }

    function getOwner() returns (address o) { o = owner; }

    function getLength() returns (uint l) { l = history.length; }

    function getHistory(uint i) returns (address who, Status s, uint64 time) {
        who = history[i].who; time = history[i].time; s = history[i].status;
    }
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": true
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.