Contract 0xF1836e7610ccAeD2055394577A774899E6Df4909

 

TxHash Block Age From To Value [TxFee]
0x3cf5313c8f2d2be1065386246061dca60e5911200b11a772bdaf6b5fd491d7b44932026400 days 18 mins ago0x8f12fe64d2e9fea29def7106868fe7f43bf999a9 IN  0xf1836e7610ccaed2055394577a774899e6df49090 Ether0.001509144
0xa6c99247695354b2f8022fb606a3c6aab8f871589e7f57cbd4e9bb6319bbed484930516400 days 6 hrs ago0x8f12fe64d2e9fea29def7106868fe7f43bf999a9 IN  Contract Creation0 Ether0.00732179
[ Download CSV Export 

Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value
Warning: The compiled contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity), NestedArrayFunctionCallDecoder (medium-severity) Solidity Compiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: TokenPeg
Compiler Version: v0.4.19+commit.c4cbbb05
Optimization Enabled: No
Runs (Optimizer):  200


Contract Source Code
pragma solidity ^0.4.18;

contract Token {
  function transferFrom(address from, address to, uint256 value) public returns (bool success);
  function transfer(address _to, uint256 _value) public returns (bool success);
}

contract TokenPeg {
  address public minimalToken;
  address public signalToken;
  bool public pegIsSetup;

  event Configured(address minToken, address sigToken);
  event SignalingEnabled(address exchanger, uint tokenCount);
  event SignalingDisabled(address exchanger, uint tokenCount);

  function TokenPeg() public {
    pegIsSetup = false;
  }

  function setupPeg(address _minimalToken, address _signalToken) public {
    require(!pegIsSetup);
    pegIsSetup = true;

    minimalToken = _minimalToken;
    signalToken = _signalToken;

    Configured(_minimalToken, _signalToken);
  }

  function tokenFallback(address _from, uint _value, bytes /*_data*/) public {
    require(pegIsSetup);
    require(msg.sender == signalToken);
    giveMinimalTokens(_from, _value);
  }

  function convertMinimalToSignal(uint amount) public {
    require(Token(minimalToken).transferFrom(msg.sender, this, amount));
    require(Token(signalToken).transfer(msg.sender, amount));

    SignalingEnabled(msg.sender, amount);
  }

  function convertSignalToMinimal(uint amount) public {
    require(Token(signalToken).transferFrom(msg.sender, this, amount));
  }

  function giveMinimalTokens(address from, uint amount) private {
    require(Token(minimalToken).transfer(from, amount));
    
    SignalingDisabled(from, amount);
  }

}

Contract ABI
[{"constant":true,"inputs":[],"name":"pegIsSetup","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"convertMinimalToSignal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_minimalToken","type":"address"},{"name":"_signalToken","type":"address"}],"name":"setupPeg","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_value","type":"uint256"},{"name":"","type":"bytes"}],"name":"tokenFallback","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"convertSignalToMinimal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"signalToken","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minimalToken","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"minToken","type":"address"},{"indexed":false,"name":"sigToken","type":"address"}],"name":"Configured","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"exchanger","type":"address"},{"indexed":false,"name":"tokenCount","type":"uint256"}],"name":"SignalingEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"exchanger","type":"address"},{"indexed":false,"name":"tokenCount","type":"uint256"}],"name":"SignalingDisabled","type":"event"}]

Contract Creation Code
6060604052341561000f57600080fd5b6000600160146101000a81548160ff0219169083151502179055506109f6806100396000396000f300606060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063224076d4146100885780633af91491146100b557806352573529146100d8578063c0ee0b8a14610130578063c69f8623146101b5578063d06c7b5b146101d8578063d72eabb81461022d575b600080fd5b341561009357600080fd5b61009b610282565b604051808215151515815260200191505060405180910390f35b34156100c057600080fd5b6100d66004808035906020019091905050610295565b005b34156100e357600080fd5b61012e600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061051c565b005b341561013b57600080fd5b6101b3600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061066e565b005b34156101c057600080fd5b6101d660048080359060200190919050506106f4565b005b34156101e357600080fd5b6101eb61081e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561023857600080fd5b610240610844565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600160149054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846000604051602001526040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b151561039557600080fd5b6102c65a03f115156103a657600080fd5b5050506040518051905015156103bb57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561048857600080fd5b6102c65a03f1151561049957600080fd5b5050506040518051905015156104ae57600080fd5b7fac41b4a55364cd6686a5e5444c7d23f3d1b1e57937dbea2e8797f61aa2cf41583382604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150565b600160149054906101000a900460ff1615151561053857600080fd5b60018060146101000a81548160ff021916908315150217905550816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fcff941fc1d1ad89b3d5de05ccd516eec43fa7e5d8552f3c32f83cec7cd9080d18282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15050565b600160149054906101000a900460ff16151561068957600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156106e557600080fd5b6106ef8383610869565b505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846000604051602001526040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15156107f557600080fd5b6102c65a03f1151561080657600080fd5b50505060405180519050151561081b57600080fd5b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561093557600080fd5b6102c65a03f1151561094657600080fd5b50505060405180519050151561095b57600080fd5b7fa68602fb5e76a027c045e6e45d85c4a4d48f459cc98cd86dc9fc40f991a5ad5a8282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150505600a165627a7a7230582092555f387d8abbd26cfc3d0c919b00a614876a063e18e6ab4fa9c49926d2bdbd0029


   Swarm Source:
bzzr://92555f387d8abbd26cfc3d0c919b00a614876a063e18e6ab4fa9c49926d2bdbd
Block Age transaction Difficulty GasUsed Reward
Block Age Uncle Number Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.