Source Code
Overview
S Balance
Token Holdings
More Info
ContractCreator
Latest 5 from a total of 5 transactions
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Bonds
Compiler Version
v0.8.26+commit.8a97fa7a
Optimization Enabled:
Yes with 1000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.24; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "./interfaces/IToken.sol"; import "./interfaces/ILPManager.sol"; import "./interfaces/IManager.sol"; contract Bonds is ReentrancyGuard { uint256 private totalAvailableBonds; uint256 public bondIds = 1; uint256 public epochDuration = 6 hours; uint256 public fullDistributionEpochs = 12; // 3 days uint256 public genesisEpochTime; uint256 private _forTreasury = 40; uint256 private _forLP = 60; struct Bond { address underlying; uint256 bondPrice; uint256 available; uint256 totaltTokenBought; } struct Bonding { uint256 amount; uint256 epoch; } mapping(address => Bonding[]) public bondings; mapping(uint256 => Bond) public bonds; mapping(address => uint256) public totalClaimed; mapping(address => bool) private isBlacklisted; IManager private Manager; IToken private Token; ILPManager private LPManager; address private Treasury; address private LP; address private Staking; bool private isStarted = false; //--------------------------------------------------// constructor(address _manager) { Manager = IManager(_manager); } //--------------------------------------------------// modifier onlyOwner() { require(msg.sender == Manager.owner(), "Not Authorized"); _; } modifier isAValidId(uint256 id) { require(id <= bondIds, "Not a valid id"); _; } //--------------------------------------------------// function createBond( address underlying, uint256 bondPrice, uint256 available ) external onlyOwner { bonds[bondIds] = Bond(underlying, bondPrice, available, 0); totalAvailableBonds += available; bondIds++; } function setBondPrice( uint256 id, uint256 _bondPrice ) external onlyOwner isAValidId(id) { bonds[id].bondPrice = _bondPrice; } function setBondAvailable( uint256 id, uint256 _available ) external onlyOwner isAValidId(id) { bonds[id].available += _available; totalAvailableBonds += _available; } function setEpochDuration(uint256 _epochDuration) external onlyOwner { epochDuration = _epochDuration; } function setFullDistributionEpochs( uint256 _fullDistributionEpochs ) external onlyOwner { fullDistributionEpochs = _fullDistributionEpochs; } function setProportions(uint256 _tresury, uint256 _lp) external onlyOwner { _forTreasury = _tresury; _forLP = _lp; } function setManager(address _Manager) external onlyOwner { Manager = IManager(_Manager); } function setBlacklisted( address _address, bool _isBlacklisted ) external onlyOwner { isBlacklisted[_address] = _isBlacklisted; } function setAll() external onlyOwner { Token = IToken(_getContract("Token")); LPManager = ILPManager(_getContract("LPManager")); Treasury = _getContract("Treasury"); LP = _getContract("LP"); Staking = _getContract("Staking"); } //--------------------------------------------------// function buyBonds( uint256 id, uint256 amount ) external nonReentrant isAValidId(id) { require(isStarted, "Epoch not started"); address sender = msg.sender; Bond storage bond = bonds[id]; uint256 price = bond.bondPrice; uint256 toMint = (amount * 1e18) / price; require(bond.available >= toMint, "Not enough bonds available"); address underlying = bond.underlying; if (underlying == address(Token)) { IERC20(underlying).transferFrom(sender, address(Token), amount); } else { uint256 toTreasury = (amount * _forTreasury) / 100; uint256 toLP = (amount * _forLP) / 100; IERC20(underlying).transferFrom(sender, Treasury, toTreasury); IERC20(underlying).transferFrom(sender, LP, toLP); // LPManager.addLiquidity(underlying); } bond.totaltTokenBought += toMint; unchecked { bond.available -= toMint; } bondings[sender].push(Bonding(toMint, getEpoch())); } function claimBondedToken() external nonReentrant { address sender = msg.sender; require(!isBlacklisted[sender], "Not Authorized"); uint256 unlocked = unlockedCalculator(sender); require(unlocked > 0, "Not enough unlocked tToken"); totalClaimed[sender] += unlocked; totalAvailableBonds -= unlocked; Token.transfer(sender, unlocked); } //--------------------------------------------------// function getEpoch() internal view returns (uint256) { return (block.timestamp - genesisEpochTime) / epochDuration; } /** * @dev calculates the amount of unlocked tToken available for conversion to Token for a user * @param account the address of the user to check */ function unlockedCalculator(address account) public view returns (uint256) { uint256 unlocked = 0; uint256 _fullDistributionEpochs = fullDistributionEpochs; uint256 _length = bondings[account].length; for (uint256 i = 0; i < _length; i++) { uint256 epochsPassed = getEpoch() - bondings[account][i].epoch; epochsPassed = epochsPassed > _fullDistributionEpochs ? _fullDistributionEpochs : epochsPassed; unlocked += (bondings[account][i].amount * epochsPassed) / _fullDistributionEpochs; } return unlocked - totalClaimed[account]; } //--------------------------------------------------// function getTotalAvailableBonds() public view returns (uint256) { return totalAvailableBonds; } function getNextEpoch() public view returns (uint256) { return genesisEpochTime + (getEpoch() + 1) * epochDuration; } //--------------------------------------------------// function startEpoch() public onlyOwner { require(!isStarted, "Epoch already started"); genesisEpochTime = block.timestamp; isStarted = true; } function distributePresale( address[] memory users, uint256[] memory amounts ) public onlyOwner { require( users.length == amounts.length, "Arrays must be the same length" ); for (uint256 i = 0; i < users.length; i++) { totalAvailableBonds += amounts[i]; bondings[users[i]].push(Bonding(amounts[i], getEpoch())); } } //--------------------------------------------------// function _getContract( string memory contractName ) internal view returns (address) { return Manager.getContract(contractName); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC-20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC-721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC-1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.2.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "./IERC20.sol"; import {IERC20Metadata} from "./extensions/IERC20Metadata.sol"; import {Context} from "../../utils/Context.sol"; import {IERC20Errors} from "../../interfaces/draft-IERC6093.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}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC-20 * applications. */ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { mapping(address account => uint256) private _balances; mapping(address account => mapping(address spender => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * 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 returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual 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 default value returned by this function, unless * it's 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 returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `value`. */ function transfer(address to, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _transfer(owner, to, value); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, value); return true; } /** * @dev See {IERC20-transferFrom}. * * Skips emitting an {Approval} event indicating an allowance update. This is not * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve]. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `value`. * - the caller must have allowance for ``from``'s tokens of at least * `value`. */ function transferFrom(address from, address to, uint256 value) public virtual returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, value); _transfer(from, to, value); return true; } /** * @dev Moves a `value` amount of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _transfer(address from, address to, uint256 value) internal { if (from == address(0)) { revert ERC20InvalidSender(address(0)); } if (to == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(from, to, value); } /** * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding * this function. * * Emits a {Transfer} event. */ function _update(address from, address to, uint256 value) internal virtual { if (from == address(0)) { // Overflow check required: The rest of the code assumes that totalSupply never overflows _totalSupply += value; } else { uint256 fromBalance = _balances[from]; if (fromBalance < value) { revert ERC20InsufficientBalance(from, fromBalance, value); } unchecked { // Overflow not possible: value <= fromBalance <= totalSupply. _balances[from] = fromBalance - value; } } if (to == address(0)) { unchecked { // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply. _totalSupply -= value; } } else { unchecked { // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256. _balances[to] += value; } } emit Transfer(from, to, value); } /** * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0). * Relies on the `_update` mechanism * * Emits a {Transfer} event with `from` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _mint(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(address(0), account, value); } /** * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply. * Relies on the `_update` mechanism. * * Emits a {Transfer} event with `to` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead */ function _burn(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidSender(address(0)); } _update(account, address(0), value); } /** * @dev Sets `value` 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. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address owner, address spender, uint256 value) internal { _approve(owner, spender, value, true); } /** * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event. * * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any * `Approval` event during `transferFrom` operations. * * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to * true using the following override: * * ```solidity * function _approve(address owner, address spender, uint256 value, bool) internal virtual override { * super._approve(owner, spender, value, true); * } * ``` * * Requirements are the same as {_approve}. */ function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual { if (owner == address(0)) { revert ERC20InvalidApprover(address(0)); } if (spender == address(0)) { revert ERC20InvalidSpender(address(0)); } _allowances[owner][spender] = value; if (emitEvent) { emit Approval(owner, spender, value); } } /** * @dev Updates `owner` s allowance for `spender` based on spent `value`. * * Does not update the allowance value in case of infinite allowance. * Revert if not enough allowance is available. * * Does not emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 value) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance < type(uint256).max) { if (currentAllowance < value) { revert ERC20InsufficientAllowance(spender, currentAllowance, value); } unchecked { _approve(owner, spender, currentAllowance - value, false); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC-20 standard. */ 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 // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-20 standard as defined in the ERC. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol) pragma solidity ^0.8.20; /** * @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 EIP-1153 (transient storage) is available on the chain you're deploying at, * consider using {ReentrancyGuardTransient} instead. * * 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; /** * @dev Unauthorized reentrant call. */ error ReentrancyGuardReentrantCall(); 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 making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be NOT_ENTERED if (_status == ENTERED) { revert ReentrancyGuardReentrantCall(); } // Any calls to nonReentrant after this point will fail _status = ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == ENTERED; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.24; interface ILPManager { function addLiquidity(address token) external; }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.20; interface IManager { function getContract(string memory name) external view returns (address); function owner() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-20 standard as defined in the ERC. */ interface IToken { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); function mint(address to, uint256 value) external; function burnFrom(address from, uint256 value) external; }
{ "optimizer": { "enabled": true, "runs": 1000 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
[{"inputs":[{"internalType":"address","name":"_manager","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[],"name":"bondIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"bondings","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"epoch","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"bonds","outputs":[{"internalType":"address","name":"underlying","type":"address"},{"internalType":"uint256","name":"bondPrice","type":"uint256"},{"internalType":"uint256","name":"available","type":"uint256"},{"internalType":"uint256","name":"totaltTokenBought","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"buyBonds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimBondedToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"underlying","type":"address"},{"internalType":"uint256","name":"bondPrice","type":"uint256"},{"internalType":"uint256","name":"available","type":"uint256"}],"name":"createBond","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"users","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"distributePresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"epochDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fullDistributionEpochs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"genesisEpochTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNextEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalAvailableBonds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"setAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bool","name":"_isBlacklisted","type":"bool"}],"name":"setBlacklisted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"_available","type":"uint256"}],"name":"setBondAvailable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"_bondPrice","type":"uint256"}],"name":"setBondPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_epochDuration","type":"uint256"}],"name":"setEpochDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fullDistributionEpochs","type":"uint256"}],"name":"setFullDistributionEpochs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_Manager","type":"address"}],"name":"setManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tresury","type":"uint256"},{"internalType":"uint256","name":"_lp","type":"uint256"}],"name":"setProportions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startEpoch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"totalClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"unlockedCalculator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040526001600255615460600355600c6004556028600655603c6007556011805460ff60a01b19169055348015603657600080fd5b50604051611e35380380611e35833981016040819052605391607c565b6001600055600c80546001600160a01b0319166001600160a01b039290921691909117905560aa565b600060208284031215608d57600080fd5b81516001600160a01b038116811460a357600080fd5b9392505050565b611d7c806100b96000396000f3fe608060405234801561001057600080fd5b506004361061018d5760003560e01c806376f6804d116100e3578063c24ca5e21161008c578063ef5d9ae811610066578063ef5d9ae81461033a578063efe97d051461035a578063f98a718d1461036257600080fd5b8063c24ca5e21461030c578063d01dd6d214610314578063d0ebdbe71461032757600080fd5b8063a1aad09d116100bd578063a1aad09d146102de578063a2c8b177146102f1578063adad4873146102f957600080fd5b806376f6804d146102c4578063894c469b146102cd578063896ee58a146102d657600080fd5b8063411e42381161014557806354f04a111161011f57806354f04a111461023f5780635f1c17c014610252578063757aa29e146102bb57600080fd5b8063411e423814610202578063497af9d0146102235780634ff0876a1461023657600080fd5b806330024dfe1161017657806330024dfe146101d45780633d68c1ee146101e75780633e7d15c0146101fa57600080fd5b8063173e131f1461019257806325accadc146101a7575b600080fd5b6101a56101a0366004611958565b610375565b005b6101ba6101b5366004611992565b6104ca565b604080519283526020830191909152015b60405180910390f35b6101a56101e23660046119be565b610506565b6101a56101f53660046119be565b6105d3565b6101a56106a0565b6102156102103660046119d7565b61093c565b6040519081526020016101cb565b6101a5610231366004611958565b610a67565b61021560035481565b6101a561024d366004611958565b610b3a565b6102916102603660046119be565b60096020526000908152604090208054600182015460028301546003909301546001600160a01b0390921692909184565b604080516001600160a01b03909516855260208501939093529183015260608201526080016101cb565b61021560025481565b61021560045481565b61021560055481565b6101a5610ed7565b6101a56102ec366004611958565b611072565b6101a5611194565b6101a5610307366004611ad3565b6112ea565b600154610215565b6101a5610322366004611bac565b6114e6565b6101a56103353660046119d7565b6115d9565b6102156103483660046119d7565b600a6020526000908152604090205481565b6102156116c3565b6101a5610370366004611be5565b6116f7565b600c60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ec9190611c1a565b6001600160a01b0316336001600160a01b0316146104425760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b60448201526064015b60405180910390fd5b816002548111156104865760405162461bcd60e51b815260206004820152600e60248201526d139bdd0818481d985b1a59081a5960921b6044820152606401610439565b600083815260096020526040812060020180548492906104a7908490611c4d565b9250508190555081600160008282546104c09190611c4d565b9091555050505050565b600860205281600052604060002081815481106104e657600080fd5b600091825260209091206002909102018054600190910154909250905082565b600c60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610559573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061057d9190611c1a565b6001600160a01b0316336001600160a01b0316146105ce5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b6044820152606401610439565b600355565b600c60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610626573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064a9190611c1a565b6001600160a01b0316336001600160a01b03161461069b5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b6044820152606401610439565b600455565b600c60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107179190611c1a565b6001600160a01b0316336001600160a01b0316146107685760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b6044820152606401610439565b6107a66040518060400160405280600581526020017f546f6b656e000000000000000000000000000000000000000000000000000000815250611860565b600d80546001600160a01b0319166001600160a01b039290921691909117905560408051808201909152600981527f4c504d616e616765720000000000000000000000000000000000000000000000602082015261080390611860565b600e80546001600160a01b0319166001600160a01b039290921691909117905560408051808201909152600881527f5472656173757279000000000000000000000000000000000000000000000000602082015261086090611860565b600f80546001600160a01b0319166001600160a01b039290921691909117905560408051808201909152600281527f4c5000000000000000000000000000000000000000000000000000000000000060208201526108bd90611860565b601080546001600160a01b0319166001600160a01b039290921691909117905560408051808201909152600781527f5374616b696e6700000000000000000000000000000000000000000000000000602082015261091a90611860565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b03821660009081526008602052604081205490918291825b81811015610a3a576001600160a01b038616600090815260086020526040812080548390811061099057610990611c60565b9060005260206000209060020201600101546109aa6118f1565b6109b49190611c76565b90508381116109c357806109c5565b835b90508381600860008a6001600160a01b03166001600160a01b0316815260200190815260200160002084815481106109ff576109ff611c60565b906000526020600020906002020160000154610a1b9190611c89565b610a259190611ca0565b610a2f9086611c4d565b94505060010161095e565b506001600160a01b0385166000908152600a6020526040902054610a5e9084611c76565b95945050505050565b600c60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ade9190611c1a565b6001600160a01b0316336001600160a01b031614610b2f5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b6044820152606401610439565b600691909155600755565b610b4261190e565b81600254811115610b865760405162461bcd60e51b815260206004820152600e60248201526d139bdd0818481d985b1a59081a5960921b6044820152606401610439565b601154600160a01b900460ff16610bdf5760405162461bcd60e51b815260206004820152601160248201527f45706f6368206e6f7420737461727465640000000000000000000000000000006044820152606401610439565b60008381526009602052604081206001810154339281610c0787670de0b6b3a7640000611c89565b610c119190611ca0565b90508083600201541015610c675760405162461bcd60e51b815260206004820152601a60248201527f4e6f7420656e6f75676820626f6e647320617661696c61626c650000000000006044820152606401610439565b8254600d546001600160a01b0391821691168103610d0457600d546040516323b872dd60e01b81526001600160a01b038781166004830152918216602482015260448101899052908216906323b872dd906064016020604051808303816000875af1158015610cda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cfe9190611cc2565b50610e43565b6000606460065489610d169190611c89565b610d209190611ca0565b9050600060646007548a610d349190611c89565b610d3e9190611ca0565b600f546040516323b872dd60e01b81526001600160a01b038a811660048301529182166024820152604481018590529192508416906323b872dd906064016020604051808303816000875af1158015610d9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dbf9190611cc2565b506010546040516323b872dd60e01b81526001600160a01b038981166004830152918216602482015260448101839052908416906323b872dd906064016020604051808303816000875af1158015610e1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3f9190611cc2565b5050505b81846003016000828254610e579190611c4d565b909155505060028401805483900390556001600160a01b038516600090815260086020908152604091829020825180840190935284835291908101610e9a6118f1565b905281546001818101845560009384526020938490208351600290930201918255929091015191015550610ed394506119519350505050565b5050565b610edf61190e565b336000818152600b602052604090205460ff1615610f305760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b6044820152606401610439565b6000610f3b8261093c565b905060008111610f8d5760405162461bcd60e51b815260206004820152601a60248201527f4e6f7420656e6f75676820756e6c6f636b65642074546f6b656e0000000000006044820152606401610439565b6001600160a01b0382166000908152600a602052604081208054839290610fb5908490611c4d565b925050819055508060016000828254610fce9190611c76565b9091555050600d546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152602482018490529091169063a9059cbb906044016020604051808303816000875af115801561103f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110639190611cc2565b5050506110706001600055565b565b600c60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156110c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e99190611c1a565b6001600160a01b0316336001600160a01b03161461113a5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b6044820152606401610439565b8160025481111561117e5760405162461bcd60e51b815260206004820152600e60248201526d139bdd0818481d985b1a59081a5960921b6044820152606401610439565b5060009182526009602052604090912060010155565b600c60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120b9190611c1a565b6001600160a01b0316336001600160a01b03161461125c5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b6044820152606401610439565b601154600160a01b900460ff16156112b65760405162461bcd60e51b815260206004820152601560248201527f45706f636820616c7265616479207374617274656400000000000000000000006044820152606401610439565b42600555601180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b179055565b600c60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561133d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113619190611c1a565b6001600160a01b0316336001600160a01b0316146113b25760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b6044820152606401610439565b80518251146114035760405162461bcd60e51b815260206004820152601e60248201527f417272617973206d757374206265207468652073616d65206c656e67746800006044820152606401610439565b60005b82518110156114e15781818151811061142157611421611c60565b60200260200101516001600082825461143a9190611c4d565b925050819055506008600084838151811061145757611457611c60565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020604051806040016040528084848151811061149c5761149c611c60565b602002602001015181526020016114b16118f1565b90528154600181810184556000938452602093849020835160029093020191825592909101519082015501611406565b505050565b600c60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611539573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155d9190611c1a565b6001600160a01b0316336001600160a01b0316146115ae5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b6044820152606401610439565b6001600160a01b03919091166000908152600b60205260409020805460ff1916911515919091179055565b600c60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561162c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116509190611c1a565b6001600160a01b0316336001600160a01b0316146116a15760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b6044820152606401610439565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b60006003546116d06118f1565b6116db906001611c4d565b6116e59190611c89565b6005546116f29190611c4d565b905090565b600c60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561174a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176e9190611c1a565b6001600160a01b0316336001600160a01b0316146117bf5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b6044820152606401610439565b604080516080810182526001600160a01b03858116825260208083018681528385018681526000606086018181526002805483526009909552968120955186546001600160a01b031916951694909417855590516001808601919091559051918401919091559251600390920191909155815483929190611841908490611c4d565b90915550506002805490600061185683611cdf565b9190505550505050565b600c546040517f358177730000000000000000000000000000000000000000000000000000000081526000916001600160a01b0316906335817773906118aa908590600401611cf8565b602060405180830381865afa1580156118c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118eb9190611c1a565b92915050565b6000600354600554426119049190611c76565b6116f29190611ca0565b60026000540361194a576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600055565b6001600055565b6000806040838503121561196b57600080fd5b50508035926020909101359150565b6001600160a01b038116811461198f57600080fd5b50565b600080604083850312156119a557600080fd5b82356119b08161197a565b946020939093013593505050565b6000602082840312156119d057600080fd5b5035919050565b6000602082840312156119e957600080fd5b81356119f48161197a565b9392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611a3a57611a3a6119fb565b604052919050565b600067ffffffffffffffff821115611a5c57611a5c6119fb565b5060051b60200190565b600082601f830112611a7757600080fd5b8135611a8a611a8582611a42565b611a11565b8082825260208201915060208360051b860101925085831115611aac57600080fd5b602085015b83811015611ac9578035835260209283019201611ab1565b5095945050505050565b60008060408385031215611ae657600080fd5b823567ffffffffffffffff811115611afd57600080fd5b8301601f81018513611b0e57600080fd5b8035611b1c611a8582611a42565b8082825260208201915060208360051b850101925087831115611b3e57600080fd5b6020840193505b82841015611b69578335611b588161197a565b825260209384019390910190611b45565b9450505050602083013567ffffffffffffffff811115611b8857600080fd5b611b9485828601611a66565b9150509250929050565b801515811461198f57600080fd5b60008060408385031215611bbf57600080fd5b8235611bca8161197a565b91506020830135611bda81611b9e565b809150509250929050565b600080600060608486031215611bfa57600080fd5b8335611c058161197a565b95602085013595506040909401359392505050565b600060208284031215611c2c57600080fd5b81516119f48161197a565b634e487b7160e01b600052601160045260246000fd5b808201808211156118eb576118eb611c37565b634e487b7160e01b600052603260045260246000fd5b818103818111156118eb576118eb611c37565b80820281158282048414176118eb576118eb611c37565b600082611cbd57634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215611cd457600080fd5b81516119f481611b9e565b600060018201611cf157611cf1611c37565b5060010190565b602081526000825180602084015260005b81811015611d265760208186018101516040868401015201611d09565b506000604082850101526040601f19601f8301168401019150509291505056fea26469706673582212204b4864b86c515edd39460af6481efed6863b2189b3ecf1a904dbdd6c22f007c364736f6c634300081a00330000000000000000000000002dbdf9a4da27a58a5467e1827336ba7a2d2f85e4
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061018d5760003560e01c806376f6804d116100e3578063c24ca5e21161008c578063ef5d9ae811610066578063ef5d9ae81461033a578063efe97d051461035a578063f98a718d1461036257600080fd5b8063c24ca5e21461030c578063d01dd6d214610314578063d0ebdbe71461032757600080fd5b8063a1aad09d116100bd578063a1aad09d146102de578063a2c8b177146102f1578063adad4873146102f957600080fd5b806376f6804d146102c4578063894c469b146102cd578063896ee58a146102d657600080fd5b8063411e42381161014557806354f04a111161011f57806354f04a111461023f5780635f1c17c014610252578063757aa29e146102bb57600080fd5b8063411e423814610202578063497af9d0146102235780634ff0876a1461023657600080fd5b806330024dfe1161017657806330024dfe146101d45780633d68c1ee146101e75780633e7d15c0146101fa57600080fd5b8063173e131f1461019257806325accadc146101a7575b600080fd5b6101a56101a0366004611958565b610375565b005b6101ba6101b5366004611992565b6104ca565b604080519283526020830191909152015b60405180910390f35b6101a56101e23660046119be565b610506565b6101a56101f53660046119be565b6105d3565b6101a56106a0565b6102156102103660046119d7565b61093c565b6040519081526020016101cb565b6101a5610231366004611958565b610a67565b61021560035481565b6101a561024d366004611958565b610b3a565b6102916102603660046119be565b60096020526000908152604090208054600182015460028301546003909301546001600160a01b0390921692909184565b604080516001600160a01b03909516855260208501939093529183015260608201526080016101cb565b61021560025481565b61021560045481565b61021560055481565b6101a5610ed7565b6101a56102ec366004611958565b611072565b6101a5611194565b6101a5610307366004611ad3565b6112ea565b600154610215565b6101a5610322366004611bac565b6114e6565b6101a56103353660046119d7565b6115d9565b6102156103483660046119d7565b600a6020526000908152604090205481565b6102156116c3565b6101a5610370366004611be5565b6116f7565b600c60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ec9190611c1a565b6001600160a01b0316336001600160a01b0316146104425760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b60448201526064015b60405180910390fd5b816002548111156104865760405162461bcd60e51b815260206004820152600e60248201526d139bdd0818481d985b1a59081a5960921b6044820152606401610439565b600083815260096020526040812060020180548492906104a7908490611c4d565b9250508190555081600160008282546104c09190611c4d565b9091555050505050565b600860205281600052604060002081815481106104e657600080fd5b600091825260209091206002909102018054600190910154909250905082565b600c60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610559573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061057d9190611c1a565b6001600160a01b0316336001600160a01b0316146105ce5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b6044820152606401610439565b600355565b600c60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610626573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064a9190611c1a565b6001600160a01b0316336001600160a01b03161461069b5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b6044820152606401610439565b600455565b600c60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107179190611c1a565b6001600160a01b0316336001600160a01b0316146107685760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b6044820152606401610439565b6107a66040518060400160405280600581526020017f546f6b656e000000000000000000000000000000000000000000000000000000815250611860565b600d80546001600160a01b0319166001600160a01b039290921691909117905560408051808201909152600981527f4c504d616e616765720000000000000000000000000000000000000000000000602082015261080390611860565b600e80546001600160a01b0319166001600160a01b039290921691909117905560408051808201909152600881527f5472656173757279000000000000000000000000000000000000000000000000602082015261086090611860565b600f80546001600160a01b0319166001600160a01b039290921691909117905560408051808201909152600281527f4c5000000000000000000000000000000000000000000000000000000000000060208201526108bd90611860565b601080546001600160a01b0319166001600160a01b039290921691909117905560408051808201909152600781527f5374616b696e6700000000000000000000000000000000000000000000000000602082015261091a90611860565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b03821660009081526008602052604081205490918291825b81811015610a3a576001600160a01b038616600090815260086020526040812080548390811061099057610990611c60565b9060005260206000209060020201600101546109aa6118f1565b6109b49190611c76565b90508381116109c357806109c5565b835b90508381600860008a6001600160a01b03166001600160a01b0316815260200190815260200160002084815481106109ff576109ff611c60565b906000526020600020906002020160000154610a1b9190611c89565b610a259190611ca0565b610a2f9086611c4d565b94505060010161095e565b506001600160a01b0385166000908152600a6020526040902054610a5e9084611c76565b95945050505050565b600c60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ade9190611c1a565b6001600160a01b0316336001600160a01b031614610b2f5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b6044820152606401610439565b600691909155600755565b610b4261190e565b81600254811115610b865760405162461bcd60e51b815260206004820152600e60248201526d139bdd0818481d985b1a59081a5960921b6044820152606401610439565b601154600160a01b900460ff16610bdf5760405162461bcd60e51b815260206004820152601160248201527f45706f6368206e6f7420737461727465640000000000000000000000000000006044820152606401610439565b60008381526009602052604081206001810154339281610c0787670de0b6b3a7640000611c89565b610c119190611ca0565b90508083600201541015610c675760405162461bcd60e51b815260206004820152601a60248201527f4e6f7420656e6f75676820626f6e647320617661696c61626c650000000000006044820152606401610439565b8254600d546001600160a01b0391821691168103610d0457600d546040516323b872dd60e01b81526001600160a01b038781166004830152918216602482015260448101899052908216906323b872dd906064016020604051808303816000875af1158015610cda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cfe9190611cc2565b50610e43565b6000606460065489610d169190611c89565b610d209190611ca0565b9050600060646007548a610d349190611c89565b610d3e9190611ca0565b600f546040516323b872dd60e01b81526001600160a01b038a811660048301529182166024820152604481018590529192508416906323b872dd906064016020604051808303816000875af1158015610d9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dbf9190611cc2565b506010546040516323b872dd60e01b81526001600160a01b038981166004830152918216602482015260448101839052908416906323b872dd906064016020604051808303816000875af1158015610e1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3f9190611cc2565b5050505b81846003016000828254610e579190611c4d565b909155505060028401805483900390556001600160a01b038516600090815260086020908152604091829020825180840190935284835291908101610e9a6118f1565b905281546001818101845560009384526020938490208351600290930201918255929091015191015550610ed394506119519350505050565b5050565b610edf61190e565b336000818152600b602052604090205460ff1615610f305760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b6044820152606401610439565b6000610f3b8261093c565b905060008111610f8d5760405162461bcd60e51b815260206004820152601a60248201527f4e6f7420656e6f75676820756e6c6f636b65642074546f6b656e0000000000006044820152606401610439565b6001600160a01b0382166000908152600a602052604081208054839290610fb5908490611c4d565b925050819055508060016000828254610fce9190611c76565b9091555050600d546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152602482018490529091169063a9059cbb906044016020604051808303816000875af115801561103f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110639190611cc2565b5050506110706001600055565b565b600c60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156110c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e99190611c1a565b6001600160a01b0316336001600160a01b03161461113a5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b6044820152606401610439565b8160025481111561117e5760405162461bcd60e51b815260206004820152600e60248201526d139bdd0818481d985b1a59081a5960921b6044820152606401610439565b5060009182526009602052604090912060010155565b600c60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120b9190611c1a565b6001600160a01b0316336001600160a01b03161461125c5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b6044820152606401610439565b601154600160a01b900460ff16156112b65760405162461bcd60e51b815260206004820152601560248201527f45706f636820616c7265616479207374617274656400000000000000000000006044820152606401610439565b42600555601180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b179055565b600c60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561133d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113619190611c1a565b6001600160a01b0316336001600160a01b0316146113b25760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b6044820152606401610439565b80518251146114035760405162461bcd60e51b815260206004820152601e60248201527f417272617973206d757374206265207468652073616d65206c656e67746800006044820152606401610439565b60005b82518110156114e15781818151811061142157611421611c60565b60200260200101516001600082825461143a9190611c4d565b925050819055506008600084838151811061145757611457611c60565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020604051806040016040528084848151811061149c5761149c611c60565b602002602001015181526020016114b16118f1565b90528154600181810184556000938452602093849020835160029093020191825592909101519082015501611406565b505050565b600c60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611539573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155d9190611c1a565b6001600160a01b0316336001600160a01b0316146115ae5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b6044820152606401610439565b6001600160a01b03919091166000908152600b60205260409020805460ff1916911515919091179055565b600c60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561162c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116509190611c1a565b6001600160a01b0316336001600160a01b0316146116a15760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b6044820152606401610439565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b60006003546116d06118f1565b6116db906001611c4d565b6116e59190611c89565b6005546116f29190611c4d565b905090565b600c60009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561174a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176e9190611c1a565b6001600160a01b0316336001600160a01b0316146117bf5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b6044820152606401610439565b604080516080810182526001600160a01b03858116825260208083018681528385018681526000606086018181526002805483526009909552968120955186546001600160a01b031916951694909417855590516001808601919091559051918401919091559251600390920191909155815483929190611841908490611c4d565b90915550506002805490600061185683611cdf565b9190505550505050565b600c546040517f358177730000000000000000000000000000000000000000000000000000000081526000916001600160a01b0316906335817773906118aa908590600401611cf8565b602060405180830381865afa1580156118c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118eb9190611c1a565b92915050565b6000600354600554426119049190611c76565b6116f29190611ca0565b60026000540361194a576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600055565b6001600055565b6000806040838503121561196b57600080fd5b50508035926020909101359150565b6001600160a01b038116811461198f57600080fd5b50565b600080604083850312156119a557600080fd5b82356119b08161197a565b946020939093013593505050565b6000602082840312156119d057600080fd5b5035919050565b6000602082840312156119e957600080fd5b81356119f48161197a565b9392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611a3a57611a3a6119fb565b604052919050565b600067ffffffffffffffff821115611a5c57611a5c6119fb565b5060051b60200190565b600082601f830112611a7757600080fd5b8135611a8a611a8582611a42565b611a11565b8082825260208201915060208360051b860101925085831115611aac57600080fd5b602085015b83811015611ac9578035835260209283019201611ab1565b5095945050505050565b60008060408385031215611ae657600080fd5b823567ffffffffffffffff811115611afd57600080fd5b8301601f81018513611b0e57600080fd5b8035611b1c611a8582611a42565b8082825260208201915060208360051b850101925087831115611b3e57600080fd5b6020840193505b82841015611b69578335611b588161197a565b825260209384019390910190611b45565b9450505050602083013567ffffffffffffffff811115611b8857600080fd5b611b9485828601611a66565b9150509250929050565b801515811461198f57600080fd5b60008060408385031215611bbf57600080fd5b8235611bca8161197a565b91506020830135611bda81611b9e565b809150509250929050565b600080600060608486031215611bfa57600080fd5b8335611c058161197a565b95602085013595506040909401359392505050565b600060208284031215611c2c57600080fd5b81516119f48161197a565b634e487b7160e01b600052601160045260246000fd5b808201808211156118eb576118eb611c37565b634e487b7160e01b600052603260045260246000fd5b818103818111156118eb576118eb611c37565b80820281158282048414176118eb576118eb611c37565b600082611cbd57634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215611cd457600080fd5b81516119f481611b9e565b600060018201611cf157611cf1611c37565b5060010190565b602081526000825180602084015260005b81811015611d265760208186018101516040868401015201611d09565b506000604082850101526040601f19601f8301168401019150509291505056fea26469706673582212204b4864b86c515edd39460af6481efed6863b2189b3ecf1a904dbdd6c22f007c364736f6c634300081a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000002dbdf9a4da27a58a5467e1827336ba7a2d2f85e4
-----Decoded View---------------
Arg [0] : _manager (address): 0x2DBdF9A4da27a58a5467E1827336ba7a2D2F85e4
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000002dbdf9a4da27a58a5467e1827336ba7a2d2f85e4
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.