Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
6657199 | 2299 days ago | 0.1 ETH |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x3A698418...b0c9F1078 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
Auctionify
Compiler Version
v0.4.25+commit.59dbf8f1
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-10-30 */ pragma solidity ^0.4.22; /// @title Auctionify, A platform to auction stuff, using ethereum /// @author Auctionify.xyz /// @notice This is the stand alone version of the auction /// // @dev All function calls are currently implement without side effects contract Auctionify { // Parameters of the auction. // Time is absolute unix timestamps address public beneficiary; uint public auctionEnd; string public auctionTitle; string public auctionDescription; uint public minimumBid; // Escrow address public escrowModerator; //bool public escrowEnabled; // Current state of the auction. address public highestBidder; // List of all the bids mapping(address => uint) public bids; // State of the Auction enum AuctionStates { Started, Ongoing, Ended } AuctionStates public auctionState; //modifiers modifier auctionNotEnded() { // Revert the call if the bidding // period is over. require( now < auctionEnd, // do not front-run me miners "Auction already ended." ); require( auctionState != AuctionStates.Ended, "Auction already ended." ); _; } //modifiers modifier isMinimumBid() { // If the bid is higher than minimumBid require( msg.value >= minimumBid, "The value is smaller than minimum bid." ); _; } modifier isHighestBid() { // If the bid is not higher than higestBid, // send the money back. require( msg.value > bids[highestBidder], "There already is a higher bid." ); _; } modifier onlyHighestBidderOrEscrow() { // only highestBidder or the moderator can call. // Also callable if no one has bidded if ((msg.sender == highestBidder) || (msg.sender == escrowModerator) || (highestBidder == address(0))) { _; } else{ revert(); } } // Events that will be fired on changes. event HighestBidIncreased(address bidder, uint amount); event AuctionEnded(address winner, uint amount); event CheaterBidder(address cheater, uint amount); constructor( string _auctionTitle, uint _auctionEnd, address _beneficiary, string _auctionDesc, uint _minimumBid, bool _escrowEnabled, bool _listed ) public { auctionTitle = _auctionTitle; beneficiary = _beneficiary; auctionEnd = _auctionEnd; auctionDescription = _auctionDesc; auctionState = AuctionStates.Started; minimumBid = _minimumBid; if (_escrowEnabled) { // TODO: get moderatorID, (delegate moderator list to a ens resolver) escrowModerator = address(0x32cEfb2dC869BBfe636f7547CDa43f561Bf88d5A); //TODO: ENS resolver for auctionify.eth } if (_listed) { // TODO: List in the registrar } } /// @author Auctionify.xyz /// @notice Bid on the auction with the amount of `msg.value` /// The lesser value will be refunded. /// updates highestBidder /// @dev should satisfy auctionNotEnded(), isMinimumBid(), isHighestBid() function bid() public payable auctionNotEnded isMinimumBid isHighestBid { // No arguments are necessary, all // information is already part of // the transaction. if (highestBidder != address(0)) { //refund the last highest bid uint lastBid = bids[highestBidder]; bids[highestBidder] = 0; if(!highestBidder.send(lastBid)) { // if failed to send, the bid is kept in the contract emit CheaterBidder(highestBidder, lastBid); } } //set the new highestBidder highestBidder = msg.sender; bids[msg.sender] = msg.value; //change state and trigger event auctionState = AuctionStates.Ongoing; emit HighestBidIncreased(msg.sender, msg.value); } /// @author auctionify.xyz /// @notice Getter function for highestBid `bids[highestBidder]` /// @dev View only function, free /// @return the highest bid value function highestBid() public view returns(uint){ return (bids[highestBidder]); } /// End the auction and send the highest bid /// to the beneficiary. /// @author auctionify.xyz /// @notice Ends the auction and sends the `bids[highestBidder]` to `beneficiary` /// @dev onlyHighestBidderOrEscrow, after `auctionEnd`, only if `auctionState != AuctionStates.Ended` function endAuction() public onlyHighestBidderOrEscrow { // 1. Conditions require(now >= auctionEnd, "Auction not yet ended."); require(auctionState != AuctionStates.Ended, "Auction has already ended."); // 2. Effects auctionState = AuctionStates.Ended; emit AuctionEnded(highestBidder, bids[highestBidder]); // 3. Interaction. send the money to the beneficiary if(!beneficiary.send(bids[highestBidder])) { // if failed to send, the final bid is kept in the contract // the funds can be released using cleanUpAfterYourself() } } /// @author auctionify.xyz /// @notice selfdestructs and sends the balance to `escrowModerator` or `beneficiary` /// @dev only if `auctionState == AuctionStates.Ended` function cleanUpAfterYourself() public { require(auctionState == AuctionStates.Ended, "Auction is not ended."); if (escrowModerator != address(0)) { selfdestruct(escrowModerator); } else { selfdestruct(beneficiary); //save blockchain space, save lives } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":false,"inputs":[],"name":"bid","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"auctionDescription","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"auctionEnd","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"beneficiary","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"bids","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"auctionState","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"highestBidder","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"auctionTitle","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"escrowModerator","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"cleanUpAfterYourself","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"minimumBid","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"highestBid","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"endAuction","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_auctionTitle","type":"string"},{"name":"_auctionEnd","type":"uint256"},{"name":"_beneficiary","type":"address"},{"name":"_auctionDesc","type":"string"},{"name":"_minimumBid","type":"uint256"},{"name":"_escrowEnabled","type":"bool"},{"name":"_listed","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"bidder","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"HighestBidIncreased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"winner","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"AuctionEnded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"cheater","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"CheaterBidder","type":"event"}]
Deployed Bytecode
0x6080604052600436106100c45763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631998aeef81146100c95780631dceace8146100d35780632a24f46c1461015d57806338af3eed1461018457806362ea82db146101b55780637fb45099146101d657806391f901571461020f578063a17bf88414610224578063bb2d237214610239578063d37b82aa1461024e578063d3a8638614610263578063d57bde7914610278578063fe67a54b1461028d575b600080fd5b6100d16102a2565b005b3480156100df57600080fd5b506100e8610577565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012257818101518382015260200161010a565b50505050905090810190601f16801561014f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561016957600080fd5b50610172610605565b60408051918252519081900360200190f35b34801561019057600080fd5b5061019961060b565b60408051600160a060020a039092168252519081900360200190f35b3480156101c157600080fd5b50610172600160a060020a036004351661061a565b3480156101e257600080fd5b506101eb61062c565b604051808260028111156101fb57fe5b60ff16815260200191505060405180910390f35b34801561021b57600080fd5b50610199610635565b34801561023057600080fd5b506100e8610644565b34801561024557600080fd5b5061019961069c565b34801561025a57600080fd5b506100d16106ab565b34801561026f57600080fd5b50610172610742565b34801561028457600080fd5b50610172610748565b34801561029957600080fd5b506100d1610766565b60015460009042106102fe576040805160e560020a62461bcd02815260206004820152601660248201527f41756374696f6e20616c726561647920656e6465642e00000000000000000000604482015290519081900360640190fd5b600260085460ff16600281111561031157fe5b1415610367576040805160e560020a62461bcd02815260206004820152601660248201527f41756374696f6e20616c726561647920656e6465642e00000000000000000000604482015290519081900360640190fd5b6004543410156103e7576040805160e560020a62461bcd02815260206004820152602660248201527f5468652076616c756520697320736d616c6c6572207468616e206d696e696d7560448201527f6d206269642e0000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600654600160a060020a03166000908152600760205260409020543411610458576040805160e560020a62461bcd02815260206004820152601e60248201527f546865726520616c7265616479206973206120686967686572206269642e0000604482015290519081900360640190fd5b600654600160a060020a0316156104f9575060068054600160a060020a039081166000908152600760205260408082208054908390559354905192169183156108fc0291849190818181858888f1935050505015156104f95760065460408051600160a060020a0390921682526020820183905280517fa1b60e980b75e8b9b39e4d6017a6398e1e37e9269560093a3530e52d5e56668b9281900390910190a15b6006805473ffffffffffffffffffffffffffffffffffffffff19163390811790915560008181526007602090815260409182902034908190556008805460ff1916600117905582519384529083015280517ff4757a49b326036464bec6fe419a4ae38c8a02ce3e68bf0809674f6aab8ad3009281900390910190a150565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105fd5780601f106105d2576101008083540402835291602001916105fd565b820191906000526020600020905b8154815290600101906020018083116105e057829003601f168201915b505050505081565b60015481565b600054600160a060020a031681565b60076020526000908152604090205481565b60085460ff1681565b600654600160a060020a031681565b6002805460408051602060018416156101000260001901909316849004601f810184900484028201840190925281815292918301828280156105fd5780601f106105d2576101008083540402835291602001916105fd565b600554600160a060020a031681565b600260085460ff1660028111156106be57fe5b14610713576040805160e560020a62461bcd02815260206004820152601560248201527f41756374696f6e206973206e6f7420656e6465642e0000000000000000000000604482015290519081900360640190fd5b600554600160a060020a03161561073257600554600160a060020a0316ff5b600054600160a060020a0316ff5b565b60045481565b600654600160a060020a031660009081526007602052604090205490565b600654600160a060020a03163314806107895750600554600160a060020a031633145b8061079d5750600654600160a060020a0316155b156100c4576001544210156107fc576040805160e560020a62461bcd02815260206004820152601660248201527f41756374696f6e206e6f742079657420656e6465642e00000000000000000000604482015290519081900360640190fd5b600260085460ff16600281111561080f57fe5b1415610865576040805160e560020a62461bcd02815260206004820152601a60248201527f41756374696f6e2068617320616c726561647920656e6465642e000000000000604482015290519081900360640190fd5b6008805460ff19166002179055600654600160a060020a03166000818152600760209081526040918290205482519384529083015280517fdaec4582d5d9595688c8c98545fdd1c696d41c6aeaeb636737e84ed2f5c00eda9281900390910190a160008054600654600160a060020a03908116835260076020526040808420549051919092169282156108fc02929190818181858888f150505050506107405600a165627a7a72305820930a565c6108b2dca9089ebd41e6284f276f98060d51fc6216d044a5fa739d520029
Swarm Source
bzzr://930a565c6108b2dca9089ebd41e6284f276f98060d51fc6216d044a5fa739d52
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
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.