ETH Price: $3,294.45 (+1.36%)

Contract

0x669B7D1eC5F80ad1C86A19AA2Aa592b47EdabE96
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Stake For Period132526772021-09-18 23:29:381209 days ago1632007778IN
0x669B7D1e...47EdabE96
0 ETH0.0036945334.7152499
Stake For Period127708262021-07-06 0:52:131284 days ago1625532733IN
0x669B7D1e...47EdabE96
0 ETH0.0006553111
Stake For Period127708232021-07-06 0:51:111284 days ago1625532671IN
0x669B7D1e...47EdabE96
0 ETH0.000670211.25
Stake For Period119375922021-02-27 5:56:081413 days ago1614405368IN
0x669B7D1e...47EdabE96
0 ETH0.0042868880
Stake For Period119314002021-02-26 7:11:561414 days ago1614323516IN
0x669B7D1e...47EdabE96
0 ETH0.0058473109.12
Stake For Period119313682021-02-26 7:03:531414 days ago1614323033IN
0x669B7D1e...47EdabE96
0 ETH0.0053157399.2
Stake For Period119313382021-02-26 6:58:431414 days ago1614322723IN
0x669B7D1e...47EdabE96
0 ETH0.00632314118.00000145
Stake For Period117987842021-02-05 21:50:291434 days ago1612561829IN
0x669B7D1e...47EdabE96
0 ETH0.02087905194
Stake For Period117667732021-01-31 23:25:271439 days ago1612135527IN
0x669B7D1e...47EdabE96
0 ETH0.00669825125
Stake For Period117667692021-01-31 23:24:571439 days ago1612135497IN
0x669B7D1e...47EdabE96
0 ETH0.00546577102
Stake For Period117666062021-01-31 22:49:531439 days ago1612133393IN
0x669B7D1e...47EdabE96
0 ETH0.00584087109
Stake For Period117340332021-01-26 22:14:021444 days ago1611699242IN
0x669B7D1e...47EdabE96
0 ETH0.002679350
Stake For Period117312262021-01-26 12:16:451445 days ago1611663405IN
0x669B7D1e...47EdabE96
0 ETH0.0054882151.00000145
Stake For Period117263862021-01-25 18:01:161445 days ago1611597676IN
0x669B7D1e...47EdabE96
0 ETH0.0067803163
Stake For Period117261972021-01-25 17:22:081446 days ago1611595328IN
0x669B7D1e...47EdabE96
0 ETH0.0102231495
Stake For Period117261682021-01-25 17:14:541446 days ago1611594894IN
0x669B7D1e...47EdabE96
0 ETH0.0053574100
Stake For Period117220662021-01-25 2:14:581446 days ago1611540898IN
0x669B7D1e...47EdabE96
0 ETH0.0049823893.00000145
Stake For Period117220412021-01-25 2:09:491446 days ago1611540589IN
0x669B7D1e...47EdabE96
0 ETH0.00565741105.60000023
Stake For Period117220332021-01-25 2:07:531446 days ago1611540473IN
0x669B7D1e...47EdabE96
0 ETH0.004928892
Stake For Period117160392021-01-24 3:54:311447 days ago1611460471IN
0x669B7D1e...47EdabE96
0 ETH0.0056825452.8
Stake For Period117130212021-01-23 16:56:211448 days ago1611420981IN
0x669B7D1e...47EdabE96
0 ETH0.0037501870
Stake For Period117129932021-01-23 16:50:481448 days ago1611420648IN
0x669B7D1e...47EdabE96
0 ETH0.0046073686
Stake For Period117129852021-01-23 16:49:381448 days ago1611420578IN
0x669B7D1e...47EdabE96
0 ETH0.0046073686
Stake For Period117129772021-01-23 16:47:581448 days ago1611420478IN
0x669B7D1e...47EdabE96
0 ETH0.0041787778
Stake For Period117129442021-01-23 16:39:281448 days ago1611419968IN
0x669B7D1e...47EdabE96
0 ETH0.0042859280
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DenGovernance

Compiler Version
v0.5.12+commit.7709ece9

Optimization Enabled:
Yes with 9999 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2021-01-16
*/

pragma solidity >=0.5.12;


/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see {ERC20Detailed}.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     *
     * _Available since v2.4.0._
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 *
 * _Since v2.5.0:_ this module is now much more gas efficient, given net gas
 * metering changes introduced in the Istanbul hardfork.
 */
contract ReentrancyGuard {
    bool private _notEntered;

    constructor () internal {
        // Storing an initial non-zero value makes deployment a bit more
        // expensive, but in exchange the refund on every call to nonReentrant
        // will be lower in amount. Since refunds are capped to a percetange of
        // the total transaction's gas, it is best to keep them low in cases
        // like this one, to increase the likelihood of the full refund coming
        // into effect.
        _notEntered = true;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_notEntered, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _notEntered = false;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _notEntered = true;
    }
}

/**
 * @title ERC165
 * @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md
 */
interface IERC165 {

    /**
     * @notice Query if a contract implements an interface
     * @dev Interface identification is specified in ERC-165. This function
     * uses less than 30,000 gas
     * @param _interfaceId The interface identifier, as specified in ERC-165
     */
    function supportsInterface(bytes4 _interfaceId)
    external
    view
    returns (bool);
}

/**
 * @dev ERC-1155 interface for accepting safe transfers.
 */
interface IERC1155TokenReceiver {

  /**
   * @notice Handle the receipt of a single ERC1155 token type
   * @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeTransferFrom` after the balance has been updated
   * This function MAY throw to revert and reject the transfer
   * Return of other amount than the magic value MUST result in the transaction being reverted
   * Note: The token contract address is always the message sender
   * @param _operator  The address which called the `safeTransferFrom` function
   * @param _from      The address which previously owned the token
   * @param _id        The id of the token being transferred
   * @param _amount    The amount of tokens being transferred
   * @param _data      Additional data with no specified format
   * @return           `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
   */
  function onERC1155Received(address _operator, address _from, uint256 _id, uint256 _amount, bytes calldata _data) external returns(bytes4);

  /**
   * @notice Handle the receipt of multiple ERC1155 token types
   * @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeBatchTransferFrom` after the balances have been updated
   * This function MAY throw to revert and reject the transfer
   * Return of other amount than the magic value WILL result in the transaction being reverted
   * Note: The token contract address is always the message sender
   * @param _operator  The address which called the `safeBatchTransferFrom` function
   * @param _from      The address which previously owned the token
   * @param _ids       An array containing ids of each token being transferred
   * @param _amounts   An array containing amounts of each token being transferred
   * @param _data      Additional data with no specified format
   * @return           `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
   */
  function onERC1155BatchReceived(address _operator, address _from, uint256[] calldata _ids, uint256[] calldata _amounts, bytes calldata _data) external returns(bytes4);

  /**
   * @notice Indicates whether a contract implements the `ERC1155TokenReceiver` functions and so can accept ERC1155 token types.
   * @param  interfaceID The ERC-165 interface ID that is queried for support.s
   * @dev This function MUST return true if it implements the ERC1155TokenReceiver interface and ERC-165 interface.
   *      This function MUST NOT consume more than 5,000 gas.
   * @return Wheter ERC-165 or ERC1155TokenReceiver interfaces are supported.
   */
  function supportsInterface(bytes4 interfaceID) external view returns (bool);

}

interface IERC1155 {
	function safeTransferFrom(
		address _from,
		address _to,
		uint256 _id,
		uint256 _amount,
		bytes calldata _data
	) external;

	function balanceOf(address _owner, uint256 _id) external view returns (uint256);

	function burn(uint256 id, uint256 amount) external;
}

contract DenGovernance is ReentrancyGuard {
	event PeriodAdded(uint256 periodId, uint256 endEpoch, uint256 lotId, uint256 maxIssuance);
	event Staked(address owner, uint256 periodId, uint256 quantity);
	event Withdrawn(address, uint256);

	using SafeMath for uint256;

	struct GovernancePeriod {
		address tokenAddress;
		uint256 amount;
		uint256 startEpoch;
		uint256 endEpoch;
		uint256 lotId;
		uint256 issued;
		uint256 maxIssuance;
		uint256 fee; // 1 decimal allowed Example: 3.5% = 35
		uint256 feesCollected;
		uint256 deposited;
		uint256 withdrawn;
	}

	mapping(uint256 => GovernancePeriod) public governancePeriods;
	mapping(address => bool) public protectedTokens;

	uint256 public totalPeriods;
	address public lotAddress;
	address public denGovernance;

	constructor(address _denGovernance, address _lotAddress) public {
		denGovernance = _denGovernance;
		lotAddress = _lotAddress;
	}

	modifier onlyDenGovernance {
		require(msg.sender == denGovernance, "not owner");
		_;
	}

	function withdrawCollectedFees(uint256 periodId) public nonReentrant() onlyDenGovernance {
		GovernancePeriod storage gp = governancePeriods[periodId];
		uint256 amountToWithdraw = gp.feesCollected;
		gp.feesCollected = 0;
		require(IERC20(gp.tokenAddress).transfer(denGovernance, amountToWithdraw), "token transfer failed");
		emit Withdrawn(denGovernance, amountToWithdraw);
	}

	function stakeForPeriod(uint256 periodId, uint256 quantity) public {
		GovernancePeriod storage gp = governancePeriods[periodId];

		require(block.timestamp >= gp.startEpoch, "period not open");
		require(block.timestamp <= gp.endEpoch, "period has ended");
		require(gp.issued.add(quantity) <= gp.maxIssuance, "requested quantity higher than available");

		uint256 depositAmount = gp.amount.mul(quantity);
		uint256 allowance = IERC20(gp.tokenAddress).allowance(msg.sender, address(this));
		require(allowance >= depositAmount, "You need to set a higher allowance");

		// charge a fee
		uint256 feeAmount = depositAmount.mul(gp.fee).div(1000);
		uint256 maxWithdrawAmount = depositAmount.sub(feeAmount);

		gp.feesCollected = gp.feesCollected.add(feeAmount);
		gp.deposited = gp.deposited.add(maxWithdrawAmount);
		gp.issued = gp.issued.add(quantity);

		require(
			IERC20(gp.tokenAddress).transferFrom(msg.sender, address(this), depositAmount),
			"token transfer failed"
		);
		require(IERC1155(lotAddress).balanceOf(address(this), gp.lotId) >= quantity, "lot not present");
		IERC1155(lotAddress).safeTransferFrom(address(this), msg.sender, gp.lotId, quantity, "");

		emit Staked(msg.sender, periodId, quantity);
	}

	function withdrawable(uint256 periodId) public view returns (bool) {
		if (governancePeriods[periodId].endEpoch >= block.timestamp) return true;
		return false;
	}

	function getOwnerBalance(address owner, uint256 periodId)
		public
		view
		returns (uint256 lotBalance, uint256 lpBalance)
	{
		GovernancePeriod memory gp = governancePeriods[periodId];

		lotBalance = IERC1155(lotAddress).balanceOf(owner, gp.lotId);
		if (lotBalance > gp.issued) return (lotBalance, 0);
		lpBalance = lotBalance.mul(gp.deposited.div(gp.issued));

		return (lotBalance, lpBalance);
	}

	function _createGovernancePeriod(
		address tokenAddress,
		uint256 lotId,
		uint256 maxIssuance,
		uint256 amount,
		uint256 fee,
		uint256 startEpoch,
		uint256 endEpoch
	) internal nonReentrant() {
		require(fee < 1000, "fee is too high");
		require(endEpoch > startEpoch, "end is before start");
		require(endEpoch > block.timestamp, "epoch has passed");
		uint256 periodId = totalPeriods;

		GovernancePeriod memory period =
			GovernancePeriod({
				tokenAddress: tokenAddress,
				amount: amount,
				startEpoch: startEpoch,
				endEpoch: endEpoch,
				lotId: lotId,
				issued: 0,
				maxIssuance: maxIssuance,
				fee: fee,
				feesCollected: 0,
				deposited: 0,
				withdrawn: 0
			});

		protectedTokens[tokenAddress] = true;
		governancePeriods[periodId] = period;
		totalPeriods++;

		emit PeriodAdded(periodId, endEpoch, lotId, maxIssuance);
	}

	function _withdraw(
		address owner,
		uint256 periodId,
		uint256 lotId,
		uint256 amount
	) internal nonReentrant() {
		GovernancePeriod storage gp = governancePeriods[periodId];

		require(block.timestamp >= gp.endEpoch, "period has not ended");
		require(lotId == gp.lotId, "lot sent for period is not correct");
		require(amount <= gp.issued, "invalid amount");

		uint256 withdrawableLp = amount.mul(gp.deposited.div(gp.issued));
		require(gp.withdrawn.add(withdrawableLp) <= gp.deposited, "invalid amount requested");
		gp.withdrawn = gp.withdrawn.add(withdrawableLp);

		IERC1155(lotAddress).burn(gp.lotId, amount);
		require(IERC20(gp.tokenAddress).transfer(owner, withdrawableLp), "token transfer failed");

		emit Withdrawn(owner, amount);
	}

	function sweep(address token) external onlyDenGovernance {
		require(!protectedTokens[token], "token is protected");
		IERC20(token).transfer(denGovernance, IERC20(token).balanceOf(address(this)));
	}

	// bytes4(keccak256(_createGovernancePeriod()));
	bytes4 internal constant CREATEPERIOD_SIG = 0xa3b05fe3;

	// bytes4(keccak256(_withdraw(uint256)));
	bytes4 internal constant WITHDRAW_SIG = 0xac6a2b5d;

	/**
	 * @dev Will pass to onERC1155Batch5Received
	 */
	function onERC1155Received(
		address _operator,
		address _from,
		uint256 _id,
		uint256 _amount,
		bytes memory _data
	) public returns (bytes4) {
		uint256[] memory ids = new uint256[](1);
		uint256[] memory amounts = new uint256[](1);

		ids[0] = _id;
		amounts[0] = _amount;

		require(
			this.onERC1155BatchReceived.selector == onERC1155BatchReceived(_operator, _from, ids, amounts, _data),
			"invalid on receive message"
		);

		return this.onERC1155Received.selector;
	}

	function onERC1155BatchReceived(
		address _operator,
		address _from,
		uint256[] memory _ids,
		uint256[] memory _amounts,
		bytes memory _data
	) public returns (bytes4) {
		// Transferred token needs to be LOT
		require(msg.sender == address(lotAddress), "invalid token address");
		require(_ids.length == 1, "invalid LOT amount");

		// Obtain method to call via object signature
		bytes4 functionSignature = abi.decode(_data, (bytes4));

		/***********************************|
        |            Deposit LOT            |
        |__________________________________*/

		if (functionSignature == CREATEPERIOD_SIG) {
			require(_operator == denGovernance, "operator must be den governance");

			(, address tokenAddress, uint256 amount, uint256 fee, uint256 startEpoch, uint256 endEpoch) =
				abi.decode(_data, (bytes4, address, uint256, uint256, uint256, uint256));
			// 0xa3b05fe300000000000000000000000000000000000000000000000000000000
			_createGovernancePeriod(tokenAddress, _ids[0], _amounts[0], amount, fee, startEpoch, endEpoch);

			/***********************************|
            |           Withdraw LOT            |
            |__________________________________*/
		} else if (functionSignature == WITHDRAW_SIG) {
			(, uint256 periodId) = abi.decode(_data, (bytes4, uint256));

			_withdraw(_from, periodId, _ids[0], _amounts[0]);
		} else {
			revert("invalid method");
		}

		// Return success
		return this.onERC1155BatchReceived.selector;
	}

	function supportsInterface(bytes4 interfaceID) external pure returns (bool) {
		return
			interfaceID == 0x01ffc9a7 || // ERC-165 support
			interfaceID == 0x4e2312e0; // ERC-1155 `ERC1155TokenReceiver` support
	}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_denGovernance","type":"address"},{"internalType":"address","name":"_lotAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"periodId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endEpoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lotId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxIssuance","type":"uint256"}],"name":"PeriodAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"periodId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"Withdrawn","type":"event"},{"constant":true,"inputs":[],"name":"denGovernance","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"periodId","type":"uint256"}],"name":"getOwnerBalance","outputs":[{"internalType":"uint256","name":"lotBalance","type":"uint256"},{"internalType":"uint256","name":"lpBalance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"governancePeriods","outputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"startEpoch","type":"uint256"},{"internalType":"uint256","name":"endEpoch","type":"uint256"},{"internalType":"uint256","name":"lotId","type":"uint256"},{"internalType":"uint256","name":"issued","type":"uint256"},{"internalType":"uint256","name":"maxIssuance","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"uint256","name":"feesCollected","type":"uint256"},{"internalType":"uint256","name":"deposited","type":"uint256"},{"internalType":"uint256","name":"withdrawn","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lotAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"protectedTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"periodId","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"stakeForPeriod","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"sweep","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalPeriods","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"periodId","type":"uint256"}],"name":"withdrawCollectedFees","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"periodId","type":"uint256"}],"name":"withdrawable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b506040516123193803806123198339818101604052604081101561003357600080fd5b5080516020909101516000805460ff19166001179055600580546001600160a01b039384166001600160a01b03199182161790915560048054939092169216919091179055612292806100876000396000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c80636ed785ff1161008c578063bc197c8111610066578063bc197c81146102f4578063f11988e0146104fd578063f23a6e611461051a578063fea708f6146105f2576100df565b80636ed785ff1461029e5780636fa6032c146102bb57806389c24a00146102ec576100df565b80632652d0b5116100bd5780632652d0b51461019f57806335cade7d146102295780636a479fd31461024c576100df565b806301681a62146100e457806301ffc9a71461011957806303d681851461016c575b600080fd5b610117600480360360208110156100fa57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661060c565b005b6101586004803603602081101561012f57600080fd5b50357fffffffff000000000000000000000000000000000000000000000000000000001661083d565b604080519115158252519081900360200190f35b6101586004803603602081101561018257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166108d8565b6101bc600480360360208110156101b557600080fd5b50356108ed565b6040805173ffffffffffffffffffffffffffffffffffffffff909c168c5260208c019a909a528a8a019890985260608a0196909652608089019490945260a088019290925260c087015260e086015261010085015261012084015261014083015251908190036101600190f35b6101176004803603604081101561023f57600080fd5b508035906020013561095e565b6102856004803603604081101561026257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610efa565b6040805192835260208301919091528051918290030190f35b610117600480360360208110156102b457600080fd5b5035611084565b6102c36112ca565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6102c36112e6565b6104c8600480360360a081101561030a57600080fd5b73ffffffffffffffffffffffffffffffffffffffff823581169260208101359091169181019060608101604082013564010000000081111561034b57600080fd5b82018360208201111561035d57600080fd5b8035906020019184602083028401116401000000008311171561037f57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092959493602081019350359150506401000000008111156103cf57600080fd5b8201836020820111156103e157600080fd5b8035906020019184602083028401116401000000008311171561040357600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929594936020810193503591505064010000000081111561045357600080fd5b82018360208201111561046557600080fd5b8035906020019184600183028401116401000000008311171561048757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611302945050505050565b604080517fffffffff000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b6101586004803603602081101561051357600080fd5b5035611643565b6104c8600480360360a081101561053057600080fd5b73ffffffffffffffffffffffffffffffffffffffff823581169260208101359091169160408201359160608101359181019060a08101608082013564010000000081111561057d57600080fd5b82018360208201111561058f57600080fd5b803590602001918460018302840111640100000000831117156105b157600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061166b945050505050565b6105fa6117b7565b60408051918252519081900360200190f35b60055473ffffffffffffffffffffffffffffffffffffffff163314610678576040805162461bcd60e51b815260206004820152600960248201527f6e6f74206f776e65720000000000000000000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081526002602052604090205460ff16156106f3576040805162461bcd60e51b815260206004820152601260248201527f746f6b656e2069732070726f7465637465640000000000000000000000000000604482015290519081900360640190fd5b600554604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff8085169363a9059cbb9391169184916370a08231916024808301926020929190829003018186803b15801561076e57600080fd5b505afa158015610782573d6000803e3d6000fd5b505050506040513d602081101561079857600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff909316600484015260248301919091525160448083019260209291908290030181600087803b15801561080e57600080fd5b505af1158015610822573d6000803e3d6000fd5b505050506040513d602081101561083857600080fd5b505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614806108d057507f4e2312e0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b90505b919050565b60026020526000908152604090205460ff1681565b600160208190526000918252604090912080549181015460028201546003830154600484015460058501546006860154600787015460088801546009890154600a9099015473ffffffffffffffffffffffffffffffffffffffff909a1699979896979596949593949293919290918b565b600082815260016020526040902060028101544210156109c5576040805162461bcd60e51b815260206004820152600f60248201527f706572696f64206e6f74206f70656e0000000000000000000000000000000000604482015290519081900360640190fd5b8060030154421115610a1e576040805162461bcd60e51b815260206004820152601060248201527f706572696f642068617320656e64656400000000000000000000000000000000604482015290519081900360640190fd5b60068101546005820154610a38908463ffffffff6117bd16565b1115610a755760405162461bcd60e51b81526004018080602001828103825260288152602001806121d16028913960400191505060405180910390fd5b6001810154600090610a8d908463ffffffff61182016565b8254604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152336004820152306024820152905192935060009273ffffffffffffffffffffffffffffffffffffffff9092169163dd62ed3e91604480820192602092909190829003018186803b158015610b0957600080fd5b505afa158015610b1d573d6000803e3d6000fd5b505050506040513d6020811015610b3357600080fd5b5051905081811015610b765760405162461bcd60e51b815260040180806020018281038252602281526020018061221b6022913960400191505060405180910390fd5b6000610ba16103e8610b9586600701548661182090919063ffffffff16565b9063ffffffff61187916565b90506000610bb5848363ffffffff6118bb16565b6008860154909150610bcd908363ffffffff6117bd16565b60088601556009850154610be7908263ffffffff6117bd16565b60098601556005850154610c01908763ffffffff6117bd16565b60058601558454604080517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101879052905173ffffffffffffffffffffffffffffffffffffffff909216916323b872dd916064808201926020929091908290030181600087803b158015610c8557600080fd5b505af1158015610c99573d6000803e3d6000fd5b505050506040513d6020811015610caf57600080fd5b5051610d02576040805162461bcd60e51b815260206004820152601560248201527f746f6b656e207472616e73666572206661696c65640000000000000000000000604482015290519081900360640190fd5b6004805486820154604080517efdd58e0000000000000000000000000000000000000000000000000000000081523094810194909452602484019190915251889273ffffffffffffffffffffffffffffffffffffffff9092169162fdd58e916044808301926020929190829003018186803b158015610d8057600080fd5b505afa158015610d94573d6000803e3d6000fd5b505050506040513d6020811015610daa57600080fd5b50511015610dff576040805162461bcd60e51b815260206004820152600f60248201527f6c6f74206e6f742070726573656e740000000000000000000000000000000000604482015290519081900360640190fd5b6004805486820154604080517ff242432a000000000000000000000000000000000000000000000000000000008152309481019490945233602485015260448401919091526064830189905260a06084840152600060a48401819052905173ffffffffffffffffffffffffffffffffffffffff9092169263f242432a9260e4808301939282900301818387803b158015610e9857600080fd5b505af1158015610eac573d6000803e3d6000fd5b505060408051338152602081018b90528082018a905290517f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee909350908190036060019150a150505050505050565b600080610f05612160565b50600083815260016020818152604092839020835161016081018552815473ffffffffffffffffffffffffffffffffffffffff908116825293820154818401526002820154818601526003820154606082015260048083015460808301819052600584015460a0840152600684015460c0840152600784015460e084015260088401546101008401526009840154610120840152600a90930154610140830152805486517efdd58e0000000000000000000000000000000000000000000000000000000081528b871692810192909252602482019390935294519094919093169262fdd58e92604480840193919291829003018186803b15801561100857600080fd5b505afa15801561101c573d6000803e3d6000fd5b505050506040513d602081101561103257600080fd5b505160a082015190935083111561104d57506000905061107d565b61107961106c8260a0015183610120015161187990919063ffffffff16565b849063ffffffff61182016565b9150505b9250929050565b60005460ff166110db576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6000805460ff1916905560055473ffffffffffffffffffffffffffffffffffffffff163314611151576040805162461bcd60e51b815260206004820152600960248201527f6e6f74206f776e65720000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600081815260016020908152604080832060088101805490859055815460055484517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821660048201526024810184905294519396929591169363a9059cbb9360448083019491928390030190829087803b1580156111e757600080fd5b505af11580156111fb573d6000803e3d6000fd5b505050506040513d602081101561121157600080fd5b5051611264576040805162461bcd60e51b815260206004820152601560248201527f746f6b656e207472616e73666572206661696c65640000000000000000000000604482015290519081900360640190fd5b6005546040805173ffffffffffffffffffffffffffffffffffffffff90921682526020820183905280517f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d59281900390910190a150506000805460ff1916600117905550565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b60045460009073ffffffffffffffffffffffffffffffffffffffff163314611371576040805162461bcd60e51b815260206004820152601560248201527f696e76616c696420746f6b656e20616464726573730000000000000000000000604482015290519081900360640190fd5b83516001146113c7576040805162461bcd60e51b815260206004820152601260248201527f696e76616c6964204c4f5420616d6f756e740000000000000000000000000000604482015290519081900360640190fd5b60008280602001905160208110156113de57600080fd5b505190507fffffffff0000000000000000000000000000000000000000000000000000000081167fa3b05fe30000000000000000000000000000000000000000000000000000000014156115245760055473ffffffffffffffffffffffffffffffffffffffff88811691161461149b576040805162461bcd60e51b815260206004820152601f60248201527f6f70657261746f72206d7573742062652064656e20676f7665726e616e636500604482015290519081900360640190fd5b60008060008060008780602001905160c08110156114b857600080fd5b50602081015160408201516060830151608084015160a0909401518e51939950919750955091935090915061151a9086908c906000906114f457fe5b60200260200101518b60008151811061150957fe5b6020026020010151878787876118fd565b5050505050611617565b7fffffffff0000000000000000000000000000000000000000000000000000000081167fac6a2b5d0000000000000000000000000000000000000000000000000000000014156115ca57600083806020019051604081101561158557600080fd5b506020015186519091506115c4908890839089906000906115a257fe5b6020026020010151886000815181106115b757fe5b6020026020010151611c65565b50611617565b6040805162461bcd60e51b815260206004820152600e60248201527f696e76616c6964206d6574686f64000000000000000000000000000000000000604482015290519081900360640190fd5b507fbc197c81000000000000000000000000000000000000000000000000000000009695505050505050565b6000818152600160205260408120600301544211611663575060016108d3565b506000919050565b6040805160018082528183019092526000916060919060208083019080388339505060408051600180825281830190925292935060609291506020808301908038833901905050905085826000815181106116c257fe5b60200260200101818152505084816000815181106116dc57fe5b6020026020010181815250506116f58888848488611302565b7fffffffff00000000000000000000000000000000000000000000000000000000167fbc197c81000000000000000000000000000000000000000000000000000000001461178a576040805162461bcd60e51b815260206004820152601a60248201527f696e76616c6964206f6e2072656365697665206d657373616765000000000000604482015290519081900360640190fd5b507ff23a6e6100000000000000000000000000000000000000000000000000000000979650505050505050565b60035481565b600082820183811015611817576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b60008261182f5750600061181a565b8282028284828161183c57fe5b04146118175760405162461bcd60e51b815260040180806020018281038252602181526020018061223d6021913960400191505060405180910390fd5b600061181783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612064565b600061181783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612106565b60005460ff16611954576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6000805460ff191690556103e883106119b4576040805162461bcd60e51b815260206004820152600f60248201527f66656520697320746f6f20686967680000000000000000000000000000000000604482015290519081900360640190fd5b818111611a08576040805162461bcd60e51b815260206004820152601360248201527f656e64206973206265666f726520737461727400000000000000000000000000604482015290519081900360640190fd5b428111611a5c576040805162461bcd60e51b815260206004820152601060248201527f65706f6368206861732070617373656400000000000000000000000000000000604482015290519081900360640190fd5b600354611a67612160565b6040518061016001604052808a73ffffffffffffffffffffffffffffffffffffffff168152602001878152602001858152602001848152602001898152602001600081526020018881526020018681526020016000815260200160008152602001600081525090506001600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550806001600084815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e082015181600701556101008201518160080155610120820151816009015561014082015181600a01559050506003600081548092919060010191905055507f3a49af221a739f6f6c67c7b3c2225ef75722cf00540ad8fc91774545b6c4ffc182848a8a6040518085815260200184815260200183815260200182815260200194505050505060405180910390a150506000805460ff1916600117905550505050505050565b60005460ff16611cbc576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6000805460ff191681558381526001602052604090206003810154421015611d2b576040805162461bcd60e51b815260206004820152601460248201527f706572696f6420686173206e6f7420656e646564000000000000000000000000604482015290519081900360640190fd5b80600401548314611d6d5760405162461bcd60e51b81526004018080602001828103825260228152602001806121f96022913960400191505060405180910390fd5b8060050154821115611dc6576040805162461bcd60e51b815260206004820152600e60248201527f696e76616c696420616d6f756e74000000000000000000000000000000000000604482015290519081900360640190fd5b6000611de661106c8360050154846009015461187990919063ffffffff16565b90508160090154611e048284600a01546117bd90919063ffffffff16565b1115611e57576040805162461bcd60e51b815260206004820152601860248201527f696e76616c696420616d6f756e74207265717565737465640000000000000000604482015290519081900360640190fd5b600a820154611e6c908263ffffffff6117bd16565b600a8301556004805481840154604080517fb390c0ab00000000000000000000000000000000000000000000000000000000815293840191909152602483018690525173ffffffffffffffffffffffffffffffffffffffff9091169163b390c0ab91604480830192600092919082900301818387803b158015611eee57600080fd5b505af1158015611f02573d6000803e3d6000fd5b50508354604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015260248201879052915191909216935063a9059cbb925060448083019260209291908290030181600087803b158015611f8157600080fd5b505af1158015611f95573d6000803e3d6000fd5b505050506040513d6020811015611fab57600080fd5b5051611ffe576040805162461bcd60e51b815260206004820152601560248201527f746f6b656e207472616e73666572206661696c65640000000000000000000000604482015290519081900360640190fd5b6040805173ffffffffffffffffffffffffffffffffffffffff881681526020810185905281517f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5929181900390910190a150506000805460ff1916600117905550505050565b600081836120f05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156120b557818101518382015260200161209d565b50505050905090810190601f1680156120e25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816120fc57fe5b0495945050505050565b600081848411156121585760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156120b557818101518382015260200161209d565b505050900390565b604051806101600160405280600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152509056fe726571756573746564207175616e7469747920686967686572207468616e20617661696c61626c656c6f742073656e7420666f7220706572696f64206973206e6f7420636f7272656374596f75206e65656420746f2073657420612068696768657220616c6c6f77616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a72315820bb7a135251bab864d041ef3929772cf85389cc0c65fc794c7cf2e56c7ce8998664736f6c634300050c00320000000000000000000000003f1421cb6f1c12d7bdc4b99b474e5a06786965300000000000000000000000005fb784ed9d2e5b2eca16cb8f467e03a8b7ea22cd

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100df5760003560e01c80636ed785ff1161008c578063bc197c8111610066578063bc197c81146102f4578063f11988e0146104fd578063f23a6e611461051a578063fea708f6146105f2576100df565b80636ed785ff1461029e5780636fa6032c146102bb57806389c24a00146102ec576100df565b80632652d0b5116100bd5780632652d0b51461019f57806335cade7d146102295780636a479fd31461024c576100df565b806301681a62146100e457806301ffc9a71461011957806303d681851461016c575b600080fd5b610117600480360360208110156100fa57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661060c565b005b6101586004803603602081101561012f57600080fd5b50357fffffffff000000000000000000000000000000000000000000000000000000001661083d565b604080519115158252519081900360200190f35b6101586004803603602081101561018257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166108d8565b6101bc600480360360208110156101b557600080fd5b50356108ed565b6040805173ffffffffffffffffffffffffffffffffffffffff909c168c5260208c019a909a528a8a019890985260608a0196909652608089019490945260a088019290925260c087015260e086015261010085015261012084015261014083015251908190036101600190f35b6101176004803603604081101561023f57600080fd5b508035906020013561095e565b6102856004803603604081101561026257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610efa565b6040805192835260208301919091528051918290030190f35b610117600480360360208110156102b457600080fd5b5035611084565b6102c36112ca565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6102c36112e6565b6104c8600480360360a081101561030a57600080fd5b73ffffffffffffffffffffffffffffffffffffffff823581169260208101359091169181019060608101604082013564010000000081111561034b57600080fd5b82018360208201111561035d57600080fd5b8035906020019184602083028401116401000000008311171561037f57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092959493602081019350359150506401000000008111156103cf57600080fd5b8201836020820111156103e157600080fd5b8035906020019184602083028401116401000000008311171561040357600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929594936020810193503591505064010000000081111561045357600080fd5b82018360208201111561046557600080fd5b8035906020019184600183028401116401000000008311171561048757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611302945050505050565b604080517fffffffff000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b6101586004803603602081101561051357600080fd5b5035611643565b6104c8600480360360a081101561053057600080fd5b73ffffffffffffffffffffffffffffffffffffffff823581169260208101359091169160408201359160608101359181019060a08101608082013564010000000081111561057d57600080fd5b82018360208201111561058f57600080fd5b803590602001918460018302840111640100000000831117156105b157600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061166b945050505050565b6105fa6117b7565b60408051918252519081900360200190f35b60055473ffffffffffffffffffffffffffffffffffffffff163314610678576040805162461bcd60e51b815260206004820152600960248201527f6e6f74206f776e65720000000000000000000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081526002602052604090205460ff16156106f3576040805162461bcd60e51b815260206004820152601260248201527f746f6b656e2069732070726f7465637465640000000000000000000000000000604482015290519081900360640190fd5b600554604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff8085169363a9059cbb9391169184916370a08231916024808301926020929190829003018186803b15801561076e57600080fd5b505afa158015610782573d6000803e3d6000fd5b505050506040513d602081101561079857600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff909316600484015260248301919091525160448083019260209291908290030181600087803b15801561080e57600080fd5b505af1158015610822573d6000803e3d6000fd5b505050506040513d602081101561083857600080fd5b505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614806108d057507f4e2312e0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b90505b919050565b60026020526000908152604090205460ff1681565b600160208190526000918252604090912080549181015460028201546003830154600484015460058501546006860154600787015460088801546009890154600a9099015473ffffffffffffffffffffffffffffffffffffffff909a1699979896979596949593949293919290918b565b600082815260016020526040902060028101544210156109c5576040805162461bcd60e51b815260206004820152600f60248201527f706572696f64206e6f74206f70656e0000000000000000000000000000000000604482015290519081900360640190fd5b8060030154421115610a1e576040805162461bcd60e51b815260206004820152601060248201527f706572696f642068617320656e64656400000000000000000000000000000000604482015290519081900360640190fd5b60068101546005820154610a38908463ffffffff6117bd16565b1115610a755760405162461bcd60e51b81526004018080602001828103825260288152602001806121d16028913960400191505060405180910390fd5b6001810154600090610a8d908463ffffffff61182016565b8254604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152336004820152306024820152905192935060009273ffffffffffffffffffffffffffffffffffffffff9092169163dd62ed3e91604480820192602092909190829003018186803b158015610b0957600080fd5b505afa158015610b1d573d6000803e3d6000fd5b505050506040513d6020811015610b3357600080fd5b5051905081811015610b765760405162461bcd60e51b815260040180806020018281038252602281526020018061221b6022913960400191505060405180910390fd5b6000610ba16103e8610b9586600701548661182090919063ffffffff16565b9063ffffffff61187916565b90506000610bb5848363ffffffff6118bb16565b6008860154909150610bcd908363ffffffff6117bd16565b60088601556009850154610be7908263ffffffff6117bd16565b60098601556005850154610c01908763ffffffff6117bd16565b60058601558454604080517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101879052905173ffffffffffffffffffffffffffffffffffffffff909216916323b872dd916064808201926020929091908290030181600087803b158015610c8557600080fd5b505af1158015610c99573d6000803e3d6000fd5b505050506040513d6020811015610caf57600080fd5b5051610d02576040805162461bcd60e51b815260206004820152601560248201527f746f6b656e207472616e73666572206661696c65640000000000000000000000604482015290519081900360640190fd5b6004805486820154604080517efdd58e0000000000000000000000000000000000000000000000000000000081523094810194909452602484019190915251889273ffffffffffffffffffffffffffffffffffffffff9092169162fdd58e916044808301926020929190829003018186803b158015610d8057600080fd5b505afa158015610d94573d6000803e3d6000fd5b505050506040513d6020811015610daa57600080fd5b50511015610dff576040805162461bcd60e51b815260206004820152600f60248201527f6c6f74206e6f742070726573656e740000000000000000000000000000000000604482015290519081900360640190fd5b6004805486820154604080517ff242432a000000000000000000000000000000000000000000000000000000008152309481019490945233602485015260448401919091526064830189905260a06084840152600060a48401819052905173ffffffffffffffffffffffffffffffffffffffff9092169263f242432a9260e4808301939282900301818387803b158015610e9857600080fd5b505af1158015610eac573d6000803e3d6000fd5b505060408051338152602081018b90528082018a905290517f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee909350908190036060019150a150505050505050565b600080610f05612160565b50600083815260016020818152604092839020835161016081018552815473ffffffffffffffffffffffffffffffffffffffff908116825293820154818401526002820154818601526003820154606082015260048083015460808301819052600584015460a0840152600684015460c0840152600784015460e084015260088401546101008401526009840154610120840152600a90930154610140830152805486517efdd58e0000000000000000000000000000000000000000000000000000000081528b871692810192909252602482019390935294519094919093169262fdd58e92604480840193919291829003018186803b15801561100857600080fd5b505afa15801561101c573d6000803e3d6000fd5b505050506040513d602081101561103257600080fd5b505160a082015190935083111561104d57506000905061107d565b61107961106c8260a0015183610120015161187990919063ffffffff16565b849063ffffffff61182016565b9150505b9250929050565b60005460ff166110db576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6000805460ff1916905560055473ffffffffffffffffffffffffffffffffffffffff163314611151576040805162461bcd60e51b815260206004820152600960248201527f6e6f74206f776e65720000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600081815260016020908152604080832060088101805490859055815460055484517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821660048201526024810184905294519396929591169363a9059cbb9360448083019491928390030190829087803b1580156111e757600080fd5b505af11580156111fb573d6000803e3d6000fd5b505050506040513d602081101561121157600080fd5b5051611264576040805162461bcd60e51b815260206004820152601560248201527f746f6b656e207472616e73666572206661696c65640000000000000000000000604482015290519081900360640190fd5b6005546040805173ffffffffffffffffffffffffffffffffffffffff90921682526020820183905280517f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d59281900390910190a150506000805460ff1916600117905550565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b60045460009073ffffffffffffffffffffffffffffffffffffffff163314611371576040805162461bcd60e51b815260206004820152601560248201527f696e76616c696420746f6b656e20616464726573730000000000000000000000604482015290519081900360640190fd5b83516001146113c7576040805162461bcd60e51b815260206004820152601260248201527f696e76616c6964204c4f5420616d6f756e740000000000000000000000000000604482015290519081900360640190fd5b60008280602001905160208110156113de57600080fd5b505190507fffffffff0000000000000000000000000000000000000000000000000000000081167fa3b05fe30000000000000000000000000000000000000000000000000000000014156115245760055473ffffffffffffffffffffffffffffffffffffffff88811691161461149b576040805162461bcd60e51b815260206004820152601f60248201527f6f70657261746f72206d7573742062652064656e20676f7665726e616e636500604482015290519081900360640190fd5b60008060008060008780602001905160c08110156114b857600080fd5b50602081015160408201516060830151608084015160a0909401518e51939950919750955091935090915061151a9086908c906000906114f457fe5b60200260200101518b60008151811061150957fe5b6020026020010151878787876118fd565b5050505050611617565b7fffffffff0000000000000000000000000000000000000000000000000000000081167fac6a2b5d0000000000000000000000000000000000000000000000000000000014156115ca57600083806020019051604081101561158557600080fd5b506020015186519091506115c4908890839089906000906115a257fe5b6020026020010151886000815181106115b757fe5b6020026020010151611c65565b50611617565b6040805162461bcd60e51b815260206004820152600e60248201527f696e76616c6964206d6574686f64000000000000000000000000000000000000604482015290519081900360640190fd5b507fbc197c81000000000000000000000000000000000000000000000000000000009695505050505050565b6000818152600160205260408120600301544211611663575060016108d3565b506000919050565b6040805160018082528183019092526000916060919060208083019080388339505060408051600180825281830190925292935060609291506020808301908038833901905050905085826000815181106116c257fe5b60200260200101818152505084816000815181106116dc57fe5b6020026020010181815250506116f58888848488611302565b7fffffffff00000000000000000000000000000000000000000000000000000000167fbc197c81000000000000000000000000000000000000000000000000000000001461178a576040805162461bcd60e51b815260206004820152601a60248201527f696e76616c6964206f6e2072656365697665206d657373616765000000000000604482015290519081900360640190fd5b507ff23a6e6100000000000000000000000000000000000000000000000000000000979650505050505050565b60035481565b600082820183811015611817576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b60008261182f5750600061181a565b8282028284828161183c57fe5b04146118175760405162461bcd60e51b815260040180806020018281038252602181526020018061223d6021913960400191505060405180910390fd5b600061181783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612064565b600061181783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612106565b60005460ff16611954576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6000805460ff191690556103e883106119b4576040805162461bcd60e51b815260206004820152600f60248201527f66656520697320746f6f20686967680000000000000000000000000000000000604482015290519081900360640190fd5b818111611a08576040805162461bcd60e51b815260206004820152601360248201527f656e64206973206265666f726520737461727400000000000000000000000000604482015290519081900360640190fd5b428111611a5c576040805162461bcd60e51b815260206004820152601060248201527f65706f6368206861732070617373656400000000000000000000000000000000604482015290519081900360640190fd5b600354611a67612160565b6040518061016001604052808a73ffffffffffffffffffffffffffffffffffffffff168152602001878152602001858152602001848152602001898152602001600081526020018881526020018681526020016000815260200160008152602001600081525090506001600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550806001600084815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e082015181600701556101008201518160080155610120820151816009015561014082015181600a01559050506003600081548092919060010191905055507f3a49af221a739f6f6c67c7b3c2225ef75722cf00540ad8fc91774545b6c4ffc182848a8a6040518085815260200184815260200183815260200182815260200194505050505060405180910390a150506000805460ff1916600117905550505050505050565b60005460ff16611cbc576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6000805460ff191681558381526001602052604090206003810154421015611d2b576040805162461bcd60e51b815260206004820152601460248201527f706572696f6420686173206e6f7420656e646564000000000000000000000000604482015290519081900360640190fd5b80600401548314611d6d5760405162461bcd60e51b81526004018080602001828103825260228152602001806121f96022913960400191505060405180910390fd5b8060050154821115611dc6576040805162461bcd60e51b815260206004820152600e60248201527f696e76616c696420616d6f756e74000000000000000000000000000000000000604482015290519081900360640190fd5b6000611de661106c8360050154846009015461187990919063ffffffff16565b90508160090154611e048284600a01546117bd90919063ffffffff16565b1115611e57576040805162461bcd60e51b815260206004820152601860248201527f696e76616c696420616d6f756e74207265717565737465640000000000000000604482015290519081900360640190fd5b600a820154611e6c908263ffffffff6117bd16565b600a8301556004805481840154604080517fb390c0ab00000000000000000000000000000000000000000000000000000000815293840191909152602483018690525173ffffffffffffffffffffffffffffffffffffffff9091169163b390c0ab91604480830192600092919082900301818387803b158015611eee57600080fd5b505af1158015611f02573d6000803e3d6000fd5b50508354604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015260248201879052915191909216935063a9059cbb925060448083019260209291908290030181600087803b158015611f8157600080fd5b505af1158015611f95573d6000803e3d6000fd5b505050506040513d6020811015611fab57600080fd5b5051611ffe576040805162461bcd60e51b815260206004820152601560248201527f746f6b656e207472616e73666572206661696c65640000000000000000000000604482015290519081900360640190fd5b6040805173ffffffffffffffffffffffffffffffffffffffff881681526020810185905281517f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5929181900390910190a150506000805460ff1916600117905550505050565b600081836120f05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156120b557818101518382015260200161209d565b50505050905090810190601f1680156120e25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816120fc57fe5b0495945050505050565b600081848411156121585760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156120b557818101518382015260200161209d565b505050900390565b604051806101600160405280600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152509056fe726571756573746564207175616e7469747920686967686572207468616e20617661696c61626c656c6f742073656e7420666f7220706572696f64206973206e6f7420636f7272656374596f75206e65656420746f2073657420612068696768657220616c6c6f77616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a72315820bb7a135251bab864d041ef3929772cf85389cc0c65fc794c7cf2e56c7ce8998664736f6c634300050c0032

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

0000000000000000000000003f1421cb6f1c12d7bdc4b99b474e5a06786965300000000000000000000000005fb784ed9d2e5b2eca16cb8f467e03a8b7ea22cd

-----Decoded View---------------
Arg [0] : _denGovernance (address): 0x3f1421CB6F1C12d7bDC4b99b474E5A0678696530
Arg [1] : _lotAddress (address): 0x5Fb784Ed9d2e5b2ECA16cb8F467E03A8B7EA22cD

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000003f1421cb6f1c12d7bdc4b99b474e5a0678696530
Arg [1] : 0000000000000000000000005fb784ed9d2e5b2eca16cb8f467e03a8b7ea22cd


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ 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.