Skip to content
Verified contractPartial

TokenSwap

Address0x49af4eccda78263f868483dc7a31847df361e814
Balance

0 ETH

 

Transactions

4

 

Compiler

solc 0.2.2

 

Same code

58 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,085,134
Creation transaction
0x5ed0a23cca…8dc9e74a0e

TokenSwap.sol

// Recovered by EthereumHistory (ethereumhistory.com) -sw
contract Token {
    function transfer(address _to, uint256 _value);
}

contract TokenSwap {
    address public token1;
    address public token2;
    uint public amount1;
    uint public amount2;
    address public creator;
    address public taker;

    event Completed();

    function() { throw; }

    function TokenSwap(address _token1, address _token2, uint _amount1, uint _amount2, address _taker) {
        token1 = _token1;
        token2 = _token2;
        amount1 = _amount1;
        amount2 = _amount2;
        creator = msg.sender;
        taker = _taker;
    }

    function complete() {
        Token(token1).transfer(taker, amount1);
        Token(token2).transfer(creator, amount2);
        Completed();
    }
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": true
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.