Transactions
Token Transfers
Tokens
Internal Transactions
Coin Balance History
Logs
Code
Read Contract
Write Contract
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
This contract has been verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- Auction
- Optimization enabled
- true
- Compiler version
- v0.8.20+commit.a1b79de6
- Optimization runs
- 200
- EVM Version
- shanghai
- Verified at
- 2024-01-09T18:29:40.916576Z
Constructor Arguments
0000000000000000000000006f0dda6b522fcc7807ccaca4d37ef6958e95e1b90000000000000000000000007f683aac0e76b270f0ebb1383a08c5b3b0d65d0e
Arg [0] (address) : 0x6f0dda6b522fcc7807ccaca4d37ef6958e95e1b9
Arg [1] (address) : 0x7f683aac0e76b270f0ebb1383a08c5b3b0d65d0e
Auction.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/proxy/utils/Initializable.sol";
/** @notice Pension contract Interface */
interface PensionContractInterface {
/**
* @notice Create CDP tokens
* @param _amount Amount to create
* @param _day The day for which the tokens are minted
* @dev The Pension contracts mints the tokens from the CDPToken contract
*/
function mintCDP(
uint256 _amount,
uint256 _day
) external;
/**
* @notice Create shares
* @param _recipient Address of the recipient
* @param _amount Amount to create
*/
function mintShares(
address _recipient,
uint256 _amount
) external;
/**
* @notice View function to get the total amount of shares in the system
* @return totalShares Total amount of shares in the system
*/
function gettotalShares() external view returns (uint256);
/**
* @notice Calculate the amount of shares to be auctioned
* @return sharesDistributedinAuction Shares to be auctioned today
*/
function BurnSharesfromAuction() external returns (uint256);
}
/**
* @title Auction and daily updater for the Carpe Diem Pension system
* @author Carpe Diem
* @notice Updates the entire system and auctions shares for PLS each 20 hours
* @dev Part of a system of three contracts. The other two are called Pension and CDPToken
*/
contract Auction is Ownable, Initializable {
/**
* @notice Auction entry of the user
* @param addr Address of the user
* @param timestamp Time of the event
* @param entryAmountPLS Amount of PLS deposited
* @param day Day of the system
*/
event UserEnterAuction(
address indexed addr,
uint256 timestamp,
uint256 entryAmountPLS,
uint256 day
);
/**
* @notice Collected shares from the auction by the user
* @param addr Address of the user
* @param timestamp Time of the event
* @param day Day of the system
* @param tokenAmount Amount of shares collected
*/
event UsercollectAuctionShares(
address indexed addr,
uint256 timestamp,
uint256 day,
uint256 tokenAmount
);
/**
* @notice End mark of the auction for a certain day
* @param timestamp Time of the event
* @param day Day of the system
* @param PLSTotal Amount of PLS deposited for the day
* @param tokenTotal Amount of shares auctioned for the day
*/
event DailyAuctionEnd(
uint256 timestamp,
uint256 day,
uint256 PLSTotal,
uint256 tokenTotal
);
/**
* @notice Start of the system
* @param timestamp Time of the event
*/
event AuctionStarted(
uint256 timestamp
);
/** @notice Address that receives PLS */
address public immutable swiss_addr;
/** @notice Record the current day of the system */
uint256 public currentDay;
struct userAuctionEntry {
uint256 totalDepositsPLS; // Total PLS deposited by the user for the day
uint256 day; // Day of the system
bool hasCollected; // Whether the user has collected its shares
}
/**
* @notice Information about the auction participant
* @dev Users are allowed to enter multiple times a day
*/
mapping(address => mapping(uint256 => userAuctionEntry))
public mapUserAuctionEntry;
/** @notice Total PLS deposited for the day */
mapping(uint256 => uint256) public PLSauctionDeposits;
/** @notice Total shares distributed for the day */
mapping(uint256 => uint256) public shares;
/** @notice Total CDP minted for the day */
mapping(uint256 => uint256) public CDPMinted;
/** @notice Start time of the system used to calculate the days */
uint256 public launchTime;
/** @notice CDPToken address */
address public immutable CDP;
/** @notice Total amount of PLS deposited */
uint256 public totalPLSdeposited;
/** @notice Address of the Pension contract */
address public immutable PensionContractAddress;
/**
* @notice Construct the contract
* @param _CDP Address of the CDPToken contract
* @param _pensionaddress Address of the pension contract
*/
constructor(
address _CDP,
address _pensionaddress
) Ownable(msg.sender) {
swiss_addr = msg.sender;
CDP = _CDP;
PensionContractAddress = _pensionaddress;
}
receive() external payable {}
/**
* @notice Start the system
* @dev Called when we're ready to start the auction
*/
function startAuction() external onlyOwner initializer {
launchTime = block.timestamp;
currentDay = 1;
renounceOwnership();
emit AuctionStarted(block.timestamp);
}
/**
* @notice Calculate the current day based off the start time
*/
function calcDay() public view returns (uint256) {
if (launchTime == 0) return 0;
return ((block.timestamp - launchTime) / 20 hours) + 1;
}
/**
* @notice Update the system for the day
* @notice Mints daily inflation
* @dev Called daily, can be done manually in explorer. For security, all tokens are kept inside the contract.
*/
function doDailyUpdate() public {
uint256 _nextDay = calcDay();
uint256 _currentDay = currentDay;
// This is true once a day
if (_currentDay != _nextDay) {
// Mints the CDP for the current day
_mintDailyCDPandShares(_currentDay);
// Mints CDP for days that were skipped
for(uint256 i = _currentDay + 1; i < _nextDay; i++) {
_mintPastDailyCDP(i);
}
emit DailyAuctionEnd(
block.timestamp,
currentDay,
PLSauctionDeposits[currentDay],
shares[currentDay]
);
currentDay = _nextDay;
}
}
/**
* @notice Enter the auction by depositing PLS
* @dev Enter the Auction for the current day
*/
function enterAuction() external payable {
require(
(launchTime > 0),
"Project not launched"
);
require(
msg.value > 0,
"Value is 0"
);
doDailyUpdate();
uint256 _currentDay = currentDay;
PLSauctionDeposits[_currentDay] += msg.value;
mapUserAuctionEntry[msg.sender][_currentDay] = userAuctionEntry({
totalDepositsPLS: mapUserAuctionEntry[msg.sender][_currentDay]
.totalDepositsPLS + msg.value,
day: _currentDay,
hasCollected: false
});
totalPLSdeposited += msg.value;
emit UserEnterAuction(
msg.sender,
block.timestamp,
msg.value,
_currentDay
);
}
/**
* @notice Collect shares for day `targetDay`
* @dev External function for collecting shares from auction
* @param targetDay Target day of Auction to collect
*/
function collectAuctionShares(
uint256 targetDay
) external {
require(
mapUserAuctionEntry[msg.sender][targetDay].hasCollected == false,
"Tokens already collected for day"
);
require(
targetDay < currentDay,
"Cannot collect tokens for current active day"
);
uint256 _sharesToPay = calcTokenValue(msg.sender, targetDay);
mapUserAuctionEntry[msg.sender][targetDay].hasCollected = true;
PensionContractInterface(PensionContractAddress).mintShares(
msg.sender,
_sharesToPay
);
emit UsercollectAuctionShares(
msg.sender,
block.timestamp,
targetDay,
_sharesToPay
);
}
/**
* @notice Calculate the amount of shares for user `_address` for day `_Day`
* @dev Calculating user's share from Auction based on their deposits for the day
* @param _Day The Auction day
* @return _tokenValue Amount of shares
*/
function calcTokenValue(
address _address,
uint256 _Day
) public view returns (uint256 _tokenValue) {
uint256 _entryDay = mapUserAuctionEntry[_address][_Day].day;
if (shares[_entryDay] == 0) {
return 0;
}
if (_entryDay < currentDay) {
_tokenValue =
(shares[_entryDay] *
mapUserAuctionEntry[_address][_Day].totalDepositsPLS) /
PLSauctionDeposits[_entryDay];
}
return _tokenValue;
}
/**
* @notice Send PLS to `swiss_addr`
* @notice Caller pays network fees, but cannot expect to receive anything in return
*/
function withdrawPLS() external {
uint256 _bal = address(this).balance;
(bool sent, ) = payable(swiss_addr).call{value: _bal}("");
require(sent, "Failed to withdraw PLS");
}
/**
* @dev Mints CDP in Pension contract and shares for the day
* @param _day Day to mint the CDP + shares for
*/
function _mintDailyCDPandShares(
uint256 _day
) internal {
// CDP is minted from Pension contract every day
uint256 MintedCDP = todayMintedCDP();
CDPMinted[_day] = MintedCDP;
PensionContractInterface(PensionContractAddress).mintCDP(
MintedCDP,
_day
);
if (PLSauctionDeposits[_day] != 0) {
uint256 nextDayShares = PensionContractInterface(PensionContractAddress)
.BurnSharesfromAuction();
shares[_day] = nextDayShares; // Amount of shares that are for sale on _day
}
}
/**
* @dev Only mints CDP in Pension contract for days that weren't updated
* @param _day Skipped day to mint the CDP
*/
function _mintPastDailyCDP(
uint256 _day
) internal {
// CDP is minted from Pension from previous days
uint256 MintedCDP = todayMintedCDP();
CDPMinted[_day] = MintedCDP;
PensionContractInterface(PensionContractAddress).mintCDP(
MintedCDP,
_day
);
}
/**
* @notice Calculate the amount of CDP Tokens to create
* @dev Converts inflation of 4.32% a year (including compounding) to 20 hour days
* @dev Applies inflation to the totalSupply + historicSupply
* @dev historicSupply = totalShares / 1.3, as every CDP deposited creates a total of 1.3 shares
*/
function todayMintedCDP() public view returns (uint256) {
uint256 totalSupply = IERC20(CDP).totalSupply();
uint256 totalShares = PensionContractInterface(PensionContractAddress)
.gettotalShares();
uint256 historicSupply = (totalShares * 10) / 13;
return (((totalSupply + historicSupply) * 10000) / 103563452);
}
/**
* @notice Get your statistics for day `_day`
* @return yourDeposit Your total deposits of PLS for day `_day`
* @return totalDeposits Total deposits of PLS for day `_day`
* @return youReceive Calculate the amount of shares to receive
* @return claimedis Boolean to know whether you have claimed your shares
* @return sharesis Total shares auctioned for day `_day`
*/
function getStatsLoop(
uint256 _day
)
external
view
returns (
uint256 yourDeposit,
uint256 totalDeposits,
uint256 youReceive,
bool claimedis,
uint256 sharesis
)
{
yourDeposit = mapUserAuctionEntry[msg.sender][_day].totalDepositsPLS;
totalDeposits = PLSauctionDeposits[_day];
youReceive = calcTokenValue(msg.sender, _day);
claimedis = mapUserAuctionEntry[msg.sender][_day].hasCollected;
sharesis = shares[_day];
}
/**
* @notice Get someone's statistics for multiple days
* @param _day First day to get statistics from
* @param numb Number of days to get statistics from
* @param account Address to get statistics from
*/
function getStatsLoops(
uint256 _day,
uint256 numb,
address account
)
external
view
returns (
uint256[] memory yourDeposits,
uint256[] memory totalDeposits,
uint256[] memory youReceives,
bool[] memory claimedis,
uint256[] memory sharesDay
)
{
yourDeposits = new uint256[](numb);
totalDeposits = new uint256[](numb);
youReceives = new uint256[](numb);
claimedis = new bool[](numb);
sharesDay = new uint256[](numb);
for (uint256 i = 0; i < numb; ) {
yourDeposits[i] = mapUserAuctionEntry[account][_day + i]
.totalDepositsPLS;
totalDeposits[i] = PLSauctionDeposits[_day + i];
youReceives[i] = calcTokenValue(account, _day + i);
claimedis[i] = mapUserAuctionEntry[account][_day + i].hasCollected;
sharesDay[i] = shares[_day + i];
unchecked {
++i;
}
}
return (yourDeposits, totalDeposits, youReceives, claimedis, sharesDay);
}
}
/@openzeppelin/contracts/utils/Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
/@openzeppelin/contracts/token/ERC20/IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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 Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 value) 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 a `value` amount of tokens 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 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 value) external returns (bool);
}
/@openzeppelin/contracts/proxy/utils/Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.20;
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```solidity
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
*
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Storage of the initializable contract.
*
* It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions
* when using with upgradeable contracts.
*
* @custom:storage-location erc7201:openzeppelin.storage.Initializable
*/
struct InitializableStorage {
/**
* @dev Indicates that the contract has been initialized.
*/
uint64 _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool _initializing;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;
/**
* @dev The contract is already initialized.
*/
error InvalidInitialization();
/**
* @dev The contract is not initializing.
*/
error NotInitializing();
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint64 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts.
*
* Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any
* number of times. This behavior in the constructor can be useful during testing and is not expected to be used in
* production.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
// Cache values to avoid duplicated sloads
bool isTopLevelCall = !$._initializing;
uint64 initialized = $._initialized;
// Allowed calls:
// - initialSetup: the contract is not in the initializing state and no previous version was
// initialized
// - construction: the contract is initialized at version 1 (no reininitialization) and the
// current contract is just being deployed
bool initialSetup = initialized == 0 && isTopLevelCall;
bool construction = initialized == 1 && address(this).code.length == 0;
if (!initialSetup && !construction) {
revert InvalidInitialization();
}
$._initialized = 1;
if (isTopLevelCall) {
$._initializing = true;
}
_;
if (isTopLevelCall) {
$._initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* A reinitializer may be used after the original initialization step. This is essential to configure modules that
* are added through upgrades and that require initialization.
*
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
* cannot be nested. If one is invoked in the context of another, execution will revert.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*
* WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint64 version) {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
if ($._initializing || $._initialized >= version) {
revert InvalidInitialization();
}
$._initialized = version;
$._initializing = true;
_;
$._initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
_checkInitializing();
_;
}
/**
* @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.
*/
function _checkInitializing() internal view virtual {
if (!_isInitializing()) {
revert NotInitializing();
}
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers() internal virtual {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
if ($._initializing) {
revert InvalidInitialization();
}
if ($._initialized != type(uint64).max) {
$._initialized = type(uint64).max;
emit Initialized(type(uint64).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint64) {
return _getInitializableStorage()._initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _getInitializableStorage()._initializing;
}
/**
* @dev Returns a pointer to the storage namespace.
*/
// solhint-disable-next-line var-name-mixedcase
function _getInitializableStorage() private pure returns (InitializableStorage storage $) {
assembly {
$.slot := INITIALIZABLE_STORAGE
}
}
}
/@openzeppelin/contracts/access/Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is set to the address provided by the deployer. This can
* later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
Compiler Settings
{"remappings":[],"optimizer":{"runs":200,"enabled":true},"metadata":{"bytecodeHash":"ipfs"},"libraries":{},"evmVersion":"shanghai","compilationTarget":{"Auction.sol":"Auction"}}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_CDP","internalType":"address"},{"type":"address","name":"_pensionaddress","internalType":"address"}]},{"type":"error","name":"InvalidInitialization","inputs":[]},{"type":"error","name":"NotInitializing","inputs":[]},{"type":"error","name":"OwnableInvalidOwner","inputs":[{"type":"address","name":"owner","internalType":"address"}]},{"type":"error","name":"OwnableUnauthorizedAccount","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"event","name":"AuctionStarted","inputs":[{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"DailyAuctionEnd","inputs":[{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false},{"type":"uint256","name":"day","internalType":"uint256","indexed":false},{"type":"uint256","name":"PLSTotal","internalType":"uint256","indexed":false},{"type":"uint256","name":"tokenTotal","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Initialized","inputs":[{"type":"uint64","name":"version","internalType":"uint64","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"UserEnterAuction","inputs":[{"type":"address","name":"addr","internalType":"address","indexed":true},{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false},{"type":"uint256","name":"entryAmountPLS","internalType":"uint256","indexed":false},{"type":"uint256","name":"day","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"UsercollectAuctionShares","inputs":[{"type":"address","name":"addr","internalType":"address","indexed":true},{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false},{"type":"uint256","name":"day","internalType":"uint256","indexed":false},{"type":"uint256","name":"tokenAmount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"CDP","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"CDPMinted","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"PLSauctionDeposits","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"PensionContractAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"calcDay","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"_tokenValue","internalType":"uint256"}],"name":"calcTokenValue","inputs":[{"type":"address","name":"_address","internalType":"address"},{"type":"uint256","name":"_Day","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"collectAuctionShares","inputs":[{"type":"uint256","name":"targetDay","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"currentDay","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"doDailyUpdate","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"enterAuction","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"yourDeposit","internalType":"uint256"},{"type":"uint256","name":"totalDeposits","internalType":"uint256"},{"type":"uint256","name":"youReceive","internalType":"uint256"},{"type":"bool","name":"claimedis","internalType":"bool"},{"type":"uint256","name":"sharesis","internalType":"uint256"}],"name":"getStatsLoop","inputs":[{"type":"uint256","name":"_day","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"yourDeposits","internalType":"uint256[]"},{"type":"uint256[]","name":"totalDeposits","internalType":"uint256[]"},{"type":"uint256[]","name":"youReceives","internalType":"uint256[]"},{"type":"bool[]","name":"claimedis","internalType":"bool[]"},{"type":"uint256[]","name":"sharesDay","internalType":"uint256[]"}],"name":"getStatsLoops","inputs":[{"type":"uint256","name":"_day","internalType":"uint256"},{"type":"uint256","name":"numb","internalType":"uint256"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"launchTime","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"totalDepositsPLS","internalType":"uint256"},{"type":"uint256","name":"day","internalType":"uint256"},{"type":"bool","name":"hasCollected","internalType":"bool"}],"name":"mapUserAuctionEntry","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"shares","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"startAuction","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"swiss_addr","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"todayMintedCDP","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalPLSdeposited","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawPLS","inputs":[]},{"type":"receive","stateMutability":"payable"}]
Contract Creation Code
0x60e060405234801562000010575f80fd5b50604051620016c1380380620016c18339810160408190526200003391620000ec565b33806200005957604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b620000648162000081565b50336080526001600160a01b0391821660a0521660c05262000122565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000e7575f80fd5b919050565b5f8060408385031215620000fe575f80fd5b6200010983620000d0565b91506200011960208401620000d0565b90509250929050565b60805160a05160c0516115436200017e5f395f818161015b01528181610e4701528181610fb1015281816110b10152818161112701526111f201525f81816102b40152610f2e01525f81816103750152610c7c01526115435ff3fe60806040526004361061013f575f3560e01c806374f7cd4e116100b3578063a6aaecc71161006d578063a6aaecc714610409578063a7e1765314610428578063c4a8fa2b1461043d578063d2ffc09f14610451578063f2fde38b14610470578063f867263a1461048f575f80fd5b806374f7cd4e14610347578063790ca4131461034f5780637b9f7f08146103645780638a9ac888146103975780638da5cb5b146103c25780639bc596cc146103de575f80fd5b80635c9302c9116101045780635c9302c91461027a5780636572ca0c1461028f5780636afd6eea146102a35780636b64c769146102d65780636fede7f7146102ea578063715018a614610333575f80fd5b8063126889351461014a57806313c4f7451461019a5780632520fc94146101ca57806335eab2641461022b57806357a858fc14610241575f80fd5b3661014657005b5f80fd5b348015610155575f80fd5b5061017d7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101a5575f80fd5b506101b96101b43660046112eb565b6104a3565b604051610191959493929190611356565b3480156101d5575f80fd5b5061020e6101e43660046113e7565b600260208181525f9384526040808520909152918352912080546001820154919092015460ff1683565b604080519384526020840192909252151590820152606001610191565b348015610236575f80fd5b5061023f610771565b005b34801561024c575f80fd5b5061026c61025b36600461140f565b60046020525f908152604090205481565b604051908152602001610191565b348015610285575f80fd5b5061026c60015481565b34801561029a575f80fd5b5061026c610831565b3480156102ae575f80fd5b5061017d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102e1575f80fd5b5061023f61086c565b3480156102f5575f80fd5b5061030961030436600461140f565b6109bb565b6040805195865260208601949094529284019190915215156060830152608082015260a001610191565b34801561033e575f80fd5b5061023f610a2b565b61023f610a3e565b34801561035a575f80fd5b5061026c60065481565b34801561036f575f80fd5b5061017d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103a2575f80fd5b5061026c6103b136600461140f565b60036020525f908152604090205481565b3480156103cd575f80fd5b505f546001600160a01b031661017d565b3480156103e9575f80fd5b5061026c6103f836600461140f565b60056020525f908152604090205481565b348015610414575f80fd5b5061026c6104233660046113e7565b610bca565b348015610433575f80fd5b5061026c60075481565b348015610448575f80fd5b5061023f610c6b565b34801561045c575f80fd5b5061023f61046b36600461140f565b610d24565b34801561047b575f80fd5b5061023f61048a366004611426565b610eed565b34801561049a575f80fd5b5061026c610f2a565b60608060608060608667ffffffffffffffff8111156104c4576104c4611446565b6040519080825280602002602001820160405280156104ed578160200160208202803683370190505b5094508667ffffffffffffffff81111561050957610509611446565b604051908082528060200260200182016040528015610532578160200160208202803683370190505b5093508667ffffffffffffffff81111561054e5761054e611446565b604051908082528060200260200182016040528015610577578160200160208202803683370190505b5092508667ffffffffffffffff81111561059357610593611446565b6040519080825280602002602001820160405280156105bc578160200160208202803683370190505b5091508667ffffffffffffffff8111156105d8576105d8611446565b604051908082528060200260200182016040528015610601578160200160208202803683370190505b5090505f5b87811015610765576001600160a01b0387165f90815260026020526040812090610630838c61146e565b81526020019081526020015f205f015486828151811061065257610652611481565b602090810291909101015260035f61066a838c61146e565b81526020019081526020015f205485828151811061068a5761068a611481565b60209081029190910101526106a387610423838c61146e565b8482815181106106b5576106b5611481565b6020908102919091018101919091526001600160a01b0388165f908152600290915260408120906106e6838c61146e565b81526020019081526020015f206002015f9054906101000a900460ff1683828151811061071557610715611481565b9115156020928302919091019091015260045f610732838c61146e565b81526020019081526020015f205482828151811061075257610752611481565b6020908102919091010152600101610606565b50939792965093509350565b5f61077a610831565b60015490915080821461082d5761079081611078565b5f61079c82600161146e565b90505b828110156107c2576107b0816111b9565b806107ba81611495565b91505061079f565b506001545f8181526003602090815260408083205460048352928190205481514281529283019490945281019190915260608101919091527f0be4882f030414524b83ee82af238b9827e4e39c50d4cb6422a9d0e2d996fb8a9060800160405180910390a160018290555b5050565b5f6006545f0361084057505f90565b620119406006544261085291906114ad565b61085c91906114c0565b61086790600161146e565b905090565b610874611255565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff165f811580156108b95750825b90505f8267ffffffffffffffff1660011480156108d55750303b155b9050811580156108e3575080155b156109015760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561092b57845460ff60401b1916600160401b1785555b426006556001805561093b610a2b565b6040514281527f1bb96dff6ab5005aff98cdc0cf176bb7d8e0423cb48e02217d35b042cec81e9f9060200160405180910390a183156109b457845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050565b335f81815260026020908152604080832085845282528083205460039092528220549092909190819081906109f09087610bca565b335f9081526002602081815260408084209a84529981528983209091015460049091529790205495979496909560ff90911694909350915050565b610a33611255565b610a3c5f611281565b565b5f60065411610a8b5760405162461bcd60e51b8152602060048201526014602482015273141c9bda9958dd081b9bdd081b185d5b98da195960621b60448201526064015b60405180910390fd5b5f3411610ac75760405162461bcd60e51b815260206004820152600a602482015269056616c756520697320360b41b6044820152606401610a82565b610acf610771565b6001545f8181526003602052604081208054349290610aef90849061146e565b909155505060408051606081018252335f90815260026020908152838220858352905291909120548190610b2490349061146e565b815260208082018490525f6040928301819052338152600280835283822086835283528382208551815592850151600184015593909201519201805460ff19169215159290921790915560078054349290610b8090849061146e565b90915550506040805142815234602082015290810182905233907f9f63bff13de56a81057a09c4616b2937d5b418497567e556047479a64e9f7aff9060600160405180910390a250565b6001600160a01b0382165f90815260026020908152604080832084845282528083206001015480845260049092528220548203610c0a575f915050610c65565b600154811015610c63575f818152600360209081526040808320546001600160a01b0388168452600283528184208785528352818420548585526004909352922054610c5691906114df565b610c6091906114c0565b91505b505b92915050565b60405147905f906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169083908381818185875af1925050503d805f8114610cd5576040519150601f19603f3d011682016040523d82523d5f602084013e610cda565b606091505b505090508061082d5760405162461bcd60e51b81526020600482015260166024820152754661696c656420746f20776974686472617720504c5360501b6044820152606401610a82565b335f908152600260208181526040808420858552909152909120015460ff1615610d905760405162461bcd60e51b815260206004820181905260248201527f546f6b656e7320616c726561647920636f6c6c656374656420666f72206461796044820152606401610a82565b6001548110610df65760405162461bcd60e51b815260206004820152602c60248201527f43616e6e6f7420636f6c6c65637420746f6b656e7320666f722063757272656e60448201526b74206163746976652064617960a01b6064820152608401610a82565b5f610e013383610bca565b335f8181526002602081815260408084208885529091529182902001805460ff19166001179055516329460cc560e11b81526004810191909152602481018290529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063528c198a906044015f604051808303815f87803b158015610e90575f80fd5b505af1158015610ea2573d5f803e3d5ffd5b505060408051428152602081018690529081018490523392507f5ea8b37638738c35031f7eadc32168f74e13919fd228ac2229d11a80154eeaed915060600160405180910390a25050565b610ef5611255565b6001600160a01b038116610f1e57604051631e4fbdf760e01b81525f6004820152602401610a82565b610f2781611281565b50565b5f807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f88573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fac91906114f6565b90505f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166391d4d4e96040518163ffffffff1660e01b8152600401602060405180830381865afa15801561100b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061102f91906114f6565b90505f600d61103f83600a6114df565b61104991906114c0565b905063062c40bc61105a828561146e565b611066906127106114df565b61107091906114c0565b935050505090565b5f611081610f2a565b5f83815260056020526040908190208290555163084d373560e01b815260048101829052602481018490529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063084d3735906044015f604051808303815f87803b1580156110fa575f80fd5b505af115801561110c573d5f803e3d5ffd5b5050505f8381526003602052604090205415905061082d575f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e4b85ed36040518163ffffffff1660e01b81526004016020604051808303815f875af1158015611182573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111a691906114f6565b5f84815260046020526040902055505050565b5f6111c2610f2a565b5f83815260056020526040908190208290555163084d373560e01b815260048101829052602481018490529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063084d3735906044015f604051808303815f87803b15801561123b575f80fd5b505af115801561124d573d5f803e3d5ffd5b505050505050565b5f546001600160a01b03163314610a3c5760405163118cdaa760e01b8152336004820152602401610a82565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b03811681146112e6575f80fd5b919050565b5f805f606084860312156112fd575f80fd5b8335925060208401359150611314604085016112d0565b90509250925092565b5f8151808452602080850194508084015f5b8381101561134b5781518752958201959082019060010161132f565b509495945050505050565b60a081525f61136860a083018861131d565b60208382038185015261137b828961131d565b9150838203604085015261138f828861131d565b848103606086015286518082528288019350908201905f5b818110156113c55784511515835293830193918301916001016113a7565b505084810360808601526113d9818761131d565b9a9950505050505050505050565b5f80604083850312156113f8575f80fd5b611401836112d0565b946020939093013593505050565b5f6020828403121561141f575f80fd5b5035919050565b5f60208284031215611436575f80fd5b61143f826112d0565b9392505050565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610c6557610c6561145a565b634e487b7160e01b5f52603260045260245ffd5b5f600182016114a6576114a661145a565b5060010190565b81810381811115610c6557610c6561145a565b5f826114da57634e487b7160e01b5f52601260045260245ffd5b500490565b8082028115828204841417610c6557610c6561145a565b5f60208284031215611506575f80fd5b505191905056fea2646970667358221220a537e93febb357a0178171f36049830425e3b9ec97fb35c0f75328f702f2b76764736f6c634300081400330000000000000000000000006f0dda6b522fcc7807ccaca4d37ef6958e95e1b90000000000000000000000007f683aac0e76b270f0ebb1383a08c5b3b0d65d0e
Deployed ByteCode
0x60806040526004361061013f575f3560e01c806374f7cd4e116100b3578063a6aaecc71161006d578063a6aaecc714610409578063a7e1765314610428578063c4a8fa2b1461043d578063d2ffc09f14610451578063f2fde38b14610470578063f867263a1461048f575f80fd5b806374f7cd4e14610347578063790ca4131461034f5780637b9f7f08146103645780638a9ac888146103975780638da5cb5b146103c25780639bc596cc146103de575f80fd5b80635c9302c9116101045780635c9302c91461027a5780636572ca0c1461028f5780636afd6eea146102a35780636b64c769146102d65780636fede7f7146102ea578063715018a614610333575f80fd5b8063126889351461014a57806313c4f7451461019a5780632520fc94146101ca57806335eab2641461022b57806357a858fc14610241575f80fd5b3661014657005b5f80fd5b348015610155575f80fd5b5061017d7f0000000000000000000000007f683aac0e76b270f0ebb1383a08c5b3b0d65d0e81565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101a5575f80fd5b506101b96101b43660046112eb565b6104a3565b604051610191959493929190611356565b3480156101d5575f80fd5b5061020e6101e43660046113e7565b600260208181525f9384526040808520909152918352912080546001820154919092015460ff1683565b604080519384526020840192909252151590820152606001610191565b348015610236575f80fd5b5061023f610771565b005b34801561024c575f80fd5b5061026c61025b36600461140f565b60046020525f908152604090205481565b604051908152602001610191565b348015610285575f80fd5b5061026c60015481565b34801561029a575f80fd5b5061026c610831565b3480156102ae575f80fd5b5061017d7f0000000000000000000000006f0dda6b522fcc7807ccaca4d37ef6958e95e1b981565b3480156102e1575f80fd5b5061023f61086c565b3480156102f5575f80fd5b5061030961030436600461140f565b6109bb565b6040805195865260208601949094529284019190915215156060830152608082015260a001610191565b34801561033e575f80fd5b5061023f610a2b565b61023f610a3e565b34801561035a575f80fd5b5061026c60065481565b34801561036f575f80fd5b5061017d7f0000000000000000000000009957cd5777f8ba2ffd2d54658f947d16653e849e81565b3480156103a2575f80fd5b5061026c6103b136600461140f565b60036020525f908152604090205481565b3480156103cd575f80fd5b505f546001600160a01b031661017d565b3480156103e9575f80fd5b5061026c6103f836600461140f565b60056020525f908152604090205481565b348015610414575f80fd5b5061026c6104233660046113e7565b610bca565b348015610433575f80fd5b5061026c60075481565b348015610448575f80fd5b5061023f610c6b565b34801561045c575f80fd5b5061023f61046b36600461140f565b610d24565b34801561047b575f80fd5b5061023f61048a366004611426565b610eed565b34801561049a575f80fd5b5061026c610f2a565b60608060608060608667ffffffffffffffff8111156104c4576104c4611446565b6040519080825280602002602001820160405280156104ed578160200160208202803683370190505b5094508667ffffffffffffffff81111561050957610509611446565b604051908082528060200260200182016040528015610532578160200160208202803683370190505b5093508667ffffffffffffffff81111561054e5761054e611446565b604051908082528060200260200182016040528015610577578160200160208202803683370190505b5092508667ffffffffffffffff81111561059357610593611446565b6040519080825280602002602001820160405280156105bc578160200160208202803683370190505b5091508667ffffffffffffffff8111156105d8576105d8611446565b604051908082528060200260200182016040528015610601578160200160208202803683370190505b5090505f5b87811015610765576001600160a01b0387165f90815260026020526040812090610630838c61146e565b81526020019081526020015f205f015486828151811061065257610652611481565b602090810291909101015260035f61066a838c61146e565b81526020019081526020015f205485828151811061068a5761068a611481565b60209081029190910101526106a387610423838c61146e565b8482815181106106b5576106b5611481565b6020908102919091018101919091526001600160a01b0388165f908152600290915260408120906106e6838c61146e565b81526020019081526020015f206002015f9054906101000a900460ff1683828151811061071557610715611481565b9115156020928302919091019091015260045f610732838c61146e565b81526020019081526020015f205482828151811061075257610752611481565b6020908102919091010152600101610606565b50939792965093509350565b5f61077a610831565b60015490915080821461082d5761079081611078565b5f61079c82600161146e565b90505b828110156107c2576107b0816111b9565b806107ba81611495565b91505061079f565b506001545f8181526003602090815260408083205460048352928190205481514281529283019490945281019190915260608101919091527f0be4882f030414524b83ee82af238b9827e4e39c50d4cb6422a9d0e2d996fb8a9060800160405180910390a160018290555b5050565b5f6006545f0361084057505f90565b620119406006544261085291906114ad565b61085c91906114c0565b61086790600161146e565b905090565b610874611255565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff165f811580156108b95750825b90505f8267ffffffffffffffff1660011480156108d55750303b155b9050811580156108e3575080155b156109015760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561092b57845460ff60401b1916600160401b1785555b426006556001805561093b610a2b565b6040514281527f1bb96dff6ab5005aff98cdc0cf176bb7d8e0423cb48e02217d35b042cec81e9f9060200160405180910390a183156109b457845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050565b335f81815260026020908152604080832085845282528083205460039092528220549092909190819081906109f09087610bca565b335f9081526002602081815260408084209a84529981528983209091015460049091529790205495979496909560ff90911694909350915050565b610a33611255565b610a3c5f611281565b565b5f60065411610a8b5760405162461bcd60e51b8152602060048201526014602482015273141c9bda9958dd081b9bdd081b185d5b98da195960621b60448201526064015b60405180910390fd5b5f3411610ac75760405162461bcd60e51b815260206004820152600a602482015269056616c756520697320360b41b6044820152606401610a82565b610acf610771565b6001545f8181526003602052604081208054349290610aef90849061146e565b909155505060408051606081018252335f90815260026020908152838220858352905291909120548190610b2490349061146e565b815260208082018490525f6040928301819052338152600280835283822086835283528382208551815592850151600184015593909201519201805460ff19169215159290921790915560078054349290610b8090849061146e565b90915550506040805142815234602082015290810182905233907f9f63bff13de56a81057a09c4616b2937d5b418497567e556047479a64e9f7aff9060600160405180910390a250565b6001600160a01b0382165f90815260026020908152604080832084845282528083206001015480845260049092528220548203610c0a575f915050610c65565b600154811015610c63575f818152600360209081526040808320546001600160a01b0388168452600283528184208785528352818420548585526004909352922054610c5691906114df565b610c6091906114c0565b91505b505b92915050565b60405147905f906001600160a01b037f0000000000000000000000009957cd5777f8ba2ffd2d54658f947d16653e849e169083908381818185875af1925050503d805f8114610cd5576040519150601f19603f3d011682016040523d82523d5f602084013e610cda565b606091505b505090508061082d5760405162461bcd60e51b81526020600482015260166024820152754661696c656420746f20776974686472617720504c5360501b6044820152606401610a82565b335f908152600260208181526040808420858552909152909120015460ff1615610d905760405162461bcd60e51b815260206004820181905260248201527f546f6b656e7320616c726561647920636f6c6c656374656420666f72206461796044820152606401610a82565b6001548110610df65760405162461bcd60e51b815260206004820152602c60248201527f43616e6e6f7420636f6c6c65637420746f6b656e7320666f722063757272656e60448201526b74206163746976652064617960a01b6064820152608401610a82565b5f610e013383610bca565b335f8181526002602081815260408084208885529091529182902001805460ff19166001179055516329460cc560e11b81526004810191909152602481018290529091507f0000000000000000000000007f683aac0e76b270f0ebb1383a08c5b3b0d65d0e6001600160a01b03169063528c198a906044015f604051808303815f87803b158015610e90575f80fd5b505af1158015610ea2573d5f803e3d5ffd5b505060408051428152602081018690529081018490523392507f5ea8b37638738c35031f7eadc32168f74e13919fd228ac2229d11a80154eeaed915060600160405180910390a25050565b610ef5611255565b6001600160a01b038116610f1e57604051631e4fbdf760e01b81525f6004820152602401610a82565b610f2781611281565b50565b5f807f0000000000000000000000006f0dda6b522fcc7807ccaca4d37ef6958e95e1b96001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f88573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fac91906114f6565b90505f7f0000000000000000000000007f683aac0e76b270f0ebb1383a08c5b3b0d65d0e6001600160a01b03166391d4d4e96040518163ffffffff1660e01b8152600401602060405180830381865afa15801561100b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061102f91906114f6565b90505f600d61103f83600a6114df565b61104991906114c0565b905063062c40bc61105a828561146e565b611066906127106114df565b61107091906114c0565b935050505090565b5f611081610f2a565b5f83815260056020526040908190208290555163084d373560e01b815260048101829052602481018490529091507f0000000000000000000000007f683aac0e76b270f0ebb1383a08c5b3b0d65d0e6001600160a01b03169063084d3735906044015f604051808303815f87803b1580156110fa575f80fd5b505af115801561110c573d5f803e3d5ffd5b5050505f8381526003602052604090205415905061082d575f7f0000000000000000000000007f683aac0e76b270f0ebb1383a08c5b3b0d65d0e6001600160a01b031663e4b85ed36040518163ffffffff1660e01b81526004016020604051808303815f875af1158015611182573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111a691906114f6565b5f84815260046020526040902055505050565b5f6111c2610f2a565b5f83815260056020526040908190208290555163084d373560e01b815260048101829052602481018490529091507f0000000000000000000000007f683aac0e76b270f0ebb1383a08c5b3b0d65d0e6001600160a01b03169063084d3735906044015f604051808303815f87803b15801561123b575f80fd5b505af115801561124d573d5f803e3d5ffd5b505050505050565b5f546001600160a01b03163314610a3c5760405163118cdaa760e01b8152336004820152602401610a82565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b03811681146112e6575f80fd5b919050565b5f805f606084860312156112fd575f80fd5b8335925060208401359150611314604085016112d0565b90509250925092565b5f8151808452602080850194508084015f5b8381101561134b5781518752958201959082019060010161132f565b509495945050505050565b60a081525f61136860a083018861131d565b60208382038185015261137b828961131d565b9150838203604085015261138f828861131d565b848103606086015286518082528288019350908201905f5b818110156113c55784511515835293830193918301916001016113a7565b505084810360808601526113d9818761131d565b9a9950505050505050505050565b5f80604083850312156113f8575f80fd5b611401836112d0565b946020939093013593505050565b5f6020828403121561141f575f80fd5b5035919050565b5f60208284031215611436575f80fd5b61143f826112d0565b9392505050565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610c6557610c6561145a565b634e487b7160e01b5f52603260045260245ffd5b5f600182016114a6576114a661145a565b5060010190565b81810381811115610c6557610c6561145a565b5f826114da57634e487b7160e01b5f52601260045260245ffd5b500490565b8082028115828204841417610c6557610c6561145a565b5f60208284031215611506575f80fd5b505191905056fea2646970667358221220a537e93febb357a0178171f36049830425e3b9ec97fb35c0f75328f702f2b76764736f6c63430008140033