Contract Overview
Balance: 0.2 Ether
Ether Value: $17.43 (@ $87.13/ETH)
Transactions: 9 txns
Misc:
Address Watch: Add To Watch List
Contract Creator: 0x8f12fe64d2e9fea29def7106868fe7f43bf999a9at txn 0x9dcda7f34e76358b15de00711941d2e1efdaf92d36cc16f2b8c3edbcf16aeef9
Token Balance:
 Latest 9 txns

TxHash Age From To Value [TxFee]
0xd6a9821cb05dc5f577ed045f1c40383fe6aecdc09152e53064f21629d9273db933 days 16 hrs ago0x00c3ba03b5671a17ea80056aec8bb7200d75d139  IN   0x522e7ff686caf7ee5a4063b577ccc7f07054294b0 Ether0.000609342
0xefa904ea53ae9c9861a0cae45f537dc51d5785f5921ff2e291ef9182b43fab82170 days 3 hrs ago0x129631915a3ca10b9a159a7dc95bde0ba71682d3  IN   0x522e7ff686caf7ee5a4063b577ccc7f07054294b0.1 Ether0.000172158
0xd48bcd4f307ffdbcbbfd3a4efc14a9a55b73d980b429847c364a028fb4b03a68249 days 6 hrs ago0x4059457092cc3812d56676df6a75fd21204fbe2f  IN   0x522e7ff686caf7ee5a4063b577ccc7f07054294b0.1 Ether0.000057386
0xa0052b9a3716cbb5f9b956e9aefd218e94f64c7e1515bad7975bec2a03b34def291 days 16 hrs ago0x00c3ba03b5671a17ea80056aec8bb7200d75d139  IN   0x522e7ff686caf7ee5a4063b577ccc7f07054294b0 Ether0.000102672
0x27dcf726daeea42306193b3f93c089d865875d5dff63d83d65195952c99e5ea7291 days 16 hrs ago0x00c3ba03b5671a17ea80056aec8bb7200d75d139  IN   0x522e7ff686caf7ee5a4063b577ccc7f07054294b0 Ether0.000079494
0xbb8d4b535c4353d84b28947610afeb7cdb45c37ca5d4c17145e957f83275c91c291 days 16 hrs ago0x00c3ba03b5671a17ea80056aec8bb7200d75d139  IN   0x522e7ff686caf7ee5a4063b577ccc7f07054294b0.05 Ether0.0002352826
0xb7717067d13cb377e12d4b0226f331269ae1176e278d3873daff6d20f63e12a3328 days 18 hrs ago0x00c3ba03b5671a17ea80056aec8bb7200d75d139  IN   0x522e7ff686caf7ee5a4063b577ccc7f07054294b0 Ether0.000556458
0x85966b071556b6f2001ddd359dfb59ddd2ea16d826050f4223cd4b4e30c36488328 days 19 hrs ago0x00c3ba03b5671a17ea80056aec8bb7200d75d139  IN   0x522e7ff686caf7ee5a4063b577ccc7f07054294b0.01 Ether0.001205106
0x9dcda7f34e76358b15de00711941d2e1efdaf92d36cc16f2b8c3edbcf16aeef9331 days 1 hr ago0x8f12fe64d2e9fea29def7106868fe7f43bf999a9  IN    Contract Creation0 Ether0.023144541
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 2 Internal Transactions

ParentTxHash Block Age From To Value
0x27dcf726daeea42306193b3f93c089d865875d5dff63d83d65195952c99e5ea75167007291 days 16 hrs ago0x522e7ff686caf7ee5a4063b577ccc7f07054294b0x00c3ba03b5671a17ea80056aec8bb7200d75d1390.05 Ether
0xb7717067d13cb377e12d4b0226f331269ae1176e278d3873daff6d20f63e12a34947423328 days 18 hrs ago0x522e7ff686caf7ee5a4063b577ccc7f07054294b0x00c3ba03b5671a17ea80056aec8bb7200d75d1390.01 Ether
[ Download CSV Export  ] 
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity), NestedArrayFunctionCallDecoder (medium-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: Autobid
Compiler Text: v0.4.19+commit.c4cbbb05
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.18;

contract Token {
  function transfer(address to, uint256 value) public returns (bool success);
  function transferFrom(address from, address to, uint256 value) public returns (bool success);
  function balanceOf(address _owner) public constant returns (uint256 balance);
}

/*************************************************************************\
 *  Autobid: Automatic Bidirectional Distribution contract
 *
 *  Allows users to exchange ETH for tokens (and vice versa) at a 
 *  predefined rate until an expiration timestamp is reached or the
 *  contract token supply is fully depleted
 *
 *  Note: users must go through the approve() -> redeemTokens() process
 *  in order to successfully convert their token balances back to ETH
 *  (i.e. autobid contract will not recognize direct token transfers)
 *
\*************************************************************************/
contract Autobid {
  /*************\
   *  Storage  *
  \*************/
  address public admin;         // account with access to contract balance after expiration
  address public token;         // the token address
  uint public exchangeRate;     // number of tokens per ETH
  uint public expirationTime;   // epoch timestamp at which the contract expires
  bool public active;           // whether contract is still active (false after expiration)

  /************\
   *  Events  *
  \************/
  event TokenClaim(address tokenContract, address claimant, uint ethDeposited, uint tokensGranted);
  event Redemption(address redeemer, uint tokensDeposited, uint redemptionAmount);

  /**************\
   *  Modifiers
  \**************/
  modifier autobidActive() {
    // Check active variable
    require(active);

    // Also check current timestamp (edge condition sanity check)
    require(now < expirationTime);
    _;
  }

  modifier autobidExpired() {
    require(!active);
    _;
  }

  modifier onlyAdmin() {
    require(msg.sender == admin);
    _;
  }

  /*********************\
   *  Public functions
   *********************************************************************************\
   *  @dev Constructor
   *  @param _admin Account with access to contract balance after expiration
   *  @param _token Token recognized by autobid contract
   *  @param _exchangeRate Number of tokens granted per ETH sent
   *  @param _expirationTime Epoch time at which contract expires
   *
  \*********************************************************************************/
  function Autobid(address _admin, address _token, uint _exchangeRate, uint _expirationTime) public {
    admin = _admin;
    token = _token;
    exchangeRate = _exchangeRate;
    expirationTime = _expirationTime;
    active = true;
  }

  /********************************************\
   *  @dev Deposit function
   *  Anyone can pay while contract is active
  \********************************************/
  function () public payable autobidActive {
    // Calculate number of tokens owed to sender
    uint tokenQuantity = msg.value * exchangeRate;

    // Ensure that sender receives their tokens
    require(Token(token).transfer(msg.sender, tokenQuantity));

    // Check if contract has now expired (i.e. is empty)
    expirationCheck();

    // Fire TokenClaim event
    TokenClaim(token, msg.sender, msg.value, tokenQuantity);
  }

  /******************************************************\
   *  @dev Redeem function (exchange tokens back to ETH)
   *  @param amount Number of tokens exchanged
   *  Anyone can redeem while contract is active
  \******************************************************/
  function redeemTokens(uint amount) public autobidActive {
    // NOTE: redeemTokens will only work once the sender has approved 
    // the RedemptionContract address for the deposit amount 
    require(Token(token).transferFrom(msg.sender, this, amount));

    uint redemptionValue = amount / exchangeRate; 

    msg.sender.transfer(redemptionValue);

    // Fire Redemption event
    Redemption(msg.sender, amount, redemptionValue);
  }

  /**************************************************************\
   *  @dev Expires contract if any expiration criteria is met
   *  (declared as public function to allow direct manual call)
  \**************************************************************/
  function expirationCheck() public {
    // If expirationTime has been passed, contract expires
    if (now > expirationTime) {
      active = false;
    }

    // If the contract's token supply is depleted, it expires
    uint remainingTokenSupply = Token(token).balanceOf(this);
    if (remainingTokenSupply < exchangeRate) {
      active = false;
    }
  }

  /*****************************************************\
   *  @dev Withdraw function (ETH)
   *  @param amount Quantity of ETH (in wei) withdrawn
   *  Admin can only withdraw after contract expires
  \*****************************************************/
  function adminWithdraw(uint amount) public autobidExpired onlyAdmin {
    // Send ETH
    msg.sender.transfer(amount);

    // Fire Redemption event
    Redemption(msg.sender, 0, amount);
  }

  /********************************************************\
   *  @dev Withdraw function (tokens)
   *  @param amount Quantity of tokens withdrawn
   *  Admin can only access tokens after contract expires
  \********************************************************/
  function adminWithdrawTokens(uint amount) public autobidExpired onlyAdmin {
    // Send tokens
    require(Token(token).transfer(msg.sender, amount));

    // Fire TokenClaim event
    TokenClaim(token, msg.sender, 0, amount);
  }

  /********************************************************\
   *  @dev Withdraw function (for miscellaneous tokens)
   *  @param tokenContract Address of the token contract
   *  @param amount Quantity of tokens withdrawn
   *  Admin can only access tokens after contract expires
  \********************************************************/
  function adminWithdrawMiscTokens(address tokenContract, uint amount) public autobidExpired onlyAdmin {
    // Send tokens
    require(Token(tokenContract).transfer(msg.sender, amount));

    // Fire TokenClaim event
    TokenClaim(tokenContract, msg.sender, 0, amount);
  }
}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"active","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"exchangeRate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"tokenContract","type":"address"},{"name":"amount","type":"uint256"}],"name":"adminWithdrawMiscTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"expirationCheck","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"adminWithdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"adminWithdrawTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"redeemTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"expirationTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"admin","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_admin","type":"address"},{"name":"_token","type":"address"},{"name":"_exchangeRate","type":"uint256"},{"name":"_expirationTime","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"tokenContract","type":"address"},{"indexed":false,"name":"claimant","type":"address"},{"indexed":false,"name":"ethDeposited","type":"uint256"},{"indexed":false,"name":"tokensGranted","type":"uint256"}],"name":"TokenClaim","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"redeemer","type":"address"},{"indexed":false,"name":"tokensDeposited","type":"uint256"},{"indexed":false,"name":"redemptionAmount","type":"uint256"}],"name":"Redemption","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052341561000f57600080fd5b604051608080610ec883398101604052808051906020019091908051906020019091908051906020019091908051906020019091905050836000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600281905550806003819055506001600460006101000a81548160ff02191690831515021790555050505050610dc5806101036000396000f3006060604052600436106100a4576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302fb0c5e1461029f5780633ba0b9a9146102cc5780634cc87328146102f55780636a1b52e1146103375780637c5b4a371461034c578063921496a91461036f578063a6e158f814610392578063da284dcc146103b5578063f851a440146103de578063fc0c546a14610433575b6000600460009054906101000a900460ff1615156100c157600080fd5b600354421015156100d157600080fd5b60025434029050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15156101a557600080fd5b6102c65a03f115156101b657600080fd5b5050506040518051905015156101cb57600080fd5b6101d3610488565b7f31671a028c4f8a6ae2f6d30ffb98ae3bc4cd3f5d48298fda18fc85e91080bd37600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16333484604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200194505050505060405180910390a150005b34156102aa57600080fd5b6102b26105bb565b604051808215151515815260200191505060405180910390f35b34156102d757600080fd5b6102df6105ce565b6040518082815260200191505060405180910390f35b341561030057600080fd5b610335600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506105d4565b005b341561034257600080fd5b61034a610488565b005b341561035757600080fd5b61036d60048080359060200190919050506107c8565b005b341561037a57600080fd5b61039060048080359060200190919050506108f6565b005b341561039d57600080fd5b6103b36004808035906020019091905050610b2d565b005b34156103c057600080fd5b6103c8610d48565b6040518082815260200191505060405180910390f35b34156103e957600080fd5b6103f1610d4e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561043e57600080fd5b610446610d73565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006003544211156104b0576000600460006101000a81548160ff0219169083151502179055505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561057557600080fd5b6102c65a03f1151561058657600080fd5b5050506040518051905090506002548110156105b8576000600460006101000a81548160ff0219169083151502179055505b50565b600460009054906101000a900460ff1681565b60025481565b600460009054906101000a900460ff161515156105f057600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561064b57600080fd5b8173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15156106f657600080fd5b6102c65a03f1151561070757600080fd5b50505060405180519050151561071c57600080fd5b7f31671a028c4f8a6ae2f6d30ffb98ae3bc4cd3f5d48298fda18fc85e91080bd378233600084604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200194505050505060405180910390a15050565b600460009054906101000a900460ff161515156107e457600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561083f57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561087f57600080fd5b7feebddeddf4ae1ee54a48517af27958e7666d69c7ba2e3e7c2b0ff87ef5f4491e33600083604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a150565b600460009054906101000a900460ff1615151561091257600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561096d57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515610a3a57600080fd5b6102c65a03f11515610a4b57600080fd5b505050604051805190501515610a6057600080fd5b7f31671a028c4f8a6ae2f6d30ffb98ae3bc4cd3f5d48298fda18fc85e91080bd37600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633600084604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200194505050505060405180910390a150565b6000600460009054906101000a900460ff161515610b4a57600080fd5b60035442101515610b5a57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856000604051602001526040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1515610c5b57600080fd5b6102c65a03f11515610c6c57600080fd5b505050604051805190501515610c8157600080fd5b60025482811515610c8e57fe5b0490503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501515610cd157600080fd5b7feebddeddf4ae1ee54a48517af27958e7666d69c7ba2e3e7c2b0ff87ef5f4491e338383604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a15050565b60035481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a723058201ee638d73b89d8b0e1074c98f927e2da135242e09a8d6b95b5312552ea2c667c002900000000000000000000000000c3ba03b5671a17ea80056aec8bb7200d75d139000000000000000000000000c8fb9ad6f78ded4d9cf0fbdfcf3833f4b00ad7740000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000005b5fb940

    Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000c3ba03b5671a17ea80056aec8bb7200d75d139000000000000000000000000c8fb9ad6f78ded4d9cf0fbdfcf3833f4b00ad7740000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000005b5fb940

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000000c3ba03b5671a17ea80056aec8bb7200d75d139
Arg [1] : 000000000000000000000000c8fb9ad6f78ded4d9cf0fbdfcf3833f4b00ad774
Arg [2] : 0000000000000000000000000000000000000000000000000000000000002710
Arg [3] : 000000000000000000000000000000000000000000000000000000005b5fb940


   Swarm Source:
bzzr://1ee638d73b89d8b0e1074c98f927e2da135242e09a8d6b95b5312552ea2c667c

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.