Skip to content
Verified contractPartial

Test

Address0x60dcf4025f2d233c2fca38eaa3b1d1bb840b6c7b
Balance

0 ETH

 

Transactions

1

 

Compiler

solc 0.1.6

 

Same code

1 more contract

 

Details

Compiler
solc 0.1.6+commit.d41f8b7c
Language
solidity
Optimization
Yes, 200 runs
License
Not stated
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
508,226
Creation transaction
0xa69e8af742…507531334d

Test.sol

// Recovered by EthereumHistory (ethereumhistory.com) -sw
contract Test {
    address owner;
    function Test() {
        owner = msg.sender;
    }
    function hashToSign() returns (bytes32) {
        return parseBytes32("58e2f335bbd6f2b0da93eae19342e7309654fbfeed9a214a1e5d835ac09cc226");
    }

    function priv() returns (bytes32) {
        return parseBytes32("eab5f6141b4c66877f178f8b87c804d380af6d5404edc249d2c388dbcc542977");
    }

    function r() returns (bytes32) {
        return parseBytes32("0b7effb7704f726bc64139753dc2d0a3929af2309dd2930ad7a722f5b214cf6e");
    }

    function s() returns (bytes32) {
        return parseBytes32("73a461ce418e9e483f13a98c0cba5cddf07f647ea1d6ba2e88d494dfcd411c9c");
    }

    function v() returns (uint8) {
        return 32;
    }

    function v2() returns (uint8) {
        return 28;
    }

    function verify() returns (address) {
        return ecrecover(hashToSign(), v(), r(), s());
    }

    function verify2() returns (address) {
        return ecrecover(hashToSign(), v2(), r(), s());
    }

    function parseBytes32(string _a) returns (bytes32) {
        bytes memory tmp = bytes(_a);
        uint x = 0;
        for (uint i = 0; i < 32; i++) {
            x = x * 256;
            uint j = i * 2;
            uint8 b1 = uint8(tmp[j]);
            uint8 b2 = uint8(tmp[j + 1]);
            if ((b1 >= 97) && (b1 <= 102)) b1 -= 87;
            else if ((b1 >= 48) && (b1 <= 57)) b1 -= 48;
            if ((b2 >= 97) && (b2 <= 102)) b2 -= 87;
            else if ((b2 >= 48) && (b2 <= 57)) b2 -= 48;
            x += uint8(b1 * 16 + b2);
        }
        return bytes32(x);
    }

    function kill() {
        if (msg.sender == owner) suicide(msg.sender);
    }

    function vAsByte() returns (byte) {
        return byte(v());
    }
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": true
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.