ERC-20
Overview
Max Total Supply
18,652.028456862602078326 eEQZ
Holders
9
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
501.506570437725185022 eEQZValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
Vault
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.4; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '@openzeppelin/contracts/token/ERC20/ERC20.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import './ERC20EToken.sol'; import './CoreConstants.sol'; import './FlashLoanFeeProvider.sol'; import './interfaces/IVault.sol'; contract Vault is Moderable, IVault, CoreConstants, ERC20EToken, FlashLoanFeeProvider, ReentrancyGuard { ERC20 public stakedToken; address public treasuryAddress; address public flashLoanProviderAddress; uint256 public totalAmountDeposited = 0; uint256 public minAmountForFlash = 0; uint256 public maxCapacity = 0; bool public isPaused = true; bool public isInitialized = false; address public factory; mapping(address => uint256) public lastDepositBlockNr; /** * @dev Only if vault is not paused. **/ modifier onlyNotPaused { require(isPaused == false, 'ONLY_NOT_PAUSED'); _; } /** * @dev Only if vault is not initialized. **/ modifier onlyNotInitialized { require(isInitialized == false, 'ONLY_NOT_INITIALIZED'); _; } /** * @dev Only if msg.sender is flash loan provider. **/ modifier onlyFlashLoanProvider { require(flashLoanProviderAddress == msg.sender, 'ONLY_FLASH_LOAN_PROVIDER'); _; } constructor(ERC20 _stakedToken) ERC20EToken( string(abi.encodePacked(_stakedToken.symbol(), ' eVault LP')), string(abi.encodePacked('e', _stakedToken.symbol())) ) { factory = msg.sender; stakedToken = _stakedToken; } /** * @dev Initialize vault contract. * @param _treasuryAddress address of treasury where part of flash loan fee is sent. * @param _flashLoanProviderAddress provider of flash loans * @param _maxCapacity max capacity for a vault */ function initialize( address _treasuryAddress, address _flashLoanProviderAddress, uint256 _maxCapacity ) external override onlyModerator onlyNotInitialized { treasuryAddress = _treasuryAddress; flashLoanProviderAddress = _flashLoanProviderAddress; maxCapacity = _maxCapacity; isPaused = false; isInitialized = true; } /** * @dev Getter for number of decimals. * @return number of decimals of eToken. */ function decimals() public view virtual override returns (uint8) { return stakedToken.decimals(); } /** * @dev Setter for max capacity. * @param _maxCapacity new value to be set. */ function setMaxCapacity(uint256 _maxCapacity) external onlyModerator { maxCapacity = _maxCapacity; } /** * @dev Setter for minimum amount for flash. * @param _minAmountForFlash Minimum amount for a flash. */ function setMinAmountForFlash(uint256 _minAmountForFlash) external onlyModerator { minAmountForFlash = _minAmountForFlash; } /** * @dev Get number of tokens to mint. * @param amount of tokens deposited into Vault in order to receive eTokens. */ function getNrOfETokensToMint(uint256 amount) internal view returns (uint256) { return (amount * RATIO_MULTIPLY_FACTOR) / getRatioForOneEToken(); } /** * @dev Provide liquidity to Vault. * @param amount The amount of liquidity to be deposited. */ function provideLiquidity(uint256 amount) external onlyNotPaused nonReentrant { require(amount > 0, 'CANNOT_STAKE_ZERO_TOKENS'); require(amount + totalAmountDeposited <= maxCapacity, 'AMOUNT_IS_BIGGER_THAN_CAPACITY'); uint256 receivedETokens = getNrOfETokensToMint(amount); totalAmountDeposited = amount + totalAmountDeposited; _mint(msg.sender, receivedETokens); require( stakedToken.transferFrom(msg.sender, address(this), amount), 'TRANSFER_STAKED_FAIL' ); emit Deposit(msg.sender, amount, receivedETokens, lastDepositBlockNr[msg.sender]); lastDepositBlockNr[msg.sender] = block.number; } /** * @dev Remove liquidity. * @param amount of eTokens to be removed from Vault. */ function removeLiquidity(uint256 amount) external nonReentrant { require(amount <= balanceOf(msg.sender), 'AMOUNT_BIGGER_THAN_BALANCE'); uint256 stakedTokensToTransfer = getStakedTokensFromAmount(amount); totalAmountDeposited = totalAmountDeposited - (amount * totalAmountDeposited) / totalSupply(); _burn(msg.sender, amount); require(stakedToken.transfer(msg.sender, stakedTokensToTransfer), 'TRANSFER_STAKED_FAIL'); emit Withdraw(msg.sender, amount, stakedTokensToTransfer); } /** * @dev One eToken to token * @return The current eToken ratio. */ function getRatioForOneEToken() public view returns (uint256) { if (totalSupply() > 0 && stakedToken.balanceOf(address(this)) > 0) { return (stakedToken.balanceOf(address(this)) * RATIO_MULTIPLY_FACTOR) / totalSupply(); } return 1 * RATIO_MULTIPLY_FACTOR; } /** * @dev Pause vault. */ function pauseVault() external onlyModerator { require(isPaused == false, 'VAULT_ALREADY_PAUSED'); isPaused = true; } /** * @dev Unpause vault. */ function unpauseVault() external onlyModerator { require(isPaused == true, 'VAULT_ALREADY_RESUMED'); isPaused = false; } /** * @dev FlashLoanProvider can send funds in name of Vault * @param recipient Address where the funds are sent. * @param amount Amount of funds to be sent. * @return Transfer result. */ function transferToAccount(address recipient, uint256 amount) external onlyFlashLoanProvider onlyNotPaused returns (bool) { return stakedToken.transfer(recipient, amount); } /** * @dev The amount of staked tokens. * @param amount of eTokens deposited to be burned. * @return The amount of staked tokens to send to address. */ function getStakedTokensFromAmount(uint256 amount) internal view returns (uint256) { return (amount * getRatioForOneEToken()) / RATIO_MULTIPLY_FACTOR; } /** * @dev Split fees * @param fee Fee amount to be split */ function splitFees(uint256 fee) external onlyFlashLoanProvider returns (uint256 treasuryAmount) { treasuryAmount = getTreasuryAmountToSend(fee); require(stakedToken.transfer(treasuryAddress, treasuryAmount), 'TRANSFER_SPLIT_FAIL'); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ 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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The defaut value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor (string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); _approve(sender, _msgSender(), currentAllowance - amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, currentAllowance - subtractedValue); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); _balances[sender] = senderBalance - amount; _balances[recipient] += amount; emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); _balances[account] = accountBalance - amount; _totalSupply -= amount; emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @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]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being 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 percentage 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. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor () { _status = _NOT_ENTERED; } /** * @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(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.4; import '@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol'; contract ERC20EToken is ERC20PresetMinterPauser { constructor(string memory name, string memory symbol) ERC20PresetMinterPauser(name, symbol) {} }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.4; abstract contract CoreConstants { uint256 internal constant RATIO_MULTIPLY_FACTOR = 10**6; }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.4; import './interfaces/IFlashLoanFeeProvider.sol'; import './roles/Moderable.sol'; contract FlashLoanFeeProvider is IFlashLoanFeeProvider, Moderable { uint256 public treasuryFeePercentage = 10; uint256 public flashFeePercentage = 5; uint256 public flashFeeAmountDivider = 10000; /** * @dev Custom formula for calculating fee. * @param _flashFeePercentage to use for future calculations. * @param _flashFeeAmountDivider to use for future calculations. */ function setFee(uint256 _flashFeePercentage, uint256 _flashFeeAmountDivider) external override onlyModerator { require(_flashFeeAmountDivider > 0, 'AMOUNT_DIVIDER_CANNOT_BE_ZERO'); require(_flashFeePercentage <= 100, 'FEE_PERCENTAGE_WRONG_VALUE'); flashFeePercentage = _flashFeePercentage; flashFeeAmountDivider = _flashFeeAmountDivider; emit SetFee(_flashFeePercentage, _flashFeeAmountDivider); } /** * @dev Treasury amount to send. * @param amount to be used for getting treasury value to be sent. */ function getTreasuryAmountToSend(uint256 amount) internal view returns (uint256) { return (amount * treasuryFeePercentage) / 100; } /** * @dev Change treasury fee percentage. * @param _treasuryFeePercentage to use for future calculations. */ function setTreasuryFeePercentage(uint256 _treasuryFeePercentage) external onlyModerator { require(_treasuryFeePercentage <= 100, 'TREASURY_FEE_PERCENTAGE_WRONG_VALUE'); treasuryFeePercentage = _treasuryFeePercentage; emit SetTreasuryFeePercentage(treasuryFeePercentage); } /** * @dev Custom formula for calculating fee. * @return flashFee calculated. */ function calculateFeeForAmount(uint256 amount) external view returns (uint256) { return (amount * flashFeePercentage) / flashFeeAmountDivider; } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.4; interface IVault { /** * @dev Emitted on new deposit. * @param sender address. * @param amount deposited. * @param tokensToMint on new deposit. **/ event Deposit( address indexed sender, uint256 amount, uint256 tokensToMint, uint256 previousDepositBlockNr ); /** * @dev Emitted on withdraw. * @param sender address to withdraw to. * @param amount of eTokens burned. * @param stakedTokensToTransfer to address. **/ event Withdraw(address indexed sender, uint256 amount, uint256 stakedTokensToTransfer); /** * @dev Emitted on initialize. * @param treasuryAddress address of treasury where part of flash loan fee is sent. * @param flashLoanProvider provider of flash loans. * @param maxCapacity max capacity for a vault **/ function initialize( address treasuryAddress, address flashLoanProvider, uint256 maxCapacity ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* * @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) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC20.sol"; import "../extensions/ERC20Burnable.sol"; import "../extensions/ERC20Pausable.sol"; import "../../../access/AccessControlEnumerable.sol"; import "../../../utils/Context.sol"; /** * @dev {ERC20} token, including: * * - ability for holders to burn (destroy) their tokens * - a minter role that allows for token minting (creation) * - a pauser role that allows to stop all token transfers * * This contract uses {AccessControl} to lock permissioned functions using the * different roles - head to its documentation for details. * * The account that deploys the contract will be granted the minter and pauser * roles, as well as the default admin role, which will let it grant both minter * and pauser roles to other accounts. */ contract ERC20PresetMinterPauser is Context, AccessControlEnumerable, ERC20Burnable, ERC20Pausable { bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); /** * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the * account that deploys the contract. * * See {ERC20-constructor}. */ constructor(string memory name, string memory symbol) ERC20(name, symbol) { _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); _setupRole(MINTER_ROLE, _msgSender()); _setupRole(PAUSER_ROLE, _msgSender()); } /** * @dev Creates `amount` new tokens for `to`. * * See {ERC20-_mint}. * * Requirements: * * - the caller must have the `MINTER_ROLE`. */ function mint(address to, uint256 amount) public virtual { require(hasRole(MINTER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have minter role to mint"); _mint(to, amount); } /** * @dev Pauses all token transfers. * * See {ERC20Pausable} and {Pausable-_pause}. * * Requirements: * * - the caller must have the `PAUSER_ROLE`. */ function pause() public virtual { require(hasRole(PAUSER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have pauser role to pause"); _pause(); } /** * @dev Unpauses all token transfers. * * See {ERC20Pausable} and {Pausable-_unpause}. * * Requirements: * * - the caller must have the `PAUSER_ROLE`. */ function unpause() public virtual { require(hasRole(PAUSER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have pauser role to unpause"); _unpause(); } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override(ERC20, ERC20Pausable) { super._beforeTokenTransfer(from, to, amount); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC20.sol"; import "../../../utils/Context.sol"; /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { uint256 currentAllowance = allowance(account, _msgSender()); require(currentAllowance >= amount, "ERC20: burn amount exceeds allowance"); _approve(account, _msgSender(), currentAllowance - amount); _burn(account, amount); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC20.sol"; import "../../../security/Pausable.sol"; /** * @dev ERC20 token with pausable token transfers, minting and burning. * * Useful for scenarios such as preventing trades until the end of an evaluation * period, or having an emergency switch for freezing all token transfers in the * event of a large bug. */ abstract contract ERC20Pausable is ERC20, Pausable { /** * @dev See {ERC20-_beforeTokenTransfer}. * * Requirements: * * - the contract must not be paused. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override { super._beforeTokenTransfer(from, to, amount); require(!paused(), "ERC20Pausable: token transfer while paused"); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./AccessControl.sol"; import "../utils/structs/EnumerableSet.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerable { function getRoleMember(bytes32 role, uint256 index) external view returns (address); function getRoleMemberCount(bytes32 role) external view returns (uint256); } /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { using EnumerableSet for EnumerableSet.AddressSet; mapping (bytes32 => EnumerableSet.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view override returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view override returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {grantRole} to track enumerable memberships */ function grantRole(bytes32 role, address account) public virtual override { super.grantRole(role, account); _roleMembers[role].add(account); } /** * @dev Overload {revokeRole} to track enumerable memberships */ function revokeRole(bytes32 role, address account) public virtual override { super.revokeRole(role, account); _roleMembers[role].remove(account); } /** * @dev Overload {renounceRole} to track enumerable memberships */ function renounceRole(bytes32 role, address account) public virtual override { super.renounceRole(role, account); _roleMembers[role].remove(account); } /** * @dev Overload {_setupRole} to track enumerable memberships */ function _setupRole(bytes32 role, address account) internal virtual override { super._setupRole(role, account); _roleMembers[role].add(account); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor () { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { function hasRole(bytes32 role, address account) external view returns (bool); function getRoleAdmin(bytes32 role) external view returns (bytes32); function grantRole(bytes32 role, address account) external; function revokeRole(bytes32 role, address account) external; function renounceRole(bytes32 role, address account) external; } /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping (address => bool) members; bytes32 adminRole; } mapping (bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{20}) is missing role (0x[0-9a-f]{32})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{20}) is missing role (0x[0-9a-f]{32})$/ */ function _checkRole(bytes32 role, address account) internal view { if(!hasRole(role, account)) { revert(string(abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ))); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { emit RoleAdminChanged(role, getRoleAdmin(role), adminRole); _roles[role].adminRole = adminRole; } function _grantRole(bytes32 role, address account) private { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } function _revokeRole(bytes32 role, address account) private { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping (bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant alphabet = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = alphabet[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.4; interface IFlashLoanFeeProvider { /** * @dev Set new fee on FlashProvider. * @param feePercentage at which the fee was changed. * @param feeAmountDivider at which the fee was changed. **/ event SetFee(uint256 feePercentage, uint256 feeAmountDivider); /** * @dev Set treasury percentage. * @param treasuryFeePercentage is the percentage of the fee that is going to a treasury. **/ event SetTreasuryFeePercentage(uint256 treasuryFeePercentage); /** * @dev Set fee percentage and divider. * @param _flashFeePercentage to use for future calculations. * @param _flashFeeAmountDivider use for calculating percentages under 1%. **/ function setFee(uint256 _flashFeePercentage, uint256 _flashFeeAmountDivider) external; }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.4; import '@openzeppelin/contracts/utils/Context.sol'; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an moderator) that can be granted exclusive access to * specific functions. * * By default, the moderator account will be the one that deploys the contract. This * can later be changed with {transferModeratorship}. * * This module is used through inheritance. It will make available the modifier * `onlyModerator`, which can be applied to your functions to restrict their use to * the moderator. */ abstract contract Moderable is Context { address private _moderator; event ModeratorTransferred(address indexed previousModerator, address indexed newModerator); /** * @dev Initializes the contract setting the deployer as the initial moderator. */ constructor() { address msgSender = _msgSender(); _moderator = msgSender; emit ModeratorTransferred(address(0), msgSender); } /** * @dev Returns the address of the current moderator. */ function moderator() public view virtual returns (address) { return _moderator; } /** * @dev Throws if called by any account other than the moderator. */ modifier onlyModerator() { require(moderator() == _msgSender(), 'Moderator: caller is not the moderator'); _; } /** * @dev Leaves the contract without moderator. It will not be possible to call * `onlyModerator` functions anymore. Can only be called by the current moderator. * * NOTE: Renouncing moderatorship will leave the contract without an moderator, * thereby removing any functionality that is only available to the moderator. */ function renounceModeratorship() public virtual onlyModerator { emit ModeratorTransferred(_moderator, address(0)); _moderator = address(0); } /** * @dev Transfers moderatorship of the contract to a new account (`newModeratorship`). * Can only be called by the current moderator. */ function transferModeratorship(address newModerator) public virtual onlyModerator { require(newModerator != address(0), 'Moderable: new moderator is the zero address'); emit ModeratorTransferred(_moderator, newModerator); _moderator = newModerator; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract ERC20","name":"_stakedToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokensToMint","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"previousDepositBlockNr","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousModerator","type":"address"},{"indexed":true,"internalType":"address","name":"newModerator","type":"address"}],"name":"ModeratorTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"feePercentage","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feeAmountDivider","type":"uint256"}],"name":"SetFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"treasuryFeePercentage","type":"uint256"}],"name":"SetTreasuryFeePercentage","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"stakedTokensToTransfer","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"calculateFeeForAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flashFeeAmountDivider","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flashFeePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flashLoanProviderAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRatioForOneEToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryAddress","type":"address"},{"internalType":"address","name":"_flashLoanProviderAddress","type":"address"},{"internalType":"uint256","name":"_maxCapacity","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isInitialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastDepositBlockNr","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxCapacity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minAmountForFlash","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"moderator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pauseVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"provideLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"removeLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceModeratorship","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_flashFeePercentage","type":"uint256"},{"internalType":"uint256","name":"_flashFeeAmountDivider","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxCapacity","type":"uint256"}],"name":"setMaxCapacity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minAmountForFlash","type":"uint256"}],"name":"setMinAmountForFlash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_treasuryFeePercentage","type":"uint256"}],"name":"setTreasuryFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"splitFees","outputs":[{"internalType":"uint256","name":"treasuryAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakedToken","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAmountDeposited","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newModerator","type":"address"}],"name":"transferModeratorship","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferToAccount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasuryFeePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpauseVault","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052600a600981905560059055612710600b556000601081905560118190556012556013805461ffff191660011790553480156200003f57600080fd5b506040516200338b3803806200338b8339810160408190526200006291620004c0565b806001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b1580156200009c57600080fd5b505afa158015620000b1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620000db9190810190620004f0565b604051602001620000ed9190620005a4565b604051602081830303815290604052816001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b1580156200013657600080fd5b505afa1580156200014b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620001759190810190620004f0565b604051602001620001879190620005d4565b60408051808303601f1901815291905281818181600033600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8427d4739e7dc11aacb1135cad949e4e0cf051201130f48373d5b8baa91a9e9e908290a3508151620001fd9060069060208501906200041a565b508051620002139060079060208401906200041a565b50506008805460ff19169055506200022d600033620002cd565b620002597f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633620002cd565b620002857f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33620002cd565b50506001600c5550506013805462010000600160b01b031916336201000002179055600d80546001600160a01b0319166001600160a01b039290921691909117905562000685565b620002e482826200031060201b62001bc21760201c565b60008281526002602090815260409091206200030b91839062001bcc62000320821b17901c565b505050565b6200031c828262000340565b5050565b600062000337836001600160a01b038416620003c8565b90505b92915050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff166200031c5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b600081815260018301602052604081205462000411575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556200033a565b5060006200033a565b828054620004289062000632565b90600052602060002090601f0160209004810192826200044c576000855562000497565b82601f106200046757805160ff191683800117855562000497565b8280016001018555821562000497579182015b82811115620004975782518255916020019190600101906200047a565b50620004a5929150620004a9565b5090565b5b80821115620004a55760008155600101620004aa565b600060208284031215620004d2578081fd5b81516001600160a01b0381168114620004e9578182fd5b9392505050565b60006020828403121562000502578081fd5b81516001600160401b038082111562000519578283fd5b818401915084601f8301126200052d578283fd5b8151818111156200054257620005426200066f565b604051601f8201601f19908116603f011681019083821181831017156200056d576200056d6200066f565b8160405282815287602084870101111562000586578586fd5b62000599836020830160208801620005ff565b979650505050505050565b60008251620005b8818460208701620005ff565b69020655661756c74204c560b41b920191825250600a01919050565b606560f81b815260008251620005f2816001850160208701620005ff565b9190910160010192915050565b60005b838110156200061c57818101518382015260200162000602565b838111156200062c576000848401525b50505050565b600181811c908216806200064757607f821691505b602082108114156200066957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b612cf680620006956000396000f3fe608060405234801561001057600080fd5b50600436106103835760003560e01c806370a08231116101de578063a9059cbb1161010f578063cd089962116100ad578063dd62ed3e1161007c578063dd62ed3e14610761578063e63ab1e91461079a578063eb521a4c146107c1578063f4a161f0146107d457600080fd5b8063cd089962146106f4578063d539139314610707578063d547741f1461072e578063db06d5a51461074157600080fd5b8063c45a0155116100e9578063c45a0155146106a2578063c5f956af146106bb578063ca15c873146106ce578063cc7a262e146106e157600080fd5b8063a9059cbb1461066f578063b187bd2614610682578063bb500f481461068f57600080fd5b806391d148541161017c5780639c8f9f23116101565780639c8f9f23146106395780639e0879c21461064c578063a217fddf14610654578063a457c2d71461065c57600080fd5b806391d148541461060b57806395d89b411461061e57806397046d991461062657600080fd5b80638200fa49116101b85780638200fa49146105ca5780638456cb59146105dd578063876ba3cd146105e55780639010d07c146105f857600080fd5b806370a082311461058657806378c4886b146105af57806379cc6790146105b757600080fd5b806336568abe116102b8578063453d91c111610256578063530b49e911610230578063530b49e91461055657806359b6a0c91461055f5780635c975abb146105685780636c28ebb91461057357600080fd5b8063453d91c1146105275780634c09f37c1461053a57806352f7c9881461054357600080fd5b8063395093511161029257806339509351146104e65780633f4ba83a146104f957806340c10f191461050157806342966c681461051457600080fd5b806336568abe1461049c57806338743904146104af578063392e53cd146104d457600080fd5b806318160ddd11610325578063248a9ca3116102ff578063248a9ca31461044257806325806649146104665780632f2ff15d1461046f578063313ce5671461048257600080fd5b806318160ddd1461041f5780631dfaa8ce1461042757806323b872dd1461042f57600080fd5b80630b3c08ed116103615780630b3c08ed146103d85780630b7562be146103ed5780630d155d26146103f55780631794bb3c1461040c57600080fd5b806301ffc9a71461038857806306fdde03146103b0578063095ea7b3146103c5575b600080fd5b61039b610396366004612a6b565b6107dd565b60405190151581526020015b60405180910390f35b6103b8610808565b6040516103a79190612b41565b61039b6103d33660046129c7565b61089a565b6103eb6103e6366004612a10565b6108b0565b005b6103eb6108e8565b6103fe60105481565b6040519081526020016103a7565b6103eb61041a36600461298c565b61096d565b6005546103fe565b6103eb610a2a565b61039b61043d36600461298c565b610a9e565b6103fe610450366004612a10565b6000908152600160208190526040909120015490565b6103fe60115481565b6103eb61047d366004612a28565b610b4f565b61048a610b76565b60405160ff90911681526020016103a7565b6103eb6104aa366004612a28565b610bf8565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016103a7565b60135461039b90610100900460ff1681565b61039b6104f43660046129c7565b610c1a565b6103eb610c51565b6103eb61050f3660046129c7565b610cf7565b6103eb610522366004612a10565b610d9a565b6103eb610535366004612a10565b610da7565b6103fe60095481565b6103eb610551366004612a4a565b610dd6565b6103fe600a5481565b6103fe60125481565b60085460ff1661039b565b6103fe610581366004612a10565b610ee8565b6103fe610594366004612940565b6001600160a01b031660009081526003602052604090205490565b6103fe610f05565b6103eb6105c53660046129c7565b61103f565b600f546104bc906001600160a01b031681565b6103eb6110c2565b6103eb6105f3366004612940565b611166565b6104bc610606366004612a4a565b611256565b61039b610619366004612a28565b611275565b6103b86112a0565b6103fe610634366004612a10565b6112af565b6103eb610647366004612a10565b6113e1565b6103eb6115ea565b6103fe600081565b61039b61066a3660046129c7565b61166d565b61039b61067d3660046129c7565b611708565b60135461039b9060ff1681565b61039b61069d3660046129c7565b611715565b6013546104bc906201000090046001600160a01b031681565b600e546104bc906001600160a01b031681565b6103fe6106dc366004612a10565b611838565b600d546104bc906001600160a01b031681565b6103eb610702366004612a10565b61184f565b6103fe7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6103eb61073c366004612a28565b611911565b6103fe61074f366004612940565b60146020526000908152604090205481565b6103fe61076f36600461295a565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6103fe7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6103eb6107cf366004612a10565b61191b565b6103fe600b5481565b60006001600160e01b03198216635a05180f60e01b1480610802575061080282611be1565b92915050565b60606006805461081790612c6f565b80601f016020809104026020016040519081016040528092919081815260200182805461084390612c6f565b80156108905780601f1061086557610100808354040283529160200191610890565b820191906000526020600020905b81548152906001019060200180831161087357829003601f168201915b5050505050905090565b60006108a7338484611c16565b50600192915050565b6000546001600160a01b031633146108e35760405162461bcd60e51b81526004016108da90612b74565b60405180910390fd5b601155565b6000546001600160a01b031633146109125760405162461bcd60e51b81526004016108da90612b74565b60135460ff1615156001146109615760405162461bcd60e51b8152602060048201526015602482015274159055531517d053149150511657d49154d5535151605a1b60448201526064016108da565b6013805460ff19169055565b6000546001600160a01b031633146109975760405162461bcd60e51b81526004016108da90612b74565b601354610100900460ff16156109e65760405162461bcd60e51b815260206004820152601460248201527313d3931657d393d517d25392551250531256915160621b60448201526064016108da565b600e80546001600160a01b039485166001600160a01b031991821617909155600f8054939094169216919091179091556012556013805461ffff1916610100179055565b6000546001600160a01b03163314610a545760405162461bcd60e51b81526004016108da90612b74565b600080546040516001600160a01b03909116907f8427d4739e7dc11aacb1135cad949e4e0cf051201130f48373d5b8baa91a9e9e908390a3600080546001600160a01b0319169055565b6000610aab848484611d3b565b6001600160a01b038416600090815260046020908152604080832033845290915290205482811015610b305760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084016108da565b610b448533610b3f8685612c11565b611c16565b506001949350505050565b610b598282611f1e565b6000828152600260205260409020610b719082611bcc565b505050565b600d546040805163313ce56760e01b815290516000926001600160a01b03169163313ce567916004808301926020929190829003018186803b158015610bbb57600080fd5b505afa158015610bcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bf39190612aab565b905090565b610c028282611f45565b6000828152600260205260409020610b719082611fbf565b3360008181526004602090815260408083206001600160a01b038716845290915281205490916108a7918590610b3f908690612bba565b610c7b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33611275565b610ced5760405162461bcd60e51b815260206004820152603960248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20756e70617573650000000000000060648201526084016108da565b610cf5611fd4565b565b610d217f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633611275565b610d8c5760405162461bcd60e51b815260206004820152603660248201527f45524332305072657365744d696e7465725061757365723a206d7573742068616044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b60648201526084016108da565b610d968282612067565b5050565b610da43382612152565b50565b6000546001600160a01b03163314610dd15760405162461bcd60e51b81526004016108da90612b74565b601255565b6000546001600160a01b03163314610e005760405162461bcd60e51b81526004016108da90612b74565b60008111610e505760405162461bcd60e51b815260206004820152601d60248201527f414d4f554e545f444956494445525f43414e4e4f545f42455f5a45524f00000060448201526064016108da565b6064821115610ea15760405162461bcd60e51b815260206004820152601a60248201527f4645455f50455243454e544147455f57524f4e475f56414c554500000000000060448201526064016108da565b600a829055600b81905560408051838152602081018390527f032dc6a2d839eb179729a55633fdf1c41a1fc4739394154117005db2b354b9b5910160405180910390a15050565b6000600b54600a5483610efb9190612bf2565b6108029190612bd2565b600080610f1160055490565b118015610f975750600d546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610f5d57600080fd5b505afa158015610f71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f959190612a93565b115b1561103157600554600d546040516370a0823160e01b8152306004820152620f4240916001600160a01b0316906370a082319060240160206040518083038186803b158015610fe557600080fd5b505afa158015610ff9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101d9190612a93565b6110279190612bf2565b610bf39190612bd2565b610bf3620f42406001612bf2565b600061104b833361076f565b9050818110156110a95760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b60648201526084016108da565b6110b88333610b3f8585612c11565b610b718383612152565b6110ec7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33611275565b61115e5760405162461bcd60e51b815260206004820152603760248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20706175736500000000000000000060648201526084016108da565b610cf56122ad565b6000546001600160a01b031633146111905760405162461bcd60e51b81526004016108da90612b74565b6001600160a01b0381166111fb5760405162461bcd60e51b815260206004820152602c60248201527f4d6f64657261626c653a206e6577206d6f64657261746f72206973207468652060448201526b7a65726f206164647265737360a01b60648201526084016108da565b600080546040516001600160a01b03808516939216917f8427d4739e7dc11aacb1135cad949e4e0cf051201130f48373d5b8baa91a9e9e91a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600082815260026020526040812061126e9083612328565b9392505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606007805461081790612c6f565b600f546000906001600160a01b031633146113075760405162461bcd60e51b815260206004820152601860248201527727a7262cafa32620a9a42fa627a0a72fa82927ab24a222a960411b60448201526064016108da565b61131082612334565b600d54600e5460405163a9059cbb60e01b81526001600160a01b03918216600482015260248101849052929350169063a9059cbb90604401602060405180830381600087803b15801561136257600080fd5b505af1158015611376573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139a91906129f0565b6113dc5760405162461bcd60e51b81526020600482015260136024820152721514905394d1915497d4d413125517d1905253606a1b60448201526064016108da565b919050565b6002600c5414156114345760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108da565b6002600c55336000908152600360205260409020548111156114985760405162461bcd60e51b815260206004820152601a60248201527f414d4f554e545f4249474745525f5448414e5f42414c414e434500000000000060448201526064016108da565b60006114a382612346565b90506114ae60055490565b6010546114bb9084612bf2565b6114c59190612bd2565b6010546114d29190612c11565b6010556114df3383612152565b600d5460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b15801561152b57600080fd5b505af115801561153f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061156391906129f0565b6115a65760405162461bcd60e51b81526020600482015260146024820152731514905394d1915497d4d51052d15117d190525360621b60448201526064016108da565b604080518381526020810183905233917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568910160405180910390a250506001600c55565b6000546001600160a01b031633146116145760405162461bcd60e51b81526004016108da90612b74565b60135460ff161561165e5760405162461bcd60e51b8152602060048201526014602482015273159055531517d053149150511657d4105554d15160621b60448201526064016108da565b6013805460ff19166001179055565b3360009081526004602090815260408083206001600160a01b0386168452909152812054828110156116ef5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016108da565b6116fe3385610b3f8685612c11565b5060019392505050565b60006108a7338484611d3b565b600f546000906001600160a01b0316331461176d5760405162461bcd60e51b815260206004820152601860248201527727a7262cafa32620a9a42fa627a0a72fa82927ab24a222a960411b60448201526064016108da565b60135460ff16156117b25760405162461bcd60e51b815260206004820152600f60248201526e13d3931657d393d517d4105554d151608a1b60448201526064016108da565b600d5460405163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529091169063a9059cbb90604401602060405180830381600087803b15801561180057600080fd5b505af1158015611814573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061126e91906129f0565b60008181526002602052604081206108029061235e565b6000546001600160a01b031633146118795760405162461bcd60e51b81526004016108da90612b74565b60648111156118d65760405162461bcd60e51b815260206004820152602360248201527f54524541535552595f4645455f50455243454e544147455f57524f4e475f56416044820152624c554560e81b60648201526084016108da565b60098190556040518181527f89283e039038eaa8562c75adc33894c98bc9b645d45a12bd711ed2c542a403299060200160405180910390a150565b610c028282612368565b60135460ff16156119605760405162461bcd60e51b815260206004820152600f60248201526e13d3931657d393d517d4105554d151608a1b60448201526064016108da565b6002600c5414156119b35760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108da565b6002600c5580611a055760405162461bcd60e51b815260206004820152601860248201527f43414e4e4f545f5354414b455f5a45524f5f544f4b454e53000000000000000060448201526064016108da565b601254601054611a159083612bba565b1115611a635760405162461bcd60e51b815260206004820152601e60248201527f414d4f554e545f49535f4249474745525f5448414e5f4341504143495459000060448201526064016108da565b6000611a6e8261238f565b905060105482611a7e9190612bba565b601055611a8b3382612067565b600d546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd90606401602060405180830381600087803b158015611add57600080fd5b505af1158015611af1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b1591906129f0565b611b585760405162461bcd60e51b81526020600482015260146024820152731514905394d1915497d4d51052d15117d190525360621b60448201526064016108da565b336000818152601460209081526040918290205482518681529182018590528183015290517f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e9181900360600190a250503360009081526014602052604090204390556001600c55565b610d9682826123a6565b600061126e836001600160a01b038416612411565b60006001600160e01b03198216637965db0b60e01b148061080257506301ffc9a760e01b6001600160e01b0319831614610802565b6001600160a01b038316611c785760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016108da565b6001600160a01b038216611cd95760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016108da565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038316611d9f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016108da565b6001600160a01b038216611e015760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016108da565b611e0c838383612460565b6001600160a01b03831660009081526003602052604090205481811015611e845760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016108da565b611e8e8282612c11565b6001600160a01b038086166000908152600360205260408082209390935590851681529081208054849290611ec4908490612bba565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611f1091815260200190565b60405180910390a350505050565b60008281526001602081905260409091200154611f3b813361246b565b610b7183836123a6565b6001600160a01b0381163314611fb55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016108da565b610d9682826124cf565b600061126e836001600160a01b038416612536565b60085460ff1661201d5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016108da565b6008805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b0382166120bd5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016108da565b6120c960008383612460565b80600560008282546120db9190612bba565b90915550506001600160a01b03821660009081526003602052604081208054839290612108908490612bba565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b0382166121b25760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016108da565b6121be82600083612460565b6001600160a01b038216600090815260036020526040902054818110156122325760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016108da565b61223c8282612c11565b6001600160a01b0384166000908152600360205260408120919091556005805484929061226a908490612c11565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001611d2e565b60085460ff16156122f35760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016108da565b6008805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861204a3390565b600061126e838361264d565b6000606460095483610efb9190612bf2565b6000620f4240612354610f05565b610efb9084612bf2565b6000610802825490565b60008281526001602081905260409091200154612385813361246b565b610b7183836124cf565b6000612399610f05565b610efb620f424084612bf2565b6123b08282611275565b610d965760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b600081815260018301602052604081205461245857508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610802565b506000610802565b610b718383836126e1565b6124758282611275565b610d965761248d816001600160a01b03166014612747565b612498836020612747565b6040516020016124a9929190612acc565b60408051601f198184030181529082905262461bcd60e51b82526108da91600401612b41565b6124d98282611275565b15610d965760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000818152600183016020526040812054801561264357600061255a600183612c11565b855490915060009061256e90600190612c11565b9050600086600001828154811061259557634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050808760000184815481106125c657634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101929092558281526001890190915260409020849055865487908061260757634e487b7160e01b600052603160045260246000fd5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610802565b6000915050610802565b815460009082106126ab5760405162461bcd60e51b815260206004820152602260248201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604482015261647360f01b60648201526084016108da565b8260000182815481106126ce57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b60085460ff1615610b715760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b60648201526084016108da565b60606000612756836002612bf2565b612761906002612bba565b67ffffffffffffffff81111561278757634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156127b1576020820181803683370190505b509050600360fc1b816000815181106127da57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061281757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600061283b846002612bf2565b612846906001612bba565b90505b60018111156128da576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061288857634e487b7160e01b600052603260045260246000fd5b1a60f81b8282815181106128ac57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c936128d381612c58565b9050612849565b50831561126e5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108da565b80356001600160a01b03811681146113dc57600080fd5b600060208284031215612951578081fd5b61126e82612929565b6000806040838503121561296c578081fd5b61297583612929565b915061298360208401612929565b90509250929050565b6000806000606084860312156129a0578081fd5b6129a984612929565b92506129b760208501612929565b9150604084013590509250925092565b600080604083850312156129d9578182fd5b6129e283612929565b946020939093013593505050565b600060208284031215612a01578081fd5b8151801515811461126e578182fd5b600060208284031215612a21578081fd5b5035919050565b60008060408385031215612a3a578182fd5b8235915061298360208401612929565b60008060408385031215612a5c578182fd5b50508035926020909101359150565b600060208284031215612a7c578081fd5b81356001600160e01b03198116811461126e578182fd5b600060208284031215612aa4578081fd5b5051919050565b600060208284031215612abc578081fd5b815160ff8116811461126e578182fd5b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612b04816017850160208801612c28565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612b35816028840160208801612c28565b01602801949350505050565b6020815260008251806020840152612b60816040850160208701612c28565b601f01601f19169190910160400192915050565b60208082526026908201527f4d6f64657261746f723a2063616c6c6572206973206e6f7420746865206d6f6460408201526532b930ba37b960d11b606082015260800190565b60008219821115612bcd57612bcd612caa565b500190565b600082612bed57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612c0c57612c0c612caa565b500290565b600082821015612c2357612c23612caa565b500390565b60005b83811015612c43578181015183820152602001612c2b565b83811115612c52576000848401525b50505050565b600081612c6757612c67612caa565b506000190190565b600181811c90821680612c8357607f821691505b60208210811415612ca457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfea264697066735822122030dc269aaf9c3875c269e863b9dff8c01d3aca4133d4bd6d4f3a5f6bbd75880e64736f6c634300080400330000000000000000000000001da87b114f35e1dc91f72bf57fc07a768ad40bb0
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106103835760003560e01c806370a08231116101de578063a9059cbb1161010f578063cd089962116100ad578063dd62ed3e1161007c578063dd62ed3e14610761578063e63ab1e91461079a578063eb521a4c146107c1578063f4a161f0146107d457600080fd5b8063cd089962146106f4578063d539139314610707578063d547741f1461072e578063db06d5a51461074157600080fd5b8063c45a0155116100e9578063c45a0155146106a2578063c5f956af146106bb578063ca15c873146106ce578063cc7a262e146106e157600080fd5b8063a9059cbb1461066f578063b187bd2614610682578063bb500f481461068f57600080fd5b806391d148541161017c5780639c8f9f23116101565780639c8f9f23146106395780639e0879c21461064c578063a217fddf14610654578063a457c2d71461065c57600080fd5b806391d148541461060b57806395d89b411461061e57806397046d991461062657600080fd5b80638200fa49116101b85780638200fa49146105ca5780638456cb59146105dd578063876ba3cd146105e55780639010d07c146105f857600080fd5b806370a082311461058657806378c4886b146105af57806379cc6790146105b757600080fd5b806336568abe116102b8578063453d91c111610256578063530b49e911610230578063530b49e91461055657806359b6a0c91461055f5780635c975abb146105685780636c28ebb91461057357600080fd5b8063453d91c1146105275780634c09f37c1461053a57806352f7c9881461054357600080fd5b8063395093511161029257806339509351146104e65780633f4ba83a146104f957806340c10f191461050157806342966c681461051457600080fd5b806336568abe1461049c57806338743904146104af578063392e53cd146104d457600080fd5b806318160ddd11610325578063248a9ca3116102ff578063248a9ca31461044257806325806649146104665780632f2ff15d1461046f578063313ce5671461048257600080fd5b806318160ddd1461041f5780631dfaa8ce1461042757806323b872dd1461042f57600080fd5b80630b3c08ed116103615780630b3c08ed146103d85780630b7562be146103ed5780630d155d26146103f55780631794bb3c1461040c57600080fd5b806301ffc9a71461038857806306fdde03146103b0578063095ea7b3146103c5575b600080fd5b61039b610396366004612a6b565b6107dd565b60405190151581526020015b60405180910390f35b6103b8610808565b6040516103a79190612b41565b61039b6103d33660046129c7565b61089a565b6103eb6103e6366004612a10565b6108b0565b005b6103eb6108e8565b6103fe60105481565b6040519081526020016103a7565b6103eb61041a36600461298c565b61096d565b6005546103fe565b6103eb610a2a565b61039b61043d36600461298c565b610a9e565b6103fe610450366004612a10565b6000908152600160208190526040909120015490565b6103fe60115481565b6103eb61047d366004612a28565b610b4f565b61048a610b76565b60405160ff90911681526020016103a7565b6103eb6104aa366004612a28565b610bf8565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016103a7565b60135461039b90610100900460ff1681565b61039b6104f43660046129c7565b610c1a565b6103eb610c51565b6103eb61050f3660046129c7565b610cf7565b6103eb610522366004612a10565b610d9a565b6103eb610535366004612a10565b610da7565b6103fe60095481565b6103eb610551366004612a4a565b610dd6565b6103fe600a5481565b6103fe60125481565b60085460ff1661039b565b6103fe610581366004612a10565b610ee8565b6103fe610594366004612940565b6001600160a01b031660009081526003602052604090205490565b6103fe610f05565b6103eb6105c53660046129c7565b61103f565b600f546104bc906001600160a01b031681565b6103eb6110c2565b6103eb6105f3366004612940565b611166565b6104bc610606366004612a4a565b611256565b61039b610619366004612a28565b611275565b6103b86112a0565b6103fe610634366004612a10565b6112af565b6103eb610647366004612a10565b6113e1565b6103eb6115ea565b6103fe600081565b61039b61066a3660046129c7565b61166d565b61039b61067d3660046129c7565b611708565b60135461039b9060ff1681565b61039b61069d3660046129c7565b611715565b6013546104bc906201000090046001600160a01b031681565b600e546104bc906001600160a01b031681565b6103fe6106dc366004612a10565b611838565b600d546104bc906001600160a01b031681565b6103eb610702366004612a10565b61184f565b6103fe7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6103eb61073c366004612a28565b611911565b6103fe61074f366004612940565b60146020526000908152604090205481565b6103fe61076f36600461295a565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6103fe7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6103eb6107cf366004612a10565b61191b565b6103fe600b5481565b60006001600160e01b03198216635a05180f60e01b1480610802575061080282611be1565b92915050565b60606006805461081790612c6f565b80601f016020809104026020016040519081016040528092919081815260200182805461084390612c6f565b80156108905780601f1061086557610100808354040283529160200191610890565b820191906000526020600020905b81548152906001019060200180831161087357829003601f168201915b5050505050905090565b60006108a7338484611c16565b50600192915050565b6000546001600160a01b031633146108e35760405162461bcd60e51b81526004016108da90612b74565b60405180910390fd5b601155565b6000546001600160a01b031633146109125760405162461bcd60e51b81526004016108da90612b74565b60135460ff1615156001146109615760405162461bcd60e51b8152602060048201526015602482015274159055531517d053149150511657d49154d5535151605a1b60448201526064016108da565b6013805460ff19169055565b6000546001600160a01b031633146109975760405162461bcd60e51b81526004016108da90612b74565b601354610100900460ff16156109e65760405162461bcd60e51b815260206004820152601460248201527313d3931657d393d517d25392551250531256915160621b60448201526064016108da565b600e80546001600160a01b039485166001600160a01b031991821617909155600f8054939094169216919091179091556012556013805461ffff1916610100179055565b6000546001600160a01b03163314610a545760405162461bcd60e51b81526004016108da90612b74565b600080546040516001600160a01b03909116907f8427d4739e7dc11aacb1135cad949e4e0cf051201130f48373d5b8baa91a9e9e908390a3600080546001600160a01b0319169055565b6000610aab848484611d3b565b6001600160a01b038416600090815260046020908152604080832033845290915290205482811015610b305760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084016108da565b610b448533610b3f8685612c11565b611c16565b506001949350505050565b610b598282611f1e565b6000828152600260205260409020610b719082611bcc565b505050565b600d546040805163313ce56760e01b815290516000926001600160a01b03169163313ce567916004808301926020929190829003018186803b158015610bbb57600080fd5b505afa158015610bcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bf39190612aab565b905090565b610c028282611f45565b6000828152600260205260409020610b719082611fbf565b3360008181526004602090815260408083206001600160a01b038716845290915281205490916108a7918590610b3f908690612bba565b610c7b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33611275565b610ced5760405162461bcd60e51b815260206004820152603960248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20756e70617573650000000000000060648201526084016108da565b610cf5611fd4565b565b610d217f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633611275565b610d8c5760405162461bcd60e51b815260206004820152603660248201527f45524332305072657365744d696e7465725061757365723a206d7573742068616044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b60648201526084016108da565b610d968282612067565b5050565b610da43382612152565b50565b6000546001600160a01b03163314610dd15760405162461bcd60e51b81526004016108da90612b74565b601255565b6000546001600160a01b03163314610e005760405162461bcd60e51b81526004016108da90612b74565b60008111610e505760405162461bcd60e51b815260206004820152601d60248201527f414d4f554e545f444956494445525f43414e4e4f545f42455f5a45524f00000060448201526064016108da565b6064821115610ea15760405162461bcd60e51b815260206004820152601a60248201527f4645455f50455243454e544147455f57524f4e475f56414c554500000000000060448201526064016108da565b600a829055600b81905560408051838152602081018390527f032dc6a2d839eb179729a55633fdf1c41a1fc4739394154117005db2b354b9b5910160405180910390a15050565b6000600b54600a5483610efb9190612bf2565b6108029190612bd2565b600080610f1160055490565b118015610f975750600d546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610f5d57600080fd5b505afa158015610f71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f959190612a93565b115b1561103157600554600d546040516370a0823160e01b8152306004820152620f4240916001600160a01b0316906370a082319060240160206040518083038186803b158015610fe557600080fd5b505afa158015610ff9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101d9190612a93565b6110279190612bf2565b610bf39190612bd2565b610bf3620f42406001612bf2565b600061104b833361076f565b9050818110156110a95760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b60648201526084016108da565b6110b88333610b3f8585612c11565b610b718383612152565b6110ec7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33611275565b61115e5760405162461bcd60e51b815260206004820152603760248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20706175736500000000000000000060648201526084016108da565b610cf56122ad565b6000546001600160a01b031633146111905760405162461bcd60e51b81526004016108da90612b74565b6001600160a01b0381166111fb5760405162461bcd60e51b815260206004820152602c60248201527f4d6f64657261626c653a206e6577206d6f64657261746f72206973207468652060448201526b7a65726f206164647265737360a01b60648201526084016108da565b600080546040516001600160a01b03808516939216917f8427d4739e7dc11aacb1135cad949e4e0cf051201130f48373d5b8baa91a9e9e91a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600082815260026020526040812061126e9083612328565b9392505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606007805461081790612c6f565b600f546000906001600160a01b031633146113075760405162461bcd60e51b815260206004820152601860248201527727a7262cafa32620a9a42fa627a0a72fa82927ab24a222a960411b60448201526064016108da565b61131082612334565b600d54600e5460405163a9059cbb60e01b81526001600160a01b03918216600482015260248101849052929350169063a9059cbb90604401602060405180830381600087803b15801561136257600080fd5b505af1158015611376573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139a91906129f0565b6113dc5760405162461bcd60e51b81526020600482015260136024820152721514905394d1915497d4d413125517d1905253606a1b60448201526064016108da565b919050565b6002600c5414156114345760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108da565b6002600c55336000908152600360205260409020548111156114985760405162461bcd60e51b815260206004820152601a60248201527f414d4f554e545f4249474745525f5448414e5f42414c414e434500000000000060448201526064016108da565b60006114a382612346565b90506114ae60055490565b6010546114bb9084612bf2565b6114c59190612bd2565b6010546114d29190612c11565b6010556114df3383612152565b600d5460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b15801561152b57600080fd5b505af115801561153f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061156391906129f0565b6115a65760405162461bcd60e51b81526020600482015260146024820152731514905394d1915497d4d51052d15117d190525360621b60448201526064016108da565b604080518381526020810183905233917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568910160405180910390a250506001600c55565b6000546001600160a01b031633146116145760405162461bcd60e51b81526004016108da90612b74565b60135460ff161561165e5760405162461bcd60e51b8152602060048201526014602482015273159055531517d053149150511657d4105554d15160621b60448201526064016108da565b6013805460ff19166001179055565b3360009081526004602090815260408083206001600160a01b0386168452909152812054828110156116ef5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016108da565b6116fe3385610b3f8685612c11565b5060019392505050565b60006108a7338484611d3b565b600f546000906001600160a01b0316331461176d5760405162461bcd60e51b815260206004820152601860248201527727a7262cafa32620a9a42fa627a0a72fa82927ab24a222a960411b60448201526064016108da565b60135460ff16156117b25760405162461bcd60e51b815260206004820152600f60248201526e13d3931657d393d517d4105554d151608a1b60448201526064016108da565b600d5460405163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529091169063a9059cbb90604401602060405180830381600087803b15801561180057600080fd5b505af1158015611814573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061126e91906129f0565b60008181526002602052604081206108029061235e565b6000546001600160a01b031633146118795760405162461bcd60e51b81526004016108da90612b74565b60648111156118d65760405162461bcd60e51b815260206004820152602360248201527f54524541535552595f4645455f50455243454e544147455f57524f4e475f56416044820152624c554560e81b60648201526084016108da565b60098190556040518181527f89283e039038eaa8562c75adc33894c98bc9b645d45a12bd711ed2c542a403299060200160405180910390a150565b610c028282612368565b60135460ff16156119605760405162461bcd60e51b815260206004820152600f60248201526e13d3931657d393d517d4105554d151608a1b60448201526064016108da565b6002600c5414156119b35760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108da565b6002600c5580611a055760405162461bcd60e51b815260206004820152601860248201527f43414e4e4f545f5354414b455f5a45524f5f544f4b454e53000000000000000060448201526064016108da565b601254601054611a159083612bba565b1115611a635760405162461bcd60e51b815260206004820152601e60248201527f414d4f554e545f49535f4249474745525f5448414e5f4341504143495459000060448201526064016108da565b6000611a6e8261238f565b905060105482611a7e9190612bba565b601055611a8b3382612067565b600d546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd90606401602060405180830381600087803b158015611add57600080fd5b505af1158015611af1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b1591906129f0565b611b585760405162461bcd60e51b81526020600482015260146024820152731514905394d1915497d4d51052d15117d190525360621b60448201526064016108da565b336000818152601460209081526040918290205482518681529182018590528183015290517f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e9181900360600190a250503360009081526014602052604090204390556001600c55565b610d9682826123a6565b600061126e836001600160a01b038416612411565b60006001600160e01b03198216637965db0b60e01b148061080257506301ffc9a760e01b6001600160e01b0319831614610802565b6001600160a01b038316611c785760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016108da565b6001600160a01b038216611cd95760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016108da565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038316611d9f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016108da565b6001600160a01b038216611e015760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016108da565b611e0c838383612460565b6001600160a01b03831660009081526003602052604090205481811015611e845760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016108da565b611e8e8282612c11565b6001600160a01b038086166000908152600360205260408082209390935590851681529081208054849290611ec4908490612bba565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611f1091815260200190565b60405180910390a350505050565b60008281526001602081905260409091200154611f3b813361246b565b610b7183836123a6565b6001600160a01b0381163314611fb55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016108da565b610d9682826124cf565b600061126e836001600160a01b038416612536565b60085460ff1661201d5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016108da565b6008805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b0382166120bd5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016108da565b6120c960008383612460565b80600560008282546120db9190612bba565b90915550506001600160a01b03821660009081526003602052604081208054839290612108908490612bba565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b0382166121b25760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016108da565b6121be82600083612460565b6001600160a01b038216600090815260036020526040902054818110156122325760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016108da565b61223c8282612c11565b6001600160a01b0384166000908152600360205260408120919091556005805484929061226a908490612c11565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001611d2e565b60085460ff16156122f35760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016108da565b6008805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861204a3390565b600061126e838361264d565b6000606460095483610efb9190612bf2565b6000620f4240612354610f05565b610efb9084612bf2565b6000610802825490565b60008281526001602081905260409091200154612385813361246b565b610b7183836124cf565b6000612399610f05565b610efb620f424084612bf2565b6123b08282611275565b610d965760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b600081815260018301602052604081205461245857508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610802565b506000610802565b610b718383836126e1565b6124758282611275565b610d965761248d816001600160a01b03166014612747565b612498836020612747565b6040516020016124a9929190612acc565b60408051601f198184030181529082905262461bcd60e51b82526108da91600401612b41565b6124d98282611275565b15610d965760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000818152600183016020526040812054801561264357600061255a600183612c11565b855490915060009061256e90600190612c11565b9050600086600001828154811061259557634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050808760000184815481106125c657634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101929092558281526001890190915260409020849055865487908061260757634e487b7160e01b600052603160045260246000fd5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610802565b6000915050610802565b815460009082106126ab5760405162461bcd60e51b815260206004820152602260248201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604482015261647360f01b60648201526084016108da565b8260000182815481106126ce57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b60085460ff1615610b715760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b60648201526084016108da565b60606000612756836002612bf2565b612761906002612bba565b67ffffffffffffffff81111561278757634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156127b1576020820181803683370190505b509050600360fc1b816000815181106127da57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061281757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600061283b846002612bf2565b612846906001612bba565b90505b60018111156128da576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061288857634e487b7160e01b600052603260045260246000fd5b1a60f81b8282815181106128ac57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c936128d381612c58565b9050612849565b50831561126e5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108da565b80356001600160a01b03811681146113dc57600080fd5b600060208284031215612951578081fd5b61126e82612929565b6000806040838503121561296c578081fd5b61297583612929565b915061298360208401612929565b90509250929050565b6000806000606084860312156129a0578081fd5b6129a984612929565b92506129b760208501612929565b9150604084013590509250925092565b600080604083850312156129d9578182fd5b6129e283612929565b946020939093013593505050565b600060208284031215612a01578081fd5b8151801515811461126e578182fd5b600060208284031215612a21578081fd5b5035919050565b60008060408385031215612a3a578182fd5b8235915061298360208401612929565b60008060408385031215612a5c578182fd5b50508035926020909101359150565b600060208284031215612a7c578081fd5b81356001600160e01b03198116811461126e578182fd5b600060208284031215612aa4578081fd5b5051919050565b600060208284031215612abc578081fd5b815160ff8116811461126e578182fd5b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612b04816017850160208801612c28565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612b35816028840160208801612c28565b01602801949350505050565b6020815260008251806020840152612b60816040850160208701612c28565b601f01601f19169190910160400192915050565b60208082526026908201527f4d6f64657261746f723a2063616c6c6572206973206e6f7420746865206d6f6460408201526532b930ba37b960d11b606082015260800190565b60008219821115612bcd57612bcd612caa565b500190565b600082612bed57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612c0c57612c0c612caa565b500290565b600082821015612c2357612c23612caa565b500390565b60005b83811015612c43578181015183820152602001612c2b565b83811115612c52576000848401525b50505050565b600081612c6757612c67612caa565b506000190190565b600181811c90821680612c8357607f821691505b60208210811415612ca457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfea264697066735822122030dc269aaf9c3875c269e863b9dff8c01d3aca4133d4bd6d4f3a5f6bbd75880e64736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000001da87b114f35e1dc91f72bf57fc07a768ad40bb0
-----Decoded View---------------
Arg [0] : _stakedToken (address): 0x1Da87b114f35E1DC91F72bF57fc07A768Ad40Bb0
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000001da87b114f35e1dc91f72bf57fc07a768ad40bb0
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.