ETH Price: $2,666.93 (-11.87%)
Gas: 7.6 Gwei
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

TokenTracker

Multichain Info

No addresses found
Age:30D
Reset Filter

Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Age:30D
Reset Filter

Advanced mode:
Parent Transaction Hash Method Block
From
To

There are no matching entries

Update your filters to view other transactions

View All Internal Transactions
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Mainsale

Compiler Version
v0.4.18+commit.9cf6e910

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2017-11-23
*/

pragma solidity ^0.4.18;

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {
  function mul(uint256 a, uint256 b) internal constant returns (uint256) {
    uint256 c = a * b;
    assert(a == 0 || c / a == b);
    return c;
  }

  function div(uint256 a, uint256 b) internal constant returns (uint256) {
    // assert(b > 0); // Solidity automatically throws when dividing by 0
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold
    return c;
  }

  function sub(uint256 a, uint256 b) internal constant returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  function add(uint256 a, uint256 b) internal constant returns (uint256) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
  }
}

contract Mainsale {

  using SafeMath for uint256;

  address public owner;
  address public multisig;
  uint256 public endTimestamp;
  uint256 public totalRaised;
  uint256 public constant hardCap = 19333 ether;
  uint256 public constant MIN_CONTRIBUTION = 0.1 ether;
  uint256 public constant MAX_CONTRIBUTION = 1000 ether;
  uint256 public constant THIRTY_DAYS = 60 * 60 * 24 * 30;

  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }

  modifier belowCap() {
    require(totalRaised < hardCap);
    _;
  }

  modifier withinTimeLimit() {
    require(block.timestamp <= endTimestamp);
    _;
  }

  function Mainsale(address _multisig, uint256 _endTimestamp) {
    require (_multisig != 0 && _endTimestamp >= (block.timestamp + THIRTY_DAYS));
    owner = msg.sender;
    multisig = _multisig;
    endTimestamp = _endTimestamp;
  }
  
  function() payable belowCap withinTimeLimit {
    require(msg.value >= MIN_CONTRIBUTION && msg.value <= MAX_CONTRIBUTION);
    totalRaised = totalRaised.add(msg.value);
    uint contribution = msg.value;
    if (totalRaised > hardCap) {
      uint refundAmount = totalRaised.sub(hardCap);
      msg.sender.transfer(refundAmount);
      contribution = contribution.sub(refundAmount);
      refundAmount = 0;
      totalRaised = hardCap;
    }
    multisig.transfer(contribution);
  }

  function withdrawStuck() onlyOwner {
    multisig.transfer(this.balance);
  }

}

Contract Security Audit

Contract ABI

API
[{"constant":true,"inputs":[],"name":"MIN_CONTRIBUTION","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"multisig","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdrawStuck","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_CONTRIBUTION","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"THIRTY_DAYS","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"endTimestamp","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalRaised","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"hardCap","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_multisig","type":"address"},{"name":"_endTimestamp","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"}]

6060604052341561000f57600080fd5b60405160408061043c8339810160405280805191906020018051915050600160a060020a03821615801590610049575062278d0042018110155b151561005457600080fd5b60008054600160a060020a03338116600160a060020a03199283161790925560018054949092169316929092179091556002556103a6806100966000396000f3006060604052600436106100985763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166340650c9181146101c95780634783c35b146101ee57806367a1bd551461021d5780638da5cb5b1461023257806394d95f8f14610245578063a21df9f014610258578063a85adeab1461026b578063c5c4744c1461027e578063fb86a40414610291575b6000806904180b458d6042f400006003541015156100b557600080fd5b6002544211156100c457600080fd5b67016345785d8a000034101580156100e55750683635c9adc5dea000003411155b15156100f057600080fd5b600354610103903463ffffffff6102a416565b60038190553492506904180b458d6042f400009011156101925760035461013a906904180b458d6042f4000063ffffffff6102ba16565b9050600160a060020a03331681156108fc0282604051600060405180830381858888f19350505050151561016d57600080fd5b61017d828263ffffffff6102ba16565b6904180b458d6042f400006003559150600090505b600154600160a060020a031682156108fc0283604051600060405180830381858888f1935050505015156101c557600080fd5b5050005b34156101d457600080fd5b6101dc6102cc565b60405190815260200160405180910390f35b34156101f957600080fd5b6102016102d8565b604051600160a060020a03909116815260200160405180910390f35b341561022857600080fd5b6102306102e7565b005b341561023d57600080fd5b61020161033d565b341561025057600080fd5b6101dc61034c565b341561026357600080fd5b6101dc610359565b341561027657600080fd5b6101dc610360565b341561028957600080fd5b6101dc610366565b341561029c57600080fd5b6101dc61036c565b6000828201838110156102b357fe5b9392505050565b6000828211156102c657fe5b50900390565b67016345785d8a000081565b600154600160a060020a031681565b60005433600160a060020a0390811691161461030257600080fd5b600154600160a060020a039081169030163180156108fc0290604051600060405180830381858888f19350505050151561033b57600080fd5b565b600054600160a060020a031681565b683635c9adc5dea0000081565b62278d0081565b60025481565b60035481565b6904180b458d6042f40000815600a165627a7a72305820a390ab36114d69468acca69a4392ac407a72505895aca47e8e6be6bd9148cdd10029000000000000000000000000fbe55de3383ec44c39ff839fbaf9a6d769251544000000000000000000000000000000000000000000000000000000005a403f7f

Deployed Bytecode

0x6060604052600436106100985763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166340650c9181146101c95780634783c35b146101ee57806367a1bd551461021d5780638da5cb5b1461023257806394d95f8f14610245578063a21df9f014610258578063a85adeab1461026b578063c5c4744c1461027e578063fb86a40414610291575b6000806904180b458d6042f400006003541015156100b557600080fd5b6002544211156100c457600080fd5b67016345785d8a000034101580156100e55750683635c9adc5dea000003411155b15156100f057600080fd5b600354610103903463ffffffff6102a416565b60038190553492506904180b458d6042f400009011156101925760035461013a906904180b458d6042f4000063ffffffff6102ba16565b9050600160a060020a03331681156108fc0282604051600060405180830381858888f19350505050151561016d57600080fd5b61017d828263ffffffff6102ba16565b6904180b458d6042f400006003559150600090505b600154600160a060020a031682156108fc0283604051600060405180830381858888f1935050505015156101c557600080fd5b5050005b34156101d457600080fd5b6101dc6102cc565b60405190815260200160405180910390f35b34156101f957600080fd5b6102016102d8565b604051600160a060020a03909116815260200160405180910390f35b341561022857600080fd5b6102306102e7565b005b341561023d57600080fd5b61020161033d565b341561025057600080fd5b6101dc61034c565b341561026357600080fd5b6101dc610359565b341561027657600080fd5b6101dc610360565b341561028957600080fd5b6101dc610366565b341561029c57600080fd5b6101dc61036c565b6000828201838110156102b357fe5b9392505050565b6000828211156102c657fe5b50900390565b67016345785d8a000081565b600154600160a060020a031681565b60005433600160a060020a0390811691161461030257600080fd5b600154600160a060020a039081169030163180156108fc0290604051600060405180830381858888f19350505050151561033b57600080fd5b565b600054600160a060020a031681565b683635c9adc5dea0000081565b62278d0081565b60025481565b60035481565b6904180b458d6042f40000815600a165627a7a72305820a390ab36114d69468acca69a4392ac407a72505895aca47e8e6be6bd9148cdd10029

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

000000000000000000000000fbe55de3383ec44c39ff839fbaf9a6d769251544000000000000000000000000000000000000000000000000000000005a403f7f

-----Decoded View---------------
Arg [0] : _multisig (address): 0xfBE55DE3383ec44c39FF839FbAF9A6d769251544
Arg [1] : _endTimestamp (uint256): 1514159999

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000fbe55de3383ec44c39ff839fbaf9a6d769251544
Arg [1] : 000000000000000000000000000000000000000000000000000000005a403f7f


Swarm Source

bzzr://a390ab36114d69468acca69a4392ac407a72505895aca47e8e6be6bd9148cdd1

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.